-diff -purN linux-2.6.27/Documentation/ABI/testing/sysfs-perfmon linux-2.6.27.19-5.1/Documentation/ABI/testing/sysfs-perfmon
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/ABI/testing/sysfs-perfmon 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/ABI/testing/sysfs-perfmon
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/ABI/testing/sysfs-perfmon Wed May 06 16:55:55 2009 +0100
@@ -0,0 +1,87 @@
+What: /sys/kernel/perfmon
+Date: Nov 2007
+ Bitmask to enable/disable certain perfmon2 features.
+ Currently defined:
+ - bit 0: if set, then reserved bitfield are ignored on PMC writes
-diff -purN linux-2.6.27/Documentation/ABI/testing/sysfs-perfmon-fmt linux-2.6.27.19-5.1/Documentation/ABI/testing/sysfs-perfmon-fmt
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/ABI/testing/sysfs-perfmon-fmt 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/ABI/testing/sysfs-perfmon-fmt
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/ABI/testing/sysfs-perfmon-fmt Wed May 06 16:55:55 2009 +0100
@@ -0,0 +1,18 @@
+What: /sys/kernel/perfmon/formats
+Date: 2007
+
+ Version number of the format in clear text and null terminated.
+
-diff -purN linux-2.6.27/Documentation/ABI/testing/sysfs-perfmon-pmu linux-2.6.27.19-5.1/Documentation/ABI/testing/sysfs-perfmon-pmu
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/ABI/testing/sysfs-perfmon-pmu 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/ABI/testing/sysfs-perfmon-pmu
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/ABI/testing/sysfs-perfmon-pmu Wed May 06 16:55:55 2009 +0100
@@ -0,0 +1,46 @@
+What: /sys/kernel/perfmon/pmu
+Date: Nov 2007
+
+ the width in bits of the registers. This field is only relevant for counter
+ registers.
-diff -purN linux-2.6.27/Documentation/DocBook/Makefile linux-2.6.27.19-5.1/Documentation/DocBook/Makefile
---- linux-2.6.27/Documentation/DocBook/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/DocBook/Makefile 2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 Documentation/DocBook/Makefile
+--- a/Documentation/DocBook/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/DocBook/Makefile Wed May 06 16:55:55 2009 +0100
@@ -7,7 +7,7 @@
# list of DOCBOOKS.
procfs-guide.xml writing_usb_driver.xml networking.xml \
kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
-diff -purN linux-2.6.27/Documentation/DocBook/kernel-api.tmpl linux-2.6.27.19-5.1/Documentation/DocBook/kernel-api.tmpl
---- linux-2.6.27/Documentation/DocBook/kernel-api.tmpl 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/DocBook/kernel-api.tmpl 2009-03-25 16:11:45.000000000 +0000
-@@ -364,6 +364,10 @@ X!Edrivers/pnp/system.c
+diff -r 9608d5473017 Documentation/DocBook/kernel-api.tmpl
+--- a/Documentation/DocBook/kernel-api.tmpl Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/DocBook/kernel-api.tmpl Wed May 06 16:55:56 2009 +0100
+@@ -364,6 +364,10 @@
!Eblock/blk-barrier.c
!Eblock/blk-tag.c
!Iblock/blk-tag.c
</chapter>
<chapter id="chrdev">
-diff -purN linux-2.6.27/Documentation/DocBook/utrace.tmpl linux-2.6.27.19-5.1/Documentation/DocBook/utrace.tmpl
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/DocBook/utrace.tmpl 2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 Documentation/DocBook/utrace.tmpl
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/DocBook/utrace.tmpl Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,566 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+</chapter>
+
+</book>
-diff -purN linux-2.6.27/Documentation/acpi/dsdt-override.txt linux-2.6.27.19-5.1/Documentation/acpi/dsdt-override.txt
---- linux-2.6.27/Documentation/acpi/dsdt-override.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/acpi/dsdt-override.txt 2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 Documentation/acpi/dsdt-override.txt
+--- a/Documentation/acpi/dsdt-override.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/acpi/dsdt-override.txt Wed May 06 16:55:56 2009 +0100
@@ -1,7 +1,15 @@
-Linux supports a method of overriding the BIOS DSDT:
+Linux supports two methods of overriding the BIOS DSDT:
+
+Documentation/initramfs-add-dsdt.sh is provided for convenience
+for use with the CONFIG_ACPI_CUSTOM_DSDT_INITRD method.
-diff -purN linux-2.6.27/Documentation/acpi/initramfs-add-dsdt.sh linux-2.6.27.19-5.1/Documentation/acpi/initramfs-add-dsdt.sh
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/acpi/initramfs-add-dsdt.sh 2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 Documentation/acpi/initramfs-add-dsdt.sh
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/acpi/initramfs-add-dsdt.sh Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,43 @@
+#!/bin/bash
+# Adds a DSDT file to the initrd (if it's an initramfs)
+# re-compress the archive
+gzip -c "$tempcpio"/initramfs.cpio > "$1"
+
-diff -purN linux-2.6.27/Documentation/block/deadline-iosched.txt linux-2.6.27.19-5.1/Documentation/block/deadline-iosched.txt
---- linux-2.6.27/Documentation/block/deadline-iosched.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/block/deadline-iosched.txt 2009-03-25 16:11:44.000000000 +0000
-@@ -30,12 +30,18 @@ write_expire (in ms)
+diff -r 9608d5473017 Documentation/block/deadline-iosched.txt
+--- a/Documentation/block/deadline-iosched.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/block/deadline-iosched.txt Wed May 06 16:55:56 2009 +0100
+@@ -30,12 +30,18 @@
Similar to read_expire mentioned above, but for writes.
writes_starved (number of dispatches)
-diff -purN linux-2.6.27/Documentation/cciss.txt linux-2.6.27.19-5.1/Documentation/cciss.txt
---- linux-2.6.27/Documentation/cciss.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/cciss.txt 2009-03-25 16:11:43.000000000 +0000
-@@ -26,6 +26,8 @@ This driver is known to work with the fo
+diff -r 9608d5473017 Documentation/cciss.txt
+--- a/Documentation/cciss.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/cciss.txt Wed May 06 16:55:56 2009 +0100
+@@ -26,6 +26,8 @@
* SA P410i
* SA P411
* SA P812
Detecting drive failures:
-------------------------
-diff -purN linux-2.6.27/Documentation/cgroups/cgroups.txt linux-2.6.27.19-5.1/Documentation/cgroups/cgroups.txt
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/cgroups/cgroups.txt 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/cgroups.txt
+--- a/Documentation/cgroups.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/cgroups.txt Wed May 06 16:55:56 2009 +0100
+@@ -1,548 +0,0 @@
+- CGROUPS
+- -------
+-
+-Written by Paul Menage <menage@google.com> based on Documentation/cpusets.txt
+-
+-Original copyright statements from cpusets.txt:
+-Portions Copyright (C) 2004 BULL SA.
+-Portions Copyright (c) 2004-2006 Silicon Graphics, Inc.
+-Modified by Paul Jackson <pj@sgi.com>
+-Modified by Christoph Lameter <clameter@sgi.com>
+-
+-CONTENTS:
+-=========
+-
+-1. Control Groups
+- 1.1 What are cgroups ?
+- 1.2 Why are cgroups needed ?
+- 1.3 How are cgroups implemented ?
+- 1.4 What does notify_on_release do ?
+- 1.5 How do I use cgroups ?
+-2. Usage Examples and Syntax
+- 2.1 Basic Usage
+- 2.2 Attaching processes
+-3. Kernel API
+- 3.1 Overview
+- 3.2 Synchronization
+- 3.3 Subsystem API
+-4. Questions
+-
+-1. Control Groups
+-=================
+-
+-1.1 What are cgroups ?
+-----------------------
+-
+-Control Groups provide a mechanism for aggregating/partitioning sets of
+-tasks, and all their future children, into hierarchical groups with
+-specialized behaviour.
+-
+-Definitions:
+-
+-A *cgroup* associates a set of tasks with a set of parameters for one
+-or more subsystems.
+-
+-A *subsystem* is a module that makes use of the task grouping
+-facilities provided by cgroups to treat groups of tasks in
+-particular ways. A subsystem is typically a "resource controller" that
+-schedules a resource or applies per-cgroup limits, but it may be
+-anything that wants to act on a group of processes, e.g. a
+-virtualization subsystem.
+-
+-A *hierarchy* is a set of cgroups arranged in a tree, such that
+-every task in the system is in exactly one of the cgroups in the
+-hierarchy, and a set of subsystems; each subsystem has system-specific
+-state attached to each cgroup in the hierarchy. Each hierarchy has
+-an instance of the cgroup virtual filesystem associated with it.
+-
+-At any one time there may be multiple active hierachies of task
+-cgroups. Each hierarchy is a partition of all tasks in the system.
+-
+-User level code may create and destroy cgroups by name in an
+-instance of the cgroup virtual file system, specify and query to
+-which cgroup a task is assigned, and list the task pids assigned to
+-a cgroup. Those creations and assignments only affect the hierarchy
+-associated with that instance of the cgroup file system.
+-
+-On their own, the only use for cgroups is for simple job
+-tracking. The intention is that other subsystems hook into the generic
+-cgroup support to provide new attributes for cgroups, such as
+-accounting/limiting the resources which processes in a cgroup can
+-access. For example, cpusets (see Documentation/cpusets.txt) allows
+-you to associate a set of CPUs and a set of memory nodes with the
+-tasks in each cgroup.
+-
+-1.2 Why are cgroups needed ?
+-----------------------------
+-
+-There are multiple efforts to provide process aggregations in the
+-Linux kernel, mainly for resource tracking purposes. Such efforts
+-include cpusets, CKRM/ResGroups, UserBeanCounters, and virtual server
+-namespaces. These all require the basic notion of a
+-grouping/partitioning of processes, with newly forked processes ending
+-in the same group (cgroup) as their parent process.
+-
+-The kernel cgroup patch provides the minimum essential kernel
+-mechanisms required to efficiently implement such groups. It has
+-minimal impact on the system fast paths, and provides hooks for
+-specific subsystems such as cpusets to provide additional behaviour as
+-desired.
+-
+-Multiple hierarchy support is provided to allow for situations where
+-the division of tasks into cgroups is distinctly different for
+-different subsystems - having parallel hierarchies allows each
+-hierarchy to be a natural division of tasks, without having to handle
+-complex combinations of tasks that would be present if several
+-unrelated subsystems needed to be forced into the same tree of
+-cgroups.
+-
+-At one extreme, each resource controller or subsystem could be in a
+-separate hierarchy; at the other extreme, all subsystems
+-would be attached to the same hierarchy.
+-
+-As an example of a scenario (originally proposed by vatsa@in.ibm.com)
+-that can benefit from multiple hierarchies, consider a large
+-university server with various users - students, professors, system
+-tasks etc. The resource planning for this server could be along the
+-following lines:
+-
+- CPU : Top cpuset
+- / \
+- CPUSet1 CPUSet2
+- | |
+- (Profs) (Students)
+-
+- In addition (system tasks) are attached to topcpuset (so
+- that they can run anywhere) with a limit of 20%
+-
+- Memory : Professors (50%), students (30%), system (20%)
+-
+- Disk : Prof (50%), students (30%), system (20%)
+-
+- Network : WWW browsing (20%), Network File System (60%), others (20%)
+- / \
+- Prof (15%) students (5%)
+-
+-Browsers like firefox/lynx go into the WWW network class, while (k)nfsd go
+-into NFS network class.
+-
+-At the same time firefox/lynx will share an appropriate CPU/Memory class
+-depending on who launched it (prof/student).
+-
+-With the ability to classify tasks differently for different resources
+-(by putting those resource subsystems in different hierarchies) then
+-the admin can easily set up a script which receives exec notifications
+-and depending on who is launching the browser he can
+-
+- # echo browser_pid > /mnt/<restype>/<userclass>/tasks
+-
+-With only a single hierarchy, he now would potentially have to create
+-a separate cgroup for every browser launched and associate it with
+-approp network and other resource class. This may lead to
+-proliferation of such cgroups.
+-
+-Also lets say that the administrator would like to give enhanced network
+-access temporarily to a student's browser (since it is night and the user
+-wants to do online gaming :)) OR give one of the students simulation
+-apps enhanced CPU power,
+-
+-With ability to write pids directly to resource classes, it's just a
+-matter of :
+-
+- # echo pid > /mnt/network/<new_class>/tasks
+- (after some time)
+- # echo pid > /mnt/network/<orig_class>/tasks
+-
+-Without this ability, he would have to split the cgroup into
+-multiple separate ones and then associate the new cgroups with the
+-new resource classes.
+-
+-
+-
+-1.3 How are cgroups implemented ?
+----------------------------------
+-
+-Control Groups extends the kernel as follows:
+-
+- - Each task in the system has a reference-counted pointer to a
+- css_set.
+-
+- - A css_set contains a set of reference-counted pointers to
+- cgroup_subsys_state objects, one for each cgroup subsystem
+- registered in the system. There is no direct link from a task to
+- the cgroup of which it's a member in each hierarchy, but this
+- can be determined by following pointers through the
+- cgroup_subsys_state objects. This is because accessing the
+- subsystem state is something that's expected to happen frequently
+- and in performance-critical code, whereas operations that require a
+- task's actual cgroup assignments (in particular, moving between
+- cgroups) are less common. A linked list runs through the cg_list
+- field of each task_struct using the css_set, anchored at
+- css_set->tasks.
+-
+- - A cgroup hierarchy filesystem can be mounted for browsing and
+- manipulation from user space.
+-
+- - You can list all the tasks (by pid) attached to any cgroup.
+-
+-The implementation of cgroups requires a few, simple hooks
+-into the rest of the kernel, none in performance critical paths:
+-
+- - in init/main.c, to initialize the root cgroups and initial
+- css_set at system boot.
+-
+- - in fork and exit, to attach and detach a task from its css_set.
+-
+-In addition a new file system, of type "cgroup" may be mounted, to
+-enable browsing and modifying the cgroups presently known to the
+-kernel. When mounting a cgroup hierarchy, you may specify a
+-comma-separated list of subsystems to mount as the filesystem mount
+-options. By default, mounting the cgroup filesystem attempts to
+-mount a hierarchy containing all registered subsystems.
+-
+-If an active hierarchy with exactly the same set of subsystems already
+-exists, it will be reused for the new mount. If no existing hierarchy
+-matches, and any of the requested subsystems are in use in an existing
+-hierarchy, the mount will fail with -EBUSY. Otherwise, a new hierarchy
+-is activated, associated with the requested subsystems.
+-
+-It's not currently possible to bind a new subsystem to an active
+-cgroup hierarchy, or to unbind a subsystem from an active cgroup
+-hierarchy. This may be possible in future, but is fraught with nasty
+-error-recovery issues.
+-
+-When a cgroup filesystem is unmounted, if there are any
+-child cgroups created below the top-level cgroup, that hierarchy
+-will remain active even though unmounted; if there are no
+-child cgroups then the hierarchy will be deactivated.
+-
+-No new system calls are added for cgroups - all support for
+-querying and modifying cgroups is via this cgroup file system.
+-
+-Each task under /proc has an added file named 'cgroup' displaying,
+-for each active hierarchy, the subsystem names and the cgroup name
+-as the path relative to the root of the cgroup file system.
+-
+-Each cgroup is represented by a directory in the cgroup file system
+-containing the following files describing that cgroup:
+-
+- - tasks: list of tasks (by pid) attached to that cgroup
+- - releasable flag: cgroup currently removeable?
+- - notify_on_release flag: run the release agent on exit?
+- - release_agent: the path to use for release notifications (this file
+- exists in the top cgroup only)
+-
+-Other subsystems such as cpusets may add additional files in each
+-cgroup dir.
+-
+-New cgroups are created using the mkdir system call or shell
+-command. The properties of a cgroup, such as its flags, are
+-modified by writing to the appropriate file in that cgroups
+-directory, as listed above.
+-
+-The named hierarchical structure of nested cgroups allows partitioning
+-a large system into nested, dynamically changeable, "soft-partitions".
+-
+-The attachment of each task, automatically inherited at fork by any
+-children of that task, to a cgroup allows organizing the work load
+-on a system into related sets of tasks. A task may be re-attached to
+-any other cgroup, if allowed by the permissions on the necessary
+-cgroup file system directories.
+-
+-When a task is moved from one cgroup to another, it gets a new
+-css_set pointer - if there's an already existing css_set with the
+-desired collection of cgroups then that group is reused, else a new
+-css_set is allocated. Note that the current implementation uses a
+-linear search to locate an appropriate existing css_set, so isn't
+-very efficient. A future version will use a hash table for better
+-performance.
+-
+-To allow access from a cgroup to the css_sets (and hence tasks)
+-that comprise it, a set of cg_cgroup_link objects form a lattice;
+-each cg_cgroup_link is linked into a list of cg_cgroup_links for
+-a single cgroup on its cgrp_link_list field, and a list of
+-cg_cgroup_links for a single css_set on its cg_link_list.
+-
+-Thus the set of tasks in a cgroup can be listed by iterating over
+-each css_set that references the cgroup, and sub-iterating over
+-each css_set's task set.
+-
+-The use of a Linux virtual file system (vfs) to represent the
+-cgroup hierarchy provides for a familiar permission and name space
+-for cgroups, with a minimum of additional kernel code.
+-
+-1.4 What does notify_on_release do ?
+-------------------------------------
+-
+-If the notify_on_release flag is enabled (1) in a cgroup, then
+-whenever the last task in the cgroup leaves (exits or attaches to
+-some other cgroup) and the last child cgroup of that cgroup
+-is removed, then the kernel runs the command specified by the contents
+-of the "release_agent" file in that hierarchy's root directory,
+-supplying the pathname (relative to the mount point of the cgroup
+-file system) of the abandoned cgroup. This enables automatic
+-removal of abandoned cgroups. The default value of
+-notify_on_release in the root cgroup at system boot is disabled
+-(0). The default value of other cgroups at creation is the current
+-value of their parents notify_on_release setting. The default value of
+-a cgroup hierarchy's release_agent path is empty.
+-
+-1.5 How do I use cgroups ?
+---------------------------
+-
+-To start a new job that is to be contained within a cgroup, using
+-the "cpuset" cgroup subsystem, the steps are something like:
+-
+- 1) mkdir /dev/cgroup
+- 2) mount -t cgroup -ocpuset cpuset /dev/cgroup
+- 3) Create the new cgroup by doing mkdir's and write's (or echo's) in
+- the /dev/cgroup virtual file system.
+- 4) Start a task that will be the "founding father" of the new job.
+- 5) Attach that task to the new cgroup by writing its pid to the
+- /dev/cgroup tasks file for that cgroup.
+- 6) fork, exec or clone the job tasks from this founding father task.
+-
+-For example, the following sequence of commands will setup a cgroup
+-named "Charlie", containing just CPUs 2 and 3, and Memory Node 1,
+-and then start a subshell 'sh' in that cgroup:
+-
+- mount -t cgroup cpuset -ocpuset /dev/cgroup
+- cd /dev/cgroup
+- mkdir Charlie
+- cd Charlie
+- /bin/echo 2-3 > cpuset.cpus
+- /bin/echo 1 > cpuset.mems
+- /bin/echo $$ > tasks
+- sh
+- # The subshell 'sh' is now running in cgroup Charlie
+- # The next line should display '/Charlie'
+- cat /proc/self/cgroup
+-
+-2. Usage Examples and Syntax
+-============================
+-
+-2.1 Basic Usage
+----------------
+-
+-Creating, modifying, using the cgroups can be done through the cgroup
+-virtual filesystem.
+-
+-To mount a cgroup hierarchy will all available subsystems, type:
+-# mount -t cgroup xxx /dev/cgroup
+-
+-The "xxx" is not interpreted by the cgroup code, but will appear in
+-/proc/mounts so may be any useful identifying string that you like.
+-
+-To mount a cgroup hierarchy with just the cpuset and numtasks
+-subsystems, type:
+-# mount -t cgroup -o cpuset,numtasks hier1 /dev/cgroup
+-
+-To change the set of subsystems bound to a mounted hierarchy, just
+-remount with different options:
+-
+-# mount -o remount,cpuset,ns /dev/cgroup
+-
+-Note that changing the set of subsystems is currently only supported
+-when the hierarchy consists of a single (root) cgroup. Supporting
+-the ability to arbitrarily bind/unbind subsystems from an existing
+-cgroup hierarchy is intended to be implemented in the future.
+-
+-Then under /dev/cgroup you can find a tree that corresponds to the
+-tree of the cgroups in the system. For instance, /dev/cgroup
+-is the cgroup that holds the whole system.
+-
+-If you want to create a new cgroup under /dev/cgroup:
+-# cd /dev/cgroup
+-# mkdir my_cgroup
+-
+-Now you want to do something with this cgroup.
+-# cd my_cgroup
+-
+-In this directory you can find several files:
+-# ls
+-notify_on_release releasable tasks
+-(plus whatever files added by the attached subsystems)
+-
+-Now attach your shell to this cgroup:
+-# /bin/echo $$ > tasks
+-
+-You can also create cgroups inside your cgroup by using mkdir in this
+-directory.
+-# mkdir my_sub_cs
+-
+-To remove a cgroup, just use rmdir:
+-# rmdir my_sub_cs
+-
+-This will fail if the cgroup is in use (has cgroups inside, or
+-has processes attached, or is held alive by other subsystem-specific
+-reference).
+-
+-2.2 Attaching processes
+------------------------
+-
+-# /bin/echo PID > tasks
+-
+-Note that it is PID, not PIDs. You can only attach ONE task at a time.
+-If you have several tasks to attach, you have to do it one after another:
+-
+-# /bin/echo PID1 > tasks
+-# /bin/echo PID2 > tasks
+- ...
+-# /bin/echo PIDn > tasks
+-
+-You can attach the current shell task by echoing 0:
+-
+-# echo 0 > tasks
+-
+-3. Kernel API
+-=============
+-
+-3.1 Overview
+-------------
+-
+-Each kernel subsystem that wants to hook into the generic cgroup
+-system needs to create a cgroup_subsys object. This contains
+-various methods, which are callbacks from the cgroup system, along
+-with a subsystem id which will be assigned by the cgroup system.
+-
+-Other fields in the cgroup_subsys object include:
+-
+-- subsys_id: a unique array index for the subsystem, indicating which
+- entry in cgroup->subsys[] this subsystem should be managing.
+-
+-- name: should be initialized to a unique subsystem name. Should be
+- no longer than MAX_CGROUP_TYPE_NAMELEN.
+-
+-- early_init: indicate if the subsystem needs early initialization
+- at system boot.
+-
+-Each cgroup object created by the system has an array of pointers,
+-indexed by subsystem id; this pointer is entirely managed by the
+-subsystem; the generic cgroup code will never touch this pointer.
+-
+-3.2 Synchronization
+--------------------
+-
+-There is a global mutex, cgroup_mutex, used by the cgroup
+-system. This should be taken by anything that wants to modify a
+-cgroup. It may also be taken to prevent cgroups from being
+-modified, but more specific locks may be more appropriate in that
+-situation.
+-
+-See kernel/cgroup.c for more details.
+-
+-Subsystems can take/release the cgroup_mutex via the functions
+-cgroup_lock()/cgroup_unlock().
+-
+-Accessing a task's cgroup pointer may be done in the following ways:
+-- while holding cgroup_mutex
+-- while holding the task's alloc_lock (via task_lock())
+-- inside an rcu_read_lock() section via rcu_dereference()
+-
+-3.3 Subsystem API
+------------------
+-
+-Each subsystem should:
+-
+-- add an entry in linux/cgroup_subsys.h
+-- define a cgroup_subsys object called <name>_subsys
+-
+-Each subsystem may export the following methods. The only mandatory
+-methods are create/destroy. Any others that are null are presumed to
+-be successful no-ops.
+-
+-struct cgroup_subsys_state *create(struct cgroup_subsys *ss,
+- struct cgroup *cgrp)
+-(cgroup_mutex held by caller)
+-
+-Called to create a subsystem state object for a cgroup. The
+-subsystem should allocate its subsystem state object for the passed
+-cgroup, returning a pointer to the new object on success or a
+-negative error code. On success, the subsystem pointer should point to
+-a structure of type cgroup_subsys_state (typically embedded in a
+-larger subsystem-specific object), which will be initialized by the
+-cgroup system. Note that this will be called at initialization to
+-create the root subsystem state for this subsystem; this case can be
+-identified by the passed cgroup object having a NULL parent (since
+-it's the root of the hierarchy) and may be an appropriate place for
+-initialization code.
+-
+-void destroy(struct cgroup_subsys *ss, struct cgroup *cgrp)
+-(cgroup_mutex held by caller)
+-
+-The cgroup system is about to destroy the passed cgroup; the subsystem
+-should do any necessary cleanup and free its subsystem state
+-object. By the time this method is called, the cgroup has already been
+-unlinked from the file system and from the child list of its parent;
+-cgroup->parent is still valid. (Note - can also be called for a
+-newly-created cgroup if an error occurs after this subsystem's
+-create() method has been called for the new cgroup).
+-
+-void pre_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp);
+-(cgroup_mutex held by caller)
+-
+-Called before checking the reference count on each subsystem. This may
+-be useful for subsystems which have some extra references even if
+-there are not tasks in the cgroup.
+-
+-int can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
+- struct task_struct *task)
+-(cgroup_mutex held by caller)
+-
+-Called prior to moving a task into a cgroup; if the subsystem
+-returns an error, this will abort the attach operation. If a NULL
+-task is passed, then a successful result indicates that *any*
+-unspecified task can be moved into the cgroup. Note that this isn't
+-called on a fork. If this method returns 0 (success) then this should
+-remain valid while the caller holds cgroup_mutex.
+-
+-void attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
+- struct cgroup *old_cgrp, struct task_struct *task)
+-
+-Called after the task has been attached to the cgroup, to allow any
+-post-attachment activity that requires memory allocations or blocking.
+-
+-void fork(struct cgroup_subsy *ss, struct task_struct *task)
+-
+-Called when a task is forked into a cgroup.
+-
+-void exit(struct cgroup_subsys *ss, struct task_struct *task)
+-
+-Called during task exit.
+-
+-int populate(struct cgroup_subsys *ss, struct cgroup *cgrp)
+-
+-Called after creation of a cgroup to allow a subsystem to populate
+-the cgroup directory with file entries. The subsystem should make
+-calls to cgroup_add_file() with objects of type cftype (see
+-include/linux/cgroup.h for details). Note that although this
+-method can return an error code, the error code is currently not
+-always handled well.
+-
+-void post_clone(struct cgroup_subsys *ss, struct cgroup *cgrp)
+-
+-Called at the end of cgroup_clone() to do any paramater
+-initialization which might be required before a task could attach. For
+-example in cpusets, no task may attach before 'cpus' and 'mems' are set
+-up.
+-
+-void bind(struct cgroup_subsys *ss, struct cgroup *root)
+-(cgroup_mutex held by caller)
+-
+-Called when a cgroup subsystem is rebound to a different hierarchy
+-and root cgroup. Currently this will only involve movement between
+-the default hierarchy (which never has sub-cgroups) and a hierarchy
+-that is being created/destroyed (and hence has no sub-cgroups).
+-
+-4. Questions
+-============
+-
+-Q: what's up with this '/bin/echo' ?
+-A: bash's builtin 'echo' command does not check calls to write() against
+- errors. If you use it in the cgroup file system, you won't be
+- able to tell whether a command succeeded or failed.
+-
+-Q: When I attach processes, only the first of the line gets really attached !
+-A: We can only return one error code per call to write(). So you should also
+- put only ONE pid.
+-
+diff -r 9608d5473017 Documentation/cgroups/cgroups.txt
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/cgroups/cgroups.txt Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,548 @@
+ CGROUPS
+ -------
+A: We can only return one error code per call to write(). So you should also
+ put only ONE pid.
+
-diff -purN linux-2.6.27/Documentation/cgroups/freezer-subsystem.txt linux-2.6.27.19-5.1/Documentation/cgroups/freezer-subsystem.txt
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/cgroups/freezer-subsystem.txt 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/cgroups/freezer-subsystem.txt
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/cgroups/freezer-subsystem.txt Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,102 @@
+The cgroup freezer is useful to batch job management system which start
+and stop sets of tasks in order to schedule the resources of a machine
+ and returns EINVAL)
+ 3) The tasks that blocked the cgroup from entering the "FROZEN"
+ state disappear from the cgroup's set of tasks.
-diff -purN linux-2.6.27/Documentation/cgroups.txt linux-2.6.27.19-5.1/Documentation/cgroups.txt
---- linux-2.6.27/Documentation/cgroups.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/cgroups.txt 1970-01-01 01:00:00.000000000 +0100
-@@ -1,548 +0,0 @@
-- CGROUPS
-- -------
--
--Written by Paul Menage <menage@google.com> based on Documentation/cpusets.txt
--
--Original copyright statements from cpusets.txt:
--Portions Copyright (C) 2004 BULL SA.
--Portions Copyright (c) 2004-2006 Silicon Graphics, Inc.
--Modified by Paul Jackson <pj@sgi.com>
--Modified by Christoph Lameter <clameter@sgi.com>
--
--CONTENTS:
--=========
--
--1. Control Groups
-- 1.1 What are cgroups ?
-- 1.2 Why are cgroups needed ?
-- 1.3 How are cgroups implemented ?
-- 1.4 What does notify_on_release do ?
-- 1.5 How do I use cgroups ?
--2. Usage Examples and Syntax
-- 2.1 Basic Usage
-- 2.2 Attaching processes
--3. Kernel API
-- 3.1 Overview
-- 3.2 Synchronization
-- 3.3 Subsystem API
--4. Questions
--
--1. Control Groups
--=================
--
--1.1 What are cgroups ?
------------------------
--
--Control Groups provide a mechanism for aggregating/partitioning sets of
--tasks, and all their future children, into hierarchical groups with
--specialized behaviour.
--
--Definitions:
--
--A *cgroup* associates a set of tasks with a set of parameters for one
--or more subsystems.
--
--A *subsystem* is a module that makes use of the task grouping
--facilities provided by cgroups to treat groups of tasks in
--particular ways. A subsystem is typically a "resource controller" that
--schedules a resource or applies per-cgroup limits, but it may be
--anything that wants to act on a group of processes, e.g. a
--virtualization subsystem.
--
--A *hierarchy* is a set of cgroups arranged in a tree, such that
--every task in the system is in exactly one of the cgroups in the
--hierarchy, and a set of subsystems; each subsystem has system-specific
--state attached to each cgroup in the hierarchy. Each hierarchy has
--an instance of the cgroup virtual filesystem associated with it.
--
--At any one time there may be multiple active hierachies of task
--cgroups. Each hierarchy is a partition of all tasks in the system.
--
--User level code may create and destroy cgroups by name in an
--instance of the cgroup virtual file system, specify and query to
--which cgroup a task is assigned, and list the task pids assigned to
--a cgroup. Those creations and assignments only affect the hierarchy
--associated with that instance of the cgroup file system.
--
--On their own, the only use for cgroups is for simple job
--tracking. The intention is that other subsystems hook into the generic
--cgroup support to provide new attributes for cgroups, such as
--accounting/limiting the resources which processes in a cgroup can
--access. For example, cpusets (see Documentation/cpusets.txt) allows
--you to associate a set of CPUs and a set of memory nodes with the
--tasks in each cgroup.
--
--1.2 Why are cgroups needed ?
------------------------------
--
--There are multiple efforts to provide process aggregations in the
--Linux kernel, mainly for resource tracking purposes. Such efforts
--include cpusets, CKRM/ResGroups, UserBeanCounters, and virtual server
--namespaces. These all require the basic notion of a
--grouping/partitioning of processes, with newly forked processes ending
--in the same group (cgroup) as their parent process.
--
--The kernel cgroup patch provides the minimum essential kernel
--mechanisms required to efficiently implement such groups. It has
--minimal impact on the system fast paths, and provides hooks for
--specific subsystems such as cpusets to provide additional behaviour as
--desired.
--
--Multiple hierarchy support is provided to allow for situations where
--the division of tasks into cgroups is distinctly different for
--different subsystems - having parallel hierarchies allows each
--hierarchy to be a natural division of tasks, without having to handle
--complex combinations of tasks that would be present if several
--unrelated subsystems needed to be forced into the same tree of
--cgroups.
--
--At one extreme, each resource controller or subsystem could be in a
--separate hierarchy; at the other extreme, all subsystems
--would be attached to the same hierarchy.
--
--As an example of a scenario (originally proposed by vatsa@in.ibm.com)
--that can benefit from multiple hierarchies, consider a large
--university server with various users - students, professors, system
--tasks etc. The resource planning for this server could be along the
--following lines:
--
-- CPU : Top cpuset
-- / \
-- CPUSet1 CPUSet2
-- | |
-- (Profs) (Students)
--
-- In addition (system tasks) are attached to topcpuset (so
-- that they can run anywhere) with a limit of 20%
--
-- Memory : Professors (50%), students (30%), system (20%)
--
-- Disk : Prof (50%), students (30%), system (20%)
--
-- Network : WWW browsing (20%), Network File System (60%), others (20%)
-- / \
-- Prof (15%) students (5%)
--
--Browsers like firefox/lynx go into the WWW network class, while (k)nfsd go
--into NFS network class.
--
--At the same time firefox/lynx will share an appropriate CPU/Memory class
--depending on who launched it (prof/student).
--
--With the ability to classify tasks differently for different resources
--(by putting those resource subsystems in different hierarchies) then
--the admin can easily set up a script which receives exec notifications
--and depending on who is launching the browser he can
--
-- # echo browser_pid > /mnt/<restype>/<userclass>/tasks
--
--With only a single hierarchy, he now would potentially have to create
--a separate cgroup for every browser launched and associate it with
--approp network and other resource class. This may lead to
--proliferation of such cgroups.
--
--Also lets say that the administrator would like to give enhanced network
--access temporarily to a student's browser (since it is night and the user
--wants to do online gaming :)) OR give one of the students simulation
--apps enhanced CPU power,
--
--With ability to write pids directly to resource classes, it's just a
--matter of :
--
-- # echo pid > /mnt/network/<new_class>/tasks
-- (after some time)
-- # echo pid > /mnt/network/<orig_class>/tasks
--
--Without this ability, he would have to split the cgroup into
--multiple separate ones and then associate the new cgroups with the
--new resource classes.
--
--
--
--1.3 How are cgroups implemented ?
-----------------------------------
--
--Control Groups extends the kernel as follows:
--
-- - Each task in the system has a reference-counted pointer to a
-- css_set.
--
-- - A css_set contains a set of reference-counted pointers to
-- cgroup_subsys_state objects, one for each cgroup subsystem
-- registered in the system. There is no direct link from a task to
-- the cgroup of which it's a member in each hierarchy, but this
-- can be determined by following pointers through the
-- cgroup_subsys_state objects. This is because accessing the
-- subsystem state is something that's expected to happen frequently
-- and in performance-critical code, whereas operations that require a
-- task's actual cgroup assignments (in particular, moving between
-- cgroups) are less common. A linked list runs through the cg_list
-- field of each task_struct using the css_set, anchored at
-- css_set->tasks.
--
-- - A cgroup hierarchy filesystem can be mounted for browsing and
-- manipulation from user space.
--
-- - You can list all the tasks (by pid) attached to any cgroup.
--
--The implementation of cgroups requires a few, simple hooks
--into the rest of the kernel, none in performance critical paths:
--
-- - in init/main.c, to initialize the root cgroups and initial
-- css_set at system boot.
--
-- - in fork and exit, to attach and detach a task from its css_set.
--
--In addition a new file system, of type "cgroup" may be mounted, to
--enable browsing and modifying the cgroups presently known to the
--kernel. When mounting a cgroup hierarchy, you may specify a
--comma-separated list of subsystems to mount as the filesystem mount
--options. By default, mounting the cgroup filesystem attempts to
--mount a hierarchy containing all registered subsystems.
--
--If an active hierarchy with exactly the same set of subsystems already
--exists, it will be reused for the new mount. If no existing hierarchy
--matches, and any of the requested subsystems are in use in an existing
--hierarchy, the mount will fail with -EBUSY. Otherwise, a new hierarchy
--is activated, associated with the requested subsystems.
--
--It's not currently possible to bind a new subsystem to an active
--cgroup hierarchy, or to unbind a subsystem from an active cgroup
--hierarchy. This may be possible in future, but is fraught with nasty
--error-recovery issues.
--
--When a cgroup filesystem is unmounted, if there are any
--child cgroups created below the top-level cgroup, that hierarchy
--will remain active even though unmounted; if there are no
--child cgroups then the hierarchy will be deactivated.
--
--No new system calls are added for cgroups - all support for
--querying and modifying cgroups is via this cgroup file system.
--
--Each task under /proc has an added file named 'cgroup' displaying,
--for each active hierarchy, the subsystem names and the cgroup name
--as the path relative to the root of the cgroup file system.
--
--Each cgroup is represented by a directory in the cgroup file system
--containing the following files describing that cgroup:
--
-- - tasks: list of tasks (by pid) attached to that cgroup
-- - releasable flag: cgroup currently removeable?
-- - notify_on_release flag: run the release agent on exit?
-- - release_agent: the path to use for release notifications (this file
-- exists in the top cgroup only)
--
--Other subsystems such as cpusets may add additional files in each
--cgroup dir.
--
--New cgroups are created using the mkdir system call or shell
--command. The properties of a cgroup, such as its flags, are
--modified by writing to the appropriate file in that cgroups
--directory, as listed above.
--
--The named hierarchical structure of nested cgroups allows partitioning
--a large system into nested, dynamically changeable, "soft-partitions".
--
--The attachment of each task, automatically inherited at fork by any
--children of that task, to a cgroup allows organizing the work load
--on a system into related sets of tasks. A task may be re-attached to
--any other cgroup, if allowed by the permissions on the necessary
--cgroup file system directories.
--
--When a task is moved from one cgroup to another, it gets a new
--css_set pointer - if there's an already existing css_set with the
--desired collection of cgroups then that group is reused, else a new
--css_set is allocated. Note that the current implementation uses a
--linear search to locate an appropriate existing css_set, so isn't
--very efficient. A future version will use a hash table for better
--performance.
--
--To allow access from a cgroup to the css_sets (and hence tasks)
--that comprise it, a set of cg_cgroup_link objects form a lattice;
--each cg_cgroup_link is linked into a list of cg_cgroup_links for
--a single cgroup on its cgrp_link_list field, and a list of
--cg_cgroup_links for a single css_set on its cg_link_list.
--
--Thus the set of tasks in a cgroup can be listed by iterating over
--each css_set that references the cgroup, and sub-iterating over
--each css_set's task set.
--
--The use of a Linux virtual file system (vfs) to represent the
--cgroup hierarchy provides for a familiar permission and name space
--for cgroups, with a minimum of additional kernel code.
--
--1.4 What does notify_on_release do ?
--------------------------------------
--
--If the notify_on_release flag is enabled (1) in a cgroup, then
--whenever the last task in the cgroup leaves (exits or attaches to
--some other cgroup) and the last child cgroup of that cgroup
--is removed, then the kernel runs the command specified by the contents
--of the "release_agent" file in that hierarchy's root directory,
--supplying the pathname (relative to the mount point of the cgroup
--file system) of the abandoned cgroup. This enables automatic
--removal of abandoned cgroups. The default value of
--notify_on_release in the root cgroup at system boot is disabled
--(0). The default value of other cgroups at creation is the current
--value of their parents notify_on_release setting. The default value of
--a cgroup hierarchy's release_agent path is empty.
--
--1.5 How do I use cgroups ?
----------------------------
--
--To start a new job that is to be contained within a cgroup, using
--the "cpuset" cgroup subsystem, the steps are something like:
--
-- 1) mkdir /dev/cgroup
-- 2) mount -t cgroup -ocpuset cpuset /dev/cgroup
-- 3) Create the new cgroup by doing mkdir's and write's (or echo's) in
-- the /dev/cgroup virtual file system.
-- 4) Start a task that will be the "founding father" of the new job.
-- 5) Attach that task to the new cgroup by writing its pid to the
-- /dev/cgroup tasks file for that cgroup.
-- 6) fork, exec or clone the job tasks from this founding father task.
--
--For example, the following sequence of commands will setup a cgroup
--named "Charlie", containing just CPUs 2 and 3, and Memory Node 1,
--and then start a subshell 'sh' in that cgroup:
--
-- mount -t cgroup cpuset -ocpuset /dev/cgroup
-- cd /dev/cgroup
-- mkdir Charlie
-- cd Charlie
-- /bin/echo 2-3 > cpuset.cpus
-- /bin/echo 1 > cpuset.mems
-- /bin/echo $$ > tasks
-- sh
-- # The subshell 'sh' is now running in cgroup Charlie
-- # The next line should display '/Charlie'
-- cat /proc/self/cgroup
--
--2. Usage Examples and Syntax
--============================
--
--2.1 Basic Usage
-----------------
--
--Creating, modifying, using the cgroups can be done through the cgroup
--virtual filesystem.
--
--To mount a cgroup hierarchy will all available subsystems, type:
--# mount -t cgroup xxx /dev/cgroup
--
--The "xxx" is not interpreted by the cgroup code, but will appear in
--/proc/mounts so may be any useful identifying string that you like.
--
--To mount a cgroup hierarchy with just the cpuset and numtasks
--subsystems, type:
--# mount -t cgroup -o cpuset,numtasks hier1 /dev/cgroup
--
--To change the set of subsystems bound to a mounted hierarchy, just
--remount with different options:
--
--# mount -o remount,cpuset,ns /dev/cgroup
--
--Note that changing the set of subsystems is currently only supported
--when the hierarchy consists of a single (root) cgroup. Supporting
--the ability to arbitrarily bind/unbind subsystems from an existing
--cgroup hierarchy is intended to be implemented in the future.
--
--Then under /dev/cgroup you can find a tree that corresponds to the
--tree of the cgroups in the system. For instance, /dev/cgroup
--is the cgroup that holds the whole system.
--
--If you want to create a new cgroup under /dev/cgroup:
--# cd /dev/cgroup
--# mkdir my_cgroup
--
--Now you want to do something with this cgroup.
--# cd my_cgroup
--
--In this directory you can find several files:
--# ls
--notify_on_release releasable tasks
--(plus whatever files added by the attached subsystems)
--
--Now attach your shell to this cgroup:
--# /bin/echo $$ > tasks
--
--You can also create cgroups inside your cgroup by using mkdir in this
--directory.
--# mkdir my_sub_cs
--
--To remove a cgroup, just use rmdir:
--# rmdir my_sub_cs
--
--This will fail if the cgroup is in use (has cgroups inside, or
--has processes attached, or is held alive by other subsystem-specific
--reference).
--
--2.2 Attaching processes
-------------------------
--
--# /bin/echo PID > tasks
--
--Note that it is PID, not PIDs. You can only attach ONE task at a time.
--If you have several tasks to attach, you have to do it one after another:
--
--# /bin/echo PID1 > tasks
--# /bin/echo PID2 > tasks
-- ...
--# /bin/echo PIDn > tasks
--
--You can attach the current shell task by echoing 0:
--
--# echo 0 > tasks
--
--3. Kernel API
--=============
--
--3.1 Overview
--------------
--
--Each kernel subsystem that wants to hook into the generic cgroup
--system needs to create a cgroup_subsys object. This contains
--various methods, which are callbacks from the cgroup system, along
--with a subsystem id which will be assigned by the cgroup system.
--
--Other fields in the cgroup_subsys object include:
--
--- subsys_id: a unique array index for the subsystem, indicating which
-- entry in cgroup->subsys[] this subsystem should be managing.
--
--- name: should be initialized to a unique subsystem name. Should be
-- no longer than MAX_CGROUP_TYPE_NAMELEN.
--
--- early_init: indicate if the subsystem needs early initialization
-- at system boot.
--
--Each cgroup object created by the system has an array of pointers,
--indexed by subsystem id; this pointer is entirely managed by the
--subsystem; the generic cgroup code will never touch this pointer.
--
--3.2 Synchronization
---------------------
--
--There is a global mutex, cgroup_mutex, used by the cgroup
--system. This should be taken by anything that wants to modify a
--cgroup. It may also be taken to prevent cgroups from being
--modified, but more specific locks may be more appropriate in that
--situation.
--
--See kernel/cgroup.c for more details.
--
--Subsystems can take/release the cgroup_mutex via the functions
--cgroup_lock()/cgroup_unlock().
--
--Accessing a task's cgroup pointer may be done in the following ways:
--- while holding cgroup_mutex
--- while holding the task's alloc_lock (via task_lock())
--- inside an rcu_read_lock() section via rcu_dereference()
--
--3.3 Subsystem API
-------------------
--
--Each subsystem should:
--
--- add an entry in linux/cgroup_subsys.h
--- define a cgroup_subsys object called <name>_subsys
--
--Each subsystem may export the following methods. The only mandatory
--methods are create/destroy. Any others that are null are presumed to
--be successful no-ops.
--
--struct cgroup_subsys_state *create(struct cgroup_subsys *ss,
-- struct cgroup *cgrp)
--(cgroup_mutex held by caller)
--
--Called to create a subsystem state object for a cgroup. The
--subsystem should allocate its subsystem state object for the passed
--cgroup, returning a pointer to the new object on success or a
--negative error code. On success, the subsystem pointer should point to
--a structure of type cgroup_subsys_state (typically embedded in a
--larger subsystem-specific object), which will be initialized by the
--cgroup system. Note that this will be called at initialization to
--create the root subsystem state for this subsystem; this case can be
--identified by the passed cgroup object having a NULL parent (since
--it's the root of the hierarchy) and may be an appropriate place for
--initialization code.
--
--void destroy(struct cgroup_subsys *ss, struct cgroup *cgrp)
--(cgroup_mutex held by caller)
--
--The cgroup system is about to destroy the passed cgroup; the subsystem
--should do any necessary cleanup and free its subsystem state
--object. By the time this method is called, the cgroup has already been
--unlinked from the file system and from the child list of its parent;
--cgroup->parent is still valid. (Note - can also be called for a
--newly-created cgroup if an error occurs after this subsystem's
--create() method has been called for the new cgroup).
--
--void pre_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp);
--(cgroup_mutex held by caller)
--
--Called before checking the reference count on each subsystem. This may
--be useful for subsystems which have some extra references even if
--there are not tasks in the cgroup.
--
--int can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
-- struct task_struct *task)
--(cgroup_mutex held by caller)
--
--Called prior to moving a task into a cgroup; if the subsystem
--returns an error, this will abort the attach operation. If a NULL
--task is passed, then a successful result indicates that *any*
--unspecified task can be moved into the cgroup. Note that this isn't
--called on a fork. If this method returns 0 (success) then this should
--remain valid while the caller holds cgroup_mutex.
--
--void attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
-- struct cgroup *old_cgrp, struct task_struct *task)
--
--Called after the task has been attached to the cgroup, to allow any
--post-attachment activity that requires memory allocations or blocking.
--
--void fork(struct cgroup_subsy *ss, struct task_struct *task)
--
--Called when a task is forked into a cgroup.
--
--void exit(struct cgroup_subsys *ss, struct task_struct *task)
--
--Called during task exit.
--
--int populate(struct cgroup_subsys *ss, struct cgroup *cgrp)
--
--Called after creation of a cgroup to allow a subsystem to populate
--the cgroup directory with file entries. The subsystem should make
--calls to cgroup_add_file() with objects of type cftype (see
--include/linux/cgroup.h for details). Note that although this
--method can return an error code, the error code is currently not
--always handled well.
--
--void post_clone(struct cgroup_subsys *ss, struct cgroup *cgrp)
--
--Called at the end of cgroup_clone() to do any paramater
--initialization which might be required before a task could attach. For
--example in cpusets, no task may attach before 'cpus' and 'mems' are set
--up.
--
--void bind(struct cgroup_subsys *ss, struct cgroup *root)
--(cgroup_mutex held by caller)
--
--Called when a cgroup subsystem is rebound to a different hierarchy
--and root cgroup. Currently this will only involve movement between
--the default hierarchy (which never has sub-cgroups) and a hierarchy
--that is being created/destroyed (and hence has no sub-cgroups).
--
--4. Questions
--============
--
--Q: what's up with this '/bin/echo' ?
--A: bash's builtin 'echo' command does not check calls to write() against
-- errors. If you use it in the cgroup file system, you won't be
-- able to tell whether a command succeeded or failed.
--
--Q: When I attach processes, only the first of the line gets really attached !
--A: We can only return one error code per call to write(). So you should also
-- put only ONE pid.
--
-diff -purN linux-2.6.27/Documentation/cpu-freq/governors.txt linux-2.6.27.19-5.1/Documentation/cpu-freq/governors.txt
---- linux-2.6.27/Documentation/cpu-freq/governors.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/cpu-freq/governors.txt 2009-03-25 16:11:45.000000000 +0000
-@@ -117,7 +117,19 @@ accessible parameters:
+diff -r 9608d5473017 Documentation/cpu-freq/governors.txt
+--- a/Documentation/cpu-freq/governors.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/cpu-freq/governors.txt Wed May 06 16:55:56 2009 +0100
+@@ -117,7 +117,19 @@
sampling_rate: measured in uS (10^-6 seconds), this is how often you
want the kernel to look at the CPU usage and to make decisions on
what to do about the frequency. Typically this is set to values of
show_sampling_rate_(min|max): the minimum and maximum sampling rates
available that you may set 'sampling_rate' to.
-diff -purN linux-2.6.27/Documentation/cpu-freq/user-guide.txt linux-2.6.27.19-5.1/Documentation/cpu-freq/user-guide.txt
---- linux-2.6.27/Documentation/cpu-freq/user-guide.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/cpu-freq/user-guide.txt 2009-03-25 16:11:45.000000000 +0000
-@@ -142,6 +142,18 @@ cpuinfo_min_freq : this file shows the
+diff -r 9608d5473017 Documentation/cpu-freq/user-guide.txt
+--- a/Documentation/cpu-freq/user-guide.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/cpu-freq/user-guide.txt Wed May 06 16:55:56 2009 +0100
+@@ -142,6 +142,18 @@
frequency the processor can run at(in kHz)
cpuinfo_max_freq : this file shows the maximum operating
frequency the processor can run at(in kHz)
scaling_driver : this file shows what cpufreq driver is
used to set the frequency on this CPU
-diff -purN linux-2.6.27/Documentation/cpusets.txt linux-2.6.27.19-5.1/Documentation/cpusets.txt
---- linux-2.6.27/Documentation/cpusets.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/cpusets.txt 2009-03-25 16:11:43.000000000 +0000
-@@ -48,7 +48,7 @@ hooks, beyond what is already present, r
+diff -r 9608d5473017 Documentation/cpusets.txt
+--- a/Documentation/cpusets.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/cpusets.txt Wed May 06 16:55:56 2009 +0100
+@@ -48,7 +48,7 @@
job placement on large systems.
Cpusets use the generic cgroup subsystem described in
Requests by a task, using the sched_setaffinity(2) system call to
include CPUs in its CPU affinity mask, and using the mbind(2) and
-diff -purN linux-2.6.27/Documentation/filesystems/Locking linux-2.6.27.19-5.1/Documentation/filesystems/Locking
---- linux-2.6.27/Documentation/filesystems/Locking 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/filesystems/Locking 2009-03-25 16:11:44.000000000 +0000
-@@ -169,6 +169,10 @@ prototypes:
+diff -r 9608d5473017 Documentation/filesystems/Locking
+--- a/Documentation/filesystems/Locking Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/filesystems/Locking Wed May 06 16:55:56 2009 +0100
+@@ -169,6 +169,10 @@
int (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
loff_t offset, unsigned long nr_segs);
int (*launder_page) (struct page *);
locking rules:
All except set_page_dirty may block
-@@ -190,6 +194,10 @@ invalidatepage: no yes
+@@ -190,6 +194,10 @@
releasepage: no yes
direct_IO: no
launder_page: no yes
->prepare_write(), ->commit_write(), ->sync_page() and ->readpage()
may be called from the request handler (/dev/loop).
-@@ -289,6 +297,20 @@ cleaned, or an error value if not. Note
+@@ -288,6 +296,20 @@
+ cleaned, or an error value if not. Note that in order to prevent the page
getting mapped back in and redirtied, it needs to be kept locked
across the entire operation.
-
++
+ ->swapon() will be called with a non-zero argument on files backing
+(non block device backed) swapfiles. A return value of zero indicates success,
+in which case this file can be used for backing swapspace. The swapspace
+
+ ->swap_in() when swapon() returned success, this method is used to
+read the swap page.
-+
+
Note: currently almost all instances of address_space methods are
using BKL for internal serialization and that's one of the worst sources
- of contention. Normally they are calling library functions (in fs/buffer.c)
-diff -purN linux-2.6.27/Documentation/filesystems/ocfs2.txt linux-2.6.27.19-5.1/Documentation/filesystems/ocfs2.txt
---- linux-2.6.27/Documentation/filesystems/ocfs2.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/filesystems/ocfs2.txt 2009-03-25 16:11:44.000000000 +0000
-@@ -76,3 +76,9 @@ localalloc=8(*) Allows custom localallo
+diff -r 9608d5473017 Documentation/filesystems/ocfs2.txt
+--- a/Documentation/filesystems/ocfs2.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/filesystems/ocfs2.txt Wed May 06 16:55:56 2009 +0100
+@@ -76,3 +76,9 @@
large, the fs will silently revert it to the default.
Localalloc is not enabled for local mounts.
localflocks This disables cluster aware flock.
+ bits of significance.
+user_xattr (*) Enables Extended User Attributes.
+nouser_xattr Disables Extended User Attributes.
-diff -purN linux-2.6.27/Documentation/filesystems/proc.txt linux-2.6.27.19-5.1/Documentation/filesystems/proc.txt
---- linux-2.6.27/Documentation/filesystems/proc.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/filesystems/proc.txt 2009-03-25 16:11:44.000000000 +0000
-@@ -44,6 +44,7 @@ Table of Contents
+diff -r 9608d5473017 Documentation/filesystems/proc.txt
+--- a/Documentation/filesystems/proc.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/filesystems/proc.txt Wed May 06 16:55:56 2009 +0100
+@@ -44,6 +44,7 @@
2.14 /proc/<pid>/io - Display the IO accounting fields
2.15 /proc/<pid>/coredump_filter - Core dump filtering settings
2.16 /proc/<pid>/mountinfo - Information about mounts
------------------------------------------------------------------------------
Preface
-@@ -2471,4 +2472,30 @@ For more information on mount propagatio
+@@ -2471,4 +2472,30 @@
Documentation/filesystems/sharedsubtree.txt
+
------------------------------------------------------------------------------
+
-diff -purN linux-2.6.27/Documentation/filesystems/sysfs-pci.txt linux-2.6.27.19-5.1/Documentation/filesystems/sysfs-pci.txt
---- linux-2.6.27/Documentation/filesystems/sysfs-pci.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/filesystems/sysfs-pci.txt 2009-03-25 16:11:44.000000000 +0000
-@@ -9,6 +9,7 @@ that support it. For example, a given b
+diff -r 9608d5473017 Documentation/filesystems/sysfs-pci.txt
+--- a/Documentation/filesystems/sysfs-pci.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/filesystems/sysfs-pci.txt Wed May 06 16:55:56 2009 +0100
+@@ -9,6 +9,7 @@
| |-- class
| |-- config
| |-- device
| |-- irq
| |-- local_cpus
| |-- resource
-@@ -32,6 +33,7 @@ files, each with their own function.
+@@ -32,6 +33,7 @@
class PCI class (ascii, ro)
config PCI config space (binary, rw)
device PCI device (ascii, ro)
irq IRQ number (ascii, ro)
local_cpus nearby CPU mask (cpumask, ro)
resource PCI resource host addresses (ascii, ro)
-@@ -57,10 +59,19 @@ used to do actual device programming fro
+@@ -57,10 +59,19 @@
don't support mmapping of certain resources, so be sure to check the return
value from any attempted mmap.
Accessing legacy resources through sysfs
----------------------------------------
-diff -purN linux-2.6.27/Documentation/filesystems/vfs.txt linux-2.6.27.19-5.1/Documentation/filesystems/vfs.txt
---- linux-2.6.27/Documentation/filesystems/vfs.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/filesystems/vfs.txt 2009-03-25 16:11:44.000000000 +0000
-@@ -539,6 +539,11 @@ struct address_space_operations {
+diff -r 9608d5473017 Documentation/filesystems/vfs.txt
+--- a/Documentation/filesystems/vfs.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/filesystems/vfs.txt Wed May 06 16:55:56 2009 +0100
+@@ -539,6 +539,11 @@
/* migrate the contents of a page to the specified target */
int (*migratepage) (struct page *, struct page *);
int (*launder_page) (struct page *);
};
writepage: called by the VM to write a dirty page to backing store.
-@@ -724,6 +729,19 @@ struct address_space_operations {
+@@ -724,6 +729,19 @@
prevent redirtying the page, it is kept locked during the whole
operation.
The File Object
===============
-diff -purN linux-2.6.27/Documentation/i2c/busses/i2c-i801 linux-2.6.27.19-5.1/Documentation/i2c/busses/i2c-i801
---- linux-2.6.27/Documentation/i2c/busses/i2c-i801 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/i2c/busses/i2c-i801 2009-03-25 16:11:44.000000000 +0000
-@@ -13,8 +13,9 @@ Supported adapters:
+diff -r 9608d5473017 Documentation/i2c/busses/i2c-i801
+--- a/Documentation/i2c/busses/i2c-i801 Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/i2c/busses/i2c-i801 Wed May 06 16:55:56 2009 +0100
+@@ -13,8 +13,9 @@
* Intel 631xESB/632xESB (ESB2)
* Intel 82801H (ICH8)
* Intel 82801I (ICH9)
Datasheets: Publicly available at the Intel website
Authors:
-@@ -32,7 +33,7 @@ Description
+@@ -32,7 +33,7 @@
-----------
The ICH (properly known as the 82801AA), ICH0 (82801AB), ICH2 (82801BA),
Intel's '810' chipset for Celeron-based PCs, '810E' chipset for
Pentium-based PCs, '815E' chipset, and others.
-diff -purN linux-2.6.27/Documentation/i2c/busses/i2c-sis96x linux-2.6.27.19-5.1/Documentation/i2c/busses/i2c-sis96x
---- linux-2.6.27/Documentation/i2c/busses/i2c-sis96x 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/i2c/busses/i2c-sis96x 2009-03-25 16:11:44.000000000 +0000
-@@ -42,7 +42,7 @@ I suspect that this driver could be made
+diff -r 9608d5473017 Documentation/i2c/busses/i2c-sis96x
+--- a/Documentation/i2c/busses/i2c-sis96x Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/i2c/busses/i2c-sis96x Wed May 06 16:55:56 2009 +0100
+@@ -42,7 +42,7 @@
chipsets as well: 635, and 635T. If anyone owns a board with those chips
AND is willing to risk crashing & burning an otherwise well-behaved kernel
in the name of progress... please contact me at <mhoffman@lightlink.com> or
reports and/or success stories as well.
-diff -purN linux-2.6.27/Documentation/kdb/bt_x86 linux-2.6.27.19-5.1/Documentation/kdb/bt_x86
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/bt_x86 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/bt_x86
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/bt_x86 Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,1837 @@
+Copyright Keith Owens, 2007.
+
+has not changed since the previous scan, there is no need to rescan bb[2], bb[7]
+or bb[4]. Since bb[4] is not being rescanned, there is no need to rescan bb[5]
+or bb[6] and the cycle is closed.
-diff -purN linux-2.6.27/Documentation/kdb/kdb.mm linux-2.6.27.19-5.1/Documentation/kdb/kdb.mm
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb.mm 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb.mm
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb.mm Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,492 @@
+.TH KDB 8 "September 21, 2005"
+.hy 0
+.SH SEE ALSO
+.P
+linux/Documentation/kdb/kdb_{bp,bt,env,ll,md,ps,rd,sr,ss}.man
-diff -purN linux-2.6.27/Documentation/kdb/kdb_bp.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_bp.man
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_bp.man 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_bp.man
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_bp.man Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,197 @@
+.TH BD 1 "July 12, 2004"
+.SH NAME
+.TP 8
+bc *
+Clear all breakpoints
-diff -purN linux-2.6.27/Documentation/kdb/kdb_bt.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_bt.man
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_bt.man 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_bt.man
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_bt.man Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,315 @@
+.TH BT 1 "July 20, 2007"
+.SH NAME
+0xf65a3e10 0xc016c8b0 do_mount+0x5df (0xf68e9000, 0xf65d6000, 0xf6818000, 0xc0ed0000, 0xf7257000)
+0xf65a3f90 0xc016c996 sys_mount+0x6f (0x8069b50, 0x8069b60, 0x8069b70, 0xc0ed0000, 0x8069ba0)
+0xf65a3fb4 0xc0102646 sysenter_past_esp+0x5f (invalid, invalid, invalid, 0x73, 0x246, 0xbfe52f50)
-diff -purN linux-2.6.27/Documentation/kdb/kdb_env.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_env.man
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_env.man 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_env.man
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_env.man Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,46 @@
+.TH ENV 1 "24 September 2000"
+.SH NAME
+set IDCOUNT=100
+Set the number of lines to display for the \fBid\fP command
+to the value \fI100\fP.
-diff -purN linux-2.6.27/Documentation/kdb/kdb_ll.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_ll.man
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_ll.man 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_ll.man
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_ll.man Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,134 @@
+.TH LL 1 "19 April 1999"
+.SH NAME
+page_prot = 0x25 avl_height = 2244 vm_offset = 0x0
+flags: READ WRITE EXEC MAYREAD MAYWRITE MAYEXEC GROWSDOWN
+kdb>
-diff -purN linux-2.6.27/Documentation/kdb/kdb_md.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_md.man
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_md.man 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_md.man
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_md.man Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,136 @@
+.TH MD 1 "August 4, 2004"
+.SH NAME
+md chrdev_table 15
+Display 15 lines (at 16 bytes per line) starting at address
+represented by the symbol \fIchrdev_table\fP.
-diff -purN linux-2.6.27/Documentation/kdb/kdb_ps.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_ps.man
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_ps.man 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_ps.man
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_ps.man Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,96 @@
+.TH PS 1 "September 14, 2004"
+.SH NAME
+displays all tasks.
+This is easier than remembering DRSTCZEUIM.
+
-diff -purN linux-2.6.27/Documentation/kdb/kdb_rd.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_rd.man
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_rd.man 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_rd.man
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_rd.man Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,170 @@
+.TH RD 1 "September 20, 2005"
+.SH NAME
+.TP 8
+rm %CP15CRn7CRm5Op6 0
+Same with above.
-diff -purN linux-2.6.27/Documentation/kdb/kdb_sr.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_sr.man
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_sr.man 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_sr.man
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_sr.man Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,68 @@
+.TH SR 1 "7 October 2002"
+.SH NAME
+If the sysrq handler or any of the sysrq functions have to wait for a
+lock then they will never return and kdb will appear to hang.
+Invoking sysrq code from kdb is inherently unsafe.
-diff -purN linux-2.6.27/Documentation/kdb/kdb_ss.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_ss.man
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_ss.man 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_ss.man
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_ss.man Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,109 @@
+.TH SS 1 "17 January 2002"
+.SH NAME
+sys_read+0x6: pushl %edi
+[0]kdb>
+
-diff -purN linux-2.6.27/Documentation/kdb/slides linux-2.6.27.19-5.1/Documentation/kdb/slides
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/slides 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/slides
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/slides Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,1382 @@
+#! /opt/cpg/bin/do-mgp
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ [Uptodate Req Mapped]
+DIRTY page_struct index cnt flags
+LOCKED page_struct index cnt flags
-diff -purN linux-2.6.27/Documentation/kernel-parameters.txt linux-2.6.27.19-5.1/Documentation/kernel-parameters.txt
---- linux-2.6.27/Documentation/kernel-parameters.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kernel-parameters.txt 2009-03-25 16:11:44.000000000 +0000
-@@ -179,6 +179,9 @@ and is between 256 and 4096 characters.
+diff -r 9608d5473017 Documentation/kernel-parameters.txt
+--- a/Documentation/kernel-parameters.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/kernel-parameters.txt Wed May 06 16:55:56 2009 +0100
+@@ -179,6 +179,9 @@
acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT
acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS
Format: To spoof as Windows 98: ="Microsoft Windows"
-@@ -197,6 +200,19 @@ and is between 256 and 4096 characters.
+@@ -196,6 +199,19 @@
+ Use timer override. For some broken Nvidia NF5 boards
that require a timer override, but don't have
HPET
-
++
+ acpi_backlight= [HW,ACPI]
+ acpi_backlight=vendor
+ acpi_backlight=video
+ acpi_display_output=vendor
+ acpi_display_output=video
+ See above.
-+
+
acpi.debug_layer= [HW,ACPI]
Format: <int>
- Each bit of the <int> indicates an ACPI debug layer,
-@@ -237,6 +253,11 @@ and is between 256 and 4096 characters.
+@@ -236,6 +252,11 @@
+ Override the pmtimer bug detection: force the kernel
to assume that this machine's pmtimer latches its value
and always returns good values.
-
++
+ acpi_root_table= [X86,ACPI]
+ { rsdt }
+ rsdt: Take RSDT address for fetching
+ ACPI tables (instead of XSDT)
-+
+
agp= [AGP]
{ off | try_unsupported }
- off: disable AGP support
-@@ -283,7 +304,7 @@ and is between 256 and 4096 characters.
+@@ -283,7 +304,7 @@
Possible values are:
isolate - enable device isolation (each device, as far
as possible, will get its own protection
amd_iommu_size= [HW,X86-64]
Define the size of the aperture for the AMD IOMMU
driver. Possible values are:
-@@ -402,8 +423,11 @@ and is between 256 and 4096 characters.
+@@ -402,8 +423,11 @@
See Documentation/s390/CommonIO for details.
cgroup_disable= [KNL] Disable a particular controller
checkreqprot [SELINUX] Set initial checkreqprot flag value.
Format: { "0" | "1" }
-@@ -475,6 +499,8 @@ and is between 256 and 4096 characters.
+@@ -474,6 +498,8 @@
+ disable: disable HPET and use PIT instead
force: allow force enabled of undocumented chips (ICH4,
VIA, nVidia)
-
-+ hpet64 [X86-64,HPET] enable 64-bit mode of the HPET timer (bnc#456700)
+
++ hpet64 [X86-64,HPET] enable 64-bit mode of the HPET timer (bnc#456700)
+
com20020= [HW,NET] ARCnet - COM20020 chipset
Format:
- <io>[,<irq>[,<nodeID>[,<backplane>[,<ckp>[,<timeout>]]]]]
-@@ -659,11 +685,12 @@ and is between 256 and 4096 characters.
+@@ -659,11 +685,12 @@
earlyprintk= [X86-32,X86-64,SH,BLACKFIN]
earlyprintk=vga
earlyprintk=serial[,ttySn[,baudrate]]
Currently only ttyS0 and ttyS1 are supported.
-@@ -675,6 +702,11 @@ and is between 256 and 4096 characters.
+@@ -674,6 +701,11 @@
+ console.
eata= [HW,SCSI]
-
++
+ ec_intr= [HW,ACPI] ACPI Embedded Controller interrupt mode
+ Format: <int>
+ 0: polling mode
+ non-0: interrupt mode (default)
-+
+
edd= [EDD]
Format: {"off" | "on" | "skip[mbr]"}
-
-@@ -1393,6 +1425,15 @@ and is between 256 and 4096 characters.
+@@ -1393,6 +1425,15 @@
instruction doesn't work correctly and not to
use it.
nohalt [IA-64] Tells the kernel not to use the power saving
function PAL_HALT_LIGHT when idle. This increases
power-consumption. On the positive side, it reduces
-@@ -1425,6 +1466,12 @@ and is between 256 and 4096 characters.
+@@ -1424,6 +1465,12 @@
+ nolapic [X86-32,APIC] Do not enable or use the local APIC.
nolapic_timer [X86-32,APIC] Do not use the local APIC timer.
-
++
+ nox2apic [X86-64,APIC] Do not enable x2APIC mode.
+
+ x2apic_phys [X86-64,APIC] Use x2apic physical mode instead of
+ default x2apic cluster mode on platforms
+ supporting x2apic.
-+
+
noltlbs [PPC] Do not use large page/tlb entries for kernel
lowmem mapping on PPC40x.
-
-@@ -1566,6 +1613,17 @@ and is between 256 and 4096 characters.
+@@ -1566,6 +1613,17 @@
nomsi [MSI] If the PCI_MSI kernel config parameter is
enabled, this kernel boot option can be used to
disable the use of MSI interrupts system-wide.
biosirq [X86-32] Use PCI BIOS calls to get the interrupt
routing table. These calls are known to be buggy
on several machines and they hang the machine
-@@ -1643,6 +1701,9 @@ and is between 256 and 4096 characters.
+@@ -1643,6 +1701,9 @@
Format: { 0 | 1 }
See arch/parisc/kernel/pdc_chassis.c
pf. [PARIDE]
See Documentation/paride.txt.
-@@ -1680,6 +1741,11 @@ and is between 256 and 4096 characters.
+@@ -1679,6 +1740,11 @@
+ [ISAPNP] Exclude memory regions for the
autoconfiguration.
Ranges are in pairs (memory base and size).
-
++
+ dynamic_printk
+ Enables pr_debug()/dev_dbg() calls if
+ CONFIG_DYNAMIC_PRINTK_DEBUG has been enabled. These can also
+ be switched on/off via <debugfs>/dynamic_printk/modules
-+
+
print-fatal-signals=
[KNL] debug: print fatal signals
- print-fatal-signals=1: print segfault info to
-@@ -2113,6 +2179,12 @@ and is between 256 and 4096 characters.
+@@ -2113,6 +2179,12 @@
pernode one pool for each NUMA node (equivalent
to global on non-NUMA machines)
swiotlb= [IA-64] Number of I/O TLB slabs
switches= [HW,M68k]
-@@ -2168,12 +2240,27 @@ and is between 256 and 4096 characters.
+@@ -2168,11 +2240,26 @@
See comment before function dc390_setup() in
drivers/scsi/tmscsim.c.
trix= [HW,OSS] MediaTrix AudioTrix Pro
Format:
<io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq>
-
++
+ tsc= Disable clocksource-must-verify flag for TSC.
+ Format: <string>
+ [x86] reliable: mark tsc clocksource as reliable, this
+ disables clocksource verification at runtime.
+ Used to enable high-resolution timer mode on older
+ hardware, and in virtualized environment.
-+
+
turbografx.map[2|3]= [HW,JOY]
TurboGraFX parallel port interface
- Format:
-diff -purN linux-2.6.27/Documentation/kmsg/s390/aes_s390 linux-2.6.27.19-5.1/Documentation/kmsg/s390/aes_s390
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/aes_s390 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/aes_s390
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/aes_s390 Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,30 @@
+/*?
+ * Text: "Allocating AES fallback algorithm %s failed\n"
+ * None.
+ */
+
-diff -purN linux-2.6.27/Documentation/kmsg/s390/af_iucv linux-2.6.27.19-5.1/Documentation/kmsg/s390/af_iucv
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/af_iucv 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/af_iucv
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/af_iucv Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,33 @@
+/*?
+ * Text: "Application %s on z/VM guest %s exceeds message limit\n"
+ * operating systems of the z/VM hypervisor. If the module has been
+ * compiled into the kernel, ignore this message.
+ */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/ap linux-2.6.27.19-5.1/Documentation/kmsg/s390/ap
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/ap 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/ap
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/ap Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,47 @@
+/*?
+ * Text: "%d is not a valid cryptographic domain\n"
+ * updates become active, then reload the ap module. If the ap module has been
+ * compiled into the kernel, reboot Linux.
+ */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/appldata linux-2.6.27.19-5.1/Documentation/kmsg/s390/appldata
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/appldata 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/appldata
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/appldata Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,88 @@
+/*?
+ * Text: "Starting the data collection for %s failed with rc=%d\n"
+ * Linux instance to support less than 110 CPUs.
+ */
+
-diff -purN linux-2.6.27/Documentation/kmsg/s390/cio linux-2.6.27.19-5.1/Documentation/kmsg/s390/cio
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/cio 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/cio
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/cio Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,92 @@
+/*?
+ * Text: "%s is not a valid device for the cio_ignore kernel parameter\n"
+ * See the errno man page to find out what caused the problem.
+ */
+ /*? Text: "%s: Got subchannel machine check but no sch_event handler provided.\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/claw linux-2.6.27.19-5.1/Documentation/kmsg/s390/claw
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/claw 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/claw
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/claw Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,666 @@
+/*?
+ * Text: "%s: add_files failed\n"
+/*? Text: "%s: CLAW device %.8s: System validate completed.\n" */
+/*? Text: "%s: %s: Disconnect: Vers=%d,link_id=%d,Corr=%d\n" */
+/*? Text: "%s: %s: Revc Conn Resp: Vers=%d,link_id=%d,Corr=%d,RC=%d,Host appl=%.8s, WS appl=%.8s\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/cpcmd linux-2.6.27.19-5.1/Documentation/kmsg/s390/cpcmd
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/cpcmd 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/cpcmd
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/cpcmd Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,17 @@
+/*?
+ * Text: "The cpcmd kernel function failed to allocate a response buffer\n"
+ * machine.
+ */
+
-diff -purN linux-2.6.27/Documentation/kmsg/s390/cpu linux-2.6.27.19-5.1/Documentation/kmsg/s390/cpu
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/cpu 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/cpu
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/cpu Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,69 @@
+/*?
+ * Text: "Processor %d started, address %d, identification %06X\n"
+ * message to a support organization, be sure to communicate that the dump
+ * does not include all CPU information.
+ */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/ctcm linux-2.6.27.19-5.1/Documentation/kmsg/s390/ctcm
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/ctcm 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/ctcm
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/ctcm Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,199 @@
+/*?
+ * Text: "%s: An I/O-error occurred on the CTCM device\n"
+/*? Text: "%s: Connected with remote side\n" */
+/*? Text: "%s: Restarting device\n" */
+
-diff -purN linux-2.6.27/Documentation/kmsg/s390/dcssblk linux-2.6.27.19-5.1/Documentation/kmsg/s390/dcssblk
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/dcssblk 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/dcssblk
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/dcssblk Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,162 @@
+/*?
+ * Text: "Adjacent DCSSs %s and %s are not contiguous\n"
+ * device. If the DCSSs of the device are of type ER or SR, change the access
+ * mode to exclusive-writable before writing to the device.
+ */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/extmem linux-2.6.27.19-5.1/Documentation/kmsg/s390/extmem
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/extmem 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/extmem
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/extmem Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,290 @@
+/*?
+ * Text: "Querying a DCSS type failed with rc=%ld\n"
+ * Ensure that the DCSS range is defined below the kernel mapping range.
+ */
+
-diff -purN linux-2.6.27/Documentation/kmsg/s390/hypfs linux-2.6.27.19-5.1/Documentation/kmsg/s390/hypfs
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/hypfs 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/hypfs
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/hypfs Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,56 @@
+/*?
+ * Text: "The hardware system does not support hypfs\n"
+ */
+
+/*? Text: "Hypervisor filesystem mounted\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/iucv linux-2.6.27.19-5.1/Documentation/kmsg/s390/iucv
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/iucv 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/iucv
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/iucv Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,20 @@
+/*?
+ * Text: "Defining an interrupt buffer on CPU %i failed with 0x%02x (%s)\n"
+
+/*? Text: "iucv_external_interrupt: out of memory\n" */
+
-diff -purN linux-2.6.27/Documentation/kmsg/s390/lcs linux-2.6.27.19-5.1/Documentation/kmsg/s390/lcs
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/lcs 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/lcs
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/lcs Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,160 @@
+/*?
+ * Text: "%s: Allocating a socket buffer to interface %s failed\n"
+/*? Text: "Initialization failed\n" */
+/*? Text: "Terminating lcs module.\n" */
+/*? Text: "Device %s could not be recovered!\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/monreader linux-2.6.27.19-5.1/Documentation/kmsg/s390/monreader
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/monreader 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/monreader
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/monreader Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,127 @@
+/*?
+ * Text: "Reading monitor data failed with rc=%i\n"
+ * the *MONITOR DCSS on the z/VM hypervisor. If the default name, MONDCSS, is
+ * used, omit the monreader.mondcss or mondcss parameter.
+ */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/monwriter linux-2.6.27.19-5.1/Documentation/kmsg/s390/monwriter
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/monwriter 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/monwriter
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/monwriter Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,16 @@
+/*?
+ * Text: "Writing monitor data failed with rc=%i\n"
+ * For other return codes see the section about DIAGNOSE Code X'DC'
+ * in "z/VM CP Programming Services".
+ */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/netiucv linux-2.6.27.19-5.1/Documentation/kmsg/s390/netiucv
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/netiucv 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/netiucv
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/netiucv Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,139 @@
+/*?
+ * Text: "%s: The peer interface of the IUCV device has closed the connection\n"
+
+/*? Text: "driver unloaded\n" */
+/*? Text: "driver initialized\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/qeth linux-2.6.27.19-5.1/Documentation/kmsg/s390/qeth
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/qeth 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/qeth
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/qeth Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,501 @@
+/*?
+ * Text: "%s: The LAN is offline\n"
+/*? Text: "%s: HW Checksumming (inbound) enabled\n" */
+/*? Text: "unregister layer 3 discipline\n" */
+/*? Text: "%s: Multicast enabled\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/s390dbf linux-2.6.27.19-5.1/Documentation/kmsg/s390/s390dbf
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/s390dbf 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/s390dbf
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/s390dbf Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,83 @@
+/*?
+ * Text: "Root becomes the owner of all s390dbf files in sysfs\n"
+/*? Text: "%s: switched off\n" */
+/*? Text: "%s: level %i is out of range (%i - %i)\n" */
+/*? Text: "Registering view %s/%s failed due to out of memory\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/sclp_cmd linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_cmd
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_cmd 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/sclp_cmd
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/sclp_cmd Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,6 @@
+/*? Text: "sync request failed (cmd=0x%08x, status=0x%02x)\n" */
+/*? Text: "readcpuinfo failed (response=0x%04x)\n" */
+/*? Text: "configure channel-path failed (cmd=0x%08x, response=0x%04x)\n" */
+/*? Text: "read channel-path info failed (response=0x%04x)\n" */
+
-diff -purN linux-2.6.27/Documentation/kmsg/s390/sclp_config linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_config
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_config 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/sclp_config
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/sclp_config Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,3 @@
+/*? Text: "cpu capability changed.\n" */
+/*? Text: "no configuration management.\n" */
+
-diff -purN linux-2.6.27/Documentation/kmsg/s390/sclp_cpi linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_cpi
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_cpi 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/sclp_cpi
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/sclp_cpi Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,2 @@
+/*? Text: "request failed (status=0x%02x)\n" */
+/*? Text: "request failed with response code 0x%x\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/sclp_sdias linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_sdias
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_sdias 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/sclp_sdias
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/sclp_sdias Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,4 @@
+/*? Text: "sclp_send failed for get_nr_blocks\n" */
+/*? Text: "SCLP error: %x\n" */
+/*? Text: "sclp_send failed: %x\n" */
+/*? Text: "Error from SCLP while copying hsa. Event status = %x\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/setup linux-2.6.27.19-5.1/Documentation/kmsg/s390/setup
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/setup 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/setup
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/setup Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,151 @@
+/*?
+ * Text: "Execute protection active, mvcos available\n"
+ * User action:
+ * None.
+ */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/time linux-2.6.27.19-5.1/Documentation/kmsg/s390/time
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/time 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/time
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/time Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,36 @@
+/*?
+ * Text: "The ETR interface has adjusted the clock by %li microseconds\n"
+ * To avoid this warning remove the 'stp=' kernel parameter.
+ */
+
-diff -purN linux-2.6.27/Documentation/kmsg/s390/vmcp linux-2.6.27.19-5.1/Documentation/kmsg/s390/vmcp
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/vmcp 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/vmcp
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/vmcp Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,13 @@
+/*?
+ * Text: "The z/VM CP interface device driver cannot be loaded without z/VM\n"
+ * operating systems of the z/VM hypervisor. If the device driver has been
+ * compiled into the kernel, ignore this message.
+ */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/vmlogrdr linux-2.6.27.19-5.1/Documentation/kmsg/s390/vmlogrdr
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/vmlogrdr 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/vmlogrdr
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/vmlogrdr Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,5 @@
+/*? Text: "vmlogrdr: failed to start recording automatically\n" */
+/*? Text: "vmlogrdr: connection severed with reason %i\n" */
+/*? Text: "vmlogrdr: iucv connection to %s failed with rc %i \n" */
+/*? Text: "vmlogrdr: failed to stop recording automatically\n" */
+/*? Text: "not running under VM, driver not loaded.\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/vmur linux-2.6.27.19-5.1/Documentation/kmsg/s390/vmur
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/vmur 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/vmur
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/vmur Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,34 @@
+/*?
+ * Text: "The %s cannot be loaded without z/VM\n"
+
+/*? Text: "%s loaded.\n" */
+/*? Text: "%s unloaded.\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/xpram linux-2.6.27.19-5.1/Documentation/kmsg/s390/xpram
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/xpram 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/xpram
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/xpram Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,58 @@
+/*?
+ * Text: "%d is not a valid number of XPRAM devices\n"
+/*? Text: " partitions to be sized automatically: %d\n" */
+/*? Text: " automatically determined partition size: %lu kB\n" */
+/*? Text: " %u pages expanded memory found (%lu KB).\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/zdump linux-2.6.27.19-5.1/Documentation/kmsg/s390/zdump
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/zdump 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/zdump
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/zdump Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,12 @@
+/*?
+ * Text: "The 32-bit dump tool cannot be used for a 64-bit system\n"
+/*? Text: "DETECTED 'S390 (32 bit) OS'\n" */
+/*? Text: "0x%x is an unknown architecture.\n" */
+/*? Text: "DETECTED 'S390X (64 bit) OS'\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/zfcp linux-2.6.27.19-5.1/Documentation/kmsg/s390/zfcp
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/zfcp 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/zfcp
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/zfcp Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,831 @@
+/*?
+ * Text: "%s is not a valid SCSI device\n"
+ * adapter. Check your SAN setup and consider reducing the number of ports
+ * visible to the FCP adapter by using more restrictive zoning in the SAN.
+ */
-diff -purN linux-2.6.27/Documentation/network-swap.txt linux-2.6.27.19-5.1/Documentation/network-swap.txt
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/network-swap.txt 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/network-swap.txt
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/network-swap.txt Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,270 @@
+
+Problem:
+Neil Brown (with updates from Peter Zijlstra)
+
+
-diff -purN linux-2.6.27/Documentation/networking/multiqueue.txt linux-2.6.27.19-5.1/Documentation/networking/multiqueue.txt
---- linux-2.6.27/Documentation/networking/multiqueue.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/networking/multiqueue.txt 2009-03-25 16:11:43.000000000 +0000
-@@ -24,4 +24,56 @@ netif_{start|stop|wake}_subqueue() funct
+diff -r 9608d5473017 Documentation/networking/multiqueue.txt
+--- a/Documentation/networking/multiqueue.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/networking/multiqueue.txt Wed May 06 16:55:56 2009 +0100
+@@ -24,4 +24,56 @@
device is still operational. netdev->queue_lock is still used when the device
comes online or when it's completely shut down (unregister_netdev(), etc.).
+
+Author: Alexander Duyck <alexander.h.duyck@intel.com>
+Original Author: Peter P. Waskiewicz Jr. <peter.p.waskiewicz.jr@intel.com>
-diff -purN linux-2.6.27/Documentation/perfmon2-debugfs.txt linux-2.6.27.19-5.1/Documentation/perfmon2-debugfs.txt
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/perfmon2-debugfs.txt 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/perfmon2-debugfs.txt
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/perfmon2-debugfs.txt Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,126 @@
+ The perfmon2 debug and statistics interface
+ ------------------------------------------
+ handles asynchronous perfmon2 work for per-thread contexts
+ (sessions).
+
-diff -purN linux-2.6.27/Documentation/perfmon2.txt linux-2.6.27.19-5.1/Documentation/perfmon2.txt
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/perfmon2.txt 2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 Documentation/perfmon2.txt
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/perfmon2.txt Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,213 @@
+ The perfmon2 hardware monitoring interface
+ ------------------------------------------
+IX/ Documentation
+
+ Visit http://perfmon2.sf.net
-diff -purN linux-2.6.27/Documentation/scsi/cxgb3i.txt linux-2.6.27.19-5.1/Documentation/scsi/cxgb3i.txt
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/scsi/cxgb3i.txt 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/scsi/cxgb3i.txt
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/scsi/cxgb3i.txt Wed May 06 16:55:56 2009 +0100
@@ -0,0 +1,51 @@
+Chelsio S3 iSCSI Driver for Linux
+
+ "-I <iface file name>" option needs to be specified with most of the
+ iscsiadm command. <iface file name> is the transport interface file created
+ in step 1.
-diff -purN linux-2.6.27/Documentation/scsi/scsi_fc_transport.txt linux-2.6.27.19-5.1/Documentation/scsi/scsi_fc_transport.txt
---- linux-2.6.27/Documentation/scsi/scsi_fc_transport.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/scsi/scsi_fc_transport.txt 2009-03-25 16:11:44.000000000 +0000
-@@ -436,6 +436,42 @@ Other:
+diff -r 9608d5473017 Documentation/scsi/scsi_fc_transport.txt
+--- a/Documentation/scsi/scsi_fc_transport.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/scsi/scsi_fc_transport.txt Wed May 06 16:55:56 2009 +0100
+@@ -436,6 +436,42 @@
was updated to remove all vports for the fc_host as well.
Credits
=======
The following people have contributed to this document:
-diff -purN linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.6.27.19-5.1/Documentation/sound/alsa/ALSA-Configuration.txt
---- linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/sound/alsa/ALSA-Configuration.txt 2009-03-25 16:11:43.000000000 +0000
-@@ -746,8 +746,10 @@ Prior to version 0.9.0rc4 options had a
+diff -r 9608d5473017 Documentation/sound/alsa/ALSA-Configuration.txt
+--- a/Documentation/sound/alsa/ALSA-Configuration.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/sound/alsa/ALSA-Configuration.txt Wed May 06 16:55:56 2009 +0100
+@@ -746,8 +746,10 @@
Module snd-hda-intel
--------------------
VIA VT8251/VT8237A,
SIS966, ULI M5461
-@@ -807,6 +809,7 @@ Prior to version 0.9.0rc4 options had a
+@@ -807,6 +809,7 @@
ALC260
hp HP machines
hp-3013 HP machines (3013-variant)
fujitsu Fujitsu S7020
acer Acer TravelMate
will Will laptops (PB V7900)
-@@ -828,8 +831,11 @@ Prior to version 0.9.0rc4 options had a
+@@ -828,8 +831,11 @@
hippo Hippo (ATI) with jack detection, Sony UX-90s
hippo_1 Hippo (Benq) with jack detection
sony-assamd Sony ASSAMD
basic fixed pin assignment w/o SPDIF
auto auto-config reading BIOS (default)
-@@ -838,6 +844,8 @@ Prior to version 0.9.0rc4 options had a
+@@ -838,6 +844,8 @@
3stack 3-stack model
toshiba Toshiba A205
acer Acer laptops
dell Dell OEM laptops (Vostro 1200)
zepto Zepto laptops
test for testing/debugging purpose, almost all controls can
-@@ -847,6 +855,11 @@ Prior to version 0.9.0rc4 options had a
+@@ -847,6 +855,11 @@
ALC269
basic Basic preset
ALC662/663
3stack-dig 3-stack (2-channel) with SPDIF
-@@ -856,10 +869,17 @@ Prior to version 0.9.0rc4 options had a
+@@ -856,10 +869,17 @@
lenovo-101e Lenovo laptop
eeepc-p701 ASUS Eeepc P701
eeepc-ep20 ASUS Eeepc EP20
auto auto-config reading BIOS (default)
ALC882/885
-@@ -891,12 +911,14 @@ Prior to version 0.9.0rc4 options had a
+@@ -891,12 +911,14 @@
lenovo-101e Lenovo 101E
lenovo-nb0763 Lenovo NB0763
lenovo-ms7195-dig Lenovo MS7195
auto auto-config reading BIOS (default)
ALC861/660
-@@ -929,7 +951,7 @@ Prior to version 0.9.0rc4 options had a
+@@ -929,7 +951,7 @@
allout 5-jack in back, 2-jack in front, SPDIF out
auto auto-config reading BIOS (default)
3stack 3-stack mode (default)
6stack 6-stack mode
-@@ -960,9 +982,10 @@ Prior to version 0.9.0rc4 options had a
+@@ -960,9 +982,10 @@
6stack 6-jack, separate surrounds (default)
3stack 3-stack, shared surrounds
laptop 2-channel only (FSC V2060, Samsung M50)
AD1988/AD1988B/AD1989A/AD1989B
6stack 6-jack
-@@ -1014,6 +1037,7 @@ Prior to version 0.9.0rc4 options had a
+@@ -1014,6 +1037,7 @@
dell-m42 Dell (unknown)
dell-m43 Dell Precision
dell-m44 Dell Inspiron
STAC9220/9221
ref Reference board
-@@ -1044,6 +1068,7 @@ Prior to version 0.9.0rc4 options had a
+@@ -1044,6 +1068,7 @@
STAC9227/9228/9229/927x
ref Reference board
3stack D965 3stack
5stack D965 5stack + SPDIF
dell-3stack Dell Dimension E520
-@@ -1053,10 +1078,14 @@ Prior to version 0.9.0rc4 options had a
+@@ -1053,10 +1078,14 @@
ref Reference board
dell-m4-1 Dell desktops
dell-m4-2 Dell desktops
STAC9872
vaio Setup for VAIO FE550G/SZ110
-diff -purN linux-2.6.27/Documentation/sparc/sbus_drivers.txt linux-2.6.27.19-5.1/Documentation/sparc/sbus_drivers.txt
---- linux-2.6.27/Documentation/sparc/sbus_drivers.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/sparc/sbus_drivers.txt 2009-03-25 16:11:44.000000000 +0000
-@@ -68,6 +68,7 @@ probe in an SBUS driver under Linux:
+diff -r 9608d5473017 Documentation/sparc/sbus_drivers.txt
+--- a/Documentation/sparc/sbus_drivers.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/sparc/sbus_drivers.txt Wed May 06 16:55:56 2009 +0100
+@@ -68,6 +68,7 @@
static struct of_platform_driver mydevice_driver = {
.match_table = mydevice_match,
.probe = mydevice_probe,
.remove = __devexit_p(mydevice_remove),
.driver = {
-diff -purN linux-2.6.27/Documentation/sysctl/kernel.txt linux-2.6.27.19-5.1/Documentation/sysctl/kernel.txt
---- linux-2.6.27/Documentation/sysctl/kernel.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/sysctl/kernel.txt 2009-03-25 16:11:45.000000000 +0000
-@@ -369,4 +369,17 @@ can be ORed together:
+diff -r 9608d5473017 Documentation/sysctl/kernel.txt
+--- a/Documentation/sysctl/kernel.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/sysctl/kernel.txt Wed May 06 16:55:57 2009 +0100
+@@ -369,4 +369,17 @@
2 - A module was force loaded by insmod -f.
Set by modutils >= 2.4.9 and module-init-tools.
4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.
+ 64 - A module from drivers/staging was loaded.
+ 0x40000000 - An unsupported kernel module was loaded.
+ 0x80000000 - An kernel module with external support was loaded.
-+
+
+==============================================================
+
+unsupported:
+ 0 - refuse to load unsupported modules,
+ 1 - warn when loading unsupported modules,
+ 2 - don't warn.
-
-diff -purN linux-2.6.27/Documentation/tracepoints.txt linux-2.6.27.19-5.1/Documentation/tracepoints.txt
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/tracepoints.txt 2009-03-25 16:11:43.000000000 +0000
++
+diff -r 9608d5473017 Documentation/tracepoints.txt
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/tracepoints.txt Wed May 06 16:55:57 2009 +0100
@@ -0,0 +1,103 @@
+ Using the Linux Kernel Tracepoints
+
+cat /proc/tracepoint-example (returns an expected error)
+rmmod tracepoint-example tracepoint-probe-example
+dmesg
-diff -purN linux-2.6.27/Documentation/video4linux/CARDLIST.au0828 linux-2.6.27.19-5.1/Documentation/video4linux/CARDLIST.au0828
---- linux-2.6.27/Documentation/video4linux/CARDLIST.au0828 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/video4linux/CARDLIST.au0828 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/video4linux/CARDLIST.au0828
+--- a/Documentation/video4linux/CARDLIST.au0828 Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/video4linux/CARDLIST.au0828 Wed May 06 16:55:57 2009 +0100
@@ -1,5 +1,5 @@
0 -> Unknown board (au0828)
- 1 -> Hauppauge HVR950Q (au0828) [2040:7200,2040:7210,2040:7217,2040:721b,2040:721f,2040:7280,0fd9:0008]
2 -> Hauppauge HVR850 (au0828) [2040:7240]
3 -> DViCO FusionHDTV USB (au0828) [0fe9:d620]
4 -> Hauppauge HVR950Q rev xxF8 (au0828) [2040:7201,2040:7211,2040:7281]
-diff -purN linux-2.6.27/MAINTAINERS linux-2.6.27.19-5.1/MAINTAINERS
---- linux-2.6.27/MAINTAINERS 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/MAINTAINERS 2009-03-25 16:11:42.000000000 +0000
-@@ -360,7 +360,7 @@ S: Maintained
+diff -r 9608d5473017 MAINTAINERS
+--- a/MAINTAINERS Wed May 06 15:47:13 2009 +0100
++++ b/MAINTAINERS Wed May 06 16:55:57 2009 +0100
+@@ -360,7 +360,7 @@
ALI1563 I2C DRIVER
P: Rudolf Marek
M: r.marek@assembler.cz
S: Maintained
ALPHA PORT
-@@ -1681,7 +1681,7 @@ FREESCALE I2C CPM DRIVER
+@@ -1681,7 +1681,7 @@
P: Jochen Friedrich
M: jochen@scram.de
L: linuxppc-dev@ozlabs.org
S: Maintained
FREESCALE SOC FS_ENET DRIVER
-@@ -1982,7 +1982,7 @@ S: Maintained
+@@ -1982,7 +1982,7 @@
I2C/SMBUS STUB DRIVER
P: Mark M. Hoffman
M: mhoffman@lightlink.com
S: Maintained
I2C SUBSYSTEM
-@@ -1990,14 +1990,14 @@ P: Jean Delvare (PC drivers, core)
+@@ -1990,14 +1990,14 @@
M: khali@linux-fr.org
P: Ben Dooks (embedded platforms)
M: ben-linux@fluff.org
T: http://www.harbaum.org/till/i2c_tiny_usb
S: Maintained
-@@ -3070,7 +3070,7 @@ S: Maintained
+@@ -3070,7 +3070,7 @@
OPENCORES I2C BUS DRIVER
P: Peter Korsgaard
M: jacmet@sunsite.dk
S: Maintained
ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
-@@ -3144,7 +3144,12 @@ S: Maintained
+@@ -3144,7 +3144,12 @@
PA SEMI SMBUS DRIVER
P: Olof Johansson
M: olof@lixom.net
S: Maintained
PARALLEL PORT SUPPORT
-@@ -3239,6 +3244,14 @@ M: balbir@linux.vnet.ibm.com
+@@ -3239,6 +3244,14 @@
L: linux-kernel@vger.kernel.org
S: Maintained
PERSONALITY HANDLING
P: Christoph Hellwig
M: hch@infradead.org
-@@ -3280,7 +3293,7 @@ S: Maintained
+@@ -3280,7 +3293,7 @@
PNXxxxx I2C DRIVER
P: Vitaly Wool
M: vitalywool@gmail.com
S: Maintained
PPP PROTOCOL DRIVERS AND COMPRESSORS
-@@ -3353,6 +3366,12 @@ L: linuxppc-dev@ozlabs.org
+@@ -3352,6 +3365,12 @@
+ L: linuxppc-dev@ozlabs.org
L: cbe-oss-dev@ozlabs.org
S: Supported
-
++
+PS3VRAM DRIVER
+P: Jim Paris
+M: jim@jtan.com
+L: cbe-oss-dev@ozlabs.org
+S: Maintained
-+
+
PVRUSB2 VIDEO4LINUX DRIVER
P: Mike Isely
- M: isely@pobox.com
-@@ -3725,7 +3744,7 @@ S: Maintained
+@@ -3725,7 +3744,7 @@
SIS 96X I2C/SMBUS DRIVER
P: Mark M. Hoffman
M: mhoffman@lightlink.com
S: Maintained
SIS FRAMEBUFFER DRIVER
-@@ -3862,6 +3881,13 @@ M: chrisw@sous-sol.org
+@@ -3860,6 +3879,13 @@
+ P: Chris Wright
+ M: chrisw@sous-sol.org
L: stable@kernel.org
- S: Maintained
-
++S: Maintained
++
+STAGING SUBSYSTEM:
+P: Greg Kroah-Hartman
+M: gregkh@suse.de
+L: linux-kernel@vger.kernel.org
+T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
-+S: Maintained
-+
+ S: Maintained
+
SHARP LH SUPPORT (LH7952X & LH7A40X)
- P: Marc Singer
- M: elf@buici.com
-@@ -4445,7 +4471,7 @@ S: Maintained
+@@ -4445,7 +4471,7 @@
VIAPRO SMBUS DRIVER
P: Jean Delvare
M: khali@linux-fr.org
S: Maintained
VIA VELOCITY NETWORK DRIVER
-@@ -4578,6 +4604,13 @@ W: http://oss.sgi.com/projects/xfs
+@@ -4578,6 +4604,13 @@
T: git git://oss.sgi.com:8090/xfs/xfs-2.6.git
S: Supported
XILINX SYSTEMACE DRIVER
P: Grant Likely
M: grant.likely@secretlab.ca
-diff -purN linux-2.6.27/Makefile linux-2.6.27.19-5.1/Makefile
---- linux-2.6.27/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Makefile 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 Makefile
+--- a/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/Makefile Wed May 06 16:55:57 2009 +0100
@@ -1,8 +1,8 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 27
-EXTRAVERSION =
-NAME = Rotary Wombat
-+EXTRAVERSION = .19
++EXTRAVERSION = .19-5.1
+NAME = Trembling Tortoise
# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
-@@ -63,6 +63,20 @@ ifndef KBUILD_CHECKSRC
- KBUILD_CHECKSRC = 0
+@@ -61,6 +61,20 @@
endif
-
+ ifndef KBUILD_CHECKSRC
+ KBUILD_CHECKSRC = 0
++endif
++
+# Call message checker as part of the C compilation
+#
+# Use 'make D=1' to enable checking
+endif
+ifndef KBUILD_KMSG_CHECK
+ KBUILD_KMSG_CHECK = 0
-+endif
-+
+ endif
+
# Use make M=dir to specify directory of external module to build
- # Old syntax make ... SUBDIRS=$PWD is still supported
- # Setting the environment variable KBUILD_EXTMOD take precedence
-@@ -321,6 +335,7 @@ PERL = perl
+@@ -321,6 +335,7 @@
CHECK = sparse
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise $(CF)
MODFLAGS = -DMODULE
CFLAGS_MODULE = $(MODFLAGS)
AFLAGS_MODULE = $(MODFLAGS)
-@@ -343,6 +358,11 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstric
+@@ -343,6 +358,11 @@
-Werror-implicit-function-declaration
KBUILD_AFLAGS := -D__ASSEMBLY__
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
-@@ -355,6 +375,7 @@ export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODU
+@@ -355,6 +375,7 @@
export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
# When compiling out-of-tree modules, put MODVERDIR in the module
# tree rather than in the kernel tree. The kernel tree might
-@@ -531,6 +552,11 @@ else
+@@ -531,6 +552,11 @@
KBUILD_CFLAGS += -fomit-frame-pointer
endif
ifdef CONFIG_DEBUG_INFO
KBUILD_CFLAGS += -g
KBUILD_AFLAGS += -gdwarf-2
-@@ -620,6 +646,8 @@ export mod_strip_cmd
+@@ -620,6 +646,8 @@
ifeq ($(KBUILD_EXTMOD),)
core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
-@@ -934,7 +962,11 @@ ifneq ($(KBUILD_SRC),)
+@@ -934,7 +962,11 @@
fi;
$(Q)if [ ! -d include2 ]; then \
mkdir -p include2; \
fi
endif
-@@ -965,8 +997,10 @@ define check-symlink
+@@ -965,8 +997,10 @@
set -e; \
if [ -L include/asm ]; then \
asmlink=`readlink include/asm | cut -d '-' -f 2`; \
echo " set ARCH or save .config and run 'make mrproper' to fix it"; \
exit 1; \
fi; \
-@@ -977,12 +1011,17 @@ endef
+@@ -977,12 +1011,17 @@
# not exist so the test in chack-symlink works and we have a
# directory for generated filesas used by some architectures.
define create-symlink
fi
endef
-@@ -1025,7 +1064,7 @@ depend dep:
+@@ -1025,7 +1064,7 @@
# ---------------------------------------------------------------------------
# Firmware install
export INSTALL_FW_PATH
PHONY += firmware_install
-diff -purN linux-2.6.27/Module.supported linux-2.6.27.19-5.1/Module.supported
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Module.supported 2009-03-25 16:11:53.000000000 +0000
+diff -r 9608d5473017 Module.supported
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Module.supported Wed May 06 16:55:57 2009 +0100
@@ -0,0 +1,1882 @@
+err_inject
+bestcomm-ata
+sfc_netutil external
+cifs external
+jfs external
-diff -purN linux-2.6.27/arch/Kconfig linux-2.6.27.19-5.1/arch/Kconfig
---- linux-2.6.27/arch/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/Kconfig 2009-03-25 16:10:44.000000000 +0000
-@@ -46,6 +46,9 @@ config HAVE_EFFICIENT_UNALIGNED_ACCESS
+diff -r 9608d5473017 arch/Kconfig
+--- a/arch/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/Kconfig Wed May 06 16:55:57 2009 +0100
+@@ -46,6 +46,9 @@
See Documentation/unaligned-memory-access.txt for more
information on the topic of unaligned memory accesses.
config KRETPROBES
def_bool y
depends on KPROBES && HAVE_KRETPROBES
-diff -purN linux-2.6.27/arch/alpha/Kconfig linux-2.6.27.19-5.1/arch/alpha/Kconfig
---- linux-2.6.27/arch/alpha/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/alpha/Kconfig 2009-03-25 16:10:46.000000000 +0000
-@@ -72,6 +72,7 @@ config ARCH_SUPPORTS_AOUT
+diff -r 9608d5473017 arch/alpha/Kconfig
+--- a/arch/alpha/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/alpha/Kconfig Wed May 06 16:55:57 2009 +0100
+@@ -72,6 +72,7 @@
def_bool y
source "init/Kconfig"
menu "System setup"
-diff -purN linux-2.6.27/arch/alpha/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/alpha/include/asm/ioctls.h
---- linux-2.6.27/arch/alpha/include/asm/ioctls.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/alpha/include/asm/ioctls.h 2009-03-25 16:10:46.000000000 +0000
+diff -r 9608d5473017 arch/alpha/include/asm/ioctls.h
+--- a/arch/alpha/include/asm/ioctls.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/alpha/include/asm/ioctls.h Wed May 06 16:55:57 2009 +0100
@@ -91,6 +91,7 @@
#define TIOCGSID 0x5429 /* Return the session ID of FD */
#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define TIOCSERCONFIG 0x5453
#define TIOCSERGWILD 0x5454
-diff -purN linux-2.6.27/arch/alpha/include/asm/spinlock.h linux-2.6.27.19-5.1/arch/alpha/include/asm/spinlock.h
---- linux-2.6.27/arch/alpha/include/asm/spinlock.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/alpha/include/asm/spinlock.h 2009-03-25 16:10:46.000000000 +0000
-@@ -166,6 +166,9 @@ static inline void __raw_write_unlock(ra
+diff -r 9608d5473017 arch/alpha/include/asm/spinlock.h
+--- a/arch/alpha/include/asm/spinlock.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/alpha/include/asm/spinlock.h Wed May 06 16:55:57 2009 +0100
+@@ -166,6 +166,9 @@
lock->lock = 0;
}
#define _raw_spin_relax(lock) cpu_relax()
#define _raw_read_relax(lock) cpu_relax()
#define _raw_write_relax(lock) cpu_relax()
-diff -purN linux-2.6.27/arch/alpha/include/asm/thread_info.h linux-2.6.27.19-5.1/arch/alpha/include/asm/thread_info.h
---- linux-2.6.27/arch/alpha/include/asm/thread_info.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/alpha/include/asm/thread_info.h 2009-03-25 16:10:47.000000000 +0000
-@@ -74,12 +74,14 @@ register struct thread_info *__current_t
+diff -r 9608d5473017 arch/alpha/include/asm/thread_info.h
+--- a/arch/alpha/include/asm/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/alpha/include/asm/thread_info.h Wed May 06 16:55:57 2009 +0100
+@@ -74,12 +74,14 @@
#define TIF_UAC_SIGBUS 7
#define TIF_MEMDIE 8
#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal */
/* Work to do on interrupt/exception return. */
#define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED)
-diff -purN linux-2.6.27/arch/alpha/kernel/entry.S linux-2.6.27.19-5.1/arch/alpha/kernel/entry.S
---- linux-2.6.27/arch/alpha/kernel/entry.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/alpha/kernel/entry.S 2009-03-25 16:10:46.000000000 +0000
-@@ -894,9 +894,9 @@ sys_getxpid:
+diff -r 9608d5473017 arch/alpha/kernel/entry.S
+--- a/arch/alpha/kernel/entry.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/alpha/kernel/entry.S Wed May 06 16:55:57 2009 +0100
+@@ -894,9 +894,9 @@
.end sys_getxpid
.align 4
lda $sp, -16($sp)
stq $26, 0($sp)
.prologue 0
-@@ -914,7 +914,7 @@ sys_pipe:
+@@ -914,7 +914,7 @@
stq $1, 80+16($sp)
1: lda $sp, 16($sp)
ret
.align 4
.globl sys_execve
-diff -purN linux-2.6.27/arch/alpha/kernel/irq_srm.c linux-2.6.27.19-5.1/arch/alpha/kernel/irq_srm.c
---- linux-2.6.27/arch/alpha/kernel/irq_srm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/alpha/kernel/irq_srm.c 2009-03-25 16:10:46.000000000 +0000
-@@ -63,6 +63,8 @@ init_srm_irqs(long max, unsigned long ig
+diff -r 9608d5473017 arch/alpha/kernel/irq_srm.c
+--- a/arch/alpha/kernel/irq_srm.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/alpha/kernel/irq_srm.c Wed May 06 16:55:57 2009 +0100
+@@ -63,6 +63,8 @@
{
long i;
for (i = 16; i < max; ++i) {
if (i < 64 && ((ignore_mask >> i) & 1))
continue;
-diff -purN linux-2.6.27/arch/alpha/kernel/systbls.S linux-2.6.27.19-5.1/arch/alpha/kernel/systbls.S
---- linux-2.6.27/arch/alpha/kernel/systbls.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/alpha/kernel/systbls.S 2009-03-25 16:10:46.000000000 +0000
-@@ -52,7 +52,7 @@ sys_call_table:
+diff -r 9608d5473017 arch/alpha/kernel/systbls.S
+--- a/arch/alpha/kernel/systbls.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/alpha/kernel/systbls.S Wed May 06 16:55:57 2009 +0100
+@@ -52,7 +52,7 @@
.quad sys_setpgid
.quad alpha_ni_syscall /* 40 */
.quad sys_dup
.quad osf_set_program_attributes
.quad alpha_ni_syscall
.quad sys_open /* 45 */
-diff -purN linux-2.6.27/arch/arm/Kconfig linux-2.6.27.19-5.1/arch/arm/Kconfig
---- linux-2.6.27/arch/arm/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/Kconfig 2009-03-25 16:10:48.000000000 +0000
-@@ -190,6 +190,8 @@ config VECTORS_BASE
+diff -r 9608d5473017 arch/arm/Kconfig
+--- a/arch/arm/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/Kconfig Wed May 06 16:55:57 2009 +0100
+@@ -189,6 +189,8 @@
+ The base address of exception vectors.
source "init/Kconfig"
-
-+source "kernel/Kconfig.freezer"
+
++source "kernel/Kconfig.freezer"
+
menu "System Type"
- choice
-diff -purN linux-2.6.27/arch/arm/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/arm/include/asm/ioctls.h
---- linux-2.6.27/arch/arm/include/asm/ioctls.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/include/asm/ioctls.h 2009-03-25 16:10:49.000000000 +0000
+diff -r 9608d5473017 arch/arm/include/asm/ioctls.h
+--- a/arch/arm/include/asm/ioctls.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/include/asm/ioctls.h Wed May 06 16:55:57 2009 +0100
@@ -52,6 +52,7 @@
#define TCSETSF2 _IOW('T',0x2D, struct termios2)
#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
#define FIOCLEX 0x5451
-diff -purN linux-2.6.27/arch/arm/include/asm/spinlock.h linux-2.6.27.19-5.1/arch/arm/include/asm/spinlock.h
---- linux-2.6.27/arch/arm/include/asm/spinlock.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/include/asm/spinlock.h 2009-03-25 16:10:49.000000000 +0000
-@@ -217,6 +217,9 @@ static inline int __raw_read_trylock(raw
+diff -r 9608d5473017 arch/arm/include/asm/spinlock.h
+--- a/arch/arm/include/asm/spinlock.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/include/asm/spinlock.h Wed May 06 16:55:57 2009 +0100
+@@ -217,6 +217,9 @@
/* read_can_lock - would read_trylock() succeed? */
#define __raw_read_can_lock(x) ((x)->lock < 0x80000000)
#define _raw_spin_relax(lock) cpu_relax()
#define _raw_read_relax(lock) cpu_relax()
#define _raw_write_relax(lock) cpu_relax()
-diff -purN linux-2.6.27/arch/arm/kernel/calls.S linux-2.6.27.19-5.1/arch/arm/kernel/calls.S
---- linux-2.6.27/arch/arm/kernel/calls.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/kernel/calls.S 2009-03-25 16:10:48.000000000 +0000
+diff -r 9608d5473017 arch/arm/kernel/calls.S
+--- a/arch/arm/kernel/calls.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/kernel/calls.S Wed May 06 16:55:57 2009 +0100
@@ -98,7 +98,7 @@
CALL(sys_uselib)
CALL(sys_swapon)
/* 90 */ CALL(OBSOLETE(old_mmap)) /* used by libc4 */
CALL(sys_munmap)
CALL(sys_truncate)
-diff -purN linux-2.6.27/arch/arm/mach-ns9xxx/irq.c linux-2.6.27.19-5.1/arch/arm/mach-ns9xxx/irq.c
---- linux-2.6.27/arch/arm/mach-ns9xxx/irq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/mach-ns9xxx/irq.c 2009-03-25 16:10:48.000000000 +0000
-@@ -86,7 +86,7 @@ static void handle_prio_irq(unsigned int
+diff -r 9608d5473017 arch/arm/mach-ns9xxx/irq.c
+--- a/arch/arm/mach-ns9xxx/irq.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/mach-ns9xxx/irq.c Wed May 06 16:55:57 2009 +0100
+@@ -86,7 +86,7 @@
/* XXX: There is no direct way to access noirqdebug, so check
* unconditionally for spurious irqs...
* Maybe this function should go to kernel/irq/chip.c? */
spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS;
-diff -purN linux-2.6.27/arch/arm/mach-pxa/include/mach/reset.h linux-2.6.27.19-5.1/arch/arm/mach-pxa/include/mach/reset.h
---- linux-2.6.27/arch/arm/mach-pxa/include/mach/reset.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/mach-pxa/include/mach/reset.h 2009-03-25 16:10:48.000000000 +0000
+diff -r 9608d5473017 arch/arm/mach-pxa/include/mach/reset.h
+--- a/arch/arm/mach-pxa/include/mach/reset.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/mach-pxa/include/mach/reset.h Wed May 06 16:55:57 2009 +0100
@@ -10,9 +10,12 @@
extern unsigned int reset_status;
extern void clear_reset_status(unsigned int mask);
+extern int init_gpio_reset(int gpio, int output);
#endif /* __ASM_ARCH_RESET_H */
-diff -purN linux-2.6.27/arch/arm/mach-pxa/reset.c linux-2.6.27.19-5.1/arch/arm/mach-pxa/reset.c
---- linux-2.6.27/arch/arm/mach-pxa/reset.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/mach-pxa/reset.c 2009-03-25 16:10:48.000000000 +0000
-@@ -20,7 +20,7 @@ static void do_hw_reset(void);
+diff -r 9608d5473017 arch/arm/mach-pxa/reset.c
+--- a/arch/arm/mach-pxa/reset.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/mach-pxa/reset.c Wed May 06 16:55:57 2009 +0100
+@@ -20,7 +20,7 @@
static int reset_gpio = -1;
{
int rc;
-@@ -30,9 +30,12 @@ int init_gpio_reset(int gpio)
+@@ -30,9 +30,12 @@
goto out;
}
gpio_free(gpio);
goto out;
}
-diff -purN linux-2.6.27/arch/arm/mach-pxa/spitz.c linux-2.6.27.19-5.1/arch/arm/mach-pxa/spitz.c
---- linux-2.6.27/arch/arm/mach-pxa/spitz.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/mach-pxa/spitz.c 2009-03-25 16:10:48.000000000 +0000
-@@ -548,7 +548,7 @@ static void spitz_restart(char mode)
+diff -r 9608d5473017 arch/arm/mach-pxa/spitz.c
+--- a/arch/arm/mach-pxa/spitz.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/mach-pxa/spitz.c Wed May 06 16:55:57 2009 +0100
+@@ -548,7 +548,7 @@
static void __init common_init(void)
{
pm_power_off = spitz_poweroff;
arm_pm_restart = spitz_restart;
-diff -purN linux-2.6.27/arch/arm/mach-pxa/tosa.c linux-2.6.27.19-5.1/arch/arm/mach-pxa/tosa.c
---- linux-2.6.27/arch/arm/mach-pxa/tosa.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/mach-pxa/tosa.c 2009-03-25 16:10:48.000000000 +0000
-@@ -781,7 +781,7 @@ static void __init tosa_init(void)
+diff -r 9608d5473017 arch/arm/mach-pxa/tosa.c
+--- a/arch/arm/mach-pxa/tosa.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/mach-pxa/tosa.c Wed May 06 16:55:57 2009 +0100
+@@ -781,7 +781,7 @@
gpio_set_wake(MFP_PIN_GPIO1, 1);
/* We can't pass to gpio-keys since it will drop the Reset altfunc */
pm_power_off = tosa_poweroff;
arm_pm_restart = tosa_restart;
-diff -purN linux-2.6.27/arch/arm/mm/cache-feroceon-l2.c linux-2.6.27.19-5.1/arch/arm/mm/cache-feroceon-l2.c
---- linux-2.6.27/arch/arm/mm/cache-feroceon-l2.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/mm/cache-feroceon-l2.c 2009-03-25 16:10:48.000000000 +0000
-@@ -148,7 +148,7 @@ static void feroceon_l2_inv_range(unsign
+diff -r 9608d5473017 arch/arm/mm/cache-feroceon-l2.c
+--- a/arch/arm/mm/cache-feroceon-l2.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/mm/cache-feroceon-l2.c Wed May 06 16:55:57 2009 +0100
+@@ -148,7 +148,7 @@
/*
* Clean and invalidate partial last cache line.
*/
l2_clean_inv_pa(end & ~(CACHE_LINE_SIZE - 1));
end &= ~(CACHE_LINE_SIZE - 1);
}
-@@ -156,7 +156,7 @@ static void feroceon_l2_inv_range(unsign
+@@ -156,7 +156,7 @@
/*
* Invalidate all full cache lines between 'start' and 'end'.
*/
unsigned long range_end = calc_range_end(start, end);
l2_inv_pa_range(start, range_end - CACHE_LINE_SIZE);
start = range_end;
-diff -purN linux-2.6.27/arch/arm/mm/cache-xsc3l2.c linux-2.6.27.19-5.1/arch/arm/mm/cache-xsc3l2.c
---- linux-2.6.27/arch/arm/mm/cache-xsc3l2.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/mm/cache-xsc3l2.c 2009-03-25 16:10:48.000000000 +0000
-@@ -97,7 +97,7 @@ static void xsc3_l2_inv_range(unsigned l
+diff -r 9608d5473017 arch/arm/mm/cache-xsc3l2.c
+--- a/arch/arm/mm/cache-xsc3l2.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/mm/cache-xsc3l2.c Wed May 06 16:55:57 2009 +0100
+@@ -97,7 +97,7 @@
/*
* Clean and invalidate partial last cache line.
*/
xsc3_l2_clean_pa(end & ~(CACHE_LINE_SIZE - 1));
xsc3_l2_inv_pa(end & ~(CACHE_LINE_SIZE - 1));
end &= ~(CACHE_LINE_SIZE - 1);
-@@ -106,7 +106,7 @@ static void xsc3_l2_inv_range(unsigned l
+@@ -106,7 +106,7 @@
/*
* Invalidate all full cache lines between 'start' and 'end'.
*/
xsc3_l2_inv_pa(start);
start += CACHE_LINE_SIZE;
}
-diff -purN linux-2.6.27/arch/avr32/Kconfig linux-2.6.27.19-5.1/arch/avr32/Kconfig
---- linux-2.6.27/arch/avr32/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/avr32/Kconfig 2009-03-25 16:10:47.000000000 +0000
-@@ -72,6 +72,8 @@ config GENERIC_BUG
+diff -r 9608d5473017 arch/avr32/Kconfig
+--- a/arch/avr32/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/avr32/Kconfig Wed May 06 16:55:57 2009 +0100
+@@ -71,6 +71,8 @@
+ depends on BUG
source "init/Kconfig"
-
-+source "kernel/Kconfig.freezer"
+
++source "kernel/Kconfig.freezer"
+
menu "System Type and features"
- source "kernel/time/Kconfig"
-diff -purN linux-2.6.27/arch/avr32/include/asm/thread_info.h linux-2.6.27.19-5.1/arch/avr32/include/asm/thread_info.h
---- linux-2.6.27/arch/avr32/include/asm/thread_info.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/avr32/include/asm/thread_info.h 2009-03-25 16:10:47.000000000 +0000
-@@ -96,6 +96,7 @@ static inline struct thread_info *curren
+diff -r 9608d5473017 arch/avr32/include/asm/thread_info.h
+--- a/arch/avr32/include/asm/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/avr32/include/asm/thread_info.h Wed May 06 16:55:57 2009 +0100
+@@ -96,6 +96,7 @@
#define _TIF_MEMDIE (1 << TIF_MEMDIE)
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
#define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP)
/* Note: The masks below must never span more than 16 bits! */
-diff -purN linux-2.6.27/arch/blackfin/Kconfig linux-2.6.27.19-5.1/arch/blackfin/Kconfig
---- linux-2.6.27/arch/blackfin/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/blackfin/Kconfig 2009-03-25 16:10:55.000000000 +0000
-@@ -64,8 +64,11 @@ config HARDWARE_PM
+diff -r 9608d5473017 arch/blackfin/Kconfig
+--- a/arch/blackfin/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/blackfin/Kconfig Wed May 06 16:55:57 2009 +0100
+@@ -64,7 +64,10 @@
depends on OPROFILE
source "init/Kconfig"
+
source "kernel/Kconfig.preempt"
-
-+source "kernel/Kconfig.freezer"
+
++source "kernel/Kconfig.freezer"
+
menu "Blackfin Processor Options"
- comment "Processor and Board Settings"
-diff -purN linux-2.6.27/arch/cris/Kconfig linux-2.6.27.19-5.1/arch/cris/Kconfig
---- linux-2.6.27/arch/cris/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/cris/Kconfig 2009-03-25 16:10:52.000000000 +0000
-@@ -62,6 +62,8 @@ config HZ
+diff -r 9608d5473017 arch/cris/Kconfig
+--- a/arch/cris/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/cris/Kconfig Wed May 06 16:55:57 2009 +0100
+@@ -61,6 +61,8 @@
+ default 100
source "init/Kconfig"
-
-+source "kernel/Kconfig.freezer"
+
++source "kernel/Kconfig.freezer"
+
menu "General setup"
- source "fs/Kconfig.binfmt"
-diff -purN linux-2.6.27/arch/cris/arch-v10/kernel/entry.S linux-2.6.27.19-5.1/arch/cris/arch-v10/kernel/entry.S
---- linux-2.6.27/arch/cris/arch-v10/kernel/entry.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/cris/arch-v10/kernel/entry.S 2009-03-25 16:10:52.000000000 +0000
-@@ -691,7 +691,7 @@ sys_call_table:
+diff -r 9608d5473017 arch/cris/arch-v10/kernel/entry.S
+--- a/arch/cris/arch-v10/kernel/entry.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/cris/arch-v10/kernel/entry.S Wed May 06 16:55:57 2009 +0100
+@@ -691,7 +691,7 @@
.long sys_uselib
.long sys_swapon
.long sys_reboot
.long old_mmap /* 90 */
.long sys_munmap
.long sys_truncate
-diff -purN linux-2.6.27/arch/cris/arch-v32/kernel/entry.S linux-2.6.27.19-5.1/arch/cris/arch-v32/kernel/entry.S
---- linux-2.6.27/arch/cris/arch-v32/kernel/entry.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/cris/arch-v32/kernel/entry.S 2009-03-25 16:10:52.000000000 +0000
-@@ -614,7 +614,7 @@ sys_call_table:
+diff -r 9608d5473017 arch/cris/arch-v32/kernel/entry.S
+--- a/arch/cris/arch-v32/kernel/entry.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/cris/arch-v32/kernel/entry.S Wed May 06 16:55:57 2009 +0100
+@@ -614,7 +614,7 @@
.long sys_uselib
.long sys_swapon
.long sys_reboot
.long old_mmap /* 90 */
.long sys_munmap
.long sys_truncate
-diff -purN linux-2.6.27/arch/frv/Kconfig linux-2.6.27.19-5.1/arch/frv/Kconfig
---- linux-2.6.27/arch/frv/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/frv/Kconfig 2009-03-25 16:10:55.000000000 +0000
-@@ -66,6 +66,8 @@ mainmenu "Fujitsu FR-V Kernel Configurat
+diff -r 9608d5473017 arch/frv/Kconfig
+--- a/arch/frv/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/frv/Kconfig Wed May 06 16:55:58 2009 +0100
+@@ -65,6 +65,8 @@
+ mainmenu "Fujitsu FR-V Kernel Configuration"
source "init/Kconfig"
-
-+source "kernel/Kconfig.freezer"
+
++source "kernel/Kconfig.freezer"
- menu "Fujitsu FR-V system setup"
-diff -purN linux-2.6.27/arch/h8300/Kconfig linux-2.6.27.19-5.1/arch/h8300/Kconfig
---- linux-2.6.27/arch/h8300/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/h8300/Kconfig 2009-03-25 16:10:47.000000000 +0000
-@@ -89,6 +89,8 @@ config HZ
+ menu "Fujitsu FR-V system setup"
+diff -r 9608d5473017 arch/h8300/Kconfig
+--- a/arch/h8300/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/h8300/Kconfig Wed May 06 16:55:58 2009 +0100
+@@ -88,6 +88,8 @@
+ default 100
source "init/Kconfig"
-
-+source "kernel/Kconfig.freezer"
+
++source "kernel/Kconfig.freezer"
+
source "arch/h8300/Kconfig.cpu"
- menu "Executable file formats"
-diff -purN linux-2.6.27/arch/h8300/include/asm/thread_info.h linux-2.6.27.19-5.1/arch/h8300/include/asm/thread_info.h
---- linux-2.6.27/arch/h8300/include/asm/thread_info.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/h8300/include/asm/thread_info.h 2009-03-25 16:10:47.000000000 +0000
-@@ -89,6 +89,7 @@ static inline struct thread_info *curren
+diff -r 9608d5473017 arch/h8300/include/asm/thread_info.h
+--- a/arch/h8300/include/asm/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/h8300/include/asm/thread_info.h Wed May 06 16:55:58 2009 +0100
+@@ -89,6 +89,7 @@
TIF_NEED_RESCHED */
#define TIF_MEMDIE 4
#define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */
/* as above, but as bit values */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
-@@ -96,6 +97,7 @@ static inline struct thread_info *curren
+@@ -96,6 +97,7 @@
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
-diff -purN linux-2.6.27/arch/h8300/kernel/syscalls.S linux-2.6.27.19-5.1/arch/h8300/kernel/syscalls.S
---- linux-2.6.27/arch/h8300/kernel/syscalls.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/h8300/kernel/syscalls.S 2009-03-25 16:10:47.000000000 +0000
-@@ -103,7 +103,7 @@ SYMBOL_NAME_LABEL(sys_call_table)
+diff -r 9608d5473017 arch/h8300/kernel/syscalls.S
+--- a/arch/h8300/kernel/syscalls.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/h8300/kernel/syscalls.S Wed May 06 16:55:58 2009 +0100
+@@ -103,7 +103,7 @@
.long SYMBOL_NAME(sys_uselib)
.long SYMBOL_NAME(sys_swapon)
.long SYMBOL_NAME(sys_reboot)
.long SYMBOL_NAME(old_mmap) /* 90 */
.long SYMBOL_NAME(sys_munmap)
.long SYMBOL_NAME(sys_truncate)
-diff -purN linux-2.6.27/arch/ia64/Kconfig linux-2.6.27.19-5.1/arch/ia64/Kconfig
---- linux-2.6.27/arch/ia64/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/Kconfig 2009-03-25 16:10:50.000000000 +0000
-@@ -7,6 +7,8 @@ mainmenu "IA-64 Linux Kernel Configurati
+diff -r 9608d5473017 arch/ia64/Kconfig
+--- a/arch/ia64/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/Kconfig Wed May 06 16:55:58 2009 +0100
+@@ -7,6 +7,8 @@
source "init/Kconfig"
menu "Processor type and features"
config IA64
-@@ -15,6 +17,7 @@ config IA64
+@@ -15,6 +17,7 @@
select ACPI if (!IA64_HP_SIM)
select PM if (!IA64_HP_SIM)
select ARCH_SUPPORTS_MSI
select HAVE_IDE
select HAVE_OPROFILE
select HAVE_KPROBES
-@@ -470,13 +473,14 @@ config COMPAT_FOR_U64_ALIGNMENT
+@@ -470,13 +473,14 @@
config IA64_MCA_RECOVERY
tristate "MCA recovery from errors other than TLB."
-config PERFMON
- bool "Performance monitor support"
-- help
++config IA64_CPE_MIGRATE
++ tristate "Migrate data off pages with correctable errors"
++ default m
+ help
- Selects whether support for the IA-64 performance monitor hardware
- is included in the kernel. This makes some kernel data-structures a
- little bigger and slows down execution a bit, but it is generally
- a good idea to turn this on. If you're unsure, say Y.
-+config IA64_CPE_MIGRATE
-+ tristate "Migrate data off pages with correctable errors"
-+ default m
-+ help
+ Migrate data off pages with correctable memory errors. Selecting
+ Y will build this functionality into the kernel. Selecting M will
+ build this functionality as a kernel loadable module. Installing
config IA64_PALINFO
tristate "/proc/pal support"
-@@ -501,6 +505,7 @@ config IA64_MC_ERR_INJECT
+@@ -501,6 +505,7 @@
config SGI_SN
def_bool y if (IA64_SGI_SN2 || IA64_GENERIC)
config IA64_ESI
bool "ESI (Extensible SAL Interface) support"
-@@ -549,6 +554,8 @@ source "drivers/firmware/Kconfig"
+@@ -548,6 +553,8 @@
+ source "drivers/firmware/Kconfig"
source "fs/Kconfig.binfmt"
-
-+source "arch/ia64/perfmon/Kconfig"
+
++source "arch/ia64/perfmon/Kconfig"
+
endmenu
- menu "Power management and ACPI"
-diff -purN linux-2.6.27/arch/ia64/Kconfig.debug linux-2.6.27.19-5.1/arch/ia64/Kconfig.debug
---- linux-2.6.27/arch/ia64/Kconfig.debug 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/Kconfig.debug 2009-03-25 16:10:50.000000000 +0000
-@@ -56,9 +56,106 @@ config IA64_DEBUG_IRQ
+diff -r 9608d5473017 arch/ia64/Kconfig.debug
+--- a/arch/ia64/Kconfig.debug Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/Kconfig.debug Wed May 06 16:55:58 2009 +0100
+@@ -56,9 +56,106 @@
and restore instructions. It's useful for tracking down spinlock
problems, but slow! If you're unsure, select N.
+ Of imsire. say N.
+
endmenu
-diff -purN linux-2.6.27/arch/ia64/Makefile linux-2.6.27.19-5.1/arch/ia64/Makefile
---- linux-2.6.27/arch/ia64/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/Makefile 2009-03-25 16:10:50.000000000 +0000
-@@ -57,9 +57,11 @@ core-$(CONFIG_IA64_GENERIC) += arch/ia6
+diff -r 9608d5473017 arch/ia64/Makefile
+--- a/arch/ia64/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/Makefile Wed May 06 16:55:58 2009 +0100
+@@ -57,9 +57,11 @@
core-$(CONFIG_IA64_HP_ZX1) += arch/ia64/dig/
core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
core-$(CONFIG_IA64_SGI_SN2) += arch/ia64/sn/
drivers-$(CONFIG_PCI) += arch/ia64/pci/
drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/
drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
-@@ -105,4 +107,4 @@ archprepare: make_nr_irqs_h FORCE
+@@ -105,4 +107,4 @@
PHONY += make_nr_irqs_h FORCE
make_nr_irqs_h: FORCE
- $(Q)$(MAKE) $(build)=arch/ia64/kernel include/asm-ia64/nr-irqs.h
+ $(Q)$(MAKE) $(build)=arch/ia64/kernel arch/ia64/include/asm/nr-irqs.h
-diff -purN linux-2.6.27/arch/ia64/configs/generic_defconfig linux-2.6.27.19-5.1/arch/ia64/configs/generic_defconfig
---- linux-2.6.27/arch/ia64/configs/generic_defconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/configs/generic_defconfig 2009-03-25 16:10:50.000000000 +0000
-@@ -209,7 +209,6 @@ CONFIG_IA32_SUPPORT=y
+diff -r 9608d5473017 arch/ia64/configs/generic_defconfig
+--- a/arch/ia64/configs/generic_defconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/configs/generic_defconfig Wed May 06 16:55:58 2009 +0100
+@@ -209,7 +209,6 @@
CONFIG_COMPAT=y
CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
CONFIG_IA64_MCA_RECOVERY=y
CONFIG_IA64_PALINFO=y
# CONFIG_IA64_MC_ERR_INJECT is not set
CONFIG_SGI_SN=y
-@@ -234,6 +233,16 @@ CONFIG_BINFMT_ELF=y
+@@ -232,6 +231,16 @@
+ CONFIG_DMIID=y
+ CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m
-
- #
++
++#
+# Hardware Performance Monitoring support
+#
+CONFIG_PERFMON=y
+CONFIG_IA64_PERFMON_ITANIUM=y
+CONFIG_IA64_PERFMON_MCKINLEY=y
+CONFIG_IA64_PERFMON_MONTECITO=y
-+
-+#
- # Power management and ACPI
+
#
- CONFIG_PM=y
-diff -purN linux-2.6.27/arch/ia64/ia32/ia32_entry.S linux-2.6.27.19-5.1/arch/ia64/ia32/ia32_entry.S
---- linux-2.6.27/arch/ia64/ia32/ia32_entry.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/ia32/ia32_entry.S 2009-03-25 16:10:50.000000000 +0000
-@@ -215,7 +215,7 @@ ia32_syscall_table:
+ # Power management and ACPI
+diff -r 9608d5473017 arch/ia64/ia32/ia32_entry.S
+--- a/arch/ia64/ia32/ia32_entry.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/ia32/ia32_entry.S Wed May 06 16:55:58 2009 +0100
+@@ -215,7 +215,7 @@
data8 sys_mkdir
data8 sys_rmdir /* 40 */
data8 sys_dup
data8 compat_sys_times
data8 sys_ni_syscall /* old prof syscall holder */
data8 sys32_brk /* 45 */
-diff -purN linux-2.6.27/arch/ia64/include/asm/Kbuild linux-2.6.27.19-5.1/arch/ia64/include/asm/Kbuild
---- linux-2.6.27/arch/ia64/include/asm/Kbuild 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/Kbuild 2009-03-25 16:10:50.000000000 +0000
-@@ -5,10 +5,12 @@ header-y += fpu.h
+diff -r 9608d5473017 arch/ia64/include/asm/Kbuild
+--- a/arch/ia64/include/asm/Kbuild Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/Kbuild Wed May 06 16:55:58 2009 +0100
+@@ -5,10 +5,12 @@
header-y += fpswa.h
header-y += ia64regs.h
header-y += intel_intrin.h
unifdef-y += gcc_intrin.h
unifdef-y += intrinsics.h
-diff -purN linux-2.6.27/arch/ia64/include/asm/ansidecl.h linux-2.6.27.19-5.1/arch/ia64/include/asm/ansidecl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/ansidecl.h 2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/ansidecl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/include/asm/ansidecl.h Wed May 06 16:55:58 2009 +0100
@@ -0,0 +1,383 @@
+/* ANSI and traditional C compatability macros
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+#endif
+
+#endif /* ansidecl.h */
-diff -purN linux-2.6.27/arch/ia64/include/asm/bfd.h linux-2.6.27.19-5.1/arch/ia64/include/asm/bfd.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/bfd.h 2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/bfd.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/include/asm/bfd.h Wed May 06 16:55:58 2009 +0100
@@ -0,0 +1,5089 @@
+/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
+ generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
+}
+#endif
+#endif
-diff -purN linux-2.6.27/arch/ia64/include/asm/hw_irq.h linux-2.6.27.19-5.1/arch/ia64/include/asm/hw_irq.h
---- linux-2.6.27/arch/ia64/include/asm/hw_irq.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/hw_irq.h 2009-03-25 16:10:50.000000000 +0000
-@@ -67,9 +67,9 @@ extern int ia64_last_device_vector;
+diff -r 9608d5473017 arch/ia64/include/asm/hw_irq.h
+--- a/arch/ia64/include/asm/hw_irq.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/hw_irq.h Wed May 06 16:55:58 2009 +0100
+@@ -67,9 +67,9 @@
#define IA64_NUM_DEVICE_VECTORS (IA64_LAST_DEVICE_VECTOR - IA64_FIRST_DEVICE_VECTOR + 1)
#define IA64_MCA_RENDEZ_VECTOR 0xe8 /* MCA rendez interrupt */
#define IA64_IPI_LOCAL_TLB_FLUSH 0xfc /* SMP flush local TLB */
#define IA64_IPI_RESCHEDULE 0xfd /* SMP reschedule */
#define IA64_IPI_VECTOR 0xfe /* inter-processor interrupt vector */
-diff -purN linux-2.6.27/arch/ia64/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/ia64/include/asm/ioctls.h
---- linux-2.6.27/arch/ia64/include/asm/ioctls.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/ioctls.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/ioctls.h
+--- a/arch/ia64/include/asm/ioctls.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/ioctls.h Wed May 06 16:55:58 2009 +0100
@@ -59,6 +59,7 @@
#define TCSETSF2 _IOW('T',0x2D, struct termios2)
#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
#define FIOCLEX 0x5451
-diff -purN linux-2.6.27/arch/ia64/include/asm/irq.h linux-2.6.27.19-5.1/arch/ia64/include/asm/irq.h
---- linux-2.6.27/arch/ia64/include/asm/irq.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/irq.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/irq.h
+--- a/arch/ia64/include/asm/irq.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/irq.h Wed May 06 16:55:58 2009 +0100
@@ -13,7 +13,7 @@
#include <linux/types.h>
static __inline__ int
irq_canonicalize (int irq)
-diff -purN linux-2.6.27/arch/ia64/include/asm/kdb.h linux-2.6.27.19-5.1/arch/ia64/include/asm/kdb.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/kdb.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/kdb.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/include/asm/kdb.h Wed May 06 16:55:58 2009 +0100
@@ -0,0 +1,49 @@
+#ifndef _ASM_KDB_H
+#define _ASM_KDB_H
+#endif
+
+#endif /* !_ASM_KDB_H */
-diff -purN linux-2.6.27/arch/ia64/include/asm/kdb_break.h linux-2.6.27.19-5.1/arch/ia64/include/asm/kdb_break.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/kdb_break.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/kdb_break.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/include/asm/kdb_break.h Wed May 06 16:55:58 2009 +0100
@@ -0,0 +1,24 @@
+#ifndef _ASM_KDB_BREAK_H
+#define _ASM_KDB_BREAK_H
+#define KDB_BREAK_ENTER_SLAVE 0x80102 /* KDB_ENTER_SLAVE(), concurrent slave events */
+
+#endif /* !_ASM_KDB_BREAK_H */
-diff -purN linux-2.6.27/arch/ia64/include/asm/kdbprivate.h linux-2.6.27.19-5.1/arch/ia64/include/asm/kdbprivate.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/kdbprivate.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/kdbprivate.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/include/asm/kdbprivate.h Wed May 06 16:55:58 2009 +0100
@@ -0,0 +1,124 @@
+#ifndef _ASM_KDBPRIVATE_H
+#define _ASM_KDBPRIVATE_H
+extern void kdba_wait_for_cpus(void);
+
+#endif /* !_ASM_KDBPRIVATE_H */
-diff -purN linux-2.6.27/arch/ia64/include/asm/kmap_types.h linux-2.6.27.19-5.1/arch/ia64/include/asm/kmap_types.h
---- linux-2.6.27/arch/ia64/include/asm/kmap_types.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/kmap_types.h 2009-03-25 16:10:50.000000000 +0000
-@@ -22,7 +22,8 @@ D(9) KM_IRQ0,
+diff -r 9608d5473017 arch/ia64/include/asm/kmap_types.h
+--- a/arch/ia64/include/asm/kmap_types.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/kmap_types.h Wed May 06 16:55:58 2009 +0100
+@@ -22,7 +22,8 @@
D(10) KM_IRQ1,
D(11) KM_SOFTIRQ0,
D(12) KM_SOFTIRQ1,
};
#undef D
-diff -purN linux-2.6.27/arch/ia64/include/asm/kregs.h linux-2.6.27.19-5.1/arch/ia64/include/asm/kregs.h
---- linux-2.6.27/arch/ia64/include/asm/kregs.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/kregs.h 2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/kregs.h
+--- a/arch/ia64/include/asm/kregs.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/kregs.h Wed May 06 16:55:58 2009 +0100
@@ -72,7 +72,7 @@
/* A mask of PSR bits that we generally don't want to inherit across a clone2() or an
execve(). Only list flags here that need to be cleared/set for BOTH clone2() and
IA64_PSR_TB | IA64_PSR_ID | IA64_PSR_DA | IA64_PSR_DD | \
IA64_PSR_SS | IA64_PSR_ED | IA64_PSR_IA)
#define IA64_PSR_BITS_TO_SET (IA64_PSR_DFH | IA64_PSR_SP)
-diff -purN linux-2.6.27/arch/ia64/include/asm/mca.h linux-2.6.27.19-5.1/arch/ia64/include/asm/mca.h
---- linux-2.6.27/arch/ia64/include/asm/mca.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/mca.h 2009-03-25 16:10:50.000000000 +0000
-@@ -137,6 +137,7 @@ extern unsigned long __per_cpu_mca[NR_CP
+diff -r 9608d5473017 arch/ia64/include/asm/mca.h
+--- a/arch/ia64/include/asm/mca.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/mca.h Wed May 06 16:55:58 2009 +0100
+@@ -137,6 +137,7 @@
extern int cpe_vector;
extern int ia64_cpe_irq;
extern void ia64_mca_init(void);
extern void ia64_mca_cpu_init(void *);
extern void ia64_os_mca_dispatch(void);
-@@ -150,10 +151,15 @@ extern void ia64_slave_init_handler(void
+@@ -150,9 +151,14 @@
extern void ia64_mca_cmc_vector_setup(void);
extern int ia64_reg_MCA_extension(int (*fn)(void *, struct ia64_sal_os_state *));
extern void ia64_unreg_MCA_extension(void);
extern u64 ia64_get_rnat(u64 *);
extern void ia64_mca_printk(const char * fmt, ...)
__attribute__ ((format (printf, 1, 2)));
-
++
+extern struct list_head badpagelist;
+extern unsigned int total_badpages;
-+
+
struct ia64_mca_notify_die {
struct ia64_sal_os_state *sos;
- int *monarch_cpu;
-diff -purN linux-2.6.27/arch/ia64/include/asm/meminit.h linux-2.6.27.19-5.1/arch/ia64/include/asm/meminit.h
---- linux-2.6.27/arch/ia64/include/asm/meminit.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/meminit.h 2009-03-25 16:10:50.000000000 +0000
-@@ -47,7 +47,6 @@ extern int reserve_elfcorehdr(unsigned l
+diff -r 9608d5473017 arch/ia64/include/asm/meminit.h
+--- a/arch/ia64/include/asm/meminit.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/meminit.h Wed May 06 16:55:58 2009 +0100
+@@ -47,7 +47,6 @@
*/
#define GRANULEROUNDDOWN(n) ((n) & ~(IA64_GRANULE_SIZE-1))
#define GRANULEROUNDUP(n) (((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1))
#ifdef CONFIG_NUMA
extern void call_pernode_memory (unsigned long start, unsigned long len, void *func);
-diff -purN linux-2.6.27/arch/ia64/include/asm/page.h linux-2.6.27.19-5.1/arch/ia64/include/asm/page.h
---- linux-2.6.27/arch/ia64/include/asm/page.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/page.h 2009-03-25 16:10:51.000000000 +0000
-@@ -121,6 +121,7 @@ extern unsigned long max_low_pfn;
+diff -r 9608d5473017 arch/ia64/include/asm/page.h
+--- a/arch/ia64/include/asm/page.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/page.h Wed May 06 16:55:58 2009 +0100
+@@ -121,6 +121,7 @@
#endif
#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
-diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon.h linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon.h
---- linux-2.6.27/arch/ia64/include/asm/perfmon.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/perfmon.h
+--- a/arch/ia64/include/asm/perfmon.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/perfmon.h Wed May 06 16:55:58 2009 +0100
@@ -1,279 +1,59 @@
/*
- * Copyright (C) 2001-2003 Hewlett-Packard Co
- * Stephane Eranian <eranian@hpl.hp.com>
-- */
--
++ * Copyright (c) 2001-2007 Hewlett-Packard Development Company, L.P.
++ * Contributed by Stephane Eranian <eranian@hpl.hp.com>
++ *
++ * This file contains Itanium Processor Family specific definitions
++ * for the perfmon interface.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of version 2 of the GNU General Public
++ * License as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ * 02111-1307 USA
++ */
++#ifndef _ASM_IA64_PERFMON_H_
++#define _ASM_IA64_PERFMON_H_
++
++/*
++ * arch-specific user visible interface definitions
+ */
+
-#ifndef _ASM_IA64_PERFMON_H
-#define _ASM_IA64_PERFMON_H
--
--/*
++#define PFM_ARCH_MAX_PMCS (256+64)
++#define PFM_ARCH_MAX_PMDS (256+64)
++
++#define PFM_ARCH_PMD_STK_ARG 8
++#define PFM_ARCH_PMC_STK_ARG 8
+
+ /*
- * perfmon comamnds supported on all CPU models
-- */
++ * Itanium specific context flags
++ *
++ * bits[00-15]: generic flags (see asm/perfmon.h)
++ * bits[16-31]: arch-specific flags
+ */
-#define PFM_WRITE_PMCS 0x01
-#define PFM_WRITE_PMDS 0x02
-#define PFM_READ_PMDS 0x03
-#define PFM_GET_PMC_RESET_VAL 0x0f
-#define PFM_LOAD_CONTEXT 0x10
-#define PFM_UNLOAD_CONTEXT 0x11
--
--/*
++#define PFM_ITA_FL_INSECURE 0x10000 /* clear psr.sp on non system, non self */
+
+ /*
- * PMU model specific commands (may not be supported on all PMU models)
-- */
++ * Itanium specific public event set flags (set_flags)
++ *
++ * event set flags layout:
++ * bits[00-15] : generic flags
++ * bits[16-31] : arch-specific flags
+ */
-#define PFM_WRITE_IBRS 0x20
-#define PFM_WRITE_DBRS 0x21
--
--/*
++#define PFM_ITA_SETFL_EXCL_INTR 0x10000 /* exclude interrupt execution */
++#define PFM_ITA_SETFL_INTR_ONLY 0x20000 /* include only interrupt execution */
++#define PFM_ITA_SETFL_IDLE_EXCL 0x40000 /* stop monitoring in idle loop */
+
+ /*
- * context flags
-- */
++ * compatibility for version v2.0 of the interface
+ */
-#define PFM_FL_NOTIFY_BLOCK 0x01 /* block task on user level notifications */
-#define PFM_FL_SYSTEM_WIDE 0x02 /* create a system wide context */
-#define PFM_FL_OVFL_NO_MSG 0x80 /* do not post overflow/end messages for notification */
--
++#include <asm/perfmon_compat.h>
+
-/*
- * event set flags
- */
-
-/*
- * PMD/PMC/IBR/DBR return flags (ignored on input)
-+ * Copyright (c) 2001-2007 Hewlett-Packard Development Company, L.P.
-+ * Contributed by Stephane Eranian <eranian@hpl.hp.com>
- *
+- *
- * Those flags are used on output and must be checked in case EAGAIN is returned
- * by any of the calls using a pfarg_reg_t or pfarg_dbreg_t structure.
- */
-
-/*
- * Define the version numbers for both perfmon as a whole and the sampling buffer format.
-+ * This file contains Itanium Processor Family specific definitions
-+ * for the perfmon interface.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of version 2 of the GNU General Public
-+ * License as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ * 02111-1307 USA
- */
+- */
-#define PFM_VERSION_MAJ 2U
-#define PFM_VERSION_MIN 0U
-#define PFM_VERSION (((PFM_VERSION_MAJ&0xffff)<<16)|(PFM_VERSION_MIN & 0xffff))
-#define PFM_VERSION_MAJOR(x) (((x)>>16) & 0xffff)
-#define PFM_VERSION_MINOR(x) ((x) & 0xffff)
-
-+#ifndef _ASM_IA64_PERFMON_H_
-+#define _ASM_IA64_PERFMON_H_
-
- /*
+-
+-/*
- * miscellaneous architected definitions
-+ * arch-specific user visible interface definitions
- */
+- */
-#define PMU_FIRST_COUNTER 4 /* first counting monitor (PMC/PMD) */
-#define PMU_MAX_PMCS 256 /* maximum architected number of PMC registers */
-#define PMU_MAX_PMDS 256 /* maximum architected number of PMD registers */
-
-extern void pfm_save_regs (struct task_struct *);
-extern void pfm_load_regs (struct task_struct *);
-
+-
-extern void pfm_exit_thread(struct task_struct *);
-extern int pfm_use_debug_registers(struct task_struct *);
-extern int pfm_release_debug_registers(struct task_struct *);
-extern void pfm_handle_work(void);
-extern int pfm_install_alt_pmu_interrupt(pfm_intr_handler_desc_t *h);
-extern int pfm_remove_alt_pmu_interrupt(pfm_intr_handler_desc_t *h);
-+#define PFM_ARCH_MAX_PMCS (256+64)
-+#define PFM_ARCH_MAX_PMDS (256+64)
-
+-
-
-
-/*
-
-extern int pfm_register_buffer_fmt(pfm_buffer_fmt_t *fmt);
-extern int pfm_unregister_buffer_fmt(pfm_uuid_t uuid);
-+#define PFM_ARCH_PMD_STK_ARG 8
-+#define PFM_ARCH_PMC_STK_ARG 8
-
- /*
+-
+-/*
- * perfmon interface exported to modules
-+ * Itanium specific context flags
-+ *
-+ * bits[00-15]: generic flags (see asm/perfmon.h)
-+ * bits[16-31]: arch-specific flags
- */
+- */
-extern int pfm_mod_read_pmds(struct task_struct *, void *req, unsigned int nreq, struct pt_regs *regs);
-extern int pfm_mod_write_pmcs(struct task_struct *, void *req, unsigned int nreq, struct pt_regs *regs);
-extern int pfm_mod_write_ibrs(struct task_struct *task, void *req, unsigned int nreq, struct pt_regs *regs);
-extern int pfm_mod_write_dbrs(struct task_struct *task, void *req, unsigned int nreq, struct pt_regs *regs);
-+#define PFM_ITA_FL_INSECURE 0x10000 /* clear psr.sp on non system, non self */
-
- /*
+-
+-/*
- * describe the content of the local_cpu_date->pfm_syst_info field
-+ * Itanium specific public event set flags (set_flags)
-+ *
-+ * event set flags layout:
-+ * bits[00-15] : generic flags
-+ * bits[16-31] : arch-specific flags
- */
+- */
-#define PFM_CPUINFO_SYST_WIDE 0x1 /* if set a system wide session exists */
-#define PFM_CPUINFO_DCR_PP 0x2 /* if set the system wide session has started */
-#define PFM_CPUINFO_EXCL_IDLE 0x4 /* the system wide session excludes the idle task */
-+#define PFM_ITA_SETFL_EXCL_INTR 0x10000 /* exclude interrupt execution */
-+#define PFM_ITA_SETFL_INTR_ONLY 0x20000 /* include only interrupt execution */
-+#define PFM_ITA_SETFL_IDLE_EXCL 0x40000 /* stop monitoring in idle loop */
-
- /*
+-
+-/*
- * sysctl control structure. visible to sampling formats
-+ * compatibility for version v2.0 of the interface
- */
+- */
-typedef struct {
- int debug; /* turn on/off debugging via syslog */
- int debug_ovfl; /* turn on/off debug printk in overflow handler */
-
-
-#endif /* __KERNEL__ */
-+#include <asm/perfmon_compat.h>
-
+-
-#endif /* _ASM_IA64_PERFMON_H */
+#endif /* _ASM_IA64_PERFMON_H_ */
-diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon_compat.h linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon_compat.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon_compat.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/perfmon_compat.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/include/asm/perfmon_compat.h Wed May 06 16:55:58 2009 +0100
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
+#define PFM_REG_HAS_ERROR(flag) (((flag) & PFM_REG_RETFL_MASK) != 0)
+
+#endif /* _ASM_IA64_PERFMON_COMPAT_H_ */
-diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon_default_smpl.h linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon_default_smpl.h
---- linux-2.6.27/arch/ia64/include/asm/perfmon_default_smpl.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon_default_smpl.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/perfmon_default_smpl.h
+--- a/arch/ia64/include/asm/perfmon_default_smpl.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/perfmon_default_smpl.h Wed May 06 16:55:58 2009 +0100
@@ -1,83 +1,106 @@
/*
- * Copyright (C) 2002-2003 Hewlett-Packard Co
- unsigned long hdr_count; /* how many valid entries */
- unsigned long hdr_cur_offs; /* current offset from top of buffer */
- unsigned long hdr_reserved2; /* reserved for future use */
--
-- unsigned long hdr_overflows; /* how many times the buffer overflowed */
-- unsigned long hdr_buf_size; /* how many bytes in the buffer */
--
-- unsigned int hdr_version; /* contains perfmon version (smpl format diffs) */
-- unsigned int hdr_reserved1; /* for future use */
-- unsigned long hdr_reserved[10]; /* for future use */
--} pfm_default_smpl_hdr_t;
+struct pfm_default_smpl_hdr {
+ u64 hdr_count; /* how many valid entries */
+ u64 hdr_cur_offs; /* current offset from top of buffer */
+ u64 dr_reserved2; /* reserved for future use */
-+
+
+- unsigned long hdr_overflows; /* how many times the buffer overflowed */
+- unsigned long hdr_buf_size; /* how many bytes in the buffer */
+ u64 hdr_overflows; /* how many times the buffer overflowed */
+ u64 hdr_buf_size; /* how many bytes in the buffer */
-+
+
+- unsigned int hdr_version; /* contains perfmon version (smpl format diffs) */
+- unsigned int hdr_reserved1; /* for future use */
+- unsigned long hdr_reserved[10]; /* for future use */
+-} pfm_default_smpl_hdr_t;
+ u32 hdr_version; /* smpl format version*/
+ u32 hdr_reserved1; /* for future use */
+ u64 hdr_reserved[10]; /* for future use */
- int pid; /* thread id (for NPTL, this is gettid()) */
- unsigned char reserved1[3]; /* reserved for future use */
- unsigned char ovfl_pmd; /* index of overflowed PMD */
--
++struct pfm_default_smpl_entry {
++ pid_t pid; /* thread id (for NPTL, this is gettid()) */
++ uint8_t reserved1[3]; /* for future use */
++ uint8_t ovfl_pmd; /* overflow pmd for this sample */
++ u64 last_reset_val; /* initial value of overflowed PMD */
++ unsigned long ip; /* where did the overflow interrupt happened */
++ u64 tstamp; /* overflow timetamp */
++ u16 cpu; /* cpu on which the overfow occured */
++ u16 set; /* event set active when overflow ocurred */
++ pid_t tgid; /* thread group id (for NPTL, this is getpid()) */
++};
+
- unsigned long last_reset_val; /* initial value of overflowed PMD */
- unsigned long ip; /* where did the overflow interrupt happened */
- unsigned long tstamp; /* ar.itc when entering perfmon intr. handler */
-#define PFM_DEFAULT_MAX_PMDS 64 /* how many pmds supported by data structures (sizeof(unsigned long) */
-#define PFM_DEFAULT_MAX_ENTRY_SIZE (sizeof(pfm_default_smpl_entry_t)+(sizeof(unsigned long)*PFM_DEFAULT_MAX_PMDS))
-#define PFM_DEFAULT_SMPL_MIN_BUF_SIZE (sizeof(pfm_default_smpl_hdr_t)+PFM_DEFAULT_MAX_ENTRY_SIZE)
-+struct pfm_default_smpl_entry {
-+ pid_t pid; /* thread id (for NPTL, this is gettid()) */
-+ uint8_t reserved1[3]; /* for future use */
-+ uint8_t ovfl_pmd; /* overflow pmd for this sample */
-+ u64 last_reset_val; /* initial value of overflowed PMD */
-+ unsigned long ip; /* where did the overflow interrupt happened */
-+ u64 tstamp; /* overflow timetamp */
-+ u16 cpu; /* cpu on which the overfow occured */
-+ u16 set; /* event set active when overflow ocurred */
-+ pid_t tgid; /* thread group id (for NPTL, this is getpid()) */
-+};
-+
+#define PFM_DEFAULT_MAX_PMDS 64 /* #pmds supported */
+#define PFM_DEFAULT_MAX_ENTRY_SIZE (sizeof(struct pfm_default_smpl_entry)+\
+ (sizeof(u64)*PFM_DEFAULT_MAX_PMDS))
-#endif /* __PERFMON_DEFAULT_SMPL_H__ */
+#endif /* __ASM_IA64_PERFMON_DEFAULT_SMPL_H__ */
-diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon_kern.h linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon_kern.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon_kern.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/perfmon_kern.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/include/asm/perfmon_kern.h Wed May 06 16:55:58 2009 +0100
@@ -0,0 +1,351 @@
+/*
+ * Copyright (c) 2001-2007 Hewlett-Packard Development Company, L.P.
+
+#endif /* __KERNEL__ */
+#endif /* _ASM_IA64_PERFMON_KERN_H_ */
-diff -purN linux-2.6.27/arch/ia64/include/asm/processor.h linux-2.6.27.19-5.1/arch/ia64/include/asm/processor.h
---- linux-2.6.27/arch/ia64/include/asm/processor.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/processor.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/processor.h
+--- a/arch/ia64/include/asm/processor.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/processor.h Wed May 06 16:56:00 2009 +0100
@@ -42,7 +42,6 @@
#define IA64_THREAD_FPH_VALID (__IA64_UL(1) << 0) /* floating-point high state valid? */
#define IA64_THREAD_UAC_NOPRINT (__IA64_UL(1) << 3) /* don't log unaligned accesses */
#define IA64_THREAD_UAC_SIGBUS (__IA64_UL(1) << 4) /* generate SIGBUS on unaligned acc. */
#define IA64_THREAD_MIGRATION (__IA64_UL(1) << 5) /* require migration
-@@ -321,14 +320,6 @@ struct thread_struct {
+@@ -321,14 +320,6 @@
#else
# define INIT_THREAD_IA32
#endif /* CONFIG_IA32_SUPPORT */
__u64 dbr[IA64_NUM_DBG_REGS];
__u64 ibr[IA64_NUM_DBG_REGS];
struct ia64_fpreg fph[96]; /* saved/loaded on demand */
-@@ -343,7 +334,6 @@ struct thread_struct {
+@@ -343,7 +334,6 @@
.task_size = DEFAULT_TASK_SIZE, \
.last_fph_cpu = -1, \
INIT_THREAD_IA32 \
.dbr = {0, }, \
.ibr = {0, }, \
.fph = {{{{0}}}, } \
-diff -purN linux-2.6.27/arch/ia64/include/asm/sn/bte.h linux-2.6.27.19-5.1/arch/ia64/include/asm/sn/bte.h
---- linux-2.6.27/arch/ia64/include/asm/sn/bte.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/sn/bte.h 2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/sn/bte.h
+--- a/arch/ia64/include/asm/sn/bte.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/sn/bte.h Wed May 06 16:56:00 2009 +0100
@@ -38,8 +38,8 @@
/* BTE status register only supports 16 bits for length field */
/* Define hardware */
-diff -purN linux-2.6.27/arch/ia64/include/asm/sn/sn_sal.h linux-2.6.27.19-5.1/arch/ia64/include/asm/sn/sn_sal.h
---- linux-2.6.27/arch/ia64/include/asm/sn/sn_sal.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/sn/sn_sal.h 2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/sn/sn_sal.h
+--- a/arch/ia64/include/asm/sn/sn_sal.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/sn/sn_sal.h Wed May 06 16:56:01 2009 +0100
@@ -90,6 +90,8 @@
#define SN_SAL_SET_CPU_NUMBER 0x02000068
/*
* Service-specific constants
-@@ -1185,4 +1187,47 @@ ia64_sn_kernel_launch_event(void)
+@@ -1185,4 +1187,47 @@
SAL_CALL_NOLOCK(rv, SN_SAL_KERNEL_LAUNCH_EVENT, 0, 0, 0, 0, 0, 0, 0);
return rv.status;
}
+ return rv.status;
+}
#endif /* _ASM_IA64_SN_SN_SAL_H */
-diff -purN linux-2.6.27/arch/ia64/include/asm/spinlock.h linux-2.6.27.19-5.1/arch/ia64/include/asm/spinlock.h
---- linux-2.6.27/arch/ia64/include/asm/spinlock.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/spinlock.h 2009-03-25 16:10:51.000000000 +0000
-@@ -120,6 +120,35 @@ do { \
+diff -r 9608d5473017 arch/ia64/include/asm/spinlock.h
+--- a/arch/ia64/include/asm/spinlock.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/spinlock.h Wed May 06 16:56:01 2009 +0100
+@@ -120,6 +120,35 @@
#define __raw_read_can_lock(rw) (*(volatile int *)(rw) >= 0)
#define __raw_write_can_lock(rw) (*(volatile int *)(rw) == 0)
#define __raw_read_lock(rw) \
do { \
raw_rwlock_t *__read_lock_ptr = (rw); \
-@@ -131,6 +160,8 @@ do { \
+@@ -131,6 +160,8 @@
} \
} while (0)
#define __raw_read_unlock(rw) \
do { \
raw_rwlock_t *__read_lock_ptr = (rw); \
-@@ -138,21 +169,28 @@ do { \
+@@ -138,20 +169,27 @@
} while (0)
#ifdef ASM_SUPPORTED
+ :: "r"(rw), "r"(flags), "i"(IA64_PSR_I_BIT) \
+ : "ar.ccv", "p6", "p7", "r2", "r29", "memory"); \
} while(0)
-
-+#define __raw_write_lock(rw) __raw_write_lock_flags(rw, 0)
+
++#define __raw_write_lock(rw) __raw_write_lock_flags(rw, 0)
+
#define __raw_write_trylock(rw) \
({ \
- register long result; \
-@@ -174,6 +212,8 @@ static inline void __raw_write_unlock(ra
+@@ -173,6 +211,8 @@
+ }
#else /* !ASM_SUPPORTED */
-
-+#define __raw_write_lock_flags(l, flags) __raw_write_lock(l)
+
++#define __raw_write_lock_flags(l, flags) __raw_write_lock(l)
+
#define __raw_write_lock(l) \
({ \
- __u64 ia64_val, ia64_set_val = ia64_dep_mi(-1, 0, 31, 1); \
-diff -purN linux-2.6.27/arch/ia64/include/asm/system.h linux-2.6.27.19-5.1/arch/ia64/include/asm/system.h
---- linux-2.6.27/arch/ia64/include/asm/system.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/system.h 2009-03-25 16:10:50.000000000 +0000
-@@ -217,6 +217,7 @@ struct task_struct;
+diff -r 9608d5473017 arch/ia64/include/asm/system.h
+--- a/arch/ia64/include/asm/system.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/system.h Wed May 06 16:56:01 2009 +0100
+@@ -217,6 +217,7 @@
extern void ia64_save_extra (struct task_struct *task);
extern void ia64_load_extra (struct task_struct *task);
#ifdef CONFIG_VIRT_CPU_ACCOUNTING
extern void ia64_account_on_switch (struct task_struct *prev, struct task_struct *next);
# define IA64_ACCOUNT_ON_SWITCH(p,n) ia64_account_on_switch(p,n)
-@@ -224,16 +225,9 @@ extern void ia64_account_on_switch (stru
+@@ -224,16 +225,9 @@
# define IA64_ACCOUNT_ON_SWITCH(p,n)
#endif
#define __switch_to(prev,next,last) do { \
IA64_ACCOUNT_ON_SWITCH(prev, next); \
-@@ -241,6 +235,10 @@ extern void ia64_account_on_switch (stru
+@@ -241,6 +235,10 @@
ia64_save_extra(prev); \
if (IA64_HAS_EXTRA_STATE(next)) \
ia64_load_extra(next); \
ia64_psr(task_pt_regs(next))->dfh = !ia64_is_local_fpu_owner(next); \
(last) = ia64_switch_to((next)); \
} while (0)
-diff -purN linux-2.6.27/arch/ia64/include/asm/thread_info.h linux-2.6.27.19-5.1/arch/ia64/include/asm/thread_info.h
---- linux-2.6.27/arch/ia64/include/asm/thread_info.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/thread_info.h 2009-03-25 16:10:51.000000000 +0000
-@@ -110,6 +110,8 @@ extern void tsk_clear_notify_resume(stru
+diff -r 9608d5473017 arch/ia64/include/asm/thread_info.h
+--- a/arch/ia64/include/asm/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/thread_info.h Wed May 06 16:56:01 2009 +0100
+@@ -110,6 +110,8 @@
#define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */
#define TIF_FREEZE 20 /* is freezing for suspend */
#define TIF_RESTORE_RSE 21 /* user RBS is newer than kernel RBS */
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
-@@ -123,6 +125,8 @@ extern void tsk_clear_notify_resume(stru
+@@ -123,6 +125,8 @@
#define _TIF_DB_DISABLED (1 << TIF_DB_DISABLED)
#define _TIF_FREEZE (1 << TIF_FREEZE)
#define _TIF_RESTORE_RSE (1 << TIF_RESTORE_RSE)
/* "work to do on user-return" bits */
#define TIF_ALLWORK_MASK (_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SYSCALL_AUDIT|\
-diff -purN linux-2.6.27/arch/ia64/include/asm/unistd.h linux-2.6.27.19-5.1/arch/ia64/include/asm/unistd.h
---- linux-2.6.27/arch/ia64/include/asm/unistd.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/unistd.h 2009-03-25 16:10:50.000000000 +0000
-@@ -363,7 +363,7 @@ struct pt_regs;
+diff -r 9608d5473017 arch/ia64/include/asm/unistd.h
+--- a/arch/ia64/include/asm/unistd.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/unistd.h Wed May 06 16:56:01 2009 +0100
+@@ -363,7 +363,7 @@
struct sigaction;
long sys_execve(char __user *filename, char __user * __user *argv,
char __user * __user *envp, struct pt_regs *regs);
asmlinkage long sys_rt_sigaction(int sig,
const struct sigaction __user *act,
struct sigaction __user *oact,
-diff -purN linux-2.6.27/arch/ia64/kdb/ChangeLog linux-2.6.27.19-5.1/arch/ia64/kdb/ChangeLog
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/ChangeLog 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/ChangeLog
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/ChangeLog Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,1085 @@
+2008-09-30 Jay Lan <jlan@sgi.com>
+
+2002-01-07 Keith Owens <kaos@sgi.com>
+
+ * Split kdb for ia64 as kdb v2.0-2.4.17-ia64-011226-1.
-diff -purN linux-2.6.27/arch/ia64/kdb/Makefile linux-2.6.27.19-5.1/arch/ia64/kdb/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/Makefile 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/Makefile Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,21 @@
+#
+# This file is subject to the terms and conditions of the GNU General Public
+AFLAGS_kdba_jmp.o += $(AFLAGS_KERNEL)
+
+USE_STANDARD_AS_RULE := true
-diff -purN linux-2.6.27/arch/ia64/kdb/cpu-ia64-opc.c linux-2.6.27.19-5.1/arch/ia64/kdb/cpu-ia64-opc.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/cpu-ia64-opc.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/cpu-ia64-opc.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/cpu-ia64-opc.c Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,598 @@
+/* Copyright 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
+ { ABS, ins_const, ext_const, 0, {{0, 0}}, 0, /* LDXMOV */
+ "ldxmov target" },
+ };
-diff -purN linux-2.6.27/arch/ia64/kdb/ia64-asmtab.c linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-asmtab.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-asmtab.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/ia64-asmtab.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/ia64-asmtab.c Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,8585 @@
+/* This file is automatically generated by ia64-gen. Do not edit! */
+
+{ 0x1, 0, 0, 2671 },
+};
+
-diff -purN linux-2.6.27/arch/ia64/kdb/ia64-asmtab.h linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-asmtab.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-asmtab.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/ia64-asmtab.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/ia64-asmtab.h Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,158 @@
+/* ia64-asmtab.h -- Header for compacted IA-64 opcode tables.
+ Copyright 1999, 2000 Free Software Foundation, Inc.
+};
+
+#endif
-diff -purN linux-2.6.27/arch/ia64/kdb/ia64-dis.c linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-dis.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-dis.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/ia64-dis.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/ia64-dis.c Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,312 @@
+/* ia64-dis.c -- Disassemble ia64 instructions
+ Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ (*info->fprintf_func) (info->stream, " data8 %#011llx", (long long) insn);
+ goto failed;
+}
-diff -purN linux-2.6.27/arch/ia64/kdb/ia64-opc.c linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-opc.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-opc.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/ia64-opc.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/ia64-opc.c Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,749 @@
+/* ia64-opc.c -- Functions to access the compacted opcode table
+ Copyright 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
+
+ return &dependencies[index];
+}
-diff -purN linux-2.6.27/arch/ia64/kdb/ia64-opc.h linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-opc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-opc.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/ia64-opc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/ia64-opc.h Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,141 @@
+/* ia64-opc.h -- IA-64 opcode table.
+ Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+#define TGT64 IA64_OPND_TGT64
+
+#endif
-diff -purN linux-2.6.27/arch/ia64/kdb/ia64.h linux-2.6.27.19-5.1/arch/ia64/kdb/ia64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/ia64.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/ia64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/ia64.h Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,402 @@
+/* ia64.h -- Header file for ia64 opcode table
+ Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+extern const struct ia64_operand elf64_ia64_operands[IA64_OPND_COUNT];
+
+#endif /* opcode_ia64_h */
-diff -purN linux-2.6.27/arch/ia64/kdb/kdb_cmds linux-2.6.27.19-5.1/arch/ia64/kdb/kdb_cmds
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdb_cmds 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdb_cmds
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdb_cmds Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,17 @@
+# Standard architecture specific commands for kdb.
+# These commands are appended to those in kdb/kdb_cmds, see that file for
+ -dmesg 600
+ -bt
+endefcmd
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_bp.c linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_bp.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_bp.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_bp.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_bp.c Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,841 @@
+/*
+ * Kernel Debugger Architecture Dependent Breakpoint Handling
+ }
+ return(0);
+}
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_bt.c linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_bt.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_bt.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_bt.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_bt.c Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,285 @@
+/*
+ * Kernel Debugger Architecture Dependent Stack Traceback
+{
+ return kdba_bt_stack(argcount, p);
+}
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_fru.c linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_fru.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_fru.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_fru.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_fru.c Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,65 @@
+/*
+ * Kernel Debugger Architecture Dependent FRU functions.
+
+module_init(kdba_fru_init)
+module_exit(kdba_fru_exit)
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_id.c linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_id.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_id.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_id.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_id.c Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,529 @@
+/*
+ * Kernel Debugger Architecture Dependent Instruction Disassembly
+
+ dip->display_endian = BFD_ENDIAN_LITTLE;
+}
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_io.c linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_io.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_io.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_io.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_io.c Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,661 @@
+/*
+ * Kernel Debugger Architecture Dependent Console I/O handler
+
+void kdba_local_arch_setup(void) {}
+void kdba_local_arch_cleanup(void) {}
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_jmp.S linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_jmp.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_jmp.S 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_jmp.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_jmp.S Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,394 @@
+/*
+ * Kernel Debugger Architecture Dependent Longjump Support.
+#else /* __KERNEL__ */
+END(kdba_longjmp)
+#endif /* !_KERNEL__ */
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_pod.c linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_pod.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_pod.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_pod.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_pod.c Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,64 @@
+/*
+ * Kernel Debugger Architecture Dependent POD functions.
+
+module_init(kdba_pod_init)
+module_exit(kdba_pod_exit)
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_support.c linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_support.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_support.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_support.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_support.c Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,1720 @@
+/*
+ * Kernel Debugger Architecture Independent Support Functions
+ }
+}
+#endif
-diff -purN linux-2.6.27/arch/ia64/kernel/Makefile linux-2.6.27.19-5.1/arch/ia64/kernel/Makefile
---- linux-2.6.27/arch/ia64/kernel/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/Makefile 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/Makefile
+--- a/arch/ia64/kernel/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/Makefile Wed May 06 16:56:01 2009 +0100
@@ -5,7 +5,7 @@
extra-y := head.o init_task.o vmlinux.lds
salinfo.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o \
unwind.o mca.o mca_asm.o topology.o
-@@ -23,10 +23,10 @@ obj-$(CONFIG_IOSAPIC) += iosapic.o
+@@ -23,10 +23,10 @@
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_SMP) += smp.o smpboot.o
obj-$(CONFIG_NUMA) += numa.o
obj-$(CONFIG_KPROBES) += kprobes.o jprobes.o
obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
-@@ -96,15 +96,15 @@ endef
+@@ -96,15 +96,15 @@
# We use internal kbuild rules to avoid the "is up to date" message from make
arch/$(SRCARCH)/kernel/nr-irqs.s: $(srctree)/arch/$(SRCARCH)/kernel/nr-irqs.c \
#
# native ivt.S and entry.S
-diff -purN linux-2.6.27/arch/ia64/kernel/acpi.c linux-2.6.27.19-5.1/arch/ia64/kernel/acpi.c
---- linux-2.6.27/arch/ia64/kernel/acpi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/acpi.c 2009-03-25 16:10:50.000000000 +0000
-@@ -656,6 +656,30 @@ static int __init acpi_parse_fadt(struct
+diff -r 9608d5473017 arch/ia64/kernel/acpi.c
+--- a/arch/ia64/kernel/acpi.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/acpi.c Wed May 06 16:56:01 2009 +0100
+@@ -656,6 +656,30 @@
return 0;
}
int __init acpi_boot_init(void)
{
-@@ -679,11 +703,6 @@ int __init acpi_boot_init(void)
+@@ -678,11 +702,6 @@
+ (ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE, acpi_parse_lapic_addr_ovr, 0) < 0)
printk(KERN_ERR PREFIX
"Error parsing LAPIC address override entry\n");
-
+-
- if (acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC, acpi_parse_lsapic, NR_CPUS)
- < 1)
- printk(KERN_ERR PREFIX
- "Error parsing MADT - no LAPIC entries\n");
--
+
if (acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, acpi_parse_lapic_nmi, 0)
< 0)
- printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");
-diff -purN linux-2.6.27/arch/ia64/kernel/cpe_migrate.c linux-2.6.27.19-5.1/arch/ia64/kernel/cpe_migrate.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/cpe_migrate.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/cpe_migrate.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kernel/cpe_migrate.c Wed May 06 16:56:01 2009 +0100
@@ -0,0 +1,474 @@
+/*
+ * File: cpe_migrate.c
+MODULE_AUTHOR("Russ Anderson <rja@sgi.com>");
+MODULE_DESCRIPTION("ia64 Corrected Error page migration driver");
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/arch/ia64/kernel/entry.S linux-2.6.27.19-5.1/arch/ia64/kernel/entry.S
---- linux-2.6.27/arch/ia64/kernel/entry.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/entry.S 2009-03-25 16:10:50.000000000 +0000
-@@ -1436,7 +1436,7 @@ sys_call_table:
+diff -r 9608d5473017 arch/ia64/kernel/entry.S
+--- a/arch/ia64/kernel/entry.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/entry.S Wed May 06 16:56:01 2009 +0100
+@@ -1436,7 +1436,7 @@
data8 sys_mkdir // 1055
data8 sys_rmdir
data8 sys_dup
data8 sys_times
data8 ia64_brk // 1060
data8 sys_setgid
-diff -purN linux-2.6.27/arch/ia64/kernel/head.S linux-2.6.27.19-5.1/arch/ia64/kernel/head.S
---- linux-2.6.27/arch/ia64/kernel/head.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/head.S 2009-03-25 16:10:50.000000000 +0000
-@@ -259,8 +259,13 @@ start_ap:
+diff -r 9608d5473017 arch/ia64/kernel/head.S
+--- a/arch/ia64/kernel/head.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/head.S Wed May 06 16:56:01 2009 +0100
+@@ -259,8 +259,13 @@
/*
* Switch into virtual mode:
*/
;;
mov cr.ipsr=r16
movl r17=1f
-diff -purN linux-2.6.27/arch/ia64/kernel/irq_ia64.c linux-2.6.27.19-5.1/arch/ia64/kernel/irq_ia64.c
---- linux-2.6.27/arch/ia64/kernel/irq_ia64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/irq_ia64.c 2009-03-25 16:10:50.000000000 +0000
-@@ -40,10 +40,6 @@
+diff -r 9608d5473017 arch/ia64/kernel/irq_ia64.c
+--- a/arch/ia64/kernel/irq_ia64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/irq_ia64.c Wed May 06 16:56:01 2009 +0100
+@@ -39,10 +39,6 @@
+ #include <asm/pgtable.h>
#include <asm/system.h>
#include <asm/tlbflush.h>
-
+-
-#ifdef CONFIG_PERFMON
-# include <asm/perfmon.h>
-#endif
--
+
#define IRQ_DEBUG 0
- #define IRQ_VECTOR_UNASSIGNED (0)
-@@ -660,9 +656,6 @@ init_IRQ (void)
+@@ -660,9 +656,6 @@
}
#endif
#endif
platform_irq_init();
}
-diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/kernel/mca.c
---- linux-2.6.27/arch/ia64/kernel/mca.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/mca.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/mca.c
+--- a/arch/ia64/kernel/mca.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/mca.c Wed May 06 16:56:01 2009 +0100
@@ -68,6 +68,9 @@
*
* 2007-04-27 Russ Anderson <rja@sgi.com>
#include <asm/delay.h>
#include <asm/machvec.h>
-@@ -163,7 +170,14 @@ static int cmc_polling_enabled = 1;
+@@ -163,7 +170,14 @@
* but encounters problems retrieving CPE logs. This should only be
* necessary for debugging.
*/
extern void salinfo_log_wakeup(int type, u8 *buffer, u64 size, int irqsafe);
-@@ -523,6 +537,28 @@ int mca_recover_range(unsigned long addr
+@@ -523,6 +537,28 @@
}
EXPORT_SYMBOL_GPL(mca_recover_range);
#ifdef CONFIG_ACPI
int cpe_vector = -1;
-@@ -534,6 +570,7 @@ ia64_mca_cpe_int_handler (int cpe_irq, v
+@@ -534,6 +570,7 @@
static unsigned long cpe_history[CPE_HISTORY_LENGTH];
static int index;
static DEFINE_SPINLOCK(cpe_history_lock);
IA64_MCA_DEBUG("%s: received interrupt vector = %#x on CPU %d\n",
__func__, cpe_irq, smp_processor_id());
-@@ -580,6 +617,8 @@ ia64_mca_cpe_int_handler (int cpe_irq, v
+@@ -580,6 +617,8 @@
out:
/* Get the CPE error record and log it */
ia64_mca_log_sal_error_record(SAL_INFO_TYPE_CPE);
return IRQ_HANDLED;
}
-@@ -789,6 +828,14 @@ ia64_mca_rendez_int_handler(int rendez_i
+@@ -788,6 +827,14 @@
+ * reached SAL
*/
ia64_sal_mc_rendez();
-
++
+#ifdef CONFIG_KDB
+ /* We get here when the MCA monarch has entered and has woken up the
+ * slaves. Do a KDB rendezvous to meet the monarch cpu.
+ if (monarch_cpu != -1)
+ KDB_ENTER_SLAVE();
+#endif
-+
+
NOTIFY_MCA(DIE_MCA_RENDZVOUS_PROCESS, get_irq_regs(), (long)&nd, 1);
- /* Wait for the monarch cpu to exit. */
-@@ -1326,6 +1373,19 @@ ia64_mca_handler(struct pt_regs *regs, s
+@@ -1326,6 +1373,19 @@
mca_insert_tr(0x2); /*Reload dynamic itrs*/
}
NOTIFY_MCA(DIE_MCA_MONARCH_LEAVE, regs, (long)&nd, 1);
if (atomic_dec_return(&mca_count) > 0) {
-@@ -1338,6 +1398,12 @@ ia64_mca_handler(struct pt_regs *regs, s
+@@ -1338,6 +1398,12 @@
if (cpu_isset(i, mca_cpu)) {
monarch_cpu = i;
cpu_clear(i, mca_cpu); /* wake next cpu */
while (monarch_cpu != -1)
cpu_relax(); /* spin until last cpu leaves */
set_curr_task(cpu, previous_current);
-@@ -1347,6 +1413,7 @@ ia64_mca_handler(struct pt_regs *regs, s
+@@ -1347,6 +1413,7 @@
}
}
}
set_curr_task(cpu, previous_current);
ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_NOTDONE;
monarch_cpu = -1; /* This frees the slaves and previous monarchs */
-@@ -1607,6 +1674,11 @@ default_monarch_init_process(struct noti
+@@ -1607,6 +1674,11 @@
}
}
printk("\n\n");
if (read_trylock(&tasklist_lock)) {
do_each_thread (g, t) {
printk("\nBacktrace of pid %d (%s)\n", t->pid, t->comm);
-@@ -1614,6 +1686,7 @@ default_monarch_init_process(struct noti
+@@ -1614,6 +1686,7 @@
} while_each_thread (g, t);
read_unlock(&tasklist_lock);
}
/* FIXME: This will not restore zapped printk locks. */
RESTORE_LOGLEVEL(console_loglevel);
return NOTIFY_DONE;
-@@ -1646,6 +1719,20 @@ ia64_init_handler(struct pt_regs *regs,
+@@ -1646,6 +1719,20 @@
int cpu = smp_processor_id();
struct ia64_mca_notify_die nd =
{ .sos = sos, .monarch_cpu = &monarch_cpu };
NOTIFY_INIT(DIE_INIT_ENTER, regs, (long)&nd, 0);
-@@ -1684,6 +1771,11 @@ ia64_init_handler(struct pt_regs *regs,
+@@ -1684,6 +1771,11 @@
ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_INIT;
while (monarch_cpu == -1)
cpu_relax(); /* spin until monarch enters */
NOTIFY_INIT(DIE_INIT_SLAVE_ENTER, regs, (long)&nd, 1);
NOTIFY_INIT(DIE_INIT_SLAVE_PROCESS, regs, (long)&nd, 1);
-@@ -1712,6 +1804,14 @@ ia64_init_handler(struct pt_regs *regs,
+@@ -1712,6 +1804,14 @@
mprintk("Delaying for 5 seconds...\n");
udelay(5*1000000);
ia64_wait_for_slaves(cpu, "INIT");
/* If nobody intercepts DIE_INIT_MONARCH_PROCESS then we drop through
* to default_monarch_init_process() above and just print all the
* tasks.
-@@ -1950,6 +2050,13 @@ ia64_mca_init(void)
+@@ -1950,6 +2050,13 @@
printk(KERN_INFO "Increasing MCA rendezvous timeout from "
"%ld to %ld milliseconds\n", timeout, isrv.v0);
timeout = isrv.v0;
NOTIFY_MCA(DIE_MCA_NEW_TIMEOUT, NULL, timeout, 0);
continue;
}
-diff -purN linux-2.6.27/arch/ia64/kernel/perfmon_default_smpl.c linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_default_smpl.c
---- linux-2.6.27/arch/ia64/kernel/perfmon_default_smpl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_default_smpl.c 1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 arch/ia64/kernel/perfmon_default_smpl.c
+--- a/arch/ia64/kernel/perfmon_default_smpl.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/perfmon_default_smpl.c Wed May 06 16:56:01 2009 +0100
@@ -1,296 +0,0 @@
-/*
- * Copyright (C) 2002-2003 Hewlett-Packard Co
-module_init(pfm_default_smpl_init_module);
-module_exit(pfm_default_smpl_cleanup_module);
-
-diff -purN linux-2.6.27/arch/ia64/kernel/perfmon_generic.h linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_generic.h
---- linux-2.6.27/arch/ia64/kernel/perfmon_generic.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_generic.h 1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 arch/ia64/kernel/perfmon_generic.h
+--- a/arch/ia64/kernel/perfmon_generic.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/perfmon_generic.h Wed May 06 16:56:01 2009 +0100
@@ -1,45 +0,0 @@
-/*
- * This file contains the generic PMU register description tables
- .pmc_desc = pfm_gen_pmc_desc
-};
-
-diff -purN linux-2.6.27/arch/ia64/kernel/perfmon_itanium.h linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_itanium.h
---- linux-2.6.27/arch/ia64/kernel/perfmon_itanium.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_itanium.h 1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 arch/ia64/kernel/perfmon_itanium.h
+--- a/arch/ia64/kernel/perfmon_itanium.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/perfmon_itanium.h Wed May 06 16:56:01 2009 +0100
@@ -1,115 +0,0 @@
-/*
- * This file contains the Itanium PMU register description tables
-};
-
-
-diff -purN linux-2.6.27/arch/ia64/kernel/perfmon_mckinley.h linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_mckinley.h
---- linux-2.6.27/arch/ia64/kernel/perfmon_mckinley.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_mckinley.h 1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 arch/ia64/kernel/perfmon_mckinley.h
+--- a/arch/ia64/kernel/perfmon_mckinley.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/perfmon_mckinley.h Wed May 06 16:56:01 2009 +0100
@@ -1,187 +0,0 @@
-/*
- * This file contains the McKinley PMU register description tables
-};
-
-
-diff -purN linux-2.6.27/arch/ia64/kernel/perfmon_montecito.h linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_montecito.h
---- linux-2.6.27/arch/ia64/kernel/perfmon_montecito.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_montecito.h 1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 arch/ia64/kernel/perfmon_montecito.h
+--- a/arch/ia64/kernel/perfmon_montecito.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/perfmon_montecito.h Wed May 06 16:56:01 2009 +0100
@@ -1,269 +0,0 @@
-/*
- * This file contains the Montecito PMU register description tables
- .num_dbrs = 8,
- .use_rr_dbregs = 1 /* debug register are use for range retrictions */
-};
-diff -purN linux-2.6.27/arch/ia64/kernel/process.c linux-2.6.27.19-5.1/arch/ia64/kernel/process.c
---- linux-2.6.27/arch/ia64/kernel/process.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/process.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/process.c
+--- a/arch/ia64/kernel/process.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/process.c Wed May 06 16:56:01 2009 +0100
@@ -28,6 +28,7 @@
#include <linux/delay.h>
#include <linux/kdebug.h>
#include <asm/cpu.h>
#include <asm/delay.h>
-@@ -45,10 +46,6 @@
+@@ -44,10 +45,6 @@
+ #include <asm/user.h>
#include "entry.h"
-
+-
-#ifdef CONFIG_PERFMON
-# include <asm/perfmon.h>
-#endif
--
+
#include "sigframe.h"
- void (*ia64_mark_idle)(int);
-@@ -162,10 +159,8 @@ show_regs (struct pt_regs *regs)
+@@ -162,10 +159,8 @@
void tsk_clear_notify_resume(struct task_struct *tsk)
{
if (test_ti_thread_flag(task_thread_info(tsk), TIF_RESTORE_RSE))
return;
clear_ti_thread_flag(task_thread_info(tsk), TIF_NOTIFY_RESUME);
-@@ -188,14 +183,9 @@ do_notify_resume_user(sigset_t *unused,
+@@ -188,14 +183,9 @@
return;
}
/* deal with pending signal delivery */
if (test_thread_flag(TIF_SIGPENDING)) {
-@@ -212,22 +202,15 @@ do_notify_resume_user(sigset_t *unused,
+@@ -212,21 +202,14 @@
local_irq_disable(); /* force interrupt disable */
}
return 1;
}
__setup("nohalt", nohalt_setup);
-
+-
-void
-update_pal_halt_status(int status)
-{
- can_do_pal_halt = pal_halt && status;
-}
--
+
/*
* We use this if we don't have any better idle routine..
- */
-@@ -236,6 +219,22 @@ default_idle (void)
+@@ -236,6 +219,22 @@
{
local_irq_enable();
while (!need_resched()) {
if (can_do_pal_halt) {
local_irq_disable();
if (!need_resched()) {
-@@ -244,6 +243,12 @@ default_idle (void)
+@@ -244,6 +243,12 @@
local_irq_enable();
} else
cpu_relax();
}
}
-@@ -344,22 +349,9 @@ cpu_idle (void)
+@@ -344,21 +349,8 @@
void
ia64_save_extra (struct task_struct *task)
{
-
if ((task->thread.flags & IA64_THREAD_DBG_VALID) != 0)
ia64_save_debug_regs(&task->thread.dbr[0]);
-
+-
-#ifdef CONFIG_PERFMON
- if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0)
- pfm_save_regs(task);
- if (info & PFM_CPUINFO_SYST_WIDE)
- pfm_syst_wide_update_task(task, info, 0);
-#endif
--
+
#ifdef CONFIG_IA32_SUPPORT
if (IS_IA32_PROCESS(task_pt_regs(task)))
- ia32_save_state(task);
-@@ -369,22 +361,9 @@ ia64_save_extra (struct task_struct *tas
+@@ -369,21 +361,8 @@
void
ia64_load_extra (struct task_struct *task)
{
-
if ((task->thread.flags & IA64_THREAD_DBG_VALID) != 0)
ia64_load_debug_regs(&task->thread.dbr[0]);
-
+-
-#ifdef CONFIG_PERFMON
- if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0)
- pfm_load_regs(task);
- if (info & PFM_CPUINFO_SYST_WIDE)
- pfm_syst_wide_update_task(task, info, 1);
-#endif
--
+
#ifdef CONFIG_IA32_SUPPORT
if (IS_IA32_PROCESS(task_pt_regs(task)))
- ia32_load_state(task);
-@@ -510,8 +489,7 @@ copy_thread (int nr, unsigned long clone
+@@ -510,8 +489,7 @@
* call behavior where scratch registers are preserved across
* system calls (unless used by the system call itself).
*/
# define THREAD_FLAGS_TO_SET 0
p->thread.flags = ((current->thread.flags & ~THREAD_FLAGS_TO_CLEAR)
| THREAD_FLAGS_TO_SET);
-@@ -533,10 +511,8 @@ copy_thread (int nr, unsigned long clone
+@@ -533,10 +511,8 @@
}
#endif
return retval;
}
-@@ -745,15 +721,13 @@ exit_thread (void)
+@@ -745,15 +721,13 @@
{
ia64_drop_fpu(current);
if (IS_IA32_PROCESS(task_pt_regs(current)))
ia32_drop_ia64_partial_page_list(current);
}
-diff -purN linux-2.6.27/arch/ia64/kernel/ptrace.c linux-2.6.27.19-5.1/arch/ia64/kernel/ptrace.c
---- linux-2.6.27/arch/ia64/kernel/ptrace.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/ptrace.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/ptrace.c
+--- a/arch/ia64/kernel/ptrace.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/ptrace.c Wed May 06 16:56:01 2009 +0100
@@ -20,6 +20,7 @@
#include <linux/security.h>
#include <linux/audit.h>
#include "entry.h"
-@@ -2124,7 +2122,6 @@ access_uarea(struct task_struct *child,
+@@ -2124,7 +2122,6 @@
"address 0x%lx\n", addr);
return -1;
}
/*
* Check if debug registers are used by perfmon. This
* test must be done once we know that we can do the
-@@ -2142,9 +2139,8 @@ access_uarea(struct task_struct *child,
+@@ -2142,9 +2139,8 @@
* IA64_THREAD_DBG_VALID. The registers are restored
* by the PMU context switch code.
*/
if (!(child->thread.flags & IA64_THREAD_DBG_VALID)) {
child->thread.flags |= IA64_THREAD_DBG_VALID;
-diff -purN linux-2.6.27/arch/ia64/kernel/setup.c linux-2.6.27.19-5.1/arch/ia64/kernel/setup.c
---- linux-2.6.27/arch/ia64/kernel/setup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/setup.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/setup.c
+--- a/arch/ia64/kernel/setup.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/setup.c Wed May 06 16:56:01 2009 +0100
@@ -45,6 +45,7 @@
#include <linux/cpufreq.h>
#include <linux/kexec.h>
#include <asm/ia32.h>
#include <asm/machvec.h>
-@@ -549,8 +550,12 @@ setup_arch (char **cmdline_p)
+@@ -549,8 +550,12 @@
#ifdef CONFIG_ACPI
/* Initialize the ACPI boot-time table parser */
acpi_table_init();
per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ?
32 : cpus_weight(early_cpu_possible_map)),
additional_cpus > 0 ? additional_cpus : 0);
-@@ -841,9 +846,6 @@ void __init
+@@ -841,9 +846,6 @@
setup_per_cpu_areas (void)
{
/* start_kernel() requires this... */
}
/*
-@@ -1051,6 +1053,8 @@ cpu_init (void)
+@@ -1051,6 +1053,8 @@
}
platform_cpu_init();
pm_idle = default_idle;
}
void __init
-diff -purN linux-2.6.27/arch/ia64/kernel/smp.c linux-2.6.27.19-5.1/arch/ia64/kernel/smp.c
---- linux-2.6.27/arch/ia64/kernel/smp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/smp.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/smp.c
+--- a/arch/ia64/kernel/smp.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/smp.c Wed May 06 16:56:01 2009 +0100
@@ -36,6 +36,11 @@
#include <asm/current.h>
#include <asm/delay.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/page.h>
-@@ -64,6 +69,9 @@ static DEFINE_PER_CPU(unsigned short, sh
+@@ -64,6 +69,9 @@
#define IPI_CPU_STOP 1
#define IPI_CALL_FUNC_SINGLE 2
#define IPI_KDUMP_CPU_STOP 3
/* This needs to be cacheline aligned because it is written to by *other* CPUs. */
static DEFINE_PER_CPU_SHARED_ALIGNED(u64, ipi_operation);
-@@ -124,6 +132,12 @@ handle_IPI (int irq, void *dev_id)
+@@ -122,6 +130,12 @@
+ #ifdef CONFIG_KEXEC
+ case IPI_KDUMP_CPU_STOP:
unw_init_running(kdump_cpu_freeze, NULL);
- break;
- #endif
++ break;
++#endif
+#ifdef CONFIG_KDB
+ case IPI_KDB_INTERRUPT:
+ if (!kdb_ipi(get_irq_regs(), NULL))
+ printk(KERN_ERR "kdb_ipi() rejected IPI_KDB_INTERRUPT\n");
-+ break;
-+#endif
+ break;
+ #endif
default:
- printk(KERN_CRIT "Unknown IPI on CPU %d: %lu\n",
- this_cpu, which);
-@@ -335,3 +349,12 @@ setup_profiling_timer (unsigned int mult
+@@ -335,3 +349,12 @@
{
return -EINVAL;
}
+ send_IPI_allbutself(IPI_KDB_INTERRUPT);
+}
+#endif /* CONFIG_KDB */
-diff -purN linux-2.6.27/arch/ia64/kernel/smpboot.c linux-2.6.27.19-5.1/arch/ia64/kernel/smpboot.c
---- linux-2.6.27/arch/ia64/kernel/smpboot.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/smpboot.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/smpboot.c
+--- a/arch/ia64/kernel/smpboot.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/smpboot.c Wed May 06 16:56:02 2009 +0100
@@ -39,6 +39,7 @@
#include <linux/efi.h>
#include <linux/percpu.h>
#include <asm/atomic.h>
#include <asm/cache.h>
-@@ -381,10 +382,6 @@ smp_callin (void)
+@@ -381,10 +382,6 @@
extern void ia64_init_itm(void);
extern volatile int time_keeper_id;
cpuid = smp_processor_id();
phys_id = hard_smp_processor_id();
itc_master = time_keeper_id;
-@@ -410,10 +407,6 @@ smp_callin (void)
+@@ -409,10 +406,6 @@
+ smp_setup_percpu_timer();
ia64_mca_cmc_vector_setup(); /* Setup vector on AP */
-
+-
-#ifdef CONFIG_PERFMON
- pfm_init_percpu();
-#endif
--
+
local_irq_enable();
- if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)) {
-@@ -741,16 +734,15 @@ int __cpu_disable(void)
+@@ -741,16 +734,15 @@
return -EBUSY;
}
+ return -EBUSY;
remove_siblinginfo(cpu);
-- fixup_irqs();
- cpu_clear(cpu, cpu_online_map);
-+ fixup_irqs();
++ cpu_clear(cpu, cpu_online_map);
+ fixup_irqs();
+- cpu_clear(cpu, cpu_online_map);
local_flush_tlb_all();
cpu_clear(cpu, cpu_callin_map);
+ pfm_cpu_disable();
return 0;
}
-diff -purN linux-2.6.27/arch/ia64/kernel/sys_ia64.c linux-2.6.27.19-5.1/arch/ia64/kernel/sys_ia64.c
---- linux-2.6.27/arch/ia64/kernel/sys_ia64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/sys_ia64.c 2009-03-25 16:10:50.000000000 +0000
-@@ -59,6 +59,8 @@ arch_get_unmapped_area (struct file *fil
+diff -r 9608d5473017 arch/ia64/kernel/sys_ia64.c
+--- a/arch/ia64/kernel/sys_ia64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/sys_ia64.c Wed May 06 16:56:02 2009 +0100
+@@ -59,6 +59,8 @@
start_addr = addr = (addr + align_mask) & ~align_mask;
for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
/* At this point: (!vma || addr < vma->vm_end). */
if (TASK_SIZE - len < addr || RGN_MAP_LIMIT - len < REGION_OFFSET(addr)) {
if (start_addr != TASK_UNMAPPED_BASE) {
-@@ -68,7 +70,14 @@ arch_get_unmapped_area (struct file *fil
+@@ -68,7 +70,14 @@
}
return -ENOMEM;
}
/* Remember the address where we stopped this search: */
mm->free_area_cache = addr + len;
return addr;
-@@ -154,7 +163,7 @@ out:
+@@ -154,7 +163,7 @@
* and r9) as this is faster than doing a copy_to_user().
*/
asmlinkage long
{
struct pt_regs *regs = task_pt_regs(current);
int fd[2];
-@@ -284,3 +293,11 @@ sys_pciconfig_write (unsigned long bus,
+@@ -284,3 +293,11 @@
}
#endif /* CONFIG_PCI */
+ return -ENOSYS;
+}
+#endif
-diff -purN linux-2.6.27/arch/ia64/kernel/traps.c linux-2.6.27.19-5.1/arch/ia64/kernel/traps.c
---- linux-2.6.27/arch/ia64/kernel/traps.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/traps.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/traps.c
+--- a/arch/ia64/kernel/traps.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/traps.c Wed May 06 16:56:02 2009 +0100
@@ -13,6 +13,9 @@
#include <linux/tty.h>
#include <linux/vt_kern.h> /* For unblank_screen() */
#include <linux/hardirq.h>
#include <linux/kprobes.h>
#include <linux/delay.h> /* for ssleep() */
-@@ -78,6 +81,10 @@ die (const char *str, struct pt_regs *re
+@@ -77,6 +80,10 @@
+
if (!regs)
return 1;
-
++
+#ifdef CONFIG_KDB
+ (void)kdb(KDB_REASON_OOPS, err, regs);
+#endif /* CONFIG_KDB */
-+
+
if (panic_on_oops)
panic("Fatal exception");
-
-@@ -171,6 +178,17 @@ __kprobes ia64_bad_break (unsigned long
+@@ -171,6 +178,17 @@
if (break_num < 0x80000) {
sig = SIGILL; code = __ILL_BREAK;
} else {
if (notify_die(DIE_BREAK, "bad break", regs, break_num, TRAP_BRKPT, SIGTRAP)
== NOTIFY_STOP)
return;
-@@ -565,6 +583,10 @@ ia64_fault (unsigned long vector, unsign
+@@ -565,6 +583,10 @@
if (notify_die(DIE_FAULT, "ia64_fault", ®s, vector, siginfo.si_code, SIGTRAP)
== NOTIFY_STOP)
return;
siginfo.si_signo = SIGTRAP;
siginfo.si_errno = 0;
siginfo.si_addr = (void __user *) ifa;
-diff -purN linux-2.6.27/arch/ia64/kernel/unwind.c linux-2.6.27.19-5.1/arch/ia64/kernel/unwind.c
---- linux-2.6.27/arch/ia64/kernel/unwind.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/unwind.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/unwind.c
+--- a/arch/ia64/kernel/unwind.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/unwind.c Wed May 06 16:56:02 2009 +0100
@@ -57,14 +57,27 @@
#ifdef UNW_DEBUG
typedef unsigned long unw_word;
typedef unsigned char unw_hash_index_t;
-@@ -2092,7 +2105,7 @@ unw_add_unwind_table (const char *name,
+@@ -2092,7 +2105,7 @@
return NULL;
}
if (!table)
return NULL;
-@@ -2165,7 +2178,7 @@ unw_remove_unwind_table (void *handle)
+@@ -2165,7 +2178,7 @@
write_unlock(&tmp->lock);
}
}
static int __init
-@@ -2199,7 +2212,7 @@ create_gate_table (void)
+@@ -2199,7 +2212,7 @@
size += 3*8 + 8 + 8*UNW_LENGTH(*(u64 *) (segbase + entry->info_offset));
size += 8; /* reserve space for "end of table" marker */
if (!unw.gate_table) {
unw.gate_table_size = 0;
printk(KERN_ERR "%s: unable to create unwind data for gate page!\n", __func__);
-diff -purN linux-2.6.27/arch/ia64/kvm/Kconfig linux-2.6.27.19-5.1/arch/ia64/kvm/Kconfig
---- linux-2.6.27/arch/ia64/kvm/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kvm/Kconfig 2009-03-25 16:10:50.000000000 +0000
-@@ -17,6 +17,19 @@ menuconfig VIRTUALIZATION
+diff -r 9608d5473017 arch/ia64/kvm/Kconfig
+--- a/arch/ia64/kvm/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kvm/Kconfig Wed May 06 16:56:02 2009 +0100
+@@ -16,6 +16,19 @@
+ If you say N, all options in this submenu will be skipped and disabled.
if VIRTUALIZATION
-
++
+config KVM_KMP
+ bool "Build Kernel-based Virtual Machine (KVM) as KMP"
+ depends on HAVE_KVM
+ itself.
+
+ Say Y here.
-+
+
config KVM
tristate "Kernel-based Virtual Machine (KVM) support"
- depends on HAVE_KVM && EXPERIMENTAL
-diff -purN linux-2.6.27/arch/ia64/kvm/vti.h linux-2.6.27.19-5.1/arch/ia64/kvm/vti.h
---- linux-2.6.27/arch/ia64/kvm/vti.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kvm/vti.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kvm/vti.h
+--- a/arch/ia64/kvm/vti.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kvm/vti.h Wed May 06 16:56:02 2009 +0100
@@ -83,13 +83,13 @@
union vac {
unsigned long value;
long reserved:57;
};
};
-@@ -97,12 +97,12 @@ union vac {
+@@ -97,12 +97,12 @@
union vdc {
unsigned long value;
struct {
long reserved:58;
};
};
-diff -purN linux-2.6.27/arch/ia64/lib/Makefile linux-2.6.27.19-5.1/arch/ia64/lib/Makefile
---- linux-2.6.27/arch/ia64/lib/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/lib/Makefile 2009-03-25 16:10:50.000000000 +0000
-@@ -13,7 +13,6 @@ lib-y := __divsi3.o __udivsi3.o __modsi3
+diff -r 9608d5473017 arch/ia64/lib/Makefile
+--- a/arch/ia64/lib/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/lib/Makefile Wed May 06 16:56:02 2009 +0100
+@@ -13,7 +13,6 @@
obj-$(CONFIG_ITANIUM) += copy_page.o copy_user.o memcpy.o
obj-$(CONFIG_MCKINLEY) += copy_page_mck.o memcpy_mck.o
AFLAGS___divdi3.o =
AFLAGS___udivdi3.o = -DUNSIGNED
-diff -purN linux-2.6.27/arch/ia64/mm/discontig.c linux-2.6.27.19-5.1/arch/ia64/mm/discontig.c
---- linux-2.6.27/arch/ia64/mm/discontig.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/mm/discontig.c 2009-03-25 16:10:50.000000000 +0000
-@@ -635,7 +635,6 @@ static __init int count_node_pages(unsig
+diff -r 9608d5473017 arch/ia64/mm/discontig.c
+--- a/arch/ia64/mm/discontig.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/mm/discontig.c Wed May 06 16:56:02 2009 +0100
+@@ -635,7 +635,6 @@
(min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT;
#endif
start = GRANULEROUNDDOWN(start);
end = GRANULEROUNDUP(end);
mem_data[node].max_pfn = max(mem_data[node].max_pfn,
end >> PAGE_SHIFT);
-diff -purN linux-2.6.27/arch/ia64/oprofile/init.c linux-2.6.27.19-5.1/arch/ia64/oprofile/init.c
---- linux-2.6.27/arch/ia64/oprofile/init.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/oprofile/init.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/oprofile/init.c
+--- a/arch/ia64/oprofile/init.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/oprofile/init.c Wed May 06 16:56:02 2009 +0100
@@ -12,8 +12,8 @@
#include <linux/init.h>
#include <linux/errno.h>
extern void ia64_backtrace(struct pt_regs * const regs, unsigned int depth);
int __init oprofile_arch_init(struct oprofile_operations * ops)
-@@ -22,7 +22,7 @@ int __init oprofile_arch_init(struct opr
+@@ -22,7 +22,7 @@
#ifdef CONFIG_PERFMON
/* perfmon_init() can fail, but we have no way to report it */
#endif
ops->backtrace = ia64_backtrace;
-@@ -33,6 +33,6 @@ int __init oprofile_arch_init(struct opr
+@@ -33,6 +33,6 @@
void oprofile_arch_exit(void)
{
#ifdef CONFIG_PERFMON
+ op_perfmon_exit();
#endif
}
-diff -purN linux-2.6.27/arch/ia64/oprofile/perfmon.c linux-2.6.27.19-5.1/arch/ia64/oprofile/perfmon.c
---- linux-2.6.27/arch/ia64/oprofile/perfmon.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/oprofile/perfmon.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/oprofile/perfmon.c
+--- a/arch/ia64/oprofile/perfmon.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/oprofile/perfmon.c Wed May 06 16:56:02 2009 +0100
@@ -10,25 +10,30 @@
#include <linux/kernel.h>
#include <linux/oprofile.h>
return 0;
}
-@@ -45,17 +50,13 @@ static void perfmon_stop(void)
+@@ -45,16 +50,12 @@
allow_ints = 0;
}
+ .fmt_flags = PFM_FMT_BUILTIN_FLAG,
+ .owner = THIS_MODULE
};
-
-
+
static char * get_cpu_type(void)
{
- __u8 family = local_cpu_data->family;
-@@ -75,9 +76,9 @@ static char * get_cpu_type(void)
+@@ -75,9 +76,9 @@
static int using_perfmon;
if (ret)
return -ENODEV;
-@@ -90,10 +91,10 @@ int perfmon_init(struct oprofile_operati
+@@ -90,10 +91,10 @@
}
- pfm_unregister_buffer_fmt(oprofile_fmt.fmt_uuid);
+ pfm_fmt_unregister(&oprofile_fmt);
}
-diff -purN linux-2.6.27/arch/ia64/perfmon/Kconfig linux-2.6.27.19-5.1/arch/ia64/perfmon/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/Kconfig 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/Kconfig Wed May 06 16:56:02 2009 +0100
@@ -0,0 +1,67 @@
+menu "Hardware Performance Monitoring support"
+config PERFMON
+ help
+ Enables support for Itanium 2 9000 (Montecito) PMU.
+endmenu
-diff -purN linux-2.6.27/arch/ia64/perfmon/Makefile linux-2.6.27.19-5.1/arch/ia64/perfmon/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/Makefile 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/Makefile Wed May 06 16:56:02 2009 +0100
@@ -0,0 +1,11 @@
+#
+# Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
+obj-$(CONFIG_IA64_PERFMON_ITANIUM) += perfmon_itanium.o
+obj-$(CONFIG_IA64_PERFMON_MCKINLEY) += perfmon_mckinley.o
+obj-$(CONFIG_IA64_PERFMON_MONTECITO) += perfmon_montecito.o
-diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon.c linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/perfmon.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/perfmon.c Wed May 06 16:56:02 2009 +0100
@@ -0,0 +1,946 @@
+/*
+ * This file implements the IA-64 specific
+
+ return 0;
+}
-diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_compat.c linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_compat.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_compat.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/perfmon_compat.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/perfmon_compat.c Wed May 06 16:56:02 2009 +0100
@@ -0,0 +1,1210 @@
+/*
+ * This file implements the IA-64 specific
+ perfmon_proc->proc_fops = &pfm_proc_fops;
+ return 0;
+}
-diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_default_smpl.c linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_default_smpl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_default_smpl.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/perfmon_default_smpl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/perfmon_default_smpl.c Wed May 06 16:56:02 2009 +0100
@@ -0,0 +1,273 @@
+/*
+ * Copyright (c) 2002-2006 Hewlett-Packard Development Company, L.P.
+
+module_init(pfm_default_fmt_init_module);
+module_exit(pfm_default_fmt_cleanup_module);
-diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_generic.c linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_generic.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_generic.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/perfmon_generic.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/perfmon_generic.c Wed May 06 16:56:02 2009 +0100
@@ -0,0 +1,148 @@
+/*
+ * This file contains the generic PMU register description tables
+
+module_init(pfm_gen_pmu_init_module);
+module_exit(pfm_gen_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_itanium.c linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_itanium.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_itanium.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/perfmon_itanium.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/perfmon_itanium.c Wed May 06 16:56:02 2009 +0100
@@ -0,0 +1,232 @@
+/*
+ * This file contains the Itanium PMU register description tables
+module_init(pfm_ita_pmu_init_module);
+module_exit(pfm_ita_pmu_cleanup_module);
+
-diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_mckinley.c linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_mckinley.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_mckinley.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/perfmon_mckinley.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/perfmon_mckinley.c Wed May 06 16:56:02 2009 +0100
@@ -0,0 +1,290 @@
+/*
+ * This file contains the McKinley PMU register description tables
+
+module_init(pfm_mck_pmu_init_module);
+module_exit(pfm_mck_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_montecito.c linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_montecito.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_montecito.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/perfmon_montecito.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/perfmon_montecito.c Wed May 06 16:56:02 2009 +0100
@@ -0,0 +1,412 @@
+/*
+ * This file contains the McKinley PMU register description tables
+
+module_init(pfm_mont_pmu_init_module);
+module_exit(pfm_mont_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/ia64/sn/kernel/bte.c linux-2.6.27.19-5.1/arch/ia64/sn/kernel/bte.c
---- linux-2.6.27/arch/ia64/sn/kernel/bte.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/sn/kernel/bte.c 2009-03-25 16:10:51.000000000 +0000
-@@ -97,9 +97,10 @@ bte_result_t bte_copy(u64 src, u64 dest,
+diff -r 9608d5473017 arch/ia64/sn/kernel/bte.c
+--- a/arch/ia64/sn/kernel/bte.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/sn/kernel/bte.c Wed May 06 16:56:02 2009 +0100
+@@ -97,9 +97,10 @@
return BTE_SUCCESS;
}
/*
* Start with interface corresponding to cpu number
-diff -purN linux-2.6.27/arch/ia64/sn/kernel/io_acpi_init.c linux-2.6.27.19-5.1/arch/ia64/sn/kernel/io_acpi_init.c
---- linux-2.6.27/arch/ia64/sn/kernel/io_acpi_init.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/sn/kernel/io_acpi_init.c 2009-03-25 16:10:51.000000000 +0000
-@@ -232,7 +232,7 @@ exit:
+diff -r 9608d5473017 arch/ia64/sn/kernel/io_acpi_init.c
+--- a/arch/ia64/sn/kernel/io_acpi_init.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/sn/kernel/io_acpi_init.c Wed May 06 16:56:02 2009 +0100
+@@ -232,7 +232,7 @@
static unsigned int
get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
{
acpi_handle child;
unsigned int devfn;
int function;
-@@ -292,8 +292,8 @@ get_host_devfn(acpi_handle device_handle
+@@ -292,8 +292,8 @@
static acpi_status
find_matching_device(acpi_handle handle, u32 lvl, void *context, void **rv)
{
acpi_handle parent = NULL;
acpi_status status;
unsigned int devfn;
-@@ -348,7 +348,7 @@ sn_acpi_get_pcidev_info(struct pci_dev *
+@@ -348,7 +348,7 @@
unsigned int host_devfn;
struct sn_pcidev_match pcidev_match;
acpi_handle rootbus_handle;
acpi_status status;
rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle;
-@@ -434,7 +434,7 @@ sn_acpi_slot_fixup(struct pci_dev *dev)
+@@ -434,7 +434,7 @@
size = pci_resource_len(dev, PCI_ROM_RESOURCE);
addr = ioremap(pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE],
size);
dev->resource[PCI_ROM_RESOURCE].start = (unsigned long) addr;
dev->resource[PCI_ROM_RESOURCE].end =
(unsigned long) addr + image_size - 1;
-diff -purN linux-2.6.27/arch/ia64/sn/kernel/io_init.c linux-2.6.27.19-5.1/arch/ia64/sn/kernel/io_init.c
---- linux-2.6.27/arch/ia64/sn/kernel/io_init.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/sn/kernel/io_init.c 2009-03-25 16:10:51.000000000 +0000
-@@ -269,7 +269,7 @@ sn_io_slot_fixup(struct pci_dev *dev)
+diff -r 9608d5473017 arch/ia64/sn/kernel/io_init.c
+--- a/arch/ia64/sn/kernel/io_init.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/sn/kernel/io_init.c Wed May 06 16:56:02 2009 +0100
+@@ -269,7 +269,7 @@
rom = ioremap(pci_resource_start(dev, PCI_ROM_RESOURCE),
size + 1);
dev->resource[PCI_ROM_RESOURCE].end =
dev->resource[PCI_ROM_RESOURCE].start +
image_size - 1;
-diff -purN linux-2.6.27/arch/ia64/sn/kernel/irq.c linux-2.6.27.19-5.1/arch/ia64/sn/kernel/irq.c
---- linux-2.6.27/arch/ia64/sn/kernel/irq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/sn/kernel/irq.c 2009-03-25 16:10:51.000000000 +0000
-@@ -391,6 +391,11 @@ void sn_irq_fixup(struct pci_dev *pci_de
+diff -r 9608d5473017 arch/ia64/sn/kernel/irq.c
+--- a/arch/ia64/sn/kernel/irq.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/sn/kernel/irq.c Wed May 06 16:56:02 2009 +0100
+@@ -391,6 +391,11 @@
#ifdef CONFIG_SMP
cpuphys = cpu_physical_id(cpu);
set_irq_affinity_info(sn_irq_info->irq_irq, cpuphys, 0);
#endif
}
-diff -purN linux-2.6.27/arch/ia64/sn/pci/pcibr/pcibr_dma.c linux-2.6.27.19-5.1/arch/ia64/sn/pci/pcibr/pcibr_dma.c
---- linux-2.6.27/arch/ia64/sn/pci/pcibr/pcibr_dma.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/sn/pci/pcibr/pcibr_dma.c 2009-03-25 16:10:51.000000000 +0000
-@@ -135,11 +135,10 @@ pcibr_dmatrans_direct64(struct pcidev_in
+diff -r 9608d5473017 arch/ia64/sn/pci/pcibr/pcibr_dma.c
+--- a/arch/ia64/sn/pci/pcibr/pcibr_dma.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/sn/pci/pcibr/pcibr_dma.c Wed May 06 16:56:02 2009 +0100
+@@ -135,11 +135,10 @@
if (SN_DMA_ADDRTYPE(dma_flags) == SN_DMA_ADDR_PHYS)
pci_addr = IS_PIC_SOFT(pcibus_info) ?
PHYS_TO_DMA(paddr) :
/* Handle Bus mode */
if (IS_PCIX(pcibus_info))
-diff -purN linux-2.6.27/arch/ia64/uv/kernel/setup.c linux-2.6.27.19-5.1/arch/ia64/uv/kernel/setup.c
---- linux-2.6.27/arch/ia64/uv/kernel/setup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/uv/kernel/setup.c 2009-03-25 16:10:51.000000000 +0000
-@@ -19,6 +19,12 @@ EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info)
+diff -r 9608d5473017 arch/ia64/uv/kernel/setup.c
+--- a/arch/ia64/uv/kernel/setup.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/uv/kernel/setup.c Wed May 06 16:56:02 2009 +0100
+@@ -19,6 +19,12 @@
#ifdef CONFIG_IA64_SGI_UV
int sn_prom_type;
#endif
struct redir_addr {
-diff -purN linux-2.6.27/arch/m32r/Kconfig linux-2.6.27.19-5.1/arch/m32r/Kconfig
---- linux-2.6.27/arch/m32r/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/m32r/Kconfig 2009-03-25 16:10:43.000000000 +0000
-@@ -45,6 +45,8 @@ config HZ
+diff -r 9608d5473017 arch/m32r/Kconfig
+--- a/arch/m32r/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/m32r/Kconfig Wed May 06 16:56:02 2009 +0100
+@@ -44,6 +44,8 @@
+ default 100
source "init/Kconfig"
-
-+source "kernel/Kconfig.freezer"
+
++source "kernel/Kconfig.freezer"
- menu "Processor type and features"
-diff -purN linux-2.6.27/arch/m68k/Kconfig linux-2.6.27.19-5.1/arch/m68k/Kconfig
---- linux-2.6.27/arch/m68k/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/m68k/Kconfig 2009-03-25 16:10:44.000000000 +0000
-@@ -64,6 +64,8 @@ mainmenu "Linux/68k Kernel Configuration
+ menu "Processor type and features"
+diff -r 9608d5473017 arch/m68k/Kconfig
+--- a/arch/m68k/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/m68k/Kconfig Wed May 06 16:56:02 2009 +0100
+@@ -63,6 +63,8 @@
+ mainmenu "Linux/68k Kernel Configuration"
source "init/Kconfig"
-
-+source "kernel/Kconfig.freezer"
+
++source "kernel/Kconfig.freezer"
+
menu "Platform dependent setup"
- config EISA
-diff -purN linux-2.6.27/arch/m68k/kernel/entry.S linux-2.6.27.19-5.1/arch/m68k/kernel/entry.S
---- linux-2.6.27/arch/m68k/kernel/entry.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/m68k/kernel/entry.S 2009-03-25 16:10:44.000000000 +0000
-@@ -513,7 +513,7 @@ sys_call_table:
+diff -r 9608d5473017 arch/m68k/kernel/entry.S
+--- a/arch/m68k/kernel/entry.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/m68k/kernel/entry.S Wed May 06 16:56:02 2009 +0100
+@@ -513,7 +513,7 @@
.long sys_uselib
.long sys_swapon
.long sys_reboot
.long old_mmap /* 90 */
.long sys_munmap
.long sys_truncate
-diff -purN linux-2.6.27/arch/m68k/kernel/ints.c linux-2.6.27.19-5.1/arch/m68k/kernel/ints.c
---- linux-2.6.27/arch/m68k/kernel/ints.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/m68k/kernel/ints.c 2009-03-25 16:10:44.000000000 +0000
-@@ -133,7 +133,7 @@ void __init m68k_setup_user_interrupt(un
+diff -r 9608d5473017 arch/m68k/kernel/ints.c
+--- a/arch/m68k/kernel/ints.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/m68k/kernel/ints.c Wed May 06 16:56:02 2009 +0100
+@@ -133,7 +133,7 @@
{
int i;
m68k_first_user_vec = vec;
for (i = 0; i < cnt; i++)
irq_controller[IRQ_USER + i] = &user_irq_controller;
-diff -purN linux-2.6.27/arch/m68knommu/Kconfig linux-2.6.27.19-5.1/arch/m68knommu/Kconfig
---- linux-2.6.27/arch/m68knommu/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/m68knommu/Kconfig 2009-03-25 16:10:54.000000000 +0000
-@@ -14,6 +14,10 @@ config MMU
+diff -r 9608d5473017 arch/m68knommu/Kconfig
+--- a/arch/m68knommu/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/m68knommu/Kconfig Wed May 06 16:56:02 2009 +0100
+@@ -13,6 +13,10 @@
+ config MMU
bool
default n
-
++
+config NO_DMA
+ bool
+ default y
-+
+
config FPU
bool
- default n
-@@ -78,6 +82,8 @@ config ARCH_SUPPORTS_AOUT
+@@ -77,6 +81,8 @@
+ def_bool y
source "init/Kconfig"
-
-+source "kernel/Kconfig.freezer"
+
++source "kernel/Kconfig.freezer"
+
menu "Processor type and features"
- choice
-diff -purN linux-2.6.27/arch/m68knommu/include/asm/thread_info.h linux-2.6.27.19-5.1/arch/m68knommu/include/asm/thread_info.h
---- linux-2.6.27/arch/m68knommu/include/asm/thread_info.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/m68knommu/include/asm/thread_info.h 2009-03-25 16:10:54.000000000 +0000
-@@ -84,12 +84,14 @@ static inline struct thread_info *curren
+diff -r 9608d5473017 arch/m68knommu/include/asm/thread_info.h
+--- a/arch/m68knommu/include/asm/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/m68knommu/include/asm/thread_info.h Wed May 06 16:56:02 2009 +0100
+@@ -84,12 +84,14 @@
#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling
TIF_NEED_RESCHED */
#define TIF_MEMDIE 4
#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
-diff -purN linux-2.6.27/arch/m68knommu/kernel/syscalltable.S linux-2.6.27.19-5.1/arch/m68knommu/kernel/syscalltable.S
---- linux-2.6.27/arch/m68knommu/kernel/syscalltable.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/m68knommu/kernel/syscalltable.S 2009-03-25 16:10:54.000000000 +0000
-@@ -107,7 +107,7 @@ ENTRY(sys_call_table)
+diff -r 9608d5473017 arch/m68knommu/kernel/syscalltable.S
+--- a/arch/m68knommu/kernel/syscalltable.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/m68knommu/kernel/syscalltable.S Wed May 06 16:56:02 2009 +0100
+@@ -107,7 +107,7 @@
.long sys_uselib
.long sys_ni_syscall /* sys_swapon */
.long sys_reboot
.long old_mmap /* 90 */
.long sys_munmap
.long sys_truncate
-diff -purN linux-2.6.27/arch/mips/Kconfig linux-2.6.27.19-5.1/arch/mips/Kconfig
---- linux-2.6.27/arch/mips/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/Kconfig 2009-03-25 16:10:45.000000000 +0000
-@@ -1857,6 +1857,8 @@ config SECCOMP
+diff -r 9608d5473017 arch/mips/Kconfig
+--- a/arch/mips/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/Kconfig Wed May 06 16:56:03 2009 +0100
+@@ -1857,6 +1857,8 @@
If unsure, say Y. Only embedded should say N here.
endmenu
config RWSEM_GENERIC_SPINLOCK
-@@ -1882,6 +1884,8 @@ config PROBE_INITRD_HEADER
+@@ -1881,6 +1883,8 @@
+ Say Y here if you are using arch/mips/boot/addinitrd.c to
add initrd or initramfs image to the kernel image.
Otherwise, say N.
-
-+source "kernel/Kconfig.freezer"
+
++source "kernel/Kconfig.freezer"
+
menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)"
- config HW_HAS_EISA
-diff -purN linux-2.6.27/arch/mips/Makefile linux-2.6.27.19-5.1/arch/mips/Makefile
---- linux-2.6.27/arch/mips/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/Makefile 2009-03-25 16:10:45.000000000 +0000
-@@ -154,6 +154,12 @@ endif
+diff -r 9608d5473017 arch/mips/Makefile
+--- a/arch/mips/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/Makefile Wed May 06 16:56:03 2009 +0100
+@@ -152,6 +152,12 @@
+ MODFLAGS += -msb1-pass1-workarounds
endif
-
- #
+ endif
++
++#
+# Perfmon support
+#
+
+core-$(CONFIG_PERFMON) += arch/mips/perfmon/
-+
-+#
- # Firmware support
+
#
- libs-$(CONFIG_ARC) += arch/mips/fw/arc/
-diff -purN linux-2.6.27/arch/mips/kernel/process.c linux-2.6.27.19-5.1/arch/mips/kernel/process.c
---- linux-2.6.27/arch/mips/kernel/process.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/kernel/process.c 2009-03-25 16:10:45.000000000 +0000
+ # Firmware support
+diff -r 9608d5473017 arch/mips/kernel/process.c
+--- a/arch/mips/kernel/process.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/kernel/process.c Wed May 06 16:56:03 2009 +0100
@@ -27,6 +27,7 @@
#include <linux/completion.h>
#include <linux/kallsyms.h>
#include <asm/asm.h>
#include <asm/bootinfo.h>
-@@ -94,6 +95,7 @@ void start_thread(struct pt_regs * regs,
+@@ -94,6 +95,7 @@
void exit_thread(void)
{
}
void flush_thread(void)
-@@ -162,6 +164,8 @@ int copy_thread(int nr, unsigned long cl
+@@ -161,6 +163,8 @@
+
if (clone_flags & CLONE_SETTLS)
ti->tp_value = regs->regs[7];
-
-+ pfm_copy_thread(p);
+
++ pfm_copy_thread(p);
+
return 0;
}
-
-diff -purN linux-2.6.27/arch/mips/kernel/scall32-o32.S linux-2.6.27.19-5.1/arch/mips/kernel/scall32-o32.S
---- linux-2.6.27/arch/mips/kernel/scall32-o32.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/kernel/scall32-o32.S 2009-03-25 16:10:45.000000000 +0000
-@@ -401,7 +401,7 @@ einval: li v0, -EINVAL
+diff -r 9608d5473017 arch/mips/kernel/scall32-o32.S
+--- a/arch/mips/kernel/scall32-o32.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/kernel/scall32-o32.S Wed May 06 16:56:03 2009 +0100
+@@ -401,7 +401,7 @@
sys sys_uselib 1
sys sys_swapon 2
sys sys_reboot 3
sys old_mmap 6 /* 4090 */
sys sys_munmap 2
sys sys_truncate 2
-diff -purN linux-2.6.27/arch/mips/kernel/signal.c linux-2.6.27.19-5.1/arch/mips/kernel/signal.c
---- linux-2.6.27/arch/mips/kernel/signal.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/kernel/signal.c 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/mips/kernel/signal.c
+--- a/arch/mips/kernel/signal.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/kernel/signal.c Wed May 06 16:56:03 2009 +0100
@@ -20,6 +20,7 @@
#include <linux/unistd.h>
#include <linux/compiler.h>
#include <asm/abi.h>
#include <asm/asm.h>
-@@ -694,8 +695,11 @@ static void do_signal(struct pt_regs *re
+@@ -694,8 +695,11 @@
* - triggered by the TIF_WORK_MASK flags
*/
asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused,
/* deal with pending signal delivery */
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
do_signal(regs);
-diff -purN linux-2.6.27/arch/mips/kernel/time.c linux-2.6.27.19-5.1/arch/mips/kernel/time.c
---- linux-2.6.27/arch/mips/kernel/time.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/kernel/time.c 2009-03-25 16:10:45.000000000 +0000
-@@ -49,10 +49,11 @@ int update_persistent_clock(struct times
+diff -r 9608d5473017 arch/mips/kernel/time.c
+--- a/arch/mips/kernel/time.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/kernel/time.c Wed May 06 16:56:03 2009 +0100
+@@ -49,10 +49,11 @@
return rtc_mips_set_mmss(now.tv_sec);
}
int (*perf_irq)(void) = null_perf_irq;
-diff -purN linux-2.6.27/arch/mips/kernel/traps.c linux-2.6.27.19-5.1/arch/mips/kernel/traps.c
---- linux-2.6.27/arch/mips/kernel/traps.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/kernel/traps.c 2009-03-25 16:10:45.000000000 +0000
-@@ -92,17 +92,15 @@ static void show_raw_backtrace(unsigned
+diff -r 9608d5473017 arch/mips/kernel/traps.c
+--- a/arch/mips/kernel/traps.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/kernel/traps.c Wed May 06 16:56:03 2009 +0100
+@@ -92,17 +92,15 @@
#ifdef CONFIG_KALLSYMS
printk("\n");
#endif
}
#ifdef CONFIG_KALLSYMS
-diff -purN linux-2.6.27/arch/mips/mti-malta/malta-time.c linux-2.6.27.19-5.1/arch/mips/mti-malta/malta-time.c
---- linux-2.6.27/arch/mips/mti-malta/malta-time.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/mti-malta/malta-time.c 2009-03-25 16:10:46.000000000 +0000
+diff -r 9608d5473017 arch/mips/mti-malta/malta-time.c
+--- a/arch/mips/mti-malta/malta-time.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/mti-malta/malta-time.c Wed May 06 16:56:03 2009 +0100
@@ -27,6 +27,7 @@
#include <linux/time.h>
#include <linux/timex.h>
#include <asm/mipsregs.h>
#include <asm/mipsmtregs.h>
-diff -purN linux-2.6.27/arch/mips/perfmon/Kconfig linux-2.6.27.19-5.1/arch/mips/perfmon/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/perfmon/Kconfig 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/mips/perfmon/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/mips/perfmon/Kconfig Wed May 06 16:56:03 2009 +0100
@@ -0,0 +1,61 @@
+menu "Hardware Performance Monitoring support"
+config PERFMON
+ help
+ Enables support for the MIPS64 hardware performance counters"
+endmenu
-diff -purN linux-2.6.27/arch/mips/perfmon/Makefile linux-2.6.27.19-5.1/arch/mips/perfmon/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/perfmon/Makefile 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/mips/perfmon/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/mips/perfmon/Makefile Wed May 06 16:56:03 2009 +0100
@@ -0,0 +1,2 @@
+obj-$(CONFIG_PERFMON) += perfmon.o
+obj-$(CONFIG_PERFMON_MIPS64) += perfmon_mips64.o
-diff -purN linux-2.6.27/arch/mips/perfmon/perfmon.c linux-2.6.27.19-5.1/arch/mips/perfmon/perfmon.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/perfmon/perfmon.c 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/mips/perfmon/perfmon.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/mips/perfmon/perfmon.c Wed May 06 16:56:03 2009 +0100
@@ -0,0 +1,313 @@
+/*
+ * This file implements the MIPS64 specific
+ return 0;
+}
+EXPORT_SYMBOL(perfmon_perf_irq);
-diff -purN linux-2.6.27/arch/mips/perfmon/perfmon_mips64.c linux-2.6.27.19-5.1/arch/mips/perfmon/perfmon_mips64.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/perfmon/perfmon_mips64.c 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/mips/perfmon/perfmon_mips64.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/mips/perfmon/perfmon_mips64.c Wed May 06 16:56:03 2009 +0100
@@ -0,0 +1,218 @@
+/*
+ * This file contains the MIPS64 and decendent PMU register description tables
+
+module_init(pfm_mips64_pmu_init_module);
+module_exit(pfm_mips64_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/mn10300/Kconfig linux-2.6.27.19-5.1/arch/mn10300/Kconfig
---- linux-2.6.27/arch/mn10300/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mn10300/Kconfig 2009-03-25 16:10:52.000000000 +0000
-@@ -71,6 +71,8 @@ mainmenu "Matsushita MN10300/AM33 Kernel
+diff -r 9608d5473017 arch/mn10300/Kconfig
+--- a/arch/mn10300/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/mn10300/Kconfig Wed May 06 16:56:03 2009 +0100
+@@ -70,6 +70,8 @@
+ mainmenu "Matsushita MN10300/AM33 Kernel Configuration"
source "init/Kconfig"
-
-+source "kernel/Kconfig.freezer"
+
++source "kernel/Kconfig.freezer"
- menu "Matsushita MN10300 system setup"
-diff -purN linux-2.6.27/arch/mn10300/kernel/entry.S linux-2.6.27.19-5.1/arch/mn10300/kernel/entry.S
---- linux-2.6.27/arch/mn10300/kernel/entry.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mn10300/kernel/entry.S 2009-03-25 16:10:52.000000000 +0000
-@@ -477,7 +477,7 @@ ENTRY(sys_call_table)
+ menu "Matsushita MN10300 system setup"
+diff -r 9608d5473017 arch/mn10300/kernel/entry.S
+--- a/arch/mn10300/kernel/entry.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/mn10300/kernel/entry.S Wed May 06 16:56:03 2009 +0100
+@@ -477,7 +477,7 @@
.long sys_uselib
.long sys_swapon
.long sys_reboot
.long old_mmap /* 90 */
.long sys_munmap
.long sys_truncate
-diff -purN linux-2.6.27/arch/parisc/Kconfig linux-2.6.27.19-5.1/arch/parisc/Kconfig
---- linux-2.6.27/arch/parisc/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/parisc/Kconfig 2009-03-25 16:10:51.000000000 +0000
-@@ -93,6 +93,8 @@ config ARCH_MAY_HAVE_PC_FDC
+diff -r 9608d5473017 arch/parisc/Kconfig
+--- a/arch/parisc/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/parisc/Kconfig Wed May 06 16:56:03 2009 +0100
+@@ -92,6 +92,8 @@
+ default y
source "init/Kconfig"
-
-+source "kernel/Kconfig.freezer"
+
++source "kernel/Kconfig.freezer"
- menu "Processor type and features"
-diff -purN linux-2.6.27/arch/parisc/kernel/traps.c linux-2.6.27.19-5.1/arch/parisc/kernel/traps.c
---- linux-2.6.27/arch/parisc/kernel/traps.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/parisc/kernel/traps.c 2009-03-25 16:10:51.000000000 +0000
+ menu "Processor type and features"
+diff -r 9608d5473017 arch/parisc/kernel/traps.c
+--- a/arch/parisc/kernel/traps.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/parisc/kernel/traps.c Wed May 06 16:56:03 2009 +0100
@@ -24,7 +24,6 @@
#include <linux/init.h>
#include <linux/interrupt.h>
struct pt_regs *regs);
static int printbinary(char *buf, unsigned long x, int nbits)
-@@ -121,18 +120,19 @@ static void print_fr(char *level, struct
+@@ -121,18 +120,19 @@
void show_regs(struct pt_regs *regs)
{
print_fr(level, regs);
cr30 = mfctl(30);
-@@ -145,14 +145,18 @@ void show_regs(struct pt_regs *regs)
+@@ -145,14 +145,18 @@
printk("%s CPU: %8d CR30: " RFMT " CR31: " RFMT "\n",
level, current_thread_info()->cpu, cr30, cr31);
printk("%s ORIG_R28: " RFMT "\n", level, regs->orig_r28);
}
-@@ -173,20 +177,15 @@ static void do_show_stack(struct unwind_
+@@ -173,20 +177,15 @@
break;
if (__kernel_text_address(info->ip)) {
struct pt_regs *regs)
{
struct unwind_frame_info info;
-diff -purN linux-2.6.27/arch/powerpc/Kconfig linux-2.6.27.19-5.1/arch/powerpc/Kconfig
---- linux-2.6.27/arch/powerpc/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/Kconfig 2009-03-25 16:10:53.000000000 +0000
-@@ -122,6 +122,7 @@ config PPC
+diff -r 9608d5473017 arch/powerpc/Kconfig
+--- a/arch/powerpc/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/Kconfig Wed May 06 16:56:03 2009 +0100
+@@ -122,6 +122,7 @@
select HAVE_DMA_ATTRS if PPC64
select USE_GENERIC_SMP_HELPERS if SMP
select HAVE_OPROFILE
config EARLY_PRINTK
bool
-@@ -227,9 +228,13 @@ config PPC_OF_PLATFORM_PCI
+@@ -227,8 +228,12 @@
source "init/Kconfig"
+
source "arch/powerpc/sysdev/Kconfig"
source "arch/powerpc/platforms/Kconfig"
-
-+source "arch/powerpc/perfmon/Kconfig"
+
++source "arch/powerpc/perfmon/Kconfig"
+
menu "Kernel options"
- config HIGHMEM
-diff -purN linux-2.6.27/arch/powerpc/Makefile linux-2.6.27.19-5.1/arch/powerpc/Makefile
---- linux-2.6.27/arch/powerpc/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/Makefile 2009-03-25 16:10:54.000000000 +0000
-@@ -83,15 +83,17 @@ ifeq ($(GCC_BROKEN_VEC),y)
+diff -r 9608d5473017 arch/powerpc/Makefile
+--- a/arch/powerpc/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/Makefile Wed May 06 16:56:03 2009 +0100
+@@ -83,15 +83,17 @@
KBUILD_CFLAGS += $(call cc-option,-mcpu=970)
else
KBUILD_CFLAGS += $(call cc-option,-mcpu=power4)
endif
ifeq ($(CONFIG_TUNE_CELL),y)
-@@ -146,6 +148,7 @@ core-y += arch/powerpc/kernel/ \
+@@ -146,6 +148,7 @@
arch/powerpc/platforms/
core-$(CONFIG_MATH_EMULATION) += arch/powerpc/math-emu/
core-$(CONFIG_XMON) += arch/powerpc/xmon/
core-$(CONFIG_KVM) += arch/powerpc/kvm/
drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
-diff -purN linux-2.6.27/arch/powerpc/configs/linkstation_defconfig linux-2.6.27.19-5.1/arch/powerpc/configs/linkstation_defconfig
---- linux-2.6.27/arch/powerpc/configs/linkstation_defconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/configs/linkstation_defconfig 2009-03-25 16:10:52.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/configs/linkstation_defconfig
+--- a/arch/powerpc/configs/linkstation_defconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/configs/linkstation_defconfig Wed May 06 16:56:03 2009 +0100
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
#
# CONFIG_PPC64 is not set
-@@ -934,7 +934,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+@@ -934,7 +934,7 @@
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
-@@ -1211,7 +1211,6 @@ CONFIG_USB_STORAGE=m
+@@ -1211,7 +1211,6 @@
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
# CONFIG_USB_LIBUSUAL is not set
-diff -purN linux-2.6.27/arch/powerpc/include/asm/Kbuild linux-2.6.27.19-5.1/arch/powerpc/include/asm/Kbuild
---- linux-2.6.27/arch/powerpc/include/asm/Kbuild 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/Kbuild 2009-03-25 16:10:54.000000000 +0000
-@@ -21,6 +21,7 @@ header-y += resource.h
+diff -r 9608d5473017 arch/powerpc/include/asm/Kbuild
+--- a/arch/powerpc/include/asm/Kbuild Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/Kbuild Wed May 06 16:56:03 2009 +0100
+@@ -21,6 +21,7 @@
header-y += sigcontext.h
header-y += statfs.h
header-y += ps3fb.h
unifdef-y += bootx.h
unifdef-y += byteorder.h
-diff -purN linux-2.6.27/arch/powerpc/include/asm/cell-pmu.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/cell-pmu.h
---- linux-2.6.27/arch/powerpc/include/asm/cell-pmu.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/cell-pmu.h 2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/cell-pmu.h
+--- a/arch/powerpc/include/asm/cell-pmu.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/cell-pmu.h Wed May 06 16:56:03 2009 +0100
@@ -61,6 +61,11 @@
/* Macros for the pm_status register. */
enum pm_reg_name {
group_control,
-diff -purN linux-2.6.27/arch/powerpc/include/asm/cell-regs.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/cell-regs.h
---- linux-2.6.27/arch/powerpc/include/asm/cell-regs.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/cell-regs.h 2009-03-25 16:10:54.000000000 +0000
-@@ -117,8 +117,9 @@ struct cbe_pmd_regs {
+diff -r 9608d5473017 arch/powerpc/include/asm/cell-regs.h
+--- a/arch/powerpc/include/asm/cell-regs.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/cell-regs.h Wed May 06 16:56:03 2009 +0100
+@@ -117,8 +117,9 @@
u8 pad_0x0c1c_0x0c20 [4]; /* 0x0c1c */
#define CBE_PMD_FIR_MODE_M8 0x00800
u64 fir_enable_mask; /* 0x0c20 */
u64 ras_esc_0; /* 0x0ca8 */
u8 pad_0x0cb0_0x1000 [0x1000 - 0x0cb0]; /* 0x0cb0 */
};
-@@ -218,7 +219,11 @@ extern struct cbe_iic_regs __iomem *cbe_
+@@ -218,7 +219,11 @@
struct cbe_mic_tm_regs {
u64 mic_ctl_cnfg2; /* 0x0040 */
#define CBE_MIC_ENABLE_AUX_TRC 0x8000000000000000LL
-@@ -303,6 +308,25 @@ struct cbe_mic_tm_regs {
+@@ -303,6 +308,25 @@
extern struct cbe_mic_tm_regs __iomem *cbe_get_mic_tm_regs(struct device_node *np);
extern struct cbe_mic_tm_regs __iomem *cbe_get_cpu_mic_tm_regs(int cpu);
/* some utility functions to deal with SMT */
extern u32 cbe_get_hw_thread_id(int cpu);
extern u32 cbe_cpu_to_node(int cpu);
-diff -purN linux-2.6.27/arch/powerpc/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/ioctls.h
---- linux-2.6.27/arch/powerpc/include/asm/ioctls.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/ioctls.h 2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/ioctls.h
+--- a/arch/powerpc/include/asm/ioctls.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/ioctls.h Wed May 06 16:56:03 2009 +0100
@@ -91,6 +91,7 @@
#define TIOCGSID 0x5429 /* Return the session ID of FD */
#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define TIOCSERCONFIG 0x5453
#define TIOCSERGWILD 0x5454
-diff -purN linux-2.6.27/arch/powerpc/include/asm/lppaca.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/lppaca.h
---- linux-2.6.27/arch/powerpc/include/asm/lppaca.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/lppaca.h 2009-03-25 16:10:54.000000000 +0000
-@@ -133,7 +133,8 @@ struct lppaca {
+diff -r 9608d5473017 arch/powerpc/include/asm/lppaca.h
+--- a/arch/powerpc/include/asm/lppaca.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/lppaca.h Wed May 06 16:56:03 2009 +0100
+@@ -133,7 +133,8 @@
//=============================================================================
// CACHE_LINE_4-5 0x0180 - 0x027F Contains PMC interrupt data
//=============================================================================
} __attribute__((__aligned__(0x400)));
extern struct lppaca lppaca[];
-diff -purN linux-2.6.27/arch/powerpc/include/asm/mpc52xx_psc.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/mpc52xx_psc.h
---- linux-2.6.27/arch/powerpc/include/asm/mpc52xx_psc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/mpc52xx_psc.h 2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/mpc52xx_psc.h
+--- a/arch/powerpc/include/asm/mpc52xx_psc.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/mpc52xx_psc.h Wed May 06 16:56:03 2009 +0100
@@ -28,6 +28,10 @@
#define MPC52xx_PSC_MAXNUM 6
#define MPC52xx_PSC_SR_CDE 0x0080
#define MPC52xx_PSC_SR_RXRDY 0x0100
#define MPC52xx_PSC_SR_RXFULL 0x0200
-diff -purN linux-2.6.27/arch/powerpc/include/asm/mpic.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/mpic.h
---- linux-2.6.27/arch/powerpc/include/asm/mpic.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/mpic.h 2009-03-25 16:10:54.000000000 +0000
-@@ -355,6 +355,8 @@ struct mpic
+diff -r 9608d5473017 arch/powerpc/include/asm/mpic.h
+--- a/arch/powerpc/include/asm/mpic.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/mpic.h Wed May 06 16:56:03 2009 +0100
+@@ -355,6 +355,8 @@
#define MPIC_NO_BIAS 0x00000400
/* Ignore NIRQS as reported by FRR */
#define MPIC_BROKEN_FRR_NIRQS 0x00000800
/* MPIC HW modification ID */
#define MPIC_REGSET_MASK 0xf0000000
-diff -purN linux-2.6.27/arch/powerpc/include/asm/mutex.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/mutex.h
---- linux-2.6.27/arch/powerpc/include/asm/mutex.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/mutex.h 2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/mutex.h
+--- a/arch/powerpc/include/asm/mutex.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/mutex.h Wed May 06 16:56:03 2009 +0100
@@ -1,9 +1,134 @@
/*
- * Pull in the generic implementation for the mutex fastpath.
+ * from 1 to a 0 value
+ * @count: pointer of type atomic_t
+ * @fail_fn: function to call if the original value was not 1
-+ *
+ *
+- * TODO: implement optimized primitives instead, or leave the generic
+- * implementation in place, or pick the atomic_xchg() based generic
+- * implementation. (see asm-generic/mutex-xchg.h for details)
+ * Change the count from 1 to a value lower than 1, and call <fail_fn> if
+ * it wasn't 1 originally. This function MUST leave the value lower than
+ * 1 even when the "1" assertion wasn't true.
-+ */
+ */
+static inline void
+__mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *))
+{
+ if (unlikely(__mutex_dec_return_lock(count) < 0))
+ fail_fn(count);
+}
-+
+
+-#include <asm-generic/mutex-dec.h>
+/**
+ * __mutex_fastpath_lock_retval - try to take the lock by moving the count
+ * from 1 to a 0 value
+ *
+ * @count: pointer of type atomic_t
+ * @fail_fn: fallback function
- *
-- * TODO: implement optimized primitives instead, or leave the generic
-- * implementation in place, or pick the atomic_xchg() based generic
-- * implementation. (see asm-generic/mutex-xchg.h for details)
++ *
+ * Change the count from 1 to 0, and return 1 (success), or if the count
+ * was not 1, then return 0 (failure).
- */
++ */
+static inline int
+__mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
+{
+ return 1;
+ return 0;
+}
-
--#include <asm-generic/mutex-dec.h>
++
+#endif
-diff -purN linux-2.6.27/arch/powerpc/include/asm/paca.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/paca.h
---- linux-2.6.27/arch/powerpc/include/asm/paca.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/paca.h 2009-03-25 16:10:54.000000000 +0000
-@@ -97,6 +97,10 @@ struct paca_struct {
+diff -r 9608d5473017 arch/powerpc/include/asm/paca.h
+--- a/arch/powerpc/include/asm/paca.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/paca.h Wed May 06 16:56:03 2009 +0100
+@@ -97,6 +97,10 @@
u8 soft_enabled; /* irq soft-enable flag */
u8 hard_enabled; /* set if irqs are enabled in MSR */
u8 io_sync; /* writel() needs spin_unlock sync */
/* Stuff for accurate time accounting */
u64 user_time; /* accumulated usermode TB ticks */
-diff -purN linux-2.6.27/arch/powerpc/include/asm/pci-bridge.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/pci-bridge.h
---- linux-2.6.27/arch/powerpc/include/asm/pci-bridge.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/pci-bridge.h 2009-03-25 16:10:54.000000000 +0000
-@@ -234,9 +234,7 @@ extern void pcibios_remove_pci_devices(s
+diff -r 9608d5473017 arch/powerpc/include/asm/pci-bridge.h
+--- a/arch/powerpc/include/asm/pci-bridge.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/pci-bridge.h Wed May 06 16:56:03 2009 +0100
+@@ -234,9 +234,7 @@
/** Discover new pci devices under this bus, and add them */
extern void pcibios_add_pci_devices(struct pci_bus *bus);
static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus)
{
-diff -purN linux-2.6.27/arch/powerpc/include/asm/pci.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/pci.h
---- linux-2.6.27/arch/powerpc/include/asm/pci.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/pci.h 2009-03-25 16:10:54.000000000 +0000
-@@ -196,9 +196,12 @@ extern void pcibios_setup_new_device(str
+diff -r 9608d5473017 arch/powerpc/include/asm/pci.h
+--- a/arch/powerpc/include/asm/pci.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/pci.h Wed May 06 16:56:03 2009 +0100
+@@ -196,9 +196,12 @@
extern void pcibios_claim_one_bus(struct pci_bus *b);
extern struct pci_dev *of_create_pci_dev(struct device_node *node,
struct pci_bus *bus, int devfn);
-@@ -206,7 +209,8 @@ extern struct pci_dev *of_create_pci_dev
+@@ -206,7 +209,8 @@
extern void of_scan_pci_bridge(struct device_node *node,
struct pci_dev *dev);
extern int pci_read_irq_line(struct pci_dev *dev);
-@@ -221,8 +225,10 @@ extern void pci_resource_to_user(const s
+@@ -221,8 +225,10 @@
const struct resource *rsrc,
resource_size_t *start, resource_size_t *end);
#endif /* __KERNEL__ */
#endif /* __ASM_POWERPC_PCI_H */
-diff -purN linux-2.6.27/arch/powerpc/include/asm/perfmon.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/perfmon.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/perfmon.h 2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/perfmon.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/include/asm/perfmon.h Wed May 06 16:56:03 2009 +0100
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2007 Hewlett-Packard Development Company, L.P.
+#define PFM_ARCH_MAX_PMDS (256+64) /* 256 HW 64 SW */
+
+#endif /* _ASM_POWERPC_PERFMON_H_ */
-diff -purN linux-2.6.27/arch/powerpc/include/asm/perfmon_kern.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/perfmon_kern.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/perfmon_kern.h 2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/perfmon_kern.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/include/asm/perfmon_kern.h Wed May 06 16:56:03 2009 +0100
@@ -0,0 +1,385 @@
+/*
+ * Copyright (c) 2005 David Gibson, IBM Corporation.
+
+#endif /* __KERNEL__ */
+#endif /* _ASM_POWERPC_PERFMON_KERN_H_ */
-diff -purN linux-2.6.27/arch/powerpc/include/asm/ps3.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/ps3.h
---- linux-2.6.27/arch/powerpc/include/asm/ps3.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/ps3.h 2009-03-25 16:10:54.000000000 +0000
-@@ -340,6 +340,7 @@ enum ps3_system_bus_device_type {
+diff -r 9608d5473017 arch/powerpc/include/asm/ps3.h
+--- a/arch/powerpc/include/asm/ps3.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/ps3.h Wed May 06 16:56:03 2009 +0100
+@@ -340,6 +340,7 @@
enum ps3_match_sub_id {
/* for PS3_MATCH_ID_GRAPHICS */
PS3_MATCH_SUB_ID_FB = 1,
};
/**
-@@ -516,4 +517,7 @@ void ps3_sync_irq(int node);
+@@ -516,4 +517,7 @@
u32 ps3_get_hw_thread_id(int cpu);
u64 ps3_get_spe_id(void *arg);
+extern struct mutex ps3_gpu_mutex;
+
#endif
-diff -purN linux-2.6.27/arch/powerpc/include/asm/ps3av.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/ps3av.h
---- linux-2.6.27/arch/powerpc/include/asm/ps3av.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/ps3av.h 2009-03-25 16:10:54.000000000 +0000
-@@ -678,6 +678,8 @@ struct ps3av_pkt_avb_param {
+diff -r 9608d5473017 arch/powerpc/include/asm/ps3av.h
+--- a/arch/powerpc/include/asm/ps3av.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/ps3av.h Wed May 06 16:56:03 2009 +0100
+@@ -678,6 +678,8 @@
u8 buf[PS3AV_PKT_AVB_PARAM_MAX_BUF_SIZE];
};
/** command status **/
#define PS3AV_STATUS_SUCCESS 0x0000 /* success */
-@@ -735,10 +737,8 @@ extern int ps3av_get_mode(void);
+@@ -735,10 +737,8 @@
extern int ps3av_video_mode2res(u32, u32 *, u32 *);
extern int ps3av_video_mute(int);
extern int ps3av_audio_mute(int);
-extern void ps3av_flip_ctl(int on);
#endif /* _ASM_POWERPC_PS3AV_H_ */
-diff -purN linux-2.6.27/arch/powerpc/include/asm/reg.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/reg.h
---- linux-2.6.27/arch/powerpc/include/asm/reg.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/reg.h 2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/reg.h
+--- a/arch/powerpc/include/asm/reg.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/reg.h Wed May 06 16:56:03 2009 +0100
@@ -698,6 +698,7 @@
#define PV_POWER5 0x003A
#define PV_POWER5p 0x003B
#define PV_630 0x0040
#define PV_630p 0x0041
#define PV_970MP 0x0044
-diff -purN linux-2.6.27/arch/powerpc/include/asm/serial.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/serial.h
---- linux-2.6.27/arch/powerpc/include/asm/serial.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/serial.h 2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/serial.h
+--- a/arch/powerpc/include/asm/serial.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/serial.h Wed May 06 16:56:03 2009 +0100
@@ -15,6 +15,12 @@
/* Default baud base if not found in device-tree */
#define BASE_BAUD ( 1843200 / 16 )
#ifdef CONFIG_PPC_UDBG_16550
extern void find_legacy_serial_ports(void);
#else
-diff -purN linux-2.6.27/arch/powerpc/include/asm/spinlock.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/spinlock.h
---- linux-2.6.27/arch/powerpc/include/asm/spinlock.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/spinlock.h 2009-03-25 16:10:54.000000000 +0000
-@@ -287,6 +287,9 @@ static inline void __raw_write_unlock(ra
+diff -r 9608d5473017 arch/powerpc/include/asm/spinlock.h
+--- a/arch/powerpc/include/asm/spinlock.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/spinlock.h Wed May 06 16:56:03 2009 +0100
+@@ -287,6 +287,9 @@
rw->lock = 0;
}
#define _raw_spin_relax(lock) __spin_yield(lock)
#define _raw_read_relax(lock) __rw_yield(lock)
#define _raw_write_relax(lock) __rw_yield(lock)
-diff -purN linux-2.6.27/arch/powerpc/include/asm/synch.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/synch.h
---- linux-2.6.27/arch/powerpc/include/asm/synch.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/synch.h 2009-03-25 16:10:54.000000000 +0000
-@@ -5,6 +5,10 @@
+diff -r 9608d5473017 arch/powerpc/include/asm/synch.h
+--- a/arch/powerpc/include/asm/synch.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/synch.h Wed May 06 16:56:03 2009 +0100
+@@ -4,6 +4,10 @@
+
#include <linux/stringify.h>
#include <asm/feature-fixups.h>
-
++
+#if defined(__powerpc64__) || defined(CONFIG_PPC_E500MC)
+#define __SUBARCH_HAS_LWSYNC
+#endif
-+
+
#ifndef __ASSEMBLY__
extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup;
- extern void do_lwsync_fixups(unsigned long value, void *fixup_start,
-diff -purN linux-2.6.27/arch/powerpc/include/asm/systbl.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/systbl.h
---- linux-2.6.27/arch/powerpc/include/asm/systbl.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/systbl.h 2009-03-25 16:10:54.000000000 +0000
-@@ -92,7 +92,7 @@ COMPAT_SYS_SPU(readlink)
+diff -r 9608d5473017 arch/powerpc/include/asm/systbl.h
+--- a/arch/powerpc/include/asm/systbl.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/systbl.h Wed May 06 16:56:03 2009 +0100
+@@ -92,7 +92,7 @@
SYSCALL(uselib)
SYSCALL(swapon)
SYSCALL(reboot)
SYSCALL_SPU(mmap)
SYSCALL_SPU(munmap)
SYSCALL_SPU(truncate)
-@@ -145,7 +145,7 @@ SYSCALL_SPU(setfsuid)
+@@ -145,7 +145,7 @@
SYSCALL_SPU(setfsgid)
SYSCALL_SPU(llseek)
COMPAT_SYS_SPU(getdents)
SYSCALL_SPU(flock)
SYSCALL_SPU(msync)
COMPAT_SYS_SPU(readv)
-diff -purN linux-2.6.27/arch/powerpc/include/asm/system.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/system.h
---- linux-2.6.27/arch/powerpc/include/asm/system.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/system.h 2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/system.h
+--- a/arch/powerpc/include/asm/system.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/system.h Wed May 06 16:56:03 2009 +0100
@@ -23,15 +23,17 @@
* read_barrier_depends() prevents data-dependent loads being reordered
* across this point (nop on PPC).
#define smp_read_barrier_depends() read_barrier_depends()
#else
#define smp_mb() barrier()
-diff -purN linux-2.6.27/arch/powerpc/include/asm/thread_info.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/thread_info.h
---- linux-2.6.27/arch/powerpc/include/asm/thread_info.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/thread_info.h 2009-03-25 16:10:54.000000000 +0000
-@@ -130,10 +130,12 @@ static inline struct thread_info *curren
+diff -r 9608d5473017 arch/powerpc/include/asm/thread_info.h
+--- a/arch/powerpc/include/asm/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/thread_info.h Wed May 06 16:56:03 2009 +0100
+@@ -130,10 +130,12 @@
#define _TIF_FREEZE (1<<TIF_FREEZE)
#define _TIF_RUNLATCH (1<<TIF_RUNLATCH)
#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
#define _TIF_PERSYSCALL_MASK (_TIF_RESTOREALL|_TIF_NOERROR)
/* Bits in local_flags */
-diff -purN linux-2.6.27/arch/powerpc/include/asm/vdso_datapage.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/vdso_datapage.h
---- linux-2.6.27/arch/powerpc/include/asm/vdso_datapage.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/vdso_datapage.h 2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/vdso_datapage.h
+--- a/arch/powerpc/include/asm/vdso_datapage.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/vdso_datapage.h Wed May 06 16:56:03 2009 +0100
@@ -39,6 +39,7 @@
#ifndef __ASSEMBLY__
#define SYSCALL_MAP_SIZE ((__NR_syscalls + 31) / 32)
-@@ -83,6 +84,7 @@ struct vdso_data {
+@@ -83,6 +84,7 @@
__u32 icache_log_block_size; /* L1 i-cache log block size */
__s32 wtom_clock_sec; /* Wall to monotonic clock */
__s32 wtom_clock_nsec;
__u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of syscalls */
__u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */
};
-@@ -102,6 +104,7 @@ struct vdso_data {
+@@ -102,6 +104,7 @@
__u32 tz_dsttime; /* Type of dst correction 0x5C */
__s32 wtom_clock_sec; /* Wall to monotonic clock */
__s32 wtom_clock_nsec;
__u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */
__u32 dcache_block_size; /* L1 d-cache block size */
__u32 icache_block_size; /* L1 i-cache block size */
-diff -purN linux-2.6.27/arch/powerpc/kernel/align.c linux-2.6.27.19-5.1/arch/powerpc/kernel/align.c
---- linux-2.6.27/arch/powerpc/kernel/align.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/align.c 2009-03-25 16:10:54.000000000 +0000
-@@ -367,27 +367,24 @@ static int emulate_multiple(struct pt_re
+diff -r 9608d5473017 arch/powerpc/kernel/align.c
+--- a/arch/powerpc/kernel/align.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/align.c Wed May 06 16:56:03 2009 +0100
+@@ -367,27 +367,24 @@
static int emulate_fp_pair(unsigned char __user *addr, unsigned int reg,
unsigned int flags)
{
}
}
if (ret)
-@@ -646,11 +643,16 @@ static int emulate_vsx(unsigned char __u
+@@ -646,10 +643,15 @@
unsigned int areg, struct pt_regs *regs,
unsigned int flags, unsigned int length)
{
int ret = 0;
flush_vsx_to_thread(current);
-
++
+ if (reg < 32)
+ ptr = (char *) ¤t->thread.TS_FPR(reg);
+ else
+ ptr = (char *) ¤t->thread.vr[reg - 32];
-+
+
if (flags & ST)
ret = __copy_to_user(addr, ptr, length);
- else {
-diff -purN linux-2.6.27/arch/powerpc/kernel/asm-offsets.c linux-2.6.27.19-5.1/arch/powerpc/kernel/asm-offsets.c
---- linux-2.6.27/arch/powerpc/kernel/asm-offsets.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/asm-offsets.c 2009-03-25 16:10:54.000000000 +0000
-@@ -304,6 +304,7 @@ int main(void)
+diff -r 9608d5473017 arch/powerpc/kernel/asm-offsets.c
+--- a/arch/powerpc/kernel/asm-offsets.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/asm-offsets.c Wed May 06 16:56:03 2009 +0100
+@@ -304,6 +304,7 @@
DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32));
DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec));
DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec));
DEFINE(CFG_ICACHE_BLOCKSZ, offsetof(struct vdso_data, icache_block_size));
DEFINE(CFG_DCACHE_BLOCKSZ, offsetof(struct vdso_data, dcache_block_size));
DEFINE(CFG_ICACHE_LOGBLOCKSZ, offsetof(struct vdso_data, icache_log_block_size));
-diff -purN linux-2.6.27/arch/powerpc/kernel/cpu_setup_44x.S linux-2.6.27.19-5.1/arch/powerpc/kernel/cpu_setup_44x.S
---- linux-2.6.27/arch/powerpc/kernel/cpu_setup_44x.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/cpu_setup_44x.S 2009-03-25 16:10:54.000000000 +0000
-@@ -35,6 +35,7 @@ _GLOBAL(__setup_cpu_440grx)
+diff -r 9608d5473017 arch/powerpc/kernel/cpu_setup_44x.S
+--- a/arch/powerpc/kernel/cpu_setup_44x.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/cpu_setup_44x.S Wed May 06 16:56:03 2009 +0100
+@@ -35,6 +35,7 @@
_GLOBAL(__setup_cpu_460ex)
_GLOBAL(__setup_cpu_460gt)
b __init_fpu_44x
_GLOBAL(__setup_cpu_440gx)
_GLOBAL(__setup_cpu_440spe)
b __fixup_440A_mcheck
-diff -purN linux-2.6.27/arch/powerpc/kernel/cputable.c linux-2.6.27.19-5.1/arch/powerpc/kernel/cputable.c
---- linux-2.6.27/arch/powerpc/kernel/cputable.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/cputable.c 2009-03-25 16:10:53.000000000 +0000
-@@ -39,6 +39,7 @@ extern void __setup_cpu_440epx(unsigned
+diff -r 9608d5473017 arch/powerpc/kernel/cputable.c
+--- a/arch/powerpc/kernel/cputable.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/cputable.c Wed May 06 16:56:03 2009 +0100
+@@ -39,6 +39,7 @@
extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
-@@ -1463,6 +1464,8 @@ static struct cpu_spec __initdata cpu_sp
+@@ -1463,6 +1464,8 @@
.cpu_user_features = COMMON_USER_BOOKE,
.icache_bsize = 32,
.dcache_bsize = 32,
.platform = "ppc440",
},
{ /* 460EX */
-diff -purN linux-2.6.27/arch/powerpc/kernel/entry_32.S linux-2.6.27.19-5.1/arch/powerpc/kernel/entry_32.S
---- linux-2.6.27/arch/powerpc/kernel/entry_32.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/entry_32.S 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/kernel/entry_32.S
+--- a/arch/powerpc/kernel/entry_32.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/entry_32.S Wed May 06 16:56:03 2009 +0100
@@ -39,7 +39,7 @@
* MSR_KERNEL is > 0x10000 on 4xx/Book-E since it include MSR_CE.
*/
#else
#define LOAD_MSR_KERNEL(r, x) li r,(x)
#endif
-diff -purN linux-2.6.27/arch/powerpc/kernel/entry_64.S linux-2.6.27.19-5.1/arch/powerpc/kernel/entry_64.S
---- linux-2.6.27/arch/powerpc/kernel/entry_64.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/entry_64.S 2009-03-25 16:10:53.000000000 +0000
-@@ -57,12 +57,12 @@ system_call_common:
+diff -r 9608d5473017 arch/powerpc/kernel/entry_64.S
+--- a/arch/powerpc/kernel/entry_64.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/entry_64.S Wed May 06 16:56:03 2009 +0100
+@@ -57,12 +57,12 @@
beq- 1f
ld r1,PACAKSAVE(r13)
1: std r10,0(r1)
std r2,GPR2(r1)
std r3,GPR3(r1)
std r4,GPR4(r1)
-@@ -643,6 +643,10 @@ user_work:
+@@ -643,6 +643,10 @@
b .ret_from_except_lite
1: bl .save_nvgprs
addi r3,r1,STACK_FRAME_OVERHEAD
bl .do_signal
b .ret_from_except
-diff -purN linux-2.6.27/arch/powerpc/kernel/irq.c linux-2.6.27.19-5.1/arch/powerpc/kernel/irq.c
---- linux-2.6.27/arch/powerpc/kernel/irq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/irq.c 2009-03-25 16:10:53.000000000 +0000
-@@ -104,6 +104,24 @@ static inline notrace void set_soft_enab
+diff -r 9608d5473017 arch/powerpc/kernel/irq.c
+--- a/arch/powerpc/kernel/irq.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/irq.c Wed May 06 16:56:03 2009 +0100
+@@ -104,6 +104,24 @@
: : "r" (enable), "i" (offsetof(struct paca_struct, soft_enabled)));
}
notrace void raw_local_irq_restore(unsigned long en)
{
/*
-@@ -162,6 +180,19 @@ notrace void raw_local_irq_restore(unsig
+@@ -161,6 +179,19 @@
+ u64 tmp;
lv1_get_version_info(&tmp);
}
-
++
+#ifdef CONFIG_PERFMON
+ /*
+ * If a PMU exception occurred while interrupts were soft disabled,
+ mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) | MMCR0_PMAO);
+ }
+#endif /* CONFIG_PERFMON */
-+
+
__hard_irq_enable();
}
- EXPORT_SYMBOL(raw_local_irq_restore);
-diff -purN linux-2.6.27/arch/powerpc/kernel/legacy_serial.c linux-2.6.27.19-5.1/arch/powerpc/kernel/legacy_serial.c
---- linux-2.6.27/arch/powerpc/kernel/legacy_serial.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/legacy_serial.c 2009-03-25 16:10:53.000000000 +0000
-@@ -494,6 +494,55 @@ device_initcall(serial_dev_init);
+diff -r 9608d5473017 arch/powerpc/kernel/legacy_serial.c
+--- a/arch/powerpc/kernel/legacy_serial.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/legacy_serial.c Wed May 06 16:56:04 2009 +0100
+@@ -494,6 +494,55 @@
#ifdef CONFIG_SERIAL_8250_CONSOLE
/*
* This is called very early, as part of console_init() (typically just after
* time_init()). This function is respondible for trying to find a good
-@@ -562,6 +611,9 @@ static int __init check_legacy_serial_co
+@@ -562,6 +611,9 @@
if (i >= legacy_serial_count)
goto not_found;
of_node_put(prom_stdout);
DBG("Found serial console at ttyS%d\n", offset);
-diff -purN linux-2.6.27/arch/powerpc/kernel/machine_kexec.c linux-2.6.27.19-5.1/arch/powerpc/kernel/machine_kexec.c
---- linux-2.6.27/arch/powerpc/kernel/machine_kexec.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/machine_kexec.c 2009-03-25 16:10:53.000000000 +0000
-@@ -44,6 +44,14 @@ void machine_kexec_cleanup(struct kimage
+diff -r 9608d5473017 arch/powerpc/kernel/machine_kexec.c
+--- a/arch/powerpc/kernel/machine_kexec.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/machine_kexec.c Wed May 06 16:56:04 2009 +0100
+@@ -42,6 +42,14 @@
+ {
+ if (ppc_md.machine_kexec_cleanup)
ppc_md.machine_kexec_cleanup(image);
- }
-
++}
++
+void arch_crash_save_vmcoreinfo(void)
+{
+#ifdef CONFIG_NEED_MULTIPLE_NODES
+ VMCOREINFO_SYMBOL(node_data);
+ VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
+#endif
-+}
-+
+ }
+
/*
- * Do not allocate memory (or fail in any way) in machine_kexec().
- * We are past the point of no return, committed to rebooting now.
-diff -purN linux-2.6.27/arch/powerpc/kernel/of_platform.c linux-2.6.27.19-5.1/arch/powerpc/kernel/of_platform.c
---- linux-2.6.27/arch/powerpc/kernel/of_platform.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/of_platform.c 2009-03-25 16:10:53.000000000 +0000
-@@ -307,6 +307,7 @@ static struct of_device_id of_pci_phb_id
+diff -r 9608d5473017 arch/powerpc/kernel/of_platform.c
+--- a/arch/powerpc/kernel/of_platform.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/of_platform.c Wed May 06 16:56:04 2009 +0100
+@@ -307,6 +307,7 @@
};
static struct of_platform_driver of_pci_phb_driver = {
.match_table = of_pci_phb_ids,
.probe = of_pci_phb_probe,
.driver = {
-diff -purN linux-2.6.27/arch/powerpc/kernel/paca.c linux-2.6.27.19-5.1/arch/powerpc/kernel/paca.c
---- linux-2.6.27/arch/powerpc/kernel/paca.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/paca.c 2009-03-25 16:10:53.000000000 +0000
-@@ -36,6 +36,7 @@ struct lppaca lppaca[] = {
+diff -r 9608d5473017 arch/powerpc/kernel/paca.c
+--- a/arch/powerpc/kernel/paca.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/paca.c Wed May 06 16:56:04 2009 +0100
+@@ -36,6 +36,7 @@
.end_of_quantum = 0xfffffffffffffffful,
.slb_count = 64,
.vmxregs_in_use = 0,
},
};
-diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arch/powerpc/kernel/pci-common.c
---- linux-2.6.27/arch/powerpc/kernel/pci-common.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/pci-common.c 2009-03-25 16:10:54.000000000 +0000
-@@ -789,63 +789,78 @@ static void __devinit pcibios_fixup_reso
+diff -r 9608d5473017 arch/powerpc/kernel/pci-common.c
+--- a/arch/powerpc/kernel/pci-common.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/pci-common.c Wed May 06 16:56:04 2009 +0100
+@@ -789,63 +789,78 @@
}
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
- res->flags = 0;
- continue;
- }
--
-- pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n",
-- pci_name(dev), i,
-- (unsigned long long)res->start,\
-- (unsigned long long)res->end,
-- (unsigned int)res->flags);
+ for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
+ if ((res = bus->resource[i]) == NULL)
+ continue;
+ if (i >= 3 && bus->self->transparent)
+ continue;
-- fixup_resource(res, dev);
+- pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n",
+- pci_name(dev), i,
+- (unsigned long long)res->start,\
+- (unsigned long long)res->end,
+- (unsigned int)res->flags);
+ /* On PowerMac, Apple leaves bridge windows open over
+ * an inaccessible region of memory space (0...fffff)
+ * which is somewhat bogus, but that's what they think
+ i, bus->number);
+ res->flags = 0;
+ continue;
- }
-+
++ }
+
+- fixup_resource(res, dev);
+- }
+ pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n",
+ pci_name(dev), i,
+ (unsigned long long)res->start,\
+host_bridge:
+
-+ /* Additional setup that is different between 32 and 64 bits for now */
+ /* Additional setup that is different between 32 and 64 bits for now */
+- pcibios_do_bus_setup(bus);
+ pcibios_do_bus_setup_self(bus);
+}
-+
+
+- /* Platform specific bus fixups */
+void __devinit pcibios_fixup_bus_devices(struct pci_bus *bus)
+{
+ struct pci_dev *dev = bus->self;
+ pr_debug("PCI: Fixup bus devices %d (%s)\n",
+ bus->number, dev ? pci_name(dev) : "PHB");
+
- /* Additional setup that is different between 32 and 64 bits for now */
-- pcibios_do_bus_setup(bus);
++ /* Additional setup that is different between 32 and 64 bits for now */
+ pcibios_do_bus_setup_devices(bus);
-
-- /* Platform specific bus fixups */
++
+ /* Platform specific bus fixups (XXX Get rid of these !) */
if (ppc_md.pcibios_fixup_bus)
ppc_md.pcibios_fixup_bus(bus);
-@@ -864,19 +879,11 @@ void __devinit pcibios_fixup_bus(struct
+@@ -864,18 +879,10 @@
*/
if (bus->self != NULL)
pci_read_bridge_bases(bus);
+ pcibios_fixup_bus_devices(bus);
}
EXPORT_SYMBOL(pcibios_fixup_bus);
-
+-
-/* When building a bus from the OF tree rather than probing, we need a
- * slightly different version of the fixup which doesn't read the
- * bridge bases using config space accesses
-{
- __pcibios_fixup_bus(bus);
-}
--
+
static int skip_isa_ioresource_align(struct pci_dev *dev)
{
- if ((ppc_pci_flags & PPC_PCI_CAN_SKIP_ISA_ALIGN) &&
-@@ -986,70 +993,71 @@ static int __init reparent_resources(str
+@@ -986,70 +993,71 @@
* as well.
*/
- for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
- if ((res = bus->resource[i]) == NULL || !res->flags
- || res->start > res->end)
-- continue;
-- if (bus->parent == NULL)
-- pr = (res->flags & IORESOURCE_IO) ?
-- &ioport_resource : &iomem_resource;
-- else {
-- /* Don't bother with non-root busses when
-- * re-assigning all resources. We clear the
-- * resource flags as if they were colliding
-- * and as such ensure proper re-allocation
-- * later.
-- */
-- if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC)
-- goto clear_resource;
-- pr = pci_find_parent_resource(bus->self, res);
-- if (pr == res) {
-- /* this happens when the generic PCI
-- * code (wrongly) decides that this
-- * bridge is transparent -- paulus
-- */
-- continue;
-- }
-- }
+ DBG("PCI: Allocating bus resources for %04x:%02x...\n",
+ pci_domain_nr(bus), bus->number);
-
-- DBG("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx "
-- "[0x%x], parent %p (%s)\n",
-- bus->self ? pci_name(bus->self) : "PHB",
-- bus->number, i,
-- (unsigned long long)res->start,
-- (unsigned long long)res->end,
-- (unsigned int)res->flags,
-- pr, (pr && pr->name) ? pr->name : "nil");
--
-- if (pr && !(pr->flags & IORESOURCE_UNSET)) {
-- if (request_resource(pr, res) == 0)
-- continue;
-- /*
-- * Must be a conflict with an existing entry.
-- * Move that entry (or entries) under the
-- * bridge resource and try again.
++
+ for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
+ if ((res = bus->resource[i]) == NULL || !res->flags
+ || res->start > res->end || res->parent)
+ /* this happens when the generic PCI
+ * code (wrongly) decides that this
+ * bridge is transparent -- paulus
- */
-- if (reparent_resources(pr, res) == 0)
++ */
+ continue;
+- if (bus->parent == NULL)
+- pr = (res->flags & IORESOURCE_IO) ?
+- &ioport_resource : &iomem_resource;
+- else {
+- /* Don't bother with non-root busses when
+- * re-assigning all resources. We clear the
+- * resource flags as if they were colliding
+- * and as such ensure proper re-allocation
+- * later.
+- */
+- if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC)
+- goto clear_resource;
+- pr = pci_find_parent_resource(bus->self, res);
+- if (pr == res) {
+- /* this happens when the generic PCI
+- * code (wrongly) decides that this
+- * bridge is transparent -- paulus
+- */
- continue;
-+ continue;
+- }
}
-- printk(KERN_WARNING
-- "PCI: Cannot allocate resource region "
-- "%d of PCI bridge %d, will remap\n",
-- i, bus->number);
--clear_resource:
-- res->flags = 0;
- }
-- pcibios_allocate_bus_resources(&bus->children);
-+
++ }
+
+- DBG("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx "
+- "[0x%x], parent %p (%s)\n",
+- bus->self ? pci_name(bus->self) : "PHB",
+- bus->number, i,
+- (unsigned long long)res->start,
+- (unsigned long long)res->end,
+- (unsigned int)res->flags,
+- pr, (pr && pr->name) ? pr->name : "nil");
+ DBG("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx "
+ "[0x%x], parent %p (%s)\n",
+ bus->self ? pci_name(bus->self) : "PHB",
+ (unsigned long long)res->end,
+ (unsigned int)res->flags,
+ pr, (pr && pr->name) ? pr->name : "nil");
-+
+
+- if (pr && !(pr->flags & IORESOURCE_UNSET)) {
+- if (request_resource(pr, res) == 0)
+- continue;
+- /*
+- * Must be a conflict with an existing entry.
+- * Move that entry (or entries) under the
+- * bridge resource and try again.
+- */
+- if (reparent_resources(pr, res) == 0)
+- continue;
+- }
+- printk(KERN_WARNING
+- "PCI: Cannot allocate resource region "
+- "%d of PCI bridge %d, will remap\n",
+- i, bus->number);
+ if (pr && !(pr->flags & IORESOURCE_UNSET)) {
+ if (request_resource(pr, res) == 0)
+ continue;
+ }
+ printk(KERN_WARNING "PCI: Cannot allocate resource region "
+ "%d of PCI bridge %d, will remap\n", i, bus->number);
-+clear_resource:
+ clear_resource:
+- res->flags = 0;
+- }
+- pcibios_allocate_bus_resources(&bus->children);
+ res->flags = 0;
}
+
static inline void __devinit alloc_resource(struct pci_dev *dev, int idx)
{
-@@ -1119,10 +1127,13 @@ static void __init pcibios_allocate_reso
+@@ -1119,10 +1127,13 @@
void __init pcibios_resource_survey(void)
{
if (!(ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC)) {
pcibios_allocate_resources(0);
-@@ -1157,6 +1168,13 @@ void __devinit pcibios_claim_one_bus(str
+@@ -1157,6 +1168,13 @@
if (r->parent || !r->start || !r->flags)
continue;
pci_claim_resource(dev, i);
}
}
-diff -purN linux-2.6.27/arch/powerpc/kernel/pci_32.c linux-2.6.27.19-5.1/arch/powerpc/kernel/pci_32.c
---- linux-2.6.27/arch/powerpc/kernel/pci_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/pci_32.c 2009-03-25 16:10:53.000000000 +0000
-@@ -418,7 +418,7 @@ static int __init pcibios_init(void)
+diff -r 9608d5473017 arch/powerpc/kernel/pci_32.c
+--- a/arch/powerpc/kernel/pci_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/pci_32.c Wed May 06 16:56:04 2009 +0100
+@@ -418,7 +418,7 @@
subsys_initcall(pcibios_init);
{
struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
unsigned long io_offset;
-@@ -459,6 +459,10 @@ void __devinit pcibios_do_bus_setup(stru
+@@ -457,6 +457,10 @@
+ bus->resource[i+1] = res;
+ }
}
- }
-
-+void __devinit pcibios_do_bus_setup_devices(struct pci_bus *bus)
-+{
+}
+
++void __devinit pcibios_do_bus_setup_devices(struct pci_bus *bus)
++{
+ }
+
/* the next one is stolen from the alpha port... */
- void __init
- pcibios_update_irq(struct pci_dev *dev, int irq)
-diff -purN linux-2.6.27/arch/powerpc/kernel/pci_64.c linux-2.6.27.19-5.1/arch/powerpc/kernel/pci_64.c
---- linux-2.6.27/arch/powerpc/kernel/pci_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/pci_64.c 2009-03-25 16:10:53.000000000 +0000
-@@ -225,14 +225,16 @@ struct pci_dev *of_create_pci_dev(struct
+diff -r 9608d5473017 arch/powerpc/kernel/pci_64.c
+--- a/arch/powerpc/kernel/pci_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/pci_64.c Wed May 06 16:56:04 2009 +0100
+@@ -225,14 +225,16 @@
EXPORT_SYMBOL(of_create_pci_dev);
void __devinit of_scan_bus(struct device_node *node,
/* Scan direct children */
for_each_child_of_node(node, child) {
-@@ -249,8 +251,12 @@ void __devinit of_scan_bus(struct device
+@@ -249,8 +251,12 @@
DBG(" dev header type: %x\n", dev->hdr_type);
}
/* Now scan child busses */
list_for_each_entry(dev, &bus->devices, bus_list) {
-@@ -346,7 +352,7 @@ void __devinit of_scan_pci_bridge(struct
+@@ -346,7 +352,7 @@
DBG(" probe mode: %d\n", mode);
if (mode == PCI_PROBE_DEVTREE)
else if (mode == PCI_PROBE_NORMAL)
pci_scan_child_bus(bus);
}
-@@ -396,7 +402,7 @@ void __devinit scan_phb(struct pci_contr
+@@ -396,7 +402,7 @@
DBG(" probe mode: %d\n", mode);
if (mode == PCI_PROBE_DEVTREE) {
bus->subordinate = hose->last_busno;
}
if (mode == PCI_PROBE_NORMAL)
-@@ -455,7 +461,7 @@ int pcibios_unmap_io_space(struct pci_bu
+@@ -455,7 +461,7 @@
pci_name(bus->self));
__flush_hash_table_range(&init_mm, res->start + _IO_BASE,
return 0;
}
-@@ -568,12 +574,15 @@ void __devinit pcibios_setup_new_device(
+@@ -568,12 +574,15 @@
}
EXPORT_SYMBOL(pcibios_setup_new_device);
-void __devinit pcibios_do_bus_setup(struct pci_bus *bus)
+void __devinit pcibios_do_bus_setup_self(struct pci_bus *bus)
- {
-- struct pci_dev *dev;
--
- if (ppc_md.pci_dma_bus_setup)
- ppc_md.pci_dma_bus_setup(bus);
++{
++ if (ppc_md.pci_dma_bus_setup)
++ ppc_md.pci_dma_bus_setup(bus);
+}
+
+void __devinit pcibios_do_bus_setup_devices(struct pci_bus *bus)
-+{
-+ struct pci_dev *dev;
+ {
+ struct pci_dev *dev;
+-
+- if (ppc_md.pci_dma_bus_setup)
+- ppc_md.pci_dma_bus_setup(bus);
list_for_each_entry(dev, &bus->devices, bus_list)
pcibios_setup_new_device(dev);
-diff -purN linux-2.6.27/arch/powerpc/kernel/ppc32.h linux-2.6.27.19-5.1/arch/powerpc/kernel/ppc32.h
---- linux-2.6.27/arch/powerpc/kernel/ppc32.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/ppc32.h 2009-03-25 16:10:54.000000000 +0000
-@@ -136,4 +136,6 @@ struct ucontext32 {
+diff -r 9608d5473017 arch/powerpc/kernel/ppc32.h
+--- a/arch/powerpc/kernel/ppc32.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/ppc32.h Wed May 06 16:56:04 2009 +0100
+@@ -136,4 +136,6 @@
struct mcontext32 uc_mcontext;
};
+extern int copy_siginfo_to_user32(struct compat_siginfo __user *d, siginfo_t *s);
+
#endif /* _PPC64_PPC32_H */
-diff -purN linux-2.6.27/arch/powerpc/kernel/process.c linux-2.6.27.19-5.1/arch/powerpc/kernel/process.c
---- linux-2.6.27/arch/powerpc/kernel/process.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/process.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/kernel/process.c
+--- a/arch/powerpc/kernel/process.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/process.c Wed May 06 16:56:04 2009 +0100
@@ -33,6 +33,7 @@
#include <linux/mqueue.h>
#include <linux/hardirq.h>
#include <asm/pgtable.h>
#include <asm/uaccess.h>
-@@ -393,9 +394,14 @@ struct task_struct *__switch_to(struct t
+@@ -393,8 +394,13 @@
new_thread->start_tb = current_tb;
}
#endif
--
- local_irq_save(flags);
++ local_irq_save(flags);
+- local_irq_save(flags);
+ if (test_tsk_thread_flag(prev, TIF_PERFMON_CTXSW))
+ pfm_ctxsw_out(prev, new);
+
+ if (test_tsk_thread_flag(new, TIF_PERFMON_CTXSW))
+ pfm_ctxsw_in(prev, new);
-+
+
account_system_vtime(current);
account_process_vtime(current);
- calculate_steal_time();
-@@ -544,6 +550,7 @@ void show_regs(struct pt_regs * regs)
+@@ -544,6 +550,7 @@
void exit_thread(void)
{
discard_lazy_cpu_state();
}
void flush_thread(void)
-@@ -669,6 +676,7 @@ int copy_thread(int nr, unsigned long cl
+@@ -669,6 +676,7 @@
#else
kregs->nip = (unsigned long)ret_from_fork;
#endif
return 0;
}
-diff -purN linux-2.6.27/arch/powerpc/kernel/prom.c linux-2.6.27.19-5.1/arch/powerpc/kernel/prom.c
---- linux-2.6.27/arch/powerpc/kernel/prom.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/prom.c 2009-03-25 16:10:54.000000000 +0000
-@@ -888,9 +888,10 @@ static u64 __init dt_mem_next_cell(int s
+diff -r 9608d5473017 arch/powerpc/kernel/prom.c
+--- a/arch/powerpc/kernel/prom.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/prom.c Wed May 06 16:56:04 2009 +0100
+@@ -888,9 +888,10 @@
*/
static int __init early_init_dt_scan_drconf_memory(unsigned long node)
{
ls = (cell_t *)of_get_flat_dt_prop(node, "ibm,lmb-size", &l);
if (ls == NULL || l < dt_root_size_cells * sizeof(cell_t))
-@@ -905,6 +906,12 @@ static int __init early_init_dt_scan_drc
+@@ -905,6 +906,12 @@
if (l < (n * (dt_root_addr_cells + 4) + 1) * sizeof(cell_t))
return 0;
for (; n != 0; --n) {
base = dt_mem_next_cell(dt_root_addr_cells, &dm);
flags = dm[3];
-@@ -915,13 +922,34 @@ static int __init early_init_dt_scan_drc
+@@ -915,13 +922,34 @@
if ((flags & 0x80) || !(flags & 0x8))
continue;
size = lmb_size;
}
lmb_dump_all();
return 0;
-diff -purN linux-2.6.27/arch/powerpc/kernel/prom_init.c linux-2.6.27.19-5.1/arch/powerpc/kernel/prom_init.c
---- linux-2.6.27/arch/powerpc/kernel/prom_init.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/prom_init.c 2009-03-25 16:10:53.000000000 +0000
-@@ -172,6 +172,7 @@ static unsigned long __initdata dt_strin
+diff -r 9608d5473017 arch/powerpc/kernel/prom_init.c
+--- a/arch/powerpc/kernel/prom_init.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/prom_init.c Wed May 06 16:56:04 2009 +0100
+@@ -172,6 +172,7 @@
static unsigned long __initdata prom_initrd_start, prom_initrd_end;
#ifdef CONFIG_PPC64
static int __initdata prom_iommu_force_on;
static int __initdata prom_iommu_off;
-@@ -555,9 +556,7 @@ unsigned long prom_memparse(const char *
+@@ -555,9 +556,7 @@
static void __init early_cmdline_parse(void)
{
struct prom_t *_prom = &RELOC(prom);
char *p;
int l = 0;
-@@ -572,6 +571,14 @@ static void __init early_cmdline_parse(v
+@@ -572,6 +571,14 @@
#endif /* CONFIG_CMDLINE */
prom_printf("command line: %s\n", RELOC(prom_cmd_line));
#ifdef CONFIG_PPC64
opt = strstr(RELOC(prom_cmd_line), RELOC("iommu="));
if (opt) {
-@@ -2189,6 +2196,7 @@ static void __init fixup_device_tree_efi
+@@ -2189,6 +2196,7 @@
static void __init fixup_device_tree_efika(void)
{
int sound_irq[3] = { 2, 2, 0 };
int bcomm_irq[3*16] = { 3,0,0, 3,1,0, 3,2,0, 3,3,0,
3,4,0, 3,5,0, 3,6,0, 3,7,0,
-@@ -2244,6 +2252,8 @@ static void __init fixup_device_tree_efi
+@@ -2244,6 +2252,8 @@
prom_printf("Adding sound interrupts property\n");
prom_setprop(node, "/builtin/sound", "interrupts",
sound_irq, sizeof(sound_irq));
}
}
-@@ -2397,6 +2407,7 @@ unsigned long __init prom_init(unsigned
+@@ -2397,6 +2407,7 @@
/*
* Initialize display devices
*/
prom_check_displays();
#ifdef CONFIG_PPC64
-diff -purN linux-2.6.27/arch/powerpc/kernel/prom_parse.c linux-2.6.27.19-5.1/arch/powerpc/kernel/prom_parse.c
---- linux-2.6.27/arch/powerpc/kernel/prom_parse.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/prom_parse.c 2009-03-25 16:10:53.000000000 +0000
-@@ -250,8 +250,11 @@ int of_irq_map_pci(struct pci_dev *pdev,
+diff -r 9608d5473017 arch/powerpc/kernel/prom_parse.c
+--- a/arch/powerpc/kernel/prom_parse.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/prom_parse.c Wed May 06 16:56:04 2009 +0100
+@@ -250,8 +250,11 @@
* parsing
*/
dn = pci_device_to_OF_node(pdev);
/* Ok, we don't, time to have fun. Let's start by building up an
* interrupt spec. we assume #interrupt-cells is 1, which is standard
-diff -purN linux-2.6.27/arch/powerpc/kernel/ptrace32.c linux-2.6.27.19-5.1/arch/powerpc/kernel/ptrace32.c
---- linux-2.6.27/arch/powerpc/kernel/ptrace32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/ptrace32.c 2009-03-25 16:10:53.000000000 +0000
-@@ -29,12 +29,15 @@
+diff -r 9608d5473017 arch/powerpc/kernel/ptrace32.c
+--- a/arch/powerpc/kernel/ptrace32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/ptrace32.c Wed May 06 16:56:04 2009 +0100
+@@ -29,11 +29,14 @@
#include <linux/security.h>
#include <linux/signal.h>
#include <linux/compat.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/system.h>
-
-+#include "ppc32.h"
+
++#include "ppc32.h"
+
/*
* does not yet catch signals sent when the child dies.
- * in exit.c or in signal.c.
-@@ -69,6 +72,27 @@ static long compat_ptrace_old(struct tas
+@@ -68,6 +71,27 @@
+ #define FPRNUMBER(i) (((i) - PT_FPR0) >> 1)
#define FPRHALF(i) (((i) - PT_FPR0) & 1)
#define FPRINDEX(i) TS_FPRWIDTH * FPRNUMBER(i) + FPRHALF(i)
-
++
+static int compat_ptrace_getsiginfo(struct task_struct *child, compat_siginfo_t __user *data)
+{
+ siginfo_t lastinfo;
+ return copy_siginfo_to_user32(data, &lastinfo);
+ return error;
+}
-+
+
long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
compat_ulong_t caddr, compat_ulong_t cdata)
- {
-@@ -290,6 +314,9 @@ long compat_arch_ptrace(struct task_stru
+@@ -290,6 +314,9 @@
0, PT_REGS_COUNT * sizeof(compat_long_t),
compat_ptr(data));
case PTRACE_GETFPREGS:
case PTRACE_SETFPREGS:
case PTRACE_GETVRREGS:
-diff -purN linux-2.6.27/arch/powerpc/kernel/rtas.c linux-2.6.27.19-5.1/arch/powerpc/kernel/rtas.c
---- linux-2.6.27/arch/powerpc/kernel/rtas.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/rtas.c 2009-03-25 16:10:53.000000000 +0000
-@@ -46,6 +46,7 @@ EXPORT_SYMBOL(rtas);
+diff -r 9608d5473017 arch/powerpc/kernel/rtas.c
+--- a/arch/powerpc/kernel/rtas.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/rtas.c Wed May 06 16:56:04 2009 +0100
+@@ -46,6 +46,7 @@
struct rtas_suspend_me_data {
atomic_t working; /* number of cpus accessing this struct */
int token; /* ibm,suspend-me */
int error;
struct completion *complete; /* wait on this until working == 0 */
-@@ -663,7 +664,7 @@ static int ibm_suspend_me_token = RTAS_U
+@@ -663,7 +664,7 @@
#ifdef CONFIG_PPC_PSERIES
static void rtas_percpu_suspend_me(void *info)
{
unsigned long msr_save;
int cpu;
struct rtas_suspend_me_data *data =
-@@ -675,7 +676,8 @@ static void rtas_percpu_suspend_me(void
+@@ -675,7 +676,8 @@
msr_save = mfmsr();
mtmsr(msr_save & ~(MSR_EE));
mtmsr(msr_save);
-@@ -698,6 +700,9 @@ static void rtas_percpu_suspend_me(void
+@@ -698,6 +700,9 @@
smp_processor_id(), rc);
data->error = rc;
}
/* This cpu did the suspend or got an error; in either case,
* we need to prod all other other cpus out of join state.
* Extra prods are harmless.
-@@ -740,6 +745,7 @@ static int rtas_ibm_suspend_me(struct rt
+@@ -740,6 +745,7 @@
}
atomic_set(&data.working, 0);
data.token = rtas_token("ibm,suspend-me");
data.error = 0;
data.complete = &done;
-diff -purN linux-2.6.27/arch/powerpc/kernel/rtas_pci.c linux-2.6.27.19-5.1/arch/powerpc/kernel/rtas_pci.c
---- linux-2.6.27/arch/powerpc/kernel/rtas_pci.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/rtas_pci.c 2009-03-25 16:10:53.000000000 +0000
-@@ -301,51 +301,3 @@ void __init find_and_init_phbs(void)
+diff -r 9608d5473017 arch/powerpc/kernel/rtas_pci.c
+--- a/arch/powerpc/kernel/rtas_pci.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/rtas_pci.c Wed May 06 16:56:04 2009 +0100
+@@ -301,51 +301,3 @@
#endif /* CONFIG_PPC32 */
}
}
- return 0;
-}
-EXPORT_SYMBOL(pcibios_remove_root_bus);
-diff -purN linux-2.6.27/arch/powerpc/kernel/signal_32.c linux-2.6.27.19-5.1/arch/powerpc/kernel/signal_32.c
---- linux-2.6.27/arch/powerpc/kernel/signal_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/signal_32.c 2009-03-25 16:10:53.000000000 +0000
-@@ -410,7 +410,7 @@ inline unsigned long copy_fpr_from_user(
+diff -r 9608d5473017 arch/powerpc/kernel/signal_32.c
+--- a/arch/powerpc/kernel/signal_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/signal_32.c Wed May 06 16:56:04 2009 +0100
+@@ -410,7 +410,7 @@
* altivec/spe instructions at some point.
*/
static int save_user_regs(struct pt_regs *regs, struct mcontext __user *frame,
{
unsigned long msr = regs->msr;
-@@ -451,7 +451,7 @@ static int save_user_regs(struct pt_regs
+@@ -451,7 +451,7 @@
* the saved MSR value to indicate that frame->mc_vregs
* contains valid data
*/
__giveup_vsx(current);
if (copy_vsx_to_user(&frame->mc_vsregs, current))
return 1;
-@@ -858,11 +858,11 @@ int handle_rt_signal32(unsigned long sig
+@@ -858,11 +858,11 @@
frame = &rt_sf->uc.uc_mcontext;
addr = frame;
if (vdso32_rt_sigtramp && current->mm->context.vdso_base) {
goto badframe;
regs->link = (unsigned long) frame->tramp;
}
-@@ -936,13 +936,22 @@ long sys_swapcontext(struct ucontext __u
+@@ -936,13 +936,22 @@
int ctx_size, int r6, int r7, int r8, struct pt_regs *regs)
{
unsigned char tmp;
/*
* Check that the context is not smaller than the original
* size (with VMX but without VSX)
-@@ -956,16 +965,9 @@ long sys_swapcontext(struct ucontext __u
+@@ -956,16 +965,9 @@
if ((ctx_size < sizeof(struct ucontext)) &&
(new_msr & MSR_VSX))
return -EINVAL;
#else
/* Context size is for future use. Right now, we only make sure
* we are passed something we understand
-@@ -985,17 +987,17 @@ long sys_swapcontext(struct ucontext __u
+@@ -985,17 +987,17 @@
*/
mctx = (struct mcontext __user *)
((unsigned long) &old_ctx->uc_mcontext & ~0xfUL);
return -EFAULT;
/*
-@@ -1196,11 +1198,11 @@ int handle_signal32(unsigned long sig, s
+@@ -1196,11 +1198,11 @@
goto badframe;
if (vdso32_sigtramp && current->mm->context.vdso_base) {
goto badframe;
regs->link = (unsigned long) frame->mctx.tramp;
}
-diff -purN linux-2.6.27/arch/powerpc/kernel/signal_64.c linux-2.6.27.19-5.1/arch/powerpc/kernel/signal_64.c
---- linux-2.6.27/arch/powerpc/kernel/signal_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/signal_64.c 2009-03-25 16:10:54.000000000 +0000
-@@ -74,7 +74,8 @@ static const char fmt64[] = KERN_INFO \
+diff -r 9608d5473017 arch/powerpc/kernel/signal_64.c
+--- a/arch/powerpc/kernel/signal_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/signal_64.c Wed May 06 16:56:04 2009 +0100
+@@ -74,7 +74,8 @@
*/
static long setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
{
/* When CONFIG_ALTIVEC is set, we _always_ setup v_regs even if the
* process never used altivec yet (MSR_VEC is zero in pt_regs of
-@@ -121,7 +122,7 @@ static long setup_sigcontext(struct sigc
+@@ -121,7 +122,7 @@
* then out to userspace. Update v_regs to point after the
* VMX data.
*/
__giveup_vsx(current);
v_regs += ELF_NVRREG;
err |= copy_vsx_to_user(v_regs, current);
-@@ -284,9 +285,10 @@ int sys_swapcontext(struct ucontext __us
+@@ -284,9 +285,10 @@
unsigned char tmp;
sigset_t set;
unsigned long new_msr = 0;
return -EFAULT;
/*
* Check that the context is not smaller than the original
-@@ -301,28 +303,23 @@ int sys_swapcontext(struct ucontext __us
+@@ -301,28 +303,23 @@
if ((ctx_size < sizeof(struct ucontext)) &&
(new_msr & MSR_VSX))
return -EINVAL;
return -EFAULT;
/*
-@@ -425,7 +422,7 @@ int handle_rt_signal64(int signr, struct
+@@ -425,7 +422,7 @@
&frame->uc.uc_stack.ss_flags);
err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, signr, NULL,
err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
if (err)
goto badframe;
-diff -purN linux-2.6.27/arch/powerpc/kernel/time.c linux-2.6.27.19-5.1/arch/powerpc/kernel/time.c
---- linux-2.6.27/arch/powerpc/kernel/time.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/time.c 2009-03-25 16:10:54.000000000 +0000
-@@ -456,6 +456,7 @@ static inline void update_gtod(u64 new_t
+diff -r 9608d5473017 arch/powerpc/kernel/time.c
+--- a/arch/powerpc/kernel/time.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/time.c Wed May 06 16:56:04 2009 +0100
+@@ -456,6 +456,7 @@
vdso_data->tb_to_xs = new_tb_to_xs;
vdso_data->wtom_clock_sec = wall_to_monotonic.tv_sec;
vdso_data->wtom_clock_nsec = wall_to_monotonic.tv_nsec;
smp_wmb();
++(vdso_data->tb_update_count);
}
-diff -purN linux-2.6.27/arch/powerpc/kernel/vdso32/gettimeofday.S linux-2.6.27.19-5.1/arch/powerpc/kernel/vdso32/gettimeofday.S
---- linux-2.6.27/arch/powerpc/kernel/vdso32/gettimeofday.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/vdso32/gettimeofday.S 2009-03-25 16:10:53.000000000 +0000
-@@ -16,6 +16,13 @@
+diff -r 9608d5473017 arch/powerpc/kernel/vdso32/gettimeofday.S
+--- a/arch/powerpc/kernel/vdso32/gettimeofday.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/vdso32/gettimeofday.S Wed May 06 16:56:04 2009 +0100
+@@ -15,6 +15,13 @@
+ #include <asm/vdso.h>
#include <asm/asm-offsets.h>
#include <asm/unistd.h>
-
++
+/* Offset for the low 32-bit part of a field of long type */
+#ifdef CONFIG_PPC64
+#define LOPART 4
+#else
+#define LOPART 0
+#endif
-+
+
.text
/*
- * Exact prototype of gettimeofday
-@@ -90,101 +97,53 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
+@@ -90,101 +97,53 @@
mflr r12 /* r12 saves lr */
.cfi_register lr,r12
bl __get_datapage@local /* get data page */
mr r9,r3 /* datapage ptr in r9 */
- beq cr1,50f /* if monotonic -> jump there */
--
+
- /*
- * CLOCK_REALTIME
- */
- rlwinm r5,r4,12,20,31
- rlwimi r5,r3,12,0,19
- stw r5,TSPC32_TV_SEC(r11)
-
+-
- /* get remaining xsec and convert to nsec. we scale
- * up remaining xsec by 12 bits and get the top 32 bits
- * of the multiplication, then we multiply by 1000
* possible at all ?
*/
- add r3,r3,r6
-- add r4,r4,r7
-- lis r5,NSEC_PER_SEC@h
-- ori r5,r5,NSEC_PER_SEC@l
-- cmpl cr0,r4,r5
-- cmpli cr1,r4,0
+ add r3,r3,r5
+ add r4,r4,r6
+ cmpw cr0,r4,r7
+ cmpwi cr1,r4,0
- blt 1f
-- subf r4,r5,r4
++ blt 1f
+ subf r4,r7,r4
- addi r3,r3,1
--1: bge cr1,1f
++ addi r3,r3,1
+1: bge cr1,80f
- addi r3,r3,-1
++ addi r3,r3,-1
+ add r4,r4,r7
+- lis r5,NSEC_PER_SEC@h
+- ori r5,r5,NSEC_PER_SEC@l
+- cmpl cr0,r4,r5
+- cmpli cr1,r4,0
+- blt 1f
+- subf r4,r5,r4
+- addi r3,r3,1
+-1: bge cr1,1f
+- addi r3,r3,-1
- add r4,r4,r5
-1: stw r3,TSPC32_TV_SEC(r11)
-+ add r4,r4,r7
+
+80: stw r3,TSPC32_TV_SEC(r11)
stw r4,TSPC32_TV_NSEC(r11)
mtlr r12
-@@ -195,10 +154,6 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
+@@ -195,10 +154,6 @@
/*
* syscall fallback
*/
99:
li r0,__NR_clock_gettime
sc
-@@ -322,3 +277,98 @@ __do_get_xsec:
+@@ -322,3 +277,98 @@
*/
3: blr
.cfi_endproc
+
+ blr
+ .cfi_endproc
-diff -purN linux-2.6.27/arch/powerpc/kernel/vdso64/gettimeofday.S linux-2.6.27.19-5.1/arch/powerpc/kernel/vdso64/gettimeofday.S
---- linux-2.6.27/arch/powerpc/kernel/vdso64/gettimeofday.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/vdso64/gettimeofday.S 2009-03-25 16:10:53.000000000 +0000
-@@ -75,90 +75,49 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
+diff -r 9608d5473017 arch/powerpc/kernel/vdso64/gettimeofday.S
+--- a/arch/powerpc/kernel/vdso64/gettimeofday.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/vdso64/gettimeofday.S Wed May 06 16:56:04 2009 +0100
+@@ -75,90 +75,49 @@
mflr r12 /* r12 saves lr */
.cfi_register lr,r12
- /* Calculate and store result. Note that this mimmics the C code,
- * which may cause funny results if nsec goes negative... is that
- * possible at all ?
-- */
++ /* Add wall->monotonic offset and check for overflow or underflow.
+ */
- add r4,r4,r5
- add r7,r7,r6
- lis r9,NSEC_PER_SEC@h
- ori r9,r9,NSEC_PER_SEC@l
- cmpl cr0,r7,r9
- cmpli cr1,r7,0
-+ /* Add wall->monotonic offset and check for overflow or underflow.
-+ */
+ add r4,r4,r6
+ add r5,r5,r9
+ cmpd cr0,r5,r7
mtlr r12
crclr cr0*4+so
-@@ -168,10 +127,6 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
+@@ -168,10 +127,6 @@
/*
* syscall fallback
*/
99:
li r0,__NR_clock_gettime
sc
-@@ -253,3 +208,59 @@ V_FUNCTION_BEGIN(__do_get_xsec)
+@@ -253,3 +208,59 @@
blr
.cfi_endproc
V_FUNCTION_END(__do_get_xsec)
+ blr
+ .cfi_endproc
+V_FUNCTION_END(__do_get_tspec)
-diff -purN linux-2.6.27/arch/powerpc/kernel/vio.c linux-2.6.27.19-5.1/arch/powerpc/kernel/vio.c
---- linux-2.6.27/arch/powerpc/kernel/vio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/vio.c 2009-03-25 16:10:53.000000000 +0000
-@@ -492,14 +492,14 @@ static void *vio_dma_iommu_alloc_coheren
+diff -r 9608d5473017 arch/powerpc/kernel/vio.c
+--- a/arch/powerpc/kernel/vio.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/vio.c Wed May 06 16:56:04 2009 +0100
+@@ -492,14 +492,14 @@
struct vio_dev *viodev = to_vio_dev(dev);
void *ret;
atomic_inc(&viodev->cmo.allocs_failed);
}
-@@ -513,7 +513,7 @@ static void vio_dma_iommu_free_coherent(
+@@ -513,7 +513,7 @@
dma_iommu_ops.free_coherent(dev, size, vaddr, dma_handle);
}
static dma_addr_t vio_dma_iommu_map_single(struct device *dev, void *vaddr,
-@@ -572,6 +572,7 @@ static int vio_dma_iommu_map_sg(struct d
+@@ -572,6 +572,7 @@
if (unlikely(!ret)) {
vio_cmo_dealloc(viodev, alloc_size);
atomic_inc(&viodev->cmo.allocs_failed);
}
for (sgl = sglist, count = 0; count < ret; count++, sgl++)
-@@ -1315,9 +1316,24 @@ static ssize_t devspec_show(struct devic
+@@ -1315,9 +1316,24 @@
return sprintf(buf, "%s\n", of_node ? of_node->full_name : "none");
}
__ATTR_NULL
};
-diff -purN linux-2.6.27/arch/powerpc/lib/rheap.c linux-2.6.27.19-5.1/arch/powerpc/lib/rheap.c
---- linux-2.6.27/arch/powerpc/lib/rheap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/lib/rheap.c 2009-03-25 16:10:54.000000000 +0000
-@@ -556,6 +556,7 @@ unsigned long rh_alloc_fixed(rh_info_t *
+diff -r 9608d5473017 arch/powerpc/lib/rheap.c
+--- a/arch/powerpc/lib/rheap.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/lib/rheap.c Wed May 06 16:56:04 2009 +0100
+@@ -556,6 +556,7 @@
be = blk->start + blk->size;
if (s >= bs && e <= be)
break;
}
if (blk == NULL)
-diff -purN linux-2.6.27/arch/powerpc/lib/sstep.c linux-2.6.27.19-5.1/arch/powerpc/lib/sstep.c
---- linux-2.6.27/arch/powerpc/lib/sstep.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/lib/sstep.c 2009-03-25 16:10:54.000000000 +0000
-@@ -172,6 +172,8 @@ int __kprobes emulate_step(struct pt_reg
+diff -r 9608d5473017 arch/powerpc/lib/sstep.c
+--- a/arch/powerpc/lib/sstep.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/lib/sstep.c Wed May 06 16:56:04 2009 +0100
+@@ -172,6 +172,8 @@
}
break;
case 0x378: /* orx */
rs = (instr >> 21) & 0x1f;
rb = (instr >> 11) & 0x1f;
if (rs == rb) { /* mr */
-diff -purN linux-2.6.27/arch/powerpc/mm/fault.c linux-2.6.27.19-5.1/arch/powerpc/mm/fault.c
---- linux-2.6.27/arch/powerpc/mm/fault.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/mm/fault.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/mm/fault.c
+--- a/arch/powerpc/mm/fault.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/mm/fault.c Wed May 06 16:56:04 2009 +0100
@@ -30,6 +30,7 @@
#include <linux/kprobes.h>
#include <linux/kdebug.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/mmu.h>
-@@ -318,9 +319,16 @@ good_area:
+@@ -318,9 +319,16 @@
goto do_sigbus;
BUG();
}
current->min_flt++;
up_read(&mm->mmap_sem);
return 0;
-diff -purN linux-2.6.27/arch/powerpc/mm/fsl_booke_mmu.c linux-2.6.27.19-5.1/arch/powerpc/mm/fsl_booke_mmu.c
---- linux-2.6.27/arch/powerpc/mm/fsl_booke_mmu.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/mm/fsl_booke_mmu.c 2009-03-25 16:10:53.000000000 +0000
-@@ -80,7 +80,7 @@ extern unsigned int tlbcam_index;
+diff -r 9608d5473017 arch/powerpc/mm/fsl_booke_mmu.c
+--- a/arch/powerpc/mm/fsl_booke_mmu.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/mm/fsl_booke_mmu.c Wed May 06 16:56:04 2009 +0100
+@@ -80,7 +80,7 @@
/*
* Return PA for this VA if it is mapped by a CAM, or 0
*/
{
int b;
for (b = 0; b < tlbcam_index; ++b)
-@@ -92,7 +92,7 @@ unsigned long v_mapped_by_tlbcam(unsigne
+@@ -92,7 +92,7 @@
/*
* Return VA for a given PA or 0 if not mapped
*/
{
int b;
for (b = 0; b < tlbcam_index; ++b)
-diff -purN linux-2.6.27/arch/powerpc/mm/hash_utils_64.c linux-2.6.27.19-5.1/arch/powerpc/mm/hash_utils_64.c
---- linux-2.6.27/arch/powerpc/mm/hash_utils_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/mm/hash_utils_64.c 2009-03-25 16:10:53.000000000 +0000
-@@ -381,8 +381,10 @@ static int __init htab_dt_scan_hugepage_
+diff -r 9608d5473017 arch/powerpc/mm/hash_utils_64.c
+--- a/arch/powerpc/mm/hash_utils_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/mm/hash_utils_64.c Wed May 06 16:56:04 2009 +0100
+@@ -381,8 +381,10 @@
printk(KERN_INFO "Huge page(16GB) memory: "
"addr = 0x%lX size = 0x%lX pages = %d\n",
phys_addr, block_size, expected_pages);
return 0;
}
-diff -purN linux-2.6.27/arch/powerpc/mm/hugetlbpage.c linux-2.6.27.19-5.1/arch/powerpc/mm/hugetlbpage.c
---- linux-2.6.27/arch/powerpc/mm/hugetlbpage.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/mm/hugetlbpage.c 2009-03-25 16:10:52.000000000 +0000
-@@ -500,6 +500,9 @@ unsigned long hugetlb_get_unmapped_area(
+diff -r 9608d5473017 arch/powerpc/mm/hugetlbpage.c
+--- a/arch/powerpc/mm/hugetlbpage.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/mm/hugetlbpage.c Wed May 06 16:56:04 2009 +0100
+@@ -500,6 +500,9 @@
{
struct hstate *hstate = hstate_file(file);
int mmu_psize = shift_to_mmu_psize(huge_page_shift(hstate));
return slice_get_unmapped_area(addr, len, flags, mmu_psize, 1, 0);
}
-diff -purN linux-2.6.27/arch/powerpc/mm/numa.c linux-2.6.27.19-5.1/arch/powerpc/mm/numa.c
---- linux-2.6.27/arch/powerpc/mm/numa.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/mm/numa.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/mm/numa.c
+--- a/arch/powerpc/mm/numa.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/mm/numa.c Wed May 06 16:56:04 2009 +0100
@@ -19,6 +19,7 @@
#include <linux/notifier.h>
#include <linux/lmb.h>
#include <asm/sparsemem.h>
#include <asm/prom.h>
#include <asm/system.h>
-@@ -89,6 +90,48 @@ static int __cpuinit fake_numa_create_ne
+@@ -89,6 +90,48 @@
return 0;
}
static void __cpuinit map_cpu_to_node(int cpu, int node)
{
numa_cpu_lookup_table[cpu] = node;
-@@ -150,6 +193,21 @@ static const int *of_get_associativity(s
+@@ -148,6 +191,21 @@
+ static const int *of_get_associativity(struct device_node *dev)
+ {
return of_get_property(dev, "ibm,associativity", NULL);
- }
-
++}
++
+/*
+ * Returns the property linux,drconf-usable-memory if
+ * it exists (the property exists only in kexec/kdump kernels,
+ if (!prop || len < sizeof(unsigned int))
+ return 0;
+ return prop;
-+}
-+
+ }
+
/* Returns nid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa
- * info is found.
- */
-@@ -487,14 +545,29 @@ static unsigned long __init numa_enforce
+@@ -487,14 +545,29 @@
}
/*
int nid;
struct assoc_arrays aa;
-@@ -510,6 +583,11 @@ static void __init parse_drconf_memory(s
+@@ -510,6 +583,11 @@
if (rc)
return;
for (; n != 0; --n) {
struct of_drconf_cell drmem;
-@@ -521,21 +599,31 @@ static void __init parse_drconf_memory(s
+@@ -521,21 +599,31 @@
|| !(drmem.flags & DRCONF_MEM_ASSIGNED))
continue;
- nid = of_drconf_to_nid_single(&drmem, &aa);
--
-- fake_numa_create_new_node(
-- ((drmem.base_addr + lmb_size) >> PAGE_SHIFT),
+ base = drmem.base_addr;
+ size = lmb_size;
+ ranges = 1;
-+
+
+- fake_numa_create_new_node(
+- ((drmem.base_addr + lmb_size) >> PAGE_SHIFT),
+ if (is_kexec_kdump) {
+ ranges = read_usm_ranges(&usm);
+ if (!ranges) /* there are no (base, size) duple */
}
}
-@@ -780,10 +868,75 @@ static struct notifier_block __cpuinitda
+@@ -780,10 +868,75 @@
.priority = 1 /* Must run before sched domains notifier. */
};
min_low_pfn = 0;
max_low_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT;
-@@ -803,9 +956,16 @@ void __init do_init_bootmem(void)
+@@ -803,9 +956,16 @@
unsigned long bootmem_paddr;
unsigned long bootmap_pages;
NODE_DATA(nid) = careful_allocation(nid,
sizeof(struct pglist_data),
SMP_CACHE_BYTES, end_pfn);
-@@ -837,36 +997,12 @@ void __init do_init_bootmem(void)
+@@ -837,36 +997,12 @@
start_pfn, end_pfn);
free_bootmem_with_active_regions(nid, end_pfn);
sparse_memory_present_with_active_regions(nid);
}
}
-diff -purN linux-2.6.27/arch/powerpc/mm/pgtable_32.c linux-2.6.27.19-5.1/arch/powerpc/mm/pgtable_32.c
---- linux-2.6.27/arch/powerpc/mm/pgtable_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/mm/pgtable_32.c 2009-03-25 16:10:53.000000000 +0000
-@@ -65,8 +65,8 @@ void setbat(int index, unsigned long vir
+diff -r 9608d5473017 arch/powerpc/mm/pgtable_32.c
+--- a/arch/powerpc/mm/pgtable_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/mm/pgtable_32.c Wed May 06 16:56:04 2009 +0100
+@@ -65,8 +65,8 @@
#ifdef HAVE_TLBCAM
extern unsigned int tlbcam_index;
#else /* !HAVE_TLBCAM */
#define v_mapped_by_tlbcam(x) (0UL)
#define p_mapped_by_tlbcam(x) (0UL)
-diff -purN linux-2.6.27/arch/powerpc/mm/slice.c linux-2.6.27.19-5.1/arch/powerpc/mm/slice.c
---- linux-2.6.27/arch/powerpc/mm/slice.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/mm/slice.c 2009-03-25 16:10:53.000000000 +0000
-@@ -94,11 +94,21 @@ static int slice_area_is_free(struct mm_
+diff -r 9608d5473017 arch/powerpc/mm/slice.c
+--- a/arch/powerpc/mm/slice.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/mm/slice.c Wed May 06 16:56:04 2009 +0100
+@@ -94,11 +94,21 @@
unsigned long len)
{
struct vm_area_struct *vma;
}
static int slice_low_has_vma(struct mm_struct *mm, unsigned long slice)
-@@ -242,8 +252,10 @@ static unsigned long slice_find_area_bot
+@@ -242,8 +252,10 @@
full_search:
for (;;) {
break;
vma = find_vma(mm, addr);
BUG_ON(vma && (addr >= vma->vm_end));
-@@ -256,7 +268,14 @@ full_search:
+@@ -256,7 +268,14 @@
addr = _ALIGN_UP(addr + 1, 1ul << SLICE_HIGH_SHIFT);
continue;
}
/*
* Remember the place where we stopped the search:
*/
-@@ -264,8 +283,8 @@ full_search:
+@@ -264,8 +283,8 @@
mm->free_area_cache = addr + len;
return addr;
}
addr = vma->vm_end;
}
-@@ -284,37 +303,23 @@ static unsigned long slice_find_area_top
+@@ -284,37 +303,23 @@
int psize, int use_cache)
{
struct vm_area_struct *vma;
mm->cached_hole_size = 0;
- mm->free_area_cache = mm->mmap_base;
- }
--
++ } else
++ start_addr = addr = mm->free_area_cache;
++ } else
++ start_addr = addr = mm->mmap_base;
+
- /* either no address requested or can't fit in requested
- * address hole
- */
- addr = mm->free_area_cache;
--
++full_search:
++ while (addr > len) {
++ unsigned long guard;
+
- /* make sure it can fit in the remaining address space */
- if (addr > len) {
- addr = _ALIGN_DOWN(addr - len, 1ul << pshift);
- return (mm->free_area_cache = addr);
- }
- }
-+ } else
-+ start_addr = addr = mm->free_area_cache;
-+ } else
-+ start_addr = addr = mm->mmap_base;
-
+-
- addr = mm->mmap_base;
-+full_search:
- while (addr > len) {
-+ unsigned long guard;
-+
+- while (addr > len) {
/* Go down by chunk size */
addr = _ALIGN_DOWN(addr - len, 1ul << pshift);
-@@ -336,7 +341,15 @@ static unsigned long slice_find_area_top
+@@ -336,7 +341,15 @@
* return with success:
*/
vma = find_vma(mm, addr);
/* remember the address as a hint for next time */
if (use_cache)
mm->free_area_cache = addr;
-@@ -344,11 +357,16 @@ static unsigned long slice_find_area_top
+@@ -344,11 +357,16 @@
}
/* remember the largest hole we saw so far */
}
/*
-@@ -710,9 +728,18 @@ int is_hugepage_only_range(struct mm_str
+@@ -710,9 +728,18 @@
unsigned long len)
{
struct slice_mask mask, available;
#if 0 /* too verbose */
slice_dbg("is_hugepage_only_range(mm=%p, addr=%lx, len=%lx)\n",
-diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/pr_util.h linux-2.6.27.19-5.1/arch/powerpc/oprofile/cell/pr_util.h
---- linux-2.6.27/arch/powerpc/oprofile/cell/pr_util.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/oprofile/cell/pr_util.h 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/oprofile/cell/pr_util.h
+--- a/arch/powerpc/oprofile/cell/pr_util.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/oprofile/cell/pr_util.h Wed May 06 16:56:04 2009 +0100
@@ -24,6 +24,11 @@
#define SKIP_GENERIC_SYNC 0
#define SYNC_START_ERROR -1
struct spu_overlay_info { /* map of sections within an SPU overlay */
unsigned int vma; /* SPU virtual memory address from elf */
-@@ -62,6 +67,14 @@ struct vma_to_fileoffset_map { /* map of
+@@ -62,6 +67,14 @@
};
/* The three functions below are for maintaining and accessing
* the vma-to-fileoffset map.
*/
-diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/spu_profiler.c linux-2.6.27.19-5.1/arch/powerpc/oprofile/cell/spu_profiler.c
---- linux-2.6.27/arch/powerpc/oprofile/cell/spu_profiler.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/oprofile/cell/spu_profiler.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/oprofile/cell/spu_profiler.c
+--- a/arch/powerpc/oprofile/cell/spu_profiler.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/oprofile/cell/spu_profiler.c Wed May 06 16:56:04 2009 +0100
@@ -16,6 +16,7 @@
#include <linux/smp.h>
#include <linux/slab.h>
#define SPU_PC_MASK 0xFFFF
-@@ -208,6 +208,7 @@ int start_spu_profiling(unsigned int cyc
+@@ -208,6 +208,7 @@
spu_prof_running = 1;
hrtimer_start(&timer, kt, HRTIMER_MODE_REL);
return 0;
}
-diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/spu_task_sync.c linux-2.6.27.19-5.1/arch/powerpc/oprofile/cell/spu_task_sync.c
---- linux-2.6.27/arch/powerpc/oprofile/cell/spu_task_sync.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/oprofile/cell/spu_task_sync.c 2009-03-25 16:10:53.000000000 +0000
-@@ -35,7 +35,102 @@ static DEFINE_SPINLOCK(buffer_lock);
+diff -r 9608d5473017 arch/powerpc/oprofile/cell/spu_task_sync.c
+--- a/arch/powerpc/oprofile/cell/spu_task_sync.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/oprofile/cell/spu_task_sync.c Wed May 06 16:56:04 2009 +0100
+@@ -35,7 +35,102 @@
static DEFINE_SPINLOCK(cache_lock);
static int num_spu_nodes;
int spu_prof_num_nodes;
/* Container for caching information about an active SPU task. */
struct cached_info {
-@@ -305,14 +400,21 @@ static int process_context_switch(struct
+@@ -305,14 +400,21 @@
/* Record context info in event buffer */
spin_lock_irqsave(&buffer_lock, flags);
spin_unlock_irqrestore(&buffer_lock, flags);
smp_wmb(); /* insure spu event buffer updates are written */
/* don't want entries intermingled... */
-@@ -360,6 +462,47 @@ static int number_of_online_nodes(void)
+@@ -360,6 +462,47 @@
return nodes;
}
/* The main purpose of this function is to synchronize
* OProfile with SPUFS by registering to be notified of
* SPU task switches.
-@@ -372,20 +515,35 @@ static int number_of_online_nodes(void)
+@@ -372,19 +515,34 @@
*/
int spu_sync_start(void)
{
+ spu_buff_add(num_spu_nodes, spu);
+ }
spin_unlock_irqrestore(&buffer_lock, flags);
-
++
+ for (spu = 0; spu < num_spu_nodes; spu++) {
+ spu_buff[spu].ctx_sw_seen = 0;
+ spu_buff[spu].last_guard_val = 0;
+ }
-+
+
/* Register for SPU events */
register_ret = spu_switch_event_register(&spu_active);
- if (register_ret) {
-@@ -393,8 +551,6 @@ int spu_sync_start(void)
+@@ -393,8 +551,6 @@
goto out;
}
pr_debug("spu_sync_start -- running.\n");
out:
return ret;
-@@ -446,13 +602,20 @@ void spu_sync_buffer(int spu_num, unsign
+@@ -446,13 +602,20 @@
* use. We need to discard samples taken during the time
* period which an overlay occurs (i.e., guard value changes).
*/
}
spin_unlock(&buffer_lock);
out:
-@@ -463,20 +626,41 @@ out:
+@@ -463,20 +626,41 @@
int spu_sync_stop(void)
{
unsigned long flags = 0;
}
-
-diff -purN linux-2.6.27/arch/powerpc/oprofile/op_model_cell.c linux-2.6.27.19-5.1/arch/powerpc/oprofile/op_model_cell.c
---- linux-2.6.27/arch/powerpc/oprofile/op_model_cell.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/oprofile/op_model_cell.c 2009-03-25 16:10:53.000000000 +0000
-@@ -582,6 +582,13 @@ static int cell_reg_setup(struct op_coun
+diff -r 9608d5473017 arch/powerpc/oprofile/op_model_cell.c
+--- a/arch/powerpc/oprofile/op_model_cell.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/oprofile/op_model_cell.c Wed May 06 16:56:04 2009 +0100
+@@ -582,6 +582,13 @@
num_counters = num_ctrs;
pm_regs.group_control = 0;
pm_regs.debug_bus_control = 0;
-@@ -830,13 +837,13 @@ static int calculate_lfsr(int n)
+@@ -830,13 +837,13 @@
static int pm_rtas_activate_spu_profiling(u32 node)
{
int ret, i;
pm_signal_local[i].cpu = node;
pm_signal_local[i].signal_group = 41;
/* spu i on word (i/2) */
-@@ -848,7 +855,7 @@ static int pm_rtas_activate_spu_profilin
+@@ -848,7 +855,7 @@
ret = rtas_ibm_cbe_perftools(SUBFUNC_ACTIVATE,
PASSTHRU_ENABLE, pm_signal_local,
* sizeof(struct pm_signal)));
if (unlikely(ret)) {
-diff -purN linux-2.6.27/arch/powerpc/perfmon/Kconfig linux-2.6.27.19-5.1/arch/powerpc/perfmon/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/Kconfig 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/Kconfig Wed May 06 16:56:04 2009 +0100
@@ -0,0 +1,67 @@
+menu "Hardware Performance Monitoring support"
+config PERFMON
+ If unsure, say M.
+
+endmenu
-diff -purN linux-2.6.27/arch/powerpc/perfmon/Makefile linux-2.6.27.19-5.1/arch/powerpc/perfmon/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/Makefile 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/Makefile Wed May 06 16:56:04 2009 +0100
@@ -0,0 +1,6 @@
+obj-$(CONFIG_PERFMON) += perfmon.o
+obj-$(CONFIG_PERFMON_POWER4) += perfmon_power4.o
+obj-$(CONFIG_PERFMON_POWER6) += perfmon_power6.o
+obj-$(CONFIG_PERFMON_PPC32) += perfmon_ppc32.o
+obj-$(CONFIG_PERFMON_CELL) += perfmon_cell.o
-diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon.c linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/perfmon.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/perfmon.c Wed May 06 16:56:04 2009 +0100
@@ -0,0 +1,334 @@
+/*
+ * This file implements the powerpc specific
+ arch_info->irq_handler(regs, ctx);
+ }
+}
-diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon_cell.c linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_cell.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_cell.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/perfmon_cell.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/perfmon_cell.c Wed May 06 16:56:04 2009 +0100
@@ -0,0 +1,1449 @@
+/*
+ * This file contains the Cell PMU register description tables
+
+module_init(pfm_cell_pmu_init_module);
+module_exit(pfm_cell_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon_power4.c linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_power4.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_power4.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/perfmon_power4.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/perfmon_power4.c Wed May 06 16:56:04 2009 +0100
@@ -0,0 +1,309 @@
+/*
+ * This file contains the POWER4 PMU register description tables
+
+module_init(pfm_power4_pmu_init_module);
+module_exit(pfm_power4_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon_power5.c linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_power5.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_power5.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/perfmon_power5.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/perfmon_power5.c Wed May 06 16:56:04 2009 +0100
@@ -0,0 +1,326 @@
+/*
+ * This file contains the POWER5 PMU register description tables
+
+module_init(pfm_power5_pmu_init_module);
+module_exit(pfm_power5_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon_power6.c linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_power6.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_power6.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/perfmon_power6.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/perfmon_power6.c Wed May 06 16:56:04 2009 +0100
@@ -0,0 +1,520 @@
+/*
+ * This file contains the POWER6 PMU register description tables
+
+module_init(pfm_power6_pmu_init_module);
+module_exit(pfm_power6_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon_ppc32.c linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_ppc32.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_ppc32.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/perfmon_ppc32.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/perfmon_ppc32.c Wed May 06 16:56:04 2009 +0100
@@ -0,0 +1,340 @@
+/*
+ * This file contains the PPC32 PMU register description tables
+
+module_init(pfm_ppc32_pmu_init_module);
+module_exit(pfm_ppc32_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/powerpc/platforms/52xx/efika.c linux-2.6.27.19-5.1/arch/powerpc/platforms/52xx/efika.c
---- linux-2.6.27/arch/powerpc/platforms/52xx/efika.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/52xx/efika.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/platforms/52xx/efika.c
+--- a/arch/powerpc/platforms/52xx/efika.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/52xx/efika.c Wed May 06 16:56:04 2009 +0100
@@ -13,6 +13,7 @@
#include <linux/utsrelease.h>
#include <linux/pci.h>
#include <asm/prom.h>
#include <asm/time.h>
#include <asm/machdep.h>
-@@ -211,12 +212,61 @@ static int __init efika_probe(void)
+@@ -211,12 +212,61 @@
return 1;
}
.show_cpuinfo = efika_show_cpuinfo,
.init_IRQ = mpc52xx_init_irq,
.get_irq = mpc52xx_get_irq,
-diff -purN linux-2.6.27/arch/powerpc/platforms/52xx/mpc52xx_gpio.c linux-2.6.27.19-5.1/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
---- linux-2.6.27/arch/powerpc/platforms/52xx/mpc52xx_gpio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/52xx/mpc52xx_gpio.c 2009-03-25 16:10:53.000000000 +0000
-@@ -192,6 +192,7 @@ static const struct of_device_id mpc52xx
+diff -r 9608d5473017 arch/powerpc/platforms/52xx/mpc52xx_gpio.c
+--- a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c Wed May 06 16:56:04 2009 +0100
+@@ -192,6 +192,7 @@
};
static struct of_platform_driver mpc52xx_wkup_gpiochip_driver = {
.name = "gpio_wkup",
.match_table = mpc52xx_wkup_gpiochip_match,
.probe = mpc52xx_wkup_gpiochip_probe,
-@@ -348,6 +349,7 @@ static const struct of_device_id mpc52xx
+@@ -348,6 +349,7 @@
};
static struct of_platform_driver mpc52xx_simple_gpiochip_driver = {
.name = "gpio",
.match_table = mpc52xx_simple_gpiochip_match,
.probe = mpc52xx_simple_gpiochip_probe,
-@@ -433,6 +435,7 @@ static const struct of_device_id mpc52xx
+@@ -433,6 +435,7 @@
};
static struct of_platform_driver mpc52xx_gpt_gpiochip_driver = {
.name = "gpio_gpt",
.match_table = mpc52xx_gpt_gpiochip_match,
.probe = mpc52xx_gpt_gpiochip_probe,
-diff -purN linux-2.6.27/arch/powerpc/platforms/82xx/ep8248e.c linux-2.6.27.19-5.1/arch/powerpc/platforms/82xx/ep8248e.c
---- linux-2.6.27/arch/powerpc/platforms/82xx/ep8248e.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/82xx/ep8248e.c 2009-03-25 16:10:53.000000000 +0000
-@@ -163,6 +163,7 @@ static struct of_platform_driver ep8248e
+diff -r 9608d5473017 arch/powerpc/platforms/82xx/ep8248e.c
+--- a/arch/powerpc/platforms/82xx/ep8248e.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/82xx/ep8248e.c Wed May 06 16:56:04 2009 +0100
+@@ -163,6 +163,7 @@
.match_table = ep8248e_mdio_match,
.probe = ep8248e_mdio_probe,
.remove = ep8248e_mdio_remove,
};
struct cpm_pin {
-diff -purN linux-2.6.27/arch/powerpc/platforms/83xx/suspend.c linux-2.6.27.19-5.1/arch/powerpc/platforms/83xx/suspend.c
---- linux-2.6.27/arch/powerpc/platforms/83xx/suspend.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/83xx/suspend.c 2009-03-25 16:10:53.000000000 +0000
-@@ -374,6 +374,7 @@ static struct of_device_id pmc_match[] =
+diff -r 9608d5473017 arch/powerpc/platforms/83xx/suspend.c
+--- a/arch/powerpc/platforms/83xx/suspend.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/83xx/suspend.c Wed May 06 16:56:04 2009 +0100
+@@ -374,6 +374,7 @@
};
static struct of_platform_driver pmc_driver = {
.name = "mpc83xx-pmc",
.match_table = pmc_match,
.probe = pmc_probe,
-diff -purN linux-2.6.27/arch/powerpc/platforms/85xx/mpc85xx_ds.c linux-2.6.27.19-5.1/arch/powerpc/platforms/85xx/mpc85xx_ds.c
---- linux-2.6.27/arch/powerpc/platforms/85xx/mpc85xx_ds.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/85xx/mpc85xx_ds.c 2009-03-25 16:10:53.000000000 +0000
-@@ -78,7 +78,8 @@ void __init mpc85xx_ds_pic_init(void)
+diff -r 9608d5473017 arch/powerpc/platforms/85xx/mpc85xx_ds.c
+--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c Wed May 06 16:56:04 2009 +0100
+@@ -78,7 +78,8 @@
mpic = mpic_alloc(np, r.start,
MPIC_PRIMARY | MPIC_WANTS_RESET |
0, 256, " OpenPIC ");
BUG_ON(mpic == NULL);
of_node_put(np);
-diff -purN linux-2.6.27/arch/powerpc/platforms/86xx/pic.c linux-2.6.27.19-5.1/arch/powerpc/platforms/86xx/pic.c
---- linux-2.6.27/arch/powerpc/platforms/86xx/pic.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/86xx/pic.c 2009-03-25 16:10:53.000000000 +0000
-@@ -44,7 +44,8 @@ void __init mpc86xx_init_irq(void)
+diff -r 9608d5473017 arch/powerpc/platforms/86xx/pic.c
+--- a/arch/powerpc/platforms/86xx/pic.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/86xx/pic.c Wed May 06 16:56:04 2009 +0100
+@@ -44,7 +44,8 @@
mpic = mpic_alloc(np, res.start,
MPIC_PRIMARY | MPIC_WANTS_RESET |
0, 256, " MPIC ");
of_node_put(np);
BUG_ON(mpic == NULL);
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/axon_msi.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/axon_msi.c
---- linux-2.6.27/arch/powerpc/platforms/cell/axon_msi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/axon_msi.c 2009-03-25 16:10:53.000000000 +0000
-@@ -95,6 +95,7 @@ static void axon_msi_cascade(unsigned in
+diff -r 9608d5473017 arch/powerpc/platforms/cell/axon_msi.c
+--- a/arch/powerpc/platforms/cell/axon_msi.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/axon_msi.c Wed May 06 16:56:04 2009 +0100
+@@ -95,6 +95,7 @@
struct axon_msic *msic = get_irq_data(irq);
u32 write_offset, msi;
int idx;
write_offset = dcr_read(msic->dcr_host, MSIC_WRITE_OFFSET_REG);
pr_debug("axon_msi: original write_offset 0x%x\n", write_offset);
-@@ -102,7 +103,7 @@ static void axon_msi_cascade(unsigned in
+@@ -102,7 +103,7 @@
/* write_offset doesn't wrap properly, so we have to mask it */
write_offset &= MSIC_FIFO_SIZE_MASK;
idx = msic->read_offset / sizeof(__le32);
msi = le32_to_cpu(msic->fifo_virt[idx]);
msi &= 0xFFFF;
-@@ -110,13 +111,37 @@ static void axon_msi_cascade(unsigned in
+@@ -110,13 +111,37 @@
pr_debug("axon_msi: woff %x roff %x msi %x\n",
write_offset, msic->read_offset, msi);
}
desc->chip->eoi(irq);
-@@ -364,6 +389,7 @@ static int axon_msi_probe(struct of_devi
+@@ -364,6 +389,7 @@
dn->full_name);
goto out_free_fifo;
}
msic->irq_host = irq_alloc_host(dn, IRQ_HOST_MAP_NOMAP,
NR_IRQS, &msic_host_ops, 0);
-@@ -387,6 +413,9 @@ static int axon_msi_probe(struct of_devi
+@@ -386,6 +412,9 @@
+ msic_dcr_write(msic, MSIC_CTRL_REG,
MSIC_CTRL_IRQ_ENABLE | MSIC_CTRL_ENABLE |
MSIC_CTRL_FIFO_SIZE);
-
++
+ msic->read_offset = dcr_read(msic->dcr_host, MSIC_WRITE_OFFSET_REG)
+ & MSIC_FIFO_SIZE_MASK;
-+
+
device->dev.platform_data = msic;
- ppc_md.setup_msi_irqs = axon_msi_setup_msi_irqs;
-@@ -417,6 +446,7 @@ static const struct of_device_id axon_ms
+@@ -417,6 +446,7 @@
};
static struct of_platform_driver axon_msi_driver = {
.match_table = axon_msi_device_id,
.probe = axon_msi_probe,
.shutdown = axon_msi_shutdown,
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/cbe_regs.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/cbe_regs.c
---- linux-2.6.27/arch/powerpc/platforms/cell/cbe_regs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/cbe_regs.c 2009-03-25 16:10:53.000000000 +0000
-@@ -33,6 +33,7 @@ static struct cbe_regs_map
+diff -r 9608d5473017 arch/powerpc/platforms/cell/cbe_regs.c
+--- a/arch/powerpc/platforms/cell/cbe_regs.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/cbe_regs.c Wed May 06 16:56:04 2009 +0100
+@@ -33,6 +33,7 @@
struct cbe_iic_regs __iomem *iic_regs;
struct cbe_mic_tm_regs __iomem *mic_tm_regs;
struct cbe_pmd_shadow_regs pmd_shadow_regs;
} cbe_regs_maps[MAX_CBE];
static int cbe_regs_map_count;
-@@ -145,6 +146,23 @@ struct cbe_mic_tm_regs __iomem *cbe_get_
+@@ -145,6 +146,23 @@
}
EXPORT_SYMBOL_GPL(cbe_get_cpu_mic_tm_regs);
u32 cbe_get_hw_thread_id(int cpu)
{
return cbe_thread_map[cpu].thread_id;
-@@ -206,6 +224,11 @@ void __init cbe_fill_regs_map(struct cbe
+@@ -206,6 +224,11 @@
for_each_node_by_type(np, "mic-tm")
if (of_get_parent(np) == be)
map->mic_tm_regs = of_iomap(np, 0);
} else {
struct device_node *cpu;
/* That hack must die die die ! */
-@@ -227,6 +250,10 @@ void __init cbe_fill_regs_map(struct cbe
+@@ -227,6 +250,10 @@
prop = of_get_property(cpu, "mic-tm", NULL);
if (prop != NULL)
map->mic_tm_regs = ioremap(prop->address, prop->len);
}
}
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/interrupt.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/interrupt.c
---- linux-2.6.27/arch/powerpc/platforms/cell/interrupt.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/interrupt.c 2009-03-25 16:10:53.000000000 +0000
-@@ -270,7 +270,7 @@ static void handle_iic_irq(unsigned int
+diff -r 9608d5473017 arch/powerpc/platforms/cell/interrupt.c
+--- a/arch/powerpc/platforms/cell/interrupt.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/interrupt.c Wed May 06 16:56:04 2009 +0100
+@@ -270,7 +270,7 @@
spin_unlock(&desc->lock);
action_ret = handle_IRQ_event(irq, action);
if (!noirqdebug)
spin_lock(&desc->lock);
} while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING);
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/smp.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/smp.c
---- linux-2.6.27/arch/powerpc/platforms/cell/smp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/smp.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/platforms/cell/smp.c
+--- a/arch/powerpc/platforms/cell/smp.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/smp.c Wed May 06 16:56:04 2009 +0100
@@ -54,8 +54,8 @@
#endif
*/
static cpumask_t of_spin_map;
-@@ -129,10 +129,15 @@ static int __init smp_iic_probe(void)
+@@ -129,10 +129,15 @@
return cpus_weight(cpu_possible_map);
}
}
static DEFINE_SPINLOCK(timebase_lock);
-@@ -192,7 +197,7 @@ static struct smp_ops_t bpa_iic_smp_ops
+@@ -192,7 +197,7 @@
.message_pass = smp_iic_message_pass,
.probe = smp_iic_probe,
.kick_cpu = smp_cell_kick_cpu,
.cpu_bootable = smp_cell_cpu_bootable,
};
-@@ -208,11 +213,7 @@ void __init smp_init_cell(void)
+@@ -208,11 +213,7 @@
/* Mark threads which are still spinning in hold loops. */
if (cpu_has_feature(CPU_FTR_SMT)) {
for_each_present_cpu(i) {
cpu_set(i, of_spin_map);
}
} else {
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/file.c
---- linux-2.6.27/arch/powerpc/platforms/cell/spufs/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/file.c 2009-03-25 16:10:53.000000000 +0000
-@@ -390,6 +390,9 @@ static int spufs_ps_fault(struct vm_area
+diff -r 9608d5473017 arch/powerpc/platforms/cell/spufs/file.c
+--- a/arch/powerpc/platforms/cell/spufs/file.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/spufs/file.c Wed May 06 16:56:05 2009 +0100
+@@ -390,6 +390,9 @@
if (offset >= ps_size)
return VM_FAULT_SIGBUS;
/*
* Because we release the mmap_sem, the context may be destroyed while
* we're in spu_wait. Grab an extra reference so it isn't destroyed
-@@ -548,6 +551,11 @@ spufs_regs_read(struct file *file, char
+@@ -547,6 +550,11 @@
+ {
int ret;
struct spu_context *ctx = file->private_data;
-
++
+ /* pre-check for file position: if we'd return EOF, there's no point
+ * causing a deschedule */
+ if (*pos >= sizeof(ctx->csa.lscsa->gprs))
+ return 0;
-+
+
ret = spu_acquire_saved(ctx);
if (ret)
- return ret;
-@@ -2426,38 +2434,49 @@ static inline int spufs_switch_log_avail
+@@ -2426,38 +2434,49 @@
static int spufs_switch_log_open(struct inode *inode, struct file *file)
{
struct spu_context *ctx = SPUFS_I(inode)->i_ctx;
+ int rc;
-+
-+ rc = spu_acquire(ctx);
-+ if (rc)
-+ return rc;
- /*
- * We (ab-)use the mapping_lock here because it serves the similar
- * be renamed eventually.
- */
- mutex_lock(&ctx->mapping_lock);
++ rc = spu_acquire(ctx);
++ if (rc)
++ return rc;
++
if (ctx->switch_log) {
- spin_lock(&ctx->switch_log->lock);
- ctx->switch_log->head = 0;
- init_waitqueue_head(&ctx->switch_log->wait);
+ rc = -EBUSY;
+ goto out;
-+ }
+ }
+- mutex_unlock(&ctx->mapping_lock);
+
+ ctx->switch_log = kmalloc(sizeof(struct switch_log) +
+ SWITCH_LOG_BUFSIZE * sizeof(struct switch_log_entry),
+ if (!ctx->switch_log) {
+ rc = -ENOMEM;
+ goto out;
- }
-- mutex_unlock(&ctx->mapping_lock);
++ }
+
+ ctx->switch_log->head = ctx->switch_log->tail = 0;
+ init_waitqueue_head(&ctx->switch_log->wait);
}
static int switch_log_sprint(struct spu_context *ctx, char *tbuf, int n)
-@@ -2485,42 +2504,54 @@ static ssize_t spufs_switch_log_read(str
+@@ -2485,42 +2504,54 @@
if (!buf || len < 0)
return -EINVAL;
+ if (cnt > 0) {
+ /* If there's data ready to go, we can
+ * just return straight away */
-+ break;
-+
-+ } else if (file->f_flags & O_NONBLOCK) {
-+ error = -EAGAIN;
break;
- }
- /* multiple readers race? */
- spin_unlock(&ctx->switch_log->lock);
- continue;
++ } else if (file->f_flags & O_NONBLOCK) {
++ error = -EAGAIN;
++ break;
++
+ } else {
+ /* spufs_wait will drop the mutex and
+ * re-acquire, but since we're in read(), the
break;
error = copy_to_user(buf + cnt, tbuf, width);
-@@ -2529,6 +2560,8 @@ static ssize_t spufs_switch_log_read(str
+@@ -2528,6 +2559,8 @@
+ break;
cnt += width;
}
-
-+ spu_release(ctx);
+
++ spu_release(ctx);
+
return cnt == 0 ? error : cnt;
}
-
-@@ -2537,29 +2570,41 @@ static unsigned int spufs_switch_log_pol
+@@ -2537,29 +2570,41 @@
struct inode *inode = file->f_path.dentry->d_inode;
struct spu_context *ctx = SPUFS_I(inode)->i_ctx;
unsigned int mask = 0;
+
if (spufs_switch_log_used(ctx) > 0)
mask |= POLLIN;
-
-+ spu_release(ctx);
+
++ spu_release(ctx);
+
return mask;
}
if (spufs_switch_log_avail(ctx) > 1) {
struct switch_log_entry *p;
-@@ -2573,7 +2618,6 @@ void spu_switch_log_notify(struct spu *s
+@@ -2573,7 +2618,6 @@
ctx->switch_log->head =
(ctx->switch_log->head + 1) % SWITCH_LOG_BUFSIZE;
}
wake_up(&ctx->switch_log->wait);
}
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/inode.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/inode.c
---- linux-2.6.27/arch/powerpc/platforms/cell/spufs/inode.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/inode.c 2009-03-25 16:10:53.000000000 +0000
-@@ -298,8 +298,8 @@ spufs_mkdir(struct inode *dir, struct de
+diff -r 9608d5473017 arch/powerpc/platforms/cell/spufs/inode.c
+--- a/arch/powerpc/platforms/cell/spufs/inode.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/spufs/inode.c Wed May 06 16:56:05 2009 +0100
+@@ -298,8 +298,8 @@
d_instantiate(dentry, inode);
dget(dentry);
goto out;
out_free_ctx:
-@@ -496,6 +496,8 @@ spufs_create_context(struct inode *inode
+@@ -496,6 +496,8 @@
ret = spufs_context_open(dget(dentry), mntget(mnt));
if (ret < 0) {
WARN_ON(spufs_rmdir(inode, dentry));
mutex_unlock(&inode->i_mutex);
spu_forget(SPUFS_I(dentry->d_inode)->i_ctx);
goto out;
-@@ -538,8 +540,8 @@ spufs_mkgang(struct inode *dir, struct d
+@@ -538,8 +540,8 @@
inode->i_fop = &simple_dir_operations;
d_instantiate(dentry, inode);
return ret;
out_iput:
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/run.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/run.c
---- linux-2.6.27/arch/powerpc/platforms/cell/spufs/run.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/run.c 2009-03-25 16:10:53.000000000 +0000
-@@ -249,6 +249,7 @@ static int spu_run_fini(struct spu_conte
+diff -r 9608d5473017 arch/powerpc/platforms/cell/spufs/run.c
+--- a/arch/powerpc/platforms/cell/spufs/run.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/spufs/run.c Wed May 06 16:56:05 2009 +0100
+@@ -249,6 +249,7 @@
spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED);
clear_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags);
spu_release(ctx);
if (signal_pending(current))
-@@ -417,8 +418,6 @@ long spufs_run_spu(struct spu_context *c
+@@ -417,8 +418,6 @@
ret = spu_run_fini(ctx, npc, &status);
spu_yield(ctx);
if ((status & SPU_STATUS_STOPPED_BY_STOP) &&
(((status >> SPU_STOP_STATUS_SHIFT) & 0x3f00) == 0x2100))
ctx->stats.libassist++;
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/sched.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/sched.c
---- linux-2.6.27/arch/powerpc/platforms/cell/spufs/sched.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/sched.c 2009-03-25 16:10:53.000000000 +0000
-@@ -312,6 +312,15 @@ static struct spu *aff_ref_location(stru
+diff -r 9608d5473017 arch/powerpc/platforms/cell/spufs/sched.c
+--- a/arch/powerpc/platforms/cell/spufs/sched.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/spufs/sched.c Wed May 06 16:56:05 2009 +0100
+@@ -312,6 +312,15 @@
*/
node = cpu_to_node(raw_smp_processor_id());
for (n = 0; n < MAX_NUMNODES; n++, node++) {
int available_spus;
node = (node < MAX_NUMNODES) ? node : 0;
-@@ -321,12 +330,10 @@ static struct spu *aff_ref_location(stru
+@@ -321,12 +330,10 @@
available_spus = 0;
mutex_lock(&cbe_spu_info[node].list_mutex);
list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) {
}
if (available_spus < ctx->gang->contexts) {
mutex_unlock(&cbe_spu_info[node].list_mutex);
-@@ -437,6 +444,11 @@ static void spu_unbind_context(struct sp
+@@ -437,6 +444,11 @@
atomic_dec(&cbe_spu_info[spu->node].reserved_spus);
if (ctx->gang)
atomic_dec_if_positive(&ctx->gang->aff_sched_count);
spu_switch_notify(spu, NULL);
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/spufs.h linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/spufs.h
---- linux-2.6.27/arch/powerpc/platforms/cell/spufs/spufs.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/spufs.h 2009-03-25 16:10:53.000000000 +0000
-@@ -65,7 +65,6 @@ enum {
+diff -r 9608d5473017 arch/powerpc/platforms/cell/spufs/spufs.h
+--- a/arch/powerpc/platforms/cell/spufs/spufs.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/spufs/spufs.h Wed May 06 16:56:05 2009 +0100
+@@ -65,7 +65,6 @@
};
struct switch_log {
wait_queue_head_t wait;
unsigned long head;
unsigned long tail;
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/sputrace.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/sputrace.c
---- linux-2.6.27/arch/powerpc/platforms/cell/spufs/sputrace.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/sputrace.c 2009-03-25 16:10:53.000000000 +0000
-@@ -40,6 +40,7 @@ static DECLARE_WAIT_QUEUE_HEAD(sputrace_
+diff -r 9608d5473017 arch/powerpc/platforms/cell/spufs/sputrace.c
+--- a/arch/powerpc/platforms/cell/spufs/sputrace.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/spufs/sputrace.c Wed May 06 16:56:05 2009 +0100
+@@ -40,6 +40,7 @@
static ktime_t sputrace_start;
static unsigned long sputrace_head, sputrace_tail;
static struct sputrace *sputrace_log;
static int sputrace_used(void)
{
-@@ -79,6 +80,11 @@ static ssize_t sputrace_read(struct file
+@@ -79,6 +80,11 @@
char tbuf[128];
int width;
error = wait_event_interruptible(sputrace_wait,
sputrace_used() > 0);
if (error)
-@@ -109,24 +115,49 @@ static ssize_t sputrace_read(struct file
+@@ -109,24 +115,49 @@
static int sputrace_open(struct inode *inode, struct file *file)
{
if (sputrace_avail() > 1) {
struct sputrace *t = sputrace_log + sputrace_head;
-diff -purN linux-2.6.27/arch/powerpc/platforms/chrp/setup.c linux-2.6.27.19-5.1/arch/powerpc/platforms/chrp/setup.c
---- linux-2.6.27/arch/powerpc/platforms/chrp/setup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/chrp/setup.c 2009-03-25 16:10:53.000000000 +0000
-@@ -295,7 +295,7 @@ static void chrp_init_early(void)
+diff -r 9608d5473017 arch/powerpc/platforms/chrp/setup.c
+--- a/arch/powerpc/platforms/chrp/setup.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/chrp/setup.c Wed May 06 16:56:05 2009 +0100
+@@ -295,7 +295,7 @@
if (!property)
goto out_put;
if (!strcmp(property, "failsafe") || !strcmp(property, "serial"))
out_put:
of_node_put(node);
}
-diff -purN linux-2.6.27/arch/powerpc/platforms/embedded6xx/linkstation.c linux-2.6.27.19-5.1/arch/powerpc/platforms/embedded6xx/linkstation.c
---- linux-2.6.27/arch/powerpc/platforms/embedded6xx/linkstation.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/embedded6xx/linkstation.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/platforms/embedded6xx/linkstation.c
+--- a/arch/powerpc/platforms/embedded6xx/linkstation.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/embedded6xx/linkstation.c Wed May 06 16:56:05 2009 +0100
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/initrd.h>
#include <asm/time.h>
#include <asm/prom.h>
-@@ -54,6 +55,19 @@ static struct mtd_partition linkstation_
+@@ -53,6 +54,19 @@
+ .size = 0x0f0000,
},
};
-
++
+static __initdata struct of_device_id of_bus_ids[] = {
+ { .type = "soc", },
+ { .compatible = "simple-bus", },
+ return 0;
+}
+machine_device_initcall(linkstation, declare_of_platform_devices);
-+
+
static int __init linkstation_add_bridge(struct device_node *dev)
{
- #ifdef CONFIG_PCI
-diff -purN linux-2.6.27/arch/powerpc/platforms/pasemi/gpio_mdio.c linux-2.6.27.19-5.1/arch/powerpc/platforms/pasemi/gpio_mdio.c
---- linux-2.6.27/arch/powerpc/platforms/pasemi/gpio_mdio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pasemi/gpio_mdio.c 2009-03-25 16:10:53.000000000 +0000
-@@ -322,6 +322,7 @@ MODULE_DEVICE_TABLE(of, gpio_mdio_match)
+diff -r 9608d5473017 arch/powerpc/platforms/pasemi/gpio_mdio.c
+--- a/arch/powerpc/platforms/pasemi/gpio_mdio.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c Wed May 06 16:56:05 2009 +0100
+@@ -322,6 +322,7 @@
static struct of_platform_driver gpio_mdio_driver =
{
.match_table = gpio_mdio_match,
.probe = gpio_mdio_probe,
.remove = gpio_mdio_remove,
-diff -purN linux-2.6.27/arch/powerpc/platforms/ps3/device-init.c linux-2.6.27.19-5.1/arch/powerpc/platforms/ps3/device-init.c
---- linux-2.6.27/arch/powerpc/platforms/ps3/device-init.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/ps3/device-init.c 2009-03-25 16:10:53.000000000 +0000
-@@ -499,6 +499,41 @@ static int __init ps3_register_graphics_
- return result;
- }
+diff -r 9608d5473017 arch/powerpc/platforms/ps3/device-init.c
+--- a/arch/powerpc/platforms/ps3/device-init.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/ps3/device-init.c Wed May 06 16:56:05 2009 +0100
+@@ -496,6 +496,41 @@
+ __func__, __LINE__);
+ pr_debug(" <- %s:%d\n", __func__, __LINE__);
++ return result;
++}
++
+static int __init ps3_register_ramdisk_device(void)
+{
+ int result;
+fail_device_register:
+ kfree(p);
+ pr_debug(" <- %s:%d failed\n", __func__, __LINE__);
-+ return result;
-+}
-+
- /**
- * ps3_setup_dynamic_device - Setup a dynamic device from the repository
- */
-@@ -927,6 +962,8 @@ static int __init ps3_register_devices(v
+ return result;
+ }
+
+@@ -927,6 +962,8 @@
ps3_register_lpm_devices();
pr_debug(" <- %s:%d\n", __func__, __LINE__);
return 0;
}
-diff -purN linux-2.6.27/arch/powerpc/platforms/ps3/setup.c linux-2.6.27.19-5.1/arch/powerpc/platforms/ps3/setup.c
---- linux-2.6.27/arch/powerpc/platforms/ps3/setup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/ps3/setup.c 2009-03-25 16:10:53.000000000 +0000
-@@ -42,6 +42,10 @@
+diff -r 9608d5473017 arch/powerpc/platforms/ps3/setup.c
+--- a/arch/powerpc/platforms/ps3/setup.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/ps3/setup.c Wed May 06 16:56:05 2009 +0100
+@@ -41,6 +41,10 @@
+ #else
#define DBG pr_debug
#endif
-
++
+/* mutex synchronizing GPU accesses and video mode changes */
+DEFINE_MUTEX(ps3_gpu_mutex);
+EXPORT_SYMBOL_GPL(ps3_gpu_mutex);
-+
+
#if !defined(CONFIG_SMP)
static void smp_send_stop(void) {}
- #endif
-diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/Kconfig linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/Kconfig
---- linux-2.6.27/arch/powerpc/platforms/pseries/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/Kconfig 2009-03-25 16:10:53.000000000 +0000
-@@ -54,7 +54,7 @@ config PPC_SMLPAR
+diff -r 9608d5473017 arch/powerpc/platforms/pseries/Kconfig
+--- a/arch/powerpc/platforms/pseries/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pseries/Kconfig Wed May 06 16:56:05 2009 +0100
+@@ -54,7 +54,7 @@
config CMM
tristate "Collaborative memory management"
default y
help
Select this option, if you want to enable the kernel interface
-diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/eeh.c linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/eeh.c
---- linux-2.6.27/arch/powerpc/platforms/pseries/eeh.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/eeh.c 2009-03-25 16:10:53.000000000 +0000
-@@ -21,6 +21,8 @@
+diff -r 9608d5473017 arch/powerpc/platforms/pseries/eeh.c
+--- a/arch/powerpc/platforms/pseries/eeh.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pseries/eeh.c Wed May 06 16:56:05 2009 +0100
+@@ -20,6 +20,8 @@
+ *
* Please address comments and feedback to Linas Vepstas <linas@austin.ibm.com>
*/
-
-+#undef DEBUG
+
++#undef DEBUG
+
#include <linux/delay.h>
#include <linux/init.h>
- #include <linux/list.h>
-@@ -488,10 +490,8 @@ int eeh_dn_check_failure(struct device_n
+@@ -488,10 +490,8 @@
if (!(pdn->eeh_mode & EEH_MODE_SUPPORTED) ||
pdn->eeh_mode & EEH_MODE_NOCHECK) {
ignored_check++;
return 0;
}
-@@ -1014,10 +1014,9 @@ static void *early_enable_eeh(struct dev
+@@ -1014,10 +1014,9 @@
eeh_subsystem_enabled = 1;
pdn->eeh_mode |= EEH_MODE_SUPPORTED;
} else {
/* This device doesn't support EEH, but it may have an
-@@ -1161,13 +1160,17 @@ static void eeh_add_device_late(struct p
+@@ -1161,13 +1160,17 @@
if (!dev || !eeh_subsystem_enabled)
return;
- printk(KERN_DEBUG "EEH: adding device %s\n", pci_name(dev));
-#endif
+ pr_debug("EEH: Adding device %s\n", pci_name(dev));
-
-- pci_dev_get (dev);
- dn = pci_device_to_OF_node(dev);
- pdn = PCI_DN(dn);
++
++ dn = pci_device_to_OF_node(dev);
++ pdn = PCI_DN(dn);
+ if (pdn->pcidev == dev) {
+ pr_debug("EEH: Already referenced !\n");
+ return;
+ }
+ WARN_ON(pdn->pcidev);
-+
-+ pci_dev_get (dev);
+
+ pci_dev_get (dev);
+- dn = pci_device_to_OF_node(dev);
+- pdn = PCI_DN(dn);
pdn->pcidev = dev;
pci_addr_cache_insert_device(dev);
-@@ -1206,17 +1209,18 @@ static void eeh_remove_device(struct pci
+@@ -1206,17 +1209,18 @@
return;
/* Unregister the device with the EEH/PCI address search system */
-#ifdef DEBUG
- printk(KERN_DEBUG "EEH: remove device %s\n", pci_name(dev));
-#endif
-- pci_addr_cache_remove_device(dev);
-- eeh_sysfs_remove_device(dev);
+ pr_debug("EEH: Removing device %s\n", pci_name(dev));
-
- dn = pci_device_to_OF_node(dev);
-- if (PCI_DN(dn)->pcidev) {
-- PCI_DN(dn)->pcidev = NULL;
-- pci_dev_put (dev);
++
++ dn = pci_device_to_OF_node(dev);
+ if (PCI_DN(dn)->pcidev == NULL) {
+ pr_debug("EEH: Not referenced !\n");
+ return;
- }
++ }
+ PCI_DN(dn)->pcidev = NULL;
+ pci_dev_put (dev);
+
-+ pci_addr_cache_remove_device(dev);
-+ eeh_sysfs_remove_device(dev);
+ pci_addr_cache_remove_device(dev);
+ eeh_sysfs_remove_device(dev);
+-
+- dn = pci_device_to_OF_node(dev);
+- if (PCI_DN(dn)->pcidev) {
+- PCI_DN(dn)->pcidev = NULL;
+- pci_dev_put (dev);
+- }
}
void eeh_remove_bus_device(struct pci_dev *dev)
-diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/hotplug-memory.c linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/hotplug-memory.c
---- linux-2.6.27/arch/powerpc/platforms/pseries/hotplug-memory.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/hotplug-memory.c 2009-03-25 16:10:53.000000000 +0000
-@@ -21,7 +21,19 @@ static int pseries_remove_lmb(unsigned l
+diff -r 9608d5473017 arch/powerpc/platforms/pseries/hotplug-memory.c
+--- a/arch/powerpc/platforms/pseries/hotplug-memory.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pseries/hotplug-memory.c Wed May 06 16:56:05 2009 +0100
+@@ -21,7 +21,19 @@
struct zone *zone;
int ret;
zone = page_zone(pfn_to_page(start_pfn));
/*
-diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/pci_dlpar.c linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/pci_dlpar.c
---- linux-2.6.27/arch/powerpc/platforms/pseries/pci_dlpar.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/pci_dlpar.c 2009-03-25 16:10:53.000000000 +0000
-@@ -25,6 +25,8 @@
+diff -r 9608d5473017 arch/powerpc/platforms/pseries/pci_dlpar.c
+--- a/arch/powerpc/platforms/pseries/pci_dlpar.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pseries/pci_dlpar.c Wed May 06 16:56:05 2009 +0100
+@@ -24,6 +24,8 @@
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
-+#undef DEBUG
+
++#undef DEBUG
+
#include <linux/pci.h>
#include <asm/pci-bridge.h>
- #include <asm/ppc-pci.h>
-@@ -69,73 +71,41 @@ EXPORT_SYMBOL_GPL(pcibios_find_pci_bus);
+@@ -69,73 +71,41 @@
* Remove all of the PCI devices under this bus both from the
* linux pci device tree, and from the powerpc EEH address cache.
*/
-/* Must be called before pci_bus_add_devices */
-void
-pcibios_fixup_new_pci_devices(struct pci_bus *bus)
--{
++void pcibios_finish_adding_new_bus(struct pci_bus *bus)
+ {
- struct pci_dev *dev;
--
++ pr_debug("PCI: Finishing adding hotplug bus %04x:%02x\n",
++ pci_domain_nr(bus), bus->number);
+
- list_for_each_entry(dev, &bus->devices, bus_list) {
- /* Skip already-added devices */
- if (!dev->is_added) {
- int i;
--
++ /* Allocate bus and devices resources */
++ pcibios_allocate_bus_resources(bus);
++ pcibios_claim_one_bus(bus);
+
- /* Fill device archdata and setup iommu table */
- pcibios_setup_new_device(dev);
--
++ /* Add new devices to global lists. Register in proc, sysfs. */
++ pci_bus_add_devices(bus);
+
- pci_read_irq_line(dev);
- for (i = 0; i < PCI_NUM_RESOURCES; i++) {
- struct resource *r = &dev->resource[i];
- }
- }
- }
--}
++ /* Fixup EEH */
++ eeh_add_device_tree_late(bus);
+ }
-EXPORT_SYMBOL_GPL(pcibios_fixup_new_pci_devices);
-
-static int
-pcibios_pci_config_bridge(struct pci_dev *dev)
-+void pcibios_finish_adding_new_bus(struct pci_bus *bus)
- {
+-{
- u8 sec_busno;
- struct pci_bus *child_bus;
-
- /* Get busno of downstream bus */
- pci_read_config_byte(dev, PCI_SECONDARY_BUS, &sec_busno);
-+ pr_debug("PCI: Finishing adding hotplug bus %04x:%02x\n",
-+ pci_domain_nr(bus), bus->number);
-
+-
- /* Add to children of PCI bridge dev->bus */
- child_bus = pci_add_new_bus(dev->bus, dev, sec_busno);
- if (!child_bus) {
- sprintf(child_bus->name, "PCI Bus #%02x", child_bus->number);
-
- pci_scan_child_bus(child_bus);
-+ /* Allocate bus and devices resources */
-+ pcibios_allocate_bus_resources(bus);
-+ pcibios_claim_one_bus(bus);
-
+-
- /* Fixup new pci devices */
- pcibios_fixup_new_pci_devices(child_bus);
-+ /* Add new devices to global lists. Register in proc, sysfs. */
-+ pci_bus_add_devices(bus);
-
+-
- /* Make the discovered devices available */
- pci_bus_add_devices(child_bus);
-
- eeh_add_device_tree_late(child_bus);
- return 0;
-+ /* Fixup EEH */
-+ eeh_add_device_tree_late(bus);
- }
+-}
+EXPORT_SYMBOL_GPL(pcibios_finish_adding_new_bus);
/**
* pcibios_add_pci_devices - adds new pci devices to bus
-@@ -147,10 +117,9 @@ pcibios_pci_config_bridge(struct pci_dev
+@@ -147,10 +117,9 @@
* is how this routine differs from other, similar pcibios
* routines.)
*/
struct pci_dev *dev;
struct device_node *dn = pci_bus_to_OF_node(bus);
-@@ -162,25 +131,24 @@ pcibios_add_pci_devices(struct pci_bus *
+@@ -162,25 +131,24 @@
if (mode == PCI_PROBE_DEVTREE) {
/* use ofdt-based probe */
}
}
EXPORT_SYMBOL_GPL(pcibios_add_pci_devices);
-@@ -190,6 +158,8 @@ struct pci_controller * __devinit init_p
+@@ -189,6 +157,8 @@
+ {
struct pci_controller *phb;
int primary;
-
-+ pr_debug("PCI: Initializing new hotplug PHB %s\n", dn->full_name);
+
++ pr_debug("PCI: Initializing new hotplug PHB %s\n", dn->full_name);
+
primary = list_empty(&hose_list);
phb = pcibios_alloc_controller(dn);
- if (!phb)
-@@ -203,10 +173,57 @@ struct pci_controller * __devinit init_p
+@@ -203,10 +173,57 @@
eeh_add_device_tree_early(dn);
scan_phb(phb);
+ return 0;
+}
+EXPORT_SYMBOL_GPL(remove_phb_dynamic);
-diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/setup.c linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/setup.c
---- linux-2.6.27/arch/powerpc/platforms/pseries/setup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/setup.c 2009-03-25 16:10:53.000000000 +0000
-@@ -299,7 +299,11 @@ static void __init pSeries_setup_arch(vo
+diff -r 9608d5473017 arch/powerpc/platforms/pseries/setup.c
+--- a/arch/powerpc/platforms/pseries/setup.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pseries/setup.c Wed May 06 16:56:05 2009 +0100
+@@ -299,7 +299,11 @@
static int __init pSeries_init_panel(void)
{
/* Manually leave the kernel version on the panel. */
ppc_md.progress(init_utsname()->version, 0);
return 0;
-diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/smp.c linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/smp.c
---- linux-2.6.27/arch/powerpc/platforms/pseries/smp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/smp.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/platforms/pseries/smp.c
+--- a/arch/powerpc/platforms/pseries/smp.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pseries/smp.c Wed May 06 16:56:05 2009 +0100
@@ -52,8 +52,8 @@
*/
static cpumask_t of_spin_map;
-@@ -191,8 +191,7 @@ static void __devinit smp_pSeries_kick_c
+@@ -191,8 +191,7 @@
static int smp_pSeries_cpu_bootable(unsigned int nr)
{
/* Special case - we inhibit secondary thread startup
*/
if (system_state < SYSTEM_RUNNING &&
cpu_has_feature(CPU_FTR_SMT) &&
-@@ -229,11 +228,7 @@ static void __init smp_init_pseries(void
+@@ -229,11 +228,7 @@
/* Mark threads which are still spinning in hold loops. */
if (cpu_has_feature(CPU_FTR_SMT)) {
for_each_present_cpu(i) {
cpu_set(i, of_spin_map);
}
} else {
-diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/xics.c linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/xics.c
---- linux-2.6.27/arch/powerpc/platforms/pseries/xics.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/xics.c 2009-03-25 16:10:53.000000000 +0000
-@@ -208,9 +208,6 @@ static int get_irq_server(unsigned int v
+diff -r 9608d5473017 arch/powerpc/platforms/pseries/xics.c
+--- a/arch/powerpc/platforms/pseries/xics.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pseries/xics.c Wed May 06 16:56:05 2009 +0100
+@@ -207,9 +207,6 @@
+ /* For the moment only implement delivery to all cpus or one cpu */
cpumask_t cpumask = irq_desc[virq].affinity;
cpumask_t tmp = CPU_MASK_NONE;
-
+-
- if (! cpu_isset(default_server, cpu_online_map))
- xics_update_irq_servers();
--
+
if (!distribute_irqs)
return default_server;
-
-@@ -659,8 +656,8 @@ void __init xics_init_IRQ(void)
+@@ -659,8 +656,8 @@
if (found == 0)
return;
-- xics_init_host();
- xics_update_irq_servers();
-+ xics_init_host();
++ xics_update_irq_servers();
+ xics_init_host();
+- xics_update_irq_servers();
if (firmware_has_feature(FW_FEATURE_LPAR))
ppc_md.get_irq = xics_get_irq_lpar;
-@@ -753,6 +750,10 @@ void xics_migrate_irqs_away(void)
+@@ -753,6 +750,10 @@
int cpu = smp_processor_id(), hw_cpu = hard_smp_processor_id();
unsigned int irq, virq;
/* Reject any interrupt that was queued to us... */
xics_set_cpu_priority(0);
-diff -purN linux-2.6.27/arch/powerpc/sysdev/fsl_msi.c linux-2.6.27.19-5.1/arch/powerpc/sysdev/fsl_msi.c
---- linux-2.6.27/arch/powerpc/sysdev/fsl_msi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/sysdev/fsl_msi.c 2009-03-25 16:10:54.000000000 +0000
-@@ -416,6 +416,7 @@ static const struct of_device_id fsl_of_
+diff -r 9608d5473017 arch/powerpc/sysdev/fsl_msi.c
+--- a/arch/powerpc/sysdev/fsl_msi.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/sysdev/fsl_msi.c Wed May 06 16:56:05 2009 +0100
+@@ -416,6 +416,7 @@
};
static struct of_platform_driver fsl_of_msi_driver = {
.name = "fsl-msi",
.match_table = fsl_of_msi_ids,
.probe = fsl_of_msi_probe,
-diff -purN linux-2.6.27/arch/powerpc/sysdev/fsl_rio.c linux-2.6.27.19-5.1/arch/powerpc/sysdev/fsl_rio.c
---- linux-2.6.27/arch/powerpc/sysdev/fsl_rio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/sysdev/fsl_rio.c 2009-03-25 16:10:54.000000000 +0000
-@@ -1197,6 +1197,7 @@ static const struct of_device_id fsl_of_
+diff -r 9608d5473017 arch/powerpc/sysdev/fsl_rio.c
+--- a/arch/powerpc/sysdev/fsl_rio.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/sysdev/fsl_rio.c Wed May 06 16:56:05 2009 +0100
+@@ -1197,6 +1197,7 @@
};
static struct of_platform_driver fsl_of_rio_rpn_driver = {
.name = "fsl-of-rio",
.match_table = fsl_of_rio_rpn_ids,
.probe = fsl_of_rio_rpn_probe,
-diff -purN linux-2.6.27/arch/powerpc/sysdev/ipic.c linux-2.6.27.19-5.1/arch/powerpc/sysdev/ipic.c
---- linux-2.6.27/arch/powerpc/sysdev/ipic.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/sysdev/ipic.c 2009-03-25 16:10:54.000000000 +0000
-@@ -920,6 +920,7 @@ static int ipic_suspend(struct sys_devic
+diff -r 9608d5473017 arch/powerpc/sysdev/ipic.c
+--- a/arch/powerpc/sysdev/ipic.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/sysdev/ipic.c Wed May 06 16:56:05 2009 +0100
+@@ -920,6 +920,7 @@
ipic_saved_state.sermr = ipic_read(ipic->regs, IPIC_SERMR);
ipic_saved_state.sercr = ipic_read(ipic->regs, IPIC_SERCR);
if (fsl_deep_sleep()) {
/* In deep sleep, make sure there can be no
* pending interrupts, as this can cause
-@@ -930,6 +931,7 @@ static int ipic_suspend(struct sys_devic
+@@ -930,6 +931,7 @@
ipic_write(ipic->regs, IPIC_SEMSR, 0);
ipic_write(ipic->regs, IPIC_SERMR, 0);
}
return 0;
}
-diff -purN linux-2.6.27/arch/powerpc/sysdev/mpic.c linux-2.6.27.19-5.1/arch/powerpc/sysdev/mpic.c
---- linux-2.6.27/arch/powerpc/sysdev/mpic.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/sysdev/mpic.c 2009-03-25 16:10:54.000000000 +0000
-@@ -563,6 +563,51 @@ static void __init mpic_scan_ht_pics(str
+diff -r 9608d5473017 arch/powerpc/sysdev/mpic.c
+--- a/arch/powerpc/sysdev/mpic.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/sysdev/mpic.c Wed May 06 16:56:05 2009 +0100
+@@ -563,6 +563,51 @@
#endif /* CONFIG_MPIC_U3_HT_IRQS */
#define mpic_irq_to_hw(virq) ((unsigned int)irq_map[virq].hwirq)
-@@ -777,12 +822,18 @@ void mpic_set_affinity(unsigned int irq,
+@@ -777,12 +822,18 @@
struct mpic *mpic = mpic_from_irq(irq);
unsigned int src = mpic_irq_to_hw(irq);
}
static unsigned int mpic_type_to_vecpri(struct mpic *mpic, unsigned int type)
-@@ -1220,6 +1271,7 @@ void __init mpic_set_default_senses(stru
+@@ -1220,6 +1271,7 @@
void __init mpic_init(struct mpic *mpic)
{
int i;
BUG_ON(mpic->num_sources == 0);
-@@ -1262,6 +1314,11 @@ void __init mpic_init(struct mpic *mpic)
+@@ -1262,6 +1314,11 @@
mpic_pasemi_msi_init(mpic);
for (i = 0; i < mpic->num_sources; i++) {
/* start with vector = source number, and masked */
u32 vecpri = MPIC_VECPRI_MASK | i |
-@@ -1272,8 +1329,7 @@ void __init mpic_init(struct mpic *mpic)
+@@ -1272,8 +1329,7 @@
continue;
/* init hw */
mpic_irq_write(i, MPIC_INFO(IRQ_VECTOR_PRI), vecpri);
}
/* Init spurious vector */
-diff -purN linux-2.6.27/arch/powerpc/sysdev/pmi.c linux-2.6.27.19-5.1/arch/powerpc/sysdev/pmi.c
---- linux-2.6.27/arch/powerpc/sysdev/pmi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/sysdev/pmi.c 2009-03-25 16:10:54.000000000 +0000
-@@ -205,6 +205,7 @@ static int pmi_of_remove(struct of_devic
+diff -r 9608d5473017 arch/powerpc/sysdev/pmi.c
+--- a/arch/powerpc/sysdev/pmi.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/sysdev/pmi.c Wed May 06 16:56:05 2009 +0100
+@@ -205,6 +205,7 @@
}
static struct of_platform_driver pmi_of_platform_driver = {
.match_table = pmi_match,
.probe = pmi_of_probe,
.remove = pmi_of_remove,
-diff -purN linux-2.6.27/arch/powerpc/xmon/xmon.c linux-2.6.27.19-5.1/arch/powerpc/xmon/xmon.c
---- linux-2.6.27/arch/powerpc/xmon/xmon.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/xmon/xmon.c 2009-03-25 16:10:54.000000000 +0000
-@@ -136,6 +136,7 @@ static struct bpt *in_breakpoint_table(u
+diff -r 9608d5473017 arch/powerpc/xmon/xmon.c
+--- a/arch/powerpc/xmon/xmon.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/xmon/xmon.c Wed May 06 16:56:05 2009 +0100
+@@ -136,6 +136,7 @@
static int do_step(struct pt_regs *);
static void bpt_cmds(void);
static void cacheflush(void);
static int cpu_cmd(void);
static void csum(void);
static void bootcmds(void);
-@@ -194,6 +195,7 @@ Commands:\n\
+@@ -194,6 +195,7 @@
#endif
"\
C checksum\n\
d dump bytes\n\
di dump instructions\n\
df dump float values\n\
-@@ -808,6 +810,9 @@ cmds(struct pt_regs *excp)
+@@ -807,6 +809,9 @@
+ break;
case 'd':
dump();
- break;
++ break;
+ case 'D':
+ xmon_show_dmesg();
-+ break;
+ break;
case 'l':
symbol_lookup();
- break;
-@@ -2522,6 +2527,58 @@ static void xmon_print_symbol(unsigned l
+@@ -2522,6 +2527,58 @@
printf("%s", after);
}
#ifdef CONFIG_PPC64
static void dump_slb(void)
{
-diff -purN linux-2.6.27/arch/s390/Kconfig linux-2.6.27.19-5.1/arch/s390/Kconfig
---- linux-2.6.27/arch/s390/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/Kconfig 2009-03-25 16:10:51.000000000 +0000
-@@ -70,13 +70,18 @@ mainmenu "Linux Kernel Configuration"
+diff -r 9608d5473017 arch/s390/Kconfig
+--- a/arch/s390/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/Kconfig Wed May 06 16:56:05 2009 +0100
+@@ -70,12 +70,17 @@
config S390
def_bool y
+ select HAVE_ARCH_TRACEHOOK
source "init/Kconfig"
-
-+source "kernel/Kconfig.freezer"
+
++source "kernel/Kconfig.freezer"
+
menu "Base setup"
- comment "Processor type and features"
-@@ -222,6 +227,14 @@ config MARCH_Z9_109
+@@ -222,6 +227,14 @@
Class (z9 BC). The kernel will be slightly faster but will not
work on older machines such as the z990, z890, z900, and z800.
endchoice
config PACK_STACK
-@@ -342,16 +355,6 @@ config QDIO
+@@ -341,16 +354,6 @@
+ module will be called qdio.
If unsure, say Y.
-
+-
-config QDIO_DEBUG
- bool "Extended debugging information"
- depends on QDIO
- Warning: this option reduces the performance of the QDIO module.
-
- If unsure, say N.
--
+
config CHSC_SCH
tristate "Support for CHSC subchannels"
- help
-@@ -571,6 +574,15 @@ bool "s390 guest support (EXPERIMENTAL)"
+@@ -571,6 +574,15 @@
select VIRTIO_CONSOLE
help
Select this option if you want to run the kernel under s390 linux
endmenu
source "net/Kconfig"
-diff -purN linux-2.6.27/arch/s390/Makefile linux-2.6.27.19-5.1/arch/s390/Makefile
---- linux-2.6.27/arch/s390/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/Makefile 2009-03-25 16:10:52.000000000 +0000
-@@ -34,6 +34,7 @@ cflags-$(CONFIG_MARCH_G5) += $(call cc
+diff -r 9608d5473017 arch/s390/Makefile
+--- a/arch/s390/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/Makefile Wed May 06 16:56:05 2009 +0100
+@@ -34,6 +34,7 @@
cflags-$(CONFIG_MARCH_Z900) += $(call cc-option,-march=z900)
cflags-$(CONFIG_MARCH_Z990) += $(call cc-option,-march=z990)
cflags-$(CONFIG_MARCH_Z9_109) += $(call cc-option,-march=z9-109)
#KBUILD_IMAGE is necessary for make rpm
KBUILD_IMAGE :=arch/s390/boot/image
-diff -purN linux-2.6.27/arch/s390/appldata/appldata.h linux-2.6.27.19-5.1/arch/s390/appldata/appldata.h
---- linux-2.6.27/arch/s390/appldata/appldata.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/appldata/appldata.h 2009-03-25 16:10:52.000000000 +0000
+diff -r 9608d5473017 arch/s390/appldata/appldata.h
+--- a/arch/s390/appldata/appldata.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/appldata/appldata.h Wed May 06 16:56:05 2009 +0100
@@ -26,10 +26,6 @@
#define CTL_APPLDATA_NET_SUM 2125
#define CTL_APPLDATA_PROC 2126
struct appldata_ops {
struct list_head list;
struct ctl_table_header *sysctl_header;
-diff -purN linux-2.6.27/arch/s390/appldata/appldata_base.c linux-2.6.27.19-5.1/arch/s390/appldata/appldata_base.c
---- linux-2.6.27/arch/s390/appldata/appldata_base.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/appldata/appldata_base.c 2009-03-25 16:10:52.000000000 +0000
-@@ -10,6 +10,8 @@
+diff -r 9608d5473017 arch/s390/appldata/appldata_base.c
+--- a/arch/s390/appldata/appldata_base.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/appldata/appldata_base.c Wed May 06 16:56:05 2009 +0100
+@@ -9,6 +9,8 @@
+ *
* Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
*/
-
-+#define KMSG_COMPONENT "appldata"
+
++#define KMSG_COMPONENT "appldata"
+
#include <linux/module.h>
#include <linux/init.h>
- #include <linux/slab.h>
@@ -32,7 +34,6 @@
#include "appldata.h"
#define APPLDATA_CPU_INTERVAL 10000 /* default (CPU) time for
sampling interval in
milliseconds */
-@@ -390,8 +391,8 @@ appldata_generic_handler(ctl_table *ctl,
+@@ -390,8 +391,8 @@
(unsigned long) ops->data, ops->size,
ops->mod_lvl);
if (rc != 0) {
module_put(ops->owner);
} else
ops->active = 1;
-@@ -401,8 +402,8 @@ appldata_generic_handler(ctl_table *ctl,
+@@ -401,8 +402,8 @@
(unsigned long) ops->data, ops->size,
ops->mod_lvl);
if (rc != 0)
module_put(ops->owner);
}
spin_unlock(&appldata_ops_lock);
-diff -purN linux-2.6.27/arch/s390/appldata/appldata_os.c linux-2.6.27.19-5.1/arch/s390/appldata/appldata_os.c
---- linux-2.6.27/arch/s390/appldata/appldata_os.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/appldata/appldata_os.c 2009-03-25 16:10:52.000000000 +0000
-@@ -9,6 +9,8 @@
+diff -r 9608d5473017 arch/s390/appldata/appldata_os.c
+--- a/arch/s390/appldata/appldata_os.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/appldata/appldata_os.c Wed May 06 16:56:05 2009 +0100
+@@ -8,6 +8,8 @@
+ *
* Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
*/
-
-+#define KMSG_COMPONENT "appldata"
+
++#define KMSG_COMPONENT "appldata"
+
#include <linux/module.h>
#include <linux/init.h>
- #include <linux/slab.h>
@@ -22,7 +24,6 @@
#include "appldata.h"
#define LOAD_INT(x) ((x) >> FSHIFT)
#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
-@@ -143,21 +144,16 @@ static void appldata_get_os_data(void *d
+@@ -143,21 +144,16 @@
(unsigned long) ops.data, new_size,
ops.mod_lvl);
if (rc != 0)
}
ops.size = new_size;
}
-@@ -178,8 +174,8 @@ static int __init appldata_os_init(void)
+@@ -178,8 +174,8 @@
max_size = sizeof(struct appldata_os_data) +
(NR_CPUS * sizeof(struct appldata_os_per_cpu));
if (max_size > APPLDATA_MAX_REC_SIZE) {
rc = -ENOMEM;
goto out;
}
-diff -purN linux-2.6.27/arch/s390/boot/Makefile linux-2.6.27.19-5.1/arch/s390/boot/Makefile
---- linux-2.6.27/arch/s390/boot/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/boot/Makefile 2009-03-25 16:10:51.000000000 +0000
-@@ -8,7 +8,7 @@ COMPILE_VERSION := __linux_compile_versi
+diff -r 9608d5473017 arch/s390/boot/Makefile
+--- a/arch/s390/boot/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/boot/Makefile Wed May 06 16:56:05 2009 +0100
+@@ -8,7 +8,7 @@
EXTRA_CFLAGS := -DCOMPILE_VERSION=$(COMPILE_VERSION) -gstabs -I.
$(obj)/image: vmlinux FORCE
$(call if_changed,objcopy)
-diff -purN linux-2.6.27/arch/s390/boot/kerntypes.c linux-2.6.27.19-5.1/arch/s390/boot/kerntypes.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/boot/kerntypes.c 2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/boot/kerntypes.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/s390/boot/kerntypes.c Wed May 06 16:56:05 2009 +0100
@@ -0,0 +1,289 @@
+/*
+ * kerntypes.c
+
+/* include driver core private structures */
+#include "drivers/base/base.h"
-diff -purN linux-2.6.27/arch/s390/crypto/aes_s390.c linux-2.6.27.19-5.1/arch/s390/crypto/aes_s390.c
---- linux-2.6.27/arch/s390/crypto/aes_s390.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/crypto/aes_s390.c 2009-03-25 16:10:51.000000000 +0000
-@@ -17,6 +17,8 @@
+diff -r 9608d5473017 arch/s390/crypto/aes_s390.c
+--- a/arch/s390/crypto/aes_s390.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/crypto/aes_s390.c Wed May 06 16:56:05 2009 +0100
+@@ -16,6 +16,8 @@
+ * any later version.
*
*/
-
-+#define KMSG_COMPONENT "aes_s390"
+
++#define KMSG_COMPONENT "aes_s390"
+
#include <crypto/aes.h>
#include <crypto/algapi.h>
- #include <linux/err.h>
-@@ -169,7 +171,8 @@ static int fallback_init_cip(struct cryp
+@@ -169,7 +171,8 @@
CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK);
if (IS_ERR(sctx->fallback.cip)) {
return PTR_ERR(sctx->fallback.blk);
}
-@@ -349,7 +352,8 @@ static int fallback_init_blk(struct cryp
+@@ -349,7 +352,8 @@
CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK);
if (IS_ERR(sctx->fallback.blk)) {
return PTR_ERR(sctx->fallback.blk);
}
-@@ -515,9 +519,8 @@ static int __init aes_s390_init(void)
+@@ -515,9 +519,8 @@
/* z9 109 and z9 BC/EC only support 128 bit key length */
if (keylen_flag == AES_KEYLEN_128)
ret = crypto_register_alg(&aes_alg);
if (ret)
-diff -purN linux-2.6.27/arch/s390/hypfs/hypfs_diag.c linux-2.6.27.19-5.1/arch/s390/hypfs/hypfs_diag.c
---- linux-2.6.27/arch/s390/hypfs/hypfs_diag.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/hypfs/hypfs_diag.c 2009-03-25 16:10:52.000000000 +0000
-@@ -3,10 +3,12 @@
+diff -r 9608d5473017 arch/s390/hypfs/hypfs_diag.c
+--- a/arch/s390/hypfs/hypfs_diag.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/hypfs/hypfs_diag.c Wed May 06 16:56:05 2009 +0100
+@@ -3,9 +3,11 @@
* Hypervisor filesystem for Linux on s390. Diag 204 and 224
* implementation.
*
+ * Copyright IBM Corp. 2006, 2008
* Author(s): Michael Holzheu <holzheu@de.ibm.com>
*/
-
-+#define KMSG_COMPONENT "hypfs"
+
++#define KMSG_COMPONENT "hypfs"
+
#include <linux/types.h>
#include <linux/errno.h>
- #include <linux/string.h>
-@@ -527,13 +529,14 @@ __init int hypfs_diag_init(void)
+@@ -527,13 +529,14 @@
int rc;
if (diag204_probe()) {
}
return rc;
}
-diff -purN linux-2.6.27/arch/s390/hypfs/inode.c linux-2.6.27.19-5.1/arch/s390/hypfs/inode.c
---- linux-2.6.27/arch/s390/hypfs/inode.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/hypfs/inode.c 2009-03-25 16:10:52.000000000 +0000
-@@ -2,10 +2,12 @@
+diff -r 9608d5473017 arch/s390/hypfs/inode.c
+--- a/arch/s390/hypfs/inode.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/hypfs/inode.c Wed May 06 16:56:05 2009 +0100
+@@ -2,9 +2,11 @@
* arch/s390/hypfs/inode.c
* Hypervisor filesystem for Linux on s390.
*
+ * Copyright IBM Corp. 2006, 2008
* Author(s): Michael Holzheu <holzheu@de.ibm.com>
*/
-
-+#define KMSG_COMPONENT "hypfs"
+
++#define KMSG_COMPONENT "hypfs"
+
#include <linux/types.h>
#include <linux/errno.h>
- #include <linux/fs.h>
-@@ -200,7 +202,7 @@ static ssize_t hypfs_aio_write(struct ki
+@@ -200,7 +202,7 @@
else
rc = hypfs_diag_create_files(sb, sb->s_root);
if (rc) {
hypfs_delete_tree(sb->s_root);
goto out;
}
-@@ -252,8 +254,7 @@ static int hypfs_parse_options(char *opt
+@@ -252,8 +254,7 @@
break;
case opt_err:
default:
return -EINVAL;
}
}
-@@ -317,7 +318,7 @@ static int hypfs_fill_super(struct super
+@@ -317,7 +318,7 @@
}
hypfs_update_update(sb);
sb->s_root = root_dentry;
return 0;
err_tree:
-@@ -513,7 +514,7 @@ fail_sysfs:
+@@ -513,7 +514,7 @@
if (!MACHINE_IS_VM)
hypfs_diag_exit();
fail_diag:
return rc;
}
-diff -purN linux-2.6.27/arch/s390/include/asm/dasd.h linux-2.6.27.19-5.1/arch/s390/include/asm/dasd.h
---- linux-2.6.27/arch/s390/include/asm/dasd.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/dasd.h 2009-03-25 16:10:52.000000000 +0000
+diff -r 9608d5473017 arch/s390/include/asm/dasd.h
+--- a/arch/s390/include/asm/dasd.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/dasd.h Wed May 06 16:56:05 2009 +0100
@@ -3,6 +3,8 @@
* Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
* Bugreports.to..: <Linux390@de.ibm.com>
*
* This file is the interface of the DASD device driver, which is exported to user space
* any future changes wrt the API will result in a change of the APIVERSION reported
-@@ -76,6 +78,7 @@ typedef struct dasd_information2_t {
+@@ -76,6 +78,7 @@
#define DASD_FEATURE_USEDIAG 0x02
#define DASD_FEATURE_INITIAL_ONLINE 0x04
#define DASD_FEATURE_ERPLOG 0x08
#define DASD_PARTN_BITS 2
-@@ -202,6 +205,16 @@ typedef struct attrib_data_t {
+@@ -202,6 +205,16 @@
#define DASD_SEQ_PRESTAGE 0x4
#define DASD_REC_ACCESS 0x5
/********************************************************************************
* SECTION: Definition of IOCTLs
-@@ -247,6 +260,7 @@ typedef struct attrib_data_t {
+@@ -247,6 +260,7 @@
/* Set Attributes (cache operations) */
#define BIODASDSATTR _IOW(DASD_IOCTL_LETTER,2,attrib_data_t)
#endif /* DASD_H */
-diff -purN linux-2.6.27/arch/s390/include/asm/elf.h linux-2.6.27.19-5.1/arch/s390/include/asm/elf.h
---- linux-2.6.27/arch/s390/include/asm/elf.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/elf.h 2009-03-25 16:10:52.000000000 +0000
-@@ -168,16 +168,16 @@ extern char elf_platform[];
+diff -r 9608d5473017 arch/s390/include/asm/elf.h
+--- a/arch/s390/include/asm/elf.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/elf.h Wed May 06 16:56:05 2009 +0100
+@@ -168,16 +168,16 @@
#ifndef __s390x__
#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
#else /* __s390x__ */
} while (0)
#endif /* __s390x__ */
-diff -purN linux-2.6.27/arch/s390/include/asm/fcx.h linux-2.6.27.19-5.1/arch/s390/include/asm/fcx.h
---- linux-2.6.27/arch/s390/include/asm/fcx.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/fcx.h 2009-03-25 16:10:52.000000000 +0000
-@@ -248,8 +248,8 @@ struct dcw {
+diff -r 9608d5473017 arch/s390/include/asm/fcx.h
+--- a/arch/s390/include/asm/fcx.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/fcx.h Wed May 06 16:56:06 2009 +0100
+@@ -248,8 +248,8 @@
#define TCCB_MAX_SIZE (sizeof(struct tccb_tcah) + \
TCCB_MAX_DCW * sizeof(struct dcw) + \
sizeof(struct tccb_tcat))
/**
* struct tccb_tcah - Transport-Command-Area Header (TCAH)
-diff -purN linux-2.6.27/arch/s390/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/s390/include/asm/ioctls.h
---- linux-2.6.27/arch/s390/include/asm/ioctls.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/ioctls.h 2009-03-25 16:10:52.000000000 +0000
+diff -r 9608d5473017 arch/s390/include/asm/ioctls.h
+--- a/arch/s390/include/asm/ioctls.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/ioctls.h Wed May 06 16:56:06 2009 +0100
@@ -60,6 +60,7 @@
#define TCSETSF2 _IOW('T',0x2D, struct termios2)
#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
#define FIOCLEX 0x5451
-diff -purN linux-2.6.27/arch/s390/include/asm/ptrace.h linux-2.6.27.19-5.1/arch/s390/include/asm/ptrace.h
---- linux-2.6.27/arch/s390/include/asm/ptrace.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/ptrace.h 2009-03-25 16:10:52.000000000 +0000
-@@ -321,8 +321,8 @@ struct pt_regs
+diff -r 9608d5473017 arch/s390/include/asm/ptrace.h
+--- a/arch/s390/include/asm/ptrace.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/ptrace.h Wed May 06 16:56:06 2009 +0100
+@@ -321,8 +321,8 @@
psw_t psw;
unsigned long gprs[NUM_GPRS];
unsigned long orig_gpr2;
};
#endif
-@@ -490,6 +490,7 @@ extern void user_disable_single_step(str
+@@ -490,6 +490,7 @@
#define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0)
#define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN)
#define regs_return_value(regs)((regs)->gprs[2])
#define profile_pc(regs) instruction_pointer(regs)
extern void show_regs(struct pt_regs * regs);
-diff -purN linux-2.6.27/arch/s390/include/asm/qdio.h linux-2.6.27.19-5.1/arch/s390/include/asm/qdio.h
---- linux-2.6.27/arch/s390/include/asm/qdio.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/qdio.h 2009-03-25 16:10:52.000000000 +0000
-@@ -367,16 +367,16 @@ struct qdio_initialize {
+diff -r 9608d5473017 arch/s390/include/asm/qdio.h
+--- a/arch/s390/include/asm/qdio.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/qdio.h Wed May 06 16:56:06 2009 +0100
+@@ -367,16 +367,16 @@
#define QDIO_FLAG_SYNC_OUTPUT 0x02
#define QDIO_FLAG_PCI_OUT 0x10
+extern int qdio_get_ssqd_desc(struct ccw_device *dev, struct qdio_ssqd_desc*);
#endif /* __QDIO_H__ */
-diff -purN linux-2.6.27/arch/s390/include/asm/setup.h linux-2.6.27.19-5.1/arch/s390/include/asm/setup.h
---- linux-2.6.27/arch/s390/include/asm/setup.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/setup.h 2009-03-25 16:10:52.000000000 +0000
-@@ -43,6 +43,8 @@ struct mem_chunk {
+diff -r 9608d5473017 arch/s390/include/asm/setup.h
+--- a/arch/s390/include/asm/setup.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/setup.h Wed May 06 16:56:06 2009 +0100
+@@ -43,6 +43,8 @@
extern struct mem_chunk memory_chunk[];
extern unsigned long real_memory_size;
void detect_memory_layout(struct mem_chunk chunk[]);
-diff -purN linux-2.6.27/arch/s390/include/asm/sigp.h linux-2.6.27.19-5.1/arch/s390/include/asm/sigp.h
---- linux-2.6.27/arch/s390/include/asm/sigp.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/sigp.h 2009-03-25 16:10:52.000000000 +0000
-@@ -61,6 +61,7 @@ typedef enum
+diff -r 9608d5473017 arch/s390/include/asm/sigp.h
+--- a/arch/s390/include/asm/sigp.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/sigp.h Wed May 06 16:56:06 2009 +0100
+@@ -61,6 +61,7 @@
{
ec_schedule=0,
ec_call_function,
ec_bit_last
} ec_bit_sig;
-diff -purN linux-2.6.27/arch/s390/include/asm/smp.h linux-2.6.27.19-5.1/arch/s390/include/asm/smp.h
---- linux-2.6.27/arch/s390/include/asm/smp.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/smp.h 2009-03-25 16:10:52.000000000 +0000
-@@ -91,8 +91,9 @@ extern int __cpu_up (unsigned int cpu);
+diff -r 9608d5473017 arch/s390/include/asm/smp.h
+--- a/arch/s390/include/asm/smp.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/smp.h Wed May 06 16:56:06 2009 +0100
+@@ -91,8 +91,9 @@
extern struct mutex smp_cpu_state_mutex;
extern int smp_cpu_polarization[];
#endif
#ifndef CONFIG_SMP
-diff -purN linux-2.6.27/arch/s390/include/asm/spinlock.h linux-2.6.27.19-5.1/arch/s390/include/asm/spinlock.h
---- linux-2.6.27/arch/s390/include/asm/spinlock.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/spinlock.h 2009-03-25 16:10:52.000000000 +0000
-@@ -172,6 +172,9 @@ static inline int __raw_write_trylock(ra
+diff -r 9608d5473017 arch/s390/include/asm/spinlock.h
+--- a/arch/s390/include/asm/spinlock.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/spinlock.h Wed May 06 16:56:06 2009 +0100
+@@ -172,6 +172,9 @@
return _raw_write_trylock_retry(rw);
}
#define _raw_read_relax(lock) cpu_relax()
#define _raw_write_relax(lock) cpu_relax()
-diff -purN linux-2.6.27/arch/s390/include/asm/syscall.h linux-2.6.27.19-5.1/arch/s390/include/asm/syscall.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/syscall.h 2009-03-25 16:10:52.000000000 +0000
+diff -r 9608d5473017 arch/s390/include/asm/syscall.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/s390/include/asm/syscall.h Wed May 06 16:56:06 2009 +0100
@@ -0,0 +1,78 @@
+/*
+ * Access to user system call parameters and results
+}
+
+#endif /* _ASM_SYSCALL_H */
-diff -purN linux-2.6.27/arch/s390/include/asm/thread_info.h linux-2.6.27.19-5.1/arch/s390/include/asm/thread_info.h
---- linux-2.6.27/arch/s390/include/asm/thread_info.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/thread_info.h 2009-03-25 16:10:52.000000000 +0000
-@@ -86,6 +86,7 @@ static inline struct thread_info *curren
+diff -r 9608d5473017 arch/s390/include/asm/thread_info.h
+--- a/arch/s390/include/asm/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/thread_info.h Wed May 06 16:56:06 2009 +0100
+@@ -86,6 +86,7 @@
* thread information flags bit numbers
*/
#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
#define TIF_SIGPENDING 2 /* signal pending */
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
#define TIF_RESTART_SVC 4 /* restart svc with new svc number */
-@@ -98,8 +99,10 @@ static inline struct thread_info *curren
+@@ -98,8 +99,10 @@
#define TIF_31BIT 18 /* 32bit process */
#define TIF_MEMDIE 19
#define TIF_RESTORE_SIGMASK 20 /* restore signal mask in do_signal() */
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
-@@ -110,6 +113,7 @@ static inline struct thread_info *curren
+@@ -110,6 +113,7 @@
#define _TIF_USEDFPU (1<<TIF_USEDFPU)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_31BIT (1<<TIF_31BIT)
#endif /* __KERNEL__ */
-diff -purN linux-2.6.27/arch/s390/include/asm/tlb.h linux-2.6.27.19-5.1/arch/s390/include/asm/tlb.h
---- linux-2.6.27/arch/s390/include/asm/tlb.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/tlb.h 2009-03-25 16:10:52.000000000 +0000
-@@ -34,6 +34,19 @@
+diff -r 9608d5473017 arch/s390/include/asm/tlb.h
+--- a/arch/s390/include/asm/tlb.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/tlb.h Wed May 06 16:56:06 2009 +0100
+@@ -32,6 +32,19 @@
+ #define TLB_NR_PTRS 1
+ #else
#define TLB_NR_PTRS 508
- #endif
-
++#endif
++
+/* Lifted from asm-generic/tlb.h; Is used by patches.suse/unmap_vmas-lat */
+/*
+ * For UP we don't need to worry about TLB flush
+#else
+ #define FREE_PTE_NR 1
+ #define tlb_fast_mode(tlb) 1
-+#endif
-+
+ #endif
+
struct mmu_gather {
- struct mm_struct *mm;
- unsigned int fullmm;
-diff -purN linux-2.6.27/arch/s390/include/asm/topology.h linux-2.6.27.19-5.1/arch/s390/include/asm/topology.h
---- linux-2.6.27/arch/s390/include/asm/topology.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/topology.h 2009-03-25 16:10:52.000000000 +0000
-@@ -28,6 +28,8 @@ static inline void s390_init_cpu_topolog
+diff -r 9608d5473017 arch/s390/include/asm/topology.h
+--- a/arch/s390/include/asm/topology.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/topology.h Wed May 06 16:56:06 2009 +0100
+@@ -28,6 +28,8 @@
};
#endif
#include <asm-generic/topology.h>
#endif /* _ASM_S390_TOPOLOGY_H */
-diff -purN linux-2.6.27/arch/s390/kernel/Makefile linux-2.6.27.19-5.1/arch/s390/kernel/Makefile
---- linux-2.6.27/arch/s390/kernel/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/Makefile 2009-03-25 16:10:51.000000000 +0000
-@@ -12,8 +12,8 @@ CFLAGS_smp.o := -Wno-nonnull
+diff -r 9608d5473017 arch/s390/kernel/Makefile
+--- a/arch/s390/kernel/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/Makefile Wed May 06 16:56:06 2009 +0100
+@@ -12,8 +12,8 @@
#
CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
s390_ext.o debug.o irq.o ipl.o dis.o diag.o mem_detect.o
obj-y += $(if $(CONFIG_64BIT),entry64.o,entry.o)
-diff -purN linux-2.6.27/arch/s390/kernel/asm-offsets.c linux-2.6.27.19-5.1/arch/s390/kernel/asm-offsets.c
---- linux-2.6.27/arch/s390/kernel/asm-offsets.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/asm-offsets.c 2009-03-25 16:10:51.000000000 +0000
-@@ -32,7 +32,7 @@ int main(void)
+diff -r 9608d5473017 arch/s390/kernel/asm-offsets.c
+--- a/arch/s390/kernel/asm-offsets.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/asm-offsets.c Wed May 06 16:56:06 2009 +0100
+@@ -32,7 +32,7 @@
DEFINE(__PT_GPRS, offsetof(struct pt_regs, gprs));
DEFINE(__PT_ORIG_GPR2, offsetof(struct pt_regs, orig_gpr2));
DEFINE(__PT_ILC, offsetof(struct pt_regs, ilc));
DEFINE(__PT_SIZE, sizeof(struct pt_regs));
BLANK();
DEFINE(__SF_BACKCHAIN, offsetof(struct stack_frame, back_chain));
-diff -purN linux-2.6.27/arch/s390/kernel/compat_signal.c linux-2.6.27.19-5.1/arch/s390/kernel/compat_signal.c
---- linux-2.6.27/arch/s390/kernel/compat_signal.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/compat_signal.c 2009-03-25 16:10:51.000000000 +0000
-@@ -340,7 +340,7 @@ static int restore_sigregs32(struct pt_r
+diff -r 9608d5473017 arch/s390/kernel/compat_signal.c
+--- a/arch/s390/kernel/compat_signal.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/compat_signal.c Wed May 06 16:56:06 2009 +0100
+@@ -340,7 +340,7 @@
return err;
restore_fp_regs(¤t->thread.fp_regs);
return 0;
}
-diff -purN linux-2.6.27/arch/s390/kernel/compat_wrapper.S linux-2.6.27.19-5.1/arch/s390/kernel/compat_wrapper.S
---- linux-2.6.27/arch/s390/kernel/compat_wrapper.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/compat_wrapper.S 2009-03-25 16:10:51.000000000 +0000
-@@ -549,7 +549,7 @@ sys32_setdomainname_wrapper:
+diff -r 9608d5473017 arch/s390/kernel/compat_wrapper.S
+--- a/arch/s390/kernel/compat_wrapper.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/compat_wrapper.S Wed May 06 16:56:06 2009 +0100
+@@ -549,7 +549,7 @@
.globl sys32_newuname_wrapper
sys32_newuname_wrapper:
llgtr %r2,%r2 # struct new_utsname *
.globl compat_sys_adjtimex_wrapper
compat_sys_adjtimex_wrapper:
-@@ -617,7 +617,7 @@ sys32_sysfs_wrapper:
+@@ -617,7 +617,7 @@
.globl sys32_personality_wrapper
sys32_personality_wrapper:
llgfr %r2,%r2 # unsigned long
.globl sys32_setfsuid16_wrapper
sys32_setfsuid16_wrapper:
-@@ -1769,3 +1769,41 @@ sys_dup3_wrapper:
+@@ -1769,3 +1769,41 @@
sys_epoll_create1_wrapper:
lgfr %r2,%r2 # int
jg sys_epoll_create1 # branch to system call
+ llgfr %r5,%r5 # u32
+ llgfr %r6,%r6 # u32
+ jg compat_sys_keyctl # branch to system call
-diff -purN linux-2.6.27/arch/s390/kernel/cpcmd.c linux-2.6.27.19-5.1/arch/s390/kernel/cpcmd.c
---- linux-2.6.27/arch/s390/kernel/cpcmd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/cpcmd.c 2009-03-25 16:10:51.000000000 +0000
-@@ -7,6 +7,8 @@
+diff -r 9608d5473017 arch/s390/kernel/cpcmd.c
+--- a/arch/s390/kernel/cpcmd.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/cpcmd.c Wed May 06 16:56:06 2009 +0100
+@@ -6,6 +6,8 @@
+ * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
* Christian Borntraeger (cborntra@de.ibm.com),
*/
-
-+#define KMSG_COMPONENT "cpcmd"
+
++#define KMSG_COMPONENT "cpcmd"
+
#include <linux/kernel.h>
#include <linux/module.h>
- #include <linux/slab.h>
-@@ -104,8 +106,8 @@ int cpcmd(const char *cmd, char *respons
+@@ -104,8 +106,8 @@
(((unsigned long)response + rlen) >> 31)) {
lowbuf = kmalloc(rlen, GFP_KERNEL | GFP_DMA);
if (!lowbuf) {
return -ENOMEM;
}
spin_lock_irqsave(&cpcmd_lock, flags);
-diff -purN linux-2.6.27/arch/s390/kernel/debug.c linux-2.6.27.19-5.1/arch/s390/kernel/debug.c
---- linux-2.6.27/arch/s390/kernel/debug.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/debug.c 2009-03-25 16:10:51.000000000 +0000
-@@ -10,6 +10,8 @@
+diff -r 9608d5473017 arch/s390/kernel/debug.c
+--- a/arch/s390/kernel/debug.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/debug.c Wed May 06 16:56:06 2009 +0100
+@@ -9,6 +9,8 @@
+ *
* Bugreports to: <Linux390@de.ibm.com>
*/
-
-+#define KMSG_COMPONENT "s390dbf"
+
++#define KMSG_COMPONENT "s390dbf"
+
#include <linux/stddef.h>
#include <linux/kernel.h>
- #include <linux/errno.h>
-@@ -693,8 +695,8 @@ debug_info_t *debug_register_mode(const
+@@ -693,8 +695,8 @@
/* Since debugfs currently does not support uid/gid other than root, */
/* we do not allow gid/uid != 0 until we get support for that. */
if ((uid != 0) || (gid != 0))
if (!initialized)
BUG();
mutex_lock(&debug_mutex);
-@@ -709,7 +711,7 @@ debug_info_t *debug_register_mode(const
+@@ -709,7 +711,7 @@
debug_register_view(rc, &debug_pages_view);
out:
if (!rc){
}
mutex_unlock(&debug_mutex);
return rc;
-@@ -763,8 +765,8 @@ debug_set_size(debug_info_t* id, int nr_
+@@ -763,8 +765,8 @@
if(pages_per_area > 0){
new_areas = debug_areas_alloc(pages_per_area, nr_areas);
if(!new_areas) {
rc = -ENOMEM;
goto out;
}
-@@ -780,8 +782,7 @@ debug_set_size(debug_info_t* id, int nr_
+@@ -780,8 +782,7 @@
memset(id->active_entries,0,sizeof(int)*id->nr_areas);
memset(id->active_pages, 0, sizeof(int)*id->nr_areas);
spin_unlock_irqrestore(&id->lock,flags);
out:
return rc;
}
-@@ -800,10 +801,9 @@ debug_set_level(debug_info_t* id, int ne
+@@ -800,10 +801,9 @@
spin_lock_irqsave(&id->lock,flags);
if(new_level == DEBUG_OFF_LEVEL){
id->level = DEBUG_OFF_LEVEL;
id->name, new_level, 0, DEBUG_MAX_LEVEL);
} else {
id->level = new_level;
-@@ -1108,8 +1108,8 @@ debug_register_view(debug_info_t * id, s
+@@ -1108,8 +1108,8 @@
pde = debugfs_create_file(view->name, mode, id->debugfs_root_entry,
id , &debug_file_ops);
if (!pde){
rc = -1;
goto out;
}
-@@ -1119,10 +1119,8 @@ debug_register_view(debug_info_t * id, s
+@@ -1119,10 +1119,8 @@
break;
}
if (i == DEBUG_MAX_VIEWS) {
debugfs_remove(pde);
rc = -1;
} else {
-@@ -1303,7 +1301,8 @@ debug_input_level_fn(debug_info_t * id,
+@@ -1303,7 +1301,8 @@
new_level = debug_get_uint(str);
}
if(new_level < 0) {
rc = -EINVAL;
} else {
debug_set_level(id, new_level);
-@@ -1380,7 +1379,8 @@ debug_input_flush_fn(debug_info_t * id,
+@@ -1380,7 +1379,8 @@
goto out;
}
out:
*offset += user_len;
-diff -purN linux-2.6.27/arch/s390/kernel/entry.S linux-2.6.27.19-5.1/arch/s390/kernel/entry.S
---- linux-2.6.27/arch/s390/kernel/entry.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/entry.S 2009-03-25 16:10:51.000000000 +0000
-@@ -46,12 +46,12 @@ SP_R14 = STACK_FRAME_OVERHEAD + __P
+diff -r 9608d5473017 arch/s390/kernel/entry.S
+--- a/arch/s390/kernel/entry.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/entry.S Wed May 06 16:56:06 2009 +0100
+@@ -46,12 +46,12 @@
SP_R15 = STACK_FRAME_OVERHEAD + __PT_GPRS + 60
SP_ORIG_R2 = STACK_FRAME_OVERHEAD + __PT_ORIG_GPR2
SP_ILC = STACK_FRAME_OVERHEAD + __PT_ILC
_TIF_MCCK_PENDING)
STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER
-@@ -180,11 +180,10 @@ STACK_SIZE = 1 << STACK_SHIFT
+@@ -180,11 +180,10 @@
.macro CREATE_STACK_FRAME psworg,savearea
s %r15,BASED(.Lc_spsize) # make room for registers & psw
mvc SP_PSW(8,%r15),0(%r12) # move user PSW to stack
mvc SP_R12(16,%r15),\savearea # move %r12-%r15 to stack
la %r12,0
st %r12,__SF_BACKCHAIN(%r15) # clear back chain
-@@ -261,16 +260,17 @@ sysc_update:
+@@ -261,16 +260,17 @@
#endif
sysc_do_svc:
l %r9,__LC_THREAD_INFO # load pointer to thread_info struct
l %r8,BASED(.Lsysc_table)
tm __TI_flags+3(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
l %r8,0(%r7,%r8) # get system call addr.
-@@ -318,6 +318,8 @@ sysc_work:
+@@ -318,6 +318,8 @@
bo BASED(sysc_reschedule)
tm __TI_flags+3(%r9),_TIF_SIGPENDING
bnz BASED(sysc_sigpending)
tm __TI_flags+3(%r9),_TIF_RESTART_SVC
bo BASED(sysc_restart)
tm __TI_flags+3(%r9),_TIF_SINGLE_STEP
-@@ -356,12 +358,21 @@ sysc_sigpending:
+@@ -356,12 +358,21 @@
b BASED(sysc_work_loop)
#
mvc SP_R2(4,%r15),SP_ORIG_R2(%r15) # restore first argument
lm %r2,%r6,SP_R2(%r15) # load svc arguments
b BASED(sysc_do_restart) # restart svc
-@@ -371,27 +382,29 @@ sysc_restart:
+@@ -371,27 +382,29 @@
#
sysc_singlestep:
ni __TI_flags+3(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP
l %r8,0(%r7,%r8)
sysc_tracego:
lm %r3,%r6,SP_R3(%r15)
-@@ -401,9 +414,8 @@ sysc_tracego:
+@@ -401,9 +414,8 @@
sysc_tracenogo:
tm __TI_flags+3(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
bz BASED(sysc_return)
la %r14,BASED(sysc_return)
br %r1
-@@ -571,7 +583,8 @@ pgm_svcper:
+@@ -571,7 +583,8 @@
# per was called from kernel, must be kprobes
#
kernel_per:
la %r2,SP_PTREGS(%r15) # address of register-save area
l %r1,BASED(.Lhandle_per) # load adr. of per handler
la %r14,BASED(sysc_restore)# load adr. of system return
-@@ -666,6 +679,8 @@ io_work_loop:
+@@ -666,6 +679,8 @@
bo BASED(io_reschedule)
tm __TI_flags+3(%r9),_TIF_SIGPENDING
bnz BASED(io_sigpending)
b BASED(io_restore)
io_work_done:
-@@ -704,6 +719,19 @@ io_sigpending:
- TRACE_IRQS_OFF
- b BASED(io_work_loop)
-
+@@ -699,6 +714,19 @@
+ stosm __SF_EMPTY(%r15),0x03 # reenable interrupts
+ la %r2,SP_PTREGS(%r15) # load pt_regs
+ l %r1,BASED(.Ldo_signal)
++ basr %r14,%r1 # call do_signal
++ stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts
++ TRACE_IRQS_OFF
++ b BASED(io_work_loop)
++
+#
+# _TIF_SIGPENDING is set, call do_signal
+#
+ stosm __SF_EMPTY(%r15),0x03 # reenable interrupts
+ la %r2,SP_PTREGS(%r15) # load pt_regs
+ l %r1,BASED(.Ldo_notify_resume)
-+ basr %r14,%r1 # call do_signal
-+ stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts
-+ TRACE_IRQS_OFF
-+ b BASED(io_work_loop)
-+
- /*
- * External interrupt handler routine
- */
-@@ -1070,6 +1098,8 @@ cleanup_io_leave_insn:
+ basr %r14,%r1 # call do_signal
+ stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts
+ TRACE_IRQS_OFF
+@@ -1070,6 +1098,8 @@
.Ldo_IRQ: .long do_IRQ
.Ldo_extint: .long do_extint
.Ldo_signal: .long do_signal
.Lhandle_per: .long do_single_step
.Ldo_execve: .long do_execve
.Lexecve_tail: .long execve_tail
-@@ -1079,7 +1109,8 @@ cleanup_io_leave_insn:
+@@ -1079,7 +1109,8 @@
.Lpreempt_schedule_irq:
.long preempt_schedule_irq
#endif
.Lschedtail: .long schedule_tail
.Lsysc_table: .long sys_call_table
#ifdef CONFIG_TRACE_IRQFLAGS
-diff -purN linux-2.6.27/arch/s390/kernel/entry.h linux-2.6.27.19-5.1/arch/s390/kernel/entry.h
---- linux-2.6.27/arch/s390/kernel/entry.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/entry.h 2009-03-25 16:10:51.000000000 +0000
-@@ -30,23 +30,23 @@ struct fadvise64_64_args;
+diff -r 9608d5473017 arch/s390/kernel/entry.h
+--- a/arch/s390/kernel/entry.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/entry.h Wed May 06 16:56:06 2009 +0100
+@@ -30,23 +30,23 @@
struct old_sigaction;
struct sel_arg_struct;
long sys_sigaction(int sig, const struct old_sigaction __user *act,
struct old_sigaction __user *oact);
long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss);
-diff -purN linux-2.6.27/arch/s390/kernel/entry64.S linux-2.6.27.19-5.1/arch/s390/kernel/entry64.S
---- linux-2.6.27/arch/s390/kernel/entry64.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/entry64.S 2009-03-25 16:10:51.000000000 +0000
-@@ -46,15 +46,15 @@ SP_R14 = STACK_FRAME_OVERHEAD + __P
+diff -r 9608d5473017 arch/s390/kernel/entry64.S
+--- a/arch/s390/kernel/entry64.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/entry64.S Wed May 06 16:56:06 2009 +0100
+@@ -46,15 +46,15 @@
SP_R15 = STACK_FRAME_OVERHEAD + __PT_GPRS + 120
SP_ORIG_R2 = STACK_FRAME_OVERHEAD + __PT_ORIG_GPR2
SP_ILC = STACK_FRAME_OVERHEAD + __PT_ILC
_TIF_MCCK_PENDING)
#define BASED(name) name-system_call(%r13)
-@@ -168,11 +168,10 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_
+@@ -168,11 +168,10 @@
.macro CREATE_STACK_FRAME psworg,savearea
aghi %r15,-SP_SIZE # make room for registers & psw
mvc SP_PSW(16,%r15),0(%r12) # move user PSW to stack
mvc SP_R12(32,%r15),\savearea # move %r12-%r15 to stack
la %r12,0
stg %r12,__SF_BACKCHAIN(%r15)
-@@ -247,16 +246,17 @@ sysc_update:
+@@ -247,16 +246,17 @@
#endif
sysc_do_svc:
lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct
larl %r10,sys_call_table
#ifdef CONFIG_COMPAT
tm __TI_flags+5(%r9),(_TIF_31BIT>>16) # running in 31 bit mode ?
-@@ -310,6 +310,8 @@ sysc_work:
+@@ -310,6 +310,8 @@
jo sysc_reschedule
tm __TI_flags+7(%r9),_TIF_SIGPENDING
jnz sysc_sigpending
tm __TI_flags+7(%r9),_TIF_RESTART_SVC
jo sysc_restart
tm __TI_flags+7(%r9),_TIF_SINGLE_STEP
-@@ -345,12 +347,19 @@ sysc_sigpending:
+@@ -345,12 +347,19 @@
j sysc_work_loop
#
mvc SP_R2(8,%r15),SP_ORIG_R2(%r15) # restore first argument
lmg %r2,%r6,SP_R2(%r15) # load svc arguments
j sysc_do_restart # restart svc
-@@ -359,28 +368,26 @@ sysc_restart:
+@@ -359,28 +368,26 @@
# _TIF_SINGLE_STEP is set, call do_single_step
#
sysc_singlestep:
lgf %r8,0(%r7,%r10)
sysc_tracego:
lmg %r3,%r6,SP_R3(%r15)
-@@ -391,9 +398,8 @@ sysc_tracenogo:
+@@ -391,9 +398,8 @@
tm __TI_flags+7(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
jz sysc_return
la %r2,SP_PTREGS(%r15) # load pt_regs
#
# a new process exits the kernel with ret_from_fork
-@@ -556,8 +562,7 @@ pgm_svcper:
+@@ -556,8 +562,7 @@
# per was called from kernel, must be kprobes
#
kernel_per:
la %r2,SP_PTREGS(%r15) # address of register-save area
larl %r14,sysc_restore # load adr. of system ret, no work
jg do_single_step # branch to do_single_step
-@@ -672,6 +677,8 @@ io_work_loop:
+@@ -672,6 +677,8 @@
jo io_reschedule
tm __TI_flags+7(%r9),_TIF_SIGPENDING
jnz io_sigpending
j io_restore
io_work_done:
-@@ -712,6 +719,18 @@ io_sigpending:
- TRACE_IRQS_OFF
- j io_work_loop
-
+@@ -708,6 +715,18 @@
+ stosm __SF_EMPTY(%r15),0x03 # reenable interrupts
+ la %r2,SP_PTREGS(%r15) # load pt_regs
+ brasl %r14,do_signal # call do_signal
++ stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts
++ TRACE_IRQS_OFF
++ j io_work_loop
++
+#
+# _TIF_NOTIFY_RESUME or is set, call do_notify_resume
+#
+ stosm __SF_EMPTY(%r15),0x03 # reenable interrupts
+ la %r2,SP_PTREGS(%r15) # load pt_regs
+ brasl %r14,do_notify_resume # call do_notify_resume
-+ stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts
-+ TRACE_IRQS_OFF
-+ j io_work_loop
-+
- /*
- * External interrupt handler routine
- */
-diff -purN linux-2.6.27/arch/s390/kernel/head.S linux-2.6.27.19-5.1/arch/s390/kernel/head.S
---- linux-2.6.27/arch/s390/kernel/head.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/head.S 2009-03-25 16:10:51.000000000 +0000
-@@ -461,6 +461,55 @@ start:
+ stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts
+ TRACE_IRQS_OFF
+ j io_work_loop
+diff -r 9608d5473017 arch/s390/kernel/head.S
+--- a/arch/s390/kernel/head.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/head.S Wed May 06 16:56:06 2009 +0100
+@@ -461,6 +461,55 @@
.byte 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7
.byte 0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff
#ifdef CONFIG_64BIT
#include "head64.S"
#else
-diff -purN linux-2.6.27/arch/s390/kernel/head31.S linux-2.6.27.19-5.1/arch/s390/kernel/head31.S
---- linux-2.6.27/arch/s390/kernel/head31.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/head31.S 2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/kernel/head31.S
+--- a/arch/s390/kernel/head31.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/head31.S Wed May 06 16:56:06 2009 +0100
@@ -10,34 +10,13 @@
*
*/
lctl %c0,%c15,.Lctl-.LPG1(%r13) # load control registers
l %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area
# move IPL device to lowcore
-diff -purN linux-2.6.27/arch/s390/kernel/head64.S linux-2.6.27.19-5.1/arch/s390/kernel/head64.S
---- linux-2.6.27/arch/s390/kernel/head64.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/head64.S 2009-03-25 16:10:51.000000000 +0000
-@@ -10,29 +10,6 @@
+diff -r 9608d5473017 arch/s390/kernel/head64.S
+--- a/arch/s390/kernel/head64.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/head64.S Wed May 06 16:56:06 2009 +0100
+@@ -9,29 +9,6 @@
+ * Heiko Carstens <heiko.carstens@de.ibm.com>
*
*/
-
+-
-#
-# startup-code at 0x10000, running in absolute addressing mode
-# this is called either by the ipl loader or directly by PSW restart
- .org COMMAND_LINE
- .byte "root=/dev/ram0 ro"
- .byte 0
--
+
.org 0x11000
- startup_continue:
-diff -purN linux-2.6.27/arch/s390/kernel/process.c linux-2.6.27.19-5.1/arch/s390/kernel/process.c
---- linux-2.6.27/arch/s390/kernel/process.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/process.c 2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/kernel/process.c
+--- a/arch/s390/kernel/process.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/process.c Wed May 06 16:56:06 2009 +0100
@@ -38,6 +38,7 @@
#include <linux/utsname.h>
#include <linux/tick.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include <asm/system.h>
-@@ -257,13 +258,13 @@ int copy_thread(int nr, unsigned long cl
+@@ -257,13 +258,13 @@
return 0;
}
{
struct pt_regs *regs = task_pt_regs(current);
unsigned long clone_flags;
-@@ -290,7 +291,7 @@ asmlinkage long sys_clone(void)
+@@ -290,7 +291,7 @@
* do not have enough call-clobbered registers to hold all
* the information you need.
*/
{
struct pt_regs *regs = task_pt_regs(current);
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD,
-@@ -310,7 +311,7 @@ asmlinkage void execve_tail(void)
+@@ -310,7 +311,7 @@
/*
* sys_execve() executes a new program.
*/
{
struct pt_regs *regs = task_pt_regs(current);
char *filename;
-diff -purN linux-2.6.27/arch/s390/kernel/processor.c linux-2.6.27.19-5.1/arch/s390/kernel/processor.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/processor.c 2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/kernel/processor.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/s390/kernel/processor.c Wed May 06 16:56:06 2009 +0100
@@ -0,0 +1,97 @@
+/*
+ * arch/s390/kernel/processor.c
+ .show = show_cpuinfo,
+};
+
-diff -purN linux-2.6.27/arch/s390/kernel/ptrace.c linux-2.6.27.19-5.1/arch/s390/kernel/ptrace.c
---- linux-2.6.27/arch/s390/kernel/ptrace.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/ptrace.c 2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/kernel/ptrace.c
+--- a/arch/s390/kernel/ptrace.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/ptrace.c Wed May 06 16:56:06 2009 +0100
@@ -35,6 +35,7 @@
#include <linux/signal.h>
#include <linux/elf.h>
#include <asm/segment.h>
#include <asm/page.h>
-@@ -639,40 +640,58 @@ long compat_arch_ptrace(struct task_stru
+@@ -639,40 +640,58 @@
}
#endif
- if (current->exit_code) {
- send_sig(current->exit_code, current, 1);
- current->exit_code = 0;
-- }
-- out:
-- if (unlikely(current->audit_context) && !entryexit)
-- audit_syscall_entry(test_thread_flag(TIF_31BIT)?AUDIT_ARCH_S390:AUDIT_ARCH_S390X,
-- regs->gprs[2], regs->orig_gpr2, regs->gprs[3],
-- regs->gprs[4], regs->gprs[5]);
+ if (is_self_ptracing(regs->gprs[2])) {
+ struct siginfo info;
+
+ send_sig_info(SIGSYS, &info, current);
+ regs->gprs[2] = -1;
+ return -1L;
-+ }
+ }
+- out:
+- if (unlikely(current->audit_context) && !entryexit)
+- audit_syscall_entry(test_thread_flag(TIF_31BIT)?AUDIT_ARCH_S390:AUDIT_ARCH_S390X,
+- regs->gprs[2], regs->orig_gpr2, regs->gprs[3],
+- regs->gprs[4], regs->gprs[5]);
+
+ ret = regs->gprs[2];
+ if (test_thread_flag(TIF_SYSCALL_TRACE) &&
}
/*
-diff -purN linux-2.6.27/arch/s390/kernel/setup.c linux-2.6.27.19-5.1/arch/s390/kernel/setup.c
---- linux-2.6.27/arch/s390/kernel/setup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/setup.c 2009-03-25 16:10:51.000000000 +0000
-@@ -14,6 +14,8 @@
+diff -r 9608d5473017 arch/s390/kernel/setup.c
+--- a/arch/s390/kernel/setup.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/setup.c Wed May 06 16:56:06 2009 +0100
+@@ -13,6 +13,8 @@
+ /*
* This file handles the architecture-dependent parts of initialization
*/
-
-+#define KMSG_COMPONENT "setup"
+
++#define KMSG_COMPONENT "setup"
+
#include <linux/errno.h>
#include <linux/module.h>
- #include <linux/sched.h>
@@ -32,7 +34,6 @@
#include <linux/bootmem.h>
#include <linux/root_dev.h>
#include <linux/kernel_stat.h>
#include <linux/device.h>
#include <linux/notifier.h>
-@@ -80,7 +81,9 @@ char elf_platform[ELF_PLATFORM_SIZE];
+@@ -80,7 +81,9 @@
struct mem_chunk __initdata memory_chunk[MEMORY_CHUNKS];
volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */
/*
* This is set up by the setup-routine at boot-time
-@@ -279,20 +282,17 @@ void (*pm_power_off)(void) = machine_pow
+@@ -279,20 +282,17 @@
static int __init early_parse_mem(char *p)
{
memory_end = memparse(p, &p);
{
psw_user_bits = PSW_BASE_BITS | PSW_MASK_DAT | user_amode |
PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK |
-@@ -309,11 +309,11 @@ static void set_amode_and_uaccess(unsign
+@@ -309,11 +309,11 @@
PSW_MASK_MCHECK | PSW_DEFAULT_KEY;
if (MACHINE_HAS_MVCOS) {
}
}
-@@ -328,9 +328,10 @@ static int __init early_parse_switch_amo
+@@ -328,9 +328,10 @@
early_param("switch_amode", early_parse_switch_amode);
#else /* CONFIG_S390_SWITCH_AMODE */
}
#endif /* CONFIG_S390_SWITCH_AMODE */
-@@ -355,11 +356,20 @@ early_param("noexec", early_parse_noexec
+@@ -355,11 +356,20 @@
static void setup_addressing_mode(void)
{
if (s390_noexec) {
}
#ifdef CONFIG_TRACE_IRQFLAGS
sysc_restore_trace_psw.mask = psw_kernel_bits & ~PSW_MASK_MCHECK;
-@@ -494,8 +504,10 @@ static void __init setup_memory_end(void
+@@ -494,8 +504,10 @@
int i;
#if defined(CONFIG_ZFCPDUMP) || defined(CONFIG_ZFCPDUMP_MODULE)
#endif
memory_size = 0;
memory_end &= PAGE_MASK;
-@@ -572,15 +584,15 @@ setup_memory(void)
+@@ -572,15 +584,15 @@
start = PFN_PHYS(start_pfn) + bmap_size + PAGE_SIZE;
if (start + INITRD_SIZE > memory_end) {
memmove((void *) start, (void *) INITRD_START,
INITRD_SIZE);
INITRD_START = start;
-@@ -604,13 +616,13 @@ setup_memory(void)
+@@ -604,13 +616,13 @@
if (memory_chunk[i].type != CHUNK_READ_WRITE)
continue;
start_chunk = PFN_DOWN(memory_chunk[i].addr);
page_set_storage_key(PFN_PHYS(pfn), PAGE_DEFAULT_KEY);
}
-@@ -642,8 +654,9 @@ setup_memory(void)
+@@ -642,8 +654,9 @@
initrd_start = INITRD_START;
initrd_end = initrd_start + INITRD_SIZE;
} else {
initrd_start + INITRD_SIZE, memory_end);
initrd_start = initrd_end = 0;
}
-@@ -756,21 +769,27 @@ setup_arch(char **cmdline_p)
+@@ -756,21 +769,27 @@
* print what head.S has found out about the machine
*/
#ifndef CONFIG_64BIT
#endif /* CONFIG_64BIT */
/* Have one command line that is parsed and saved in /proc/cmdline */
-@@ -818,90 +837,3 @@ setup_arch(char **cmdline_p)
+@@ -818,90 +837,3 @@
/* Setup zfcpdump support */
setup_zfcpdump(console_devno);
}
- .show = show_cpuinfo,
-};
-
-diff -purN linux-2.6.27/arch/s390/kernel/signal.c linux-2.6.27.19-5.1/arch/s390/kernel/signal.c
---- linux-2.6.27/arch/s390/kernel/signal.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/signal.c 2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/kernel/signal.c
+--- a/arch/s390/kernel/signal.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/signal.c Wed May 06 16:56:06 2009 +0100
@@ -24,6 +24,8 @@
#include <linux/tty.h>
#include <linux/personality.h>
#include <asm/ucontext.h>
#include <asm/uaccess.h>
#include <asm/lowcore.h>
-@@ -52,8 +54,7 @@ typedef struct
+@@ -52,8 +54,7 @@
/*
* Atomically swap in the new signal mask, and wait for a signal.
*/
{
mask &= _BLOCKABLE;
spin_lock_irq(¤t->sighand->siglock);
-@@ -69,9 +70,8 @@ sys_sigsuspend(int history0, int history
+@@ -69,9 +70,8 @@
return -ERESTARTNOHAND;
}
{
struct k_sigaction new_ka, old_ka;
int ret;
-@@ -101,15 +101,13 @@ sys_sigaction(int sig, const struct old_
+@@ -101,14 +101,12 @@
return ret;
}
struct pt_regs *regs = task_pt_regs(current);
return do_sigaltstack(uss, uoss, regs->gprs[15]);
}
-
-
-
+
/* Returns non-zero on fault. */
static int save_sigregs(struct pt_regs *regs, _sigregs __user *sregs)
- {
-@@ -159,11 +157,11 @@ static int restore_sigregs(struct pt_reg
+@@ -159,11 +157,11 @@
current->thread.fp_regs.fpc &= FPC_VALID_MASK;
restore_fp_regs(¤t->thread.fp_regs);
{
struct pt_regs *regs = task_pt_regs(current);
sigframe __user *frame = (sigframe __user *)regs->gprs[15];
-@@ -190,7 +188,7 @@ badframe:
+@@ -190,7 +188,7 @@
return 0;
}
{
struct pt_regs *regs = task_pt_regs(current);
rt_sigframe __user *frame = (rt_sigframe __user *)regs->gprs[15];
-@@ -444,7 +442,7 @@ void do_signal(struct pt_regs *regs)
+@@ -444,7 +442,7 @@
oldset = ¤t->blocked;
/* Are we from a system call? */
continue_addr = regs->psw.addr;
restart_addr = continue_addr - regs->ilc;
retval = regs->gprs[2];
-@@ -461,7 +459,7 @@ void do_signal(struct pt_regs *regs)
+@@ -461,7 +459,7 @@
case -ERESTART_RESTARTBLOCK:
regs->gprs[2] = -EINTR;
}
}
/* Get signal to deliver. When running under ptrace, at this point
-@@ -507,6 +505,12 @@ void do_signal(struct pt_regs *regs)
+@@ -507,6 +505,12 @@
*/
if (current->thread.per_info.single_step)
set_thread_flag(TIF_SINGLE_STEP);
}
return;
}
-@@ -526,3 +530,9 @@ void do_signal(struct pt_regs *regs)
+@@ -526,3 +530,9 @@
set_thread_flag(TIF_RESTART_SVC);
}
}
+ clear_thread_flag(TIF_NOTIFY_RESUME);
+ tracehook_notify_resume(regs);
+}
-diff -purN linux-2.6.27/arch/s390/kernel/smp.c linux-2.6.27.19-5.1/arch/s390/kernel/smp.c
---- linux-2.6.27/arch/s390/kernel/smp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/smp.c 2009-03-25 16:10:51.000000000 +0000
-@@ -20,6 +20,8 @@
+diff -r 9608d5473017 arch/s390/kernel/smp.c
+--- a/arch/s390/kernel/smp.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/smp.c Wed May 06 16:56:06 2009 +0100
+@@ -19,6 +19,8 @@
+ * one which is causing all the confusion with __cpu_logical_map and
* cpu_number_map in other architectures.
*/
-
-+#define KMSG_COMPONENT "cpu"
+
++#define KMSG_COMPONENT "cpu"
+
#include <linux/module.h>
#include <linux/init.h>
- #include <linux/mm.h>
-@@ -77,159 +79,6 @@ static DEFINE_PER_CPU(struct cpu, cpu_de
+@@ -77,159 +79,6 @@
static void smp_ext_bitcall(int, ec_bit_sig);
void smp_send_stop(void)
{
int cpu, rc;
-@@ -271,7 +120,10 @@ static void do_ext_call_interrupt(__u16
+@@ -271,7 +120,10 @@
bits = xchg(&S390_lowcore.ext_call_fast, 0);
if (test_bit(ec_call_function, &bits))
}
/*
-@@ -288,6 +140,19 @@ static void smp_ext_bitcall(int cpu, ec_
+@@ -286,6 +138,19 @@
+ set_bit(sig, (unsigned long *) &lowcore_ptr[cpu]->ext_call_fast);
+ while (signal_processor(cpu, sigp_emergency_signal) == sigp_busy)
udelay(10);
- }
-
++}
++
+void arch_send_call_function_ipi(cpumask_t mask)
+{
+ int cpu;
+void arch_send_call_function_single_ipi(int cpu)
+{
+ smp_ext_bitcall(cpu, ec_call_function_single);
-+}
-+
+ }
+
#ifndef CONFIG_64BIT
- /*
- * this function sends a 'purge tlb' signal to another CPU.
-@@ -388,8 +253,8 @@ static void __init smp_get_save_area(uns
+@@ -388,8 +253,8 @@
if (ipl_info.type != IPL_TYPE_FCP_DUMP)
return;
if (cpu >= NR_CPUS) {
return;
}
zfcpdump_save_areas[cpu] = kmalloc(sizeof(union save_area), GFP_KERNEL);
-@@ -562,7 +427,7 @@ static void __init smp_detect_cpus(void)
+@@ -562,7 +427,7 @@
}
out:
kfree(info);
get_online_cpus();
__smp_rescan_cpus();
put_online_cpus();
-@@ -586,9 +451,9 @@ int __cpuinit start_secondary(void *cpuv
+@@ -586,9 +451,9 @@
pfault_init();
/* Mark this cpu as online */
/* Switch on interrupts */
local_irq_enable();
/* Print info about this processor */
-@@ -688,12 +553,8 @@ int __cpuinit __cpu_up(unsigned int cpu)
+@@ -688,12 +553,8 @@
ccode = signal_processor_p((__u32)(unsigned long)(lowcore_ptr[cpu]),
cpu, sigp_set_prefix);
idle = current_set[cpu];
cpu_lowcore = lowcore_ptr[cpu];
-@@ -776,7 +637,7 @@ void __cpu_die(unsigned int cpu)
+@@ -776,7 +637,7 @@
while (!smp_cpu_not_running(cpu))
cpu_relax();
smp_free_lowcore(cpu);
}
void cpu_die(void)
-@@ -1117,9 +978,7 @@ out:
+@@ -1117,9 +978,7 @@
return rc;
}
size_t count)
{
int rc;
-@@ -1127,12 +986,10 @@ static ssize_t __ref rescan_store(struct
+@@ -1127,12 +986,10 @@
rc = smp_rescan_cpus();
return rc ? rc : count;
}
{
ssize_t count;
-@@ -1142,9 +999,8 @@ static ssize_t dispatching_show(struct s
+@@ -1142,9 +999,8 @@
return count;
}
{
int val, rc;
char delim;
-@@ -1166,7 +1022,8 @@ out:
+@@ -1166,7 +1022,8 @@
put_online_cpus();
return rc ? rc : count;
}
static int __init topology_init(void)
{
-@@ -1176,13 +1033,11 @@ static int __init topology_init(void)
+@@ -1176,13 +1033,11 @@
register_cpu_notifier(&smp_cpu_nb);
#ifdef CONFIG_HOTPLUG_CPU
if (rc)
return rc;
for_each_present_cpu(cpu) {
-diff -purN linux-2.6.27/arch/s390/kernel/sys_s390.c linux-2.6.27.19-5.1/arch/s390/kernel/sys_s390.c
---- linux-2.6.27/arch/s390/kernel/sys_s390.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/sys_s390.c 2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/kernel/sys_s390.c
+--- a/arch/s390/kernel/sys_s390.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/sys_s390.c Wed May 06 16:56:06 2009 +0100
@@ -29,6 +29,7 @@
#include <linux/personality.h>
#include <linux/unistd.h>
#include <asm/uaccess.h>
#include "entry.h"
-@@ -74,7 +75,7 @@ struct mmap_arg_struct {
+@@ -74,7 +75,7 @@
unsigned long offset;
};
{
struct mmap_arg_struct a;
int error = -EFAULT;
-@@ -86,7 +87,7 @@ out:
+@@ -86,7 +87,7 @@
return error;
}
{
struct mmap_arg_struct a;
long error = -EFAULT;
-@@ -127,8 +128,8 @@ asmlinkage long old_select(struct sel_ar
+@@ -127,8 +128,8 @@
*
* This is really horribly ugly.
*/
{
struct ipc_kludge tmp;
int ret;
-@@ -194,18 +195,18 @@ asmlinkage long sys_ipc(uint call, int f
+@@ -194,18 +195,18 @@
}
#ifdef CONFIG_64BIT
{
int ret;
-@@ -224,15 +225,13 @@ asmlinkage long s390x_personality(unsign
+@@ -224,14 +225,12 @@
*/
#ifndef CONFIG_64BIT
return sys_fadvise64(fd, (u64) offset_high << 32 | offset_low,
len, advice);
}
-
--#endif
-
+-#endif
+
struct fadvise64_64_args {
int fd;
- long long offset;
-@@ -240,8 +239,7 @@ struct fadvise64_64_args {
+@@ -240,8 +239,7 @@
int advice;
};
{
struct fadvise64_64_args a;
-@@ -250,7 +248,6 @@ s390_fadvise64_64(struct fadvise64_64_ar
+@@ -250,7 +248,6 @@
return sys_fadvise64_64(a.fd, a.offset, a.len, a.advice);
}
/*
* This is a wrapper to call sys_fallocate(). For 31 bit s390 the last
* 64 bit argument "len" is split into the upper and lower 32 bits. The
-@@ -263,9 +260,19 @@ s390_fadvise64_64(struct fadvise64_64_ar
+@@ -263,9 +260,19 @@
* to
* %r2: fd, %r3: mode, %r4/%r5: offset, 96(%r15)-103(%r15): len
*/
+ (u32) len_high, (u32) len_low);
+}
+SYSCALL_ALIAS(sys_s390_fallocate, SyS_s390_fallocate);
-+#endif
-+
#endif
-diff -purN linux-2.6.27/arch/s390/kernel/syscalls.S linux-2.6.27.19-5.1/arch/s390/kernel/syscalls.S
---- linux-2.6.27/arch/s390/kernel/syscalls.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/syscalls.S 2009-03-25 16:10:51.000000000 +0000
-@@ -98,7 +98,7 @@ SYSCALL(sys_uselib,sys_uselib,sys32_usel
++
++#endif
+diff -r 9608d5473017 arch/s390/kernel/syscalls.S
+--- a/arch/s390/kernel/syscalls.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/syscalls.S Wed May 06 16:56:06 2009 +0100
+@@ -98,7 +98,7 @@
SYSCALL(sys_swapon,sys_swapon,sys32_swapon_wrapper)
SYSCALL(sys_reboot,sys_reboot,sys32_reboot_wrapper)
SYSCALL(sys_ni_syscall,sys_ni_syscall,old32_readdir_wrapper) /* old readdir syscall */
SYSCALL(sys_munmap,sys_munmap,sys32_munmap_wrapper)
SYSCALL(sys_truncate,sys_truncate,sys32_truncate_wrapper)
SYSCALL(sys_ftruncate,sys_ftruncate,sys32_ftruncate_wrapper)
-@@ -130,7 +130,7 @@ SYSCALL(sys_fsync,sys_fsync,sys32_fsync_
+@@ -130,7 +130,7 @@
SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn)
SYSCALL(sys_clone,sys_clone,sys32_clone) /* 120 */
SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper)
NI_SYSCALL /* modify_ldt for i386 */
SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex_wrapper)
SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */
-@@ -144,7 +144,7 @@ SYSCALL(sys_getpgid,sys_getpgid,sys32_ge
+@@ -144,7 +144,7 @@
SYSCALL(sys_fchdir,sys_fchdir,sys32_fchdir_wrapper)
SYSCALL(sys_bdflush,sys_bdflush,sys32_bdflush_wrapper)
SYSCALL(sys_sysfs,sys_sysfs,sys32_sysfs_wrapper) /* 135 */
NI_SYSCALL /* for afs_syscall */
SYSCALL(sys_setfsuid16,sys_ni_syscall,sys32_setfsuid16_wrapper) /* old setfsuid16 syscall */
SYSCALL(sys_setfsgid16,sys_ni_syscall,sys32_setfsgid16_wrapper) /* old setfsgid16 syscall */
-@@ -194,7 +194,7 @@ SYSCALL(sys_chown16,sys_ni_syscall,sys32
+@@ -194,7 +194,7 @@
SYSCALL(sys_getcwd,sys_getcwd,sys32_getcwd_wrapper)
SYSCALL(sys_capget,sys_capget,sys32_capget_wrapper)
SYSCALL(sys_capset,sys_capset,sys32_capset_wrapper) /* 185 */
SYSCALL(sys_sendfile,sys_sendfile64,sys32_sendfile_wrapper)
NI_SYSCALL /* streams1 */
NI_SYSCALL /* streams2 */
-@@ -230,8 +230,8 @@ SYSCALL(sys_mincore,sys_mincore,sys32_mi
+@@ -230,8 +230,8 @@
SYSCALL(sys_madvise,sys_madvise,sys32_madvise_wrapper)
SYSCALL(sys_getdents64,sys_getdents64,sys32_getdents64_wrapper) /* 220 */
SYSCALL(sys_fcntl64,sys_ni_syscall,compat_sys_fcntl64_wrapper)
SYSCALL(sys_setxattr,sys_setxattr,sys32_setxattr_wrapper)
SYSCALL(sys_lsetxattr,sys_lsetxattr,sys32_lsetxattr_wrapper) /* 225 */
SYSCALL(sys_fsetxattr,sys_fsetxattr,sys32_fsetxattr_wrapper)
-@@ -245,11 +245,11 @@ SYSCALL(sys_removexattr,sys_removexattr,
+@@ -245,11 +245,11 @@
SYSCALL(sys_lremovexattr,sys_lremovexattr,sys32_lremovexattr_wrapper)
SYSCALL(sys_fremovexattr,sys_fremovexattr,sys32_fremovexattr_wrapper) /* 235 */
SYSCALL(sys_gettid,sys_gettid,sys_gettid)
NI_SYSCALL /* reserved for TUX */
SYSCALL(sys_io_setup,sys_io_setup,sys32_io_setup_wrapper)
SYSCALL(sys_io_destroy,sys_io_destroy,sys32_io_destroy_wrapper)
-@@ -261,7 +261,7 @@ SYSCALL(sys_epoll_create,sys_epoll_creat
+@@ -261,7 +261,7 @@
SYSCALL(sys_epoll_ctl,sys_epoll_ctl,sys_epoll_ctl_wrapper) /* 250 */
SYSCALL(sys_epoll_wait,sys_epoll_wait,sys_epoll_wait_wrapper)
SYSCALL(sys_set_tid_address,sys_set_tid_address,sys32_set_tid_address_wrapper)
SYSCALL(sys_timer_create,sys_timer_create,sys32_timer_create_wrapper)
SYSCALL(sys_timer_settime,sys_timer_settime,sys32_timer_settime_wrapper) /* 255 */
SYSCALL(sys_timer_gettime,sys_timer_gettime,sys32_timer_gettime_wrapper)
-@@ -272,7 +272,7 @@ SYSCALL(sys_clock_gettime,sys_clock_gett
+@@ -272,7 +272,7 @@
SYSCALL(sys_clock_getres,sys_clock_getres,sys32_clock_getres_wrapper)
SYSCALL(sys_clock_nanosleep,sys_clock_nanosleep,sys32_clock_nanosleep_wrapper)
NI_SYSCALL /* reserved for vserver */
SYSCALL(sys_statfs64,sys_statfs64,compat_sys_statfs64_wrapper)
SYSCALL(sys_fstatfs64,sys_fstatfs64,compat_sys_fstatfs64_wrapper)
SYSCALL(sys_remap_file_pages,sys_remap_file_pages,sys32_remap_file_pages_wrapper)
-@@ -288,7 +288,7 @@ SYSCALL(sys_mq_getsetattr,sys_mq_getseta
+@@ -288,7 +288,7 @@
SYSCALL(sys_kexec_load,sys_kexec_load,compat_sys_kexec_load_wrapper)
SYSCALL(sys_add_key,sys_add_key,compat_sys_add_key_wrapper)
SYSCALL(sys_request_key,sys_request_key,compat_sys_request_key_wrapper)
SYSCALL(sys_waitid,sys_waitid,compat_sys_waitid_wrapper)
SYSCALL(sys_ioprio_set,sys_ioprio_set,sys_ioprio_set_wrapper)
SYSCALL(sys_ioprio_get,sys_ioprio_get,sys_ioprio_get_wrapper)
-@@ -322,7 +322,7 @@ NI_SYSCALL /* 310 sys_move_pages *
+@@ -322,7 +322,7 @@
SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper)
SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait_wrapper)
SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper)
SYSCALL(sys_utimensat,sys_utimensat,compat_sys_utimensat_wrapper) /* 315 */
SYSCALL(sys_signalfd,sys_signalfd,compat_sys_signalfd_wrapper)
NI_SYSCALL /* 317 old sys_timer_fd */
-diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/kernel/time.c
---- linux-2.6.27/arch/s390/kernel/time.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/time.c 2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/kernel/time.c
+--- a/arch/s390/kernel/time.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/time.c Wed May 06 16:56:06 2009 +0100
@@ -12,6 +12,8 @@
* Copyright (C) 1991, 1992, 1995 Linus Torvalds
*/
#include <linux/time.h>
#include <linux/sysdev.h>
#include <linux/delay.h>
-@@ -291,8 +295,8 @@ static unsigned long long adjust_time(un
+@@ -291,8 +295,8 @@
}
jiffies_timer_cc += delta;
if (adjust.offset != 0) {
adjust.modes = ADJ_OFFSET_SINGLESHOT;
do_adjtimex(&adjust);
}
-@@ -363,6 +367,15 @@ static void enable_sync_clock(void)
+@@ -363,6 +367,15 @@
atomic_set_mask(0x80000000, sw_ptr);
}
/*
* External Time Reference (ETR) code.
*/
-@@ -428,6 +441,7 @@ static struct timer_list etr_timer;
+@@ -428,6 +441,7 @@
static void etr_timeout(unsigned long dummy);
static void etr_work_fn(struct work_struct *work);
static DECLARE_WORK(etr_work, etr_work_fn);
/*
-@@ -443,8 +457,8 @@ static void etr_reset(void)
+@@ -443,8 +457,8 @@
etr_tolec = get_clock();
set_bit(CLOCK_SYNC_HAS_ETR, &clock_sync_flags);
} else if (etr_port0_online || etr_port1_online) {
etr_port0_online = etr_port1_online = 0;
}
}
-@@ -455,17 +469,18 @@ static int __init etr_init(void)
+@@ -455,17 +469,18 @@
if (!test_bit(CLOCK_SYNC_HAS_ETR, &clock_sync_flags))
return 0;
}
return 0;
}
-@@ -492,7 +507,7 @@ void etr_switch_to_local(void)
+@@ -492,7 +507,7 @@
if (test_bit(CLOCK_SYNC_ETR, &clock_sync_flags))
disable_sync_clock(NULL);
set_bit(ETR_EVENT_SWITCH_LOCAL, &etr_events);
}
/*
-@@ -508,7 +523,7 @@ void etr_sync_check(void)
+@@ -508,7 +523,7 @@
if (test_bit(CLOCK_SYNC_ETR, &clock_sync_flags))
disable_sync_clock(NULL);
set_bit(ETR_EVENT_SYNC_CHECK, &etr_events);
}
/*
-@@ -532,13 +547,13 @@ static void etr_timing_alert(struct etr_
+@@ -532,13 +547,13 @@
* Both ports are not up-to-date now.
*/
set_bit(ETR_EVENT_PORT_ALERT, &etr_events);
}
/*
-@@ -645,14 +660,16 @@ static int etr_aib_follows(struct etr_ai
+@@ -645,14 +660,16 @@
}
struct clock_sync_data {
enable_sync_clock();
/*
* This looks like a busy wait loop but it isn't. etr_sync_cpus
-@@ -678,39 +695,35 @@ static void clock_sync_cpu_start(void *d
+@@ -678,39 +695,35 @@
fixup_clock_comparator(sync->fixup_cc);
}
int rc;
- /* Check if the current aib is adjacent to the sync port aib. */
-- sync_port = (port == 0) ? &etr_port0 : &etr_port1;
-- follows = etr_aib_follows(sync_port, aib, port);
-- memcpy(sync_port, aib, sizeof(*aib));
-- if (!follows)
-- return -EAGAIN;
+ etr_sync = data;
-
-- /*
-- * Catch all other cpus and make them wait until we have
-- * successfully synced the clock. smp_call_function will
-- * return after all other cpus are in etr_sync_cpu_start.
-- */
-- memset(&etr_sync, 0, sizeof(etr_sync));
-- preempt_disable();
-- smp_call_function(clock_sync_cpu_start, &etr_sync, 0);
-- local_irq_disable();
++
+ if (xchg(&first, 1) == 1) {
+ /* Slave */
+ clock_sync_cpu(etr_sync);
+
+ port = etr_sync->etr_port;
+ aib = etr_sync->etr_aib;
-+ sync_port = (port == 0) ? &etr_port0 : &etr_port1;
+ sync_port = (port == 0) ? &etr_port0 : &etr_port1;
+- follows = etr_aib_follows(sync_port, aib, port);
+- memcpy(sync_port, aib, sizeof(*aib));
+- if (!follows)
+- return -EAGAIN;
+-
+- /*
+- * Catch all other cpus and make them wait until we have
+- * successfully synced the clock. smp_call_function will
+- * return after all other cpus are in etr_sync_cpu_start.
+- */
+- memset(&etr_sync, 0, sizeof(etr_sync));
+- preempt_disable();
+- smp_call_function(clock_sync_cpu_start, &etr_sync, 0);
+- local_irq_disable();
enable_sync_clock();
/* Set clock to next OTE. */
-@@ -727,16 +740,16 @@ static int etr_sync_clock(struct etr_aib
+@@ -727,16 +740,16 @@
delay = (unsigned long long)
(aib->edf2.etv - sync_port->edf2.etv) << 32;
delta = adjust_time(old_clock, clock, delay);
rc = 0;
}
} else {
-@@ -744,12 +757,33 @@ static int etr_sync_clock(struct etr_aib
+@@ -744,12 +757,33 @@
__ctl_clear_bit(0, 29);
__ctl_clear_bit(14, 21);
disable_sync_clock(NULL);
return rc;
}
-@@ -906,7 +940,7 @@ static void etr_update_eacr(struct etr_e
+@@ -906,7 +940,7 @@
}
/*
* particular this is the only function that calls etr_update_eacr(),
* it "controls" the etr control register.
*/
-@@ -917,6 +951,9 @@ static void etr_work_fn(struct work_stru
+@@ -916,6 +950,9 @@
+ struct etr_eacr eacr;
struct etr_aib aib;
int sync_port;
-
++
+ /* prevent multiple execution. */
+ mutex_lock(&etr_work_mutex);
-+
+
/* Create working copy of etr_eacr. */
eacr = etr_eacr;
-
-@@ -932,7 +969,7 @@ static void etr_work_fn(struct work_stru
+@@ -932,7 +969,7 @@
del_timer_sync(&etr_timer);
etr_update_eacr(eacr);
clear_bit(CLOCK_SYNC_ETR, &clock_sync_flags);
}
/* Store aib to get the current ETR status word. */
-@@ -1019,7 +1056,7 @@ static void etr_work_fn(struct work_stru
+@@ -1019,7 +1056,7 @@
eacr.es || sync_port < 0) {
etr_update_eacr(eacr);
etr_set_tolec_timeout(now);
}
/*
-@@ -1039,7 +1076,7 @@ static void etr_work_fn(struct work_stru
+@@ -1039,7 +1076,7 @@
etr_update_eacr(eacr);
set_bit(CLOCK_SYNC_ETR, &clock_sync_flags);
if (now < etr_tolec + (1600000 << 12) ||
/* Sync failed. Try again in 1/2 second. */
eacr.es = 0;
etr_update_eacr(eacr);
-@@ -1047,6 +1084,8 @@ static void etr_work_fn(struct work_stru
+@@ -1047,6 +1084,8 @@
etr_set_sync_timeout();
} else
etr_set_tolec_timeout(now);
}
/*
-@@ -1128,13 +1167,13 @@ static ssize_t etr_online_store(struct s
+@@ -1128,13 +1167,13 @@
return count; /* Nothing to do. */
etr_port0_online = value;
set_bit(ETR_EVENT_PORT0_CHANGE, &etr_events);
}
return count;
}
-@@ -1335,6 +1374,7 @@ static struct stp_sstpi stp_info;
+@@ -1335,6 +1374,7 @@
static void *stp_page;
static void stp_work_fn(struct work_struct *work);
static DECLARE_WORK(stp_work, stp_work_fn);
static int __init early_parse_stp(char *p)
-@@ -1356,10 +1396,11 @@ static void __init stp_reset(void)
+@@ -1356,10 +1396,11 @@
stp_page = alloc_bootmem_pages(PAGE_SIZE);
rc = chsc_sstpc(stp_page, STP_OP_CTRL, 0x0000);
free_bootmem((unsigned long) stp_page, PAGE_SIZE);
stp_page = NULL;
stp_online = 0;
-@@ -1368,8 +1409,12 @@ static void __init stp_reset(void)
+@@ -1368,8 +1409,12 @@
static int __init stp_init(void)
{
return 0;
}
-@@ -1386,7 +1431,7 @@ arch_initcall(stp_init);
+@@ -1386,7 +1431,7 @@
static void stp_timing_alert(struct stp_irq_parm *intparm)
{
if (intparm->tsc || intparm->lac || intparm->tcpc)
}
/*
-@@ -1414,46 +1459,34 @@ void stp_island_check(void)
+@@ -1414,46 +1459,34 @@
if (!test_bit(CLOCK_SYNC_STP, &clock_sync_flags))
return;
disable_sync_clock(NULL);
- if (!stp_online) {
- chsc_sstpc(stp_page, STP_OP_CTRL, 0x0000);
- return;
-- }
+ stp_sync = data;
-
-- rc = chsc_sstpc(stp_page, STP_OP_CTRL, 0xb0e0);
-- if (rc)
-- return;
++
+ if (xchg(&first, 1) == 1) {
+ /* Slave */
+ clock_sync_cpu(stp_sync);
+ return 0;
-+ }
+ }
-- rc = chsc_sstpi(stp_page, &stp_info, sizeof(struct stp_sstpi));
-- if (rc || stp_info.c == 0)
+- rc = chsc_sstpc(stp_page, STP_OP_CTRL, 0xb0e0);
+- if (rc)
- return;
+ /* Wait until all other cpus entered the sync function. */
+ while (atomic_read(&stp_sync->cpus) != 0)
+ cpu_relax();
+- rc = chsc_sstpi(stp_page, &stp_info, sizeof(struct stp_sstpi));
+- if (rc || stp_info.c == 0)
+- return;
+-
- /*
- * Catch all other cpus and make them wait until we have
- * successfully synced the clock. smp_call_function will
rc = 0;
if (stp_info.todoff[0] || stp_info.todoff[1] ||
-@@ -1472,16 +1505,49 @@ static void stp_work_fn(struct work_stru
+@@ -1472,16 +1505,49 @@
}
if (rc) {
disable_sync_clock(NULL);
+ xchg(&first, 0);
+ return 0;
+}
-+
+
+- local_irq_enable();
+- smp_call_function(clock_sync_cpu_end, NULL, 0);
+- preempt_enable();
+/*
+ * STP work. Check for the STP state and take over the clock
+ * synchronization if the STP clock source is usable.
+{
+ struct clock_sync_data stp_sync;
+ int rc;
-
-- local_irq_enable();
-- smp_call_function(clock_sync_cpu_end, NULL, 0);
-- preempt_enable();
++
+ /* prevent multiple execution. */
+ mutex_lock(&stp_work_mutex);
+
}
/*
-@@ -1590,7 +1656,7 @@ static ssize_t stp_online_store(struct s
+@@ -1590,7 +1656,7 @@
if (!test_bit(CLOCK_SYNC_HAS_STP, &clock_sync_flags))
return -EOPNOTSUPP;
stp_online = value;
return count;
}
-diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s390/kernel/topology.c
---- linux-2.6.27/arch/s390/kernel/topology.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/topology.c 2009-03-25 16:10:51.000000000 +0000
-@@ -3,6 +3,8 @@
+diff -r 9608d5473017 arch/s390/kernel/topology.c
+--- a/arch/s390/kernel/topology.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/topology.c Wed May 06 16:56:06 2009 +0100
+@@ -2,6 +2,8 @@
+ * Copyright IBM Corp. 2007
* Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
*/
-
-+#define KMSG_COMPONENT "cpu"
+
++#define KMSG_COMPONENT "cpu"
+
#include <linux/kernel.h>
#include <linux/mm.h>
- #include <linux/init.h>
@@ -12,6 +14,7 @@
#include <linux/workqueue.h>
#include <linux/cpu.h>
#include <asm/delay.h>
#include <asm/s390_ext.h>
#include <asm/sysinfo.h>
-@@ -57,26 +60,29 @@ struct core_info {
+@@ -57,26 +60,29 @@
cpumask_t mask;
};
while (core) {
if (cpu_isset(cpu, core->mask)) {
mask = core->mask;
-@@ -84,7 +90,7 @@ cpumask_t cpu_coregroup_map(unsigned int
+@@ -84,7 +90,7 @@
}
core = core->next;
}
if (cpus_empty(mask))
mask = cpumask_of_cpu(cpu);
return mask;
-@@ -133,7 +139,7 @@ static void tl_to_cores(struct tl_info *
+@@ -133,7 +139,7 @@
union tl_entry *tle, *end;
struct core_info *core = &core_info;
clear_cores();
tle = info->tle;
end = (union tl_entry *)((unsigned long)info + info->length);
-@@ -157,7 +163,7 @@ static void tl_to_cores(struct tl_info *
+@@ -157,7 +163,7 @@
}
tle = next_tle(tle);
}
}
static void topology_update_polarization_simple(void)
-@@ -165,7 +171,7 @@ static void topology_update_polarization
+@@ -165,7 +171,7 @@
int cpu;
mutex_lock(&smp_cpu_state_mutex);
smp_cpu_polarization[cpu] = POLARIZATION_HRZ;
mutex_unlock(&smp_cpu_state_mutex);
}
-@@ -196,7 +202,7 @@ int topology_set_cpu_management(int fc)
+@@ -196,7 +202,7 @@
rc = ptf(PTF_HORIZONTAL);
if (rc)
return -EBUSY;
smp_cpu_polarization[cpu] = POLARIZATION_UNKNWN;
return rc;
}
-@@ -205,11 +211,11 @@ static void update_cpu_core_map(void)
+@@ -205,11 +211,11 @@
{
int cpu;
{
struct tl_info *info = tl_info;
struct sys_device *sysdev;
-@@ -218,7 +224,7 @@ void arch_update_cpu_topology(void)
+@@ -218,7 +224,7 @@
if (!machine_has_topology) {
update_cpu_core_map();
topology_update_polarization_simple();
}
stsi(info, 15, 1, 2);
tl_to_cores(info);
-@@ -227,11 +233,12 @@ void arch_update_cpu_topology(void)
+@@ -227,11 +233,12 @@
sysdev = get_cpu_sysdev(cpu);
kobject_uevent(&sysdev->kobj, KOBJ_CHANGE);
}
}
void topology_schedule_update(void)
-@@ -254,10 +261,14 @@ static void set_topology_timer(void)
+@@ -254,10 +261,14 @@
add_timer(&topology_timer);
}
static int __init init_topology_update(void)
{
-@@ -269,14 +280,7 @@ static int __init init_topology_update(v
+@@ -269,14 +280,7 @@
goto out;
}
init_timer_deferrable(&topology_timer);
out:
update_cpu_core_map();
return rc;
-@@ -297,9 +301,6 @@ void __init s390_init_cpu_topology(void)
+@@ -297,9 +301,6 @@
return;
machine_has_topology = 1;
tl_info = alloc_bootmem_pages(PAGE_SIZE);
info = tl_info;
stsi(info, 15, 1, 2);
-@@ -308,7 +309,7 @@ void __init s390_init_cpu_topology(void)
+@@ -308,7 +309,7 @@
for (i = 0; i < info->mnest - 2; i++)
nr_cores *= info->mag[NR_MAG - 3 - i];
for (i = 0; i < NR_MAG; i++)
printk(" %d", info->mag[i]);
printk(" / %d\n", info->mnest);
-@@ -323,5 +324,4 @@ void __init s390_init_cpu_topology(void)
+@@ -323,5 +324,4 @@
return;
error:
machine_has_topology = 0;
- machine_has_topology_irq = 0;
}
-diff -purN linux-2.6.27/arch/s390/lib/uaccess_pt.c linux-2.6.27.19-5.1/arch/s390/lib/uaccess_pt.c
---- linux-2.6.27/arch/s390/lib/uaccess_pt.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/lib/uaccess_pt.c 2009-03-25 16:10:52.000000000 +0000
-@@ -43,8 +43,9 @@ static int __handle_fault(struct mm_stru
+diff -r 9608d5473017 arch/s390/lib/uaccess_pt.c
+--- a/arch/s390/lib/uaccess_pt.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/lib/uaccess_pt.c Wed May 06 16:56:06 2009 +0100
+@@ -43,8 +43,9 @@
int ret = -EFAULT;
int fault;
down_read(&mm->mmap_sem);
vma = find_vma(mm, address);
if (unlikely(!vma))
-@@ -109,6 +110,8 @@ static size_t __user_copy_pt(unsigned lo
+@@ -109,6 +110,8 @@
pte_t *pte;
void *from, *to;
done = 0;
retry:
spin_lock(&mm->page_table_lock);
-@@ -182,10 +185,6 @@ size_t copy_from_user_pt(size_t n, const
+@@ -182,10 +185,6 @@
{
size_t rc;
rc = __user_copy_pt((unsigned long) from, to, n, 0);
if (unlikely(rc))
memset(to + n - rc, 0, rc);
-@@ -194,10 +193,6 @@ size_t copy_from_user_pt(size_t n, const
+@@ -194,10 +193,6 @@
size_t copy_to_user_pt(size_t n, void __user *to, const void *from)
{
return __user_copy_pt((unsigned long) to, (void *) from, n, 1);
}
-@@ -205,10 +200,6 @@ static size_t clear_user_pt(size_t n, vo
+@@ -205,10 +200,6 @@
{
long done, size, ret;
done = 0;
do {
if (n - done > PAGE_SIZE)
-@@ -234,7 +225,7 @@ static size_t strnlen_user_pt(size_t cou
+@@ -234,7 +225,7 @@
size_t len_str;
if (segment_eq(get_fs(), KERNEL_DS))
done = 0;
retry:
spin_lock(&mm->page_table_lock);
-@@ -276,13 +267,6 @@ static size_t strncpy_from_user_pt(size_
+@@ -276,13 +267,6 @@
return -EFAULT;
if (n > count)
n = count;
if (__user_copy_pt((unsigned long) src, dst, n, 0))
return -EFAULT;
if (dst[n-1] == '\0')
-@@ -302,10 +286,8 @@ static size_t copy_in_user_pt(size_t n,
+@@ -302,10 +286,8 @@
pte_t *pte_from, *pte_to;
int write_user;
done = 0;
retry:
spin_lock(&mm->page_table_lock);
-diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/extmem.c
---- linux-2.6.27/arch/s390/mm/extmem.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/mm/extmem.c 2009-03-25 16:10:51.000000000 +0000
-@@ -7,6 +7,8 @@
+diff -r 9608d5473017 arch/s390/mm/extmem.c
+--- a/arch/s390/mm/extmem.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/mm/extmem.c Wed May 06 16:56:06 2009 +0100
+@@ -6,6 +6,8 @@
+ * Bugreports.to..: <Linux390@de.ibm.com>
* (C) IBM Corporation 2002-2004
*/
-
-+#define KMSG_COMPONENT "extmem"
+
++#define KMSG_COMPONENT "extmem"
+
#include <linux/kernel.h>
#include <linux/string.h>
- #include <linux/spinlock.h>
@@ -24,39 +26,46 @@
#include <asm/cpcmd.h>
#include <asm/setup.h>
struct qin64 {
char qopcode;
-@@ -86,6 +95,55 @@ static DEFINE_MUTEX(dcss_lock);
+@@ -86,6 +95,55 @@
static LIST_HEAD(dcss_list);
static char *segtype_string[] = { "SW", "EW", "SR", "ER", "SN", "EN", "SC",
"EW/EN-MIXED" };
/*
* Create the 8 bytes, ebcdic VM segment name from
-@@ -135,25 +193,45 @@ segment_by_name (char *name)
+@@ -135,25 +193,45 @@
* Perform a function on a dcss segment.
*/
static inline int
+ }
rx = (unsigned long) parameter;
- ry = (unsigned long) func;
-- asm volatile(
+ ry = (unsigned long) *func;
+
- #ifdef CONFIG_64BIT
-- " sam31\n"
-- " diag %0,%1,0x64\n"
-- " sam64\n"
++#ifdef CONFIG_64BIT
+ /* 64-bit Diag x'64' new subcode, keep in 64-bit addressing mode */
+ if (*func > DCSS_SEGEXT)
+ asm volatile(
+ " ipm %2\n"
+ " srl %2,28\n"
+ : "+d" (rx), "+d" (ry), "=d" (rc) : : "cc");
- #else
-+ asm volatile(
++#else
+ asm volatile(
+-#ifdef CONFIG_64BIT
+- " sam31\n"
" diag %0,%1,0x64\n"
+- " sam64\n"
+-#else
+- " diag %0,%1,0x64\n"
-#endif
" ipm %2\n"
" srl %2,28\n"
*ret1 = rx;
*ret2 = ry;
return rc;
-@@ -190,14 +268,45 @@ query_segment_type (struct dcss_segment
+@@ -190,14 +268,45 @@
qin->qoutlen = sizeof(struct qout64);
memcpy (qin->qname, seg->dcss_name, 8);
if (qout->segcnt > 6) {
rc = -ENOTSUPP;
goto out_free;
-@@ -248,7 +357,6 @@ query_segment_type (struct dcss_segment
+@@ -248,7 +357,6 @@
* -EIO : could not perform query diagnose
* -ENOENT : no such segment
* -ENOTSUPP: multi-part segment cannot be used with linux
* -ENOMEM : out of memory
* 0 .. 6 : type of segment as defined in include/asm-s390/extmem.h
*/
-@@ -269,6 +377,30 @@ segment_type (char* name)
+@@ -269,6 +377,30 @@
}
/*
* real segment loading function, called from segment_load
*/
static int
-@@ -276,7 +408,8 @@ __segment_load (char *name, int do_nonsh
+@@ -276,7 +408,8 @@
{
struct dcss_segment *seg = kmalloc(sizeof(struct dcss_segment),
GFP_DMA);
if (seg == NULL) {
rc = -ENOMEM;
-@@ -287,6 +420,13 @@ __segment_load (char *name, int do_nonsh
+@@ -286,6 +419,13 @@
+ rc = query_segment_type (seg);
if (rc < 0)
goto out_free;
-
++
+ if (loadshr_scode == DCSS_LOADSHRX) {
+ if (segment_overlaps_others(seg)) {
+ rc = -EBUSY;
+ goto out_free;
+ }
+ }
-+
+
rc = vmem_add_mapping(seg->start_addr, seg->end - seg->start_addr + 1);
- if (rc)
-@@ -316,35 +456,40 @@ __segment_load (char *name, int do_nonsh
+@@ -316,35 +456,40 @@
}
if (do_nonshared)
-
- diag_cc = dcss_diag(dcss_command, seg->dcss_name,
- &seg->start_addr, &seg->end);
+- if (diag_cc > 1) {
+- PRINT_WARN ("segment_load: could not load segment %s - "
+- "diag returned error (%ld)\n",name,seg->end);
+- rc = dcss_diag_translate_rc (seg->end);
+- dcss_diag(DCSS_PURGESEG, seg->dcss_name,
+- &seg->start_addr, &seg->end);
+ diag_cc = dcss_diag(&loadshr_scode, seg->dcss_name,
+ &start_addr, &end_addr);
+ if (diag_cc < 0) {
+ dcss_diag(&purgeseg_scode, seg->dcss_name,
+ &dummy, &dummy);
+ rc = diag_cc;
-+ goto out_resource;
-+ }
- if (diag_cc > 1) {
-- PRINT_WARN ("segment_load: could not load segment %s - "
-- "diag returned error (%ld)\n",name,seg->end);
-- rc = dcss_diag_translate_rc (seg->end);
-- dcss_diag(DCSS_PURGESEG, seg->dcss_name,
-- &seg->start_addr, &seg->end);
+ goto out_resource;
+ }
++ if (diag_cc > 1) {
+ pr_warning("Loading DCSS %s failed with rc=%ld\n", name,
+ end_addr);
+ rc = dcss_diag_translate_rc(end_addr);
+ dcss_diag(&purgeseg_scode, seg->dcss_name,
+ &dummy, &dummy);
- goto out_resource;
- }
++ goto out_resource;
++ }
+ seg->start_addr = start_addr;
+ seg->end = end_addr;
seg->do_nonshared = do_nonshared;
}
goto out;
out_resource:
-@@ -423,8 +568,8 @@ int
+@@ -423,8 +568,8 @@
segment_modify_shared (char *name, int do_nonshared)
{
struct dcss_segment *seg;
mutex_lock(&dcss_lock);
seg = segment_by_name (name);
-@@ -433,50 +578,62 @@ segment_modify_shared (char *name, int d
+@@ -433,50 +578,62 @@
goto out_unlock;
}
if (do_nonshared == seg->do_nonshared) {
kfree(seg->res);
- goto out_del;
+ goto out_del_mem;
-+ }
+ }
+- dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy);
+- diag_cc = dcss_diag(dcss_command, seg->dcss_name,
+- &seg->start_addr, &seg->end);
+
+ dcss_diag(&purgeseg_scode, seg->dcss_name, &dummy, &dummy);
+ if (do_nonshared)
+ if (diag_cc < 0) {
+ rc = diag_cc;
+ goto out_del_res;
- }
-- dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy);
-- diag_cc = dcss_diag(dcss_command, seg->dcss_name,
-- &seg->start_addr, &seg->end);
++ }
if (diag_cc > 1) {
- PRINT_WARN ("segment_modify_shared: could not reload segment %s"
- " - diag returned error (%ld)\n",name,seg->end);
kfree(seg);
out_unlock:
mutex_unlock(&dcss_lock);
-@@ -500,8 +657,7 @@ segment_unload(char *name)
+@@ -500,8 +657,7 @@
mutex_lock(&dcss_lock);
seg = segment_by_name (name);
if (seg == NULL) {
goto out_unlock;
}
if (atomic_dec_return(&seg->ref_count) != 0)
-@@ -510,7 +666,7 @@ segment_unload(char *name)
+@@ -510,7 +666,7 @@
kfree(seg->res);
vmem_remove_mapping(seg->start_addr, seg->end - seg->start_addr + 1);
list_del(&seg->list);
kfree(seg);
out_unlock:
mutex_unlock(&dcss_lock);
-@@ -536,8 +692,7 @@ segment_save(char *name)
+@@ -536,8 +692,7 @@
seg = segment_by_name (name);
if (seg == NULL) {
goto out;
}
-@@ -545,7 +700,7 @@ segment_save(char *name)
+@@ -545,7 +700,7 @@
endpfn = (seg->end) >> PAGE_SHIFT;
sprintf(cmd1, "DEFSEG %s", name);
for (i=0; i<seg->segcnt; i++) {
seg->range[i].start >> PAGE_SHIFT,
seg->range[i].end >> PAGE_SHIFT,
segtype_string[seg->range[i].start & 0xff]);
-@@ -554,14 +709,14 @@ segment_save(char *name)
+@@ -554,14 +709,14 @@
response = 0;
cpcmd(cmd1, NULL, 0, &response);
if (response) {
goto out;
}
out:
-@@ -576,44 +731,41 @@ void segment_warning(int rc, char *seg_n
+@@ -576,44 +731,41 @@
{
switch (rc) {
case -ENOENT:
break;
}
}
-diff -purN linux-2.6.27/arch/s390/mm/pgtable.c linux-2.6.27.19-5.1/arch/s390/mm/pgtable.c
---- linux-2.6.27/arch/s390/mm/pgtable.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/mm/pgtable.c 2009-03-25 16:10:51.000000000 +0000
-@@ -256,6 +256,10 @@ int s390_enable_sie(void)
+diff -r 9608d5473017 arch/s390/mm/pgtable.c
+--- a/arch/s390/mm/pgtable.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/mm/pgtable.c Wed May 06 16:56:06 2009 +0100
+@@ -256,6 +256,10 @@
struct task_struct *tsk = current;
struct mm_struct *mm, *old_mm;
/* Do we have pgstes? if yes, we are done */
if (tsk->mm->context.pgstes)
return 0;
-diff -purN linux-2.6.27/arch/sh/Kconfig linux-2.6.27.19-5.1/arch/sh/Kconfig
---- linux-2.6.27/arch/sh/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sh/Kconfig 2009-03-25 16:10:49.000000000 +0000
-@@ -106,6 +106,8 @@ config IO_TRAPPED
+diff -r 9608d5473017 arch/sh/Kconfig
+--- a/arch/sh/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/sh/Kconfig Wed May 06 16:56:06 2009 +0100
+@@ -105,6 +105,8 @@
+ bool
source "init/Kconfig"
-
-+source "kernel/Kconfig.freezer"
+
++source "kernel/Kconfig.freezer"
+
menu "System type"
- #
-diff -purN linux-2.6.27/arch/sh/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/sh/include/asm/ioctls.h
---- linux-2.6.27/arch/sh/include/asm/ioctls.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sh/include/asm/ioctls.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/sh/include/asm/ioctls.h
+--- a/arch/sh/include/asm/ioctls.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/sh/include/asm/ioctls.h Wed May 06 16:56:06 2009 +0100
@@ -84,6 +84,7 @@
#define TCSETSF2 _IOW('T', 45, struct termios2)
#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define TIOCSERCONFIG _IO('T', 83) /* 0x5453 */
#define TIOCSERGWILD _IOR('T', 84, int) /* 0x5454 */
-diff -purN linux-2.6.27/arch/sh/include/asm/spinlock.h linux-2.6.27.19-5.1/arch/sh/include/asm/spinlock.h
---- linux-2.6.27/arch/sh/include/asm/spinlock.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sh/include/asm/spinlock.h 2009-03-25 16:10:50.000000000 +0000
-@@ -216,6 +216,9 @@ static inline int __raw_write_trylock(ra
+diff -r 9608d5473017 arch/sh/include/asm/spinlock.h
+--- a/arch/sh/include/asm/spinlock.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/sh/include/asm/spinlock.h Wed May 06 16:56:07 2009 +0100
+@@ -216,6 +216,9 @@
return (oldval > (RW_LOCK_BIAS - 1));
}
#define _raw_spin_relax(lock) cpu_relax()
#define _raw_read_relax(lock) cpu_relax()
#define _raw_write_relax(lock) cpu_relax()
-diff -purN linux-2.6.27/arch/sh/kernel/sys_sh32.c linux-2.6.27.19-5.1/arch/sh/kernel/sys_sh32.c
---- linux-2.6.27/arch/sh/kernel/sys_sh32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sh/kernel/sys_sh32.c 2009-03-25 16:10:49.000000000 +0000
+diff -r 9608d5473017 arch/sh/kernel/sys_sh32.c
+--- a/arch/sh/kernel/sys_sh32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sh/kernel/sys_sh32.c Wed May 06 16:56:07 2009 +0100
@@ -21,7 +21,7 @@
* sys_pipe() is the normal C calling standard for creating
* a pipe. It's not the way Unix traditionally does this, though.
unsigned long r6, unsigned long r7,
struct pt_regs __regs)
{
-diff -purN linux-2.6.27/arch/sh/kernel/syscalls_32.S linux-2.6.27.19-5.1/arch/sh/kernel/syscalls_32.S
---- linux-2.6.27/arch/sh/kernel/syscalls_32.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sh/kernel/syscalls_32.S 2009-03-25 16:10:49.000000000 +0000
-@@ -58,7 +58,7 @@ ENTRY(sys_call_table)
+diff -r 9608d5473017 arch/sh/kernel/syscalls_32.S
+--- a/arch/sh/kernel/syscalls_32.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/sh/kernel/syscalls_32.S Wed May 06 16:56:07 2009 +0100
+@@ -58,7 +58,7 @@
.long sys_mkdir
.long sys_rmdir /* 40 */
.long sys_dup
.long sys_times
.long sys_ni_syscall /* old prof syscall holder */
.long sys_brk /* 45 */
-@@ -105,7 +105,7 @@ ENTRY(sys_call_table)
+@@ -105,7 +105,7 @@
.long sys_uselib
.long sys_swapon
.long sys_reboot
.long old_mmap /* 90 */
.long sys_munmap
.long sys_truncate
-diff -purN linux-2.6.27/arch/sh/kernel/syscalls_64.S linux-2.6.27.19-5.1/arch/sh/kernel/syscalls_64.S
---- linux-2.6.27/arch/sh/kernel/syscalls_64.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sh/kernel/syscalls_64.S 2009-03-25 16:10:50.000000000 +0000
-@@ -109,7 +109,7 @@ sys_call_table:
+diff -r 9608d5473017 arch/sh/kernel/syscalls_64.S
+--- a/arch/sh/kernel/syscalls_64.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/sh/kernel/syscalls_64.S Wed May 06 16:56:07 2009 +0100
+@@ -109,7 +109,7 @@
.long sys_uselib
.long sys_swapon
.long sys_reboot
.long old_mmap /* 90 */
.long sys_munmap
.long sys_truncate
-diff -purN linux-2.6.27/arch/sparc/Kconfig linux-2.6.27.19-5.1/arch/sparc/Kconfig
---- linux-2.6.27/arch/sparc/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/Kconfig 2009-03-25 16:10:44.000000000 +0000
-@@ -32,6 +32,8 @@ config HZ
+diff -r 9608d5473017 arch/sparc/Kconfig
+--- a/arch/sparc/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/Kconfig Wed May 06 16:56:07 2009 +0100
+@@ -31,6 +31,8 @@
+ default 100
source "init/Kconfig"
-
-+source "kernel/Kconfig.freezer"
+
++source "kernel/Kconfig.freezer"
+
menu "General machine setup"
- config SMP
-diff -purN linux-2.6.27/arch/sparc/include/asm/hypervisor.h linux-2.6.27.19-5.1/arch/sparc/include/asm/hypervisor.h
---- linux-2.6.27/arch/sparc/include/asm/hypervisor.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/hypervisor.h 2009-03-25 16:10:45.000000000 +0000
-@@ -2713,6 +2713,30 @@ extern unsigned long sun4v_ldc_revoke(un
+diff -r 9608d5473017 arch/sparc/include/asm/hypervisor.h
+--- a/arch/sparc/include/asm/hypervisor.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/hypervisor.h Wed May 06 16:56:07 2009 +0100
+@@ -2713,6 +2713,30 @@
*/
#define HV_FAST_SET_PERFREG 0x101
/* MMU statistics services.
*
* The hypervisor maintains MMU statistics and privileged code provides
-diff -purN linux-2.6.27/arch/sparc/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/sparc/include/asm/ioctls.h
---- linux-2.6.27/arch/sparc/include/asm/ioctls.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/ioctls.h 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc/include/asm/ioctls.h
+--- a/arch/sparc/include/asm/ioctls.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/ioctls.h Wed May 06 16:56:07 2009 +0100
@@ -19,6 +19,7 @@
#define TCSETS2 _IOW('T', 13, struct termios2)
#define TCSETSW2 _IOW('T', 14, struct termios2)
/* Note that all the ioctls that are not available in Linux have a
* double underscore on the front to: a) avoid some programs to
-diff -purN linux-2.6.27/arch/sparc/include/asm/irq_64.h linux-2.6.27.19-5.1/arch/sparc/include/asm/irq_64.h
---- linux-2.6.27/arch/sparc/include/asm/irq_64.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/irq_64.h 2009-03-25 16:10:45.000000000 +0000
-@@ -67,6 +67,9 @@ extern void virt_irq_free(unsigned int v
+diff -r 9608d5473017 arch/sparc/include/asm/irq_64.h
+--- a/arch/sparc/include/asm/irq_64.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/irq_64.h Wed May 06 16:56:07 2009 +0100
+@@ -67,6 +67,9 @@
extern void __init init_IRQ(void);
extern void fixup_irqs(void);
static inline void set_softint(unsigned long bits)
{
__asm__ __volatile__("wr %0, 0x0, %%set_softint"
-diff -purN linux-2.6.27/arch/sparc/include/asm/parport.h linux-2.6.27.19-5.1/arch/sparc/include/asm/parport.h
---- linux-2.6.27/arch/sparc/include/asm/parport.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/parport.h 2009-03-25 16:10:45.000000000 +0000
-@@ -231,6 +231,7 @@ static struct of_device_id ecpp_match[]
+diff -r 9608d5473017 arch/sparc/include/asm/parport.h
+--- a/arch/sparc/include/asm/parport.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/parport.h Wed May 06 16:56:07 2009 +0100
+@@ -231,6 +231,7 @@
};
static struct of_platform_driver ecpp_driver = {
.name = "ecpp",
.match_table = ecpp_match,
.probe = ecpp_probe,
-diff -purN linux-2.6.27/arch/sparc/include/asm/perfmon.h linux-2.6.27.19-5.1/arch/sparc/include/asm/perfmon.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/perfmon.h 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc/include/asm/perfmon.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/sparc/include/asm/perfmon.h Wed May 06 16:56:07 2009 +0100
@@ -0,0 +1,11 @@
+#ifndef _SPARC64_PERFMON_H_
+#define _SPARC64_PERFMON_H_
+#define PFM_ARCH_MAX_PMDS 3
+
+#endif /* _SPARC64_PERFMON_H_ */
-diff -purN linux-2.6.27/arch/sparc/include/asm/perfmon_kern.h linux-2.6.27.19-5.1/arch/sparc/include/asm/perfmon_kern.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/perfmon_kern.h 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc/include/asm/perfmon_kern.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/sparc/include/asm/perfmon_kern.h Wed May 06 16:56:07 2009 +0100
@@ -0,0 +1,281 @@
+#ifndef _SPARC64_PERFMON_KERN_H_
+#define _SPARC64_PERFMON_KERN_H_
+#endif /* __KERNEL__ */
+
+#endif /* _SPARC64_PERFMON_KERN_H_ */
-diff -purN linux-2.6.27/arch/sparc/include/asm/spinlock_32.h linux-2.6.27.19-5.1/arch/sparc/include/asm/spinlock_32.h
---- linux-2.6.27/arch/sparc/include/asm/spinlock_32.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/spinlock_32.h 2009-03-25 16:10:45.000000000 +0000
-@@ -179,6 +179,8 @@ static inline int __read_trylock(raw_rwl
+diff -r 9608d5473017 arch/sparc/include/asm/spinlock_32.h
+--- a/arch/sparc/include/asm/spinlock_32.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/spinlock_32.h Wed May 06 16:56:07 2009 +0100
+@@ -179,6 +179,8 @@
#define __raw_write_unlock(rw) do { (rw)->lock = 0; } while(0)
#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock)
#define _raw_spin_relax(lock) cpu_relax()
#define _raw_read_relax(lock) cpu_relax()
-diff -purN linux-2.6.27/arch/sparc/include/asm/spinlock_64.h linux-2.6.27.19-5.1/arch/sparc/include/asm/spinlock_64.h
---- linux-2.6.27/arch/sparc/include/asm/spinlock_64.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/spinlock_64.h 2009-03-25 16:10:45.000000000 +0000
-@@ -232,9 +232,11 @@ static int inline __write_trylock(raw_rw
+diff -r 9608d5473017 arch/sparc/include/asm/spinlock_64.h
+--- a/arch/sparc/include/asm/spinlock_64.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/spinlock_64.h Wed May 06 16:56:08 2009 +0100
+@@ -232,9 +232,11 @@
}
#define __raw_read_lock(p) __read_lock(p)
#define __raw_write_unlock(p) __write_unlock(p)
#define __raw_write_trylock(p) __write_trylock(p)
-diff -purN linux-2.6.27/arch/sparc/include/asm/system_64.h linux-2.6.27.19-5.1/arch/sparc/include/asm/system_64.h
---- linux-2.6.27/arch/sparc/include/asm/system_64.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/system_64.h 2009-03-25 16:10:45.000000000 +0000
-@@ -30,6 +30,9 @@ enum sparc_cpu {
+diff -r 9608d5473017 arch/sparc/include/asm/system_64.h
+--- a/arch/sparc/include/asm/system_64.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/system_64.h Wed May 06 16:56:08 2009 +0100
+@@ -30,6 +30,9 @@
#define ARCH_SUN4C_SUN4 0
#define ARCH_SUN4 0
extern char reboot_command[];
/* These are here in an effort to more fully work around Spitfire Errata
-@@ -104,15 +107,13 @@ do { __asm__ __volatile__("ba,pt %%xcc,
+@@ -104,15 +107,13 @@
#define write_pcr(__p) __asm__ __volatile__("wr %0, 0x0, %%pcr" : : "r" (__p))
#define read_pic(__p) __asm__ __volatile__("rd %%pic, %0" : "=r" (__p))
#ifndef __ASSEMBLY__
-@@ -145,14 +146,10 @@ do { \
+@@ -145,14 +146,10 @@
* and 2 stores in this critical code path. -DaveM
*/
#define switch_to(prev, next, last) \
flush_tlb_pending(); \
save_and_clear_fpu(); \
/* If you are tempted to conditionalize the following */ \
-@@ -197,11 +194,6 @@ do { if (test_thread_flag(TIF_PERFCTR))
+@@ -197,11 +194,6 @@
"l1", "l2", "l3", "l4", "l5", "l6", "l7", \
"i0", "i1", "i2", "i3", "i4", "i5", \
"o0", "o1", "o2", "o3", "o4", "o5", "o7"); \
} while(0)
static inline unsigned long xchg32(__volatile__ unsigned int *m, unsigned int val)
-diff -purN linux-2.6.27/arch/sparc/include/asm/thread_info_32.h linux-2.6.27.19-5.1/arch/sparc/include/asm/thread_info_32.h
---- linux-2.6.27/arch/sparc/include/asm/thread_info_32.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/thread_info_32.h 2009-03-25 16:10:45.000000000 +0000
-@@ -139,6 +139,7 @@ BTFIXUPDEF_CALL(void, free_thread_info,
+diff -r 9608d5473017 arch/sparc/include/asm/thread_info_32.h
+--- a/arch/sparc/include/asm/thread_info_32.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/thread_info_32.h Wed May 06 16:56:08 2009 +0100
+@@ -139,6 +139,7 @@
#define TIF_POLLING_NRFLAG 9 /* true if poll_idle() is polling
* TIF_NEED_RESCHED */
#define TIF_MEMDIE 10
/* as above, but as bit values */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
-@@ -152,6 +153,7 @@ BTFIXUPDEF_CALL(void, free_thread_info,
+@@ -152,6 +153,7 @@
#define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | \
_TIF_SIGPENDING | \
_TIF_RESTORE_SIGMASK)
#endif /* __KERNEL__ */
-diff -purN linux-2.6.27/arch/sparc/include/asm/thread_info_64.h linux-2.6.27.19-5.1/arch/sparc/include/asm/thread_info_64.h
---- linux-2.6.27/arch/sparc/include/asm/thread_info_64.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/thread_info_64.h 2009-03-25 16:10:45.000000000 +0000
-@@ -58,11 +58,6 @@ struct thread_info {
+diff -r 9608d5473017 arch/sparc/include/asm/thread_info_64.h
+--- a/arch/sparc/include/asm/thread_info_64.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/thread_info_64.h Wed May 06 16:56:08 2009 +0100
+@@ -58,11 +58,6 @@
unsigned long gsr[7];
unsigned long xfsr[7];
struct restart_block restart_block;
struct pt_regs *kern_una_regs;
-@@ -96,15 +91,10 @@ struct thread_info {
+@@ -96,15 +91,10 @@
#define TI_RWIN_SPTRS 0x000003c8
#define TI_GSR 0x00000400
#define TI_XFSR 0x00000438
/* We embed this in the uppermost byte of thread_info->flags */
#define FAULT_CODE_WRITE 0x01 /* Write access, implies D-TLB */
-@@ -222,11 +212,11 @@ register struct thread_info *current_thr
+@@ -222,11 +212,11 @@
#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */
#define TIF_SIGPENDING 2 /* signal pending */
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
#define TIF_SECCOMP 9 /* secure computing */
#define TIF_SYSCALL_AUDIT 10 /* syscall auditing active */
/* flag bit 11 is available */
-@@ -237,22 +227,24 @@ register struct thread_info *current_thr
+@@ -237,22 +227,24 @@
#define TIF_ABI_PENDING 12
#define TIF_MEMDIE 13
#define TIF_POLLING_NRFLAG 14
#define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING)
/*
-diff -purN linux-2.6.27/arch/sparc/include/asm/uaccess_64.h linux-2.6.27.19-5.1/arch/sparc/include/asm/uaccess_64.h
---- linux-2.6.27/arch/sparc/include/asm/uaccess_64.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/uaccess_64.h 2009-03-25 16:10:45.000000000 +0000
-@@ -265,8 +265,8 @@ extern long __strnlen_user(const char __
+diff -r 9608d5473017 arch/sparc/include/asm/uaccess_64.h
+--- a/arch/sparc/include/asm/uaccess_64.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/uaccess_64.h Wed May 06 16:56:08 2009 +0100
+@@ -265,8 +265,8 @@
#define strlen_user __strlen_user
#define strnlen_user __strnlen_user
#endif /* __ASSEMBLY__ */
-diff -purN linux-2.6.27/arch/sparc/kernel/entry.S linux-2.6.27.19-5.1/arch/sparc/kernel/entry.S
---- linux-2.6.27/arch/sparc/kernel/entry.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/kernel/entry.S 2009-03-25 16:10:44.000000000 +0000
-@@ -1142,8 +1142,8 @@ sunos_execv:
+diff -r 9608d5473017 arch/sparc/kernel/entry.S
+--- a/arch/sparc/kernel/entry.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/kernel/entry.S Wed May 06 16:56:08 2009 +0100
+@@ -1142,8 +1142,8 @@
ld [%sp + STACKFRAME_SZ + PT_I0], %o0
.align 4
mov %o7, %l5
add %sp, STACKFRAME_SZ, %o0 ! pt_regs *regs arg
call sparc_pipe
-diff -purN linux-2.6.27/arch/sparc/kernel/systbls.S linux-2.6.27.19-5.1/arch/sparc/kernel/systbls.S
---- linux-2.6.27/arch/sparc/kernel/systbls.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/kernel/systbls.S 2009-03-25 16:10:44.000000000 +0000
-@@ -24,7 +24,7 @@ sys_call_table:
+diff -r 9608d5473017 arch/sparc/kernel/systbls.S
+--- a/arch/sparc/kernel/systbls.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/kernel/systbls.S Wed May 06 16:56:08 2009 +0100
+@@ -24,7 +24,7 @@
/*25*/ .long sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_pause
/*30*/ .long sys_utime, sys_lchown, sys_fchown, sys_access, sys_nice
/*35*/ .long sys_chown, sys_sync, sys_kill, sys_newstat, sys_sendfile
/*45*/ .long sys_umount, sys_setgid16, sys_getgid16, sys_signal, sys_geteuid16
/*50*/ .long sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, sys_ioctl
/*55*/ .long sys_reboot, sys_mmap2, sys_symlink, sys_readlink, sys_execve
-@@ -56,7 +56,7 @@ sys_call_table:
+@@ -56,7 +56,7 @@
/*185*/ .long sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sys_newuname
/*190*/ .long sys_init_module, sys_personality, sparc_remap_file_pages, sys_epoll_create, sys_epoll_ctl
/*195*/ .long sys_epoll_wait, sys_ioprio_set, sys_getppid, sparc_sigaction, sys_sgetmask
/*205*/ .long sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64
/*210*/ .long sys_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, sys_sysinfo
/*215*/ .long sys_ipc, sys_sigreturn, sys_clone, sys_ioprio_get, sys_adjtimex
-diff -purN linux-2.6.27/arch/sparc/kernel/time.c linux-2.6.27.19-5.1/arch/sparc/kernel/time.c
---- linux-2.6.27/arch/sparc/kernel/time.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/kernel/time.c 2009-03-25 16:10:44.000000000 +0000
-@@ -345,6 +345,7 @@ static struct of_device_id clock_match[]
+diff -r 9608d5473017 arch/sparc/kernel/time.c
+--- a/arch/sparc/kernel/time.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/kernel/time.c Wed May 06 16:56:08 2009 +0100
+@@ -345,6 +345,7 @@
};
static struct of_platform_driver clock_driver = {
.match_table = clock_match,
.probe = clock_probe,
.driver = {
-diff -purN linux-2.6.27/arch/sparc64/Kconfig linux-2.6.27.19-5.1/arch/sparc64/Kconfig
---- linux-2.6.27/arch/sparc64/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/Kconfig 2009-03-25 16:10:45.000000000 +0000
-@@ -15,6 +15,7 @@ config SPARC64
+diff -r 9608d5473017 arch/sparc64/Kconfig
+--- a/arch/sparc64/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/Kconfig Wed May 06 16:56:08 2009 +0100
+@@ -15,6 +15,7 @@
select HAVE_FTRACE
select HAVE_IDE
select HAVE_LMB
select HAVE_ARCH_KGDB
select USE_GENERIC_SMP_HELPERS if SMP
select HAVE_ARCH_TRACEHOOK
-@@ -84,6 +85,7 @@ config GENERIC_HARDIRQS_NO__DO_IRQ
+@@ -84,6 +85,7 @@
def_bool y
source "init/Kconfig"
menu "Processor type and features"
-@@ -401,6 +403,8 @@ source "drivers/sbus/char/Kconfig"
+@@ -401,6 +403,8 @@
source "fs/Kconfig"
source "arch/sparc64/Kconfig.debug"
source "security/Kconfig"
-diff -purN linux-2.6.27/arch/sparc64/Makefile linux-2.6.27.19-5.1/arch/sparc64/Makefile
---- linux-2.6.27/arch/sparc64/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/Makefile 2009-03-25 16:10:45.000000000 +0000
-@@ -32,6 +32,8 @@ core-y += arch/sparc64/math-emu/
+diff -r 9608d5473017 arch/sparc64/Makefile
+--- a/arch/sparc64/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/Makefile Wed May 06 16:56:08 2009 +0100
+@@ -32,6 +32,8 @@
libs-y += arch/sparc64/prom/ arch/sparc64/lib/
drivers-$(CONFIG_OPROFILE) += arch/sparc64/oprofile/
boot := arch/sparc64/boot
image tftpboot.img vmlinux.aout: vmlinux
-diff -purN linux-2.6.27/arch/sparc64/kernel/auxio.c linux-2.6.27.19-5.1/arch/sparc64/kernel/auxio.c
---- linux-2.6.27/arch/sparc64/kernel/auxio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/auxio.c 2009-03-25 16:10:45.000000000 +0000
-@@ -148,6 +148,7 @@ static int __devinit auxio_probe(struct
+diff -r 9608d5473017 arch/sparc64/kernel/auxio.c
+--- a/arch/sparc64/kernel/auxio.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/auxio.c Wed May 06 16:56:08 2009 +0100
+@@ -148,6 +148,7 @@
}
static struct of_platform_driver auxio_driver = {
.match_table = auxio_match,
.probe = auxio_probe,
.driver = {
-diff -purN linux-2.6.27/arch/sparc64/kernel/cpu.c linux-2.6.27.19-5.1/arch/sparc64/kernel/cpu.c
---- linux-2.6.27/arch/sparc64/kernel/cpu.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/cpu.c 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc64/kernel/cpu.c
+--- a/arch/sparc64/kernel/cpu.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/cpu.c Wed May 06 16:56:08 2009 +0100
@@ -20,16 +20,17 @@
DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 };
};
static struct cpu_fp_info linux_sparc_fpu[] = {
-@@ -49,23 +50,24 @@ static struct cpu_fp_info linux_sparc_fp
+@@ -49,23 +50,24 @@
#define NSPARCFPU ARRAY_SIZE(linux_sparc_fpu)
static struct cpu_iu_info linux_sparc_chips[] = {
static void __init sun4v_cpu_probe(void)
{
-@@ -73,11 +75,13 @@ static void __init sun4v_cpu_probe(void)
+@@ -73,11 +75,13 @@
case SUN4V_CHIP_NIAGARA1:
sparc_cpu_type = "UltraSparc T1 (Niagara)";
sparc_fpu_type = "UltraSparc T1 integrated FPU";
break;
default:
-@@ -85,6 +89,7 @@ static void __init sun4v_cpu_probe(void)
+@@ -85,6 +89,7 @@
prom_cpu_compatible);
sparc_cpu_type = "Unknown SUN4V CPU";
sparc_fpu_type = "Unknown SUN4V FPU";
break;
}
}
-@@ -117,6 +122,8 @@ retry:
+@@ -117,6 +122,8 @@
if (linux_sparc_chips[i].impl == impl) {
sparc_cpu_type =
linux_sparc_chips[i].cpu_name;
break;
}
}
-@@ -134,7 +141,7 @@ retry:
+@@ -134,7 +141,7 @@
printk("DEBUG: manuf[%lx] impl[%lx]\n",
manuf, impl);
}
}
for (i = 0; i < NSPARCFPU; i++) {
-diff -purN linux-2.6.27/arch/sparc64/kernel/hvcalls.S linux-2.6.27.19-5.1/arch/sparc64/kernel/hvcalls.S
---- linux-2.6.27/arch/sparc64/kernel/hvcalls.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/hvcalls.S 2009-03-25 16:10:45.000000000 +0000
-@@ -884,3 +884,44 @@ sun4v_mmu_demap_all:
+diff -r 9608d5473017 arch/sparc64/kernel/hvcalls.S
+--- a/arch/sparc64/kernel/hvcalls.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/hvcalls.S Wed May 06 16:56:08 2009 +0100
+@@ -884,3 +884,44 @@
retl
nop
.size sun4v_mmu_demap_all, .-sun4v_mmu_demap_all
+ nop
+ .size sun4v_niagara2_setperf, .-sun4v_niagara2_setperf
+
-diff -purN linux-2.6.27/arch/sparc64/kernel/irq.c linux-2.6.27.19-5.1/arch/sparc64/kernel/irq.c
---- linux-2.6.27/arch/sparc64/kernel/irq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/irq.c 2009-03-25 16:10:45.000000000 +0000
-@@ -749,6 +749,20 @@ void handler_irq(int irq, struct pt_regs
+diff -r 9608d5473017 arch/sparc64/kernel/irq.c
+--- a/arch/sparc64/kernel/irq.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/irq.c Wed May 06 16:56:08 2009 +0100
+@@ -749,6 +749,20 @@
irq_exit();
set_irq_regs(old_regs);
}
void do_softirq(void)
{
-@@ -776,6 +790,55 @@ void do_softirq(void)
+@@ -775,6 +789,55 @@
+
local_irq_restore(flags);
}
-
++
+/* Almost a direct copy of the powerpc PMC code. */
+static DEFINE_SPINLOCK(perf_irq_lock);
+static void *perf_irq_owner_caller; /* mostly for debugging */
+}
+EXPORT_SYMBOL_GPL(release_perfctr_intr);
+
-+
+
#ifdef CONFIG_HOTPLUG_CPU
void fixup_irqs(void)
- {
-diff -purN linux-2.6.27/arch/sparc64/kernel/pci.c linux-2.6.27.19-5.1/arch/sparc64/kernel/pci.c
---- linux-2.6.27/arch/sparc64/kernel/pci.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/pci.c 2009-03-25 16:10:45.000000000 +0000
-@@ -1017,6 +1017,7 @@ static int __pci_mmap_make_offset(struct
+diff -r 9608d5473017 arch/sparc64/kernel/pci.c
+--- a/arch/sparc64/kernel/pci.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/pci.c Wed May 06 16:56:08 2009 +0100
+@@ -1017,6 +1017,7 @@
for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
struct resource *rp = &pdev->resource[i];
/* Active? */
if (!rp->flags)
-@@ -1034,8 +1035,15 @@ static int __pci_mmap_make_offset(struct
+@@ -1034,8 +1035,15 @@
continue;
}
break;
}
-diff -purN linux-2.6.27/arch/sparc64/kernel/power.c linux-2.6.27.19-5.1/arch/sparc64/kernel/power.c
---- linux-2.6.27/arch/sparc64/kernel/power.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/power.c 2009-03-25 16:10:45.000000000 +0000
-@@ -104,6 +104,7 @@ static struct of_device_id power_match[]
+diff -r 9608d5473017 arch/sparc64/kernel/power.c
+--- a/arch/sparc64/kernel/power.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/power.c Wed May 06 16:56:08 2009 +0100
+@@ -104,6 +104,7 @@
};
static struct of_platform_driver power_driver = {
.match_table = power_match,
.probe = power_probe,
.driver = {
-diff -purN linux-2.6.27/arch/sparc64/kernel/process.c linux-2.6.27.19-5.1/arch/sparc64/kernel/process.c
---- linux-2.6.27/arch/sparc64/kernel/process.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/process.c 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc64/kernel/process.c
+--- a/arch/sparc64/kernel/process.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/process.c Wed May 06 16:56:08 2009 +0100
@@ -30,6 +30,7 @@
#include <linux/cpu.h>
#include <linux/elfcore.h>
#include <asm/oplib.h>
#include <asm/uaccess.h>
-@@ -385,11 +386,7 @@ void exit_thread(void)
+@@ -385,11 +386,7 @@
t->utraps[0]--;
}
}
void flush_thread(void)
-@@ -411,13 +408,6 @@ void flush_thread(void)
+@@ -410,13 +407,6 @@
+ tsb_context_switch(mm);
set_thread_wsaved(0);
-
+-
- /* Turn off performance counters if on. */
- if (test_and_clear_thread_flag(TIF_PERFCTR)) {
- t->user_cntd0 = t->user_cntd1 = NULL;
- t->pcr_reg = 0;
- write_pcr(0);
- }
--
+
/* Clear FPU register state. */
t->fpsaved[0] = 0;
-
-@@ -631,16 +621,6 @@ int copy_thread(int nr, unsigned long cl
+@@ -631,16 +621,6 @@
t->kregs->u_regs[UREG_FP] =
((unsigned long) child_sf) - STACK_BIAS;
t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT);
t->kregs->u_regs[UREG_G6] = (unsigned long) t;
t->kregs->u_regs[UREG_G4] = (unsigned long) t->task;
-@@ -673,6 +653,8 @@ int copy_thread(int nr, unsigned long cl
+@@ -672,6 +652,8 @@
+
if (clone_flags & CLONE_SETTLS)
t->kregs->u_regs[UREG_G7] = regs->u_regs[UREG_I3];
-
-+ pfm_copy_thread(p);
+
++ pfm_copy_thread(p);
+
return 0;
}
-
-diff -purN linux-2.6.27/arch/sparc64/kernel/ptrace.c linux-2.6.27.19-5.1/arch/sparc64/kernel/ptrace.c
---- linux-2.6.27/arch/sparc64/kernel/ptrace.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/ptrace.c 2009-03-25 16:10:45.000000000 +0000
-@@ -1014,7 +1014,7 @@ long arch_ptrace(struct task_struct *chi
+diff -r 9608d5473017 arch/sparc64/kernel/ptrace.c
+--- a/arch/sparc64/kernel/ptrace.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/ptrace.c Wed May 06 16:56:08 2009 +0100
+@@ -1014,7 +1014,7 @@
break;
case PTRACE_SETFPREGS64:
0 * sizeof(u64),
33 * sizeof(u64),
fps);
-diff -purN linux-2.6.27/arch/sparc64/kernel/rtrap.S linux-2.6.27.19-5.1/arch/sparc64/kernel/rtrap.S
---- linux-2.6.27/arch/sparc64/kernel/rtrap.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/rtrap.S 2009-03-25 16:10:45.000000000 +0000
-@@ -65,55 +65,14 @@ __handle_user_windows:
+diff -r 9608d5473017 arch/sparc64/kernel/rtrap.S
+--- a/arch/sparc64/kernel/rtrap.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/rtrap.S Wed May 06 16:56:08 2009 +0100
+@@ -65,55 +65,14 @@
ba,pt %xcc, __handle_user_windows_continue
andn %l1, %l4, %l1
__handle_signal:
mov %l5, %o1
-@@ -202,12 +161,8 @@ __handle_signal_continue:
+@@ -202,12 +161,8 @@
brnz,pn %o2, __handle_user_windows
nop
__handle_user_windows_continue:
/* This fpdepth clear is necessary for non-syscall rtraps only */
user_nowork:
-diff -purN linux-2.6.27/arch/sparc64/kernel/setup.c linux-2.6.27.19-5.1/arch/sparc64/kernel/setup.c
---- linux-2.6.27/arch/sparc64/kernel/setup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/setup.c 2009-03-25 16:10:45.000000000 +0000
-@@ -352,6 +352,7 @@ static int show_cpuinfo(struct seq_file
+diff -r 9608d5473017 arch/sparc64/kernel/setup.c
+--- a/arch/sparc64/kernel/setup.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/setup.c Wed May 06 16:56:08 2009 +0100
+@@ -352,6 +352,7 @@
seq_printf(m,
"cpu\t\t: %s\n"
"fpu\t\t: %s\n"
"prom\t\t: %s\n"
"type\t\t: %s\n"
"ncpus probed\t: %d\n"
-@@ -364,6 +365,7 @@ static int show_cpuinfo(struct seq_file
+@@ -364,6 +365,7 @@
,
sparc_cpu_type,
sparc_fpu_type,
prom_version,
((tlb_type == hypervisor) ?
"sun4v" :
-diff -purN linux-2.6.27/arch/sparc64/kernel/signal.c linux-2.6.27.19-5.1/arch/sparc64/kernel/signal.c
---- linux-2.6.27/arch/sparc64/kernel/signal.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/signal.c 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc64/kernel/signal.c
+--- a/arch/sparc64/kernel/signal.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/signal.c Wed May 06 16:56:08 2009 +0100
@@ -23,6 +23,7 @@
#include <linux/tty.h>
#include <linux/binfmts.h>
#include <asm/uaccess.h>
#include <asm/ptrace.h>
-@@ -608,6 +609,9 @@ static void do_signal(struct pt_regs *re
+@@ -608,6 +609,9 @@
void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long thread_info_flags)
{
if (thread_info_flags & _TIF_SIGPENDING)
do_signal(regs, orig_i0);
if (thread_info_flags & _TIF_NOTIFY_RESUME) {
-diff -purN linux-2.6.27/arch/sparc64/kernel/sys_sparc.c linux-2.6.27.19-5.1/arch/sparc64/kernel/sys_sparc.c
---- linux-2.6.27/arch/sparc64/kernel/sys_sparc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/sys_sparc.c 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc64/kernel/sys_sparc.c
+--- a/arch/sparc64/kernel/sys_sparc.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/sys_sparc.c Wed May 06 16:56:08 2009 +0100
@@ -26,7 +26,6 @@
#include <asm/uaccess.h>
#include <asm/unistd.h>
#include "entry.h"
-@@ -397,7 +396,7 @@ void arch_pick_mmap_layout(struct mm_str
+@@ -397,7 +396,7 @@
}
}
{
/* People could try to be nasty and use ta 0x6d in 32bit programs */
if (test_thread_flag(TIF_32BIT) && brk >= STACK_TOP32)
-@@ -413,7 +412,7 @@ asmlinkage unsigned long sparc_brk(unsig
+@@ -413,7 +412,7 @@
* sys_pipe() is the normal C calling standard for creating
* a pipe. It's not the way unix traditionally does this, though.
*/
{
int fd[2];
int error;
-@@ -433,8 +432,8 @@ out:
+@@ -433,8 +432,8 @@
* This is really horribly ugly.
*/
{
long err;
-@@ -517,7 +516,7 @@ out:
+@@ -517,7 +516,7 @@
return err;
}
{
int ret = sys_newuname(name);
-@@ -528,7 +527,7 @@ asmlinkage long sparc64_newuname(struct
+@@ -528,7 +527,7 @@
return ret;
}
{
int ret;
-@@ -562,9 +561,9 @@ int sparc_mmap_check(unsigned long addr,
+@@ -562,9 +561,9 @@
}
/* Linux version of mmap */
{
struct file * file = NULL;
unsigned long retval = -EBADF;
-@@ -587,7 +586,7 @@ out:
+@@ -587,7 +586,7 @@
return retval;
}
{
long ret;
-@@ -604,9 +603,9 @@ extern unsigned long do_mremap(unsigned
+@@ -604,9 +603,9 @@
unsigned long old_len, unsigned long new_len,
unsigned long flags, unsigned long new_addr);
{
unsigned long ret = -EINVAL;
-@@ -669,7 +668,7 @@ asmlinkage void sparc_breakpoint(struct
+@@ -669,7 +668,7 @@
extern void check_pending(int signum);
{
int nlen, err;
-@@ -692,11 +691,10 @@ out:
+@@ -692,11 +691,10 @@
return err;
}
{
if (type < UT_INSTRUCTION_EXCEPTION || type > UT_TRAP_INSTRUCTION_31)
return -EINVAL;
-@@ -762,11 +760,9 @@ asmlinkage long sparc_memory_ordering(un
+@@ -762,11 +760,9 @@
return 0;
}
{
struct k_sigaction new_ka, old_ka;
int ret;
-@@ -791,106 +787,11 @@ asmlinkage long sys_rt_sigaction(int sig
+@@ -791,106 +787,11 @@
return ret;
}
}
/*
-diff -purN linux-2.6.27/arch/sparc64/kernel/syscalls.S linux-2.6.27.19-5.1/arch/sparc64/kernel/syscalls.S
---- linux-2.6.27/arch/sparc64/kernel/syscalls.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/syscalls.S 2009-03-25 16:10:45.000000000 +0000
-@@ -20,8 +20,8 @@ execve_merge:
+diff -r 9608d5473017 arch/sparc64/kernel/syscalls.S
+--- a/arch/sparc64/kernel/syscalls.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/syscalls.S Wed May 06 16:56:08 2009 +0100
+@@ -20,8 +20,8 @@
add %sp, PTREGS_OFF, %o0
.align 32
add %sp, PTREGS_OFF, %o0
sys_nis_syscall:
ba,pt %xcc, c_sys_nis_syscall
-@@ -117,26 +117,9 @@ ret_from_syscall:
+@@ -117,26 +117,9 @@
stb %g0, [%g6 + TI_NEW_CHILD]
ldx [%g6 + TI_FLAGS], %l0
call schedule_tail
.globl sparc_exit
.type sparc_exit,#function
-diff -purN linux-2.6.27/arch/sparc64/kernel/systbls.S linux-2.6.27.19-5.1/arch/sparc64/kernel/systbls.S
---- linux-2.6.27/arch/sparc64/kernel/systbls.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/systbls.S 2009-03-25 16:10:45.000000000 +0000
-@@ -21,12 +21,12 @@ sys_call_table32:
+diff -r 9608d5473017 arch/sparc64/kernel/systbls.S
+--- a/arch/sparc64/kernel/systbls.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/systbls.S Wed May 06 16:56:08 2009 +0100
+@@ -21,12 +21,12 @@
/*0*/ .word sys_restart_syscall, sys32_exit, sys_fork, sys_read, sys_write
/*5*/ .word sys32_open, sys_close, sys32_wait4, sys32_creat, sys_link
/*10*/ .word sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys32_mknod
.word sys32_umount, sys_setgid16, sys_getgid16, sys32_signal, sys_geteuid16
/*50*/ .word sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, compat_sys_ioctl
.word sys32_reboot, sys32_mmap2, sys_symlink, sys32_readlink, sys32_execve
-@@ -55,8 +55,8 @@ sys_call_table32:
+@@ -55,8 +55,8 @@
/*170*/ .word sys32_lsetxattr, sys32_fsetxattr, sys_getxattr, sys_lgetxattr, compat_sys_getdents
.word sys_setsid, sys_fchdir, sys32_fgetxattr, sys_listxattr, sys_llistxattr
/*180*/ .word sys32_flistxattr, sys_removexattr, sys_lremovexattr, compat_sys_sigpending, sys_ni_syscall
.word sys32_epoll_wait, sys32_ioprio_set, sys_getppid, sys32_sigaction, sys_sgetmask
/*200*/ .word sys32_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir
.word sys32_readahead, sys32_socketcall, sys32_syslog, sys32_lookup_dcookie, sys32_fadvise64
-@@ -95,18 +95,18 @@ sys_call_table:
+@@ -95,18 +95,18 @@
/*0*/ .word sys_restart_syscall, sparc_exit, sys_fork, sys_read, sys_write
/*5*/ .word sys_open, sys_close, sys_wait4, sys_creat, sys_link
/*10*/ .word sys_unlink, sys_nis_syscall, sys_chdir, sys_chown, sys_mknod
.word sys_madvise, sys_vhangup, sys_nis_syscall, sys_mincore, sys_getgroups
/*80*/ .word sys_setgroups, sys_getpgrp, sys_nis_syscall, sys_setitimer, sys_nis_syscall
.word sys_swapon, sys_getitimer, sys_nis_syscall, sys_sethostname, sys_nis_syscall
-@@ -129,8 +129,8 @@ sys_call_table:
+@@ -129,8 +129,8 @@
/*170*/ .word sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr, sys_getdents
.word sys_setsid, sys_fchdir, sys_fgetxattr, sys_listxattr, sys_llistxattr
/*180*/ .word sys_flistxattr, sys_removexattr, sys_lremovexattr, sys_nis_syscall, sys_ni_syscall
.word sys_epoll_wait, sys_ioprio_set, sys_getppid, sys_nis_syscall, sys_sgetmask
/*200*/ .word sys_ssetmask, sys_nis_syscall, sys_newlstat, sys_uselib, sys_nis_syscall
.word sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64
-@@ -142,7 +142,7 @@ sys_call_table:
+@@ -142,7 +142,7 @@
.word sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall
/*240*/ .word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler
.word sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep
.word sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
/*260*/ .word sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun
.word sys_timer_delete, sys_timer_create, sys_ni_syscall, sys_io_setup, sys_io_destroy
-diff -purN linux-2.6.27/arch/sparc64/kernel/systbls.h linux-2.6.27.19-5.1/arch/sparc64/kernel/systbls.h
---- linux-2.6.27/arch/sparc64/kernel/systbls.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/systbls.h 2009-03-25 16:10:45.000000000 +0000
-@@ -16,9 +16,6 @@ extern asmlinkage long sys_ipc(unsigned
+diff -r 9608d5473017 arch/sparc64/kernel/systbls.h
+--- a/arch/sparc64/kernel/systbls.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/systbls.h Wed May 06 16:56:08 2009 +0100
+@@ -16,9 +16,6 @@
void __user *ptr, long fifth);
extern asmlinkage long sparc64_newuname(struct new_utsname __user *name);
extern asmlinkage long sparc64_personality(unsigned long personality);
extern asmlinkage long sys64_munmap(unsigned long addr, size_t len);
extern asmlinkage unsigned long sys64_mremap(unsigned long addr,
unsigned long old_len,
-diff -purN linux-2.6.27/arch/sparc64/kernel/time.c linux-2.6.27.19-5.1/arch/sparc64/kernel/time.c
---- linux-2.6.27/arch/sparc64/kernel/time.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/time.c 2009-03-25 16:10:45.000000000 +0000
-@@ -777,6 +777,7 @@ static struct of_device_id clock_match[]
+diff -r 9608d5473017 arch/sparc64/kernel/time.c
+--- a/arch/sparc64/kernel/time.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/time.c Wed May 06 16:56:08 2009 +0100
+@@ -777,6 +777,7 @@
};
static struct of_platform_driver clock_driver = {
.match_table = clock_match,
.probe = clock_probe,
.driver = {
-diff -purN linux-2.6.27/arch/sparc64/kernel/trampoline.S linux-2.6.27.19-5.1/arch/sparc64/kernel/trampoline.S
---- linux-2.6.27/arch/sparc64/kernel/trampoline.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/trampoline.S 2009-03-25 16:10:45.000000000 +0000
-@@ -328,6 +328,12 @@ after_lock_tlb:
+diff -r 9608d5473017 arch/sparc64/kernel/trampoline.S
+--- a/arch/sparc64/kernel/trampoline.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/trampoline.S Wed May 06 16:56:08 2009 +0100
+@@ -328,6 +328,12 @@
wrpr %g0, 0, %wstate
/* As a hack, put &init_thread_union into %g6.
* prom_world() loads from here to restore the %asi
* register.
-@@ -337,7 +343,7 @@ after_lock_tlb:
+@@ -337,7 +343,7 @@
sethi %hi(is_sun4v), %o0
lduw [%o0 + %lo(is_sun4v)], %o0
nop
TRAP_LOAD_TRAP_BLOCK(%g2, %g3)
-@@ -369,10 +375,10 @@ after_lock_tlb:
+@@ -369,10 +375,10 @@
call %o1
add %sp, (2047 + 128), %o0
set prom_set_trap_table_name, %g2
stx %g2, [%sp + 2047 + 128 + 0x00]
mov 1, %g2
-@@ -386,7 +392,11 @@ after_lock_tlb:
+@@ -386,7 +392,11 @@
call %o1
add %sp, (2047 + 128), %o0
ldx [%g6 + TI_TASK], %g4
mov 1, %g5
-diff -purN linux-2.6.27/arch/sparc64/kernel/traps.c linux-2.6.27.19-5.1/arch/sparc64/kernel/traps.c
---- linux-2.6.27/arch/sparc64/kernel/traps.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/traps.c 2009-03-25 16:10:45.000000000 +0000
-@@ -2470,85 +2470,89 @@ extern void tsb_config_offsets_are_bolix
+diff -r 9608d5473017 arch/sparc64/kernel/traps.c
+--- a/arch/sparc64/kernel/traps.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/traps.c Wed May 06 16:56:08 2009 +0100
+@@ -2470,85 +2470,89 @@
/* Only invoked on boot processor. */
void __init trap_init(void)
{
/* Attach to the address space of init_task. On SMP we
* do this in smp.c:smp_callin for other cpus.
-diff -purN linux-2.6.27/arch/sparc64/kernel/ttable.S linux-2.6.27.19-5.1/arch/sparc64/kernel/ttable.S
---- linux-2.6.27/arch/sparc64/kernel/ttable.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/ttable.S 2009-03-25 16:10:45.000000000 +0000
-@@ -66,7 +66,7 @@ tl0_irq6: BTRAP(0x46)
+diff -r 9608d5473017 arch/sparc64/kernel/ttable.S
+--- a/arch/sparc64/kernel/ttable.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/ttable.S Wed May 06 16:56:08 2009 +0100
+@@ -66,7 +66,7 @@
tl0_irq7: BTRAP(0x47) BTRAP(0x48) BTRAP(0x49)
tl0_irq10: BTRAP(0x4a) BTRAP(0x4b) BTRAP(0x4c) BTRAP(0x4d)
tl0_irq14: TRAP_IRQ(timer_interrupt, 14)
tl0_resv050: BTRAP(0x50) BTRAP(0x51) BTRAP(0x52) BTRAP(0x53) BTRAP(0x54) BTRAP(0x55)
tl0_resv056: BTRAP(0x56) BTRAP(0x57) BTRAP(0x58) BTRAP(0x59) BTRAP(0x5a) BTRAP(0x5b)
tl0_resv05c: BTRAP(0x5c) BTRAP(0x5d) BTRAP(0x5e) BTRAP(0x5f)
-diff -purN linux-2.6.27/arch/sparc64/kernel/visemul.c linux-2.6.27.19-5.1/arch/sparc64/kernel/visemul.c
---- linux-2.6.27/arch/sparc64/kernel/visemul.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/visemul.c 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc64/kernel/visemul.c
+--- a/arch/sparc64/kernel/visemul.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/visemul.c Wed May 06 16:56:08 2009 +0100
@@ -131,7 +131,7 @@
#define VIS_OPF_SHIFT 5
#define VIS_OPF_MASK (0x1ff << VIS_OPF_SHIFT)
#define RS2(INSN) (((INSN) >> 0) & 0x1f)
#define RD(INSN) (((INSN) >> 25) & 0x1f)
-@@ -445,7 +445,7 @@ static void pdist(struct pt_regs *regs,
+@@ -445,7 +445,7 @@
unsigned long i;
rs1 = fpd_regval(f, RS1(insn));
rd = fpd_regaddr(f, RD(insn));
rd_val = *rd;
-@@ -807,6 +807,8 @@ int vis_emul(struct pt_regs *regs, unsig
+@@ -807,6 +807,8 @@
if (get_user(insn, (u32 __user *) pc))
return -EFAULT;
opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT;
switch (opf) {
default:
-diff -purN linux-2.6.27/arch/sparc64/lib/user_fixup.c linux-2.6.27.19-5.1/arch/sparc64/lib/user_fixup.c
---- linux-2.6.27/arch/sparc64/lib/user_fixup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/lib/user_fixup.c 2009-03-25 16:10:45.000000000 +0000
-@@ -24,7 +24,7 @@ static unsigned long compute_size(unsign
+diff -r 9608d5473017 arch/sparc64/lib/user_fixup.c
+--- a/arch/sparc64/lib/user_fixup.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/lib/user_fixup.c Wed May 06 16:56:08 2009 +0100
+@@ -24,7 +24,7 @@
if (fault_addr < start || fault_addr >= end) {
*offset = 0;
} else {
size = end - fault_addr;
}
return size;
-diff -purN linux-2.6.27/arch/sparc64/perfmon/Kconfig linux-2.6.27.19-5.1/arch/sparc64/perfmon/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/perfmon/Kconfig 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc64/perfmon/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/sparc64/perfmon/Kconfig Wed May 06 16:56:08 2009 +0100
@@ -0,0 +1,26 @@
+menu "Hardware Performance Monitoring support"
+config PERFMON
+ subsystem. The debugfs filesystem must be mounted.
+
+endmenu
-diff -purN linux-2.6.27/arch/sparc64/perfmon/Makefile linux-2.6.27.19-5.1/arch/sparc64/perfmon/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/perfmon/Makefile 2009-03-25 16:10:45.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 arch/sparc64/perfmon/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/sparc64/perfmon/Makefile Wed May 06 16:56:08 2009 +0100
+@@ -0,0 +1,1 @@
+obj-$(CONFIG_PERFMON) += perfmon.o
-diff -purN linux-2.6.27/arch/sparc64/perfmon/perfmon.c linux-2.6.27.19-5.1/arch/sparc64/perfmon/perfmon.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/perfmon/perfmon.c 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc64/perfmon/perfmon.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/sparc64/perfmon/perfmon.c Wed May 06 16:56:08 2009 +0100
@@ -0,0 +1,422 @@
+/* perfmon.c: sparc64 perfmon support
+ *
+
+module_init(pfm_sparc64_pmu_init);
+module_exit(pfm_sparc64_pmu_exit);
-diff -purN linux-2.6.27/arch/um/Kconfig linux-2.6.27.19-5.1/arch/um/Kconfig
---- linux-2.6.27/arch/um/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/um/Kconfig 2009-03-25 16:10:47.000000000 +0000
-@@ -229,6 +229,8 @@ endmenu
+diff -r 9608d5473017 arch/um/Kconfig
+--- a/arch/um/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/um/Kconfig Wed May 06 16:56:08 2009 +0100
+@@ -229,6 +229,8 @@
source "init/Kconfig"
source "drivers/block/Kconfig"
source "arch/um/Kconfig.char"
-diff -purN linux-2.6.27/arch/um/drivers/mconsole_kern.c linux-2.6.27.19-5.1/arch/um/drivers/mconsole_kern.c
---- linux-2.6.27/arch/um/drivers/mconsole_kern.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/um/drivers/mconsole_kern.c 2009-03-25 16:10:47.000000000 +0000
+diff -r 9608d5473017 arch/um/drivers/mconsole_kern.c
+--- a/arch/um/drivers/mconsole_kern.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/um/drivers/mconsole_kern.c Wed May 06 16:56:08 2009 +0100
@@ -16,6 +16,8 @@
#include <linux/slab.h>
#include <linux/syscalls.h>
#include <linux/workqueue.h>
#include <linux/mutex.h>
#include <asm/uaccess.h>
-@@ -785,7 +787,7 @@ static int __init mconsole_init(void)
+@@ -785,7 +787,7 @@
/* long to avoid size mismatch warnings from gcc */
long sock;
int err;
if (umid_file_name("mconsole", file, sizeof(file)))
return -1;
-diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
---- linux-2.6.27/arch/x86/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/Kconfig 2009-03-25 16:10:44.000000000 +0000
-@@ -27,8 +27,9 @@ config X86
+diff -r 9608d5473017 arch/x86/Kconfig
+--- a/arch/x86/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/Kconfig Wed May 06 16:56:09 2009 +0100
+@@ -27,8 +27,9 @@
select HAVE_KRETPROBES
select HAVE_DYNAMIC_FTRACE
select HAVE_FTRACE
select HAVE_GENERIC_DMA_COHERENT if X86_32
select HAVE_EFFICIENT_UNALIGNED_ACCESS
-@@ -49,13 +50,16 @@ config GENERIC_CMOS_UPDATE
+@@ -49,13 +50,16 @@
config CLOCKSOURCE_WATCHDOG
def_bool y
config LOCKDEP_SUPPORT
def_bool y
-@@ -123,6 +127,9 @@ config GENERIC_TIME_VSYSCALL
+@@ -123,6 +127,9 @@
config ARCH_HAS_CPU_RELAX
def_bool y
config ARCH_HAS_CACHE_LINE_SIZE
def_bool y
-@@ -135,6 +142,7 @@ config HAVE_CPUMASK_OF_CPU_MAP
+@@ -135,6 +142,7 @@
config ARCH_HIBERNATION_POSSIBLE
def_bool y
depends on !SMP || !X86_VOYAGER
config ARCH_SUSPEND_POSSIBLE
def_bool y
-@@ -187,23 +195,33 @@ config X86_64_SMP
+@@ -187,23 +195,33 @@
config X86_HT
bool
depends on X86_SMP || (X86_VOYAGER && SMP) || (64BIT && ACPI_SLEEP)
+ depends on !XEN
default y
-
++
+config X86_NO_TSS
+ def_bool y
+ depends on XEN
+config X86_NO_IDT
+ def_bool y
+ depends on XEN
-+
+
config KTIME_SCALAR
def_bool X86_32
source "init/Kconfig"
menu "Processor type and features"
-@@ -266,6 +284,18 @@ config X86_PC
+@@ -265,6 +283,18 @@
+ bool "PC-compatible"
help
Choose this option if your computer is a standard PC or compatible.
-
++
+config X86_XEN
+ bool "Xen-compatible"
+ depends on X86_32
+ help
+ Choose this option if you plan to run this kernel on top of the
+ Xen Hypervisor.
-+
+
config X86_ELAN
bool "AMD Elan"
- depends on X86_32
-@@ -333,6 +363,14 @@ config X86_BIGSMP
+@@ -333,6 +363,14 @@
endif
config X86_VSMP
bool "Support for ScaleMP vSMP"
select PARAVIRT
-@@ -369,7 +407,7 @@ config X86_RDC321X
+@@ -369,7 +407,7 @@
config SCHED_NO_NO_OMIT_FRAME_POINTER
def_bool y
prompt "Single-depth WCHAN output"
help
Calculate simpler /proc/<PID>/wchan values. If this option
is disabled then wchan values will recurse back to the
-@@ -380,6 +418,7 @@ config SCHED_NO_NO_OMIT_FRAME_POINTER
+@@ -380,6 +418,7 @@
menuconfig PARAVIRT_GUEST
bool "Paravirtualized guest support"
help
Say Y here to get to see options related to running Linux under
various hypervisors. This option alone does not add any kernel code.
-@@ -447,6 +486,7 @@ config PARAVIRT_DEBUG
+@@ -447,6 +486,7 @@
config MEMTEST
bool "Memtest"
help
This option adds a kernel parameter 'memtest', which allows memtest
to be set.
-@@ -473,6 +513,7 @@ source "arch/x86/Kconfig.cpu"
+@@ -473,6 +513,7 @@
config HPET_TIMER
def_bool X86_64
prompt "HPET Timer Support" if X86_32
help
Use the IA-PC HPET (High Precision Event Timer) to manage
time in preference to the PIT and RTC, if a HPET is
-@@ -509,7 +550,7 @@ config GART_IOMMU
+@@ -509,7 +550,7 @@
default y
select SWIOTLB
select AGP
help
Support for full DMA access of devices with 32bit memory access only
on systems with more than 3GB. This is usually needed for USB,
-@@ -524,7 +565,7 @@ config GART_IOMMU
+@@ -524,7 +565,7 @@
config CALGARY_IOMMU
bool "IBM Calgary IOMMU support"
select SWIOTLB
help
Support for hardware IOMMUs in IBM's xSeries x366 and x460
systems. Needed to run systems with more than 3GB of memory
-@@ -553,7 +594,7 @@ config CALGARY_IOMMU_ENABLED_BY_DEFAULT
+@@ -553,7 +594,7 @@
config AMD_IOMMU
bool "AMD IOMMU support"
select SWIOTLB
help
With this option you can enable support for AMD IOMMU hardware in
your system. An IOMMU is a hardware component which provides
-@@ -567,7 +608,7 @@ config AMD_IOMMU
+@@ -567,7 +608,7 @@
# need this always selected by IOMMU for the VIA workaround
config SWIOTLB
help
Support for software bounce buffers used on x86-64 systems
which don't have a hardware IOMMU (e.g. the current generation
-@@ -580,18 +621,21 @@ config IOMMU_HELPER
+@@ -580,18 +621,21 @@
config MAXSMP
bool "Configure Maximum number of SMP Processors and NUMA Nodes"
default "8"
help
This allows you to specify the maximum number of CPUs which this
-@@ -599,7 +643,7 @@ config NR_CPUS
+@@ -599,7 +643,7 @@
minimum value which makes sense is 2.
This is purely to save memory - each supported CPU adds
config SCHED_SMT
bool "SMT (Hyperthreading) scheduler support"
-@@ -621,9 +665,33 @@ config SCHED_MC
+@@ -621,9 +665,33 @@
source "kernel/Kconfig.preempt"
help
A local APIC (Advanced Programmable Interrupt Controller) is an
integrated interrupt controller in the CPU. If you have a single-CPU
-@@ -649,18 +717,24 @@ config X86_UP_IOAPIC
+@@ -649,18 +717,24 @@
config X86_LOCAL_APIC
def_bool y
depends on X86_64 || (X86_32 && (X86_UP_APIC || (SMP && !X86_VOYAGER) || X86_GENERICARCH))
---help---
Machine Check Exception support allows the processor to notify the
kernel if it detects a problem (e.g. overheating, component failure).
-@@ -760,7 +834,7 @@ config I8K
+@@ -760,7 +834,7 @@
config X86_REBOOTFIXUPS
def_bool n
prompt "Enable X86 board specific fixups for reboot"
---help---
This enables chipset and/or board specific fixups to be done
in order to get reboot to work correctly. This is only needed on
-@@ -777,6 +851,7 @@ config X86_REBOOTFIXUPS
+@@ -777,6 +851,7 @@
config MICROCODE
tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support"
select FW_LOADER
---help---
If you say Y here, you will be able to update the microcode on
-@@ -924,7 +999,7 @@ config HIGHMEM
+@@ -924,7 +999,7 @@
config X86_PAE
def_bool n
prompt "PAE (Physical Address Extension) Support"
select RESOURCES_64BIT
help
PAE is required for NX support, and furthermore enables
-@@ -932,10 +1007,19 @@ config X86_PAE
+@@ -932,10 +1007,19 @@
has the cost of more pagetable lookup overhead, and also
consumes more pagetable space per process.
depends on X86_64 || (X86_32 && HIGHMEM64G && (X86_NUMAQ || X86_BIGSMP || X86_SUMMIT && ACPI) && EXPERIMENTAL)
default n if X86_PC
default y if (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP)
-@@ -991,7 +1075,8 @@ config NUMA_EMU
+@@ -991,7 +1075,8 @@
number of nodes. This is only useful for debugging.
config NODES_SHIFT
range 1 9 if X86_64
default "9" if MAXSMP
default "6" if X86_64
-@@ -1032,11 +1117,11 @@ config ARCH_DISCONTIGMEM_DEFAULT
+@@ -1032,11 +1117,11 @@
config ARCH_SPARSEMEM_DEFAULT
def_bool y
select SPARSEMEM_STATIC if X86_32
select SPARSEMEM_VMEMMAP_ENABLE if X86_64
-@@ -1059,9 +1144,31 @@ config HIGHPTE
+@@ -1059,9 +1144,31 @@
low memory. Setting this option will put user-space page table
entries in high memory.
---help---
Linux can emulate a math coprocessor (used for floating point
operations) if you don't have one. 486DX and Pentium processors have
-@@ -1087,6 +1194,7 @@ config MATH_EMULATION
+@@ -1087,6 +1194,7 @@
config MTRR
bool "MTRR (Memory Type Range Register) support"
---help---
On Intel P6 family processors (Pentium Pro, Pentium II and later)
the Memory Type Range Registers (MTRRs) may be used to control
-@@ -1122,7 +1230,7 @@ config MTRR
+@@ -1122,7 +1230,7 @@
config MTRR_SANITIZER
bool
prompt "MTRR cleanup support"
help
Convert MTRR layout from continuous to discrete, so X drivers can
add writeback entries.
-@@ -1168,7 +1276,7 @@ config X86_PAT
+@@ -1168,7 +1276,7 @@
config EFI
def_bool n
prompt "EFI runtime service support"
---help---
This enables the kernel to use EFI runtime services that are
available (such as the EFI variable services).
-@@ -1183,7 +1291,7 @@ config EFI
+@@ -1183,7 +1291,7 @@
config IRQBALANCE
def_bool y
prompt "Enable kernel irq balancing"
help
The default yes will allow the kernel to do irq load balancing.
Saying no will keep the kernel from doing irq load balancing.
-@@ -1205,6 +1313,18 @@ config SECCOMP
+@@ -1204,6 +1312,18 @@
+ defined by each seccomp mode.
If unsure, say Y. Only embedded should say N here.
-
++
+config SECCOMP_DISABLE_TSC
+ bool "Disable the TSC for seccomp tasks"
+ depends on SECCOMP
+
+ If you care most about performance say N. Say Y only if you're
+ paranoid about covert channels.
-+
+
config CC_STACKPROTECTOR
bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
- depends on X86_64 && EXPERIMENTAL && BROKEN
-@@ -1233,7 +1353,7 @@ source kernel/Kconfig.hz
+@@ -1233,7 +1353,7 @@
config KEXEC
bool "kexec system call"
help
kexec is a system call that implements the ability to shutdown your
current kernel, and to start another kernel. It is like a reboot
-@@ -1251,6 +1371,7 @@ config KEXEC
+@@ -1251,6 +1371,7 @@
config CRASH_DUMP
bool "kernel crash dumps"
depends on X86_64 || (X86_32 && HIGHMEM)
help
Generate crash dump after being started by kexec.
This should be normally only set in special crash dump kernels
-@@ -1315,7 +1436,7 @@ config PHYSICAL_START
+@@ -1315,7 +1436,7 @@
config RELOCATABLE
bool "Build a relocatable kernel (EXPERIMENTAL)"
help
This builds a kernel image that retains relocation information
so it can be loaded someplace besides the default 1MB.
-@@ -1378,18 +1499,23 @@ config COMPAT_VDSO
+@@ -1378,18 +1499,23 @@
If unsure, say Y.
config ARCH_HIBERNATION_HEADER
def_bool y
-@@ -1406,7 +1532,7 @@ config X86_APM_BOOT
+@@ -1406,7 +1532,7 @@
menuconfig APM
tristate "APM (Advanced Power Management) BIOS support"
---help---
APM is a BIOS specification for saving power using several different
techniques. This is mostly useful for battery powered laptops with
-@@ -1545,6 +1671,7 @@ config PCI
+@@ -1545,6 +1671,7 @@
bool "PCI support"
default y
select ARCH_SUPPORTS_MSI if (X86_LOCAL_APIC && X86_IO_APIC)
help
Find out whether you have a PCI motherboard. PCI is the name of a
bus system, i.e. the way the CPU talks to the other stuff inside
-@@ -1572,6 +1699,7 @@ choice
+@@ -1572,6 +1699,7 @@
config PCI_GOBIOS
bool "BIOS"
config PCI_GOMMCONFIG
bool "MMConfig"
-@@ -1583,6 +1711,13 @@ config PCI_GOOLPC
+@@ -1583,6 +1711,13 @@
bool "OLPC"
depends on OLPC
config PCI_GOANY
bool "Any"
-@@ -1590,7 +1725,7 @@ endchoice
+@@ -1590,7 +1725,7 @@
config PCI_BIOS
def_bool y
# x86-64 doesn't support PCI BIOS access from long mode so always go direct.
config PCI_DIRECT
-@@ -1613,9 +1748,25 @@ config PCI_MMCONFIG
+@@ -1613,9 +1748,25 @@
bool "Support mmconfig PCI config space access"
depends on X86_64 && PCI && ACPI
help
DMA remapping (DMAR) devices support enables independent address
translations for Direct Memory Access (DMA) from devices.
-@@ -1643,6 +1794,15 @@ config DMAR_FLOPPY_WA
+@@ -1643,6 +1794,15 @@
workaround will setup a 1:1 mapping for the first
16M to make floppy (an ISA device) work.
source "drivers/pci/pcie/Kconfig"
source "drivers/pci/Kconfig"
-@@ -1655,7 +1815,7 @@ if X86_32
+@@ -1655,7 +1815,7 @@
config ISA
bool "ISA support"
help
Find out whether you have ISA slots on your motherboard. ISA is the
name of a bus system, i.e. the way the CPU talks to the other stuff
-@@ -1682,7 +1842,7 @@ config EISA
+@@ -1682,7 +1842,7 @@
source "drivers/eisa/Kconfig"
config MCA
default y if X86_VOYAGER
help
MicroChannel Architecture is found in some IBM PS/2 machines and
-diff -purN linux-2.6.27/arch/x86/Kconfig.cpu linux-2.6.27.19-5.1/arch/x86/Kconfig.cpu
---- linux-2.6.27/arch/x86/Kconfig.cpu 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/Kconfig.cpu 2009-03-25 16:10:44.000000000 +0000
-@@ -340,7 +340,7 @@ config X86_PPRO_FENCE
+diff -r 9608d5473017 arch/x86/Kconfig.cpu
+--- a/arch/x86/Kconfig.cpu Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/Kconfig.cpu Wed May 06 16:56:09 2009 +0100
+@@ -340,7 +340,7 @@
config X86_F00F_BUG
def_bool y
config X86_WP_WORKS_OK
def_bool y
-@@ -397,6 +397,7 @@ config X86_P6_NOP
+@@ -397,6 +397,7 @@
config X86_TSC
def_bool y
depends on ((MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2) && !X86_NUMAQ) || X86_64
config X86_CMPXCHG64
def_bool y
-diff -purN linux-2.6.27/arch/x86/Kconfig.debug linux-2.6.27.19-5.1/arch/x86/Kconfig.debug
---- linux-2.6.27/arch/x86/Kconfig.debug 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/Kconfig.debug 2009-03-25 16:10:44.000000000 +0000
-@@ -25,6 +25,7 @@ config STRICT_DEVMEM
+diff -r 9608d5473017 arch/x86/Kconfig.debug
+--- a/arch/x86/Kconfig.debug Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/Kconfig.debug Wed May 06 16:56:09 2009 +0100
+@@ -25,6 +25,7 @@
config X86_VERBOSE_BOOTUP
bool "Enable verbose x86 bootup info messages"
default y
help
Enables the informational output from the decompression stage
(e.g. bzImage) of the boot. If you disable this you will still
-@@ -43,6 +44,19 @@ config EARLY_PRINTK
+@@ -42,6 +43,19 @@
+ it is not recommended because it looks ugly and doesn't cooperate
with klogd/syslogd or the X server. You should normally N here,
unless you want to debug such a crash.
-
++
+config EARLY_PRINTK_DBGP
+ bool "Early printk via EHCI debug port"
+ default n
+ it is not recommended because it looks ugly and doesn't cooperate
+ with klogd/syslogd or the X server. You should normally N here,
+ unless you want to debug such a crash. You need usb debug device.
-+
+
config DEBUG_STACKOVERFLOW
bool "Check for stack overflows"
- depends on DEBUG_KERNEL
-@@ -101,18 +115,6 @@ config DEBUG_RODATA
+@@ -101,18 +115,6 @@
data. This is recommended so that we can catch kernel bugs sooner.
If in doubt, say "Y".
config DEBUG_RODATA_TEST
bool "Testcase for the DEBUG_RODATA feature"
depends on DEBUG_RODATA
-@@ -142,7 +144,7 @@ config 4KSTACKS
+@@ -142,7 +144,7 @@
config DOUBLEFAULT
default y
bool "Enable doublefault exception handler" if EMBEDDED
help
This option allows trapping of rare doublefault exceptions that
would otherwise cause a system to silently reboot. Disabling this
-@@ -178,7 +180,7 @@ config MMIOTRACE_HOOKS
+@@ -178,7 +180,7 @@
config MMIOTRACE
bool "Memory mapped IO tracing"
select TRACING
select MMIOTRACE_HOOKS
help
-@@ -278,6 +280,7 @@ config DEBUG_BOOT_PARAMS
+@@ -278,6 +280,7 @@
bool "Debug boot parameters"
depends on DEBUG_KERNEL
depends on DEBUG_FS
help
This option will cause struct boot_params to be exported via debugfs.
-@@ -301,5 +304,91 @@ config OPTIMIZE_INLINING
+@@ -301,5 +304,91 @@
If unsure, say N.
--endmenu
+config KDB
+ bool "Built-in Kernel Debugger support"
+ depends on DEBUG_KERNEL && !XEN
+ help
+ If you want to take Kdump kernel vmcore from KDB then say Y here.
+ Of imsire. say N.
-
-+endmenu
-diff -purN linux-2.6.27/arch/x86/Makefile linux-2.6.27.19-5.1/arch/x86/Makefile
---- linux-2.6.27/arch/x86/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/Makefile 2009-03-25 16:10:44.000000000 +0000
-@@ -98,7 +98,9 @@ KBUILD_CFLAGS += -pipe
++
+ endmenu
+-
+diff -r 9608d5473017 arch/x86/Makefile
+--- a/arch/x86/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/Makefile Wed May 06 16:56:09 2009 +0100
+@@ -98,7 +98,9 @@
# Workaround for a gcc prelease that unfortunately was shipped in a suse release
KBUILD_CFLAGS += -Wno-sign-compare
#
# prevent gcc from generating any FP code by mistake
KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,)
-@@ -113,6 +115,10 @@ mcore-y := arch/x86/mach-default/
+@@ -113,6 +115,10 @@
mflags-$(CONFIG_X86_VOYAGER) := -Iinclude/asm-x86/mach-voyager
mcore-$(CONFIG_X86_VOYAGER) := arch/x86/mach-voyager/
# generic subarchitecture
mflags-$(CONFIG_X86_GENERICARCH):= -Iinclude/asm-x86/mach-generic
fcore-$(CONFIG_X86_GENERICARCH) += arch/x86/mach-generic/
-@@ -122,8 +128,10 @@ mcore-$(CONFIG_X86_GENERICARCH) := arch/
+@@ -122,8 +128,10 @@
mflags-y += -Iinclude/asm-x86/mach-default
# 64 bit does not support subarch support - clear sub arch variables
KBUILD_CFLAGS += $(mflags-y)
KBUILD_AFLAGS += $(mflags-y)
-@@ -142,7 +150,7 @@ libs-y += arch/x86/lib/
+@@ -142,13 +150,15 @@
core-y += $(fcore-y)
# Xen paravirtualization support
# lguest paravirtualization support
core-$(CONFIG_LGUEST_GUEST) += arch/x86/lguest/
-@@ -150,6 +158,8 @@ core-$(CONFIG_LGUEST_GUEST) += arch/x86/
+
core-y += arch/x86/kernel/
core-y += arch/x86/mm/
-
-+core-$(CONFIG_PERFMON) += arch/x86/perfmon/
+
++core-$(CONFIG_PERFMON) += arch/x86/perfmon/
+
# Remaining sub architecture files
core-y += $(mcore-y)
-
-@@ -171,14 +181,36 @@ ifeq ($(CONFIG_X86_32),y)
+@@ -171,14 +181,36 @@
drivers-$(CONFIG_FB) += arch/x86/video/
endif
# Default kernel to build
all: bzImage
-@@ -201,6 +233,7 @@ zdisk bzdisk: vmlinux
+@@ -201,6 +233,7 @@
fdimage fdimage144 fdimage288 isoimage: vmlinux
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
install:
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
-diff -purN linux-2.6.27/arch/x86/boot/Makefile linux-2.6.27.19-5.1/arch/x86/boot/Makefile
---- linux-2.6.27/arch/x86/boot/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/boot/Makefile 2009-03-25 16:10:44.000000000 +0000
-@@ -25,7 +25,7 @@ SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
+diff -r 9608d5473017 arch/x86/boot/Makefile
+--- a/arch/x86/boot/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/boot/Makefile Wed May 06 16:56:09 2009 +0100
+@@ -25,7 +25,7 @@
#RAMDISK := -DRAMDISK=512
subdir- := compressed
setup-y += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o
-@@ -190,5 +190,13 @@ zlilo: $(BOOTIMAGE)
+@@ -190,5 +190,13 @@
cp System.map $(INSTALL_PATH)/
if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
+
install:
sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
-diff -purN linux-2.6.27/arch/x86/boot/video-vesa.c linux-2.6.27.19-5.1/arch/x86/boot/video-vesa.c
---- linux-2.6.27/arch/x86/boot/video-vesa.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/boot/video-vesa.c 2009-03-25 16:10:44.000000000 +0000
-@@ -270,9 +270,10 @@ void vesa_store_edid(void)
+diff -r 9608d5473017 arch/x86/boot/video-vesa.c
+--- a/arch/x86/boot/video-vesa.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/boot/video-vesa.c Wed May 06 16:56:09 2009 +0100
+@@ -270,9 +270,10 @@
we genuinely have to assume all registers are destroyed here. */
asm("pushw %%es; movw %2,%%es; "INT10"; popw %%es"
if (ax != 0x004f)
return; /* No EDID */
-@@ -286,8 +287,9 @@ void vesa_store_edid(void)
+@@ -286,8 +287,9 @@
dx = 0; /* EDID block number */
di =(size_t) &boot_params.edid_info; /* (ES:)Pointer to block */
asm(INT10
: "esi");
#endif /* CONFIG_FIRMWARE_EDID */
}
-diff -purN linux-2.6.27/arch/x86/ia32/ia32entry-xen.S linux-2.6.27.19-5.1/arch/x86/ia32/ia32entry-xen.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/ia32/ia32entry-xen.S 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/ia32/ia32entry-xen.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/ia32/ia32entry-xen.S Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,784 @@
+/*
+ * Compatibility mode system call entry point for x86-64.
+ .quad sys_pipe2
+ .quad sys_inotify_init1
+ia32_syscall_end:
-diff -purN linux-2.6.27/arch/x86/kdb/ChangeLog linux-2.6.27.19-5.1/arch/x86/kdb/ChangeLog
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/ChangeLog 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/ChangeLog
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/ChangeLog Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,230 @@
+2008-09-30 Jay Lan <jlan@sgi.com>
+
+ * struct scsi_cmnd. Thus, these fields are no longer displayed
+ * on "sc" command.
+ * kdb v4.4-2.6.24-rc1-x86-1.
-diff -purN linux-2.6.27/arch/x86/kdb/ChangeLog_32 linux-2.6.27.19-5.1/arch/x86/kdb/ChangeLog_32
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/ChangeLog_32 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/ChangeLog_32
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/ChangeLog_32 Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,865 @@
+2007-11-08 Jay Lan <jlan@sgi.com>
+
+2001-12-22 Keith Owens <kaos@sgi.com>
+
+ * Split kdb for i386 as kdb v2.0-2.4.17-i386-1.
-diff -purN linux-2.6.27/arch/x86/kdb/ChangeLog_64 linux-2.6.27.19-5.1/arch/x86/kdb/ChangeLog_64
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/ChangeLog_64 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/ChangeLog_64
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/ChangeLog_64 Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,447 @@
+2007-11-08 Jay Lan <jlan@sgi.com>
+
+
+ * Sync xfs <-> kdb i386 code.
+
-diff -purN linux-2.6.27/arch/x86/kdb/Makefile linux-2.6.27.19-5.1/arch/x86/kdb/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/Makefile 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/Makefile Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,5 @@
+ifeq ($(CONFIG_X86_32),y)
+include ${srctree}/arch/x86/kdb/Makefile_32
+else
+include ${srctree}/arch/x86/kdb/Makefile_64
+endif
-diff -purN linux-2.6.27/arch/x86/kdb/Makefile_32 linux-2.6.27.19-5.1/arch/x86/kdb/Makefile_32
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/Makefile_32 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/Makefile_32
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/Makefile_32 Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,25 @@
+#
+# This file is subject to the terms and conditions of the GNU General Public
+override CFLAGS := $(CFLAGS:%-pg=% )
+
+CFLAGS_kdba_io.o += -I $(TOPDIR)/arch/$(SRCARCH)/kdb
-diff -purN linux-2.6.27/arch/x86/kdb/Makefile_64 linux-2.6.27.19-5.1/arch/x86/kdb/Makefile_64
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/Makefile_64 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/Makefile_64
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/Makefile_64 Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,25 @@
+#
+# This file is subject to the terms and conditions of the GNU General Public
+override CFLAGS := $(CFLAGS:%-pg=% )
+
+CFLAGS_kdba_io.o += -I $(TOPDIR)/arch/$(SRCARCH)/kdb
-diff -purN linux-2.6.27/arch/x86/kdb/i386-dis.c linux-2.6.27.19-5.1/arch/x86/kdb/i386-dis.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/i386-dis.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/i386-dis.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/i386-dis.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,4686 @@
+/* Print i386 instructions for GDB, the GNU debugger.
+ Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ strcpy (obuf, "vmptrld");
+ OP_E (bytemode, sizeflag);
+}
-diff -purN linux-2.6.27/arch/x86/kdb/kdb_cmds_32 linux-2.6.27.19-5.1/arch/x86/kdb/kdb_cmds_32
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdb_cmds_32 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdb_cmds_32
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdb_cmds_32 Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,17 @@
+# Standard architecture specific commands for kdb.
+# These commands are appended to those in kdb/kdb_cmds, see that file for
+ -dmesg 600
+ -bt
+endefcmd
-diff -purN linux-2.6.27/arch/x86/kdb/kdb_cmds_64 linux-2.6.27.19-5.1/arch/x86/kdb/kdb_cmds_64
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdb_cmds_64 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdb_cmds_64
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdb_cmds_64 Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,18 @@
+# Standard architecture specific commands for kdb.
+# These commands are appended to those in kdb/kdb_cmds, see that file for
+ -bt
+ -cpu_pda *
+endefcmd
-diff -purN linux-2.6.27/arch/x86/kdb/kdba_bp_32.c linux-2.6.27.19-5.1/arch/x86/kdb/kdba_bp_32.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdba_bp_32.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdba_bp_32.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdba_bp_32.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,914 @@
+/*
+ * Kernel Debugger Architecture Dependent Breakpoint Handling
+ }
+ return(0);
+}
-diff -purN linux-2.6.27/arch/x86/kdb/kdba_bp_64.c linux-2.6.27.19-5.1/arch/x86/kdb/kdba_bp_64.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdba_bp_64.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdba_bp_64.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdba_bp_64.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,912 @@
+/*
+ * Kernel Debugger Architecture Dependent Breakpoint Handling
+ }
+ return(0);
+}
-diff -purN linux-2.6.27/arch/x86/kdb/kdba_bt.c linux-2.6.27.19-5.1/arch/x86/kdb/kdba_bt.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdba_bt.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdba_bt.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdba_bt.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,5600 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+
+module_init(kdba_bt_x86_init)
+module_exit(kdba_bt_x86_exit)
-diff -purN linux-2.6.27/arch/x86/kdb/kdba_id.c linux-2.6.27.19-5.1/arch/x86/kdb/kdba_id.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdba_id.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdba_id.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdba_id.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,261 @@
+/*
+ * Kernel Debugger Architecture Dependent Instruction Disassembly
+
+ dip->display_endian = BFD_ENDIAN_LITTLE;
+}
-diff -purN linux-2.6.27/arch/x86/kdb/kdba_io.c linux-2.6.27.19-5.1/arch/x86/kdb/kdba_io.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdba_io.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdba_io.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdba_io.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,609 @@
+/*
+ * Kernel Debugger Architecture Dependent Console I/O handler
+ mdelay(1);
+#endif /* CONFIG_VT_CONSOLE */
+}
-diff -purN linux-2.6.27/arch/x86/kdb/kdba_support.c linux-2.6.27.19-5.1/arch/x86/kdb/kdba_support.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdba_support.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdba_support.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdba_support.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,57 @@
+/*
+ * Kernel Debugger Architecture Independent Support Functions
+}
+
+#endif
-diff -purN linux-2.6.27/arch/x86/kdb/kdbasupport_32.c linux-2.6.27.19-5.1/arch/x86/kdb/kdbasupport_32.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdbasupport_32.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdbasupport_32.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdbasupport_32.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,1086 @@
+/*
+ * Kernel Debugger Architecture Independent Support Functions
+}
+
+#endif /* CONFIG_SMP */
-diff -purN linux-2.6.27/arch/x86/kdb/kdbasupport_64.c linux-2.6.27.19-5.1/arch/x86/kdb/kdbasupport_64.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdbasupport_64.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdbasupport_64.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdbasupport_64.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,1042 @@
+/*
+ * Kernel Debugger Architecture Independent Support Functions
+}
+
+#endif /* CONFIG_SMP */
-diff -purN linux-2.6.27/arch/x86/kdb/pc_keyb.h linux-2.6.27.19-5.1/arch/x86/kdb/pc_keyb.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/pc_keyb.h 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/pc_keyb.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/pc_keyb.h Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,137 @@
+/*
+ * include/linux/pc_keyb.h
+#define kbd_read_status() inb(KBD_STATUS_REG)
+#define kbd_write_output(val) outb(val, KBD_DATA_REG)
+#define kbd_write_command(val) outb(val, KBD_CNTL_REG)
-diff -purN linux-2.6.27/arch/x86/kdb/x86_64-dis.c linux-2.6.27.19-5.1/arch/x86/kdb/x86_64-dis.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/x86_64-dis.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/x86_64-dis.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/x86_64-dis.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,4686 @@
+/* Print i386 instructions for GDB, the GNU debugger.
+ Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ strcpy (obuf, "vmptrld");
+ OP_E (bytemode, sizeflag);
+}
-diff -purN linux-2.6.27/arch/x86/kernel/Makefile linux-2.6.27.19-5.1/arch/x86/kernel/Makefile
---- linux-2.6.27/arch/x86/kernel/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/Makefile 2009-03-25 16:10:44.000000000 +0000
-@@ -99,11 +99,17 @@ scx200-y += scx200_32.o
+diff -r 9608d5473017 arch/x86/kernel/Makefile
+--- a/arch/x86/kernel/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/Makefile Wed May 06 16:56:09 2009 +0100
+@@ -99,11 +99,17 @@
obj-$(CONFIG_OLPC) += olpc.o
obj-$(CONFIG_X86_PM_TIMER) += pmtimer_64.o
obj-$(CONFIG_AUDIT) += audit_64.o
-@@ -113,4 +119,12 @@ ifeq ($(CONFIG_X86_64),y)
+@@ -113,4 +119,12 @@
obj-$(CONFIG_SWIOTLB) += pci-swiotlb_64.o
obj-$(CONFIG_PCI_MMCONFIG) += mmconf-fam10h_64.o
+ genx2apic_%.o hpet.o i8253.o i8259.o irqinit_$(BITS).o \
+ pci-swiotlb_64.o reboot.o smpboot.o tlb_$(BITS).o tsc.o tsc_sync.o \
+ uv_%.o vsmp_64.o
-diff -purN linux-2.6.27/arch/x86/kernel/acpi/Makefile linux-2.6.27.19-5.1/arch/x86/kernel/acpi/Makefile
---- linux-2.6.27/arch/x86/kernel/acpi/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/acpi/Makefile 2009-03-25 16:10:44.000000000 +0000
-@@ -5,6 +5,9 @@ obj-$(CONFIG_ACPI_SLEEP) += sleep.o wake
+diff -r 9608d5473017 arch/x86/kernel/acpi/Makefile
+--- a/arch/x86/kernel/acpi/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/acpi/Makefile Wed May 06 16:56:09 2009 +0100
+@@ -5,6 +5,9 @@
ifneq ($(CONFIG_ACPI_PROCESSOR),)
obj-y += cstate.o processor.o
endif
$(obj)/wakeup_rm.o: $(obj)/realmode/wakeup.bin
-@@ -12,3 +15,4 @@ $(obj)/wakeup_rm.o: $(obj)/realmode/w
+@@ -12,3 +15,4 @@
$(obj)/realmode/wakeup.bin: FORCE
$(Q)$(MAKE) $(build)=$(obj)/realmode
+disabled-obj-$(CONFIG_XEN) := cstate.o wakeup_%.o
-diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86/kernel/acpi/boot.c
---- linux-2.6.27/arch/x86/kernel/acpi/boot.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/acpi/boot.c 2009-03-25 16:10:44.000000000 +0000
-@@ -89,7 +89,7 @@ int acpi_sci_override_gsi __initdata;
+diff -r 9608d5473017 arch/x86/kernel/acpi/boot.c
+--- a/arch/x86/kernel/acpi/boot.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/acpi/boot.c Wed May 06 16:56:09 2009 +0100
+@@ -89,7 +89,7 @@
int acpi_skip_timer_override __initdata;
int acpi_use_timer_override __initdata;
static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
#endif
-@@ -130,8 +130,13 @@ char *__init __acpi_map_table(unsigned l
+@@ -130,8 +130,13 @@
if (!phys || !size)
return NULL;
offset = phys & (PAGE_SIZE - 1);
mapped_size = PAGE_SIZE - offset;
-@@ -232,12 +237,14 @@ static int __init acpi_parse_madt(struct
+@@ -232,12 +237,14 @@
return -ENODEV;
}
acpi_madt_oem_check(madt->header.oem_id, madt->header.oem_table_id);
-@@ -246,19 +253,23 @@ static int __init acpi_parse_madt(struct
+@@ -246,19 +253,23 @@
static void __cpuinit acpi_register_lapic(int id, u8 enabled)
{
}
static int __init
-@@ -308,6 +319,7 @@ static int __init
+@@ -308,6 +319,7 @@
acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header,
const unsigned long end)
{
struct acpi_madt_local_apic_override *lapic_addr_ovr = NULL;
lapic_addr_ovr = (struct acpi_madt_local_apic_override *)header;
-@@ -316,6 +328,7 @@ acpi_parse_lapic_addr_ovr(struct acpi_su
+@@ -316,6 +328,7 @@
return -EINVAL;
acpi_lapic_addr = lapic_addr_ovr->address;
return 0;
}
-@@ -769,19 +782,23 @@ static int __init acpi_parse_fadt(struct
+@@ -769,19 +782,23 @@
* returns 0 on success, < 0 on error
*/
static int __init early_acpi_parse_madt_lapic_addr_ovr(void)
{
-@@ -891,10 +908,12 @@ static int mp_find_ioapic(int gsi)
+@@ -891,10 +908,12 @@
static u8 __init uniq_ioapic_id(u8 id)
{
#ifdef CONFIG_X86_32
return id;
#else
int i;
-@@ -938,7 +957,9 @@ void __init mp_register_ioapic(int id, u
+@@ -938,7 +957,9 @@
mp_ioapics[idx].mp_flags = MPC_APIC_USABLE;
mp_ioapics[idx].mp_apicaddr = address;
mp_ioapics[idx].mp_apicid = uniq_ioapic_id(id);
#ifdef CONFIG_X86_32
mp_ioapics[idx].mp_apicver = io_apic_get_version(idx);
-@@ -1095,7 +1116,7 @@ int mp_register_gsi(u32 gsi, int trigger
+@@ -1095,7 +1116,7 @@
{
int ioapic;
int ioapic_pin;
#define MAX_GSI_NUM 4096
#define IRQ_COMPRESSION_START 64
-@@ -1124,7 +1145,7 @@ int mp_register_gsi(u32 gsi, int trigger
+@@ -1124,7 +1145,7 @@
ioapic_pin = gsi - mp_ioapic_routing[ioapic].gsi_base;
if (ioapic_renumber_irq)
gsi = ioapic_renumber_irq(ioapic, gsi);
#endif
-@@ -1143,7 +1164,7 @@ int mp_register_gsi(u32 gsi, int trigger
+@@ -1143,7 +1164,7 @@
if (test_bit(ioapic_pin, mp_ioapic_routing[ioapic].pin_programmed)) {
pr_debug(KERN_DEBUG "Pin %d-%d already programmed\n",
mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
return (gsi < IRQ_COMPRESSION_START ? gsi : gsi_to_irq[gsi]);
#else
return gsi;
-@@ -1151,7 +1172,7 @@ int mp_register_gsi(u32 gsi, int trigger
+@@ -1151,7 +1172,7 @@
}
set_bit(ioapic_pin, mp_ioapic_routing[ioapic].pin_programmed);
/*
* For GSI >= 64, use IRQ compression
*/
-@@ -1351,7 +1372,9 @@ static void __init acpi_process_madt(voi
+@@ -1351,7 +1372,9 @@
acpi_ioapic = 1;
smp_found_config = 1;
}
}
if (error == -EINVAL) {
-@@ -1593,6 +1616,11 @@ static struct dmi_system_id __initdata a
+@@ -1593,6 +1616,11 @@
DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
},
},
/*
* HP laptops which use a DSDT reporting as HP/SB400/10000,
* which includes some code which overrides all temperature
-@@ -1721,6 +1749,9 @@ int __init early_acpi_boot_init(void)
+@@ -1721,6 +1749,9 @@
int __init acpi_boot_init(void)
{
/*
* If acpi_disabled, bail out
* One exception: acpi=ht continues far enough to enumerate LAPICs
-diff -purN linux-2.6.27/arch/x86/kernel/acpi/cstate.c linux-2.6.27.19-5.1/arch/x86/kernel/acpi/cstate.c
---- linux-2.6.27/arch/x86/kernel/acpi/cstate.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/acpi/cstate.c 2009-03-25 16:10:44.000000000 +0000
-@@ -56,6 +56,7 @@ static struct cstate_entry *cpu_cstate_e
+diff -r 9608d5473017 arch/x86/kernel/acpi/cstate.c
+--- a/arch/x86/kernel/acpi/cstate.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/acpi/cstate.c Wed May 06 16:56:09 2009 +0100
+@@ -56,6 +56,7 @@
static short mwait_supported[ACPI_PROCESSOR_MAX_POWER];
#define MWAIT_SUBSTATE_MASK (0xf)
#define MWAIT_SUBSTATE_SIZE (4)
#define CPUID_MWAIT_LEAF (5)
-@@ -98,7 +99,8 @@ int acpi_processor_ffh_cstate_probe(unsi
+@@ -98,7 +99,8 @@
cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx);
/* Check whether this particular cx_type (in CST) is supported or not */
edx_part = edx >> (cstate_type * MWAIT_SUBSTATE_SIZE);
num_cstate_subtype = edx_part & MWAIT_SUBSTATE_MASK;
-diff -purN linux-2.6.27/arch/x86/kernel/acpi/processor.c linux-2.6.27.19-5.1/arch/x86/kernel/acpi/processor.c
---- linux-2.6.27/arch/x86/kernel/acpi/processor.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/acpi/processor.c 2009-03-25 16:10:44.000000000 +0000
-@@ -75,7 +75,18 @@ static void init_intel_pdc(struct acpi_p
+diff -r 9608d5473017 arch/x86/kernel/acpi/processor.c
+--- a/arch/x86/kernel/acpi/processor.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/acpi/processor.c Wed May 06 16:56:09 2009 +0100
+@@ -75,7 +75,18 @@
/* Initialize _PDC data based on the CPU vendor */
void arch_acpi_processor_init_pdc(struct acpi_processor *pr)
{
pr->pdc = NULL;
if (c->x86_vendor == X86_VENDOR_INTEL)
-diff -purN linux-2.6.27/arch/x86/kernel/acpi/processor_extcntl_xen.c linux-2.6.27.19-5.1/arch/x86/kernel/acpi/processor_extcntl_xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/acpi/processor_extcntl_xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/acpi/processor_extcntl_xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/acpi/processor_extcntl_xen.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,220 @@
+/*
+ * processor_extcntl_xen.c - interface to notify Xen
+
+ return HYPERVISOR_platform_op(&op) == 0 ? op.u.get_cpu_freq.freq : 0;
+}
-diff -purN linux-2.6.27/arch/x86/kernel/acpi/sleep-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/acpi/sleep-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/acpi/sleep-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/acpi/sleep-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/acpi/sleep-xen.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,177 @@
+/*
+ * sleep.c - x86-specific ACPI sleep support.
+
+__setup("acpi_sleep=", acpi_sleep_setup);
+#endif /* CONFIG_ACPI_PV_SLEEP */
-diff -purN linux-2.6.27/arch/x86/kernel/acpi/sleep.c linux-2.6.27.19-5.1/arch/x86/kernel/acpi/sleep.c
---- linux-2.6.27/arch/x86/kernel/acpi/sleep.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/acpi/sleep.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/acpi/sleep.c
+--- a/arch/x86/kernel/acpi/sleep.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/acpi/sleep.c Wed May 06 16:56:09 2009 +0100
@@ -10,6 +10,7 @@
#include <linux/dmi.h>
#include <linux/cpumask.h>
#include "realmode/wakeup.h"
#include "sleep.h"
-@@ -98,6 +99,8 @@ int acpi_save_state_mem(void)
+@@ -98,6 +99,8 @@
header->trampoline_segment = setup_trampoline() >> 4;
#ifdef CONFIG_SMP
stack_start.sp = temp_stack + 4096;
#endif
initial_code = (unsigned long)wakeup_long64;
saved_magic = 0x123456789abcdef0;
-diff -purN linux-2.6.27/arch/x86/kernel/alternative.c linux-2.6.27.19-5.1/arch/x86/kernel/alternative.c
---- linux-2.6.27/arch/x86/kernel/alternative.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/alternative.c 2009-03-25 16:10:44.000000000 +0000
-@@ -444,7 +444,7 @@ void __init alternative_instructions(voi
+diff -r 9608d5473017 arch/x86/kernel/alternative.c
+--- a/arch/x86/kernel/alternative.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/alternative.c Wed May 06 16:56:09 2009 +0100
+@@ -444,7 +444,7 @@
_text, _etext);
/* Only switch to UP mode if we don't immediately boot others */
alternatives_smp_switch(0);
}
#endif
-diff -purN linux-2.6.27/arch/x86/kernel/amd_iommu.c linux-2.6.27.19-5.1/arch/x86/kernel/amd_iommu.c
---- linux-2.6.27/arch/x86/kernel/amd_iommu.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/amd_iommu.c 2009-03-25 16:10:44.000000000 +0000
-@@ -235,7 +235,7 @@ static int iommu_map(struct protection_d
+diff -r 9608d5473017 arch/x86/kernel/amd_iommu.c
+--- a/arch/x86/kernel/amd_iommu.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/amd_iommu.c Wed May 06 16:56:09 2009 +0100
+@@ -235,7 +235,7 @@
u64 __pte, *pte, *page;
bus_addr = PAGE_ALIGN(bus_addr);
/* only support 512GB address spaces for now */
if (bus_addr > IOMMU_MAP_SIZE_L3 || !(prot & IOMMU_PROT_MASK))
-@@ -487,7 +487,7 @@ static void dma_ops_free_pagetable(struc
+@@ -487,7 +487,7 @@
continue;
p2 = IOMMU_PTE_PAGE(p1[i]);
if (!IOMMU_PTE_PRESENT(p2[j]))
continue;
p3 = IOMMU_PTE_PAGE(p2[j]);
-diff -purN linux-2.6.27/arch/x86/kernel/amd_iommu_init.c linux-2.6.27.19-5.1/arch/x86/kernel/amd_iommu_init.c
---- linux-2.6.27/arch/x86/kernel/amd_iommu_init.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/amd_iommu_init.c 2009-03-25 16:10:44.000000000 +0000
-@@ -120,7 +120,7 @@ u16 amd_iommu_last_bdf; /* largest PCI
+diff -r 9608d5473017 arch/x86/kernel/amd_iommu_init.c
+--- a/arch/x86/kernel/amd_iommu_init.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/amd_iommu_init.c Wed May 06 16:56:09 2009 +0100
+@@ -120,7 +120,7 @@
LIST_HEAD(amd_iommu_unity_map); /* a list of required unity mappings
we find in ACPI */
unsigned amd_iommu_aperture_order = 26; /* size of aperture in power of 2 */
LIST_HEAD(amd_iommu_list); /* list of all AMD IOMMUs in the
system */
-@@ -210,7 +210,7 @@ static void __init iommu_set_exclusion_r
+@@ -210,7 +210,7 @@
/* Programs the physical address of the device table into the IOMMU hardware */
static void __init iommu_set_device_table(struct amd_iommu *iommu)
{
BUG_ON(iommu->mmio_base == NULL);
-@@ -407,6 +407,10 @@ static u8 * __init alloc_command_buffer(
+@@ -406,6 +406,10 @@
+ entry |= MMIO_CMD_SIZE_512;
memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET,
&entry, sizeof(entry));
-
++
+ /* set head and tail to zero manually */
+ writel(0x00, iommu->mmio_base + MMIO_CMD_HEAD_OFFSET);
+ writel(0x00, iommu->mmio_base + MMIO_CMD_TAIL_OFFSET);
-+
+
iommu_feature_enable(iommu, CONTROL_CMDBUF_EN);
- return cmd_buf;
-@@ -926,7 +930,8 @@ int __init amd_iommu_init(void)
+@@ -926,7 +930,8 @@
goto free;
/* IOMMU rlookup table - find the IOMMU for a specific device */
get_order(rlookup_table_size));
if (amd_iommu_rlookup_table == NULL)
goto free;
-diff -purN linux-2.6.27/arch/x86/kernel/apic_32-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/apic_32-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/apic_32-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/apic_32-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/apic_32-xen.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,52 @@
+/*
+ * Local APIC handling stubs
+ return 0;
+}
+#endif
-diff -purN linux-2.6.27/arch/x86/kernel/apic_32.c linux-2.6.27.19-5.1/arch/x86/kernel/apic_32.c
---- linux-2.6.27/arch/x86/kernel/apic_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/apic_32.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/apic_32.c
+--- a/arch/x86/kernel/apic_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/apic_32.c Wed May 06 16:56:09 2009 +0100
@@ -28,6 +28,7 @@
#include <linux/acpi_pmtmr.h>
#include <linux/module.h>
#include <asm/atomic.h>
#include <asm/smp.h>
-@@ -145,13 +146,13 @@ static int modern_apic(void)
+@@ -145,13 +146,13 @@
return lapic_get_version() >= 0x14;
}
{
u32 send_status;
int timeout;
-@@ -167,6 +168,34 @@ u32 safe_apic_wait_icr_idle(void)
+@@ -166,6 +167,34 @@
+
return send_status;
}
-
++
+void xapic_icr_write(u32 low, u32 id)
+{
+ apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(id));
+
+struct apic_ops __read_mostly *apic_ops = &xapic_ops;
+EXPORT_SYMBOL_GPL(apic_ops);
-+
+
/**
* enable_NMI_through_LVT0 - enable NMI through local vector table 0
- */
-@@ -291,7 +320,7 @@ static void lapic_timer_setup(enum clock
+@@ -291,7 +320,7 @@
static void lapic_timer_broadcast(cpumask_t mask)
{
#ifdef CONFIG_SMP
#endif
}
-@@ -669,6 +698,7 @@ u8 setup_APIC_eilvt_ibs(u8 vector, u8 ms
+@@ -669,6 +698,7 @@
setup_APIC_eilvt(APIC_EILVT_LVTOFF_IBS, vector, msg_type, mask);
return APIC_EILVT_LVTOFF_IBS;
}
/*
* Local APIC start and shutdown
-@@ -1115,7 +1145,7 @@ static int __init detect_init_APIC(void)
+@@ -1115,7 +1145,7 @@
switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_AMD:
if ((boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model > 1) ||
break;
goto no_apic;
case X86_VENDOR_INTEL:
-@@ -1205,7 +1235,7 @@ void __init init_apic_mappings(void)
+@@ -1205,7 +1235,7 @@
* default configuration (or the MP table is broken).
*/
if (boot_cpu_physical_apicid == -1U)
}
-@@ -1242,7 +1272,7 @@ int __init APIC_init_uniprocessor(void)
+@@ -1242,7 +1272,7 @@
* might be zero if read from MP tables. Get it from LAPIC.
*/
#ifdef CONFIG_CRASH_DUMP
#endif
physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map);
-@@ -1316,8 +1346,10 @@ void smp_error_interrupt(struct pt_regs
+@@ -1316,8 +1346,10 @@
6: Received illegal vector
7: Illegal register address
*/
irq_exit();
}
-@@ -1367,6 +1399,9 @@ void __init apic_intr_init(void)
+@@ -1366,6 +1398,9 @@
+ /* thermal monitor LVT interrupt */
#ifdef CONFIG_X86_MCE_P4THERMAL
alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
- #endif
++#endif
+#ifdef CONFIG_PERFMON
+ set_intr_gate(LOCAL_PERFMON_VECTOR, pmu_interrupt);
-+#endif
+ #endif
}
- /**
-diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/kernel/apic_64.c
---- linux-2.6.27/arch/x86/kernel/apic_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/apic_64.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/apic_64.c
+--- a/arch/x86/kernel/apic_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/apic_64.c Wed May 06 16:56:09 2009 +0100
@@ -27,6 +27,7 @@
#include <linux/clockchips.h>
#include <linux/acpi_pmtmr.h>
/* Local APIC timer works in C2 */
int local_apic_timer_c2_ok;
-@@ -118,13 +125,13 @@ static int modern_apic(void)
+@@ -118,13 +125,13 @@
return lapic_get_version() >= 0x14;
}
{
u32 send_status;
int timeout;
-@@ -140,6 +147,70 @@ u32 safe_apic_wait_icr_idle(void)
+@@ -139,6 +146,70 @@
+
return send_status;
}
-
++
+void xapic_icr_write(u32 low, u32 id)
+{
+ apic_write(APIC_ICR2, id << 24);
+ .wait_icr_idle = x2apic_wait_icr_idle,
+ .safe_wait_icr_idle = safe_x2apic_wait_icr_idle,
+};
-+
+
/**
* enable_NMI_through_LVT0 - enable NMI through local vector table 0
- */
-@@ -228,6 +299,7 @@ u8 setup_APIC_eilvt_ibs(u8 vector, u8 ms
+@@ -228,6 +299,7 @@
setup_APIC_eilvt(APIC_EILVT_LVTOFF_IBS, vector, msg_type, mask);
return APIC_EILVT_LVTOFF_IBS;
}
/*
* Program the next event, relative to now
-@@ -280,7 +352,7 @@ static void lapic_timer_setup(enum clock
+@@ -280,7 +352,7 @@
static void lapic_timer_broadcast(cpumask_t mask)
{
#ifdef CONFIG_SMP
#endif
}
-@@ -629,10 +701,10 @@ int __init verify_local_APIC(void)
+@@ -629,10 +701,10 @@
/*
* The ID register is read/write in a real APIC.
*/
apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg1);
apic_write(APIC_ID, reg0);
if (reg1 != (reg0 ^ APIC_ID_MASK))
-@@ -833,6 +905,132 @@ void __cpuinit end_local_APIC_setup(void
+@@ -833,6 +905,132 @@
apic_pm_activate();
}
/*
* Detect and enable local APICs on non-SMP boards.
* Original code written by Keir Fraser.
-@@ -872,7 +1070,7 @@ void __init early_init_lapic_mapping(voi
+@@ -872,7 +1070,7 @@
* Fetch the APIC ID of the BSP in case we have a
* default configuration (or the MP table is broken).
*/
}
/**
-@@ -880,6 +1078,11 @@ void __init early_init_lapic_mapping(voi
+@@ -880,6 +1078,11 @@
*/
void __init init_apic_mappings(void)
{
/*
* If no local APIC can be found then set up a fake all
* zeroes page to simulate the local APIC and another
-@@ -899,7 +1102,7 @@ void __init init_apic_mappings(void)
+@@ -899,7 +1102,7 @@
* Fetch the APIC ID of the BSP in case we have a
* default configuration (or the MP table is broken).
*/
}
/*
-@@ -918,6 +1121,9 @@ int __init APIC_init_uniprocessor(void)
+@@ -917,6 +1120,9 @@
+ printk(KERN_INFO "Apic disabled by BIOS\n");
return -1;
}
-
++
+ enable_IR_x2apic();
+ setup_apic_routing();
-+
+
verify_local_APIC();
- connect_bsp_APIC();
-@@ -998,8 +1204,10 @@ asmlinkage void smp_error_interrupt(void
+@@ -998,8 +1204,10 @@
6: Received illegal vector
7: Illegal register address
*/
irq_exit();
}
-@@ -1093,6 +1301,11 @@ void __cpuinit generic_processor_info(in
+@@ -1093,6 +1301,11 @@
cpu_set(cpu, cpu_present_map);
}
/*
* Power management
*/
-@@ -1129,7 +1342,7 @@ static int lapic_suspend(struct sys_devi
+@@ -1129,7 +1342,7 @@
maxlvt = lapic_get_maxlvt();
apic_pm_state.apic_taskpri = apic_read(APIC_TASKPRI);
apic_pm_state.apic_ldr = apic_read(APIC_LDR);
apic_pm_state.apic_dfr = apic_read(APIC_DFR);
-@@ -1164,10 +1377,14 @@ static int lapic_resume(struct sys_devic
+@@ -1164,10 +1377,14 @@
maxlvt = lapic_get_maxlvt();
local_irq_save(flags);
apic_write(APIC_LVTERR, ERROR_APIC_VECTOR | APIC_LVT_MASKED);
apic_write(APIC_ID, apic_pm_state.apic_id);
apic_write(APIC_DFR, apic_pm_state.apic_dfr);
-@@ -1307,6 +1524,15 @@ __cpuinit int apic_is_clustered_box(void
+@@ -1307,6 +1524,15 @@
return (clusters > 2);
}
/*
* APIC command line parameters
*/
-diff -purN linux-2.6.27/arch/x86/kernel/apm_32.c linux-2.6.27.19-5.1/arch/x86/kernel/apm_32.c
---- linux-2.6.27/arch/x86/kernel/apm_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/apm_32.c 2009-03-25 16:10:44.000000000 +0000
-@@ -389,6 +389,7 @@ static int smp __read_mostly;
+diff -r 9608d5473017 arch/x86/kernel/apm_32.c
+--- a/arch/x86/kernel/apm_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/apm_32.c Wed May 06 16:56:09 2009 +0100
+@@ -389,6 +389,7 @@
static int apm_disabled = -1;
#ifdef CONFIG_SMP
static int power_off;
#else
static int power_off = 1;
#endif
-@@ -1797,6 +1798,14 @@ static int apm(void *unused)
+@@ -1797,6 +1798,14 @@
}
}
/* Install our power off handler.. */
if (power_off)
pm_power_off = apm_power_off;
-@@ -1840,8 +1849,12 @@ static int __init apm_setup(char *str)
+@@ -1840,8 +1849,12 @@
if (strncmp(str, "debug", 5) == 0)
debug = !invert;
if ((strncmp(str, "power-off", 9) == 0) ||
if (strncmp(str, "smp", 3) == 0) {
smp = !invert;
idle_threshold = 100;
-diff -purN linux-2.6.27/arch/x86/kernel/asm-offsets_32.c linux-2.6.27.19-5.1/arch/x86/kernel/asm-offsets_32.c
---- linux-2.6.27/arch/x86/kernel/asm-offsets_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/asm-offsets_32.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/asm-offsets_32.c
+--- a/arch/x86/kernel/asm-offsets_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/asm-offsets_32.c Wed May 06 16:56:09 2009 +0100
@@ -19,10 +19,14 @@
#include <asm/bootparam.h>
#include <asm/elf.h>
/* workaround for a warning with -Wmissing-prototypes */
void foo(void);
-@@ -54,6 +58,7 @@ void foo(void)
+@@ -54,6 +58,7 @@
OFFSET(TI_exec_domain, thread_info, exec_domain);
OFFSET(TI_flags, thread_info, flags);
OFFSET(TI_status, thread_info, status);
OFFSET(TI_preempt_count, thread_info, preempt_count);
OFFSET(TI_addr_limit, thread_info, addr_limit);
OFFSET(TI_restart_block, thread_info, restart_block);
-@@ -91,9 +96,14 @@ void foo(void)
+@@ -91,9 +96,14 @@
OFFSET(pbe_orig_address, pbe, orig_address);
OFFSET(pbe_next, pbe, next);
DEFINE(PAGE_SIZE_asm, PAGE_SIZE);
DEFINE(PAGE_SHIFT_asm, PAGE_SHIFT);
-@@ -115,7 +125,7 @@ void foo(void)
+@@ -115,7 +125,7 @@
OFFSET(PV_CPU_read_cr0, pv_cpu_ops, read_cr0);
#endif
BLANK();
OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask);
OFFSET(XEN_vcpu_info_pending, vcpu_info, evtchn_upcall_pending);
-diff -purN linux-2.6.27/arch/x86/kernel/asm-offsets_64.c linux-2.6.27.19-5.1/arch/x86/kernel/asm-offsets_64.c
---- linux-2.6.27/arch/x86/kernel/asm-offsets_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/asm-offsets_64.c 2009-03-25 16:10:44.000000000 +0000
-@@ -122,8 +122,10 @@ int main(void)
+diff -r 9608d5473017 arch/x86/kernel/asm-offsets_64.c
+--- a/arch/x86/kernel/asm-offsets_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/asm-offsets_64.c Wed May 06 16:56:09 2009 +0100
+@@ -122,8 +122,10 @@
ENTRY(cr8);
BLANK();
#undef ENTRY
DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx));
BLANK();
DEFINE(__NR_syscall_max, sizeof(syscalls) - 1);
-@@ -136,7 +138,7 @@ int main(void)
+@@ -136,7 +138,7 @@
BLANK();
DEFINE(PAGE_SIZE_asm, PAGE_SIZE);
BLANK();
OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask);
OFFSET(XEN_vcpu_info_pending, vcpu_info, evtchn_upcall_pending);
-diff -purN linux-2.6.27/arch/x86/kernel/bios_uv.c linux-2.6.27.19-5.1/arch/x86/kernel/bios_uv.c
---- linux-2.6.27/arch/x86/kernel/bios_uv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/bios_uv.c 2009-03-25 16:10:44.000000000 +0000
-@@ -1,8 +1,6 @@
+diff -r 9608d5473017 arch/x86/kernel/bios_uv.c
+--- a/arch/x86/kernel/bios_uv.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/bios_uv.c Wed May 06 16:56:09 2009 +0100
+@@ -1,7 +1,5 @@
/*
* BIOS run time interface routines.
- *
-- * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
- *
+- * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
@@ -16,33 +14,180 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
+
+ return efi_call6((void *)__va(tab->function),
+ (u64)which, a1, a2, a3, a4, a5);
-+}
-+
+ }
+
+-long
+-x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second,
+- unsigned long *drift_info)
+s64 uv_bios_call_irqsave(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3,
+ u64 a4, u64 a5)
-+{
+ {
+- struct uv_bios_retval isrv;
+ unsigned long bios_flags;
+ s64 ret;
-+
+
+- BIOS_CALL(isrv, BIOS_FREQ_BASE, which, 0, 0, 0, 0, 0, 0);
+- *ticks_per_second = isrv.v0;
+- *drift_info = isrv.v1;
+- return isrv.status;
+ local_irq_save(bios_flags);
+ ret = uv_bios_call(which, a1, a2, a3, a4, a5);
+ local_irq_restore(bios_flags);
+
+ return ret;
-+}
+ }
+-EXPORT_SYMBOL_GPL(x86_bios_freq_base);
+
+s64 uv_bios_call_reentrant(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3,
+ u64 a4, u64 a5)
+ if (region)
+ *region = part.region_size;
+ return ret;
- }
-
--long
--x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second,
-- unsigned long *drift_info)
++}
++
+int
+uv_bios_mq_watchlist_alloc(int blade, void *mq, unsigned int mq_size,
+ unsigned long *intr_mmr_offset)
- {
-- struct uv_bios_retval isrv;
++{
+ union uv_watchlist_u size_blade;
+ unsigned long addr;
+ u64 watchlist;
+ s64 ret;
-
-- BIOS_CALL(isrv, BIOS_FREQ_BASE, which, 0, 0, 0, 0, 0, 0);
-- *ticks_per_second = isrv.v0;
-- *drift_info = isrv.v1;
-- return isrv.status;
++
+ addr = uv_gpa(mq);
+ size_blade.size = mq_size;
+ size_blade.blade = blade;
+{
+ return uv_bios_call(UV_BIOS_FREQ_BASE, clock_type,
+ (u64)ticks_per_second, 0, 0, 0);
- }
--EXPORT_SYMBOL_GPL(x86_bios_freq_base);
++}
+EXPORT_SYMBOL_GPL(uv_bios_freq_base);
+
+
+void uv_bios_init(void) { }
+#endif
+
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/Makefile linux-2.6.27.19-5.1/arch/x86/kernel/cpu/Makefile
---- linux-2.6.27/arch/x86/kernel/cpu/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/Makefile 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/Makefile
+--- a/arch/x86/kernel/cpu/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/Makefile Wed May 06 16:56:09 2009 +0100
@@ -4,6 +4,7 @@
obj-y := intel_cacheinfo.o addon_cpuid_features.o
obj-$(CONFIG_X86_32) += common.o bugs.o
obj-$(CONFIG_X86_64) += common_64.o bugs_64.o
-@@ -22,3 +23,5 @@ obj-$(CONFIG_MTRR) += mtrr/
+@@ -22,3 +23,5 @@
obj-$(CONFIG_CPU_FREQ) += cpufreq/
obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o
+
+disabled-obj-$(CONFIG_XEN) := hypervisor.o perfctr-watchdog.o vmware.o
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/addon_cpuid_features.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/addon_cpuid_features.c
---- linux-2.6.27/arch/x86/kernel/cpu/addon_cpuid_features.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/addon_cpuid_features.c 2009-03-25 16:10:44.000000000 +0000
-@@ -7,6 +7,8 @@
+diff -r 9608d5473017 arch/x86/kernel/cpu/addon_cpuid_features.c
+--- a/arch/x86/kernel/cpu/addon_cpuid_features.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/addon_cpuid_features.c Wed May 06 16:56:09 2009 +0100
+@@ -6,6 +6,8 @@
+
#include <asm/pat.h>
#include <asm/processor.h>
-
-+#include <mach_apic.h>
+
++#include <mach_apic.h>
+
struct cpuid_bit {
u16 feature;
- u8 reg;
-@@ -48,6 +50,100 @@ void __cpuinit init_scattered_cpuid_feat
+@@ -48,6 +50,100 @@
}
}
#ifdef CONFIG_X86_PAT
void __cpuinit validate_pat_support(struct cpuinfo_x86 *c)
{
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/amd_64.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/amd_64.c
---- linux-2.6.27/arch/x86/kernel/cpu/amd_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/amd_64.c 2009-03-25 16:10:44.000000000 +0000
-@@ -193,6 +193,7 @@ static void __cpuinit init_amd(struct cp
+diff -r 9608d5473017 arch/x86/kernel/cpu/amd_64.c
+--- a/arch/x86/kernel/cpu/amd_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/amd_64.c Wed May 06 16:56:09 2009 +0100
+@@ -193,6 +193,7 @@
fam10h_check_enable_mmcfg();
}
if (c == &boot_cpu_data && c->x86 >= 0xf && c->x86 <= 0x11) {
unsigned long long tseg;
-@@ -211,6 +212,7 @@ static void __cpuinit init_amd(struct cp
+@@ -211,6 +212,7 @@
set_memory_4k((unsigned long)__va(tseg), 1);
}
}
}
static struct cpu_dev amd_cpu_dev __cpuinitdata = {
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/bugs_64.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/bugs_64.c
---- linux-2.6.27/arch/x86/kernel/cpu/bugs_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/bugs_64.c 2009-03-25 16:10:44.000000000 +0000
-@@ -20,6 +20,7 @@ void __init check_bugs(void)
+diff -r 9608d5473017 arch/x86/kernel/cpu/bugs_64.c
+--- a/arch/x86/kernel/cpu/bugs_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/bugs_64.c Wed May 06 16:56:09 2009 +0100
+@@ -20,6 +20,7 @@
#endif
alternative_instructions();
/*
* Make sure the first 2MB area is not mapped by huge pages
* There are typically fixed size MTRRs in there and overlapping
-@@ -30,4 +31,5 @@ void __init check_bugs(void)
+@@ -30,4 +31,5 @@
*/
if (!direct_gbpages)
set_memory_4k((unsigned long)__va(0), 1);
+#endif
}
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/common-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/common-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/cpu/common-xen.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,759 @@
+#include <linux/init.h>
+#include <linux/string.h>
+ per_cpu(cpu_tlbstate, cpu).active_mm = &init_mm;
+}
+#endif
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/common.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common.c
---- linux-2.6.27/arch/x86/kernel/cpu/common.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/common.c
+--- a/arch/x86/kernel/cpu/common.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/common.c Wed May 06 16:56:09 2009 +0100
@@ -5,6 +5,7 @@
#include <linux/module.h>
#include <linux/percpu.h>
#ifdef CONFIG_X86_LOCAL_APIC
#include <asm/mpspec.h>
#include <asm/apic.h>
-@@ -505,6 +507,7 @@ static void __cpuinit identify_cpu(struc
+@@ -505,6 +507,7 @@
c->x86, c->x86_model);
}
/*
* On SMP, boot_cpu_data holds the common feature set between
* all CPUs; so make sure that we indicate which features are
-@@ -726,6 +729,8 @@ void __cpuinit cpu_init(void)
+@@ -726,6 +729,8 @@
current_thread_info()->status = 0;
clear_used_math();
mxcsr_feature_mask_init();
}
#ifdef CONFIG_HOTPLUG_CPU
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/common_64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common_64-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common_64-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/common_64-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/cpu/common_64-xen.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,774 @@
+#include <linux/init.h>
+#include <linux/kernel.h>
+ if (is_uv_system())
+ uv_cpu_init();
+}
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/common_64.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common_64.c
---- linux-2.6.27/arch/x86/kernel/cpu/common_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common_64.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/common_64.c
+--- a/arch/x86/kernel/cpu/common_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/common_64.c Wed May 06 16:56:09 2009 +0100
@@ -34,6 +34,7 @@
#include <asm/sections.h>
#include <asm/setup.h>
#include "cpu.h"
-@@ -128,6 +129,9 @@ void __cpuinit detect_ht(struct cpuinfo_
+@@ -127,6 +128,9 @@
+ #ifdef CONFIG_SMP
u32 eax, ebx, ecx, edx;
int index_msb, core_bits;
-
++
+ if (cpu_has(c, X86_FEATURE_XTOPOLOGY))
+ return;
-+
- cpuid(1, &eax, &ebx, &ecx, &edx);
+ cpuid(1, &eax, &ebx, &ecx, &edx);
-@@ -384,6 +388,7 @@ static void __cpuinit identify_cpu(struc
+@@ -384,6 +388,7 @@
detect_ht(c);
/*
* On SMP, boot_cpu_data holds the common feature set between
* all CPUs; so make sure that we indicate which features are
-@@ -636,6 +641,8 @@ void __cpuinit cpu_init(void)
+@@ -636,6 +641,8 @@
barrier();
check_efer();
/*
* set up and load the per-CPU TSS
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
---- linux-2.6.27/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2009-03-25 16:10:44.000000000 +0000
-@@ -779,6 +779,9 @@ static int __init acpi_cpufreq_init(void
+diff -r 9608d5473017 arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+--- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c Wed May 06 16:56:09 2009 +0100
+@@ -779,6 +779,9 @@
{
int ret;
dprintk("acpi_cpufreq_init\n");
ret = acpi_cpufreq_early_init();
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/cpufreq/powernow-k8.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
---- linux-2.6.27/arch/x86/kernel/cpu/cpufreq/powernow-k8.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/cpufreq/powernow-k8.c 2009-03-25 16:10:44.000000000 +0000
-@@ -116,9 +116,20 @@ static int query_current_values_with_pen
+diff -r 9608d5473017 arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c Wed May 06 16:56:09 2009 +0100
+@@ -116,9 +116,20 @@
u32 i = 0;
if (cpu_family == CPU_HW_PSTATE) {
return 0;
}
do {
-@@ -916,10 +927,23 @@ static void powernow_k8_cpu_exit_acpi(st
+@@ -916,10 +927,23 @@
acpi_processor_unregister_performance(&data->acpi_data, data->cpu);
}
#endif /* CONFIG_X86_POWERNOW_K8_ACPI */
/* Take a frequency, and issue the fid/vid transition command */
-@@ -1019,6 +1043,7 @@ static int powernowk8_target(struct cpuf
+@@ -1019,6 +1043,7 @@
unsigned int newstate;
int ret = -EIO;
if (!data)
return -EINVAL;
-@@ -1117,6 +1142,7 @@ static int __cpuinit powernowk8_cpu_init
+@@ -1117,6 +1142,7 @@
}
data->cpu = pol->cpu;
if (powernow_k8_cpu_init_acpi(data)) {
/*
-@@ -1149,7 +1175,16 @@ static int __cpuinit powernowk8_cpu_init
+@@ -1149,7 +1175,16 @@
kfree(data);
return -ENODEV;
}
-- }
+ /* Take a crude guess here.
+ * That guess was in microseconds, so multiply with 1000 */
+ pol->cpuinfo.transition_latency = (
+ ( (data->rvo + 8) * data->vstable * VST_UNITS_20US) +
+ ( (1 << data->irt) * 30)
+ ) * 1000;
-+ }
+ }
+ else /* ACPI _PSS objects available */
+ pol->cpuinfo.transition_latency =
+ get_transition_latency(data) * 1000;
/* only run on specific CPU from here on */
oldmask = current->cpus_allowed;
-@@ -1180,11 +1215,6 @@ static int __cpuinit powernowk8_cpu_init
+@@ -1179,11 +1214,6 @@
+ else
pol->cpus = per_cpu(cpu_core_map, pol->cpu);
data->available_cores = &(pol->cpus);
-
+-
- /* Take a crude guess here.
- * That guess was in microseconds, so multiply with 1000 */
- pol->cpuinfo.transition_latency = (((data->rvo + 8) * data->vstable * VST_UNITS_20US)
- + (3 * (1 << data->irt) * 10)) * 1000;
--
+
if (cpu_family == CPU_HW_PSTATE)
pol->cur = find_khz_freq_from_pstate(data->powernow_table, data->currpstate);
- else
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/cpufreq/powernow-k8.h linux-2.6.27.19-5.1/arch/x86/kernel/cpu/cpufreq/powernow-k8.h
---- linux-2.6.27/arch/x86/kernel/cpu/cpufreq/powernow-k8.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/cpufreq/powernow-k8.h 2009-03-25 16:10:44.000000000 +0000
-@@ -5,6 +5,19 @@
+diff -r 9608d5473017 arch/x86/kernel/cpu/cpufreq/powernow-k8.h
+--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.h Wed May 06 16:56:09 2009 +0100
+@@ -4,6 +4,19 @@
+ * GNU general public license version 2. See "COPYING" or
* http://www.gnu.org/licenses/gpl.html
*/
-
++
+
+enum pstate {
+ HW_PSTATE_INVALID = 0xff,
+ HW_PSTATE_6 = 6,
+ HW_PSTATE_7 = 7,
+};
-+
+
struct powernow_k8_data {
unsigned int cpu;
-
-@@ -23,7 +36,9 @@ struct powernow_k8_data {
+@@ -23,7 +36,9 @@
u32 exttype; /* extended interface = 1 */
/* keep track of the current fid / vid or pstate */
/* the powernow_table includes all frequency and vid/fid pairings:
* fid are the lower 8 bits of the index, vid are the upper 8 bits.
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/feature_names.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/feature_names.c
---- linux-2.6.27/arch/x86/kernel/cpu/feature_names.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/feature_names.c 2009-03-25 16:10:44.000000000 +0000
-@@ -46,7 +46,7 @@ const char * const x86_cap_flags[NCAPINT
+diff -r 9608d5473017 arch/x86/kernel/cpu/feature_names.c
+--- a/arch/x86/kernel/cpu/feature_names.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/feature_names.c Wed May 06 16:56:09 2009 +0100
+@@ -46,7 +46,7 @@
/* Intel-defined (#2) */
"pni", NULL, NULL, "monitor", "ds_cpl", "vmx", "smx", "est",
"tm2", "ssse3", "cid", NULL, NULL, "cx16", "xtpr", NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* VIA/Cyrix/Centaur-defined */
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/hypervisor.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/hypervisor.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/hypervisor.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/hypervisor.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/cpu/hypervisor.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,57 @@
+/*
+ * Common hypervisor code
+ detect_hypervisor_vendor(c);
+ hypervisor_set_feature_bits(c);
+}
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/intel.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/intel.c
---- linux-2.6.27/arch/x86/kernel/cpu/intel.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/intel.c 2009-03-25 16:10:44.000000000 +0000
-@@ -138,6 +138,13 @@ static void __cpuinit init_intel(struct
+diff -r 9608d5473017 arch/x86/kernel/cpu/intel.c
+--- a/arch/x86/kernel/cpu/intel.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/intel.c Wed May 06 16:56:09 2009 +0100
+@@ -138,6 +138,13 @@
}
#endif
l2 = init_intel_cacheinfo(c);
if (c->cpuid_level > 9) {
unsigned eax = cpuid_eax(10);
-@@ -183,9 +190,14 @@ static void __cpuinit init_intel(struct
+@@ -183,9 +190,14 @@
if (p)
strcpy(c->x86_model_id, p);
/* Work around errata */
Intel_errata_workarounds(c);
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/intel_64.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/intel_64.c
---- linux-2.6.27/arch/x86/kernel/cpu/intel_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/intel_64.c 2009-03-25 16:10:44.000000000 +0000
-@@ -54,6 +54,7 @@ static void __cpuinit srat_detect_node(v
+diff -r 9608d5473017 arch/x86/kernel/cpu/intel_64.c
+--- a/arch/x86/kernel/cpu/intel_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/intel_64.c Wed May 06 16:56:09 2009 +0100
+@@ -54,6 +54,7 @@
static void __cpuinit init_intel(struct cpuinfo_x86 *c)
{
init_intel_cacheinfo(c);
if (c->cpuid_level > 9) {
unsigned eax = cpuid_eax(10);
-@@ -80,7 +81,9 @@ static void __cpuinit init_intel(struct
+@@ -80,7 +81,9 @@
if (c->x86 == 6)
set_cpu_cap(c, X86_FEATURE_REP_GOOD);
set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
srat_detect_node();
}
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/mtrr/Makefile linux-2.6.27.19-5.1/arch/x86/kernel/cpu/mtrr/Makefile
---- linux-2.6.27/arch/x86/kernel/cpu/mtrr/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/mtrr/Makefile 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/mtrr/Makefile
+--- a/arch/x86/kernel/cpu/mtrr/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/mtrr/Makefile Wed May 06 16:56:09 2009 +0100
@@ -1,3 +1,4 @@
obj-y := main.o if.o generic.o state.o
obj-$(CONFIG_X86_32) += amd.o cyrix.o centaur.o
+obj-$(CONFIG_XEN) := main.o if.o
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/mtrr/main-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/mtrr/main-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/mtrr/main-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/mtrr/main-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/cpu/mtrr/main-xen.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,330 @@
+#include <linux/init.h>
+#include <linux/proc_fs.h>
+}
+
+subsys_initcall(mtrr_init);
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/vmware.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/vmware.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/vmware.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/vmware.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/cpu/vmware.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,111 @@
+/*
+ * VMware Detection code.
+ set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
+ set_cpu_cap(c, X86_FEATURE_TSC_RELIABLE);
+}
-diff -purN linux-2.6.27/arch/x86/kernel/crash.c linux-2.6.27.19-5.1/arch/x86/kernel/crash.c
---- linux-2.6.27/arch/x86/kernel/crash.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/crash.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/crash.c
+--- a/arch/x86/kernel/crash.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/crash.c Wed May 06 16:56:09 2009 +0100
@@ -29,19 +29,45 @@
#include <mach_ipi.h>
int cpu;
if (val != DIE_NMI_IPI)
-@@ -56,6 +82,9 @@ static int crash_nmi_callback(struct not
+@@ -56,6 +82,9 @@
*/
if (cpu == crashing_cpu)
return NOTIFY_STOP;
local_irq_disable();
#ifdef CONFIG_X86_32
-@@ -71,22 +100,57 @@ static int crash_nmi_callback(struct not
+@@ -71,22 +100,57 @@
halt();
for (;;)
cpu_relax();
static void nmi_shootdown_cpus(void)
{
unsigned long msecs;
-@@ -111,12 +175,23 @@ static void nmi_shootdown_cpus(void)
+@@ -111,12 +175,23 @@
/* Leave the nmi callback set */
disable_local_APIC();
}
void native_machine_crash_shutdown(struct pt_regs *regs)
{
-@@ -131,6 +206,7 @@ void native_machine_crash_shutdown(struc
+@@ -131,6 +206,7 @@
/* The kernel is broken so disable interrupts */
local_irq_disable();
/* Make a note of crashing cpu. Will be used in NMI callback.*/
crashing_cpu = safe_smp_processor_id();
nmi_shootdown_cpus();
-@@ -138,8 +214,39 @@ void native_machine_crash_shutdown(struc
+@@ -138,8 +214,39 @@
#if defined(CONFIG_X86_IO_APIC)
disable_IO_APIC();
#endif
+ crash_save_cpu(regs,safe_smp_processor_id());
+}
+#endif /* CONFIG_KDB_KDUMP */
-diff -purN linux-2.6.27/arch/x86/kernel/e820-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/e820-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/e820-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/e820-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/e820-xen.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,1490 @@
+/*
+ * Handle the memory map.
+ printk(KERN_INFO "Xen-provided physical RAM map:\n");
+ e820_print_map(who);
+}
-diff -purN linux-2.6.27/arch/x86/kernel/early-quirks.c linux-2.6.27.19-5.1/arch/x86/kernel/early-quirks.c
---- linux-2.6.27/arch/x86/kernel/early-quirks.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/early-quirks.c 2009-03-25 16:10:44.000000000 +0000
-@@ -95,6 +95,99 @@ static void __init nvidia_bugs(int num,
+diff -r 9608d5473017 arch/x86/kernel/early-quirks.c
+--- a/arch/x86/kernel/early-quirks.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/early-quirks.c Wed May 06 16:56:09 2009 +0100
+@@ -95,6 +95,99 @@
}
#define QFLAG_APPLY_ONCE 0x1
#define QFLAG_APPLIED 0x2
#define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
-@@ -107,6 +200,12 @@ struct chipset {
+@@ -107,6 +200,12 @@
void (*f)(int num, int slot, int func);
};
static struct chipset early_qrk[] __initdata = {
{ PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID,
PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, nvidia_bugs },
-@@ -114,6 +213,10 @@ static struct chipset early_qrk[] __init
+@@ -114,6 +213,10 @@
PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, via_bugs },
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB,
PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config },
{}
};
-@@ -169,17 +272,17 @@ static int __init check_dev_quirk(int nu
+@@ -169,17 +272,17 @@
void __init early_quirks(void)
{
+ break;
+ }
}
-diff -purN linux-2.6.27/arch/x86/kernel/early_printk-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/early_printk-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/early_printk-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/early_printk-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/early_printk-xen.c Wed May 06 16:56:09 2009 +0100
@@ -0,0 +1,1041 @@
+#include <linux/console.h>
+#include <linux/kernel.h>
+}
+
+early_param("earlyprintk", setup_early_printk);
-diff -purN linux-2.6.27/arch/x86/kernel/early_printk.c linux-2.6.27.19-5.1/arch/x86/kernel/early_printk.c
---- linux-2.6.27/arch/x86/kernel/early_printk.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/early_printk.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/early_printk.c
+--- a/arch/x86/kernel/early_printk.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/early_printk.c Wed May 06 16:56:09 2009 +0100
@@ -3,11 +3,19 @@
#include <linux/init.h>
#include <linux/string.h>
/* Simple VGA output */
#define VGABASE (__ISA_IO_base + 0xb8000)
-@@ -78,6 +86,7 @@ static int early_serial_base = 0x3f8; /
+@@ -78,6 +86,7 @@
static int early_serial_putc(unsigned char ch)
{
unsigned timeout = 0xffff;
while ((inb(early_serial_base + LSR) & XMTRDY) == 0 && --timeout)
cpu_relax();
outb(ch, early_serial_base + TXR);
-@@ -151,6 +160,721 @@ static struct console early_serial_conso
+@@ -151,6 +160,721 @@
.index = -1,
};
/* Console interface to a host file on AMD's SimNow! */
static int simnow_fd;
-@@ -165,6 +889,7 @@ enum {
+@@ -165,6 +889,7 @@
static noinline long simnow(long cmd, long a, long b, long c)
{
long ret;
asm volatile("cpuid" :
"=a" (ret) :
"b" (a), "c" (b), "d" (c), "0" (MAGIC1), "D" (cmd + MAGIC2));
-@@ -174,6 +899,7 @@ static noinline long simnow(long cmd, lo
+@@ -174,6 +899,7 @@
static void __init simnow_init(char *str)
{
char *fn = "klog";
if (*str == '=')
fn = ++str;
/* error ignored */
-@@ -208,10 +934,11 @@ asmlinkage void early_printk(const char
+@@ -208,10 +934,11 @@
va_end(ap);
}
if (!buf)
return 0;
-@@ -219,8 +946,7 @@ static int __init setup_early_printk(cha
+@@ -219,8 +946,7 @@
return 0;
early_console_initialized = 1;
if (!strncmp(buf, "serial", 6)) {
early_serial_init(buf + 6);
-@@ -238,6 +964,17 @@ static int __init setup_early_printk(cha
+@@ -238,6 +964,17 @@
simnow_init(buf + 6);
early_console = &simnow_console;
keep_early = 1;
#ifdef CONFIG_HVC_XEN
} else if (!strncmp(buf, "xen", 3)) {
early_console = &xenboot_console;
-@@ -251,4 +988,23 @@ static int __init setup_early_printk(cha
+@@ -251,4 +988,23 @@
register_console(early_console);
return 0;
}
+}
+
early_param("earlyprintk", setup_early_printk);
-diff -purN linux-2.6.27/arch/x86/kernel/efi.c linux-2.6.27.19-5.1/arch/x86/kernel/efi.c
---- linux-2.6.27/arch/x86/kernel/efi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/efi.c 2009-03-25 16:10:44.000000000 +0000
-@@ -367,6 +367,10 @@ void __init efi_init(void)
+diff -r 9608d5473017 arch/x86/kernel/efi.c
+--- a/arch/x86/kernel/efi.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/efi.c Wed May 06 16:56:10 2009 +0100
+@@ -367,6 +367,10 @@
efi.smbios = config_tables[i].table;
printk(" SMBIOS=0x%lx ", config_tables[i].table);
} else if (!efi_guidcmp(config_tables[i].guid,
HCDP_TABLE_GUID)) {
efi.hcdp = config_tables[i].table;
printk(" HCDP=0x%lx ", config_tables[i].table);
-diff -purN linux-2.6.27/arch/x86/kernel/entry_32-xen.S linux-2.6.27.19-5.1/arch/x86/kernel/entry_32-xen.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/entry_32-xen.S 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/entry_32-xen.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/entry_32-xen.S Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,1537 @@
+/*
+ *
+#undef sys_fork
+#undef sys_clone
+#undef sys_vfork
-diff -purN linux-2.6.27/arch/x86/kernel/entry_32.S linux-2.6.27.19-5.1/arch/x86/kernel/entry_32.S
---- linux-2.6.27/arch/x86/kernel/entry_32.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/entry_32.S 2009-03-25 16:10:44.000000000 +0000
-@@ -293,7 +293,7 @@ ENTRY(ia32_sysenter_target)
+diff -r 9608d5473017 arch/x86/kernel/entry_32.S
+--- a/arch/x86/kernel/entry_32.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/entry_32.S Wed May 06 16:56:10 2009 +0100
+@@ -293,7 +293,7 @@
CFI_SIGNAL_FRAME
CFI_DEF_CFA esp, 0
CFI_REGISTER esp, ebp
sysenter_past_esp:
/*
* Interrupts are disabled here, but we can't trace it until
-@@ -513,7 +513,7 @@ ENDPROC(system_call)
+@@ -513,7 +513,7 @@
ALIGN
RING0_PTREGS_FRAME # can't unwind into user space anyway
work_pending:
jz work_notifysig
work_resched:
call schedule
-@@ -782,7 +782,7 @@ END(device_not_available)
+@@ -782,7 +782,7 @@
* that sets up the real kernel stack. Check here, since we can't
* allow the wrong stack to be used.
*
* already pushed 3 words if it hits on the sysenter instruction:
* eflags, cs and eip.
*
-@@ -794,7 +794,7 @@ END(device_not_available)
+@@ -794,7 +794,7 @@
cmpw $__KERNEL_CS,4(%esp); \
jne ok; \
label: \
CFI_DEF_CFA esp, 0; \
CFI_UNDEFINED eip; \
pushfl; \
-@@ -1015,6 +1015,26 @@ ENTRY(alignment_check)
+@@ -1015,6 +1015,26 @@
CFI_ENDPROC
END(alignment_check)
ENTRY(divide_error)
RING0_INT_FRAME
pushl $0 # no error code
-@@ -1047,6 +1067,38 @@ ENTRY(spurious_interrupt_bug)
+@@ -1047,6 +1067,38 @@
CFI_ENDPROC
END(spurious_interrupt_bug)
ENTRY(kernel_thread_helper)
pushl $0 # fake return address for unwinder
CFI_STARTPROC
-@@ -1060,7 +1112,7 @@ ENTRY(kernel_thread_helper)
+@@ -1060,7 +1112,7 @@
CFI_ENDPROC
ENDPROC(kernel_thread_helper)
/* Xen doesn't set %esp to be precisely what the normal sysenter
entrypoint expects, so fix it up before using the normal path. */
ENTRY(xen_sysenter_target)
-@@ -1153,7 +1205,7 @@ ENTRY(xen_failsafe_callback)
+@@ -1153,7 +1205,7 @@
.previous
ENDPROC(xen_failsafe_callback)
#ifdef CONFIG_FTRACE
#ifdef CONFIG_DYNAMIC_FTRACE
-diff -purN linux-2.6.27/arch/x86/kernel/entry_64-xen.S linux-2.6.27.19-5.1/arch/x86/kernel/entry_64-xen.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/entry_64-xen.S 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/entry_64-xen.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/entry_64-xen.S Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,1456 @@
+/*
+ * linux/arch/x86_64/entry.S
+ CFI_ENDPROC
+ENDPROC(arch_unwind_init_running)
+#endif
-diff -purN linux-2.6.27/arch/x86/kernel/entry_64.S linux-2.6.27.19-5.1/arch/x86/kernel/entry_64.S
---- linux-2.6.27/arch/x86/kernel/entry_64.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/entry_64.S 2009-03-25 16:10:44.000000000 +0000
-@@ -275,12 +275,13 @@ ENTRY(native_usergs_sysret64)
+diff -r 9608d5473017 arch/x86/kernel/entry_64.S
+--- a/arch/x86/kernel/entry_64.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/entry_64.S Wed May 06 16:56:10 2009 +0100
+@@ -275,12 +275,13 @@
ENTRY(ret_from_fork)
CFI_DEFAULT_STACK
push kernel_eflags(%rip)
jnz rff_trace
rff_action:
RESTORE_REST
-@@ -290,6 +291,7 @@ rff_action:
+@@ -290,6 +291,7 @@
jnz int_ret_from_sys_call
RESTORE_TOP_OF_STACK %rdi,ARGOFFSET
jmp ret_from_sys_call
rff_trace:
movq %rsp,%rdi
call syscall_trace_leave
-@@ -888,7 +890,13 @@ END(error_interrupt)
+@@ -888,7 +890,13 @@
ENTRY(spurious_interrupt)
apicinterrupt SPURIOUS_APIC_VECTOR,smp_spurious_interrupt
END(spurious_interrupt)
/*
* Exception entry points.
*/
-@@ -1368,7 +1376,40 @@ KPROBE_ENTRY(ignore_sysret)
+@@ -1368,7 +1376,40 @@
CFI_ENDPROC
ENDPROC(ignore_sysret)
ENTRY(xen_hypervisor_callback)
zeroentry xen_do_hypervisor_callback
END(xen_hypervisor_callback)
-@@ -1466,4 +1507,31 @@ ENTRY(xen_failsafe_callback)
+@@ -1466,4 +1507,31 @@
CFI_ENDPROC
END(xen_failsafe_callback)
+END(kdb_call)
+
+#endif /* CONFIG_KDB */
-diff -purN linux-2.6.27/arch/x86/kernel/fixup.c linux-2.6.27.19-5.1/arch/x86/kernel/fixup.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/fixup.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/fixup.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/fixup.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,88 @@
+/******************************************************************************
+ * fixup.c
+ return 0;
+}
+__initcall(fixup_init);
-diff -purN linux-2.6.27/arch/x86/kernel/genapic_64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/genapic_64-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/genapic_64-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/genapic_64-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/genapic_64-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2004 James Cleverdon, IBM.
+}
+EXPORT_SYMBOL_GPL(is_uv_system);
+#endif
-diff -purN linux-2.6.27/arch/x86/kernel/genapic_64.c linux-2.6.27.19-5.1/arch/x86/kernel/genapic_64.c
---- linux-2.6.27/arch/x86/kernel/genapic_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/genapic_64.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/genapic_64.c
+--- a/arch/x86/kernel/genapic_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/genapic_64.c Wed May 06 16:56:10 2009 +0100
@@ -16,87 +16,63 @@
#include <linux/ctype.h>
#include <linux/init.h>
- genapic = &apic_physflat;
- else
-#endif
--
-- if (max_physical_apicid < 8)
-- genapic = &apic_flat;
-- else
-- genapic = &apic_physflat;
+ if (genapic == &apic_x2apic_phys || genapic == &apic_x2apic_cluster) {
+ if (!intr_remapping_enabled)
+ genapic = &apic_flat;
+ }
+- if (max_physical_apicid < 8)
+- genapic = &apic_flat;
+- else
+- genapic = &apic_physflat;
+-
- printk(KERN_INFO "Setting APIC routing to %s\n", genapic->name);
+ if (genapic == &apic_flat) {
+ if (max_physical_apicid >= 8)
- return uv_system_type != UV_NONE;
-}
-EXPORT_SYMBOL_GPL(is_uv_system);
-diff -purN linux-2.6.27/arch/x86/kernel/genapic_flat_64.c linux-2.6.27.19-5.1/arch/x86/kernel/genapic_flat_64.c
---- linux-2.6.27/arch/x86/kernel/genapic_flat_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/genapic_flat_64.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/genapic_flat_64.c
+--- a/arch/x86/kernel/genapic_flat_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/genapic_flat_64.c Wed May 06 16:56:10 2009 +0100
@@ -15,16 +15,27 @@
#include <linux/kernel.h>
#include <linux/ctype.h>
+#endif
+
+static int flat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
-+{
-+ return 1;
-+}
-+
-+static const cpumask_t *flat_target_cpus(void)
{
- return cpu_online_map;
-+ return &cpu_online_map;
++ return 1;
}
-static cpumask_t flat_vector_allocation_domain(int cpu)
++static const cpumask_t *flat_target_cpus(void)
++{
++ return &cpu_online_map;
++}
++
+static void flat_vector_allocation_domain(int cpu, cpumask_t *retmask)
{
/* Careful. Some cpus do not strictly honor the set of cpus
* specified in the interrupt destination when using lowest
-@@ -34,8 +45,7 @@ static cpumask_t flat_vector_allocation_
+@@ -34,8 +45,7 @@
* deliver interrupts to the wrong hyperthread when only one
* hyperthread was specified in the interrupt desitination.
*/
}
/*
-@@ -58,9 +68,8 @@ static void flat_init_apic_ldr(void)
+@@ -58,9 +68,8 @@
apic_write(APIC_LDR, val);
}
unsigned long flags;
local_irq_save(flags);
-@@ -68,20 +77,40 @@ static void flat_send_IPI_mask(cpumask_t
+@@ -68,20 +77,40 @@
local_irq_restore(flags);
}
} else if (num_online_cpus() > 1) {
__send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL);
}
-@@ -90,19 +119,43 @@ static void flat_send_IPI_allbutself(int
+@@ -90,19 +119,43 @@
static void flat_send_IPI_all(int vector)
{
if (vector == NMI_VECTOR)
}
static unsigned int phys_pkg_id(int index_msb)
-@@ -112,6 +165,7 @@ static unsigned int phys_pkg_id(int inde
+@@ -112,6 +165,7 @@
struct genapic apic_flat = {
.name = "flat",
.int_delivery_mode = dest_LowestPrio,
.int_dest_mode = (APIC_DEST_LOGICAL != 0),
.target_cpus = flat_target_cpus,
-@@ -121,8 +175,13 @@ struct genapic apic_flat = {
+@@ -121,8 +175,13 @@
.send_IPI_all = flat_send_IPI_all,
.send_IPI_allbutself = flat_send_IPI_allbutself,
.send_IPI_mask = flat_send_IPI_mask,
};
/*
-@@ -130,36 +189,55 @@ struct genapic apic_flat = {
+@@ -130,36 +189,55 @@
* We cannot use logical delivery in this case because the mask
* overflows, so use physical mode.
*/
+ (acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL))
+ return 1;
+#endif
-+
-+ return 0;
-+}
-static cpumask_t physflat_target_cpus(void)
-+static const cpumask_t *physflat_target_cpus(void)
- {
+-{
- return cpu_online_map;
-+ return &cpu_online_map;
++ return 0;
}
-static cpumask_t physflat_vector_allocation_domain(int cpu)
-+static void physflat_vector_allocation_domain(int cpu, cpumask_t *retmask)
++static const cpumask_t *physflat_target_cpus(void)
{
- return cpumask_of_cpu(cpu);
-+ cpus_clear(*retmask);
-+ cpu_set(cpu, *retmask);
++ return &cpu_online_map;
}
-static void physflat_send_IPI_mask(cpumask_t cpumask, int vector)
++static void physflat_vector_allocation_domain(int cpu, cpumask_t *retmask)
++{
++ cpus_clear(*retmask);
++ cpu_set(cpu, *retmask);
++}
++
+static void physflat_send_IPI_mask(const cpumask_t *cpumask, int vector)
{
send_IPI_mask_sequence(cpumask, vector);
}
--static void physflat_send_IPI_allbutself(int vector)
+static void physflat_send_IPI_mask_allbutself(const cpumask_t *cpumask,
+ int vector)
- {
-- cpumask_t allbutme = cpu_online_map;
++{
+ send_IPI_mask_allbutself(cpumask, vector);
+}
-
++
+ static void physflat_send_IPI_allbutself(int vector)
+ {
+- cpumask_t allbutme = cpu_online_map;
+-
- cpu_clear(smp_processor_id(), allbutme);
- physflat_send_IPI_mask(allbutme, vector);
-+static void physflat_send_IPI_allbutself(int vector)
-+{
+ send_IPI_mask_allbutself(&cpu_online_map, vector);
}
{
int cpu;
-@@ -167,7 +245,7 @@ static unsigned int physflat_cpu_mask_to
+@@ -167,7 +245,7 @@
* We're using fixed IRQ delivery, can only return one phys APIC ID.
* May as well be the first.
*/
if ((unsigned)cpu < nr_cpu_ids)
return per_cpu(x86_cpu_to_apicid, cpu);
else
-@@ -176,6 +254,7 @@ static unsigned int physflat_cpu_mask_to
+@@ -176,6 +254,7 @@
struct genapic apic_physflat = {
.name = "physical flat",
.int_delivery_mode = dest_Fixed,
.int_dest_mode = (APIC_DEST_PHYSICAL != 0),
.target_cpus = physflat_target_cpus,
-@@ -185,6 +264,11 @@ struct genapic apic_physflat = {
+@@ -185,6 +264,11 @@
.send_IPI_all = physflat_send_IPI_all,
.send_IPI_allbutself = physflat_send_IPI_allbutself,
.send_IPI_mask = physflat_send_IPI_mask,
+ .set_apic_id = set_apic_id,
+ .apic_id_mask = (0xFFu<<24),
};
-diff -purN linux-2.6.27/arch/x86/kernel/genapic_xen_64.c linux-2.6.27.19-5.1/arch/x86/kernel/genapic_xen_64.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/genapic_xen_64.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/genapic_xen_64.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/genapic_xen_64.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2004 James Cleverdon, IBM.
+ .cpu_mask_to_apicid = xen_cpu_mask_to_apicid,
+ .phys_pkg_id = phys_pkg_id,
+};
-diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_cluster.c linux-2.6.27.19-5.1/arch/x86/kernel/genx2apic_cluster.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/genx2apic_cluster.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/genx2apic_cluster.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/genx2apic_cluster.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,179 @@
+#include <linux/threads.h>
+#include <linux/cpumask.h>
+ .set_apic_id = set_apic_id,
+ .apic_id_mask = (0xFFFFFFFFu),
+};
-diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_phys.c linux-2.6.27.19-5.1/arch/x86/kernel/genx2apic_phys.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/genx2apic_phys.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/genx2apic_phys.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/genx2apic_phys.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,177 @@
+#include <linux/threads.h>
+#include <linux/cpumask.h>
+ .set_apic_id = set_apic_id,
+ .apic_id_mask = (0xFFFFFFFFu),
+};
-diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arch/x86/kernel/genx2apic_uv_x.c
---- linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/genx2apic_uv_x.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/genx2apic_uv_x.c
+--- a/arch/x86/kernel/genx2apic_uv_x.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/genx2apic_uv_x.c Wed May 06 16:56:10 2009 +0100
@@ -10,14 +10,18 @@
#include <linux/kernel.h>
#include <asm/smp.h>
#include <asm/ipi.h>
#include <asm/genapic.h>
-@@ -26,6 +30,34 @@
+@@ -25,6 +29,34 @@
+ #include <asm/uv/uv_mmrs.h>
#include <asm/uv/uv_hub.h>
#include <asm/uv/bios.h>
-
++
+static enum uv_system_type uv_system_type;
+
+static int uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
+ return uv_system_type != UV_NONE;
+}
+EXPORT_SYMBOL(is_uv_system);
-+
+
DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info);
-
-@@ -46,16 +78,15 @@ EXPORT_SYMBOL(sn_rtc_cycles_per_second);
+@@ -46,16 +78,15 @@
/* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */
}
int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip)
-@@ -94,28 +125,37 @@ static void uv_send_IPI_one(int cpu, int
+@@ -94,28 +125,37 @@
uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
}
static void uv_send_IPI_allbutself(int vector)
{
- cpumask_t mask = cpu_online_map;
--
-- cpu_clear(smp_processor_id(), mask);
+ unsigned int cpu;
+ unsigned int this_cpu = smp_processor_id();
+- cpu_clear(smp_processor_id(), mask);
+-
- if (!cpus_empty(mask))
- uv_send_IPI_mask(mask, vector);
+ for_each_online_cpu(cpu)
}
static int uv_apic_id_registered(void)
-@@ -123,7 +163,11 @@ static int uv_apic_id_registered(void)
+@@ -123,7 +163,11 @@
return 1;
}
{
int cpu;
-@@ -131,38 +175,67 @@ static unsigned int uv_cpu_mask_to_apici
+@@ -131,38 +175,67 @@
* We're using fixed IRQ delivery, can only return one phys APIC ID.
* May as well be the first.
*/
};
static __cpuinit void set_x2apic_extra_bits(int pnode)
-@@ -222,12 +295,13 @@ static __init void map_low_mmrs(void)
+@@ -222,12 +295,13 @@
enum map_type {map_wb, map_uc};
printk(KERN_INFO "UV: Map %s_HI 0x%lx - 0x%lx\n", id, paddr,
paddr + bytes);
if (map_type == map_uc)
-@@ -243,7 +317,7 @@ static __init void map_gru_high(int max_
+@@ -243,7 +317,7 @@
gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR);
if (gru.s.enable)
}
static __init void map_config_high(int max_pnode)
-@@ -253,7 +327,7 @@ static __init void map_config_high(int m
+@@ -253,7 +327,7 @@
cfg.v = uv_read_local_mmr(UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR);
if (cfg.s.enable)
}
static __init void map_mmr_high(int max_pnode)
-@@ -263,7 +337,7 @@ static __init void map_mmr_high(int max_
+@@ -263,7 +337,7 @@
mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR);
if (mmr.s.enable)
}
static __init void map_mmioh_high(int max_pnode)
-@@ -273,17 +347,17 @@ static __init void map_mmioh_high(int ma
+@@ -273,17 +347,17 @@
mmioh.v = uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR);
if (mmioh.s.enable)
printk(KERN_WARNING
"unable to determine platform RTC clock frequency, "
"guessing.\n");
-@@ -293,7 +367,120 @@ static __init void uv_rtc_init(void)
+@@ -293,7 +367,120 @@
sn_rtc_cycles_per_second = ticks_per_sec;
}
void __init uv_system_init(void)
{
-@@ -320,16 +507,16 @@ void __init uv_system_init(void)
+@@ -320,16 +507,16 @@
printk(KERN_DEBUG "UV: Found %d blades\n", uv_num_possible_blades());
bytes = sizeof(struct uv_blade_info) * uv_num_possible_blades();
memset(uv_cpu_to_blade, 255, bytes);
blade = 0;
-@@ -349,6 +536,9 @@ void __init uv_system_init(void)
+@@ -349,6 +536,9 @@
gnode_upper = (((unsigned long)node_id.s.node_id) &
~((1 << n_val) - 1)) << m_val;
uv_rtc_init();
for_each_present_cpu(cpu) {
-@@ -359,8 +549,7 @@ void __init uv_system_init(void)
+@@ -359,8 +549,7 @@
uv_blade_info[blade].nr_possible_cpus++;
uv_cpu_hub_info(cpu)->lowmem_remap_base = lowmem_redir_base;
uv_cpu_hub_info(cpu)->m_val = m_val;
uv_cpu_hub_info(cpu)->n_val = m_val;
uv_cpu_hub_info(cpu)->numa_blade_id = blade;
-@@ -370,7 +559,8 @@ void __init uv_system_init(void)
+@@ -370,7 +559,8 @@
uv_cpu_hub_info(cpu)->gpa_mask = (1 << (m_val + n_val)) - 1;
uv_cpu_hub_info(cpu)->gnode_upper = gnode_upper;
uv_cpu_hub_info(cpu)->global_mmr_base = mmr_base;
uv_node_to_blade[nid] = blade;
uv_cpu_to_blade[cpu] = blade;
max_pnode = max(pnode, max_pnode);
-@@ -385,19 +575,9 @@ void __init uv_system_init(void)
+@@ -385,19 +575,9 @@
map_mmr_high(max_pnode);
map_config_high(max_pnode);
map_mmioh_high(max_pnode);
- uv_system_inited = true;
--}
+ uv_scir_register_cpu_notifier();
++
++ uv_cpu_init();
++ proc_mkdir("sgi_uv", NULL);
+ }
-/*
- * Called on each cpu to initialize the per_cpu UV data area.
-
- if (get_uv_system_type() == UV_NON_UNIQUE_APIC)
- set_x2apic_extra_bits(uv_hub_info->pnode);
-+ uv_cpu_init();
-+ proc_mkdir("sgi_uv", NULL);
- }
-+
-diff -purN linux-2.6.27/arch/x86/kernel/head-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/head-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/head-xen.c 2009-03-25 16:10:44.000000000 +0000
+-}
+diff -r 9608d5473017 arch/x86/kernel/head-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/head-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,57 @@
+#include <linux/kernel.h>
+#include <linux/init.h>
+ reserve_early_overlap_ok(lowmem, 0x100000, "BIOS reserved");
+#endif
+}
-diff -purN linux-2.6.27/arch/x86/kernel/head32-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/head32-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/head32-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/head32-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/head32-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,57 @@
+/*
+ * linux/arch/i386/kernel/head32.c -- prepare to run common code
+
+ start_kernel();
+}
-diff -purN linux-2.6.27/arch/x86/kernel/head64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/head64-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/head64-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/head64-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/head64-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,181 @@
+/*
+ * prepare to run common code
+
+ start_kernel();
+}
-diff -purN linux-2.6.27/arch/x86/kernel/head64.c linux-2.6.27.19-5.1/arch/x86/kernel/head64.c
---- linux-2.6.27/arch/x86/kernel/head64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/head64.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/head64.c
+--- a/arch/x86/kernel/head64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/head64.c Wed May 06 16:56:10 2009 +0100
@@ -26,7 +26,7 @@
#include <asm/bios_ebda.h>
#ifdef CONFIG_SMP
/*
-diff -purN linux-2.6.27/arch/x86/kernel/head_32-xen.S linux-2.6.27.19-5.1/arch/x86/kernel/head_32-xen.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/head_32-xen.S 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/head_32-xen.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/head_32-xen.S Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,164 @@
+
+
+#endif
+ ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic")
+ ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long 1)
-diff -purN linux-2.6.27/arch/x86/kernel/head_64-xen.S linux-2.6.27.19-5.1/arch/x86/kernel/head_64-xen.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/head_64-xen.S 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/head_64-xen.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/head_64-xen.S Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,140 @@
+/*
+ * linux/arch/x86_64/kernel/head.S -- start in 32bit and switch to 64bit
+ ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz "writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel")
+ ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic")
+ ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long 1)
-diff -purN linux-2.6.27/arch/x86/kernel/head_64.S linux-2.6.27.19-5.1/arch/x86/kernel/head_64.S
---- linux-2.6.27/arch/x86/kernel/head_64.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/head_64.S 2009-03-25 16:10:44.000000000 +0000
-@@ -305,7 +305,7 @@ ENTRY(early_idt_handler)
+diff -r 9608d5473017 arch/x86/kernel/head_64.S
+--- a/arch/x86/kernel/head_64.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/head_64.S Wed May 06 16:56:10 2009 +0100
+@@ -305,7 +305,7 @@
call dump_stack
#ifdef CONFIG_KALLSYMS
leaq early_idt_ripmsg(%rip),%rdi
call __print_symbol
#endif
#endif /* EARLY_PRINTK */
-diff -purN linux-2.6.27/arch/x86/kernel/hpet.c linux-2.6.27.19-5.1/arch/x86/kernel/hpet.c
---- linux-2.6.27/arch/x86/kernel/hpet.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/hpet.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/hpet.c
+--- a/arch/x86/kernel/hpet.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/hpet.c Wed May 06 16:56:10 2009 +0100
@@ -24,6 +24,7 @@
*/
unsigned long hpet_address;
unsigned long hpet_readl(unsigned long a)
{
-@@ -37,6 +38,33 @@ static inline void hpet_writel(unsigned
+@@ -37,6 +38,33 @@
#ifdef CONFIG_X86_64
#include <asm/pgtable.h>
#endif
static inline void hpet_set_mapping(void)
-@@ -78,6 +106,17 @@ static int __init disable_hpet(char *str
+@@ -77,6 +105,17 @@
+ return 1;
}
__setup("nohpet", disable_hpet);
-
++
+#ifdef CONFIG_X86_64
+static int hpet64 = 0;
+static int __init hpet64_setup(char *str)
+__setup("hpet64", hpet64_setup);
+#endif
+
-+
+
static inline int is_hpet_capable(void)
{
- return (!boot_hpet_disable && hpet_address);
-@@ -141,6 +180,7 @@ static void hpet_reserve_platform_timers
+@@ -141,6 +180,7 @@
* Common hpet info
*/
static unsigned long hpet_period;
static void hpet_legacy_set_mode(enum clock_event_mode mode,
struct clock_event_device *evt);
-@@ -192,10 +232,38 @@ static void hpet_enable_legacy_int(void)
+@@ -192,10 +232,38 @@
hpet_legacy_int_enabled = 1;
}
/*
* The mult factor is defined as (include/linux/clockchips.h)
-@@ -233,26 +301,30 @@ static void hpet_legacy_set_mode(enum cl
+@@ -233,26 +301,30 @@
case CLOCK_EVT_MODE_PERIODIC:
delta = ((uint64_t)(NSEC_PER_SEC/HZ)) * hpet_clockevent.mult;
delta >>= hpet_clockevent.shift;
hpet_writel(cfg, HPET_T0_CFG);
break;
-@@ -272,20 +344,21 @@ static void hpet_legacy_set_mode(enum cl
+@@ -272,20 +344,21 @@
static int hpet_legacy_next_event(unsigned long delta,
struct clock_event_device *evt)
{
}
/*
-diff -purN linux-2.6.27/arch/x86/kernel/i8259.c linux-2.6.27.19-5.1/arch/x86/kernel/i8259.c
---- linux-2.6.27/arch/x86/kernel/i8259.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/i8259.c 2009-03-25 16:10:44.000000000 +0000
-@@ -282,6 +282,30 @@ static int __init i8259A_init_sysfs(void
+diff -r 9608d5473017 arch/x86/kernel/i8259.c
+--- a/arch/x86/kernel/i8259.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/i8259.c Wed May 06 16:56:10 2009 +0100
+@@ -282,6 +282,30 @@
device_initcall(i8259A_init_sysfs);
void init_8259A(int auto_eoi)
{
unsigned long flags;
-diff -purN linux-2.6.27/arch/x86/kernel/init_task-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/init_task-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/init_task-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/init_task-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/init_task-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,51 @@
+#include <linux/mm.h>
+#include <linux/module.h>
+DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS;
+#endif
+
-diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_32-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_32-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/io_apic_32-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/io_apic_32-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,2993 @@
+/*
+ * Intel IO-APIC support for multi-Pentium hosts.
+ }
+}
+#endif
-diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32.c linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_32.c
---- linux-2.6.27/arch/x86/kernel/io_apic_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_32.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/io_apic_32.c
+--- a/arch/x86/kernel/io_apic_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/io_apic_32.c Wed May 06 16:56:10 2009 +0100
@@ -33,6 +33,10 @@
#include <linux/sysdev.h>
#include <linux/pci.h>
#include <linux/htirq.h>
#include <linux/freezer.h>
#include <linux/kthread.h>
-@@ -344,11 +348,11 @@ static void set_ioapic_affinity_irq(unsi
+@@ -344,11 +348,11 @@
cpus_and(tmp, cpumask, cpu_online_map);
if (cpus_empty(tmp))
/* Prepare to do the io_apic_write */
apicid_value = apicid_value << 24;
spin_lock_irqsave(&ioapic_lock, flags);
-@@ -926,7 +930,7 @@ void __init setup_ioapic_dest(void)
+@@ -926,7 +930,7 @@
if (irq_entry == -1)
continue;
irq = pin_2_irq(irq_entry, ioapic, pin);
}
}
-@@ -1189,6 +1193,10 @@ next:
+@@ -1189,6 +1193,10 @@
return -ENOSPC;
if (test_and_set_bit(vector, used_vectors))
goto next;
current_vector = vector;
current_offset = offset;
-@@ -1490,7 +1498,7 @@ void /*__init*/ print_local_APIC(void *d
+@@ -1490,7 +1498,7 @@
smp_processor_id(), hard_smp_processor_id());
v = apic_read(APIC_ID);
printk(KERN_INFO "... APIC ID: %08x (%01x)\n", v,
v = apic_read(APIC_LVR);
printk(KERN_INFO "... APIC VERSION: %08x\n", v);
ver = GET_APIC_VERSION(v);
-@@ -1500,9 +1508,11 @@ void /*__init*/ print_local_APIC(void *d
+@@ -1500,9 +1508,11 @@
printk(KERN_DEBUG "... APIC TASKPRI: %08x (%02x)\n", v, v & APIC_TPRI_MASK);
if (APIC_INTEGRATED(ver)) { /* !82489DX */
v = apic_read(APIC_PROCPRI);
printk(KERN_DEBUG "... APIC PROCPRI: %08x\n", v);
}
-@@ -1698,8 +1708,7 @@ void disable_IO_APIC(void)
+@@ -1698,8 +1708,7 @@
entry.dest_mode = 0; /* Physical */
entry.delivery_mode = dest_ExtINT; /* ExtInt */
entry.vector = 0;
/*
* Add it to the IO-APIC irq-routing table:
-@@ -2314,6 +2323,9 @@ void __init setup_IO_APIC(void)
+@@ -2314,6 +2323,9 @@
for (i = first_system_vector; i < NR_VECTORS; i++)
set_bit(i, used_vectors);
enable_IO_APIC();
io_apic_irqs = ~PIC_IRQS;
-@@ -2518,13 +2530,13 @@ static void set_msi_irq_affinity(unsigne
+@@ -2518,13 +2530,13 @@
cpus_and(tmp, mask, cpu_online_map);
if (cpus_empty(tmp))
read_msi_msg(irq, &msg);
-@@ -2611,11 +2623,11 @@ static void set_ht_irq_affinity(unsigned
+@@ -2611,11 +2623,11 @@
cpus_and(tmp, mask, cpu_online_map);
if (cpus_empty(tmp))
target_ht_irq(irq, dest);
irq_desc[irq].affinity = mask;
-@@ -2645,7 +2657,7 @@ int arch_setup_ht_irq(unsigned int irq,
+@@ -2645,7 +2657,7 @@
cpus_clear(tmp);
cpu_set(vector >> 8, tmp);
msg.address_hi = HT_IRQ_HIGH_DEST_ID(dest);
-diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_64-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_64-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/io_apic_64-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/io_apic_64-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,2450 @@
+/*
+ * Intel IO-APIC support for multi-Pentium hosts.
+ * IO APICS that are mapped in on a BAR in PCI space. */
+late_initcall(ioapic_insert_resources);
+#endif /* !CONFIG_XEN */
-diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_64.c
---- linux-2.6.27/arch/x86/kernel/io_apic_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_64.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/io_apic_64.c
+--- a/arch/x86/kernel/io_apic_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/io_apic_64.c Wed May 06 16:56:10 2009 +0100
@@ -37,6 +37,11 @@
#include <acpi/acpi_bus.h>
#endif
#include <mach_ipi.h>
#include <mach_apic.h>
-@@ -81,7 +89,7 @@ static struct irq_cfg irq_cfg[NR_IRQS] _
+@@ -81,7 +89,7 @@
[15] = { .domain = CPU_MASK_ALL, .vector = IRQ15_VECTOR, },
};
int first_system_vector = 0xfe;
-@@ -108,6 +116,9 @@ static DEFINE_SPINLOCK(vector_lock);
+@@ -107,6 +115,9 @@
+ * # of IRQ routing registers
*/
int nr_ioapic_registers[MAX_IO_APICS];
-
++
+/* I/O APIC RTE contents at the OS boot up */
+struct IO_APIC_route_entry *early_ioapic_entries[MAX_IO_APICS];
-+
+
/* I/O APIC entries */
struct mp_config_ioapic mp_ioapics[MAX_IO_APICS];
- int nr_ioapics;
-@@ -303,7 +314,12 @@ static void __target_IO_APIC_irq(unsigne
+@@ -303,7 +314,12 @@
pin = entry->pin;
if (pin == -1)
break;
reg = io_apic_read(apic, 0x10 + pin*2);
reg &= ~IO_APIC_REDIR_VECTOR_MASK;
reg |= vector;
-@@ -325,11 +341,11 @@ static void set_ioapic_affinity_irq(unsi
+@@ -325,11 +341,11 @@
if (cpus_empty(tmp))
return;
/*
* Only the high 8 bits are valid.
-@@ -440,6 +456,84 @@ static void clear_IO_APIC (void)
+@@ -438,6 +454,84 @@
+ for (apic = 0; apic < nr_ioapics; apic++)
+ for (pin = 0; pin < nr_ioapic_registers[apic]; pin++)
clear_IO_APIC_pin(apic, pin);
- }
-
++}
++
+/*
+ * Saves and masks all the unmasked IO-APIC RTE's
+ */
+ * the setup_IO_APIC_irqs() to do proper initialization.
+ */
+ restore_IO_APIC_setup();
-+}
-+
- int skip_ioapic_setup;
- int ioapic_force;
+ }
-@@ -710,7 +804,7 @@ void unlock_vector_lock(void)
+ int skip_ioapic_setup;
+@@ -710,7 +804,7 @@
spin_unlock(&vector_lock);
}
{
/*
* NOTE! The local APIC isn't very good at handling
-@@ -727,31 +821,28 @@ static int __assign_irq_vector(int irq,
+@@ -727,31 +821,28 @@
unsigned int old_vector;
int cpu;
struct irq_cfg *cfg;
BUG_ON((unsigned)irq >= NR_IRQS);
cfg = &irq_cfg[irq];
-
+-
- /* Only try and allocate irqs on cpus that are present */
- cpus_and(mask, mask, cpu_online_map);
--
+
if ((cfg->move_in_progress) || cfg->move_cleanup_count)
return -EBUSY;
vector = current_vector;
offset = current_offset;
-@@ -766,7 +857,11 @@ next:
+@@ -766,7 +857,11 @@
continue;
if (vector == IA32_SYSCALL_VECTOR)
goto next;
if (per_cpu(vector_irq, new_cpu)[vector] != -1)
goto next;
/* Found one! */
-@@ -776,16 +871,16 @@ next:
+@@ -776,16 +871,16 @@
cfg->move_in_progress = 1;
cfg->old_domain = cfg->domain;
}
{
int err;
unsigned long flags;
-@@ -839,18 +934,98 @@ void __setup_vector_irq(int cpu)
+@@ -839,18 +934,98 @@
}
static struct irq_chip ioapic_chip;
- if (trigger) {
+ if (trigger)
irq_desc[irq].status |= IRQ_LEVEL;
-- set_irq_chip_and_handler_name(irq, &ioapic_chip,
-- handle_fasteoi_irq, "fasteoi");
-- } else {
+ else
- irq_desc[irq].status &= ~IRQ_LEVEL;
++ irq_desc[irq].status &= ~IRQ_LEVEL;
+
+#ifdef CONFIG_INTR_REMAP
+ if (irq_remapped(irq)) {
+ }
+#endif
+ if (trigger)
-+ set_irq_chip_and_handler_name(irq, &ioapic_chip,
+ set_irq_chip_and_handler_name(irq, &ioapic_chip,
+- handle_fasteoi_irq, "fasteoi");
+- } else {
+- irq_desc[irq].status &= ~IRQ_LEVEL;
+ handle_fasteoi_irq,
+ "fasteoi");
+ else
}
static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq,
-@@ -863,8 +1038,8 @@ static void setup_IO_APIC_irq(int apic,
+@@ -863,8 +1038,8 @@
if (!IO_APIC_IRQ(irq))
return;
return;
cpus_and(mask, cfg->domain, mask);
-@@ -875,24 +1050,15 @@ static void setup_IO_APIC_irq(int apic,
+@@ -875,24 +1050,15 @@
apic, mp_ioapics[apic].mp_apicid, pin, cfg->vector,
irq, trigger, polarity);
- * add it to the IO-APIC irq-routing table:
- */
- memset(&entry,0,sizeof(entry));
--
+
- entry.delivery_mode = INT_DELIVERY_MODE;
- entry.dest_mode = INT_DEST_MODE;
- entry.dest = cpu_mask_to_apicid(mask);
- entry.trigger = trigger;
- entry.polarity = polarity;
- entry.vector = cfg->vector;
-
+-
- /* Mask level triggered irqs.
- * Use IRQ_DELAYED_DISABLE for edge triggered irqs.
- */
ioapic_register_intr(irq, trigger);
if (irq < 16)
-@@ -944,6 +1110,9 @@ static void __init setup_timer_IRQ0_pin(
+@@ -943,6 +1109,9 @@
+ int vector)
{
struct IO_APIC_route_entry entry;
-
++
+ if (intr_remapping_enabled)
+ return;
-+
+
memset(&entry, 0, sizeof(entry));
- /*
-@@ -1090,6 +1259,7 @@ static __apicdebuginit void print_APIC_b
+@@ -1090,6 +1259,7 @@
void __apicdebuginit print_local_APIC(void * dummy)
{
unsigned int v, ver, maxlvt;
if (apic_verbosity == APIC_QUIET)
return;
-@@ -1097,7 +1267,7 @@ void __apicdebuginit print_local_APIC(vo
+@@ -1097,7 +1267,7 @@
printk("\n" KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n",
smp_processor_id(), hard_smp_processor_id());
v = apic_read(APIC_ID);
v = apic_read(APIC_LVR);
printk(KERN_INFO "... APIC VERSION: %08x\n", v);
ver = GET_APIC_VERSION(v);
-@@ -1133,10 +1303,9 @@ void __apicdebuginit print_local_APIC(vo
+@@ -1133,10 +1303,9 @@
v = apic_read(APIC_ESR);
printk(KERN_DEBUG "... APIC ESR: %08x\n", v);
v = apic_read(APIC_LVTT);
printk(KERN_DEBUG "... APIC LVTT: %08x\n", v);
-@@ -1291,7 +1460,7 @@ void disable_IO_APIC(void)
+@@ -1291,7 +1460,7 @@
entry.dest_mode = 0; /* Physical */
entry.delivery_mode = dest_ExtINT; /* ExtInt */
entry.vector = 0;
/*
* Add it to the IO-APIC irq-routing table:
-@@ -1381,7 +1550,7 @@ static int ioapic_retrigger_irq(unsigned
+@@ -1381,7 +1550,7 @@
unsigned long flags;
spin_lock_irqsave(&vector_lock, flags);
spin_unlock_irqrestore(&vector_lock, flags);
return 1;
-@@ -1397,6 +1566,147 @@ static int ioapic_retrigger_irq(unsigned
+@@ -1397,6 +1566,147 @@
*/
#ifdef CONFIG_SMP
asmlinkage void smp_irq_move_cleanup_interrupt(void)
{
unsigned vector, me;
-@@ -1446,13 +1756,24 @@ static void irq_complete_move(unsigned i
+@@ -1446,12 +1756,23 @@
cpus_and(cleanup_mask, cfg->old_domain, cpu_online_map);
cfg->move_cleanup_count = cpus_weight(cleanup_mask);
}
#else
static inline void irq_complete_move(unsigned int irq) {}
- #endif
++#endif
+#ifdef CONFIG_INTR_REMAP
+static void ack_x2apic_level(unsigned int irq)
+{
+{
+ ack_x2APIC_irq();
+}
-+#endif
+ #endif
static void ack_apic_edge(unsigned int irq)
- {
-@@ -1527,6 +1848,21 @@ static struct irq_chip ioapic_chip __rea
+@@ -1526,6 +1847,21 @@
+ #endif
.retrigger = ioapic_retrigger_irq,
};
-
++
+#ifdef CONFIG_INTR_REMAP
+static struct irq_chip ir_ioapic_chip __read_mostly = {
+ .name = "IR-IO-APIC",
+ .retrigger = ioapic_retrigger_irq,
+};
+#endif
-+
+
static inline void init_IO_APIC_traps(void)
{
- int irq;
-@@ -1712,6 +2048,8 @@ static inline void __init check_timer(vo
+@@ -1712,6 +2048,8 @@
* 8259A.
*/
if (pin1 == -1) {
pin1 = pin2;
apic1 = apic2;
no_pin1 = 1;
-@@ -1738,6 +2076,8 @@ static inline void __init check_timer(vo
+@@ -1738,6 +2076,8 @@
clear_IO_APIC_pin(0, pin1);
goto out;
}
clear_IO_APIC_pin(apic1, pin1);
if (!no_pin1)
apic_printk(APIC_QUIET, KERN_ERR "..MP-BIOS bug: "
-@@ -1977,6 +2317,9 @@ void destroy_irq(unsigned int irq)
+@@ -1977,6 +2317,9 @@
dynamic_irq_cleanup(irq);
spin_lock_irqsave(&vector_lock, flags);
__clear_irq_vector(irq);
spin_unlock_irqrestore(&vector_lock, flags);
-@@ -1993,13 +2336,44 @@ static int msi_compose_msg(struct pci_de
+@@ -1993,12 +2336,43 @@
unsigned dest;
cpumask_t tmp;
+ err = assign_irq_vector(irq, &tmp);
+ if (err)
+ return err;
-+
+
+ cpus_and(tmp, cfg->domain, tmp);
+ dest = cpu_mask_to_apicid(&tmp);
+
+ irte.dest_id = IRTE_DEST(dest);
+
+ modify_irte(irq, &irte);
-
- msg->address_hi = MSI_ADDR_BASE_HI;
++
++ msg->address_hi = MSI_ADDR_BASE_HI;
+ msg->data = sub_handle;
+ msg->address_lo = MSI_ADDR_BASE_LO | MSI_ADDR_IR_EXT_INT |
+ MSI_ADDR_IR_SHV |
+ } else
+#endif
+ {
-+ msg->address_hi = MSI_ADDR_BASE_HI;
+ msg->address_hi = MSI_ADDR_BASE_HI;
msg->address_lo =
MSI_ADDR_BASE_LO |
- ((INT_DEST_MODE == 0) ?
-@@ -2033,11 +2407,11 @@ static void set_msi_irq_affinity(unsigne
+@@ -2033,11 +2407,11 @@
if (cpus_empty(tmp))
return;
read_msi_msg(irq, &msg);
-@@ -2049,6 +2423,55 @@ static void set_msi_irq_affinity(unsigne
+@@ -2049,6 +2423,55 @@
write_msi_msg(irq, &msg);
irq_desc[irq].affinity = mask;
}
#endif /* CONFIG_SMP */
/*
-@@ -2066,26 +2489,157 @@ static struct irq_chip msi_chip = {
+@@ -2066,26 +2489,157 @@
.retrigger = ioapic_retrigger_irq,
};
--int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
+#ifdef CONFIG_INTR_REMAP
+static struct irq_chip msi_ir_chip = {
+ .name = "IR-PCI-MSI",
+ * in it.
+ */
+static int msi_alloc_irte(struct pci_dev *dev, int irq, int nvec)
- {
++{
+ struct intel_iommu *iommu;
+ int index;
+
+static int setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc, int irq)
+{
+ int ret;
- struct msi_msg msg;
++ struct msi_msg msg;
+
+ ret = msi_compose_msg(dev, irq, &msg);
+ if (ret < 0)
+ return 0;
+}
+
-+int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
-+{
+ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
+ {
+- struct msi_msg msg;
int irq, ret;
+
irq = create_irq();
+ struct intel_iommu *iommu = 0;
+ int index = 0;
+#endif
-+
+
+ sub_handle = 0;
+ list_for_each_entry(desc, &dev->msi_list, list) {
+ irq = create_irq();
+#ifdef CONFIG_INTR_REMAP
+ if (!intr_remapping_enabled)
+ goto no_ir;
-
++
+ if (!sub_handle) {
+ /*
+ * allocate the consecutive block of IRTE's
}
void arch_teardown_msi_irq(unsigned int irq)
-@@ -2106,11 +2660,11 @@ static void dmar_msi_set_affinity(unsign
+@@ -2106,11 +2660,11 @@
if (cpus_empty(tmp))
return;
dmar_msi_read(irq, &msg);
-@@ -2182,11 +2736,11 @@ static void set_ht_irq_affinity(unsigned
+@@ -2182,11 +2736,11 @@
if (cpus_empty(tmp))
return;
target_ht_irq(irq, dest, cfg->vector);
irq_desc[irq].affinity = mask;
-@@ -2210,14 +2764,14 @@ int arch_setup_ht_irq(unsigned int irq,
+@@ -2210,14 +2764,14 @@
int err;
cpumask_t tmp;
msg.address_hi = HT_IRQ_HIGH_DEST_ID(dest);
-@@ -2243,6 +2797,72 @@ int arch_setup_ht_irq(unsigned int irq,
+@@ -2242,6 +2796,72 @@
+ return err;
}
#endif /* CONFIG_HT_IRQ */
-
++
+#ifdef CONFIG_X86_64
+/*
+ * Re-target the irq to the specified CPU and enable the specified MMR located
+ uv_write_global_mmr64(mmr_pnode, mmr_offset, mmr_value);
+}
+#endif /* CONFIG_X86_64 */
-+
+
/* --------------------------------------------------------------------------
ACPI-based IOAPIC Configuration
- -------------------------------------------------------------------------- */
-@@ -2333,8 +2953,12 @@ void __init setup_ioapic_dest(void)
+@@ -2333,8 +2953,12 @@
setup_IO_APIC_irq(ioapic, pin, irq,
irq_trigger(irq_entry),
irq_polarity(irq_entry));
}
}
-diff -purN linux-2.6.27/arch/x86/kernel/ioport-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/ioport-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/ioport-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/ioport-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/ioport-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,112 @@
+/*
+ * This contains the io-permission bitmap code - written by obz, with changes
+out:
+ return rc;
+}
-diff -purN linux-2.6.27/arch/x86/kernel/ipi-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/ipi-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/ipi-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/ipi-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/ipi-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,239 @@
+#include <linux/cpumask.h>
+#include <linux/interrupt.h>
+}
+#endif
+#endif
-diff -purN linux-2.6.27/arch/x86/kernel/ipi.c linux-2.6.27.19-5.1/arch/x86/kernel/ipi.c
---- linux-2.6.27/arch/x86/kernel/ipi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/ipi.c 2009-03-25 16:10:44.000000000 +0000
-@@ -114,9 +114,9 @@ static inline void __send_IPI_dest_field
+diff -r 9608d5473017 arch/x86/kernel/ipi.c
+--- a/arch/x86/kernel/ipi.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/ipi.c Wed May 06 16:56:10 2009 +0100
+@@ -114,9 +114,9 @@
/*
* This is only used on smaller machines.
*/
unsigned long flags;
local_irq_save(flags);
-@@ -125,7 +125,7 @@ void send_IPI_mask_bitmask(cpumask_t cpu
+@@ -125,7 +125,7 @@
local_irq_restore(flags);
}
{
unsigned long flags;
unsigned int query_cpu;
-@@ -137,12 +137,24 @@ void send_IPI_mask_sequence(cpumask_t ma
+@@ -137,12 +137,24 @@
*/
local_irq_save(flags);
local_irq_restore(flags);
}
-diff -purN linux-2.6.27/arch/x86/kernel/irq_32-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/irq_32-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/irq_32-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/irq_32-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/irq_32-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,445 @@
+/*
+ * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
+}
+#endif
+
-diff -purN linux-2.6.27/arch/x86/kernel/irq_64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/irq_64-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/irq_64-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/irq_64-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/irq_64-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,297 @@
+/*
+ * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
+ }
+ local_irq_restore(flags);
+}
-diff -purN linux-2.6.27/arch/x86/kernel/irqinit_64.c linux-2.6.27.19-5.1/arch/x86/kernel/irqinit_64.c
---- linux-2.6.27/arch/x86/kernel/irqinit_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/irqinit_64.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/irqinit_64.c
+--- a/arch/x86/kernel/irqinit_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/irqinit_64.c Wed May 06 16:56:10 2009 +0100
@@ -11,6 +11,7 @@
#include <linux/kernel_stat.h>
#include <linux/sysdev.h>
#include <asm/acpi.h>
#include <asm/atomic.h>
-@@ -217,6 +218,10 @@ void __init native_init_IRQ(void)
+@@ -217,6 +218,10 @@
alloc_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt);
alloc_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
if (!acpi_ioapic)
setup_irq(2, &irq2);
}
-diff -purN linux-2.6.27/arch/x86/kernel/kvmclock.c linux-2.6.27.19-5.1/arch/x86/kernel/kvmclock.c
---- linux-2.6.27/arch/x86/kernel/kvmclock.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/kvmclock.c 2009-03-25 16:10:44.000000000 +0000
-@@ -100,7 +100,7 @@ static int kvm_register_clock(char *txt)
+diff -r 9608d5473017 arch/x86/kernel/kvmclock.c
+--- a/arch/x86/kernel/kvmclock.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/kvmclock.c Wed May 06 16:56:10 2009 +0100
+@@ -100,7 +100,7 @@
}
#ifdef CONFIG_X86_LOCAL_APIC
{
/*
* Now that the first cpu already had this clocksource initialized,
-diff -purN linux-2.6.27/arch/x86/kernel/ldt-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/ldt-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/ldt-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/ldt-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/ldt-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,270 @@
+/*
+ * Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
+ }
+ return ret;
+}
-diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_32.c linux-2.6.27.19-5.1/arch/x86/kernel/machine_kexec_32.c
---- linux-2.6.27/arch/x86/kernel/machine_kexec_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/machine_kexec_32.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/machine_kexec_32.c
+--- a/arch/x86/kernel/machine_kexec_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/machine_kexec_32.c Wed May 06 16:56:10 2009 +0100
@@ -25,6 +25,10 @@
#include <asm/system.h>
#include <asm/cacheflush.h>
#define PAGE_ALIGNED __attribute__ ((__aligned__(PAGE_SIZE)))
static u32 kexec_pgd[1024] PAGE_ALIGNED;
#ifdef CONFIG_X86_PAE
-@@ -34,48 +38,55 @@ static u32 kexec_pmd1[1024] PAGE_ALIGNED
+@@ -34,47 +38,54 @@
static u32 kexec_pte0[1024] PAGE_ALIGNED;
static u32 kexec_pte1[1024] PAGE_ALIGNED;
-static void set_idt(void *newidt, __u16 limit)
--{
-- struct desc_ptr curidt;
+#ifdef CONFIG_XEN
-
-- /* ia32 supports unaliged loads & stores */
-- curidt.size = limit;
-- curidt.address = (unsigned long)newidt;
++
+#define __ma(x) (pfn_to_mfn(__pa((x)) >> PAGE_SHIFT) << PAGE_SHIFT)
-
-- load_idt(&curidt);
--}
++
+#if PAGES_NR > KEXEC_XEN_NO_PAGES
+#error PAGES_NR is greater than KEXEC_XEN_NO_PAGES - Xen support will break
+#endif
-
++
+#if PA_CONTROL_PAGE != 0
+#error PA_CONTROL_PAGE is non zero - Xen support will break
+#endif
-
--static void set_gdt(void *newgdt, __u16 limit)
++
+void machine_kexec_setup_load_arg(xen_kexec_image_t *xki, struct kimage *image)
{
-- struct desc_ptr curgdt;
+- struct desc_ptr curidt;
+ void *control_page;
-- /* ia32 supports unaligned loads & stores */
-- curgdt.size = limit;
-- curgdt.address = (unsigned long)newgdt;
+- /* ia32 supports unaliged loads & stores */
+- curidt.size = limit;
+- curidt.address = (unsigned long)newidt;
+ memset(xki->page_list, 0, sizeof(xki->page_list));
-+
+
+- load_idt(&curidt);
+ control_page = page_address(image->control_code_page);
+ memcpy(control_page, relocate_kernel, PAGE_SIZE);
+
+#endif
+ xki->page_list[PA_PTE_0] = __ma(kexec_pte0);
+ xki->page_list[PA_PTE_1] = __ma(kexec_pte1);
-
-- load_gdt(&curgdt);
++
}
--static void load_segments(void)
+int __init machine_kexec_setup_resources(struct resource *hypervisor,
+ struct resource *phys_cpus,
+ int nr_phys_cpus)
- {
--#define __STR(X) #X
--#define STR(X) __STR(X)
++{
+ int k;
-+
+
+-static void set_gdt(void *newgdt, __u16 limit)
+-{
+- struct desc_ptr curgdt;
+ /* The per-cpu crash note resources belong to the hypervisor resource */
+ for (k = 0; k < nr_phys_cpus; k++)
+ request_resource(hypervisor, phys_cpus + k);
+- /* ia32 supports unaligned loads & stores */
+- curgdt.size = limit;
+- curgdt.address = (unsigned long)newgdt;
+-
+- load_gdt(&curgdt);
++ return 0;
+ }
+
+-static void load_segments(void)
+-{
+-#define __STR(X) #X
+-#define STR(X) __STR(X)
++void machine_kexec_register_resources(struct resource *res) { ; }
+
- __asm__ __volatile__ (
- "\tljmp $"STR(__KERNEL_CS)",$1f\n"
- "\t1:\n"
- ::: "eax", "memory");
-#undef STR
-#undef __STR
-+ return 0;
- }
-
-+void machine_kexec_register_resources(struct resource *res) { ; }
-+
+-}
+#endif /* CONFIG_XEN */
-+
+
/*
* A architecture hook called to validate the
- * proposed image and prepare the control pages
-@@ -106,6 +117,7 @@ void machine_kexec_cleanup(struct kimage
+@@ -106,6 +117,7 @@
set_pages_nx(image->control_code_page, 1);
}
/*
* Do not allocate memory (or fail in any way) in machine_kexec().
* We are past the point of no return, committed to rebooting now.
-@@ -162,25 +174,11 @@ void machine_kexec(struct kimage *image)
+@@ -162,25 +174,11 @@
page_list[VA_PTE_0] = (unsigned long)kexec_pte0;
page_list[PA_PTE_1] = __pa(kexec_pte1);
page_list[VA_PTE_1] = (unsigned long)kexec_pte1;
image->start = relocate_kernel_ptr((unsigned long)image->head,
(unsigned long)page_list,
image->start, cpu_has_pae,
-@@ -193,6 +191,7 @@ void machine_kexec(struct kimage *image)
+@@ -193,6 +191,7 @@
__ftrace_enabled_restore(save_ftrace_enabled);
}
void arch_crash_save_vmcoreinfo(void)
{
-diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_64.c linux-2.6.27.19-5.1/arch/x86/kernel/machine_kexec_64.c
---- linux-2.6.27/arch/x86/kernel/machine_kexec_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/machine_kexec_64.c 2009-03-25 16:10:44.000000000 +0000
-@@ -27,6 +27,117 @@ static u64 kexec_pud1[512] PAGE_ALIGNED;
+diff -r 9608d5473017 arch/x86/kernel/machine_kexec_64.c
+--- a/arch/x86/kernel/machine_kexec_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/machine_kexec_64.c Wed May 06 16:56:10 2009 +0100
+@@ -27,6 +27,117 @@
static u64 kexec_pmd1[512] PAGE_ALIGNED;
static u64 kexec_pte1[512] PAGE_ALIGNED;
static void init_level2_page(pmd_t *level2p, unsigned long addr)
{
unsigned long end_addr;
-@@ -34,7 +145,7 @@ static void init_level2_page(pmd_t *leve
+@@ -34,7 +145,7 @@
addr &= PAGE_MASK;
end_addr = addr + PUD_SIZE;
while (addr < end_addr) {
addr += PMD_SIZE;
}
}
-@@ -59,12 +170,12 @@ static int init_level3_page(struct kimag
+@@ -59,12 +170,12 @@
}
level2p = (pmd_t *)page_address(page);
init_level2_page(level2p, addr);
addr += PUD_SIZE;
}
out:
-@@ -95,12 +206,12 @@ static int init_level4_page(struct kimag
+@@ -95,12 +206,12 @@
if (result) {
goto out;
}
addr += PGDIR_SIZE;
}
out:
-@@ -111,49 +222,14 @@ out:
+@@ -111,49 +222,14 @@
static int init_pgtable(struct kimage *image, unsigned long start_pgtable)
{
pgd_t *level4p;
-- level4p = (pgd_t *)__va(start_pgtable);
++ unsigned long x_max_pfn = max_pfn;
++
++#ifdef CONFIG_XEN
++ x_max_pfn = HYPERVISOR_memory_op(XENMEM_maximum_ram_page, NULL);
++#endif
++
+ level4p = (pgd_t *)__va(start_pgtable);
- return init_level4_page(image, level4p, 0, max_pfn << PAGE_SHIFT);
-}
-
- /* x86-64 supports unaligned loads & stores */
- curgdt.size = limit;
- curgdt.address = (unsigned long)newgdt;
-+ unsigned long x_max_pfn = max_pfn;
-
+-
- __asm__ __volatile__ (
- "lgdtq %0\n"
- : : "m" (curgdt)
- );
-};
-+#ifdef CONFIG_XEN
-+ x_max_pfn = HYPERVISOR_memory_op(XENMEM_maximum_ram_page, NULL);
-+#endif
-
+-
-static void load_segments(void)
-{
- __asm__ __volatile__ (
- "\tmovl %0,%%gs\n"
- : : "a" (__KERNEL_DS) : "memory"
- );
-+ level4p = (pgd_t *)__va(start_pgtable);
+ return init_level4_page(image, level4p, 0, x_max_pfn << PAGE_SHIFT);
}
int machine_kexec_prepare(struct kimage *image)
-@@ -177,6 +253,7 @@ void machine_kexec_cleanup(struct kimage
+@@ -177,6 +253,7 @@
return;
}
/*
* Do not allocate memory (or fail in any way) in machine_kexec().
* We are past the point of no return, committed to rebooting now.
-@@ -214,30 +291,16 @@ void machine_kexec(struct kimage *image)
+@@ -214,30 +291,16 @@
page_list[PA_TABLE_PAGE] =
(unsigned long)__pa(page_address(image->control_code_page));
VMCOREINFO_SYMBOL(init_level4_pgt);
#ifdef CONFIG_NUMA
-diff -purN linux-2.6.27/arch/x86/kernel/microcode-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/microcode-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/microcode-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/microcode-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/microcode-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,214 @@
+/*
+ * Intel CPU Microcode Update Driver for Linux
+
+module_init(microcode_init)
+module_exit(microcode_exit)
-diff -purN linux-2.6.27/arch/x86/kernel/mmconf-fam10h_64.c linux-2.6.27.19-5.1/arch/x86/kernel/mmconf-fam10h_64.c
---- linux-2.6.27/arch/x86/kernel/mmconf-fam10h_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/mmconf-fam10h_64.c 2009-03-25 16:10:44.000000000 +0000
-@@ -219,6 +219,16 @@ void __cpuinit fam10h_check_enable_mmcfg
+diff -r 9608d5473017 arch/x86/kernel/mmconf-fam10h_64.c
+--- a/arch/x86/kernel/mmconf-fam10h_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/mmconf-fam10h_64.c Wed May 06 16:56:10 2009 +0100
+@@ -219,6 +219,16 @@
val |= fam10h_pci_mmconf_base | (8 << FAM10H_MMIO_CONF_BUSRANGE_SHIFT) |
FAM10H_MMIO_CONF_ENABLE;
wrmsrl(address, val);
}
static int __devinit set_check_enable_amd_mmconf(const struct dmi_system_id *d)
-diff -purN linux-2.6.27/arch/x86/kernel/mpparse-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/mpparse-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/mpparse-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/mpparse-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/mpparse-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,1121 @@
+/*
+ * Intel Multiprocessor Specification 1.1 and 1.4
+}
+
+late_initcall(update_mp_table);
-diff -purN linux-2.6.27/arch/x86/kernel/mpparse.c linux-2.6.27.19-5.1/arch/x86/kernel/mpparse.c
---- linux-2.6.27/arch/x86/kernel/mpparse.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/mpparse.c 2009-03-25 16:10:44.000000000 +0000
-@@ -397,7 +397,9 @@ static int __init smp_read_mpc(struct mp
+diff -r 9608d5473017 arch/x86/kernel/mpparse.c
+--- a/arch/x86/kernel/mpparse.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/mpparse.c Wed May 06 16:56:10 2009 +0100
+@@ -397,7 +397,9 @@
generic_bigsmp_probe();
#endif
if (!num_processors)
printk(KERN_ERR "MPTABLE: no processors registered!\n");
return num_processors;
-diff -purN linux-2.6.27/arch/x86/kernel/nmi.c linux-2.6.27.19-5.1/arch/x86/kernel/nmi.c
---- linux-2.6.27/arch/x86/kernel/nmi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/nmi.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/nmi.c
+--- a/arch/x86/kernel/nmi.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/nmi.c Wed May 06 16:56:10 2009 +0100
@@ -27,7 +27,9 @@
#include <linux/kdebug.h>
#include <linux/smp.h>
int nmi_watchdog_enabled;
static cpumask_t backtrace_mask = CPU_MASK_NONE;
-@@ -456,6 +461,8 @@ nmi_watchdog_tick(struct pt_regs *regs,
+@@ -456,6 +461,8 @@
return rc;
}
#ifdef CONFIG_SYSCTL
static int __init setup_unknown_nmi_panic(char *str)
-@@ -475,6 +482,7 @@ static int unknown_nmi_panic_callback(st
+@@ -475,6 +482,7 @@
return 0;
}
/*
* proc handler for /proc/sys/kernel/nmi
*/
-@@ -507,6 +515,7 @@ int proc_nmi_enabled(struct ctl_table *t
+@@ -507,6 +515,7 @@
}
return 0;
}
#endif /* CONFIG_SYSCTL */
-@@ -519,6 +528,7 @@ int do_nmi_callback(struct pt_regs *regs
+@@ -519,6 +528,7 @@
return 0;
}
void __trigger_all_cpu_backtrace(void)
{
int i;
-@@ -531,3 +541,4 @@ void __trigger_all_cpu_backtrace(void)
+@@ -531,3 +541,4 @@
mdelay(1);
}
}
+#endif
-diff -purN linux-2.6.27/arch/x86/kernel/paravirt.c linux-2.6.27.19-5.1/arch/x86/kernel/paravirt.c
---- linux-2.6.27/arch/x86/kernel/paravirt.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/paravirt.c 2009-03-25 16:10:44.000000000 +0000
-@@ -373,8 +373,6 @@ struct pv_cpu_ops pv_cpu_ops = {
+diff -r 9608d5473017 arch/x86/kernel/paravirt.c
+--- a/arch/x86/kernel/paravirt.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/paravirt.c Wed May 06 16:56:10 2009 +0100
+@@ -373,8 +373,6 @@
struct pv_apic_ops pv_apic_ops = {
#ifdef CONFIG_X86_LOCAL_APIC
.setup_boot_clock = setup_boot_APIC_clock,
.setup_secondary_clock = setup_secondary_APIC_clock,
.startup_ipi_hook = paravirt_nop,
-diff -purN linux-2.6.27/arch/x86/kernel/pci-dma-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/pci-dma-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/pci-dma-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/pci-dma-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/pci-dma-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,485 @@
+#include <linux/dma-mapping.h>
+#include <linux/dmar.h>
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac);
+#endif
-diff -purN linux-2.6.27/arch/x86/kernel/pci-nommu-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/pci-nommu-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/pci-nommu-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/pci-nommu-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/pci-nommu-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,97 @@
+#include <linux/dma-mapping.h>
+#include <linux/dmar.h>
+ force_iommu = 0; /* no HW IOMMU */
+ dma_ops = &nommu_dma_ops;
+}
-diff -purN linux-2.6.27/arch/x86/kernel/pcspeaker.c linux-2.6.27.19-5.1/arch/x86/kernel/pcspeaker.c
---- linux-2.6.27/arch/x86/kernel/pcspeaker.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/pcspeaker.c 2009-03-25 16:10:44.000000000 +0000
-@@ -7,6 +7,11 @@ static __init int add_pcspkr(void)
+diff -r 9608d5473017 arch/x86/kernel/pcspeaker.c
+--- a/arch/x86/kernel/pcspeaker.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/pcspeaker.c Wed May 06 16:56:10 2009 +0100
+@@ -6,6 +6,11 @@
+ {
struct platform_device *pd;
int ret;
-
++
+#ifdef CONFIG_XEN
+ if (!is_initial_xendomain())
+ return 0;
+#endif
-+
+
pd = platform_device_alloc("pcspkr", -1);
if (!pd)
- return -ENOMEM;
-diff -purN linux-2.6.27/arch/x86/kernel/probe_roms_32.c linux-2.6.27.19-5.1/arch/x86/kernel/probe_roms_32.c
---- linux-2.6.27/arch/x86/kernel/probe_roms_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/probe_roms_32.c 2009-03-25 16:10:44.000000000 +0000
-@@ -99,6 +99,11 @@ void __init probe_roms(void)
+diff -r 9608d5473017 arch/x86/kernel/probe_roms_32.c
+--- a/arch/x86/kernel/probe_roms_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/probe_roms_32.c Wed May 06 16:56:10 2009 +0100
+@@ -99,6 +99,11 @@
unsigned char c;
int i;
/* video rom */
upper = adapter_rom_resources[0].start;
for (start = video_rom_resource.start; start < upper; start += 2048) {
-@@ -131,7 +136,7 @@ void __init probe_roms(void)
+@@ -131,7 +136,7 @@
upper = system_rom_resource.start;
/* check for extension rom (ignore length byte!) */
if (romsignature(rom)) {
length = extension_rom_resource.end - extension_rom_resource.start + 1;
if (romchecksum(rom, length)) {
-diff -purN linux-2.6.27/arch/x86/kernel/process-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/process-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/process-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/process-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/process-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,374 @@
+#include <linux/errno.h>
+#include <linux/kernel.h>
+}
+early_param("idle", idle_setup);
+
-diff -purN linux-2.6.27/arch/x86/kernel/process_32-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/process_32-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/process_32-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/process_32-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/process_32-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,752 @@
+/*
+ * Copyright (C) 1995 Linus Torvalds
+ unsigned long range_end = mm->brk + 0x02000000;
+ return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
+}
-diff -purN linux-2.6.27/arch/x86/kernel/process_32.c linux-2.6.27.19-5.1/arch/x86/kernel/process_32.c
---- linux-2.6.27/arch/x86/kernel/process_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/process_32.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/process_32.c
+--- a/arch/x86/kernel/process_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/process_32.c Wed May 06 16:56:10 2009 +0100
@@ -36,6 +36,7 @@
#include <linux/personality.h>
#include <linux/tick.h>
#include <linux/prctl.h>
#include <asm/uaccess.h>
-@@ -277,6 +278,7 @@ void exit_thread(void)
+@@ -277,6 +278,7 @@
tss->x86_tss.io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
put_cpu();
}
}
void flush_thread(void)
-@@ -334,6 +336,8 @@ int copy_thread(int nr, unsigned long cl
+@@ -334,6 +336,8 @@
savesegment(gs, p->thread.gs);
tsk = current;
if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) {
p->thread.io_bitmap_ptr = kmemdup(tsk->thread.io_bitmap_ptr,
-@@ -387,6 +391,7 @@ static void hard_disable_TSC(void)
+@@ -387,6 +391,7 @@
void disable_TSC(void)
{
preempt_disable();
if (!test_and_set_thread_flag(TIF_NOTSC))
/*
-@@ -395,6 +400,7 @@ void disable_TSC(void)
+@@ -395,6 +400,7 @@
*/
hard_disable_TSC();
preempt_enable();
}
static void hard_enable_TSC(void)
-@@ -448,6 +454,9 @@ __switch_to_xtra(struct task_struct *pre
+@@ -448,6 +454,9 @@
prev = &prev_p->thread;
next = &next_p->thread;
debugctl = prev->debugctlmsr;
if (next->ds_area_msr != prev->ds_area_msr) {
/* we clear debugctl to make sure DS
-@@ -460,6 +469,9 @@ __switch_to_xtra(struct task_struct *pre
+@@ -459,6 +468,9 @@
+
if (next->debugctlmsr != debugctl)
update_debugctlmsr(next->debugctlmsr);
-
++
+ if (test_tsk_thread_flag(next_p, TIF_PERFMON_CTXSW))
+ pfm_ctxsw_in(prev_p, next_p);
-+
+
if (test_tsk_thread_flag(next_p, TIF_DEBUG)) {
set_debugreg(next->debugreg0, 0);
- set_debugreg(next->debugreg1, 1);
-diff -purN linux-2.6.27/arch/x86/kernel/process_64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/process_64-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/process_64-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/process_64-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/process_64-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,920 @@
+/*
+ * Copyright (C) 1995 Linus Torvalds
+ unsigned long range_end = mm->brk + 0x02000000;
+ return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
+}
-diff -purN linux-2.6.27/arch/x86/kernel/process_64.c linux-2.6.27.19-5.1/arch/x86/kernel/process_64.c
---- linux-2.6.27/arch/x86/kernel/process_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/process_64.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/process_64.c
+--- a/arch/x86/kernel/process_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/process_64.c Wed May 06 16:56:10 2009 +0100
@@ -36,6 +36,7 @@
#include <linux/kprobes.h>
#include <linux/kdebug.h>
#include <linux/prctl.h>
#include <asm/uaccess.h>
-@@ -240,6 +241,7 @@ void exit_thread(void)
+@@ -240,6 +241,7 @@
t->io_bitmap_max = 0;
put_cpu();
}
}
void flush_thread(void)
-@@ -344,6 +346,8 @@ int copy_thread(int nr, unsigned long cl
+@@ -344,6 +346,8 @@
savesegment(es, p->thread.es);
savesegment(ds, p->thread.ds);
if (unlikely(test_tsk_thread_flag(me, TIF_IO_BITMAP))) {
p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
if (!p->thread.io_bitmap_ptr) {
-@@ -406,6 +410,7 @@ static void hard_disable_TSC(void)
+@@ -406,6 +410,7 @@
void disable_TSC(void)
{
preempt_disable();
if (!test_and_set_thread_flag(TIF_NOTSC))
/*
-@@ -414,6 +419,7 @@ void disable_TSC(void)
+@@ -414,6 +419,7 @@
*/
hard_disable_TSC();
preempt_enable();
}
static void hard_enable_TSC(void)
-@@ -472,6 +478,9 @@ static inline void __switch_to_xtra(stru
+@@ -472,6 +478,9 @@
prev = &prev_p->thread,
next = &next_p->thread;
debugctl = prev->debugctlmsr;
if (next->ds_area_msr != prev->ds_area_msr) {
/* we clear debugctl to make sure DS
-@@ -484,6 +493,9 @@ static inline void __switch_to_xtra(stru
+@@ -483,6 +492,9 @@
+
if (next->debugctlmsr != debugctl)
update_debugctlmsr(next->debugctlmsr);
-
++
+ if (test_tsk_thread_flag(next_p, TIF_PERFMON_CTXSW))
+ pfm_ctxsw_in(prev_p, next_p);
-+
+
if (test_tsk_thread_flag(next_p, TIF_DEBUG)) {
loaddebug(next, 0);
- loaddebug(next, 1);
-@@ -729,12 +741,12 @@ unsigned long get_wchan(struct task_stru
+@@ -729,12 +741,12 @@
if (!p || p == current || p->state==TASK_RUNNING)
return 0;
stack = (unsigned long)task_stack_page(p);
return 0;
ip = *(u64 *)(fp+8);
if (!in_sched_functions(ip))
-diff -purN linux-2.6.27/arch/x86/kernel/ptrace.c linux-2.6.27.19-5.1/arch/x86/kernel/ptrace.c
---- linux-2.6.27/arch/x86/kernel/ptrace.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/ptrace.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/ptrace.c
+--- a/arch/x86/kernel/ptrace.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/ptrace.c Wed May 06 16:56:10 2009 +0100
@@ -14,6 +14,7 @@
#include <linux/errno.h>
#include <linux/ptrace.h>
#include <linux/user.h>
#include <linux/elf.h>
#include <linux/security.h>
-@@ -1375,30 +1376,6 @@ void send_sigtrap(struct task_struct *ts
+@@ -1375,30 +1376,6 @@
force_sig_info(SIGTRAP, &info, tsk);
}
#ifdef CONFIG_X86_32
# define IS_IA32 1
-@@ -1429,11 +1406,23 @@ asmregparm long syscall_trace_enter(stru
+@@ -1429,11 +1406,23 @@
/* do the secure computing check first */
secure_computing(regs->orig_ax);
if (unlikely(current->audit_context)) {
if (IS_IA32)
-@@ -1455,11 +1444,14 @@ asmregparm long syscall_trace_enter(stru
+@@ -1455,11 +1444,14 @@
asmregparm void syscall_trace_leave(struct pt_regs *regs)
{
/*
* If TIF_SYSCALL_EMU is set, we only get here because of
-@@ -1475,6 +1467,6 @@ asmregparm void syscall_trace_leave(stru
+@@ -1475,6 +1467,6 @@
* system call instruction.
*/
if (test_thread_flag(TIF_SINGLESTEP) &&
+ tracehook_consider_fatal_signal(current, SIGTRAP, SIG_DFL))
send_sigtrap(current, regs, 0);
}
-diff -purN linux-2.6.27/arch/x86/kernel/quirks-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/quirks-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/quirks-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/quirks-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/quirks-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,459 @@
+/*
+ * This file contains work-arounds for x86 and x86_64 platform bugs.
+}
+
+#endif
-diff -purN linux-2.6.27/arch/x86/kernel/reboot.c linux-2.6.27.19-5.1/arch/x86/kernel/reboot.c
---- linux-2.6.27/arch/x86/kernel/reboot.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/reboot.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/reboot.c
+--- a/arch/x86/kernel/reboot.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/reboot.c Wed May 06 16:56:10 2009 +0100
@@ -3,6 +3,9 @@
#include <linux/init.h>
#include <linux/pm.h>
#include <acpi/reboot.h>
#include <asm/io.h>
#include <asm/apic.h>
-@@ -429,6 +432,14 @@ void native_machine_shutdown(void)
+@@ -429,6 +432,14 @@
/* Make certain I only run on the appropriate processor */
set_cpus_allowed_ptr(current, &cpumask_of_cpu(reboot_cpu_id));
/* O.K Now that I'm on the appropriate processor,
* stop all of the others.
*/
-diff -purN linux-2.6.27/arch/x86/kernel/relocate_kernel_32.S linux-2.6.27.19-5.1/arch/x86/kernel/relocate_kernel_32.S
---- linux-2.6.27/arch/x86/kernel/relocate_kernel_32.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/relocate_kernel_32.S 2009-03-25 16:10:44.000000000 +0000
-@@ -199,14 +199,45 @@ relocate_new_kernel:
+diff -r 9608d5473017 arch/x86/kernel/relocate_kernel_32.S
+--- a/arch/x86/kernel/relocate_kernel_32.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/relocate_kernel_32.S Wed May 06 16:56:10 2009 +0100
+@@ -199,14 +199,45 @@
movl PTR(PA_PGD)(%ebp), %eax
movl %eax, %cr3
identity_mapped:
/* store the start address on the stack */
-@@ -378,5 +409,22 @@ swap_pages:
+@@ -378,5 +409,22 @@
popl %ebp
ret
+
.globl kexec_control_code_size
.set kexec_control_code_size, . - relocate_kernel
-diff -purN linux-2.6.27/arch/x86/kernel/relocate_kernel_64.S linux-2.6.27.19-5.1/arch/x86/kernel/relocate_kernel_64.S
---- linux-2.6.27/arch/x86/kernel/relocate_kernel_64.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/relocate_kernel_64.S 2009-03-25 16:10:44.000000000 +0000
-@@ -160,13 +160,39 @@ relocate_new_kernel:
+diff -r 9608d5473017 arch/x86/kernel/relocate_kernel_64.S
+--- a/arch/x86/kernel/relocate_kernel_64.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/relocate_kernel_64.S Wed May 06 16:56:10 2009 +0100
+@@ -160,13 +160,39 @@
movq PTR(PA_PGD)(%rsi), %r9
movq %r9, %cr3
identity_mapped:
/* store the start address on the stack */
-@@ -262,5 +288,19 @@ identity_mapped:
+@@ -262,5 +288,19 @@
xorq %r13, %r13
xorq %r14, %r14
xorq %r15, %r15
--
- ret
-+
++ ret
+
+- ret
+ .align 16
+gdt:
+ .quad 0x0000000000000000 /* NULL descriptor */
+idt_80:
+ .word 0 /* limit */
+ .quad 0 /* base */
-diff -purN linux-2.6.27/arch/x86/kernel/rtc.c linux-2.6.27.19-5.1/arch/x86/kernel/rtc.c
---- linux-2.6.27/arch/x86/kernel/rtc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/rtc.c 2009-03-25 16:10:44.000000000 +0000
-@@ -181,6 +181,10 @@ unsigned long read_persistent_clock(void
+diff -r 9608d5473017 arch/x86/kernel/rtc.c
+--- a/arch/x86/kernel/rtc.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/rtc.c Wed May 06 16:56:10 2009 +0100
+@@ -181,6 +181,10 @@
{
unsigned long retval, flags;
spin_lock_irqsave(&rtc_lock, flags);
retval = get_wallclock();
spin_unlock_irqrestore(&rtc_lock, flags);
-@@ -190,6 +194,10 @@ unsigned long read_persistent_clock(void
+@@ -190,6 +194,10 @@
int update_persistent_clock(struct timespec now)
{
return set_rtc_mmss(now.tv_sec);
}
-@@ -223,11 +231,25 @@ static struct platform_device rtc_device
+@@ -223,11 +231,25 @@
static __init int add_rtc_cmos(void)
{
#ifdef CONFIG_PNP
return 0;
}
device_initcall(add_rtc_cmos);
-diff -purN linux-2.6.27/arch/x86/kernel/setup-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/setup-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/setup-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/setup-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/setup-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,1198 @@
+/*
+ * Copyright (C) 1995 Linus Torvalds
+ return NOTIFY_DONE;
+}
+#endif /* !CONFIG_XEN */
-diff -purN linux-2.6.27/arch/x86/kernel/setup.c linux-2.6.27.19-5.1/arch/x86/kernel/setup.c
---- linux-2.6.27/arch/x86/kernel/setup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/setup.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/setup.c
+--- a/arch/x86/kernel/setup.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/setup.c Wed May 06 16:56:10 2009 +0100
@@ -98,6 +98,7 @@
#include <mach_apic.h>
#include <asm/percpu.h>
#include <asm/topology.h>
-@@ -578,6 +579,39 @@ static struct x86_quirks default_x86_qui
+@@ -578,6 +579,39 @@
struct x86_quirks *x86_quirks __initdata = &default_x86_quirks;
/*
* Determine if we were loaded by an EFI loader. If so, then we have also been
* passed the efi memmap, systab, etc., so we should use these data structures
-@@ -601,6 +635,9 @@ void __init setup_arch(char **cmdline_p)
+@@ -600,6 +634,9 @@
+ #else
printk(KERN_INFO "Command line: %s\n", boot_command_line);
#endif
-
++
+ /* VMI may relocate the fixmap; do this before touching ioremap area */
+ vmi_init();
-+
+
early_cpu_init();
early_ioremap_init();
-
-@@ -674,13 +711,8 @@ void __init setup_arch(char **cmdline_p)
+@@ -674,13 +711,8 @@
check_efer();
#endif
/* after early param, so could get panic from serial */
reserve_early_setup_data();
-@@ -699,6 +731,10 @@ void __init setup_arch(char **cmdline_p)
+@@ -698,6 +730,10 @@
+ #endif
finish_e820_parsing();
-
++
+ dmi_scan_machine();
+
+ dmi_check_system(bad_bios_dmi_table);
-+
+
#ifdef CONFIG_X86_32
probe_roms();
- #endif
-@@ -742,6 +778,8 @@ void __init setup_arch(char **cmdline_p)
+@@ -742,6 +778,8 @@
#else
num_physpages = max_pfn;
/* How many end-of-memory variables you have, grandma! */
/* need this before calling reserve_initrd */
-@@ -781,8 +819,6 @@ void __init setup_arch(char **cmdline_p)
+@@ -781,14 +819,14 @@
vsmp_init();
#endif
io_delay_init();
/*
-@@ -790,6 +826,8 @@ void __init setup_arch(char **cmdline_p)
+ * Parse the ACPI tables for possible boot-time SMP configuration.
*/
acpi_boot_table_init();
-
-+ early_acpi_boot_init();
+
++ early_acpi_boot_init();
+
#ifdef CONFIG_ACPI_NUMA
/*
- * Parse SRAT to discover nodes.
-@@ -869,6 +907,12 @@ void __init setup_arch(char **cmdline_p)
+@@ -869,6 +907,12 @@
e820_reserve_resources();
e820_mark_nosave_regions(max_low_pfn);
#ifdef CONFIG_X86_32
request_resource(&iomem_resource, &video_ram_resource);
#endif
-@@ -885,3 +929,5 @@ void __init setup_arch(char **cmdline_p)
+@@ -885,3 +929,5 @@
#endif
#endif
}
+
+
-diff -purN linux-2.6.27/arch/x86/kernel/setup_percpu-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/setup_percpu-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/setup_percpu-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/setup_percpu-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/setup_percpu-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,385 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+
+#endif /* X86_64_NUMA */
+
-diff -purN linux-2.6.27/arch/x86/kernel/signal_32.c linux-2.6.27.19-5.1/arch/x86/kernel/signal_32.c
---- linux-2.6.27/arch/x86/kernel/signal_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/signal_32.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/signal_32.c
+--- a/arch/x86/kernel/signal_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/signal_32.c Wed May 06 16:56:10 2009 +0100
@@ -17,7 +17,9 @@
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/smp.h>
#include <linux/mm.h>
-@@ -558,8 +560,6 @@ handle_signal(unsigned long sig, siginfo
+@@ -558,8 +560,6 @@
* handler too.
*/
regs->flags &= ~X86_EFLAGS_TF;
spin_lock_irq(¤t->sighand->siglock);
sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask);
-@@ -568,6 +568,14 @@ handle_signal(unsigned long sig, siginfo
+@@ -567,6 +567,14 @@
+ sigaddset(¤t->blocked, sig);
recalc_sigpending();
spin_unlock_irq(¤t->sighand->siglock);
-
++
+ if (current->instrumentation & PTS_SELF) {
+ clear_thread_flag(TIF_SYSCALL_TRACE);
+ current->instrumentation &= ~PTS_SELF;
+
+ tracehook_signal_handler(sig, info, ka, regs,
+ test_thread_flag(TIF_SINGLESTEP));
-+
+
return 0;
}
-
-@@ -657,9 +665,18 @@ static void do_signal(struct pt_regs *re
+@@ -657,9 +665,18 @@
void
do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)
{
+
clear_thread_flag(TIF_IRET);
}
-diff -purN linux-2.6.27/arch/x86/kernel/signal_64.c linux-2.6.27.19-5.1/arch/x86/kernel/signal_64.c
---- linux-2.6.27/arch/x86/kernel/signal_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/signal_64.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/signal_64.c
+--- a/arch/x86/kernel/signal_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/signal_64.c Wed May 06 16:56:10 2009 +0100
@@ -15,10 +15,12 @@
#include <linux/errno.h>
#include <linux/wait.h>
#include "sigframe.h"
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
-@@ -355,35 +358,6 @@ give_sigsegv:
+@@ -355,35 +358,6 @@
}
/*
* OK, we're invoking a handler
*/
-@@ -394,9 +368,9 @@ handle_signal(unsigned long sig, siginfo
+@@ -394,9 +368,9 @@
int ret;
/* Are we from a system call? */
case -ERESTART_RESTARTBLOCK:
case -ERESTARTNOHAND:
regs->ax = -EINTR;
-@@ -453,8 +427,6 @@ handle_signal(unsigned long sig, siginfo
+@@ -453,8 +427,6 @@
* handler too.
*/
regs->flags &= ~X86_EFLAGS_TF;
spin_lock_irq(¤t->sighand->siglock);
sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask);
-@@ -462,6 +434,14 @@ handle_signal(unsigned long sig, siginfo
+@@ -462,6 +434,14 @@
sigaddset(¤t->blocked,sig);
recalc_sigpending();
spin_unlock_irq(¤t->sighand->siglock);
}
return ret;
-@@ -518,9 +498,9 @@ static void do_signal(struct pt_regs *re
+@@ -518,9 +498,9 @@
}
/* Did we come from a system call? */
case -ERESTARTNOHAND:
case -ERESTARTSYS:
case -ERESTARTNOINTR:
-@@ -549,15 +529,25 @@ static void do_signal(struct pt_regs *re
+@@ -549,15 +529,25 @@
void do_notify_resume(struct pt_regs *regs, void *unused,
__u32 thread_info_flags)
{
}
void signal_fault(struct pt_regs *regs, void __user *frame, char *where)
-diff -purN linux-2.6.27/arch/x86/kernel/smp-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/smp-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/smp-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/smp-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/smp-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,202 @@
+/*
+ * Intel SMP support routines.
+
+ return IRQ_HANDLED;
+}
-diff -purN linux-2.6.27/arch/x86/kernel/smp.c linux-2.6.27.19-5.1/arch/x86/kernel/smp.c
---- linux-2.6.27/arch/x86/kernel/smp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/smp.c 2009-03-25 16:10:44.000000000 +0000
-@@ -118,26 +118,17 @@ static void native_smp_send_reschedule(i
+diff -r 9608d5473017 arch/x86/kernel/smp.c
+--- a/arch/x86/kernel/smp.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/smp.c Wed May 06 16:56:10 2009 +0100
+@@ -118,26 +118,17 @@
WARN_ON(1);
return;
}
}
static void stop_this_cpu(void *dummy)
-diff -purN linux-2.6.27/arch/x86/kernel/smpboot.c linux-2.6.27.19-5.1/arch/x86/kernel/smpboot.c
---- linux-2.6.27/arch/x86/kernel/smpboot.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/smpboot.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/smpboot.c
+--- a/arch/x86/kernel/smpboot.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/smpboot.c Wed May 06 16:56:10 2009 +0100
@@ -42,6 +42,7 @@
#include <linux/init.h>
#include <linux/smp.h>
#include <linux/sched.h>
#include <linux/percpu.h>
#include <linux/bootmem.h>
-@@ -123,7 +124,6 @@ EXPORT_PER_CPU_SYMBOL(cpu_info);
+@@ -123,7 +124,6 @@
static atomic_t init_deasserted;
/* representing cpus for which sibling maps can be computed */
static cpumask_t cpu_sibling_setup_map;
-@@ -165,6 +165,8 @@ static void unmap_cpu_to_node(int cpu)
+@@ -165,6 +165,8 @@
#endif
#ifdef CONFIG_X86_32
u8 cpu_2_logical_apicid[NR_CPUS] __read_mostly =
{ [0 ... NR_CPUS-1] = BAD_APICID };
-@@ -210,7 +212,7 @@ static void __cpuinit smp_callin(void)
+@@ -210,7 +212,7 @@
/*
* (This works even if the APIC is not enabled.)
*/
cpuid = smp_processor_id();
if (cpu_isset(cpuid, cpu_callin_map)) {
panic("%s: phys CPU#%d, CPU#%d already present??\n", __func__,
-@@ -289,9 +291,7 @@ static void __cpuinit start_secondary(vo
+@@ -289,9 +291,7 @@
* fragile that we want to limit the things done here to the
* most necessary things.
*/
cpu_init();
preempt_disable();
smp_callin();
-@@ -550,8 +550,7 @@ static inline void __inquire_remote_apic
+@@ -550,8 +550,7 @@
printk(KERN_CONT
"a previous APIC delivery may have failed\n");
timeout = 0;
do {
-@@ -582,12 +581,7 @@ wakeup_secondary_cpu(int logical_apicid,
+@@ -582,12 +581,7 @@
unsigned long send_status, accept_status = 0;
int maxlvt;
pr_debug("Waiting for send to finish...\n");
send_status = safe_apic_wait_icr_idle();
-@@ -637,16 +631,14 @@ wakeup_secondary_cpu(int phys_apicid, un
+@@ -637,16 +631,14 @@
pr_debug("Asserting INIT.\n");
pr_debug("Waiting for send to finish...\n");
send_status = safe_apic_wait_icr_idle();
-@@ -656,10 +648,8 @@ wakeup_secondary_cpu(int phys_apicid, un
+@@ -656,10 +648,8 @@
pr_debug("Deasserting INIT.\n");
/* Target chip */
pr_debug("Waiting for send to finish...\n");
send_status = safe_apic_wait_icr_idle();
-@@ -702,11 +692,10 @@ wakeup_secondary_cpu(int phys_apicid, un
+@@ -702,11 +692,10 @@
*/
/* Target chip */
/*
* Give the other CPU some time to accept the IPI.
-@@ -1175,10 +1164,17 @@ void __init native_smp_prepare_cpus(unsi
+@@ -1175,9 +1164,16 @@
* Setup boot CPU information
*/
smp_store_cpu_info(0); /* Final full version of the data */
+#endif
current_thread_info()->cpu = 0; /* needed? */
set_cpu_sibling_map(0);
-
++
+#ifdef CONFIG_X86_64
+ enable_IR_x2apic();
+ setup_apic_routing();
+#endif
-+
+
if (smp_sanity_check(max_cpus) < 0) {
printk(KERN_INFO "SMP disabled\n");
- disable_smp();
-@@ -1186,9 +1182,9 @@ void __init native_smp_prepare_cpus(unsi
+@@ -1186,9 +1182,9 @@
}
preempt_disable();
/* Or can we switch back to PIC here? */
}
preempt_enable();
-@@ -1382,6 +1378,7 @@ int __cpu_disable(void)
+@@ -1382,6 +1378,7 @@
remove_cpu_from_maps(cpu);
unlock_vector_lock();
fixup_irqs(cpu_online_map);
return 0;
}
-diff -purN linux-2.6.27/arch/x86/kernel/sys_x86_64.c linux-2.6.27.19-5.1/arch/x86/kernel/sys_x86_64.c
---- linux-2.6.27/arch/x86/kernel/sys_x86_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/sys_x86_64.c 2009-03-25 16:10:44.000000000 +0000
-@@ -106,6 +106,8 @@ arch_get_unmapped_area(struct file *filp
+diff -r 9608d5473017 arch/x86/kernel/sys_x86_64.c
+--- a/arch/x86/kernel/sys_x86_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/sys_x86_64.c Wed May 06 16:56:10 2009 +0100
+@@ -106,6 +106,8 @@
full_search:
for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
/* At this point: (!vma || addr < vma->vm_end). */
if (end - len < addr) {
/*
-@@ -119,15 +121,22 @@ full_search:
+@@ -119,15 +121,22 @@
}
return -ENOMEM;
}
addr = vma->vm_end;
}
-@@ -174,34 +183,51 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -174,34 +183,51 @@
/* make sure it can fit in the remaining address space */
if (addr > len) {
} while (len < vma->vm_start);
bottomup:
-diff -purN linux-2.6.27/arch/x86/kernel/syscall_table_32.S linux-2.6.27.19-5.1/arch/x86/kernel/syscall_table_32.S
---- linux-2.6.27/arch/x86/kernel/syscall_table_32.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/syscall_table_32.S 2009-03-25 16:10:44.000000000 +0000
-@@ -88,7 +88,7 @@ ENTRY(sys_call_table)
+diff -r 9608d5473017 arch/x86/kernel/syscall_table_32.S
+--- a/arch/x86/kernel/syscall_table_32.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/syscall_table_32.S Wed May 06 16:56:10 2009 +0100
+@@ -88,7 +88,7 @@
.long sys_uselib
.long sys_swapon
.long sys_reboot
.long old_mmap /* 90 */
.long sys_munmap
.long sys_truncate
-diff -purN linux-2.6.27/arch/x86/kernel/time_32-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/time_32-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/time_32-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/time_32-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/time_32-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,985 @@
+/*
+ * Copyright (C) 1991, 1992, 1995 Linus Torvalds
+ return 0;
+}
+__initcall(xen_sysctl_init);
-diff -purN linux-2.6.27/arch/x86/kernel/tlb_32.c linux-2.6.27.19-5.1/arch/x86/kernel/tlb_32.c
---- linux-2.6.27/arch/x86/kernel/tlb_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/tlb_32.c 2009-03-25 16:10:44.000000000 +0000
-@@ -158,7 +158,7 @@ void native_flush_tlb_others(const cpuma
+diff -r 9608d5473017 arch/x86/kernel/tlb_32.c
+--- a/arch/x86/kernel/tlb_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/tlb_32.c Wed May 06 16:56:10 2009 +0100
+@@ -158,7 +158,7 @@
* We have to send the IPI only to
* CPUs affected.
*/
while (!cpus_empty(flush_cpumask))
/* nothing. lockup detection does not belong here */
-diff -purN linux-2.6.27/arch/x86/kernel/tlb_64.c linux-2.6.27.19-5.1/arch/x86/kernel/tlb_64.c
---- linux-2.6.27/arch/x86/kernel/tlb_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/tlb_64.c 2009-03-25 16:10:44.000000000 +0000
-@@ -186,7 +186,7 @@ void native_flush_tlb_others(const cpuma
+diff -r 9608d5473017 arch/x86/kernel/tlb_64.c
+--- a/arch/x86/kernel/tlb_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/tlb_64.c Wed May 06 16:56:10 2009 +0100
+@@ -186,7 +186,7 @@
* We have to send the IPI only to
* CPUs affected.
*/
while (!cpus_empty(f->flush_cpumask))
cpu_relax();
-diff -purN linux-2.6.27/arch/x86/kernel/tlb_uv.c linux-2.6.27.19-5.1/arch/x86/kernel/tlb_uv.c
---- linux-2.6.27/arch/x86/kernel/tlb_uv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/tlb_uv.c 2009-03-25 16:10:44.000000000 +0000
-@@ -566,14 +566,10 @@ static int __init uv_ptc_init(void)
+diff -r 9608d5473017 arch/x86/kernel/tlb_uv.c
+--- a/arch/x86/kernel/tlb_uv.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/tlb_uv.c Wed May 06 16:56:10 2009 +0100
+@@ -566,14 +566,10 @@
if (!is_uv_system())
return 0;
return -EINVAL;
}
proc_uv_ptc->proc_fops = &proc_uv_ptc_operations;
-@@ -586,7 +582,6 @@ static int __init uv_ptc_init(void)
+@@ -586,7 +582,6 @@
static struct bau_control * __init uv_table_bases_init(int blade, int node)
{
int i;
struct bau_msg_status *msp;
struct bau_control *bau_tabp;
-@@ -603,13 +598,6 @@ static struct bau_control * __init uv_ta
+@@ -602,13 +597,6 @@
+ for (i = 0, msp = bau_tabp->msg_statuses; i < DEST_Q_SIZE; i++, msp++)
bau_cpubits_clear(&msp->seen_by, (int)
uv_blade_nr_possible_cpus(blade));
-
+-
- bau_tabp->watching =
- kmalloc_node(sizeof(int) * DEST_NUM_RESOURCES, GFP_KERNEL, node);
- BUG_ON(!bau_tabp->watching);
-
- for (i = 0, ip = bau_tabp->watching; i < DEST_Q_SIZE; i++, ip++)
- *ip = 0;
--
+
uv_bau_table_bases[blade] = bau_tabp;
- return bau_tabp;
-@@ -632,7 +620,6 @@ uv_table_bases_finish(int blade, int nod
+@@ -632,7 +620,6 @@
bcp->bau_msg_head = bau_tablesp->va_queue_first;
bcp->va_queue_first = bau_tablesp->va_queue_first;
bcp->va_queue_last = bau_tablesp->va_queue_last;
bcp->msg_statuses = bau_tablesp->msg_statuses;
bcp->descriptor_base = adp;
}
-diff -purN linux-2.6.27/arch/x86/kernel/traps_32-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/traps_32-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/traps_32-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/traps_32-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/traps_32-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,1322 @@
+/*
+ * Copyright (C) 1991, 1992 Linus Torvalds
+}
+__setup("call_trace=", call_trace_setup);
+#endif
-diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/kernel/traps_32.c
---- linux-2.6.27/arch/x86/kernel/traps_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/traps_32.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/traps_32.c
+--- a/arch/x86/kernel/traps_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/traps_32.c Wed May 06 16:56:10 2009 +0100
@@ -46,6 +46,10 @@
#include <linux/edac.h>
#endif
#include <asm/arch_hooks.h>
#include <asm/stacktrace.h>
#include <asm/processor.h>
-@@ -79,8 +83,14 @@ gate_desc idt_table[256]
+@@ -79,8 +83,14 @@
__attribute__((__section__(".data.idt"))) = { { { { 0, 0 } } }, };
int panic_on_unrecovered_nmi;
static int ignore_nmis;
static int die_counter;
-@@ -151,6 +161,33 @@ print_context_stack(struct thread_info *
+@@ -151,12 +161,73 @@
return bp;
}
void dump_trace(struct task_struct *task, struct pt_regs *regs,
unsigned long *stack, unsigned long bp,
const struct stacktrace_ops *ops, void *data)
-@@ -158,6 +195,40 @@ void dump_trace(struct task_struct *task
+ {
if (!task)
task = current;
-
++
+ if (call_trace >= 0) {
+ int unw_ret = 0;
+ struct unwind_frame_info info;
+ } else
+ ops->warning(data, "Inexact backtrace:\n");
+ }
-+
+
if (!stack) {
unsigned long dummy;
- stack = &dummy;
-@@ -395,6 +466,9 @@ void __kprobes oops_end(unsigned long fl
+@@ -395,6 +466,9 @@
add_taint(TAINT_DIE);
__raw_spin_unlock(&die_lock);
raw_local_irq_restore(flags);
if (!regs)
return;
-@@ -428,6 +502,8 @@ int __kprobes __die(const char *str, str
+@@ -428,6 +502,8 @@
printk("DEBUG_PAGEALLOC");
#endif
printk("\n");
if (notify_die(DIE_OOPS, str, regs, err,
current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
return 1;
-@@ -463,6 +539,9 @@ void die(const char *str, struct pt_regs
+@@ -463,6 +539,9 @@
printk(KERN_EMERG "Recursive die() failure, output suppressed\n");
}
oops_end(flags, regs, SIGSEGV);
}
-@@ -573,7 +652,7 @@ void do_##name(struct pt_regs *regs, lon
+@@ -573,7 +652,7 @@
}
DO_VM86_ERROR_INFO(0, SIGFPE, "divide error", divide_error, FPE_INTDIV, regs->ip)
DO_VM86_ERROR(3, SIGTRAP, "int3", int3)
#endif
DO_VM86_ERROR(4, SIGSEGV, "overflow", overflow)
-@@ -701,6 +780,9 @@ io_check_error(unsigned char reason, str
+@@ -701,6 +780,9 @@
printk(KERN_EMERG "NMI: IOCK error (debug interrupt?)\n");
show_registers(regs);
/* Re-enable the IOCK line, wait for a few seconds */
reason = (reason & 0xf) | 8;
outb(reason, 0x61);
-@@ -716,6 +798,10 @@ io_check_error(unsigned char reason, str
+@@ -716,6 +798,10 @@
static notrace __kprobes void
unknown_nmi_error(unsigned char reason, struct pt_regs *regs)
{
if (notify_die(DIE_NMIUNKNOWN, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP)
return;
#ifdef CONFIG_MCA
-@@ -756,6 +842,9 @@ void notrace __kprobes die_nmi(char *str
+@@ -756,6 +842,9 @@
printk(" on CPU%d, ip %08lx, registers:\n",
smp_processor_id(), regs->ip);
show_registers(regs);
if (do_panic)
panic("Non maskable interrupt");
console_silent();
-@@ -785,6 +874,16 @@ static notrace __kprobes void default_do
+@@ -784,6 +873,16 @@
+ /* Only the BSP gets external NMIs from the system. */
if (!cpu)
reason = get_nmi_reason();
-
++
+#if defined(CONFIG_SMP) && defined(CONFIG_KDB)
+ /*
+ * Call the kernel debugger to see if this NMI is due
+ return;
+ }
+#endif /* defined(CONFIG_SMP) && defined(CONFIG_KDB) */
-+
+
if (!(reason & 0xc0)) {
if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 2, SIGINT)
- == NOTIFY_STOP)
-@@ -852,6 +951,10 @@ void __kprobes do_int3(struct pt_regs *r
+@@ -852,6 +951,10 @@
{
trace_hardirqs_fixup();
if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP)
== NOTIFY_STOP)
return;
-@@ -902,6 +1005,11 @@ void __kprobes do_debug(struct pt_regs *
+@@ -901,6 +1004,11 @@
+ */
clear_tsk_thread_flag(tsk, TIF_DEBUGCTLMSR);
tsk->thread.debugctlmsr = 0;
-
++
+#ifdef CONFIG_KDB
+ if (kdb(KDB_REASON_DEBUG, error_code, regs))
+ return;
+#endif /* CONFIG_KDB */
-+
+
if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code,
SIGTRAP) == NOTIFY_STOP)
- return;
-@@ -956,6 +1064,16 @@ clear_TF_reenable:
+@@ -955,6 +1063,16 @@
+ regs->flags &= ~X86_EFLAGS_TF;
return;
}
-
++
+#if defined(CONFIG_KDB) && !defined(CONFIG_KPROBES)
+void do_int3(struct pt_regs * regs, long error_code)
+{
+}
+#endif /* CONFIG_KDB && !CONFIG_KPROBES */
+
-+
+
/*
* Note that we play around with the 'TS' bit in an attempt to get
- * the correct behaviour even in the presence of the asynchronous
-@@ -1254,3 +1372,19 @@ static int __init code_bytes_setup(char
+@@ -1254,3 +1372,19 @@
return 1;
}
__setup("code_bytes=", code_bytes_setup);
+}
+__setup("call_trace=", call_trace_setup);
+#endif
-diff -purN linux-2.6.27/arch/x86/kernel/traps_64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/traps_64-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/traps_64-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/traps_64-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/traps_64-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,1333 @@
+/*
+ * Copyright (C) 1991, 1992 Linus Torvalds
+}
+early_param("call_trace", call_trace_setup);
+#endif
-diff -purN linux-2.6.27/arch/x86/kernel/traps_64.c linux-2.6.27.19-5.1/arch/x86/kernel/traps_64.c
---- linux-2.6.27/arch/x86/kernel/traps_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/traps_64.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/traps_64.c
+--- a/arch/x86/kernel/traps_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/traps_64.c Wed May 06 16:56:10 2009 +0100
@@ -56,8 +56,14 @@
#include <mach_traps.h>
static int ignore_nmis;
static int die_counter;
-@@ -162,6 +168,32 @@ static unsigned long *in_exception_stack
+@@ -162,6 +168,32 @@
return NULL;
}
/*
* x86-64 can have up to three kernel stacks:
* process stack
-@@ -226,6 +258,42 @@ void dump_trace(struct task_struct *task
+@@ -225,6 +257,42 @@
+
if (!task)
task = current;
-
++
+ if (call_trace >= 0) {
+ int unw_ret = 0;
+ struct unwind_frame_info info;
+ } else
+ ops->warning(data, "Inexact backtrace:\n");
+ }
-+
+
if (!stack) {
unsigned long dummy;
- stack = &dummy;
-@@ -537,6 +605,8 @@ int __kprobes __die(const char *str, str
+@@ -537,6 +605,8 @@
printk("DEBUG_PAGEALLOC");
#endif
printk("\n");
if (notify_die(DIE_OOPS, str, regs, err,
current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
return 1;
-@@ -581,6 +651,8 @@ die_nmi(char *str, struct pt_regs *regs,
+@@ -581,6 +651,8 @@
printk(" on CPU%d, ip %08lx, registers:\n",
smp_processor_id(), regs->ip);
show_registers(regs);
if (kexec_should_crash(current))
crash_kexec(regs);
if (do_panic || panic_on_oops)
-@@ -769,6 +841,9 @@ io_check_error(unsigned char reason, str
+@@ -768,6 +840,9 @@
+ {
printk("NMI: IOCK error (debug interrupt?)\n");
show_registers(regs);
-
++
+ if (panic_on_io_nmi)
+ panic("NMI IOCK error: Not continuing");
-+
+
/* Re-enable the IOCK line, wait for a few seconds */
reason = (reason & 0xf) | 8;
- outb(reason, 0x61);
-@@ -1210,3 +1285,21 @@ static int __init code_bytes_setup(char
+@@ -1210,3 +1285,21 @@
return 1;
}
__setup("code_bytes=", code_bytes_setup);
+}
+early_param("call_trace", call_trace_setup);
+#endif
-diff -purN linux-2.6.27/arch/x86/kernel/tsc.c linux-2.6.27.19-5.1/arch/x86/kernel/tsc.c
---- linux-2.6.27/arch/x86/kernel/tsc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/tsc.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/tsc.c
+--- a/arch/x86/kernel/tsc.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/tsc.c Wed May 06 16:56:10 2009 +0100
@@ -15,6 +15,7 @@
#include <asm/vgtod.h>
#include <asm/time.h>
unsigned int cpu_khz; /* TSC clocks / usec, not used here */
EXPORT_SYMBOL(cpu_khz);
-@@ -31,6 +32,7 @@ static int tsc_unstable;
+@@ -31,6 +32,7 @@
erroneous rdtsc usage on !cpu_has_tsc processors */
static int tsc_disabled = -1;
/*
* Scheduler clock - returns current time in nanosec units.
*/
-@@ -98,6 +100,15 @@ int __init notsc_setup(char *str)
+@@ -97,6 +99,15 @@
+ #endif
__setup("notsc", notsc_setup);
-
++
+static int __init tsc_setup(char *str)
+{
+ if (!strcmp(str, "reliable"))
+}
+
+__setup("tsc=", tsc_setup);
-+
+
#define MAX_RETRIES 5
#define SMI_TRESHOLD 50000
-
-@@ -189,9 +200,15 @@ unsigned long native_calibrate_tsc(void)
+@@ -189,8 +200,14 @@
{
u64 tsc1, tsc2, delta, pm1, pm2, hpet1, hpet2;
unsigned long tsc_pit_min = ULONG_MAX, tsc_ref_min = ULONG_MAX;
- unsigned long flags;
+ unsigned long flags, tsc_khz;
int hpet = is_hpet_enabled(), i;
-
++
+ tsc_khz = get_hypervisor_tsc_freq();
+ if (tsc_khz) {
+ printk(KERN_INFO "TSC: Frequency read from the hypervisor\n");
+ return tsc_khz;
+ }
-+
+
/*
* Run 5 calibration loops to get the lowest frequency value
- * (the best estimate). We use two different calibration modes
-@@ -557,24 +574,21 @@ static struct dmi_system_id __initdata b
+@@ -557,24 +574,21 @@
{}
};
+ /* Geode_LX - the OLPC CPU has a possibly a very reliable TSC */
if (res_low & RTSC_SUSP)
- clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY;
--}
--#else
--static inline void check_geode_tsc_reliable(void) { }
+ tsc_clocksource_reliable = 1;
- #endif
++#endif
+ if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE))
+ tsc_clocksource_reliable = 1;
-+}
+ }
+-#else
+-static inline void check_geode_tsc_reliable(void) { }
+-#endif
/*
* Make an educated guess if the TSC is trustworthy and synchronized
-@@ -609,6 +623,8 @@ static void __init init_tsc_clocksource(
+@@ -609,6 +623,8 @@
{
clocksource_tsc.mult = clocksource_khz2mult(tsc_khz,
clocksource_tsc.shift);
/* lower the rating if we already know its unstable: */
if (check_tsc_unstable()) {
clocksource_tsc.rating = 0;
-@@ -639,10 +655,6 @@ void __init tsc_init(void)
+@@ -639,10 +655,6 @@
cpu_khz = calibrate_cpu();
#endif
printk("Detected %lu.%03lu MHz processor.\n",
(unsigned long)cpu_khz / 1000,
(unsigned long)cpu_khz % 1000);
-@@ -662,6 +674,10 @@ void __init tsc_init(void)
+@@ -662,6 +674,10 @@
/* now allow native_sched_clock() to use rdtsc */
tsc_disabled = 0;
use_tsc_delay();
/* Check and install the TSC clocksource */
dmi_check_system(bad_tsc_dmi_table);
-@@ -669,7 +685,7 @@ void __init tsc_init(void)
+@@ -669,7 +685,7 @@
if (unsynchronized_tsc())
mark_tsc_unstable("TSCs unsynchronized");
init_tsc_clocksource();
}
-diff -purN linux-2.6.27/arch/x86/kernel/tsc_sync.c linux-2.6.27.19-5.1/arch/x86/kernel/tsc_sync.c
---- linux-2.6.27/arch/x86/kernel/tsc_sync.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/tsc_sync.c 2009-03-25 16:10:44.000000000 +0000
-@@ -108,6 +108,12 @@ void __cpuinit check_tsc_sync_source(int
+diff -r 9608d5473017 arch/x86/kernel/tsc_sync.c
+--- a/arch/x86/kernel/tsc_sync.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/tsc_sync.c Wed May 06 16:56:10 2009 +0100
+@@ -108,6 +108,12 @@
if (unsynchronized_tsc())
return;
printk(KERN_INFO "checking TSC synchronization [CPU#%d -> CPU#%d]:",
smp_processor_id(), cpu);
-@@ -161,7 +167,7 @@ void __cpuinit check_tsc_sync_target(voi
+@@ -161,7 +167,7 @@
{
int cpus = 2;
return;
/*
-diff -purN linux-2.6.27/arch/x86/kernel/uv_irq.c linux-2.6.27.19-5.1/arch/x86/kernel/uv_irq.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/uv_irq.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/uv_irq.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/uv_irq.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,79 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ destroy_irq(irq);
+}
+EXPORT_SYMBOL_GPL(uv_teardown_irq);
-diff -purN linux-2.6.27/arch/x86/kernel/uv_sysfs.c linux-2.6.27.19-5.1/arch/x86/kernel/uv_sysfs.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/uv_sysfs.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/uv_sysfs.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/uv_sysfs.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,72 @@
+/*
+ * This file supports the /sys/firmware/sgi_uv interfaces for SGI UV.
+}
+
+device_initcall(sgi_uv_sysfs_init);
-diff -purN linux-2.6.27/arch/x86/kernel/vm86_32.c linux-2.6.27.19-5.1/arch/x86/kernel/vm86_32.c
---- linux-2.6.27/arch/x86/kernel/vm86_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/vm86_32.c 2009-03-25 16:10:44.000000000 +0000
-@@ -124,7 +124,9 @@ static int copy_vm86_regs_from_user(stru
+diff -r 9608d5473017 arch/x86/kernel/vm86_32.c
+--- a/arch/x86/kernel/vm86_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/vm86_32.c Wed May 06 16:56:10 2009 +0100
+@@ -124,7 +124,9 @@
struct pt_regs *save_v86_state(struct kernel_vm86_regs *regs)
{
struct pt_regs *ret;
unsigned long tmp;
-@@ -147,12 +149,16 @@ struct pt_regs *save_v86_state(struct ke
+@@ -147,12 +149,16 @@
do_exit(SIGSEGV);
}
ret = KVM86->regs32;
-@@ -279,7 +285,9 @@ out:
+@@ -279,7 +285,9 @@
static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk)
{
/*
* make sure the vm86() system call doesn't try to do anything silly
*/
-@@ -324,12 +332,16 @@ static void do_sys_vm86(struct kernel_vm
+@@ -324,12 +332,16 @@
tsk->thread.saved_fs = info->regs32->fs;
savesegment(gs, tsk->thread.saved_gs);
tsk->thread.screen_bitmap = info->screen_bitmap;
if (info->flags & VM86_SCREEN_BITMAP)
-diff -purN linux-2.6.27/arch/x86/kernel/vmi_32.c linux-2.6.27.19-5.1/arch/x86/kernel/vmi_32.c
---- linux-2.6.27/arch/x86/kernel/vmi_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/vmi_32.c 2009-03-25 16:10:44.000000000 +0000
-@@ -430,6 +430,16 @@ static void vmi_release_pmd(u32 pfn)
+diff -r 9608d5473017 arch/x86/kernel/vmi_32.c
+--- a/arch/x86/kernel/vmi_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/vmi_32.c Wed May 06 16:56:10 2009 +0100
+@@ -430,6 +430,16 @@
}
/*
* Helper macros for MMU update flags. We can defer updates until a flush
* or page invalidation only if the update is to the current address space
* (otherwise, there is no flush). We must check against init_mm, since
-@@ -677,6 +687,49 @@ static inline int __init probe_vmi_rom(v
+@@ -677,6 +687,49 @@
return 0;
}
/*
* VMI setup common to all processors
*/
-@@ -881,6 +934,7 @@ static inline int __init activate_vmi(vo
+@@ -881,6 +934,7 @@
if (vmi_ops.release_page) {
pv_mmu_ops.release_pte = vmi_release_pte;
pv_mmu_ops.release_pmd = vmi_release_pmd;
}
/* Set linear is needed in all cases */
-@@ -905,8 +959,8 @@ static inline int __init activate_vmi(vo
+@@ -905,8 +959,8 @@
#endif
#ifdef CONFIG_X86_LOCAL_APIC
#endif
/*
-@@ -960,8 +1014,6 @@ static inline int __init activate_vmi(vo
+@@ -960,8 +1014,6 @@
void __init vmi_init(void)
{
if (!vmi_rom)
probe_vmi_rom();
else
-@@ -973,13 +1025,21 @@ void __init vmi_init(void)
+@@ -973,13 +1025,21 @@
reserve_top_address(-vmi_rom->virtual_top);
local_irq_restore(flags & X86_EFLAGS_IF);
}
-diff -purN linux-2.6.27/arch/x86/kernel/vmlinux_32.lds.S linux-2.6.27.19-5.1/arch/x86/kernel/vmlinux_32.lds.S
---- linux-2.6.27/arch/x86/kernel/vmlinux_32.lds.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/vmlinux_32.lds.S 2009-03-25 16:10:44.000000000 +0000
-@@ -29,6 +29,12 @@ PHDRS {
+diff -r 9608d5473017 arch/x86/kernel/vmlinux_32.lds.S
+--- a/arch/x86/kernel/vmlinux_32.lds.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/vmlinux_32.lds.S Wed May 06 16:56:10 2009 +0100
+@@ -29,6 +29,12 @@
SECTIONS
{
. = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;
phys_startup_32 = startup_32 - LOAD_OFFSET;
.text.head : AT(ADDR(.text.head) - LOAD_OFFSET) {
-diff -purN linux-2.6.27/arch/x86/kernel/vsyscall_64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/vsyscall_64-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/vsyscall_64-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/vsyscall_64-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/vsyscall_64-xen.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,317 @@
+/*
+ * Copyright (C) 2001 Andrea Arcangeli <andrea@suse.de> SuSE
+}
+
+__initcall(vsyscall_init);
-diff -purN linux-2.6.27/arch/x86/kvm/Kconfig linux-2.6.27.19-5.1/arch/x86/kvm/Kconfig
---- linux-2.6.27/arch/x86/kvm/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kvm/Kconfig 2009-03-25 16:10:44.000000000 +0000
-@@ -7,6 +7,7 @@ config HAVE_KVM
+diff -r 9608d5473017 arch/x86/kvm/Kconfig
+--- a/arch/x86/kvm/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kvm/Kconfig Wed May 06 16:56:10 2009 +0100
+@@ -7,6 +7,7 @@
menuconfig VIRTUALIZATION
bool "Virtualization"
depends on HAVE_KVM || X86
default y
---help---
Say Y here to get to see options for using your Linux host to run other
-@@ -17,6 +18,20 @@ menuconfig VIRTUALIZATION
+@@ -16,6 +17,20 @@
+ If you say N, all options in this submenu will be skipped and disabled.
if VIRTUALIZATION
-
++
+config KVM_KMP
+ bool "Build Kernel-based Virtual Machine (KVM) as KMP"
+ depends on HAVE_KVM
+ itself.
+
+ Say Y here.
-+
+
config KVM
tristate "Kernel-based Virtual Machine (KVM) support"
- depends on HAVE_KVM
-diff -purN linux-2.6.27/arch/x86/lguest/boot.c linux-2.6.27.19-5.1/arch/x86/lguest/boot.c
---- linux-2.6.27/arch/x86/lguest/boot.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/lguest/boot.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/lguest/boot.c
+--- a/arch/x86/lguest/boot.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/lguest/boot.c Wed May 06 16:56:10 2009 +0100
@@ -55,6 +55,7 @@
#include <linux/lguest_launcher.h>
#include <linux/virtio_console.h>
#include <asm/lguest.h>
#include <asm/paravirt.h>
#include <asm/param.h>
-@@ -783,14 +784,45 @@ static void lguest_wbinvd(void)
+@@ -783,14 +784,45 @@
* code qualifies for Advanced. It will also never interrupt anything. It
* does, however, allow us to get through the Linux boot code. */
#ifdef CONFIG_X86_LOCAL_APIC
#endif
/* STOP! Until an interrupt comes in. */
-@@ -990,8 +1022,7 @@ __init void lguest_init(void)
+@@ -990,8 +1022,7 @@
#ifdef CONFIG_X86_LOCAL_APIC
/* apic read/write intercepts */
#endif
/* time operations */
-diff -purN linux-2.6.27/arch/x86/lib/Makefile linux-2.6.27.19-5.1/arch/x86/lib/Makefile
---- linux-2.6.27/arch/x86/lib/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/lib/Makefile 2009-03-25 16:10:44.000000000 +0000
-@@ -25,3 +25,5 @@ else
+diff -r 9608d5473017 arch/x86/lib/Makefile
+--- a/arch/x86/lib/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/lib/Makefile Wed May 06 16:56:10 2009 +0100
+@@ -25,3 +25,5 @@
lib-y += memmove_64.o memset_64.o
lib-y += copy_user_64.o rwlock_64.o copy_user_nocache_64.o
endif
+
+lib-$(CONFIG_XEN_SCRUB_PAGES) += scrub.o
-diff -purN linux-2.6.27/arch/x86/lib/scrub.c linux-2.6.27.19-5.1/arch/x86/lib/scrub.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/lib/scrub.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/lib/scrub.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/lib/scrub.c Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,21 @@
+#include <asm/cpufeature.h>
+#include <asm/page.h>
+ for (; count--; v += PAGE_SIZE)
+ clear_page(v);
+}
-diff -purN linux-2.6.27/arch/x86/lib/usercopy_32.c linux-2.6.27.19-5.1/arch/x86/lib/usercopy_32.c
---- linux-2.6.27/arch/x86/lib/usercopy_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/lib/usercopy_32.c 2009-03-25 16:10:44.000000000 +0000
-@@ -49,7 +49,7 @@ do { \
+diff -r 9608d5473017 arch/x86/lib/usercopy_32.c
+--- a/arch/x86/lib/usercopy_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/lib/usercopy_32.c Wed May 06 16:56:10 2009 +0100
+@@ -49,7 +49,7 @@
" jmp 2b\n" \
".previous\n" \
_ASM_EXTABLE(0b,3b) \
"=&D" (__d2) \
: "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \
: "memory"); \
-@@ -211,7 +211,7 @@ long strnlen_user(const char __user *s,
+@@ -211,7 +211,7 @@
" .align 4\n"
" .long 0b,2b\n"
".previous"
:"0" (n), "1" (s), "2" (0), "3" (mask)
:"cc");
return res & mask;
-diff -purN linux-2.6.27/arch/x86/lib/usercopy_64.c linux-2.6.27.19-5.1/arch/x86/lib/usercopy_64.c
---- linux-2.6.27/arch/x86/lib/usercopy_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/lib/usercopy_64.c 2009-03-25 16:10:44.000000000 +0000
-@@ -32,7 +32,7 @@ do { \
+diff -r 9608d5473017 arch/x86/lib/usercopy_64.c
+--- a/arch/x86/lib/usercopy_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/lib/usercopy_64.c Wed May 06 16:56:10 2009 +0100
+@@ -32,7 +32,7 @@
" jmp 2b\n" \
".previous\n" \
_ASM_EXTABLE(0b,3b) \
"=&D" (__d2) \
: "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \
: "memory"); \
-@@ -86,7 +86,7 @@ unsigned long __clear_user(void __user *
+@@ -86,7 +86,7 @@
".previous\n"
_ASM_EXTABLE(0b,3b)
_ASM_EXTABLE(1b,2b)
: [size1] "r"(size & 7), "[size8]" (size / 8), "[dst]"(addr),
[zero] "r" (0UL), [eight] "r" (8UL));
return size;
-diff -purN linux-2.6.27/arch/x86/mach-generic/bigsmp.c linux-2.6.27.19-5.1/arch/x86/mach-generic/bigsmp.c
---- linux-2.6.27/arch/x86/mach-generic/bigsmp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mach-generic/bigsmp.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mach-generic/bigsmp.c
+--- a/arch/x86/mach-generic/bigsmp.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mach-generic/bigsmp.c Wed May 06 16:56:10 2009 +0100
@@ -5,23 +5,22 @@
#define APIC_DEFINITION 1
#include <linux/threads.h>
-#include <linux/smp.h>
#include <linux/init.h>
#include <linux/dmi.h>
--#include <asm/mach-bigsmp/mach_apic.h>
- #include <asm/mach-bigsmp/mach_apicdef.h>
++#include <asm/mach-bigsmp/mach_apicdef.h>
+#include <linux/smp.h>
-+#include <asm/mach-bigsmp/mach_apic.h>
+ #include <asm/mach-bigsmp/mach_apic.h>
+-#include <asm/mach-bigsmp/mach_apicdef.h>
#include <asm/mach-bigsmp/mach_ipi.h>
#include <asm/mach-default/mach_mpparse.h>
{
printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident);
dmi_bigsmp = 1;
-@@ -30,15 +29,35 @@ static int hp_ht_bigsmp(const struct dmi
+@@ -30,14 +29,34 @@
static const struct dmi_system_id bigsmp_dmi_table[] = {
+ { force_bigsmp_apic, "HP ProLiant DL740",
{ DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
DMI_MATCH(DMI_BIOS_VERSION, "P47-"),}
- },
++ },
+
+ { force_bigsmp_apic, "IBM x260 / x366 / x460",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "IBM"),
+ { force_bigsmp_apic, "IBM x3850 M2 / x3950 M2",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "IBM"),
+ DMI_MATCH(DMI_BIOS_VERSION, "-[A3"),}
-+ },
+ },
{ }
};
-
-diff -purN linux-2.6.27/arch/x86/mach-generic/es7000.c linux-2.6.27.19-5.1/arch/x86/mach-generic/es7000.c
---- linux-2.6.27/arch/x86/mach-generic/es7000.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mach-generic/es7000.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mach-generic/es7000.c
+--- a/arch/x86/mach-generic/es7000.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mach-generic/es7000.c Wed May 06 16:56:10 2009 +0100
@@ -4,16 +4,15 @@
#define APIC_DEFINITION 1
#include <linux/threads.h>
#include <asm/mach-es7000/mach_apic.h>
#include <asm/mach-es7000/mach_ipi.h>
#include <asm/mach-es7000/mach_mpparse.h>
-diff -purN linux-2.6.27/arch/x86/mach-generic/numaq.c linux-2.6.27.19-5.1/arch/x86/mach-generic/numaq.c
---- linux-2.6.27/arch/x86/mach-generic/numaq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mach-generic/numaq.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mach-generic/numaq.c
+--- a/arch/x86/mach-generic/numaq.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mach-generic/numaq.c Wed May 06 16:56:10 2009 +0100
@@ -4,7 +4,6 @@
#define APIC_DEFINITION 1
#include <linux/threads.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/init.h>
--#include <asm/mach-numaq/mach_apic.h>
- #include <asm/mach-numaq/mach_apicdef.h>
++#include <asm/mach-numaq/mach_apicdef.h>
+#include <linux/smp.h>
-+#include <asm/mach-numaq/mach_apic.h>
+ #include <asm/mach-numaq/mach_apic.h>
+-#include <asm/mach-numaq/mach_apicdef.h>
#include <asm/mach-numaq/mach_ipi.h>
#include <asm/mach-numaq/mach_mpparse.h>
#include <asm/mach-numaq/mach_wakecpu.h>
-diff -purN linux-2.6.27/arch/x86/mach-generic/probe.c linux-2.6.27.19-5.1/arch/x86/mach-generic/probe.c
---- linux-2.6.27/arch/x86/mach-generic/probe.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mach-generic/probe.c 2009-03-25 16:10:44.000000000 +0000
-@@ -106,7 +106,7 @@ int __init mps_oem_check(struct mp_confi
+diff -r 9608d5473017 arch/x86/mach-generic/probe.c
+--- a/arch/x86/mach-generic/probe.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mach-generic/probe.c Wed May 06 16:56:10 2009 +0100
+@@ -106,7 +106,7 @@
int i;
for (i = 0; apic_probe[i]; ++i) {
if (apic_probe[i]->mps_oem_check(mpc, oem, productid)) {
genapic = apic_probe[i];
printk(KERN_INFO "Switched to APIC driver `%s'.\n",
genapic->name);
-@@ -122,7 +122,7 @@ int __init acpi_madt_oem_check(char *oem
+@@ -122,7 +122,7 @@
int i;
for (i = 0; apic_probe[i]; ++i) {
if (apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id)) {
genapic = apic_probe[i];
printk(KERN_INFO "Switched to APIC driver `%s'.\n",
genapic->name);
-diff -purN linux-2.6.27/arch/x86/mach-generic/summit.c linux-2.6.27.19-5.1/arch/x86/mach-generic/summit.c
---- linux-2.6.27/arch/x86/mach-generic/summit.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mach-generic/summit.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mach-generic/summit.c
+--- a/arch/x86/mach-generic/summit.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mach-generic/summit.c Wed May 06 16:56:10 2009 +0100
@@ -4,17 +4,16 @@
#define APIC_DEFINITION 1
#include <linux/threads.h>
#include <asm/apicdef.h>
#include <linux/kernel.h>
#include <linux/string.h>
--#include <linux/smp.h>
- #include <linux/init.h>
--#include <asm/mach-summit/mach_apic.h>
- #include <asm/mach-summit/mach_apicdef.h>
-+#include <linux/smp.h>
-+#include <asm/mach-summit/mach_apic.h>
++#include <linux/init.h>
++#include <asm/mach-summit/mach_apicdef.h>
+ #include <linux/smp.h>
+-#include <linux/init.h>
+ #include <asm/mach-summit/mach_apic.h>
+-#include <asm/mach-summit/mach_apicdef.h>
#include <asm/mach-summit/mach_ipi.h>
#include <asm/mach-summit/mach_mpparse.h>
-diff -purN linux-2.6.27/arch/x86/mach-xen/Makefile linux-2.6.27.19-5.1/arch/x86/mach-xen/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mach-xen/Makefile 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mach-xen/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mach-xen/Makefile Wed May 06 16:56:10 2009 +0100
@@ -0,0 +1,5 @@
+#
+# Makefile for the linux kernel.
+#
+
+obj-y := setup.o
-diff -purN linux-2.6.27/arch/x86/mach-xen/setup.c linux-2.6.27.19-5.1/arch/x86/mach-xen/setup.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mach-xen/setup.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mach-xen/setup.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mach-xen/setup.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,186 @@
+/*
+ * Machine specific setup for generic
+ }
+#endif
+}
-diff -purN linux-2.6.27/arch/x86/mm/Makefile linux-2.6.27.19-5.1/arch/x86/mm/Makefile
---- linux-2.6.27/arch/x86/mm/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/Makefile 2009-03-25 16:10:44.000000000 +0000
-@@ -21,4 +21,6 @@ obj-$(CONFIG_K8_NUMA) += k8topology_64.
+diff -r 9608d5473017 arch/x86/mm/Makefile
+--- a/arch/x86/mm/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/Makefile Wed May 06 16:56:11 2009 +0100
+@@ -21,4 +21,6 @@
endif
obj-$(CONFIG_ACPI_NUMA) += srat_$(BITS).o
+obj-$(CONFIG_XEN) += hypervisor.o
+
obj-$(CONFIG_MEMTEST) += memtest.o
-diff -purN linux-2.6.27/arch/x86/mm/discontig_32.c linux-2.6.27.19-5.1/arch/x86/mm/discontig_32.c
---- linux-2.6.27/arch/x86/mm/discontig_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/discontig_32.c 2009-03-25 16:10:44.000000000 +0000
-@@ -222,6 +222,41 @@ static void __init remap_numa_kva(void)
+diff -r 9608d5473017 arch/x86/mm/discontig_32.c
+--- a/arch/x86/mm/discontig_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/discontig_32.c Wed May 06 16:56:11 2009 +0100
+@@ -221,6 +221,41 @@
+ }
}
}
-
++
+#ifdef CONFIG_HIBERNATION
+/**
+ * resume_map_numa_kva - add KVA mapping to the temporary page tables created
+ }
+}
+#endif
-+
+
static unsigned long calculate_numa_remap_pages(void)
{
- int nid;
-diff -purN linux-2.6.27/arch/x86/mm/fault-xen.c linux-2.6.27.19-5.1/arch/x86/mm/fault-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/fault-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/fault-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/fault-xen.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,994 @@
+/*
+ * Copyright (C) 1995 Linus Torvalds
+ }
+#endif
+}
-diff -purN linux-2.6.27/arch/x86/mm/fault.c linux-2.6.27.19-5.1/arch/x86/mm/fault.c
---- linux-2.6.27/arch/x86/mm/fault.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/fault.c 2009-03-25 16:10:44.000000000 +0000
-@@ -534,7 +534,7 @@ static int vmalloc_fault(unsigned long a
+diff -r 9608d5473017 arch/x86/mm/fault.c
+--- a/arch/x86/mm/fault.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/fault.c Wed May 06 16:56:11 2009 +0100
+@@ -534,7 +534,7 @@
happen within a race in page table update. In the later
case just flush. */
pgd_ref = pgd_offset_k(address);
if (pgd_none(*pgd_ref))
return -1;
-@@ -607,8 +607,6 @@ void __kprobes do_page_fault(struct pt_r
+@@ -607,8 +607,6 @@
si_code = SEGV_MAPERR;
if (unlikely(kmmio_fault(regs, address)))
return;
-@@ -638,6 +636,9 @@ void __kprobes do_page_fault(struct pt_r
+@@ -638,6 +636,9 @@
if (spurious_fault(address, error_code))
return;
/*
* Don't take the mm semaphore here. If we fixup a prefetch
* fault we could otherwise deadlock.
-@@ -645,6 +646,9 @@ void __kprobes do_page_fault(struct pt_r
+@@ -645,6 +646,9 @@
goto bad_area_nosemaphore;
}
#ifdef CONFIG_X86_32
/* It's safe to allow irq's after cr2 has been saved and the vmalloc
-diff -purN linux-2.6.27/arch/x86/mm/highmem_32-xen.c linux-2.6.27.19-5.1/arch/x86/mm/highmem_32-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/highmem_32-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/highmem_32-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/highmem_32-xen.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,207 @@
+#include <linux/highmem.h>
+#include <linux/module.h>
+#endif
+EXPORT_SYMBOL(clear_highpage);
+EXPORT_SYMBOL(copy_highpage);
-diff -purN linux-2.6.27/arch/x86/mm/hypervisor.c linux-2.6.27.19-5.1/arch/x86/mm/hypervisor.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/hypervisor.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/hypervisor.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/hypervisor.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,1008 @@
+/******************************************************************************
+ * mm/hypervisor.c
+ maddr_t mach_gp = virt_to_machine(gdt + entry);
+ return HYPERVISOR_update_descriptor(mach_gp, *(const u64*)desc);
+}
-diff -purN linux-2.6.27/arch/x86/mm/init_32-xen.c linux-2.6.27.19-5.1/arch/x86/mm/init_32-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/init_32-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/init_32-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/init_32-xen.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,1251 @@
+/*
+ *
+{
+ return reserve_bootmem(phys, len, flags);
+}
-diff -purN linux-2.6.27/arch/x86/mm/init_32.c linux-2.6.27.19-5.1/arch/x86/mm/init_32.c
---- linux-2.6.27/arch/x86/mm/init_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/init_32.c 2009-03-25 16:10:44.000000000 +0000
-@@ -137,6 +137,48 @@ static pte_t * __init one_page_table_ini
+diff -r 9608d5473017 arch/x86/mm/init_32.c
+--- a/arch/x86/mm/init_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/init_32.c Wed May 06 16:56:11 2009 +0100
+@@ -137,6 +137,48 @@
return pte_offset_kernel(pmd, 0);
}
/*
* This function initializes a certain range of kernel virtual memory
* with new bootmem page tables, everywhere page tables are missing in
-@@ -153,6 +195,7 @@ page_table_range_init(unsigned long star
+@@ -153,6 +195,7 @@
unsigned long vaddr;
pgd_t *pgd;
pmd_t *pmd;
vaddr = start;
pgd_idx = pgd_index(vaddr);
-@@ -164,7 +207,8 @@ page_table_range_init(unsigned long star
+@@ -164,7 +207,8 @@
pmd = pmd + pmd_index(vaddr);
for (; (pmd_idx < PTRS_PER_PMD) && (vaddr != end);
pmd++, pmd_idx++) {
vaddr += PMD_SIZE;
}
-@@ -447,7 +491,6 @@ static void __init early_ioremap_page_ta
+@@ -447,7 +491,6 @@
* Fixed mappings, only the page table structure has to be
* created - mappings will be set by set_fixmap():
*/
vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK;
end = (FIXADDR_TOP + PMD_SIZE - 1) & PMD_MASK;
page_table_range_init(vaddr, end, pgd_base);
-@@ -718,7 +761,7 @@ void __init setup_bootmem_allocator(void
+@@ -718,7 +761,7 @@
after_init_bootmem = 1;
}
{
unsigned long puds, pmds, ptes, tables, start;
-@@ -728,7 +771,7 @@ static void __init find_early_table_spac
+@@ -728,7 +771,7 @@
pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
tables += PAGE_ALIGN(pmds * sizeof(pmd_t));
unsigned long extra;
extra = end - ((end>>PMD_SHIFT) << PMD_SHIFT);
-@@ -740,7 +783,7 @@ static void __init find_early_table_spac
+@@ -740,7 +783,7 @@
tables += PAGE_ALIGN(ptes * sizeof(pte_t));
/* for fixmap */
/*
* RED-PEN putting page tables only on node 0 could
-@@ -768,12 +811,22 @@ unsigned long __init_refok init_memory_m
+@@ -768,12 +811,22 @@
pgd_t *pgd_base = swapper_pg_dir;
unsigned long start_pfn, end_pfn;
unsigned long big_page_start;
#ifdef CONFIG_X86_PAE
set_nx();
-@@ -819,7 +872,7 @@ unsigned long __init_refok init_memory_m
+@@ -819,7 +872,7 @@
end_pfn = (end>>PMD_SHIFT) << (PMD_SHIFT - PAGE_SHIFT);
if (start_pfn < end_pfn)
kernel_physical_mapping_init(pgd_base, start_pfn, end_pfn,
/* tail is not big page alignment ? */
start_pfn = end_pfn;
-@@ -1063,6 +1116,28 @@ void mark_rodata_ro(void)
+@@ -1063,6 +1116,28 @@
set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT);
#endif
}
#endif
void free_init_pages(char *what, unsigned long begin, unsigned long end)
-diff -purN linux-2.6.27/arch/x86/mm/init_64-xen.c linux-2.6.27.19-5.1/arch/x86/mm/init_64-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/init_64-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/init_64-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/init_64-xen.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,1467 @@
+/*
+ * linux/arch/x86_64/mm/init.c
+ }
+}
+#endif
-diff -purN linux-2.6.27/arch/x86/mm/init_64.c linux-2.6.27.19-5.1/arch/x86/mm/init_64.c
---- linux-2.6.27/arch/x86/mm/init_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/init_64.c 2009-03-25 16:10:44.000000000 +0000
-@@ -446,13 +446,14 @@ phys_pud_update(pgd_t *pgd, unsigned lon
+diff -r 9608d5473017 arch/x86/mm/init_64.c
+--- a/arch/x86/mm/init_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/init_64.c Wed May 06 16:56:11 2009 +0100
+@@ -446,13 +446,14 @@
return phys_pud_init(pud, addr, end, page_size_mask);
}
unsigned long extra;
extra = end - ((end>>PUD_SHIFT) << PUD_SHIFT);
pmds = (extra + PMD_SIZE - 1) >> PMD_SHIFT;
-@@ -460,7 +461,7 @@ static void __init find_early_table_spac
+@@ -460,7 +461,7 @@
pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
tables += round_up(pmds * sizeof(pmd_t), PAGE_SIZE);
unsigned long extra;
extra = end - ((end>>PMD_SHIFT) << PMD_SHIFT);
ptes = (extra + PAGE_SIZE - 1) >> PAGE_SHIFT;
-@@ -494,7 +495,7 @@ static void __init init_gbpages(void)
+@@ -494,7 +495,7 @@
direct_gbpages = 0;
}
unsigned long end,
unsigned long page_size_mask)
{
-@@ -571,6 +572,7 @@ unsigned long __init_refok init_memory_m
+@@ -571,6 +572,7 @@
struct map_range mr[NR_RANGE_MR];
int nr_range, i;
printk(KERN_INFO "init_memory_mapping\n");
-@@ -584,9 +586,21 @@ unsigned long __init_refok init_memory_m
+@@ -584,9 +586,21 @@
if (!after_bootmem)
init_gbpages();
page_size_mask |= 1 << PG_LEVEL_2M;
memset(mr, 0, sizeof(mr));
-@@ -647,7 +661,7 @@ unsigned long __init_refok init_memory_m
+@@ -647,7 +661,7 @@
(mr[i].page_size_mask & (1<<PG_LEVEL_2M))?"2M":"4k"));
if (!after_bootmem)
for (i = 0; i < nr_range; i++)
last_map_addr = kernel_physical_mapping_init(
-@@ -721,12 +735,12 @@ int arch_add_memory(int nid, u64 start,
+@@ -721,12 +735,12 @@
unsigned long nr_pages = size >> PAGE_SHIFT;
int ret;
return ret;
}
-@@ -882,7 +896,24 @@ void mark_rodata_ro(void)
+@@ -882,7 +896,24 @@
set_memory_ro(start, (end-start) >> PAGE_SHIFT);
#endif
}
+EXPORT_SYMBOL(mark_rodata_ro);
-+
+
+void mark_rodata_rw(void)
+{
+ unsigned long start = PFN_ALIGN(_stext), end = PFN_ALIGN(__end_rodata);
+ unsigned long rodata_start =
+ ((unsigned long)__start_rodata + PAGE_SIZE - 1) & PAGE_MASK;
-
++
+#ifdef CONFIG_DYNAMIC_FTRACE
+ /* Dynamic tracing modifies the kernel text section */
+ start = rodata_start;
#endif
#ifdef CONFIG_BLK_DEV_INITRD
-diff -purN linux-2.6.27/arch/x86/mm/ioremap-xen.c linux-2.6.27.19-5.1/arch/x86/mm/ioremap-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/ioremap-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/ioremap-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/ioremap-xen.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,830 @@
+/*
+ * Re-map IO memory to kernel address space so that we can access it.
+{
+ WARN_ON(1);
+}
-diff -purN linux-2.6.27/arch/x86/mm/ioremap.c linux-2.6.27.19-5.1/arch/x86/mm/ioremap.c
---- linux-2.6.27/arch/x86/mm/ioremap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/ioremap.c 2009-03-25 16:10:44.000000000 +0000
-@@ -480,34 +480,9 @@ void __init early_ioremap_init(void)
+diff -r 9608d5473017 arch/x86/mm/ioremap.c
+--- a/arch/x86/mm/ioremap.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/ioremap.c Wed May 06 16:56:11 2009 +0100
+@@ -480,34 +480,9 @@
}
}
}
static void __init __early_set_fixmap(enum fixed_addresses idx,
-@@ -595,7 +570,7 @@ void __init *early_ioremap(unsigned long
+@@ -595,7 +570,7 @@
*/
offset = phys_addr & ~PAGE_MASK;
phys_addr &= PAGE_MASK;
/*
* Mappings have to fit in the FIX_BTMAP area.
-diff -purN linux-2.6.27/arch/x86/mm/pageattr-xen.c linux-2.6.27.19-5.1/arch/x86/mm/pageattr-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/pageattr-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/pageattr-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/pageattr-xen.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,1248 @@
+/*
+ * Copyright 2002 Andi Kleen, SuSE Labs.
+#ifdef CONFIG_CPA_DEBUG
+#include "pageattr-test.c"
+#endif
-diff -purN linux-2.6.27/arch/x86/mm/pageattr.c linux-2.6.27.19-5.1/arch/x86/mm/pageattr.c
---- linux-2.6.27/arch/x86/mm/pageattr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/pageattr.c 2009-03-25 16:10:44.000000000 +0000
-@@ -190,6 +190,8 @@ static void cpa_flush_range(unsigned lon
+diff -r 9608d5473017 arch/x86/mm/pageattr.c
+--- a/arch/x86/mm/pageattr.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/pageattr.c Wed May 06 16:56:11 2009 +0100
+@@ -190,6 +190,8 @@
}
}
/*
* Certain areas of memory on x86 require very specific protection flags,
* for example the BIOS area or kernel text. Callers don't always get this
-@@ -221,8 +223,10 @@ static inline pgprot_t static_protection
+@@ -221,8 +223,10 @@
* catches all aliases.
*/
if (within(pfn, __pa((unsigned long)__start_rodata) >> PAGE_SHIFT,
prot = __pgprot(pgprot_val(prot) & ~pgprot_val(forbidden));
-@@ -582,6 +586,36 @@ out_unlock:
+@@ -582,6 +586,36 @@
return 0;
}
static int __change_page_attr(struct cpa_data *cpa, int primary)
{
unsigned long address = cpa->vaddr;
-@@ -589,20 +623,21 @@ static int __change_page_attr(struct cpa
+@@ -589,20 +623,21 @@
unsigned int level;
pte_t *kpte, old_pte;
if (level == PG_LEVEL_4K) {
pte_t new_pte;
-@@ -676,12 +711,7 @@ static int cpa_process_alias(struct cpa_
+@@ -676,12 +711,7 @@
* mapping already:
*/
if (!(within(cpa->vaddr, PAGE_OFFSET,
alias_cpa = *cpa;
alias_cpa.vaddr = (unsigned long) __va(cpa->pfn << PAGE_SHIFT);
-@@ -817,6 +847,13 @@ static int change_page_attr_set_clr(unsi
+@@ -817,6 +847,13 @@
else
cpa_flush_all(cache);
out:
cpa_fill_pool(NULL);
-@@ -906,11 +943,28 @@ int set_memory_ro(unsigned long addr, in
+@@ -906,10 +943,27 @@
{
return change_page_attr_clear(addr, numpages, __pgprot(_PAGE_RW));
}
int set_memory_rw(unsigned long addr, int numpages)
{
return change_page_attr_set(addr, numpages, __pgprot(_PAGE_RW));
- }
++}
+EXPORT_SYMBOL(set_memory_rw);
+
+/* hack: bypass kernel rodata section static_protections check. */
+ mutex_unlock(&lock);
+
+ return ret;
-+}
+ }
int set_memory_np(unsigned long addr, int numpages)
- {
-@@ -969,6 +1023,13 @@ int set_pages_rw(struct page *page, int
- return set_memory_rw(addr, numpages);
- }
+@@ -967,6 +1021,13 @@
+ unsigned long addr = (unsigned long)page_address(page);
+ return set_memory_rw(addr, numpages);
++}
++
+int set_pages_rw_force(struct page *page, int numpages)
+{
+ unsigned long addr = (unsigned long)page_address(page);
+
+ return set_memory_rw_force(addr, numpages);
-+}
-+
- #ifdef CONFIG_DEBUG_PAGEALLOC
+ }
- static int __set_pages_p(struct page *page, int numpages)
-diff -purN linux-2.6.27/arch/x86/mm/pat-xen.c linux-2.6.27.19-5.1/arch/x86/mm/pat-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/pat-xen.c 2009-03-25 16:10:44.000000000 +0000
+ #ifdef CONFIG_DEBUG_PAGEALLOC
+diff -r 9608d5473017 arch/x86/mm/pat-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/pat-xen.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,617 @@
+/*
+ * Handle caching attributes in page tables (PAT)
+late_initcall(pat_memtype_list_init);
+
+#endif /* CONFIG_DEBUG_FS */
-diff -purN linux-2.6.27/arch/x86/mm/pat.c linux-2.6.27.19-5.1/arch/x86/mm/pat.c
---- linux-2.6.27/arch/x86/mm/pat.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/pat.c 2009-03-25 16:10:44.000000000 +0000
-@@ -403,12 +403,16 @@ static inline int range_is_allowed(unsig
+diff -r 9608d5473017 arch/x86/mm/pat.c
+--- a/arch/x86/mm/pat.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/pat.c Wed May 06 16:56:11 2009 +0100
+@@ -403,11 +403,15 @@
return 1;
}
#else
u64 from = ((u64)pfn) << PAGE_SHIFT;
u64 to = from + size;
u64 cursor = from;
-
++
+ if (!pat_enabled)
+ return 1;
-+
+
while (cursor < to) {
if (!devmem_is_allowed(pfn)) {
- printk(KERN_INFO
-diff -purN linux-2.6.27/arch/x86/mm/pgtable-xen.c linux-2.6.27.19-5.1/arch/x86/mm/pgtable-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/pgtable-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/pgtable-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/pgtable-xen.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,854 @@
+#include <linux/mm.h>
+#include <linux/module.h>
+ set_pte_vaddr(address, pte);
+ fixmaps_set++;
+}
-diff -purN linux-2.6.27/arch/x86/mm/pgtable_32-xen.c linux-2.6.27.19-5.1/arch/x86/mm/pgtable_32-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/pgtable_32-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/pgtable_32-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/pgtable_32-xen.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,193 @@
+#include <linux/sched.h>
+#include <linux/kernel.h>
+ (unsigned long)va, pte_mkwrite(*pte), 0);
+ BUG_ON(rc);
+}
-diff -purN linux-2.6.27/arch/x86/mm/srat_64.c linux-2.6.27.19-5.1/arch/x86/mm/srat_64.c
---- linux-2.6.27/arch/x86/mm/srat_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/srat_64.c 2009-03-25 16:10:44.000000000 +0000
-@@ -138,7 +138,7 @@ acpi_numa_processor_affinity_init(struct
+diff -r 9608d5473017 arch/x86/mm/srat_64.c
+--- a/arch/x86/mm/srat_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/srat_64.c Wed May 06 16:56:11 2009 +0100
+@@ -138,7 +138,7 @@
return;
}
apic_id = (pa->apic_id << 8) | pa->local_sapic_eid;
else
apic_id = pa->apic_id;
-diff -purN linux-2.6.27/arch/x86/oprofile/Makefile linux-2.6.27.19-5.1/arch/x86/oprofile/Makefile
---- linux-2.6.27/arch/x86/oprofile/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/oprofile/Makefile 2009-03-25 16:10:44.000000000 +0000
-@@ -6,7 +6,14 @@ DRIVER_OBJS = $(addprefix ../../../drive
+diff -r 9608d5473017 arch/x86/oprofile/Makefile
+--- a/arch/x86/oprofile/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/oprofile/Makefile Wed May 06 16:56:11 2009 +0100
+@@ -6,7 +6,14 @@
oprofilefs.o oprofile_stats.o \
timer_int.o )
op_model_ppro.o op_model_p4.o
oprofile-$(CONFIG_X86_IO_APIC) += nmi_timer_int.o
+endif
-diff -purN linux-2.6.27/arch/x86/oprofile/nmi_int.c linux-2.6.27.19-5.1/arch/x86/oprofile/nmi_int.c
---- linux-2.6.27/arch/x86/oprofile/nmi_int.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/oprofile/nmi_int.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/oprofile/nmi_int.c
+--- a/arch/x86/oprofile/nmi_int.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/oprofile/nmi_int.c Wed May 06 16:56:11 2009 +0100
@@ -16,6 +16,7 @@
#include <linux/moduleparam.h>
#include <linux/kdebug.h>
#include <asm/nmi.h>
#include <asm/msr.h>
#include <asm/apic.h>
-@@ -217,12 +218,18 @@ static int nmi_setup(void)
+@@ -217,12 +218,18 @@
int err = 0;
int cpu;
return err;
}
-@@ -304,6 +311,7 @@ static void nmi_shutdown(void)
+@@ -304,6 +311,7 @@
model->shutdown(msrs);
free_msrs();
put_cpu_var(cpu_msrs);
}
static void nmi_cpu_start(void *dummy)
-diff -purN linux-2.6.27/arch/x86/oprofile/xenoprof.c linux-2.6.27.19-5.1/arch/x86/oprofile/xenoprof.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/oprofile/xenoprof.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/oprofile/xenoprof.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/oprofile/xenoprof.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,179 @@
+/**
+ * @file xenoprof.c
+{
+ xenoprofile_exit();
+}
-diff -purN linux-2.6.27/arch/x86/pci/Makefile linux-2.6.27.19-5.1/arch/x86/pci/Makefile
---- linux-2.6.27/arch/x86/pci/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/Makefile 2009-03-25 16:10:44.000000000 +0000
-@@ -4,6 +4,9 @@ obj-$(CONFIG_PCI_BIOS) += pcbios.o
+diff -r 9608d5473017 arch/x86/pci/Makefile
+--- a/arch/x86/pci/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/pci/Makefile Wed May 06 16:56:11 2009 +0100
+@@ -4,6 +4,9 @@
obj-$(CONFIG_PCI_MMCONFIG) += mmconfig_$(BITS).o direct.o mmconfig-shared.o
obj-$(CONFIG_PCI_DIRECT) += direct.o
obj-$(CONFIG_PCI_OLPC) += olpc.o
obj-y += fixup.o
obj-$(CONFIG_ACPI) += acpi.o
-diff -purN linux-2.6.27/arch/x86/pci/amd_bus.c linux-2.6.27.19-5.1/arch/x86/pci/amd_bus.c
---- linux-2.6.27/arch/x86/pci/amd_bus.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/amd_bus.c 2009-03-25 16:10:44.000000000 +0000
-@@ -607,6 +607,14 @@ static int __init pci_io_ecs_init(void)
+diff -r 9608d5473017 arch/x86/pci/amd_bus.c
+--- a/arch/x86/pci/amd_bus.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/pci/amd_bus.c Wed May 06 16:56:11 2009 +0100
+@@ -607,6 +607,14 @@
for_each_online_cpu(cpu)
amd_cpu_notify(&amd_cpu_notifier, (unsigned long)CPU_ONLINE,
(void *)(long)cpu);
pci_probe |= PCI_HAS_IO_ECS;
return 0;
-@@ -614,6 +622,10 @@ static int __init pci_io_ecs_init(void)
+@@ -614,6 +622,10 @@
static int __init amd_postcore_init(void)
{
if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
return 0;
-diff -purN linux-2.6.27/arch/x86/pci/common.c linux-2.6.27.19-5.1/arch/x86/pci/common.c
---- linux-2.6.27/arch/x86/pci/common.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/common.c 2009-03-25 16:10:44.000000000 +0000
-@@ -23,6 +23,12 @@ unsigned int pci_probe = PCI_PROBE_BIOS
+diff -r 9608d5473017 arch/x86/pci/common.c
+--- a/arch/x86/pci/common.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/pci/common.c Wed May 06 16:56:11 2009 +0100
+@@ -23,6 +23,12 @@
unsigned int pci_early_dump_regs;
static int pci_bf_sort;
int pci_routeirq;
int pcibios_last_bus = -1;
unsigned long pirq_table_addr;
struct pci_bus *pci_root_bus;
-@@ -519,6 +525,17 @@ char * __devinit pcibios_setup(char *st
+@@ -519,6 +525,17 @@
} else if (!strcmp(str, "skip_isa_align")) {
pci_probe |= PCI_CAN_SKIP_ISA_ALIGN;
return NULL;
}
return str;
}
-@@ -546,6 +563,14 @@ void pcibios_disable_device (struct pci_
+@@ -544,6 +561,14 @@
+ {
+ if (!dev->msi_enabled && pcibios_disable_irq)
pcibios_disable_irq(dev);
- }
-
++}
++
+int pci_ext_cfg_avail(struct pci_dev *dev)
+{
+ if (raw_pci_ext_ops)
+ return 1;
+ else
+ return 0;
-+}
-+
+ }
+
struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
- {
- struct pci_bus *bus = NULL;
-diff -purN linux-2.6.27/arch/x86/pci/fixup.c linux-2.6.27.19-5.1/arch/x86/pci/fixup.c
---- linux-2.6.27/arch/x86/pci/fixup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/fixup.c 2009-03-25 16:10:44.000000000 +0000
-@@ -496,18 +496,21 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_S
+diff -r 9608d5473017 arch/x86/pci/fixup.c
+--- a/arch/x86/pci/fixup.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/pci/fixup.c Wed May 06 16:56:11 2009 +0100
+@@ -496,18 +496,21 @@
pci_siemens_interrupt_controller);
/*
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1302, amd_cpu_pci_cfg_space_size);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1303, amd_cpu_pci_cfg_space_size);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1304, amd_cpu_pci_cfg_space_size);
-diff -purN linux-2.6.27/arch/x86/pci/i386.c linux-2.6.27.19-5.1/arch/x86/pci/i386.c
---- linux-2.6.27/arch/x86/pci/i386.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/i386.c 2009-03-25 16:10:44.000000000 +0000
-@@ -328,10 +328,14 @@ int pci_mmap_page_range(struct pci_dev *
+diff -r 9608d5473017 arch/x86/pci/i386.c
+--- a/arch/x86/pci/i386.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/pci/i386.c Wed May 06 16:56:11 2009 +0100
+@@ -328,10 +328,14 @@
flags = new_flags;
}
free_memtype(addr, addr + len);
return -EINVAL;
}
-diff -purN linux-2.6.27/arch/x86/pci/irq-xen.c linux-2.6.27.19-5.1/arch/x86/pci/irq-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/irq-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/pci/irq-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/pci/irq-xen.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,1273 @@
+/*
+ * Low-Level PCI Support for PC -- Routing of Interrupts
+ }
+ return 0;
+}
-diff -purN linux-2.6.27/arch/x86/pci/irq.c linux-2.6.27.19-5.1/arch/x86/pci/irq.c
---- linux-2.6.27/arch/x86/pci/irq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/irq.c 2009-03-25 16:10:44.000000000 +0000
-@@ -573,6 +573,7 @@ static __init int intel_router_probe(str
+diff -r 9608d5473017 arch/x86/pci/irq.c
+--- a/arch/x86/pci/irq.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/pci/irq.c Wed May 06 16:56:11 2009 +0100
+@@ -573,6 +573,7 @@
case PCI_DEVICE_ID_INTEL_ICH7_1:
case PCI_DEVICE_ID_INTEL_ICH7_30:
case PCI_DEVICE_ID_INTEL_ICH7_31:
case PCI_DEVICE_ID_INTEL_ESB2_0:
case PCI_DEVICE_ID_INTEL_ICH8_0:
case PCI_DEVICE_ID_INTEL_ICH8_1:
-@@ -590,13 +591,20 @@ static __init int intel_router_probe(str
+@@ -590,13 +591,20 @@
case PCI_DEVICE_ID_INTEL_ICH10_1:
case PCI_DEVICE_ID_INTEL_ICH10_2:
case PCI_DEVICE_ID_INTEL_ICH10_3:
return 0;
}
-diff -purN linux-2.6.27/arch/x86/pci/pcifront.c linux-2.6.27.19-5.1/arch/x86/pci/pcifront.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/pcifront.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/pci/pcifront.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/pci/pcifront.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,57 @@
+/*
+ * PCI Frontend Stub - puts some "dummy" functions in to the Linux x86 PCI core
+}
+
+arch_initcall(pcifront_x86_stub_init);
-diff -purN linux-2.6.27/arch/x86/perfmon/Kconfig linux-2.6.27.19-5.1/arch/x86/perfmon/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/Kconfig 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/Kconfig Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,89 @@
+menu "Hardware Performance Monitoring support"
+config PERFMON
+ Enables support for Athlon64/Opterton64 hardware performance counters.
+ Support for family 6, 15 and 16(10H) processors.
+endmenu
-diff -purN linux-2.6.27/arch/x86/perfmon/Makefile linux-2.6.27.19-5.1/arch/x86/perfmon/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/Makefile 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/Makefile Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,13 @@
+#
+# Copyright (c) 2005-2007 Hewlett-Packard Development Company, L.P.
+obj-$(CONFIG_X86_PERFMON_PEBS_CORE) += perfmon_pebs_core_smpl.o
+obj-$(CONFIG_X86_PERFMON_AMD64) += perfmon_amd64.o
+obj-$(CONFIG_X86_PERFMON_INTEL_ATOM) += perfmon_intel_atom.o
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,761 @@
+/*
+ * This file implements the X86 specific support for the perfmon2 interface
+ register_die_notifier(&pfm_nmi_nb);
+ return 0;
+}
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_amd64.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_amd64.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_amd64.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_amd64.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_amd64.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,754 @@
+/*
+ * This file contains the PMU description for the Athlon64 and Opteron64
+
+module_init(pfm_amd64_pmu_init_module);
+module_exit(pfm_amd64_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_intel_arch.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_intel_arch.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_intel_arch.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_intel_arch.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_intel_arch.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,610 @@
+/*
+ * This file contains the Intel architectural perfmon v1, v2, v3
+
+module_init(pfm_intel_arch_pmu_init_module);
+module_exit(pfm_intel_arch_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_intel_atom.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_intel_atom.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_intel_atom.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_intel_atom.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_intel_atom.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,541 @@
+/*
+ * perfmon support for Intel Atom (architectural perfmon v3 + PEBS)
+
+module_init(pfm_intel_atom_pmu_init_module);
+module_exit(pfm_intel_atom_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_intel_core.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_intel_core.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_intel_core.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_intel_core.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_intel_core.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,449 @@
+/*
+ * This file contains the Intel Core PMU registers description tables.
+
+module_init(pfm_core_pmu_init_module);
+module_exit(pfm_core_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_p4.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_p4.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_p4.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_p4.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_p4.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,913 @@
+/*
+ * This file contains the P4/Xeon PMU register description tables
+
+module_init(pfm_p4_pmu_init_module);
+module_exit(pfm_p4_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_p6.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_p6.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_p6.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_p6.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_p6.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,310 @@
+/*
+ * This file contains the P6 family processor PMU register description tables
+
+module_init(pfm_p6_pmu_init_module);
+module_exit(pfm_p6_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_pebs_core_smpl.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_pebs_core_smpl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_pebs_core_smpl.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_pebs_core_smpl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_pebs_core_smpl.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,256 @@
+/*
+ * Copyright (c) 2005-2007 Hewlett-Packard Development Company, L.P.
+
+module_init(pfm_pebs_core_fmt_init_module);
+module_exit(pfm_pebs_core_fmt_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_pebs_p4_smpl.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_pebs_p4_smpl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_pebs_p4_smpl.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_pebs_p4_smpl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_pebs_p4_smpl.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,253 @@
+/*
+ * Copyright (c) 2005-2007 Hewlett-Packard Development Company, L.P.
+
+module_init(pfm_pebs_p4_fmt_init_module);
+module_exit(pfm_pebs_p4_fmt_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/power/Makefile linux-2.6.27.19-5.1/arch/x86/power/Makefile
---- linux-2.6.27/arch/x86/power/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/power/Makefile 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/power/Makefile
+--- a/arch/x86/power/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/power/Makefile Wed May 06 16:56:11 2009 +0100
@@ -1,2 +1,4 @@
obj-$(CONFIG_PM_SLEEP) += cpu_$(BITS).o
obj-$(CONFIG_HIBERNATION) += hibernate_$(BITS).o hibernate_asm_$(BITS).o
+
+disabled-obj-$(CONFIG_XEN) := cpu_$(BITS).o
-diff -purN linux-2.6.27/arch/x86/power/cpu_32.c linux-2.6.27.19-5.1/arch/x86/power/cpu_32.c
---- linux-2.6.27/arch/x86/power/cpu_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/power/cpu_32.c 2009-03-25 16:10:44.000000000 +0000
-@@ -65,6 +65,7 @@ static void do_fpu_end(void)
+diff -r 9608d5473017 arch/x86/power/cpu_32.c
+--- a/arch/x86/power/cpu_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/power/cpu_32.c Wed May 06 16:56:11 2009 +0100
+@@ -65,6 +65,7 @@
static void fix_processor_context(void)
{
int cpu = smp_processor_id();
struct tss_struct *t = &per_cpu(init_tss, cpu);
-@@ -74,6 +75,7 @@ static void fix_processor_context(void)
+@@ -74,6 +75,7 @@
* 386 hardware has concept of busy TSS or some
* similar stupidity.
*/
load_TR_desc(); /* This does ltr */
load_LDT(¤t->active_mm->context); /* This does lldt */
-diff -purN linux-2.6.27/arch/x86/power/hibernate_32.c linux-2.6.27.19-5.1/arch/x86/power/hibernate_32.c
---- linux-2.6.27/arch/x86/power/hibernate_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/power/hibernate_32.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/power/hibernate_32.c
+--- a/arch/x86/power/hibernate_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/power/hibernate_32.c Wed May 06 16:56:11 2009 +0100
@@ -12,6 +12,7 @@
#include <asm/system.h>
#include <asm/page.h>
/* Defined in hibernate_asm_32.S */
extern int restore_image(void);
-@@ -127,6 +128,9 @@ static int resume_physical_mapping_init(
+@@ -127,6 +128,9 @@
}
}
}
return 0;
}
-diff -purN linux-2.6.27/arch/x86/vdso/Makefile linux-2.6.27.19-5.1/arch/x86/vdso/Makefile
---- linux-2.6.27/arch/x86/vdso/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/vdso/Makefile 2009-03-25 16:10:44.000000000 +0000
-@@ -65,6 +65,7 @@ obj-$(VDSO32-y) += vdso32-syms.lds
+diff -r 9608d5473017 arch/x86/vdso/Makefile
+--- a/arch/x86/vdso/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/vdso/Makefile Wed May 06 16:56:11 2009 +0100
+@@ -65,6 +65,7 @@
vdso32.so-$(VDSO32-y) += int80
vdso32.so-$(CONFIG_COMPAT) += syscall
vdso32.so-$(VDSO32-y) += sysenter
vdso32-images = $(vdso32.so-y:%=vdso32-%.so)
-diff -purN linux-2.6.27/arch/x86/vdso/vdso32/note.S linux-2.6.27.19-5.1/arch/x86/vdso/vdso32/note.S
---- linux-2.6.27/arch/x86/vdso/vdso32/note.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/vdso/vdso32/note.S 2009-03-25 16:10:44.000000000 +0000
-@@ -13,7 +13,7 @@ ELFNOTE_START(Linux, 0, "a")
- .long LINUX_VERSION_CODE
- ELFNOTE_END
-
--#ifdef CONFIG_XEN
-+#if defined(CONFIG_X86_XEN) || defined(CONFIG_PARAVIRT_XEN)
- /*
- * Add a special note telling glibc's dynamic linker a fake hardware
- * flavor that it will use to choose the search path for libraries in the
-@@ -37,8 +37,12 @@ ELFNOTE_END
-
- ELFNOTE_START(GNU, 2, "a")
- .long 1 /* ncaps */
-+#ifdef CONFIG_PARAVIRT_XEN
- VDSO32_NOTE_MASK: /* Symbol used by arch/x86/xen/setup.c */
- .long 0 /* mask */
-+#else
-+ .long 1 << VDSO_NOTE_NONEGSEG_BIT /* mask */
-+#endif
- .byte VDSO_NOTE_NONEGSEG_BIT; .asciz "nosegneg" /* bit, name */
- ELFNOTE_END
- #endif
-diff -purN linux-2.6.27/arch/x86/vdso/vdso32/syscall.S linux-2.6.27.19-5.1/arch/x86/vdso/vdso32/syscall.S
---- linux-2.6.27/arch/x86/vdso/vdso32/syscall.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/vdso/vdso32/syscall.S 2009-03-25 16:10:44.000000000 +0000
-@@ -19,8 +19,10 @@ __kernel_vsyscall:
- .Lpush_ebp:
- movl %ecx, %ebp
- syscall
-+#ifndef CONFIG_XEN
- movl $__USER32_DS, %ecx
- movl %ecx, %ss
-+#endif
- movl %ebp, %ecx
- popl %ebp
- .Lpop_ebp:
-diff -purN linux-2.6.27/arch/x86/vdso/vdso32-setup-xen.c linux-2.6.27.19-5.1/arch/x86/vdso/vdso32-setup-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/vdso/vdso32-setup-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/vdso/vdso32-setup-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/vdso/vdso32-setup-xen.c Wed May 06 16:56:11 2009 +0100
@@ -0,0 +1,482 @@
+/*
+ * (C) Copyright 2002 Linus Torvalds
+}
+
+#endif /* CONFIG_X86_64 */
-diff -purN linux-2.6.27/arch/x86/vdso/vdso32.S linux-2.6.27.19-5.1/arch/x86/vdso/vdso32.S
---- linux-2.6.27/arch/x86/vdso/vdso32.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/vdso/vdso32.S 2009-03-25 16:10:44.000000000 +0000
-@@ -9,7 +9,7 @@ vdso32_int80_end:
+diff -r 9608d5473017 arch/x86/vdso/vdso32.S
+--- a/arch/x86/vdso/vdso32.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/vdso/vdso32.S Wed May 06 16:56:11 2009 +0100
+@@ -9,7 +9,7 @@
.globl vdso32_syscall_start, vdso32_syscall_end
vdso32_syscall_start:
.incbin "arch/x86/vdso/vdso32-syscall.so"
#endif
vdso32_syscall_end:
-diff -purN linux-2.6.27/arch/x86/xen/Kconfig linux-2.6.27.19-5.1/arch/x86/xen/Kconfig
---- linux-2.6.27/arch/x86/xen/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/xen/Kconfig 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/vdso/vdso32/note.S
+--- a/arch/x86/vdso/vdso32/note.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/vdso/vdso32/note.S Wed May 06 16:56:11 2009 +0100
+@@ -13,7 +13,7 @@
+ .long LINUX_VERSION_CODE
+ ELFNOTE_END
+
+-#ifdef CONFIG_XEN
++#if defined(CONFIG_X86_XEN) || defined(CONFIG_PARAVIRT_XEN)
+ /*
+ * Add a special note telling glibc's dynamic linker a fake hardware
+ * flavor that it will use to choose the search path for libraries in the
+@@ -37,8 +37,12 @@
+
+ ELFNOTE_START(GNU, 2, "a")
+ .long 1 /* ncaps */
++#ifdef CONFIG_PARAVIRT_XEN
+ VDSO32_NOTE_MASK: /* Symbol used by arch/x86/xen/setup.c */
+ .long 0 /* mask */
++#else
++ .long 1 << VDSO_NOTE_NONEGSEG_BIT /* mask */
++#endif
+ .byte VDSO_NOTE_NONEGSEG_BIT; .asciz "nosegneg" /* bit, name */
+ ELFNOTE_END
+ #endif
+diff -r 9608d5473017 arch/x86/vdso/vdso32/syscall.S
+--- a/arch/x86/vdso/vdso32/syscall.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/vdso/vdso32/syscall.S Wed May 06 16:56:11 2009 +0100
+@@ -19,8 +19,10 @@
+ .Lpush_ebp:
+ movl %ecx, %ebp
+ syscall
++#ifndef CONFIG_XEN
+ movl $__USER32_DS, %ecx
+ movl %ecx, %ss
++#endif
+ movl %ebp, %ecx
+ popl %ebp
+ .Lpop_ebp:
+diff -r 9608d5473017 arch/x86/xen/Kconfig
+--- a/arch/x86/xen/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/xen/Kconfig Wed May 06 16:56:11 2009 +0100
@@ -2,7 +2,7 @@
# This Kconfig describes xen options
#
bool "Xen guest support"
select PARAVIRT
select PARAVIRT_CLOCK
-@@ -17,7 +17,7 @@ config XEN_MAX_DOMAIN_MEMORY
+@@ -17,7 +17,7 @@
int "Maximum allowed size of a domain in gigabytes"
default 8 if X86_32
default 32 if X86_64
help
The pseudo-physical to machine address array is sized
according to the maximum possible memory size of a Xen
-@@ -26,5 +26,5 @@ config XEN_MAX_DOMAIN_MEMORY
+@@ -26,5 +26,5 @@
config XEN_SAVE_RESTORE
bool
+ depends on PARAVIRT_XEN && PM
default y
\ No newline at end of file
-diff -purN linux-2.6.27/arch/x86/xen/enlighten.c linux-2.6.27.19-5.1/arch/x86/xen/enlighten.c
---- linux-2.6.27/arch/x86/xen/enlighten.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/xen/enlighten.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/xen/enlighten.c
+--- a/arch/x86/xen/enlighten.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/xen/enlighten.c Wed May 06 16:56:11 2009 +0100
@@ -36,6 +36,7 @@
#include <xen/hvc-console.h>
#include <asm/page.h>
#include <asm/xen/hypercall.h>
#include <asm/xen/hypervisor.h>
-@@ -580,16 +581,48 @@ static void xen_io_delay(void)
+@@ -580,16 +581,48 @@
}
#ifdef CONFIG_X86_LOCAL_APIC
#endif
static void xen_flush_tlb(void)
-@@ -1273,8 +1306,6 @@ static const struct pv_irq_ops xen_irq_o
+@@ -1273,8 +1306,6 @@
static const struct pv_apic_ops xen_apic_ops __initdata = {
#ifdef CONFIG_X86_LOCAL_APIC
.setup_boot_clock = paravirt_nop,
.setup_secondary_clock = paravirt_nop,
.startup_ipi_hook = paravirt_nop,
-@@ -1413,7 +1444,7 @@ static void __init xen_reserve_top(void)
+@@ -1413,7 +1444,7 @@
if (HYPERVISOR_xen_version(XENVER_platform_parameters, &pp) == 0)
top = pp.virt_start;
#endif /* CONFIG_X86_32 */
}
-@@ -1677,6 +1708,13 @@ asmlinkage void __init xen_start_kernel(
+@@ -1677,6 +1708,13 @@
pv_apic_ops = xen_apic_ops;
pv_mmu_ops = xen_mmu_ops;
if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) {
pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start;
pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit;
-diff -purN linux-2.6.27/arch/x86/xen/smp.c linux-2.6.27.19-5.1/arch/x86/xen/smp.c
---- linux-2.6.27/arch/x86/xen/smp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/xen/smp.c 2009-03-25 16:10:44.000000000 +0000
-@@ -157,7 +157,7 @@ static void __init xen_fill_possible_map
+diff -r 9608d5473017 arch/x86/xen/smp.c
+--- a/arch/x86/xen/smp.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/xen/smp.c Wed May 06 16:56:11 2009 +0100
+@@ -157,7 +157,7 @@
{
int i, rc;
rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL);
if (rc >= 0) {
num_processors++;
-@@ -195,7 +195,7 @@ static void __init xen_smp_prepare_cpus(
+@@ -195,7 +195,7 @@
/* Restrict the possible_map according to max_cpus. */
while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) {
continue;
cpu_clear(cpu, cpu_possible_map);
}
-@@ -361,24 +361,22 @@ static void xen_smp_send_reschedule(int
+@@ -361,24 +361,22 @@
xen_send_IPI_one(cpu, XEN_RESCHEDULE_VECTOR);
}
if (xen_vcpu_stolen(cpu)) {
HYPERVISOR_sched_op(SCHEDOP_yield, 0);
break;
-@@ -388,7 +386,8 @@ static void xen_smp_send_call_function_i
+@@ -388,7 +386,8 @@
static void xen_smp_send_call_function_single_ipi(int cpu)
{
}
static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id)
-diff -purN linux-2.6.27/arch/x86/xen/xen-head.S linux-2.6.27.19-5.1/arch/x86/xen/xen-head.S
---- linux-2.6.27/arch/x86/xen/xen-head.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/xen/xen-head.S 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/xen/xen-head.S
+--- a/arch/x86/xen/xen-head.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/xen/xen-head.S Wed May 06 16:56:11 2009 +0100
@@ -1,7 +1,7 @@
/* Xen-specific pieces of head.S, intended to be included in the right
place in head.S */
#include <linux/elfnote.h>
#include <linux/init.h>
-@@ -52,4 +52,4 @@ ENTRY(hypercall_page)
+@@ -52,4 +52,4 @@
ELFNOTE(Xen, XEN_ELFNOTE_HV_START_LOW, _ASM_PTR __HYPERVISOR_VIRT_START)
ELFNOTE(Xen, XEN_ELFNOTE_PADDR_OFFSET, _ASM_PTR 0)
-#endif /*CONFIG_XEN */
+#endif /* CONFIG_PARAVIRT_XEN */
-diff -purN linux-2.6.27/arch/xtensa/Kconfig linux-2.6.27.19-5.1/arch/xtensa/Kconfig
---- linux-2.6.27/arch/xtensa/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/xtensa/Kconfig 2009-03-25 16:10:47.000000000 +0000
-@@ -55,6 +55,7 @@ config HZ
+diff -r 9608d5473017 arch/xtensa/Kconfig
+--- a/arch/xtensa/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/xtensa/Kconfig Wed May 06 16:56:11 2009 +0100
+@@ -55,6 +55,7 @@
default 100
source "init/Kconfig"
menu "Processor type and features"
-diff -purN linux-2.6.27/block/Makefile linux-2.6.27.19-5.1/block/Makefile
---- linux-2.6.27/block/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/Makefile 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 block/Makefile
+--- a/block/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/block/Makefile Wed May 06 16:56:11 2009 +0100
@@ -4,8 +4,8 @@
obj-$(CONFIG_BLOCK) := elevator.o blk-core.o blk-tag.o blk-sysfs.o \
obj-$(CONFIG_BLK_DEV_BSG) += bsg.o
obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o
-diff -purN linux-2.6.27/block/as-iosched.c linux-2.6.27.19-5.1/block/as-iosched.c
---- linux-2.6.27/block/as-iosched.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/as-iosched.c 2009-03-25 16:11:42.000000000 +0000
-@@ -462,7 +462,7 @@ static void as_antic_stop(struct as_data
+diff -r 9608d5473017 block/as-iosched.c
+--- a/block/as-iosched.c Wed May 06 15:47:13 2009 +0100
++++ b/block/as-iosched.c Wed May 06 16:56:11 2009 +0100
+@@ -462,7 +462,7 @@
del_timer(&ad->antic_timer);
ad->antic_status = ANTIC_FINISHED;
/* see as_work_handler */
}
}
-@@ -483,7 +483,7 @@ static void as_antic_timeout(unsigned lo
+@@ -483,7 +483,7 @@
aic = ad->io_context->aic;
ad->antic_status = ANTIC_FINISHED;
if (aic->ttime_samples == 0) {
/* process anticipated on has exited or timed out*/
-@@ -844,7 +844,7 @@ static void as_completed_request(struct
+@@ -844,7 +844,7 @@
if (ad->changed_batch && ad->nr_dispatched == 1) {
ad->current_batch_expires = jiffies +
ad->batch_expire[ad->batch_data_dir];
ad->changed_batch = 0;
if (ad->batch_data_dir == REQ_SYNC)
-diff -purN linux-2.6.27/block/blk-barrier.c linux-2.6.27.19-5.1/block/blk-barrier.c
---- linux-2.6.27/block/blk-barrier.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-barrier.c 2009-03-25 16:11:42.000000000 +0000
-@@ -161,7 +161,7 @@ static inline struct request *start_orde
+diff -r 9608d5473017 block/blk-barrier.c
+--- a/block/blk-barrier.c Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-barrier.c Wed May 06 16:56:11 2009 +0100
+@@ -161,7 +161,7 @@
/*
* Prep proxy barrier request.
*/
q->orig_bar_rq = rq;
rq = &q->bar_rq;
blk_rq_init(q, rq);
-@@ -219,7 +219,7 @@ int blk_do_ordered(struct request_queue
+@@ -219,7 +219,7 @@
* This can happen when the queue switches to
* ORDERED_NONE while this request is on it.
*/
if (__blk_end_request(rq, -EOPNOTSUPP,
blk_rq_bytes(rq)))
BUG();
-@@ -315,3 +315,72 @@ int blkdev_issue_flush(struct block_devi
+@@ -315,3 +315,72 @@
return ret;
}
EXPORT_SYMBOL(blkdev_issue_flush);
+ return ret;
+}
+EXPORT_SYMBOL(blkdev_issue_discard);
-diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
---- linux-2.6.27/block/blk-core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-core.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 block/blk-core.c
+--- a/block/blk-core.c Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-core.c Wed May 06 16:56:11 2009 +0100
@@ -26,8 +26,6 @@
#include <linux/swap.h>
#include <linux/writeback.h>
#include <linux/blktrace_api.h>
#include <linux/fault-inject.h>
-@@ -50,8 +48,6 @@ struct kmem_cache *blk_requestq_cachep;
+@@ -49,8 +47,6 @@
+ * Controlling structure to kblockd
*/
static struct workqueue_struct *kblockd_workqueue;
-
--static DEFINE_PER_CPU(struct list_head, blk_cpu_done);
-
+-static DEFINE_PER_CPU(struct list_head, blk_cpu_done);
+
static void drive_stat_acct(struct request *rq, int new_io)
{
- struct hd_struct *part;
-@@ -113,7 +109,8 @@ void blk_rq_init(struct request_queue *q
+@@ -113,7 +109,8 @@
memset(rq, 0, sizeof(*rq));
INIT_LIST_HEAD(&rq->queuelist);
rq->q = q;
rq->sector = rq->hard_sector = (sector_t) -1;
INIT_HLIST_NODE(&rq->hash);
-@@ -141,6 +138,9 @@ static void req_bio_endio(struct request
+@@ -140,6 +137,9 @@
+ __func__, nbytes, bio->bi_size);
nbytes = bio->bi_size;
}
-
++
+ if (unlikely(rq->cmd_flags & REQ_QUIET))
+ set_bit(BIO_QUIET, &bio->bi_flags);
-+
+
bio->bi_size -= nbytes;
bio->bi_sector += (nbytes >> 9);
-
-@@ -308,7 +308,7 @@ void blk_unplug_timeout(unsigned long da
+@@ -308,7 +308,7 @@
blk_add_trace_pdu_int(q, BLK_TA_UNPLUG_TIMER, NULL,
q->rq.count[READ] + q->rq.count[WRITE]);
}
void blk_unplug(struct request_queue *q)
-@@ -325,6 +325,24 @@ void blk_unplug(struct request_queue *q)
+@@ -325,6 +325,24 @@
}
EXPORT_SYMBOL(blk_unplug);
/**
* blk_start_queue - restart a previously stopped queue
* @q: The &struct request_queue in question
-@@ -339,18 +357,7 @@ void blk_start_queue(struct request_queu
+@@ -339,18 +357,7 @@
WARN_ON(!irqs_disabled());
queue_flag_clear(QUEUE_FLAG_STOPPED, q);
}
EXPORT_SYMBOL(blk_start_queue);
-@@ -392,13 +399,19 @@ EXPORT_SYMBOL(blk_stop_queue);
+@@ -392,13 +399,19 @@
void blk_sync_queue(struct request_queue *q)
{
del_timer_sync(&q->unplug_timer);
*/
void __blk_run_queue(struct request_queue *q)
{
-@@ -408,21 +421,20 @@ void __blk_run_queue(struct request_queu
+@@ -408,21 +421,20 @@
* Only recurse once to avoid overrunning the stack, let the unplug
* handling reinvoke the handler shortly if we already got there.
*/
*/
void blk_run_queue(struct request_queue *q)
{
-@@ -441,6 +453,14 @@ void blk_put_queue(struct request_queue
+@@ -441,6 +453,14 @@
void blk_cleanup_queue(struct request_queue *q)
{
mutex_lock(&q->sysfs_lock);
queue_flag_set_unlocked(QUEUE_FLAG_DEAD, q);
mutex_unlock(&q->sysfs_lock);
-@@ -496,6 +516,9 @@ struct request_queue *blk_alloc_queue_no
+@@ -496,6 +516,9 @@
}
init_timer(&q->unplug_timer);
kobject_init(&q->kobj, &blk_queue_ktype);
-@@ -531,7 +554,7 @@ EXPORT_SYMBOL(blk_alloc_queue_node);
+@@ -531,7 +554,7 @@
* request queue; this lock will be taken also from interrupt context, so irq
* disabling is needed for it.
*
* it didn't succeed.
*
* Note:
-@@ -569,10 +592,11 @@ blk_init_queue_node(request_fn_proc *rfn
+@@ -569,10 +592,11 @@
q->request_fn = rfn;
q->prep_rq_fn = NULL;
q->unplug_fn = generic_unplug_device;
blk_queue_make_request(q, __make_request);
blk_queue_max_segment_size(q, MAX_SEGMENT_SIZE);
-@@ -624,10 +648,6 @@ blk_alloc_request(struct request_queue *
+@@ -624,10 +648,6 @@
blk_rq_init(q, rq);
rq->cmd_flags = rw | REQ_ALLOCED;
if (priv) {
-@@ -882,15 +902,18 @@ EXPORT_SYMBOL(blk_get_request);
+@@ -882,15 +902,18 @@
*
* This is basically a helper to remove the need to know whether a queue
* is plugged or not if someone just wants to initiate dispatch of requests
__generic_unplug_device(q);
}
EXPORT_SYMBOL(blk_start_queueing);
-@@ -907,6 +930,8 @@ EXPORT_SYMBOL(blk_start_queueing);
+@@ -907,6 +930,8 @@
*/
void blk_requeue_request(struct request_queue *q, struct request *rq)
{
blk_add_trace_rq(q, rq, BLK_TA_REQUEUE);
if (blk_rq_tagged(rq))
-@@ -917,7 +942,7 @@ void blk_requeue_request(struct request_
+@@ -917,7 +942,7 @@
EXPORT_SYMBOL(blk_requeue_request);
/**
* @q: request queue where request should be inserted
* @rq: request to be inserted
* @at_head: insert request at head or tail of queue
-@@ -927,8 +952,8 @@ EXPORT_SYMBOL(blk_requeue_request);
+@@ -927,8 +952,8 @@
* Many block devices need to execute commands asynchronously, so they don't
* block the whole kernel from preemption during request execution. This is
* accomplished normally by inserting aritficial requests tagged as
*
* We have the option of inserting the head or the tail of the queue.
* Typically we use the tail for new ioctls and so forth. We use the head
-@@ -1070,18 +1095,31 @@ EXPORT_SYMBOL(blk_put_request);
+@@ -1070,18 +1095,31 @@
void init_request_from_bio(struct request *req, struct bio *bio)
{
req->cmd_flags |= (REQ_HARDBARRIER | REQ_NOMERGE);
if (bio_sync(bio))
-@@ -1099,7 +1137,7 @@ void init_request_from_bio(struct reques
+@@ -1099,7 +1137,7 @@
static int __make_request(struct request_queue *q, struct bio *bio)
{
struct request *req;
const unsigned short prio = bio_prio(bio);
const int sync = bio_sync(bio);
int rw_flags;
-@@ -1114,7 +1152,14 @@ static int __make_request(struct request
+@@ -1114,7 +1152,14 @@
blk_queue_bounce(q, &bio);
barrier = bio_barrier(bio);
err = -EOPNOTSUPP;
goto end_io;
}
-@@ -1138,6 +1183,8 @@ static int __make_request(struct request
+@@ -1138,6 +1183,8 @@
req->biotail = bio;
req->nr_sectors = req->hard_nr_sectors += nr_sectors;
req->ioprio = ioprio_best(req->ioprio, prio);
drive_stat_acct(req, 0);
if (!attempt_back_merge(q, req))
elv_merged_request(q, req, el_ret);
-@@ -1165,6 +1212,8 @@ static int __make_request(struct request
+@@ -1165,6 +1212,8 @@
req->sector = req->hard_sector = bio->bi_sector;
req->nr_sectors = req->hard_nr_sectors += nr_sectors;
req->ioprio = ioprio_best(req->ioprio, prio);
drive_stat_acct(req, 0);
if (!attempt_front_merge(q, req))
elv_merged_request(q, req, el_ret);
-@@ -1200,13 +1249,15 @@ get_rq:
+@@ -1200,13 +1249,15 @@
init_request_from_bio(req, bio);
spin_lock_irq(q->queue_lock);
spin_unlock_irq(q->queue_lock);
return 0;
-@@ -1314,7 +1365,7 @@ static inline int bio_check_eod(struct b
+@@ -1314,7 +1365,7 @@
}
/**
* @bio: The bio describing the location in memory and on the device.
*
* generic_make_request() is used to make I/O requests of block
-@@ -1409,7 +1460,8 @@ end_io:
+@@ -1409,7 +1460,8 @@
if (bio_check_eod(bio, nr_sectors))
goto end_io;
err = -EOPNOTSUPP;
goto end_io;
}
-@@ -1471,13 +1523,13 @@ void generic_make_request(struct bio *bi
+@@ -1471,13 +1523,13 @@
EXPORT_SYMBOL(generic_make_request);
/**
*
*/
void submit_bio(int rw, struct bio *bio)
-@@ -1490,11 +1542,7 @@ void submit_bio(int rw, struct bio *bio)
+@@ -1490,11 +1542,7 @@
* If it's a regular read/write or a barrier with data attached,
* go through the normal accounting stuff before submission.
*/
if (rw & WRITE) {
count_vm_events(PGPGOUT, count);
} else {
-@@ -1517,9 +1565,112 @@ void submit_bio(int rw, struct bio *bio)
+@@ -1517,9 +1565,112 @@
EXPORT_SYMBOL(submit_bio);
/**
* @nr_bytes: number of bytes to complete
*
* Description:
-@@ -1527,8 +1678,8 @@ EXPORT_SYMBOL(submit_bio);
+@@ -1527,8 +1678,8 @@
* for the next range of segments (if any) in the cluster.
*
* Return:
**/
static int __end_that_request_first(struct request *req, int error,
int nr_bytes)
-@@ -1539,7 +1690,7 @@ static int __end_that_request_first(stru
+@@ -1539,7 +1690,7 @@
blk_add_trace_rq(req->q, req, BLK_TA_COMPLETE);
/*
* sense key with us all the way through
*/
if (!blk_pc_request(req))
-@@ -1641,82 +1792,6 @@ static int __end_that_request_first(stru
+@@ -1641,82 +1792,6 @@
}
/*
* queue lock must be held
*/
static void end_that_request_last(struct request *req, int error)
-@@ -1727,11 +1802,13 @@ static void end_that_request_last(struct
+@@ -1727,10 +1802,12 @@
blk_queue_end_tag(req->q, req);
if (blk_queued_rq(req))
if (unlikely(laptop_mode) && blk_fs_request(req))
laptop_io_completion();
-
-+ blk_delete_timer(req);
+
++ blk_delete_timer(req);
+
/*
* Account IO completion. bar_rq isn't accounted as a normal
- * IO on queueing nor completion. Accounting the containing
-@@ -1805,11 +1882,11 @@ EXPORT_SYMBOL_GPL(blk_rq_cur_bytes);
+@@ -1805,11 +1882,11 @@
/**
* end_queued_request - end all I/O on a queued request
* @rq: the request being processed
* the request attached to the block layer.
*
**/
-@@ -1822,7 +1899,7 @@ EXPORT_SYMBOL(end_queued_request);
+@@ -1822,7 +1899,7 @@
/**
* end_dequeued_request - end all I/O on a dequeued request
* @rq: the request being processed
*
* Description:
* Ends all I/O on a request. The request must already have been
-@@ -1840,14 +1917,14 @@ EXPORT_SYMBOL(end_dequeued_request);
+@@ -1840,14 +1917,14 @@
/**
* end_request - end I/O on the current segment of the request
* @req: the request being processed
* they have a residual value to account for. For that case this function
* isn't really useful, unless the residual just happens to be the
* full current segment. In other words, don't use this function in new
-@@ -1862,15 +1939,31 @@ void end_request(struct request *req, in
+@@ -1862,15 +1939,31 @@
}
EXPORT_SYMBOL(end_request);
* completion of the request.
*
* Description:
-@@ -1878,8 +1971,8 @@ EXPORT_SYMBOL(end_request);
+@@ -1878,8 +1971,8 @@
* If @rq has leftover, sets it up for the next range of segments.
*
* Return:
**/
static int blk_end_io(struct request *rq, int error, unsigned int nr_bytes,
unsigned int bidi_bytes,
-@@ -1888,15 +1981,8 @@ static int blk_end_io(struct request *rq
+@@ -1888,15 +1981,8 @@
struct request_queue *q = rq->q;
unsigned long flags = 0UL;
/* Special feature for tricky drivers */
if (drv_callback && drv_callback(rq))
-@@ -1914,7 +2000,7 @@ static int blk_end_io(struct request *rq
+@@ -1914,7 +2000,7 @@
/**
* blk_end_request - Helper function for drivers to complete the request.
* @rq: the request being processed
* @nr_bytes: number of bytes to complete
*
* Description:
-@@ -1922,8 +2008,8 @@ static int blk_end_io(struct request *rq
+@@ -1922,8 +2008,8 @@
* If @rq has leftover, sets it up for the next range of segments.
*
* Return:
**/
int blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
{
-@@ -1934,22 +2020,20 @@ EXPORT_SYMBOL_GPL(blk_end_request);
+@@ -1934,22 +2020,20 @@
/**
* __blk_end_request - Helper function for drivers to complete the request.
* @rq: the request being processed
add_disk_randomness(rq->rq_disk);
-@@ -1962,7 +2046,7 @@ EXPORT_SYMBOL_GPL(__blk_end_request);
+@@ -1962,7 +2046,7 @@
/**
* blk_end_bidi_request - Helper function for drivers to complete bidi request.
* @rq: the bidi request being processed
* @nr_bytes: number of bytes to complete @rq
* @bidi_bytes: number of bytes to complete @rq->next_rq
*
-@@ -1970,8 +2054,8 @@ EXPORT_SYMBOL_GPL(__blk_end_request);
+@@ -1970,8 +2054,8 @@
* Ends I/O on a number of bytes attached to @rq and @rq->next_rq.
*
* Return:
**/
int blk_end_bidi_request(struct request *rq, int error, unsigned int nr_bytes,
unsigned int bidi_bytes)
-@@ -1981,13 +2065,43 @@ int blk_end_bidi_request(struct request
+@@ -1981,13 +2065,43 @@
EXPORT_SYMBOL_GPL(blk_end_bidi_request);
/**
* completion of the request.
*
* Description:
-@@ -2000,10 +2114,10 @@ EXPORT_SYMBOL_GPL(blk_end_bidi_request);
+@@ -2000,10 +2114,10 @@
* Don't use this interface in other places anymore.
*
* Return:
**/
int blk_end_request_callback(struct request *rq, int error,
unsigned int nr_bytes,
-@@ -2016,15 +2130,17 @@ EXPORT_SYMBOL_GPL(blk_end_request_callba
+@@ -2016,15 +2130,17 @@
void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
struct bio *bio)
{
rq->data_len = bio->bi_size;
rq->bio = rq->biotail = bio;
-@@ -2033,7 +2149,35 @@ void blk_rq_bio_prep(struct request_queu
+@@ -2033,7 +2149,35 @@
rq->rq_disk = bio->bi_bdev->bd_disk;
}
{
return queue_work(kblockd_workqueue, work);
}
-@@ -2047,8 +2191,6 @@ EXPORT_SYMBOL(kblockd_flush_work);
+@@ -2047,8 +2191,6 @@
int __init blk_dev_init(void)
{
kblockd_workqueue = create_workqueue("kblockd");
if (!kblockd_workqueue)
panic("Failed to create kblockd\n");
-@@ -2059,12 +2201,6 @@ int __init blk_dev_init(void)
+@@ -2059,12 +2201,6 @@
blk_requestq_cachep = kmem_cache_create("blkdev_queue",
sizeof(struct request_queue), 0, SLAB_PANIC, NULL);
return 0;
}
-diff -purN linux-2.6.27/block/blk-exec.c linux-2.6.27.19-5.1/block/blk-exec.c
---- linux-2.6.27/block/blk-exec.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-exec.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 block/blk-exec.c
+--- a/block/blk-exec.c Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-exec.c Wed May 06 16:56:11 2009 +0100
@@ -16,7 +16,7 @@
/**
* blk_end_sync_rq - executes a completion event on a request
*/
static void blk_end_sync_rq(struct request *rq, int error)
{
-@@ -41,7 +41,7 @@ static void blk_end_sync_rq(struct reque
+@@ -41,7 +41,7 @@
* @done: I/O completion handler
*
* Description:
* for execution. Don't wait for completion.
*/
void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
-@@ -72,7 +72,7 @@ EXPORT_SYMBOL_GPL(blk_execute_rq_nowait)
+@@ -72,7 +72,7 @@
* @at_head: insert request at head or tail of queue
*
* Description:
* for execution and wait for completion.
*/
int blk_execute_rq(struct request_queue *q, struct gendisk *bd_disk,
-diff -purN linux-2.6.27/block/blk-integrity.c linux-2.6.27.19-5.1/block/blk-integrity.c
---- linux-2.6.27/block/blk-integrity.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-integrity.c 2009-03-25 16:11:42.000000000 +0000
-@@ -108,51 +108,51 @@ new_segment:
+diff -r 9608d5473017 block/blk-integrity.c
+--- a/block/blk-integrity.c Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-integrity.c Wed May 06 16:56:11 2009 +0100
+@@ -108,51 +108,51 @@
EXPORT_SYMBOL(blk_rq_map_integrity_sg);
/**
b1->name, b2->name);
return -1;
}
-@@ -375,7 +375,7 @@ void blk_integrity_unregister(struct gen
+@@ -375,7 +375,7 @@
kobject_uevent(&bi->kobj, KOBJ_REMOVE);
kobject_del(&bi->kobj);
+ disk->integrity = NULL;
}
EXPORT_SYMBOL(blk_integrity_unregister);
-diff -purN linux-2.6.27/block/blk-map.c linux-2.6.27.19-5.1/block/blk-map.c
---- linux-2.6.27/block/blk-map.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-map.c 2009-03-25 16:11:42.000000000 +0000
-@@ -85,17 +85,17 @@ static int __blk_rq_map_user(struct requ
+diff -r 9608d5473017 block/blk-map.c
+--- a/block/blk-map.c Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-map.c Wed May 06 16:56:11 2009 +0100
+@@ -85,17 +85,17 @@
}
/**
* still in process context.
*
* Note: The mapped bio may need to be bounced through blk_queue_bounce()
-@@ -154,7 +154,7 @@ unmap_rq:
+@@ -154,7 +154,7 @@
EXPORT_SYMBOL(blk_rq_map_user);
/**
* @q: request queue where request should be inserted
* @rq: request to map data to
* @iov: pointer to the iovec
-@@ -162,10 +162,10 @@ EXPORT_SYMBOL(blk_rq_map_user);
+@@ -162,10 +162,10 @@
* @len: I/O byte count
*
* Description:
* still in process context.
*
* Note: The mapped bio may need to be bounced through blk_queue_bounce()
-@@ -202,6 +202,12 @@ int blk_rq_map_user_iov(struct request_q
+@@ -202,6 +202,12 @@
return PTR_ERR(bio);
if (bio->bi_size != len) {
bio_endio(bio, 0);
bio_unmap_user(bio);
return -EINVAL;
-@@ -224,7 +230,7 @@ int blk_rq_map_user_iov(struct request_q
+@@ -224,7 +230,7 @@
* Description:
* Unmap a rq previously mapped by blk_rq_map_user(). The caller must
* supply the original rq->bio from the blk_rq_map_user() return, since
*/
int blk_rq_unmap_user(struct bio *bio)
{
-@@ -250,7 +256,7 @@ int blk_rq_unmap_user(struct bio *bio)
+@@ -250,7 +256,7 @@
EXPORT_SYMBOL(blk_rq_unmap_user);
/**
* @q: request queue where request should be inserted
* @rq: request to fill
* @kbuf: the kernel buffer
-diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
---- linux-2.6.27/block/blk-merge.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-merge.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 block/blk-merge.c
+--- a/block/blk-merge.c Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-merge.c Wed May 06 16:56:11 2009 +0100
@@ -11,7 +11,7 @@
void blk_recalc_rq_sectors(struct request *rq, int nsect)
rq->hard_sector += nsect;
rq->hard_nr_sectors -= nsect;
-@@ -41,12 +41,9 @@ void blk_recalc_rq_sectors(struct reques
+@@ -41,12 +41,9 @@
void blk_recalc_rq_segments(struct request *rq)
{
int nr_phys_segs;
int cluster;
struct req_iterator iter;
int high, highprv = 1;
-@@ -56,8 +53,8 @@ void blk_recalc_rq_segments(struct reque
+@@ -56,8 +53,8 @@
return;
cluster = test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags);
rq_for_each_segment(bv, rq, iter) {
/*
* the trick here is making sure that a high page is never
-@@ -66,7 +63,7 @@ void blk_recalc_rq_segments(struct reque
+@@ -66,7 +63,7 @@
*/
high = page_to_pfn(bv->bv_page) > q->bounce_pfn;
if (high || highprv)
if (cluster) {
if (seg_size + bv->bv_len > q->max_segment_size)
goto new_segment;
-@@ -74,26 +71,14 @@ void blk_recalc_rq_segments(struct reque
+@@ -74,26 +71,14 @@
goto new_segment;
if (!BIOVEC_SEG_BOUNDARY(q, bvprv, bv))
goto new_segment;
nr_phys_segs++;
bvprv = bv;
-@@ -101,13 +86,11 @@ new_hw_segment:
+@@ -101,13 +86,11 @@
highprv = high;
}
}
void blk_recount_segments(struct request_queue *q, struct bio *bio)
-@@ -120,7 +103,6 @@ void blk_recount_segments(struct request
+@@ -120,7 +103,6 @@
blk_recalc_rq_segments(&rq);
bio->bi_next = nxt;
bio->bi_phys_segments = rq.nr_phys_segments;
bio->bi_flags |= (1 << BIO_SEG_VALID);
}
EXPORT_SYMBOL(blk_recount_segments);
-@@ -131,13 +113,18 @@ static int blk_phys_contig_segment(struc
+@@ -131,35 +113,24 @@
if (!test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags))
return 0;
-- if (!BIOVEC_PHYS_MERGEABLE(__BVEC_END(bio), __BVEC_START(nxt)))
+ if (bio->bi_seg_back_size + nxt->bi_seg_front_size >
+ q->max_segment_size)
- return 0;
-- if (bio->bi_size + nxt->bi_size > q->max_segment_size)
++ return 0;
+
+ if (!bio_has_data(bio))
+ return 1;
+
-+ if (!BIOVEC_PHYS_MERGEABLE(__BVEC_END(bio), __BVEC_START(nxt)))
+ if (!BIOVEC_PHYS_MERGEABLE(__BVEC_END(bio), __BVEC_START(nxt)))
+- return 0;
+- if (bio->bi_size + nxt->bi_size > q->max_segment_size)
return 0;
/*
* these two to be merged into one
*/
if (BIO_SEG_BOUNDARY(q, bio, nxt))
-@@ -146,22 +133,6 @@ static int blk_phys_contig_segment(struc
- return 0;
- }
+ return 1;
+ return 0;
+-}
+-
-static int blk_hw_contig_segment(struct request_queue *q, struct bio *bio,
- struct bio *nxt)
-{
- return 0;
-
- return 1;
--}
--
+ }
+
/*
- * map a request to scatterlist, return number of sg entries setup. Caller
- * must make sure sg can hold rq->nr_phys_segments entries
-@@ -275,10 +246,9 @@ static inline int ll_new_hw_segment(stru
+@@ -275,10 +246,9 @@
struct request *req,
struct bio *bio)
{
|| req->nr_phys_segments + nr_phys_segs > q->max_phys_segments) {
req->cmd_flags |= REQ_NOMERGE;
if (req == q->last_merge)
-@@ -290,7 +260,6 @@ static inline int ll_new_hw_segment(stru
+@@ -290,7 +260,6 @@
* This will form the start of a new hw segment. Bump both
* counters.
*/
req->nr_phys_segments += nr_phys_segs;
return 1;
}
-@@ -299,7 +268,6 @@ int ll_back_merge_fn(struct request_queu
+@@ -299,7 +268,6 @@
struct bio *bio)
{
unsigned short max_sectors;
if (unlikely(blk_pc_request(req)))
max_sectors = q->max_hw_sectors;
-@@ -316,19 +284,6 @@ int ll_back_merge_fn(struct request_queu
+@@ -316,19 +284,6 @@
blk_recount_segments(q, req->biotail);
if (!bio_flagged(bio, BIO_SEG_VALID))
blk_recount_segments(q, bio);
return ll_new_hw_segment(q, req, bio);
}
-@@ -337,7 +292,6 @@ int ll_front_merge_fn(struct request_que
+@@ -337,7 +292,6 @@
struct bio *bio)
{
unsigned short max_sectors;
if (unlikely(blk_pc_request(req)))
max_sectors = q->max_hw_sectors;
-@@ -351,23 +305,10 @@ int ll_front_merge_fn(struct request_que
+@@ -351,23 +305,10 @@
q->last_merge = NULL;
return 0;
}
return ll_new_hw_segment(q, req, bio);
}
-@@ -376,7 +317,8 @@ static int ll_merge_requests_fn(struct r
+@@ -376,7 +317,8 @@
struct request *next)
{
int total_phys_segments;
/*
* First check if the either of the requests are re-queued
-@@ -392,32 +334,22 @@ static int ll_merge_requests_fn(struct r
+@@ -392,32 +334,22 @@
return 0;
total_phys_segments = req->nr_phys_segments + next->nr_phys_segments;
return 1;
}
-@@ -481,6 +413,8 @@ static int attempt_merge(struct request_
+@@ -481,6 +413,8 @@
}
req->ioprio = ioprio_best(req->ioprio, next->ioprio);
__blk_put_request(q, next);
return 1;
-diff -purN linux-2.6.27/block/blk-settings.c linux-2.6.27.19-5.1/block/blk-settings.c
---- linux-2.6.27/block/blk-settings.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-settings.c 2009-03-25 16:11:42.000000000 +0000
-@@ -33,6 +33,23 @@ void blk_queue_prep_rq(struct request_qu
+diff -r 9608d5473017 block/blk-settings.c
+--- a/block/blk-settings.c Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-settings.c Wed May 06 16:56:11 2009 +0100
+@@ -33,6 +33,23 @@
EXPORT_SYMBOL(blk_queue_prep_rq);
/**
* blk_queue_merge_bvec - set a merge_bvec function for queue
* @q: queue
* @mbfn: merge_bvec_fn
-@@ -60,6 +77,24 @@ void blk_queue_softirq_done(struct reque
+@@ -59,6 +76,24 @@
+ q->softirq_done_fn = fn;
}
EXPORT_SYMBOL(blk_queue_softirq_done);
-
++
+void blk_queue_rq_timeout(struct request_queue *q, unsigned int timeout)
+{
+ q->rq_timeout = timeout;
+ q->lld_busy_fn = fn;
+}
+EXPORT_SYMBOL_GPL(blk_queue_lld_busy);
-+
+
/**
* blk_queue_make_request - define an alternate make_request function for a device
- * @q: the request queue for the device to be affected
-@@ -90,6 +125,9 @@ void blk_queue_make_request(struct reque
+@@ -90,6 +125,9 @@
q->nr_requests = BLKDEV_MAX_RQ;
blk_queue_max_phys_segments(q, MAX_PHYS_SEGMENTS);
blk_queue_max_hw_segments(q, MAX_HW_SEGMENTS);
q->make_request_fn = mfn;
q->backing_dev_info.ra_pages =
(VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE;
-@@ -106,8 +144,6 @@ void blk_queue_make_request(struct reque
+@@ -105,8 +143,6 @@
+ q->unplug_delay = (3 * HZ) / 1000; /* 3 milliseconds */
if (q->unplug_delay == 0)
q->unplug_delay = 1;
-
-- INIT_WORK(&q->unplug_work, blk_unplug_work);
-
+- INIT_WORK(&q->unplug_work, blk_unplug_work);
+
q->unplug_timer.function = blk_unplug_timeout;
q->unplug_timer.data = (unsigned long)q;
-
-@@ -127,7 +163,7 @@ EXPORT_SYMBOL(blk_queue_make_request);
+@@ -127,7 +163,7 @@
* Different hardware can have different requirements as to what pages
* it can do I/O directly to. A low level driver can call
* blk_queue_bounce_limit to have lower memory pages allocated as bounce
**/
void blk_queue_bounce_limit(struct request_queue *q, u64 dma_addr)
{
-@@ -212,7 +248,7 @@ EXPORT_SYMBOL(blk_queue_max_phys_segment
+@@ -212,7 +248,7 @@
* Description:
* Enables a low level driver to set an upper limit on the number of
* hw data segments in a request. This would be the largest number of
* to the device.
**/
void blk_queue_max_hw_segments(struct request_queue *q,
-@@ -281,6 +317,7 @@ void blk_queue_stack_limits(struct reque
+@@ -281,6 +317,7 @@
/* zero is "infinity" */
t->max_sectors = min_not_zero(t->max_sectors, b->max_sectors);
t->max_hw_sectors = min_not_zero(t->max_hw_sectors, b->max_hw_sectors);
t->max_phys_segments = min(t->max_phys_segments, b->max_phys_segments);
t->max_hw_segments = min(t->max_hw_segments, b->max_hw_segments);
-@@ -393,7 +430,7 @@ EXPORT_SYMBOL(blk_queue_segment_boundary
+@@ -393,7 +430,7 @@
* @mask: alignment mask
*
* description:
* this is used when buiding direct io requests for the queue.
*
**/
-@@ -409,7 +446,7 @@ EXPORT_SYMBOL(blk_queue_dma_alignment);
+@@ -409,7 +446,7 @@
* @mask: alignment mask
*
* description:
* If the requested alignment is larger than the current alignment, then
* the current queue alignment is updated to the new value, otherwise it
* is left alone. The design of this is to allow multiple objects
-@@ -426,7 +463,7 @@ void blk_queue_update_dma_alignment(stru
+@@ -426,7 +463,7 @@
}
EXPORT_SYMBOL(blk_queue_update_dma_alignment);
{
blk_max_low_pfn = max_low_pfn - 1;
blk_max_pfn = max_pfn - 1;
-diff -purN linux-2.6.27/block/blk-softirq.c linux-2.6.27.19-5.1/block/blk-softirq.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-softirq.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 block/blk-softirq.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/block/blk-softirq.c Wed May 06 16:56:12 2009 +0100
@@ -0,0 +1,173 @@
+/*
+ * Functions related to softirq rq completions
+ return 0;
+}
+subsys_initcall(blk_softirq_init);
-diff -purN linux-2.6.27/block/blk-sysfs.c linux-2.6.27.19-5.1/block/blk-sysfs.c
---- linux-2.6.27/block/blk-sysfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-sysfs.c 2009-03-25 16:11:42.000000000 +0000
-@@ -156,6 +156,30 @@ static ssize_t queue_nomerges_store(stru
+diff -r 9608d5473017 block/blk-sysfs.c
+--- a/block/blk-sysfs.c Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-sysfs.c Wed May 06 16:56:12 2009 +0100
+@@ -156,6 +156,30 @@
return ret;
}
static struct queue_sysfs_entry queue_requests_entry = {
.attr = {.name = "nr_requests", .mode = S_IRUGO | S_IWUSR },
-@@ -197,6 +221,12 @@ static struct queue_sysfs_entry queue_no
+@@ -197,6 +221,12 @@
.store = queue_nomerges_store,
};
static struct attribute *default_attrs[] = {
&queue_requests_entry.attr,
&queue_ra_entry.attr,
-@@ -205,6 +235,7 @@ static struct attribute *default_attrs[]
+@@ -205,6 +235,7 @@
&queue_iosched_entry.attr,
&queue_hw_sector_size_entry.attr,
&queue_nomerges_entry.attr,
NULL,
};
-diff -purN linux-2.6.27/block/blk-tag.c linux-2.6.27.19-5.1/block/blk-tag.c
---- linux-2.6.27/block/blk-tag.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-tag.c 2009-03-25 16:11:42.000000000 +0000
-@@ -29,7 +29,7 @@ EXPORT_SYMBOL(blk_queue_find_tag);
+diff -r 9608d5473017 block/blk-tag.c
+--- a/block/blk-tag.c Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-tag.c Wed May 06 16:56:12 2009 +0100
+@@ -29,7 +29,7 @@
* __blk_free_tags - release a given set of tag maintenance info
* @bqt: the tag map to free
*
* actually freed and false if there are still references using it
*/
static int __blk_free_tags(struct blk_queue_tag *bqt)
-@@ -78,7 +78,7 @@ void __blk_queue_free_tags(struct reques
+@@ -78,7 +78,7 @@
* blk_free_tags - release a given set of tag maintenance info
* @bqt: the tag map to free
*
* function must guarantee to have released all the queues that
* might have been using this tag map.
*/
-@@ -94,7 +94,7 @@ EXPORT_SYMBOL(blk_free_tags);
+@@ -94,7 +94,7 @@
* @q: the request queue for the device
*
* Notes:
* queue in function.
**/
void blk_queue_free_tags(struct request_queue *q)
-@@ -271,7 +271,7 @@ EXPORT_SYMBOL(blk_queue_resize_tags);
+@@ -271,7 +271,7 @@
* @rq: the request that has completed
*
* Description:
* all transfers have been done for a request. It's important to call
* this function before end_that_request_last(), as that will put the
* request back on the free list thus corrupting the internal tag list.
-diff -purN linux-2.6.27/block/blk-timeout.c linux-2.6.27.19-5.1/block/blk-timeout.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-timeout.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 block/blk-timeout.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/block/blk-timeout.c Wed May 06 16:56:12 2009 +0100
@@ -0,0 +1,167 @@
+/*
+ * Functions related to generic timeout handling of requests.
+
+}
+EXPORT_SYMBOL_GPL(blk_abort_queue);
-diff -purN linux-2.6.27/block/blk.h linux-2.6.27.19-5.1/block/blk.h
---- linux-2.6.27/block/blk.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk.h 2009-03-25 16:11:42.000000000 +0000
-@@ -17,6 +17,30 @@ void __blk_queue_free_tags(struct reques
+diff -r 9608d5473017 block/blk.h
+--- a/block/blk.h Wed May 06 15:47:13 2009 +0100
++++ b/block/blk.h Wed May 06 16:56:12 2009 +0100
+@@ -17,6 +17,30 @@
void blk_unplug_work(struct work_struct *work);
void blk_unplug_timeout(unsigned long data);
struct io_context *current_io_context(gfp_t gfp_flags, int node);
-@@ -59,4 +83,16 @@ static inline int queue_congestion_off_t
+@@ -59,4 +83,16 @@
#endif /* BLK_DEV_INTEGRITY */
+ return first_cpu(per_cpu(cpu_sibling_map, cpu));
+#else
+ return cpu;
-+#endif
+ #endif
+}
+
- #endif
-diff -purN linux-2.6.27/block/blktrace.c linux-2.6.27.19-5.1/block/blktrace.c
---- linux-2.6.27/block/blktrace.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blktrace.c 2009-03-25 16:11:42.000000000 +0000
-@@ -111,23 +111,9 @@ static int act_log_check(struct blk_trac
++#endif
+diff -r 9608d5473017 block/blktrace.c
+--- a/block/blktrace.c Wed May 06 15:47:13 2009 +0100
++++ b/block/blktrace.c Wed May 06 16:56:12 2009 +0100
+@@ -111,23 +111,9 @@
*/
static u32 ddir_act[2] __read_mostly = { BLK_TC_ACT(BLK_TC_READ), BLK_TC_ACT(BLK_TC_WRITE) };
/*
* The worker for the various blk_add_trace*() types. Fills out a
-@@ -147,10 +133,11 @@ void __blk_add_trace(struct blk_trace *b
+@@ -147,10 +133,11 @@
return;
what |= ddir_act[rw & WRITE];
pid = tsk->pid;
if (unlikely(act_log_check(bt, what, sector, pid)))
-diff -purN linux-2.6.27/block/bsg.c linux-2.6.27.19-5.1/block/bsg.c
---- linux-2.6.27/block/bsg.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/bsg.c 2009-03-25 16:11:42.000000000 +0000
-@@ -202,6 +202,8 @@ static int blk_fill_sgv4_hdr_rq(struct r
+diff -r 9608d5473017 block/bsg.c
+--- a/block/bsg.c Wed May 06 15:47:13 2009 +0100
++++ b/block/bsg.c Wed May 06 16:56:12 2009 +0100
+@@ -202,6 +202,8 @@
rq->timeout = q->sg_timeout;
if (!rq->timeout)
rq->timeout = BLK_DEFAULT_SG_TIMEOUT;
return 0;
}
-diff -purN linux-2.6.27/block/cfq-iosched.c linux-2.6.27.19-5.1/block/cfq-iosched.c
---- linux-2.6.27/block/cfq-iosched.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/cfq-iosched.c 2009-03-25 16:11:42.000000000 +0000
-@@ -39,6 +39,7 @@ static int cfq_slice_idle = HZ / 125;
+diff -r 9608d5473017 block/cfq-iosched.c
+--- a/block/cfq-iosched.c Wed May 06 15:47:13 2009 +0100
++++ b/block/cfq-iosched.c Wed May 06 16:56:12 2009 +0100
+@@ -39,6 +39,7 @@
#define CFQ_MIN_TT (2)
#define CFQ_SLICE_SCALE (5)
#define RQ_CIC(rq) \
((struct cfq_io_context *) (rq)->elevator_private)
-@@ -86,7 +87,14 @@ struct cfq_data {
+@@ -86,7 +87,14 @@
int rq_in_driver;
int sync_flight;
/*
* idle window management
-@@ -244,7 +252,7 @@ static inline void cfq_schedule_dispatch
+@@ -244,7 +252,7 @@
{
if (cfqd->busy_queues) {
cfq_log(cfqd, "schedule dispatch");
}
}
-@@ -654,15 +662,6 @@ static void cfq_activate_request(struct
+@@ -654,15 +662,6 @@
cfq_log_cfqq(cfqd, RQ_CFQQ(rq), "activate rq, drv=%d",
cfqd->rq_in_driver);
cfqd->last_position = rq->hard_sector + rq->hard_nr_sectors;
}
-@@ -686,6 +685,7 @@ static void cfq_remove_request(struct re
+@@ -686,6 +685,7 @@
list_del_init(&rq->queuelist);
cfq_del_rq_rb(rq);
if (rq_is_meta(rq)) {
WARN_ON(!cfqq->meta_pending);
cfqq->meta_pending--;
-@@ -1310,7 +1310,15 @@ static void cfq_exit_single_io_context(s
+@@ -1310,7 +1310,15 @@
unsigned long flags;
spin_lock_irqsave(q->queue_lock, flags);
spin_unlock_irqrestore(q->queue_lock, flags);
}
}
-@@ -1833,6 +1841,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, s
+@@ -1833,6 +1841,7 @@
{
struct cfq_io_context *cic = RQ_CIC(rq);
if (rq_is_meta(rq))
cfqq->meta_pending++;
-@@ -1880,6 +1889,31 @@ static void cfq_insert_request(struct re
+@@ -1880,6 +1889,31 @@
cfq_rq_enqueued(cfqd, cfqq, rq);
}
static void cfq_completed_request(struct request_queue *q, struct request *rq)
{
struct cfq_queue *cfqq = RQ_CFQQ(rq);
-@@ -1890,6 +1924,8 @@ static void cfq_completed_request(struct
+@@ -1889,6 +1923,8 @@
+
now = jiffies;
cfq_log_cfqq(cfqd, cfqq, "complete");
-
-+ cfq_update_hw_tag(cfqd);
+
++ cfq_update_hw_tag(cfqd);
+
WARN_ON(!cfqd->rq_in_driver);
WARN_ON(!cfqq->dispatched);
- cfqd->rq_in_driver--;
-@@ -2200,6 +2236,7 @@ static void *cfq_init_queue(struct reque
+@@ -2200,6 +2236,7 @@
cfqd->cfq_slice[1] = cfq_slice_sync;
cfqd->cfq_slice_async_rq = cfq_slice_async_rq;
cfqd->cfq_slice_idle = cfq_slice_idle;
return cfqd;
}
-diff -purN linux-2.6.27/block/compat_ioctl.c linux-2.6.27.19-5.1/block/compat_ioctl.c
---- linux-2.6.27/block/compat_ioctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/compat_ioctl.c 2009-03-25 16:11:42.000000000 +0000
-@@ -788,6 +788,7 @@ long compat_blkdev_ioctl(struct file *fi
+diff -r 9608d5473017 block/compat_ioctl.c
+--- a/block/compat_ioctl.c Wed May 06 15:47:13 2009 +0100
++++ b/block/compat_ioctl.c Wed May 06 16:56:12 2009 +0100
+@@ -788,6 +788,7 @@
return compat_hdio_getgeo(disk, bdev, compat_ptr(arg));
case BLKFLSBUF:
case BLKROSET:
/*
* the ones below are implemented in blkdev_locked_ioctl,
* but we call blkdev_ioctl, which gets the lock for us
-diff -purN linux-2.6.27/block/deadline-iosched.c linux-2.6.27.19-5.1/block/deadline-iosched.c
---- linux-2.6.27/block/deadline-iosched.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/deadline-iosched.c 2009-03-25 16:11:42.000000000 +0000
-@@ -33,7 +33,7 @@ struct deadline_data {
+diff -r 9608d5473017 block/deadline-iosched.c
+--- a/block/deadline-iosched.c Wed May 06 15:47:13 2009 +0100
++++ b/block/deadline-iosched.c Wed May 06 16:56:12 2009 +0100
+@@ -33,7 +33,7 @@
*/
struct rb_root sort_list[2];
struct list_head fifo_list[2];
/*
* next in sort order. read, write or both are NULL
*/
-@@ -53,7 +53,11 @@ struct deadline_data {
+@@ -53,7 +53,11 @@
static void deadline_move_request(struct deadline_data *, struct request *);
/*
* get the request after `rq' in sector-sorted order
-@@ -72,15 +76,11 @@ deadline_latter_request(struct request *
+@@ -72,15 +76,11 @@
static void
deadline_add_rq_rb(struct deadline_data *dd, struct request *rq)
{
}
static inline void
-@@ -91,7 +91,7 @@ deadline_del_rq_rb(struct deadline_data
+@@ -91,7 +91,7 @@
if (dd->next_rq[data_dir] == rq)
dd->next_rq[data_dir] = deadline_latter_request(rq);
}
/*
-@@ -106,7 +106,7 @@ deadline_add_request(struct request_queu
+@@ -106,7 +106,7 @@
deadline_add_rq_rb(dd, rq);
/*
*/
rq_set_fifo_time(rq, jiffies + dd->fifo_expire[data_dir]);
list_add_tail(&rq->queuelist, &dd->fifo_list[data_dir]);
-@@ -162,7 +162,7 @@ static void deadline_merged_request(stru
+@@ -162,7 +162,7 @@
* if the merge was a front merge, we need to reposition request
*/
if (type == ELEVATOR_FRONT_MERGE) {
deadline_add_rq_rb(dd, req);
}
}
-@@ -212,7 +212,7 @@ deadline_move_request(struct deadline_da
+@@ -212,7 +212,7 @@
dd->next_rq[WRITE] = NULL;
dd->next_rq[data_dir] = deadline_latter_request(rq);
/*
* take it off the sort and fifo list, move
-@@ -222,7 +222,7 @@ deadline_move_request(struct deadline_da
+@@ -222,7 +222,7 @@
}
/*
* 1 otherwise. Requires !list_empty(&dd->fifo_list[data_dir])
*/
static inline int deadline_check_fifo(struct deadline_data *dd, int ddir)
-@@ -258,17 +258,9 @@ static int deadline_dispatch_requests(st
+@@ -258,17 +258,9 @@
else
rq = dd->next_rq[READ];
/*
* at this point we are not running a batch. select the appropriate
-diff -purN linux-2.6.27/block/elevator.c linux-2.6.27.19-5.1/block/elevator.c
---- linux-2.6.27/block/elevator.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/elevator.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 block/elevator.c
+--- a/block/elevator.c Wed May 06 15:47:13 2009 +0100
++++ b/block/elevator.c Wed May 06 16:56:12 2009 +0100
@@ -34,8 +34,9 @@
#include <linux/delay.h>
#include <linux/blktrace_api.h>
static DEFINE_SPINLOCK(elv_list_lock);
static LIST_HEAD(elv_list);
-@@ -75,6 +76,12 @@ int elv_rq_merge_ok(struct request *rq,
- return 0;
-
- /*
-+ * Don't merge file system requests and discard requests
-+ */
-+ if (bio_discard(bio) != bio_discard(rq->bio))
+@@ -72,6 +73,12 @@
+ int elv_rq_merge_ok(struct request *rq, struct bio *bio)
+ {
+ if (!rq_mergeable(rq))
+ return 0;
+
+ /*
- * different data direction or already started, don't merge
- */
- if (bio_data_dir(bio) != rq_data_dir(rq))
-@@ -438,6 +445,8 @@ void elv_dispatch_sort(struct request_qu
++ * Don't merge file system requests and discard requests
++ */
++ if (bio_discard(bio) != bio_discard(rq->bio))
+ return 0;
+
+ /*
+@@ -438,6 +445,8 @@
list_for_each_prev(entry, &q->queue_head) {
struct request *pos = list_entry_rq(entry);
if (rq_data_dir(rq) != rq_data_dir(pos))
break;
if (pos->cmd_flags & stop_flags)
-@@ -603,11 +612,11 @@ void elv_insert(struct request_queue *q,
+@@ -603,11 +612,11 @@
* processing.
*/
blk_remove_plug(q);
rq->cmd_flags |= REQ_SORTED;
q->nr_sorted++;
if (rq_mergeable(rq)) {
-@@ -692,7 +701,7 @@ void __elv_add_request(struct request_qu
+@@ -692,7 +701,7 @@
* this request is scheduling boundary, update
* end_sector
*/
q->end_sector = rq_end_sector(rq);
q->boundary_rq = rq;
}
-@@ -782,7 +791,6 @@ struct request *elv_next_request(struct
+@@ -782,7 +791,6 @@
* device can handle
*/
rq->nr_phys_segments++;
}
if (!q->prep_rq_fn)
-@@ -805,7 +813,6 @@ struct request *elv_next_request(struct
+@@ -805,7 +813,6 @@
* so that we don't add it again
*/
--rq->nr_phys_segments;
}
rq = NULL;
-@@ -838,7 +845,6 @@ void elv_dequeue_request(struct request_
+@@ -838,7 +845,6 @@
if (blk_account_rq(rq))
q->in_flight++;
}
int elv_queue_empty(struct request_queue *q)
{
-@@ -901,6 +907,19 @@ int elv_may_queue(struct request_queue *
+@@ -901,6 +907,19 @@
return ELV_MQUEUE_MAY;
}
void elv_completed_request(struct request_queue *q, struct request *rq)
{
elevator_t *e = q->elevator;
-@@ -924,7 +943,7 @@ void elv_completed_request(struct reques
+@@ -924,7 +943,7 @@
blk_ordered_cur_seq(q) == QUEUE_ORDSEQ_DRAIN &&
blk_ordered_req_seq(first_rq) > QUEUE_ORDSEQ_DRAIN) {
blk_ordered_complete_seq(q, QUEUE_ORDSEQ_DRAIN, 0);
}
}
}
-@@ -1083,8 +1102,7 @@ static int elevator_switch(struct reques
+@@ -1083,8 +1102,7 @@
elv_drain_elevator(q);
while (q->rq.elvpriv) {
spin_unlock_irq(q->queue_lock);
msleep(10);
spin_lock_irq(q->queue_lock);
-diff -purN linux-2.6.27/block/genhd.c linux-2.6.27.19-5.1/block/genhd.c
---- linux-2.6.27/block/genhd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/genhd.c 2009-03-25 16:11:42.000000000 +0000
-@@ -173,6 +173,18 @@ static int exact_lock(dev_t devt, void *
+diff -r 9608d5473017 block/genhd.c
+--- a/block/genhd.c Wed May 06 15:47:13 2009 +0100
++++ b/block/genhd.c Wed May 06 16:56:12 2009 +0100
+@@ -173,6 +173,18 @@
return 0;
}
/**
* add_disk - add partitioning information to kernel list
* @disk: per-device partitioning information
-@@ -186,6 +198,8 @@ void add_disk(struct gendisk *disk)
+@@ -186,6 +198,8 @@
int retval;
disk->flags |= GENHD_FL_UP;
blk_register_region(MKDEV(disk->major, disk->first_minor),
disk->minors, NULL, exact_match, exact_lock, disk);
register_disk(disk);
-@@ -211,10 +225,11 @@ void unlink_gendisk(struct gendisk *disk
+@@ -211,10 +225,11 @@
/**
* get_gendisk - get partitioning information for a given device
*/
struct gendisk *get_gendisk(dev_t devt, int *part)
{
-@@ -428,7 +443,27 @@ static ssize_t disk_range_show(struct de
+@@ -428,7 +443,27 @@
{
struct gendisk *disk = dev_to_disk(dev);
}
static ssize_t disk_removable_show(struct device *dev,
-@@ -518,7 +553,7 @@ static ssize_t disk_fail_store(struct de
+@@ -518,7 +553,7 @@
#endif
static DEVICE_ATTR(removable, S_IRUGO, disk_removable_show, NULL);
static DEVICE_ATTR(ro, S_IRUGO, disk_ro_show, NULL);
static DEVICE_ATTR(size, S_IRUGO, disk_size_show, NULL);
-@@ -812,6 +847,16 @@ void put_disk(struct gendisk *disk)
+@@ -812,6 +847,16 @@
EXPORT_SYMBOL(put_disk);
void set_device_ro(struct block_device *bdev, int flag)
{
if (bdev->bd_contains != bdev)
-@@ -825,6 +870,9 @@ EXPORT_SYMBOL(set_device_ro);
+@@ -825,6 +870,9 @@
void set_disk_ro(struct gendisk *disk, int flag)
{
int i;
disk->policy = flag;
for (i = 0; i < disk->minors - 1; i++)
if (disk->part[i]) disk->part[i]->policy = flag;
-diff -purN linux-2.6.27/block/ioctl.c linux-2.6.27.19-5.1/block/ioctl.c
---- linux-2.6.27/block/ioctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/ioctl.c 2009-03-25 16:11:42.000000000 +0000
-@@ -111,6 +111,69 @@ static int blkdev_reread_part(struct blo
+diff -r 9608d5473017 block/ioctl.c
+--- a/block/ioctl.c Wed May 06 15:47:13 2009 +0100
++++ b/block/ioctl.c Wed May 06 16:56:12 2009 +0100
+@@ -109,6 +109,69 @@
+ res = rescan_partitions(disk, bdev);
+ mutex_unlock(&bdev->bd_mutex);
return res;
- }
-
++}
++
+static void blk_ioc_discard_endio(struct bio *bio, int err)
+{
+ if (err) {
+ bio_put(bio);
+ }
+ return ret;
-+}
-+
+ }
+
static int put_ushort(unsigned long arg, unsigned short val)
- {
- return put_user(val, (unsigned short __user *)arg);
-@@ -258,6 +321,19 @@ int blkdev_ioctl(struct inode *inode, st
+@@ -258,6 +321,19 @@
set_device_ro(bdev, n);
unlock_kernel();
return 0;
case HDIO_GETGEO: {
struct hd_geometry geo;
-diff -purN linux-2.6.27/block/scsi_ioctl.c linux-2.6.27.19-5.1/block/scsi_ioctl.c
---- linux-2.6.27/block/scsi_ioctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/scsi_ioctl.c 2009-03-25 16:11:42.000000000 +0000
-@@ -208,6 +208,8 @@ static int blk_fill_sghdr_rq(struct requ
+diff -r 9608d5473017 block/scsi_ioctl.c
+--- a/block/scsi_ioctl.c Wed May 06 15:47:13 2009 +0100
++++ b/block/scsi_ioctl.c Wed May 06 16:56:12 2009 +0100
+@@ -208,6 +208,8 @@
rq->timeout = q->sg_timeout;
if (!rq->timeout)
rq->timeout = BLK_DEFAULT_SG_TIMEOUT;
return 0;
}
-diff -purN linux-2.6.27/crypto/async_tx/async_xor.c linux-2.6.27.19-5.1/crypto/async_tx/async_xor.c
---- linux-2.6.27/crypto/async_tx/async_xor.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/crypto/async_tx/async_xor.c 2009-03-25 16:11:40.000000000 +0000
-@@ -53,10 +53,17 @@ do_async_xor(struct dma_chan *chan, stru
+diff -r 9608d5473017 buildconfigs/Rules.mk
+--- a/buildconfigs/Rules.mk Wed May 06 15:47:13 2009 +0100
++++ b/buildconfigs/Rules.mk Wed May 06 16:56:12 2009 +0100
+@@ -2,7 +2,7 @@
+ XEN_TARGET_X86_PAE ?= y
+
+ LINUX_SERIES = 2.6
+-LINUX_VER = 2.6.27
++LINUX_VER = 2.6.27.19-5.1
+
+ EXTRAVERSION ?= xen
+
+diff -r 9608d5473017 crypto/async_tx/async_xor.c
+--- a/crypto/async_tx/async_xor.c Wed May 06 15:47:13 2009 +0100
++++ b/crypto/async_tx/async_xor.c Wed May 06 16:56:12 2009 +0100
+@@ -53,10 +53,17 @@
int xor_src_cnt;
dma_addr_t dma_dest;
while (src_cnt) {
async_flags = flags;
-diff -purN linux-2.6.27/crypto/authenc.c linux-2.6.27.19-5.1/crypto/authenc.c
---- linux-2.6.27/crypto/authenc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/crypto/authenc.c 2009-03-25 16:11:40.000000000 +0000
-@@ -157,16 +157,19 @@ static int crypto_authenc_genicv(struct
+diff -r 9608d5473017 crypto/authenc.c
+--- a/crypto/authenc.c Wed May 06 15:47:13 2009 +0100
++++ b/crypto/authenc.c Wed May 06 16:56:12 2009 +0100
+@@ -157,16 +157,19 @@
dstp = sg_page(dst);
vdst = PageHighMem(dstp) ? NULL : page_address(dstp) + dst->offset;
crypto_aead_authsize(authenc), 1);
return 0;
}
-@@ -284,11 +287,14 @@ static int crypto_authenc_iverify(struct
+@@ -284,11 +287,14 @@
srcp = sg_page(src);
vsrc = PageHighMem(srcp) ? NULL : page_address(srcp) + src->offset;
}
static int crypto_authenc_decrypt(struct aead_request *req)
-diff -purN linux-2.6.27/crypto/ccm.c linux-2.6.27.19-5.1/crypto/ccm.c
---- linux-2.6.27/crypto/ccm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/crypto/ccm.c 2009-03-25 16:11:40.000000000 +0000
-@@ -266,6 +266,8 @@ static int crypto_ccm_auth(struct aead_r
+diff -r 9608d5473017 crypto/ccm.c
+--- a/crypto/ccm.c Wed May 06 15:47:13 2009 +0100
++++ b/crypto/ccm.c Wed May 06 16:56:12 2009 +0100
+@@ -266,6 +266,8 @@
if (assoclen) {
pctx->ilen = format_adata(idata, assoclen);
get_data_to_compute(cipher, pctx, req->assoc, req->assoclen);
}
/* compute plaintext into mac */
-diff -purN linux-2.6.27/drivers/Kconfig linux-2.6.27.19-5.1/drivers/Kconfig
---- linux-2.6.27/drivers/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/Kconfig 2009-03-25 16:11:13.000000000 +0000
-@@ -101,4 +101,6 @@ source "drivers/auxdisplay/Kconfig"
+diff -r 9608d5473017 drivers/Kconfig
+--- a/drivers/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/Kconfig Wed May 06 16:56:12 2009 +0100
+@@ -101,4 +101,6 @@
source "drivers/uio/Kconfig"
source "drivers/xen/Kconfig"
+
+source "drivers/staging/Kconfig"
endmenu
-diff -purN linux-2.6.27/drivers/Makefile linux-2.6.27.19-5.1/drivers/Makefile
---- linux-2.6.27/drivers/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/Makefile 2009-03-25 16:11:20.000000000 +0000
-@@ -16,7 +16,7 @@ obj-$(CONFIG_ACPI) += acpi/
+diff -r 9608d5473017 drivers/Makefile
+--- a/drivers/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/Makefile Wed May 06 16:56:12 2009 +0100
+@@ -16,7 +16,7 @@
obj-$(CONFIG_PNP) += pnp/
obj-$(CONFIG_ARM_AMBA) += amba/
# char/ comes before serial/ etc so that the VT console is the boot-time
# default.
-@@ -37,9 +37,10 @@ obj-y += base/ block/ misc/ mfd/ net/
+@@ -37,9 +37,10 @@
obj-$(CONFIG_NUBUS) += nubus/
obj-$(CONFIG_ATM) += atm/
obj-y += macintosh/
obj-$(CONFIG_FUSION) += message/
obj-$(CONFIG_FIREWIRE) += firewire/
obj-y += ieee1394/
-@@ -99,3 +100,4 @@ obj-$(CONFIG_OF) += of/
+@@ -99,3 +100,4 @@
obj-$(CONFIG_SSB) += ssb/
obj-$(CONFIG_VIRTIO) += virtio/
obj-$(CONFIG_REGULATOR) += regulator/
+obj-$(CONFIG_STAGING) += staging/
-diff -purN linux-2.6.27/drivers/acpi/Kconfig linux-2.6.27.19-5.1/drivers/acpi/Kconfig
---- linux-2.6.27/drivers/acpi/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/Kconfig 2009-03-25 16:11:24.000000000 +0000
-@@ -162,14 +162,6 @@ config ACPI_DOCK
+diff -r 9608d5473017 drivers/acpi/Kconfig
+--- a/drivers/acpi/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/Kconfig Wed May 06 16:56:12 2009 +0100
+@@ -162,14 +162,6 @@
help
This driver adds support for ACPI controlled docking stations
config ACPI_PROCESSOR
tristate "Processor"
select THERMAL
-@@ -301,6 +293,17 @@ config ACPI_CUSTOM_DSDT
+@@ -301,6 +293,17 @@
bool
default ACPI_CUSTOM_DSDT_FILE != ""
config ACPI_BLACKLIST_YEAR
int "Disable ACPI for systems before Jan 1st this year" if X86_32
default 0
-@@ -359,6 +362,7 @@ config ACPI_SYSTEM
+@@ -359,6 +362,7 @@
config X86_PM_TIMER
bool "Power Management Timer Support" if EMBEDDED
depends on X86
default y
help
The Power Management Timer is available on all ACPI-capable,
-@@ -412,4 +416,13 @@ config ACPI_SBS
+@@ -412,4 +416,13 @@
This driver adds support for the Smart Battery System, another
type of access to battery information, found on some laptops.
+ depends on (X86 || IA64) && XEN
+ default y
endif # ACPI
-diff -purN linux-2.6.27/drivers/acpi/Makefile linux-2.6.27.19-5.1/drivers/acpi/Makefile
---- linux-2.6.27/drivers/acpi/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/Makefile 2009-03-25 16:11:24.000000000 +0000
-@@ -34,6 +34,9 @@ processor-objs += processor_core.o proce
+diff -r 9608d5473017 drivers/acpi/Makefile
+--- a/drivers/acpi/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/Makefile Wed May 06 16:56:12 2009 +0100
+@@ -34,6 +34,9 @@
ifdef CONFIG_CPU_FREQ
processor-objs += processor_perflib.o
endif
obj-y += sleep/
obj-y += bus.o glue.o
-@@ -45,8 +48,12 @@ obj-$(CONFIG_ACPI_BATTERY) += battery.o
+@@ -45,8 +48,12 @@
obj-$(CONFIG_ACPI_BUTTON) += button.o
obj-$(CONFIG_ACPI_FAN) += fan.o
obj-$(CONFIG_ACPI_DOCK) += dock.o
obj-y += pci_root.o pci_link.o pci_irq.o pci_bind.o
obj-$(CONFIG_ACPI_PCI_SLOT) += pci_slot.o
obj-$(CONFIG_ACPI_POWER) += power.o
-diff -purN linux-2.6.27/drivers/acpi/ac.c linux-2.6.27.19-5.1/drivers/acpi/ac.c
---- linux-2.6.27/drivers/acpi/ac.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/ac.c 2009-03-25 16:11:24.000000000 +0000
-@@ -85,7 +85,7 @@ struct acpi_ac {
+diff -r 9608d5473017 drivers/acpi/ac.c
+--- a/drivers/acpi/ac.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/ac.c Wed May 06 16:56:12 2009 +0100
+@@ -85,7 +85,7 @@
struct power_supply charger;
#endif
struct acpi_device * device;
};
#define to_acpi_ac(x) container_of(x, struct acpi_ac, charger);
-diff -purN linux-2.6.27/drivers/acpi/acpi_memhotplug.c linux-2.6.27.19-5.1/drivers/acpi/acpi_memhotplug.c
---- linux-2.6.27/drivers/acpi/acpi_memhotplug.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/acpi_memhotplug.c 2009-03-25 16:11:24.000000000 +0000
-@@ -194,8 +194,7 @@ acpi_memory_get_device(acpi_handle handl
+diff -r 9608d5473017 drivers/acpi/acpi_memhotplug.c
+--- a/drivers/acpi/acpi_memhotplug.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/acpi_memhotplug.c Wed May 06 16:56:12 2009 +0100
+@@ -194,8 +194,7 @@
static int acpi_memory_check_device(struct acpi_memory_device *mem_device)
{
/* Get device present/absent information from the _STA */
if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->device->handle, "_STA",
-@@ -264,7 +263,7 @@ static int acpi_memory_powerdown_device(
+@@ -264,7 +263,7 @@
acpi_status status;
struct acpi_object_list arg_list;
union acpi_object arg;
/* Issue the _EJ0 command */
-diff -purN linux-2.6.27/drivers/acpi/asus_acpi.c linux-2.6.27.19-5.1/drivers/acpi/asus_acpi.c
---- linux-2.6.27/drivers/acpi/asus_acpi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/asus_acpi.c 2009-03-25 16:11:24.000000000 +0000
-@@ -753,7 +753,7 @@ static int get_lcd_state(void)
+diff -r 9608d5473017 drivers/acpi/asus_acpi.c
+--- a/drivers/acpi/asus_acpi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/asus_acpi.c Wed May 06 16:56:12 2009 +0100
+@@ -753,7 +753,7 @@
/* That's what the AML code does */
lcd = out_obj.integer.value >> 8;
} else if (hotk->model == F3Sa) {
union acpi_object param;
struct acpi_object_list input;
acpi_status status;
-@@ -1244,6 +1244,8 @@ static int asus_hotk_get_info(void)
+@@ -1244,6 +1244,8 @@
"default values\n", string);
printk(KERN_NOTICE
" send /proc/acpi/dsdt to the developers\n");
}
hotk->methods = &model_conf[hotk->model];
return AE_OK;
-diff -purN linux-2.6.27/drivers/acpi/battery.c linux-2.6.27.19-5.1/drivers/acpi/battery.c
---- linux-2.6.27/drivers/acpi/battery.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/battery.c 2009-03-25 16:11:24.000000000 +0000
-@@ -472,7 +472,7 @@ static void sysfs_remove_battery(struct
+diff -r 9608d5473017 drivers/acpi/battery.c
+--- a/drivers/acpi/battery.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/battery.c Wed May 06 16:56:12 2009 +0100
+@@ -472,7 +472,7 @@
static int acpi_battery_update(struct acpi_battery *battery)
{
result = acpi_battery_get_status(battery);
if (result)
return result;
-@@ -483,7 +483,8 @@ static int acpi_battery_update(struct ac
+@@ -483,7 +483,8 @@
return 0;
}
#endif
result = acpi_battery_get_info(battery);
if (result)
return result;
-diff -purN linux-2.6.27/drivers/acpi/bay.c linux-2.6.27.19-5.1/drivers/acpi/bay.c
---- linux-2.6.27/drivers/acpi/bay.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/bay.c 1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 drivers/acpi/bay.c
+--- a/drivers/acpi/bay.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/bay.c Wed May 06 16:56:13 2009 +0100
@@ -1,411 +0,0 @@
-/*
- * bay.c - ACPI removable drive bay driver
-postcore_initcall(bay_init);
-module_exit(bay_exit);
-
-diff -purN linux-2.6.27/drivers/acpi/bus.c linux-2.6.27.19-5.1/drivers/acpi/bus.c
---- linux-2.6.27/drivers/acpi/bus.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/bus.c 2009-03-25 16:11:24.000000000 +0000
-@@ -77,7 +77,7 @@ EXPORT_SYMBOL(acpi_bus_get_device);
+diff -r 9608d5473017 drivers/acpi/bus.c
+--- a/drivers/acpi/bus.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/bus.c Wed May 06 16:56:13 2009 +0100
+@@ -77,7 +77,7 @@
int acpi_bus_get_status(struct acpi_device *device)
{
acpi_status status = AE_OK;
if (!device)
-@@ -95,21 +95,21 @@ int acpi_bus_get_status(struct acpi_devi
+@@ -95,21 +95,21 @@
}
/*
}
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] status [%08x]\n",
-@@ -155,7 +155,7 @@ int acpi_bus_get_power(acpi_handle handl
+@@ -155,7 +155,7 @@
int result = 0;
acpi_status status = 0;
struct acpi_device *device = NULL;
result = acpi_bus_get_device(handle, &device);
-@@ -496,6 +496,19 @@ static int acpi_bus_check_scope(struct a
+@@ -496,6 +496,19 @@
return 0;
}
/**
* acpi_bus_notify
* ---------------
-@@ -506,6 +519,8 @@ static void acpi_bus_notify(acpi_handle
+@@ -506,6 +519,8 @@
int result = 0;
struct acpi_device *device = NULL;
if (acpi_bus_get_device(handle, &device))
return;
-diff -purN linux-2.6.27/drivers/acpi/button.c linux-2.6.27.19-5.1/drivers/acpi/button.c
---- linux-2.6.27/drivers/acpi/button.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/button.c 2009-03-25 16:11:24.000000000 +0000
-@@ -145,7 +145,7 @@ static int acpi_button_state_seq_show(st
+diff -r 9608d5473017 drivers/acpi/button.c
+--- a/drivers/acpi/button.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/button.c Wed May 06 16:56:13 2009 +0100
+@@ -145,7 +145,7 @@
{
struct acpi_button *button = seq->private;
acpi_status status;
if (!button || !button->device)
return 0;
-@@ -253,7 +253,7 @@ static int acpi_button_remove_fs(struct
+@@ -253,7 +253,7 @@
-------------------------------------------------------------------------- */
static int acpi_lid_send_state(struct acpi_button *button)
{
acpi_status status;
status = acpi_evaluate_integer(button->device->handle, "_LID", NULL,
-@@ -262,6 +262,7 @@ static int acpi_lid_send_state(struct ac
+@@ -262,6 +262,7 @@
return -ENODEV;
/* input layer checks if event is redundant */
input_report_switch(button->input, SW_LID, !state);
return 0;
}
-@@ -285,8 +286,8 @@ static void acpi_button_notify(acpi_hand
+@@ -285,8 +286,8 @@
input_report_key(input, keycode, 1);
input_sync(input);
input_report_key(input, keycode, 0);
acpi_bus_generate_proc_event(button->device, event,
++button->pushed);
-diff -purN linux-2.6.27/drivers/acpi/container.c linux-2.6.27.19-5.1/drivers/acpi/container.c
---- linux-2.6.27/drivers/acpi/container.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/container.c 2009-03-25 16:11:24.000000000 +0000
-@@ -76,7 +76,7 @@ static int is_device_present(acpi_handle
+diff -r 9608d5473017 drivers/acpi/container.c
+--- a/drivers/acpi/container.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/container.c Wed May 06 16:56:13 2009 +0100
+@@ -76,7 +76,7 @@
{
acpi_handle temp;
acpi_status status;
status = acpi_get_handle(handle, "_STA", &temp);
-diff -purN linux-2.6.27/drivers/acpi/dispatcher/dsmethod.c linux-2.6.27.19-5.1/drivers/acpi/dispatcher/dsmethod.c
---- linux-2.6.27/drivers/acpi/dispatcher/dsmethod.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/dispatcher/dsmethod.c 2009-03-25 16:11:24.000000000 +0000
-@@ -103,6 +103,9 @@ acpi_ds_method_error(acpi_status status,
+diff -r 9608d5473017 drivers/acpi/dispatcher/dsmethod.c
+--- a/drivers/acpi/dispatcher/dsmethod.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/dispatcher/dsmethod.c Wed May 06 16:56:13 2009 +0100
+@@ -103,6 +103,9 @@
NULL);
acpi_ex_enter_interpreter();
}
#ifdef ACPI_DISASSEMBLER
if (ACPI_FAILURE(status)) {
-diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/dock.c
---- linux-2.6.27/drivers/acpi/dock.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/dock.c 2009-03-25 16:11:24.000000000 +0000
-@@ -48,7 +48,6 @@ MODULE_PARM_DESC(immediate_undock, "1 (d
+diff -r 9608d5473017 drivers/acpi/dock.c
+--- a/drivers/acpi/dock.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/dock.c Wed May 06 16:56:13 2009 +0100
+@@ -48,7 +48,6 @@
" before undocking");
static struct atomic_notifier_head dock_notifier_list;
static char dock_device_name[] = "dock";
static const struct acpi_device_id dock_device_ids[] = {
-@@ -65,23 +64,29 @@ struct dock_station {
+@@ -65,22 +64,28 @@
struct mutex hp_lock;
struct list_head dependent_devices;
struct list_head hotplug_devices;
+#define DOCK_IS_BAT 0x00000040
#define DOCK_EVENT 3
#define UNDOCK_EVENT 2
-
--static struct dock_station *dock_station;
-
+-static struct dock_station *dock_station;
+
/*****************************************************************************
* Dock Dependent device functions *
- *****************************************************************************/
-@@ -199,6 +204,60 @@ static int is_dock(acpi_handle handle)
+@@ -199,6 +204,60 @@
return 1;
}
/**
* is_dock_device - see if a device is on a dock station
* @handle: acpi handle of the device
-@@ -209,11 +268,17 @@ static int is_dock(acpi_handle handle)
+@@ -209,11 +268,17 @@
*/
int is_dock_device(acpi_handle handle)
{
return 0;
}
-@@ -229,7 +294,7 @@ EXPORT_SYMBOL_GPL(is_dock_device);
+@@ -229,7 +294,7 @@
*/
static int dock_present(struct dock_station *ds)
{
acpi_status status;
if (ds) {
-@@ -320,8 +385,8 @@ static void hotplug_dock_devices(struct
+@@ -320,8 +385,8 @@
* First call driver specific hotplug functions
*/
list_for_each_entry(dd, &ds->hotplug_devices, hotplug_list) {
}
/*
-@@ -341,9 +406,10 @@ static void hotplug_dock_devices(struct
+@@ -341,9 +406,10 @@
static void dock_event(struct dock_station *ds, u32 event, int num)
{
if (num == UNDOCK_EVENT)
sprintf(event_string, "EVENT=undock");
-@@ -354,7 +420,14 @@ static void dock_event(struct dock_stati
+@@ -354,7 +420,14 @@
* Indicate that the status of the dock station has
* changed.
*/
}
/**
-@@ -414,9 +487,9 @@ static void handle_dock(struct dock_stat
+@@ -414,9 +487,9 @@
arg.type = ACPI_TYPE_INTEGER;
arg.integer.value = dock;
status = acpi_evaluate_object(ds->handle, "_DCK", &arg_list, &buffer);
kfree(buffer.pointer);
kfree(name_buffer.pointer);
}
-@@ -452,6 +525,25 @@ static inline void complete_undock(struc
+@@ -452,6 +525,25 @@
ds->flags &= ~(DOCK_UNDOCKING);
}
/**
* dock_in_progress - see if we are in the middle of handling a dock event
* @ds: the dock station
-@@ -479,7 +571,7 @@ static int dock_in_progress(struct dock_
+@@ -479,7 +571,7 @@
*/
int register_dock_notifier(struct notifier_block *nb)
{
return -ENODEV;
return atomic_notifier_chain_register(&dock_notifier_list, nb);
-@@ -493,7 +585,7 @@ EXPORT_SYMBOL_GPL(register_dock_notifier
+@@ -493,7 +585,7 @@
*/
void unregister_dock_notifier(struct notifier_block *nb)
{
return;
atomic_notifier_chain_unregister(&dock_notifier_list, nb);
-@@ -504,7 +596,7 @@ EXPORT_SYMBOL_GPL(unregister_dock_notifi
+@@ -504,7 +596,7 @@
/**
* register_hotplug_dock_device - register a hotplug function
* @handle: the handle of the device
* @context: device specific data
*
* If a driver would like to perform a hotplug operation after a dock
-@@ -512,27 +604,36 @@ EXPORT_SYMBOL_GPL(unregister_dock_notifi
+@@ -512,27 +604,36 @@
* the dock driver after _DCK is executed.
*/
int
}
EXPORT_SYMBOL_GPL(register_hotplug_dock_device);
-@@ -544,13 +645,16 @@ EXPORT_SYMBOL_GPL(register_hotplug_dock_
+@@ -544,13 +645,16 @@
void unregister_hotplug_dock_device(acpi_handle handle)
{
struct dock_dependent_device *dd;
}
EXPORT_SYMBOL_GPL(unregister_hotplug_dock_device);
-@@ -575,13 +679,9 @@ static int handle_eject_request(struct d
+@@ -575,13 +679,9 @@
*/
dock_event(ds, event, UNDOCK_EVENT);
eject_dock(ds);
if (dock_present(ds)) {
printk(KERN_ERR PREFIX "Unable to undock!\n");
-@@ -604,14 +704,36 @@ static int handle_eject_request(struct d
+@@ -604,14 +704,36 @@
static void dock_notify(acpi_handle handle, u32 event, void *data)
{
struct dock_station *ds = data;
+ struct acpi_device *tmp;
+ int surprise_removal = 0;
-+
+
+ /*
+ * According to acpi spec 3.0a, if a DEVICE_CHECK notification
+ * is sent and _DCK is present, it is assumed to mean an undock
+ */
+ if ((ds->flags & DOCK_IS_DOCK) && event == ACPI_NOTIFY_DEVICE_CHECK)
+ event = ACPI_NOTIFY_EJECT_REQUEST;
-
++
+ /*
+ * dock station: BUS_CHECK - docked or surprise removal
+ * DEVICE_CHECK - undocked
break;
}
atomic_notifier_call_chain(&dock_notifier_list,
-@@ -619,20 +741,19 @@ static void dock_notify(acpi_handle hand
+@@ -619,20 +741,19 @@
hotplug_dock_devices(ds, event);
complete_dock(ds);
dock_event(ds, event, DOCK_EVENT);
handle_eject_request(ds, event);
else
dock_event(ds, event, UNDOCK_EVENT);
-@@ -642,6 +763,51 @@ static void dock_notify(acpi_handle hand
+@@ -641,6 +762,51 @@
+ printk(KERN_ERR PREFIX "Unknown dock event %d\n", event);
}
}
-
++
+struct dock_data {
+ acpi_handle handle;
+ unsigned long event;
+static struct notifier_block dock_acpi_notifier = {
+ .notifier_call = acpi_dock_notifier_call,
+};
-+
+
/**
* find_dock_devices - find devices on the dock station
- * @handle: the handle of the device we are examining
-@@ -688,8 +854,14 @@ fdd_out:
+@@ -688,8 +854,14 @@
static ssize_t show_docked(struct device *dev,
struct device_attribute *attr, char *buf)
{
}
static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL);
-@@ -699,6 +871,8 @@ static DEVICE_ATTR(docked, S_IRUGO, show
+@@ -699,6 +871,8 @@
static ssize_t show_flags(struct device *dev,
struct device_attribute *attr, char *buf)
{
return snprintf(buf, PAGE_SIZE, "%d\n", dock_station->flags);
}
-@@ -711,6 +885,8 @@ static ssize_t write_undock(struct devic
+@@ -711,6 +885,8 @@
const char *buf, size_t count)
{
int ret;
if (!count)
return -EINVAL;
-@@ -727,16 +903,38 @@ static DEVICE_ATTR(undock, S_IWUSR, NULL
+@@ -727,15 +903,37 @@
static ssize_t show_dock_uid(struct device *dev,
struct device_attribute *attr, char *buf)
{
+ return snprintf(buf, PAGE_SIZE, "%llx\n", lbuf);
}
static DEVICE_ATTR(uid, S_IRUGO, show_dock_uid, NULL);
-
++
+static ssize_t show_dock_type(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ return snprintf(buf, PAGE_SIZE, "%s\n", type);
+}
+static DEVICE_ATTR(type, S_IRUGO, show_dock_type, NULL);
-+
+
/**
* dock_add - add a new dock station
- * @handle: the dock station handle
-@@ -747,8 +945,9 @@ static DEVICE_ATTR(uid, S_IRUGO, show_do
+@@ -747,8 +945,9 @@
static int dock_add(acpi_handle handle)
{
int ret;
/* allocate & initialize the dock_station private data */
dock_station = kzalloc(sizeof(*dock_station), GFP_KERNEL);
-@@ -758,22 +957,34 @@ static int dock_add(acpi_handle handle)
+@@ -758,21 +957,33 @@
dock_station->last_dock_time = jiffies - HZ;
INIT_LIST_HEAD(&dock_station->dependent_devices);
INIT_LIST_HEAD(&dock_station->hotplug_devices);
/* we want the dock device to send uevents */
dock_device->dev.uevent_suppress = 0;
-
++
+ if (is_dock(handle))
+ dock_station->flags |= DOCK_IS_DOCK;
+ if (is_ata(handle))
+ dock_station->flags |= DOCK_IS_ATA;
+ if (is_battery(handle))
+ dock_station->flags |= DOCK_IS_BAT;
-+
+
ret = device_create_file(&dock_device->dev, &dev_attr_docked);
if (ret) {
- printk("Error %d adding sysfs file\n", ret);
-@@ -812,6 +1023,9 @@ static int dock_add(acpi_handle handle)
+@@ -812,6 +1023,9 @@
dock_station = NULL;
return ret;
}
/* Find dependent devices */
acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
-@@ -828,24 +1042,12 @@ static int dock_add(acpi_handle handle)
+@@ -828,24 +1042,12 @@
}
add_dock_dependent_device(dock_station, dd);
device_remove_file(&dock_device->dev, &dev_attr_docked);
device_remove_file(&dock_device->dev, &dev_attr_undock);
device_remove_file(&dock_device->dev, &dev_attr_uid);
-@@ -859,12 +1061,12 @@ dock_add_err_unregister:
+@@ -859,12 +1061,12 @@
/**
* dock_remove - free up resources related to the dock station
*/
return 0;
/* remove dependent devices */
-@@ -872,14 +1074,8 @@ static int dock_remove(void)
+@@ -872,14 +1074,8 @@
list)
kfree(dd);
device_remove_file(&dock_device->dev, &dev_attr_docked);
device_remove_file(&dock_device->dev, &dev_attr_undock);
device_remove_file(&dock_device->dev, &dev_attr_uid);
-@@ -904,41 +1100,60 @@ static int dock_remove(void)
+@@ -904,41 +1100,60 @@
static acpi_status
find_dock(acpi_handle handle, u32 lvl, void *context, void **rv)
{
return status;
}
--static int __init dock_init(void)
+static acpi_status
+find_bay(acpi_handle handle, u32 lvl, void *context, void **rv)
- {
-- int num = 0;
--
-- dock_station = NULL;
++{
+ /* If bay is a dock, it's already handled */
+ if (is_ejectable_bay(handle) && !is_dock(handle))
+ dock_add(handle);
+ return AE_OK;
+}
-
-+static int __init dock_init(void)
-+{
++
+ static int __init dock_init(void)
+ {
+- int num = 0;
+-
+- dock_station = NULL;
+-
if (acpi_disabled)
return 0;
+ */
+subsys_initcall(dock_init);
module_exit(dock_exit);
-diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
---- linux-2.6.27/drivers/acpi/ec.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/ec.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/ec.c
+--- a/drivers/acpi/ec.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/ec.c Wed May 06 16:56:13 2009 +0100
@@ -1,7 +1,7 @@
/*
- * ec.c - ACPI Embedded Controller Driver (v2.0)
#include <asm/io.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
-@@ -65,22 +66,21 @@ enum ec_command {
+@@ -65,22 +66,21 @@
ACPI_EC_COMMAND_QUERY = 0x84,
};
};
/* If we find an EC via the ECDT, we need to keep a ptr to its context */
-@@ -95,6 +95,18 @@ struct acpi_ec_query_handler {
+@@ -95,6 +95,18 @@
u8 query_bit;
};
static struct acpi_ec {
acpi_handle handle;
unsigned long gpe;
-@@ -105,11 +117,12 @@ static struct acpi_ec {
+@@ -105,10 +117,11 @@
struct mutex lock;
wait_queue_head_t wait;
struct list_head list;
+ struct transaction *curr;
+ spinlock_t curr_lock;
} *boot_ec, *first_ec;
-
-+int acpi_ec_intr = 1; /* Default is interrupt mode */
+
++int acpi_ec_intr = 1; /* Default is interrupt mode */
+
/*
* Some Asus system have exchanged ECDT data/command IO addresses.
- */
-@@ -150,7 +163,7 @@ static inline u8 acpi_ec_read_data(struc
+@@ -150,7 +163,7 @@
{
u8 x = inb(ec->data_addr);
pr_debug(PREFIX "---> data = 0x%2.2x\n", x);
}
static inline void acpi_ec_write_cmd(struct acpi_ec *ec, u8 command)
-@@ -165,158 +178,193 @@ static inline void acpi_ec_write_data(st
+@@ -165,158 +178,193 @@
outb(data, ec->data_addr);
}
+static int ec_transaction_done(struct acpi_ec *ec)
{
- if (test_bit(EC_FLAGS_WAIT_GPE, &ec->flags))
-- return 0;
-- if (event == ACPI_EC_EVENT_OBF_1) {
-- if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_OBF)
-- return 1;
-- } else if (event == ACPI_EC_EVENT_IBF_0) {
-- if (!(acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF))
-- return 1;
-- }
+ unsigned long flags;
+ int ret = 0;
+ spin_lock_irqsave(&ec->curr_lock, flags);
+ spin_unlock_irqrestore(&ec->curr_lock, flags);
+ return ret;
+}
-
-- return 0;
++
+static void start_transaction(struct acpi_ec *ec)
+{
+ ec->curr->irq_count = ec->curr->wi = ec->curr->ri = 0;
+ ec->curr->done = false;
+ acpi_ec_write_cmd(ec, ec->curr->command);
- }
-
--static void ec_schedule_ec_poll(struct acpi_ec *ec)
++}
++
+static void gpe_transaction(struct acpi_ec *ec, u8 status)
- {
-- if (test_bit(EC_FLAGS_RESCHEDULE_POLL, &ec->flags))
-- schedule_delayed_work(&ec->work,
-- msecs_to_jiffies(ACPI_EC_DELAY));
++{
+ unsigned long flags;
+ spin_lock_irqsave(&ec->curr_lock, flags);
+ if (!ec->curr)
+ ++ec->curr->irq_count;
+unlock:
+ spin_unlock_irqrestore(&ec->curr_lock, flags);
- }
-
--static void ec_switch_to_poll_mode(struct acpi_ec *ec)
++}
++
+static int acpi_ec_wait(struct acpi_ec *ec)
- {
++{
+ if (wait_event_timeout(ec->wait, ec_transaction_done(ec),
+ msecs_to_jiffies(ACPI_EC_DELAY)))
-+ return 0;
+ return 0;
+- if (event == ACPI_EC_EVENT_OBF_1) {
+- if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_OBF)
+- return 1;
+- } else if (event == ACPI_EC_EVENT_IBF_0) {
+- if (!(acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF))
+- return 1;
+ /* try restart command if we get any false interrupts */
+ if (ec->curr->irq_count &&
+ (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) == 0) {
+ if (wait_event_timeout(ec->wait, ec_transaction_done(ec),
+ msecs_to_jiffies(ACPI_EC_DELAY)))
+ return 0;
-+ }
+ }
+ /* missing GPEs, switch back to poll mode */
+ if (printk_ratelimit())
+ pr_info(PREFIX "missing confirmations, "
+ "switch off interrupt mode.\n");
- set_bit(EC_FLAGS_NO_GPE, &ec->flags);
- clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
-- acpi_disable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
-- set_bit(EC_FLAGS_RESCHEDULE_POLL, &ec->flags);
++ set_bit(EC_FLAGS_NO_GPE, &ec->flags);
++ clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
+ return 1;
- }
++}
--static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll)
+static void acpi_ec_gpe_query(void *ec_cxt);
+
+static int ec_check_sci(struct acpi_ec *ec, u8 state)
++{
++ if (state & ACPI_EC_FLAG_SCI) {
++ if (!test_and_set_bit(EC_FLAGS_QUERY_PENDING, &ec->flags))
++ return acpi_os_execute(OSL_EC_BURST_HANDLER,
++ acpi_ec_gpe_query, ec);
++ }
+ return 0;
+ }
+
+-static void ec_schedule_ec_poll(struct acpi_ec *ec)
++static int ec_poll(struct acpi_ec *ec)
{
+- if (test_bit(EC_FLAGS_RESCHEDULE_POLL, &ec->flags))
+- schedule_delayed_work(&ec->work,
+- msecs_to_jiffies(ACPI_EC_DELAY));
+-}
+-
+-static void ec_switch_to_poll_mode(struct acpi_ec *ec)
+-{
+- set_bit(EC_FLAGS_NO_GPE, &ec->flags);
+- clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
+- acpi_disable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
+- set_bit(EC_FLAGS_RESCHEDULE_POLL, &ec->flags);
+-}
+-
+-static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll)
+-{
- atomic_set(&ec->irq_count, 0);
- if (likely(test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) &&
- likely(!force_poll)) {
- msleep(1);
- }
- if (acpi_ec_check_status(ec,event))
-+ if (state & ACPI_EC_FLAG_SCI) {
-+ if (!test_and_set_bit(EC_FLAGS_QUERY_PENDING, &ec->flags))
-+ return acpi_os_execute(OSL_EC_BURST_HANDLER,
-+ acpi_ec_gpe_query, ec);
-+ }
-+ return 0;
-+}
-+
-+static int ec_poll(struct acpi_ec *ec)
-+{
+ unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY);
+ udelay(ACPI_EC_UDELAY);
+ while (time_before(jiffies, delay)) {
+ if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) {
+ clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
+ acpi_disable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
-+ }
+ }
+-
+- if (!rdata_len) {
+- result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll);
+- if (result) {
+- pr_err(PREFIX
+- "finish-write timeout, command = %d\n", command);
+- goto end;
+- }
+- } else if (command == ACPI_EC_COMMAND_QUERY)
+ /* start transaction */
+ spin_lock_irqsave(&ec->curr_lock, tmp);
+ /* following two actions should be kept atomic */
+ ec->curr = t;
+ start_transaction(ec);
+ if (ec->curr->command == ACPI_EC_COMMAND_QUERY)
-+ clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
+ clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
+-
+- for (; rdata_len > 0; --rdata_len) {
+- result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1, force_poll);
+- if (result) {
+- pr_err(PREFIX "read timeout, command = %d\n", command);
+- goto end;
+- }
+- /* Don't expect GPE after last read */
+- if (rdata_len > 1)
+- set_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
+- *(rdata++) = acpi_ec_read_data(ec);
+ spin_unlock_irqrestore(&ec->curr_lock, tmp);
+ /* if we selected poll mode or failed in GPE-mode do a poll loop */
+ if (force_poll ||
+ "transactions will use polling mode\n");
+ set_bit(EC_FLAGS_GPE_STORM, &ec->flags);
}
+- end:
+- pr_debug(PREFIX "transaction end\n");
+- return result;
+ return ret;
-+}
+ }
-- if (!rdata_len) {
-- result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll);
-- if (result) {
-- pr_err(PREFIX
-- "finish-write timeout, command = %d\n", command);
-- goto end;
-- }
-- } else if (command == ACPI_EC_COMMAND_QUERY)
-- clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
+-static int acpi_ec_transaction(struct acpi_ec *ec, u8 command,
+- const u8 * wdata, unsigned wdata_len,
+- u8 * rdata, unsigned rdata_len,
+static int ec_check_ibf0(struct acpi_ec *ec)
+{
+ u8 status = acpi_ec_read_status(ec);
+ return (status & ACPI_EC_FLAG_IBF) == 0;
+}
-
-- for (; rdata_len > 0; --rdata_len) {
-- result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1, force_poll);
-- if (result) {
-- pr_err(PREFIX "read timeout, command = %d\n", command);
-- goto end;
-- }
-- /* Don't expect GPE after last read */
-- if (rdata_len > 1)
-- set_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
-- *(rdata++) = acpi_ec_read_data(ec);
-- }
-- end:
-- pr_debug(PREFIX "transaction end\n");
-- return result;
++
+static int ec_wait_ibf0(struct acpi_ec *ec)
+{
+ unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY);
+ if (wait_event_timeout(ec->wait, ec_check_ibf0(ec), timeout))
+ return 0;
+ return -ETIME;
- }
-
--static int acpi_ec_transaction(struct acpi_ec *ec, u8 command,
-- const u8 * wdata, unsigned wdata_len,
-- u8 * rdata, unsigned rdata_len,
++}
++
+static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t,
int force_poll)
{
return status;
}
-@@ -327,21 +375,32 @@ static int acpi_ec_transaction(struct ac
+@@ -327,21 +375,32 @@
int acpi_ec_burst_enable(struct acpi_ec *ec)
{
u8 d;
*data = d;
return result;
}
-@@ -349,8 +408,11 @@ static int acpi_ec_read(struct acpi_ec *
+@@ -349,8 +408,11 @@
static int acpi_ec_write(struct acpi_ec *ec, u8 address, u8 data)
{
u8 wdata[2] = { address, data };
}
/*
-@@ -412,12 +474,13 @@ int ec_transaction(u8 command,
+@@ -412,12 +474,13 @@
u8 * rdata, unsigned rdata_len,
int force_poll)
{
}
EXPORT_SYMBOL(ec_transaction);
-@@ -426,7 +489,9 @@ static int acpi_ec_query(struct acpi_ec
+@@ -426,7 +489,9 @@
{
int result;
u8 d;
if (!ec || !data)
return -EINVAL;
-@@ -436,7 +501,7 @@ static int acpi_ec_query(struct acpi_ec
+@@ -436,7 +501,7 @@
* bit to be cleared (and thus clearing the interrupt source).
*/
if (result)
return result;
-@@ -513,46 +578,35 @@ static void acpi_ec_gpe_query(void *ec_c
+@@ -513,46 +578,35 @@
static u32 acpi_ec_gpe_handler(void *data)
{
}
/* --------------------------------------------------------------------------
-@@ -696,8 +750,7 @@ static struct acpi_ec *make_acpi_ec(void
+@@ -696,8 +750,7 @@
mutex_init(&ec->lock);
init_waitqueue_head(&ec->wait);
INIT_LIST_HEAD(&ec->list);
return ec;
}
-@@ -718,6 +771,7 @@ static acpi_status
+@@ -718,6 +771,7 @@
ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
{
acpi_status status;
struct acpi_ec *ec = context;
status = acpi_walk_resources(handle, METHOD_NAME__CRS,
-@@ -727,31 +781,27 @@ ec_parse_device(acpi_handle handle, u32
+@@ -727,31 +781,27 @@
/* Get GPE bit assignment (EC events). */
/* TODO: Add support for _GPE returning a package */
}
static int acpi_ec_add(struct acpi_device *device)
-@@ -846,17 +896,17 @@ ec_parse_io_ports(struct acpi_resource *
+@@ -846,17 +896,17 @@
static int ec_install_handlers(struct acpi_ec *ec)
{
acpi_status status;
status = acpi_install_address_space_handler(ec->handle,
ACPI_ADR_SPACE_EC,
&acpi_ec_space_handler,
-@@ -866,7 +916,7 @@ static int ec_install_handlers(struct ac
+@@ -866,7 +916,7 @@
return -ENODEV;
}
return 0;
}
-@@ -887,7 +937,6 @@ static int acpi_ec_start(struct acpi_dev
+@@ -887,7 +937,6 @@
/* EC is fully operational, allow queries */
clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
return ret;
}
-@@ -906,7 +955,7 @@ static int acpi_ec_stop(struct acpi_devi
+@@ -906,7 +955,7 @@
int __init acpi_boot_ec_enable(void)
{
return 0;
if (!ec_install_handlers(boot_ec)) {
first_ec = boot_ec;
-@@ -1047,3 +1096,14 @@ static void __exit acpi_ec_exit(void)
+@@ -1047,3 +1096,14 @@
return;
}
#endif /* 0 */
+}
+
+__setup("ec_intr=", acpi_ec_set_intr_mode);
-diff -purN linux-2.6.27/drivers/acpi/executer/exconfig.c linux-2.6.27.19-5.1/drivers/acpi/executer/exconfig.c
---- linux-2.6.27/drivers/acpi/executer/exconfig.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/executer/exconfig.c 2009-03-25 16:11:24.000000000 +0000
-@@ -280,6 +280,7 @@ acpi_ex_load_op(union acpi_operand_objec
+diff -r 9608d5473017 drivers/acpi/executer/exconfig.c
+--- a/drivers/acpi/executer/exconfig.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/executer/exconfig.c Wed May 06 16:56:13 2009 +0100
+@@ -280,6 +280,7 @@
struct acpi_walk_state *walk_state)
{
union acpi_operand_object *ddb_handle;
struct acpi_table_desc table_desc;
u32 table_index;
acpi_status status;
-@@ -294,9 +295,8 @@ acpi_ex_load_op(union acpi_operand_objec
+@@ -294,9 +295,8 @@
switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
case ACPI_TYPE_REGION:
/* Region must be system_memory (from ACPI spec) */
-@@ -316,61 +316,112 @@ acpi_ex_load_op(union acpi_operand_objec
+@@ -316,22 +316,17 @@
}
/*
- * we may eventually have to copy the table to a local buffer.
+ * Map the table header and get the actual table length. The region
+ * length is not guaranteed to be the same as the table length.
-+ */
+ */
+- table_desc.address = obj_desc->region.address;
+- table_desc.length = obj_desc->region.length;
+- table_desc.flags = ACPI_TABLE_ORIGIN_MAPPED;
+- break;
+ table = acpi_os_map_memory(obj_desc->region.address,
+ sizeof(struct acpi_table_header));
+ if (!table) {
+ return_ACPI_STATUS(AE_NO_MEMORY);
+ }
-+
+
+- case ACPI_TYPE_BUFFER: /* Buffer or resolved region_field */
+-
+- ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
+- "Load from Buffer or Field %p %s\n", obj_desc,
+- acpi_ut_get_object_type_name(obj_desc)));
+-
+- length = obj_desc->buffer.length;
+ length = table->length;
+ acpi_os_unmap_memory(table, sizeof(struct acpi_table_header));
-+
-+ /* Must have at least an ACPI table header */
-+
-+ if (length < sizeof(struct acpi_table_header)) {
-+ return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
-+ }
-+
+
+ /* Must have at least an ACPI table header */
+
+@@ -339,38 +334,94 @@
+ return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
+ }
+
+- /* Validate checksum here. It won't get validated in tb_add_table */
+ /*
+ * The memory region is not guaranteed to remain stable and we must
+ * copy the table to a local buffer. For example, the memory region
+ * is corrupted after suspend on some machines. Dynamically loaded
+ * tables are usually small, so this overhead is minimal.
- */
-+
++ */
+
+- status =
+- acpi_tb_verify_checksum(ACPI_CAST_PTR
+- (struct acpi_table_header,
+- obj_desc->buffer.pointer), length);
+- if (ACPI_FAILURE(status)) {
+- return_ACPI_STATUS(status);
+ /* Allocate a buffer for the table */
+
+ table_desc.pointer = ACPI_ALLOCATE(length);
+ ACPI_MEMCPY(table_desc.pointer, table, length);
+ acpi_os_unmap_memory(table, length);
+
- table_desc.address = obj_desc->region.address;
-- table_desc.length = obj_desc->region.length;
-- table_desc.flags = ACPI_TABLE_ORIGIN_MAPPED;
- break;
-
- case ACPI_TYPE_BUFFER: /* Buffer or resolved region_field */
-
- ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
-- "Load from Buffer or Field %p %s\n", obj_desc,
-- acpi_ut_get_object_type_name(obj_desc)));
--
-- length = obj_desc->buffer.length;
++ table_desc.address = obj_desc->region.address;
++ break;
++
++ case ACPI_TYPE_BUFFER: /* Buffer or resolved region_field */
++
++ ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
+ "Load table from Buffer or Field %p\n",
+ obj_desc));
-
- /* Must have at least an ACPI table header */
-
-- if (length < sizeof(struct acpi_table_header)) {
++
++ /* Must have at least an ACPI table header */
++
+ if (obj_desc->buffer.length < sizeof(struct acpi_table_header)) {
- return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
- }
-
-- /* Validate checksum here. It won't get validated in tb_add_table */
++ return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
++ }
++
+ /* Get the actual table length from the table header */
-
-- status =
-- acpi_tb_verify_checksum(ACPI_CAST_PTR
-- (struct acpi_table_header,
-- obj_desc->buffer.pointer), length);
-- if (ACPI_FAILURE(status)) {
-- return_ACPI_STATUS(status);
++
+ table =
+ ACPI_CAST_PTR(struct acpi_table_header,
+ obj_desc->buffer.pointer);
status = acpi_tb_add_table(&table_desc, &table_index);
if (ACPI_FAILURE(status)) {
goto cleanup;
-@@ -379,7 +430,7 @@ acpi_ex_load_op(union acpi_operand_objec
+@@ -379,7 +430,7 @@
/*
* Add the table to the namespace.
*
* This appears to go against the ACPI specification, but we do it for
* compatibility with other ACPI implementations.
*/
-@@ -415,7 +466,7 @@ acpi_ex_load_op(union acpi_operand_objec
+@@ -415,7 +466,7 @@
cleanup:
if (ACPI_FAILURE(status)) {
acpi_tb_delete_table(&table_desc);
}
-diff -purN linux-2.6.27/drivers/acpi/glue.c linux-2.6.27.19-5.1/drivers/acpi/glue.c
---- linux-2.6.27/drivers/acpi/glue.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/glue.c 2009-03-25 16:11:24.000000000 +0000
-@@ -140,6 +140,46 @@ struct device *acpi_get_physical_device(
+diff -r 9608d5473017 drivers/acpi/glue.c
+--- a/drivers/acpi/glue.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/glue.c Wed May 06 16:56:13 2009 +0100
+@@ -140,6 +140,46 @@
EXPORT_SYMBOL(acpi_get_physical_device);
static int acpi_bind_one(struct device *dev, acpi_handle handle)
{
struct acpi_device *acpi_dev;
-diff -purN linux-2.6.27/drivers/acpi/hardware/hwsleep.c linux-2.6.27.19-5.1/drivers/acpi/hardware/hwsleep.c
---- linux-2.6.27/drivers/acpi/hardware/hwsleep.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/hardware/hwsleep.c 2009-03-25 16:11:24.000000000 +0000
-@@ -78,19 +78,17 @@ acpi_set_firmware_waking_vector(acpi_phy
+diff -r 9608d5473017 drivers/acpi/hardware/hwsleep.c
+--- a/drivers/acpi/hardware/hwsleep.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/hardware/hwsleep.c Wed May 06 16:56:13 2009 +0100
+@@ -78,19 +78,17 @@
return_ACPI_STATUS(status);
}
return_ACPI_STATUS(AE_OK);
}
-@@ -134,20 +132,7 @@ acpi_get_firmware_waking_vector(acpi_phy
+@@ -134,20 +132,7 @@
}
/* Get the vector */
return_ACPI_STATUS(AE_OK);
}
-@@ -256,7 +241,11 @@ acpi_status asmlinkage acpi_enter_sleep_
+@@ -256,7 +241,11 @@
u32 PM1Bcontrol;
struct acpi_bit_register_info *sleep_type_reg_info;
struct acpi_bit_register_info *sleep_enable_reg_info;
struct acpi_object_list arg_list;
union acpi_object arg;
acpi_status status;
-@@ -366,6 +355,7 @@ acpi_status asmlinkage acpi_enter_sleep_
+@@ -366,6 +355,7 @@
ACPI_FLUSH_CPU_CACHE();
status = acpi_hw_register_write(ACPI_REGISTER_PM1A_CONTROL,
PM1Acontrol);
if (ACPI_FAILURE(status)) {
-@@ -412,6 +402,16 @@ acpi_status asmlinkage acpi_enter_sleep_
+@@ -412,6 +402,16 @@
/* Spin until we wake */
} while (!in_value);
return_ACPI_STATUS(AE_OK);
}
-@@ -430,6 +430,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_stat
+@@ -430,6 +430,7 @@
* THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
*
******************************************************************************/
acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)
{
u32 in_value;
-@@ -479,6 +480,7 @@ acpi_status asmlinkage acpi_enter_sleep_
+@@ -479,6 +480,7 @@
}
ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios)
/*******************************************************************************
*
-@@ -627,6 +629,13 @@ acpi_status acpi_leave_sleep_state(u8 sl
+@@ -627,6 +629,13 @@
}
/* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
acpi_gbl_system_awake_and_running = TRUE;
/* Enable power button */
-diff -purN linux-2.6.27/drivers/acpi/namespace/nsutils.c linux-2.6.27.19-5.1/drivers/acpi/namespace/nsutils.c
---- linux-2.6.27/drivers/acpi/namespace/nsutils.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/namespace/nsutils.c 2009-03-25 16:11:24.000000000 +0000
-@@ -314,9 +314,15 @@ void acpi_ns_get_internal_name_length(st
+diff -r 9608d5473017 drivers/acpi/namespace/nsutils.c
+--- a/drivers/acpi/namespace/nsutils.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/namespace/nsutils.c Wed May 06 16:56:13 2009 +0100
+@@ -314,9 +314,15 @@
*
* strlen() + 1 covers the first name_seg, which has no path separator
*/
} else {
/*
* Handle Carat prefixes
-diff -purN linux-2.6.27/drivers/acpi/namespace/nsxfeval.c linux-2.6.27.19-5.1/drivers/acpi/namespace/nsxfeval.c
---- linux-2.6.27/drivers/acpi/namespace/nsxfeval.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/namespace/nsxfeval.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/namespace/nsxfeval.c
+--- a/drivers/acpi/namespace/nsxfeval.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/namespace/nsxfeval.c Wed May 06 16:56:13 2009 +0100
@@ -45,9 +45,14 @@
#include <acpi/acpi.h>
#include <acpi/acnamesp.h>
#ifdef ACPI_FUTURE_USAGE
/*******************************************************************************
*
-@@ -69,6 +74,7 @@ ACPI_MODULE_NAME("nsxfeval")
+@@ -69,6 +74,7 @@
* be valid (non-null)
*
******************************************************************************/
acpi_status
acpi_evaluate_object_typed(acpi_handle handle,
acpi_string pathname,
-@@ -283,6 +289,10 @@ acpi_evaluate_object(acpi_handle handle,
+@@ -283,6 +289,10 @@
if (ACPI_SUCCESS(status)) {
/* Get the size of the returned object */
status =
-@@ -352,6 +362,74 @@ ACPI_EXPORT_SYMBOL(acpi_evaluate_object)
+@@ -352,6 +362,74 @@
/*******************************************************************************
*
* FUNCTION: acpi_walk_namespace
*
* PARAMETERS: Type - acpi_object_type to search for
-@@ -379,6 +457,7 @@ ACPI_EXPORT_SYMBOL(acpi_evaluate_object)
+@@ -379,6 +457,7 @@
* function, etc.
*
******************************************************************************/
acpi_status
acpi_walk_namespace(acpi_object_type type,
acpi_handle start_object,
-diff -purN linux-2.6.27/drivers/acpi/namespace/nsxfname.c linux-2.6.27.19-5.1/drivers/acpi/namespace/nsxfname.c
---- linux-2.6.27/drivers/acpi/namespace/nsxfname.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/namespace/nsxfname.c 2009-03-25 16:11:24.000000000 +0000
-@@ -253,6 +253,7 @@ acpi_get_object_info(acpi_handle handle,
+diff -r 9608d5473017 drivers/acpi/namespace/nsxfname.c
+--- a/drivers/acpi/namespace/nsxfname.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/namespace/nsxfname.c Wed May 06 16:56:13 2009 +0100
+@@ -253,6 +253,7 @@
node = acpi_ns_map_handle_to_node(handle);
if (!node) {
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
goto cleanup;
}
-diff -purN linux-2.6.27/drivers/acpi/numa.c linux-2.6.27.19-5.1/drivers/acpi/numa.c
---- linux-2.6.27/drivers/acpi/numa.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/numa.c 2009-03-25 16:11:24.000000000 +0000
-@@ -258,7 +258,7 @@ int __init acpi_numa_init(void)
+diff -r 9608d5473017 drivers/acpi/numa.c
+--- a/drivers/acpi/numa.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/numa.c Wed May 06 16:56:13 2009 +0100
+@@ -258,7 +258,7 @@
int acpi_get_pxm(acpi_handle h)
{
acpi_status status;
acpi_handle handle;
acpi_handle phandle = h;
-diff -purN linux-2.6.27/drivers/acpi/osl.c linux-2.6.27.19-5.1/drivers/acpi/osl.c
---- linux-2.6.27/drivers/acpi/osl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/osl.c 2009-03-25 16:11:24.000000000 +0000
-@@ -96,6 +96,11 @@ static DEFINE_SPINLOCK(acpi_res_lock);
+diff -r 9608d5473017 drivers/acpi/osl.c
+--- a/drivers/acpi/osl.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/osl.c Wed May 06 16:56:13 2009 +0100
+@@ -95,6 +95,11 @@
+
#define OSI_STRING_LENGTH_MAX 64 /* arbitrary */
static char osi_additional_string[OSI_STRING_LENGTH_MAX];
-
++
+#ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD
+static int acpi_no_initrd_override;
+extern struct acpi_table_header *acpi_find_dsdt_initrd(void);
+#endif
-+
+
/*
* "Ode to _OSI(Linux)"
- *
-@@ -325,7 +330,7 @@ acpi_os_predefined_override(const struct
+@@ -325,7 +330,7 @@
return AE_OK;
}
acpi_os_table_override(struct acpi_table_header * existing_table,
struct acpi_table_header ** new_table)
{
-@@ -338,6 +343,16 @@ acpi_os_table_override(struct acpi_table
+@@ -338,6 +343,16 @@
if (strncmp(existing_table->signature, "DSDT", 4) == 0)
*new_table = (struct acpi_table_header *)AmlCode;
#endif
if (*new_table != NULL) {
printk(KERN_WARNING PREFIX "Override [%4.4s-%8.8s], "
"this is unsafe: tainting kernel\n",
-@@ -348,6 +363,15 @@ acpi_os_table_override(struct acpi_table
+@@ -347,6 +362,15 @@
+ }
return AE_OK;
}
-
++
+#ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD
+static int __init acpi_no_initrd_override_setup(char *s)
+{
+}
+__setup("acpi_no_initrd_override", acpi_no_initrd_override_setup);
+#endif
-+
+
static irqreturn_t acpi_irq(int irq, void *dev_id)
{
- u32 handled;
-@@ -608,7 +632,7 @@ static void acpi_os_derive_pci_id_2(acpi
+@@ -608,7 +632,7 @@
acpi_handle handle;
struct acpi_pci_id *pci_id = *id;
acpi_status status;
acpi_object_type type;
acpi_get_parent(chandle, &handle);
-@@ -620,8 +644,7 @@ static void acpi_os_derive_pci_id_2(acpi
+@@ -620,8 +644,7 @@
if ((ACPI_FAILURE(status)) || (type != ACPI_TYPE_DEVICE))
return;
&temp);
if (ACPI_SUCCESS(status)) {
u32 val;
-@@ -682,6 +705,22 @@ static void acpi_os_execute_deferred(str
+@@ -682,6 +705,22 @@
return;
}
/*******************************************************************************
*
* FUNCTION: acpi_os_execute
-@@ -697,12 +736,13 @@ static void acpi_os_execute_deferred(str
+@@ -697,12 +736,13 @@
*
******************************************************************************/
ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
"Scheduling function [%p(%p)] for deferred execution.\n",
function, context));
-@@ -726,9 +766,17 @@ acpi_status acpi_os_execute(acpi_execute
+@@ -726,9 +766,17 @@
dpc->function = function;
dpc->context = context;
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Call to queue_work() failed.\n"));
status = AE_ERROR;
-@@ -737,8 +785,20 @@ acpi_status acpi_os_execute(acpi_execute
+@@ -737,7 +785,19 @@
return_ACPI_STATUS(status);
}
+ return __acpi_os_execute(type, function, context, 0);
+}
EXPORT_SYMBOL(acpi_os_execute);
-
++
+acpi_status acpi_os_hotplug_execute(acpi_osd_exec_callback function,
+ void *context)
+{
+ return __acpi_os_execute(0, function, context, 1);
+}
+EXPORT_SYMBOL(acpi_os_hotplug_execute);
-+
+
void acpi_os_wait_events_complete(void *context)
{
- flush_workqueue(kacpid_wq);
-@@ -1261,34 +1321,6 @@ acpi_status acpi_os_release_object(acpi_
+@@ -1261,34 +1321,6 @@
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: acpi_os_validate_interface
-@@ -1315,14 +1347,6 @@ acpi_os_validate_interface (char *interf
+@@ -1315,14 +1347,6 @@
osi_linux.cmdline ? " via cmdline" :
osi_linux.dmi ? " via DMI" : "");
if (!osi_linux.known && !osi_linux.cmdline) {
printk(KERN_NOTICE PREFIX
"If \"acpi_osi=%sLinux\" works better, "
-diff -purN linux-2.6.27/drivers/acpi/parser/psparse.c linux-2.6.27.19-5.1/drivers/acpi/parser/psparse.c
---- linux-2.6.27/drivers/acpi/parser/psparse.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/parser/psparse.c 2009-03-25 16:11:24.000000000 +0000
-@@ -641,10 +641,12 @@ acpi_status acpi_ps_parse_aml(struct acp
+diff -r 9608d5473017 drivers/acpi/parser/psparse.c
+--- a/drivers/acpi/parser/psparse.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/parser/psparse.c Wed May 06 16:56:13 2009 +0100
+@@ -641,10 +641,12 @@
ACPI_WALK_METHOD_RESTART;
}
} else {
}
}
-diff -purN linux-2.6.27/drivers/acpi/pci_irq.c linux-2.6.27.19-5.1/drivers/acpi/pci_irq.c
---- linux-2.6.27/drivers/acpi/pci_irq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/pci_irq.c 2009-03-25 16:11:24.000000000 +0000
-@@ -384,6 +384,27 @@ acpi_pci_free_irq(struct acpi_prt_entry
+diff -r 9608d5473017 drivers/acpi/pci_irq.c
+--- a/drivers/acpi/pci_irq.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/pci_irq.c Wed May 06 16:56:13 2009 +0100
+@@ -384,6 +384,27 @@
return irq;
}
/*
* acpi_pci_irq_lookup
* success: return IRQ >= 0
-@@ -413,6 +434,41 @@ acpi_pci_irq_lookup(struct pci_bus *bus,
+@@ -413,6 +434,41 @@
}
ret = func(entry, triggering, polarity, link);
return ret;
}
-diff -purN linux-2.6.27/drivers/acpi/pci_link.c linux-2.6.27.19-5.1/drivers/acpi/pci_link.c
---- linux-2.6.27/drivers/acpi/pci_link.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/pci_link.c 2009-03-25 16:11:24.000000000 +0000
-@@ -796,10 +796,6 @@ static int irqrouter_resume(struct sys_d
+diff -r 9608d5473017 drivers/acpi/pci_link.c
+--- a/drivers/acpi/pci_link.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/pci_link.c Wed May 06 16:56:13 2009 +0100
+@@ -796,10 +796,6 @@
struct list_head *node = NULL;
struct acpi_pci_link *link = NULL;
list_for_each(node, &acpi_link.entries) {
link = list_entry(node, struct acpi_pci_link, node);
if (!link) {
-diff -purN linux-2.6.27/drivers/acpi/pci_root.c linux-2.6.27.19-5.1/drivers/acpi/pci_root.c
---- linux-2.6.27/drivers/acpi/pci_root.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/pci_root.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/pci_root.c
+--- a/drivers/acpi/pci_root.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/pci_root.c Wed May 06 16:56:13 2009 +0100
@@ -31,6 +31,7 @@
#include <linux/spinlock.h>
#include <linux/pm.h>
#include <linux/acpi.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
-@@ -190,9 +191,10 @@ static int __devinit acpi_pci_root_add(s
+@@ -190,9 +191,10 @@
struct acpi_pci_root *root = NULL;
struct acpi_pci_root *tmp;
acpi_status status = AE_OK;
if (!device)
-@@ -210,6 +212,13 @@ static int __devinit acpi_pci_root_add(s
+@@ -209,6 +211,13 @@
+ acpi_driver_data(device) = root;
device->ops.bind = acpi_pci_bind;
-
++
+ /*
+ * All supported architectures that use ACPI have support for
+ * PCI domains, so we indicate this in _OSC support capabilities.
+ */
+ flags = base_flags = OSC_PCI_SEGMENT_GROUPS_SUPPORT;
+ pci_acpi_osc_support(device->handle, flags);
-+
+
/*
* Segment
- * -------
-@@ -335,6 +344,17 @@ static int __devinit acpi_pci_root_add(s
+@@ -335,6 +344,17 @@
list_for_each_entry(child, &device->children, node)
acpi_pci_bridge_scan(child);
end:
if (result) {
if (!list_empty(&root->node))
-diff -purN linux-2.6.27/drivers/acpi/pci_slot.c linux-2.6.27.19-5.1/drivers/acpi/pci_slot.c
---- linux-2.6.27/drivers/acpi/pci_slot.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/pci_slot.c 2009-03-25 16:11:24.000000000 +0000
-@@ -76,10 +76,10 @@ static struct acpi_pci_driver acpi_pci_s
+diff -r 9608d5473017 drivers/acpi/pci_slot.c
+--- a/drivers/acpi/pci_slot.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/pci_slot.c Wed May 06 16:56:13 2009 +0100
+@@ -76,10 +76,10 @@
};
static int
acpi_status status;
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
-@@ -132,7 +132,7 @@ static acpi_status
+@@ -132,7 +132,7 @@
register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
{
int device;
char name[SLOT_NAME_SIZE];
struct acpi_pci_slot *slot;
struct pci_slot *pci_slot;
-@@ -150,7 +150,7 @@ register_slot(acpi_handle handle, u32 lv
+@@ -150,7 +150,7 @@
}
snprintf(name, sizeof(name), "%u", (u32)sun);
if (IS_ERR(pci_slot)) {
err("pci_create_slot returned %ld\n", PTR_ERR(pci_slot));
kfree(slot);
-@@ -182,7 +182,7 @@ static acpi_status
+@@ -182,7 +182,7 @@
walk_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv)
{
int device, function;
acpi_status status;
acpi_handle dummy_handle;
acpi_walk_callback user_function;
-@@ -239,7 +239,7 @@ static int
+@@ -239,7 +239,7 @@
walk_root_bridge(acpi_handle handle, acpi_walk_callback user_function)
{
int seg, bus;
acpi_status status;
acpi_handle dummy_handle;
struct pci_bus *pci_bus;
-diff -purN linux-2.6.27/drivers/acpi/power.c linux-2.6.27.19-5.1/drivers/acpi/power.c
---- linux-2.6.27/drivers/acpi/power.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/power.c 2009-03-25 16:11:24.000000000 +0000
-@@ -131,7 +131,7 @@ acpi_power_get_context(acpi_handle handl
+diff -r 9608d5473017 drivers/acpi/power.c
+--- a/drivers/acpi/power.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/power.c Wed May 06 16:56:13 2009 +0100
+@@ -131,7 +131,7 @@
static int acpi_power_get_state(struct acpi_power_resource *resource, int *state)
{
acpi_status status = AE_OK;
if (!resource || !state)
-diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/drivers/acpi/processor_core.c
---- linux-2.6.27/drivers/acpi/processor_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/processor_core.c 2009-03-25 16:11:24.000000000 +0000
-@@ -89,6 +89,7 @@ static int acpi_processor_handle_eject(s
+diff -r 9608d5473017 drivers/acpi/processor_core.c
+--- a/drivers/acpi/processor_core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/processor_core.c Wed May 06 16:56:13 2009 +0100
+@@ -89,6 +89,7 @@
static const struct acpi_device_id processor_device_ids[] = {
{ACPI_PROCESSOR_HID, 0},
{"", 0},
};
-@@ -409,7 +410,7 @@ static int acpi_processor_remove_fs(stru
+@@ -409,7 +410,7 @@
/* Use the acpiid in MADT to map cpus in case of SMP */
#ifndef CONFIG_SMP
#else
static struct acpi_table_madt *madt;
-@@ -428,27 +429,35 @@ static int map_lapic_id(struct acpi_subt
+@@ -428,27 +429,35 @@
}
static int map_lsapic_id(struct acpi_subtable_header *entry,
{
unsigned long madt_end, entry;
int apic_id = -1;
-@@ -469,7 +478,7 @@ static int map_madt_entry(u32 acpi_id)
+@@ -469,7 +478,7 @@
if (map_lapic_id(header, acpi_id, &apic_id))
break;
} else if (header->type == ACPI_MADT_TYPE_LOCAL_SAPIC) {
break;
}
entry += header->length;
-@@ -477,7 +486,7 @@ static int map_madt_entry(u32 acpi_id)
+@@ -477,7 +486,7 @@
return apic_id;
}
{
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
union acpi_object *obj;
-@@ -500,7 +509,7 @@ static int map_mat_entry(acpi_handle han
+@@ -500,7 +509,7 @@
if (header->type == ACPI_MADT_TYPE_LOCAL_APIC) {
map_lapic_id(header, acpi_id, &apic_id);
} else if (header->type == ACPI_MADT_TYPE_LOCAL_SAPIC) {
}
exit:
-@@ -509,14 +518,14 @@ exit:
+@@ -509,14 +518,14 @@
return apic_id;
}
if (apic_id == -1)
return apic_id;
-@@ -532,15 +541,16 @@ static int get_cpu_id(acpi_handle handle
+@@ -532,15 +541,16 @@
Driver Interface
-------------------------------------------------------------------------- */
if (!pr)
return -EINVAL;
-@@ -561,22 +571,23 @@ static int acpi_processor_get_info(struc
+@@ -561,22 +571,23 @@
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"No bus mastering arbitration control\n"));
status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer);
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX "Evaluating processor object\n");
-@@ -584,12 +595,13 @@ static int acpi_processor_get_info(struc
+@@ -584,12 +595,13 @@
}
/*
/* Handle UP system running SMP kernel, with no LAPIC in MADT */
if (!cpu0_initialized && (cpu_index == -1) &&
-@@ -608,7 +620,8 @@ static int acpi_processor_get_info(struc
+@@ -608,7 +620,8 @@
*/
if (pr->id == -1) {
if (ACPI_FAILURE
return -ENODEV;
}
}
-@@ -644,13 +657,17 @@ static int acpi_processor_get_info(struc
+@@ -644,13 +657,17 @@
* of /proc/cpuinfo
*/
status = acpi_evaluate_object(pr->handle, "_SUN", NULL, &buffer);
static int __cpuinit acpi_processor_start(struct acpi_device *device)
{
-@@ -659,38 +676,56 @@ static int __cpuinit acpi_processor_star
+@@ -659,38 +676,56 @@
struct acpi_processor *pr;
struct sys_device *sysdev;
status = acpi_install_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY,
acpi_processor_notify, pr);
-@@ -698,15 +733,28 @@ static int __cpuinit acpi_processor_star
+@@ -698,14 +733,27 @@
/* _PDC call should be done before doing anything else (if reqd.). */
arch_acpi_processor_init_pdc(pr);
acpi_processor_set_pdc(pr);
acpi_processor_power_init(pr, device);
-
++
+ result = processor_extcntl_prepare(pr);
+ if (result)
+ goto end;
-+
+
pr->cdev = thermal_cooling_device_register("Processor", device,
&processor_cooling_ops);
- if (IS_ERR(pr->cdev)) {
-@@ -834,7 +882,7 @@ static int acpi_processor_remove(struct
+@@ -834,7 +882,7 @@
pr = acpi_driver_data(device);
kfree(pr);
return 0;
}
-@@ -849,7 +897,8 @@ static int acpi_processor_remove(struct
+@@ -849,7 +897,8 @@
status = acpi_remove_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY,
acpi_processor_notify);
acpi_processor_remove_fs(device);
-@@ -860,8 +909,14 @@ static int acpi_processor_remove(struct
+@@ -860,8 +909,14 @@
pr->cdev = NULL;
}
kfree(pr);
return 0;
-@@ -875,7 +930,7 @@ static int acpi_processor_remove(struct
+@@ -875,7 +930,7 @@
static int is_processor_present(acpi_handle handle)
{
acpi_status status;
status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
-@@ -921,6 +976,10 @@ int acpi_processor_device_add(acpi_handl
+@@ -921,6 +976,10 @@
if (!pr)
return -ENODEV;
if ((pr->id >= 0) && (pr->id < nr_cpu_ids)) {
kobject_uevent(&(*device)->dev.kobj, KOBJ_ONLINE);
}
-@@ -960,6 +1019,10 @@ static void __ref acpi_processor_hotplug
+@@ -959,6 +1018,10 @@
+ printk(KERN_ERR PREFIX "Driver data is NULL\n");
break;
}
-
++
+ if (processor_cntl_external())
+ processor_notify_external(pr,
+ PROCESSOR_HOTPLUG, HOTPLUG_TYPE_ADD);
-+
+
if (pr->id >= 0 && (pr->id < nr_cpu_ids)) {
kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE);
- break;
-@@ -991,6 +1054,11 @@ static void __ref acpi_processor_hotplug
+@@ -991,6 +1054,11 @@
if ((pr->id < nr_cpu_ids) && (cpu_present(pr->id)))
kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE);
break;
default:
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-@@ -1055,6 +1123,11 @@ static acpi_status acpi_processor_hotadd
+@@ -1055,6 +1123,11 @@
static int acpi_processor_handle_eject(struct acpi_processor *pr)
{
if (cpu_online(pr->id))
cpu_down(pr->id);
-diff -purN linux-2.6.27/drivers/acpi/processor_extcntl.c linux-2.6.27.19-5.1/drivers/acpi/processor_extcntl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/processor_extcntl.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/processor_extcntl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/acpi/processor_extcntl.c Wed May 06 16:56:13 2009 +0100
@@ -0,0 +1,233 @@
+/*
+ * processor_extcntl.c - channel to external control logic
+ kfree(perf);
+ return ret;
+}
-diff -purN linux-2.6.27/drivers/acpi/processor_idle.c linux-2.6.27.19-5.1/drivers/acpi/processor_idle.c
---- linux-2.6.27/drivers/acpi/processor_idle.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/processor_idle.c 2009-03-25 16:11:24.000000000 +0000
-@@ -127,57 +127,6 @@ static int set_max_cstate(const struct d
+diff -r 9608d5473017 drivers/acpi/processor_idle.c
+--- a/drivers/acpi/processor_idle.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/processor_idle.c Wed May 06 16:56:13 2009 +0100
+@@ -127,57 +127,6 @@
/* Actually this shouldn't be __cpuinitdata, would be better to fix the
callers to only run once -AK */
static struct dmi_system_id __cpuinitdata processor_power_dmi_table[] = {
{ set_max_cstate, "Clevo 5600D", {
DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
DMI_MATCH(DMI_BIOS_VERSION,"SHE845M0.86C.0013.D.0302131307")},
-@@ -956,7 +905,8 @@ static int acpi_processor_get_power_info
+@@ -956,7 +905,8 @@
*/
cx.entry_method = ACPI_CSTATE_HALT;
snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI HLT");
continue;
}
if (cx.type == ACPI_STATE_C1 &&
-@@ -995,6 +945,12 @@ static int acpi_processor_get_power_info
+@@ -994,6 +944,12 @@
+ continue;
cx.power = obj->integer.value;
-
++
+#ifdef CONFIG_PROCESSOR_EXTERNAL_CONTROL
+ /* cache control methods to notify external logic */
+ if (processor_pm_external())
+ memcpy(&cx.reg, reg, sizeof(*reg));
+#endif
-+
+
current_count++;
memcpy(&(pr->power.states[current_count]), &cx, sizeof(cx));
-
-@@ -1336,14 +1292,18 @@ int acpi_processor_cst_has_changed(struc
+@@ -1336,14 +1292,18 @@
* been initialized.
*/
if (pm_idle_save) {
pm_idle = acpi_processor_idle;
return result;
-@@ -1587,6 +1547,7 @@ static int acpi_idle_enter_bm(struct cpu
+@@ -1587,6 +1547,7 @@
if (acpi_idle_bm_check()) {
if (dev->safe_state) {
return dev->safe_state->enter(dev, dev->safe_state);
} else {
local_irq_disable();
-@@ -1782,6 +1743,13 @@ int acpi_processor_cst_has_changed(struc
+@@ -1782,6 +1743,13 @@
if (!pr->flags.power_setup_done)
return -ENODEV;
cpuidle_pause_and_lock();
cpuidle_disable_device(&pr->power.dev);
acpi_processor_get_power_info(pr);
-@@ -1865,7 +1833,7 @@ int __cpuinit acpi_processor_power_init(
+@@ -1865,7 +1833,7 @@
printk(")\n");
#ifndef CONFIG_CPU_IDLE
pm_idle_save = pm_idle;
pm_idle = acpi_processor_idle;
}
-@@ -1879,6 +1847,11 @@ int __cpuinit acpi_processor_power_init(
+@@ -1879,6 +1847,11 @@
acpi_driver_data(device));
if (!entry)
return -EIO;
return 0;
}
-diff -purN linux-2.6.27/drivers/acpi/processor_perflib.c linux-2.6.27.19-5.1/drivers/acpi/processor_perflib.c
---- linux-2.6.27/drivers/acpi/processor_perflib.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/processor_perflib.c 2009-03-25 16:11:24.000000000 +0000
-@@ -80,6 +80,7 @@ MODULE_PARM_DESC(ignore_ppc, "If the fre
+diff -r 9608d5473017 drivers/acpi/processor_perflib.c
+--- a/drivers/acpi/processor_perflib.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/processor_perflib.c Wed May 06 16:56:13 2009 +0100
+@@ -80,6 +80,7 @@
static int acpi_processor_ppc_status;
static int acpi_processor_ppc_notifier(struct notifier_block *nb,
unsigned long event, void *data)
{
-@@ -122,11 +123,12 @@ static int acpi_processor_ppc_notifier(s
+@@ -122,11 +123,12 @@
static struct notifier_block acpi_ppc_notifier_block = {
.notifier_call = acpi_processor_ppc_notifier,
};
if (!pr)
-@@ -166,9 +168,15 @@ int acpi_processor_ppc_has_changed(struc
+@@ -166,9 +168,15 @@
if (ret < 0)
return (ret);
else
void acpi_processor_ppc_init(void)
{
if (!cpufreq_register_notifier
-@@ -187,6 +195,7 @@ void acpi_processor_ppc_exit(void)
+@@ -187,6 +195,7 @@
acpi_processor_ppc_status &= ~PPC_REGISTERED;
}
static int acpi_processor_get_performance_control(struct acpi_processor *pr)
{
-@@ -328,7 +337,10 @@ static int acpi_processor_get_performanc
+@@ -328,7 +337,10 @@
return result;
}
{
int result = 0;
acpi_status status = AE_OK;
-@@ -356,6 +368,7 @@ static int acpi_processor_get_performanc
+@@ -356,6 +368,7 @@
return 0;
}
int acpi_processor_notify_smm(struct module *calling_module)
{
acpi_status status;
-@@ -416,6 +429,7 @@ int acpi_processor_notify_smm(struct mod
+@@ -416,6 +429,7 @@
}
EXPORT_SYMBOL(acpi_processor_notify_smm);
#ifdef CONFIG_X86_ACPI_CPUFREQ_PROC_INTF
/* /proc/acpi/processor/../performance interface (DEPRECATED) */
-@@ -507,7 +521,10 @@ static void acpi_cpufreq_remove_file(str
+@@ -507,7 +521,10 @@
}
#endif /* CONFIG_X86_ACPI_CPUFREQ_PROC_INTF */
{
int result = 0;
acpi_status status = AE_OK;
-diff -purN linux-2.6.27/drivers/acpi/processor_throttling.c linux-2.6.27.19-5.1/drivers/acpi/processor_throttling.c
---- linux-2.6.27/drivers/acpi/processor_throttling.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/processor_throttling.c 2009-03-25 16:11:24.000000000 +0000
-@@ -274,7 +274,7 @@ static int acpi_processor_throttling_not
+diff -r 9608d5473017 drivers/acpi/processor_throttling.c
+--- a/drivers/acpi/processor_throttling.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/processor_throttling.c Wed May 06 16:56:13 2009 +0100
+@@ -274,7 +274,7 @@
static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
{
acpi_status status = 0;
if (!pr)
return -EINVAL;
-diff -purN linux-2.6.27/drivers/acpi/reboot.c linux-2.6.27.19-5.1/drivers/acpi/reboot.c
---- linux-2.6.27/drivers/acpi/reboot.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/reboot.c 2009-03-25 16:11:24.000000000 +0000
-@@ -15,9 +15,28 @@ void acpi_reboot(void)
+diff -r 9608d5473017 drivers/acpi/reboot.c
+--- a/drivers/acpi/reboot.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/reboot.c Wed May 06 16:56:13 2009 +0100
+@@ -15,9 +15,28 @@
rr = &acpi_gbl_FADT.reset_register;
return;
reset_value = acpi_gbl_FADT.reset_value;
-diff -purN linux-2.6.27/drivers/acpi/sbshc.c linux-2.6.27.19-5.1/drivers/acpi/sbshc.c
---- linux-2.6.27/drivers/acpi/sbshc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/sbshc.c 2009-03-25 16:11:24.000000000 +0000
-@@ -258,7 +258,7 @@ extern int acpi_ec_add_query_handler(str
+diff -r 9608d5473017 drivers/acpi/sbshc.c
+--- a/drivers/acpi/sbshc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/sbshc.c Wed May 06 16:56:13 2009 +0100
+@@ -258,7 +258,7 @@
static int acpi_smbus_hc_add(struct acpi_device *device)
{
int status;
struct acpi_smb_hc *hc;
if (!device)
-diff -purN linux-2.6.27/drivers/acpi/scan.c linux-2.6.27.19-5.1/drivers/acpi/scan.c
---- linux-2.6.27/drivers/acpi/scan.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/scan.c 2009-03-25 16:11:24.000000000 +0000
-@@ -276,6 +276,13 @@ int acpi_match_device_ids(struct acpi_de
+diff -r 9608d5473017 drivers/acpi/scan.c
+--- a/drivers/acpi/scan.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/scan.c Wed May 06 16:56:13 2009 +0100
+@@ -275,6 +275,13 @@
+ const struct acpi_device_id *ids)
{
const struct acpi_device_id *id;
-
++
+ /*
+ * If the device is not present, it is unnecessary to load device
+ * driver for it.
+ */
+ if (!device->status.present)
+ return -ENODEV;
-+
+
if (device->flags.hardware_id) {
for (id = ids; id->id[0]; id++) {
- if (!strcmp((char*)id->id, device->pnp.hardware_id))
-@@ -901,36 +908,6 @@ static void acpi_device_get_busid(struct
+@@ -901,36 +908,6 @@
}
}
/*
* acpi_bay_match - see if a device is an ejectable driver bay
*
-@@ -1013,7 +990,7 @@ static void acpi_device_set_id(struct ac
+@@ -1013,7 +990,7 @@
will get autoloaded and the device might still match
against another driver.
*/
cid_add = ACPI_VIDEO_HID;
else if (ACPI_SUCCESS(acpi_bay_match(device)))
cid_add = ACPI_BAY_HID;
-@@ -1025,7 +1002,7 @@ static void acpi_device_set_id(struct ac
+@@ -1025,7 +1002,7 @@
hid = ACPI_POWER_HID;
break;
case ACPI_BUS_TYPE_PROCESSOR:
break;
case ACPI_BUS_TYPE_SYSTEM:
hid = ACPI_SYSTEM_HID;
-@@ -1221,15 +1198,18 @@ acpi_add_single_object(struct acpi_devic
+@@ -1221,15 +1198,18 @@
result = -ENODEV;
goto end;
}
}
break;
default:
-@@ -1252,6 +1232,16 @@ acpi_add_single_object(struct acpi_devic
+@@ -1250,6 +1230,16 @@
+ * -------------------------------------
+ */
acpi_device_set_id(device, parent, handle, type);
-
- /*
++
++ /*
+ * The ACPI device is attached to acpi handle before getting
+ * the power/wakeup/peformance flags. Otherwise OS can't get
+ * the corresponding ACPI device by the acpi handle in the course
+ result = acpi_device_set_context(device, type);
+ if (result)
+ goto end;
-+
-+ /*
+
+ /*
* Power Management
- * ----------------
- */
-@@ -1281,8 +1271,6 @@ acpi_add_single_object(struct acpi_devic
+@@ -1281,8 +1271,6 @@
goto end;
}
result = acpi_device_register(device, parent);
-@@ -1402,7 +1390,12 @@ static int acpi_bus_scan(struct acpi_dev
+@@ -1402,7 +1390,12 @@
* TBD: Need notifications and other detection mechanisms
* in place before we can fully implement this.
*/
status = acpi_get_next_object(ACPI_TYPE_ANY, chandle,
NULL, NULL);
if (ACPI_SUCCESS(status)) {
-diff -purN linux-2.6.27/drivers/acpi/sleep/main.c linux-2.6.27.19-5.1/drivers/acpi/sleep/main.c
---- linux-2.6.27/drivers/acpi/sleep/main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/sleep/main.c 2009-03-25 16:11:24.000000000 +0000
-@@ -27,6 +27,7 @@ u8 sleep_states[ACPI_S_STATE_COUNT];
+diff -r 9608d5473017 drivers/acpi/sleep/main.c
+--- a/drivers/acpi/sleep/main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/sleep/main.c Wed May 06 16:56:14 2009 +0100
+@@ -27,6 +27,7 @@
static int acpi_sleep_prepare(u32 acpi_state)
{
#ifdef CONFIG_ACPI_SLEEP
/* do we have a wakeup address for S2 and S3? */
if (acpi_state == ACPI_STATE_S3) {
if (!acpi_wakeup_address) {
-@@ -36,6 +37,7 @@ static int acpi_sleep_prepare(u32 acpi_s
+@@ -36,6 +37,7 @@
(acpi_physical_address)acpi_wakeup_address);
}
ACPI_FLUSH_CPU_CACHE();
acpi_enable_wakeup_device_prep(acpi_state);
#endif
-@@ -60,6 +62,18 @@ void __init acpi_old_suspend_ordering(vo
+@@ -59,6 +61,18 @@
+ {
old_suspend_ordering = true;
}
-
++
+/*
+ * According to the ACPI specification the BIOS should make sure that ACPI is
+ * enabled and SCI_EN bit is set on wake-up from S1 - S3 sleep states. Still,
+ * cases.
+ */
+static bool set_sci_en_on_resume;
-+
+
/**
* acpi_pm_disable_gpes - Disable the GPEs.
- */
-@@ -196,10 +210,23 @@ static int acpi_suspend_enter(suspend_st
+@@ -196,9 +210,22 @@
break;
case ACPI_STATE_S3:
+#endif
break;
}
-
++
+ /* If ACPI is not enabled by the BIOS, we need to enable it here. */
+ if (set_sci_en_on_resume)
+ acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1);
+ else
+ acpi_enable();
-+
+
/* Reprogram control registers and execute _BFS */
acpi_leave_sleep_state_prep(acpi_state);
-
-@@ -287,6 +314,12 @@ static int __init init_old_suspend_order
+@@ -287,6 +314,12 @@
return 0;
}
static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
{
.callback = init_old_suspend_ordering,
-@@ -296,6 +329,38 @@ static struct dmi_system_id __initdata a
+@@ -294,6 +327,38 @@
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "http://www.abit.com.tw/"),
DMI_MATCH(DMI_BOARD_NAME, "KN9 Series(NF-CK804)"),
- },
- },
++ },
++ },
+ {
+ .callback = init_old_suspend_ordering,
+ .ident = "HP xw4600 Workstation",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "HP xw4600 Workstation"),
-+ },
-+ },
+ },
+ },
{},
- };
- #endif /* CONFIG_SUSPEND */
-@@ -444,7 +509,7 @@ int acpi_pm_device_sleep_state(struct de
+@@ -444,7 +509,7 @@
acpi_handle handle = DEVICE_ACPI_HANDLE(dev);
struct acpi_device *adev;
char acpi_method[] = "_SxD";
if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) {
printk(KERN_DEBUG "ACPI handle has no context!\n");
-diff -purN linux-2.6.27/drivers/acpi/system.c linux-2.6.27.19-5.1/drivers/acpi/system.c
---- linux-2.6.27/drivers/acpi/system.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/system.c 2009-03-25 16:11:24.000000000 +0000
-@@ -78,9 +78,15 @@ static ssize_t acpi_table_show(struct ko
+diff -r 9608d5473017 drivers/acpi/system.c
+--- a/drivers/acpi/system.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/system.c Wed May 06 16:56:14 2009 +0100
+@@ -78,9 +78,15 @@
container_of(bin_attr, struct acpi_table_attr, attr);
struct acpi_table_header *table_header = NULL;
acpi_status status;
&table_header);
if (ACPI_FAILURE(status))
return -ENODEV;
-@@ -95,21 +101,24 @@ static void acpi_table_attr_init(struct
+@@ -95,21 +101,24 @@
struct acpi_table_header *header = NULL;
struct acpi_table_attr *attr = NULL;
table_attr->attr.size = 0;
table_attr->attr.read = acpi_table_show;
-diff -purN linux-2.6.27/drivers/acpi/tables/tbutils.c linux-2.6.27.19-5.1/drivers/acpi/tables/tbutils.c
---- linux-2.6.27/drivers/acpi/tables/tbutils.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/tables/tbutils.c 2009-03-25 16:11:24.000000000 +0000
-@@ -420,7 +420,8 @@ acpi_tb_parse_root_table(acpi_physical_a
-
- /* Differentiate between RSDT and XSDT root tables */
-
-- if (rsdp->revision > 1 && rsdp->xsdt_physical_address) {
-+ if (rsdp->revision > 1 && rsdp->xsdt_physical_address
-+ && !acpi_gbl_force_rsdt) {
- /*
- * Root table is an XSDT (64-bit physical addresses). We must use the
- * XSDT if the revision is > 1 and the XSDT pointer is present, as per
-@@ -512,10 +513,9 @@ acpi_tb_parse_root_table(acpi_physical_a
- if (ACPI_FAILURE(status)) {
- ACPI_WARNING((AE_INFO,
- "Truncating %u table entries!",
-- (unsigned)
-- (acpi_gbl_root_table_list.size -
-- acpi_gbl_root_table_list.
-- count)));
-+ (unsigned) (table_count -
-+ (acpi_gbl_root_table_list.
-+ count - 2))));
- break;
- }
- }
-diff -purN linux-2.6.27/drivers/acpi/tables/tbxface.c linux-2.6.27.19-5.1/drivers/acpi/tables/tbxface.c
---- linux-2.6.27/drivers/acpi/tables/tbxface.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/tables/tbxface.c 2009-03-25 16:11:24.000000000 +0000
-@@ -487,7 +487,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_table_by_ind
- * the RSDT/XSDT.
- *
- ******************************************************************************/
--static acpi_status acpi_tb_load_namespace(void)
-+static acpi_status __init acpi_tb_load_namespace(void)
- {
- acpi_status status;
- struct acpi_table_header *table;
-@@ -612,7 +612,7 @@ static acpi_status acpi_tb_load_namespac
- *
- ******************************************************************************/
-
--acpi_status acpi_load_tables(void)
-+acpi_status __init acpi_load_tables(void)
- {
- acpi_status status;
-
-@@ -630,9 +630,6 @@ acpi_status acpi_load_tables(void)
- return_ACPI_STATUS(status);
- }
-
--ACPI_EXPORT_SYMBOL(acpi_load_tables)
--
--
- /*******************************************************************************
- *
- * FUNCTION: acpi_install_table_handler
-diff -purN linux-2.6.27/drivers/acpi/tables.c linux-2.6.27.19-5.1/drivers/acpi/tables.c
---- linux-2.6.27/drivers/acpi/tables.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/tables.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/tables.c
+--- a/drivers/acpi/tables.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/tables.c Wed May 06 16:56:14 2009 +0100
@@ -32,6 +32,7 @@
#include <linux/errno.h>
#include <linux/acpi.h>
#define PREFIX "ACPI: "
-@@ -282,6 +283,37 @@ static void __init check_multiple_madt(v
+@@ -282,6 +283,37 @@
return;
}
/*
* acpi_table_init()
*
-@@ -293,7 +325,17 @@ static void __init check_multiple_madt(v
+@@ -293,7 +325,17 @@
int __init acpi_table_init(void)
{
check_multiple_madt();
return 0;
}
-diff -purN linux-2.6.27/drivers/acpi/thermal.c linux-2.6.27.19-5.1/drivers/acpi/thermal.c
---- linux-2.6.27/drivers/acpi/thermal.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/thermal.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/tables/tbutils.c
+--- a/drivers/acpi/tables/tbutils.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/tables/tbutils.c Wed May 06 16:56:14 2009 +0100
+@@ -420,7 +420,8 @@
+
+ /* Differentiate between RSDT and XSDT root tables */
+
+- if (rsdp->revision > 1 && rsdp->xsdt_physical_address) {
++ if (rsdp->revision > 1 && rsdp->xsdt_physical_address
++ && !acpi_gbl_force_rsdt) {
+ /*
+ * Root table is an XSDT (64-bit physical addresses). We must use the
+ * XSDT if the revision is > 1 and the XSDT pointer is present, as per
+@@ -512,10 +513,9 @@
+ if (ACPI_FAILURE(status)) {
+ ACPI_WARNING((AE_INFO,
+ "Truncating %u table entries!",
+- (unsigned)
+- (acpi_gbl_root_table_list.size -
+- acpi_gbl_root_table_list.
+- count)));
++ (unsigned) (table_count -
++ (acpi_gbl_root_table_list.
++ count - 2))));
+ break;
+ }
+ }
+diff -r 9608d5473017 drivers/acpi/tables/tbxface.c
+--- a/drivers/acpi/tables/tbxface.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/tables/tbxface.c Wed May 06 16:56:14 2009 +0100
+@@ -487,7 +487,7 @@
+ * the RSDT/XSDT.
+ *
+ ******************************************************************************/
+-static acpi_status acpi_tb_load_namespace(void)
++static acpi_status __init acpi_tb_load_namespace(void)
+ {
+ acpi_status status;
+ struct acpi_table_header *table;
+@@ -612,7 +612,7 @@
+ *
+ ******************************************************************************/
+
+-acpi_status acpi_load_tables(void)
++acpi_status __init acpi_load_tables(void)
+ {
+ acpi_status status;
+
+@@ -629,9 +629,6 @@
+
+ return_ACPI_STATUS(status);
+ }
+-
+-ACPI_EXPORT_SYMBOL(acpi_load_tables)
+-
+
+ /*******************************************************************************
+ *
+diff -r 9608d5473017 drivers/acpi/thermal.c
+--- a/drivers/acpi/thermal.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/thermal.c Wed May 06 16:56:14 2009 +0100
@@ -42,6 +42,7 @@
#include <linux/kmod.h>
#include <linux/seq_file.h>
#include <asm/uaccess.h>
#include <linux/thermal.h>
#include <acpi/acpi_bus.h>
-@@ -246,18 +247,18 @@ static const struct file_operations acpi
+@@ -246,18 +247,18 @@
static int acpi_thermal_get_temperature(struct acpi_thermal *tz)
{
acpi_status status = AE_OK;
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Temperature is %lu dK\n",
tz->temperature));
-@@ -267,17 +268,16 @@ static int acpi_thermal_get_temperature(
+@@ -267,17 +268,16 @@
static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz)
{
acpi_status status = AE_OK;
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Polling frequency is %lu dS\n",
tz->polling_frequency));
-@@ -356,6 +356,7 @@ do { \
+@@ -356,6 +356,7 @@
static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
{
acpi_status status = AE_OK;
struct acpi_handle_list devices;
int valid = 0;
int i;
-@@ -363,7 +364,8 @@ static int acpi_thermal_trips_update(str
+@@ -363,7 +364,8 @@
/* Critical Shutdown (required) */
if (flag & ACPI_TRIPS_CRITICAL) {
status = acpi_evaluate_integer(tz->device->handle,
/*
* Treat freezing temperatures as invalid as well; some
* BIOSes return really low values and cause reboots at startup.
-@@ -399,12 +401,13 @@ static int acpi_thermal_trips_update(str
+@@ -399,12 +401,13 @@
/* Critical Sleep (optional) */
if (flag & ACPI_TRIPS_HOT) {
status = acpi_evaluate_integer(tz->device->handle,
tz->trips.hot.flags.valid = 1;
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Found hot threshold [%lu]\n",
-@@ -418,33 +421,40 @@ static int acpi_thermal_trips_update(str
+@@ -418,33 +421,40 @@
if (psv == -1) {
status = AE_SUPPORT;
} else if (psv > 0) {
}
}
}
-@@ -479,7 +489,7 @@ static int acpi_thermal_trips_update(str
+@@ -479,7 +489,7 @@
if (flag & ACPI_TRIPS_ACTIVE) {
status = acpi_evaluate_integer(tz->device->handle,
if (ACPI_FAILURE(status)) {
tz->trips.active[i].flags.valid = 0;
if (i == 0)
-@@ -500,8 +510,10 @@ static int acpi_thermal_trips_update(str
+@@ -500,8 +510,10 @@
tz->trips.active[i - 2].temperature :
CELSIUS_TO_KELVIN(act));
break;
}
name[2] = 'L';
-@@ -1629,6 +1641,66 @@ static int acpi_thermal_get_info(struct
+@@ -1629,6 +1641,66 @@
return 0;
}
static int acpi_thermal_add(struct acpi_device *device)
{
int result = 0;
-@@ -1659,6 +1731,18 @@ static int acpi_thermal_add(struct acpi_
+@@ -1658,6 +1730,18 @@
+ result = acpi_thermal_register_thermal_zone(tz);
if (result)
goto free_memory;
-
++
+ if (dmi_check_system(thermal_psv_dmi_table)) {
+ if (tz->trips.passive.flags.valid &&
+ tz->trips.passive.temperature > CELSIUS_TO_KELVIN(85)) {
+ acpi_thermal_set_polling(tz, 5);
+ }
+ }
-+
+
result = acpi_thermal_add_fs(device);
if (result)
- goto unregister_thermal_zone;
-diff -purN linux-2.6.27/drivers/acpi/utilities/uteval.c linux-2.6.27.19-5.1/drivers/acpi/utilities/uteval.c
---- linux-2.6.27/drivers/acpi/utilities/uteval.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/utilities/uteval.c 2009-03-25 16:11:24.000000000 +0000
-@@ -69,6 +69,7 @@ static char *acpi_interfaces_supported[]
+diff -r 9608d5473017 drivers/acpi/utilities/uteval.c
+--- a/drivers/acpi/utilities/uteval.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/utilities/uteval.c Wed May 06 16:56:14 2009 +0100
+@@ -69,6 +69,7 @@
"Windows 2001.1", /* Windows Server 2003 */
"Windows 2001.1 SP1", /* Windows Server 2003 SP1 - Added 03/2006 */
"Windows 2006", /* Windows Vista - Added 03/2006 */
/* Feature Group Strings */
-diff -purN linux-2.6.27/drivers/acpi/utilities/utglobal.c linux-2.6.27.19-5.1/drivers/acpi/utilities/utglobal.c
---- linux-2.6.27/drivers/acpi/utilities/utglobal.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/utilities/utglobal.c 2009-03-25 16:11:24.000000000 +0000
-@@ -76,6 +76,7 @@ u8 acpi_gbl_method_executing = FALSE;
+diff -r 9608d5473017 drivers/acpi/utilities/utglobal.c
+--- a/drivers/acpi/utilities/utglobal.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/utilities/utglobal.c Wed May 06 16:56:14 2009 +0100
+@@ -76,6 +76,7 @@
/* System flags */
u32 acpi_gbl_startup_flags = 0;
/* System starts uninitialized */
-diff -purN linux-2.6.27/drivers/acpi/utils.c linux-2.6.27.19-5.1/drivers/acpi/utils.c
---- linux-2.6.27/drivers/acpi/utils.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/utils.c 2009-03-25 16:11:24.000000000 +0000
-@@ -256,7 +256,7 @@ EXPORT_SYMBOL(acpi_extract_package);
+diff -r 9608d5473017 drivers/acpi/utils.c
+--- a/drivers/acpi/utils.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/utils.c Wed May 06 16:56:14 2009 +0100
+@@ -256,7 +256,7 @@
acpi_status
acpi_evaluate_integer(acpi_handle handle,
acpi_string pathname,
{
acpi_status status = AE_OK;
union acpi_object *element;
-@@ -288,7 +288,7 @@ acpi_evaluate_integer(acpi_handle handle
+@@ -288,7 +288,7 @@
*data = element->integer.value;
kfree(element);
return AE_OK;
}
-diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/video.c
---- linux-2.6.27/drivers/acpi/video.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/video.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/video.c
+--- a/drivers/acpi/video.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/video.c Wed May 06 16:56:14 2009 +0100
@@ -36,6 +36,7 @@
#include <linux/backlight.h>
#include <linux/thermal.h>
#include <asm/uaccess.h>
#include <acpi/acpi_bus.h>
-@@ -291,20 +292,20 @@ static int acpi_video_device_lcd_set_lev
+@@ -291,20 +292,20 @@
int level);
static int acpi_video_device_lcd_get_level_current(
struct acpi_video_device *device,
int i;
struct acpi_video_device *vd =
(struct acpi_video_device *)bl_get_data(bd);
-@@ -336,7 +337,7 @@ static struct backlight_ops acpi_backlig
+@@ -336,7 +337,7 @@
/*video output device sysfs support*/
static int acpi_video_output_get(struct output_device *od)
{
struct acpi_video_device *vd =
(struct acpi_video_device *)dev_get_drvdata(&od->dev);
acpi_video_device_get_state(vd, &state);
-@@ -370,7 +371,7 @@ static int video_get_cur_state(struct th
+@@ -370,7 +371,7 @@
{
struct acpi_device *device = cdev->devdata;
struct acpi_video_device *video = acpi_driver_data(device);
int state;
acpi_video_device_lcd_get_level_current(video, &level);
-@@ -410,7 +411,7 @@ static struct thermal_cooling_device_ops
+@@ -410,7 +411,7 @@
/* device */
static int
{
int status;
-@@ -421,7 +422,7 @@ acpi_video_device_query(struct acpi_vide
+@@ -421,7 +422,7 @@
static int
acpi_video_device_get_state(struct acpi_video_device *device,
{
int status;
-@@ -436,7 +437,7 @@ acpi_video_device_set_state(struct acpi_
+@@ -436,7 +437,7 @@
int status;
union acpi_object arg0 = { ACPI_TYPE_INTEGER };
struct acpi_object_list args = { 1, &arg0 };
arg0.integer.value = state;
-@@ -482,6 +483,7 @@ acpi_video_device_lcd_set_level(struct a
+@@ -482,6 +483,7 @@
int status = AE_OK;
union acpi_object arg0 = { ACPI_TYPE_INTEGER };
struct acpi_object_list args = { 1, &arg0 };
arg0.integer.value = level;
-@@ -490,12 +492,16 @@ acpi_video_device_lcd_set_level(struct a
+@@ -490,12 +492,16 @@
status = acpi_evaluate_object(device->dev->handle, "_BCM",
&args, NULL);
device->brightness->curr = level;
{
if (device->cap._BQC)
return acpi_evaluate_integer(device->dev->handle, "_BQC", NULL,
-@@ -549,7 +555,7 @@ static int
+@@ -549,7 +555,7 @@
acpi_video_bus_set_POST(struct acpi_video_bus *video, unsigned long option)
{
int status;
union acpi_object arg0 = { ACPI_TYPE_INTEGER };
struct acpi_object_list args = { 1, &arg0 };
-@@ -564,7 +570,7 @@ acpi_video_bus_set_POST(struct acpi_vide
+@@ -564,7 +570,7 @@
}
static int
{
int status;
-@@ -575,7 +581,7 @@ acpi_video_bus_get_POST(struct acpi_vide
+@@ -575,7 +581,7 @@
static int
acpi_video_bus_POST_options(struct acpi_video_bus *video,
{
int status;
-@@ -627,6 +633,16 @@ acpi_video_bus_DOS(struct acpi_video_bus
- }
+@@ -624,6 +630,16 @@
- /*
+ Failed:
+ return status;
++}
++
++/*
+ * Simple comparison function used to sort backlight levels.
+ */
+
+acpi_video_cmp_level(const void *a, const void *b)
+{
+ return *(int *)a - *(int *)b;
-+}
-+
-+/*
- * Arg:
- * device : video output device (LCD, CRT, ..)
- *
-@@ -677,6 +693,10 @@ acpi_video_init_brightness(struct acpi_v
+ }
+
+ /*
+@@ -677,6 +693,10 @@
count++;
}
if (count < 2)
goto out_free_levels;
-@@ -711,7 +731,7 @@ static void acpi_video_device_find_cap(s
+@@ -711,7 +731,7 @@
{
acpi_handle h_dummy1;
u32 max_level = 0;
memset(&device->cap, 0, sizeof(device->cap));
-@@ -739,7 +759,19 @@ static void acpi_video_device_find_cap(s
+@@ -739,7 +759,19 @@
device->cap._DSS = 1;
}
if (device->cap._BCL && device->cap._BCM && max_level > 0) {
int result;
-@@ -785,18 +817,21 @@ static void acpi_video_device_find_cap(s
+@@ -785,18 +817,21 @@
printk(KERN_ERR PREFIX "Create sysfs link\n");
}
}
/*
-@@ -842,11 +877,16 @@ static void acpi_video_bus_find_cap(stru
+@@ -842,10 +877,15 @@
static int acpi_video_bus_check(struct acpi_video_bus *video)
{
acpi_status status = -ENOENT;
if (!video)
return -EINVAL;
-
++
+ dev = acpi_get_physical_pci_device(video->device->handle);
+ if (!dev)
+ return -ENODEV;
+ put_device(dev);
-+
+
/* Since there is no HID, CID and so on for VGA driver, we have
* to check well known required nodes.
- */
-@@ -918,7 +958,7 @@ static int acpi_video_device_state_seq_s
+@@ -918,7 +958,7 @@
{
int status;
struct acpi_video_device *dev = seq->private;
if (!dev)
-@@ -927,14 +967,14 @@ static int acpi_video_device_state_seq_s
+@@ -927,14 +967,14 @@
status = acpi_video_device_get_state(dev, &state);
seq_printf(seq, "state: ");
if (ACPI_SUCCESS(status))
else
seq_printf(seq, "<not supported>\n");
-@@ -992,7 +1032,7 @@ acpi_video_device_brightness_seq_show(st
+@@ -992,7 +1032,7 @@
}
seq_printf(seq, "levels: ");
seq_printf(seq, " %d", dev->brightness->levels[i]);
seq_printf(seq, "\ncurrent: %d\n", dev->brightness->curr);
-@@ -1031,7 +1071,7 @@ acpi_video_device_write_brightness(struc
+@@ -1031,7 +1071,7 @@
return -EFAULT;
/* validate through the list of available levels */
if (level == dev->brightness->levels[i]) {
if (ACPI_SUCCESS
(acpi_video_device_lcd_set_level(dev, level)))
-@@ -1217,7 +1257,7 @@ static int acpi_video_bus_ROM_open_fs(st
+@@ -1217,7 +1257,7 @@
static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset)
{
struct acpi_video_bus *video = seq->private;
int status;
-@@ -1232,7 +1272,7 @@ static int acpi_video_bus_POST_info_seq_
+@@ -1232,7 +1272,7 @@
printk(KERN_WARNING PREFIX
"This indicates a BIOS bug. Please contact the manufacturer.\n");
}
seq_printf(seq, "can POST: <integrated video>");
if (options & 2)
seq_printf(seq, " <PCI video>");
-@@ -1256,7 +1296,7 @@ static int acpi_video_bus_POST_seq_show(
+@@ -1256,7 +1296,7 @@
{
struct acpi_video_bus *video = seq->private;
int status;
if (!video)
-@@ -1303,7 +1343,7 @@ acpi_video_bus_write_POST(struct file *f
+@@ -1303,7 +1343,7 @@
struct seq_file *m = file->private_data;
struct acpi_video_bus *video = m->private;
char str[12] = { 0 };
if (!video || count + 1 > sizeof str)
-@@ -1473,7 +1513,7 @@ static int
+@@ -1473,7 +1513,7 @@
acpi_video_bus_get_one_device(struct acpi_device *device,
struct acpi_video_bus *video)
{
int status;
struct acpi_video_device *data;
struct acpi_video_device_attrib* attribute;
-@@ -1684,7 +1724,7 @@ acpi_video_get_next_level(struct acpi_vi
+@@ -1684,7 +1724,7 @@
max = max_below = 0;
min = min_above = 255;
/* Find closest level to level_current */
l = device->brightness->levels[i];
if (abs(l - level_current) < abs(delta)) {
delta = l - level_current;
-@@ -1694,7 +1734,7 @@ acpi_video_get_next_level(struct acpi_vi
+@@ -1694,7 +1734,7 @@
}
/* Ajust level_current to closest available level */
level_current += delta;
l = device->brightness->levels[i];
if (l < min)
min = l;
-@@ -1724,7 +1764,7 @@ acpi_video_get_next_level(struct acpi_vi
+@@ -1724,7 +1764,7 @@
static void
acpi_video_switch_brightness(struct acpi_video_device *device, int event)
{
if (!device->brightness)
return;
acpi_video_device_lcd_get_level_current(device, &level_current);
-@@ -1978,6 +2018,12 @@ static int acpi_video_bus_add(struct acp
+@@ -1978,6 +2018,12 @@
device->pnp.bus_id[3] = '0' + instance;
instance ++;
}
video->device = device;
strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);
-diff -purN linux-2.6.27/drivers/acpi/video_detect.c linux-2.6.27.19-5.1/drivers/acpi/video_detect.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/video_detect.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/video_detect.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/acpi/video_detect.c Wed May 06 16:56:14 2009 +0100
@@ -0,0 +1,283 @@
+/*
+ * Copyright (C) 2008 SuSE Linux Products GmbH
+ return 1;
+}
+__setup("acpi_display_output=", acpi_display_output);
-diff -purN linux-2.6.27/drivers/ata/ahci.c linux-2.6.27.19-5.1/drivers/ata/ahci.c
---- linux-2.6.27/drivers/ata/ahci.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/ahci.c 2009-03-25 16:11:13.000000000 +0000
-@@ -267,8 +267,8 @@ struct ahci_port_priv {
+diff -r 9608d5473017 drivers/ata/ahci.c
+--- a/drivers/ata/ahci.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/ahci.c Wed May 06 16:56:14 2009 +0100
+@@ -267,8 +267,8 @@
* per PM slot */
};
static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc);
static bool ahci_qc_fill_rtf(struct ata_queued_cmd *qc);
-@@ -820,10 +820,10 @@ static unsigned ahci_scr_offset(struct a
+@@ -820,10 +820,10 @@
return 0;
}
if (offset) {
*val = readl(port_mmio + offset);
-@@ -832,10 +832,10 @@ static int ahci_scr_read(struct ata_port
+@@ -832,10 +832,10 @@
return -EINVAL;
}
if (offset) {
writel(val, port_mmio + offset);
-@@ -973,7 +973,7 @@ static void ahci_disable_alpm(struct ata
+@@ -973,7 +973,7 @@
writel(PORT_IRQ_PHYRDY, port_mmio + PORT_IRQ_STAT);
/* go ahead and clean out PhyRdy Change from Serror too */
/*
* Clear flag to indicate that we should ignore all PhyRdy
-@@ -1937,8 +1937,8 @@ static void ahci_error_intr(struct ata_p
+@@ -1937,8 +1937,8 @@
ata_ehi_push_desc(host_ehi, "irq_stat 0x%08x", irq_stat);
/* AHCI needs SError cleared; otherwise, it might lock up */
host_ehi->serror |= serror;
/* some controllers set IRQ_IF_ERR on device errors, ignore it */
-@@ -2027,7 +2027,7 @@ static void ahci_port_intr(struct ata_po
+@@ -2027,7 +2027,7 @@
if ((hpriv->flags & AHCI_HFLAG_NO_HOTPLUG) &&
(status & PORT_IRQ_PHYRDY)) {
status &= ~PORT_IRQ_PHYRDY;
}
if (unlikely(status & PORT_IRQ_ERROR)) {
-@@ -2528,6 +2528,32 @@ static void ahci_p5wdh_workaround(struct
+@@ -2528,6 +2528,32 @@
}
}
static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
static int printed_version;
-@@ -2623,6 +2649,12 @@ static int ahci_init_one(struct pci_dev
+@@ -2623,6 +2649,12 @@
}
}
/* CAP.NP sometimes indicate the index of the last enabled
* port, at other times, that of the last possible port, so
* determining the maximum port number requires looking at
-diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/ata_piix.c
---- linux-2.6.27/drivers/ata/ata_piix.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/ata_piix.c 2009-03-25 16:11:13.000000000 +0000
-@@ -165,8 +165,10 @@ static void piix_set_dmamode(struct ata_
+diff -r 9608d5473017 drivers/ata/ata_piix.c
+--- a/drivers/ata/ata_piix.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/ata_piix.c Wed May 06 16:56:14 2009 +0100
+@@ -165,8 +165,10 @@
static void ich_set_dmamode(struct ata_port *ap, struct ata_device *adev);
static int ich_pata_cable_detect(struct ata_port *ap);
static u8 piix_vmw_bmdma_status(struct ata_port *ap);
#ifdef CONFIG_PM
static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
static int piix_pci_device_resume(struct pci_dev *pdev);
-@@ -278,12 +280,15 @@ static const struct pci_device_id piix_p
+@@ -278,12 +280,15 @@
/* SATA Controller IDE (PCH) */
{ 0x8086, 0x3b20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
/* SATA Controller IDE (PCH) */
+ { 0x8086, 0x3b21, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
+ /* SATA Controller IDE (PCH) */
{ 0x8086, 0x3b26, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
- /* SATA Controller IDE (PCH) */
-+ { 0x8086, 0x3b28, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
+ /* SATA Controller IDE (PCH) */
++ { 0x8086, 0x3b28, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
+ /* SATA Controller IDE (PCH) */
{ 0x8086, 0x3b2d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (PCH) */
{ 0x8086, 0x3b2e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
{ } /* terminate list */
};
-@@ -582,6 +587,7 @@ static const struct ich_laptop ich_lapto
+@@ -582,6 +587,7 @@
{ 0x27DF, 0x1025, 0x0110 }, /* ICH7 on Acer 3682WLMi */
{ 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */
{ 0x27DF, 0x103C, 0x30A1 }, /* ICH7 on HP Compaq nc2400 */
{ 0x24CA, 0x1025, 0x0061 }, /* ICH4 on ACER Aspire 2023WLMi */
{ 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */
{ 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */
-@@ -885,23 +891,9 @@ static void ich_set_dmamode(struct ata_p
+@@ -885,23 +891,9 @@
* Serial ATA Index/Data Pair Superset Registers access
*
* Beginning from ICH8, there's a sane way to access SCRs using index
*/
static const int piix_sidx_map[] = {
[SCR_STATUS] = 0,
-@@ -909,120 +901,90 @@ static const int piix_sidx_map[] = {
+@@ -909,120 +901,90 @@
[SCR_CONTROL] = 1,
};
- piix_sidpr_sel(dev, reg);
- return ioread32(hpriv->sidpr + PIIX_SIDPR_DATA);
-}
-+ struct piix_host_priv *hpriv = link->ap->host->private_data;
-
+-
-static void piix_sidpr_write(struct ata_device *dev, unsigned int reg, u32 val)
-{
- struct piix_host_priv *hpriv = dev->link->ap->host->private_data;
-+ if (reg >= ARRAY_SIZE(piix_sidx_map))
-+ return -EINVAL;
-
+-
- piix_sidpr_sel(dev, reg);
- iowrite32(val, hpriv->sidpr + PIIX_SIDPR_DATA);
-+ piix_sidpr_sel(link, reg);
-+ *val = ioread32(hpriv->sidpr + PIIX_SIDPR_DATA);
-+ return 0;
- }
-
+-}
+-
-static u32 piix_merge_scr(u32 val0, u32 val1, const int * const *merge_tbl)
-+static irqreturn_t piix_interrupt(int irq, void *dev_instance)
- {
+-{
- u32 val = 0;
- int i, mi;
-+ struct ata_host *host = dev_instance;
-+ unsigned int i;
-+ unsigned int handled = 0;
-+ unsigned long flags;
-
+-
- for (i = 0, mi = 0; i < 32 / 4; i++) {
- u8 c0 = (val0 >> (i * 4)) & 0xf;
- u8 c1 = (val1 >> (i * 4)) & 0xf;
- done:
- val |= merged << (i * 4);
- }
-+ spin_lock_irqsave(&host->lock, flags);
-
+-
- return val;
-}
-
- NULL,
- };
- u32 v0, v1;
++ struct piix_host_priv *hpriv = link->ap->host->private_data;
+
+ if (reg >= ARRAY_SIZE(piix_sidx_map))
+ return -EINVAL;
+
+- if (!(ap->flags & ATA_FLAG_SLAVE_POSS)) {
+- *val = piix_sidpr_read(&ap->link.device[0], reg);
+- return 0;
+- }
+-
+- v0 = piix_sidpr_read(&ap->link.device[0], reg);
+- v1 = piix_sidpr_read(&ap->link.device[1], reg);
+-
+- switch (reg) {
+- case SCR_STATUS:
+- *val = piix_merge_scr(v0, v1, sstatus_merge_tbl);
+- break;
+- case SCR_ERROR:
+- *val = v0 | v1;
+- break;
+- case SCR_CONTROL:
+- *val = piix_merge_scr(v0, v1, scontrol_merge_tbl);
+- break;
+- }
+-
++ piix_sidpr_sel(link, reg);
++ *val = ioread32(hpriv->sidpr + PIIX_SIDPR_DATA);
+ return 0;
+ }
+
+-static int piix_sidpr_scr_write(struct ata_port *ap, unsigned int reg, u32 val)
++static irqreturn_t piix_interrupt(int irq, void *dev_instance)
+ {
++ struct ata_host *host = dev_instance;
++ unsigned int i;
++ unsigned int handled = 0;
++ unsigned long flags;
++
++ spin_lock_irqsave(&host->lock, flags);
++
+ for (i = 0; i < host->n_ports; i++) {
+ struct ata_port *ap = host->ports[i];
+ struct ata_queued_cmd *qc;
+ handled |= ata_sff_host_intr(ap, qc);
+ continue;
+ }
-
-- if (reg >= ARRAY_SIZE(piix_sidx_map))
-- return -EINVAL;
++
+ /*
+ * Control reaches here if HSM is not expecting IRQ.
+ * If the controller is actually asserting IRQ line,
+ */
+ if (unlikely(!ap->ioaddr.bmdma_addr))
+ continue;
-
-- if (!(ap->flags & ATA_FLAG_SLAVE_POSS)) {
-- *val = piix_sidpr_read(&ap->link.device[0], reg);
-- return 0;
++
+ host_stat = ap->ops->bmdma_status(ap);
+ if (!(host_stat & ATA_DMA_INTR))
+ continue;
+ ap->ops->sff_check_status(ap);
+ ap->ops->sff_irq_clear(ap);
+ handled |= 1;
- }
-
-- v0 = piix_sidpr_read(&ap->link.device[0], reg);
-- v1 = piix_sidpr_read(&ap->link.device[1], reg);
--
-- switch (reg) {
-- case SCR_STATUS:
-- *val = piix_merge_scr(v0, v1, sstatus_merge_tbl);
-- break;
-- case SCR_ERROR:
-- *val = v0 | v1;
-- break;
-- case SCR_CONTROL:
-- *val = piix_merge_scr(v0, v1, scontrol_merge_tbl);
-- break;
-- }
++ }
++
+ spin_unlock_irqrestore(&host->lock, flags);
-
-- return 0;
++
+ return IRQ_RETVAL(handled);
- }
-
--static int piix_sidpr_scr_write(struct ata_port *ap, unsigned int reg, u32 val)
++}
++
+static int piix_sidpr_scr_write(struct ata_link *link,
+ unsigned int reg, u32 val)
- {
++{
+ struct piix_host_priv *hpriv = link->ap->host->private_data;
+
if (reg >= ARRAY_SIZE(piix_sidx_map))
return 0;
}
-@@ -1157,6 +1119,28 @@ static int piix_broken_suspend(void)
+@@ -1156,6 +1118,28 @@
+ for (i = 0; i < ARRAY_SIZE(oemstrs); i++)
if (dmi_find_device(DMI_DEV_TYPE_OEM_STRING, oemstrs[i], NULL))
return 1;
-
++
+ /* TECRA M4 sometimes forgets its identify and reports bogus
+ * DMI information. As the bogus information is a bit
+ * generic, match as many entries as possible. This manual
+ !strcmp(dmi_get_system_info(DMI_BOARD_NAME), "Portable PC") &&
+ !strcmp(dmi_get_system_info(DMI_BOARD_VERSION), "Version A0"))
+ return 1;
-+
+
return 0;
}
-
-@@ -1363,28 +1347,28 @@ static const int *__devinit piix_init_sa
+@@ -1363,28 +1347,28 @@
return map;
}
hpriv->sidpr = pcim_iomap_table(pdev)[PIIX_SIDPR_BAR];
-@@ -1392,7 +1376,7 @@ static void __devinit piix_init_sidpr(st
+@@ -1392,7 +1376,7 @@
* Give it a test drive by inhibiting power save modes which
* we'll do anyway.
*/
/* if IPM is already 3, SCR access is probably working. Don't
* un-inhibit power save modes as BIOS might have inhibited
-@@ -1400,18 +1384,30 @@ static void __devinit piix_init_sidpr(st
+@@ -1400,18 +1384,30 @@
*/
if ((scontrol & 0xf00) != 0x300) {
scontrol |= 0x300;
"SIDPR is available but doesn't work\n");
- return;
+ return 0;
-+ }
-+ }
-+
+ }
+ }
+
+- host->ports[0]->ops = &piix_sidpr_sata_ops;
+- host->ports[1]->ops = &piix_sidpr_sata_ops;
+ /* okay, SCRs available, set ops and ask libata for slave_link */
+ for (i = 0; i < 2; i++) {
+ struct ata_port *ap = host->ports[i];
+ rc = ata_slave_link_init(ap);
+ if (rc)
+ return rc;
- }
- }
-
-- host->ports[0]->ops = &piix_sidpr_sata_ops;
-- host->ports[1]->ops = &piix_sidpr_sata_ops;
++ }
++ }
++
+ return 0;
}
static void piix_iocfg_bit18_quirk(struct pci_dev *pdev)
-@@ -1449,6 +1445,32 @@ static void piix_iocfg_bit18_quirk(struc
+@@ -1449,6 +1445,32 @@
}
}
/**
* piix_init_one - Register PIIX ATA PCI device with kernel services
* @pdev: PCI device to register
-@@ -1484,6 +1506,14 @@ static int __devinit piix_init_one(struc
+@@ -1483,6 +1505,14 @@
+ /* no hotplugging support (FIXME) */
if (!in_module_init)
return -ENODEV;
-
++
+ if (piix_broken_system_poweroff(pdev)) {
+ piix_port_info[ent->driver_data].flags |=
+ ATA_FLAG_NO_POWEROFF_SPINDOWN |
+ dev_info(&pdev->dev, "quirky BIOS, skipping spindown "
+ "on poweroff and hibernation\n");
+ }
-+
+
port_info[0] = piix_port_info[ent->driver_data];
port_info[1] = piix_port_info[ent->driver_data];
-
-@@ -1521,7 +1551,9 @@ static int __devinit piix_init_one(struc
+@@ -1521,7 +1551,9 @@
/* initialize controller */
if (port_flags & ATA_FLAG_SATA) {
piix_init_pcs(host, piix_map_db_table[ent->driver_data]);
}
/* apply IOCFG bit18 quirk */
-@@ -1547,7 +1579,7 @@ static int __devinit piix_init_one(struc
+@@ -1547,7 +1579,7 @@
}
pci_set_master(pdev);
}
static int __init piix_init(void)
-diff -purN linux-2.6.27/drivers/ata/libata-acpi.c linux-2.6.27.19-5.1/drivers/ata/libata-acpi.c
---- linux-2.6.27/drivers/ata/libata-acpi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/libata-acpi.c 2009-03-25 16:11:13.000000000 +0000
-@@ -120,21 +120,6 @@ static void ata_acpi_associate_ide_port(
+diff -r 9608d5473017 drivers/ata/libata-acpi.c
+--- a/drivers/ata/libata-acpi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/libata-acpi.c Wed May 06 16:56:14 2009 +0100
+@@ -120,21 +120,6 @@
ap->pflags |= ATA_PFLAG_INIT_GTM_VALID;
}
/* @ap and @dev are the same as ata_acpi_handle_hotplug() */
static void ata_acpi_detach_device(struct ata_port *ap, struct ata_device *dev)
{
-@@ -157,7 +142,6 @@ static void ata_acpi_detach_device(struc
+@@ -157,7 +142,6 @@
* @ap: ATA port ACPI event occurred
* @dev: ATA device ACPI event occurred (can be NULL)
* @event: ACPI event which occurred
*
* All ACPI bay / device realted events end up in this function. If
* the event is port-wide @dev is NULL. If the event is specific to a
-@@ -171,117 +155,100 @@ static void ata_acpi_detach_device(struc
+@@ -171,116 +155,99 @@
* ACPI notify handler context. May sleep.
*/
static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device *dev,
-static void ata_acpi_dev_notify(acpi_handle handle, u32 event, void *data)
+static void ata_acpi_uevent(struct ata_port *ap, struct ata_device *dev,
+ u32 event)
- {
-- struct ata_device *dev = data;
++{
+ struct kobject *kobj = NULL;
+ char event_string[20];
+ char *envp[] = { event_string, NULL };
-
-- ata_acpi_handle_hotplug(dev->link->ap, dev, event, 0);
++
+ if (dev) {
+ if (dev->sdev)
+ kobj = &dev->sdev->sdev_gendev.kobj;
+ snprintf(event_string, 20, "BAY_EVENT=%d", event);
+ kobject_uevent_env(kobj, KOBJ_CHANGE, envp);
+ }
- }
-
--static void ata_acpi_ap_notify(acpi_handle handle, u32 event, void *data)
++}
++
+static void ata_acpi_ap_uevent(acpi_handle handle, u32 event, void *data)
- {
-- struct ata_port *ap = data;
++{
+ ata_acpi_uevent(data, NULL, event);
+}
-
-- ata_acpi_handle_hotplug(ap, NULL, event, 0);
++
+static void ata_acpi_dev_uevent(acpi_handle handle, u32 event, void *data)
-+{
-+ struct ata_device *dev = data;
+ {
+ struct ata_device *dev = data;
+-
+- ata_acpi_handle_hotplug(dev->link->ap, dev, event, 0);
+ ata_acpi_uevent(dev->link->ap, dev, event);
}
+-static void ata_acpi_ap_notify(acpi_handle handle, u32 event, void *data)
+-{
+- struct ata_port *ap = data;
+static struct acpi_dock_ops ata_acpi_dev_dock_ops = {
+ .handler = ata_acpi_dev_notify_dock,
+ .uevent = ata_acpi_dev_uevent,
+};
-+
+
+- ata_acpi_handle_hotplug(ap, NULL, event, 0);
+-}
+static struct acpi_dock_ops ata_acpi_ap_dock_ops = {
+ .handler = ata_acpi_ap_notify_dock,
+ .uevent = ata_acpi_ap_uevent,
+};
-+
+
/**
* ata_acpi_associate - associate ATA host with ACPI objects
- * @host: target ATA host
-@@ -315,24 +282,18 @@ void ata_acpi_associate(struct ata_host
+@@ -315,24 +282,18 @@
ata_acpi_associate_ide_port(ap);
if (ap->acpi_handle) {
}
}
}
-diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/ata/libata-core.c
---- linux-2.6.27/drivers/ata/libata-core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/libata-core.c 2009-03-25 16:11:14.000000000 +0000
-@@ -137,7 +137,7 @@ int libata_fua = 0;
+diff -r 9608d5473017 drivers/ata/libata-core.c
+--- a/drivers/ata/libata-core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/libata-core.c Wed May 06 16:56:14 2009 +0100
+@@ -137,7 +137,7 @@
module_param_named(fua, libata_fua, int, 0444);
MODULE_PARM_DESC(fua, "FUA support (0=off, 1=on)");
module_param_named(ignore_hpa, ata_ignore_hpa, int, 0644);
MODULE_PARM_DESC(ignore_hpa, "Ignore HPA limit (0=keep BIOS limits, 1=ignore limits, using full disk)");
-@@ -163,6 +163,67 @@ MODULE_LICENSE("GPL");
+@@ -162,6 +162,67 @@
+ MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
-
++
+/*
+ * Iterator helpers. Don't use directly.
+ *
+ return &ap->link;
+ return ap->slave_link;
+}
-+
+
/**
* ata_force_cbl - force cable type according to libata.force
- * @ap: ATA port of interest
-@@ -206,7 +267,8 @@ void ata_force_cbl(struct ata_port *ap)
+@@ -206,7 +267,8 @@
* the host link and all fan-out ports connected via PMP. If the
* device part is specified as 0 (e.g. 1.00:), it specifies the
* first fan-out link not the host link. Device number 15 always
*
* LOCKING:
* EH context.
-@@ -214,12 +276,11 @@ void ata_force_cbl(struct ata_port *ap)
+@@ -214,12 +276,11 @@
static void ata_force_link_limits(struct ata_link *link)
{
bool did_spd = false;
for (i = ata_force_tbl_size - 1; i >= 0; i--) {
const struct ata_force_ent *fe = &ata_force_tbl[i];
-@@ -266,9 +327,9 @@ static void ata_force_xfermask(struct at
+@@ -266,9 +327,9 @@
int alt_devno = devno;
int i;
for (i = ata_force_tbl_size - 1; i >= 0; i--) {
const struct ata_force_ent *fe = &ata_force_tbl[i];
-@@ -320,9 +381,9 @@ static void ata_force_horkage(struct ata
+@@ -320,9 +381,9 @@
int alt_devno = devno;
int i;
for (i = 0; i < ata_force_tbl_size; i++) {
const struct ata_force_ent *fe = &ata_force_tbl[i];
-@@ -551,7 +612,7 @@ u64 ata_tf_read_block(struct ata_taskfil
+@@ -551,7 +612,7 @@
if (tf->flags & ATA_TFLAG_LBA48) {
block |= (u64)tf->hob_lbah << 40;
block |= (u64)tf->hob_lbam << 32;
} else
block |= (tf->device & 0xf) << 24;
-@@ -1207,7 +1268,7 @@ u64 ata_tf_to_lba48(const struct ata_tas
+@@ -1207,7 +1268,7 @@
sectors |= ((u64)(tf->hob_lbah & 0xff)) << 40;
sectors |= ((u64)(tf->hob_lbam & 0xff)) << 32;
sectors |= (tf->lbah & 0xff) << 16;
sectors |= (tf->lbam & 0xff) << 8;
sectors |= (tf->lbal & 0xff);
-@@ -2100,6 +2161,10 @@ retry:
+@@ -2100,6 +2161,10 @@
static inline u8 ata_dev_knobble(struct ata_device *dev)
{
struct ata_port *ap = dev->link->ap;
return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(dev->id)));
}
-@@ -2428,6 +2493,13 @@ int ata_dev_configure(struct ata_device
+@@ -2428,6 +2493,13 @@
}
}
return 0;
err_out_nosup:
-@@ -2681,7 +2753,7 @@ static void sata_print_link_status(struc
+@@ -2681,7 +2753,7 @@
return;
sata_scr_read(link, SCR_CONTROL, &scontrol);
tmp = (sstatus >> 4) & 0xf;
ata_link_printk(link, KERN_INFO,
"SATA link up %s (SStatus %X SControl %X)\n",
-@@ -3372,6 +3444,12 @@ int ata_wait_ready(struct ata_link *link
+@@ -3372,6 +3444,12 @@
unsigned long nodev_deadline = ata_deadline(start, ATA_TMOUT_FF_WAIT);
int warned = 0;
if (time_after(nodev_deadline, deadline))
nodev_deadline = deadline;
-@@ -3593,7 +3671,7 @@ int ata_std_prereset(struct ata_link *li
+@@ -3593,7 +3671,7 @@
}
/* no point in trying softreset on offline link */
ehc->i.action &= ~ATA_EH_SOFTRESET;
return 0;
-@@ -3671,7 +3749,7 @@ int sata_link_hardreset(struct ata_link
+@@ -3671,7 +3749,7 @@
if (rc)
goto out;
/* if link is offline nothing more to do */
goto out;
/* Link is online. From this point, -ENODEV too is an error. */
-@@ -3956,6 +4034,7 @@ static const struct ata_blacklist_entry
+@@ -3956,6 +4034,7 @@
/* Weird ATAPI devices */
{ "TORiSAN DVD-ROM DRD-N216", NULL, ATA_HORKAGE_MAX_SEC_128 },
/* Devices we expect to fail diagnostics */
-@@ -3971,6 +4050,73 @@ static const struct ata_blacklist_entry
+@@ -3971,6 +4050,73 @@
{ "ST380817AS", "3.42", ATA_HORKAGE_NONCQ },
{ "ST3160023AS", "3.42", ATA_HORKAGE_NONCQ },
/* Blacklist entries taken from Silicon Image 3124/3132
Windows driver .inf file - also several Linux problem reports */
{ "HTS541060G9SA00", "MB3OC60D", ATA_HORKAGE_NONCQ, },
-@@ -3998,6 +4144,9 @@ static const struct ata_blacklist_entry
+@@ -3997,6 +4143,9 @@
+ { "TSSTcorp CDDVDW SH-S202J", "SB01", ATA_HORKAGE_IVB, },
{ "TSSTcorp CDDVDW SH-S202N", "SB00", ATA_HORKAGE_IVB, },
{ "TSSTcorp CDDVDW SH-S202N", "SB01", ATA_HORKAGE_IVB, },
-
++
+ /* Devices that do not need bridging limits applied */
+ { "MTRON MSP-SATA*", NULL, ATA_HORKAGE_BRIDGE_OK, },
-+
+
/* End Marker */
{ }
- };
-@@ -4369,7 +4518,8 @@ int atapi_check_dma(struct ata_queued_cm
+@@ -4369,7 +4518,8 @@
/* Don't allow DMA if it isn't multiple of 16 bytes. Quite a
* few ATAPI devices choke on such DMA requests.
*/
return 1;
if (ap->ops->check_atapi_dma)
-@@ -4868,10 +5018,8 @@ int sata_scr_valid(struct ata_link *link
+@@ -4868,10 +5018,8 @@
int sata_scr_read(struct ata_link *link, int reg, u32 *val)
{
if (ata_is_host_link(link)) {
return -EOPNOTSUPP;
}
-@@ -4897,10 +5045,8 @@ int sata_scr_read(struct ata_link *link,
+@@ -4897,10 +5045,8 @@
int sata_scr_write(struct ata_link *link, int reg, u32 val)
{
if (ata_is_host_link(link)) {
return -EOPNOTSUPP;
}
-@@ -4925,13 +5071,12 @@ int sata_scr_write(struct ata_link *link
+@@ -4925,13 +5071,12 @@
int sata_scr_write_flush(struct ata_link *link, int reg, u32 val)
{
if (ata_is_host_link(link)) {
return rc;
}
return -EOPNOTSUPP;
-@@ -4941,7 +5086,7 @@ int sata_scr_write_flush(struct ata_link
+@@ -4941,7 +5086,7 @@
}
/**
* @link: ATA link to test
*
* Test whether @link is online. Note that this function returns
-@@ -4952,20 +5097,20 @@ int sata_scr_write_flush(struct ata_link
+@@ -4952,20 +5097,20 @@
* None.
*
* RETURNS:
- * 1 if the port online status is available and online.
-+ * True if the port online status is available and online.
- */
+- */
-int ata_link_online(struct ata_link *link)
++ * True if the port online status is available and online.
++ */
+bool ata_phys_link_online(struct ata_link *link)
{
u32 sstatus;
(sstatus & 0xf) == 0x3)
- return 1;
- return 0;
+-}
+-
+-/**
+- * ata_link_offline - test whether the given link is offline
+ return true;
+ return false;
- }
-
- /**
-- * ata_link_offline - test whether the given link is offline
++}
++
++/**
+ * ata_phys_link_offline - test whether the given link is offline
* @link: ATA link to test
*
* Test whether @link is offline. Note that this function
-@@ -4976,16 +5121,68 @@ int ata_link_online(struct ata_link *lin
+@@ -4976,16 +5121,68 @@
* None.
*
* RETURNS:
- * 1 if the port offline status is available and offline.
-+ * True if the port offline status is available and offline.
- */
+- */
-int ata_link_offline(struct ata_link *link)
++ * True if the port offline status is available and offline.
++ */
+bool ata_phys_link_offline(struct ata_link *link)
{
u32 sstatus;
}
#ifdef CONFIG_PM
-@@ -5127,11 +5324,11 @@ int ata_port_start(struct ata_port *ap)
+@@ -5127,11 +5324,11 @@
*/
void ata_dev_init(struct ata_device *dev)
{
link->sata_spd_limit = link->hw_sata_spd_limit;
link->sata_spd = 0;
-@@ -5259,6 +5456,8 @@ struct ata_port *ata_port_alloc(struct a
+@@ -5259,6 +5456,8 @@
#ifdef CONFIG_ATA_SFF
INIT_DELAYED_WORK(&ap->port_task, ata_pio_task);
#endif
INIT_DELAYED_WORK(&ap->hotplug_task, ata_scsi_hotplug);
INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan);
-@@ -5294,6 +5493,7 @@ static void ata_host_release(struct devi
+@@ -5294,6 +5493,7 @@
scsi_host_put(ap->scsi_host);
kfree(ap->pmp_link);
kfree(ap);
host->ports[i] = NULL;
}
-@@ -5414,6 +5614,68 @@ struct ata_host *ata_host_alloc_pinfo(st
- return host;
- }
+@@ -5412,6 +5612,68 @@
+ }
+ return host;
++}
++
+/**
+ * ata_slave_link_init - initialize slave link
+ * @ap: port to initialize slave link for
+ ata_link_init(ap, link, 1);
+ ap->slave_link = link;
+ return 0;
-+}
-+
+ }
+
static void ata_host_stop(struct device *gendev, void *res)
- {
- struct ata_host *host = dev_get_drvdata(gendev);
-@@ -5640,6 +5902,8 @@ int ata_host_register(struct ata_host *h
+@@ -5640,6 +5902,8 @@
/* init sata_spd_limit to the current value */
sata_link_init_spd(&ap->link);
/* print per-port info to dmesg */
xfer_mask = ata_pack_xfermask(ap->pio_mask, ap->mwdma_mask,
-@@ -5796,7 +6060,7 @@ static void ata_port_detach(struct ata_p
+@@ -5796,7 +6060,7 @@
* to us. Restore SControl and disable all existing devices.
*/
__ata_port_for_each_link(link, ap) {
ata_link_for_each_dev(dev, link)
ata_dev_disable(dev);
}
-@@ -6260,10 +6524,12 @@ EXPORT_SYMBOL_GPL(ata_base_port_ops);
+@@ -6260,10 +6524,12 @@
EXPORT_SYMBOL_GPL(sata_port_ops);
EXPORT_SYMBOL_GPL(ata_dummy_port_ops);
EXPORT_SYMBOL_GPL(ata_dummy_port_info);
EXPORT_SYMBOL_GPL(ata_host_start);
EXPORT_SYMBOL_GPL(ata_host_register);
EXPORT_SYMBOL_GPL(ata_host_activate);
-diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/libata-eh.c
---- linux-2.6.27/drivers/ata/libata-eh.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/libata-eh.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/ata/libata-eh.c
+--- a/drivers/ata/libata-eh.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/libata-eh.c Wed May 06 16:56:14 2009 +0100
@@ -33,6 +33,7 @@
*/
#include <linux/pci.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
-@@ -457,29 +458,29 @@ static void ata_eh_clear_action(struct a
+@@ -457,29 +458,29 @@
* RETURNS:
* EH_HANDLED or EH_NOT_HANDLED
*/
}
spin_unlock_irqrestore(ap->lock, flags);
-@@ -604,9 +605,6 @@ void ata_scsi_error(struct Scsi_Host *ho
+@@ -604,9 +605,6 @@
if (ata_ncq_enabled(dev))
ehc->saved_ncq_enabled |= 1 << devno;
}
}
ap->pflags |= ATA_PFLAG_EH_IN_PROGRESS;
-@@ -831,7 +829,7 @@ void ata_qc_schedule_eh(struct ata_queue
+@@ -831,7 +829,7 @@
* Note that ATA_QCFLAG_FAILED is unconditionally set after
* this function completes.
*/
}
/**
-@@ -1203,7 +1201,10 @@ void ata_eh_about_to_do(struct ata_link
+@@ -1203,7 +1201,10 @@
ata_eh_clear_action(link, dev, ehi, action);
ap->pflags |= ATA_PFLAG_RECOVERED;
spin_unlock_irqrestore(ap->lock, flags);
-@@ -1756,7 +1757,7 @@ static unsigned int ata_eh_speed_down_ve
+@@ -1756,7 +1757,7 @@
static unsigned int ata_eh_speed_down(struct ata_device *dev,
unsigned int eflags, unsigned int err_mask)
{
int xfer_ok = 0;
unsigned int verdict;
unsigned int action = 0;
-@@ -1880,7 +1881,8 @@ static void ata_eh_link_autopsy(struct a
+@@ -1880,7 +1881,8 @@
for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag);
continue;
/* inherit upper level err_mask */
-@@ -1967,6 +1969,28 @@ void ata_eh_autopsy(struct ata_port *ap)
+@@ -1967,6 +1969,28 @@
ata_port_for_each_link(link, ap)
ata_eh_link_autopsy(link);
/* Autopsy of fanout ports can affect host link autopsy.
* Perform host link autopsy last.
*/
-@@ -2001,7 +2025,8 @@ static void ata_eh_link_report(struct at
+@@ -2001,7 +2025,8 @@
for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag);
((qc->flags & ATA_QCFLAG_QUIET) &&
qc->err_mask == AC_ERR_DEV))
continue;
-@@ -2068,7 +2093,7 @@ static void ata_eh_link_report(struct at
+@@ -2068,7 +2093,7 @@
char cdb_buf[70] = "";
if (!(qc->flags & ATA_QCFLAG_FAILED) ||
continue;
if (qc->dma_dir != DMA_NONE) {
-@@ -2160,12 +2185,14 @@ void ata_eh_report(struct ata_port *ap)
+@@ -2160,12 +2185,14 @@
}
static int ata_do_reset(struct ata_link *link, ata_reset_fn_t reset,
return reset(link, classes, deadline);
}
-@@ -2187,17 +2214,20 @@ int ata_eh_reset(struct ata_link *link,
+@@ -2187,17 +2214,20 @@
ata_reset_fn_t hardreset, ata_postreset_fn_t postreset)
{
struct ata_port *ap = link->ap;
/*
* Prepare to reset
-@@ -2209,17 +2239,21 @@ int ata_eh_reset(struct ata_link *link,
+@@ -2209,17 +2239,21 @@
if (link->flags & ATA_LFLAG_NO_SRST)
softreset = NULL;
ata_link_for_each_dev(dev, link) {
/* If we issue an SRST then an ATA drive (not ATAPI)
-@@ -2252,8 +2286,30 @@ int ata_eh_reset(struct ata_link *link,
+@@ -2252,8 +2286,30 @@
}
if (prereset) {
if (rc) {
if (rc == -ENOENT) {
ata_link_printk(link, KERN_DEBUG,
-@@ -2285,7 +2341,6 @@ int ata_eh_reset(struct ata_link *link,
+@@ -2285,7 +2341,6 @@
/*
* Perform reset
*/
if (ata_is_host_link(link))
ata_eh_freeze_port(ap);
-@@ -2297,30 +2352,57 @@ int ata_eh_reset(struct ata_link *link,
+@@ -2297,30 +2352,57 @@
reset == softreset ? "soft" : "hard");
/* mark that this EH session started with reset */
+ failed_link = link;
goto fail;
+ }
-+
+
+ /* hardreset slave link if existent */
+ if (slave && reset == hardreset) {
+ int tmp;
+ goto fail;
+ }
+ }
-
++
+ /* perform follow-up SRST if necessary */
if (reset == hardreset &&
ata_eh_followup_srst_needed(link, rc, classes)) {
}
} else {
if (verbose)
-@@ -2341,19 +2423,21 @@ int ata_eh_reset(struct ata_link *link,
+@@ -2341,19 +2423,21 @@
dev->pio_mode = XFER_PIO_0;
dev->flags &= ~ATA_DFLAG_SLEEPING;
/* thaw the port */
if (ata_is_host_link(link))
-@@ -2366,12 +2450,17 @@ int ata_eh_reset(struct ata_link *link,
+@@ -2366,12 +2450,17 @@
* reset and here. This race is mediated by cross checking
* link onlineness and classification result later.
*/
spin_unlock_irqrestore(link->ap->lock, flags);
/* Make sure onlineness and classification result correspond.
-@@ -2381,19 +2470,21 @@ int ata_eh_reset(struct ata_link *link,
+@@ -2381,19 +2470,21 @@
* link onlineness and classification result, those conditions
* can be reliably detected and retried.
*/
rc = -EAGAIN;
goto fail;
}
-@@ -2404,13 +2495,17 @@ int ata_eh_reset(struct ata_link *link,
+@@ -2404,13 +2495,17 @@
/* reset successful, schedule revalidation */
ata_eh_done(link, NULL, ATA_EH_RESET);
spin_lock_irqsave(ap->lock, flags);
ap->pflags &= ~ATA_PFLAG_RESETTING;
-@@ -2431,7 +2526,7 @@ int ata_eh_reset(struct ata_link *link,
+@@ -2431,7 +2526,7 @@
if (time_before(now, deadline)) {
unsigned long delta = deadline - now;
"reset failed (errno=%d), retrying in %u secs\n",
rc, DIV_ROUND_UP(jiffies_to_msecs(delta), 1000));
-@@ -2439,8 +2534,13 @@ int ata_eh_reset(struct ata_link *link,
+@@ -2439,8 +2534,13 @@
delta = schedule_timeout_uninterruptible(delta);
}
if (hardreset)
reset = hardreset;
goto retry;
-@@ -2472,7 +2572,7 @@ static int ata_eh_revalidate_and_attach(
+@@ -2472,7 +2572,7 @@
if ((action & ATA_EH_REVALIDATE) && ata_dev_enabled(dev)) {
WARN_ON(dev->class == ATA_DEV_PMP);
rc = -EIO;
goto err;
}
-@@ -2693,12 +2793,13 @@ static int ata_eh_handle_dev_fail(struct
+@@ -2693,12 +2793,13 @@
/* give it just one more chance */
ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1);
case -EIO:
}
}
-@@ -2707,7 +2808,7 @@ static int ata_eh_handle_dev_fail(struct
+@@ -2707,7 +2808,7 @@
ata_dev_disable(dev);
/* detach if offline */
ata_eh_detach_dev(dev);
/* schedule probe if necessary */
-diff -purN linux-2.6.27/drivers/ata/libata-scsi.c linux-2.6.27.19-5.1/drivers/ata/libata-scsi.c
---- linux-2.6.27/drivers/ata/libata-scsi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/libata-scsi.c 2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/ata/libata-scsi.c
+--- a/drivers/ata/libata-scsi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/libata-scsi.c Wed May 06 16:56:14 2009 +0100
@@ -46,6 +46,7 @@
#include <linux/libata.h>
#include <linux/hdreg.h>
#include "libata.h"
-@@ -1181,6 +1182,17 @@ static unsigned int ata_scsi_start_stop_
+@@ -1181,6 +1182,17 @@
tf->command = ATA_CMD_VERIFY; /* READ VERIFY */
} else {
/* XXX: This is for backward compatibility, will be
* removed. Read Documentation/feature-removal-schedule.txt
* for more info.
-@@ -1204,8 +1216,7 @@ static unsigned int ata_scsi_start_stop_
+@@ -1204,8 +1216,7 @@
scmd->scsi_done = qc->scsidone;
qc->scsidone = ata_delayed_done;
}
}
/* Issue ATA STANDBY IMMEDIATE command */
-@@ -1221,10 +1232,13 @@ static unsigned int ata_scsi_start_stop_
+@@ -1221,9 +1232,12 @@
return 0;
+ invalid_fld:
ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x0);
/* "Invalid field in cbd" */
- return 1;
++ return 1;
+ skip:
+ scmd->result = SAM_STAT_GOOD;
-+ return 1;
+ return 1;
}
-
-diff -purN linux-2.6.27/drivers/ata/libata-sff.c linux-2.6.27.19-5.1/drivers/ata/libata-sff.c
---- linux-2.6.27/drivers/ata/libata-sff.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/libata-sff.c 2009-03-25 16:11:13.000000000 +0000
-@@ -1227,10 +1227,19 @@ fsm_start:
+diff -r 9608d5473017 drivers/ata/libata-sff.c
+--- a/drivers/ata/libata-sff.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/libata-sff.c Wed May 06 16:56:14 2009 +0100
+@@ -1227,10 +1227,19 @@
/* ATA PIO protocol */
if (unlikely((status & ATA_DRQ) == 0)) {
/* handle BSY=0, DRQ=0 as error */
/* HSM violation. Let EH handle this.
* Phantom devices also trigger this
* condition. Mark hint.
-diff -purN linux-2.6.27/drivers/ata/libata.h linux-2.6.27.19-5.1/drivers/ata/libata.h
---- linux-2.6.27/drivers/ata/libata.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/libata.h 2009-03-25 16:11:14.000000000 +0000
-@@ -70,6 +70,7 @@ extern int atapi_passthru16;
+diff -r 9608d5473017 drivers/ata/libata.h
+--- a/drivers/ata/libata.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/libata.h Wed May 06 16:56:14 2009 +0100
+@@ -70,6 +70,7 @@
extern int libata_fua;
extern int libata_noacpi;
extern int libata_allow_tpm;
extern void ata_force_cbl(struct ata_port *ap);
extern u64 ata_tf_to_lba(const struct ata_taskfile *tf);
extern u64 ata_tf_to_lba48(const struct ata_taskfile *tf);
-@@ -107,6 +108,8 @@ extern void ata_qc_issue(struct ata_queu
+@@ -107,6 +108,8 @@
extern void __ata_qc_complete(struct ata_queued_cmd *qc);
extern int atapi_check_dma(struct ata_queued_cmd *qc);
extern void swap_buf_le16(u16 *buf, unsigned int buf_words);
extern void ata_dev_init(struct ata_device *dev);
extern void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp);
extern int sata_link_init_spd(struct ata_link *link);
-@@ -152,7 +155,7 @@ extern int ata_bus_probe(struct ata_port
+@@ -152,7 +155,7 @@
/* libata-eh.c */
extern unsigned long ata_internal_cmd_timeout(struct ata_device *dev, u8 cmd);
extern void ata_internal_cmd_timed_out(struct ata_device *dev, u8 cmd);
extern void ata_scsi_error(struct Scsi_Host *host);
extern void ata_port_wait_eh(struct ata_port *ap);
extern void ata_eh_fastdrain_timerfn(unsigned long arg);
-diff -purN linux-2.6.27/drivers/ata/pata_hpt366.c linux-2.6.27.19-5.1/drivers/ata/pata_hpt366.c
---- linux-2.6.27/drivers/ata/pata_hpt366.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/pata_hpt366.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/ata/pata_hpt366.c
+--- a/drivers/ata/pata_hpt366.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/pata_hpt366.c Wed May 06 16:56:14 2009 +0100
@@ -30,7 +30,7 @@
#define DRV_VERSION "0.6.2"
u32 timing;
};
-@@ -183,62 +183,37 @@ static unsigned long hpt366_filter(struc
+@@ -183,41 +183,68 @@
mask &= ~(0xF8 << ATA_SHIFT_UDMA);
if (hpt_dma_blacklisted(adev, "UDMA4", bad_ata66_4))
mask &= ~(0xF0 << ATA_SHIFT_UDMA);
- }
-- return ata_bmdma_mode_filter(adev, mask);
++ } else if (adev->class == ATA_DEV_ATAPI)
++ mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA);
++
+ return ata_bmdma_mode_filter(adev, mask);
-}
-
-/**
- * Return the 32bit register programming information for this channel
- * that matches the speed provided.
- */
-+ } else if (adev->class == ATA_DEV_ATAPI)
-+ mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA);
-
+-
-static u32 hpt36x_find_mode(struct ata_port *ap, int speed)
-{
- struct hpt_clock *clocks = ap->host->private_data;
- }
- BUG();
- return 0xffffffffU; /* silence compiler warning */
-+ return ata_bmdma_mode_filter(adev, mask);
}
static int hpt36x_cable_detect(struct ata_port *ap)
{
-- u8 ata66;
- struct pci_dev *pdev = to_pci_dev(ap->host->dev);
-+ u8 ata66;
++ struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+ u8 ata66;
+- struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+ /*
+ * Each channel of pata_hpt366 occupies separate PCI function
+ if (ata66 & 2)
return ATA_CBL_PATA40;
return ATA_CBL_PATA80;
- }
-
--/**
-- * hpt366_set_piomode - PIO setup
-- * @ap: ATA interface
-- * @adev: device on the interface
-- *
-- * Perform PIO mode setup.
-- */
--
--static void hpt366_set_piomode(struct ata_port *ap, struct ata_device *adev)
++}
++
+static void hpt366_set_mode(struct ata_port *ap, struct ata_device *adev,
+ u8 mode)
- {
++{
+ struct hpt_clock *clocks = ap->host->private_data;
- struct pci_dev *pdev = to_pci_dev(ap->host->dev);
-- u32 addr1, addr2;
-- u32 reg;
-- u32 mode;
++ struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+ u32 addr1 = 0x40 + 4 * (adev->devno + 2 * ap->port_no);
+ u32 addr2 = 0x51 + 4 * ap->port_no;
+ u32 mask, reg;
- u8 fast;
-
-- addr1 = 0x40 + 4 * (adev->devno + 2 * ap->port_no);
-- addr2 = 0x51 + 4 * ap->port_no;
--
- /* Fast interrupt prediction disable, hold off interrupt disable */
- pci_read_config_byte(pdev, addr2, &fast);
- if (fast & 0x80) {
-@@ -246,12 +221,43 @@ static void hpt366_set_piomode(struct at
- pci_write_config_byte(pdev, addr2, fast);
- }
-
++ u8 fast;
++
++ /* Fast interrupt prediction disable, hold off interrupt disable */
++ pci_read_config_byte(pdev, addr2, &fast);
++ if (fast & 0x80) {
++ fast &= ~0x80;
++ pci_write_config_byte(pdev, addr2, fast);
++ }
++
+ /* determine timing mask and find matching clock entry */
+ if (mode < XFER_MW_DMA_0)
+ mask = 0xc1f8ffff;
+ * on-chip PIO FIFO/buffer (and PIO MST mode as well) to avoid
+ * problems handling I/O errors later.
+ */
- pci_read_config_dword(pdev, addr1, ®);
++ pci_read_config_dword(pdev, addr1, ®);
++ reg = ((reg & ~mask) | (clocks->timing & mask)) & ~0xc0000000;
++ pci_write_config_dword(pdev, addr1, reg);
+ }
+
+ /**
+@@ -230,28 +257,7 @@
+
+ static void hpt366_set_piomode(struct ata_port *ap, struct ata_device *adev)
+ {
+- struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+- u32 addr1, addr2;
+- u32 reg;
+- u32 mode;
+- u8 fast;
+-
+- addr1 = 0x40 + 4 * (adev->devno + 2 * ap->port_no);
+- addr2 = 0x51 + 4 * ap->port_no;
+-
+- /* Fast interrupt prediction disable, hold off interrupt disable */
+- pci_read_config_byte(pdev, addr2, &fast);
+- if (fast & 0x80) {
+- fast &= ~0x80;
+- pci_write_config_byte(pdev, addr2, fast);
+- }
+-
+- pci_read_config_dword(pdev, addr1, ®);
- mode = hpt36x_find_mode(ap, adev->pio_mode);
- mode &= ~0x8000000; /* No FIFO in PIO */
- mode &= ~0x30070000; /* Leave config bits alone */
- reg &= 0x30070000; /* Strip timing bits */
- pci_write_config_dword(pdev, addr1, reg | mode);
-+ reg = ((reg & ~mask) | (clocks->timing & mask)) & ~0xc0000000;
-+ pci_write_config_dword(pdev, addr1, reg);
-+}
-+
-+/**
-+ * hpt366_set_piomode - PIO setup
-+ * @ap: ATA interface
-+ * @adev: device on the interface
-+ *
-+ * Perform PIO mode setup.
-+ */
-+
-+static void hpt366_set_piomode(struct ata_port *ap, struct ata_device *adev)
-+{
+ hpt366_set_mode(ap, adev, adev->pio_mode);
}
/**
-@@ -265,28 +271,7 @@ static void hpt366_set_piomode(struct at
+@@ -265,28 +271,7 @@
static void hpt366_set_dmamode(struct ata_port *ap, struct ata_device *adev)
{
}
static struct scsi_host_template hpt36x_sht = {
-@@ -382,10 +367,10 @@ static int hpt36x_init_one(struct pci_de
+@@ -382,10 +367,10 @@
/* PCI clocking determines the ATA timing values to use */
/* info_hpt366 is safe against re-entry so we can scribble on it */
switch((reg1 & 0x700) >> 8) {
hpriv = &hpt366_25;
break;
default:
-diff -purN linux-2.6.27/drivers/ata/pata_it821x.c linux-2.6.27.19-5.1/drivers/ata/pata_it821x.c
---- linux-2.6.27/drivers/ata/pata_it821x.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/pata_it821x.c 2009-03-25 16:11:14.000000000 +0000
-@@ -557,9 +557,8 @@ static unsigned int it821x_read_id(struc
+diff -r 9608d5473017 drivers/ata/pata_it821x.c
+--- a/drivers/ata/pata_it821x.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/pata_it821x.c Wed May 06 16:56:14 2009 +0100
+@@ -557,9 +557,8 @@
if (strstr(model_num, "Integrated Technology Express")) {
/* Set feature bits the firmware neglects */
id[49] |= 0x0300; /* LBA, DMA */
id[86] |= 0x0400; /* LBA48 on */
id[ATA_ID_MAJOR_VER] |= 0x1F;
}
-diff -purN linux-2.6.27/drivers/ata/pata_of_platform.c linux-2.6.27.19-5.1/drivers/ata/pata_of_platform.c
---- linux-2.6.27/drivers/ata/pata_of_platform.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/pata_of_platform.c 2009-03-25 16:11:14.000000000 +0000
-@@ -91,6 +91,7 @@ static struct of_device_id pata_of_platf
+diff -r 9608d5473017 drivers/ata/pata_of_platform.c
+--- a/drivers/ata/pata_of_platform.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/pata_of_platform.c Wed May 06 16:56:14 2009 +0100
+@@ -91,6 +91,7 @@
MODULE_DEVICE_TABLE(of, pata_of_platform_match);
static struct of_platform_driver pata_of_platform_driver = {
.name = "pata_of_platform",
.match_table = pata_of_platform_match,
.probe = pata_of_platform_probe,
-diff -purN linux-2.6.27/drivers/ata/pata_sch.c linux-2.6.27.19-5.1/drivers/ata/pata_sch.c
---- linux-2.6.27/drivers/ata/pata_sch.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/pata_sch.c 2009-03-25 16:11:14.000000000 +0000
-@@ -83,7 +83,7 @@ static struct ata_port_operations sch_pa
+diff -r 9608d5473017 drivers/ata/pata_sch.c
+--- a/drivers/ata/pata_sch.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/pata_sch.c Wed May 06 16:56:14 2009 +0100
+@@ -83,7 +83,7 @@
};
static struct ata_port_info sch_port_info = {
.pio_mask = ATA_PIO4, /* pio0-4 */
.mwdma_mask = ATA_MWDMA2, /* mwdma0-2 */
.udma_mask = ATA_UDMA5, /* udma0-5 */
-diff -purN linux-2.6.27/drivers/ata/pata_via.c linux-2.6.27.19-5.1/drivers/ata/pata_via.c
---- linux-2.6.27/drivers/ata/pata_via.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/pata_via.c 2009-03-25 16:11:14.000000000 +0000
-@@ -87,6 +87,10 @@ enum {
+diff -r 9608d5473017 drivers/ata/pata_via.c
+--- a/drivers/ata/pata_via.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/pata_via.c Wed May 06 16:56:14 2009 +0100
+@@ -87,6 +87,10 @@
VIA_SATA_PATA = 0x800, /* SATA/PATA combined configuration */
};
/*
* VIA SouthBridge chips.
*/
-@@ -98,12 +102,17 @@ static const struct via_isa_bridge {
+@@ -98,12 +102,17 @@
u8 rev_max;
u16 flags;
} via_isa_bridges[] = {
{ "vt8237a", PCI_DEVICE_ID_VIA_8237A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
{ "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
{ "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
-@@ -123,6 +132,8 @@ static const struct via_isa_bridge {
+@@ -123,6 +132,8 @@
{ "vt82c586", PCI_DEVICE_ID_VIA_82C586_0, 0x00, 0x0f, VIA_UDMA_NONE | VIA_SET_FIFO },
{ "vt82c576", PCI_DEVICE_ID_VIA_82C576, 0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK },
{ "vt82c576", PCI_DEVICE_ID_VIA_82C576, 0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK | VIA_BAD_ID },
{ NULL }
};
-@@ -461,6 +472,7 @@ static int via_init_one(struct pci_dev *
+@@ -461,6 +472,7 @@
static int printed_version;
u8 enable;
u32 timing;
int rc;
if (!printed_version++)
-@@ -470,9 +482,13 @@ static int via_init_one(struct pci_dev *
+@@ -470,9 +482,13 @@
if (rc)
return rc;
if ((isa = pci_get_device(PCI_VENDOR_ID_VIA +
!!(config->flags & VIA_BAD_ID),
config->id, NULL))) {
-@@ -483,10 +499,6 @@ static int via_init_one(struct pci_dev *
+@@ -483,10 +499,6 @@
pci_dev_put(isa);
}
pci_dev_put(isa);
if (!(config->flags & VIA_NO_ENABLES)) {
-@@ -583,11 +595,13 @@ static int via_reinit_one(struct pci_dev
+@@ -583,11 +595,13 @@
#endif
static const struct pci_device_id via[] = {
{ },
};
-diff -purN linux-2.6.27/drivers/ata/sata_fsl.c linux-2.6.27.19-5.1/drivers/ata/sata_fsl.c
---- linux-2.6.27/drivers/ata/sata_fsl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_fsl.c 2009-03-25 16:11:13.000000000 +0000
-@@ -469,10 +469,10 @@ static bool sata_fsl_qc_fill_rtf(struct
+diff -r 9608d5473017 drivers/ata/sata_fsl.c
+--- a/drivers/ata/sata_fsl.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_fsl.c Wed May 06 16:56:14 2009 +0100
+@@ -469,10 +469,10 @@
return true;
}
void __iomem *ssr_base = host_priv->ssr_base;
unsigned int sc_reg;
-@@ -493,10 +493,10 @@ static int sata_fsl_scr_write(struct ata
+@@ -493,10 +493,10 @@
return 0;
}
void __iomem *ssr_base = host_priv->ssr_base;
unsigned int sc_reg;
-@@ -645,12 +645,12 @@ static int sata_fsl_port_start(struct at
+@@ -645,12 +645,12 @@
* Workaround for 8315DS board 3gbps link-up issue,
* currently limit SATA port to GEN1 speed
*/
dev_printk(KERN_WARNING, dev, "scr_control, speed limited to %x\n",
temp);
#endif
-@@ -868,7 +868,7 @@ issue_srst:
+@@ -868,7 +868,7 @@
ioread32(CQ + hcr_base),
ioread32(CA + hcr_base), ioread32(CC + hcr_base));
DPRINTK("HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS));
DPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL));
-@@ -972,9 +972,9 @@ static void sata_fsl_error_intr(struct a
+@@ -972,9 +972,9 @@
* Handle & Clear SError
*/
}
DPRINTK("error_intr,hStat=0x%x,CE=0x%x,DE =0x%x,SErr=0x%x\n",
-@@ -1091,7 +1091,7 @@ static void sata_fsl_host_intr(struct at
+@@ -1091,7 +1091,7 @@
hstatus = ioread32(hcr_base + HSTATUS);
if (unlikely(SError & 0xFFFF0000)) {
DPRINTK("serror @host_intr : 0x%x\n", SError);
-@@ -1385,6 +1385,7 @@ static struct of_device_id fsl_sata_matc
+@@ -1385,6 +1385,7 @@
MODULE_DEVICE_TABLE(of, fsl_sata_match);
static struct of_platform_driver fsl_sata_driver = {
.name = "fsl-sata",
.match_table = fsl_sata_match,
.probe = sata_fsl_probe,
-diff -purN linux-2.6.27/drivers/ata/sata_inic162x.c linux-2.6.27.19-5.1/drivers/ata/sata_inic162x.c
---- linux-2.6.27/drivers/ata/sata_inic162x.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_inic162x.c 2009-03-25 16:11:14.000000000 +0000
-@@ -269,9 +269,9 @@ static void inic_reset_port(void __iomem
+diff -r 9608d5473017 drivers/ata/sata_inic162x.c
+--- a/drivers/ata/sata_inic162x.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_inic162x.c Wed May 06 16:56:14 2009 +0100
+@@ -269,9 +269,9 @@
writeb(0xff, port_base + PORT_IRQ_STAT);
}
void __iomem *addr;
if (unlikely(sc_reg >= ARRAY_SIZE(scr_map)))
-@@ -286,9 +286,9 @@ static int inic_scr_read(struct ata_port
+@@ -286,9 +286,9 @@
return 0;
}
if (unlikely(sc_reg >= ARRAY_SIZE(scr_map)))
return -EINVAL;
-diff -purN linux-2.6.27/drivers/ata/sata_mv.c linux-2.6.27.19-5.1/drivers/ata/sata_mv.c
---- linux-2.6.27/drivers/ata/sata_mv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_mv.c 2009-03-25 16:11:14.000000000 +0000
-@@ -493,10 +493,10 @@ struct mv_hw_ops {
+diff -r 9608d5473017 drivers/ata/sata_mv.c
+--- a/drivers/ata/sata_mv.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_mv.c Wed May 06 16:56:14 2009 +0100
+@@ -493,10 +493,10 @@
void (*reset_bus)(struct ata_host *host, void __iomem *mmio);
};
static int mv_port_start(struct ata_port *ap);
static void mv_port_stop(struct ata_port *ap);
static int mv_qc_defer(struct ata_queued_cmd *qc);
-@@ -669,8 +669,8 @@ static const struct pci_device_id mv_pci
+@@ -669,8 +669,8 @@
{ PCI_VDEVICE(MARVELL, 0x5081), chip_508x },
/* RocketRAID 1720/174x have different identifiers */
{ PCI_VDEVICE(TTI, 0x1720), chip_6042 },
{ PCI_VDEVICE(MARVELL, 0x6040), chip_604x },
{ PCI_VDEVICE(MARVELL, 0x6041), chip_604x },
-@@ -883,7 +883,7 @@ static void mv_start_dma(struct ata_port
+@@ -883,7 +883,7 @@
struct mv_host_priv *hpriv = ap->host->private_data;
int hardport = mv_hardport_from_port(ap->port_no);
void __iomem *hc_mmio = mv_hc_base_from_port(
u32 hc_irq_cause, ipending;
/* clear EDMA event indicators, if any */
-@@ -1070,23 +1070,23 @@ static unsigned int mv_scr_offset(unsign
+@@ -1070,23 +1070,23 @@
return ofs;
}
return 0;
} else
return -EINVAL;
-@@ -2251,11 +2251,11 @@ static unsigned int mv5_scr_offset(unsig
+@@ -2251,11 +2251,11 @@
return ofs;
}
unsigned int ofs = mv5_scr_offset(sc_reg_in);
if (ofs != 0xffffffffU) {
-@@ -2265,11 +2265,11 @@ static int mv5_scr_read(struct ata_port
+@@ -2265,11 +2265,11 @@
return -EINVAL;
}
unsigned int ofs = mv5_scr_offset(sc_reg_in);
if (ofs != 0xffffffffU) {
-diff -purN linux-2.6.27/drivers/ata/sata_nv.c linux-2.6.27.19-5.1/drivers/ata/sata_nv.c
---- linux-2.6.27/drivers/ata/sata_nv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_nv.c 2009-03-25 16:11:14.000000000 +0000
-@@ -302,15 +302,15 @@ static void nv_ck804_host_stop(struct at
+diff -r 9608d5473017 drivers/ata/sata_nv.c
+--- a/drivers/ata/sata_nv.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_nv.c Wed May 06 16:56:14 2009 +0100
+@@ -302,15 +302,15 @@
static irqreturn_t nv_generic_interrupt(int irq, void *dev_instance);
static irqreturn_t nv_nf2_interrupt(int irq, void *dev_instance);
static irqreturn_t nv_ck804_interrupt(int irq, void *dev_instance);
static int nv_adma_slave_config(struct scsi_device *sdev);
static int nv_adma_check_atapi_dma(struct ata_queued_cmd *qc);
static void nv_adma_qc_prep(struct ata_queued_cmd *qc);
-@@ -352,6 +352,7 @@ enum nv_host_type
+@@ -352,6 +352,7 @@
NFORCE3 = NFORCE2, /* NF2 == NF3 as far as sata_nv is concerned */
CK804,
ADMA,
SWNCQ,
};
-@@ -363,10 +364,10 @@ static const struct pci_device_id nv_pci
+@@ -363,10 +364,10 @@
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2), CK804 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA), CK804 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2), CK804 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA), GENERIC },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2), GENERIC },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3), GENERIC },
-@@ -405,17 +406,8 @@ static struct scsi_host_template nv_swnc
+@@ -405,17 +406,8 @@
.slave_configure = nv_swncq_slave_config,
};
.scr_read = nv_scr_read,
.scr_write = nv_scr_write,
};
-@@ -429,21 +421,38 @@ static struct ata_port_operations nv_gen
+@@ -429,21 +421,38 @@
.hardreset = ATA_OP_NULL,
};
.check_atapi_dma = nv_adma_check_atapi_dma,
.sff_tf_read = nv_adma_tf_read,
-@@ -466,8 +475,19 @@ static struct ata_port_operations nv_adm
+@@ -466,8 +475,19 @@
.host_stop = nv_adma_host_stop,
};
--static struct ata_port_operations nv_swncq_ops = {
+/* Kernel bz#12351 reports that when SWNCQ is enabled, for hotplug to
+ * work, hardreset should be used and hardreset can't report proper
+ * signature, which suggests that mcp5x is closer to nf2 as long as
+ * nv_noclassify_hardreset().
+ */
+static struct ata_port_operations nv_mcp5x_ops = {
- .inherits = &nv_common_ops,
++ .inherits = &nv_common_ops,
+ .hardreset = nv_noclassify_hardreset,
+};
+
-+static struct ata_port_operations nv_swncq_ops = {
+ static struct ata_port_operations nv_swncq_ops = {
+- .inherits = &nv_common_ops,
+ .inherits = &nv_mcp5x_ops,
.qc_defer = ata_std_qc_defer,
.qc_prep = nv_swncq_qc_prep,
-@@ -530,6 +550,15 @@ static const struct ata_port_info nv_por
+@@ -529,6 +549,15 @@
+ .udma_mask = NV_UDMA_MASK,
.port_ops = &nv_adma_ops,
.private_data = NV_PI_PRIV(nv_adma_interrupt, &nv_adma_sht),
- },
++ },
+ /* MCP5x */
+ {
+ .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
+ .udma_mask = NV_UDMA_MASK,
+ .port_ops = &nv_mcp5x_ops,
+ .private_data = NV_PI_PRIV(nv_generic_interrupt, &nv_sht),
-+ },
+ },
/* SWNCQ */
{
- .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
-@@ -1511,24 +1540,35 @@ static irqreturn_t nv_ck804_interrupt(in
+@@ -1511,22 +1540,33 @@
return ret;
}
- iowrite32(val, ap->ioaddr.scr_addr + (sc_reg * 4));
+ iowrite32(val, link->ap->ioaddr.scr_addr + (sc_reg * 4));
return 0;
- }
-
++}
++
+static int nv_noclassify_hardreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline)
+{
+ rc = sata_link_hardreset(link, sata_deb_timing_hotplug, deadline,
+ &online, NULL);
+ return online ? -EAGAIN : rc;
-+}
-+
- static void nv_nf2_freeze(struct ata_port *ap)
- {
- void __iomem *scr_addr = ap->host->ports[0]->ioaddr.scr_addr;
-@@ -1605,21 +1645,6 @@ static void nv_mcp55_thaw(struct ata_por
- ata_sff_thaw(ap);
}
+ static void nv_nf2_freeze(struct ata_port *ap)
+@@ -1603,21 +1643,6 @@
+ mask |= (NV_INT_MASK_MCP55 << shift);
+ writel(mask, mmio_base + NV_INT_ENABLE_MCP55);
+ ata_sff_thaw(ap);
+-}
+-
-static int nv_hardreset(struct ata_link *link, unsigned int *class,
- unsigned long deadline)
-{
- if (rc)
- return rc;
- return -EAGAIN;
--}
--
+ }
+
static void nv_adma_error_handler(struct ata_port *ap)
- {
- struct nv_adma_port_priv *pp = ap->private_data;
-@@ -2218,9 +2243,9 @@ static void nv_swncq_host_interrupt(stru
+@@ -2218,9 +2243,9 @@
if (!pp->qc_active)
return;
if (ata_stat & ATA_ERR) {
ata_ehi_clear_desc(ehi);
-@@ -2358,14 +2383,9 @@ static int nv_init_one(struct pci_dev *p
+@@ -2358,14 +2383,9 @@
if (type == CK804 && adma_enabled) {
dev_printk(KERN_NOTICE, &pdev->dev, "Using ADMA mode\n");
type = ADMA;
}
ppi[0] = &nv_port_info[type];
-diff -purN linux-2.6.27/drivers/ata/sata_promise.c linux-2.6.27.19-5.1/drivers/ata/sata_promise.c
---- linux-2.6.27/drivers/ata/sata_promise.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_promise.c 2009-03-25 16:11:14.000000000 +0000
-@@ -137,8 +137,8 @@ struct pdc_port_priv {
+diff -r 9608d5473017 drivers/ata/sata_promise.c
+--- a/drivers/ata/sata_promise.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_promise.c Wed May 06 16:56:14 2009 +0100
+@@ -137,8 +137,8 @@
dma_addr_t pkt_dma;
};
static int pdc_ata_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
static int pdc_common_port_start(struct ata_port *ap);
static int pdc_sata_port_start(struct ata_port *ap);
-@@ -153,6 +153,10 @@ static void pdc_freeze(struct ata_port *
+@@ -153,6 +153,10 @@
static void pdc_sata_freeze(struct ata_port *ap);
static void pdc_thaw(struct ata_port *ap);
static void pdc_sata_thaw(struct ata_port *ap);
static void pdc_error_handler(struct ata_port *ap);
static void pdc_post_internal_cmd(struct ata_queued_cmd *qc);
static int pdc_pata_cable_detect(struct ata_port *ap);
-@@ -186,6 +190,7 @@ static struct ata_port_operations pdc_sa
+@@ -186,6 +190,7 @@
.scr_read = pdc_sata_scr_read,
.scr_write = pdc_sata_scr_write,
.port_start = pdc_sata_port_start,
};
/* First-generation chips need a more restrictive ->check_atapi_dma op */
-@@ -200,6 +205,7 @@ static struct ata_port_operations pdc_pa
+@@ -200,6 +205,7 @@
.freeze = pdc_freeze,
.thaw = pdc_thaw,
.port_start = pdc_common_port_start,
};
static const struct ata_port_info pdc_port_info[] = {
-@@ -386,19 +392,21 @@ static int pdc_sata_cable_detect(struct
+@@ -386,19 +392,21 @@
return ATA_CBL_SATA;
}
return 0;
}
-@@ -691,6 +699,20 @@ static void pdc_sata_thaw(struct ata_por
+@@ -691,6 +699,20 @@
readl(host_mmio + hotplug_offset); /* flush */
}
static void pdc_error_handler(struct ata_port *ap)
{
if (!(ap->pflags & ATA_PFLAG_FROZEN))
-@@ -731,7 +753,7 @@ static void pdc_error_intr(struct ata_po
+@@ -731,7 +753,7 @@
if (sata_scr_valid(&ap->link)) {
u32 serror;
ehi->serror |= serror;
}
-diff -purN linux-2.6.27/drivers/ata/sata_qstor.c linux-2.6.27.19-5.1/drivers/ata/sata_qstor.c
---- linux-2.6.27/drivers/ata/sata_qstor.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_qstor.c 2009-03-25 16:11:13.000000000 +0000
-@@ -111,8 +111,8 @@ struct qs_port_priv {
+diff -r 9608d5473017 drivers/ata/sata_qstor.c
+--- a/drivers/ata/sata_qstor.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_qstor.c Wed May 06 16:56:14 2009 +0100
+@@ -111,8 +111,8 @@
qs_state_t state;
};
static int qs_ata_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
static int qs_port_start(struct ata_port *ap);
static void qs_host_stop(struct ata_host *host);
-@@ -242,11 +242,11 @@ static int qs_prereset(struct ata_link *
+@@ -242,11 +242,11 @@
return ata_sff_prereset(link, deadline);
}
return 0;
}
-@@ -256,11 +256,11 @@ static void qs_error_handler(struct ata_
+@@ -256,11 +256,11 @@
ata_std_error_handler(ap);
}
return 0;
}
-diff -purN linux-2.6.27/drivers/ata/sata_sil.c linux-2.6.27.19-5.1/drivers/ata/sata_sil.c
---- linux-2.6.27/drivers/ata/sata_sil.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_sil.c 2009-03-25 16:11:13.000000000 +0000
-@@ -115,8 +115,8 @@ static int sil_init_one(struct pci_dev *
+diff -r 9608d5473017 drivers/ata/sata_sil.c
+--- a/drivers/ata/sata_sil.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_sil.c Wed May 06 16:56:14 2009 +0100
+@@ -115,8 +115,8 @@
static int sil_pci_device_resume(struct pci_dev *pdev);
#endif
static void sil_dev_config(struct ata_device *dev);
static int sil_set_mode(struct ata_link *link, struct ata_device **r_failed);
static void sil_freeze(struct ata_port *ap);
static void sil_thaw(struct ata_port *ap);
-@@ -317,9 +317,9 @@ static inline void __iomem *sil_scr_addr
+@@ -317,9 +317,9 @@
return NULL;
}
if (mmio) {
*val = readl(mmio);
-@@ -328,9 +328,9 @@ static int sil_scr_read(struct ata_port
+@@ -328,9 +328,9 @@
return -EINVAL;
}
if (mmio) {
writel(val, mmio);
-@@ -352,8 +352,8 @@ static void sil_host_intr(struct ata_por
+@@ -352,8 +352,8 @@
* controllers continue to assert IRQ as long as
* SError bits are pending. Clear SError immediately.
*/
/* Sometimes spurious interrupts occur, double check
* it's PHYRDY CHG.
-@@ -603,11 +603,38 @@ static void sil_init_controller(struct a
+@@ -603,11 +603,38 @@
}
}
struct ata_host *host;
void __iomem *mmio_base;
int n_ports, rc;
-@@ -621,6 +648,13 @@ static int sil_init_one(struct pci_dev *
+@@ -620,6 +647,13 @@
+ n_ports = 2;
if (board_id == sil_3114)
n_ports = 4;
-
++
+ if (sil_broken_system_poweroff(pdev)) {
+ pi.flags |= ATA_FLAG_NO_POWEROFF_SPINDOWN |
+ ATA_FLAG_NO_HIBERNATE_SPINDOWN;
+ dev_info(&pdev->dev, "quirky BIOS, skipping spindown "
+ "on poweroff and hibernation\n");
+ }
-+
+
host = ata_host_alloc_pinfo(&pdev->dev, ppi, n_ports);
if (!host)
- return -ENOMEM;
-diff -purN linux-2.6.27/drivers/ata/sata_sil24.c linux-2.6.27.19-5.1/drivers/ata/sata_sil24.c
---- linux-2.6.27/drivers/ata/sata_sil24.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_sil24.c 2009-03-25 16:11:13.000000000 +0000
-@@ -340,8 +340,8 @@ struct sil24_port_priv {
+diff -r 9608d5473017 drivers/ata/sata_sil24.c
+--- a/drivers/ata/sata_sil24.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_sil24.c Wed May 06 16:56:14 2009 +0100
+@@ -340,8 +340,8 @@
};
static void sil24_dev_config(struct ata_device *dev);
static int sil24_qc_defer(struct ata_queued_cmd *qc);
static void sil24_qc_prep(struct ata_queued_cmd *qc);
static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc);
-@@ -504,9 +504,9 @@ static int sil24_scr_map[] = {
+@@ -504,9 +504,9 @@
[SCR_ACTIVE] = 3,
};
if (sc_reg < ARRAY_SIZE(sil24_scr_map)) {
void __iomem *addr;
-@@ -517,9 +517,9 @@ static int sil24_scr_read(struct ata_por
+@@ -517,9 +517,9 @@
return -EINVAL;
}
if (sc_reg < ARRAY_SIZE(sil24_scr_map)) {
void __iomem *addr;
-diff -purN linux-2.6.27/drivers/ata/sata_sis.c linux-2.6.27.19-5.1/drivers/ata/sata_sis.c
---- linux-2.6.27/drivers/ata/sata_sis.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_sis.c 2009-03-25 16:11:14.000000000 +0000
-@@ -64,8 +64,8 @@ enum {
+diff -r 9608d5473017 drivers/ata/sata_sis.c
+--- a/drivers/ata/sata_sis.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_sis.c Wed May 06 16:56:14 2009 +0100
+@@ -64,8 +64,8 @@
};
static int sis_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
static const struct pci_device_id sis_pci_tbl[] = {
{ PCI_VDEVICE(SI, 0x0180), sis_180 }, /* SiS 964/180 */
-@@ -134,10 +134,11 @@ static unsigned int get_scr_cfg_addr(str
+@@ -134,10 +134,11 @@
return addr;
}
u32 val2 = 0;
u8 pmr;
-@@ -158,10 +159,11 @@ static u32 sis_scr_cfg_read(struct ata_p
+@@ -158,10 +159,11 @@
return 0;
}
u8 pmr;
if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */
-@@ -178,8 +180,9 @@ static int sis_scr_cfg_write(struct ata_
+@@ -178,8 +180,9 @@
return 0;
}
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
u8 pmr;
-@@ -187,7 +190,7 @@ static int sis_scr_read(struct ata_port
+@@ -187,7 +190,7 @@
return -EINVAL;
if (ap->flags & SIS_FLAG_CFGSCR)
pci_read_config_byte(pdev, SIS_PMR, &pmr);
-@@ -202,8 +205,9 @@ static int sis_scr_read(struct ata_port
+@@ -202,8 +205,9 @@
return 0;
}
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
u8 pmr;
-@@ -213,7 +217,7 @@ static int sis_scr_write(struct ata_port
+@@ -213,7 +217,7 @@
pci_read_config_byte(pdev, SIS_PMR, &pmr);
if (ap->flags & SIS_FLAG_CFGSCR)
else {
iowrite32(val, ap->ioaddr.scr_addr + (sc_reg * 4));
if ((pdev->device == 0x0182) || (pdev->device == 0x0183) ||
-diff -purN linux-2.6.27/drivers/ata/sata_svw.c linux-2.6.27.19-5.1/drivers/ata/sata_svw.c
---- linux-2.6.27/drivers/ata/sata_svw.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_svw.c 2009-03-25 16:11:14.000000000 +0000
-@@ -123,20 +123,22 @@ static int k2_sata_check_atapi_dma(struc
+diff -r 9608d5473017 drivers/ata/sata_svw.c
+--- a/drivers/ata/sata_svw.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_svw.c Wed May 06 16:56:14 2009 +0100
+@@ -123,20 +123,22 @@
}
}
return 0;
}
-diff -purN linux-2.6.27/drivers/ata/sata_uli.c linux-2.6.27.19-5.1/drivers/ata/sata_uli.c
---- linux-2.6.27/drivers/ata/sata_uli.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_uli.c 2009-03-25 16:11:13.000000000 +0000
-@@ -57,8 +57,8 @@ struct uli_priv {
+diff -r 9608d5473017 drivers/ata/sata_uli.c
+--- a/drivers/ata/sata_uli.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_uli.c Wed May 06 16:56:14 2009 +0100
+@@ -57,8 +57,8 @@
};
static int uli_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
static const struct pci_device_id uli_pci_tbl[] = {
{ PCI_VDEVICE(AL, 0x5289), uli_5289 },
-@@ -107,39 +107,39 @@ static unsigned int get_scr_cfg_addr(str
+@@ -107,39 +107,39 @@
return hpriv->scr_cfg_addr[ap->port_no] + (4 * sc_reg);
}
return 0;
}
-diff -purN linux-2.6.27/drivers/ata/sata_via.c linux-2.6.27.19-5.1/drivers/ata/sata_via.c
---- linux-2.6.27/drivers/ata/sata_via.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_via.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/ata/sata_via.c
+--- a/drivers/ata/sata_via.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_via.c Wed May 06 16:56:14 2009 +0100
@@ -44,11 +44,16 @@
#include <linux/libata.h>
};
enum {
-@@ -68,8 +73,11 @@ enum {
+@@ -68,8 +73,11 @@
};
static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
static void svia_noop_freeze(struct ata_port *ap);
static int vt6420_prereset(struct ata_link *link, unsigned long deadline);
static int vt6421_pata_cable_detect(struct ata_port *ap);
-@@ -78,12 +86,14 @@ static void vt6421_set_dma_mode(struct a
+@@ -78,12 +86,14 @@
static const struct pci_device_id svia_pci_tbl[] = {
{ PCI_VDEVICE(VIA, 0x5337), vt6420 },
{ } /* terminate list */
};
-@@ -103,25 +113,37 @@ static struct scsi_host_template svia_sh
+@@ -103,23 +113,35 @@
ATA_BMDMA_SHT(DRV_NAME),
};
--static struct ata_port_operations vt6420_sata_ops = {
+static struct ata_port_operations svia_base_ops = {
- .inherits = &ata_bmdma_port_ops,
++ .inherits = &ata_bmdma_port_ops,
+ .sff_tf_load = svia_tf_load,
+};
+
-+static struct ata_port_operations vt6420_sata_ops = {
+ static struct ata_port_operations vt6420_sata_ops = {
+- .inherits = &ata_bmdma_port_ops,
+ .inherits = &svia_base_ops,
.freeze = svia_noop_freeze,
.prereset = vt6420_prereset,
+ .inherits = &svia_base_ops,
.scr_read = svia_scr_read,
.scr_write = svia_scr_write,
- };
-
++};
++
+static struct ata_port_operations vt8251_ops = {
+ .inherits = &svia_base_ops,
+ .hardreset = sata_std_hardreset,
+ .scr_read = vt8251_scr_read,
+ .scr_write = vt8251_scr_write,
-+};
-+
+ };
+
static const struct ata_port_info vt6420_port_info = {
- .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
- .pio_mask = 0x1f,
-@@ -146,28 +168,137 @@ static struct ata_port_info vt6421_pport
+@@ -146,26 +168,135 @@
.port_ops = &vt6421_pata_ops,
};
return -EINVAL;
- iowrite32(val, ap->ioaddr.scr_addr + (4 * sc_reg));
+ iowrite32(val, link->ap->ioaddr.scr_addr + (4 * sc_reg));
-+ return 0;
+ return 0;
+}
+
+static int vt8251_scr_read(struct ata_link *link, unsigned int scr, u32 *val)
+ }
+
+ *val = v;
- return 0;
- }
-
++ return 0;
++}
++
+static int vt8251_scr_write(struct ata_link *link, unsigned int scr, u32 val)
+{
+ struct pci_dev *pdev = to_pci_dev(link->ap->host->dev);
+ tf = &ttf;
+ }
+ ata_sff_tf_load(ap, tf);
-+}
-+
+ }
+
static void svia_noop_freeze(struct ata_port *ap)
- {
- /* Some VIA controllers choke if ATA_NIEN is manipulated in
-@@ -210,20 +341,20 @@ static int vt6420_prereset(struct ata_li
+@@ -210,20 +341,20 @@
goto skip_scr;
/* Resume phy. This is the old SATA resume sequence */
online = (sstatus & 0xf) == 0x3;
-@@ -232,7 +363,7 @@ static int vt6420_prereset(struct ata_li
+@@ -232,7 +363,7 @@
online ? "up" : "down", sstatus, scontrol);
/* SStatus is read one more time */
if (!online) {
/* tell EH to bail */
-@@ -367,6 +498,30 @@ static int vt6421_prepare_host(struct pc
+@@ -367,6 +498,30 @@
return 0;
}
static void svia_configure(struct pci_dev *pdev)
{
u8 tmp8;
-@@ -422,10 +577,10 @@ static int svia_init_one(struct pci_dev
+@@ -422,10 +577,10 @@
if (rc)
return rc;
- if (board_id == vt6420)
-- bar_sizes = &svia_bar_sizes[0];
-- else
+ if (board_id == vt6421)
- bar_sizes = &vt6421_bar_sizes[0];
++ bar_sizes = &vt6421_bar_sizes[0];
+ else
-+ bar_sizes = &svia_bar_sizes[0];
+ bar_sizes = &svia_bar_sizes[0];
+- else
+- bar_sizes = &vt6421_bar_sizes[0];
for (i = 0; i < ARRAY_SIZE(svia_bar_sizes); i++)
if ((pci_resource_start(pdev, i) == 0) ||
-@@ -438,10 +593,19 @@ static int svia_init_one(struct pci_dev
+@@ -438,10 +593,19 @@
return -ENODEV;
}
if (rc)
return rc;
-diff -purN linux-2.6.27/drivers/ata/sata_vsc.c linux-2.6.27.19-5.1/drivers/ata/sata_vsc.c
---- linux-2.6.27/drivers/ata/sata_vsc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_vsc.c 2009-03-25 16:11:14.000000000 +0000
-@@ -98,20 +98,22 @@ enum {
+diff -r 9608d5473017 drivers/ata/sata_vsc.c
+--- a/drivers/ata/sata_vsc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_vsc.c Wed May 06 16:56:14 2009 +0100
+@@ -98,20 +98,22 @@
VSC_SATA_INT_PHY_CHANGE),
};
return 0;
}
-diff -purN linux-2.6.27/drivers/base/core.c linux-2.6.27.19-5.1/drivers/base/core.c
---- linux-2.6.27/drivers/base/core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/base/core.c 2009-03-25 16:11:18.000000000 +0000
-@@ -523,11 +523,16 @@ static void klist_children_put(struct kl
+diff -r 9608d5473017 drivers/base/core.c
+--- a/drivers/base/core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/base/core.c Wed May 06 16:56:15 2009 +0100
+@@ -523,11 +523,16 @@
* device_initialize - init device structure.
* @dev: device.
*
*/
void device_initialize(struct device *dev)
{
-@@ -836,9 +841,13 @@ static void device_remove_sys_dev_entry(
+@@ -836,9 +841,13 @@
* This is part 2 of device_register(), though may be called
* separately _iff_ device_initialize() has been called separately.
*
*/
int device_add(struct device *dev)
{
-@@ -965,6 +974,10 @@ done:
+@@ -965,6 +974,10 @@
* I.e. you should only call the two helpers separately if
* have a clearly defined need to use and refcount the device
* before it is added to the hierarchy.
*/
int device_register(struct device *dev)
{
-@@ -1243,7 +1256,7 @@ struct device *device_create_vargs(struc
+@@ -1243,7 +1256,7 @@
return dev;
error:
return ERR_PTR(retval);
}
EXPORT_SYMBOL_GPL(device_create_vargs);
-diff -purN linux-2.6.27/drivers/base/sys.c linux-2.6.27.19-5.1/drivers/base/sys.c
---- linux-2.6.27/drivers/base/sys.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/base/sys.c 2009-03-25 16:11:18.000000000 +0000
-@@ -488,7 +488,8 @@ ssize_t sysdev_store_ulong(struct sys_de
+diff -r 9608d5473017 drivers/base/sys.c
+--- a/drivers/base/sys.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/base/sys.c Wed May 06 16:56:15 2009 +0100
+@@ -488,7 +488,8 @@
if (end == buf)
return -EINVAL;
*(unsigned long *)(ea->var) = new;
}
EXPORT_SYMBOL_GPL(sysdev_store_ulong);
-@@ -511,7 +512,8 @@ ssize_t sysdev_store_int(struct sys_devi
+@@ -511,7 +512,8 @@
if (end == buf || new > INT_MAX || new < INT_MIN)
return -EINVAL;
*(int *)(ea->var) = new;
}
EXPORT_SYMBOL_GPL(sysdev_store_int);
-diff -purN linux-2.6.27/drivers/block/Kconfig linux-2.6.27.19-5.1/drivers/block/Kconfig
---- linux-2.6.27/drivers/block/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/Kconfig 2009-03-25 16:11:23.000000000 +0000
-@@ -409,6 +409,12 @@ config SUNVDC
+diff -r 9608d5473017 drivers/block/Kconfig
+--- a/drivers/block/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/Kconfig Wed May 06 16:56:15 2009 +0100
+@@ -409,6 +409,12 @@
Support for virtual disk devices as a client under Sun
Logical Domains.
source "drivers/s390/block/Kconfig"
config XILINX_SYSACE
-@@ -417,9 +423,9 @@ config XILINX_SYSACE
+@@ -417,9 +423,9 @@
help
Include support for the Xilinx SystemACE CompactFlash interface
default y
help
This driver implements the front-end of the Xen virtual
-diff -purN linux-2.6.27/drivers/block/Makefile linux-2.6.27.19-5.1/drivers/block/Makefile
---- linux-2.6.27/drivers/block/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/Makefile 2009-03-25 16:11:23.000000000 +0000
-@@ -31,4 +31,5 @@ obj-$(CONFIG_BLK_DEV_SX8) += sx8.o
+diff -r 9608d5473017 drivers/block/Makefile
+--- a/drivers/block/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/Makefile Wed May 06 16:56:15 2009 +0100
+@@ -31,4 +31,5 @@
obj-$(CONFIG_BLK_DEV_UB) += ub.o
obj-$(CONFIG_BLK_DEV_HD) += hd.o
-obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += xen-blkfront.o
+obj-$(CONFIG_XEN_BLKFRONT) += xen-blkfront.o
+obj-$(CONFIG_CIPHER_TWOFISH) += loop_fish2.o
-diff -purN linux-2.6.27/drivers/block/cciss.c linux-2.6.27.19-5.1/drivers/block/cciss.c
---- linux-2.6.27/drivers/block/cciss.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/cciss.c 2009-03-25 16:11:23.000000000 +0000
-@@ -96,6 +96,8 @@ static const struct pci_device_id cciss_
+diff -r 9608d5473017 drivers/block/cciss.c
+--- a/drivers/block/cciss.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/cciss.c Wed May 06 16:56:15 2009 +0100
+@@ -96,6 +96,8 @@
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3245},
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3247},
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3249},
{PCI_VENDOR_ID_HP, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_STORAGE_RAID << 8, 0xffff << 8, 0},
{0,}
-@@ -133,6 +135,8 @@ static struct board_type products[] = {
+@@ -133,6 +135,8 @@
{0x3245103C, "Smart Array P410i", &SA5_access},
{0x3247103C, "Smart Array P411", &SA5_access},
{0x3249103C, "Smart Array P812", &SA5_access},
{0xFFFF103C, "Unknown Smart Array", &SA5_access},
};
-@@ -160,7 +164,7 @@ static int cciss_getgeo(struct block_dev
+@@ -160,7 +164,7 @@
static int cciss_revalidate(struct gendisk *disk);
static int rebuild_lun_table(ctlr_info_t *h, int first_time);
int clear_all);
static void cciss_read_capacity(int ctlr, int logvol, int withirq,
-@@ -1365,6 +1369,7 @@ static void cciss_add_disk(ctlr_info_t *
+@@ -1365,6 +1369,7 @@
disk->first_minor = drv_index << NWD_SHIFT;
disk->fops = &cciss_fops;
disk->private_data = &h->drv[drv_index];
/* Set up queue information */
blk_queue_bounce_limit(disk->queue, h->pdev->dma_mask);
-@@ -1486,8 +1491,7 @@ static void cciss_update_drive_info(int
+@@ -1486,8 +1491,7 @@
* which keeps the interrupt handler from starting
* the queue.
*/
h->drv[drv_index].busy_configuring = 0;
}
-@@ -1687,6 +1691,11 @@ static int rebuild_lun_table(ctlr_info_t
+@@ -1687,6 +1691,11 @@
for (i = 0; i <= h->highest_lun; i++) {
int j;
drv_found = 0;
for (j = 0; j < num_luns; j++) {
memcpy(&lunid, &ld_buff->LUN[j][0], 4);
lunid = le32_to_cpu(lunid);
-@@ -1700,8 +1709,7 @@ static int rebuild_lun_table(ctlr_info_t
+@@ -1700,8 +1709,7 @@
spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags);
h->drv[i].busy_configuring = 1;
spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags);
h->drv[i].busy_configuring = 0;
}
}
-@@ -1771,15 +1779,19 @@ mem_msg:
+@@ -1771,14 +1779,18 @@
* the highest_lun should be left unchanged and the LunID
* should not be cleared.
*/
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
-
++
+ drv = &h->drv[drv_index];
+ disk = h->gendisk[drv_index];
-+
+
/* make sure logical volume is NOT is use */
if (clear_all || (h->gendisk[0] == disk)) {
- if (drv->usage_count > 1)
-@@ -3403,7 +3415,8 @@ static int __devinit cciss_init_one(stru
+@@ -3403,7 +3415,8 @@
int i;
int j = 0;
int rc;
i = alloc_cciss_hba();
if (i < 0)
-@@ -3509,6 +3522,25 @@ static int __devinit cciss_init_one(stru
+@@ -3509,6 +3522,25 @@
/* Turn the interrupts on so we can service requests */
hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_ON);
cciss_procinit(i);
hba[i]->cciss_max_sectors = 2048;
-@@ -3519,6 +3551,7 @@ static int __devinit cciss_init_one(stru
+@@ -3519,6 +3551,7 @@
return 1;
clean4:
#ifdef CONFIG_CISS_SCSI_TAPE
kfree(hba[i]->scsi_rejects.complete);
#endif
-diff -purN linux-2.6.27/drivers/block/cpqarray.c linux-2.6.27.19-5.1/drivers/block/cpqarray.c
---- linux-2.6.27/drivers/block/cpqarray.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/cpqarray.c 2009-03-25 16:11:23.000000000 +0000
-@@ -567,7 +567,12 @@ static int __init cpqarray_init(void)
+diff -r 9608d5473017 drivers/block/cpqarray.c
+--- a/drivers/block/cpqarray.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/cpqarray.c Wed May 06 16:56:15 2009 +0100
+@@ -567,7 +567,12 @@
num_cntlrs_reg++;
}
}
/* Function to find the first free pointer into our hba[] array */
-diff -purN linux-2.6.27/drivers/block/loop.c linux-2.6.27.19-5.1/drivers/block/loop.c
---- linux-2.6.27/drivers/block/loop.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/loop.c 2009-03-25 16:11:23.000000000 +0000
-@@ -203,6 +203,38 @@ lo_do_transfer(struct loop_device *lo, i
+diff -r 9608d5473017 drivers/block/loop.c
+--- a/drivers/block/loop.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/loop.c Wed May 06 16:56:15 2009 +0100
+@@ -203,6 +203,38 @@
return lo->transfer(lo, cmd, rpage, roffs, lpage, loffs, size, rblock);
}
/**
* do_lo_send_aops - helper for writing data to a loop device
*
-@@ -214,11 +246,18 @@ static int do_lo_send_aops(struct loop_d
+@@ -214,11 +246,18 @@
{
struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */
struct address_space *mapping = file->f_mapping;
index = pos >> PAGE_CACHE_SHIFT;
offset = pos & ((pgoff_t)PAGE_CACHE_SIZE - 1);
bv_offs = bvec->bv_offset;
-@@ -261,6 +300,15 @@ static int do_lo_send_aops(struct loop_d
+@@ -261,6 +300,15 @@
pos += copied;
}
ret = 0;
out:
mutex_unlock(&mapping->host->i_mutex);
return ret;
-@@ -475,12 +523,24 @@ static int do_bio_filebacked(struct loop
+@@ -475,12 +523,24 @@
{
loff_t pos;
int ret;
return ret;
}
-@@ -757,6 +817,9 @@ static int loop_set_fd(struct loop_devic
+@@ -756,6 +816,9 @@
+
if (!(file->f_mode & FMODE_WRITE))
lo_flags |= LO_FLAGS_READ_ONLY;
-
++
+ if ((file->f_flags & O_SYNC) && (!file->f_op || !file->f_op->fsync))
+ return -EINVAL;
-+
+
error = -EINVAL;
if (S_ISREG(inode->i_mode) || S_ISBLK(inode->i_mode)) {
- const struct address_space_operations *aops = mapping->a_ops;
-diff -purN linux-2.6.27/drivers/block/loop_fish2.c linux-2.6.27.19-5.1/drivers/block/loop_fish2.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/loop_fish2.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/block/loop_fish2.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/block/loop_fish2.c Wed May 06 16:56:15 2009 +0100
@@ -0,0 +1,625 @@
+#include <linux/module.h>
+#include <linux/errno.h>
+module_init(loop_fish2_init);
+module_exit(loop_fish2_exit);
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/block/nbd.c linux-2.6.27.19-5.1/drivers/block/nbd.c
---- linux-2.6.27/drivers/block/nbd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/nbd.c 2009-03-25 16:11:23.000000000 +0000
-@@ -547,6 +547,15 @@ static void do_nbd_request(struct reques
+diff -r 9608d5473017 drivers/block/nbd.c
+--- a/drivers/block/nbd.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/nbd.c Wed May 06 16:56:15 2009 +0100
+@@ -547,6 +547,15 @@
BUG_ON(lo->magic != LO_MAGIC);
spin_lock_irq(&lo->queue_lock);
list_add_tail(&req->queuelist, &lo->waiting_queue);
spin_unlock_irq(&lo->queue_lock);
-diff -purN linux-2.6.27/drivers/block/ps3disk.c linux-2.6.27.19-5.1/drivers/block/ps3disk.c
---- linux-2.6.27/drivers/block/ps3disk.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/ps3disk.c 2009-03-25 16:11:23.000000000 +0000
-@@ -199,7 +199,8 @@ static void ps3disk_do_request(struct ps
+diff -r 9608d5473017 drivers/block/ps3disk.c
+--- a/drivers/block/ps3disk.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/ps3disk.c Wed May 06 16:56:15 2009 +0100
+@@ -199,7 +199,8 @@
if (blk_fs_request(req)) {
if (ps3disk_submit_request_sg(dev, req))
break;
if (ps3disk_submit_flush_request(dev, req))
break;
} else {
-@@ -257,7 +258,8 @@ static irqreturn_t ps3disk_interrupt(int
+@@ -257,7 +258,8 @@
return IRQ_HANDLED;
}
read = 0;
num_sectors = req->hard_cur_sectors;
op = "flush";
-@@ -405,7 +407,8 @@ static void ps3disk_prepare_flush(struct
+@@ -405,7 +407,8 @@
dev_dbg(&dev->sbd.core, "%s:%u\n", __func__, __LINE__);
}
static unsigned long ps3disk_mask;
-diff -purN linux-2.6.27/drivers/block/virtio_blk.c linux-2.6.27.19-5.1/drivers/block/virtio_blk.c
---- linux-2.6.27/drivers/block/virtio_blk.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/virtio_blk.c 2009-03-25 16:11:22.000000000 +0000
-@@ -84,11 +84,11 @@ static bool do_req(struct request_queue
+diff -r 9608d5473017 drivers/block/virtio_blk.c
+--- a/drivers/block/virtio_blk.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/virtio_blk.c Wed May 06 16:56:15 2009 +0100
+@@ -84,11 +84,11 @@
if (blk_fs_request(vbr->req)) {
vbr->out_hdr.type = 0;
vbr->out_hdr.sector = vbr->req->sector;
} else {
/* We don't put anything else in the queue. */
BUG();
-diff -purN linux-2.6.27/drivers/block/xen-blkfront.c linux-2.6.27.19-5.1/drivers/block/xen-blkfront.c
---- linux-2.6.27/drivers/block/xen-blkfront.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/xen-blkfront.c 2009-03-25 16:11:23.000000000 +0000
-@@ -1021,7 +1021,6 @@ static struct xenbus_device_id blkfront_
+diff -r 9608d5473017 drivers/block/xen-blkfront.c
+--- a/drivers/block/xen-blkfront.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/xen-blkfront.c Wed May 06 16:56:15 2009 +0100
+@@ -1021,7 +1021,6 @@
static struct xenbus_driver blkfront = {
.name = "vbd",
.ids = blkfront_ids,
.probe = blkfront_probe,
.remove = blkfront_remove,
-diff -purN linux-2.6.27/drivers/bluetooth/btsdio.c linux-2.6.27.19-5.1/drivers/bluetooth/btsdio.c
---- linux-2.6.27/drivers/bluetooth/btsdio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/bluetooth/btsdio.c 2009-03-25 16:11:03.000000000 +0000
-@@ -91,6 +91,7 @@ static int btsdio_tx_packet(struct btsdi
+diff -r 9608d5473017 drivers/bluetooth/btsdio.c
+--- a/drivers/bluetooth/btsdio.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/bluetooth/btsdio.c Wed May 06 16:56:15 2009 +0100
+@@ -91,6 +91,7 @@
err = sdio_writesb(data->func, REG_TDAT, skb->data, skb->len);
if (err < 0) {
sdio_writeb(data->func, 0x01, REG_PC_WRT, NULL);
return err;
}
-@@ -152,7 +153,7 @@ static int btsdio_rx_packet(struct btsdi
+@@ -152,7 +153,7 @@
err = sdio_readsb(data->func, skb->data, REG_RDAT, len - 4);
if (err < 0) {
return err;
}
-diff -purN linux-2.6.27/drivers/cdrom/Makefile linux-2.6.27.19-5.1/drivers/cdrom/Makefile
---- linux-2.6.27/drivers/cdrom/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cdrom/Makefile 2009-03-25 16:11:30.000000000 +0000
-@@ -9,6 +9,7 @@ obj-$(CONFIG_BLK_DEV_IDECD) +=
+diff -r 9608d5473017 drivers/cdrom/Makefile
+--- a/drivers/cdrom/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cdrom/Makefile Wed May 06 16:56:15 2009 +0100
+@@ -9,6 +9,7 @@
obj-$(CONFIG_BLK_DEV_SR) += cdrom.o
obj-$(CONFIG_PARIDE_PCD) += cdrom.o
obj-$(CONFIG_CDROM_PKTCDVD) += cdrom.o
obj-$(CONFIG_VIOCD) += viocd.o cdrom.o
obj-$(CONFIG_GDROM) += gdrom.o cdrom.o
-diff -purN linux-2.6.27/drivers/char/Kconfig linux-2.6.27.19-5.1/drivers/char/Kconfig
---- linux-2.6.27/drivers/char/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/Kconfig 2009-03-25 16:11:21.000000000 +0000
-@@ -624,7 +624,7 @@ config HVC_BEAT
+diff -r 9608d5473017 drivers/char/Kconfig
+--- a/drivers/char/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/Kconfig Wed May 06 16:56:15 2009 +0100
+@@ -624,7 +624,7 @@
config HVC_XEN
bool "Xen Hypervisor Console support"
select HVC_DRIVER
select HVC_IRQ
default y
-@@ -1026,7 +1026,7 @@ config RAW_DRIVER
+@@ -1026,7 +1026,7 @@
with the O_DIRECT flag.
config MAX_RAW_DEVS
depends on RAW_DRIVER
default "256"
help
-@@ -1037,7 +1037,7 @@ config MAX_RAW_DEVS
+@@ -1037,7 +1037,7 @@
config HPET
bool "HPET - High Precision Event Timer" if (X86 || IA64)
default n
help
If you say Y here, you will have a miscdevice named "/dev/hpet/". Each
open selects one of the timers supported by the HPET. The timers are
-@@ -1104,5 +1104,10 @@ config DEVPORT
+@@ -1104,5 +1104,10 @@
source "drivers/s390/char/Kconfig"
+
endmenu
-diff -purN linux-2.6.27/drivers/char/Makefile linux-2.6.27.19-5.1/drivers/char/Makefile
---- linux-2.6.27/drivers/char/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/Makefile 2009-03-25 16:11:22.000000000 +0000
-@@ -105,6 +105,7 @@ obj-$(CONFIG_IPMI_HANDLER) += ipmi/
+diff -r 9608d5473017 drivers/char/Makefile
+--- a/drivers/char/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/Makefile Wed May 06 16:56:15 2009 +0100
+@@ -105,6 +105,7 @@
obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o
obj-$(CONFIG_TCG_TPM) += tpm/
obj-$(CONFIG_PS3_FLASH) += ps3flash.o
-diff -purN linux-2.6.27/drivers/char/agp/intel-agp.c linux-2.6.27.19-5.1/drivers/char/agp/intel-agp.c
---- linux-2.6.27/drivers/char/agp/intel-agp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/agp/intel-agp.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/char/agp/intel-agp.c
+--- a/drivers/char/agp/intel-agp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/agp/intel-agp.c Wed May 06 16:56:15 2009 +0100
@@ -40,6 +40,8 @@
#define PCI_DEVICE_ID_INTEL_Q45_IG 0x2E12
#define PCI_DEVICE_ID_INTEL_G45_HB 0x2E20
extern int agp_memory_reserved;
-@@ -214,8 +217,8 @@ static int intel_i810_configure(void)
+@@ -214,8 +217,8 @@
if (agp_bridge->driver->needs_scratch_page) {
for (i = 0; i < current_size->num_entries; i++) {
writel(agp_bridge->scratch_page, intel_private.registers+I810_PTE_BASE+(i*4));
}
global_cache_flush();
return 0;
-@@ -247,6 +250,13 @@ static void *i8xx_alloc_pages(void)
+@@ -247,6 +250,13 @@
if (page == NULL)
return NULL;
if (set_pages_uc(page, 4) < 0) {
set_pages_wb(page, 4);
__free_pages(page, 2);
-@@ -266,6 +276,9 @@ static void i8xx_destroy_pages(void *add
+@@ -266,6 +276,9 @@
page = virt_to_page(addr);
set_pages_wb(page, 4);
put_page(page);
__free_pages(page, 2);
atomic_dec(&agp_bridge->current_memory_agp);
-@@ -525,8 +538,10 @@ static void intel_i830_init_gtt_entries(
+@@ -525,8 +538,10 @@
size += 4;
} else if (IS_G4X) {
/* On 4 series hardware, GTT stolen is separate from graphics
} else {
/* On previous hardware, the GTT size was just what was
* required to map the aperture.
-@@ -559,6 +574,13 @@ static void intel_i830_init_gtt_entries(
+@@ -559,6 +574,13 @@
} else {
switch (gmch_ctrl & I855_GMCH_GMS_MASK) {
case I855_GMCH_GMS_STOLEN_1M:
gtt_entries = MB(1) - KB(size);
break;
case I855_GMCH_GMS_STOLEN_4M:
-@@ -773,8 +795,8 @@ static int intel_i830_configure(void)
+@@ -773,8 +795,8 @@
if (agp_bridge->driver->needs_scratch_page) {
for (i = intel_private.gtt_entries; i < current_size->num_entries; i++) {
writel(agp_bridge->scratch_page, intel_private.registers+I810_PTE_BASE+(i*4));
}
global_cache_flush();
-@@ -989,8 +1011,8 @@ static int intel_i915_configure(void)
+@@ -989,8 +1011,8 @@
if (agp_bridge->driver->needs_scratch_page) {
for (i = intel_private.gtt_entries; i < current_size->num_entries; i++) {
writel(agp_bridge->scratch_page, intel_private.gtt+i);
}
global_cache_flush();
-@@ -1194,6 +1216,7 @@ static void intel_i965_get_gtt_range(int
+@@ -1194,6 +1216,7 @@
case PCI_DEVICE_ID_INTEL_IGD_E_HB:
case PCI_DEVICE_ID_INTEL_Q45_HB:
case PCI_DEVICE_ID_INTEL_G45_HB:
*gtt_offset = *gtt_size = MB(2);
break;
default:
-@@ -2126,13 +2149,15 @@ static const struct intel_driver_descrip
+@@ -2126,13 +2149,15 @@
{ PCI_DEVICE_ID_INTEL_Q33_HB, PCI_DEVICE_ID_INTEL_Q33_IG, 0, "Q33",
NULL, &intel_g33_driver },
{ PCI_DEVICE_ID_INTEL_GM45_HB, PCI_DEVICE_ID_INTEL_GM45_IG, 0,
{ 0, 0, 0, NULL, NULL, NULL }
};
-@@ -2330,6 +2355,7 @@ static struct pci_device_id agp_intel_pc
+@@ -2330,6 +2355,7 @@
ID(PCI_DEVICE_ID_INTEL_IGD_E_HB),
ID(PCI_DEVICE_ID_INTEL_Q45_HB),
ID(PCI_DEVICE_ID_INTEL_G45_HB),
{ }
};
-diff -purN linux-2.6.27/drivers/char/applicom.c linux-2.6.27.19-5.1/drivers/char/applicom.c
---- linux-2.6.27/drivers/char/applicom.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/applicom.c 2009-03-25 16:11:22.000000000 +0000
-@@ -712,8 +712,7 @@ static int ac_ioctl(struct inode *inode,
+diff -r 9608d5473017 drivers/char/applicom.c
+--- a/drivers/char/applicom.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/applicom.c Wed May 06 16:56:15 2009 +0100
+@@ -712,8 +712,7 @@
IndexCard = adgl->num_card-1;
static int warncount = 10;
if (warncount) {
printk( KERN_WARNING "APPLICOM driver IOCTL, bad board number %d\n",(int)IndexCard+1);
-@@ -832,8 +831,7 @@ static int ac_ioctl(struct inode *inode,
+@@ -832,8 +831,7 @@
}
break;
default:
break;
}
Dummy = readb(apbs[IndexCard].RamIO + VERS);
-diff -purN linux-2.6.27/drivers/char/bsr.c linux-2.6.27.19-5.1/drivers/char/bsr.c
---- linux-2.6.27/drivers/char/bsr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/bsr.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/char/bsr.c
+--- a/drivers/char/bsr.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/bsr.c Wed May 06 16:56:15 2009 +0100
@@ -27,6 +27,7 @@
#include <linux/cdev.h>
#include <linux/list.h>
#include <asm/io.h>
/*
-@@ -60,6 +61,8 @@ struct bsr_dev {
+@@ -60,6 +61,8 @@
unsigned bsr_num; /* bsr id number for its type */
int bsr_minor;
dev_t bsr_dev;
struct cdev bsr_cdev;
struct device *bsr_device;
-@@ -67,8 +70,8 @@ struct bsr_dev {
+@@ -67,8 +70,8 @@
};
static struct class *bsr_class;
static int bsr_major;
-@@ -115,15 +118,22 @@ static int bsr_mmap(struct file *filp, s
+@@ -115,15 +118,22 @@
{
unsigned long size = vma->vm_end - vma->vm_start;
struct bsr_dev *dev = filp->private_data;
+ int ret;
- if (size > dev->bsr_len || (size & (PAGE_SIZE-1)))
-- return -EINVAL;
--
-- vma->vm_flags |= (VM_IO | VM_DONTEXPAND);
- vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
-
-- if (io_remap_pfn_range(vma, vma->vm_start, dev->bsr_addr >> PAGE_SHIFT,
-- size, vma->vm_page_prot))
++ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
++
+ /* check for the case of a small BSR device and map one 4k page for it*/
+ if (dev->bsr_len < PAGE_SIZE && size == PAGE_SIZE)
+ ret = remap_4k_pfn(vma, vma->vm_start, dev->bsr_addr >> 12,
+ dev->bsr_addr >> PAGE_SHIFT,
+ size, vma->vm_page_prot);
+ else
-+ return -EINVAL;
-+
+ return -EINVAL;
+
+- vma->vm_flags |= (VM_IO | VM_DONTEXPAND);
+- vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+-
+- if (io_remap_pfn_range(vma, vma->vm_start, dev->bsr_addr >> PAGE_SHIFT,
+- size, vma->vm_page_prot))
+ if (ret)
return -EAGAIN;
return 0;
-@@ -146,24 +156,25 @@ const static struct file_operations bsr_
+@@ -146,24 +156,25 @@
static void bsr_cleanup_devs(void)
{
bsr_stride = of_get_property(bn, "ibm,lock-stride", &bsr_stride_len);
bsr_bytes = of_get_property(bn, "ibm,#lock-bytes", &bsr_bytes_len);
-@@ -171,35 +182,36 @@ static int bsr_create_devs(struct device
+@@ -171,35 +182,36 @@
if (!bsr_stride || !bsr_bytes ||
(bsr_stride_len != bsr_bytes_len)) {
printk(KERN_ERR "bsr of-node has missing/incorrect property\n");
struct resource res;
int result;
+- result = of_address_to_resource(bn, i, &res);
+- if (result < 0) {
+- printk(KERN_ERR "bsr of-node has invalid reg property\n");
+ if (!cur) {
+ printk(KERN_ERR "Unable to alloc bsr dev\n");
+ ret = -ENOMEM;
-+ goto out_err;
-+ }
-+
- result = of_address_to_resource(bn, i, &res);
- if (result < 0) {
-- printk(KERN_ERR "bsr of-node has invalid reg property\n");
-- goto out_err;
-+ printk(KERN_ERR "bsr of-node has invalid reg property, skipping\n");
-+ kfree(cur);
-+ continue;
+ goto out_err;
}
- cur->bsr_minor = i;
++ result = of_address_to_resource(bn, i, &res);
++ if (result < 0) {
++ printk(KERN_ERR "bsr of-node has invalid reg property, skipping\n");
++ kfree(cur);
++ continue;
++ }
++
+ cur->bsr_minor = i + total_bsr_devs;
cur->bsr_addr = res.start;
cur->bsr_len = res.end - res.start + 1;
switch(cur->bsr_bytes) {
case 8:
-@@ -220,14 +232,15 @@ static int bsr_create_devs(struct device
+@@ -220,14 +232,15 @@
}
cur->bsr_num = bsr_types[cur->bsr_type];
cur->bsr_device = device_create_drvdata(bsr_class, NULL,
cur->bsr_dev,
-@@ -236,16 +249,37 @@ static int bsr_create_devs(struct device
+@@ -236,16 +249,37 @@
printk(KERN_ERR "device_create failed for %s\n",
cur->bsr_name);
cdev_del(&cur->bsr_cdev);
+ bsr_types[cur->bsr_type] = cur->bsr_num + 1;
+ list_add_tail(&cur->bsr_list, &bsr_devs);
}
-
-+ total_bsr_devs += num_bsr_devs;
+
++ total_bsr_devs += num_bsr_devs;
+
return 0;
out_err:
}
static int __init bsr_init(void)
-@@ -255,7 +289,7 @@ static int __init bsr_init(void)
+@@ -255,7 +289,7 @@
int ret = -ENODEV;
int result;
if (!np)
goto out_err;
-@@ -273,10 +307,10 @@ static int __init bsr_init(void)
+@@ -273,10 +307,10 @@
goto out_err_2;
}
return 0;
-diff -purN linux-2.6.27/drivers/char/cp437.uni linux-2.6.27.19-5.1/drivers/char/cp437.uni
---- linux-2.6.27/drivers/char/cp437.uni 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/cp437.uni 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/char/cp437.uni
+--- a/drivers/char/cp437.uni Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/cp437.uni Wed May 06 16:56:15 2009 +0100
@@ -27,7 +27,7 @@
0x0c U+2640
0x0d U+266a
0xef U+2229
0xf0 U+2261
0xf1 U+00b1
-diff -purN linux-2.6.27/drivers/char/crasher.c linux-2.6.27.19-5.1/drivers/char/crasher.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/crasher.c 2009-03-25 16:11:21.000000000 +0000
+diff -r 9608d5473017 drivers/char/crasher.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/char/crasher.c Wed May 06 16:56:15 2009 +0100
@@ -0,0 +1,225 @@
+/*
+ * crasher.c, it breaks things
+
+module_init(crasher_init);
+module_exit(crasher_exit);
-diff -purN linux-2.6.27/drivers/char/hvc_console.c linux-2.6.27.19-5.1/drivers/char/hvc_console.c
---- linux-2.6.27/drivers/char/hvc_console.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/hvc_console.c 2009-03-25 16:11:21.000000000 +0000
-@@ -367,13 +367,13 @@ static void hvc_close(struct tty_struct
+diff -r 9608d5473017 drivers/char/hvc_console.c
+--- a/drivers/char/hvc_console.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/hvc_console.c Wed May 06 16:56:15 2009 +0100
+@@ -367,12 +367,12 @@
spin_lock_irqsave(&hp->lock, flags);
if (--hp->count == 0) {
/* We are done with the tty pointer now. */
hp->tty = NULL;
spin_unlock_irqrestore(&hp->lock, flags);
-
++
+ if (hp->ops->notifier_del)
+ hp->ops->notifier_del(hp, hp->data);
-+
+
/*
* Chain calls chars_in_buffer() and returns immediately if
- * there is no buffered data otherwise sleeps on a wait queue
-@@ -416,11 +416,11 @@ static void hvc_hangup(struct tty_struct
+@@ -416,10 +416,10 @@
hp->n_outbuf = 0;
hp->tty = NULL;
+
if (hp->ops->notifier_del)
hp->ops->notifier_del(hp, hp->data);
-
-- spin_unlock_irqrestore(&hp->lock, flags);
-
+- spin_unlock_irqrestore(&hp->lock, flags);
+
while(temp_open_count) {
--temp_open_count;
- kref_put(&hp->kref, destroy_hvc_struct);
-diff -purN linux-2.6.27/drivers/char/hw_random/n2-drv.c linux-2.6.27.19-5.1/drivers/char/hw_random/n2-drv.c
---- linux-2.6.27/drivers/char/hw_random/n2-drv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/hw_random/n2-drv.c 2009-03-25 16:11:22.000000000 +0000
-@@ -751,6 +751,7 @@ static struct of_device_id n2rng_match[]
+diff -r 9608d5473017 drivers/char/hw_random/n2-drv.c
+--- a/drivers/char/hw_random/n2-drv.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/hw_random/n2-drv.c Wed May 06 16:56:15 2009 +0100
+@@ -751,6 +751,7 @@
MODULE_DEVICE_TABLE(of, n2rng_match);
static struct of_platform_driver n2rng_driver = {
.name = "n2rng",
.match_table = n2rng_match,
.probe = n2rng_probe,
-diff -purN linux-2.6.27/drivers/char/hw_random/pasemi-rng.c linux-2.6.27.19-5.1/drivers/char/hw_random/pasemi-rng.c
---- linux-2.6.27/drivers/char/hw_random/pasemi-rng.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/hw_random/pasemi-rng.c 2009-03-25 16:11:22.000000000 +0000
-@@ -140,6 +140,7 @@ static struct of_device_id rng_match[] =
+diff -r 9608d5473017 drivers/char/hw_random/pasemi-rng.c
+--- a/drivers/char/hw_random/pasemi-rng.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/hw_random/pasemi-rng.c Wed May 06 16:56:15 2009 +0100
+@@ -140,6 +140,7 @@
};
static struct of_platform_driver rng_driver = {
.name = "pasemi-rng",
.match_table = rng_match,
.probe = rng_probe,
-diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_devintf.c linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_devintf.c
---- linux-2.6.27/drivers/char/ipmi/ipmi_devintf.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_devintf.c 2009-03-25 16:11:21.000000000 +0000
-@@ -957,3 +957,4 @@ module_exit(cleanup_ipmi);
+diff -r 9608d5473017 drivers/char/ipmi/ipmi_devintf.c
+--- a/drivers/char/ipmi/ipmi_devintf.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/ipmi/ipmi_devintf.c Wed May 06 16:56:15 2009 +0100
+@@ -957,3 +957,4 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Corey Minyard <minyard@mvista.com>");
MODULE_DESCRIPTION("Linux device interface for the IPMI message handler.");
+MODULE_ALIAS("platform:ipmi_si");
-diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_msghandler.c
---- linux-2.6.27/drivers/char/ipmi/ipmi_msghandler.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_msghandler.c 2009-03-25 16:11:21.000000000 +0000
-@@ -422,9 +422,11 @@ struct ipmi_smi {
+diff -r 9608d5473017 drivers/char/ipmi/ipmi_msghandler.c
+--- a/drivers/char/ipmi/ipmi_msghandler.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/ipmi/ipmi_msghandler.c Wed May 06 16:56:15 2009 +0100
+@@ -422,9 +422,11 @@
/**
* The driver model view of the IPMI messaging driver.
*/
};
static DEFINE_MUTEX(ipmidriver_mutex);
-@@ -2384,9 +2386,9 @@ static int ipmi_bmc_register(ipmi_smi_t
+@@ -2384,9 +2386,9 @@
* representing the interfaced BMC already
*/
if (bmc->guid_set)
- old_bmc = ipmi_find_bmc_guid(&ipmidriver, bmc->guid);
-+ old_bmc = ipmi_find_bmc_guid(&ipmidriver.driver, bmc->guid);
- else
+- else
- old_bmc = ipmi_find_bmc_prod_dev_id(&ipmidriver,
++ old_bmc = ipmi_find_bmc_guid(&ipmidriver.driver, bmc->guid);
++ else
+ old_bmc = ipmi_find_bmc_prod_dev_id(&ipmidriver.driver,
bmc->id.product_id,
bmc->id.device_id);
-@@ -2416,7 +2418,7 @@ static int ipmi_bmc_register(ipmi_smi_t
+@@ -2416,7 +2418,7 @@
snprintf(name, sizeof(name),
"ipmi_bmc.%4.4x", bmc->id.product_id);
bmc->id.product_id,
bmc->id.device_id)) {
if (!warn_printed) {
-@@ -2446,7 +2448,7 @@ static int ipmi_bmc_register(ipmi_smi_t
+@@ -2446,7 +2448,7 @@
" Unable to allocate platform device\n");
return -ENOMEM;
}
dev_set_drvdata(&bmc->dev->dev, bmc);
kref_init(&bmc->refcount);
-@@ -4247,7 +4249,7 @@ static int ipmi_init_msghandler(void)
+@@ -4247,7 +4249,7 @@
if (initialized)
return 0;
if (rv) {
printk(KERN_ERR PFX "Could not register IPMI driver\n");
return rv;
-@@ -4308,7 +4310,7 @@ static __exit void cleanup_ipmi(void)
+@@ -4308,7 +4310,7 @@
remove_proc_entry(proc_ipmi_root->name, NULL);
#endif /* CONFIG_PROC_FS */
initialized = 0;
-diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_si_intf.c
---- linux-2.6.27/drivers/char/ipmi/ipmi_si_intf.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_si_intf.c 2009-03-25 16:11:21.000000000 +0000
-@@ -114,9 +114,11 @@ static char *si_to_str[] = { "kcs", "smi
+diff -r 9608d5473017 drivers/char/ipmi/ipmi_si_intf.c
+--- a/drivers/char/ipmi/ipmi_si_intf.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/ipmi/ipmi_si_intf.c Wed May 06 16:56:15 2009 +0100
+@@ -114,9 +114,11 @@
#define DEVICE_NAME "ipmi_si"
};
-@@ -1150,7 +1152,7 @@ static unsigned int num_slave_addrs;
+@@ -1150,7 +1152,7 @@
#define IPMI_MEM_ADDR_SPACE 1
static char *addr_space_to_str[] = { "i/o", "mem" };
module_param_call(hotmod, hotmod_handler, NULL, NULL, 0200);
MODULE_PARM_DESC(hotmod, "Add and remove interfaces. See"
-@@ -1572,7 +1574,7 @@ static int check_hotmod_int_op(const cha
+@@ -1572,7 +1574,7 @@
return 0;
}
{
char *str = kstrdup(val, GFP_KERNEL);
int rv;
-@@ -2398,6 +2400,7 @@ static struct of_device_id ipmi_match[]
+@@ -2398,6 +2400,7 @@
};
static struct of_platform_driver ipmi_of_platform_driver = {
.name = "ipmi",
.match_table = ipmi_match,
.probe = ipmi_of_probe,
-@@ -2868,7 +2871,7 @@ static int try_smi_init(struct smi_info
+@@ -2868,7 +2871,7 @@
goto out_err;
}
new_smi->dev = &new_smi->pdev->dev;
rv = platform_device_add(new_smi->pdev);
if (rv) {
-@@ -2983,7 +2986,7 @@ static __devinit int init_ipmi_si(void)
+@@ -2983,7 +2986,7 @@
initialized = 1;
/* Register the device drivers. */
if (rv) {
printk(KERN_ERR
"init_ipmi_si: Unable to register driver: %d\n",
-@@ -3052,7 +3055,7 @@ static __devinit int init_ipmi_si(void)
+@@ -3052,7 +3055,7 @@
#ifdef CONFIG_PPC_OF
of_unregister_platform_driver(&ipmi_of_platform_driver);
#endif
printk(KERN_WARNING
"ipmi_si: Unable to find any System Interface(s)\n");
return -ENODEV;
-@@ -3151,7 +3154,7 @@ static __exit void cleanup_ipmi_si(void)
+@@ -3151,7 +3154,7 @@
cleanup_one_si(e);
mutex_unlock(&smi_infos_lock);
}
module_exit(cleanup_ipmi_si);
-diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_watchdog.c linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_watchdog.c
---- linux-2.6.27/drivers/char/ipmi/ipmi_watchdog.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_watchdog.c 2009-03-25 16:11:21.000000000 +0000
-@@ -196,7 +196,7 @@ static void ipmi_unregister_watchdog(int
+diff -r 9608d5473017 drivers/char/ipmi/ipmi_watchdog.c
+--- a/drivers/char/ipmi/ipmi_watchdog.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/ipmi/ipmi_watchdog.c Wed May 06 16:56:15 2009 +0100
+@@ -196,7 +196,7 @@
*/
static int start_now;
{
char *endp;
int l;
-@@ -215,7 +215,7 @@ static int set_param_int(const char *val
+@@ -215,7 +215,7 @@
return rv;
}
{
return sprintf(buffer, "%i", *((int *)kp->arg));
}
-@@ -227,7 +227,7 @@ static int preaction_op(const char *inva
+@@ -227,7 +227,7 @@
static int preop_op(const char *inval, char *outval);
static void check_parms(void);
{
action_fn fn = (action_fn) kp->arg;
int rv = 0;
-@@ -251,7 +251,7 @@ static int set_param_str(const char *val
+@@ -251,7 +251,7 @@
return rv;
}
{
action_fn fn = (action_fn) kp->arg;
int rv;
-@@ -263,7 +263,7 @@ static int get_param_str(char *buffer, s
+@@ -263,7 +263,7 @@
}
{
int rv = param_set_int(val, kp);
if (rv)
-diff -purN linux-2.6.27/drivers/char/keyboard.c linux-2.6.27.19-5.1/drivers/char/keyboard.c
---- linux-2.6.27/drivers/char/keyboard.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/keyboard.c 2009-03-25 16:11:21.000000000 +0000
+diff -r 9608d5473017 drivers/char/keyboard.c
+--- a/drivers/char/keyboard.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/keyboard.c Wed May 06 16:56:15 2009 +0100
@@ -43,6 +43,9 @@
#include <linux/reboot.h>
#include <linux/notifier.h>
extern void ctrl_alt_del(void);
-@@ -1180,6 +1183,22 @@ static void kbd_keycode(unsigned int key
+@@ -1180,6 +1183,22 @@
if (keycode < BTN_MISC && printk_ratelimit())
printk(KERN_WARNING "keyboard.c: can't emulate rawmode for keycode %d\n", keycode);
#ifdef CONFIG_MAGIC_SYSRQ /* Handle the SysRq Hack */
if (keycode == KEY_SYSRQ && (sysrq_down || (down == 1 && sysrq_alt))) {
if (!sysrq_down) {
-diff -purN linux-2.6.27/drivers/char/lp.c linux-2.6.27.19-5.1/drivers/char/lp.c
---- linux-2.6.27/drivers/char/lp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/lp.c 2009-03-25 16:11:21.000000000 +0000
-@@ -626,9 +626,12 @@ static int lp_ioctl(struct inode *inode,
+diff -r 9608d5473017 drivers/char/lp.c
+--- a/drivers/char/lp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/lp.c Wed May 06 16:56:15 2009 +0100
+@@ -626,9 +626,12 @@
return -EFAULT;
break;
case LPGETSTATUS:
if (copy_to_user(argp, &status, sizeof(int)))
return -EFAULT;
-diff -purN linux-2.6.27/drivers/char/mem.c linux-2.6.27.19-5.1/drivers/char/mem.c
---- linux-2.6.27/drivers/char/mem.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/mem.c 2009-03-25 16:11:22.000000000 +0000
-@@ -110,6 +110,7 @@ void __attribute__((weak)) unxlate_dev_m
+diff -r 9608d5473017 drivers/char/mem.c
+--- a/drivers/char/mem.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/mem.c Wed May 06 16:56:15 2009 +0100
+@@ -110,6 +110,7 @@
{
}
/*
* This funcion reads the *physical* memory. The f_pos points directly to the
* memory location.
-@@ -254,6 +255,7 @@ static ssize_t write_mem(struct file * f
+@@ -254,6 +255,7 @@
*ppos += written;
return written;
}
int __attribute__((weak)) phys_mem_access_prot_allowed(struct file *file,
unsigned long pfn, unsigned long size, pgprot_t *vma_prot)
-@@ -372,6 +374,9 @@ static int mmap_mem(struct file * file,
+@@ -372,6 +374,9 @@
static int mmap_kmem(struct file * file, struct vm_area_struct * vma)
{
unsigned long pfn;
/* Turn a kernel-virtual address into a physical page frame */
pfn = __pa((u64)vma->vm_pgoff << PAGE_SHIFT) >> PAGE_SHIFT;
-@@ -386,6 +391,13 @@ static int mmap_kmem(struct file * file,
+@@ -385,6 +390,13 @@
+ */
if (!pfn_valid(pfn))
return -EIO;
-
++
+#ifdef CONFIG_XEN
+ count = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+ for (i = 0; i < count; i++)
+ if ((pfn + i) != mfn_to_local_pfn(pfn_to_mfn(pfn + i)))
+ return -EIO;
+#endif
-+
+
vma->vm_pgoff = pfn;
return mmap_mem(file, vma);
- }
-@@ -702,6 +714,100 @@ static ssize_t splice_write_null(struct
+@@ -702,6 +714,100 @@
return splice_from_pipe(pipe, out, ppos, len, flags, pipe_to_null);
}
static ssize_t read_zero(struct file * file, char __user * buf,
size_t count, loff_t *ppos)
{
-@@ -730,15 +836,24 @@ static ssize_t read_zero(struct file * f
+@@ -730,15 +836,24 @@
}
return written ? written : -EFAULT;
}
}
static ssize_t write_full(struct file * file, const char __user * buf,
-@@ -802,6 +917,7 @@ static int open_port(struct inode * inod
+@@ -802,6 +917,7 @@
#define open_kmem open_mem
#define open_oldmem open_mem
static const struct file_operations mem_fops = {
.llseek = memory_lseek,
.read = read_mem,
-@@ -810,6 +926,9 @@ static const struct file_operations mem_
+@@ -810,6 +926,9 @@
.open = open_mem,
.get_unmapped_area = get_unmapped_area_mem,
};
#ifdef CONFIG_DEVKMEM
static const struct file_operations kmem_fops = {
-diff -purN linux-2.6.27/drivers/char/n_tty.c linux-2.6.27.19-5.1/drivers/char/n_tty.c
---- linux-2.6.27/drivers/char/n_tty.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/n_tty.c 2009-03-25 16:11:21.000000000 +0000
-@@ -1325,6 +1325,15 @@ do_it_again:
+diff -r 9608d5473017 drivers/char/n_tty.c
+--- a/drivers/char/n_tty.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/n_tty.c Wed May 06 16:56:15 2009 +0100
+@@ -1325,6 +1325,15 @@
tty->minimum_to_wake = (minimum - (b - buf));
if (!input_available_p(tty, 0)) {
if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) {
retval = -EIO;
break;
-diff -purN linux-2.6.27/drivers/char/raw.c linux-2.6.27.19-5.1/drivers/char/raw.c
---- linux-2.6.27/drivers/char/raw.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/raw.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/char/raw.c
+--- a/drivers/char/raw.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/raw.c Wed May 06 16:56:15 2009 +0100
@@ -20,6 +20,7 @@
#include <linux/device.h>
#include <linux/mutex.h>
#include <asm/uaccess.h>
-@@ -29,10 +30,15 @@ struct raw_device_data {
+@@ -29,9 +30,14 @@
};
static struct class *raw_class;
+static struct raw_device_data *raw_devices;
static DEFINE_MUTEX(raw_mutex);
static const struct file_operations raw_ctl_fops; /* forward declaration */
-
++
+static int max_raw_minors = MAX_RAW_MINORS;
+
+module_param(max_raw_minors, int, 0);
+MODULE_PARM_DESC(max_raw_minors, "Maximum number of raw devices (1-65536)");
-+
+
/*
* Open/close code for raw IO.
- *
-@@ -157,7 +163,7 @@ static int raw_ctl_ioctl(struct inode *i
+@@ -157,7 +163,7 @@
goto out;
}
err = -EINVAL;
goto out;
}
-@@ -265,12 +271,26 @@ static int __init raw_init(void)
+@@ -265,12 +271,26 @@
dev_t dev = MKDEV(RAW_MAJOR, 0);
int ret;
if (ret) {
kobject_put(&raw_cdev.kobj);
goto error_region;
-@@ -289,8 +309,9 @@ static int __init raw_init(void)
+@@ -289,8 +309,9 @@
return 0;
error_region:
return ret;
}
-@@ -299,7 +320,7 @@ static void __exit raw_exit(void)
+@@ -299,7 +320,7 @@
device_destroy(raw_class, MKDEV(RAW_MAJOR, 0));
class_destroy(raw_class);
cdev_del(&raw_cdev);
}
module_init(raw_init);
-diff -purN linux-2.6.27/drivers/char/selection.c linux-2.6.27.19-5.1/drivers/char/selection.c
---- linux-2.6.27/drivers/char/selection.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/selection.c 2009-03-25 16:11:22.000000000 +0000
-@@ -268,7 +268,7 @@ int set_selection(const struct tiocl_sel
+diff -r 9608d5473017 drivers/char/selection.c
+--- a/drivers/char/selection.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/selection.c Wed May 06 16:56:15 2009 +0100
+@@ -268,7 +268,7 @@
/* Allocate a new buffer before freeing the old one ... */
multiplier = use_unicode ? 3 : 1; /* chars can take up to 3 bytes */
if (!bp) {
printk(KERN_WARNING "selection: kmalloc() failed\n");
clear_selection();
-diff -purN linux-2.6.27/drivers/char/tpm/Kconfig linux-2.6.27.19-5.1/drivers/char/tpm/Kconfig
---- linux-2.6.27/drivers/char/tpm/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tpm/Kconfig 2009-03-25 16:11:20.000000000 +0000
-@@ -57,4 +57,13 @@ config TCG_INFINEON
+diff -r 9608d5473017 drivers/char/tpm/Kconfig
+--- a/drivers/char/tpm/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/tpm/Kconfig Wed May 06 16:56:15 2009 +0100
+@@ -57,4 +57,13 @@
Further information on this driver and the supported hardware
can be found at http://www.prosec.rub.de/tpm
+ will be called tpm_xenu.
+
endif # TCG_TPM
-diff -purN linux-2.6.27/drivers/char/tpm/Makefile linux-2.6.27.19-5.1/drivers/char/tpm/Makefile
---- linux-2.6.27/drivers/char/tpm/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tpm/Makefile 2009-03-25 16:11:20.000000000 +0000
-@@ -9,3 +9,5 @@ obj-$(CONFIG_TCG_TIS) += tpm_tis.o
+diff -r 9608d5473017 drivers/char/tpm/Makefile
+--- a/drivers/char/tpm/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/tpm/Makefile Wed May 06 16:56:15 2009 +0100
+@@ -9,3 +9,5 @@
obj-$(CONFIG_TCG_NSC) += tpm_nsc.o
obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o
obj-$(CONFIG_TCG_INFINEON) += tpm_infineon.o
+obj-$(CONFIG_TCG_XEN) += tpm_xenu.o
+tpm_xenu-y = tpm_xen.o tpm_vtpm.o
-diff -purN linux-2.6.27/drivers/char/tpm/tpm.c linux-2.6.27.19-5.1/drivers/char/tpm/tpm.c
---- linux-2.6.27/drivers/char/tpm/tpm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tpm/tpm.c 2009-03-25 16:11:20.000000000 +0000
-@@ -525,19 +525,19 @@ void tpm_get_timeouts(struct tpm_chip *c
+diff -r 9608d5473017 drivers/char/tpm/tpm.c
+--- a/drivers/char/tpm/tpm.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/tpm/tpm.c Wed May 06 16:56:15 2009 +0100
+@@ -525,19 +525,19 @@
timeout =
be32_to_cpu(*((__be32 *) (data + TPM_GET_CAP_RET_UINT32_1_IDX)));
if (timeout)
duration:
memcpy(data, tpm_cap, sizeof(tpm_cap));
-@@ -554,15 +554,22 @@ duration:
+@@ -554,15 +554,22 @@
return;
chip->vendor.duration[TPM_SHORT] =
(*((__be32 *) (data +
TPM_GET_CAP_RET_UINT32_3_IDX))));
}
-diff -purN linux-2.6.27/drivers/char/tpm/tpm.h linux-2.6.27.19-5.1/drivers/char/tpm/tpm.h
---- linux-2.6.27/drivers/char/tpm/tpm.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tpm/tpm.h 2009-03-25 16:11:20.000000000 +0000
-@@ -107,6 +107,9 @@ struct tpm_chip {
+diff -r 9608d5473017 drivers/char/tpm/tpm.h
+--- a/drivers/char/tpm/tpm.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/tpm/tpm.h Wed May 06 16:56:16 2009 +0100
+@@ -107,6 +107,9 @@
struct dentry **bios_dir;
struct list_head list;
void (*release) (struct device *);
};
-@@ -124,6 +127,18 @@ static inline void tpm_write_index(int b
+@@ -123,6 +126,18 @@
+ outb(index, base);
outb(value & 0xFF, base+1);
}
-
++
+#ifdef CONFIG_XEN
+static inline void *chip_get_private(const struct tpm_chip *chip)
+{
+ chip->priv = priv;
+}
+#endif
-+
+
extern void tpm_get_timeouts(struct tpm_chip *);
extern void tpm_gen_interrupt(struct tpm_chip *);
- extern void tpm_continue_selftest(struct tpm_chip *);
-diff -purN linux-2.6.27/drivers/char/tpm/tpm_vtpm.c linux-2.6.27.19-5.1/drivers/char/tpm/tpm_vtpm.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tpm/tpm_vtpm.c 2009-03-25 16:11:20.000000000 +0000
+diff -r 9608d5473017 drivers/char/tpm/tpm_vtpm.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/char/tpm/tpm_vtpm.c Wed May 06 16:56:16 2009 +0100
@@ -0,0 +1,542 @@
+/*
+ * Copyright (C) 2006 IBM Corporation
+ tpm_remove_hardware(dev);
+ kfree(vtpms);
+}
-diff -purN linux-2.6.27/drivers/char/tpm/tpm_vtpm.h linux-2.6.27.19-5.1/drivers/char/tpm/tpm_vtpm.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tpm/tpm_vtpm.h 2009-03-25 16:11:20.000000000 +0000
+diff -r 9608d5473017 drivers/char/tpm/tpm_vtpm.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/char/tpm/tpm_vtpm.h Wed May 06 16:56:16 2009 +0100
@@ -0,0 +1,55 @@
+#ifndef TPM_VTPM_H
+#define TPM_VTPM_H
+}
+
+#endif
-diff -purN linux-2.6.27/drivers/char/tpm/tpm_xen.c linux-2.6.27.19-5.1/drivers/char/tpm/tpm_xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tpm/tpm_xen.c 2009-03-25 16:11:20.000000000 +0000
+diff -r 9608d5473017 drivers/char/tpm/tpm_xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/char/tpm/tpm_xen.c Wed May 06 16:56:16 2009 +0100
@@ -0,0 +1,720 @@
+/*
+ * Copyright (c) 2005, IBM Corporation
+module_init(tpmif_init);
+
+MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/char/tty_io.c linux-2.6.27.19-5.1/drivers/char/tty_io.c
---- linux-2.6.27/drivers/char/tty_io.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tty_io.c 2009-03-25 16:11:22.000000000 +0000
-@@ -136,6 +136,8 @@ LIST_HEAD(tty_drivers); /* linked list
+diff -r 9608d5473017 drivers/char/tty_io.c
+--- a/drivers/char/tty_io.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/tty_io.c Wed May 06 16:56:16 2009 +0100
+@@ -135,6 +135,8 @@
+ vt.c for deeply disgusting hack reasons */
DEFINE_MUTEX(tty_mutex);
EXPORT_SYMBOL(tty_mutex);
-
-+int console_use_vt = 1;
+
++int console_use_vt = 1;
+
#ifdef CONFIG_UNIX98_PTYS
extern struct tty_driver *ptm_driver; /* Unix98 pty masters; for /dev/ptmx */
- static int ptmx_open(struct inode *, struct file *);
-@@ -2200,7 +2202,7 @@ retry_open:
+@@ -2200,7 +2202,7 @@
goto got_driver;
}
#ifdef CONFIG_VT
extern struct tty_driver *console_driver;
driver = console_driver;
index = fg_console;
-@@ -2996,7 +2998,7 @@ long tty_ioctl(struct file *file, unsign
+@@ -2996,7 +2998,7 @@
case TIOCSTI:
return tiocsti(tty, p);
case TIOCGWINSZ:
case TIOCSWINSZ:
return tiocswinsz(tty, real_tty, p);
case TIOCCONS:
-@@ -3031,6 +3033,21 @@ long tty_ioctl(struct file *file, unsign
+@@ -3030,6 +3032,21 @@
+ case TIOCLINUX:
return tioclinux(tty, arg);
#endif
- /*
++ /*
+ * Without the real device to which /dev/console is connected,
+ * blogd can not work.
+ * blogd spawns a pty/tty pair,
+ return put_user(ret, (unsigned int __user *)p);
+ }
+
-+ /*
+ /*
* Break handling
*/
- case TIOCSBRK: /* Turn break on, unconditionally */
-@@ -3714,6 +3731,8 @@ static int __init tty_init(void)
+@@ -3714,6 +3731,8 @@
#endif
#ifdef CONFIG_VT
cdev_init(&vc0_cdev, &console_fops);
if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
-@@ -3721,6 +3740,7 @@ static int __init tty_init(void)
+@@ -3721,6 +3740,7 @@
device_create_drvdata(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0");
vty_init();
#endif
return 0;
}
-diff -purN linux-2.6.27/drivers/char/vt.c linux-2.6.27.19-5.1/drivers/char/vt.c
---- linux-2.6.27/drivers/char/vt.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/vt.c 2009-03-25 16:11:20.000000000 +0000
-@@ -301,7 +301,7 @@ static void scrup(struct vc_data *vc, un
+diff -r 9608d5473017 drivers/char/vt.c
+--- a/drivers/char/vt.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/vt.c Wed May 06 16:56:16 2009 +0100
+@@ -301,7 +301,7 @@
d = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t);
s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * (t + nr));
scr_memmovew(d, s, (b - t - nr) * vc->vc_size_row);
vc->vc_size_row * nr);
}
-@@ -319,7 +319,7 @@ static void scrdown(struct vc_data *vc,
+@@ -319,7 +319,7 @@
s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t);
step = vc->vc_cols * nr;
scr_memmovew(s + step, s, (b - t - nr) * vc->vc_size_row);
}
static void do_update_region(struct vc_data *vc, unsigned long start, int count)
-@@ -434,7 +434,6 @@ static void update_attr(struct vc_data *
+@@ -434,7 +434,6 @@
vc->vc_blink, vc->vc_underline,
vc->vc_reverse ^ vc->vc_decscnm, vc->vc_italic);
vc->vc_video_erase_char = (build_attr(vc, vc->vc_color, 1, vc->vc_blink, 0, vc->vc_decscnm, 0) << 8) | ' ';
}
/* Note: inverting the screen twice should revert to the original state */
-@@ -2287,7 +2286,7 @@ rescan_last_byte:
+@@ -2287,7 +2286,7 @@
continue; /* nothing to display */
}
/* Glyph not found */
/* In legacy mode use the glyph we get by a 1:1 mapping.
This would make absolutely no sense with Unicode in mind,
but do this for ASCII characters since a font may lack
-@@ -4093,6 +4092,31 @@ void vcs_scr_writew(struct vc_data *vc,
+@@ -4093,6 +4092,31 @@
}
}
/*
* Visible symbols for modules
*/
-diff -purN linux-2.6.27/drivers/char/xilinx_hwicap/buffer_icap.c linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/buffer_icap.c
---- linux-2.6.27/drivers/char/xilinx_hwicap/buffer_icap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/buffer_icap.c 2009-03-25 16:11:21.000000000 +0000
-@@ -21,9 +21,6 @@
+diff -r 9608d5473017 drivers/char/xilinx_hwicap/buffer_icap.c
+--- a/drivers/char/xilinx_hwicap/buffer_icap.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/xilinx_hwicap/buffer_icap.c Wed May 06 16:56:16 2009 +0100
+@@ -20,9 +20,6 @@
+ * REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
* INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE.
- *
+- *
- * Xilinx products are not intended for use in life support appliances,
- * devices, or systems. Use in such applications is expressly prohibited.
-- *
+ *
* (c) Copyright 2003-2008 Xilinx Inc.
* All rights reserved.
- *
-diff -purN linux-2.6.27/drivers/char/xilinx_hwicap/buffer_icap.h linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/buffer_icap.h
---- linux-2.6.27/drivers/char/xilinx_hwicap/buffer_icap.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/buffer_icap.h 2009-03-25 16:11:21.000000000 +0000
-@@ -21,9 +21,6 @@
+diff -r 9608d5473017 drivers/char/xilinx_hwicap/buffer_icap.h
+--- a/drivers/char/xilinx_hwicap/buffer_icap.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/xilinx_hwicap/buffer_icap.h Wed May 06 16:56:16 2009 +0100
+@@ -20,9 +20,6 @@
+ * REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
* INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE.
- *
+- *
- * Xilinx products are not intended for use in life support appliances,
- * devices, or systems. Use in such applications is expressly prohibited.
-- *
+ *
* (c) Copyright 2003-2008 Xilinx Inc.
* All rights reserved.
- *
-diff -purN linux-2.6.27/drivers/char/xilinx_hwicap/fifo_icap.c linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/fifo_icap.c
---- linux-2.6.27/drivers/char/xilinx_hwicap/fifo_icap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/fifo_icap.c 2009-03-25 16:11:21.000000000 +0000
-@@ -21,9 +21,6 @@
+diff -r 9608d5473017 drivers/char/xilinx_hwicap/fifo_icap.c
+--- a/drivers/char/xilinx_hwicap/fifo_icap.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/xilinx_hwicap/fifo_icap.c Wed May 06 16:56:16 2009 +0100
+@@ -20,9 +20,6 @@
+ * REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
* INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE.
- *
+- *
- * Xilinx products are not intended for use in life support appliances,
- * devices, or systems. Use in such applications is expressly prohibited.
-- *
+ *
* (c) Copyright 2007-2008 Xilinx Inc.
* All rights reserved.
- *
-diff -purN linux-2.6.27/drivers/char/xilinx_hwicap/fifo_icap.h linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/fifo_icap.h
---- linux-2.6.27/drivers/char/xilinx_hwicap/fifo_icap.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/fifo_icap.h 2009-03-25 16:11:21.000000000 +0000
-@@ -21,9 +21,6 @@
+diff -r 9608d5473017 drivers/char/xilinx_hwicap/fifo_icap.h
+--- a/drivers/char/xilinx_hwicap/fifo_icap.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/xilinx_hwicap/fifo_icap.h Wed May 06 16:56:16 2009 +0100
+@@ -20,9 +20,6 @@
+ * REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
* INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE.
- *
+- *
- * Xilinx products are not intended for use in life support appliances,
- * devices, or systems. Use in such applications is expressly prohibited.
-- *
+ *
* (c) Copyright 2007-2008 Xilinx Inc.
* All rights reserved.
- *
-diff -purN linux-2.6.27/drivers/char/xilinx_hwicap/xilinx_hwicap.c linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/xilinx_hwicap.c
---- linux-2.6.27/drivers/char/xilinx_hwicap/xilinx_hwicap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/xilinx_hwicap.c 2009-03-25 16:11:21.000000000 +0000
-@@ -21,9 +21,6 @@
+diff -r 9608d5473017 drivers/char/xilinx_hwicap/xilinx_hwicap.c
+--- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c Wed May 06 16:56:16 2009 +0100
+@@ -20,9 +20,6 @@
+ * REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
* INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE.
- *
+- *
- * Xilinx products are not intended for use in life support appliances,
- * devices, or systems. Use in such applications is expressly prohibited.
-- *
+ *
* (c) Copyright 2002 Xilinx Inc., Systems Engineering Group
* (c) Copyright 2004 Xilinx Inc., Systems Engineering Group
- * (c) Copyright 2007-2008 Xilinx Inc.
-diff -purN linux-2.6.27/drivers/char/xilinx_hwicap/xilinx_hwicap.h linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/xilinx_hwicap.h
---- linux-2.6.27/drivers/char/xilinx_hwicap/xilinx_hwicap.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/xilinx_hwicap.h 2009-03-25 16:11:21.000000000 +0000
-@@ -21,9 +21,6 @@
+diff -r 9608d5473017 drivers/char/xilinx_hwicap/xilinx_hwicap.h
+--- a/drivers/char/xilinx_hwicap/xilinx_hwicap.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.h Wed May 06 16:56:16 2009 +0100
+@@ -20,9 +20,6 @@
+ * REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
* INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE.
- *
+- *
- * Xilinx products are not intended for use in life support appliances,
- * devices, or systems. Use in such applications is expressly prohibited.
-- *
+ *
* (c) Copyright 2003-2007 Xilinx Inc.
* All rights reserved.
- *
-diff -purN linux-2.6.27/drivers/connector/cn_proc.c linux-2.6.27.19-5.1/drivers/connector/cn_proc.c
---- linux-2.6.27/drivers/connector/cn_proc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/connector/cn_proc.c 2009-03-25 16:11:20.000000000 +0000
+diff -r 9608d5473017 drivers/connector/cn_proc.c
+--- a/drivers/connector/cn_proc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/connector/cn_proc.c Wed May 06 16:56:16 2009 +0100
@@ -34,7 +34,7 @@
#define CN_PROC_MSG_SIZE (sizeof(struct cn_msg) + sizeof(struct proc_event))
static struct cb_id cn_proc_event_id = { CN_IDX_PROC, CN_VAL_PROC };
/* proc_event_counts is used as the sequence number of the netlink message */
-diff -purN linux-2.6.27/drivers/cpufreq/Kconfig linux-2.6.27.19-5.1/drivers/cpufreq/Kconfig
---- linux-2.6.27/drivers/cpufreq/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cpufreq/Kconfig 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/cpufreq/Kconfig
+--- a/drivers/cpufreq/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cpufreq/Kconfig Wed May 06 16:56:16 2009 +0100
@@ -1,5 +1,6 @@
config CPU_FREQ
bool "CPU Frequency scaling"
help
CPU Frequency scaling allows you to change the clock speed of
CPUs on the fly. This is a nice method to save power, because
-diff -purN linux-2.6.27/drivers/cpufreq/cpufreq.c linux-2.6.27.19-5.1/drivers/cpufreq/cpufreq.c
---- linux-2.6.27/drivers/cpufreq/cpufreq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cpufreq/cpufreq.c 2009-03-25 16:11:12.000000000 +0000
-@@ -455,6 +455,7 @@ static ssize_t show_##file_name \
+diff -r 9608d5473017 drivers/cpufreq/cpufreq.c
+--- a/drivers/cpufreq/cpufreq.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cpufreq/cpufreq.c Wed May 06 16:56:16 2009 +0100
+@@ -455,6 +455,7 @@
show_one(cpuinfo_min_freq, cpuinfo.min_freq);
show_one(cpuinfo_max_freq, cpuinfo.max_freq);
show_one(scaling_min_freq, min);
show_one(scaling_max_freq, max);
show_one(scaling_cur_freq, cur);
-@@ -660,6 +661,7 @@ __ATTR(_name, 0644, show_##_name, store_
+@@ -660,6 +661,7 @@
define_one_ro0400(cpuinfo_cur_freq);
define_one_ro(cpuinfo_min_freq);
define_one_ro(cpuinfo_max_freq);
define_one_ro(scaling_available_governors);
define_one_ro(scaling_driver);
define_one_ro(scaling_cur_freq);
-@@ -673,6 +675,7 @@ define_one_rw(scaling_setspeed);
+@@ -673,6 +675,7 @@
static struct attribute *default_attrs[] = {
&cpuinfo_min_freq.attr,
&cpuinfo_max_freq.attr,
&scaling_min_freq.attr,
&scaling_max_freq.attr,
&affected_cpus.attr,
-diff -purN linux-2.6.27/drivers/cpufreq/cpufreq_conservative.c linux-2.6.27.19-5.1/drivers/cpufreq/cpufreq_conservative.c
---- linux-2.6.27/drivers/cpufreq/cpufreq_conservative.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cpufreq/cpufreq_conservative.c 2009-03-25 16:11:12.000000000 +0000
-@@ -54,7 +54,18 @@ static unsigned int def_sampling_rate;
+diff -r 9608d5473017 drivers/cpufreq/cpufreq_conservative.c
+--- a/drivers/cpufreq/cpufreq_conservative.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cpufreq/cpufreq_conservative.c Wed May 06 16:56:16 2009 +0100
+@@ -54,7 +54,18 @@
(MIN_SAMPLING_RATE_RATIO * jiffies_to_usecs(10))
#define MIN_SAMPLING_RATE \
(def_sampling_rate / MIN_SAMPLING_RATE_RATIO)
#define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER (1000)
#define DEF_SAMPLING_DOWN_FACTOR (1)
#define MAX_SAMPLING_DOWN_FACTOR (10)
-@@ -193,12 +204,14 @@ static ssize_t store_sampling_rate(struc
+@@ -193,12 +204,14 @@
ret = sscanf (buf, "%u", &input);
mutex_lock(&dbs_mutex);
mutex_unlock(&dbs_mutex);
return count;
-diff -purN linux-2.6.27/drivers/cpufreq/cpufreq_ondemand.c linux-2.6.27.19-5.1/drivers/cpufreq/cpufreq_ondemand.c
---- linux-2.6.27/drivers/cpufreq/cpufreq_ondemand.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cpufreq/cpufreq_ondemand.c 2009-03-25 16:11:12.000000000 +0000
-@@ -45,9 +45,20 @@ static unsigned int def_sampling_rate;
+diff -r 9608d5473017 drivers/cpufreq/cpufreq_ondemand.c
+--- a/drivers/cpufreq/cpufreq_ondemand.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cpufreq/cpufreq_ondemand.c Wed May 06 16:56:16 2009 +0100
+@@ -45,9 +45,20 @@
(MIN_SAMPLING_RATE_RATIO * jiffies_to_usecs(10))
#define MIN_SAMPLING_RATE \
(def_sampling_rate / MIN_SAMPLING_RATE_RATIO)
static void do_dbs_timer(struct work_struct *work);
-@@ -219,13 +230,14 @@ static ssize_t store_sampling_rate(struc
+@@ -219,13 +230,14 @@
ret = sscanf(buf, "%u", &input);
mutex_lock(&dbs_mutex);
mutex_unlock(&dbs_mutex);
return count;
-@@ -547,6 +559,31 @@ static int cpufreq_governor_dbs(struct c
+@@ -547,6 +559,31 @@
if (def_sampling_rate < MIN_STAT_SAMPLING_RATE)
def_sampling_rate = MIN_STAT_SAMPLING_RATE;
dbs_tuners_ins.sampling_rate = def_sampling_rate;
}
dbs_timer_init(this_dbs_info);
-diff -purN linux-2.6.27/drivers/cpuidle/Kconfig linux-2.6.27.19-5.1/drivers/cpuidle/Kconfig
---- linux-2.6.27/drivers/cpuidle/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cpuidle/Kconfig 2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/cpuidle/Kconfig
+--- a/drivers/cpuidle/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cpuidle/Kconfig Wed May 06 16:56:16 2009 +0100
@@ -1,6 +1,7 @@
config CPU_IDLE
default ACPI
help
CPU idle is a generic framework for supporting software-controlled
-diff -purN linux-2.6.27/drivers/cpuidle/cpuidle.c linux-2.6.27.19-5.1/drivers/cpuidle/cpuidle.c
---- linux-2.6.27/drivers/cpuidle/cpuidle.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cpuidle/cpuidle.c 2009-03-25 16:11:19.000000000 +0000
-@@ -56,7 +56,11 @@ static void cpuidle_idle_call(void)
+diff -r 9608d5473017 drivers/cpuidle/cpuidle.c
+--- a/drivers/cpuidle/cpuidle.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cpuidle/cpuidle.c Wed May 06 16:56:16 2009 +0100
+@@ -56,7 +56,11 @@
if (pm_idle_old)
pm_idle_old();
else
return;
}
-@@ -67,8 +71,11 @@ static void cpuidle_idle_call(void)
+@@ -67,8 +71,11 @@
target_state = &dev->states[next_state];
/* enter the state and update stats */
-- dev->last_residency = target_state->enter(dev, target_state);
- dev->last_state = target_state;
-+ dev->last_residency = target_state->enter(dev, target_state);
++ dev->last_state = target_state;
+ dev->last_residency = target_state->enter(dev, target_state);
+- dev->last_state = target_state;
+ if (dev->last_state)
+ target_state = dev->last_state;
+
target_state->time += (unsigned long long)dev->last_residency;
target_state->usage++;
-diff -purN linux-2.6.27/drivers/cpuidle/governors/menu.c linux-2.6.27.19-5.1/drivers/cpuidle/governors/menu.c
---- linux-2.6.27/drivers/cpuidle/governors/menu.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cpuidle/governors/menu.c 2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/cpuidle/governors/menu.c
+--- a/drivers/cpuidle/governors/menu.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cpuidle/governors/menu.c Wed May 06 16:56:16 2009 +0100
@@ -15,12 +15,14 @@
#include <linux/tick.h>
unsigned int last_measured_us;
unsigned int elapsed_us;
};
-@@ -47,6 +49,12 @@ static int menu_select(struct cpuidle_de
+@@ -46,6 +48,12 @@
+ /* determine the expected residency time */
data->expected_us =
(u32) ktime_to_ns(tick_nohz_get_sleep_length()) / 1000;
-
++
+ /* Recalculate predicted_us based on prediction_history_pct */
+ data->predicted_us *= PRED_HISTORY_PCT;
+ data->predicted_us += (100 - PRED_HISTORY_PCT) *
+ data->current_predicted_us;
+ data->predicted_us /= 100;
-+
+
/* find the deepest idle state that satisfies our constraints */
for (i = CPUIDLE_DRIVER_STATE_START + 1; i < dev->state_count; i++) {
- struct cpuidle_state *s = &dev->states[i];
-@@ -97,7 +105,7 @@ static void menu_reflect(struct cpuidle_
+@@ -97,7 +105,7 @@
measured_us = -1;
/* Predict time until next break event */
if (last_idle_us + BREAK_FUZZ <
data->expected_us - target->exit_latency) {
-diff -purN linux-2.6.27/drivers/crypto/talitos.c linux-2.6.27.19-5.1/drivers/crypto/talitos.c
---- linux-2.6.27/drivers/crypto/talitos.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/crypto/talitos.c 2009-03-25 16:11:14.000000000 +0000
-@@ -1619,6 +1619,7 @@ static struct of_device_id talitos_match
+diff -r 9608d5473017 drivers/crypto/talitos.c
+--- a/drivers/crypto/talitos.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/crypto/talitos.c Wed May 06 16:56:16 2009 +0100
+@@ -1619,6 +1619,7 @@
MODULE_DEVICE_TABLE(of, talitos_match);
static struct of_platform_driver talitos_driver = {
.name = "talitos",
.match_table = talitos_match,
.probe = talitos_probe,
-diff -purN linux-2.6.27/drivers/dca/dca-core.c linux-2.6.27.19-5.1/drivers/dca/dca-core.c
---- linux-2.6.27/drivers/dca/dca-core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/dca/dca-core.c 2009-03-25 16:11:03.000000000 +0000
-@@ -270,6 +270,6 @@ static void __exit dca_exit(void)
+diff -r 9608d5473017 drivers/dca/dca-core.c
+--- a/drivers/dca/dca-core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/dca/dca-core.c Wed May 06 16:56:16 2009 +0100
+@@ -270,6 +270,6 @@
dca_sysfs_exit();
}
+subsys_initcall(dca_init);
module_exit(dca_exit);
-diff -purN linux-2.6.27/drivers/dma/dmaengine.c linux-2.6.27.19-5.1/drivers/dma/dmaengine.c
---- linux-2.6.27/drivers/dma/dmaengine.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/dma/dmaengine.c 2009-03-25 16:11:23.000000000 +0000
-@@ -388,7 +388,10 @@ int dma_async_device_register(struct dma
+diff -r 9608d5473017 drivers/dma/dmaengine.c
+--- a/drivers/dma/dmaengine.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/dma/dmaengine.c Wed May 06 16:56:16 2009 +0100
+@@ -388,7 +388,10 @@
init_completion(&device->done);
kref_init(&device->refcount);
/* represent channels in sysfs. Probably want devs too */
list_for_each_entry(chan, &device->channels, device_node) {
-diff -purN linux-2.6.27/drivers/dma/fsldma.c linux-2.6.27.19-5.1/drivers/dma/fsldma.c
---- linux-2.6.27/drivers/dma/fsldma.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/dma/fsldma.c 2009-03-25 16:11:23.000000000 +0000
-@@ -1036,6 +1036,7 @@ static struct of_device_id of_fsl_dma_ch
+diff -r 9608d5473017 drivers/dma/fsldma.c
+--- a/drivers/dma/fsldma.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/dma/fsldma.c Wed May 06 16:56:16 2009 +0100
+@@ -1036,6 +1036,7 @@
};
static struct of_platform_driver of_fsl_dma_chan_driver = {
.name = "of-fsl-dma-channel",
.match_table = of_fsl_dma_chan_ids,
.probe = of_fsl_dma_chan_probe,
-@@ -1116,6 +1117,7 @@ static struct of_device_id of_fsl_dma_id
+@@ -1116,6 +1117,7 @@
};
static struct of_platform_driver of_fsl_dma_driver = {
.name = "of-fsl-dma",
.match_table = of_fsl_dma_ids,
.probe = of_fsl_dma_probe,
-diff -purN linux-2.6.27/drivers/dma/ioat_dma.c linux-2.6.27.19-5.1/drivers/dma/ioat_dma.c
---- linux-2.6.27/drivers/dma/ioat_dma.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/dma/ioat_dma.c 2009-03-25 16:11:23.000000000 +0000
-@@ -519,7 +519,7 @@ static dma_cookie_t ioat1_tx_submit(stru
+diff -r 9608d5473017 drivers/dma/ioat_dma.c
+--- a/drivers/dma/ioat_dma.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/dma/ioat_dma.c Wed May 06 16:56:16 2009 +0100
+@@ -519,7 +519,7 @@
}
hw->ctl = IOAT_DMA_DESCRIPTOR_CTL_CP_STS;
hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_INT_GN;
if (first != new) {
/* move callback into to last desc */
-@@ -611,7 +611,7 @@ static dma_cookie_t ioat2_tx_submit(stru
+@@ -611,7 +611,7 @@
}
hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_CP_STS;
hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_INT_GN;
if (first != new) {
/* move callback into to last desc */
-@@ -801,6 +801,12 @@ static void ioat_dma_free_chan_resources
+@@ -801,6 +801,12 @@
struct ioat_desc_sw *desc, *_desc;
int in_use_descs = 0;
tasklet_disable(&ioat_chan->cleanup_task);
ioat_dma_memcpy_cleanup(ioat_chan);
-@@ -863,6 +869,7 @@ static void ioat_dma_free_chan_resources
+@@ -863,6 +869,7 @@
ioat_chan->last_completion = ioat_chan->completion_addr = 0;
ioat_chan->pending = 0;
ioat_chan->dmacount = 0;
ioat_chan->watchdog_completion = 0;
ioat_chan->last_compl_desc_addr_hw = 0;
ioat_chan->watchdog_tcp_cookie =
-@@ -1332,8 +1339,9 @@ static void ioat_dma_start_null_desc(str
+@@ -1332,8 +1339,9 @@
static void ioat_dma_test_callback(void *dma_async_param)
{
}
/**
-@@ -1350,6 +1358,7 @@ static int ioat_dma_self_test(struct ioa
+@@ -1350,6 +1358,7 @@
dma_addr_t dma_dest, dma_src;
dma_cookie_t cookie;
int err = 0;
src = kzalloc(sizeof(u8) * IOAT_TEST_SIZE, GFP_KERNEL);
if (!src)
-@@ -1389,8 +1398,9 @@ static int ioat_dma_self_test(struct ioa
+@@ -1389,8 +1398,9 @@
}
async_tx_ack(tx);
cookie = tx->tx_submit(tx);
if (cookie < 0) {
dev_err(&device->pdev->dev,
-@@ -1399,7 +1409,8 @@ static int ioat_dma_self_test(struct ioa
+@@ -1399,7 +1409,8 @@
goto free_resources;
}
device->common.device_issue_pending(dma_chan);
if (device->common.device_is_tx_complete(dma_chan, cookie, NULL, NULL)
!= DMA_SUCCESS) {
-diff -purN linux-2.6.27/drivers/dma/iop-adma.c linux-2.6.27.19-5.1/drivers/dma/iop-adma.c
---- linux-2.6.27/drivers/dma/iop-adma.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/dma/iop-adma.c 2009-03-25 16:11:23.000000000 +0000
-@@ -85,18 +85,28 @@ iop_adma_run_tx_complete_actions(struct
+diff -r 9608d5473017 drivers/dma/iop-adma.c
+--- a/drivers/dma/iop-adma.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/dma/iop-adma.c Wed May 06 16:56:16 2009 +0100
+@@ -85,18 +85,28 @@
enum dma_ctrl_flags flags = desc->async_tx.flags;
u32 src_cnt;
dma_addr_t addr;
dma_unmap_page(dev, addr, len,
DMA_TO_DEVICE);
}
-diff -purN linux-2.6.27/drivers/dma/iovlock.c linux-2.6.27.19-5.1/drivers/dma/iovlock.c
---- linux-2.6.27/drivers/dma/iovlock.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/dma/iovlock.c 2009-03-25 16:11:23.000000000 +0000
-@@ -55,7 +55,6 @@ struct dma_pinned_list *dma_pin_iovec_pa
+diff -r 9608d5473017 drivers/dma/iovlock.c
+--- a/drivers/dma/iovlock.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/dma/iovlock.c Wed May 06 16:56:16 2009 +0100
+@@ -55,7 +55,6 @@
int nr_iovecs = 0;
int iovec_len_used = 0;
int iovec_pages_used = 0;
/* don't pin down non-user-based iovecs */
if (segment_eq(get_fs(), KERNEL_DS))
-@@ -72,23 +71,21 @@ struct dma_pinned_list *dma_pin_iovec_pa
+@@ -72,23 +71,21 @@
local_list = kmalloc(sizeof(*local_list)
+ (nr_iovecs * sizeof (struct dma_page_list))
+ (iovec_pages_used * sizeof (struct page*)), GFP_KERNEL);
/* list of pages starts right after the page list array */
pages = (struct page **) &local_list->page_list[nr_iovecs];
-
-+ local_list->nr_iovecs = 0;
+
++ local_list->nr_iovecs = 0;
+
for (i = 0; i < nr_iovecs; i++) {
struct dma_page_list *page_list = &local_list->page_list[i];
page_list->nr_pages = num_pages_spanned(&iov[i]);
page_list->base_address = iov[i].iov_base;
-@@ -109,10 +106,8 @@ struct dma_pinned_list *dma_pin_iovec_pa
+@@ -109,10 +106,8 @@
NULL);
up_read(¤t->mm->mmap_sem);
local_list->nr_iovecs = i + 1;
}
-@@ -122,7 +117,7 @@ struct dma_pinned_list *dma_pin_iovec_pa
+@@ -122,7 +117,7 @@
unpin:
dma_unpin_iovec_pages(local_list);
out:
}
void dma_unpin_iovec_pages(struct dma_pinned_list *pinned_list)
-diff -purN linux-2.6.27/drivers/dma/mv_xor.c linux-2.6.27.19-5.1/drivers/dma/mv_xor.c
---- linux-2.6.27/drivers/dma/mv_xor.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/dma/mv_xor.c 2009-03-25 16:11:23.000000000 +0000
-@@ -311,17 +311,26 @@ mv_xor_run_tx_complete_actions(struct mv
+diff -r 9608d5473017 drivers/dma/mv_xor.c
+--- a/drivers/dma/mv_xor.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/dma/mv_xor.c Wed May 06 16:56:16 2009 +0100
+@@ -311,17 +311,26 @@
enum dma_ctrl_flags flags = desc->async_tx.flags;
u32 src_cnt;
dma_addr_t addr;
dma_unmap_page(dev, addr, len,
DMA_TO_DEVICE);
}
-diff -purN linux-2.6.27/drivers/edac/cell_edac.c linux-2.6.27.19-5.1/drivers/edac/cell_edac.c
---- linux-2.6.27/drivers/edac/cell_edac.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/edac/cell_edac.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/edac/cell_edac.c
+--- a/drivers/edac/cell_edac.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/edac/cell_edac.c Wed May 06 16:56:16 2009 +0100
@@ -9,6 +9,7 @@
*/
#undef DEBUG
#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>
-@@ -142,7 +143,7 @@ static void __devinit cell_edac_init_csr
+@@ -142,7 +143,7 @@
csrow->nr_pages = (r.end - r.start + 1) >> PAGE_SHIFT;
csrow->last_page = csrow->first_page + csrow->nr_pages - 1;
csrow->mtype = MEM_XDR;
dev_dbg(mci->dev,
"Initialized on node %d, chanmask=0x%x,"
" first_page=0x%lx, nr_pages=0x%x\n",
-@@ -164,6 +165,8 @@ static int __devinit cell_edac_probe(str
+@@ -163,6 +164,8 @@
+ regs = cbe_get_cpu_mic_tm_regs(cbe_node_to_cpu(pdev->id));
if (regs == NULL)
return -ENODEV;
-
-+ edac_op_state = EDAC_OPSTATE_POLL;
+
++ edac_op_state = EDAC_OPSTATE_POLL;
+
/* Get channel population */
reg = in_be64(®s->mic_mnt_cfg);
- dev_dbg(&pdev->dev, "MIC_MNT_CFG = 0x%016lx\n", reg);
-diff -purN linux-2.6.27/drivers/firewire/fw-cdev.c linux-2.6.27.19-5.1/drivers/firewire/fw-cdev.c
---- linux-2.6.27/drivers/firewire/fw-cdev.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firewire/fw-cdev.c 2009-03-25 16:11:13.000000000 +0000
-@@ -720,8 +720,8 @@ static int ioctl_create_iso_context(stru
+diff -r 9608d5473017 drivers/firewire/fw-cdev.c
+--- a/drivers/firewire/fw-cdev.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firewire/fw-cdev.c Wed May 06 16:56:16 2009 +0100
+@@ -720,8 +720,8 @@
#define GET_PAYLOAD_LENGTH(v) ((v) & 0xffff)
#define GET_INTERRUPT(v) (((v) >> 16) & 0x01)
#define GET_SKIP(v) (((v) >> 17) & 0x01)
#define GET_HEADER_LENGTH(v) (((v) >> 24) & 0xff)
static int ioctl_queue_iso(struct client *client, void *buffer)
-@@ -913,7 +913,7 @@ dispatch_ioctl(struct client *client, un
+@@ -913,7 +913,7 @@
return -EFAULT;
}
}
static long
-diff -purN linux-2.6.27/drivers/firewire/fw-ohci.c linux-2.6.27.19-5.1/drivers/firewire/fw-ohci.c
---- linux-2.6.27/drivers/firewire/fw-ohci.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firewire/fw-ohci.c 2009-03-25 16:11:13.000000000 +0000
-@@ -226,7 +226,7 @@ static inline struct fw_ohci *fw_ohci(st
+diff -r 9608d5473017 drivers/firewire/fw-ohci.c
+--- a/drivers/firewire/fw-ohci.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firewire/fw-ohci.c Wed May 06 16:56:16 2009 +0100
+@@ -226,7 +226,7 @@
#define CONTEXT_DEAD 0x0800
#define CONTEXT_ACTIVE 0x0400
#define OHCI1394_MAX_AT_RESP_RETRIES 0x2
#define OHCI1394_MAX_PHYS_RESP_RETRIES 0x8
-@@ -958,6 +958,7 @@ at_context_queue_packet(struct context *
+@@ -958,6 +958,7 @@
packet->ack = RCODE_SEND_ERROR;
return -1;
}
d[2].req_count = cpu_to_le16(packet->payload_length);
d[2].data_address = cpu_to_le32(payload_bus);
-@@ -1009,7 +1010,6 @@ static int handle_at_packet(struct conte
+@@ -1009,7 +1010,6 @@
struct driver_data *driver_data;
struct fw_packet *packet;
struct fw_ohci *ohci = context->ohci;
int evt;
if (last->transfer_status == 0)
-@@ -1022,9 +1022,8 @@ static int handle_at_packet(struct conte
+@@ -1022,9 +1022,8 @@
/* This packet was cancelled, just continue. */
return 1;
packet->payload_length, DMA_TO_DEVICE);
evt = le16_to_cpu(last->transfer_status) & 0x1f;
-@@ -1681,6 +1680,10 @@ static int ohci_cancel_packet(struct fw_
+@@ -1680,6 +1679,10 @@
+
if (packet->ack != 0)
goto out;
-
++
+ if (packet->payload_bus)
+ dma_unmap_single(ohci->card.device, packet->payload_bus,
+ packet->payload_length, DMA_TO_DEVICE);
-+
+
log_ar_at_event('T', packet->speed, packet->header, 0x20);
driver_data->packet = NULL;
- packet->ack = RCODE_CANCELLED;
-diff -purN linux-2.6.27/drivers/firewire/fw-sbp2.c linux-2.6.27.19-5.1/drivers/firewire/fw-sbp2.c
---- linux-2.6.27/drivers/firewire/fw-sbp2.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firewire/fw-sbp2.c 2009-03-25 16:11:13.000000000 +0000
-@@ -172,6 +172,9 @@ struct sbp2_target {
+diff -r 9608d5473017 drivers/firewire/fw-sbp2.c
+--- a/drivers/firewire/fw-sbp2.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firewire/fw-sbp2.c Wed May 06 16:56:16 2009 +0100
+@@ -171,6 +171,9 @@
+ int dont_block; /* counter for each logical unit */
int blocked; /* ditto */
};
-
++
+/* Impossible login_id, to detect logout attempt before successful login */
+#define INVALID_LOGIN_ID 0x10000
-+
+
/*
* Per section 7.4.8 of the SBP-2 spec, a mgt_ORB_timeout value can be
- * provided in the config rom. Most devices do provide a value, which
-@@ -347,21 +350,28 @@ static const struct {
+@@ -347,17 +350,24 @@
.model = ~0,
.workarounds = SBP2_WORKAROUND_128K_MAX_TRANS,
},
+ /* iPod 4th generation */ {
.firmware_revision = 0x0a2700,
.model = 0x000021,
- .workarounds = SBP2_WORKAROUND_FIX_CAPACITY,
- },
- /* iPod mini */ {
- .firmware_revision = 0x0a2700,
-+ .model = 0x000022,
+ .workarounds = SBP2_WORKAROUND_FIX_CAPACITY,
+ },
+ /* iPod mini */ {
+ .firmware_revision = 0x0a2700,
- .model = 0x000023,
++ .model = 0x000022,
.workarounds = SBP2_WORKAROUND_FIX_CAPACITY,
},
-@@ -791,9 +801,20 @@ static void sbp2_release_target(struct k
+ /* iPod mini */ {
+@@ -791,9 +801,20 @@
scsi_remove_device(sdev);
scsi_device_put(sdev);
}
fw_core_remove_address_handler(&lu->address_handler);
list_del(&lu->link);
kfree(lu);
-@@ -808,19 +829,20 @@ static void sbp2_release_target(struct k
+@@ -808,19 +829,20 @@
static struct workqueue_struct *sbp2_wq;
}
static void
-@@ -993,6 +1015,7 @@ static int sbp2_add_logical_unit(struct
+@@ -993,6 +1015,7 @@
lu->tgt = tgt;
lu->lun = lun_entry & 0xffff;
lu->retries = 0;
lu->has_sdev = false;
lu->blocked = false;
-@@ -1158,7 +1181,7 @@ static int sbp2_probe(struct device *dev
+@@ -1158,7 +1181,7 @@
/* Do the login in a workqueue so we can easily reschedule retries. */
list_for_each_entry(lu, &tgt->lu_list, link)
return 0;
fail_tgt_put:
-@@ -1272,6 +1295,19 @@ static struct fw_driver sbp2_driver = {
+@@ -1272,6 +1295,19 @@
.id_table = sbp2_id_table,
};
static unsigned int
sbp2_status_to_sense_data(u8 *sbp2_status, u8 *sense_data)
{
-@@ -1351,15 +1387,7 @@ complete_command_orb(struct sbp2_orb *ba
+@@ -1351,15 +1387,7 @@
dma_unmap_single(device->card->device, orb->base.request_bus,
sizeof(orb->request), DMA_TO_DEVICE);
orb->cmd->result = result;
orb->done(orb->cmd);
-@@ -1509,8 +1537,10 @@ static int sbp2_scsi_queuecommand(struct
+@@ -1509,8 +1537,10 @@
orb->base.request_bus =
dma_map_single(device->card->device, &orb->request,
sizeof(orb->request), DMA_TO_DEVICE);
sbp2_send_orb(&orb->base, lu, lu->tgt->node_id, lu->generation,
lu->command_block_agent_address + SBP2_ORB_POINTER);
-diff -purN linux-2.6.27/drivers/firewire/fw-topology.c linux-2.6.27.19-5.1/drivers/firewire/fw-topology.c
---- linux-2.6.27/drivers/firewire/fw-topology.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firewire/fw-topology.c 2009-03-25 16:11:13.000000000 +0000
-@@ -413,7 +413,7 @@ static void
+diff -r 9608d5473017 drivers/firewire/fw-topology.c
+--- a/drivers/firewire/fw-topology.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firewire/fw-topology.c Wed May 06 16:56:16 2009 +0100
+@@ -413,7 +413,7 @@
update_tree(struct fw_card *card, struct fw_node *root)
{
struct list_head list0, list1;
int i, event;
INIT_LIST_HEAD(&list0);
-@@ -485,7 +485,9 @@ update_tree(struct fw_card *card, struct
+@@ -485,7 +485,9 @@
}
node0 = fw_node(node0->link.next);
}
}
-diff -purN linux-2.6.27/drivers/firewire/fw-transaction.c linux-2.6.27.19-5.1/drivers/firewire/fw-transaction.c
---- linux-2.6.27/drivers/firewire/fw-transaction.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firewire/fw-transaction.c 2009-03-25 16:11:13.000000000 +0000
-@@ -207,6 +207,7 @@ fw_fill_request(struct fw_packet *packet
+diff -r 9608d5473017 drivers/firewire/fw-transaction.c
+--- a/drivers/firewire/fw-transaction.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firewire/fw-transaction.c Wed May 06 16:56:16 2009 +0100
+@@ -207,6 +207,7 @@
packet->speed = speed;
packet->generation = generation;
packet->ack = 0;
}
/**
-@@ -541,6 +542,8 @@ fw_fill_response(struct fw_packet *respo
+@@ -541,6 +542,8 @@
BUG();
return;
}
}
EXPORT_SYMBOL(fw_fill_response);
-diff -purN linux-2.6.27/drivers/firewire/fw-transaction.h linux-2.6.27.19-5.1/drivers/firewire/fw-transaction.h
---- linux-2.6.27/drivers/firewire/fw-transaction.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firewire/fw-transaction.h 2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/firewire/fw-transaction.h
+--- a/drivers/firewire/fw-transaction.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firewire/fw-transaction.h Wed May 06 16:56:16 2009 +0100
@@ -27,6 +27,7 @@
#include <linux/list.h>
#include <linux/spinlock_types.h>
#include <linux/workqueue.h>
#define TCODE_IS_READ_REQUEST(tcode) (((tcode) & ~1) == 4)
-@@ -153,6 +154,7 @@ struct fw_packet {
+@@ -153,6 +154,7 @@
size_t header_length;
void *payload;
size_t payload_length;
u32 timestamp;
/*
-@@ -248,7 +250,7 @@ struct fw_card {
+@@ -248,7 +250,7 @@
struct fw_node *local_node;
struct fw_node *root_node;
struct fw_node *irm_node;
int gap_count;
bool beta_repeaters_present;
-diff -purN linux-2.6.27/drivers/firmware/dell_rbu.c linux-2.6.27.19-5.1/drivers/firmware/dell_rbu.c
---- linux-2.6.27/drivers/firmware/dell_rbu.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firmware/dell_rbu.c 2009-03-25 16:11:14.000000000 +0000
-@@ -576,7 +576,7 @@ static ssize_t read_rbu_image_type(struc
+diff -r 9608d5473017 drivers/firmware/dell_rbu.c
+--- a/drivers/firmware/dell_rbu.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firmware/dell_rbu.c Wed May 06 16:56:16 2009 +0100
+@@ -576,7 +576,7 @@
{
int size = 0;
if (!pos)
return size;
}
-@@ -648,7 +648,7 @@ static ssize_t read_rbu_packet_size(stru
+@@ -648,7 +648,7 @@
int size = 0;
if (!pos) {
spin_lock(&rbu_data.lock);
spin_unlock(&rbu_data.lock);
}
return size;
-diff -purN linux-2.6.27/drivers/firmware/dmi_scan.c linux-2.6.27.19-5.1/drivers/firmware/dmi_scan.c
---- linux-2.6.27/drivers/firmware/dmi_scan.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firmware/dmi_scan.c 2009-03-25 16:11:14.000000000 +0000
-@@ -407,6 +407,27 @@ void __init dmi_scan_machine(void)
+diff -r 9608d5473017 drivers/firmware/dmi_scan.c
+--- a/drivers/firmware/dmi_scan.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firmware/dmi_scan.c Wed May 06 16:56:16 2009 +0100
+@@ -407,6 +407,27 @@
}
/**
* dmi_check_system - check system DMI data
* @list: array of dmi_system_id structures to match against
* All non-null elements of the list must match
-@@ -421,30 +442,45 @@ void __init dmi_scan_machine(void)
+@@ -421,28 +442,43 @@
*/
int dmi_check_system(const struct dmi_system_id *list)
{
return count;
}
EXPORT_SYMBOL(dmi_check_system);
-
- /**
++
++/**
+ * dmi_first_match - find dmi_system_id structure matching system DMI data
+ * @list: array of dmi_system_id structures to match against
+ * All non-null elements of the list must match
+ return NULL;
+}
+EXPORT_SYMBOL(dmi_first_match);
-+
-+/**
+
+ /**
* dmi_get_system_info - return DMI data value
- * @field: data index (see enum dmi_field)
- *
-@@ -457,6 +493,17 @@ const char *dmi_get_system_info(int fiel
+@@ -457,6 +493,17 @@
}
EXPORT_SYMBOL(dmi_get_system_info);
/**
* dmi_name_in_vendors - Check if string is anywhere in the DMI vendor information.
-diff -purN linux-2.6.27/drivers/firmware/memmap.c linux-2.6.27.19-5.1/drivers/firmware/memmap.c
---- linux-2.6.27/drivers/firmware/memmap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firmware/memmap.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/firmware/memmap.c
+--- a/drivers/firmware/memmap.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firmware/memmap.c Wed May 06 16:56:16 2009 +0100
@@ -31,8 +31,8 @@
* information is necessary as for the resource tree.
*/
const char *type; /* type of the memory range */
struct list_head list; /* entry for the linked list */
struct kobject kobj; /* kobject for each entry */
-@@ -101,7 +101,7 @@ static LIST_HEAD(map_entries);
+@@ -101,7 +101,7 @@
* Common implementation of firmware_map_add() and firmware_map_add_early()
* which expects a pre-allocated struct firmware_map_entry.
**/
const char *type,
struct firmware_map_entry *entry)
{
-@@ -132,8 +132,7 @@ static int firmware_map_add_entry(resour
+@@ -132,8 +132,7 @@
*
* Returns 0 on success, or -ENOMEM if no memory could be allocated.
**/
{
struct firmware_map_entry *entry;
-@@ -157,7 +156,7 @@ int firmware_map_add(resource_size_t sta
+@@ -157,7 +156,7 @@
*
* Returns 0 on success, or -ENOMEM if no memory could be allocated.
**/
const char *type)
{
struct firmware_map_entry *entry;
-@@ -175,14 +174,12 @@ int __init firmware_map_add_early(resour
+@@ -175,14 +174,12 @@
static ssize_t start_show(struct firmware_map_entry *entry, char *buf)
{
}
static ssize_t type_show(struct firmware_map_entry *entry, char *buf)
-diff -purN linux-2.6.27/drivers/gpio/gpiolib.c linux-2.6.27.19-5.1/drivers/gpio/gpiolib.c
---- linux-2.6.27/drivers/gpio/gpiolib.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpio/gpiolib.c 2009-03-25 16:11:19.000000000 +0000
-@@ -1020,7 +1020,7 @@ int gpio_get_value_cansleep(unsigned gpi
+diff -r 9608d5473017 drivers/gpio/gpiolib.c
+--- a/drivers/gpio/gpiolib.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpio/gpiolib.c Wed May 06 16:56:16 2009 +0100
+@@ -1020,7 +1020,7 @@
might_sleep_if(extra_checks);
chip = gpio_to_chip(gpio);
}
EXPORT_SYMBOL_GPL(gpio_get_value_cansleep);
-@@ -1049,7 +1049,7 @@ static void gpiolib_dbg_show(struct seq_
+@@ -1049,7 +1049,7 @@
continue;
is_out = test_bit(FLAG_IS_OUT, &gdesc->flags);
gpio, gdesc->label,
is_out ? "out" : "in ",
chip->get
-diff -purN linux-2.6.27/drivers/gpu/drm/Kconfig linux-2.6.27.19-5.1/drivers/gpu/drm/Kconfig
---- linux-2.6.27/drivers/gpu/drm/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/Kconfig 2009-03-25 16:11:17.000000000 +0000
-@@ -99,6 +99,13 @@ config DRM_VIA
+diff -r 9608d5473017 drivers/gpu/drm/Kconfig
+--- a/drivers/gpu/drm/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/Kconfig Wed May 06 16:56:16 2009 +0100
+@@ -99,6 +99,13 @@
Choose this option if you have a Via unichrome or compatible video
chipset. If M is selected the module will be called via.
config DRM_SAVAGE
tristate "Savage video cards"
depends on DRM
-diff -purN linux-2.6.27/drivers/gpu/drm/Makefile linux-2.6.27.19-5.1/drivers/gpu/drm/Makefile
---- linux-2.6.27/drivers/gpu/drm/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/Makefile 2009-03-25 16:11:18.000000000 +0000
-@@ -23,4 +23,5 @@ obj-$(CONFIG_DRM_I915) += i915/
+diff -r 9608d5473017 drivers/gpu/drm/Makefile
+--- a/drivers/gpu/drm/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/Makefile Wed May 06 16:56:16 2009 +0100
+@@ -23,4 +23,5 @@
obj-$(CONFIG_DRM_SIS) += sis/
obj-$(CONFIG_DRM_SAVAGE)+= savage/
obj-$(CONFIG_DRM_VIA) +=via/
+obj-$(CONFIG_DRM_VIA_CHROME9) +=via_chrome9/
-diff -purN linux-2.6.27/drivers/gpu/drm/i915/i915_dma.c linux-2.6.27.19-5.1/drivers/gpu/drm/i915/i915_dma.c
---- linux-2.6.27/drivers/gpu/drm/i915/i915_dma.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/i915/i915_dma.c 2009-03-25 16:11:18.000000000 +0000
-@@ -836,7 +836,7 @@ struct drm_ioctl_desc i915_ioctls[] = {
+diff -r 9608d5473017 drivers/gpu/drm/i915/i915_dma.c
+--- a/drivers/gpu/drm/i915/i915_dma.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/i915/i915_dma.c Wed May 06 16:56:17 2009 +0100
+@@ -836,7 +836,7 @@
DRM_IOCTL_DEF(DRM_I915_SET_VBLANK_PIPE, i915_vblank_pipe_set, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY ),
DRM_IOCTL_DEF(DRM_I915_GET_VBLANK_PIPE, i915_vblank_pipe_get, DRM_AUTH ),
DRM_IOCTL_DEF(DRM_I915_VBLANK_SWAP, i915_vblank_swap, DRM_AUTH),
};
int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls);
-diff -purN linux-2.6.27/drivers/gpu/drm/via/via_dma.c linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_dma.c
---- linux-2.6.27/drivers/gpu/drm/via/via_dma.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_dma.c 2009-03-25 16:11:17.000000000 +0000
-@@ -68,6 +68,15 @@
+diff -r 9608d5473017 drivers/gpu/drm/via/via_dma.c
+--- a/drivers/gpu/drm/via/via_dma.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/via/via_dma.c Wed May 06 16:56:17 2009 +0100
+@@ -68,12 +68,22 @@
*vb++ = (w2); \
dev_priv->dma_low += 8;
static void via_cmdbuf_start(drm_via_private_t * dev_priv);
static void via_cmdbuf_pause(drm_via_private_t * dev_priv);
static void via_cmdbuf_reset(drm_via_private_t * dev_priv);
-@@ -75,6 +84,7 @@ static void via_cmdbuf_rewind(drm_via_pr
+ static void via_cmdbuf_rewind(drm_via_private_t * dev_priv);
static int via_wait_idle(drm_via_private_t * dev_priv);
static void via_pad_cache(drm_via_private_t * dev_priv, int qwords);
-
+
+
/*
* Free space in command buffer.
- */
-@@ -155,17 +165,35 @@ static inline uint32_t *via_check_dma(dr
+@@ -155,17 +165,35 @@
int via_dma_cleanup(struct drm_device * dev)
{
}
return 0;
-@@ -175,6 +203,7 @@ static int via_initialize(struct drm_dev
+@@ -175,6 +203,7 @@
drm_via_private_t * dev_priv,
drm_via_dma_init_t * init)
{
if (!dev_priv || !dev_priv->mmio) {
DRM_ERROR("via_dma_init called before via_map_init\n");
return -EFAULT;
-@@ -195,6 +224,9 @@ static int via_initialize(struct drm_dev
+@@ -194,6 +223,9 @@
+ DRM_ERROR("AGP DMA is not supported on this chip\n");
return -EINVAL;
}
-
++
+ for (pnode = via_video_save_head; pnode; pnode = pnode->next)
+ memcpy(pnode->pvideomem, pnode->psystemmem, pnode->size);
-+
+
dev_priv->ring.map.offset = dev->agp->base + init->offset;
dev_priv->ring.map.size = init->size;
- dev_priv->ring.map.type = 0;
-@@ -224,6 +256,7 @@ static int via_initialize(struct drm_dev
+@@ -224,6 +256,7 @@
via_cmdbuf_start(dev_priv);
return 0;
}
-@@ -332,12 +365,42 @@ static int via_flush_ioctl(struct drm_de
+@@ -332,16 +365,174 @@
static int via_cmdbuffer(struct drm_device *dev, void *data, struct drm_file *file_priv)
{
drm_via_cmdbuffer_t *cmdbuf = data;
ret = via_dispatch_cmdbuffer(dev, cmdbuf);
if (ret) {
return ret;
-@@ -346,6 +409,134 @@ static int via_cmdbuffer(struct drm_devi
- return 0;
- }
-
+ }
++
++ return 0;
++}
++
+int via_cmdbuffer_video_agp(struct drm_device *dev, void *data,
+ struct drm_file *file_priv)
+{
+ DRM_WRITEMEMORYBARRIER();
+ /* fire */
+ VIA_WRITE(VIA_REG_TRANSPACE, command | HC_HAGPCMNT_MASK);
-+
-+ return 0;
-+}
-+
- static int via_dispatch_pci_cmdbuffer(struct drm_device * dev,
- drm_via_cmdbuffer_t * cmd)
- {
-@@ -735,6 +926,146 @@ static int via_cmdbuf_size(struct drm_de
+
+ return 0;
+ }
+@@ -735,6 +926,146 @@
return ret;
}
struct drm_ioctl_desc via_ioctls[] = {
DRM_IOCTL_DEF(DRM_VIA_ALLOCMEM, via_mem_alloc, DRM_AUTH),
DRM_IOCTL_DEF(DRM_VIA_FREEMEM, via_mem_free, DRM_AUTH),
-@@ -742,6 +1073,7 @@ struct drm_ioctl_desc via_ioctls[] = {
+@@ -742,6 +1073,7 @@
DRM_IOCTL_DEF(DRM_VIA_FB_INIT, via_fb_init, DRM_AUTH|DRM_MASTER),
DRM_IOCTL_DEF(DRM_VIA_MAP_INIT, via_map_init, DRM_AUTH|DRM_MASTER),
DRM_IOCTL_DEF(DRM_VIA_DEC_FUTEX, via_decoder_futex, DRM_AUTH),
DRM_IOCTL_DEF(DRM_VIA_DMA_INIT, via_dma_init, DRM_AUTH),
DRM_IOCTL_DEF(DRM_VIA_CMDBUFFER, via_cmdbuffer, DRM_AUTH),
DRM_IOCTL_DEF(DRM_VIA_FLUSH, via_flush_ioctl, DRM_AUTH),
-@@ -749,7 +1081,10 @@ struct drm_ioctl_desc via_ioctls[] = {
+@@ -749,7 +1081,10 @@
DRM_IOCTL_DEF(DRM_VIA_CMDBUF_SIZE, via_cmdbuf_size, DRM_AUTH),
DRM_IOCTL_DEF(DRM_VIA_WAIT_IRQ, via_wait_irq, DRM_AUTH),
DRM_IOCTL_DEF(DRM_VIA_DMA_BLIT, via_dma_blit, DRM_AUTH),
};
int via_max_ioctl = DRM_ARRAY_SIZE(via_ioctls);
-diff -purN linux-2.6.27/drivers/gpu/drm/via/via_drv.c linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_drv.c
---- linux-2.6.27/drivers/gpu/drm/via/via_drv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_drv.c 2009-03-25 16:11:17.000000000 +0000
-@@ -37,10 +37,16 @@ static struct pci_device_id pciidlist[]
+diff -r 9608d5473017 drivers/gpu/drm/via/via_drv.c
+--- a/drivers/gpu/drm/via/via_drv.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/via/via_drv.c Wed May 06 16:56:17 2009 +0100
+@@ -37,10 +37,16 @@
viadrv_PCI_IDS
};
.load = via_driver_load,
.unload = via_driver_unload,
.context_dtor = via_final_context,
-@@ -68,8 +74,10 @@ static struct drm_driver driver = {
+@@ -68,8 +74,10 @@
.fasync = drm_fasync,
},
.pci_driver = {
},
.name = DRIVER_NAME,
-diff -purN linux-2.6.27/drivers/gpu/drm/via/via_drv.h linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_drv.h
---- linux-2.6.27/drivers/gpu/drm/via/via_drv.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_drv.h 2009-03-25 16:11:17.000000000 +0000
-@@ -62,6 +62,7 @@ typedef struct drm_via_private {
+diff -r 9608d5473017 drivers/gpu/drm/via/via_drv.h
+--- a/drivers/gpu/drm/via/via_drv.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/via/via_drv.h Wed May 06 16:56:17 2009 +0100
+@@ -62,6 +62,7 @@
drm_local_map_t *sarea;
drm_local_map_t *fb;
drm_local_map_t *mmio;
unsigned long agpAddr;
wait_queue_head_t decoder_queue[VIA_NR_XVMC_LOCKS];
char *dma_ptr;
-@@ -93,7 +94,13 @@ typedef struct drm_via_private {
+@@ -93,7 +94,13 @@
unsigned long vram_offset;
unsigned long agp_offset;
drm_via_blitq_t blit_queues[VIA_NUM_BLIT_ENGINES];
} drm_via_private_t;
enum via_family {
-@@ -119,6 +126,8 @@ extern int via_mem_free(struct drm_devic
+@@ -119,6 +126,8 @@
extern int via_agp_init(struct drm_device *dev, void *data, struct drm_file *file_priv);
extern int via_map_init(struct drm_device *dev, void *data, struct drm_file *file_priv);
extern int via_decoder_futex(struct drm_device *dev, void *data, struct drm_file *file_priv);
extern int via_wait_irq(struct drm_device *dev, void *data, struct drm_file *file_priv);
extern int via_dma_blit_sync( struct drm_device *dev, void *data, struct drm_file *file_priv );
extern int via_dma_blit( struct drm_device *dev, void *data, struct drm_file *file_priv );
-@@ -150,4 +159,7 @@ extern void via_lastclose(struct drm_dev
+@@ -150,4 +159,7 @@
extern void via_dmablit_handler(struct drm_device *dev, int engine, int from_irq);
extern void via_init_dmablit(struct drm_device *dev);
+extern int via_drm_suspend(struct pci_dev *dev, pm_message_t state);
+
#endif
-diff -purN linux-2.6.27/drivers/gpu/drm/via/via_map.c linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_map.c
---- linux-2.6.27/drivers/gpu/drm/via/via_map.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_map.c 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via/via_map.c
+--- a/drivers/gpu/drm/via/via_map.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/via/via_map.c Wed May 06 16:56:17 2009 +0100
@@ -25,6 +25,7 @@
#include "via_drm.h"
#include "via_drv.h"
static int via_do_init_map(struct drm_device * dev, drm_via_init_t * init)
{
drm_via_private_t *dev_priv = dev->dev_private;
-@@ -65,12 +66,35 @@ static int via_do_init_map(struct drm_de
+@@ -65,12 +66,35 @@
via_init_dmablit(dev);
dev->dev_private = (void *)dev_priv;
return 0;
}
-@@ -95,6 +119,11 @@ int via_driver_load(struct drm_device *d
+@@ -95,6 +119,11 @@
{
drm_via_private_t *dev_priv;
int ret = 0;
dev_priv = drm_calloc(1, sizeof(drm_via_private_t), DRM_MEM_DRIVER);
if (dev_priv == NULL)
-@@ -121,3 +150,19 @@ int via_driver_unload(struct drm_device
+@@ -121,3 +150,19 @@
return 0;
}
+
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/gpu/drm/via/via_mm.c linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_mm.c
---- linux-2.6.27/drivers/gpu/drm/via/via_mm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_mm.c 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via/via_mm.c
+--- a/drivers/gpu/drm/via/via_mm.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/via/via_mm.c Wed May 06 16:56:17 2009 +0100
@@ -30,6 +30,7 @@
#include "via_drv.h"
#include "drm_sman.h"
#define VIA_MM_ALIGN_SHIFT 4
#define VIA_MM_ALIGN_MASK ( (1 << VIA_MM_ALIGN_SHIFT) - 1)
-@@ -56,6 +57,8 @@ int via_agp_init(struct drm_device *dev,
+@@ -56,6 +57,8 @@
DRM_DEBUG("offset = %u, size = %u\n", agp->offset, agp->size);
return 0;
}
int via_fb_init(struct drm_device *dev, void *data, struct drm_file *file_priv)
{
-@@ -78,6 +81,8 @@ int via_fb_init(struct drm_device *dev,
+@@ -78,6 +81,8 @@
mutex_unlock(&dev->struct_mutex);
DRM_DEBUG("offset = %u, size = %u\n", fb->offset, fb->size);
return 0;
-@@ -115,6 +120,84 @@ void via_lastclose(struct drm_device *de
+@@ -115,6 +120,84 @@
mutex_unlock(&dev->struct_mutex);
}
int via_mem_alloc(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
-@@ -124,12 +207,13 @@ int via_mem_alloc(struct drm_device *dev
+@@ -124,12 +207,13 @@
drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;
unsigned long tmpSize;
dev_priv->agp_initialized)) {
DRM_ERROR
("Attempt to allocate from uninitialized memory manager.\n");
-@@ -138,15 +222,25 @@ int via_mem_alloc(struct drm_device *dev
+@@ -138,15 +222,25 @@
}
tmpSize = (mem->size + VIA_MM_ALIGN_MASK) >> VIA_MM_ALIGN_SHIFT;
} else {
mem->offset = 0;
mem->size = 0;
-@@ -166,6 +260,10 @@ int via_mem_free(struct drm_device *dev,
+@@ -166,6 +260,10 @@
mutex_lock(&dev->struct_mutex);
ret = drm_sman_free_key(&dev_priv->sman, mem->index);
mutex_unlock(&dev->struct_mutex);
DRM_DEBUG("free = 0x%lx\n", mem->index);
-@@ -192,3 +290,26 @@ void via_reclaim_buffers_locked(struct d
+@@ -192,3 +290,26 @@
mutex_unlock(&dev->struct_mutex);
return;
}
+ return -EINVAL;
+}
+EXPORT_SYMBOL(via_fb_free);
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/Makefile linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/Makefile 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/Makefile Wed May 06 16:56:17 2009 +0100
@@ -0,0 +1,8 @@
+#
+# Makefile for the drm device driver. This driver provides support for the
+
+obj-$(CONFIG_DRM_VIA_CHROME9) += via_chrome9.o
\ No newline at end of file
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_3d_reg.h linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_3d_reg.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_3d_reg.h 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_3d_reg.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_3d_reg.h Wed May 06 16:56:17 2009 +0100
@@ -0,0 +1,407 @@
+/*
+ * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
+}
+
+#endif
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_dma.c linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_dma.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_dma.c 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_dma.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_dma.c Wed May 06 16:56:17 2009 +0100
@@ -0,0 +1,1285 @@
+/*
+ * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
+{
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_dma.h linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_dma.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_dma.h 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_dma.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_dma.h Wed May 06 16:56:17 2009 +0100
@@ -0,0 +1,69 @@
+/*
+ * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
+extern void via_chrome9_dma_init_inv(struct drm_device *dev);
+
+#endif
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_drm.c linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drm.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drm.c 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_drm.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_drm.c Wed May 06 16:56:17 2009 +0100
@@ -0,0 +1,950 @@
+/*
+ * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
+ return 1;
+}
+
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_drm.h linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drm.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drm.h 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_drm.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_drm.h Wed May 06 16:56:17 2009 +0100
@@ -0,0 +1,443 @@
+/*
+ * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
+
+
+#endif /* _VIA_CHROME9_DRM_H_ */
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_drv.c linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drv.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drv.c 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_drv.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_drv.c Wed May 06 16:56:17 2009 +0100
@@ -0,0 +1,224 @@
+/*
+ * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL and additional rights");
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_drv.h linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drv.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drv.h 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_drv.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_drv.h Wed May 06 16:56:17 2009 +0100
@@ -0,0 +1,150 @@
+/*
+ * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
+#define VIA_CHROME9_WRITE8(reg, val) DRM_WRITE8(VIA_CHROME9_BASE, reg, val)
+
+#endif
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_mm.c linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_mm.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_mm.c 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_mm.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_mm.c Wed May 06 16:56:17 2009 +0100
@@ -0,0 +1,435 @@
+/*
+ * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
+ return 0;
+}
+EXPORT_SYMBOL(via_fb_free);
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_mm.h linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_mm.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_mm.h 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_mm.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_mm.h Wed May 06 16:56:17 2009 +0100
@@ -0,0 +1,67 @@
+/*
+ * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
+
+#endif
+
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.c linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.c 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_verifier.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.c Wed May 06 16:56:17 2009 +0100
@@ -0,0 +1,982 @@
+/*
+* Copyright 2004 The Unichrome Project. All Rights Reserved.
+}
+
+#endif
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.h linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.h 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_verifier.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.h Wed May 06 16:56:17 2009 +0100
@@ -0,0 +1,61 @@
+/*
+* Copyright 2004 The Unichrome Project. All Rights Reserved.
+void via_chrome9_init_command_verifier(void);
+
+#endif
-diff -purN linux-2.6.27/drivers/hid/hid-input.c linux-2.6.27.19-5.1/drivers/hid/hid-input.c
---- linux-2.6.27/drivers/hid/hid-input.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hid/hid-input.c 2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/hid/hid-input.c
+--- a/drivers/hid/hid-input.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hid/hid-input.c Wed May 06 16:56:17 2009 +0100
@@ -32,7 +32,7 @@
#include <linux/hid.h>
#include <linux/hid-debug.h>
module_param_named(pb_fnmode, hid_apple_fnmode, int, 0644);
MODULE_PARM_DESC(pb_fnmode,
"Mode of fn key on Apple keyboards (0 = disabled, 1 = fkeyslast, 2 = fkeysfirst)");
-diff -purN linux-2.6.27/drivers/hid/hidraw.c linux-2.6.27.19-5.1/drivers/hid/hidraw.c
---- linux-2.6.27/drivers/hid/hidraw.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hid/hidraw.c 2009-03-25 16:11:18.000000000 +0000
-@@ -113,7 +113,7 @@ static ssize_t hidraw_write(struct file
+diff -r 9608d5473017 drivers/hid/hidraw.c
+--- a/drivers/hid/hidraw.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hid/hidraw.c Wed May 06 16:56:17 2009 +0100
+@@ -113,7 +113,7 @@
if (!dev->hid_output_raw_report)
return -ENODEV;
printk(KERN_WARNING "hidraw: pid %d passed too large report\n",
task_pid_nr(current));
return -EINVAL;
-diff -purN linux-2.6.27/drivers/hid/usbhid/hid-core.c linux-2.6.27.19-5.1/drivers/hid/usbhid/hid-core.c
---- linux-2.6.27/drivers/hid/usbhid/hid-core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hid/usbhid/hid-core.c 2009-03-25 16:11:18.000000000 +0000
-@@ -44,6 +44,10 @@
+diff -r 9608d5473017 drivers/hid/usbhid/hid-core.c
+--- a/drivers/hid/usbhid/hid-core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hid/usbhid/hid-core.c Wed May 06 16:56:17 2009 +0100
+@@ -43,6 +43,10 @@
+ #define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik, Jiri Kosina"
#define DRIVER_DESC "USB HID core driver"
#define DRIVER_LICENSE "GPL"
-
++
+#ifdef CONFIG_KDB_USB
+#include <linux/kdb.h>
+#endif
-+
+
static char *hid_types[] = {"Device", "Pointer", "Mouse", "Device", "Joystick",
"Gamepad", "Keyboard", "Keypad", "Multi-Axis Controller"};
- /*
-@@ -940,6 +944,15 @@ static void hid_disconnect(struct usb_in
+@@ -940,6 +944,15 @@
usbhid = hid->driver_data;
spin_lock_irq(&usbhid->inlock); /* Sync with error handler */
usb_set_intfdata(intf, NULL);
set_bit(HID_DISCONNECTED, &usbhid->iofl);
-@@ -1037,6 +1050,21 @@ static int hid_probe(struct usb_interfac
+@@ -1036,6 +1049,21 @@
+
printk(": USB HID v%x.%02x %s [%s] on %s\n",
hid->version >> 8, hid->version & 0xff, c, hid->name, path);
-
++
+#ifdef CONFIG_KDB_USB
+ /* Attach USB keyboards to kdb */
+ if (!strcmp(c, "Keyboard")) {
+ "with KDB\n", path);
+ }
+#endif /* CONFIG_KDB_USB */
-+
+
return 0;
}
-
-diff -purN linux-2.6.27/drivers/hid/usbhid/hid-quirks.c linux-2.6.27.19-5.1/drivers/hid/usbhid/hid-quirks.c
---- linux-2.6.27/drivers/hid/usbhid/hid-quirks.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hid/usbhid/hid-quirks.c 2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/hid/usbhid/hid-quirks.c
+--- a/drivers/hid/usbhid/hid-quirks.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hid/usbhid/hid-quirks.c Wed May 06 16:56:17 2009 +0100
@@ -83,6 +83,7 @@
#define USB_DEVICE_ID_APPLE_WELLSPRING2_JIS 0x0232
#define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a
#define USB_DEVICE_ID_SONY_PS3_CONTROLLER 0x0268
#define USB_VENDOR_ID_SOUNDGRAPH 0x15c2
-@@ -460,6 +462,7 @@ static const struct hid_blacklist {
+@@ -460,6 +462,7 @@
{ USB_VENDOR_ID_AFATECH, USB_DEVICE_ID_AFATECH_AF9016, HID_QUIRK_FULLSPEED_INTERVAL },
{ USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM, HID_QUIRK_HIDDEV },
{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4, HID_QUIRK_HIDDEV | HID_QUIRK_IGNORE_HIDINPUT },
{ USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE, HID_QUIRK_HIDDEV | HID_QUIRK_IGNORE_HIDINPUT },
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV, HID_QUIRK_HIDINPUT },
-@@ -485,6 +488,8 @@ static const struct hid_blacklist {
+@@ -485,6 +488,8 @@
{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_ULTRAMOUSE, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_GENERAL_TOUCH, 0x0001, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_GENERAL_TOUCH, 0x0002, HID_QUIRK_IGNORE },
-@@ -603,8 +608,6 @@ static const struct hid_blacklist {
+@@ -603,8 +608,6 @@
{ USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_ELITE_KBD, HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL | HID_QUIRK_LOGITECH_EXPANDED_KEYMAP },
{ USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500, HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL | HID_QUIRK_LOGITECH_EXPANDED_KEYMAP },
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K, HID_QUIRK_MICROSOFT_KEYS },
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_LK6K, HID_QUIRK_MICROSOFT_KEYS },
-@@ -759,6 +762,8 @@ static const struct hid_rdesc_blacklist
+@@ -758,6 +761,8 @@
+ { USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE, HID_QUIRK_RDESC_SAMSUNG_REMOTE },
{ USB_VENDOR_ID_SUNPLUS, USB_DEVICE_ID_SUNPLUS_WDESKTOP, HID_QUIRK_RDESC_SUNPLUS_WDESKTOP },
-
-+ { USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE, HID_QUIRK_RDESC_SONY_VAIO_VGX },
+
++ { USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE, HID_QUIRK_RDESC_SONY_VAIO_VGX },
+
{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1, HID_QUIRK_RDESC_SWAPPED_MIN_MAX },
{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2, HID_QUIRK_RDESC_SWAPPED_MIN_MAX },
-
-@@ -1131,25 +1136,27 @@ static void usbhid_fixup_button_consumer
+@@ -1131,25 +1136,27 @@
}
}
}
}
-@@ -1181,6 +1188,9 @@ static void __usbhid_fixup_report_descri
+@@ -1181,6 +1188,9 @@
if (quirks & HID_QUIRK_RDESC_SUNPLUS_WDESKTOP)
usbhid_fixup_sunplus_wdesktop(rdesc, rsize);
}
/**
-diff -purN linux-2.6.27/drivers/hid/usbhid/usbkbd.c linux-2.6.27.19-5.1/drivers/hid/usbhid/usbkbd.c
---- linux-2.6.27/drivers/hid/usbhid/usbkbd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hid/usbhid/usbkbd.c 2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/hid/usbhid/usbkbd.c
+--- a/drivers/hid/usbhid/usbkbd.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hid/usbhid/usbkbd.c Wed May 06 16:56:18 2009 +0100
@@ -30,6 +30,9 @@
#include <linux/init.h>
#include <linux/usb/input.h>
/*
* Version Information
-@@ -289,6 +292,16 @@ static int usb_kbd_probe(struct usb_inte
+@@ -289,6 +292,16 @@
usb_fill_int_urb(kbd->irq, dev, pipe,
kbd->new, (maxp > 8 ? 8 : maxp),
usb_kbd_irq, kbd, endpoint->bInterval);
kbd->irq->transfer_dma = kbd->new_dma;
kbd->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
-@@ -326,6 +339,10 @@ static void usb_kbd_disconnect(struct us
+@@ -326,6 +339,10 @@
usb_set_intfdata(intf, NULL);
if (kbd) {
usb_kill_urb(kbd->irq);
input_unregister_device(kbd->dev);
usb_kbd_free_mem(interface_to_usbdev(intf), kbd);
-diff -purN linux-2.6.27/drivers/hwmon/abituguru3.c linux-2.6.27.19-5.1/drivers/hwmon/abituguru3.c
---- linux-2.6.27/drivers/hwmon/abituguru3.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/abituguru3.c 2009-03-25 16:11:30.000000000 +0000
-@@ -1153,7 +1153,7 @@ static int __init abituguru3_dmi_detect(
+diff -r 9608d5473017 drivers/hwmon/abituguru3.c
+--- a/drivers/hwmon/abituguru3.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/abituguru3.c Wed May 06 16:56:18 2009 +0100
+@@ -1153,7 +1153,7 @@
static inline int abituguru3_dmi_detect(void)
{
}
#endif /* CONFIG_DMI */
-diff -purN linux-2.6.27/drivers/hwmon/dme1737.c linux-2.6.27.19-5.1/drivers/hwmon/dme1737.c
---- linux-2.6.27/drivers/hwmon/dme1737.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/dme1737.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/dme1737.c
+--- a/drivers/hwmon/dme1737.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/dme1737.c Wed May 06 16:56:18 2009 +0100
@@ -34,6 +34,7 @@
#include <linux/hwmon-vid.h>
#include <linux/err.h>
#include <asm/io.h>
/* ISA device, if found */
-@@ -2372,6 +2373,10 @@ static int __init dme1737_isa_device_add
+@@ -2372,6 +2373,10 @@
};
int err;
if (!(pdev = platform_device_alloc("dme1737", addr))) {
printk(KERN_ERR "dme1737: Failed to allocate device.\n");
err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/f71805f.c linux-2.6.27.19-5.1/drivers/hwmon/f71805f.c
---- linux-2.6.27/drivers/hwmon/f71805f.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/f71805f.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/f71805f.c
+--- a/drivers/hwmon/f71805f.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/f71805f.c Wed May 06 16:56:18 2009 +0100
@@ -39,6 +39,7 @@
#include <linux/mutex.h>
#include <linux/sysfs.h>
#include <asm/io.h>
static unsigned short force_id;
-@@ -1455,6 +1456,10 @@ static int __init f71805f_device_add(uns
+@@ -1455,6 +1456,10 @@
}
res.name = pdev->name;
err = platform_device_add_resources(pdev, &res, 1);
if (err) {
printk(KERN_ERR DRVNAME ": Device resource addition failed "
-diff -purN linux-2.6.27/drivers/hwmon/f71882fg.c linux-2.6.27.19-5.1/drivers/hwmon/f71882fg.c
---- linux-2.6.27/drivers/hwmon/f71882fg.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/f71882fg.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/f71882fg.c
+--- a/drivers/hwmon/f71882fg.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/f71882fg.c Wed May 06 16:56:18 2009 +0100
@@ -27,6 +27,7 @@
#include <linux/hwmon-sysfs.h>
#include <linux/err.h>
#include <asm/io.h>
#define DRVNAME "f71882fg"
-@@ -892,6 +893,10 @@ static int __init f71882fg_device_add(un
+@@ -892,6 +893,10 @@
return -ENOMEM;
res.name = f71882fg_pdev->name;
err = platform_device_add_resources(f71882fg_pdev, &res, 1);
if (err) {
printk(KERN_ERR DRVNAME ": Device resource addition failed\n");
-diff -purN linux-2.6.27/drivers/hwmon/hwmon-vid.c linux-2.6.27.19-5.1/drivers/hwmon/hwmon-vid.c
---- linux-2.6.27/drivers/hwmon/hwmon-vid.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/hwmon-vid.c 2009-03-25 16:11:30.000000000 +0000
-@@ -180,6 +180,7 @@ static struct vrm_model vrm_models[] = {
+diff -r 9608d5473017 drivers/hwmon/hwmon-vid.c
+--- a/drivers/hwmon/hwmon-vid.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/hwmon-vid.c Wed May 06 16:56:18 2009 +0100
+@@ -180,6 +180,7 @@
{X86_VENDOR_AMD, 0x6, ANY, ANY, 90}, /* Athlon Duron etc */
{X86_VENDOR_AMD, 0xF, 0x3F, ANY, 24}, /* Athlon 64, Opteron */
{X86_VENDOR_AMD, 0xF, ANY, ANY, 25}, /* NPT family 0Fh */
{X86_VENDOR_INTEL, 0x6, 0x9, ANY, 13}, /* Pentium M (130 nm) */
{X86_VENDOR_INTEL, 0x6, 0xB, ANY, 85}, /* Tualatin */
{X86_VENDOR_INTEL, 0x6, 0xD, ANY, 13}, /* Pentium M (90 nm) */
-diff -purN linux-2.6.27/drivers/hwmon/ibmaem.c linux-2.6.27.19-5.1/drivers/hwmon/ibmaem.c
---- linux-2.6.27/drivers/hwmon/ibmaem.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/ibmaem.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/ibmaem.c
+--- a/drivers/hwmon/ibmaem.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/ibmaem.c Wed May 06 16:56:18 2009 +0100
@@ -88,9 +88,11 @@
static DEFINE_IDR(aem_idr);
static DEFINE_SPINLOCK(aem_idr_lock);
};
struct aem_ipmi_data {
-@@ -583,7 +585,7 @@ static int aem_init_aem1_inst(struct aem
+@@ -583,7 +585,7 @@
data->pdev = platform_device_alloc(DRVNAME, data->id);
if (!data->pdev)
goto dev_err;
res = platform_device_add(data->pdev);
if (res)
-@@ -716,7 +718,7 @@ static int aem_init_aem2_inst(struct aem
+@@ -716,7 +718,7 @@
data->pdev = platform_device_alloc(DRVNAME, data->id);
if (!data->pdev)
goto dev_err;
res = platform_device_add(data->pdev);
if (res)
-@@ -1085,7 +1087,7 @@ static int __init aem_init(void)
+@@ -1085,7 +1087,7 @@
{
int res;
if (res) {
printk(KERN_ERR "Can't register aem driver\n");
return res;
-@@ -1097,7 +1099,7 @@ static int __init aem_init(void)
+@@ -1097,7 +1099,7 @@
return 0;
ipmi_reg_err:
return res;
}
-@@ -1107,7 +1109,7 @@ static void __exit aem_exit(void)
+@@ -1107,7 +1109,7 @@
struct aem_data *p1, *next1;
ipmi_smi_watcher_unregister(&driver_data.bmc_events);
list_for_each_entry_safe(p1, next1, &driver_data.aem_devices, list)
aem_delete(p1);
}
-diff -purN linux-2.6.27/drivers/hwmon/it87.c linux-2.6.27.19-5.1/drivers/hwmon/it87.c
---- linux-2.6.27/drivers/hwmon/it87.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/it87.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/it87.c
+--- a/drivers/hwmon/it87.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/it87.c Wed May 06 16:56:18 2009 +0100
@@ -48,6 +48,7 @@
#include <linux/sysfs.h>
#include <linux/string.h>
#include <asm/io.h>
#define DRVNAME "it87"
-@@ -1535,6 +1536,10 @@ static int __init it87_device_add(unsign
+@@ -1535,6 +1536,10 @@
};
int err;
pdev = platform_device_alloc(DRVNAME, address);
if (!pdev) {
err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/pc87360.c linux-2.6.27.19-5.1/drivers/hwmon/pc87360.c
---- linux-2.6.27/drivers/hwmon/pc87360.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/pc87360.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/pc87360.c
+--- a/drivers/hwmon/pc87360.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/pc87360.c Wed May 06 16:56:18 2009 +0100
@@ -43,6 +43,7 @@
#include <linux/hwmon-vid.h>
#include <linux/err.h>
#include <asm/io.h>
static u8 devid;
-@@ -1425,6 +1426,11 @@ static int __init pc87360_device_add(uns
+@@ -1425,6 +1426,11 @@
continue;
res.start = extra_isa[i];
res.end = extra_isa[i] + PC87360_EXTENT - 1;
err = platform_device_add_resources(pdev, &res, 1);
if (err) {
printk(KERN_ERR "pc87360: Device resource[%d] "
-diff -purN linux-2.6.27/drivers/hwmon/pc87427.c linux-2.6.27.19-5.1/drivers/hwmon/pc87427.c
---- linux-2.6.27/drivers/hwmon/pc87427.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/pc87427.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/pc87427.c
+--- a/drivers/hwmon/pc87427.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/pc87427.c Wed May 06 16:56:18 2009 +0100
@@ -32,6 +32,7 @@
#include <linux/mutex.h>
#include <linux/sysfs.h>
#include <asm/io.h>
static unsigned short force_id;
-@@ -524,6 +525,10 @@ static int __init pc87427_device_add(uns
+@@ -524,6 +525,10 @@
};
int err;
pdev = platform_device_alloc(DRVNAME, address);
if (!pdev) {
err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/sis5595.c linux-2.6.27.19-5.1/drivers/hwmon/sis5595.c
---- linux-2.6.27/drivers/hwmon/sis5595.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/sis5595.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/sis5595.c
+--- a/drivers/hwmon/sis5595.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/sis5595.c Wed May 06 16:56:18 2009 +0100
@@ -62,6 +62,7 @@
#include <linux/jiffies.h>
#include <linux/mutex.h>
#include <asm/io.h>
-@@ -727,6 +728,10 @@ static int __devinit sis5595_device_add(
+@@ -727,6 +728,10 @@
};
int err;
pdev = platform_device_alloc("sis5595", address);
if (!pdev) {
err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/smsc47b397.c linux-2.6.27.19-5.1/drivers/hwmon/smsc47b397.c
---- linux-2.6.27/drivers/hwmon/smsc47b397.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/smsc47b397.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/smsc47b397.c
+--- a/drivers/hwmon/smsc47b397.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/smsc47b397.c Wed May 06 16:56:18 2009 +0100
@@ -36,6 +36,7 @@
#include <linux/err.h>
#include <linux/init.h>
#include <asm/io.h>
static unsigned short force_id;
-@@ -303,6 +304,10 @@ static int __init smsc47b397_device_add(
+@@ -303,6 +304,10 @@
};
int err;
pdev = platform_device_alloc(DRVNAME, address);
if (!pdev) {
err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/smsc47m1.c linux-2.6.27.19-5.1/drivers/hwmon/smsc47m1.c
---- linux-2.6.27/drivers/hwmon/smsc47m1.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/smsc47m1.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/smsc47m1.c
+--- a/drivers/hwmon/smsc47m1.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/smsc47m1.c Wed May 06 16:56:18 2009 +0100
@@ -37,6 +37,7 @@
#include <linux/init.h>
#include <linux/mutex.h>
#include <asm/io.h>
static unsigned short force_id;
-@@ -705,6 +706,10 @@ static int __init smsc47m1_device_add(un
+@@ -705,6 +706,10 @@
};
int err;
pdev = platform_device_alloc(DRVNAME, address);
if (!pdev) {
err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/via686a.c linux-2.6.27.19-5.1/drivers/hwmon/via686a.c
---- linux-2.6.27/drivers/hwmon/via686a.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/via686a.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/via686a.c
+--- a/drivers/hwmon/via686a.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/via686a.c Wed May 06 16:56:18 2009 +0100
@@ -41,6 +41,7 @@
#include <linux/init.h>
#include <linux/mutex.h>
#include <asm/io.h>
-@@ -783,6 +784,10 @@ static int __devinit via686a_device_add(
+@@ -783,6 +784,10 @@
};
int err;
pdev = platform_device_alloc("via686a", address);
if (!pdev) {
err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/vt1211.c linux-2.6.27.19-5.1/drivers/hwmon/vt1211.c
---- linux-2.6.27/drivers/hwmon/vt1211.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/vt1211.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/vt1211.c
+--- a/drivers/hwmon/vt1211.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/vt1211.c Wed May 06 16:56:18 2009 +0100
@@ -32,6 +32,7 @@
#include <linux/err.h>
#include <linux/mutex.h>
#include <asm/io.h>
static int uch_config = -1;
-@@ -1259,6 +1260,10 @@ static int __init vt1211_device_add(unsi
+@@ -1259,6 +1260,10 @@
}
res.name = pdev->name;
err = platform_device_add_resources(pdev, &res, 1);
if (err) {
printk(KERN_ERR DRVNAME ": Device resource addition failed "
-diff -purN linux-2.6.27/drivers/hwmon/vt8231.c linux-2.6.27.19-5.1/drivers/hwmon/vt8231.c
---- linux-2.6.27/drivers/hwmon/vt8231.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/vt8231.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/vt8231.c
+--- a/drivers/hwmon/vt8231.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/vt8231.c Wed May 06 16:56:18 2009 +0100
@@ -35,6 +35,7 @@
#include <linux/hwmon-vid.h>
#include <linux/err.h>
#include <asm/io.h>
static int force_addr;
-@@ -894,6 +895,10 @@ static int __devinit vt8231_device_add(u
+@@ -894,6 +895,10 @@
};
int err;
pdev = platform_device_alloc("vt8231", address);
if (!pdev) {
err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/w83627ehf.c linux-2.6.27.19-5.1/drivers/hwmon/w83627ehf.c
---- linux-2.6.27/drivers/hwmon/w83627ehf.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/w83627ehf.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/w83627ehf.c
+--- a/drivers/hwmon/w83627ehf.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/w83627ehf.c Wed May 06 16:56:18 2009 +0100
@@ -48,6 +48,7 @@
#include <linux/hwmon-vid.h>
#include <linux/err.h>
#include <asm/io.h>
#include "lm75.h"
-@@ -1544,6 +1545,11 @@ static int __init sensors_w83627ehf_init
+@@ -1544,6 +1545,11 @@
res.start = address + IOREGION_OFFSET;
res.end = address + IOREGION_OFFSET + IOREGION_LENGTH - 1;
res.flags = IORESOURCE_IO;
err = platform_device_add_resources(pdev, &res, 1);
if (err) {
printk(KERN_ERR DRVNAME ": Device resource addition failed "
-diff -purN linux-2.6.27/drivers/hwmon/w83627hf.c linux-2.6.27.19-5.1/drivers/hwmon/w83627hf.c
---- linux-2.6.27/drivers/hwmon/w83627hf.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/w83627hf.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/w83627hf.c
+--- a/drivers/hwmon/w83627hf.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/w83627hf.c Wed May 06 16:56:18 2009 +0100
@@ -50,6 +50,7 @@
#include <linux/err.h>
#include <linux/mutex.h>
#include <asm/io.h>
#include "lm75.h"
-@@ -1793,6 +1794,10 @@ static int __init w83627hf_device_add(un
+@@ -1793,6 +1794,10 @@
};
int err;
pdev = platform_device_alloc(DRVNAME, address);
if (!pdev) {
err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/i2c/busses/Kconfig linux-2.6.27.19-5.1/drivers/i2c/busses/Kconfig
---- linux-2.6.27/drivers/i2c/busses/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/i2c/busses/Kconfig 2009-03-25 16:11:18.000000000 +0000
-@@ -97,6 +97,7 @@ config I2C_I801
+diff -r 9608d5473017 drivers/i2c/busses/Kconfig
+--- a/drivers/i2c/busses/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/i2c/busses/Kconfig Wed May 06 16:56:18 2009 +0100
+@@ -97,6 +97,7 @@
ICH9
Tolapai
ICH10
This driver can also be built as a module. If so, the module
will be called i2c-i801.
-diff -purN linux-2.6.27/drivers/i2c/busses/i2c-i801.c linux-2.6.27.19-5.1/drivers/i2c/busses/i2c-i801.c
---- linux-2.6.27/drivers/i2c/busses/i2c-i801.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/i2c/busses/i2c-i801.c 2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/i2c/busses/i2c-i801.c
+--- a/drivers/i2c/busses/i2c-i801.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/i2c/busses/i2c-i801.c Wed May 06 16:56:18 2009 +0100
@@ -41,6 +41,7 @@
Tolapai 0x5032 32 hard yes yes yes
ICH10 0x3a30 32 hard yes yes yes
Features supported by this driver:
Software PEC no
-@@ -576,6 +577,7 @@ static struct pci_device_id i801_ids[] =
+@@ -576,6 +577,7 @@
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TOLAPAI_1) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10_4) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10_5) },
{ 0, }
};
-@@ -599,6 +601,7 @@ static int __devinit i801_probe(struct p
+@@ -599,6 +601,7 @@
case PCI_DEVICE_ID_INTEL_TOLAPAI_1:
case PCI_DEVICE_ID_INTEL_ICH10_4:
case PCI_DEVICE_ID_INTEL_ICH10_5:
i801_features |= FEATURE_I2C_BLOCK_READ;
/* fall through */
case PCI_DEVICE_ID_INTEL_82801DB_3:
-diff -purN linux-2.6.27/drivers/i2c/busses/i2c-ibm_iic.c linux-2.6.27.19-5.1/drivers/i2c/busses/i2c-ibm_iic.c
---- linux-2.6.27/drivers/i2c/busses/i2c-ibm_iic.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/i2c/busses/i2c-ibm_iic.c 2009-03-25 16:11:18.000000000 +0000
-@@ -807,6 +807,7 @@ static const struct of_device_id ibm_iic
+diff -r 9608d5473017 drivers/i2c/busses/i2c-ibm_iic.c
+--- a/drivers/i2c/busses/i2c-ibm_iic.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/i2c/busses/i2c-ibm_iic.c Wed May 06 16:56:18 2009 +0100
+@@ -807,6 +807,7 @@
};
static struct of_platform_driver ibm_iic_driver = {
.name = "ibm-iic",
.match_table = ibm_iic_match,
.probe = iic_probe,
-diff -purN linux-2.6.27/drivers/i2c/busses/scx200_i2c.c linux-2.6.27.19-5.1/drivers/i2c/busses/scx200_i2c.c
---- linux-2.6.27/drivers/i2c/busses/scx200_i2c.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/i2c/busses/scx200_i2c.c 2009-03-25 16:11:18.000000000 +0000
-@@ -81,6 +81,7 @@ static struct i2c_algo_bit_data scx200_i
+diff -r 9608d5473017 drivers/i2c/busses/scx200_i2c.c
+--- a/drivers/i2c/busses/scx200_i2c.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/i2c/busses/scx200_i2c.c Wed May 06 16:56:18 2009 +0100
+@@ -81,6 +81,7 @@
static struct i2c_adapter scx200_i2c_ops = {
.owner = THIS_MODULE,
.id = I2C_HW_B_SCX200,
.algo_data = &scx200_i2c_data,
.name = "NatSemi SCx200 I2C",
-diff -purN linux-2.6.27/drivers/i2c/chips/ds1682.c linux-2.6.27.19-5.1/drivers/i2c/chips/ds1682.c
---- linux-2.6.27/drivers/i2c/chips/ds1682.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/i2c/chips/ds1682.c 2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/i2c/chips/ds1682.c
+--- a/drivers/i2c/chips/ds1682.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/i2c/chips/ds1682.c Wed May 06 16:56:18 2009 +0100
@@ -56,7 +56,7 @@
/*
* Generic counter attributes
char *buf)
{
struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr);
-@@ -82,7 +82,7 @@ static ssize_t ds1682_show(struct device
+@@ -82,7 +82,7 @@
return sprintf(buf, "%li\n", (long)le32_to_cpu(val));
}
const char *buf, size_t count)
{
struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr);
-diff -purN linux-2.6.27/drivers/ide/ide-lib.c linux-2.6.27.19-5.1/drivers/ide/ide-lib.c
---- linux-2.6.27/drivers/ide/ide-lib.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ide/ide-lib.c 2009-03-25 16:11:23.000000000 +0000
-@@ -177,6 +177,7 @@ void ide_toggle_bounce(ide_drive_t *driv
+diff -r 9608d5473017 drivers/ide/ide-lib.c
+--- a/drivers/ide/ide-lib.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ide/ide-lib.c Wed May 06 16:56:18 2009 +0100
+@@ -177,6 +177,7 @@
{
u64 addr = BLK_BOUNCE_HIGH; /* dma64_addr_t */
if (!PCI_DMA_BUS_IS_PHYS) {
addr = BLK_BOUNCE_ANY;
} else if (on && drive->media == ide_disk) {
-@@ -185,6 +186,16 @@ void ide_toggle_bounce(ide_drive_t *driv
+@@ -185,6 +186,16 @@
if (dev && dev->dma_mask)
addr = *dev->dma_mask;
}
if (drive->queue)
blk_queue_bounce_limit(drive->queue, addr);
-diff -purN linux-2.6.27/drivers/ide/pci/it821x.c linux-2.6.27.19-5.1/drivers/ide/pci/it821x.c
---- linux-2.6.27/drivers/ide/pci/it821x.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ide/pci/it821x.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/ide/pci/it821x.c
+--- a/drivers/ide/pci/it821x.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ide/pci/it821x.c Wed May 06 16:56:18 2009 +0100
@@ -69,6 +69,8 @@
#define DRV_NAME "it821x"
struct it821x_dev
{
unsigned int smart:1, /* Are we in smart raid mode */
-@@ -80,6 +82,7 @@ struct it821x_dev
+@@ -80,6 +82,7 @@
u16 pio[2]; /* Cached PIO values */
u16 mwdma[2]; /* Cached MWDMA values */
u16 udma[2]; /* Cached UDMA values (per drive) */
};
#define ATA_66 0
-@@ -586,6 +589,12 @@ static void __devinit init_hwif_it821x(i
+@@ -586,6 +589,12 @@
hwif->ultra_mask = ATA_UDMA6;
hwif->mwdma_mask = ATA_MWDMA2;
}
static void __devinit it8212_disable_raid(struct pci_dev *dev)
-@@ -658,6 +667,8 @@ static int __devinit it821x_init_one(str
+@@ -658,6 +667,8 @@
return -ENOMEM;
}
rc = ide_pci_init_one(dev, &it821x_chipset, itdevs);
if (rc)
kfree(itdevs);
-@@ -677,6 +688,7 @@ static void __devexit it821x_remove(stru
+@@ -677,6 +688,7 @@
static const struct pci_device_id it821x_pci_tbl[] = {
{ PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), 0 },
{ PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), 0 },
{ 0, },
};
-diff -purN linux-2.6.27/drivers/ieee1394/nodemgr.c linux-2.6.27.19-5.1/drivers/ieee1394/nodemgr.c
---- linux-2.6.27/drivers/ieee1394/nodemgr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ieee1394/nodemgr.c 2009-03-25 16:11:19.000000000 +0000
-@@ -115,8 +115,14 @@ static int nodemgr_bus_read(struct csr12
+diff -r 9608d5473017 drivers/ieee1394/nodemgr.c
+--- a/drivers/ieee1394/nodemgr.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ieee1394/nodemgr.c Wed May 06 16:56:18 2009 +0100
+@@ -115,8 +115,14 @@
return error;
}
return (be32_to_cpu(bus_info_data[2]) >> 8) & 0x3;
}
-diff -purN linux-2.6.27/drivers/ieee1394/ohci1394.h linux-2.6.27.19-5.1/drivers/ieee1394/ohci1394.h
---- linux-2.6.27/drivers/ieee1394/ohci1394.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ieee1394/ohci1394.h 2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/ieee1394/ohci1394.h
+--- a/drivers/ieee1394/ohci1394.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ieee1394/ohci1394.h Wed May 06 16:56:18 2009 +0100
@@ -26,7 +26,7 @@
#define OHCI1394_DRIVER_NAME "ohci1394"
#define OHCI1394_MAX_AT_RESP_RETRIES 0x2
#define OHCI1394_MAX_PHYS_RESP_RETRIES 0x8
#define OHCI1394_MAX_SELF_ID_ERRORS 16
-diff -purN linux-2.6.27/drivers/ieee1394/sbp2.c linux-2.6.27.19-5.1/drivers/ieee1394/sbp2.c
---- linux-2.6.27/drivers/ieee1394/sbp2.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ieee1394/sbp2.c 2009-03-25 16:11:19.000000000 +0000
-@@ -225,7 +225,7 @@ MODULE_PARM_DESC(workarounds, "Work arou
+diff -r 9608d5473017 drivers/ieee1394/sbp2.c
+--- a/drivers/ieee1394/sbp2.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ieee1394/sbp2.c Wed May 06 16:56:19 2009 +0100
+@@ -225,7 +225,7 @@
* independent of the implementation of the ieee1394 nodemgr, the longer format
* is recommended for future use.
*/
module_param_named(long_ieee1394_id, sbp2_long_sysfs_ieee1394_id, bool, 0644);
MODULE_PARM_DESC(long_ieee1394_id, "8+3+2 bytes format of ieee1394_id in sysfs "
"(default = backwards-compatible = N, SAM-conforming = Y)");
-@@ -395,6 +395,16 @@ static const struct {
+@@ -395,9 +395,24 @@
.model_id = SBP2_ROM_VALUE_WILDCARD,
.workarounds = SBP2_WORKAROUND_128K_MAX_TRANS,
},
/* iPod 4th generation */ {
.firmware_revision = 0x0a2700,
.model_id = 0x000021,
-@@ -402,6 +412,11 @@ static const struct {
- },
- /* iPod mini */ {
- .firmware_revision = 0x0a2700,
-+ .model_id = 0x000022,
+ .workarounds = SBP2_WORKAROUND_FIX_CAPACITY,
+ },
+ /* iPod mini */ {
+ .firmware_revision = 0x0a2700,
- .model_id = 0x000023,
++ .model_id = 0x000022,
.workarounds = SBP2_WORKAROUND_FIX_CAPACITY,
},
-diff -purN linux-2.6.27/drivers/infiniband/hw/cxgb3/iwch_provider.c linux-2.6.27.19-5.1/drivers/infiniband/hw/cxgb3/iwch_provider.c
---- linux-2.6.27/drivers/infiniband/hw/cxgb3/iwch_provider.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/cxgb3/iwch_provider.c 2009-03-25 16:11:19.000000000 +0000
-@@ -1102,9 +1102,7 @@ static u64 fw_vers_string_to_u64(struct
+ /* iPod mini */ {
+diff -r 9608d5473017 drivers/infiniband/hw/cxgb3/iwch_provider.c
+--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c Wed May 06 16:56:19 2009 +0100
+@@ -1102,9 +1102,7 @@
char *cp, *next;
unsigned fw_maj, fw_min, fw_mic;
next = info.fw_version + 1;
cp = strsep(&next, ".");
-@@ -1195,9 +1193,7 @@ static ssize_t show_fw_ver(struct device
+@@ -1195,9 +1193,7 @@
struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev;
PDBG("%s dev 0x%p\n", __func__, dev);
return sprintf(buf, "%s\n", info.fw_version);
}
-@@ -1210,9 +1206,7 @@ static ssize_t show_hca(struct device *d
+@@ -1210,9 +1206,7 @@
struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev;
PDBG("%s dev 0x%p\n", __func__, dev);
return sprintf(buf, "%s\n", info.driver);
}
-diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6.27/drivers/infiniband/hw/ehca/ehca_classes.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_classes.h 2009-03-25 16:11:20.000000000 +0000
-@@ -128,6 +128,8 @@ struct ehca_shca {
+diff -r 9608d5473017 drivers/infiniband/hw/ehca/ehca_classes.h
+--- a/drivers/infiniband/hw/ehca/ehca_classes.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/ehca/ehca_classes.h Wed May 06 16:56:19 2009 +0100
+@@ -128,6 +128,8 @@
/* MR pgsize: bit 0-3 means 4K, 64K, 1M, 16M respectively */
u32 hca_cap_mr_pgsize;
int max_mtu;
atomic_t num_cqs;
atomic_t num_qps;
};
-@@ -164,6 +166,13 @@ struct ehca_qmap_entry {
+@@ -164,6 +166,13 @@
u16 reported;
};
struct ehca_qp {
union {
struct ib_qp ib_qp;
-@@ -173,8 +182,9 @@ struct ehca_qp {
+@@ -173,8 +182,9 @@
enum ehca_ext_qp_type ext_type;
enum ib_qp_state state;
struct ipz_queue ipz_squeue;
struct h_galpas galpas;
u32 qkey;
u32 real_qp_num;
-@@ -204,6 +214,8 @@ struct ehca_qp {
+@@ -204,6 +214,8 @@
atomic_t nr_events; /* events seen */
wait_queue_head_t wait_completion;
int mig_armed;
};
#define IS_SRQ(qp) (qp->ext_type == EQPT_SRQ)
-@@ -233,6 +245,8 @@ struct ehca_cq {
+@@ -233,6 +245,8 @@
/* mmap counter for resources mapped into user space */
u32 mm_count_queue;
u32 mm_count_galpa;
};
enum ehca_mr_flag {
-diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_cq.c linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_cq.c
---- linux-2.6.27/drivers/infiniband/hw/ehca/ehca_cq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_cq.c 2009-03-25 16:11:20.000000000 +0000
-@@ -132,9 +132,9 @@ struct ib_cq *ehca_create_cq(struct ib_d
+diff -r 9608d5473017 drivers/infiniband/hw/ehca/ehca_cq.c
+--- a/drivers/infiniband/hw/ehca/ehca_cq.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/ehca/ehca_cq.c Wed May 06 16:56:19 2009 +0100
+@@ -132,9 +132,9 @@
if (cqe >= 0xFFFFFFFF - 64 - additional_cqe)
return ERR_PTR(-EINVAL);
ehca_err(device, "To increase the maximum number of CQs "
"use the number_of_cqs module parameter.\n");
return ERR_PTR(-ENOSPC);
-@@ -276,6 +276,9 @@ struct ib_cq *ehca_create_cq(struct ib_d
+@@ -275,6 +275,9 @@
+
for (i = 0; i < QP_HASHTAB_LEN; i++)
INIT_HLIST_HEAD(&my_cq->qp_hashtab[i]);
-
++
+ INIT_LIST_HEAD(&my_cq->sqp_err_list);
+ INIT_LIST_HEAD(&my_cq->rqp_err_list);
-+
+
if (context) {
struct ipz_queue *ipz_queue = &my_cq->ipz_queue;
- struct ehca_create_cq_resp resp;
-diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_irq.c linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_irq.c
---- linux-2.6.27/drivers/infiniband/hw/ehca/ehca_irq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_irq.c 2009-03-25 16:11:20.000000000 +0000
-@@ -359,36 +359,48 @@ static void notify_port_conf_change(stru
+diff -r 9608d5473017 drivers/infiniband/hw/ehca/ehca_irq.c
+--- a/drivers/infiniband/hw/ehca/ehca_irq.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/ehca/ehca_irq.c Wed May 06 16:56:19 2009 +0100
+@@ -359,36 +359,48 @@
*old_attr = new_attr;
}
} else {
sport->port_state = IB_PORT_DOWN;
dispatch_port_event(shca, port, IB_EVENT_PORT_ERR,
-diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_iverbs.h linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_iverbs.h
---- linux-2.6.27/drivers/infiniband/hw/ehca/ehca_iverbs.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_iverbs.h 2009-03-25 16:11:20.000000000 +0000
-@@ -197,6 +197,8 @@ void ehca_poll_eqs(unsigned long data);
+diff -r 9608d5473017 drivers/infiniband/hw/ehca/ehca_iverbs.h
+--- a/drivers/infiniband/hw/ehca/ehca_iverbs.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/ehca/ehca_iverbs.h Wed May 06 16:56:19 2009 +0100
+@@ -197,6 +197,8 @@
int ehca_calc_ipd(struct ehca_shca *shca, int port,
enum ib_rate path_rate, u32 *ipd);
#ifdef CONFIG_PPC_64K_PAGES
void *ehca_alloc_fw_ctrlblock(gfp_t flags);
void ehca_free_fw_ctrlblock(void *ptr);
-diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6.27/drivers/infiniband/hw/ehca/ehca_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_main.c 2009-03-25 16:11:20.000000000 +0000
+diff -r 9608d5473017 drivers/infiniband/hw/ehca/ehca_main.c
+--- a/drivers/infiniband/hw/ehca/ehca_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/ehca/ehca_main.c Wed May 06 16:56:19 2009 +0100
@@ -44,6 +44,8 @@
#include <linux/slab.h>
#endif
#include "ehca_classes.h"
#include "ehca_iverbs.h"
#include "ehca_mrmw.h"
-@@ -366,22 +368,23 @@ static int ehca_sense_attributes(struct
+@@ -366,22 +368,23 @@
shca->hca_cap_mr_pgsize |= pgsize_map[i + 1];
/* Set maximum number of CQs and QPs to calculate EQ size */
- "specified by HW", rblock->max_qp);
- ret = -EINVAL;
- goto sense_attributes1;
-- }
--
-- if (ehca_max_cq == -1)
-- ehca_max_cq = min_t(int, rblock->max_cq, EHCA_MAX_NUM_QUEUES);
-- else if (ehca_max_cq < 1 || ehca_max_cq > rblock->max_cq) {
-- ehca_gen_err("Requested number of CQs is out of range (1 - %i) "
-- "specified by HW", rblock->max_cq);
-- ret = -EINVAL;
-- goto sense_attributes1;
+ if (shca->max_num_qps == -1)
+ shca->max_num_qps = min_t(int, rblock->max_qp,
+ EHCA_MAX_NUM_QUEUES);
+ "(1 - %i) specified by HW. Value is set to %i",
+ rblock->max_qp, rblock->max_qp);
+ shca->max_num_qps = rblock->max_qp;
-+ }
-+
+ }
+
+- if (ehca_max_cq == -1)
+- ehca_max_cq = min_t(int, rblock->max_cq, EHCA_MAX_NUM_QUEUES);
+- else if (ehca_max_cq < 1 || ehca_max_cq > rblock->max_cq) {
+- ehca_gen_err("Requested number of CQs is out of range (1 - %i) "
+- "specified by HW", rblock->max_cq);
+- ret = -EINVAL;
+- goto sense_attributes1;
+ if (shca->max_num_cqs == -1)
+ shca->max_num_cqs = min_t(int, rblock->max_cq,
+ EHCA_MAX_NUM_QUEUES);
}
/* query max MTU from first port -- it's the same for all ports */
-@@ -733,9 +736,13 @@ static int __devinit ehca_probe(struct o
+@@ -733,9 +736,13 @@
ehca_gen_err("Cannot allocate shca memory.");
return -ENOMEM;
}
for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
spin_lock_init(&shca->sport[i].mod_sqp_lock);
-@@ -755,7 +762,7 @@ static int __devinit ehca_probe(struct o
+@@ -755,7 +762,7 @@
goto probe1;
}
/* create event queues */
ret = ehca_create_eq(shca, &shca->eq, EHCA_EQ, eq_size);
if (ret) {
-@@ -927,6 +934,7 @@ MODULE_DEVICE_TABLE(of, ehca_device_tabl
+@@ -927,6 +934,7 @@
static struct of_platform_driver ehca_driver = {
.name = "ehca",
.match_table = ehca_device_table,
.probe = ehca_probe,
.remove = ehca_remove,
-@@ -964,6 +972,39 @@ void ehca_poll_eqs(unsigned long data)
+@@ -964,6 +972,39 @@
spin_unlock(&shca_list_lock);
}
static int __init ehca_module_init(void)
{
int ret;
-@@ -991,6 +1032,12 @@ static int __init ehca_module_init(void)
+@@ -991,6 +1032,12 @@
goto module_init2;
}
if (ehca_poll_all_eqs != 1) {
ehca_gen_err("WARNING!!!");
ehca_gen_err("It is possible to lose interrupts.");
-@@ -1003,6 +1050,9 @@ static int __init ehca_module_init(void)
+@@ -1002,6 +1049,9 @@
+ }
return 0;
-
++
+module_init3:
+ ibmebus_unregister_driver(&ehca_driver);
-+
+
module_init2:
ehca_destroy_slab_caches();
-
-@@ -1018,6 +1068,8 @@ static void __exit ehca_module_exit(void
+@@ -1018,6 +1068,8 @@
ibmebus_unregister_driver(&ehca_driver);
ehca_destroy_slab_caches();
ehca_destroy_comp_pool();
-diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_qp.c
---- linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_qp.c 2009-03-25 16:11:20.000000000 +0000
-@@ -396,6 +396,50 @@ static void ehca_determine_small_queue(s
+diff -r 9608d5473017 drivers/infiniband/hw/ehca/ehca_qp.c
+--- a/drivers/infiniband/hw/ehca/ehca_qp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/ehca/ehca_qp.c Wed May 06 16:56:19 2009 +0100
+@@ -396,6 +396,50 @@
queue->is_small = (queue->page_size != 0);
}
/*
* Create an ib_qp struct that is either a QP or an SRQ, depending on
* the value of the is_srq parameter. If init_attr and srq_init_attr share
-@@ -407,12 +451,11 @@ static struct ehca_qp *internal_create_q
+@@ -407,12 +451,11 @@
struct ib_srq_init_attr *srq_init_attr,
struct ib_udata *udata, int is_srq)
{
u64 h_ret;
int is_llqp = 0, has_srq = 0;
int qp_type, max_send_sge, max_recv_sge, ret;
-@@ -422,9 +465,9 @@ static struct ehca_qp *internal_create_q
+@@ -422,9 +465,9 @@
u32 swqe_size = 0, rwqe_size = 0, ib_qp_num;
unsigned long flags;
ehca_err(pd->device, "To increase the maximum number of QPs "
"use the number_of_qps module parameter.\n");
return ERR_PTR(-ENOSPC);
-@@ -457,8 +500,7 @@ static struct ehca_qp *internal_create_q
+@@ -457,8 +500,7 @@
/* handle SRQ base QPs */
if (init_attr->srq) {
has_srq = 1;
parms.ext_type = EQPT_SRQBASE;
-@@ -716,15 +758,19 @@ static struct ehca_qp *internal_create_q
+@@ -716,15 +758,19 @@
"and pages ret=%i", ret);
goto create_qp_exit2;
}
}
if (HAS_RQ(my_qp)) {
-@@ -736,6 +782,25 @@ static struct ehca_qp *internal_create_q
+@@ -736,6 +782,25 @@
"and pages ret=%i", ret);
goto create_qp_exit4;
}
}
if (is_srq) {
-@@ -789,6 +854,11 @@ static struct ehca_qp *internal_create_q
+@@ -789,6 +854,11 @@
if (qp_type == IB_QPT_GSI) {
h_ret = ehca_define_sqp(shca, my_qp, init_attr);
if (h_ret != H_SUCCESS) {
ret = ehca2ib_return_code(h_ret);
goto create_qp_exit6;
}
-@@ -799,7 +869,7 @@ static struct ehca_qp *internal_create_q
+@@ -799,7 +869,7 @@
if (ret) {
ehca_err(pd->device,
"Couldn't assign qp to send_cq ret=%i", ret);
}
}
-@@ -825,25 +895,29 @@ static struct ehca_qp *internal_create_q
+@@ -825,17 +895,21 @@
if (ib_copy_to_udata(udata, &resp, sizeof resp)) {
ehca_err(pd->device, "Copy to udata failed");
ret = -EINVAL;
+create_qp_exit8:
ehca_cq_unassign_qp(my_qp->send_cq, my_qp->real_qp_num);
--create_qp_exit6:
+create_qp_exit7:
- kfree(my_qp->mod_qp_parm);
-
-+create_qp_exit6:
++ kfree(my_qp->mod_qp_parm);
++
+ create_qp_exit6:
+- kfree(my_qp->mod_qp_parm);
+ if (HAS_RQ(my_qp))
+ vfree(my_qp->rq_map.map);
-+
+
create_qp_exit5:
if (HAS_RQ(my_qp))
- ipz_queue_dtor(my_pd, &my_qp->ipz_rqueue);
+@@ -843,7 +917,7 @@
create_qp_exit4:
if (HAS_SQ(my_qp))
create_qp_exit3:
if (HAS_SQ(my_qp))
-@@ -1035,6 +1109,101 @@ static int prepare_sqe_rts(struct ehca_q
- return 0;
- }
-
+@@ -1031,6 +1105,101 @@
+ ehca_dbg(&shca->ib_device, "qp_num=%x flusherr_wqe_cnt=%x",
+ qp_num, (*bad_wqe_cnt)-1);
+ wqe->wqef = 0;
++
++ return 0;
++}
++
+static int calc_left_cqes(u64 wqe_p, struct ipz_queue *ipz_queue,
+ struct ehca_queue_map *qmap)
+{
+ flags);
+ }
+ }
-+
-+ return 0;
-+}
-+
- /*
- * internal_modify_qp with circumvention to handle aqp0 properly
- * smi_reset2init indicates if this is an internal reset-to-init-call for
-@@ -1539,10 +1708,27 @@ static int internal_modify_qp(struct ib_
+
+ return 0;
+ }
+@@ -1539,10 +1708,27 @@
goto modify_qp_exit2;
}
}
}
if (attr_mask & IB_QP_QKEY)
-@@ -1958,6 +2144,16 @@ static int internal_destroy_qp(struct ib
+@@ -1958,6 +2144,16 @@
idr_remove(&ehca_qp_idr, my_qp->token);
write_unlock_irqrestore(&ehca_qp_idr_lock, flags);
/* now wait until all pending events have completed */
wait_event(my_qp->wait_completion, !atomic_read(&my_qp->nr_events));
-@@ -1983,7 +2179,7 @@ static int internal_destroy_qp(struct ib
+@@ -1983,7 +2179,7 @@
if (qp_type == IB_QPT_GSI) {
struct ib_event event;
ehca_info(dev, "device %s: port %x is inactive.",
event.device = &shca->ib_device;
event.event = IB_EVENT_PORT_ERR;
event.element.port_num = port_num;
-@@ -1991,11 +2187,15 @@ static int internal_destroy_qp(struct ib
+@@ -1991,11 +2187,15 @@
ib_dispatch_event(&event);
}
}
kmem_cache_free(qp_cache, my_qp);
atomic_dec(&shca->num_qps);
-diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_reqs.c
---- linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_reqs.c 2009-03-25 16:11:20.000000000 +0000
+diff -r 9608d5473017 drivers/infiniband/hw/ehca/ehca_reqs.c
+--- a/drivers/infiniband/hw/ehca/ehca_reqs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/ehca/ehca_reqs.c Wed May 06 16:56:19 2009 +0100
@@ -53,9 +53,25 @@
/* in RC traffic, insert an empty RDMA READ every this many packets */
#define ACK_CIRC_THRESHOLD 2000000
{
u8 cnt_ds;
if (unlikely((recv_wr->num_sge < 0) ||
-@@ -69,7 +85,7 @@ static inline int ehca_write_rwqe(struct
+@@ -69,7 +85,7 @@
/* clear wqe header until sglist */
memset(wqe_p, 0, offsetof(struct ehca_wqe, u.ud_av.sg_list));
wqe_p->nr_of_data_seg = recv_wr->num_sge;
for (cnt_ds = 0; cnt_ds < recv_wr->num_sge; cnt_ds++) {
-@@ -146,6 +162,7 @@ static inline int ehca_write_swqe(struct
+@@ -146,6 +162,7 @@
u64 dma_length;
struct ehca_av *my_av;
u32 remote_qkey = send_wr->wr.ud.remote_qkey;
if (unlikely((send_wr->num_sge < 0) ||
(send_wr->num_sge > qp->ipz_squeue.act_nr_of_sg))) {
-@@ -158,11 +175,10 @@ static inline int ehca_write_swqe(struct
+@@ -158,11 +175,10 @@
/* clear wqe header until sglist */
memset(wqe_p, 0, offsetof(struct ehca_wqe, u.ud_av.sg_list));
switch (send_wr->opcode) {
case IB_WR_SEND:
-@@ -496,7 +512,9 @@ static int internal_post_recv(struct ehc
+@@ -496,7 +512,9 @@
struct ehca_wqe *wqe_p;
int wqe_cnt = 0;
int ret = 0;
if (unlikely(!HAS_RQ(my_qp))) {
ehca_err(dev, "QP has no RQ ehca_qp=%p qp_num=%x ext_type=%d",
-@@ -524,8 +542,15 @@ static int internal_post_recv(struct ehc
+@@ -524,8 +542,15 @@
}
goto post_recv_exit0;
}
/*
* if something failed,
* reset the free entry pointer to the start value
-@@ -540,6 +565,11 @@ static int internal_post_recv(struct ehc
+@@ -540,6 +565,11 @@
}
goto post_recv_exit0;
}
wqe_cnt++;
} /* eof for cur_recv_wr */
-@@ -596,10 +626,12 @@ static const u8 ib_wc_opcode[255] = {
+@@ -596,10 +626,12 @@
/* internal function to poll one entry of cq */
static inline int ehca_poll_cq_one(struct ib_cq *cq, struct ib_wc *wc)
{
int cqe_count = 0, is_error;
repoll:
-@@ -674,27 +706,52 @@ repoll:
+@@ -674,27 +706,52 @@
goto repoll;
wc->qp = &my_qp->ib_qp;
- my_qp->real_qp_num);
- /* found a double cqe, discard it and read next one */
- goto repoll;
-- }
-- wc->wr_id = cqe->work_request_id & ~QMAP_IDX_MASK;
-- wc->wr_id |= qmap_entry->app_wr_id;
-- qmap_entry->reported = 1;
-- } else
+ if (HAS_RQ(my_qp))
+ ehca_add_to_err_list(my_qp, 0);
+ my_qp->rq_map.left_to_poll = 0;
+ /* We got a send completion. */
+ qmap = &my_qp->sq_map;
+ else
- /* We got a receive completion. */
-- wc->wr_id = cqe->work_request_id;
++ /* We got a receive completion. */
+ qmap = &my_qp->rq_map;
+
+ qmap_entry = &qmap->map[qmap_tail_idx];
+ ehca_add_to_err_list(my_qp, 1);
+ if (HAS_RQ(my_qp))
+ ehca_add_to_err_list(my_qp, 0);
-+ }
+ }
+- wc->wr_id = cqe->work_request_id & ~QMAP_IDX_MASK;
+- wc->wr_id |= qmap_entry->app_wr_id;
+- qmap_entry->reported = 1;
+- } else
+- /* We got a receive completion. */
+- wc->wr_id = cqe->work_request_id;
+ }
/* eval ib_wc_opcode */
wc->opcode = ib_wc_opcode[cqe->optype]-1;
-@@ -733,13 +790,88 @@ poll_cq_one_exit0:
+@@ -733,13 +790,88 @@
return ret;
}
if (num_entries < 1) {
ehca_err(cq->device, "Invalid num_entries=%d ehca_cq=%p "
-@@ -749,15 +881,40 @@ int ehca_poll_cq(struct ib_cq *cq, int n
+@@ -749,15 +881,40 @@
}
spin_lock_irqsave(&my_cq->spinlock, flags);
poll_cq_exit0:
return ret;
-diff -purN linux-2.6.27/drivers/infiniband/hw/mlx4/cq.c linux-2.6.27.19-5.1/drivers/infiniband/hw/mlx4/cq.c
---- linux-2.6.27/drivers/infiniband/hw/mlx4/cq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/mlx4/cq.c 2009-03-25 16:11:19.000000000 +0000
-@@ -343,6 +343,7 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq
+diff -r 9608d5473017 drivers/infiniband/hw/mlx4/cq.c
+--- a/drivers/infiniband/hw/mlx4/cq.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/mlx4/cq.c Wed May 06 16:56:19 2009 +0100
+@@ -343,6 +343,7 @@
{
struct mlx4_ib_dev *dev = to_mdev(ibcq->device);
struct mlx4_ib_cq *cq = to_mcq(ibcq);
int outst_cqe;
int err;
-@@ -376,10 +377,13 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq
+@@ -376,10 +377,13 @@
goto out;
}
if (ibcq->uobject) {
cq->buf = cq->resize_buf->buf;
cq->ibcq.cqe = cq->resize_buf->cqe;
-@@ -406,6 +410,7 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq
+@@ -406,6 +410,7 @@
goto out;
err_buf:
if (!ibcq->uobject)
mlx4_ib_free_cq_buf(dev, &cq->resize_buf->buf,
cq->resize_buf->cqe);
-diff -purN linux-2.6.27/drivers/infiniband/hw/mthca/mthca_catas.c linux-2.6.27.19-5.1/drivers/infiniband/hw/mthca/mthca_catas.c
---- linux-2.6.27/drivers/infiniband/hw/mthca/mthca_catas.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/mthca/mthca_catas.c 2009-03-25 16:11:19.000000000 +0000
-@@ -51,7 +51,7 @@ static LIST_HEAD(catas_list);
+diff -r 9608d5473017 drivers/infiniband/hw/mthca/mthca_catas.c
+--- a/drivers/infiniband/hw/mthca/mthca_catas.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/mthca/mthca_catas.c Wed May 06 16:56:19 2009 +0100
+@@ -51,7 +51,7 @@
static struct workqueue_struct *catas_wq;
static struct work_struct catas_work;
module_param_named(catas_reset_disable, catas_reset_disable, int, 0644);
MODULE_PARM_DESC(catas_reset_disable, "disable reset on catastrophic event if nonzero");
-diff -purN linux-2.6.27/drivers/infiniband/ulp/iser/iscsi_iser.c linux-2.6.27.19-5.1/drivers/infiniband/ulp/iser/iscsi_iser.c
---- linux-2.6.27/drivers/infiniband/ulp/iser/iscsi_iser.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/ulp/iser/iscsi_iser.c 2009-03-25 16:11:20.000000000 +0000
-@@ -378,6 +378,7 @@ static void iscsi_iser_session_destroy(s
+diff -r 9608d5473017 drivers/infiniband/ulp/iser/iscsi_iser.c
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c Wed May 06 16:56:19 2009 +0100
+@@ -378,6 +378,7 @@
{
struct Scsi_Host *shost = iscsi_session_to_shost(cls_session);
iscsi_host_remove(shost);
iscsi_host_free(shost);
}
-diff -purN linux-2.6.27/drivers/input/keyboard/atkbd.c linux-2.6.27.19-5.1/drivers/input/keyboard/atkbd.c
---- linux-2.6.27/drivers/input/keyboard/atkbd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/keyboard/atkbd.c 2009-03-25 16:11:13.000000000 +0000
-@@ -834,10 +834,10 @@ static void atkbd_disconnect(struct seri
+diff -r 9608d5473017 drivers/input/keyboard/atkbd.c
+--- a/drivers/input/keyboard/atkbd.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/keyboard/atkbd.c Wed May 06 16:56:19 2009 +0100
+@@ -834,10 +834,10 @@
}
/*
{
const unsigned int forced_release_keys[] = {
0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8f, 0x93,
-@@ -868,6 +868,38 @@ static void atkbd_hp_keymap_fixup(struct
- }
-
- /*
+@@ -865,6 +865,38 @@
+ for (i = 0; i < ARRAY_SIZE(forced_release_keys); i++)
+ __set_bit(forced_release_keys[i],
+ atkbd->force_release_mask);
++}
++
++/*
+ * Inventec system with broken key release on volume keys
+ */
+static void atkbd_inventec_keymap_fixup(struct atkbd *atkbd)
+ for (i = 0; i < ARRAY_SIZE(forced_release_keys); i++)
+ __set_bit(forced_release_keys[i],
+ atkbd->force_release_mask);
-+}
-+
-+/*
- * atkbd_set_keycode_table() initializes keyboard's keycode table
- * according to the selected scancode set
- */
-@@ -1461,13 +1493,22 @@ static int __init atkbd_setup_fixup(cons
+ }
+
+ /*
+@@ -1461,13 +1493,22 @@
static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = {
{
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Latitude"),
+ DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */
-+ },
-+ .callback = atkbd_setup_fixup,
+ },
+ .callback = atkbd_setup_fixup,
+- .driver_data = atkbd_latitude_keymap_fixup,
+ .driver_data = atkbd_dell_laptop_keymap_fixup,
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */
- },
- .callback = atkbd_setup_fixup,
-- .driver_data = atkbd_latitude_keymap_fixup,
++ },
++ .callback = atkbd_setup_fixup,
+ .driver_data = atkbd_dell_laptop_keymap_fixup,
},
{
.ident = "HP 2133",
-@@ -1478,6 +1519,24 @@ static struct dmi_system_id atkbd_dmi_qu
+@@ -1477,6 +1518,24 @@
+ },
.callback = atkbd_setup_fixup,
.driver_data = atkbd_hp_keymap_fixup,
- },
++ },
+ {
+ .ident = "Inventec Symphony",
+ .matches = {
+ },
+ .callback = atkbd_setup_fixup,
+ .driver_data = atkbd_samsung_keymap_fixup,
-+ },
+ },
{ }
};
-
-diff -purN linux-2.6.27/drivers/input/misc/sparcspkr.c linux-2.6.27.19-5.1/drivers/input/misc/sparcspkr.c
---- linux-2.6.27/drivers/input/misc/sparcspkr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/misc/sparcspkr.c 2009-03-25 16:11:13.000000000 +0000
-@@ -258,6 +258,7 @@ static struct of_device_id bbc_beep_matc
+diff -r 9608d5473017 drivers/input/misc/sparcspkr.c
+--- a/drivers/input/misc/sparcspkr.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/misc/sparcspkr.c Wed May 06 16:56:19 2009 +0100
+@@ -258,6 +258,7 @@
};
static struct of_platform_driver bbc_beep_driver = {
.name = "bbcbeep",
.match_table = bbc_beep_match,
.probe = bbc_beep_probe,
-@@ -337,6 +338,7 @@ static struct of_device_id grover_beep_m
+@@ -337,6 +338,7 @@
};
static struct of_platform_driver grover_beep_driver = {
.name = "groverbeep",
.match_table = grover_beep_match,
.probe = grover_beep_probe,
-diff -purN linux-2.6.27/drivers/input/mouse/alps.c linux-2.6.27.19-5.1/drivers/input/mouse/alps.c
---- linux-2.6.27/drivers/input/mouse/alps.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/mouse/alps.c 2009-03-25 16:11:13.000000000 +0000
-@@ -54,6 +54,7 @@ static const struct alps_model_info alps
+diff -r 9608d5473017 drivers/input/mouse/alps.c
+--- a/drivers/input/mouse/alps.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/mouse/alps.c Wed May 06 16:56:19 2009 +0100
+@@ -54,6 +54,7 @@
{ { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
{ { 0x22, 0x02, 0x0a }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
{ { 0x22, 0x02, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
{ { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FW_BK_1 } /* Dell Vostro 1400 */
};
-diff -purN linux-2.6.27/drivers/input/mouse/psmouse-base.c linux-2.6.27.19-5.1/drivers/input/mouse/psmouse-base.c
---- linux-2.6.27/drivers/input/mouse/psmouse-base.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/mouse/psmouse-base.c 2009-03-25 16:11:13.000000000 +0000
-@@ -36,8 +36,8 @@ MODULE_DESCRIPTION(DRIVER_DESC);
+diff -r 9608d5473017 drivers/input/mouse/psmouse-base.c
+--- a/drivers/input/mouse/psmouse-base.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/mouse/psmouse-base.c Wed May 06 16:56:19 2009 +0100
+@@ -36,8 +36,8 @@
MODULE_LICENSE("GPL");
static unsigned int psmouse_max_proto = PSMOUSE_AUTO;
#define param_check_proto_abbrev(name, p) __param_check(name, p, unsigned int)
#define param_set_proto_abbrev psmouse_set_maxproto
#define param_get_proto_abbrev psmouse_get_maxproto
-@@ -1573,7 +1573,8 @@ static ssize_t psmouse_attr_set_resoluti
+@@ -1573,7 +1573,8 @@
}
{
const struct psmouse_protocol *proto;
-@@ -1590,7 +1591,7 @@ static int psmouse_set_maxproto(const ch
+@@ -1590,7 +1591,7 @@
return 0;
}
{
int type = *((unsigned int *)kp->arg);
-diff -purN linux-2.6.27/drivers/input/serio/i8042-sparcio.h linux-2.6.27.19-5.1/drivers/input/serio/i8042-sparcio.h
---- linux-2.6.27/drivers/input/serio/i8042-sparcio.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/serio/i8042-sparcio.h 2009-03-25 16:11:13.000000000 +0000
-@@ -96,6 +96,7 @@ static struct of_device_id sparc_i8042_m
+diff -r 9608d5473017 drivers/input/serio/i8042-sparcio.h
+--- a/drivers/input/serio/i8042-sparcio.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/serio/i8042-sparcio.h Wed May 06 16:56:19 2009 +0100
+@@ -96,6 +96,7 @@
MODULE_DEVICE_TABLE(of, sparc_i8042_match);
static struct of_platform_driver sparc_i8042_driver = {
.name = "i8042",
.match_table = sparc_i8042_match,
.probe = sparc_i8042_probe,
-diff -purN linux-2.6.27/drivers/input/serio/i8042-x86ia64io.h linux-2.6.27.19-5.1/drivers/input/serio/i8042-x86ia64io.h
---- linux-2.6.27/drivers/input/serio/i8042-x86ia64io.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/serio/i8042-x86ia64io.h 2009-03-25 16:11:13.000000000 +0000
-@@ -135,6 +135,14 @@ static struct dmi_system_id __initdata i
+diff -r 9608d5473017 drivers/input/serio/i8042-x86ia64io.h
+--- a/drivers/input/serio/i8042-x86ia64io.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/serio/i8042-x86ia64io.h Wed May 06 16:56:19 2009 +0100
+@@ -133,6 +133,14 @@
+ DMI_MATCH(DMI_SYS_VENDOR, "Notebook"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "MAM 2070"),
DMI_MATCH(DMI_PRODUCT_VERSION, "5a"),
- },
- },
++ },
++ },
+ {
+ .ident = "Blue FB5601",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "blue"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "FB5601"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "M606"),
-+ },
-+ },
+ },
+ },
{ }
- };
-
-@@ -316,12 +324,47 @@ static struct dmi_system_id __initdata i
+@@ -316,10 +324,45 @@
},
},
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Gericom"),
DMI_MATCH(DMI_PRODUCT_NAME, "N34AS6"),
- },
- },
++ },
++ },
+ {
+ .ident = "IBM 2656",
+ .matches = {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Vostro1510"),
-+ },
-+ },
+ },
+ },
{ }
- };
-
-diff -purN linux-2.6.27/drivers/input/serio/xilinx_ps2.c linux-2.6.27.19-5.1/drivers/input/serio/xilinx_ps2.c
---- linux-2.6.27/drivers/input/serio/xilinx_ps2.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/serio/xilinx_ps2.c 2009-03-25 16:11:13.000000000 +0000
-@@ -355,6 +355,7 @@ static struct of_device_id xps2_of_match
+diff -r 9608d5473017 drivers/input/serio/xilinx_ps2.c
+--- a/drivers/input/serio/xilinx_ps2.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/serio/xilinx_ps2.c Wed May 06 16:56:19 2009 +0100
+@@ -355,6 +355,7 @@
MODULE_DEVICE_TABLE(of, xps2_of_match);
static struct of_platform_driver xps2_of_driver = {
.name = DRIVER_NAME,
.match_table = xps2_of_match,
.probe = xps2_of_probe,
-diff -purN linux-2.6.27/drivers/input/touchscreen/Kconfig linux-2.6.27.19-5.1/drivers/input/touchscreen/Kconfig
---- linux-2.6.27/drivers/input/touchscreen/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/touchscreen/Kconfig 2009-03-25 16:11:13.000000000 +0000
-@@ -91,6 +91,18 @@ config TOUCHSCREEN_ELO
+diff -r 9608d5473017 drivers/input/touchscreen/Kconfig
+--- a/drivers/input/touchscreen/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/touchscreen/Kconfig Wed May 06 16:56:19 2009 +0100
+@@ -90,6 +90,18 @@
+
To compile this driver as a module, choose M here: the
module will be called elo.
-
++
+config TOUCHSCREEN_ELOUSB
+ tristate "Elo USB touchscreens"
+ select USB
+
+ To compile this driver as a module, choose M here: the
+ module will be called elousb.
-+
+
config TOUCHSCREEN_MTOUCH
tristate "MicroTouch serial touchscreens"
- select SERIO
-diff -purN linux-2.6.27/drivers/input/touchscreen/Makefile linux-2.6.27.19-5.1/drivers/input/touchscreen/Makefile
---- linux-2.6.27/drivers/input/touchscreen/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/touchscreen/Makefile 2009-03-25 16:11:13.000000000 +0000
-@@ -12,6 +12,7 @@ obj-$(CONFIG_TOUCHSCREEN_BITSY) += h360
+diff -r 9608d5473017 drivers/input/touchscreen/Makefile
+--- a/drivers/input/touchscreen/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/touchscreen/Makefile Wed May 06 16:56:19 2009 +0100
+@@ -12,6 +12,7 @@
obj-$(CONFIG_TOUCHSCREEN_CORGI) += corgi_ts.o
obj-$(CONFIG_TOUCHSCREEN_GUNZE) += gunze.o
obj-$(CONFIG_TOUCHSCREEN_ELO) += elo.o
obj-$(CONFIG_TOUCHSCREEN_FUJITSU) += fujitsu_ts.o
obj-$(CONFIG_TOUCHSCREEN_INEXIO) += inexio.o
obj-$(CONFIG_TOUCHSCREEN_MIGOR) += migor_ts.o
-diff -purN linux-2.6.27/drivers/input/touchscreen/elousb.c linux-2.6.27.19-5.1/drivers/input/touchscreen/elousb.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/touchscreen/elousb.c 2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/input/touchscreen/elousb.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/input/touchscreen/elousb.c Wed May 06 16:56:19 2009 +0100
@@ -0,0 +1,305 @@
+/*
+ * Copyright (c) 1999-2001 Vojtech Pavlik
+
+module_init(elousb_init);
+module_exit(elousb_exit);
-diff -purN linux-2.6.27/drivers/input/touchscreen/usbtouchscreen.c linux-2.6.27.19-5.1/drivers/input/touchscreen/usbtouchscreen.c
---- linux-2.6.27/drivers/input/touchscreen/usbtouchscreen.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/touchscreen/usbtouchscreen.c 2009-03-25 16:11:13.000000000 +0000
-@@ -60,6 +60,10 @@ static int swap_xy;
+diff -r 9608d5473017 drivers/input/touchscreen/usbtouchscreen.c
+--- a/drivers/input/touchscreen/usbtouchscreen.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/touchscreen/usbtouchscreen.c Wed May 06 16:56:19 2009 +0100
+@@ -59,6 +59,10 @@
+ static int swap_xy;
module_param(swap_xy, bool, 0644);
MODULE_PARM_DESC(swap_xy, "If set X and Y axes are swapped.");
-
++
+static int hwcalib_xy;
+module_param(hwcalib_xy, bool, 0644);
+MODULE_PARM_DESC(hwcalib_xy, "If set hw-calibrated X/Y are used if available");
-+
+
/* device specifc data/functions */
struct usbtouch_usb;
- struct usbtouch_device_info {
-@@ -260,8 +264,13 @@ static int panjit_read_data(struct usbto
+@@ -260,8 +264,13 @@
static int mtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
{
dev->touch = (pkt[2] & 0x40) ? 1 : 0;
return 1;
-@@ -294,6 +303,12 @@ static int mtouch_init(struct usbtouch_u
+@@ -292,6 +301,12 @@
+ break;
+ if (ret != -EPIPE)
return ret;
- }
-
++ }
++
+ /* Default min/max xy are the raw values, override if using hw-calib */
+ if (hwcalib_xy) {
+ input_set_abs_params(usbtouch->input, ABS_X, 0, 0xffff, 0, 0);
+ input_set_abs_params(usbtouch->input, ABS_Y, 0, 0xffff, 0, 0);
-+ }
-+
+ }
+
return 0;
- }
- #endif
-diff -purN linux-2.6.27/drivers/input/xen-kbdfront.c linux-2.6.27.19-5.1/drivers/input/xen-kbdfront.c
---- linux-2.6.27/drivers/input/xen-kbdfront.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/xen-kbdfront.c 2009-03-25 16:11:13.000000000 +0000
-@@ -325,7 +325,6 @@ static struct xenbus_device_id xenkbd_id
+diff -r 9608d5473017 drivers/input/xen-kbdfront.c
+--- a/drivers/input/xen-kbdfront.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/xen-kbdfront.c Wed May 06 16:56:19 2009 +0100
+@@ -325,7 +325,6 @@
static struct xenbus_driver xenkbd = {
.name = "vkbd",
.ids = xenkbd_ids,
.probe = xenkbd_probe,
.remove = xenkbd_remove,
-diff -purN linux-2.6.27/drivers/isdn/hardware/avm/b1isa.c linux-2.6.27.19-5.1/drivers/isdn/hardware/avm/b1isa.c
---- linux-2.6.27/drivers/isdn/hardware/avm/b1isa.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/isdn/hardware/avm/b1isa.c 2009-03-25 16:11:29.000000000 +0000
-@@ -233,10 +233,8 @@ static void __exit b1isa_exit(void)
+diff -r 9608d5473017 drivers/isdn/hardware/avm/b1isa.c
+--- a/drivers/isdn/hardware/avm/b1isa.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/isdn/hardware/avm/b1isa.c Wed May 06 16:56:19 2009 +0100
+@@ -233,10 +233,8 @@
int i;
for (i = 0; i < MAX_CARDS; i++) {
}
unregister_capi_driver(&capi_driver_b1isa);
}
-diff -purN linux-2.6.27/drivers/leds/leds-cobalt-qube.c linux-2.6.27.19-5.1/drivers/leds/leds-cobalt-qube.c
---- linux-2.6.27/drivers/leds/leds-cobalt-qube.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/leds/leds-cobalt-qube.c 2009-03-25 16:11:20.000000000 +0000
-@@ -28,7 +28,7 @@ static void qube_front_led_set(struct le
+diff -r 9608d5473017 drivers/leds/leds-cobalt-qube.c
+--- a/drivers/leds/leds-cobalt-qube.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/leds/leds-cobalt-qube.c Wed May 06 16:56:19 2009 +0100
+@@ -28,7 +28,7 @@
}
static struct led_classdev qube_front_led = {
.brightness = LED_FULL,
.brightness_set = qube_front_led_set,
.default_trigger = "ide-disk",
-diff -purN linux-2.6.27/drivers/leds/leds-cobalt-raq.c linux-2.6.27.19-5.1/drivers/leds/leds-cobalt-raq.c
---- linux-2.6.27/drivers/leds/leds-cobalt-raq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/leds/leds-cobalt-raq.c 2009-03-25 16:11:20.000000000 +0000
-@@ -49,7 +49,7 @@ static void raq_web_led_set(struct led_c
+diff -r 9608d5473017 drivers/leds/leds-cobalt-raq.c
+--- a/drivers/leds/leds-cobalt-raq.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/leds/leds-cobalt-raq.c Wed May 06 16:56:19 2009 +0100
+@@ -49,7 +49,7 @@
}
static struct led_classdev raq_web_led = {
.brightness_set = raq_web_led_set,
};
-@@ -70,7 +70,7 @@ static void raq_power_off_led_set(struct
+@@ -70,7 +70,7 @@
}
static struct led_classdev raq_power_off_led = {
.brightness_set = raq_power_off_led_set,
.default_trigger = "power-off",
};
-diff -purN linux-2.6.27/drivers/leds/ledtrig-default-on.c linux-2.6.27.19-5.1/drivers/leds/ledtrig-default-on.c
---- linux-2.6.27/drivers/leds/ledtrig-default-on.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/leds/ledtrig-default-on.c 2009-03-25 16:11:20.000000000 +0000
-@@ -23,7 +23,7 @@ static void defon_trig_activate(struct l
+diff -r 9608d5473017 drivers/leds/ledtrig-default-on.c
+--- a/drivers/leds/ledtrig-default-on.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/leds/ledtrig-default-on.c Wed May 06 16:56:19 2009 +0100
+@@ -23,7 +23,7 @@
}
static struct led_trigger defon_led_trigger = {
.activate = defon_trig_activate,
};
-diff -purN linux-2.6.27/drivers/macintosh/Kconfig linux-2.6.27.19-5.1/drivers/macintosh/Kconfig
---- linux-2.6.27/drivers/macintosh/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/Kconfig 2009-03-25 16:11:14.000000000 +0000
-@@ -13,7 +13,7 @@ if MACINTOSH_DRIVERS
+diff -r 9608d5473017 drivers/macintosh/Kconfig
+--- a/drivers/macintosh/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/Kconfig Wed May 06 16:56:19 2009 +0100
+@@ -13,7 +13,7 @@
config ADB
bool "Apple Desktop Bus (ADB) support"
help
Apple Desktop Bus (ADB) support is for support of devices which
are connected to an ADB port. ADB devices tend to have 4 pins.
-@@ -253,4 +253,10 @@ config PMAC_RACKMETER
+@@ -253,4 +253,10 @@
This driver provides some support to control the front panel
blue LEDs "vu-meter" of the XServer macs.
+ call helpdesk
+
endif # MACINTOSH_DRIVERS
-diff -purN linux-2.6.27/drivers/macintosh/Makefile linux-2.6.27.19-5.1/drivers/macintosh/Makefile
---- linux-2.6.27/drivers/macintosh/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/Makefile 2009-03-25 16:11:14.000000000 +0000
-@@ -4,6 +4,8 @@
+diff -r 9608d5473017 drivers/macintosh/Makefile
+--- a/drivers/macintosh/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/Makefile Wed May 06 16:56:19 2009 +0100
+@@ -3,6 +3,8 @@
+ #
# Each configuration option enables a list of files.
-
-+obj-$(CONFIG_MACONLINUX) += mol/
+
++obj-$(CONFIG_MACONLINUX) += mol/
+
obj-$(CONFIG_PPC_PMAC) += macio_asic.o macio_sysfs.o
- obj-$(CONFIG_PMAC_MEDIABAY) += mediabay.o
-diff -purN linux-2.6.27/drivers/macintosh/adb.c linux-2.6.27.19-5.1/drivers/macintosh/adb.c
---- linux-2.6.27/drivers/macintosh/adb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/adb.c 2009-03-25 16:11:14.000000000 +0000
-@@ -298,6 +298,10 @@ static int __init adb_init(void)
+diff -r 9608d5473017 drivers/macintosh/adb.c
+--- a/drivers/macintosh/adb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/adb.c Wed May 06 16:56:19 2009 +0100
+@@ -296,6 +296,10 @@
+
+ #ifdef CONFIG_PPC32
if (!machine_is(chrp) && !machine_is(powermac))
- return 0;
- #endif
-+#ifdef CONFIG_PPC64
-+ if (!machine_is(powermac))
+ return 0;
+#endif
- #ifdef CONFIG_MAC
- if (!MACH_IS_MAC)
++#ifdef CONFIG_PPC64
++ if (!machine_is(powermac))
return 0;
-diff -purN linux-2.6.27/drivers/macintosh/adbhid.c linux-2.6.27.19-5.1/drivers/macintosh/adbhid.c
---- linux-2.6.27/drivers/macintosh/adbhid.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/adbhid.c 2009-03-25 16:11:14.000000000 +0000
-@@ -1264,10 +1264,14 @@ init_ms_a3(int id)
+ #endif
+ #ifdef CONFIG_MAC
+diff -r 9608d5473017 drivers/macintosh/adbhid.c
+--- a/drivers/macintosh/adbhid.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/adbhid.c Wed May 06 16:56:19 2009 +0100
+@@ -1264,8 +1264,12 @@
static int __init adbhid_init(void)
{
-#ifndef CONFIG_MAC
+#ifdef CONFIG_PPC32
if (!machine_is(chrp) && !machine_is(powermac))
- return 0;
- #endif
-+#ifdef CONFIG_PPC64
-+ if (!machine_is(powermac))
+ return 0;
+#endif
++#ifdef CONFIG_PPC64
++ if (!machine_is(powermac))
+ return 0;
+ #endif
- led_request.complete = 1;
-
-diff -purN linux-2.6.27/drivers/macintosh/mol/Makefile linux-2.6.27.19-5.1/drivers/macintosh/mol/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/Makefile 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/Makefile Wed May 06 16:56:19 2009 +0100
@@ -0,0 +1,60 @@
+
+MOL_OBJS = \
+ grep '^#' tmp-offsets.s >> $@
+ rm -fv $(obj)/tmp-offsets.*
+
-diff -purN linux-2.6.27/drivers/macintosh/mol/_dev.c linux-2.6.27.19-5.1/drivers/macintosh/mol/_dev.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/_dev.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/_dev.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/_dev.c Wed May 06 16:56:19 2009 +0100
@@ -0,0 +1,376 @@
+/*
+ * Creation Date: <2003/08/20 17:31:44 samuel>
+
+module_init( dev_register );
+module_exit( dev_unregister );
-diff -purN linux-2.6.27/drivers/macintosh/mol/_fault.c linux-2.6.27.19-5.1/drivers/macintosh/mol/_fault.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/_fault.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/_fault.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/_fault.c Wed May 06 16:56:19 2009 +0100
@@ -0,0 +1,159 @@
+/*
+ * Creation Date: <2002/06/08 21:01:54 samuel>
+ | DBG_TRANSL_PAGE_FLAG( val, _PAGE_EXEC );
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/_hostirq.c linux-2.6.27.19-5.1/drivers/macintosh/mol/_hostirq.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/_hostirq.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/_hostirq.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/_hostirq.c Wed May 06 16:56:19 2009 +0100
@@ -0,0 +1,116 @@
+/*
+ * <hostirq.c>
+ }
+}
+
-diff -purN linux-2.6.27/drivers/macintosh/mol/_kuname.c linux-2.6.27.19-5.1/drivers/macintosh/mol/_kuname.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/_kuname.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/_kuname.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/_kuname.c Wed May 06 16:56:19 2009 +0100
@@ -0,0 +1,48 @@
+/*
+ * Creation Date: <2001/08/15 01:11:01 samuel>
+#endif
+
+char *cross_compiling_magic = "-MAGIC-" UTS_RELEASE SMP_STRING ALTIVEC_STRING ;
-diff -purN linux-2.6.27/drivers/macintosh/mol/_misc.c linux-2.6.27.19-5.1/drivers/macintosh/mol/_misc.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/_misc.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/_misc.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/_misc.c Wed May 06 16:56:19 2009 +0100
@@ -0,0 +1,147 @@
+/*
+ * Creation Date: <97/05/26 02:10:43 samuel>
+{
+ set_trampoline( old_trampoline );
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/_mmu.c linux-2.6.27.19-5.1/drivers/macintosh/mol/_mmu.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/_mmu.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/_mmu.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/_mmu.c Wed May 06 16:56:19 2009 +0100
@@ -0,0 +1,41 @@
+/*
+ * Creation Date: <2002/07/13 13:58:00 samuel>
+#endif
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/actions.c linux-2.6.27.19-5.1/drivers/macintosh/mol/actions.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/actions.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/actions.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/actions.c Wed May 06 16:56:19 2009 +0100
@@ -0,0 +1,548 @@
+/*
+ * Creation Date: <2001/04/07 17:33:52 samuel>
+ lowmem_free_all();
+ kfree_cont_mol( code_base );
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/603.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/603.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/603.S 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/603.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/603.S Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,218 @@
+/*
+ * Creation Date: <2001/06/15 20:10:49 samuel>
+ rlwinm r1,r3,9,6,6 // get load/store bit
+ addis r1,r1,0x800 // Set bit 4 (prot. violation)
+ b 10b
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/dec.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/dec.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/dec.S 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/dec.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/dec.S Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,228 @@
+/*
+ * Creation Date: <2001/06/21 17:10:35 samuel>
+ BUMP("Linux-DEC")
+ bl save_middle_regs
+ TAKE_EXCEPTION( 0x900 )
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/emuaccel.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/emuaccel.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/emuaccel.S 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/emuaccel.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/emuaccel.S Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,188 @@
+/*
+ * Creation Date: <2003/01/24 13:54:52 samuel>
+ .long 0, 0, 0 /* end marker */
+
+ .text
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/emulation.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/emulation.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/emulation.S 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/emulation.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/emulation.S Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,714 @@
+/*
+ * Creation Date: <97/07/26 18:23:02 samuel>
+ .long K_SPLIT_SR_BASE, K_USER_SR_BASE, K_UNMAPPED_SR_BASE, 0 /* PR|DR */
+ .long K_SPLIT_SR_BASE, K_UNMAPPED_SR_BASE, K_USER_SR_BASE, 0 /* PR|IR */
+ .long K_USER_SR_BASE, K_USER_SR_BASE, K_USER_SR_BASE, 0 /* PR|DR|IR */
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/entry.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/entry.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/entry.S 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/entry.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/entry.S Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,433 @@
+/*
+ * Creation Date: <2001/01/30 00:22:35 samuel>
+ mtcrf MMU_CR_FIELD,r5 // clear FBIT_LoadSegreg and FBIT_PrepareSplitmode
+ mtspr DBAT0U,r4
+ b 1b
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/iopage.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/iopage.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/iopage.S 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/iopage.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/iopage.S Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,89 @@
+/*
+ * Creation Date: <97/07/26 18:23:02 samuel>
+ // r4 = mphys_ioaddr
+ // r5 = usr_data
+ MAC_EXIT( RVEC_IO_WRITE )
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/linux.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/linux.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/linux.S 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/linux.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/linux.S Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,129 @@
+/*
+ * Creation Date: <2001/02/24 14:08:28 samuel>
+RELOC_LOW_END(xx_store_pte_lowmem)
+
+#endif
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/ptintercept.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/ptintercept.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/ptintercept.S 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/ptintercept.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/ptintercept.S Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,303 @@
+/*
+ * Creation Date: <2001/03/17 18:00:05 samuel>
+
+ LOADI r3,EXTERN(do_intercept_tlbie_block)
+ b call_kernel
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/splitmode.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/splitmode.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/splitmode.S 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/splitmode.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/splitmode.S Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,428 @@
+/*
+ * Creation Date: <2000/07/11 03:38:32 samuel>
+splitmode_lock:
+ .long 0
+#endif
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/traps.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/traps.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/traps.S 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/traps.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/traps.S Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,501 @@
+/*
+ * Creation Date: <2001/01/27 16:25:14 samuel>
+GLOBAL_SYMBOL(__end_bumptable):
+ .text
+#endif
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/vsid.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/vsid.S
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/vsid.S 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/vsid.S
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/vsid.S Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,123 @@
+/*
+ * Creation Date: <2003/03/06 22:03:59 samuel>
+ BUMP("mtsr_")
+ b emulation_done
+
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm_offsets.c linux-2.6.27.19-5.1/drivers/macintosh/mol/asm_offsets.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm_offsets.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm_offsets.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm_offsets.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,161 @@
+/*
+ * This program is used to generate definitions needed by
+ return 0;
+}
+
-diff -purN linux-2.6.27/drivers/macintosh/mol/context.c linux-2.6.27.19-5.1/drivers/macintosh/mol/context.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/context.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/context.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/context.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,99 @@
+/*
+ * Creation Date: <1998-11-20 16:18:20 samuel>
+ vsid += MUNGE_ESID_ADD * (mol_context & 0xf);
+ return (vsid & VSID_MASK);
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/emu.c linux-2.6.27.19-5.1/drivers/macintosh/mol/emu.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/emu.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/emu.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/emu.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,228 @@
+/*
+ * Creation Date: <1998-11-21 16:07:47 samuel>
+ /* printk("emuaccel_mapin: %08x\n", mphys ); */
+ return mphys;
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/fault.c linux-2.6.27.19-5.1/drivers/macintosh/mol/fault.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/fault.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/fault.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/fault.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,601 @@
+/*
+ * Creation Date: <2002/06/08 20:53:20 samuel>
+ *ret_mphys = pb.mphys_page | (va & 0xfff);
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/hash.c linux-2.6.27.19-5.1/drivers/macintosh/mol/hash.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/hash.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/hash.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/hash.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,126 @@
+/*
+ * Creation Date: <2004/02/14 11:42:19 samuel>
+ memset( &ptehash, 0, sizeof(ptehash) );
+ memset( &hs, 0, sizeof(hs) );
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/actions.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/actions.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/actions.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/actions.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/actions.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,177 @@
+/*
+ * Creation Date: <2004/01/31 13:08:42 samuel>
+
+
+#endif /* _H_ACTIONS */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/alloc.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/alloc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/alloc.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/alloc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/alloc.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,70 @@
+/*
+ * Creation Date: <2002/01/13 16:35:18 samuel>
+
+
+#endif /* _H_ALLOC */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/archinclude.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/archinclude.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/archinclude.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/archinclude.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/archinclude.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,80 @@
+/*
+ * Creation Date: <2002/01/12 22:11:51 samuel>
+
+
+#endif /* _H_ARCHINCLUDE */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/asm.m4 linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asm.m4
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asm.m4 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/asm.m4
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/asm.m4 Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,141 @@
+/* -*- asm -*-
+ * Creation Date: <2001/12/30 20:08:53 samuel>
+])
+
+divert(0)dnl
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/asm_offsets.inc linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asm_offsets.inc
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asm_offsets.inc 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/asm_offsets.inc
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/asm_offsets.inc Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,136 @@
+/* -*-c-*-
+ * Creation Date: <2001/10/20 17:51:10 samuel>
+ K_DEF( K_KCALL_ARG2, kcall_args[2] );
+#endif
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/asmdbg.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asmdbg.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asmdbg.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/asmdbg.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/asmdbg.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,184 @@
+/*
+ * Creation Date: <2004/01/29 20:12:41 samuel>
+
+
+#endif /* _H_ASMDBG */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/asmdefs.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asmdefs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asmdefs.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/asmdefs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/asmdefs.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,397 @@
+/* -*- asm -*-
+ *
+
+#endif /* _H_ASMDEFS */
+
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/asmfuncs.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asmfuncs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asmfuncs.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/asmfuncs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/asmfuncs.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,80 @@
+/*
+ * Creation Date: <1999/09/26 01:02:58 samuel>
+ return pvr==3 || pvr==6 || pvr==7; /* 603, 603e, 603ev */
+}
+#endif /* _H_ASMFUNCS */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/atomic.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/atomic.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/atomic.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/atomic.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/atomic.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,26 @@
+/*
+ * Creation Date: <2004/01/25 17:00:12 samuel>
+#define atomic_read_mol(x) atomic_read(x)
+
+#endif /* _H_ATOMIC */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/config.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/config.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/config.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/config.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/config.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,90 @@
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.in by autoheader. */
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#define YYTEXT_POINTER 1
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/constants.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/constants.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/constants.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/constants.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/constants.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,36 @@
+/*
+ * Creation Date: <2001/02/11 18:19:42 samuel>
+#endif /* _H_CONSTANTS */
+
+
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/context.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/context.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/context.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/context.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/context.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,62 @@
+/*
+ * Creation Date: <2004/01/25 17:48:51 samuel>
+
+
+#endif /* _H_CONTEXT */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/dbg.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/dbg.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/dbg.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/dbg.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/dbg.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,31 @@
+/*
+ * Creation Date: <2004/04/10 22:14:43 samuel>
+#endif /* CONFIG_MOL_HOSTED */
+
+#endif /* _H_DBG */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/debugger.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/debugger.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/debugger.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/debugger.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/debugger.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,96 @@
+/*
+ * Creation Date: <1999/02/22 22:46:22 samuel>
+extern int __dbg ea_to_lvptr( ulong ea, int context, char **lvptr, int data_access );
+
+#endif /* _H_DEBUGGER */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/emu.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/emu.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/emu.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/emu.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/emu.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,29 @@
+/*
+ * Creation Date: <2003/01/26 00:45:55 samuel>
+
+
+#endif /* _H_EMU */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/emuaccel_sh.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/emuaccel_sh.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/emuaccel_sh.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/emuaccel_sh.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/emuaccel_sh.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,41 @@
+/*
+ * Creation Date: <2003/01/25 14:57:36 samuel>
+
+
+#endif /* _H_EMUACCEL */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/extralib.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/extralib.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/extralib.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/extralib.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/extralib.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,70 @@
+/*
+ * Creation Date: <1997/07/02 19:52:18 samuel>
+#define C_RED "\33[1;31m"
+
+#endif /* _H_EXTRALIB */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/hash.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/hash.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/hash.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/hash.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/hash.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,36 @@
+/*
+ * Creation Date: <2004/02/14 11:45:23 samuel>
+
+
+#endif /* _H_HASH */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/kernel_vars.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/kernel_vars.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/kernel_vars.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/kernel_vars.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/kernel_vars.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,225 @@
+/*
+ * Creation Date: <97/07/14 15:53:06 samuel>
+
+#endif /* __ASSEMBLY__ */
+#endif
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/locks.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/locks.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/locks.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/locks.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/locks.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,39 @@
+/*
+ * Creation Date: <2004/01/25 16:31:13 samuel>
+
+
+#endif /* _H_LOCKS */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mac_registers.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mac_registers.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mac_registers.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mac_registers.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mac_registers.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,168 @@
+/*
+ * Creation Date: <97/06/24 22:25:04 samuel>
+#endif
+
+#endif /* _MAC_REGISTERS_H */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/map.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/map.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/map.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/map.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/map.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,43 @@
+/*
+ * Creation Date: <2004/03/13 13:25:42 samuel>
+#endif
+
+#endif /* _H_MAP */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/misc.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/misc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/misc.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/misc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/misc.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,105 @@
+/*
+ * Creation Date: <97/06/16 18:02:12 samuel>
+ _x > _y ? _x : _y; })
+
+#endif
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mmu.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmu.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmu.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mmu.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mmu.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,102 @@
+/*
+ * Creation Date: <1998-11-11 13:55:49 samuel>
+
+#endif /* __ASSEMBLY__ */
+#endif /* _H_MMU */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mmu_contexts.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmu_contexts.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmu_contexts.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mmu_contexts.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mmu_contexts.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,55 @@
+/*
+ * Creation Date: <97/07/17 14:26:14 samuel>
+
+
+#endif /* _H_MMU_CONTEXTS */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mmu_mappings.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmu_mappings.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmu_mappings.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mmu_mappings.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mmu_mappings.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,48 @@
+/*
+ * Creation Date: <1998-10-31 03:11:06 samuel>
+#endif
+
+#endif /* _H_MMU_MAPPINGS */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mmutypes.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmutypes.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmutypes.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mmutypes.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mmutypes.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,76 @@
+/*
+ * Creation Date: <2002/01/13 13:53:14 samuel>
+
+
+#endif /* _H_MMUTYPES */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mol-ioctl.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mol-ioctl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mol-ioctl.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mol-ioctl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mol-ioctl.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,123 @@
+/*
+ * Creation Date: <2003/08/26 10:53:07 samuel>
+#define EMOLSECURITY 103
+
+#endif /* _H_MOL_IOCTL */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mol_config.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mol_config.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mol_config.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mol_config.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mol_config.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,76 @@
+/*
+ * Creation Date: <1999/05/30 15:30:25 samuel>
+#endif
+
+#endif /* _H_MOL_CONFIG */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/molasm.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/molasm.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/molasm.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/molasm.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/molasm.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,138 @@
+/* -*- asm -*-
+ *
+
+
+#endif /* _H_MOLASM */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/molversion.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/molversion.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/molversion.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/molversion.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/molversion.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,6 @@
+#define MOL_BUILD_DATE "Okt 13 2007 11:49"
+#define MOL_VERSION_STR "0.9.73"
+#define MOL_MAJOR_VERSION 0
+#define MOL_MINOR_VERSION 9
+#define MOL_PATCHLEVEL 73
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mtable.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mtable.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mtable.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mtable.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mtable.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,71 @@
+/*
+ * Creation Date: <2002/05/26 15:52:50 samuel>
+#endif /* _H_MTABLE */
+
+
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/osi.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/osi.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/osi.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/osi.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/osi.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,170 @@
+/*
+ * Creation Date: <1999/03/18 03:19:43 samuel>
+#define NUM_OSI_SELECTORS 100 /* remember to increase this... */
+
+#endif /* _H_OSI */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/osi_calls.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/osi_calls.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/osi_calls.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/osi_calls.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/osi_calls.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,475 @@
+/*
+ * Creation Date: <2002/06/16 01:40:57 samuel>
+static inline _osi_call0( int, OSI_TTYIRQAck, OSI_TTY_IRQ_ACK );
+
+#endif /* _H_OSI_CALLS */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/performance.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/performance.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/performance.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/performance.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/performance.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,71 @@
+/*
+ * Creation Date: <2001/04/01 00:44:40 samuel>
+#endif
+
+#endif /* _H_PERFORMANCE */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/platform.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/platform.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/platform.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/platform.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/platform.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,73 @@
+/*
+ * Creation Date: <2001/12/29 19:46:46 samuel>
+#endif
+
+#endif /* _H_PLATFORM */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/processor.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/processor.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/processor.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/processor.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/processor.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,409 @@
+/*
+ * Creation Date: <2000/10/29 01:43:29 samuel>
+
+#endif /* _H_PROCESSOR */
+
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/prom.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/prom.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/prom.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/prom.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/prom.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,46 @@
+/*
+ * Creation Date: <1999/02/22 23:22:17 samuel>
+} mol_device_node_t;
+
+#endif /* _H_PROM */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/rvec.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/rvec.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/rvec.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/rvec.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/rvec.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,147 @@
+/*
+ * Creation Date: <2001/01/26 21:33:45 samuel>
+#endif /* __KERNEL__ || __MPC107__ */
+
+#endif /* _H_RVEC */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/skiplist.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/skiplist.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/skiplist.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/skiplist.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/skiplist.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,87 @@
+/*
+ * Creation Date: <2003/03/03 22:59:04 samuel>
+
+
+#endif /* _H_SKIPLIST */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/tlbie.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/tlbie.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/tlbie.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/tlbie.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/tlbie.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,102 @@
+/*
+ * Creation Date: <2003/05/27 16:56:10 samuel>
+
+
+#endif /* _H_TLBIE */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/uaccess.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/uaccess.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/uaccess.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/uaccess.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/uaccess.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,36 @@
+/*
+ * Creation Date: <2004/02/01 20:02:11 samuel>
+
+
+#endif /* _H_UACCESS */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/vector.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/vector.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/vector.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/vector.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/vector.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,189 @@
+/*
+ * Creation Date: <2003/05/26 00:00:28 samuel>
+
+#endif /* MOLMPC */
+#endif /* _H_VECTOR */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/version.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/version.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/version.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/version.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/version.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,11 @@
+
+#ifndef _H_VERSION
+ + MOL_PATCHLEVEL )
+
+#endif /* _H_VERSION */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/weaksym.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/weaksym.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/weaksym.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/weaksym.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/weaksym.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,39 @@
+/*
+ * Creation Date: <2001/08/02 23:53:57 samuel>
+
+
+#endif /* _H_WEAKSYM */
-diff -purN linux-2.6.27/drivers/macintosh/mol/init.c linux-2.6.27.19-5.1/drivers/macintosh/mol/init.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/init.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/init.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/init.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,191 @@
+/*
+ * Creation Date: <2002/01/13 20:45:37 samuel>
+
+ return g_sesstab->magic;
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/misc.c linux-2.6.27.19-5.1/drivers/macintosh/mol/misc.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/misc.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/misc.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/misc.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,255 @@
+/*
+ * Creation Date: <2003/06/06 20:00:52 samuel>
+ }
+ return ret;
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/mmu.c linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/mmu.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/mmu.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,251 @@
+/*
+ * Creation Date: <1998-11-11 11:56:45 samuel>
+ }
+ return num_match;
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/mmu_fb.c linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu_fb.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu_fb.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/mmu_fb.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/mmu_fb.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,186 @@
+/*
+ * Creation Date: <1999-12-28 14:03:18 samuel>
+ }
+ return n;
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/mmu_io.c linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu_io.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu_io.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/mmu_io.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/mmu_io.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,470 @@
+/*
+ * Creation Date: <1998-12-02 03:23:31 samuel>
+ remove_block_trans( kv, m->id );
+ m->id = 0;
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/mmu_tracker.c linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu_tracker.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu_tracker.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/mmu_tracker.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/mmu_tracker.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,128 @@
+/*
+ * Creation Date: <2000/09/07 20:36:54 samuel>
+ printk("set_track_buffer: Bad access\n");
+ }
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/mtable.c linux-2.6.27.19-5.1/drivers/macintosh/mol/mtable.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/mtable.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/mtable.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/mtable.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,960 @@
+/*
+ * Creation Date: <2002/05/26 14:46:42 samuel>
+#ifdef UL_DEBUG
+#include "mtable_dbg.c"
+#endif
-diff -purN linux-2.6.27/drivers/macintosh/mol/ptaccess.c linux-2.6.27.19-5.1/drivers/macintosh/mol/ptaccess.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/ptaccess.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/ptaccess.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/ptaccess.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,153 @@
+/*
+ * Creation Date: <2001/03/25 18:04:45 samuel>
+
+#endif /* EMULATE_603 */
+
-diff -purN linux-2.6.27/drivers/macintosh/mol/sheep.c linux-2.6.27.19-5.1/drivers/macintosh/mol/sheep.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/sheep.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/sheep.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/sheep.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,701 @@
+/*
+ * sheep_net.c - Linux driver for SheepShaver/Basilisk II networking (access to raw Ethernet packets)
+{
+ (void) misc_deregister( &sheep_net_device );
+}
-diff -purN linux-2.6.27/drivers/macintosh/mol/skiplist.c linux-2.6.27.19-5.1/drivers/macintosh/mol/skiplist.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/skiplist.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/skiplist.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/skiplist.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,222 @@
+/*
+ * Creation Date: <2003/03/03 23:19:47 samuel>
+ for( i=0; i < SKIPLIST_MAX_HEIGHT ; i++ )
+ sl->root[i] = nilptr;
+}
-diff -purN linux-2.6.27/drivers/macintosh/smu.c linux-2.6.27.19-5.1/drivers/macintosh/smu.c
---- linux-2.6.27/drivers/macintosh/smu.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/smu.c 2009-03-25 16:11:14.000000000 +0000
-@@ -670,6 +670,7 @@ static struct of_device_id smu_platform_
+diff -r 9608d5473017 drivers/macintosh/smu.c
+--- a/drivers/macintosh/smu.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/smu.c Wed May 06 16:56:20 2009 +0100
+@@ -670,6 +670,7 @@
static struct of_platform_driver smu_of_platform_driver =
{
.name = "smu",
.match_table = smu_platform_match,
.probe = smu_platform_probe,
-diff -purN linux-2.6.27/drivers/macintosh/therm_pm72.c linux-2.6.27.19-5.1/drivers/macintosh/therm_pm72.c
---- linux-2.6.27/drivers/macintosh/therm_pm72.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/therm_pm72.c 2009-03-25 16:11:14.000000000 +0000
-@@ -2220,6 +2220,7 @@ static struct of_device_id fcu_match[] =
+diff -r 9608d5473017 drivers/macintosh/therm_pm72.c
+--- a/drivers/macintosh/therm_pm72.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/therm_pm72.c Wed May 06 16:56:20 2009 +0100
+@@ -2220,6 +2220,7 @@
static struct of_platform_driver fcu_of_platform_driver =
{
.name = "temperature",
.match_table = fcu_match,
.probe = fcu_of_probe,
-diff -purN linux-2.6.27/drivers/macintosh/therm_windtunnel.c linux-2.6.27.19-5.1/drivers/macintosh/therm_windtunnel.c
---- linux-2.6.27/drivers/macintosh/therm_windtunnel.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/therm_windtunnel.c 2009-03-25 16:11:14.000000000 +0000
-@@ -470,6 +470,7 @@ static struct of_device_id therm_of_matc
+diff -r 9608d5473017 drivers/macintosh/therm_windtunnel.c
+--- a/drivers/macintosh/therm_windtunnel.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/therm_windtunnel.c Wed May 06 16:56:20 2009 +0100
+@@ -470,6 +470,7 @@
};
static struct of_platform_driver therm_of_driver = {
.name = "temperature",
.match_table = therm_of_match,
.probe = therm_of_probe,
-diff -purN linux-2.6.27/drivers/macintosh/via-pmu-led.c linux-2.6.27.19-5.1/drivers/macintosh/via-pmu-led.c
---- linux-2.6.27/drivers/macintosh/via-pmu-led.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/via-pmu-led.c 2009-03-25 16:11:14.000000000 +0000
-@@ -72,7 +72,7 @@ static void pmu_led_set(struct led_class
+diff -r 9608d5473017 drivers/macintosh/via-pmu-led.c
+--- a/drivers/macintosh/via-pmu-led.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/via-pmu-led.c Wed May 06 16:56:20 2009 +0100
+@@ -72,7 +72,7 @@
}
static struct led_classdev pmu_led = {
#ifdef CONFIG_ADB_PMU_LED_IDE
.default_trigger = "ide-disk",
#endif
-diff -purN linux-2.6.27/drivers/md/Kconfig linux-2.6.27.19-5.1/drivers/md/Kconfig
---- linux-2.6.27/drivers/md/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/Kconfig 2009-03-25 16:11:23.000000000 +0000
-@@ -269,6 +269,14 @@ config DM_DELAY
+diff -r 9608d5473017 drivers/md/Kconfig
+--- a/drivers/md/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/Kconfig Wed May 06 16:56:20 2009 +0100
+@@ -269,6 +269,14 @@
If unsure, say N.
config DM_UEVENT
bool "DM uevents (EXPERIMENTAL)"
depends on BLK_DEV_DM && EXPERIMENTAL
-diff -purN linux-2.6.27/drivers/md/Makefile linux-2.6.27.19-5.1/drivers/md/Makefile
---- linux-2.6.27/drivers/md/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/Makefile 2009-03-25 16:11:23.000000000 +0000
-@@ -32,9 +32,13 @@ obj-$(CONFIG_BLK_DEV_MD) += md-mod.o
+diff -r 9608d5473017 drivers/md/Makefile
+--- a/drivers/md/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/Makefile Wed May 06 16:56:20 2009 +0100
+@@ -32,9 +32,13 @@
obj-$(CONFIG_BLK_DEV_DM) += dm-mod.o
obj-$(CONFIG_DM_CRYPT) += dm-crypt.o
obj-$(CONFIG_DM_DELAY) += dm-delay.o
obj-$(CONFIG_DM_ZERO) += dm-zero.o
quiet_cmd_unroll = UNROLL $@
-diff -purN linux-2.6.27/drivers/md/bitmap.c linux-2.6.27.19-5.1/drivers/md/bitmap.c
---- linux-2.6.27/drivers/md/bitmap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/bitmap.c 2009-03-25 16:11:23.000000000 +0000
-@@ -110,13 +110,12 @@ static int bitmap_checkpage(struct bitma
+diff -r 9608d5473017 drivers/md/bitmap.c
+--- a/drivers/md/bitmap.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/bitmap.c Wed May 06 16:56:20 2009 +0100
+@@ -110,13 +110,12 @@
{
unsigned char *mappage;
if (bitmap->bp[page].hijacked) /* it's hijacked, don't try to alloc */
return 0;
-@@ -208,16 +207,19 @@ static void bitmap_checkfree(struct bitm
+@@ -208,15 +207,18 @@
*/
/* IO operations when bitmap is stored near all superblocks */
- struct page *page = alloc_page(GFP_KERNEL);
sector_t target;
- if (!page)
-+ page = alloc_page(GFP_KERNEL);
+ if (!page)
++ page = alloc_page(GFP_KERNEL);
+ if (!page)
return ERR_PTR(-ENOMEM);
- rdev_for_each(rdev, tmp, mddev) {
-@@ -227,7 +229,9 @@ static struct page *read_sb_page(mddev_t
+@@ -227,7 +229,9 @@
target = rdev->sb_start + offset + index * (PAGE_SIZE/512);
page->index = index;
attach_page_buffers(page, NULL); /* so that free_buffer will
* quietly no-op */
-@@ -544,7 +548,9 @@ static int bitmap_read_sb(struct bitmap
+@@ -544,7 +548,9 @@
bitmap->sb_page = read_page(bitmap->file, 0, bitmap, bytes);
} else {
}
if (IS_ERR(bitmap->sb_page)) {
err = PTR_ERR(bitmap->sb_page);
-@@ -564,7 +570,7 @@ static int bitmap_read_sb(struct bitmap
+@@ -564,7 +570,7 @@
else if (le32_to_cpu(sb->version) < BITMAP_MAJOR_LO ||
le32_to_cpu(sb->version) > BITMAP_MAJOR_HI)
reason = "unrecognized superblock version";
reason = "bitmap chunksize too small";
else if ((1 << ffz(~chunksize)) != chunksize)
reason = "bitmap chunksize not a power of 2";
-@@ -957,11 +963,18 @@ static int bitmap_init_from_disk(struct
+@@ -957,11 +963,18 @@
*/
page = bitmap->sb_page;
offset = sizeof(bitmap_super_t);
offset = 0;
}
if (IS_ERR(page)) { /* read error */
-@@ -1332,8 +1345,8 @@ void bitmap_endwrite(struct bitmap *bitm
+@@ -1332,8 +1345,8 @@
}
}
{
bitmap_counter_t *bmc;
int rv;
-@@ -1361,6 +1374,30 @@ int bitmap_start_sync(struct bitmap *bit
+@@ -1360,6 +1373,30 @@
+ bitmap->allclean = 0;
return rv;
}
-
++
+int bitmap_start_sync(struct bitmap *bitmap, sector_t offset, int *blocks,
+ int degraded)
+{
+ return rv;
+}
+
-+
+
void bitmap_end_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int aborted)
{
- bitmap_counter_t *bmc;
-diff -purN linux-2.6.27/drivers/md/dm-ioctl.c linux-2.6.27.19-5.1/drivers/md/dm-ioctl.c
---- linux-2.6.27/drivers/md/dm-ioctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-ioctl.c 2009-03-25 16:11:23.000000000 +0000
-@@ -233,7 +233,7 @@ static void __hash_remove(struct hash_ce
+diff -r 9608d5473017 drivers/md/dm-ioctl.c
+--- a/drivers/md/dm-ioctl.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-ioctl.c Wed May 06 16:56:20 2009 +0100
+@@ -233,7 +233,7 @@
}
if (hc->new_map)
dm_put(hc->md);
free_cell(hc);
}
-@@ -827,8 +827,8 @@ static int do_resume(struct dm_ioctl *pa
+@@ -827,8 +827,8 @@
r = dm_swap_table(md, new_map);
if (r) {
return r;
}
-@@ -836,8 +836,6 @@ static int do_resume(struct dm_ioctl *pa
+@@ -836,8 +836,6 @@
set_disk_ro(dm_disk(md), 0);
else
set_disk_ro(dm_disk(md), 1);
}
if (dm_suspended(md))
-@@ -1045,6 +1043,12 @@ static int populate_table(struct dm_tabl
+@@ -1045,6 +1043,12 @@
next = spec->next;
}
return dm_table_complete(table);
}
-@@ -1069,6 +1073,13 @@ static int table_load(struct dm_ioctl *p
+@@ -1069,6 +1073,13 @@
goto out;
}
down_write(&_hash_lock);
hc = dm_get_mdptr(md);
if (!hc || hc->md != md) {
-@@ -1080,7 +1091,7 @@ static int table_load(struct dm_ioctl *p
+@@ -1080,7 +1091,7 @@
}
if (hc->new_map)
hc->new_map = t;
up_write(&_hash_lock);
-@@ -1109,7 +1120,7 @@ static int table_clear(struct dm_ioctl *
+@@ -1109,7 +1120,7 @@
}
if (hc->new_map) {
hc->new_map = NULL;
}
-diff -purN linux-2.6.27/drivers/md/dm-kcopyd.c linux-2.6.27.19-5.1/drivers/md/dm-kcopyd.c
---- linux-2.6.27/drivers/md/dm-kcopyd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-kcopyd.c 2009-03-25 16:11:23.000000000 +0000
-@@ -268,6 +268,17 @@ static void push(struct list_head *jobs,
+diff -r 9608d5473017 drivers/md/dm-kcopyd.c
+--- a/drivers/md/dm-kcopyd.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-kcopyd.c Wed May 06 16:56:20 2009 +0100
+@@ -268,6 +268,17 @@
spin_unlock_irqrestore(&kc->job_lock, flags);
}
/*
* These three functions process 1 item from the corresponding
* job list.
-@@ -398,7 +409,7 @@ static int process_jobs(struct list_head
+@@ -398,7 +409,7 @@
* We couldn't service this job ATM, so
* push this job back onto the list.
*/
break;
}
-diff -purN linux-2.6.27/drivers/md/dm-least-pending.c linux-2.6.27.19-5.1/drivers/md/dm-least-pending.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-least-pending.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-least-pending.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-least-pending.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,256 @@
+/*
+ * (C) Copyright 2008 Hewlett-Packard Development Company, L.P
+MODULE_AUTHOR("Sakshi Chaitanya Veni <vsakshi@hp.com>");
+MODULE_LICENSE("GPL");
+
-diff -purN linux-2.6.27/drivers/md/dm-linear.c linux-2.6.27.19-5.1/drivers/md/dm-linear.c
---- linux-2.6.27/drivers/md/dm-linear.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-linear.c 2009-03-25 16:11:23.000000000 +0000
-@@ -52,6 +52,7 @@ static int linear_ctr(struct dm_target *
+diff -r 9608d5473017 drivers/md/dm-linear.c
+--- a/drivers/md/dm-linear.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-linear.c Wed May 06 16:56:20 2009 +0100
+@@ -52,6 +52,7 @@
ti->error = "dm-linear: Device lookup failed";
goto bad;
}
ti->private = lc;
return 0;
-diff -purN linux-2.6.27/drivers/md/dm-log.c linux-2.6.27.19-5.1/drivers/md/dm-log.c
---- linux-2.6.27/drivers/md/dm-log.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-log.c 2009-03-25 16:11:23.000000000 +0000
-@@ -467,6 +467,7 @@ static int create_log_context(struct dm_
+diff -r 9608d5473017 drivers/md/dm-log.c
+--- a/drivers/md/dm-log.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-log.c Wed May 06 16:56:20 2009 +0100
+@@ -467,6 +467,7 @@
lc->disk_header = vmalloc(buf_size);
if (!lc->disk_header) {
DMWARN("couldn't allocate disk log buffer");
kfree(lc);
return -ENOMEM;
}
-@@ -482,6 +483,8 @@ static int create_log_context(struct dm_
+@@ -482,6 +483,8 @@
DMWARN("couldn't allocate sync bitset");
if (!dev)
vfree(lc->clean_bits);
vfree(lc->disk_header);
kfree(lc);
return -ENOMEM;
-@@ -495,6 +498,8 @@ static int create_log_context(struct dm_
+@@ -495,6 +498,8 @@
vfree(lc->sync_bits);
if (!dev)
vfree(lc->clean_bits);
vfree(lc->disk_header);
kfree(lc);
return -ENOMEM;
-diff -purN linux-2.6.27/drivers/md/dm-memcache.c linux-2.6.27.19-5.1/drivers/md/dm-memcache.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-memcache.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-memcache.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-memcache.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,301 @@
+/*
+ * Copyright (C) 2006-2008 Red Hat, Inc. All rights reserved.
+MODULE_DESCRIPTION(DM_NAME " dm memory cache");
+MODULE_AUTHOR("Heinz Mauelshagen <hjm@redhat.com>");
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/md/dm-memcache.h linux-2.6.27.19-5.1/drivers/md/dm-memcache.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-memcache.h 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-memcache.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-memcache.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2006-2008 Red Hat, Inc. All rights reserved.
+ struct dm_mem_cache_object *object);
+
+#endif
-diff -purN linux-2.6.27/drivers/md/dm-message.c linux-2.6.27.19-5.1/drivers/md/dm-message.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-message.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-message.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-message.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,182 @@
+/*
+ * Copyright (C) 2007,2008 Red Hat Inc. All rights reserved.
+MODULE_DESCRIPTION(DM_NAME " device-mapper target message parser");
+MODULE_AUTHOR("Heinz Mauelshagen <hjm@redhat.com>");
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/md/dm-message.h linux-2.6.27.19-5.1/drivers/md/dm-message.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-message.h 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-message.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-message.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2007,2008 Red Hat, Inc. All rights reserved.
+ int argc, char **argv);
+
+#endif
-diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-mpath.c
---- linux-2.6.27/drivers/md/dm-mpath.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-mpath.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-mpath.c
+--- a/drivers/md/dm-mpath.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-mpath.c Wed May 06 16:56:20 2009 +0100
@@ -7,8 +7,6 @@
#include "dm.h"
#include "dm-uevent.h"
#include <linux/ctype.h>
-@@ -30,9 +28,12 @@ struct pgpath {
+@@ -30,9 +28,12 @@
struct list_head list;
struct priority_group *pg; /* Owning PG */
};
#define path_to_pgpath(__pgp) container_of((__pgp), struct pgpath, path)
-@@ -62,8 +63,6 @@ struct multipath {
+@@ -62,8 +63,6 @@
spinlock_t lock;
const char *hw_handler_name;
unsigned nr_priority_groups;
struct list_head priority_groups;
unsigned pg_init_required; /* pg_init needs calling? */
-@@ -82,7 +81,7 @@ struct multipath {
+@@ -82,7 +81,7 @@
unsigned pg_init_count; /* Number of times pg_init called */
struct work_struct process_queued_ios;
unsigned queue_size;
struct work_struct trigger_event;
-@@ -99,7 +98,7 @@ struct multipath {
+@@ -99,7 +98,7 @@
*/
struct dm_mpath_io {
struct pgpath *pgpath;
};
typedef int (*action_fn) (struct pgpath *pgpath);
-@@ -112,6 +111,7 @@ static struct workqueue_struct *kmultipa
+@@ -112,6 +111,7 @@
static void process_queued_ios(struct work_struct *work);
static void trigger_event(struct work_struct *work);
static void activate_path(struct work_struct *work);
/*-----------------------------------------------
-@@ -122,8 +122,11 @@ static struct pgpath *alloc_pgpath(void)
+@@ -122,8 +122,11 @@
{
struct pgpath *pgpath = kzalloc(sizeof(*pgpath), GFP_KERNEL);
return pgpath;
}
-@@ -133,6 +136,15 @@ static void free_pgpath(struct pgpath *p
+@@ -131,6 +134,15 @@
+ static void free_pgpath(struct pgpath *pgpath)
+ {
kfree(pgpath);
- }
-
++}
++
+static void deactivate_path(struct work_struct *work)
+{
+ struct pgpath *pgpath =
+
+ if (pgpath->path.dev)
+ blk_abort_queue(pgpath->path.dev->bdev->bd_disk->queue);
-+}
-+
+ }
+
static struct priority_group *alloc_priority_group(void)
- {
- struct priority_group *pg;
-@@ -147,19 +159,11 @@ static struct priority_group *alloc_prio
+@@ -147,19 +159,11 @@
static void free_pgpaths(struct list_head *pgpaths, struct dm_target *ti)
{
free_pgpath(pgpath);
}
}
-@@ -185,11 +189,11 @@ static struct multipath *alloc_multipath
+@@ -185,11 +189,11 @@
m = kzalloc(sizeof(*m), GFP_KERNEL);
if (m) {
INIT_LIST_HEAD(&m->priority_groups);
m->mpio_pool = mempool_create_slab_pool(MIN_IOS, _mpio_cache);
if (!m->mpio_pool) {
kfree(m);
-@@ -237,23 +241,29 @@ static void __switch_pg(struct multipath
+@@ -237,15 +241,21 @@
m->pg_init_count = 0;
}
return -ENXIO;
m->current_pgpath = path_to_pgpath(path);
-
++
+ if (!m->current_pgpath->path.dev) {
+ m->current_pgpath = NULL;
+ return -ENODEV;
+ }
-+
+
if (m->current_pg != pg)
__switch_pg(m, m->current_pgpath);
-
+@@ -253,7 +263,7 @@
return 0;
}
{
struct priority_group *pg;
unsigned bypassed = 1;
-@@ -265,12 +275,12 @@ static void __choose_pgpath(struct multi
+@@ -265,12 +275,12 @@
if (m->next_pg) {
pg = m->next_pg;
m->next_pg = NULL;
return;
/*
-@@ -282,7 +292,7 @@ static void __choose_pgpath(struct multi
+@@ -282,7 +292,7 @@
list_for_each_entry(pg, &m->priority_groups, list) {
if (pg->bypassed == bypassed)
continue;
return;
}
} while (bypassed--);
-@@ -309,19 +319,21 @@ static int __must_push_back(struct multi
+@@ -309,19 +319,21 @@
dm_noflush_suspending(m->ti));
}
pgpath = m->current_pgpath;
-@@ -331,21 +343,28 @@ static int map_io(struct multipath *m, s
+@@ -331,21 +343,28 @@
if ((pgpath && m->queue_io) ||
(!pgpath && m->queue_if_no_path)) {
/* Queue for the daemon to resubmit */
spin_unlock_irqrestore(&m->lock, flags);
-@@ -383,30 +402,31 @@ static void dispatch_queued_ios(struct m
+@@ -383,30 +402,31 @@
{
int r;
unsigned long flags;
}
}
-@@ -414,8 +434,8 @@ static void process_queued_ios(struct wo
+@@ -414,8 +434,8 @@
{
struct multipath *m =
container_of(work, struct multipath, process_queued_ios);
unsigned long flags;
spin_lock_irqsave(&m->lock, flags);
-@@ -424,28 +444,30 @@ static void process_queued_ios(struct wo
+@@ -424,28 +444,30 @@
goto out;
if (!m->current_pgpath)
if (!must_queue)
dispatch_queued_ios(m);
}
-@@ -558,6 +580,7 @@ static struct pgpath *parse_path(struct
+@@ -558,6 +580,7 @@
{
int r;
struct pgpath *p;
struct multipath *m = ti->private;
/* we need at least a path arg */
-@@ -570,20 +593,58 @@ static struct pgpath *parse_path(struct
+@@ -570,19 +593,57 @@
if (!p)
return NULL;
if (r) {
- ti->error = "error getting device";
- goto bad;
-- }
+ unsigned major, minor;
-
-- if (m->hw_handler_name) {
-- r = scsi_dh_attach(bdev_get_queue(p->path.dev->bdev),
-- m->hw_handler_name);
-- if (r < 0) {
-- dm_put_device(ti, p->path.dev);
++
+ /* Try to add a failed device */
+ if (r == -ENXIO && sscanf(path, "%u:%u", &major, &minor) == 2) {
+ dev_t dev;
+ p->is_active = 0;
+ } else {
+ ti->error = "error getting device";
- goto bad;
- }
++ goto bad;
++ }
+ } else {
+ memcpy(p->path.pdev, p->path.dev->name, 16);
-+ }
-+
+ }
+
+- if (m->hw_handler_name) {
+- r = scsi_dh_attach(bdev_get_queue(p->path.dev->bdev),
+- m->hw_handler_name);
+- if (r < 0) {
+- dm_put_device(ti, p->path.dev);
+- goto bad;
+ if (p->path.dev) {
+ struct request_queue *q = bdev_get_queue(p->path.dev->bdev);
+
+ } else {
+ /* Play safe and detach hardware handler */
+ scsi_dh_detach(q);
-+ }
+ }
}
- r = ps->type->add_path(ps, &p->path, as->argc, as->argv, &ti->error);
-@@ -592,6 +653,11 @@ static struct pgpath *parse_path(struct
+@@ -592,6 +653,11 @@
goto bad;
}
return p;
bad:
-@@ -745,8 +811,8 @@ static int multipath_ctr(struct dm_targe
+@@ -745,8 +811,8 @@
{
/* target parameters */
static struct param _params[] = {
};
int r;
-@@ -821,21 +887,24 @@ static void multipath_dtr(struct dm_targ
+@@ -821,21 +887,24 @@
}
/*
if (r < 0 || r == DM_MAPIO_REQUEUE)
mempool_free(mpio, m->mpio_pool);
-@@ -852,13 +921,13 @@ static int fail_path(struct pgpath *pgpa
+@@ -852,13 +921,13 @@
spin_lock_irqsave(&m->lock, flags);
pgpath->fail_count++;
m->nr_valid_paths--;
-@@ -867,9 +936,10 @@ static int fail_path(struct pgpath *pgpa
+@@ -867,9 +936,10 @@
m->current_pgpath = NULL;
dm_path_uevent(DM_UEVENT_PATH_FAILED, m->ti,
out:
spin_unlock_irqrestore(&m->lock, flags);
-@@ -888,9 +958,15 @@ static int reinstate_path(struct pgpath
+@@ -888,8 +958,14 @@
spin_lock_irqsave(&m->lock, flags);
- if (pgpath->path.is_active)
+ if (pgpath->is_active)
goto out;
-
++
+ if (!pgpath->path.dev) {
+ DMWARN("Cannot reinstate disabled path %s", pgpath->path.pdev);
+ r = -ENODEV;
+ goto out;
+ }
-+
+
if (!pgpath->pg->ps.type->reinstate_path) {
DMWARN("Reinstate path not supported by path selector %s",
- pgpath->pg->ps.type->name);
-@@ -902,14 +978,14 @@ static int reinstate_path(struct pgpath
+@@ -902,14 +978,14 @@
if (r)
goto out;
queue_work(kmultipathd, &m->trigger_event);
-@@ -929,6 +1005,9 @@ static int action_dev(struct multipath *
+@@ -928,6 +1004,9 @@
+ int r = 0;
struct pgpath *pgpath;
struct priority_group *pg;
-
++
+ if (!dev)
+ return 0;
-+
+
list_for_each_entry(pg, &m->priority_groups, list) {
list_for_each_entry(pgpath, &pg->pgpaths, list) {
- if (pgpath->path.dev == dev)
-@@ -1090,79 +1169,61 @@ static void pg_init_done(struct dm_path
+@@ -1090,79 +1169,61 @@
pg->bypassed = 0;
}
- container_of(work, struct multipath, activate_path);
- struct dm_path *path;
- unsigned long flags;
--
++ int ret = SCSI_DH_DEV_OFFLINED;
++ struct pgpath *pgpath =
++ container_of(work, struct pgpath, activate_path);
+
- spin_lock_irqsave(&m->lock, flags);
- path = &m->pgpath_to_activate->path;
- m->pgpath_to_activate = NULL;
- return;
- ret = scsi_dh_activate(bdev_get_queue(path->dev->bdev));
- pg_init_done(path, ret);
-+ int ret = SCSI_DH_DEV_OFFLINED;
-+ struct pgpath *pgpath =
-+ container_of(work, struct pgpath, activate_path);
-+
+ if (pgpath->path.dev)
+ ret = scsi_dh_activate(bdev_get_queue(pgpath->path.dev->bdev));
+ pg_init_done(&pgpath->path, ret);
- if (!error)
+ if (!error && !clone->errors)
return 0; /* I/O complete */
-
+-
- if ((error == -EWOULDBLOCK) && bio_rw_ahead(bio))
- return error;
--
+
if (error == -EOPNOTSUPP)
return error;
int error, union map_info *map_context)
{
struct multipath *m = ti->private;
-@@ -1171,14 +1232,13 @@ static int multipath_end_io(struct dm_ta
+@@ -1171,14 +1232,13 @@
struct path_selector *ps;
int r;
return r;
}
-@@ -1289,8 +1349,8 @@ static int multipath_status(struct dm_ta
+@@ -1289,8 +1349,8 @@
pg->ps.type->info_args);
list_for_each_entry(p, &pg->pgpaths, list) {
p->fail_count);
if (pg->ps.type->status)
sz += pg->ps.type->status(&pg->ps,
-@@ -1315,7 +1375,7 @@ static int multipath_status(struct dm_ta
+@@ -1315,7 +1375,7 @@
pg->ps.type->table_args);
list_for_each_entry(p, &pg->pgpaths, list) {
if (pg->ps.type->status)
sz += pg->ps.type->status(&pg->ps,
&p->path, type, result + sz,
-@@ -1395,9 +1455,9 @@ static int multipath_ioctl(struct dm_tar
+@@ -1395,9 +1455,9 @@
spin_lock_irqsave(&m->lock, flags);
if (!m->current_pgpath)
bdev = m->current_pgpath->path.dev->bdev;
fake_dentry.d_inode = bdev->bd_inode;
fake_file.f_mode = m->current_pgpath->path.dev->mode;
-@@ -1414,6 +1474,75 @@ static int multipath_ioctl(struct dm_tar
+@@ -1414,6 +1474,75 @@
bdev->bd_disk, cmd, arg);
}
/*-----------------------------------------------------------------
* Module setup
*---------------------------------------------------------------*/
-@@ -1423,13 +1552,14 @@ static struct target_type multipath_targ
+@@ -1423,13 +1552,14 @@
.module = THIS_MODULE,
.ctr = multipath_ctr,
.dtr = multipath_dtr,
};
static int __init dm_multipath_init(void)
-diff -purN linux-2.6.27/drivers/md/dm-mpath.h linux-2.6.27.19-5.1/drivers/md/dm-mpath.h
---- linux-2.6.27/drivers/md/dm-mpath.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-mpath.h 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-mpath.h
+--- a/drivers/md/dm-mpath.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-mpath.h Wed May 06 16:56:20 2009 +0100
@@ -12,9 +12,8 @@
struct dm_dev;
void *pscontext; /* For path-selector use */
};
-diff -purN linux-2.6.27/drivers/md/dm-path-selector.c linux-2.6.27.19-5.1/drivers/md/dm-path-selector.c
---- linux-2.6.27/drivers/md/dm-path-selector.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-path-selector.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-path-selector.c
+--- a/drivers/md/dm-path-selector.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-path-selector.c Wed May 06 16:56:20 2009 +0100
@@ -16,9 +16,7 @@
struct ps_internal {
};
#define pst_to_psi(__pst) container_of((__pst), struct ps_internal, pst)
-@@ -44,12 +42,8 @@ static struct ps_internal *get_path_sele
+@@ -44,12 +42,8 @@
down_read(&_ps_lock);
psi = __find_path_selector_type(name);
up_read(&_ps_lock);
return psi;
-@@ -83,11 +77,7 @@ void dm_put_path_selector(struct path_se
+@@ -83,11 +77,7 @@
if (!psi)
goto out;
out:
up_read(&_ps_lock);
}
-@@ -135,11 +125,6 @@ int dm_unregister_path_selector(struct p
+@@ -135,11 +125,6 @@
return -EINVAL;
}
list_del(&psi->list);
up_write(&_ps_lock);
-diff -purN linux-2.6.27/drivers/md/dm-path-selector.h linux-2.6.27.19-5.1/drivers/md/dm-path-selector.h
---- linux-2.6.27/drivers/md/dm-path-selector.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-path-selector.h 2009-03-25 16:11:23.000000000 +0000
-@@ -56,7 +56,8 @@ struct path_selector_type {
+diff -r 9608d5473017 drivers/md/dm-path-selector.h
+--- a/drivers/md/dm-path-selector.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-path-selector.h Wed May 06 16:56:20 2009 +0100
+@@ -56,7 +56,8 @@
* the path fails.
*/
struct dm_path *(*select_path) (struct path_selector *ps,
/*
* Notify the selector that a path has failed.
-@@ -75,7 +76,10 @@ struct path_selector_type {
+@@ -75,7 +76,10 @@
int (*status) (struct path_selector *ps, struct dm_path *path,
status_type_t type, char *result, unsigned int maxlen);
};
/* Register a path selector */
-diff -purN linux-2.6.27/drivers/md/dm-queue-length.c linux-2.6.27.19-5.1/drivers/md/dm-queue-length.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-queue-length.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-queue-length.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-queue-length.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,259 @@
+/*
+ * Copyright (C) 2004-2005 IBM Corp. All Rights Reserved.
+ QL_VERSION ")"
+);
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/md/dm-raid1.c linux-2.6.27.19-5.1/drivers/md/dm-raid1.c
---- linux-2.6.27/drivers/md/dm-raid1.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-raid1.c 2009-03-25 16:11:23.000000000 +0000
-@@ -727,9 +727,6 @@ static void fail_mirror(struct mirror *m
+diff -r 9608d5473017 drivers/md/dm-raid1.c
+--- a/drivers/md/dm-raid1.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-raid1.c Wed May 06 16:56:20 2009 +0100
+@@ -727,9 +727,6 @@
struct mirror_set *ms = m->ms;
struct mirror *new;
/*
* error_count is used for nothing more than a
* simple way to tell if a device has encountered
-@@ -740,6 +737,9 @@ static void fail_mirror(struct mirror *m
- if (test_and_set_bit(error_type, &m->error_type))
- return;
+@@ -738,6 +735,9 @@
+ atomic_inc(&m->error_count);
-+ if (!errors_handled(ms))
+ if (test_and_set_bit(error_type, &m->error_type))
+ return;
+
- if (m != get_default_mirror(ms))
- goto out;
++ if (!errors_handled(ms))
+ return;
-@@ -1598,6 +1598,7 @@ static void mirror_dtr(struct dm_target
+ if (m != get_default_mirror(ms))
+@@ -1598,6 +1598,7 @@
del_timer_sync(&ms->timer);
flush_workqueue(ms->kmirrord_wq);
dm_kcopyd_client_destroy(ms->kcopyd_client);
destroy_workqueue(ms->kmirrord_wq);
free_context(ms, ti, ms->nr_mirrors);
-diff -purN linux-2.6.27/drivers/md/dm-raid45.c linux-2.6.27.19-5.1/drivers/md/dm-raid45.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-raid45.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-raid45.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-raid45.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,4516 @@
+/*
+ * Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved.
+MODULE_DESCRIPTION(DM_NAME " raid4/5 target");
+MODULE_AUTHOR("Heinz Mauelshagen <hjm@redhat.com>");
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/md/dm-raid45.h linux-2.6.27.19-5.1/drivers/md/dm-raid45.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-raid45.h 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-raid45.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-raid45.h Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2006-2008 Red Hat, Inc. All rights reserved.
+};
+
+#endif
-diff -purN linux-2.6.27/drivers/md/dm-regions.c linux-2.6.27.19-5.1/drivers/md/dm-regions.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-regions.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-regions.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-regions.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,723 @@
+/*
+ * Copyright (C) 2003 Sistina Software Limited.
+MODULE_DESCRIPTION(DM_NAME " region hash");
+MODULE_AUTHOR("Joe Thornber/Heinz Mauelshagen <hjm@redhat.com>");
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/md/dm-round-robin.c linux-2.6.27.19-5.1/drivers/md/dm-round-robin.c
---- linux-2.6.27/drivers/md/dm-round-robin.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-round-robin.c 2009-03-25 16:11:23.000000000 +0000
-@@ -160,7 +160,7 @@ static int rr_reinstate_path(struct path
+diff -r 9608d5473017 drivers/md/dm-round-robin.c
+--- a/drivers/md/dm-round-robin.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-round-robin.c Wed May 06 16:56:20 2009 +0100
+@@ -160,7 +160,7 @@
}
static struct dm_path *rr_select_path(struct path_selector *ps,
{
struct selector *s = (struct selector *) ps->context;
struct path_info *pi = NULL;
-diff -purN linux-2.6.27/drivers/md/dm-service-time.c linux-2.6.27.19-5.1/drivers/md/dm-service-time.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-service-time.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-service-time.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-service-time.c Wed May 06 16:56:20 2009 +0100
@@ -0,0 +1,312 @@
+/*
+ * Copyright (C) 2007-2008 NEC Corporation. All Rights Reserved.
+MODULE_DESCRIPTION(DM_NAME " throughput oriented path selector");
+MODULE_AUTHOR("Kiyoshi Ueda <k-ueda@ct.jp.nec.com>");
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/md/dm-snap.c linux-2.6.27.19-5.1/drivers/md/dm-snap.c
---- linux-2.6.27/drivers/md/dm-snap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-snap.c 2009-03-25 16:11:23.000000000 +0000
-@@ -824,8 +824,10 @@ static struct bio *put_pending_exception
+diff -r 9608d5473017 drivers/md/dm-snap.c
+--- a/drivers/md/dm-snap.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-snap.c Wed May 06 16:56:20 2009 +0100
+@@ -824,8 +824,10 @@
* the bios for the original write to the origin.
*/
if (primary_pe &&
/*
* Free the pe if it's not linked to an origin write or if
-@@ -834,12 +836,6 @@ static struct bio *put_pending_exception
+@@ -833,12 +835,6 @@
+ */
if (!primary_pe || primary_pe != pe)
free_pending_exception(pe);
-
+-
- /*
- * Free the primary pe if nothing references it.
- */
- if (primary_pe && !atomic_read(&primary_pe->ref_count))
- free_pending_exception(primary_pe);
--
+
return origin_bios;
}
-
-diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-table.c
---- linux-2.6.27/drivers/md/dm-table.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-table.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-table.c
+--- a/drivers/md/dm-table.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-table.c Wed May 06 16:56:20 2009 +0100
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001 Sistina Software (UK) Limited.
#include <asm/atomic.h>
#define DM_MSG_PREFIX "table"
-@@ -24,6 +25,19 @@
+@@ -23,6 +24,19 @@
+ #define NODE_SIZE L1_CACHE_BYTES
#define KEYS_PER_NODE (NODE_SIZE / sizeof(sector_t))
#define CHILDREN_PER_NODE (KEYS_PER_NODE + 1)
-
++
+/*
+ * The table has always exactly one reference from either mapped_device->map
+ * or hash_cell->new_map. This reference is not counted in table->holders.
+ * When the table is about to be destroyed, we wait for table->holders to
+ * drop to zero.
+ */
-+
+
struct dm_table {
struct mapped_device *md;
- atomic_t holders;
-@@ -38,6 +52,9 @@ struct dm_table {
+@@ -37,6 +51,9 @@
+ unsigned int num_allocated;
sector_t *highs;
struct dm_target *targets;
-
++
+ unsigned single_device : 1;
+ unsigned barrier_supported : 1;
-+
+
/*
* Indicates the rw permissions for the new logical
- * device. This should be a combination of FMODE_READ
-@@ -108,6 +125,8 @@ static void combine_restrictions_low(str
+@@ -108,6 +125,8 @@
lhs->bounce_pfn = min_not_zero(lhs->bounce_pfn, rhs->bounce_pfn);
lhs->no_cluster |= rhs->no_cluster;
}
/*
-@@ -226,7 +245,7 @@ int dm_table_create(struct dm_table **re
+@@ -226,7 +245,7 @@
return -ENOMEM;
INIT_LIST_HEAD(&t->devices);
if (!num_targets)
num_targets = KEYS_PER_NODE;
-@@ -255,10 +274,14 @@ static void free_devices(struct list_hea
+@@ -255,9 +274,13 @@
}
}
+void dm_table_destroy(struct dm_table *t)
{
unsigned int i;
-
++
+ while (atomic_read(&t->holders))
+ msleep(1);
+ smp_mb();
-+
+
/* free the indexes (see dm_table_complete) */
if (t->depth >= 2)
- vfree(t->index[t->depth - 2]);
-@@ -296,8 +319,8 @@ void dm_table_put(struct dm_table *t)
+@@ -296,8 +319,8 @@
if (!t)
return;
}
/*
-@@ -400,9 +423,13 @@ static int upgrade_mode(struct dm_dev *d
+@@ -400,9 +423,13 @@
dd_copy = *dd;
if (!r)
close_dev(&dd_copy, md);
else
-@@ -446,17 +473,25 @@ static int __table_get_device(struct dm_
+@@ -446,17 +473,25 @@
dd->mode = mode;
dd->bdev = NULL;
kfree(dd);
return r;
}
-
++
+ if (dd->mode != mode)
+ t->mode = dd->mode;
-+
+
format_dev_t(dd->name, dev);
atomic_set(&dd->count, 0);
r = upgrade_mode(dd, mode, t->md);
if (r)
return r;
-@@ -522,18 +557,29 @@ void dm_set_device_limits(struct dm_targ
+@@ -522,17 +557,28 @@
rs->bounce_pfn = min_not_zero(rs->bounce_pfn, q->bounce_pfn);
rs->no_cluster |= !test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags);
if (!r)
dm_set_device_limits(ti, (*result)->bdev);
-
++
+ if (!r) {
+ /* Only got single device? */
+ if (t->devices.next->next == &t->devices)
+ else
+ t->single_device = 0;
+ }
-+
+
return r;
}
-
-@@ -542,6 +588,9 @@ int dm_get_device(struct dm_target *ti,
+@@ -542,6 +588,9 @@
*/
void dm_put_device(struct dm_target *ti, struct dm_dev *dd)
{
if (atomic_dec_and_test(&dd->count)) {
close_dev(dd, ti->table->md);
list_del(&dd->list);
-@@ -663,7 +712,7 @@ static void check_for_valid_limits(struc
+@@ -663,7 +712,7 @@
if (!rs->max_segment_size)
rs->max_segment_size = MAX_SEGMENT_SIZE;
if (!rs->seg_boundary_mask)
if (!rs->bounce_pfn)
rs->bounce_pfn = -1;
}
-@@ -731,6 +780,66 @@ int dm_table_add_target(struct dm_table
+@@ -729,6 +778,66 @@
+ DMERR("%s: %s: %s", dm_device_name(t->md), type, tgt->error);
+ dm_put_target_type(tgt->type);
return r;
- }
-
++}
++
+int dm_table_set_type(struct dm_table *t)
+{
+ int i;
+int dm_table_request_based(struct dm_table *t)
+{
+ return dm_table_get_type(t) == DM_TYPE_REQUEST_BASED;
-+}
-+
+ }
+
static int setup_indexes(struct dm_table *t)
- {
- int i;
-@@ -861,6 +970,47 @@ void dm_table_set_restrictions(struct dm
+@@ -861,6 +970,47 @@
else
queue_flag_set_unlocked(QUEUE_FLAG_CLUSTER, q);
}
unsigned int dm_table_get_num_targets(struct dm_table *t)
-@@ -949,6 +1099,20 @@ int dm_table_any_congested(struct dm_tab
+@@ -949,6 +1099,20 @@
return r;
}
void dm_table_unplug_all(struct dm_table *t)
{
struct dm_dev *dd;
-@@ -968,6 +1132,16 @@ struct mapped_device *dm_table_get_md(st
+@@ -968,6 +1132,16 @@
return t->md;
}
EXPORT_SYMBOL(dm_vcalloc);
EXPORT_SYMBOL(dm_get_device);
EXPORT_SYMBOL(dm_put_device);
-@@ -978,3 +1152,5 @@ EXPORT_SYMBOL(dm_table_get_md);
+@@ -978,3 +1152,5 @@
EXPORT_SYMBOL(dm_table_put);
EXPORT_SYMBOL(dm_table_get);
EXPORT_SYMBOL(dm_table_unplug_all);
+EXPORT_SYMBOL(dm_table_barrier_ok);
+EXPORT_SYMBOL(dm_table_support_barrier);
-diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
---- linux-2.6.27/drivers/md/dm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm.c 2009-03-25 16:11:23.000000000 +0000
-@@ -32,6 +32,7 @@ static unsigned int _major = 0;
+diff -r 9608d5473017 drivers/md/dm.c
+--- a/drivers/md/dm.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm.c Wed May 06 16:56:20 2009 +0100
+@@ -32,6 +32,7 @@
static DEFINE_SPINLOCK(_minor_lock);
/*
* One of these is allocated per bio.
*/
struct dm_io {
-@@ -43,6 +44,7 @@ struct dm_io {
+@@ -43,6 +44,7 @@
};
/*
* One of these is allocated per target within a bio. Hopefully
* this will be simplified out one day.
*/
-@@ -52,6 +54,31 @@ struct dm_target_io {
+@@ -52,12 +54,45 @@
union map_info info;
};
union map_info *dm_get_mapinfo(struct bio *bio)
{
if (bio && bio->bi_private)
-@@ -59,6 +86,14 @@ union map_info *dm_get_mapinfo(struct bi
+ return &((struct dm_target_io *)bio->bi_private)->info;
return NULL;
}
-
++
+union map_info *dm_get_rq_mapinfo(struct request *rq)
+{
+ if (rq && rq->end_io_data)
+ return NULL;
+}
+EXPORT_SYMBOL_GPL(dm_get_rq_mapinfo);
-+
+
#define MINOR_ALLOCED ((void *)-1)
- /*
-@@ -76,7 +111,6 @@ union map_info *dm_get_mapinfo(struct bi
+@@ -76,7 +111,6 @@
*/
struct dm_wq_req {
enum {
DM_WQ_FLUSH_DEFERRED,
} type;
struct work_struct work;
-@@ -126,6 +160,8 @@ struct mapped_device {
+@@ -126,6 +160,8 @@
struct bio_set *bs;
/*
* Event handling.
*/
-@@ -143,52 +179,74 @@ struct mapped_device {
+@@ -143,52 +179,74 @@
/* forced geometry settings */
struct hd_geometry geometry;
kmem_cache_destroy(_tio_cache);
kmem_cache_destroy(_io_cache);
unregister_blkdev(_major, _name);
-@@ -252,16 +310,25 @@ static void __exit dm_exit(void)
+@@ -252,16 +310,25 @@
static int dm_blk_open(struct inode *inode, struct file *file)
{
struct mapped_device *md;
goto out;
}
-@@ -271,7 +338,7 @@ static int dm_blk_open(struct inode *ino
+@@ -271,7 +338,7 @@
out:
spin_unlock(&_minor_lock);
}
static int dm_blk_close(struct inode *inode, struct file *file)
-@@ -333,19 +400,25 @@ static int dm_blk_ioctl(struct inode *in
+@@ -333,19 +400,25 @@
if (!map || !dm_table_get_size(map))
goto out;
out:
dm_table_put(map);
-@@ -374,6 +447,28 @@ static void free_tio(struct mapped_devic
+@@ -372,6 +445,28 @@
+ static void free_tio(struct mapped_device *md, struct dm_target_io *tio)
+ {
mempool_free(tio, md->tio_pool);
- }
-
++}
++
+static inline struct dm_rq_target_io *alloc_rq_tio(struct mapped_device *md)
+{
+ return mempool_alloc(md->tio_pool, GFP_ATOMIC);
+ struct dm_clone_bio_info *info)
+{
+ mempool_free(info, md->io_pool);
-+}
-+
+ }
+
static void start_io_acct(struct dm_io *io)
- {
- struct mapped_device *md = io->md;
-@@ -430,12 +525,13 @@ static int queue_io(struct mapped_device
+@@ -430,12 +525,13 @@
struct dm_table *dm_get_table(struct mapped_device *md)
{
struct dm_table *t;
return t;
}
-@@ -562,6 +658,265 @@ static void clone_endio(struct bio *bio,
+@@ -562,6 +658,265 @@
free_tio(md, tio);
}
static sector_t max_io_len(struct mapped_device *md,
sector_t sector, struct dm_target *ti)
{
-@@ -667,6 +1022,13 @@ static struct bio *split_bvec(struct bio
+@@ -667,6 +1022,13 @@
clone->bi_size = to_bytes(len);
clone->bi_io_vec->bv_offset = offset;
clone->bi_io_vec->bv_len = clone->bi_size;
return clone;
}
-@@ -689,6 +1051,14 @@ static struct bio *clone_bio(struct bio
+@@ -688,6 +1050,14 @@
+ clone->bi_vcnt = idx + bv_count;
clone->bi_size = to_bytes(len);
clone->bi_flags &= ~(1 << BIO_SEG_VALID);
-
++
+ if (bio_integrity(bio)) {
+ bio_integrity_clone(clone, bio, GFP_NOIO, bs);
+
+ bio_integrity_trim(clone,
+ bio_sector_offset(bio, idx, 0), len);
+ }
-+
+
return clone;
}
-
-@@ -803,7 +1173,11 @@ static int __split_bio(struct mapped_dev
+@@ -803,7 +1173,11 @@
ci.map = dm_get_table(md);
if (unlikely(!ci.map))
return -EIO;
ci.md = md;
ci.bio = bio;
ci.io = alloc_io(md);
-@@ -880,21 +1254,12 @@ out:
+@@ -880,20 +1254,11 @@
* The request function that just remaps the bio built up by
* dm_merge_bvec.
*/
int r = -EIO;
int rw = bio_data_dir(bio);
struct mapped_device *md = q->queuedata;
-
+-
- /*
- * There is no use in forwarding any barrier request since we can't
- * guarantee it is (or can be) handled by the targets correctly.
- bio_endio(bio, -EOPNOTSUPP);
- return 0;
- }
--
+
down_read(&md->io_lock);
- disk_stat_inc(dm_disk(md), ios[rw]);
-@@ -930,12 +1295,349 @@ out_req:
+@@ -930,12 +1295,349 @@
return 0;
}
dm_table_unplug_all(map);
dm_table_put(map);
}
-@@ -943,16 +1645,26 @@ static void dm_unplug_all(struct request
+@@ -943,16 +1645,26 @@
static int dm_any_congested(void *congested_data, int bdi_bits)
{
struct mapped_device *md = (struct mapped_device *) congested_data;
- struct dm_table *map = dm_get_table(md);
+ struct dm_table *map;
-+
+
+- if (!map || test_bit(DMF_BLOCK_IO, &md->flags))
+- r = bdi_bits;
+- else
+- r = dm_table_any_congested(map, bdi_bits);
+ if (!test_bit(DMF_BLOCK_IO, &md->flags)) {
+ map = dm_get_table(md);
+ if (map) {
+ }
+ }
-- if (!map || test_bit(DMF_BLOCK_IO, &md->flags))
-- r = bdi_bits;
-- else
-- r = dm_table_any_congested(map, bdi_bits);
-
- dm_table_put(map);
++
return r;
}
-@@ -1069,10 +1781,22 @@ static struct mapped_device *alloc_dev(i
+@@ -1069,10 +1781,22 @@
INIT_LIST_HEAD(&md->uevent_list);
spin_lock_init(&md->uevent_lock);
md->queue->queuedata = md;
md->queue->backing_dev_info.congested_fn = dm_any_congested;
md->queue->backing_dev_info.congested_data = md;
-@@ -1080,18 +1804,9 @@ static struct mapped_device *alloc_dev(i
+@@ -1080,18 +1804,9 @@
blk_queue_bounce_limit(md->queue, BLK_BOUNCE_ANY);
md->queue->unplug_fn = dm_unplug_all;
blk_queue_merge_bvec(md->queue, dm_merge_bvec);
md->disk = alloc_disk(1);
if (!md->disk)
-@@ -1126,12 +1841,6 @@ static struct mapped_device *alloc_dev(i
+@@ -1126,12 +1841,6 @@
bad_thread:
put_disk(md->disk);
bad_disk:
blk_cleanup_queue(md->queue);
bad_queue:
free_minor(minor);
-@@ -1153,9 +1862,13 @@ static void free_dev(struct mapped_devic
+@@ -1153,9 +1862,13 @@
bdput(md->suspended_bdev);
}
destroy_workqueue(md->wq);
del_gendisk(md->disk);
free_minor(minor);
-@@ -1201,6 +1914,7 @@ static int __bind(struct mapped_device *
+@@ -1201,6 +1914,7 @@
{
struct request_queue *q = md->queue;
sector_t size;
size = dm_table_get_size(t);
-@@ -1212,16 +1926,34 @@ static int __bind(struct mapped_device *
+@@ -1212,16 +1926,34 @@
if (md->suspended_bdev)
__set_size(md, size);
return 0;
}
-@@ -1229,15 +1961,16 @@ static int __bind(struct mapped_device *
+@@ -1229,15 +1961,16 @@
static void __unbind(struct mapped_device *md)
{
struct dm_table *map = md->map;
}
/*
-@@ -1325,8 +2058,8 @@ void dm_put(struct mapped_device *md)
+@@ -1325,8 +2058,8 @@
dm_table_presuspend_targets(map);
dm_table_postsuspend_targets(map);
}
-- __unbind(md);
- dm_table_put(map);
-+ __unbind(md);
++ dm_table_put(map);
+ __unbind(md);
+- dm_table_put(map);
free_dev(md);
}
}
-@@ -1340,7 +2073,11 @@ static int dm_wait_for_completion(struct
+@@ -1340,7 +2073,11 @@
set_current_state(TASK_INTERRUPTIBLE);
smp_mb();
break;
if (signal_pending(current)) {
-@@ -1363,7 +2100,13 @@ static void __flush_deferred_io(struct m
+@@ -1363,7 +2100,13 @@
struct bio *c;
while ((c = bio_list_pop(&md->deferred))) {
bio_io_error(c);
}
-@@ -1388,9 +2131,6 @@ static void dm_wq_work(struct work_struc
+@@ -1388,9 +2131,6 @@
down_write(&md->io_lock);
switch (req->type) {
case DM_WQ_FLUSH_DEFERRED:
__flush_deferred_io(md);
break;
-@@ -1445,6 +2185,88 @@ out:
+@@ -1443,6 +2183,88 @@
+ out:
+ mutex_unlock(&md->suspend_lock);
return r;
- }
-
++}
++
+static inline void dm_invalidate_flush_suspend(struct mapped_device *md)
+{
+ md->suspend_rq.data = (void *)0x1;
+ /* Now no user of the suspend_rq */
+ blk_rq_init(q, rq);
+ blk_insert_request(q, rq, 0, NULL);
-+}
-+
+ }
+
/*
- * Functions to lock and unlock any filesystem running on the
- * device.
-@@ -1520,7 +2342,7 @@ int dm_suspend(struct mapped_device *md,
+@@ -1520,7 +2342,7 @@
if (!md->suspended_bdev) {
DMWARN("bdget failed in dm_suspend");
r = -ENOMEM;
}
/*
-@@ -1543,6 +2365,9 @@ int dm_suspend(struct mapped_device *md,
+@@ -1543,6 +2365,9 @@
add_wait_queue(&md->wait, &wait);
up_write(&md->io_lock);
/* unplug */
if (map)
dm_table_unplug_all(map);
-@@ -1555,14 +2380,22 @@ int dm_suspend(struct mapped_device *md,
+@@ -1555,13 +2380,21 @@
down_write(&md->io_lock);
remove_wait_queue(&md->wait, &wait);
/* were we interrupted ? */
if (r < 0) {
dm_queue_flush(md, DM_WQ_FLUSH_DEFERRED, NULL);
-
++
+ if (dm_request_based(md))
+ dm_abort_suspend(md, noflush);
-+
+
unlock_fs(md);
goto out; /* pushback list is already flushed, so skip flush */
- }
-@@ -1571,14 +2404,6 @@ int dm_suspend(struct mapped_device *md,
+@@ -1570,14 +2403,6 @@
+ dm_table_postsuspend_targets(map);
set_bit(DMF_SUSPENDED, &md->flags);
-
+-
-flush_and_out:
- if (r && noflush)
- /*
- * flush them before return.
- */
- dm_queue_flush(md, DM_WQ_FLUSH_ALL, NULL);
--
+
out:
if (r && md->suspended_bdev) {
- bdput(md->suspended_bdev);
-@@ -1611,6 +2436,14 @@ int dm_resume(struct mapped_device *md)
+@@ -1610,6 +2435,14 @@
+ goto out;
dm_queue_flush(md, DM_WQ_FLUSH_DEFERRED, NULL);
-
++
+ /*
+ * Flushing deferred I/Os must be done after targets are resumed
+ * so that mapping of targets can work correctly.
+ */
+ if (dm_request_based(md))
+ start_queue(md->queue);
-+
+
unlock_fs(md);
- if (md->suspended_bdev) {
-@@ -1674,6 +2507,7 @@ struct gendisk *dm_disk(struct mapped_de
+@@ -1674,6 +2507,7 @@
{
return md->disk;
}
int dm_suspended(struct mapped_device *md)
{
-@@ -1691,6 +2525,65 @@ int dm_noflush_suspending(struct dm_targ
+@@ -1690,6 +2524,65 @@
+ return r;
}
EXPORT_SYMBOL_GPL(dm_noflush_suspending);
-
++
+int dm_init_md_mempool(struct mapped_device *md, int type)
+{
+ if (unlikely(type == DM_TYPE_NONE)) {
+
+ return -ENOMEM;
+}
-+
+
static struct block_device_operations dm_blk_dops = {
.open = dm_blk_open,
- .release = dm_blk_close,
-diff -purN linux-2.6.27/drivers/md/dm.h linux-2.6.27.19-5.1/drivers/md/dm.h
---- linux-2.6.27/drivers/md/dm.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm.h 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm.h
+--- a/drivers/md/dm.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm.h Wed May 06 16:56:20 2009 +0100
@@ -23,6 +23,13 @@
#define DM_SUSPEND_NOFLUSH_FLAG (1 << 1)
* List of devices that a metadevice uses and should open/close.
*/
struct dm_dev {
-@@ -39,22 +46,30 @@ struct dm_table;
+@@ -39,22 +46,30 @@
/*-----------------------------------------------------------------
* Internal table functions.
*---------------------------------------------------------------*/
/*-----------------------------------------------------------------
* A registry of target types.
-@@ -97,10 +112,16 @@ void *dm_vcalloc(unsigned long nmemb, un
+@@ -97,10 +112,16 @@
union map_info *dm_get_mapinfo(struct bio *bio);
int dm_open_count(struct mapped_device *md);
int dm_lock_for_deletion(struct mapped_device *md);
+int dm_init_md_mempool(struct mapped_device *md, int type);
+
#endif
-diff -purN linux-2.6.27/drivers/md/linear.c linux-2.6.27.19-5.1/drivers/md/linear.c
---- linux-2.6.27/drivers/md/linear.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/linear.c 2009-03-25 16:11:23.000000000 +0000
-@@ -157,6 +157,8 @@ static linear_conf_t *linear_conf(mddev_
+diff -r 9608d5473017 drivers/md/linear.c
+--- a/drivers/md/linear.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/linear.c Wed May 06 16:56:20 2009 +0100
+@@ -157,6 +157,8 @@
min_spacing = conf->array_sectors / 2;
sector_div(min_spacing, PAGE_SIZE/sizeof(struct dev_info *));
/* min_spacing is the minimum spacing that will fit the hash
* table in one PAGE. This may be much smaller than needed.
-diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
---- linux-2.6.27/drivers/md/md.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/md.c 2009-03-25 16:11:23.000000000 +0000
-@@ -1411,6 +1411,38 @@ static int match_mddev_units(mddev_t *md
+diff -r 9608d5473017 drivers/md/md.c
+--- a/drivers/md/md.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/md.c Wed May 06 16:56:20 2009 +0100
+@@ -1411,6 +1411,38 @@
static LIST_HEAD(pending_raid_disks);
static int bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev)
{
char b[BDEVNAME_SIZE];
-@@ -1454,6 +1486,11 @@ static int bind_rdev_to_array(mdk_rdev_t
+@@ -1454,6 +1486,11 @@
if (find_rdev_nr(mddev, rdev->desc_nr))
return -EBUSY;
}
bdevname(rdev->bdev,b);
while ( (s=strchr(b, '/')) != NULL)
*s = '!';
-@@ -1474,6 +1511,7 @@ static int bind_rdev_to_array(mdk_rdev_t
+@@ -1474,6 +1511,7 @@
}
list_add_rcu(&rdev->same_set, &mddev->disks);
bd_claim_by_disk(rdev->bdev, rdev->bdev->bd_holder, mddev->gendisk);
return 0;
fail:
-@@ -2109,8 +2147,6 @@ rdev_size_store(mdk_rdev_t *rdev, const
+@@ -2109,8 +2147,6 @@
if (strict_strtoull(buf, 10, &size) < 0)
return -EINVAL;
if (my_mddev->pers && rdev->raid_disk >= 0) {
if (my_mddev->persistent) {
size = super_types[my_mddev->major_version].
-@@ -2121,9 +2157,9 @@ rdev_size_store(mdk_rdev_t *rdev, const
+@@ -2121,9 +2157,9 @@
size = (rdev->bdev->bd_inode->i_size >> 10);
size -= rdev->data_offset/2;
}
- if (size < my_mddev->size)
- return -EINVAL; /* component must fit device */
- }
+- }
++ }
+ if (size < my_mddev->size)
+ return -EINVAL; /* component must fit device */
rdev->size = size;
if (size > oldsize && my_mddev->external) {
-@@ -2364,6 +2400,15 @@ static void analyze_sbs(mddev_t * mddev)
+@@ -2364,6 +2400,15 @@
i = 0;
rdev_for_each(rdev, tmp, mddev) {
if (rdev != freshest)
if (super_types[mddev->major_version].
validate_super(mddev, rdev)) {
-@@ -2730,9 +2775,9 @@ array_state_store(mddev_t *mddev, const
+@@ -2730,9 +2775,9 @@
break;
case read_auto:
if (mddev->pers) {
err = restart_array(mddev);
if (err == 0) {
mddev->ro = 2;
-@@ -2948,7 +2993,13 @@ metadata_store(mddev_t *mddev, const cha
+@@ -2948,7 +2993,13 @@
{
int major, minor;
char *e;
return -EBUSY;
if (cmd_match(buf, "none")) {
-@@ -3023,7 +3074,7 @@ action_store(mddev_t *mddev, const char
+@@ -3023,7 +3074,7 @@
set_bit(MD_RECOVERY_INTR, &mddev->recovery);
md_unregister_thread(mddev->sync_thread);
mddev->sync_thread = NULL;
}
} else if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) ||
test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))
-@@ -3537,9 +3588,14 @@ static int do_md_run(mddev_t * mddev)
+@@ -3537,9 +3588,14 @@
return -EINVAL;
}
if (chunk_size < PAGE_SIZE) {
}
/* devices must have minimum size of one chunk */
-@@ -3946,10 +4002,13 @@ static int do_md_stop(mddev_t * mddev, i
+@@ -3946,10 +4002,13 @@
mddev->barriers_work = 0;
mddev->safemode = 0;
md_new_event(mddev);
sysfs_notify(&mddev->kobj, NULL, "array_state");
out:
-@@ -4452,13 +4511,6 @@ static int hot_add_disk(mddev_t * mddev,
+@@ -4452,13 +4511,6 @@
* noticed in interrupt contexts ...
*/
rdev->raid_disk = -1;
md_update_sb(mddev, 1);
-@@ -4472,9 +4524,6 @@ static int hot_add_disk(mddev_t * mddev,
+@@ -4472,9 +4524,6 @@
md_new_event(mddev);
return 0;
abort_export:
export_rdev(rdev);
return err;
-@@ -4487,7 +4536,7 @@ static int set_bitmap_file(mddev_t *mdde
+@@ -4487,7 +4536,7 @@
if (mddev->pers) {
if (!mddev->pers->quiesce)
return -EBUSY;
return -EBUSY;
/* we should be able to change the bitmap.. */
}
-@@ -4742,7 +4791,7 @@ static int update_array_info(mddev_t *md
+@@ -4742,7 +4791,7 @@
if ((state ^ info->state) & (1<<MD_SB_BITMAP_PRESENT)) {
if (mddev->pers->quiesce == NULL)
return -EINVAL;
return -EBUSY;
if (info->state & (1<<MD_SB_BITMAP_PRESENT)) {
/* add the bitmap */
-@@ -6007,7 +6056,8 @@ static int remove_and_add_spares(mddev_t
+@@ -6007,7 +6056,8 @@
}
}
rdev_for_each(rdev, rtmp, mddev) {
if (rdev->raid_disk >= 0 &&
!test_bit(In_sync, &rdev->flags) &&
-@@ -6159,7 +6209,7 @@ void md_check_recovery(mddev_t *mddev)
+@@ -6159,7 +6209,7 @@
rdev_for_each(rdev, rtmp, mddev)
rdev->saved_raid_disk = -1;
/* flag recovery needed just to double check */
set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
sysfs_notify(&mddev->kobj, NULL, "sync_action");
-@@ -6407,11 +6457,11 @@ static __exit void md_exit(void)
+@@ -6407,11 +6457,11 @@
subsys_initcall(md_init);
module_exit(md_exit)
{
char *e;
int num = simple_strtoul(val, &e, 10);
-diff -purN linux-2.6.27/drivers/md/multipath.c linux-2.6.27.19-5.1/drivers/md/multipath.c
---- linux-2.6.27/drivers/md/multipath.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/multipath.c 2009-03-25 16:11:23.000000000 +0000
-@@ -172,7 +172,7 @@ static int multipath_make_request (struc
+diff -r 9608d5473017 drivers/md/multipath.c
+--- a/drivers/md/multipath.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/multipath.c Wed May 06 16:56:20 2009 +0100
+@@ -172,7 +172,7 @@
mp_bh->bio = *bio;
mp_bh->bio.bi_sector += multipath->rdev->data_offset;
mp_bh->bio.bi_bdev = multipath->rdev->bdev;
mp_bh->bio.bi_end_io = multipath_end_request;
mp_bh->bio.bi_private = mp_bh;
generic_make_request(&mp_bh->bio);
-@@ -398,7 +398,7 @@ static void multipathd (mddev_t *mddev)
+@@ -398,7 +398,7 @@
*bio = *(mp_bh->master_bio);
bio->bi_sector += conf->multipaths[mp_bh->path].rdev->data_offset;
bio->bi_bdev = conf->multipaths[mp_bh->path].rdev->bdev;
bio->bi_end_io = multipath_end_request;
bio->bi_private = mp_bh;
generic_make_request(bio);
-diff -purN linux-2.6.27/drivers/md/raid1.c linux-2.6.27.19-5.1/drivers/md/raid1.c
---- linux-2.6.27/drivers/md/raid1.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/raid1.c 2009-03-25 16:11:23.000000000 +0000
-@@ -1012,12 +1012,16 @@ static void error(mddev_t *mddev, mdk_rd
+diff -r 9608d5473017 drivers/md/raid1.c
+--- a/drivers/md/raid1.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/raid1.c Wed May 06 16:56:20 2009 +0100
+@@ -1012,12 +1012,16 @@
* else mark the drive as failed
*/
if (test_bit(In_sync, &rdev->flags)
if (test_and_clear_bit(In_sync, &rdev->flags)) {
unsigned long flags;
spin_lock_irqsave(&conf->device_lock, flags);
-@@ -1302,9 +1306,6 @@ static void sync_request_write(mddev_t *
+@@ -1302,9 +1306,6 @@
sbio->bi_size = r1_bio->sectors << 9;
sbio->bi_idx = 0;
sbio->bi_phys_segments = 0;
sbio->bi_flags &= ~(BIO_POOL_MASK - 1);
sbio->bi_flags |= 1 << BIO_UPTODATE;
sbio->bi_next = NULL;
-@@ -1635,7 +1636,8 @@ static void raid1d(mddev_t *mddev)
+@@ -1635,7 +1636,8 @@
}
bio = r1_bio->bios[r1_bio->read_disk];
printk(KERN_ALERT "raid1: %s: unrecoverable I/O"
" read error for block %llu\n",
bdevname(bio->bi_bdev,b),
-@@ -1790,7 +1792,6 @@ static sector_t sync_request(mddev_t *md
+@@ -1790,7 +1792,6 @@
bio->bi_vcnt = 0;
bio->bi_idx = 0;
bio->bi_phys_segments = 0;
bio->bi_size = 0;
bio->bi_end_io = NULL;
bio->bi_private = NULL;
-diff -purN linux-2.6.27/drivers/md/raid10.c linux-2.6.27.19-5.1/drivers/md/raid10.c
---- linux-2.6.27/drivers/md/raid10.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/raid10.c 2009-03-25 16:11:23.000000000 +0000
-@@ -1132,7 +1132,7 @@ static int raid10_add_disk(mddev_t *mdde
+diff -r 9608d5473017 drivers/md/raid10.c
+--- a/drivers/md/raid10.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/raid10.c Wed May 06 16:56:20 2009 +0100
+@@ -1132,7 +1132,7 @@
if (!enough(conf))
return -EINVAL;
first = last = rdev->raid_disk;
if (rdev->saved_raid_disk >= 0 &&
-@@ -1345,9 +1345,6 @@ static void sync_request_write(mddev_t *
+@@ -1345,9 +1345,6 @@
tbio->bi_size = r10_bio->sectors << 9;
tbio->bi_idx = 0;
tbio->bi_phys_segments = 0;
tbio->bi_flags &= ~(BIO_POOL_MASK - 1);
tbio->bi_flags |= 1 << BIO_UPTODATE;
tbio->bi_next = NULL;
-@@ -1947,7 +1944,6 @@ static sector_t sync_request(mddev_t *md
+@@ -1947,7 +1944,6 @@
bio->bi_vcnt = 0;
bio->bi_idx = 0;
bio->bi_phys_segments = 0;
bio->bi_size = 0;
}
-diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.c
---- linux-2.6.27/drivers/md/raid5.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/raid5.c 2009-03-25 16:11:23.000000000 +0000
-@@ -101,6 +101,40 @@
+diff -r 9608d5473017 drivers/md/raid5.c
+--- a/drivers/md/raid5.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/raid5.c Wed May 06 16:56:20 2009 +0100
+@@ -100,6 +100,40 @@
+ /* In .bss so it's zeroed */
const char raid6_empty_zero_page[PAGE_SIZE] __attribute__((aligned(256)));
#endif
-
++
+/*
+ * We maintain a biased count of active stripes in the bottom 16 bits of
+ * bi_phys_segments, and a count of processed stripes in the upper 16 bits
+{
+ bio->bi_phys_segments = raid5_bi_phys_segments(bio) || (cnt << 16);
+}
-+
+
static inline int raid6_next_disk(int disk, int raid_disks)
{
- disk++;
-@@ -507,7 +541,7 @@ static void ops_complete_biofill(void *s
+@@ -507,7 +541,7 @@
while (rbi && rbi->bi_sector <
dev->sector + STRIPE_SECTORS) {
rbi2 = r5_next_bio(rbi, dev->sector);
rbi->bi_next = return_bi;
return_bi = rbi;
}
-@@ -1725,7 +1759,7 @@ static int add_stripe_bio(struct stripe_
+@@ -1725,7 +1759,7 @@
if (*bip)
bi->bi_next = *bip;
*bip = bi;
spin_unlock_irq(&conf->device_lock);
spin_unlock(&sh->lock);
-@@ -1819,7 +1853,7 @@ handle_failed_stripe(raid5_conf_t *conf,
+@@ -1819,7 +1853,7 @@
sh->dev[i].sector + STRIPE_SECTORS) {
struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector);
clear_bit(BIO_UPTODATE, &bi->bi_flags);
md_write_end(conf->mddev);
bi->bi_next = *return_bi;
*return_bi = bi;
-@@ -1834,7 +1868,7 @@ handle_failed_stripe(raid5_conf_t *conf,
+@@ -1834,7 +1868,7 @@
sh->dev[i].sector + STRIPE_SECTORS) {
struct bio *bi2 = r5_next_bio(bi, sh->dev[i].sector);
clear_bit(BIO_UPTODATE, &bi->bi_flags);
md_write_end(conf->mddev);
bi->bi_next = *return_bi;
*return_bi = bi;
-@@ -1858,7 +1892,7 @@ handle_failed_stripe(raid5_conf_t *conf,
+@@ -1858,7 +1892,7 @@
struct bio *nextbi =
r5_next_bio(bi, sh->dev[i].sector);
clear_bit(BIO_UPTODATE, &bi->bi_flags);
bi->bi_next = *return_bi;
*return_bi = bi;
}
-@@ -2033,7 +2067,7 @@ static void handle_stripe_clean_event(ra
+@@ -2033,7 +2067,7 @@
while (wbi && wbi->bi_sector <
dev->sector + STRIPE_SECTORS) {
wbi2 = r5_next_bio(wbi, dev->sector);
md_write_end(conf->mddev);
wbi->bi_next = *return_bi;
*return_bi = wbi;
-@@ -2814,7 +2848,7 @@ static bool handle_stripe6(struct stripe
+@@ -2814,7 +2848,7 @@
copy_data(0, rbi, dev->page, dev->sector);
rbi2 = r5_next_bio(rbi, dev->sector);
spin_lock_irq(&conf->device_lock);
rbi->bi_next = return_bi;
return_bi = rbi;
}
-@@ -3155,8 +3189,11 @@ static struct bio *remove_bio_from_retry
+@@ -3155,8 +3189,11 @@
if(bi) {
conf->retry_read_aligned_list = bi->bi_next;
bi->bi_next = NULL;
}
return bi;
-@@ -3206,8 +3243,7 @@ static int bio_fits_rdev(struct bio *bi)
+@@ -3206,8 +3243,7 @@
if ((bi->bi_size>>9) > q->max_sectors)
return 0;
blk_recount_segments(q, bi);
return 0;
if (q->merge_bvec_fn)
-@@ -3468,7 +3504,7 @@ static int make_request(struct request_q
+@@ -3468,7 +3504,7 @@
}
spin_lock_irq(&conf->device_lock);
spin_unlock_irq(&conf->device_lock);
if (remaining == 0) {
-@@ -3752,7 +3788,7 @@ static int retry_aligned_read(raid5_con
+@@ -3752,7 +3788,7 @@
sector += STRIPE_SECTORS,
scnt++) {
/* already done this stripe */
continue;
-@@ -3760,7 +3796,7 @@ static int retry_aligned_read(raid5_con
+@@ -3760,7 +3796,7 @@
if (!sh) {
/* failed to get a stripe - must wait */
conf->retry_read_aligned = raid_bio;
return handled;
}
-@@ -3768,7 +3804,7 @@ static int retry_aligned_read(raid5_con
+@@ -3768,7 +3804,7 @@
set_bit(R5_ReadError, &sh->dev[dd_idx].flags);
if (!add_stripe_bio(sh, raid_bio, dd_idx, 0)) {
release_stripe(sh);
conf->retry_read_aligned = raid_bio;
return handled;
}
-@@ -3778,7 +3814,7 @@ static int retry_aligned_read(raid5_con
+@@ -3778,7 +3814,7 @@
handled++;
}
spin_lock_irq(&conf->device_lock);
spin_unlock_irq(&conf->device_lock);
if (remaining == 0)
bio_endio(raid_bio, 0);
-diff -purN linux-2.6.27/drivers/media/dvb/frontends/s5h1411.c linux-2.6.27.19-5.1/drivers/media/dvb/frontends/s5h1411.c
---- linux-2.6.27/drivers/media/dvb/frontends/s5h1411.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/dvb/frontends/s5h1411.c 2009-03-25 16:11:25.000000000 +0000
-@@ -471,6 +471,20 @@ static int s5h1411_set_spectralinversion
+diff -r 9608d5473017 drivers/media/dvb/frontends/s5h1411.c
+--- a/drivers/media/dvb/frontends/s5h1411.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/dvb/frontends/s5h1411.c Wed May 06 16:56:20 2009 +0100
+@@ -471,6 +471,20 @@
return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0x24, val);
}
static int s5h1411_enable_modulation(struct dvb_frontend *fe,
fe_modulation_t m)
{
-@@ -535,7 +549,7 @@ static int s5h1411_set_gpio(struct dvb_f
+@@ -535,7 +549,7 @@
return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xe0, val);
}
{
struct s5h1411_state *state = fe->demodulator_priv;
-@@ -551,6 +565,11 @@ static int s5h1411_sleep(struct dvb_fron
- return 0;
- }
+@@ -549,6 +563,11 @@
+ }
+ return 0;
++}
++
+static int s5h1411_sleep(struct dvb_frontend *fe)
+{
+ return s5h1411_set_powerstate(fe, 1);
-+}
-+
+ }
+
static int s5h1411_register_reset(struct dvb_frontend *fe)
- {
- struct s5h1411_state *state = fe->demodulator_priv;
-@@ -574,9 +593,6 @@ static int s5h1411_set_frontend(struct d
+@@ -574,9 +593,6 @@
s5h1411_enable_modulation(fe, p->u.vsb.modulation);
if (fe->ops.tuner_ops.set_params) {
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);
-@@ -587,6 +603,10 @@ static int s5h1411_set_frontend(struct d
+@@ -586,6 +602,10 @@
+ if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);
}
-
++
+ /* Issue a reset to the demod so it knows to resync against the
+ newly tuned frequency */
+ s5h1411_softreset(fe);
-+
+
return 0;
}
-
-@@ -599,7 +619,7 @@ static int s5h1411_init(struct dvb_front
+@@ -599,7 +619,7 @@
dprintk("%s()\n", __func__);
s5h1411_register_reset(fe);
for (i = 0; i < ARRAY_SIZE(init_tab); i++)
-@@ -612,10 +632,10 @@ static int s5h1411_init(struct dvb_front
+@@ -612,10 +632,10 @@
if (state->config->output_mode == S5H1411_SERIAL_OUTPUT)
/* Serial */
s5h1411_set_spectralinversion(fe, state->config->inversion);
s5h1411_set_if_freq(fe, state->config->vsb_if);
-@@ -863,6 +883,7 @@ static struct dvb_frontend_ops s5h1411_o
+@@ -863,6 +883,7 @@
},
.init = s5h1411_init,
.i2c_gate_ctrl = s5h1411_i2c_gate_ctrl,
.set_frontend = s5h1411_set_frontend,
.get_frontend = s5h1411_get_frontend,
-diff -purN linux-2.6.27/drivers/media/dvb/siano/sms-cards.c linux-2.6.27.19-5.1/drivers/media/dvb/siano/sms-cards.c
---- linux-2.6.27/drivers/media/dvb/siano/sms-cards.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/dvb/siano/sms-cards.c 2009-03-25 16:11:25.000000000 +0000
-@@ -42,6 +42,10 @@ struct usb_device_id smsusb_id_table[] =
+diff -r 9608d5473017 drivers/media/dvb/siano/sms-cards.c
+--- a/drivers/media/dvb/siano/sms-cards.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/dvb/siano/sms-cards.c Wed May 06 16:56:21 2009 +0100
+@@ -41,6 +41,10 @@
+ { USB_DEVICE(0x2040, 0x5500),
.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
{ USB_DEVICE(0x2040, 0x5510),
- .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
++ .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
+ { USB_DEVICE(0x2040, 0x5520),
+ .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
+ { USB_DEVICE(0x2040, 0x5530),
-+ .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
+ .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
{ USB_DEVICE(0x2040, 0x5580),
.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
- { USB_DEVICE(0x2040, 0x5590),
-diff -purN linux-2.6.27/drivers/media/video/au0828/au0828-cards.c linux-2.6.27.19-5.1/drivers/media/video/au0828/au0828-cards.c
---- linux-2.6.27/drivers/media/video/au0828/au0828-cards.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/video/au0828/au0828-cards.c 2009-03-25 16:11:27.000000000 +0000
-@@ -90,6 +90,7 @@ static void hauppauge_eeprom(struct au08
+diff -r 9608d5473017 drivers/media/video/au0828/au0828-cards.c
+--- a/drivers/media/video/au0828/au0828-cards.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/video/au0828/au0828-cards.c Wed May 06 16:56:21 2009 +0100
+@@ -90,6 +90,7 @@
case 72221: /* WinTV-HVR950q (OEM, IR, ATSC/QAM and basic analog video */
case 72231: /* WinTV-HVR950q (OEM, IR, ATSC/QAM and basic analog video */
case 72241: /* WinTV-HVR950q (OEM, No IR, ATSC/QAM and basic analog video */
case 72301: /* WinTV-HVR850 (Retail, IR, ATSC and basic analog video */
case 72500: /* WinTV-HVR950q (OEM, No IR, ATSC/QAM */
break;
-@@ -198,6 +199,8 @@ struct usb_device_id au0828_usb_id_table
+@@ -198,6 +199,8 @@
.driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
{ USB_DEVICE(0x2040, 0x721b),
.driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
{ USB_DEVICE(0x2040, 0x721f),
.driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
{ USB_DEVICE(0x2040, 0x7280),
-diff -purN linux-2.6.27/drivers/media/video/compat_ioctl32.c linux-2.6.27.19-5.1/drivers/media/video/compat_ioctl32.c
---- linux-2.6.27/drivers/media/video/compat_ioctl32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/video/compat_ioctl32.c 2009-03-25 16:11:26.000000000 +0000
-@@ -867,6 +867,7 @@ long v4l_compat_ioctl32(struct file *fil
+diff -r 9608d5473017 drivers/media/video/compat_ioctl32.c
+--- a/drivers/media/video/compat_ioctl32.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/video/compat_ioctl32.c Wed May 06 16:56:21 2009 +0100
+@@ -867,6 +867,7 @@
case VIDIOC_STREAMON32:
case VIDIOC_STREAMOFF32:
case VIDIOC_G_PARM:
case VIDIOC_G_STD:
case VIDIOC_S_STD:
case VIDIOC_G_TUNER:
-@@ -885,6 +886,8 @@ long v4l_compat_ioctl32(struct file *fil
+@@ -885,6 +886,8 @@
case VIDIOC_S_INPUT32:
case VIDIOC_TRY_FMT32:
case VIDIOC_S_HW_FREQ_SEEK:
ret = do_video_ioctl(file, cmd, arg);
break;
-diff -purN linux-2.6.27/drivers/media/video/pvrusb2/pvrusb2-encoder.c linux-2.6.27.19-5.1/drivers/media/video/pvrusb2/pvrusb2-encoder.c
---- linux-2.6.27/drivers/media/video/pvrusb2/pvrusb2-encoder.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/video/pvrusb2/pvrusb2-encoder.c 2009-03-25 16:11:25.000000000 +0000
-@@ -402,6 +402,10 @@ static int pvr2_encoder_prep_config(stru
+diff -r 9608d5473017 drivers/media/video/pvrusb2/pvrusb2-encoder.c
+--- a/drivers/media/video/pvrusb2/pvrusb2-encoder.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/video/pvrusb2/pvrusb2-encoder.c Wed May 06 16:56:21 2009 +0100
+@@ -402,6 +402,10 @@
ret |= pvr2_encoder_vcmd(hdw, CX2341X_ENC_MISC,4, 0,3,0,0);
ret |= pvr2_encoder_vcmd(hdw, CX2341X_ENC_MISC,4,15,0,0,0);
return ret;
}
-diff -purN linux-2.6.27/drivers/media/video/pvrusb2/pvrusb2-hdw.c linux-2.6.27.19-5.1/drivers/media/video/pvrusb2/pvrusb2-hdw.c
---- linux-2.6.27/drivers/media/video/pvrusb2/pvrusb2-hdw.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/video/pvrusb2/pvrusb2-hdw.c 2009-03-25 16:11:25.000000000 +0000
-@@ -60,7 +60,6 @@ static struct pvr2_hdw *unit_pointers[PV
+diff -r 9608d5473017 drivers/media/video/pvrusb2/pvrusb2-hdw.c
+--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c Wed May 06 16:56:21 2009 +0100
+@@ -60,7 +60,6 @@
static DEFINE_MUTEX(pvr2_unit_mtx);
static int ctlchg;
static int procreload;
static int tuner[PVR_NUM] = { [0 ... PVR_NUM-1] = -1 };
static int tolerance[PVR_NUM] = { [0 ... PVR_NUM-1] = 0 };
-@@ -71,8 +70,6 @@ module_param(ctlchg, int, S_IRUGO|S_IWUS
+@@ -71,8 +70,6 @@
MODULE_PARM_DESC(ctlchg, "0=optimize ctl change 1=always accept new ctl value");
module_param(init_pause_msec, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(init_pause_msec, "hardware initialization settling delay");
module_param(procreload, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(procreload,
"Attempt init failure recovery with firmware reload");
-@@ -1698,9 +1695,6 @@ static void pvr2_hdw_setup_low(struct pv
+@@ -1698,9 +1695,6 @@
}
hdw->fw1_state = FW1_STATE_OK;
if (!pvr2_hdw_dev_ok(hdw)) return;
for (idx = 0; idx < hdw->hdw_desc->client_modules.cnt; idx++) {
-diff -purN linux-2.6.27/drivers/media/video/saa7134/saa7134-core.c linux-2.6.27.19-5.1/drivers/media/video/saa7134/saa7134-core.c
---- linux-2.6.27/drivers/media/video/saa7134/saa7134-core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/video/saa7134/saa7134-core.c 2009-03-25 16:11:27.000000000 +0000
-@@ -965,7 +965,8 @@ static int __devinit saa7134_initdev(str
+diff -r 9608d5473017 drivers/media/video/saa7134/saa7134-core.c
+--- a/drivers/media/video/saa7134/saa7134-core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/video/saa7134/saa7134-core.c Wed May 06 16:56:21 2009 +0100
+@@ -965,7 +965,8 @@
dev->name,(unsigned long long)pci_resource_start(pci_dev,0));
goto fail1;
}
dev->bmmio = (__u8 __iomem *)dev->lmmio;
if (NULL == dev->lmmio) {
err = -EIO;
-diff -purN linux-2.6.27/drivers/media/video/tvaudio.c linux-2.6.27.19-5.1/drivers/media/video/tvaudio.c
---- linux-2.6.27/drivers/media/video/tvaudio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/video/tvaudio.c 2009-03-25 16:11:25.000000000 +0000
-@@ -152,7 +152,7 @@ static int chip_write(struct CHIPSTATE *
+diff -r 9608d5473017 drivers/media/video/tvaudio.c
+--- a/drivers/media/video/tvaudio.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/video/tvaudio.c Wed May 06 16:56:21 2009 +0100
+@@ -152,7 +152,7 @@
{
unsigned char buffer[2];
v4l_dbg(1, debug, chip->c, "%s: chip_write: 0x%x\n",
chip->c->name, val);
chip->shadow.bytes[1] = val;
-@@ -163,6 +163,13 @@ static int chip_write(struct CHIPSTATE *
+@@ -163,6 +163,13 @@
return -1;
}
} else {
v4l_dbg(1, debug, chip->c, "%s: chip_write: reg%d=0x%x\n",
chip->c->name, subaddr, val);
chip->shadow.bytes[subaddr+1] = val;
-@@ -177,12 +184,20 @@ static int chip_write(struct CHIPSTATE *
+@@ -177,12 +184,20 @@
return 0;
}
val = (chip->shadow.bytes[subaddr+1] & ~mask) | (val & mask);
}
}
-@@ -228,6 +243,15 @@ static int chip_cmd(struct CHIPSTATE *ch
+@@ -227,6 +242,15 @@
+
if (0 == cmd->count)
return 0;
-
++
+ if (cmd->count + cmd->bytes[0] - 1 >= ARRAY_SIZE(chip->shadow.bytes)) {
+ v4l_info(chip->c,
+ "Tried to access a non-existent register range: %d to %d\n",
+ }
+
+ /* FIXME: it seems that the shadow bytes are wrong bellow !*/
-+
+
/* update our shadow register set; print bytes if (debug > 0) */
v4l_dbg(1, debug, chip->c, "%s: chip_cmd(%s): reg=%d, data:",
- chip->c->name, name,cmd->bytes[0]);
-@@ -1576,13 +1600,13 @@ static int tvaudio_get_ctrl(struct CHIPS
+@@ -1576,13 +1600,13 @@
return 0;
}
case V4L2_CID_AUDIO_BASS:
ctrl->value = chip->treble;
return 0;
}
-@@ -1642,16 +1666,15 @@ static int tvaudio_set_ctrl(struct CHIPS
+@@ -1642,16 +1666,15 @@
return 0;
}
case V4L2_CID_AUDIO_BASS:
chip->treble = ctrl->value;
chip_write(chip,desc->treblereg,desc->treblefunc(chip->treble));
-@@ -1695,7 +1718,7 @@ static int chip_command(struct i2c_clien
+@@ -1695,7 +1718,7 @@
break;
case V4L2_CID_AUDIO_BASS:
case V4L2_CID_AUDIO_TREBLE:
return -EINVAL;
break;
default:
-@@ -1792,7 +1815,7 @@ static int chip_command(struct i2c_clien
+@@ -1792,7 +1815,7 @@
break;
case VIDIOC_S_FREQUENCY:
chip->mode = 0; /* automatic */
desc->setmode(chip,V4L2_TUNER_MODE_MONO);
if (chip->prevmode != V4L2_TUNER_MODE_MONO)
chip->prevmode = -1; /* reset previous mode */
-diff -purN linux-2.6.27/drivers/message/fusion/Kconfig linux-2.6.27.19-5.1/drivers/message/fusion/Kconfig
---- linux-2.6.27/drivers/message/fusion/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/Kconfig 2009-03-25 16:11:12.000000000 +0000
-@@ -61,13 +61,25 @@ config FUSION_SAS
+diff -r 9608d5473017 drivers/message/fusion/Kconfig
+--- a/drivers/message/fusion/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/Kconfig Wed May 06 16:56:21 2009 +0100
+@@ -61,13 +61,25 @@
LSISAS1078
config FUSION_MAX_SGE
Decreasing this parameter will reduce memory requirements
on a per controller instance.
-diff -purN linux-2.6.27/drivers/message/fusion/Makefile linux-2.6.27.19-5.1/drivers/message/fusion/Makefile
---- linux-2.6.27/drivers/message/fusion/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/Makefile 2009-03-25 16:11:12.000000000 +0000
-@@ -1,12 +1,17 @@
+diff -r 9608d5473017 drivers/message/fusion/Makefile
+--- a/drivers/message/fusion/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/Makefile Wed May 06 16:56:21 2009 +0100
+@@ -1,11 +1,16 @@
-# Fusion MPT drivers; recognized debug defines...
+#
+# LSI mpt fusion
# enable verbose logging
# CONFIG_FUSION_LOGGING needs to be enabled in Kconfig
#EXTRA_CFLAGS += -DMPT_DEBUG_VERBOSE
-
-
--#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC
-
+-#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC
+
obj-$(CONFIG_FUSION_SPI) += mptbase.o mptscsih.o mptspi.o
obj-$(CONFIG_FUSION_FC) += mptbase.o mptscsih.o mptfc.o
- obj-$(CONFIG_FUSION_SAS) += mptbase.o mptscsih.o mptsas.o
-diff -purN linux-2.6.27/drivers/message/fusion/csmi/csmisas.c linux-2.6.27.19-5.1/drivers/message/fusion/csmi/csmisas.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/csmi/csmisas.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/csmi/csmisas.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/message/fusion/csmi/csmisas.c Wed May 06 16:56:21 2009 +0100
@@ -0,0 +1,5882 @@
+/*
+ * linux/drivers/message/fusion/csmi/csmisas.c
+ free_pages((unsigned long)karg, memory_pages);
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/message/fusion/csmi/csmisas.h linux-2.6.27.19-5.1/drivers/message/fusion/csmi/csmisas.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/csmi/csmisas.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/csmi/csmisas.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/message/fusion/csmi/csmisas.h Wed May 06 16:56:21 2009 +0100
@@ -0,0 +1,1621 @@
+/**************************************************************************
+
+#pragma pack()
+
+#endif // _CSMI_SAS_H_
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi.h
+--- a/drivers/message/fusion/lsi/mpi.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi.h Wed May 06 16:56:21 2009 +0100
@@ -6,7 +6,7 @@
* Title: MPI Message independent structures and definitions
* Creation Date: July 27, 2000
#define MPI_HEADER_VERSION_DEV (0x00)
#define MPI_HEADER_VERSION_UNIT_MASK (0xFF00)
#define MPI_HEADER_VERSION_UNIT_SHIFT (8)
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_cnfg.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_cnfg.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_cnfg.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_cnfg.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_cnfg.h
+--- a/drivers/message/fusion/lsi/mpi_cnfg.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_cnfg.h Wed May 06 16:56:21 2009 +0100
@@ -6,7 +6,7 @@
* Title: MPI Config message, structures, and Pages
* Creation Date: July 27, 2000
* --------------------------------------------------------------------------
*/
-@@ -686,6 +700,14 @@ typedef struct _CONFIG_PAGE_MANUFACTURIN
+@@ -686,6 +700,14 @@
#define MPI_MANPAGE4_IR_NO_MIX_SAS_SATA (0x01)
/* defines for the ExtFlags field */
#define MPI_MANPAGE4_EXTFLAGS_HIDE_NON_IR_METADATA (0x0008)
#define MPI_MANPAGE4_EXTFLAGS_SAS_CACHE_DISABLE (0x0004)
#define MPI_MANPAGE4_EXTFLAGS_SATA_CACHE_DISABLE (0x0002)
-@@ -1159,6 +1181,8 @@ typedef struct _CONFIG_PAGE_IOC_6
+@@ -1159,6 +1181,8 @@
/* IOC Page 6 Capabilities Flags */
#define MPI_IOCPAGE6_CAP_FLAGS_DISABLE_SMART_POLLING (0x00000008)
#define MPI_IOCPAGE6_CAP_FLAGS_MASK_METADATA_SIZE (0x00000006)
-@@ -1428,6 +1452,14 @@ typedef struct _CONFIG_PAGE_BIOS_2
+@@ -1428,6 +1452,14 @@
#define MPI_BIOSPAGE2_FORM_SAS_WWN (0x05)
#define MPI_BIOSPAGE2_FORM_ENCLOSURE_SLOT (0x06)
/****************************************************************************
* SCSI Port Config Pages
-@@ -2419,6 +2451,15 @@ typedef struct _RAID_PHYS_DISK1_PATH
+@@ -2419,6 +2451,15 @@
#define MPI_RAID_PHYSDISK1_FLAG_BROKEN (0x0002)
#define MPI_RAID_PHYSDISK1_FLAG_INVALID (0x0001)
typedef struct _CONFIG_PAGE_RAID_PHYS_DISK_1
{
CONFIG_PAGE_HEADER Header; /* 00h */
-@@ -2426,7 +2467,7 @@ typedef struct _CONFIG_PAGE_RAID_PHYS_DI
+@@ -2426,7 +2467,7 @@
U8 PhysDiskNum; /* 05h */
U16 Reserved2; /* 06h */
U32 Reserved1; /* 08h */
} CONFIG_PAGE_RAID_PHYS_DISK_1, MPI_POINTER PTR_CONFIG_PAGE_RAID_PHYS_DISK_1,
RaidPhysDiskPage1_t, MPI_POINTER pRaidPhysDiskPage1_t;
-@@ -2844,6 +2885,7 @@ typedef struct _CONFIG_PAGE_SAS_DEVICE_0
+@@ -2844,6 +2885,7 @@
#define MPI_SAS_DEVICE0_ASTATUS_SATA_INIT_FAILED (0x01)
#define MPI_SAS_DEVICE0_ASTATUS_SATA_CAPABILITY_FAILED (0x02)
#define MPI_SAS_DEVICE0_ASTATUS_SATA_AFFILIATION_CONFLICT (0x03)
/* specific values for SATA Init failures */
#define MPI_SAS_DEVICE0_ASTATUS_SIF_UNKNOWN (0x10)
#define MPI_SAS_DEVICE0_ASTATUS_SIF_AFFILIATION_CONFLICT (0x11)
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_fc.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_fc.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_fc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_fc.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_fc.h
+--- a/drivers/message/fusion/lsi/mpi_fc.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_fc.h Wed May 06 16:56:21 2009 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2004 LSI Corporation.
*
*
* Name: mpi_fc.h
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_history.txt linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_history.txt
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_history.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_history.txt 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_history.txt
+--- a/drivers/message/fusion/lsi/mpi_history.txt Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_history.txt Wed May 06 16:56:21 2009 +0100
@@ -3,28 +3,28 @@
MPI Header File Change History
==============================
* Date Version Description
-@@ -96,6 +96,9 @@ mpi.h
+@@ -96,6 +96,9 @@
* 03-27-06 01.05.11 Bumped MPI_HEADER_VERSION_UNIT.
* 10-11-06 01.05.12 Bumped MPI_HEADER_VERSION_UNIT.
* 05-24-07 01.05.13 Bumped MPI_HEADER_VERSION_UNIT.
* --------------------------------------------------------------------------
mpi_ioc.h
-@@ -127,7 +130,7 @@ mpi_ioc.h
+@@ -127,7 +130,7 @@
* 08-08-01 01.02.01 Original release for v1.2 work.
* New format for FWVersion and ProductId in
* MSG_IOC_FACTS_REPLY and MPI_FW_HEADER.
* related structure and defines.
* Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED.
* Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE.
-@@ -187,7 +190,7 @@ mpi_ioc.h
+@@ -187,7 +190,7 @@
* 10-11-06 01.05.12 Added MPI_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED.
* Added MaxInitiators field to PortFacts reply.
* Added SAS Device Status Change ReasonCode for
* Added MPI_EVENT_SAS_EXPANDER_STATUS_CHANGE and event
* data structure.
* Added new ImageType values for FWDownload and FWUpload
-@@ -199,6 +202,16 @@ mpi_ioc.h
+@@ -199,6 +202,16 @@
* added _MULTI_PORT_DOMAIN.
* 05-24-07 01.05.14 Added Common Boot Block type to FWDownload Request.
* Added Common Boot Block type to FWUpload Request.
* --------------------------------------------------------------------------
mpi_cnfg.h
-@@ -213,7 +226,7 @@ mpi_cnfg.h
+@@ -213,7 +226,7 @@
* Added _RESPONSE_ID_MASK definition to SCSI_PORT_1
* page and updated the page version.
* Added Information field and _INFO_PARAMS_NEGOTIATED
* 06-22-00 01.00.03 Removed batch controls from LAN_0 page and updated the
* page version.
* Added BucketsRemaining to LAN_1 page, redefined the
-@@ -496,6 +509,20 @@ mpi_cnfg.h
+@@ -496,6 +509,20 @@
* Expander Page 0 Flags field.
* Fixed define for
* MPI_SAS_EXPANDER1_DISCINFO_BAD_PHY_DISABLED.
* --------------------------------------------------------------------------
mpi_init.h
-@@ -661,6 +688,9 @@ mpi_raid.h
+@@ -661,6 +688,9 @@
* _SET_RESYNC_RATE and _SET_DATA_SCRUB_RATE.
* 02-28-07 01.05.03 Added new RAID Action, Device FW Update Mode, and
* associated defines.
* --------------------------------------------------------------------------
mpi_tool.h
-@@ -694,6 +724,10 @@ mpi_sas.h
+@@ -694,6 +724,10 @@
* reply.
* 10-11-06 01.05.04 Fixed the name of a define for Operation field of SAS IO
* Unit Control request.
* --------------------------------------------------------------------------
mpi_type.h
-@@ -709,20 +743,20 @@ mpi_type.h
+@@ -709,20 +743,20 @@
mpi_history.txt Parts list history
Filename 01.05.14 01.05.13 01.05.12 01.05.11 01.05.10 01.05.09
---------- -------- -------- -------- -------- -------- --------
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_init.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_init.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_init.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_init.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_init.h
+--- a/drivers/message/fusion/lsi/mpi_init.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_init.h Wed May 06 16:56:21 2009 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2007 LSI Corporation.
*
*
* Name: mpi_init.h
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_ioc.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_ioc.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_ioc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_ioc.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_ioc.h
+--- a/drivers/message/fusion/lsi/mpi_ioc.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_ioc.h Wed May 06 16:56:21 2009 +0100
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2000-2007 LSI Corporation.
* --------------------------------------------------------------------------
*/
-@@ -612,6 +622,8 @@ typedef struct _EVENT_DATA_SAS_DEVICE_ST
+@@ -612,6 +622,8 @@
#define MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL (0x0B)
#define MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL (0x0C)
#define MPI_EVENT_SAS_DEV_STAT_RC_ASYNC_NOTIFICATION (0x0D)
/* SCSI Event data for Queue Full event */
-@@ -708,6 +720,8 @@ typedef struct _MPI_EVENT_DATA_IR2
+@@ -708,6 +720,8 @@
#define MPI_EVENT_IR2_RC_PD_REMOVED (0x05)
#define MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED (0x06)
#define MPI_EVENT_IR2_RC_REBUILD_MEDIUM_ERROR (0x07)
/* defines for logical disk states */
#define MPI_LD_STATE_OPTIMAL (0x00)
-@@ -867,6 +881,7 @@ typedef struct _EVENT_DATA_DISCOVERY_ERR
+@@ -867,6 +881,7 @@
#define MPI_EVENT_DSCVRY_ERR_DS_UNSUPPORTED_DEVICE (0x00000800)
#define MPI_EVENT_DSCVRY_ERR_DS_MAX_SATA_TARGETS (0x00001000)
#define MPI_EVENT_DSCVRY_ERR_DS_MULTI_PORT_DOMAIN (0x00002000)
/* SAS SMP Error Event data */
-@@ -902,6 +917,8 @@ typedef struct _EVENT_DATA_SAS_INIT_DEV_
+@@ -902,6 +917,8 @@
/* defines for the ReasonCode field of the SAS Initiator Device Status Change event */
#define MPI_EVENT_SAS_INIT_RC_ADDED (0x01)
/* SAS Initiator Device Table Overflow Event data */
-@@ -910,6 +927,7 @@ typedef struct _EVENT_DATA_SAS_INIT_TABL
+@@ -910,6 +927,7 @@
U8 MaxInit; /* 00h */
U8 CurrentInit; /* 01h */
U16 Reserved1; /* 02h */
} EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
MPI_POINTER PTR_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
MpiEventDataSasInitTableOverflow_t,
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_lan.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_lan.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_lan.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_lan.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_lan.h
+--- a/drivers/message/fusion/lsi/mpi_lan.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_lan.h Wed May 06 16:56:21 2009 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2004 LSI Corporation.
*
*
* Name: mpi_lan.h
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_log_fc.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_log_fc.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_log_fc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_log_fc.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_log_fc.h
+--- a/drivers/message/fusion/lsi/mpi_log_fc.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_log_fc.h Wed May 06 16:56:21 2009 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2001 LSI Corporation. All rights reserved.
*
* NAME: fc_log.h
* SUMMARY: MPI IocLogInfo definitions for the SYMFC9xx chips
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_log_sas.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_log_sas.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_log_sas.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_log_sas.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_log_sas.h
+--- a/drivers/message/fusion/lsi/mpi_log_sas.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_log_sas.h Wed May 06 16:56:21 2009 +0100
@@ -1,6 +1,6 @@
/***************************************************************************
* *
/****************************************************************************/
/* Defines for convenience */
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_raid.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_raid.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_raid.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_raid.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_raid.h
+--- a/drivers/message/fusion/lsi/mpi_raid.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_raid.h Wed May 06 16:56:21 2009 +0100
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2001-2007 LSI Corporation.
* --------------------------------------------------------------------------
*/
-@@ -93,6 +96,7 @@ typedef struct _MSG_RAID_ACTION
+@@ -93,6 +96,7 @@
#define MPI_RAID_ACTION_SET_RESYNC_RATE (0x13)
#define MPI_RAID_ACTION_SET_DATA_SCRUB_RATE (0x14)
#define MPI_RAID_ACTION_DEVICE_FW_UPDATE_MODE (0x15)
/* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */
#define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001)
-@@ -105,6 +109,9 @@ typedef struct _MSG_RAID_ACTION
+@@ -104,6 +108,9 @@
+
#define MPI_RAID_ACTION_ADATA_KEEP_LBA0 (0x00000000)
#define MPI_RAID_ACTION_ADATA_ZERO_LBA0 (0x00000002)
-
++
+/* ActionDataWord defines for use with MPI_RAID_ACTION_DISABLE_VOLUME action */
+#define MPI_RAID_ACTION_ADATA_DISABLE_FULL_REBUILD (0x00000001)
-+
+
/* ActionDataWord defines for use with MPI_RAID_ACTION_ACTIVATE_VOLUME action */
#define MPI_RAID_ACTION_ADATA_INACTIVATE_ALL (0x00000001)
-
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_sas.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_sas.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_sas.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_sas.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_sas.h
+--- a/drivers/message/fusion/lsi/mpi_sas.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_sas.h Wed May 06 16:56:21 2009 +0100
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2004-2006 LSI Corporation.
#define MPI_SAS_DEVICE_INFO_SEP (0x00004000)
#define MPI_SAS_DEVICE_INFO_ATAPI_DEVICE (0x00002000)
#define MPI_SAS_DEVICE_INFO_LSI_DEVICE (0x00001000)
-@@ -216,7 +222,7 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_R
+@@ -216,7 +222,7 @@
U8 ChainOffset; /* 02h */
U8 Function; /* 03h */
U16 DevHandle; /* 04h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U8 TargetID; /* 0Ch */
-@@ -225,7 +231,7 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_R
+@@ -225,7 +231,7 @@
U8 PrimFlags; /* 0Fh */
U32 Primitive; /* 10h */
U64 SASAddress; /* 14h */
} MSG_SAS_IOUNIT_CONTROL_REQUEST, MPI_POINTER PTR_MSG_SAS_IOUNIT_CONTROL_REQUEST,
SasIoUnitControlRequest_t, MPI_POINTER pSasIoUnitControlRequest_t;
-@@ -241,6 +247,8 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_R
+@@ -241,6 +247,8 @@
#define MPI_SAS_OP_TRANSMIT_PORT_SELECT_SIGNAL (0x0C)
#define MPI_SAS_OP_TRANSMIT_REMOVE_DEVICE (0x0D) /* obsolete name */
#define MPI_SAS_OP_REMOVE_DEVICE (0x0D)
/* values for the PrimFlags field */
#define MPI_SAS_PRIMFLAGS_SINGLE (0x08)
-@@ -256,7 +264,7 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_R
+@@ -256,7 +264,7 @@
U8 MsgLength; /* 02h */
U8 Function; /* 03h */
U16 DevHandle; /* 04h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U16 Reserved4; /* 0Ch */
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_targ.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_targ.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_targ.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_targ.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_targ.h
+--- a/drivers/message/fusion/lsi/mpi_targ.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_targ.h Wed May 06 16:56:21 2009 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2004 LSI Corporation.
*
*
* Name: mpi_targ.h
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_tool.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_tool.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_tool.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_tool.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_tool.h
+--- a/drivers/message/fusion/lsi/mpi_tool.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_tool.h Wed May 06 16:56:21 2009 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2005 LSI Corporation.
*
*
* Name: mpi_tool.h
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_type.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_type.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_type.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_type.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_type.h
+--- a/drivers/message/fusion/lsi/mpi_type.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_type.h Wed May 06 16:56:21 2009 +0100
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2000-2004 LSI Corporation.
* --------------------------------------------------------------------------
*/
-diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/drivers/message/fusion/mptbase.c
---- linux-2.6.27/drivers/message/fusion/mptbase.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptbase.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptbase.c
+--- a/drivers/message/fusion/mptbase.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptbase.c Wed May 06 16:56:21 2009 +0100
@@ -58,6 +58,7 @@
#include <linux/delay.h>
#include <linux/interrupt.h> /* needed for in_interrupt() proto */
#include <asm/io.h>
#ifdef CONFIG_MTRR
#include <asm/mtrr.h>
-@@ -79,19 +80,43 @@ MODULE_VERSION(my_VERSION);
+@@ -79,19 +80,43 @@
/*
* cmd line parameters
*/
#ifdef MFCNT
static int mfcounter = 0;
-@@ -102,7 +127,6 @@ static int mfcounter = 0;
+@@ -102,7 +127,6 @@
/*
* Public data...
*/
static struct proc_dir_entry *mpt_proc_root_dir;
#define WHOINIT_UNKNOWN 0xAA
-@@ -125,6 +149,8 @@ static struct mpt_pci_driver *MptDevice
+@@ -125,6 +149,8 @@
static DECLARE_WAIT_QUEUE_HEAD(mpt_waitq);
/*
* Driver Callback Index's
*/
-@@ -135,8 +161,8 @@ static u8 last_drv_idx;
+@@ -135,8 +161,8 @@
/*
* Forward protos...
*/
static int mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes,
u32 *req, int replyBytes, u16 *u16reply, int maxwait,
int sleepFlag);
-@@ -167,9 +193,9 @@ static int mpt_GetScsiPortSettings(MPT_A
+@@ -167,9 +193,9 @@
static int mpt_readScsiDevicePageHeaders(MPT_ADAPTER *ioc, int portnum);
static void mpt_read_ioc_pg_1(MPT_ADAPTER *ioc);
static void mpt_read_ioc_pg_4(MPT_ADAPTER *ioc);
static int SendEventAck(MPT_ADAPTER *ioc, EventNotificationReply_t *evnp);
static int mpt_host_page_access_control(MPT_ADAPTER *ioc, u8 access_control_value, int sleepFlag);
static int mpt_host_page_alloc(MPT_ADAPTER *ioc, pIOCInit_t ioc_init);
-@@ -184,7 +210,6 @@ static int procmpt_iocinfo_read(char *bu
+@@ -184,7 +210,6 @@
#endif
static void mpt_get_fw_exp_ver(char *buf, MPT_ADAPTER *ioc);
static int ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *evReply, int *evHandlers);
static void mpt_iocstatus_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf);
static void mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info);
-@@ -193,6 +218,7 @@ static void mpt_sas_log_info(MPT_ADAPTER
+@@ -193,6 +218,7 @@
static int mpt_read_ioc_pg_3(MPT_ADAPTER *ioc);
static void mpt_inactive_raid_list_free(MPT_ADAPTER *ioc);
/* module entry point */
static int __init fusion_init (void);
static void __exit fusion_exit (void);
-@@ -223,7 +249,16 @@ pci_enable_io_access(struct pci_dev *pde
+@@ -223,7 +249,16 @@
pci_write_config_word(pdev, PCI_COMMAND, command_reg);
}
{
int ret = param_set_int(val, kp);
MPT_ADAPTER *ioc;
-@@ -254,6 +289,56 @@ mpt_get_cb_idx(MPT_DRIVER_CLASS dclass)
- }
-
- /**
+@@ -251,6 +286,56 @@
+ if (MptDriverClass[cb_idx] == dclass)
+ return cb_idx;
+ return 0;
++}
++
++/**
+ * mpt_is_discovery_complete - determine if discovery has completed
+ * @ioc: per adatper instance
+ *
+ buffer, dma_handle);
+ out:
+ return rc;
-+}
-+
-+/**
- * mpt_fault_reset_work - work performed on workq after ioc fault
- * @work: input argument, used to derive ioc
- *
-@@ -267,23 +352,29 @@ mpt_fault_reset_work(struct work_struct
+ }
+
+ /**
+@@ -267,23 +352,29 @@
int rc;
unsigned long flags;
}
out:
-@@ -301,7 +392,6 @@ mpt_fault_reset_work(struct work_struct
+@@ -300,7 +391,6 @@
+ msecs_to_jiffies(MPT_POLLING_INTERVAL));
spin_unlock_irqrestore(&ioc->fault_reset_work_lock, flags);
}
-
-
+
/*
* Process turbo (context) reply...
- */
-@@ -354,7 +444,7 @@ mpt_turbo_reply(MPT_ADAPTER *ioc, u32 pa
+@@ -354,7 +444,7 @@
/* Check for (valid) IO callback! */
if (!cb_idx || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS ||
printk(MYIOC_s_WARN_FMT "%s: Invalid cb_idx (%d)!\n",
__func__, ioc->name, cb_idx);
goto out;
-@@ -398,6 +488,7 @@ mpt_reply(MPT_ADAPTER *ioc, u32 pa)
+@@ -398,6 +488,7 @@
dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Got non-TURBO reply=%p req_idx=%x cb_idx=%x Function=%x\n",
ioc->name, mr, req_idx, cb_idx, mr->u.hdr.Function));
DBG_DUMP_REPLY_FRAME(ioc, (u32 *)mr);
/* Check/log IOC log info
-@@ -418,7 +509,7 @@ mpt_reply(MPT_ADAPTER *ioc, u32 pa)
+@@ -418,7 +509,7 @@
/* Check for (valid) IO callback! */
if (!cb_idx || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS ||
printk(MYIOC_s_WARN_FMT "%s: Invalid cb_idx (%d)!\n",
__func__, ioc->name, cb_idx);
freeme = 0;
-@@ -478,9 +569,9 @@ mpt_interrupt(int irq, void *bus_id)
+@@ -478,9 +569,9 @@
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/**
- * mpt_base_reply - MPT base driver's callback routine
-+ * mptbase_reply - MPT base driver's callback routine
- * @ioc: Pointer to MPT_ADAPTER structure
+- * @ioc: Pointer to MPT_ADAPTER structure
- * @mf: Pointer to original MPT request frame
++ * mptbase_reply - MPT base driver's callback routine
++ * @ioc: Pointer to MPT_ADAPTER structure
+ * @req: Pointer to original MPT request frame
* @reply: Pointer to MPT reply frame (NULL if TurboReply)
*
* MPT base driver's callback routine; all base driver
-@@ -491,122 +582,49 @@ mpt_interrupt(int irq, void *bus_id)
+@@ -491,122 +582,49 @@
* should be freed, or 0 if it shouldn't.
*/
static int
-mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *reply)
+-{
+mptbase_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply)
- {
++{
+ EventNotificationReply_t *pEventReply;
+ u8 event;
+ int evHandlers;
- devtverboseprintk(ioc, printk(MYIOC_s_WARN_FMT "Called %d event handlers, sum results = %d\n",
- ioc->name, evHandlers, results));
- }
-
+-
- /*
- * Hmmm... It seems that EventNotificationReply is an exception
- * to the rule of one reply per request.
- */
- if (pEvReply->MsgFlags & MPI_MSGFLAGS_CONTINUATION_REPLY) {
++
+ switch (reply->u.hdr.Function) {
+ case MPI_FUNCTION_EVENT_NOTIFICATION:
+ pEventReply = (EventNotificationReply_t *)reply;
}
/*
-@@ -702,7 +720,7 @@ mpt_event_register(u8 cb_idx, MPT_EVHAND
+@@ -702,7 +720,7 @@
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/**
* @cb_idx: previously registered callback handle
*
* Each protocol-specific driver should call this routine
-@@ -780,7 +798,7 @@ mpt_device_driver_register(struct mpt_pc
+@@ -780,7 +798,7 @@
ioc->pcidev->driver->id_table : NULL;
if (dd_cbfunc->probe)
dd_cbfunc->probe(ioc->pcidev, id);
return 0;
}
-@@ -809,7 +827,6 @@ mpt_device_driver_deregister(u8 cb_idx)
+@@ -808,7 +826,6 @@
+
MptDeviceDriverHandlers[cb_idx] = NULL;
}
-
-
+
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/**
- * mpt_get_msg_frame - Obtain an MPT request frame from the pool
-@@ -851,7 +868,6 @@ mpt_get_msg_frame(u8 cb_idx, MPT_ADAPTER
+@@ -851,7 +868,6 @@
mf->u.frame.linkage.arg1 = 0;
mf->u.frame.hwhdr.msgctxu.fld.cb_idx = cb_idx; /* byte */
req_offset = (u8 *)mf - (u8 *)ioc->req_frames;
req_idx = req_offset / ioc->req_sz;
mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(req_idx);
mf->u.frame.hwhdr.msgctxu.fld.rsvd = 0;
-@@ -901,14 +917,14 @@ mpt_put_msg_frame(u8 cb_idx, MPT_ADAPTER
+@@ -901,14 +917,14 @@
/* ensure values are reset properly! */
mf->u.frame.hwhdr.msgctxu.fld.cb_idx = cb_idx; /* byte */
req_offset = (u8 *)mf - (u8 *)ioc->req_frames;
dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mf_dma_addr=%x req_idx=%d "
"RequestNB=%x\n", ioc->name, mf_dma_addr, req_idx,
ioc->RequestNB[req_idx]));
-@@ -966,43 +982,145 @@ mpt_free_msg_frame(MPT_ADAPTER *ioc, MPT
+@@ -966,42 +982,144 @@
/* Put Request back on FreeQ! */
spin_lock_irqsave(&ioc->FreeQlock, flags);
}
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /**
+-/**
- * mpt_add_sge - Place a simple SGE at address pAddr.
++/**
+ * mpt_add_sge - Place a simple 32 bit SGE at address pAddr.
* @pAddr: virtual address for SGE
* @flagslength: SGE flags and data transfer length
{
- if (sizeof(dma_addr_t) == sizeof(u64)) {
- SGESimple64_t *pSge = (SGESimple64_t *) pAddr;
-- u32 tmp = dma_addr & 0xFFFFFFFF;
+ SGESimple32_t *pSge = (SGESimple32_t *) pAddr;
+ pSge->FlagsLength = cpu_to_le32(flagslength);
+ pSge->Address = cpu_to_le32(dma_addr);
+}
-
-- pSge->FlagsLength = cpu_to_le32(flagslength);
-- pSge->Address.Low = cpu_to_le32(tmp);
-- tmp = (u32) ((u64)dma_addr >> 32);
-- pSge->Address.High = cpu_to_le32(tmp);
-
-- } else {
-- SGESimple32_t *pSge = (SGESimple32_t *) pAddr;
-- pSge->FlagsLength = cpu_to_le32(flagslength);
-- pSge->Address = cpu_to_le32(dma_addr);
++
++
+/**
+ * mpt_add_sge_64bit - Place a simple 64 bit SGE at address pAddr.
+ * @pAddr: virtual address for SGE
+ "addr = 0x%llx len = %d\n",
+ (unsigned long long)dma_addr,
+ MPI_SGE_LENGTH(flagslength));
- }
++ }
+
+ pSge->Address.High = cpu_to_le32(tmp);
+ pSge->FlagsLength = cpu_to_le32(
+mpt_add_chain_64bit(char *pAddr, u8 next, u16 length, dma_addr_t dma_addr)
+{
+ SGEChain64_t *pChain = (SGEChain64_t *) pAddr;
-+ u32 tmp = dma_addr & 0xFFFFFFFF;
-+
+ u32 tmp = dma_addr & 0xFFFFFFFF;
+
+- pSge->FlagsLength = cpu_to_le32(flagslength);
+- pSge->Address.Low = cpu_to_le32(tmp);
+ pChain->Length = cpu_to_le16(length);
+ pChain->Flags = (MPI_SGE_FLAGS_CHAIN_ELEMENT |
+ MPI_SGE_FLAGS_64_BIT_ADDRESSING);
+ pChain->NextChainOffset = next;
+
+ pChain->Address.Low = cpu_to_le32(tmp);
-+ tmp = (u32) ((u64)dma_addr >> 32);
+ tmp = (u32) ((u64)dma_addr >> 32);
+- pSge->Address.High = cpu_to_le32(tmp);
+-
+- } else {
+- SGESimple32_t *pSge = (SGESimple32_t *) pAddr;
+- pSge->FlagsLength = cpu_to_le32(flagslength);
+- pSge->Address = cpu_to_le32(dma_addr);
+- }
+-}
+ pChain->Address.High = cpu_to_le32(tmp);
- }
-
++}
+
+
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/**
- * mpt_send_handshake_request - Send MPT request via doorbell handshake method.
-@@ -1023,7 +1141,7 @@ mpt_add_sge(char *pAddr, u32 flagslength
+@@ -1023,7 +1141,7 @@
int
mpt_send_handshake_request(u8 cb_idx, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag)
{
u8 *req_as_bytes;
int ii;
-@@ -1038,7 +1156,7 @@ mpt_send_handshake_request(u8 cb_idx, MP
+@@ -1038,7 +1156,7 @@
* is in proper (pre-alloc'd) request buffer range...
*/
ii = MFPTR_2_MPT_INDEX(ioc,(MPT_FRAME_HDR*)req);
MPT_FRAME_HDR *mf = (MPT_FRAME_HDR*)req;
mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(ii);
mf->u.frame.hwhdr.msgctxu.fld.cb_idx = cb_idx;
-@@ -1114,7 +1232,6 @@ mpt_send_handshake_request(u8 cb_idx, MP
+@@ -1114,7 +1232,6 @@
*
* Returns 0 for success, non-zero for failure.
*/
static int
mpt_host_page_access_control(MPT_ADAPTER *ioc, u8 access_control_value, int sleepFlag)
{
-@@ -1171,7 +1288,7 @@ mpt_host_page_alloc(MPT_ADAPTER *ioc, pI
+@@ -1171,7 +1288,7 @@
host_page_buffer_sz,
&ioc->HostPageBuffer_dma)) != NULL) {
"host_page_buffer @ %p, dma @ %x, sz=%d bytes\n",
ioc->name, ioc->HostPageBuffer,
(u32)ioc->HostPageBuffer_dma,
-@@ -1195,15 +1312,11 @@ mpt_host_page_alloc(MPT_ADAPTER *ioc, pI
+@@ -1195,15 +1312,11 @@
psge = (char *)&ioc_init->HostPageBufferSGE;
flags_length = MPI_SGE_FLAGS_SIMPLE_ELEMENT |
MPI_SGE_FLAGS_SYSTEM_ADDRESS |
ioc->facts.HostPageBufferSGE = ioc_init->HostPageBufferSGE;
return 0;
-@@ -1493,7 +1606,6 @@ mpt_mapresources(MPT_ADAPTER *ioc)
+@@ -1493,7 +1606,6 @@
unsigned long port;
u32 msize;
u32 psize;
int r = -ENODEV;
struct pci_dev *pdev;
-@@ -1509,24 +1621,40 @@ mpt_mapresources(MPT_ADAPTER *ioc)
+@@ -1509,24 +1621,40 @@
"MEM failed\n", ioc->name);
return r;
}
+-
+- pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision);
+-
+- if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)
+- && !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) {
+- dinitprintk(ioc, printk(MYIOC_s_INFO_FMT
+- ": 64 BIT PCI BUS DMA ADDRESSING SUPPORTED\n",
+- ioc->name));
+- } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)
+- && !pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
+- dinitprintk(ioc, printk(MYIOC_s_INFO_FMT
+- ": 32 BIT PCI BUS DMA ADDRESSING SUPPORTED\n",
+- ioc->name));
+- } else {
+- printk(MYIOC_s_WARN_FMT "no suitable DMA mask for %s\n",
+- ioc->name, pci_name(pdev));
+- pci_release_selected_regions(pdev, ioc->bars);
+- return r;
+ if (sizeof(dma_addr_t) > 4) {
+ uint64_t required_mask;
+ required_mask = dma_get_required_mask(&pdev->dev);
+ ioc->name, pci_name(pdev));
+ return r;
+ }
-
-- pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision);
--
-- if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)
-- && !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) {
-- dinitprintk(ioc, printk(MYIOC_s_INFO_FMT
-- ": 64 BIT PCI BUS DMA ADDRESSING SUPPORTED\n",
-- ioc->name));
-- } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)
-- && !pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
-- dinitprintk(ioc, printk(MYIOC_s_INFO_FMT
-- ": 32 BIT PCI BUS DMA ADDRESSING SUPPORTED\n",
-- ioc->name));
- } else {
-- printk(MYIOC_s_WARN_FMT "no suitable DMA mask for %s\n",
-- ioc->name, pci_name(pdev));
-- pci_release_selected_regions(pdev, ioc->bars);
-- return r;
++
++ } else {
+ if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)
+ && !pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
+ ioc->dma_mask = DMA_32BIT_MASK;
}
mem_phys = msize = 0;
-@@ -1554,7 +1682,7 @@ mpt_mapresources(MPT_ADAPTER *ioc)
+@@ -1554,7 +1682,7 @@
mem = ioremap(mem_phys, msize);
if (mem == NULL) {
printk(MYIOC_s_ERR_FMT ": ERROR - Unable to map adapter"
return -EINVAL;
}
ioc->memmap = mem;
-@@ -1587,7 +1715,6 @@ mpt_mapresources(MPT_ADAPTER *ioc)
+@@ -1587,7 +1715,6 @@
*
* Returns 0 for success, non-zero for failure.
*
*/
int
mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
-@@ -1610,6 +1737,7 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1610,6 +1737,7 @@
ioc->id = mpt_ids++;
sprintf(ioc->name, "ioc%d", ioc->id);
/*
* set initial debug level
-@@ -1620,7 +1748,6 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1620,7 +1748,6 @@
if (mpt_debug_level)
printk(KERN_INFO "mpt_debug_level=%xh\n", mpt_debug_level);
ioc->pcidev = pdev;
if (mpt_mapresources(ioc)) {
-@@ -1628,14 +1755,34 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1628,14 +1755,34 @@
return r;
}
/* Initialize the event logging.
*/
-@@ -1648,16 +1795,13 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1648,15 +1795,12 @@
ioc->mfcnt = 0;
#endif
/* Initilize SCSI Config Data structure
*/
memset(&ioc->spi_data, 0, sizeof(SpiCfgData));
-
+-
- /* Initialize the running configQ head.
- */
- INIT_LIST_HEAD(&ioc->configQ);
--
+
/* Initialize the fc rport list head.
*/
- INIT_LIST_HEAD(&ioc->fc_rports);
-@@ -1665,11 +1809,11 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1665,11 +1809,11 @@
/* Find lookup slot. */
INIT_LIST_HEAD(&ioc->list);
snprintf(ioc->reset_work_q_name, sizeof(ioc->reset_work_q_name),
"mpt_poll_%d", ioc->id);
ioc->reset_work_q =
-@@ -1682,8 +1826,9 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1682,8 +1826,9 @@
return -ENOMEM;
}
pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision);
mpt_get_product_name(pdev->vendor, pdev->device, revision, ioc->prod_name);
-@@ -1703,14 +1848,14 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1703,14 +1848,14 @@
case MPI_MANUFACTPAGE_DEVICEID_FC929X:
if (revision < XL_929) {
/* 929X Chip Fix. Set Split transactions level
pci_read_config_byte(pdev, 0x6a, &pcixcmd);
pcixcmd |= 0x08;
pci_write_config_byte(pdev, 0x6a, pcixcmd);
-@@ -1728,6 +1873,7 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1728,6 +1873,7 @@
ioc->bus_type = FC;
break;
case MPI_MANUFACTPAGE_DEVID_53C1030:
/* 1030 Chip Fix. Disable Split transactions
* for PCIX. Set MOST bits to zero if Rev < C0( = 8).
-@@ -1745,22 +1891,33 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1745,22 +1891,33 @@
case MPI_MANUFACTPAGE_DEVID_SAS1064:
case MPI_MANUFACTPAGE_DEVID_SAS1068:
ioc->errata_flag_1064 = 1;
case MPI_MANUFACTPAGE_DEVID_SAS1068E:
case MPI_MANUFACTPAGE_DEVID_SAS1078:
ioc->bus_type = SAS;
-+ break;
- }
-
+- }
+-
- if (mpt_msi_enable == -1) {
- /* Enable on SAS, disable on FC and SPI */
- if (ioc->bus_type == SAS)
- } else
- /* follow flag: 0 - disable; 1 - enable */
- ioc->msi_enable = mpt_msi_enable;
++ break;
++ }
++
+ switch (ioc->bus_type) {
+ case SAS:
+ ioc->msi_enable = mpt_msi_enable_sas;
if (ioc->errata_flag_1064)
pci_disable_io_access(pdev);
-@@ -1782,10 +1939,17 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1782,10 +1939,17 @@
*/
mpt_detect_bound_ports(ioc, pdev);
list_del(&ioc->list);
if (ioc->alt_ioc)
-@@ -1796,7 +1960,8 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1796,7 +1960,8 @@
destroy_workqueue(ioc->reset_work_q);
ioc->reset_work_q = NULL;
kfree(ioc);
pci_set_drvdata(pdev, NULL);
return r;
-@@ -1832,7 +1997,6 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1832,7 +1997,6 @@
if (!ioc->alt_ioc)
queue_delayed_work(ioc->reset_work_q, &ioc->fault_reset_work,
msecs_to_jiffies(MPT_POLLING_INTERVAL));
return 0;
}
-@@ -1841,14 +2005,13 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1841,14 +2005,13 @@
* mpt_detach - Remove a PCI intelligent MPT adapter.
* @pdev: Pointer to pci_dev structure
*/
struct workqueue_struct *wq;
/*
-@@ -1861,6 +2024,11 @@ mpt_detach(struct pci_dev *pdev)
+@@ -1861,6 +2024,11 @@
cancel_delayed_work(&ioc->fault_reset_work);
destroy_workqueue(wq);
sprintf(pname, MPT_PROCFS_MPTBASEDIR "/%s/summary", ioc->name);
remove_proc_entry(pname, NULL);
-@@ -1877,20 +2045,7 @@ mpt_detach(struct pci_dev *pdev)
+@@ -1877,20 +2045,7 @@
}
}
}
/**************************************************************************
-@@ -1923,7 +2078,6 @@ mpt_suspend(struct pci_dev *pdev, pm_mes
+@@ -1923,7 +2078,6 @@
/* disable interrupts */
CHIPREG_WRITE32(&ioc->chip->IntMask, 0xFFFFFFFF);
ioc->active = 0;
/* Clear any lingering interrupt */
CHIPREG_WRITE32(&ioc->chip->IntStatus, 0);
-@@ -1963,6 +2117,22 @@ mpt_resume(struct pci_dev *pdev)
+@@ -1963,6 +2117,22 @@
if (err)
return err;
printk(MYIOC_s_INFO_FMT "pci-resume: ioc-state=0x%x,doorbell=0x%x\n",
ioc->name, (mpt_GetIocState(ioc, 1) >> MPI_IOC_STATE_SHIFT),
CHIPREG_READ32(&ioc->chip->Doorbell));
-@@ -1987,7 +2157,7 @@ mpt_resume(struct pci_dev *pdev)
+@@ -1987,7 +2157,7 @@
/* bring ioc to operational state */
printk(MYIOC_s_INFO_FMT "Sending mpt_do_ioc_recovery\n", ioc->name);
recovery_state = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_BRINGUP,
if (recovery_state != 0)
printk(MYIOC_s_WARN_FMT "pci-resume: Cannot recover, "
"error:[%x]\n", ioc->name, recovery_state);
-@@ -1996,7 +2166,6 @@ mpt_resume(struct pci_dev *pdev)
+@@ -1996,7 +2166,6 @@
"pci-resume: success\n", ioc->name);
out:
return 0;
}
#endif
-@@ -2045,14 +2214,12 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2045,14 +2214,12 @@
int hard;
int rc=0;
int ii;
reason == MPT_HOSTEVENT_IOC_BRINGUP ? "bringup" : "recovery");
/* Disable reply interrupts (also blocks FreeQ) */
-@@ -2060,7 +2227,7 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2060,7 +2227,7 @@
ioc->active = 0;
if (ioc->alt_ioc) {
reset_alt_ioc_active = 1;
/* Disable alt-IOC's reply interrupts (and FreeQ) for a bit ... */
-@@ -2079,16 +2246,19 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2079,16 +2246,19 @@
if (reset_alt_ioc_active && ioc->alt_ioc) {
/* (re)Enable alt-IOC! (reply interrupt, FreeQ) */
} else {
- printk(MYIOC_s_WARN_FMT "NOT READY!\n", ioc->name);
+- }
+- return -1;
+ printk(MYIOC_s_WARN_FMT "NOT READY WARNING!\n",
+ ioc->name);
- }
-- return -1;
++ }
+ ret = -1;
+ goto out;
}
/* hard_reset_done = 0 if a soft reset was performed
-@@ -2098,7 +2268,9 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2098,7 +2268,9 @@
if ((rc = MakeIocReady(ioc->alt_ioc, 0, sleepFlag)) == 0)
alt_ioc_ready = 1;
else
}
for (ii=0; ii<5; ii++) {
-@@ -2156,23 +2328,28 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2156,23 +2328,28 @@
if (ioc->pcidev->irq) {
if (ioc->msi_enable && !pci_enable_msi(ioc->pcidev))
printk(MYIOC_s_INFO_FMT "PCI-MSI enabled\n",
}
}
-@@ -2181,17 +2358,22 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2181,17 +2358,22 @@
* init as upper addresses are needed for init.
* If fails, continue with alt-ioc processing
*/
ioc->alt_ioc->name, rc);
alt_ioc_ready = 0;
reset_alt_ioc_active = 0;
-@@ -2201,15 +2383,16 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2201,15 +2383,16 @@
if ((rc = SendIocInit(ioc->alt_ioc, sleepFlag)) != 0) {
alt_ioc_ready = 0;
reset_alt_ioc_active = 0;
/* Controller is not operational, cannot do upload
*/
-@@ -2238,28 +2421,35 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2238,28 +2421,35 @@
}
}
- ioc->alt_ioc->name));
- CHIPREG_WRITE32(&ioc->alt_ioc->chip->IntMask, MPI_HIM_DIM);
- ioc->alt_ioc->active = 1;
+- }
+-
+- /* Enable MPT base driver management of EventNotification
+- * and EventAck handling.
+- */
+- if ((ret == 0) && (!ioc->facts.EventState))
+- (void) SendEventNotification(ioc, 1); /* 1=Enable EventNotification */
+-
+- if (ioc->alt_ioc && alt_ioc_ready && !ioc->alt_ioc->facts.EventState)
+- (void) SendEventNotification(ioc->alt_ioc, 1); /* 1=Enable EventNotification */
+ if (rc == 0) { /* alt ioc */
+ if (reset_alt_ioc_active && ioc->alt_ioc) {
+ /* (re)Enable alt-IOC! (reply interrupt) */
+ MPI_HIM_DIM);
+ ioc->alt_ioc->active = 1;
+ }
- }
-
-- /* Enable MPT base driver management of EventNotification
-- * and EventAck handling.
-- */
-- if ((ret == 0) && (!ioc->facts.EventState))
-- (void) SendEventNotification(ioc, 1); /* 1=Enable EventNotification */
--
-- if (ioc->alt_ioc && alt_ioc_ready && !ioc->alt_ioc->facts.EventState)
-- (void) SendEventNotification(ioc->alt_ioc, 1); /* 1=Enable EventNotification */
++ }
++
/* Add additional "reason" check before call to GetLanConfigPages
* (combined with GetIoUnitPage2 call). This prevents a somewhat
-@@ -2275,8 +2465,9 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2275,8 +2465,9 @@
mutex_init(&ioc->raid_data.inactive_list_mutex);
INIT_LIST_HEAD(&ioc->raid_data.inactive_list);
- if (ioc->bus_type == SAS) {
+-
+ switch (ioc->bus_type) {
-
++
+ case SAS:
/* clear persistency table */
if(ioc->facts.IOCExceptions &
MPI_IOCFACTS_EXCEPT_PERSISTENT_TABLE_FULL) {
-@@ -2290,21 +2481,32 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2290,21 +2481,32 @@
*/
mpt_findImVolumes(ioc);
- "LanAddr = %02X:%02X:%02X:%02X:%02X:%02X\n",
- ioc->name, a[5], a[4], a[3], a[2], a[1], a[0]));
-
+- }
+- } else {
+ "LanAddr = %02X:%02X:%02X"
+ ":%02X:%02X:%02X\n",
+ ioc->name, a[5], a[4],
+ a[3], a[2], a[1], a[0]));
- }
-- } else {
++ }
+ break;
+
+ case SPI:
/* Get NVRAM and adapter maximums from SPP 0 and 2
*/
mpt_GetScsiPortSettings(ioc, 0);
-@@ -2323,41 +2525,16 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2323,41 +2525,16 @@
mpt_read_ioc_pg_1(ioc);
mpt_read_ioc_pg_4(ioc);
- rc += mpt_signal_reset(cb_idx, ioc, MPT_IOC_POST_RESET);
- handlers++;
- }
-+ out:
-
+-
- if (alt_ioc_ready && MptResetHandlers[cb_idx]) {
- drsprintk(ioc, printk(MYIOC_s_DEBUG_FMT
- "Calling IOC post_reset handler #%d\n",
- }
-
- out:
++ out:
++
if ((ret != 0) && irq_allocated) {
free_irq(ioc->pci_irq, ioc);
if (ioc->msi_enable)
-@@ -2389,8 +2566,8 @@ mpt_detect_bound_ports(MPT_ADAPTER *ioc,
+@@ -2389,8 +2566,8 @@
dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "PCI device %s devfn=%x/%x,"
" searching for devfn match on %x or %x\n",
peer = pci_get_slot(pdev->bus, PCI_DEVFN(slot,func-1));
if (!peer) {
-@@ -2404,16 +2581,20 @@ mpt_detect_bound_ports(MPT_ADAPTER *ioc,
+@@ -2404,16 +2581,20 @@
if (_pcidev == peer) {
/* Paranoia checks */
if (ioc->alt_ioc != NULL) {
} else if (ioc_srch->alt_ioc != NULL) {
- printk(MYIOC_s_WARN_FMT "Oops, already bound to %s!\n",
- ioc_srch->name, ioc_srch->alt_ioc->name);
+- break;
+- }
+- dprintk(ioc, printk(MYIOC_s_INFO_FMT "FOUND! binding to %s\n",
+- ioc->name, ioc_srch->name));
+ printk(MYIOC_s_WARN_FMT
+ "Oops, already bound (%s <==> %s)!\n",
+ ioc_srch->name, ioc_srch->name,
+ ioc_srch->alt_ioc->name);
- break;
- }
-- dprintk(ioc, printk(MYIOC_s_INFO_FMT "FOUND! binding to %s\n",
-- ioc->name, ioc_srch->name));
++ break;
++ }
+ dprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "FOUND! binding %s <==> %s\n",
+ ioc->name, ioc->name, ioc_srch->name));
ioc_srch->alt_ioc = ioc;
ioc->alt_ioc = ioc_srch;
}
-@@ -2433,8 +2614,8 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
+@@ -2433,8 +2614,8 @@
int ret;
if (ioc->cached_fw != NULL) {
if ((ret = mpt_downloadboot(ioc, (MpiFwHeader_t *)
ioc->cached_fw, CAN_SLEEP)) < 0) {
printk(MYIOC_s_WARN_FMT
-@@ -2443,16 +2624,35 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
+@@ -2443,16 +2624,35 @@
}
}
pci_free_consistent(ioc->pcidev, sz,
ioc->alloc, ioc->alloc_dma);
ioc->reply_frames = NULL;
-@@ -2482,8 +2682,10 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
+@@ -2482,8 +2682,10 @@
mpt_inactive_raid_list_free(ioc);
kfree(ioc->raid_data.pIocPg2);
kfree(ioc->raid_data.pIocPg3);
if (ioc->spi_data.pIocPg4 != NULL) {
sz = ioc->spi_data.IocPg4Sz;
-@@ -2507,17 +2709,21 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
+@@ -2507,17 +2709,21 @@
if((ret = mpt_host_page_access_control(ioc,
MPI_DB_HPBAC_FREE_BUFFER, NO_SLEEP)) != 0) {
printk(MYIOC_s_ERR_FMT
- "host page buffers free failed (%d)!\n",
- ioc->name, ret);
-+ ": %s: host page buffers free failed (%d)!\n",
-+ ioc->name, __func__, ret);
- }
+- }
- dexitprintk(ioc, printk(MYIOC_s_INFO_FMT "HostPageBuffer free @ %p, sz=%d bytes\n",
- ioc->name, ioc->HostPageBuffer, ioc->HostPageBuffer_sz));
++ ": %s: host page buffers free failed (%d)!\n",
++ ioc->name, __func__, ret);
++ }
+ dexitprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "HostPageBuffer free @ %p, sz=%d bytes\n", ioc->name,
+ ioc->HostPageBuffer, ioc->HostPageBuffer_sz));
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -2558,7 +2764,8 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc)
+@@ -2558,7 +2764,8 @@
#if defined(CONFIG_MTRR) && 0
if (ioc->mtrr_reg > 0) {
mtrr_del(ioc->mtrr_reg, 0, 0);
}
#endif
-@@ -2566,8 +2773,9 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc)
+@@ -2566,8 +2773,9 @@
list_del(&ioc->list);
sz_last = ioc->alloc_total;
if (ioc->alt_ioc)
ioc->alt_ioc->alt_ioc = NULL;
-@@ -2646,7 +2854,8 @@ MakeIocReady(MPT_ADAPTER *ioc, int force
+@@ -2646,7 +2854,8 @@
/* Get current [raw] IOC state */
ioc_state = mpt_GetIocState(ioc, 0);
/*
* Check to see if IOC got left/stuck in doorbell handshake
-@@ -2659,8 +2868,13 @@ MakeIocReady(MPT_ADAPTER *ioc, int force
+@@ -2659,8 +2868,13 @@
}
/* Is it already READY? */
- if (!statefault && (ioc_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_READY)
+- return 0;
+ if (!statefault &&
+ (ioc_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_READY) {
+ dinitprintk(ioc, printk(MYIOC_s_INFO_FMT
+ "IOC is in READY state\n",
+ ioc->name));
- return 0;
++ return 0;
+ }
/*
* Check to see if IOC is in FAULT state.
-@@ -2668,9 +2882,9 @@ MakeIocReady(MPT_ADAPTER *ioc, int force
+@@ -2668,9 +2882,9 @@
if ((ioc_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_FAULT) {
statefault = 2;
printk(MYIOC_s_WARN_FMT "IOC is in FAULT state!!!\n",
}
/*
-@@ -2686,7 +2900,7 @@ MakeIocReady(MPT_ADAPTER *ioc, int force
+@@ -2686,7 +2900,7 @@
* Else, fall through to KickStart case
*/
whoinit = (ioc_state & MPI_DOORBELL_WHO_INIT_MASK) >> MPI_DOORBELL_WHO_INIT_SHIFT;
"whoinit 0x%x statefault %d force %d\n",
ioc->name, whoinit, statefault, force));
if (whoinit == MPI_WHOINIT_PCI_PEER)
-@@ -2733,15 +2947,16 @@ MakeIocReady(MPT_ADAPTER *ioc, int force
+@@ -2733,15 +2947,16 @@
ii++; cntdn--;
if (!cntdn) {
}
}
-@@ -2802,8 +3017,9 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF
+@@ -2802,8 +3017,9 @@
/* IOC *must* NOT be in RESET state! */
if (ioc->last_state == MPI_IOC_STATE_RESET) {
return -44;
}
-@@ -2820,7 +3036,7 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF
+@@ -2820,7 +3036,7 @@
get_facts.Function = MPI_FUNCTION_IOC_FACTS;
/* Assert: All other get_facts fields are zero! */
"Sending get IocFacts request req_sz=%d reply_sz=%d\n",
ioc->name, req_sz, reply_sz));
-@@ -2850,6 +3066,9 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF
+@@ -2850,6 +3066,9 @@
}
facts->MsgVersion = le16_to_cpu(facts->MsgVersion);
facts->MsgContext = le32_to_cpu(facts->MsgContext);
facts->IOCExceptions = le16_to_cpu(facts->IOCExceptions);
facts->IOCStatus = le16_to_cpu(facts->IOCStatus);
-@@ -2865,7 +3084,7 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF
+@@ -2865,7 +3084,7 @@
* Old: u16{Major(4),Minor(4),SubMinor(8)}
* New: u32{Major(8),Minor(8),Unit(8),Dev(8)}
*/
/*
* Handle old FC f/w style, convert to new...
*/
-@@ -2877,9 +3096,11 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF
+@@ -2877,9 +3096,11 @@
facts->FWVersion.Word = le32_to_cpu(facts->FWVersion.Word);
facts->ProductID = le16_to_cpu(facts->ProductID);
facts->CurrentHostMfaHighAddr =
le32_to_cpu(facts->CurrentHostMfaHighAddr);
facts->GlobalCredits = le16_to_cpu(facts->GlobalCredits);
-@@ -2895,7 +3116,7 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF
+@@ -2895,7 +3116,7 @@
* to 14 in MPI-1.01.0x.
*/
if (facts->MsgLength >= (offsetof(IOCFactsReply_t,FWImageSize) + 7)/4 &&
facts->FWImageSize = le32_to_cpu(facts->FWImageSize);
}
-@@ -2977,8 +3198,8 @@ GetPortFacts(MPT_ADAPTER *ioc, int portn
+@@ -2977,8 +3198,8 @@
/* IOC *must* NOT be in RESET state! */
if (ioc->last_state == MPI_IOC_STATE_RESET) {
return -4;
}
-@@ -2996,14 +3217,14 @@ GetPortFacts(MPT_ADAPTER *ioc, int portn
+@@ -2996,14 +3217,14 @@
get_pfacts.PortNumber = portnum;
/* Assert: All other get_pfacts fields are zero! */
if (ii != 0)
return ii;
-@@ -3077,7 +3298,8 @@ SendIocInit(MPT_ADAPTER *ioc, int sleepF
+@@ -3077,7 +3298,8 @@
ioc_init.MaxDevices = (U8)ioc->devices_per_bus;
ioc_init.MaxBuses = (U8)ioc->number_of_buses;
ioc->name, ioc->facts.MsgVersion));
if (ioc->facts.MsgVersion >= MPI_VERSION_01_05) {
// set MsgVersion and HeaderVersion host driver was built with
-@@ -3091,7 +3313,7 @@ SendIocInit(MPT_ADAPTER *ioc, int sleepF
+@@ -3091,7 +3313,7 @@
}
ioc_init.ReplyFrameSize = cpu_to_le16(ioc->reply_sz); /* in BYTES */
/* Save the upper 32-bits of the request
* (reply) and sense buffers.
*/
-@@ -3193,18 +3415,19 @@ SendPortEnable(MPT_ADAPTER *ioc, int por
+@@ -3193,18 +3415,19 @@
/* port_enable.MsgFlags = 0; */
/* port_enable.MsgContext = 0; */
30 /*seconds*/, sleepFlag);
}
return rc;
-@@ -3294,22 +3517,19 @@ mpt_do_upload(MPT_ADAPTER *ioc, int slee
+@@ -3294,21 +3517,18 @@
FWUpload_t *prequest;
FWUploadReply_t *preply;
FWUploadTCSGE_t *ptcsge;
if (mpt_alloc_fw_memory(ioc, ioc->facts.FWImageSize) != 0)
return -ENOMEM;
-
+-
- dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ": FW Image @ %p[%p], sz=%d[%x] bytes\n",
- ioc->name, ioc->cached_fw, (void *)(ulong)ioc->cached_fw_dma, sz, sz));
--
+
prequest = (sleepFlag == NO_SLEEP) ? kzalloc(ioc->req_sz, GFP_ATOMIC) :
kzalloc(ioc->req_sz, GFP_KERNEL);
- if (!prequest) {
-@@ -3326,49 +3546,47 @@ mpt_do_upload(MPT_ADAPTER *ioc, int slee
+@@ -3326,49 +3546,47 @@
prequest->ImageType = MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM;
prequest->Function = MPI_FUNCTION_FW_UPLOAD;
- ii = mpt_handshake_req_reply_wait(ioc, sgeoffset, (u32*)prequest,
- reply_sz, (u16*)preply, 65 /*seconds*/, sleepFlag);
+-
+- dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ": FW Upload completed rc=%x \n", ioc->name, ii));
+ ii = mpt_handshake_req_reply_wait(ioc, request_size, (u32 *)prequest,
+ reply_sz, (u16 *)preply, 65 /*seconds*/, sleepFlag);
-
-- dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ": FW Upload completed rc=%x \n", ioc->name, ii));
++
+ dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "FW Upload completed "
+ "rc=%x \n", ioc->name, ii));
- if (transfer_sz == sz)
- cmdStatus = 0;
- }
+- }
+- dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT ": do_upload cmdStatus=%d \n",
+- ioc->name, cmdStatus));
+ int status;
+ status = le16_to_cpu(preply->IOCStatus) &
+ MPI_IOCSTATUS_MASK;
+ ioc->facts.FWImageSize ==
+ le32_to_cpu(preply->ActualImageSize))
+ cmdStatus = 0;
- }
-- dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT ": do_upload cmdStatus=%d \n",
-- ioc->name, cmdStatus));
++ }
+ dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "do_upload cmdStatus=%d \n",
+ ioc->name, cmdStatus));
mpt_free_fw_memory(ioc);
}
kfree(prequest);
-@@ -3401,10 +3619,10 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw
+@@ -3401,10 +3619,10 @@
u32 diagRwData;
u32 nextImage;
u32 load_addr;
CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_1ST_KEY_VALUE);
-@@ -3416,11 +3634,10 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw
+@@ -3416,11 +3634,10 @@
CHIPREG_WRITE32(&ioc->chip->Diagnostic, (MPI_DIAG_PREVENT_IOC_BOOT | MPI_DIAG_DISABLE_ARM));
/* wait 1 msec */
diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val | MPI_DIAG_RESET_ADAPTER);
-@@ -3433,11 +3650,10 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw
+@@ -3433,11 +3650,10 @@
break;
}
/* wait .1 sec */
}
if ( count == 30 ) {
-@@ -3455,6 +3671,7 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw
+@@ -3455,6 +3671,7 @@
CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE);
/* Set the DiagRwEn and Disable ARM bits */
CHIPREG_WRITE32(&ioc->chip->Diagnostic, (MPI_DIAG_RW_ENABLE | MPI_DIAG_DISABLE_ARM));
fwSize = (pFwHeader->ImageSize + 3)/4;
-@@ -3468,13 +3685,12 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw
+@@ -3468,13 +3685,12 @@
CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, pFwHeader->LoadStartAddress);
ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "LoadStart addr written 0x%x \n",
nextImage = pFwHeader->NextImageHeaderOffset;
while (nextImage) {
-@@ -3486,21 +3702,24 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw
+@@ -3486,21 +3702,24 @@
ptrFw = (u32 *)pExtImage;
ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Write Ext Image: 0x%x (%d) bytes @ %p load_addr=%x\n",
CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, pFwHeader->IopResetVectorValue);
/* Clear the internal flash bad bit - autoincrementing register,
-@@ -3517,71 +3736,75 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw
+@@ -3517,71 +3736,75 @@
CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, 0x3F000000);
CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, diagRwData);
+ ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "diag0val=%x\n",
+ ioc->name, diag0val));
CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val);
-
-- /* Write 0xFF to reset the sequencer */
-- CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
--
- if (ioc->bus_type == SAS) {
-- ioc_state = mpt_GetIocState(ioc, 0);
-- if ( (GetIocFacts(ioc, sleepFlag,
-- MPT_HOSTEVENT_IOC_BRINGUP)) != 0 ) {
-- ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "GetIocFacts failed: IocState=%x\n",
-- ioc->name, ioc_state));
-- return -EFAULT;
++
++ if (ioc->bus_type == SAS) {
+ /* wait 1 sec */
+ if (sleepFlag == CAN_SLEEP)
+ msleep(1000);
+ diag0val |= MPI_DIAG_CLEAR_FLASH_BAD_SIG;
+ CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val);
+ diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
- }
++ }
+ diag0val &= ~(MPI_DIAG_DISABLE_ARM);
+ CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val);
+ diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
+ CHIPREG_WRITE32(&ioc->chip->DiagRwAddress, 0x3f000004);
- }
++ }
+
+ /* Write 0xFF to reset the sequencer */
+ CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
+- if (ioc->bus_type == SAS) {
+- ioc_state = mpt_GetIocState(ioc, 0);
+- if ( (GetIocFacts(ioc, sleepFlag,
+- MPT_HOSTEVENT_IOC_BRINGUP)) != 0 ) {
+- ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "GetIocFacts failed: IocState=%x\n",
+- ioc->name, ioc_state));
+- return -EFAULT;
+- }
+- }
+-
- for (count=0; count<HZ*20; count++) {
- if ((ioc_state = mpt_GetIocState(ioc, 0)) & MPI_IOC_STATE_READY) {
-- ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-- "downloadboot successful! (count=%d) IocState=%x\n",
-- ioc->name, count, ioc_state));
-- if (ioc->bus_type == SAS) {
-+ /* Write 0xFF to reset the sequencer */
-+ CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
-+
+ for (count = 0; count < 30; count++) {
+ doorbell = CHIPREG_READ32(&ioc->chip->Doorbell)
+ & MPI_IOC_STATE_MASK;
+ if (doorbell == MPI_IOC_STATE_READY) {
+ if (ioc->bus_type == SAS)
- return 0;
++ return 0;
++ if ((SendIocInit(ioc, sleepFlag)) != 0) {
++ ddlprintk(ioc, printk(MYIOC_s_WARN_FMT
++ "SendIocInit failed\n", ioc->name));
++ return -EFAULT;
++ }
+ ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+- "downloadboot successful! (count=%d) IocState=%x\n",
+- ioc->name, count, ioc_state));
+- if (ioc->bus_type == SAS) {
+- return 0;
- }
- if ((SendIocInit(ioc, sleepFlag)) != 0) {
+- if ((SendIocInit(ioc, sleepFlag)) != 0) {
- ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
- "downloadboot: SendIocInit failed\n",
- ioc->name));
-+ ddlprintk(ioc, printk(MYIOC_s_WARN_FMT
-+ "SendIocInit failed\n", ioc->name));
- return -EFAULT;
- }
- ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+- return -EFAULT;
+- }
+- ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
- "downloadboot: SendIocInit successful\n",
- ioc->name));
+ "SendIocInit successful\n", ioc->name));
- } else {
- mdelay (10);
- }
+- }
+- ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+- "downloadboot failed! IocState=%x\n",ioc->name, ioc_state));
+ ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "looking for READY STATE: doorbell=%x count=%d\n",
+ ioc->name, doorbell, count));
+ msleep(1000);
+ else
+ mdelay(1000);
- }
-- ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-- "downloadboot failed! IocState=%x\n",ioc->name, ioc_state));
++ }
+ ddlprintk(ioc, printk(MYIOC_s_WARN_FMT
+ "downloadboot failed! count=%d\n", ioc->name, count));
return -EFAULT;
}
-@@ -3618,7 +3841,7 @@ KickStart(MPT_ADAPTER *ioc, int force, i
+@@ -3618,7 +3841,7 @@
u32 ioc_state=0;
int cnt,cntdn;
if (ioc->bus_type == SPI) {
/* Always issue a Msg Unit Reset first. This will clear some
* SCSI bus hang conditions.
-@@ -3636,15 +3859,20 @@ KickStart(MPT_ADAPTER *ioc, int force, i
+@@ -3636,15 +3859,20 @@
if (hard_reset_done < 0)
return hard_reset_done;
return hard_reset_done;
}
if (sleepFlag == CAN_SLEEP) {
-@@ -3655,7 +3883,7 @@ KickStart(MPT_ADAPTER *ioc, int force, i
+@@ -3655,7 +3883,7 @@
}
dinitprintk(ioc, printk(MYIOC_s_ERR_FMT "Failed to come READY after reset! IocState=%x\n",
return -1;
}
-@@ -3682,25 +3910,42 @@ static int
+@@ -3682,24 +3910,41 @@
mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag)
{
u32 diag0val;
msleep(1);
else
mdelay(1);
-
++
+ /*
+ * Call each currently registered protocol IOC reset handler
+ * with pre-reset indication.
+ (*(MptResetHandlers[cb_idx]))
+ (ioc, MPT_IOC_PRE_RESET);
+ }
-+
+
for (count = 0; count < 60; count ++) {
doorbell = CHIPREG_READ32(&ioc->chip->Doorbell);
- doorbell &= MPI_IOC_STATE_MASK;
-@@ -3709,9 +3954,15 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3709,9 +3954,15 @@
"looking for READY STATE: doorbell=%x"
" count=%d\n",
ioc->name, doorbell, count));
/* wait 1 sec */
if (sleepFlag == CAN_SLEEP)
-@@ -3719,16 +3970,22 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3719,16 +3970,22 @@
else
mdelay(1000);
}
ioc->name, diag0val, diag1val));
}
-@@ -3748,11 +4005,10 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3748,11 +4005,10 @@
CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE);
/* wait 100 msec */
count++;
if (count > 20) {
-@@ -3764,14 +4020,16 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3764,14 +4020,16 @@
diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
- dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Wrote magic DiagWriteEn sequence (%x)\n",
- ioc->name, diag0val));
+- }
+-
+- if (ioc->debug_level & MPT_DEBUG) {
+ drsprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "Wrote magic DiagWriteEn sequence (%x)\n",
+ ioc->name, diag0val));
- }
-
-- if (ioc->debug_level & MPT_DEBUG) {
++ }
++
+ if (ioc->debug_level & MPT_DEBUG_RESET) {
if (ioc->alt_ioc)
diag1val = CHIPREG_READ32(&ioc->alt_ioc->chip->Diagnostic);
ioc->name, diag0val, diag1val));
}
/*
-@@ -3787,8 +4045,8 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3787,8 +4045,8 @@
*/
CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val | MPI_DIAG_RESET_ADAPTER);
hard_reset_done = 1;
/*
* Call each currently registered protocol IOC reset handler
-@@ -3796,25 +4054,14 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3796,25 +4054,14 @@
* NOTE: If we're doing _IOC_BRINGUP, there can be no
* MptResetHandlers[] registered yet.
*/
- r += mpt_signal_reset(cb_idx, ioc->alt_ioc, MPT_IOC_PRE_RESET);
- }
- }
+- }
+- /* FIXME? Examine results here? */
+ for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) {
+ if (MptResetHandlers[cb_idx]) {
+ mpt_signal_reset(cb_idx, ioc,
+ if (ioc->alt_ioc)
+ mpt_signal_reset(cb_idx,
+ ioc->alt_ioc, MPT_IOC_PRE_RESET);
- }
-- /* FIXME? Examine results here? */
++ }
}
if (ioc->cached_fw)
-@@ -3834,20 +4081,19 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3834,20 +4081,19 @@
break;
}
} else {
/* Wait for FW to reload and for board
* to go to the READY state.
-@@ -3859,25 +4105,39 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3859,25 +4105,39 @@
doorbell = CHIPREG_READ32(&ioc->chip->Doorbell);
doorbell &= MPI_IOC_STATE_MASK;
+ " count=%d\n", ioc->name, doorbell, count));
+
+ if (doorbell == MPI_IOC_STATE_READY)
-+ break;
+ break;
+- }
+
+ /*
+ * Early out for hard fault
+ */
+ if (count && doorbell == MPI_IOC_STATE_FAULT)
- break;
-- }
++ break;
/* wait 1 sec */
- if (sleepFlag == CAN_SLEEP) {
+ else
mdelay (1000);
- }
- }
+- }
++ }
+
+ if (doorbell != MPI_IOC_STATE_READY)
+ printk(MYIOC_s_ERR_FMT "Failed to come READY "
ioc->name, diag0val, diag1val));
}
-@@ -3898,11 +4158,10 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3898,11 +4158,10 @@
CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE);
/* wait 100 msec */
count++;
if (count > 20) {
-@@ -3933,10 +4192,11 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3933,10 +4192,11 @@
return -3;
}
ioc->name, diag0val, diag1val));
}
-@@ -3973,7 +4233,7 @@ SendIocReset(MPT_ADAPTER *ioc, u8 reset_
+@@ -3973,7 +4233,7 @@
drsprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Sending IOC reset(0x%02x)!\n",
ioc->name, reset_type));
CHIPREG_WRITE32(&ioc->chip->Doorbell, reset_type<<MPI_DOORBELL_FUNCTION_SHIFT);
return r;
/* FW ACK'd request, wait for READY state
-@@ -3988,22 +4248,19 @@ SendIocReset(MPT_ADAPTER *ioc, u8 reset_
+@@ -3988,22 +4248,19 @@
if (sleepFlag != CAN_SLEEP)
count *= 10;
msleep(1);
} else {
- mdelay (1); /* 1 msec delay */
-+ mdelay(1); /* 1 msec delay */
- }
- }
-
+- }
+- }
+-
- /* TODO!
- * Cleanup all event stuff for this IOC; re-issue EventNotification
- * request if needed.
- */
++ mdelay(1); /* 1 msec delay */
++ }
++ }
++
if (ioc->facts.Function)
ioc->facts.EventState = 0;
-@@ -4059,24 +4316,29 @@ initChainBuffers(MPT_ADAPTER *ioc)
+@@ -4059,24 +4316,29 @@
* num_sge = num sge in request frame + last chain buffer
* scale = num sge per chain buffer if no chain element
*/
- scale = ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32));
- if (sizeof(dma_addr_t) == sizeof(u64))
- num_sge = scale + (ioc->req_sz - 60) / (sizeof(dma_addr_t) + sizeof(u32));
+- else
+- num_sge = 1+ scale + (ioc->req_sz - 64) / (sizeof(dma_addr_t) + sizeof(u32));
+-
+- if (sizeof(dma_addr_t) == sizeof(u64)) {
+ scale = ioc->req_sz / ioc->SGE_size;
+ if (ioc->sg_addr_size == sizeof(u64))
+ num_sge = scale + (ioc->req_sz - 60) / ioc->SGE_size;
- else
-- num_sge = 1+ scale + (ioc->req_sz - 64) / (sizeof(dma_addr_t) + sizeof(u32));
++ else
+ num_sge = 1 + scale + (ioc->req_sz - 64) / ioc->SGE_size;
-
-- if (sizeof(dma_addr_t) == sizeof(u64)) {
++
+ if (ioc->sg_addr_size == sizeof(u64)) {
numSGE = (scale - 1) * (ioc->facts.MaxChainDepth-1) + scale +
- (ioc->req_sz - 60) / (sizeof(dma_addr_t) + sizeof(u32));
num_chain = 1;
while (numSGE - num_sge > 0) {
-@@ -4130,13 +4392,36 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
+@@ -4130,12 +4392,35 @@
dma_addr_t alloc_dma;
u8 *mem;
int i, reply_sz, sz, total_size, num_chain;
+ u64 dma_mask;
-
-- /* Prime reply FIFO... */
++
+ dma_mask = 0;
-+ /* Prime reply FIFO... */
+ /* Prime reply FIFO... */
+-
if (ioc->reply_frames == NULL) {
if ( (num_chain = initChainBuffers(ioc)) < 0)
return -1;
-
++
+ /*
+ * 1078 errata workaround for the 36GB limitation
+ */
+ ioc->name));
+ }
+ }
-+
+
total_size = reply_sz = (ioc->reply_sz * ioc->reply_depth);
dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ReplyBuffer sz=%d bytes, ReplyDepth=%d\n",
- ioc->name, ioc->reply_sz, ioc->reply_depth));
-@@ -4274,9 +4559,16 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
+@@ -4274,9 +4559,16 @@
alloc_dma += ioc->reply_sz;
}
if (ioc->alloc != NULL) {
sz = ioc->alloc_sz;
pci_free_consistent(ioc->pcidev,
-@@ -4293,6 +4585,13 @@ out_fail:
+@@ -4293,6 +4585,13 @@
ioc->sense_buf_pool, ioc->sense_buf_pool_dma);
ioc->sense_buf_pool = NULL;
}
return -1;
}
-@@ -4481,18 +4780,18 @@ WaitForDoorbellInt(MPT_ADAPTER *ioc, int
+@@ -4481,18 +4780,18 @@
cntdn = 1000 * howlong;
if (sleepFlag == CAN_SLEEP) {
while (--cntdn) {
count++;
}
}
-@@ -4651,10 +4950,6 @@ GetLanConfigPages(MPT_ADAPTER *ioc)
+@@ -4651,10 +4950,6 @@
pci_free_consistent(ioc->pcidev, data_sz, (u8 *) ppage0_alloc, page0_dma);
}
-@@ -4695,11 +4990,6 @@ GetLanConfigPages(MPT_ADAPTER *ioc)
+@@ -4695,11 +4990,6 @@
pci_free_consistent(ioc->pcidev, data_sz, (u8 *) ppage1_alloc, page1_dma);
}
return rc;
-@@ -4719,8 +5009,6 @@ GetLanConfigPages(MPT_ADAPTER *ioc)
+@@ -4719,8 +5009,6 @@
*
* Returns 0 for success, non-zero error
*/
int
mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode)
{
-@@ -4728,7 +5016,14 @@ mptbase_sas_persist_operation(MPT_ADAPTE
+@@ -4728,7 +5016,14 @@
SasIoUnitControlReply_t *sasIoUnitCntrReply;
MPT_FRAME_HDR *mf = NULL;
MPIHeader_t *mpi_hdr;
+-
+ int ret = 0;
+ unsigned long timeleft;
+
+ mutex_lock(&ioc->mptbase_cmds.mutex);
-
++
+ /* init the internal cmd struct */
+ memset(ioc->mptbase_cmds.reply, 0 , MPT_DEFAULT_FRAME_SIZE);
+ INITIALIZE_MGMT_STATUS(ioc->mptbase_cmds.status)
/* insure garbage is not sent to fw */
switch(persist_opcode) {
-@@ -4738,8 +5033,8 @@ mptbase_sas_persist_operation(MPT_ADAPTE
+@@ -4738,8 +5033,8 @@
break;
default:
}
printk("%s: persist_opcode=%x\n",__func__, persist_opcode);
-@@ -4748,7 +5043,8 @@ mptbase_sas_persist_operation(MPT_ADAPTE
+@@ -4748,7 +5043,8 @@
*/
if ((mf = mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) {
printk("%s: no msg frames!\n",__func__);
}
mpi_hdr = (MPIHeader_t *) mf;
-@@ -4758,27 +5054,43 @@ mptbase_sas_persist_operation(MPT_ADAPTE
+@@ -4758,27 +5054,43 @@
sasIoUnitCntrReq->MsgContext = mpi_hdr->MsgContext;
sasIoUnitCntrReq->Operation = persist_opcode;
sasIoUnitCntrReply->IOCLogInfo);
- return -1;
- }
+-
+- printk("%s: success\n",__func__);
+- return 0;
+ printk(KERN_WARNING "%s: failed\n", __func__);
+ ret = -1;
+ } else
+ printk(KERN_INFO "%s: success\n", __func__);
+ out:
-
-- printk("%s: success\n",__func__);
-- return 0;
++
+ CLEAR_MGMT_STATUS(ioc->mptbase_cmds.status)
+ mutex_unlock(&ioc->mptbase_cmds.mutex);
+ return ret;
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -5051,8 +5363,8 @@ mpt_GetScsiPortSettings(MPT_ADAPTER *ioc
+@@ -5051,8 +5363,8 @@
ioc->spi_data.busType = MPT_HOST_BUS_UNKNOWN;
rc = 1;
ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
} else {
/* Save the Port Page 0 data
*/
-@@ -5246,9 +5558,73 @@ mpt_readScsiDevicePageHeaders(MPT_ADAPTE
+@@ -5246,9 +5558,73 @@
return 0;
}
+-/**
+- * mpt_inactive_raid_list_free - This clears this link list.
+- * @ioc : pointer to per adapter structure
+static void
+mpt_read_ioc_pg_6(MPT_ADAPTER *ioc)
+{
+ pci_free_consistent(ioc->pcidev, iocpage6sz, pIoc6, ioc6_dma);
+}
+
- /**
-- * mpt_inactive_raid_list_free - This clears this link list.
-- * @ioc : pointer to per adapter structure
++/**
+ * mpt_inactive_raid_list_free - This clears this link list.
+ * @ioc : pointer to per adapter structure
+ *
**/
static void
mpt_inactive_raid_list_free(MPT_ADAPTER *ioc)
-@@ -5268,11 +5644,13 @@ mpt_inactive_raid_list_free(MPT_ADAPTER
+@@ -5268,11 +5644,13 @@
}
/**
**/
static void
mpt_inactive_raid_volumes(MPT_ADAPTER *ioc, u8 channel, u8 id)
-@@ -5281,10 +5659,12 @@ mpt_inactive_raid_volumes(MPT_ADAPTER *i
+@@ -5281,10 +5659,12 @@
ConfigPageHeader_t hdr;
dma_addr_t dma_handle;
pRaidVolumePage0_t buffer = NULL;
memset(&cfg, 0 , sizeof(CONFIGPARMS));
memset(&hdr, 0 , sizeof(ConfigPageHeader_t));
-@@ -5329,8 +5709,31 @@ mpt_inactive_raid_volumes(MPT_ADAPTER *i
+@@ -5329,8 +5709,31 @@
buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0)
continue;
continue;
component_info->volumeID = id;
-@@ -5363,7 +5766,8 @@ mpt_inactive_raid_volumes(MPT_ADAPTER *i
+@@ -5363,7 +5766,8 @@
* -ENOMEM if pci_alloc failed
**/
int
{
CONFIGPARMS cfg;
ConfigPageHeader_t hdr;
-@@ -5373,7 +5777,9 @@ mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc,
+@@ -5373,7 +5777,9 @@
memset(&cfg, 0 , sizeof(CONFIGPARMS));
memset(&hdr, 0 , sizeof(ConfigPageHeader_t));
+-
+ memset(phys_disk, 0, sizeof(RaidPhysDiskPage0_t));
-
++
+ hdr.PageVersion = MPI_RAIDPHYSDISKPAGE0_PAGEVERSION;
hdr.PageType = MPI_CONFIG_PAGETYPE_RAID_PHYSDISK;
cfg.cfghdr.hdr = &hdr;
cfg.physAddr = -1;
-@@ -5420,29 +5826,211 @@ mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc,
+@@ -5420,9 +5826,74 @@
}
/**
+ * mpt_raid_phys_disk_get_num_paths - returns number paths associated to this phys_num
+ * @ioc: Pointer to a Adapter Structure
+ * @phys_disk_num: io unit unique phys disk num generated by the ioc
- *
- * Return:
-- * 0 on success
-- * -EFAULT if read of config page header fails or data pointer not NULL
-- * -ENOMEM if pci_alloc failed
++ *
++ * Return:
+ * returns number paths
- **/
- int
--mpt_findImVolumes(MPT_ADAPTER *ioc)
++ **/
++int
+mpt_raid_phys_disk_get_num_paths(MPT_ADAPTER *ioc, u8 phys_disk_num)
- {
-- IOCPage2_t *pIoc2;
-- u8 *mem;
-- dma_addr_t ioc2_dma;
-- CONFIGPARMS cfg;
-- ConfigPageHeader_t header;
-- int rc = 0;
-- int iocpage2sz;
-- int i;
--
-- if (!ioc->ir_firmware)
-- return 0;
++{
+ CONFIGPARMS cfg;
+ ConfigPageHeader_t hdr;
+ dma_addr_t dma_handle;
+ * @ioc: Pointer to a Adapter Structure
+ * @phys_disk_num: io unit unique phys disk num generated by the ioc
+ * @phys_disk: requested payload data returned
-+ *
-+ * Return:
-+ * 0 on success
-+ * -EFAULT if read of config page header fails or data pointer not NULL
-+ * -ENOMEM if pci_alloc failed
-+ **/
-+int
+ *
+ * Return:
+ * 0 on success
+@@ -5430,6 +5901,123 @@
+ * -ENOMEM if pci_alloc failed
+ **/
+ int
+mpt_raid_phys_disk_pg1(MPT_ADAPTER *ioc, u8 phys_disk_num,
+ RaidPhysDiskPage1_t *phys_disk)
+{
+ * -ENOMEM if pci_alloc failed
+ **/
+int
-+mpt_findImVolumes(MPT_ADAPTER *ioc)
-+{
-+ IOCPage2_t *pIoc2;
-+ u8 *mem;
-+ dma_addr_t ioc2_dma;
-+ CONFIGPARMS cfg;
-+ ConfigPageHeader_t header;
-+ int rc = 0;
-+ int iocpage2sz;
-+ int i;
-+
-+ if (!ioc->ir_firmware)
-+ return 0;
-
- /* Free the old page
- */
-@@ -5482,16 +6070,22 @@ mpt_findImVolumes(MPT_ADAPTER *ioc)
+ mpt_findImVolumes(MPT_ADAPTER *ioc)
+ {
+ IOCPage2_t *pIoc2;
+@@ -5482,15 +6070,21 @@
if (!mem)
goto out;
+ sizeof(ConfigPageIoc2RaidVol_t), mpt_sort_ioc_pg2, NULL);
memcpy(mem, (u8 *)pIoc2, iocpage2sz);
ioc->raid_data.pIocPg2 = (IOCPage2_t *) mem;
-
-- mpt_read_ioc_pg_3(ioc);
-
+- mpt_read_ioc_pg_3(ioc);
+
for (i = 0; i < pIoc2->NumActiveVolumes ; i++)
mpt_inactive_raid_volumes(ioc,
pIoc2->RaidVolume[i].VolumeBus,
pIoc2->RaidVolume[i].VolumeID);
-
++
+ mpt_read_ioc_pg_3(ioc);
+ mpt_read_ioc_pg_6(ioc);
-+
+
out:
pci_free_consistent(ioc->pcidev, iocpage2sz, pIoc2, ioc2_dma);
-
-@@ -5651,6 +6245,9 @@ mpt_read_ioc_pg_1(MPT_ADAPTER *ioc)
+@@ -5651,6 +6245,9 @@
cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
if (mpt_config(ioc, &cfg) == 0) {
tmp = le32_to_cpu(pIoc1->Flags) & MPI_IOCPAGE1_REPLY_COALESCING;
if (tmp == MPI_IOCPAGE1_REPLY_COALESCING) {
tmp = le32_to_cpu(pIoc1->CoalescingTimeout);
-@@ -5671,24 +6268,22 @@ mpt_read_ioc_pg_1(MPT_ADAPTER *ioc)
+@@ -5671,24 +6268,22 @@
cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM;
if (mpt_config(ioc, &cfg) == 0) {
} else {
- dprintk(ioc, printk(MYIOC_s_DEBUG_FMT
- "Reset NVRAM Coalescing Timeout Failed\n",
-- ioc->name));
+ dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Reset NVRAM Coalescing Timeout Failed\n",
+ ioc->name));
- }
-
- } else {
++ }
++
++ } else {
++ dprintk(ioc, printk(MYIOC_s_WARN_FMT "Reset of Current Coalescing Timeout Failed!\n",
+ ioc->name));
+- }
+-
+- } else {
- dprintk(ioc, printk(MYIOC_s_WARN_FMT
- "Reset of Current Coalescing Timeout Failed!\n",
- ioc->name));
-+ dprintk(ioc, printk(MYIOC_s_WARN_FMT "Reset of Current Coalescing Timeout Failed!\n",
-+ ioc->name));
}
}
}
}
-@@ -5745,30 +6340,28 @@ mpt_get_manufacturing_pg_0(MPT_ADAPTER *
+@@ -5745,30 +6340,28 @@
* SendEventNotification - Send EventNotification (on or off) request to adapter
* @ioc: Pointer to MPT_ADAPTER structure
* @EvSwitch: Event switch flags
-+ * @sleepFlag: Specifies whether the process can sleep
- */
- static int
+- */
+-static int
-SendEventNotification(MPT_ADAPTER *ioc, u8 EvSwitch)
-+SendEventNotification(MPT_ADAPTER *ioc, u8 EvSwitch, int sleepFlag)
- {
+-{
- EventNotification_t *evnp;
-+ EventNotification_t evn;
-+ MPIDefaultReply_t reply_buf;
-
+-
- evnp = (EventNotification_t *) mpt_get_msg_frame(mpt_base_index, ioc);
- if (evnp == NULL) {
- devtverboseprintk(ioc, printk(MYIOC_s_WARN_FMT "Unable to allocate event request frame!\n",
- memset(evnp, 0, sizeof(*evnp));
-
- devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Sending EventNotification (%d) request %p\n", ioc->name, EvSwitch, evnp));
-+ memset(&evn, 0, sizeof(EventNotification_t));
-+ memset(&reply_buf, 0, sizeof(MPIDefaultReply_t));
-
+-
- evnp->Function = MPI_FUNCTION_EVENT_NOTIFICATION;
- evnp->ChainOffset = 0;
- evnp->MsgFlags = 0;
- evnp->Switch = EvSwitch;
+-
+- mpt_put_msg_frame(mpt_base_index, ioc, (MPT_FRAME_HDR *)evnp);
+-
+- return 0;
++ * @sleepFlag: Specifies whether the process can sleep
++ */
++static int
++SendEventNotification(MPT_ADAPTER *ioc, u8 EvSwitch, int sleepFlag)
++{
++ EventNotification_t evn;
++ MPIDefaultReply_t reply_buf;
++
++ memset(&evn, 0, sizeof(EventNotification_t));
++ memset(&reply_buf, 0, sizeof(MPIDefaultReply_t));
++
+ evn.Function = MPI_FUNCTION_EVENT_NOTIFICATION;
+ evn.Switch = EvSwitch;
+ evn.MsgContext = cpu_to_le32(mpt_base_index << 16);
-
-- mpt_put_msg_frame(mpt_base_index, ioc, (MPT_FRAME_HDR *)evnp);
++
+ devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "Sending EventNotification (%d) request %p\n",
+ ioc->name, EvSwitch, &evn));
-
-- return 0;
++
+ return mpt_handshake_req_reply_wait(ioc, sizeof(EventNotification_t),
+ (u32 *)&evn, sizeof(MPIDefaultReply_t), (u16 *)&reply_buf, 30,
+ sleepFlag);
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -5821,30 +6414,57 @@ int
+@@ -5821,30 +6414,57 @@
mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *pCfg)
{
Config_t *pReq;
+ ConfigReply_t *pReply;
ConfigExtendedPageHeader_t *pExtHdr = NULL;
MPT_FRAME_HDR *mf;
-- unsigned long flags;
-- int ii, rc;
+ int ii;
- int flagsLength;
-- int in_isr;
++ int flagsLength;
+ long timeout;
+ int ret;
+ u8 page_type = 0, extend_page;
+ unsigned long timeleft;
-+ unsigned long flags;
-+ u8 issue_hard_reset = 0;
-+ u8 retry_count = 0;
-
+ unsigned long flags;
+- int ii, rc;
+- int flagsLength;
+- int in_isr;
+-
- /* Prevent calling wait_event() (below), if caller happens
- * to be in ISR context, because that is fatal!
- */
- if (in_isr) {
- dcprintk(ioc, printk(MYIOC_s_WARN_FMT "Config request not allowed in ISR context!\n",
- ioc->name));
++ u8 issue_hard_reset = 0;
++ u8 retry_count = 0;
++
+ if (in_interrupt())
return -EPERM;
+- }
+
+ /* don't send a config page during diag reset */
+ spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
+ ioc->name, __func__, ioc->active,
+ mpt_GetIocState(ioc, 0)));
+ return -EFAULT;
- }
-
++ }
++
+ retry_config:
+ mutex_lock(&ioc->mptbase_cmds.mutex);
+ /* init the internal cmd struct */
+ memset(ioc->mptbase_cmds.reply, 0 , MPT_DEFAULT_FRAME_SIZE);
+ INITIALIZE_MGMT_STATUS(ioc->mptbase_cmds.status)
-+
+
/* Get and Populate a free Frame
*/
if ((mf = mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) {
- dcprintk(ioc, printk(MYIOC_s_WARN_FMT "mpt_config: no msg frames!\n",
- ioc->name));
- return -EAGAIN;
+- }
+ dcprintk(ioc, printk(MYIOC_s_WARN_FMT
+ "mpt_config: no msg frames!\n", ioc->name));
+ ret = -EAGAIN;
+ goto out;
- }
++ }
+
pReq = (Config_t *)mf;
pReq->Action = pCfg->action;
pReq->Reserved = 0;
-@@ -5870,7 +6490,9 @@ mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS
+@@ -5870,7 +6490,9 @@
pReq->ExtPageType = pExtHdr->ExtPageType;
pReq->Header.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
pReq->Header.PageLength = 0;
}
-@@ -5883,78 +6505,90 @@ mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS
+@@ -5883,78 +6505,90 @@
else
flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ;
-
- dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Sending Config request type %d, page %d and action %d\n",
- ioc->name, pReq->Header.PageType, pReq->Header.PageNumber, pReq->Action));
-+ page_type = pReq->Header.PageType;
-+ extend_page = 0;
- }
-
+- }
+-
- mpt_add_sge((char *)&pReq->PageBufferSGE, flagsLength, pCfg->physAddr);
-
- /* Append pCfg pointer to end of mf
- pCfg->timer.expires = jiffies + HZ*10;
- else
- pCfg->timer.expires = jiffies + HZ*pCfg->timeout;
-+ dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+ "Sending Config request type 0x%x, page 0x%x and action %d\n",
-+ ioc->name, page_type, pReq->Header.PageNumber, pReq->Action));
-
+-
- /* Add to end of Q, set timer and then issue this command */
- spin_lock_irqsave(&ioc->FreeQlock, flags);
- list_add_tail(&pCfg->linkage, &ioc->configQ);
- spin_unlock_irqrestore(&ioc->FreeQlock, flags);
-
- add_timer(&pCfg->timer);
++ page_type = pReq->Header.PageType;
++ extend_page = 0;
++ }
++
++ dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++ "Sending Config request type 0x%x, page 0x%x and action %d\n",
++ ioc->name, page_type, pReq->Header.PageNumber, pReq->Action));
++
+ ioc->add_sge((char *)&pReq->PageBufferSGE, flagsLength, pCfg->physAddr);
+ timeout = (pCfg->timeout < 15) ? HZ*15 : HZ*pCfg->timeout;
mpt_put_msg_frame(mpt_base_index, ioc, mf);
- /* mf has been freed - do not access */
-
- rc = pCfg->status;
+-
+- return rc;
+-}
+-
+-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+-/**
+- * mpt_timer_expired - Callback for timer process.
+- * Used only internal config functionality.
+- * @data: Pointer to MPT_SCSI_HOST recast as an unsigned long
+- */
+-static void
+-mpt_timer_expired(unsigned long data)
+-{
+- MPT_ADAPTER *ioc = (MPT_ADAPTER *) data;
+-
+- dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mpt_timer_expired! \n", ioc->name));
+-
+- /* Perform a FW reload */
+- if (mpt_HardResetHandler(ioc, NO_SLEEP) < 0)
+- printk(MYIOC_s_WARN_FMT "Firmware Reload FAILED!\n", ioc->name);
+-
+- /* No more processing.
+- * Hard reset clean-up will wake up
+- * process and free all resources.
+- */
+- dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mpt_timer_expired complete!\n", ioc->name));
+-
+- return;
+ timeleft =
+ wait_for_completion_timeout(&ioc->mptbase_cmds.done, timeout);
+ if (!(ioc->mptbase_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
+ issue_hard_reset = 1;
+ goto out;
+ }
-
-- return rc;
--}
++
+ if (!(ioc->mptbase_cmds.status & MPT_MGMT_STATUS_RF_VALID)) {
+ ret = -1;
+ goto out;
+ pCfg->cfghdr.hdr->PageLength = pReply->Header.PageLength;
+ pCfg->cfghdr.hdr->PageNumber = pReply->Header.PageNumber;
+ pCfg->cfghdr.hdr->PageType = pReply->Header.PageType;
-
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--/**
-- * mpt_timer_expired - Callback for timer process.
-- * Used only internal config functionality.
-- * @data: Pointer to MPT_SCSI_HOST recast as an unsigned long
-- */
--static void
--mpt_timer_expired(unsigned long data)
--{
-- MPT_ADAPTER *ioc = (MPT_ADAPTER *) data;
++
+ }
-
-- dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mpt_timer_expired! \n", ioc->name));
++
+ if (retry_count)
+ printk(MYIOC_s_INFO_FMT
+ "Retry completed ret=0x%x timeleft=%ld\n",
+ ioc->name, ret, timeleft);
-
-- /* Perform a FW reload */
-- if (mpt_HardResetHandler(ioc, NO_SLEEP) < 0)
-- printk(MYIOC_s_WARN_FMT "Firmware Reload FAILED!\n", ioc->name);
++
+ dcprintk(ioc, printk(KERN_DEBUG "IOCStatus=%04xh, IOCLogInfo=%08xh\n",
+ ret, le32_to_cpu(pReply->IOCLogInfo)));
-
-- /* No more processing.
-- * Hard reset clean-up will wake up
-- * process and free all resources.
-- */
-- dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mpt_timer_expired complete!\n", ioc->name));
++
+ out:
-
-- return;
++
+ CLEAR_MGMT_STATUS(ioc->mptbase_cmds.status)
+ mutex_unlock(&ioc->mptbase_cmds.mutex);
+ if (issue_hard_reset) {
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -5968,41 +6602,34 @@ mpt_timer_expired(unsigned long data)
+@@ -5968,41 +6602,34 @@
static int
mpt_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
{
- pCfg->status = MPT_CONFIG_ERROR;
- pCfg->wait_done = 1;
- wake_up(&mpt_waitq);
+- }
+- spin_unlock_irqrestore(&ioc->FreeQlock, flags);
+ switch (reset_phase) {
+ case MPT_IOC_SETUP_RESET:
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ ioc->taskmgmt_cmds.status
+ |= MPT_MGMT_STATUS_DID_IOCRESET;
+ complete(&ioc->taskmgmt_cmds.done);
- }
-- spin_unlock_irqrestore(&ioc->FreeQlock, flags);
++ }
+ break;
+ default:
+ break;
}
return 1; /* currently means nothing really */
-@@ -6011,10 +6638,6 @@ mpt_ioc_reset(MPT_ADAPTER *ioc, int rese
+@@ -6010,10 +6637,6 @@
+
#ifdef CONFIG_PROC_FS /* { */
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/*
- * procfs (%MPT_PROCFS_MPTBASEDIR/...) support stuff...
- */
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/**
* procmpt_create - Create %MPT_PROCFS_MPTBASEDIR entries.
- *
-@@ -6251,7 +6874,6 @@ procmpt_iocinfo_read(char *buf, char **s
+@@ -6251,7 +6874,6 @@
#endif /* CONFIG_PROC_FS } */
static void
mpt_get_fw_exp_ver(char *buf, MPT_ADAPTER *ioc)
{
-@@ -6319,6 +6941,223 @@ mpt_print_ioc_summary(MPT_ADAPTER *ioc,
+@@ -6319,6 +6941,223 @@
/*
* Reset Handling
*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/**
* mpt_HardResetHandler - Generic reset handler
-@@ -6339,8 +7178,10 @@ mpt_print_ioc_summary(MPT_ADAPTER *ioc,
+@@ -6339,8 +7178,10 @@
int
mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag)
{
dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "HardResetHandler Entered!\n", ioc->name));
#ifdef MFCNT
-@@ -6348,67 +7189,85 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, i
+@@ -6348,67 +7189,85 @@
printk("MF count 0x%x !\n", ioc->mfcnt);
#endif
- spin_lock_irqsave(&ioc->diagLock, flags);
- if ((ioc->diagPending) || (ioc->alt_ioc && ioc->alt_ioc->diagPending)){
- spin_unlock_irqrestore(&ioc->diagLock, flags);
-+ spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
-+ if (ioc->ioc_reset_in_progress) {
-+ spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
- return 0;
+- return 0;
- } else {
- ioc->diagPending = 1;
- }
+- }
- spin_unlock_irqrestore(&ioc->diagLock, flags);
+-
+- /* FIXME: If do_ioc_recovery fails, repeat....
+- */
++ spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
++ if (ioc->ioc_reset_in_progress) {
++ spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
++ return 0;
++ }
+ ioc->ioc_reset_in_progress = 1;
+ if (ioc->alt_ioc)
+ ioc->alt_ioc->ioc_reset_in_progress = 1;
+ spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
-
-- /* FIXME: If do_ioc_recovery fails, repeat....
-- */
++
/* The SCSI driver needs to adjust timeouts on all current
* commands prior to the diagnostic reset being issued.
- r += mpt_signal_reset(cb_idx, ioc->alt_ioc, MPT_IOC_SETUP_RESET);
- }
- }
+- }
+- }
+-
+ for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) {
+ if (MptResetHandlers[cb_idx]) {
+ mpt_signal_reset(cb_idx, ioc, MPT_IOC_SETUP_RESET);
+ if (ioc->alt_ioc)
+ mpt_signal_reset(cb_idx,
+ ioc->alt_ioc, MPT_IOC_SETUP_RESET);
- }
- }
-
++ }
++ }
++
+ time_count = jiffies;
if ((rc = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_RECOVER, sleepFlag)) != 0) {
- printk(MYIOC_s_WARN_FMT "Cannot recover rc = %d!\n", ioc->name, rc);
-+ printk(KERN_WARNING MYNAM
-+ ": WARNING - (%d) Cannot recover %s\n", rc, ioc->name);
-+ } else {
-+ if (ioc->hard_resets < -1)
-+ ioc->hard_resets++;
- }
+- }
- ioc->reload_fw = 0;
- if (ioc->alt_ioc)
- ioc->alt_ioc->reload_fw = 0;
-
+-
- spin_lock_irqsave(&ioc->diagLock, flags);
- ioc->diagPending = 0;
- if (ioc->alt_ioc)
- ioc->alt_ioc->diagPending = 0;
- spin_unlock_irqrestore(&ioc->diagLock, flags);
+-
+- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "HardResetHandler rc = %d!\n", ioc->name, rc));
+-
+- return rc;
+-}
+-
+-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+-static void
+-EventDescriptionStr(u8 event, u32 evData0, char *evStr)
++ printk(KERN_WARNING MYNAM
++ ": WARNING - (%d) Cannot recover %s\n", rc, ioc->name);
++ } else {
++ if (ioc->hard_resets < -1)
++ ioc->hard_resets++;
++ }
++
+ spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
+ ioc->ioc_reset_in_progress = 0;
+ ioc->taskmgmt_quiesce_io = 0;
+ ioc->alt_ioc->taskmgmt_in_progress = 0;
+ }
+ spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
-
-- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "HardResetHandler rc = %d!\n", ioc->name, rc));
++
+ for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) {
+ if (MptResetHandlers[cb_idx]) {
+ mpt_signal_reset(cb_idx, ioc, MPT_IOC_POST_RESET);
+ ioc->alt_ioc, MPT_IOC_POST_RESET);
+ }
+ }
-
++
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "HardResetHandler: completed (%d seconds): %s\n",
+ ioc->name, jiffies_to_msecs(jiffies - time_count)/1000,
+ ((rc == 0) ? "SUCCESS" : "FAILED")));
- return rc;
- }
-
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
++ return rc;
++}
++
+#ifdef CONFIG_FUSION_LOGGING
- static void
--EventDescriptionStr(u8 event, u32 evData0, char *evStr)
++static void
+mpt_display_event_info(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply)
{
char *ds = NULL;
switch(event) {
case MPI_EVENT_NONE:
-@@ -6442,9 +7301,9 @@ EventDescriptionStr(u8 event, u32 evData
+@@ -6442,9 +7301,9 @@
if (evData0 == MPI_EVENT_LOOP_STATE_CHANGE_LIP)
ds = "Loop State(LIP) Change";
else if (evData0 == MPI_EVENT_LOOP_STATE_CHANGE_LPE)
- ds = "Loop State(LPE) Change"; /* ??? */
-+ ds = "Loop State(LPE) Change";
- else
+- else
- ds = "Loop State(LPB) Change"; /* ??? */
++ ds = "Loop State(LPE) Change";
++ else
+ ds = "Loop State(LPB) Change";
break;
case MPI_EVENT_LOGOUT:
ds = "Logout";
-@@ -6540,6 +7399,11 @@ EventDescriptionStr(u8 event, u32 evData
+@@ -6540,6 +7399,11 @@
"SAS Device Status Change: Internal Device "
"Reset : id=%d channel=%d", id, channel);
break;
case MPI_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL:
snprintf(evStr, EVENT_DESCR_STR_SZ,
"SAS Device Status Change: Internal Task "
-@@ -6560,6 +7424,11 @@ EventDescriptionStr(u8 event, u32 evData
+@@ -6558,6 +7422,11 @@
+ case MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL:
+ snprintf(evStr, EVENT_DESCR_STR_SZ,
"SAS Device Status Change: Internal Query "
- "Task : id=%d channel=%d", id, channel);
- break;
++ "Task : id=%d channel=%d", id, channel);
++ break;
+ case MPI_EVENT_SAS_DEV_STAT_RC_ASYNC_NOTIFICATION:
+ snprintf(evStr, EVENT_DESCR_STR_SZ,
+ "SAS Device Status Change: Async Notification "
-+ "Task : id=%d channel=%d", id, channel);
-+ break;
+ "Task : id=%d channel=%d", id, channel);
+ break;
default:
- snprintf(evStr, EVENT_DESCR_STR_SZ,
- "SAS Device Status Change: Unknown: "
-@@ -6644,28 +7513,65 @@ EventDescriptionStr(u8 event, u32 evData
+@@ -6644,28 +7513,65 @@
}
case MPI_EVENT_IR2:
{
break;
default:
ds = "IR2";
-@@ -6689,25 +7595,46 @@ EventDescriptionStr(u8 event, u32 evData
+@@ -6689,25 +7595,46 @@
{
u8 phy_num = (u8)(evData0);
u8 port_num = (u8)(evData0 >> 8);
u8 reason = (u8)(evData0);
- u8 port_num = (u8)(evData0 >> 8);
- u16 handle = le16_to_cpu(evData0 >> 16);
-
+-
- snprintf(evStr, EVENT_DESCR_STR_SZ,
- "SAS Initiator Device Status Change: reason=0x%02x "
- "port=%d handle=0x%04x",
- reason, port_num, handle);
++
+ switch (reason) {
+ case MPI_EVENT_SAS_INIT_RC_ADDED:
+ ds = "SAS Initiator Status Change: Added";
break;
}
-@@ -6755,6 +7682,24 @@ EventDescriptionStr(u8 event, u32 evData
+@@ -6755,6 +7682,24 @@
break;
}
/*
* MPT base "custom" events may be added here...
*/
-@@ -6764,7 +7709,20 @@ EventDescriptionStr(u8 event, u32 evData
+@@ -6764,7 +7709,20 @@
}
if (ds)
strncpy(evStr, ds, EVENT_DESCR_STR_SZ);
+-}
+
+
+ devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ devtverboseprintk(ioc, printk(" %08x",
+ le32_to_cpu(pEventReply->Data[ii])));
+ devtverboseprintk(ioc, printk(KERN_DEBUG "\n"));
- }
++}
+#endif
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/**
-@@ -6782,37 +7740,24 @@ ProcessEventNotification(MPT_ADAPTER *io
+@@ -6782,37 +7740,24 @@
{
u16 evDataLen;
u32 evData0 = 0;
#endif
/*
-@@ -6867,13 +7812,13 @@ ProcessEventNotification(MPT_ADAPTER *io
+@@ -6867,13 +7812,13 @@
*/
for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) {
if (MptEvHandlers[cb_idx]) {
/*
* If needed, send (a single) EventAck.
-@@ -6953,8 +7898,6 @@ mpt_spi_log_info(MPT_ADAPTER *ioc, u32 l
+@@ -6953,8 +7898,6 @@
switch (info) {
case 0x00010000:
desc = "bug! MID not found";
break;
case 0x00020000:
-@@ -7149,7 +8092,6 @@ mpt_spi_log_info(MPT_ADAPTER *ioc, u32 l
+@@ -7149,7 +8092,6 @@
"Compatibility Error: IME Size Limited to < 2TB", /* 3Dh */
};
/**
* mpt_sas_log_info - Log information returned from SAS IOC.
* @ioc: Pointer to MPT_ADAPTER structure
-@@ -7229,7 +8171,6 @@ union loginfo_type {
+@@ -7229,7 +8171,6 @@
sas_loginfo.dw.code, sas_loginfo.dw.subcode);
}
/**
* mpt_iocstatus_info_config - IOCSTATUS information for config pages
* @ioc: Pointer to MPT_ADAPTER structure
-@@ -7531,8 +8472,8 @@ mpt_iocstatus_info(MPT_ADAPTER *ioc, u32
+@@ -7531,8 +8472,8 @@
if (!desc)
return;
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -7555,18 +8496,23 @@ EXPORT_SYMBOL(mpt_get_msg_frame);
+@@ -7555,18 +8496,23 @@
EXPORT_SYMBOL(mpt_put_msg_frame);
EXPORT_SYMBOL(mpt_put_msg_frame_hi_pri);
EXPORT_SYMBOL(mpt_free_msg_frame);
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/**
-@@ -7592,7 +8538,7 @@ fusion_init(void)
+@@ -7592,7 +8538,7 @@
/* Register ourselves (mptbase) in order to facilitate
* EventNotification handling.
*/
/* Register for hard reset handling callbacks.
*/
-@@ -7614,7 +8560,6 @@ fusion_init(void)
+@@ -7614,7 +8560,6 @@
static void __exit
fusion_exit(void)
{
mpt_reset_deregister(mpt_base_index);
#ifdef CONFIG_PROC_FS
-diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/drivers/message/fusion/mptbase.h
---- linux-2.6.27/drivers/message/fusion/mptbase.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptbase.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptbase.h
+--- a/drivers/message/fusion/mptbase.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptbase.h Wed May 06 16:56:21 2009 +0100
@@ -49,10 +49,6 @@
#define MPTBASE_H_INCLUDED
/*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#ifdef __KERNEL__ /* { */
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -224,7 +239,6 @@ typedef struct _ATTO_CONFIG_PAGE_SCSI_PO
+@@ -223,7 +238,6 @@
+ ATTO_DEVICE_INFO DeviceSettings[16]; /* 0Ch */
} fATTO_CONFIG_PAGE_SCSI_PORT_2, MPI_POINTER PTR_ATTO_CONFIG_PAGE_SCSI_PORT_2,
ATTO_SCSIPortPage2_t, MPI_POINTER pATTO_SCSIPortPage2_t;
-
-
+
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
- * MPT protocol driver defs...
-@@ -372,8 +386,8 @@ typedef struct _VirtTarget {
+@@ -372,8 +386,8 @@
struct scsi_target *starget;
u8 tflags;
u8 ioc_id;
u8 minSyncFactor; /* 0xFF is async */
u8 maxOffset; /* 0 if async */
u8 maxWidth; /* 0 if narrow, 1 if wide */
-@@ -381,7 +395,7 @@ typedef struct _VirtTarget {
+@@ -381,7 +395,7 @@
u8 raidVolume; /* set, if RAID Volume */
u8 type; /* byte 0 of Inquiry data */
u8 deleted; /* target in process of being removed */
} VirtTarget;
typedef struct _VirtDevice {
-@@ -427,42 +441,33 @@ do { \
+@@ -427,42 +441,33 @@
} while (0)
-/*
- * IOCTL structure and associated defines
- */
--
++#define MPT_MGMT_STATUS_RF_VALID 0x01 /* The Reply Frame is VALID */
++#define MPT_MGMT_STATUS_COMMAND_GOOD 0x02 /* Command Status GOOD */
++#define MPT_MGMT_STATUS_PENDING 0x04 /* command is pending */
++#define MPT_MGMT_STATUS_DID_IOCRESET 0x08 /* IOC Reset occurred */
++#define MPT_MGMT_STATUS_SENSE_VALID 0x10 /* valid sense info */
++#define MPT_MGMT_STATUS_TIMER_ACTIVE 0x20 /* obsolete */
++#define MPT_MGMT_STATUS_FREE_MF 0x40 /* free the mf */
+
-#define MPT_IOCTL_STATUS_DID_IOCRESET 0x01 /* IOC Reset occurred on the current*/
-#define MPT_IOCTL_STATUS_RF_VALID 0x02 /* The Reply Frame is VALID */
-#define MPT_IOCTL_STATUS_TIMER_ACTIVE 0x04 /* The timer is running */
-#define MPT_IOCTL_STATUS_COMMAND_GOOD 0x10 /* Command Status GOOD */
-#define MPT_IOCTL_STATUS_TMTIMER_ACTIVE 0x20 /* The TM timer is running */
-#define MPT_IOCTL_STATUS_TM_FAILED 0x40 /* User TM request failed */
--
+
-#define MPTCTL_RESET_OK 0x01 /* Issue Bus Reset */
--
++#define INITIALIZE_MGMT_STATUS(status) \
++ status = MPT_MGMT_STATUS_PENDING;
++#define CLEAR_MGMT_STATUS(status) \
++ status = 0;
++#define CLEAR_MGMT_PENDING_STATUS(status) \
++ status &= ~MPT_MGMT_STATUS_PENDING;
++#define SET_MGMT_MSG_CONTEXT(msg_context, value) \
++ msg_context = value;
+
-typedef struct _MPT_IOCTL {
- struct _MPT_ADAPTER *ioc;
- u8 ReplyFrame[MPT_DEFAULT_FRAME_SIZE]; /* reply frame data */
-#define MPT_SAS_MGMT_STATUS_RF_VALID 0x02 /* The Reply Frame is VALID */
-#define MPT_SAS_MGMT_STATUS_COMMAND_GOOD 0x10 /* Command Status GOOD */
-#define MPT_SAS_MGMT_STATUS_TM_FAILED 0x40 /* User TM request failed */
-+#define MPT_MGMT_STATUS_RF_VALID 0x01 /* The Reply Frame is VALID */
-+#define MPT_MGMT_STATUS_COMMAND_GOOD 0x02 /* Command Status GOOD */
-+#define MPT_MGMT_STATUS_PENDING 0x04 /* command is pending */
-+#define MPT_MGMT_STATUS_DID_IOCRESET 0x08 /* IOC Reset occurred */
-+#define MPT_MGMT_STATUS_SENSE_VALID 0x10 /* valid sense info */
-+#define MPT_MGMT_STATUS_TIMER_ACTIVE 0x20 /* obsolete */
-+#define MPT_MGMT_STATUS_FREE_MF 0x40 /* free the mf */
-+
-+
-+#define INITIALIZE_MGMT_STATUS(status) \
-+ status = MPT_MGMT_STATUS_PENDING;
-+#define CLEAR_MGMT_STATUS(status) \
-+ status = 0;
-+#define CLEAR_MGMT_PENDING_STATUS(status) \
-+ status &= ~MPT_MGMT_STATUS_PENDING;
-+#define SET_MGMT_MSG_CONTEXT(msg_context, value) \
-+ msg_context = value;
-
+-
-typedef struct _MPT_SAS_MGMT {
+typedef struct _MPT_MGMT {
struct mutex mutex;
/*
* Event Structure and define
-@@ -534,6 +539,7 @@ struct inactive_raid_component_info {
+@@ -534,6 +539,7 @@
typedef struct _RaidCfgData {
IOCPage2_t *pIocPg2; /* table of Raid Volumes */
IOCPage3_t *pIocPg3; /* table of physical disks */
struct mutex inactive_list_mutex;
struct list_head inactive_list; /* link list for physical
disk that belong in
-@@ -564,6 +570,10 @@ struct mptfc_rport_info
+@@ -564,6 +570,10 @@
u8 flags;
};
/*
* Adapter Structure - pci_dev specific. Maximum: MPT_MAX_ADAPTERS
*/
-@@ -573,6 +583,10 @@ typedef struct _MPT_ADAPTER
+@@ -573,6 +583,10 @@
int pci_irq; /* This irq */
char name[MPT_NAME_LENGTH]; /* "iocN" */
char prod_name[MPT_NAME_LENGTH]; /* "LSIFC9x9" */
char board_name[16];
char board_assembly[16];
char board_tracer[16];
-@@ -584,8 +598,9 @@ typedef struct _MPT_ADAPTER
+@@ -584,8 +598,9 @@
SYSIF_REGS __iomem *chip; /* == c8817000 (mmap) */
SYSIF_REGS __iomem *pio_chip; /* Programmed IO (downloadboot) */
u8 bus_type;
int mem_size; /* mmap memory size */
int number_of_buses;
int devices_per_bus;
-@@ -600,6 +615,10 @@ typedef struct _MPT_ADAPTER
+@@ -600,6 +615,10 @@
int reply_depth; /* Num Allocated reply frames */
int reply_sz; /* Reply frame size */
int num_chain; /* Number of chain buffers */
/* Pool of buffers for chaining. ReqToChain
* and ChainToChain track index of chain buffers.
* ChainBuffer (DMA) virt/phys addresses.
-@@ -628,31 +647,28 @@ typedef struct _MPT_ADAPTER
+@@ -628,31 +647,28 @@
dma_addr_t sense_buf_pool_dma;
u32 sense_buf_low_dma;
u8 *HostPageBuffer; /* SAS - host page buffer support */
int hs_reply_idx;
#ifndef MFCNT
u32 pad0;
-@@ -665,13 +681,17 @@ typedef struct _MPT_ADAPTER
+@@ -665,13 +681,17 @@
IOCFactsReply_t facts;
PortFactsReply_t pfacts[2];
FCPortPage0_t fc_port_page0[2];
/*
* Description: errata_flag_1064
* If a PCIX read occurs within 1 or 2 cycles after the chip receives
-@@ -682,25 +702,48 @@ typedef struct _MPT_ADAPTER
+@@ -682,25 +702,48 @@
int aen_event_read_flag; /* flag to indicate event log was read*/
u8 FirstWhoInit;
u8 upload_fw; /* If set, do a fw upload */
struct work_struct fc_setup_reset_work;
struct list_head fc_rports;
struct work_struct fc_lsc_work;
-@@ -709,14 +752,30 @@ typedef struct _MPT_ADAPTER
+@@ -709,14 +752,30 @@
struct work_struct fc_rescan_work;
char fc_rescan_work_q_name[20];
struct workqueue_struct *fc_rescan_work_q;
} MPT_ADAPTER;
/*
-@@ -753,13 +812,12 @@ typedef struct _mpt_sge {
+@@ -753,13 +812,12 @@
dma_addr_t Address;
} MptSge_t;
-#define mpt_addr_size() \
- ((sizeof(dma_addr_t) == sizeof(u64)) ? MPI_SGE_FLAGS_64_BIT_ADDRESSING : \
- MPI_SGE_FLAGS_32_BIT_ADDRESSING)
--
--#define mpt_msg_flags() \
-- ((sizeof(dma_addr_t) == sizeof(u64)) ? MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64 : \
-- MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32)
+#define mpt_msg_flags(ioc) \
+ (ioc->sg_addr_size == sizeof(u64)) ? MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64 : \
+ MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32
-+
+
+-#define mpt_msg_flags() \
+- ((sizeof(dma_addr_t) == sizeof(u64)) ? MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64 : \
+- MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32)
+#define MPT_SGE_FLAGS_64_BIT_ADDRESSING \
+ (MPI_SGE_FLAGS_64_BIT_ADDRESSING << MPI_SGE_FLAGS_SHIFT)
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
-@@ -778,26 +836,10 @@ typedef struct _mpt_sge {
+@@ -778,26 +836,10 @@
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#define MPT_HOST_BUS_UNKNOWN (0xFF)
#define MPT_HOST_TOO_MANY_TM (0x05)
-@@ -813,13 +855,6 @@ typedef struct _MPT_LOCAL_REPLY {
+@@ -813,13 +855,6 @@
#define MPT_NVRAM_WIDE_DISABLE (0x00100000)
#define MPT_NVRAM_BOOT_CHOICE (0x00200000)
typedef enum {
FC,
SPI,
-@@ -828,63 +863,28 @@ typedef enum {
+@@ -828,63 +863,28 @@
typedef struct _MPT_SCSI_HOST {
MPT_ADAPTER *ioc;
} CONFIGPARMS;
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -909,29 +909,40 @@ extern MPT_FRAME_HDR *mpt_get_msg_frame(
+@@ -909,29 +909,40 @@
extern void mpt_free_msg_frame(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
extern void mpt_put_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
extern void mpt_put_msg_frame_hi_pri(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
#define CAST_U32_TO_PTR(x) ((void *)(u64)x)
#define CAST_PTR_TO_U32(x) ((u32)(u64)x)
#else
-@@ -956,7 +967,6 @@ extern struct list_head ioc_list;
+@@ -956,7 +967,6 @@
#define MPT_SGE_FLAGS_END_OF_BUFFER (0x40000000)
#define MPT_SGE_FLAGS_LOCAL_ADDRESS (0x08000000)
#define MPT_SGE_FLAGS_DIRECTION (0x04000000)
#define MPT_SGE_FLAGS_END_OF_LIST (0x01000000)
#define MPT_SGE_FLAGS_TRANSACTION_ELEMENT (0x00000000)
-@@ -969,14 +979,12 @@ extern struct list_head ioc_list;
+@@ -969,14 +979,12 @@
MPT_SGE_FLAGS_END_OF_BUFFER | \
MPT_SGE_FLAGS_END_OF_LIST | \
MPT_SGE_FLAGS_SIMPLE_ELEMENT | \
MPT_TRANSFER_HOST_TO_IOC)
/*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/drivers/message/fusion/mptctl.c
---- linux-2.6.27/drivers/message/fusion/mptctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptctl.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptctl.c
+--- a/drivers/message/fusion/mptctl.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptctl.c Wed May 06 16:56:21 2009 +0100
@@ -45,6 +45,7 @@
*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#define my_NAME "Fusion MPT misc device (ioctl) driver"
#define my_VERSION MPT_LINUX_VERSION_COMMON
-@@ -84,6 +94,7 @@ MODULE_VERSION(my_VERSION);
+@@ -84,6 +94,7 @@
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
static u8 mptctl_id = MPT_MAX_PROTOCOL_DRIVERS;
static DECLARE_WAIT_QUEUE_HEAD ( mptctl_wait );
-@@ -112,6 +123,42 @@ static int mptctl_do_reset(unsigned long
+@@ -112,6 +123,42 @@
static int mptctl_hp_hostinfo(unsigned long arg, unsigned int cmd);
static int mptctl_hp_targetinfo(unsigned long arg);
static int mptctl_probe(struct pci_dev *, const struct pci_device_id *);
static void mptctl_remove(struct pci_dev *);
-@@ -127,10 +174,6 @@ static MptSge_t *kbuf_alloc_2_sgl(int by
+@@ -127,10 +174,6 @@
struct buflist **blp, dma_addr_t *sglbuf_dma, MPT_ADAPTER *ioc);
static void kfree_sgl(MptSge_t *sgl, dma_addr_t sgl_dma,
struct buflist *buflist, MPT_ADAPTER *ioc);
/*
* Reset Handler cleanup function
-@@ -183,10 +226,10 @@ mptctl_syscall_down(MPT_ADAPTER *ioc, in
+@@ -183,10 +226,10 @@
int rc = 0;
if (nonblock) {
rc = -ERESTARTSYS;
}
return rc;
-@@ -202,131 +245,107 @@ mptctl_syscall_down(MPT_ADAPTER *ioc, in
+@@ -202,131 +245,107 @@
static int
mptctl_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply)
{
- int sz, req_index;
- u16 iocStatus;
- u8 cmd;
--
++ char *sense_data;
++ int req_index;
++ int sz;
+
- if (req)
- cmd = req->u.hdr.Function;
- else
- return 1;
- dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\tcompleting mpi function (0x%02X), req=%p, "
- "reply=%p\n", ioc->name, req->u.hdr.Function, req, reply));
--
-- if (ioc->ioctl) {
-+ char *sense_data;
-+ int req_index;
-+ int sz;
-
-- if (reply==NULL) {
+ if (!req)
+ return 0;
-- dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_reply() NULL Reply "
-- "Function=%x!\n", ioc->name, cmd));
+- if (ioc->ioctl) {
+ dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "completing mpi function "
+ "(0x%02X), req=%p, reply=%p\n", ioc->name, req->u.hdr.Function,
+ req, reply));
-- ioc->ioctl->status |= MPT_IOCTL_STATUS_COMMAND_GOOD;
-- ioc->ioctl->reset &= ~MPTCTL_RESET_OK;
+- if (reply==NULL) {
+ /*
+ * Handling continuation of the same reply. Processing the first
+ * reply, and eating the other replys that come later.
+ if (ioc->ioctl_cmds.msg_context != req->u.hdr.MsgContext)
+ goto out_continuation;
+- dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_reply() NULL Reply "
+- "Function=%x!\n", ioc->name, cmd));
++ ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD;
+
+- ioc->ioctl->status |= MPT_IOCTL_STATUS_COMMAND_GOOD;
+- ioc->ioctl->reset &= ~MPTCTL_RESET_OK;
++ if (!reply)
++ goto out;
+
- /* We are done, issue wake up
- */
- ioc->ioctl->wait_done = 1;
- wake_up (&mptctl_wait);
- return 1;
-+ ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD;
++ ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_RF_VALID;
++ sz = min(ioc->reply_sz, 4*reply->u.reply.MsgLength);
++ memcpy(ioc->ioctl_cmds.reply, reply, sz);
- }
-+ if (!reply)
-+ goto out;
++ if (reply->u.reply.IOCStatus || reply->u.reply.IOCLogInfo)
++ dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++ "iocstatus (0x%04X), loginfo (0x%08X)\n", ioc->name,
++ le16_to_cpu(reply->u.reply.IOCStatus),
++ le32_to_cpu(reply->u.reply.IOCLogInfo)));
- /* Copy the reply frame (which much exist
- * for non-SCSI I/O) to the IOC structure.
- memcpy(ioc->ioctl->ReplyFrame, reply,
- min(ioc->reply_sz, 4*reply->u.reply.MsgLength));
- ioc->ioctl->status |= MPT_IOCTL_STATUS_RF_VALID;
-+ ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_RF_VALID;
-+ sz = min(ioc->reply_sz, 4*reply->u.reply.MsgLength);
-+ memcpy(ioc->ioctl_cmds.reply, reply, sz);
++ if ((req->u.hdr.Function == MPI_FUNCTION_SCSI_IO_REQUEST) ||
++ (req->u.hdr.Function
++ == MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH)) {
- /* Set the command status to GOOD if IOC Status is GOOD
- * OR if SCSI I/O cmd and data underrun or recovered error.
- iocStatus = le16_to_cpu(reply->u.reply.IOCStatus) & MPI_IOCSTATUS_MASK;
- if (iocStatus == MPI_IOCSTATUS_SUCCESS)
- ioc->ioctl->status |= MPT_IOCTL_STATUS_COMMAND_GOOD;
--
++ if (reply->u.sreply.SCSIStatus || reply->u.sreply.SCSIState)
++ dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++ "scsi_status (0x%02x), scsi_state (0x%02x), "
++ "tag = (0x%04x), transfer_count (0x%08x)\n", ioc->name,
++ reply->u.sreply.SCSIStatus,
++ reply->u.sreply.SCSIState,
++ le16_to_cpu(reply->u.sreply.TaskTag),
++ le32_to_cpu(reply->u.sreply.TransferCount)));
+
- if (iocStatus || reply->u.reply.IOCLogInfo)
- dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\tiocstatus (0x%04X), "
- "loginfo (0x%08X)\n", ioc->name,
- ioc->ioctl->status |= MPT_IOCTL_STATUS_COMMAND_GOOD;
- }
- }
-+ if (reply->u.reply.IOCStatus || reply->u.reply.IOCLogInfo)
-+ dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+ "iocstatus (0x%04X), loginfo (0x%08X)\n", ioc->name,
-+ le16_to_cpu(reply->u.reply.IOCStatus),
-+ le32_to_cpu(reply->u.reply.IOCLogInfo)));
-+
-+ if ((req->u.hdr.Function == MPI_FUNCTION_SCSI_IO_REQUEST) ||
-+ (req->u.hdr.Function
-+ == MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH)) {
-+
-+ if (reply->u.sreply.SCSIStatus || reply->u.sreply.SCSIState)
-+ dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+ "scsi_status (0x%02x), scsi_state (0x%02x), "
-+ "tag = (0x%04x), transfer_count (0x%08x)\n", ioc->name,
-+ reply->u.sreply.SCSIStatus,
-+ reply->u.sreply.SCSIState,
-+ le16_to_cpu(reply->u.sreply.TaskTag),
-+ le32_to_cpu(reply->u.sreply.TransferCount)));
-
+-
- /* Copy the sense data - if present
- */
- if ((cmd == MPI_FUNCTION_SCSI_IO_REQUEST) &&
- if (cmd == MPI_FUNCTION_SCSI_TASK_MGMT)
- mptctl_free_tm_flags(ioc);
--
-- /* We are done, issue wake up
-- */
-- ioc->ioctl->wait_done = 1;
-- wake_up (&mptctl_wait);
+ out:
+ /* We are done, issue wake up
+ */
+ mpt_clear_taskmgmt_in_progress_flag(ioc);
+ ioc->ioctl_cmds.status &= ~MPT_MGMT_STATUS_PENDING;
+ complete(&ioc->ioctl_cmds.done);
- }
-+
++ }
+
+- /* We are done, issue wake up
+- */
+- ioc->ioctl->wait_done = 1;
+- wake_up (&mptctl_wait);
+- }
+ out_continuation:
+ if (reply && (reply->u.reply.MsgFlags &
+ MPI_MSGFLAGS_CONTINUATION_REPLY))
- ioctl->wait_done = 0;
- if (ioctl->reset & MPTCTL_RESET_OK)
- rc = mptctl_bus_reset(ioctl);
--
++ ioc->taskmgmt_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD;
+
- if (rc) {
- /* Issue a reset for this device.
- * The IOC is not responding.
- dctlprintk(ioctl->ioc, printk(MYIOC_s_DEBUG_FMT "Calling HardReset! \n",
- ioctl->ioc->name));
- mpt_HardResetHandler(ioctl->ioc, CAN_SLEEP);
-- }
-- return;
-+ ioc->taskmgmt_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD;
-+
+ if (!mr)
+ goto out;
-
++
+ ioc->taskmgmt_cmds.status |= MPT_MGMT_STATUS_RF_VALID;
+ memcpy(ioc->taskmgmt_cmds.reply, mr,
+ min(MPT_DEFAULT_FRAME_SIZE, 4 * mr->u.reply.MsgLength));
+ ioc->taskmgmt_cmds.status &= ~MPT_MGMT_STATUS_PENDING;
+ complete(&ioc->taskmgmt_cmds.done);
+ return 1;
-+ }
+ }
+- return;
+-
+ return 0;
}
/* mptctl_bus_reset
-@@ -334,132 +353,182 @@ static void mptctl_timeout_expired (MPT_
+@@ -334,132 +353,182 @@
* Bus reset code.
*
*/
+ SCSITaskMgmtReply_t *pScsiTmReply;
int ii;
- int retval=0;
--
--
-- ioctl->reset &= ~MPTCTL_RESET_OK;
--
-- if (ioctl->ioc->sh == NULL)
+ int retval;
+ unsigned long timeout;
+ unsigned long time_count;
+ u16 iocstatus;
-+
+
+ /* bus reset is only good for SCSI IO, RAID PASSTHRU */
+ if (!(function == MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH) ||
+ (function == MPI_FUNCTION_SCSI_IO_REQUEST)) {
+ dtmprintk(ioc, printk(MYIOC_s_WARN_FMT
+ "TaskMgmt, not SCSI_IO!!\n", ioc->name));
- return -EPERM;
++ return -EPERM;
+ }
-- hd = shost_priv(ioctl->ioc->sh);
-- if (hd == NULL)
+- ioctl->reset &= ~MPTCTL_RESET_OK;
+ mutex_lock(&ioc->taskmgmt_cmds.mutex);
+ if (mpt_set_taskmgmt_in_progress_flag(ioc) != 0) {
+ mutex_unlock(&ioc->taskmgmt_cmds.mutex);
- return -EPERM;
++ return -EPERM;
+ }
+- if (ioctl->ioc->sh == NULL)
+- return -EPERM;
+-
+- hd = shost_priv(ioctl->ioc->sh);
+- if (hd == NULL)
+- return -EPERM;
+-
- /* Single threading ....
- */
- if (mptctl_set_tm_flags(hd) != 0)
pScsiTm = (SCSITaskMgmt_t *) mf;
- pScsiTm->TargetID = ioctl->id;
- pScsiTm->Bus = hd->port; /* 0 */
-- pScsiTm->ChainOffset = 0;
+ memset(pScsiTm, 0, sizeof(SCSITaskMgmt_t));
- pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
-- pScsiTm->Reserved = 0;
- pScsiTm->TaskType = MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS;
-- pScsiTm->Reserved1 = 0;
- pScsiTm->MsgFlags = MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION;
--
++ pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
++ pScsiTm->TaskType = MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS;
++ pScsiTm->MsgFlags = MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION;
+ pScsiTm->TargetID = 0;
+ pScsiTm->Bus = 0;
-+ pScsiTm->ChainOffset = 0;
-+ pScsiTm->Reserved = 0;
-+ pScsiTm->Reserved1 = 0;
+ pScsiTm->ChainOffset = 0;
+- pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
+ pScsiTm->Reserved = 0;
+- pScsiTm->TaskType = MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS;
+ pScsiTm->Reserved1 = 0;
+- pScsiTm->MsgFlags = MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION;
+-
+ pScsiTm->TaskMsgContext = 0;
for (ii= 0; ii < 8; ii++)
pScsiTm->LUN[ii] = 0;
- pScsiTm->TaskMsgContext = 0;
- dtmprintk(ioctl->ioc, printk(MYIOC_s_DEBUG_FMT
- "mptctl_bus_reset: issued.\n", ioctl->ioc->name));
--
-- DBG_DUMP_TM_REQUEST_FRAME(ioctl->ioc, (u32 *)mf);
--
-- ioctl->wait_done=0;
+ switch (ioc->bus_type) {
+ case FC:
+ timeout = 40;
+ break;
+ }
-- if ((ioctl->ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) &&
-- (ioctl->ioc->facts.MsgVersion >= MPI_VERSION_01_05))
-- mpt_put_msg_frame_hi_pri(mptctl_id, ioctl->ioc, mf);
+- DBG_DUMP_TM_REQUEST_FRAME(ioctl->ioc, (u32 *)mf);
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "TaskMgmt type=%d timeout=%ld\n", ioc->name,
+ MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS, timeout));
-+
+
+- ioctl->wait_done=0;
+-
+- if ((ioctl->ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) &&
+- (ioctl->ioc->facts.MsgVersion >= MPI_VERSION_01_05))
+- mpt_put_msg_frame_hi_pri(mptctl_id, ioctl->ioc, mf);
+ INITIALIZE_MGMT_STATUS(ioc->taskmgmt_cmds.status)
+ CLEAR_MGMT_STATUS(ioc->taskmgmt_cmds.status)
+ time_count = jiffies;
- ii = wait_event_timeout(mptctl_wait,
- ioctl->wait_done == 1,
- HZ*5 /* 5 second timeout */);
--
-- if(ii <=0 && (ioctl->wait_done != 1 )) {
-- mpt_free_msg_frame(hd->ioc, mf);
-- ioctl->wait_done = 0;
-- retval = -1; /* return failure */
+ ii = wait_for_completion_timeout(&ioc->taskmgmt_cmds.done, timeout*HZ);
+ if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ else
+ retval = -1; /* return failure */
+ goto mptctl_bus_reset_done;
- }
++ }
--mptctl_bus_reset_done:
--
-- mptctl_free_tm_flags(ioctl->ioc);
-- return retval;
--}
--
--static int
--mptctl_set_tm_flags(MPT_SCSI_HOST *hd) {
-- unsigned long flags;
--
-- spin_lock_irqsave(&hd->ioc->FreeQlock, flags);
+- if(ii <=0 && (ioctl->wait_done != 1 )) {
+- mpt_free_msg_frame(hd->ioc, mf);
+- ioctl->wait_done = 0;
+ if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_RF_VALID)) {
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "TaskMgmt failed\n", ioc->name));
+ retval = -1; /* return failure */
+ goto mptctl_bus_reset_done;
+ }
-
-- if (hd->tmState == TM_STATE_NONE) {
-- hd->tmState = TM_STATE_IN_PROGRESS;
-- hd->tmPending = 1;
-- spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
-- } else {
-- spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
-- return -EBUSY;
++
+ pScsiTmReply = (SCSITaskMgmtReply_t *) ioc->taskmgmt_cmds.reply;
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "TaskMgmt fw_channel = %d, fw_id = %d, task_type=0x%02X, "
+ else {
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "TaskMgmt failed\n", ioc->name));
-+ retval = -1; /* return failure */
+ retval = -1; /* return failure */
}
-- return 0;
-+
+-mptctl_bus_reset_done:
+
+- mptctl_free_tm_flags(ioctl->ioc);
+ mptctl_bus_reset_done:
+ mutex_unlock(&ioc->taskmgmt_cmds.mutex);
+ CLEAR_MGMT_STATUS(ioc->taskmgmt_cmds.status)
-+ return retval;
+ return retval;
}
- static void
--mptctl_free_tm_flags(MPT_ADAPTER *ioc)
+-static int
+-mptctl_set_tm_flags(MPT_SCSI_HOST *hd) {
++static void
+mptctl_timeout_expired(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf)
- {
-- MPT_SCSI_HOST * hd;
++{
unsigned long flags;
-- hd = shost_priv(ioc->sh);
-- if (hd == NULL)
+- spin_lock_irqsave(&hd->ioc->FreeQlock, flags);
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ": %s\n",
+ ioc->name, __func__));
-+
+
+- if (hd->tmState == TM_STATE_NONE) {
+- hd->tmState = TM_STATE_IN_PROGRESS;
+- hd->tmPending = 1;
+- spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
+- } else {
+- spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
+- return -EBUSY;
+ if (mpt_fwfault_debug)
+ mpt_halt_firmware(ioc);
+ spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
+ spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
+ CLEAR_MGMT_PENDING_STATUS(ioc->ioctl_cmds.status)
+ mpt_free_msg_frame(ioc, mf);
- return;
-+ }
++ return;
+ }
+ spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
-- spin_lock_irqsave(&ioc->FreeQlock, flags);
+- return 0;
+-}
+
+-static void
+-mptctl_free_tm_flags(MPT_ADAPTER *ioc)
+-{
+- MPT_SCSI_HOST * hd;
+- unsigned long flags;
+-
+- hd = shost_priv(ioc->sh);
+- if (hd == NULL)
++ if (!mptctl_bus_reset(ioc, mf->u.hdr.Function))
+ return;
+- spin_lock_irqsave(&ioc->FreeQlock, flags);
+-
- hd->tmState = TM_STATE_NONE;
- hd->tmPending = 0;
- spin_unlock_irqrestore(&ioc->FreeQlock, flags);
-+ if (!mptctl_bus_reset(ioc, mf->u.hdr.Function))
-+ return;
-
+-
- return;
+ /* Issue a reset for this device.
+ * The IOC is not responding.
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -472,22 +541,23 @@ mptctl_free_tm_flags(MPT_ADAPTER *ioc)
+@@ -472,22 +541,23 @@
static int
mptctl_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
{
default:
break;
}
-@@ -510,8 +580,6 @@ mptctl_event_process(MPT_ADAPTER *ioc, E
+@@ -510,8 +580,6 @@
return 1;
/* Raise SIGIO for persistent events.
*/
if (event == 0x21 ) {
ioc->aen_event_read_flag=1;
-@@ -548,15 +616,11 @@ static int
+@@ -548,15 +616,11 @@
mptctl_fasync(int fd, struct file *filep, int mode)
{
MPT_ADAPTER *ioc;
}
static int
-@@ -582,6 +646,7 @@ __mptctl_ioctl(struct file *file, unsign
+@@ -582,6 +646,7 @@
int ret;
MPT_ADAPTER *iocp = NULL;
if (copy_from_user(&khdr, uhdr, sizeof(khdr))) {
printk(KERN_ERR MYNAM "%s::mptctl_ioctl() @%d - "
"Unable to copy mpt_ioctl_header data @ %p\n",
-@@ -596,17 +661,13 @@ __mptctl_ioctl(struct file *file, unsign
+@@ -596,15 +661,11 @@
iocnumX = khdr.iocnum & 0xFF;
if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) ||
(iocp == NULL)) {
+ "%s::%s @%d - ioc%d not found!\n",
+ __FILE__, __func__, __LINE__, iocnumX);
return -ENODEV;
- }
-
+- }
+-
- if (!iocp->active) {
- printk(KERN_DEBUG MYNAM "%s::mptctl_ioctl() @%d - Controller disabled.\n",
- __FILE__, __LINE__);
- return -EFAULT;
-- }
--
+ }
+
/* Handle those commands that are just returning
- * information stored in the driver.
- * These commands should never time out and are unaffected
-@@ -626,6 +687,25 @@ __mptctl_ioctl(struct file *file, unsign
+@@ -626,6 +687,25 @@
return mptctl_eventreport(arg);
} else if (cmd == MPTFWREPLACE) {
return mptctl_replace_fw(arg);
}
/* All of these commands require an interrupt or
-@@ -644,10 +724,61 @@ __mptctl_ioctl(struct file *file, unsign
+@@ -644,10 +724,61 @@
ret = mptctl_hp_hostinfo(arg, _IOC_SIZE(cmd));
else if (cmd == HP_GETTARGETINFO)
ret = mptctl_hp_targetinfo(arg);
return ret;
}
-@@ -676,8 +807,10 @@ static int mptctl_do_reset(unsigned long
+@@ -676,8 +807,10 @@
}
if (mpt_verify_adapter(krinfo.hdr.iocnum, &iocp) < 0) {
return -ENODEV; /* (-6) No such device or address */
}
-@@ -763,10 +896,12 @@ mptctl_do_fw_download(int ioc, char __us
+@@ -763,10 +896,12 @@
int sge_offset = 0;
u16 iocstat;
pFWDownloadReply_t ReplyMsg = NULL;
return -ENODEV; /* (-6) No such device or address */
} else {
-@@ -847,7 +982,7 @@ mptctl_do_fw_download(int ioc, char __us
+@@ -847,7 +982,7 @@
* 64 4
*/
maxfrags = (iocp->req_sz - sizeof(MPIHeader_t) - sizeof(FWDownloadTCSGE_t))
if (numfrags > maxfrags) {
ret = -EMLINK;
goto fwdl_out;
-@@ -875,19 +1010,19 @@ mptctl_do_fw_download(int ioc, char __us
+@@ -875,19 +1010,19 @@
if (nib == 0 || nib == 3) {
;
} else if (sgIn->Address) {
}
DBG_DUMP_FW_DOWNLOAD(iocp, (u32 *)mf, numfrags);
-@@ -896,16 +1031,27 @@ mptctl_do_fw_download(int ioc, char __us
+@@ -896,16 +1031,27 @@
* Finally, perform firmware download.
*/
ReplyMsg = NULL;
- ret = wait_event_timeout(mptctl_wait,
- iocp->ioctl->wait_done == 1,
- HZ*60);
--
-- if(ret <=0 && (iocp->ioctl->wait_done != 1 )) {
-- /* Now we need to reset the board */
-- mptctl_timeout_expired(iocp->ioctl);
+ timeleft = wait_for_completion_timeout(&iocp->ioctl_cmds.done, HZ*60);
+ if (!(iocp->ioctl_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
+ ret = -ETIME;
+ mptctl_timeout_expired(iocp, mf);
+ goto fwdl_out;
+ }
-+
+
+- if(ret <=0 && (iocp->ioctl->wait_done != 1 )) {
+- /* Now we need to reset the board */
+- mptctl_timeout_expired(iocp->ioctl);
+ if (!(iocp->ioctl_cmds.status & MPT_MGMT_STATUS_RF_VALID)) {
+ printk(MYIOC_s_WARN_FMT "%s: failed\n", iocp->name, __func__);
+ mpt_free_msg_frame(iocp, mf);
ret = -ENODATA;
goto fwdl_out;
}
-@@ -913,31 +1059,36 @@ mptctl_do_fw_download(int ioc, char __us
+@@ -913,31 +1059,36 @@
if (sgl)
kfree_sgl(sgl, sgl_dma, buflist, iocp);
return ret;
}
-@@ -1008,7 +1159,7 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, i
+@@ -1008,7 +1159,7 @@
*
*/
sgl = sglbuf;
while (bytes_allocd < bytes) {
this_alloc = min(alloc_sz, bytes-bytes_allocd);
buflist[buflist_ent].len = this_alloc;
-@@ -1019,9 +1170,9 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, i
+@@ -1019,9 +1170,9 @@
alloc_sz = alloc_sz / 2;
if (alloc_sz == 0) {
printk(MYIOC_s_WARN_FMT "-SG: No can do - "
goto free_and_fail;
}
continue;
-@@ -1029,7 +1180,10 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, i
+@@ -1029,7 +1180,10 @@
dma_addr_t dma_addr;
bytes_allocd += this_alloc;
dma_addr = pci_map_single(ioc->pcidev, buflist[buflist_ent].kptr, this_alloc, dir);
sgl->Address = dma_addr;
-@@ -1044,8 +1198,8 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, i
+@@ -1044,8 +1198,8 @@
/* Need to chain? */
if (fragcnt == sg_spill) {
printk(MYIOC_s_WARN_FMT "(freeing %d frags)\n", ioc->name, numfrags);
goto free_and_fail;
}
-@@ -1054,9 +1208,9 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, i
+@@ -1054,9 +1208,9 @@
if (numfrags*8 > MAX_SGL_BYTES){
/* GRRRRR... */
printk(MYIOC_s_WARN_FMT "-SG: No can do - "
goto free_and_fail;
}
}
-@@ -1213,8 +1367,10 @@ mptctl_getiocinfo (unsigned long arg, un
+@@ -1213,8 +1367,10 @@
if (((iocnum = mpt_verify_adapter(karg->hdr.iocnum, &ioc)) < 0) ||
(ioc == NULL)) {
kfree(karg);
return -ENODEV;
}
-@@ -1222,8 +1378,8 @@ mptctl_getiocinfo (unsigned long arg, un
+@@ -1222,8 +1378,8 @@
/* Verify the data transfer size is correct. */
if (karg->hdr.maxDataSize != data_size) {
printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_getiocinfo - "
kfree(karg);
return -EFAULT;
}
-@@ -1275,6 +1431,8 @@ mptctl_getiocinfo (unsigned long arg, un
+@@ -1275,6 +1431,8 @@
if (ioc->sh) {
shost_for_each_device(sdev, ioc->sh) {
vdevice = sdev->hostdata;
if (vdevice->vtarget->tflags &
MPT_TARGET_FLAGS_RAID_COMPONENT)
continue;
-@@ -1346,8 +1504,10 @@ mptctl_gettargetinfo (unsigned long arg)
+@@ -1346,8 +1504,10 @@
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
(ioc == NULL)) {
return -ENODEV;
}
-@@ -1362,8 +1522,9 @@ mptctl_gettargetinfo (unsigned long arg)
+@@ -1362,8 +1522,9 @@
port = karg.hdr.port;
if (maxWordsLeft <= 0) {
return -ENOMEM;
}
-@@ -1383,8 +1544,9 @@ mptctl_gettargetinfo (unsigned long arg)
+@@ -1383,8 +1544,9 @@
*/
pmem = kzalloc(numBytes, GFP_KERNEL);
if (!pmem) {
return -ENOMEM;
}
pdata = (int *) pmem;
-@@ -1396,6 +1558,8 @@ mptctl_gettargetinfo (unsigned long arg)
+@@ -1396,6 +1558,8 @@
if (!maxWordsLeft)
continue;
vdevice = sdev->hostdata;
if (vdevice->vtarget->tflags &
MPT_TARGET_FLAGS_RAID_COMPONENT)
continue;
-@@ -1460,8 +1624,10 @@ mptctl_readtest (unsigned long arg)
+@@ -1460,8 +1624,10 @@
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
(ioc == NULL)) {
return -ENODEV;
}
-@@ -1521,8 +1687,10 @@ mptctl_eventquery (unsigned long arg)
+@@ -1521,8 +1687,10 @@
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
(ioc == NULL)) {
return -ENODEV;
}
-@@ -1560,8 +1728,10 @@ mptctl_eventenable (unsigned long arg)
+@@ -1560,8 +1728,10 @@
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
(ioc == NULL)) {
return -ENODEV;
}
-@@ -1574,7 +1744,7 @@ mptctl_eventenable (unsigned long arg)
+@@ -1574,7 +1744,7 @@
ioc->events = kzalloc(sz, GFP_KERNEL);
if (!ioc->events) {
printk(MYIOC_s_ERR_FMT
ioc->name);
return -ENOMEM;
}
-@@ -1609,13 +1779,15 @@ mptctl_eventreport (unsigned long arg)
+@@ -1609,13 +1779,15 @@
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
(ioc == NULL)) {
numBytes = karg.hdr.maxDataSize - sizeof(mpt_ioctl_header);
maxEvents = numBytes/sizeof(MPT_IOCTL_EVENTS);
-@@ -1663,8 +1835,10 @@ mptctl_replace_fw (unsigned long arg)
+@@ -1663,8 +1835,10 @@
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
(ioc == NULL)) {
return -ENODEV;
}
-@@ -1694,8 +1868,8 @@ mptctl_replace_fw (unsigned long arg)
+@@ -1694,8 +1868,8 @@
*/
if (copy_from_user(ioc->cached_fw, uarg->newImage, newFwSize)) {
printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_replace_fw - "
mpt_free_fw_memory(ioc);
return -EFAULT;
}
-@@ -1712,7 +1886,8 @@ mptctl_replace_fw (unsigned long arg)
+@@ -1712,7 +1886,8 @@
*
* Outputs: None.
* Return: 0 if successful
* -EFAULT if data unavailable
* -ENODEV if no such device/adapter
* -ETIME if timer expires
-@@ -1737,8 +1912,10 @@ mptctl_mpt_command (unsigned long arg)
+@@ -1737,8 +1912,10 @@
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
(ioc == NULL)) {
return -ENODEV;
}
-@@ -1752,7 +1929,8 @@ mptctl_mpt_command (unsigned long arg)
+@@ -1752,7 +1929,8 @@
*
* Outputs: None.
* Return: 0 if successful
* -EFAULT if data unavailable
* -ENODEV if no such device/adapter
* -ETIME if timer expires
-@@ -1775,8 +1953,11 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1775,8 +1953,11 @@
int sz, rc = 0;
int msgContext;
u16 req_idx;
/* bufIn and bufOut are used for user to kernel space transfers
*/
-@@ -1785,28 +1966,29 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1785,28 +1966,29 @@
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
(ioc == NULL)) {
return -ENODEV;
}
- if (!ioc->ioctl) {
-- printk(KERN_ERR MYNAM "%s@%d::mptctl_do_mpt_command - "
-- "No memory available during driver init.\n",
-- __FILE__, __LINE__);
-- return -ENOMEM;
-- } else if (ioc->ioctl->status & MPT_IOCTL_STATUS_DID_IOCRESET) {
+
+ spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
+ if (ioc->ioc_reset_in_progress) {
+ spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
printk(KERN_ERR MYNAM "%s@%d::mptctl_do_mpt_command - "
+- "No memory available during driver init.\n",
+- __FILE__, __LINE__);
+- return -ENOMEM;
+- } else if (ioc->ioctl->status & MPT_IOCTL_STATUS_DID_IOCRESET) {
+- printk(KERN_ERR MYNAM "%s@%d::mptctl_do_mpt_command - "
- "Busy with IOC Reset \n", __FILE__, __LINE__);
+ "Busy with diagnostic reset\n", __FILE__, __LINE__);
return -EBUSY;
if (sz > ioc->req_sz) {
printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - "
-@@ -1832,18 +2014,19 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1832,18 +2014,19 @@
printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - "
"Unable to read MF from mpt_ioctl_command struct @ %p\n",
ioc->name, __FILE__, __LINE__, mfPtr);
case MPI_FUNCTION_IOC_FACTS:
case MPI_FUNCTION_PORT_FACTS:
karg.dataOutSize = karg.dataInSize = 0;
-@@ -1898,7 +2081,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1898,7 +2081,7 @@
}
pScsiReq->MsgFlags &= ~MPI_SCSIIO_MSGFLGS_SENSE_WIDTH;
/* verify that app has not requested
-@@ -1920,6 +2103,8 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1920,6 +2103,8 @@
struct scsi_target *starget = scsi_target(sdev);
VirtTarget *vtarget = starget->hostdata;
if ((pScsiReq->TargetID == vtarget->id) &&
(pScsiReq->Bus == vtarget->channel) &&
(vtarget->tflags & MPT_TARGET_FLAGS_Q_YES))
-@@ -1940,9 +2125,6 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1940,9 +2125,6 @@
pScsiReq->Control = cpu_to_le32(scsidir | qtag);
pScsiReq->DataLength = cpu_to_le32(dataSize);
} else {
printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - "
"SCSI driver is not loaded. \n",
-@@ -1955,7 +2137,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1955,7 +2137,7 @@
case MPI_FUNCTION_SMP_PASSTHROUGH:
/* Check mf->PassthruFlags to determine if
* transfer is ImmediateMode or not.
* Else, we are sending request and response data
* in two SGLs at the end of the mf.
*/
-@@ -1984,7 +2166,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1984,7 +2166,7 @@
int dataSize;
pScsiReq->MsgFlags &= ~MPI_SCSIIO_MSGFLGS_SENSE_WIDTH;
/* verify that app has not requested
-@@ -2019,8 +2201,6 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2019,8 +2201,6 @@
pScsiReq->Control = cpu_to_le32(scsidir | qtag);
pScsiReq->DataLength = cpu_to_le32(dataSize);
} else {
printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - "
"SCSI driver is not loaded. \n",
-@@ -2031,20 +2211,17 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2031,20 +2211,17 @@
break;
case MPI_FUNCTION_SCSI_TASK_MGMT:
case MPI_FUNCTION_IOC_INIT:
{
-@@ -2054,7 +2231,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2054,12 +2231,17 @@
/* Verify that all entries in the IOC INIT match
* existing setup (and in LE format).
*/
high_addr = cpu_to_le32((u32)((u64)ioc->req_frames_dma >> 32));
sense_high= cpu_to_le32((u32)((u64)ioc->sense_buf_pool_dma >> 32));
} else {
-@@ -2062,6 +2239,11 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+ high_addr = 0;
sense_high= 0;
- }
-
++ }
++
+ if (!pInit->MaxDevices && !pInit->MaxBuses) {
+ pInit->MaxDevices = ioc->facts.MaxDevices;
+ pInit->MaxBuses = ioc->facts.MaxBuses;
-+ }
-+
+ }
+
if ((pInit->Flags != 0) || (pInit->MaxDevices != ioc->facts.MaxDevices) ||
- (pInit->MaxBuses != ioc->facts.MaxBuses) ||
- (pInit->ReplyFrameSize != cpu_to_le16(ioc->reply_sz)) ||
-@@ -2102,7 +2284,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2102,7 +2284,7 @@
printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - "
"Illegal request (function 0x%x) \n",
rc = -EFAULT;
goto done_free_mem;
}
-@@ -2126,10 +2308,9 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2126,10 +2308,9 @@
/* Set up the dataOut memory allocation */
if (karg.dataOutSize > 0) {
if (karg.dataInSize > 0) {
<< MPI_SGE_FLAGS_SHIFT;
} else {
flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE;
-@@ -2146,8 +2327,8 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2146,8 +2327,8 @@
/* Set up this SGE.
* Copy to MF and to sglbuf
*/
/* Copy user data to kernel space.
*/
-@@ -2180,17 +2361,24 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2180,17 +2361,24 @@
/* Set up this SGE
* Copy to MF and to sglbuf
*/
DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)mf);
-@@ -2198,53 +2386,58 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2198,53 +2386,58 @@
(ioc->facts.MsgVersion >= MPI_VERSION_01_05))
mpt_put_msg_frame_hi_pri(mptctl_id, ioc, mf);
else {
+ }
goto done_free_mem;
}
-
++
+ if (function == MPI_FUNCTION_SCSI_TASK_MGMT)
+ mutex_unlock(&ioc->taskmgmt_cmds.mutex);
-+
+
mf = NULL;
/* If a valid reply frame, copy to the user.
printk(MYIOC_s_ERR_FMT
"%s@%d::mptctl_do_mpt_command - "
"Unable to write out reply frame %p\n",
-@@ -2257,10 +2450,11 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2257,10 +2450,11 @@
/* If valid sense data, copy to user.
*/
printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - "
"Unable to write sense data to user %p\n",
ioc->name, __FILE__, __LINE__,
-@@ -2274,9 +2468,8 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2274,9 +2468,8 @@
/* If the overall status is _GOOD and data in, copy data
* to user.
*/
if (copy_to_user(karg.dataInBufPtr,
bufIn.kptr, karg.dataInSize)) {
printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - "
-@@ -2289,9 +2482,8 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2289,9 +2482,8 @@
done_free_mem:
/* Free the allocated memory.
*/
-@@ -2320,7 +2512,8 @@ done_free_mem:
+@@ -2320,7 +2512,8 @@
* Outputs: None.
* Return: 0 if successful
* -EFAULT if data unavailable
* -ENODEV if no such device/adapter
* -ETIME if timer expires
* -ENOMEM if memory allocation error
-@@ -2331,16 +2524,17 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2331,16 +2524,17 @@
hp_host_info_t __user *uarg = (void __user *) arg;
MPT_ADAPTER *ioc;
struct pci_dev *pdev;
/* Reset long to int. Should affect IA64 and SPARC only
*/
-@@ -2360,13 +2554,15 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2360,13 +2554,15 @@
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
(ioc == NULL)) {
/* Fill in the data and return the structure to the calling
* program
*/
-@@ -2406,42 +2602,9 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2406,42 +2602,9 @@
karg.fw_version[10] = (ioc->facts.FWVersion.Struct.Dev % 10 ) + '0';
karg.fw_version[11] = '\0';
case MPI_IOC_STATE_OPERATIONAL:
karg.ioc_status = HP_STATUS_OK;
break;
-@@ -2468,12 +2631,12 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2468,12 +2631,12 @@
karg.soft_resets = 0;
karg.timeouts = 0;
if (ioc->sh != NULL) {
}
}
-@@ -2483,15 +2646,17 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2483,15 +2646,17 @@
if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, no msg frames!!\n",
ioc->name,__func__));
IstwiRWRequest->Flags = MPI_TB_ISTWI_FLAGS_READ;
IstwiRWRequest->NumAddressBytes = 0x01;
IstwiRWRequest->DataLength = cpu_to_le16(0x04);
-@@ -2501,24 +2666,29 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2501,24 +2666,29 @@
IstwiRWRequest->DeviceAddr = 0xB0;
pbuf = pci_alloc_consistent(ioc->pcidev, 4, &buf_dma);
goto out;
}
-@@ -2531,10 +2701,13 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2531,10 +2701,13 @@
* bays have drives in them
* pbuf[3] = Checksum (0x100 = (byte0 + byte2 + byte3)
*/
if (pbuf)
pci_free_consistent(ioc->pcidev, 4, pbuf, buf_dma);
-@@ -2547,7 +2720,7 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2547,7 +2720,7 @@
return -EFAULT;
}
}
-@@ -2557,7 +2730,8 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2557,7 +2730,8 @@
* Outputs: None.
* Return: 0 if successful
* -EFAULT if data unavailable
* -ENODEV if no such device/adapter
* -ETIME if timer expires
* -ENOMEM if memory allocation error
-@@ -2587,13 +2761,16 @@ mptctl_hp_targetinfo(unsigned long arg)
+@@ -2587,13 +2761,16 @@
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
(ioc == NULL)) {
return -ENODEV;
}
- dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_hp_targetinfo called.\n",
-- ioc->name));
-
++
+ dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ ": mptctl_hp_targetinfo called.\n",
-+ ioc->name));
+ ioc->name));
+-
/* There is nothing to do for FCP parts.
*/
if ((ioc->bus_type == SAS) || (ioc->bus_type == FC))
-@@ -2685,7 +2862,7 @@ mptctl_hp_targetinfo(unsigned long arg)
+@@ -2685,7 +2862,7 @@
pci_free_consistent(ioc->pcidev, data_sz, (u8 *) pg3_alloc, page_dma);
}
}
if (hd != NULL)
karg.select_timeouts = hd->sel_timeout[karg.hdr.id];
-@@ -2703,7 +2880,7 @@ mptctl_hp_targetinfo(unsigned long arg)
+@@ -2703,7 +2880,7 @@
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
.owner = THIS_MODULE,
.llseek = no_llseek,
.release = mptctl_release,
-@@ -2743,8 +2920,10 @@ compat_mptfwxfer_ioctl(struct file *filp
+@@ -2743,8 +2920,10 @@
iocnumX = kfw32.iocnum & 0xFF;
if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) ||
(iocp == NULL)) {
return -ENODEV;
}
-@@ -2759,7 +2938,7 @@ compat_mptfwxfer_ioctl(struct file *filp
+@@ -2759,7 +2938,7 @@
ret = mptctl_do_fw_download(kfw.iocnum, kfw.bufp, kfw.fwlen);
return ret;
}
-@@ -2783,8 +2962,10 @@ compat_mpt_command(struct file *filp, un
+@@ -2783,8 +2962,10 @@
iocnumX = karg32.hdr.iocnum & 0xFF;
if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) ||
(iocp == NULL)) {
return -ENODEV;
}
-@@ -2813,7 +2994,7 @@ compat_mpt_command(struct file *filp, un
+@@ -2813,7 +2994,7 @@
*/
ret = mptctl_do_mpt_command (karg, &uarg->MF);
return ret;
}
-@@ -2833,6 +3014,31 @@ static long compat_mpctl_ioctl(struct fi
+@@ -2833,6 +3014,31 @@
case MPTHARDRESET:
case HP_GETHOSTINFO:
case HP_GETTARGETINFO:
case MPTTEST:
ret = __mptctl_ioctl(f, cmd, arg);
break;
-@@ -2865,21 +3071,11 @@ static long compat_mpctl_ioctl(struct fi
+@@ -2865,21 +3071,11 @@
static int
mptctl_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
return 0;
}
-@@ -2893,9 +3089,22 @@ mptctl_probe(struct pci_dev *pdev, const
+@@ -2893,9 +3089,22 @@
static void
mptctl_remove(struct pci_dev *pdev)
{
}
static struct mpt_pci_driver mptctl_driver = {
-@@ -2935,6 +3144,7 @@ static int __init mptctl_init(void)
+@@ -2935,6 +3144,7 @@
goto out_fail;
}
mpt_reset_register(mptctl_id, mptctl_ioc_reset);
mpt_event_register(mptctl_id, mptctl_event_process);
-@@ -2956,15 +3166,23 @@ static void mptctl_exit(void)
+@@ -2956,15 +3166,23 @@
/* De-register reset handler from base module */
mpt_reset_deregister(mptctl_id);
+
module_init(mptctl_init);
module_exit(mptctl_exit);
-diff -purN linux-2.6.27/drivers/message/fusion/mptctl.h linux-2.6.27.19-5.1/drivers/message/fusion/mptctl.h
---- linux-2.6.27/drivers/message/fusion/mptctl.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptctl.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptctl.h
+--- a/drivers/message/fusion/mptctl.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptctl.h Wed May 06 16:56:21 2009 +0100
@@ -1,5 +1,5 @@
/*
- * linux/drivers/message/fusion/mptioctl.h
* Fusion MPT misc device (ioctl) driver.
* For use with PCI chip/adapter(s):
* LSIFC9xx/LSI409xx Fibre Channel
-@@ -460,8 +460,5 @@ typedef struct _hp_target_info {
+@@ -460,8 +460,5 @@
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-
#endif
-diff -purN linux-2.6.27/drivers/message/fusion/mptdebug.h linux-2.6.27.19-5.1/drivers/message/fusion/mptdebug.h
---- linux-2.6.27/drivers/message/fusion/mptdebug.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptdebug.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptdebug.h
+--- a/drivers/message/fusion/mptdebug.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptdebug.h Wed May 06 16:56:21 2009 +0100
@@ -17,6 +17,10 @@
*
* Example: (programming for MPT_DEBUG_EVENTS on host 5)
/*
* Verbose logging
-diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drivers/message/fusion/mptfc.c
---- linux-2.6.27/drivers/message/fusion/mptfc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptfc.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptfc.c
+--- a/drivers/message/fusion/mptfc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptfc.c Wed May 06 16:56:21 2009 +0100
@@ -43,6 +43,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
-@@ -84,6 +87,14 @@ MODULE_PARM_DESC(mptfc_dev_loss_tmo, " I
+@@ -83,6 +86,14 @@
+ " transport to wait for an rport to "
" return following a device loss event."
" Default=60.");
-
++
+static int mpt_sdev_queue_depth = MPT_SCSI_CMD_PER_DEV_HIGH;
+static int mptfc_set_sdev_queue_depth(const char *val, struct kernel_param *kp);
+module_param_call(mpt_sdev_queue_depth, mptfc_set_sdev_queue_depth,
+MODULE_PARM_DESC(mpt_sdev_queue_depth,
+ " Max Device Queue Depth (default="
+ __MODULE_STRING(MPT_SCSI_CMD_PER_DEV_HIGH) ")");
-+
+
/* scsi-mid layer global parmeter is max_report_luns, which is 511 */
#define MPTFC_MAX_LUN (16895)
- static int max_lun = MPTFC_MAX_LUN;
-@@ -183,6 +194,34 @@ static struct fc_function_template mptfc
+@@ -183,6 +194,34 @@
.show_host_symbolic_name = 1,
};
static int
mptfc_block_error_handler(struct scsi_cmnd *SCpnt,
int (*func)(struct scsi_cmnd *SCpnt),
-@@ -194,7 +233,7 @@ mptfc_block_error_handler(struct scsi_cm
+@@ -194,7 +233,7 @@
struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
unsigned long flags;
int ready;
hd = shost_priv(SCpnt->device->host);
ioc = hd->ioc;
-@@ -476,6 +515,7 @@ mptfc_register_dev(MPT_ADAPTER *ioc, int
+@@ -476,6 +515,7 @@
if (vtarget) {
vtarget->id = pg0->CurrentTargetID;
vtarget->channel = pg0->CurrentBus;
}
}
*((struct mptfc_rport_info **)rport->dd_data) = ri;
-@@ -560,6 +600,7 @@ mptfc_target_alloc(struct scsi_target *s
+@@ -560,6 +600,7 @@
return rc;
}
/*
* mptfc_dump_lun_info
* @ioc
-@@ -589,7 +630,6 @@ mptfc_dump_lun_info(MPT_ADAPTER *ioc, st
+@@ -589,7 +630,6 @@
(unsigned long long)nn));
}
/*
* OS entry point to allow host driver to alloc memory
* for each scsi device. Called once per device the bus scan.
-@@ -604,7 +644,7 @@ mptfc_slave_alloc(struct scsi_device *sd
+@@ -604,7 +644,7 @@
VirtDevice *vdevice;
struct scsi_target *starget;
struct fc_rport *rport;
starget = scsi_target(sdev);
rport = starget_to_rport(starget);
-@@ -614,11 +654,10 @@ mptfc_slave_alloc(struct scsi_device *sd
+@@ -614,11 +654,10 @@
hd = shost_priv(sdev->host);
ioc = hd->ioc;
return -ENOMEM;
}
-@@ -635,10 +674,7 @@ mptfc_slave_alloc(struct scsi_device *sd
+@@ -635,10 +674,7 @@
vdevice->lun = sdev->lun;
vtarget->num_luns++;
return 0;
}
-@@ -944,11 +980,12 @@ start_over:
+@@ -944,11 +980,12 @@
return rc;
}
#define MPTFC_FW_DEVICE_TIMEOUT (1)
#define MPTFC_FW_IO_PEND_TIMEOUT (1)
-@@ -956,8 +993,9 @@ mptfc_SetFcPortPage1_defaults(MPT_ADAPTE
+@@ -956,8 +993,9 @@
#define OFF_FLAGS (MPI_FCPORTPAGE1_FLAGS_VERBOSE_RESCAN_EVENTS)
for (ii=0; ii<ioc->facts.NumberOfPorts; ii++) {
pp1 = ioc->fc_data.fc_port_page1[ii].data;
if ((pp1->InitiatorDeviceTimeout == MPTFC_FW_DEVICE_TIMEOUT)
&& (pp1->InitiatorIoPendTimeout == MPTFC_FW_IO_PEND_TIMEOUT)
-@@ -968,8 +1006,11 @@ mptfc_SetFcPortPage1_defaults(MPT_ADAPTE
+@@ -968,8 +1006,11 @@
pp1->InitiatorIoPendTimeout = MPTFC_FW_IO_PEND_TIMEOUT;
pp1->Flags &= ~OFF_FLAGS;
pp1->Flags |= ON_FLAGS;
}
-@@ -1082,10 +1123,13 @@ mptfc_link_status_change(struct work_str
+@@ -1082,10 +1123,13 @@
static void
mptfc_setup_reset(struct work_struct *work)
{
/* reset about to happen, delete (block) all rports */
list_for_each_entry(ri, &ioc->fc_rports, list) {
-@@ -1093,6 +1137,12 @@ mptfc_setup_reset(struct work_struct *wo
+@@ -1093,6 +1137,12 @@
ri->flags &= ~MPT_RPORT_INFO_FLAGS_REGISTERED;
fc_remote_port_delete(ri->rport); /* won't sleep */
ri->rport = NULL;
pn = (u64)ri->pg0.WWPN.High << 32 |
(u64)ri->pg0.WWPN.Low;
-@@ -1111,8 +1161,23 @@ mptfc_rescan_devices(struct work_struct
+@@ -1111,8 +1161,23 @@
MPT_ADAPTER *ioc =
container_of(work, MPT_ADAPTER, fc_rescan_work);
int ii;
/* start by tagging all ports as missing */
list_for_each_entry(ri, &ioc->fc_rports, list) {
-@@ -1140,6 +1205,12 @@ mptfc_rescan_devices(struct work_struct
+@@ -1140,6 +1205,12 @@
MPT_RPORT_INFO_FLAGS_MISSING);
fc_remote_port_delete(ri->rport); /* won't sleep */
ri->rport = NULL;
pn = (u64)ri->pg0.WWPN.High << 32 |
(u64)ri->pg0.WWPN.Low;
-@@ -1238,6 +1309,10 @@ mptfc_probe(struct pci_dev *pdev, const
+@@ -1238,6 +1309,10 @@
sh->max_id = ioc->pfacts->MaxDevices;
sh->max_lun = max_lun;
/* Required entry.
*/
sh->unique_id = ioc->id;
-@@ -1251,17 +1326,15 @@ mptfc_probe(struct pci_dev *pdev, const
+@@ -1251,17 +1326,15 @@
* A slightly different algorithm is required for
* 64bit SGEs.
*/
}
if (numSGE < sh->sg_tablesize) {
-@@ -1290,30 +1363,6 @@ mptfc_probe(struct pci_dev *pdev, const
+@@ -1290,30 +1363,6 @@
dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n",
ioc->name, ioc->ScsiLookup));
hd->last_queue_full = 0;
sh->transportt = mptfc_transport_template;
-@@ -1326,8 +1375,9 @@ mptfc_probe(struct pci_dev *pdev, const
+@@ -1326,8 +1375,9 @@
/* initialize workqueue */
ioc->fc_rescan_work_q =
create_singlethread_workqueue(ioc->fc_rescan_work_q_name);
if (!ioc->fc_rescan_work_q)
-@@ -1340,7 +1390,6 @@ mptfc_probe(struct pci_dev *pdev, const
+@@ -1340,7 +1390,6 @@
for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) {
(void) mptfc_GetFcPortPage0(ioc, ii);
}
/*
* scan for rports -
-@@ -1378,9 +1427,6 @@ mptfc_event_process(MPT_ADAPTER *ioc, Ev
+@@ -1378,9 +1427,6 @@
unsigned long flags;
int rc=1;
if (ioc->sh == NULL ||
((hd = shost_priv(ioc->sh)) == NULL))
return 1;
-@@ -1416,35 +1462,36 @@ mptfc_ioc_reset(MPT_ADAPTER *ioc, int re
+@@ -1416,35 +1462,36 @@
unsigned long flags;
rc = mptscsih_ioc_reset(ioc,reset_phase);
}
return 1;
}
-@@ -1543,7 +1590,6 @@ mptfc_exit(void)
+@@ -1543,7 +1590,6 @@
mpt_reset_deregister(mptfcDoneCtx);
mpt_event_deregister(mptfcDoneCtx);
mpt_deregister(mptfcInternalCtx);
mpt_deregister(mptfcTaskCtx);
mpt_deregister(mptfcDoneCtx);
-diff -purN linux-2.6.27/drivers/message/fusion/mptlan.c linux-2.6.27.19-5.1/drivers/message/fusion/mptlan.c
---- linux-2.6.27/drivers/message/fusion/mptlan.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptlan.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptlan.c
+--- a/drivers/message/fusion/mptlan.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptlan.c Wed May 06 16:56:21 2009 +0100
@@ -6,7 +6,6 @@
*
* Copyright (c) 2000-2008 LSI Corporation
*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
-@@ -165,6 +164,11 @@ DEFINE_RWLOCK(bad_naa_lock);
+@@ -165,6 +164,11 @@
#endif
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/**
* lan_reply - Handle all data sent from the hardware.
* @ioc: Pointer to MPT_ADAPTER structure
-@@ -190,8 +194,7 @@ lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_H
+@@ -190,8 +194,7 @@
u32 tmsg = CAST_PTR_TO_U32(reply);
dioprintk((KERN_INFO MYNAM ": %s/%s: @lan_reply, tmsg %08x\n",
switch (GET_LAN_FORM(tmsg)) {
-@@ -440,6 +443,7 @@ mpt_lan_open(struct net_device *dev)
+@@ -440,6 +443,7 @@
dlprintk((KERN_INFO MYNAM "/lo: Finished initializing RcvCtl\n"));
mpt_lan_post_receive_buckets(priv);
printk(KERN_INFO MYNAM ": %s/%s: interface up & active\n",
IOC_AND_NETDEV_NAMES_s_s(dev));
-@@ -780,6 +784,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, s
+@@ -780,6 +784,7 @@
// ctx, skb, skb->data));
mac = skb_mac_header(skb);
#ifdef QLOGIC_NAA_WORKAROUND
{
struct NAA_Hosed *nh;
-@@ -805,6 +810,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, s
+@@ -805,6 +810,7 @@
}
#endif
pTrans->TransactionDetails[0] = cpu_to_le32((cur_naa << 16) |
(mac[0] << 8) |
(mac[1] << 0));
-@@ -828,7 +834,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, s
+@@ -828,7 +834,7 @@
MPI_SGE_FLAGS_END_OF_LIST) << MPI_SGE_FLAGS_SHIFT) |
skb->len);
pSimple->Address.Low = cpu_to_le32((u32) dma);
pSimple->Address.High = cpu_to_le32((u32) ((u64) dma >> 32));
else
pSimple->Address.High = 0;
-@@ -1117,7 +1123,6 @@ mpt_lan_receive_post_reply(struct net_de
+@@ -1117,7 +1123,6 @@
PCI_DMA_FROMDEVICE);
skb_copy_from_linear_data(old_skb, skb_put(skb, len), len);
pci_dma_sync_single_for_device(mpt_dev->pcidev,
priv->RcvCtl[ctx].dma,
priv->RcvCtl[ctx].len,
-@@ -1295,7 +1300,7 @@ mpt_lan_post_receive_buckets(struct mpt_
+@@ -1295,7 +1300,7 @@
MPI_SGE_FLAGS_SIMPLE_ELEMENT |
MPI_SGE_FLAGS_64_BIT_ADDRESSING) << MPI_SGE_FLAGS_SHIFT) | len);
pSimple->Address.Low = cpu_to_le32((u32) priv->RcvCtl[ctx].dma);
pSimple->Address.High = cpu_to_le32((u32) ((u64) priv->RcvCtl[ctx].dma >> 32));
else
pSimple->Address.High = 0;
-@@ -1340,18 +1345,17 @@ static void
+@@ -1340,18 +1345,17 @@
mpt_lan_post_receive_buckets_work(struct work_struct *work)
{
mpt_lan_post_receive_buckets(container_of(work, struct mpt_lan_priv,
if (!dev)
return NULL;
-@@ -1363,8 +1367,9 @@ mpt_register_lan_device (MPT_ADAPTER *mp
+@@ -1363,8 +1367,9 @@
priv->mpt_dev = mpt_dev;
priv->pnum = pnum;
priv->post_buckets_active = 0;
dlprintk((KERN_INFO MYNAM "@%d: bucketlen = %d\n",
-@@ -1387,6 +1392,8 @@ mpt_register_lan_device (MPT_ADAPTER *mp
+@@ -1386,6 +1391,8 @@
+ priv->bucketthresh = priv->max_buckets_out * 2 / 3;
spin_lock_init(&priv->txfidx_lock);
spin_lock_init(&priv->rxfidx_lock);
-
-+ memset(&priv->stats, 0, sizeof(priv->stats));
+
++ memset(&priv->stats, 0, sizeof(priv->stats));
+
/* Grab pre-fetched LANPage1 stuff. :-) */
a = (u8 *) &mpt_dev->lan_cnfg_page1.HardwareAddressLow;
+@@ -1420,6 +1427,7 @@
-@@ -1421,6 +1428,7 @@ mpt_register_lan_device (MPT_ADAPTER *mp
dlprintk((KERN_INFO MYNAM ": Finished registering dev "
"and setting initial values\n"));
-
+
+
if (register_netdev(dev) != 0) {
free_netdev(dev);
- dev = NULL;
-diff -purN linux-2.6.27/drivers/message/fusion/mptlan.h linux-2.6.27.19-5.1/drivers/message/fusion/mptlan.h
---- linux-2.6.27/drivers/message/fusion/mptlan.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptlan.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptlan.h
+--- a/drivers/message/fusion/mptlan.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptlan.h Wed May 06 16:56:21 2009 +0100
@@ -6,7 +6,6 @@
*
* Copyright (c) 2000-2008 LSI Corporation
/* Override mptbase.h by pre-defining these! */
#define MODULEAUTHOR "LSI Corporation"
-diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/drivers/message/fusion/mptsas.c
---- linux-2.6.27/drivers/message/fusion/mptsas.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptsas.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptsas.c
+--- a/drivers/message/fusion/mptsas.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptsas.c Wed May 06 16:56:21 2009 +0100
@@ -47,9 +47,11 @@
#include <linux/kernel.h>
#include <linux/init.h>
#define my_NAME "Fusion MPT SAS Host driver"
#define my_VERSION MPT_LINUX_VERSION_COMMON
#define MYNAM "mptsas"
-@@ -72,6 +73,8 @@
+@@ -71,6 +72,8 @@
+ * Reserved channel for integrated raid
*/
#define MPTSAS_RAID_CHANNEL 1
-
-+#define SAS_CONFIG_PAGE_TIMEOUT 30
+
++#define SAS_CONFIG_PAGE_TIMEOUT 30
+
MODULE_AUTHOR(MODULEAUTHOR);
MODULE_DESCRIPTION(my_NAME);
- MODULE_LICENSE("GPL");
-@@ -83,6 +86,25 @@ MODULE_PARM_DESC(mpt_pt_clear,
+@@ -83,6 +86,25 @@
" Clear persistency table: enable=1 "
"(default=MPTSCSIH_PT_CLEAR=0)");
/* scsi-mid layer global parmeter is max_report_luns, which is 511 */
#define MPTSAS_MAX_LUN (16895)
static int max_lun = MPTSAS_MAX_LUN;
-@@ -93,8 +115,57 @@ static u8 mptsasDoneCtx = MPT_MAX_PROTOC
+@@ -93,8 +115,57 @@
static u8 mptsasTaskCtx = MPT_MAX_PROTOCOL_DRIVERS;
static u8 mptsasInternalCtx = MPT_MAX_PROTOCOL_DRIVERS; /* Used only for internal commands */
static u8 mptsasMgmtCtx = MPT_MAX_PROTOCOL_DRIVERS;
+-
+-static void mptsas_hotplug_work(struct work_struct *work);
+static u8 mptsasDeviceResetCtx = MPT_MAX_PROTOCOL_DRIVERS;
+
+static inline void mptsas_set_rphy(MPT_ADAPTER *ioc,
+ int ret = param_set_int(val, kp);
+ MPT_ADAPTER *ioc;
+ struct scsi_device *sdev;
-
--static void mptsas_hotplug_work(struct work_struct *work);
++
+ if (ret)
+ return ret;
+
static void mptsas_print_phy_data(MPT_ADAPTER *ioc,
MPI_SAS_IO_UNIT0_PHY_DATA *phy_data)
-@@ -218,37 +289,184 @@ static void mptsas_print_expander_pg1(MP
+@@ -218,37 +289,184 @@
le16_to_cpu(pg1->AttachedDevHandle)));
}
+ **/
static struct mptsas_portinfo *
-mptsas_get_hba_portinfo(MPT_ADAPTER *ioc)
-+mptsas_find_portinfo_by_sas_address(MPT_ADAPTER *ioc, u64 sas_address)
- {
+-{
- struct list_head *head = &ioc->sas_topology;
- struct mptsas_portinfo *pi = NULL;
-
- /* always the first entry on sas_topology list */
-+ struct mptsas_portinfo *port_info, *rc = NULL;
-+ int i;
-
+-
- if (!list_empty(head))
- pi = list_entry(head->next, struct mptsas_portinfo, list);
+-
+- return pi;
+-}
+-
+-/*
+- * mptsas_find_portinfo_by_handle
+- *
+- * This function should be called with the sas_topology_mutex already held
+- */
++mptsas_find_portinfo_by_sas_address(MPT_ADAPTER *ioc, u64 sas_address)
++{
++ struct mptsas_portinfo *port_info, *rc = NULL;
++ int i;
++
+ if (sas_address >= ioc->hba_port_sas_addr &&
+ sas_address < (ioc->hba_port_sas_addr +
+ ioc->hba_port_num_phy))
+ return ioc->hba_port_info;
-
-- return pi;
++
+ mutex_lock(&ioc->sas_topology_mutex);
+ list_for_each_entry(port_info, &ioc->sas_topology, list)
+ for (i = 0; i < port_info->num_phys; i++)
+ out:
+ mutex_unlock(&ioc->sas_topology_mutex);
+ return rc;
- }
-
--/*
-- * mptsas_find_portinfo_by_handle
++}
++
+/**
+ * mptsas_find_portinfo_by_handle -
+ * @ioc: Pointer to MPT_ADAPTER structure
+ * @handle:
- *
-- * This function should be called with the sas_topology_mutex already held
-- */
++ *
+ * This function should be called with the sas_topology_mutex already held
+ *
+ **/
static struct mptsas_portinfo *
mptsas_find_portinfo_by_handle(MPT_ADAPTER *ioc, u16 handle)
{
-@@ -265,9 +483,12 @@ mptsas_find_portinfo_by_handle(MPT_ADAPT
+@@ -265,9 +483,12 @@
return rc;
}
static inline int
mptsas_is_end_device(struct mptsas_devinfo * attached)
{
-@@ -285,7 +506,14 @@ mptsas_is_end_device(struct mptsas_devin
+@@ -285,7 +506,14 @@
return 0;
}
static void
mptsas_port_delete(MPT_ADAPTER *ioc, struct mptsas_portinfo_details * port_details)
{
-@@ -308,11 +536,17 @@ mptsas_port_delete(MPT_ADAPTER *ioc, str
+@@ -308,11 +536,17 @@
if(phy_info->port_details != port_details)
continue;
memset(&phy_info->attached, 0, sizeof(struct mptsas_devinfo));
static inline struct sas_rphy *
mptsas_get_rphy(struct mptsas_phyinfo *phy_info)
{
-@@ -322,13 +556,20 @@ mptsas_get_rphy(struct mptsas_phyinfo *p
+@@ -322,13 +556,20 @@
return NULL;
}
}
if (rphy) {
-@@ -339,6 +580,11 @@ mptsas_set_rphy(MPT_ADAPTER *ioc, struct
+@@ -339,6 +580,11 @@
}
}
static inline struct sas_port *
mptsas_get_port(struct mptsas_phyinfo *phy_info)
{
-@@ -348,6 +594,13 @@ mptsas_get_port(struct mptsas_phyinfo *p
+@@ -348,6 +594,13 @@
return NULL;
}
static inline void
mptsas_set_port(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info, struct sas_port *port)
{
-@@ -362,6 +615,11 @@ mptsas_set_port(MPT_ADAPTER *ioc, struct
+@@ -362,6 +615,11 @@
}
}
static inline struct scsi_target *
mptsas_get_starget(struct mptsas_phyinfo *phy_info)
{
-@@ -371,6 +629,12 @@ mptsas_get_starget(struct mptsas_phyinfo
+@@ -371,6 +629,12 @@
return NULL;
}
static inline void
mptsas_set_starget(struct mptsas_phyinfo *phy_info, struct scsi_target *
starget)
-@@ -379,398 +643,757 @@ starget)
+@@ -379,17 +643,297 @@
phy_info->port_details->starget = starget;
}
-
-/*
- * mptsas_setup_wide_ports
+- *
+- * Updates for new and existing narrow/wide port configuration
+- * in the sas_topology
+/**
+ * mptsas_add_device_component -
+ * @ioc: Pointer to MPT_ADAPTER structure
+ * @id:
+ * @sas_address:
+ * @device_info:
- *
-- * Updates for new and existing narrow/wide port configuration
-- * in the sas_topology
-- */
++ *
+ **/
- static void
--mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
++static void
+mptsas_add_device_component(MPT_ADAPTER *ioc, u8 channel, u8 id,
+ u64 sas_address, u32 device_info, u16 slot, u64 enclosure_logical_id)
- {
-- struct mptsas_portinfo_details * port_details;
-- struct mptsas_phyinfo *phy_info, *phy_info_cmp;
-- u64 sas_address;
-- int i, j;
--
-- mutex_lock(&ioc->sas_topology_mutex);
++{
+ struct sas_device_info *sas_info, *next;
+ struct scsi_device *sdev;
+ struct scsi_target *starget;
+ struct sas_rphy *rphy;
-
-- phy_info = port_info->phy_info;
-- for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) {
-- if (phy_info->attached.handle)
-- continue;
-- port_details = phy_info->port_details;
-- if (!port_details)
-- continue;
-- if (port_details->num_phys < 2)
-- continue;
-- /*
-- * Removing a phy from a port, letting the last
-- * phy be removed by firmware events.
-- */
-- dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-- "%s: [%p]: deleting phy = %d\n",
-- ioc->name, __func__, port_details, i));
-- port_details->num_phys--;
-- port_details->phy_bitmask &= ~ (1 << phy_info->phy_id);
-- memset(&phy_info->attached, 0, sizeof(struct mptsas_devinfo));
-- sas_port_delete_phy(port_details->port, phy_info->phy);
-- phy_info->port_details = NULL;
++
+ /*
+ * Delete all matching devices out of the list
+ */
+ list_del(&sas_info->list);
+ kfree(sas_info);
+ }
- }
-
++ }
++
+ if (!(sas_info = kzalloc(sizeof(struct sas_device_info), GFP_KERNEL)))
+ goto out;
+
- /*
-- * Populate and refresh the tree
++ /*
+ * Set Firmware mapping
- */
-- phy_info = port_info->phy_info;
-- for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) {
-- sas_address = phy_info->attached.sas_address;
-- dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "phy_id=%d sas_address=0x%018llX\n",
-- ioc->name, i, (unsigned long long)sas_address));
-- if (!sas_address)
-- continue;
-- port_details = phy_info->port_details;
-- /*
-- * Forming a port
-- */
-- if (!port_details) {
-- port_details = kzalloc(sizeof(*port_details),
-- GFP_KERNEL);
-- if (!port_details)
-- goto out;
-- port_details->num_phys = 1;
-- port_details->port_info = port_info;
-- if (phy_info->phy_id < 64 )
-- port_details->phy_bitmask |=
-- (1 << phy_info->phy_id);
-- phy_info->sas_port_add_phy=1;
-- dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\t\tForming port\n\t\t"
-- "phy_id=%d sas_address=0x%018llX\n",
-- ioc->name, i, (unsigned long long)sas_address));
-- phy_info->port_details = port_details;
-- }
++ */
+ sas_info->fw.id = id;
+ sas_info->fw.channel = channel;
-
-- if (i == port_info->num_phys - 1)
-- continue;
-- phy_info_cmp = &port_info->phy_info[i + 1];
-- for (j = i + 1 ; j < port_info->num_phys ; j++,
-- phy_info_cmp++) {
-- if (!phy_info_cmp->attached.sas_address)
-- continue;
-- if (sas_address != phy_info_cmp->attached.sas_address)
-- continue;
-- if (phy_info_cmp->port_details == port_details )
-- continue;
-- dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-- "\t\tphy_id=%d sas_address=0x%018llX\n",
-- ioc->name, j, (unsigned long long)
-- phy_info_cmp->attached.sas_address));
-- if (phy_info_cmp->port_details) {
-- port_details->rphy =
-- mptsas_get_rphy(phy_info_cmp);
-- port_details->port =
-- mptsas_get_port(phy_info_cmp);
-- port_details->starget =
-- mptsas_get_starget(phy_info_cmp);
-- port_details->num_phys =
-- phy_info_cmp->port_details->num_phys;
-- if (!phy_info_cmp->port_details->num_phys)
-- kfree(phy_info_cmp->port_details);
-- } else
-- phy_info_cmp->sas_port_add_phy=1;
-- /*
-- * Adding a phy to a port
-- */
-- phy_info_cmp->port_details = port_details;
-- if (phy_info_cmp->phy_id < 64 )
-- port_details->phy_bitmask |=
-- (1 << phy_info_cmp->phy_id);
-- port_details->num_phys++;
++
+ sas_info->sas_address = sas_address;
+ sas_info->device_info = device_info;
+ sas_info->slot = slot;
+ if (rphy->identify.sas_address == sas_address) {
+ sas_info->os.id = starget->id;
+ sas_info->os.channel = starget->channel;
- }
- }
-
- out:
--
-- for (i = 0; i < port_info->num_phys; i++) {
-- port_details = port_info->phy_info[i].port_details;
-- if (!port_details)
-- continue;
-- dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-- "%s: [%p]: phy_id=%02d num_phys=%02d "
-- "bitmask=0x%016llX\n", ioc->name, __func__,
-- port_details, i, port_details->num_phys,
-- (unsigned long long)port_details->phy_bitmask));
-- dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\t\tport = %p rphy=%p\n",
-- ioc->name, port_details->port, port_details->rphy));
-- }
-- dsaswideprintk(ioc, printk("\n"));
-- mutex_unlock(&ioc->sas_topology_mutex);
++ }
++ }
++
++ out:
+ mutex_unlock(&ioc->sas_device_info_mutex);
+ return;
- }
-
- /**
-- * csmisas_find_vtarget
-- *
-- * @ioc
-- * @volume_id
-- * @volume_bus
++}
++
++/**
+ * mptsas_add_device_component_by_fw -
+ * @ioc: Pointer to MPT_ADAPTER structure
+ * @channel: fw mapped id's
+ * @id:
- *
- **/
--static VirtTarget *
--mptsas_find_vtarget(MPT_ADAPTER *ioc, u8 channel, u8 id)
++ *
++ **/
+static void
+mptsas_add_device_component_by_fw(MPT_ADAPTER *ioc, u8 channel, u8 id)
- {
-- struct scsi_device *sdev;
-- VirtDevice *vdevice;
-- VirtTarget *vtarget = NULL;
++{
+ struct mptsas_devinfo sas_device;
+ struct mptsas_enclosure enclosure_info;
+ int rc;
-
-- shost_for_each_device(sdev, ioc->sh) {
-- if ((vdevice = sdev->hostdata) == NULL)
-- continue;
-- if (vdevice->vtarget->id == id &&
-- vdevice->vtarget->channel == channel)
-- vtarget = vdevice->vtarget;
-- }
-- return vtarget;
++
+ rc = mptsas_sas_device_pg0(ioc, &sas_device,
+ (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
+ MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
+ mptsas_add_device_component(ioc, sas_device.channel,
+ sas_device.id, sas_device.sas_address, sas_device.device_info,
+ sas_device.slot, enclosure_info.enclosure_logical_id);
- }
-
- /**
-- * mptsas_target_reset
-- *
-- * Issues TARGET_RESET to end device using handshaking method
-- *
-- * @ioc
-- * @channel
-- * @id
-- *
-- * Returns (1) success
-- * (0) failure
++}
++
++/**
+ * mptsas_add_device_component_starget_ir - Handle Integrated RAID, adding
+ * each individual device to list
+ * @ioc: Pointer to MPT_ADAPTER structure
+ * @channel: fw mapped id's
+ * @id:
- *
- **/
--static int
--mptsas_target_reset(MPT_ADAPTER *ioc, u8 channel, u8 id)
++ *
++ **/
+static void
+mptsas_add_device_component_starget_ir(MPT_ADAPTER *ioc,
+ struct scsi_target *starget)
- {
-- MPT_FRAME_HDR *mf;
-- SCSITaskMgmt_t *pScsiTm;
--
-- if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) {
-- dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, no msg frames @%d!!\n",
-- ioc->name,__func__, __LINE__));
-- return 0;
-- }
--
-- /* Format the Request
++{
+ CONFIGPARMS cfg;
+ ConfigPageHeader_t hdr;
+ dma_addr_t dma_handle;
+
+ /*
+ * Adding entry for hidden components
- */
-- pScsiTm = (SCSITaskMgmt_t *) mf;
-- memset (pScsiTm, 0, sizeof(SCSITaskMgmt_t));
-- pScsiTm->TargetID = id;
-- pScsiTm->Bus = channel;
-- pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
-- pScsiTm->TaskType = MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET;
-- pScsiTm->MsgFlags = MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION;
++ */
+ for (i = 0; i < buffer->NumPhysDisks; i++) {
-
-- DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)mf);
++
+ if (mpt_raid_phys_disk_pg0(ioc,
+ buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0)
+ continue;
-
-- mpt_put_msg_frame_hi_pri(ioc->TaskCtx, ioc, mf);
++
+ mptsas_add_device_component_by_fw(ioc, phys_disk.PhysDiskBus,
+ phys_disk.PhysDiskID);
-
-- return 1;
++
+ mutex_lock(&ioc->sas_device_info_mutex);
+ list_for_each_entry(sas_info, &ioc->sas_device_info_list,
+ list) {
+ if (buffer)
+ pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer,
+ dma_handle);
- }
-
- /**
-- * mptsas_target_reset_queue
-- *
-- * Receive request for TARGET_RESET after recieving an firmware
-- * event NOT_RESPONDING_EVENT, then put command in link list
-- * and queue if task_queue already in use.
-- *
-- * @ioc
-- * @sas_event_data
++}
++
++/**
+ * mptsas_add_device_component_starget -
+ * @ioc: Pointer to MPT_ADAPTER structure
+ * @starget:
- *
- **/
- static void
--mptsas_target_reset_queue(MPT_ADAPTER *ioc,
-- EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data)
++ *
++ **/
++static void
+mptsas_add_device_component_starget(MPT_ADAPTER *ioc,
+ struct scsi_target *starget)
- {
-- MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
-- VirtTarget *vtarget = NULL;
-- struct mptsas_target_reset_event *target_reset_list;
-- u8 id, channel;
--
-- id = sas_event_data->TargetID;
-- channel = sas_event_data->Bus;
++{
+ VirtTarget *vtarget;
+ struct sas_rphy *rphy;
+ struct mptsas_phyinfo *phy_info = NULL;
+ struct mptsas_enclosure enclosure_info;
-
-- if (!(vtarget = mptsas_find_vtarget(ioc, channel, id)))
++
+ rphy = dev_to_rphy(starget->dev.parent);
+ vtarget = starget->hostdata;
+ phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
+ rphy->identify.sas_address);
+ if (!phy_info)
- return;
-
-- vtarget->deleted = 1; /* block IO */
++ return;
++
+ memset(&enclosure_info, 0, sizeof(struct mptsas_enclosure));
+ mptsas_sas_enclosure_pg0(ioc, &enclosure_info,
+ (MPI_SAS_ENCLOS_PGAD_FORM_HANDLE <<
+mptsas_del_device_component_by_os(MPT_ADAPTER *ioc, u8 channel, u8 id)
+{
+ struct sas_device_info *sas_info, *next;
-
-- target_reset_list = kzalloc(sizeof(*target_reset_list),
-- GFP_ATOMIC);
-- if (!target_reset_list) {
-- dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, failed to allocate mem @%d..!!\n",
-- ioc->name,__func__, __LINE__));
-- return;
++
+ /*
+ * Set is_cached flag
+ */
+ list) {
+ if (sas_info->os.channel == channel && sas_info->os.id == id)
+ sas_info->is_cached = 1;
- }
++ }
+}
-
-- memcpy(&target_reset_list->sas_event_data, sas_event_data,
-- sizeof(*sas_event_data));
-- list_add_tail(&target_reset_list->list, &hd->target_reset_list);
--
-- if (hd->resetPending)
-- return;
++
+/**
+ * mptsas_del_device_components - Cleaning the list
+ * @ioc: Pointer to MPT_ADAPTER structure
+mptsas_del_device_components(MPT_ADAPTER *ioc)
+{
+ struct sas_device_info *sas_info, *next;
-
-- if (mptsas_target_reset(ioc, channel, id)) {
-- target_reset_list->target_reset_issued = 1;
-- hd->resetPending = 1;
++
+ mutex_lock(&ioc->sas_device_info_mutex);
+ list_for_each_entry_safe(sas_info, next, &ioc->sas_device_info_list,
+ list) {
+ list_del(&sas_info->list);
+ kfree(sas_info);
- }
++ }
+ mutex_unlock(&ioc->sas_device_info_mutex);
- }
-
- /**
-- * mptsas_dev_reset_complete
++}
++
++/**
+ * mptsas_setup_wide_ports - Updates for new and existing narrow/wide port
+ * configuration
+ * in the sas_topology
+ * @ioc: Pointer to MPT_ADAPTER structure
+ * @port_info:
- *
-- * Completion for TARGET_RESET after NOT_RESPONDING_EVENT,
-- * enable work queue to finish off removing device from upper layers.
-- * then send next TARGET_RESET in the queue.
-- *
-- * @ioc
-- *
-- **/
-+ */
++ *
+ */
static void
--mptsas_dev_reset_complete(MPT_ADAPTER *ioc)
-+mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
+ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
{
-- MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
-- struct list_head *head = &hd->target_reset_list;
-- struct mptsas_target_reset_event *target_reset_list;
-- struct mptsas_hotplug_event *ev;
-- EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data;
-- u8 id, channel;
-- __le64 sas_address;
+- struct mptsas_portinfo_details * port_details;
+ struct mptsas_portinfo_details *port_details;
-+ struct mptsas_phyinfo *phy_info, *phy_info_cmp;
-+ u64 sas_address;
-+ int i, j;
-
-- if (list_empty(head))
-- return;
-+ mutex_lock(&ioc->sas_topology_mutex);
-
-- target_reset_list = list_entry(head->next, struct mptsas_target_reset_event, list);
-+ phy_info = port_info->phy_info;
-+ for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) {
-+ if (phy_info->attached.handle)
-+ continue;
-+ port_details = phy_info->port_details;
-+ if (!port_details)
-+ continue;
-+ if (port_details->num_phys < 2)
-+ continue;
-
-- sas_event_data = &target_reset_list->sas_event_data;
-- id = sas_event_data->TargetID;
-- channel = sas_event_data->Bus;
-- hd->resetPending = 0;
-+ /*
-+ * Removing a phy from a port, letting the last
-+ * phy be removed by firmware events.
-+ */
-+ dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ struct mptsas_phyinfo *phy_info, *phy_info_cmp;
+ u64 sas_address;
+ int i, j;
+@@ -405,16 +949,20 @@
+ continue;
+ if (port_details->num_phys < 2)
+ continue;
++
+ /*
+ * Removing a phy from a port, letting the last
+ * phy be removed by firmware events.
+ */
+ dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+- "%s: [%p]: deleting phy = %d\n",
+- ioc->name, __func__, port_details, i));
+ "%s: [%p]: deleting phy = %d\n",
+ ioc->name, __func__, port_details, i));
-+ port_details->num_phys--;
+ port_details->num_phys--;
+- port_details->phy_bitmask &= ~ (1 << phy_info->phy_id);
+ port_details->phy_bitmask &= ~(1 << phy_info->phy_id);
-+ memset(&phy_info->attached, 0, sizeof(struct mptsas_devinfo));
+ memset(&phy_info->attached, 0, sizeof(struct mptsas_devinfo));
+ devtprintk(ioc, dev_printk(KERN_DEBUG, &phy_info->phy->dev,
+ MYIOC_s_FMT "delete phy %d, phy-obj (0x%p)\n", ioc->name,
+ phy_info->phy_id, phy_info->phy));
-+ sas_port_delete_phy(port_details->port, phy_info->phy);
-+ phy_info->port_details = NULL;
-+ }
-
- /*
-- * retry target reset
-+ * Populate and refresh the tree
- */
-- if (!target_reset_list->target_reset_issued) {
-- if (mptsas_target_reset(ioc, channel, id)) {
-- target_reset_list->target_reset_issued = 1;
-- hd->resetPending = 1;
-+ phy_info = port_info->phy_info;
-+ for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) {
-+ sas_address = phy_info->attached.sas_address;
+ sas_port_delete_phy(port_details->port, phy_info->phy);
+ phy_info->port_details = NULL;
+ }
+@@ -425,8 +973,9 @@
+ phy_info = port_info->phy_info;
+ for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) {
+ sas_address = phy_info->attached.sas_address;
+- dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "phy_id=%d sas_address=0x%018llX\n",
+- ioc->name, i, (unsigned long long)sas_address));
+ dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "phy_id=%d sas_address=0x%018llX\n",
+ ioc->name, i, (unsigned long long)sas_address));
-+ if (!sas_address)
-+ continue;
-+ port_details = phy_info->port_details;
-+ /*
-+ * Forming a port
-+ */
-+ if (!port_details) {
+ if (!sas_address)
+ continue;
+ port_details = phy_info->port_details;
+@@ -434,19 +983,20 @@
+ * Forming a port
+ */
+ if (!port_details) {
+- port_details = kzalloc(sizeof(*port_details),
+ port_details = kzalloc(sizeof(struct mptsas_portinfo_details),
-+ GFP_KERNEL);
-+ if (!port_details)
-+ goto out;
-+ port_details->num_phys = 1;
-+ port_details->port_info = port_info;
+ GFP_KERNEL);
+ if (!port_details)
+ goto out;
+ port_details->num_phys = 1;
+ port_details->port_info = port_info;
+- if (phy_info->phy_id < 64 )
+ if (phy_info->phy_id < 64)
-+ port_details->phy_bitmask |=
-+ (1 << phy_info->phy_id);
+ port_details->phy_bitmask |=
+ (1 << phy_info->phy_id);
+- phy_info->sas_port_add_phy=1;
+- dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\t\tForming port\n\t\t"
+- "phy_id=%d sas_address=0x%018llX\n",
+- ioc->name, i, (unsigned long long)sas_address));
+ phy_info->sas_port_add_phy = 1;
+ dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "\t\tForming port\n\t\t"
+ "phy_id=%d sas_address=0x%018llX\n", ioc->name,
+ i, (unsigned long long) sas_address));
-+ phy_info->port_details = port_details;
-+ }
-+
-+ if (i == port_info->num_phys - 1)
-+ continue;
-+ phy_info_cmp = &port_info->phy_info[i + 1];
-+ for (j = i + 1 ; j < port_info->num_phys ; j++,
-+ phy_info_cmp++) {
-+ if (!phy_info_cmp->attached.sas_address)
-+ continue;
-+ if (sas_address != phy_info_cmp->attached.sas_address)
-+ continue;
+ phy_info->port_details = port_details;
+ }
+
+@@ -459,7 +1009,7 @@
+ continue;
+ if (sas_address != phy_info_cmp->attached.sas_address)
+ continue;
+- if (phy_info_cmp->port_details == port_details )
+ if (phy_info_cmp->port_details == port_details)
-+ continue;
-+ dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+ "\t\tphy_id=%d sas_address=0x%018llX\n",
-+ ioc->name, j, (unsigned long long)
-+ phy_info_cmp->attached.sas_address));
-+ if (phy_info_cmp->port_details) {
-+ port_details->rphy =
-+ mptsas_get_rphy(phy_info_cmp);
-+ port_details->port =
-+ mptsas_get_port(phy_info_cmp);
-+ port_details->starget =
-+ mptsas_get_starget(phy_info_cmp);
-+ port_details->num_phys =
-+ phy_info_cmp->port_details->num_phys;
-+ if (!phy_info_cmp->port_details->num_phys)
-+ kfree(phy_info_cmp->port_details);
-+ } else
+ continue;
+ dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "\t\tphy_id=%d sas_address=0x%018llX\n",
+@@ -477,12 +1027,12 @@
+ if (!phy_info_cmp->port_details->num_phys)
+ kfree(phy_info_cmp->port_details);
+ } else
+- phy_info_cmp->sas_port_add_phy=1;
+ phy_info_cmp->sas_port_add_phy = 1;
-+ /*
-+ * Adding a phy to a port
-+ */
-+ phy_info_cmp->port_details = port_details;
+ /*
+ * Adding a phy to a port
+ */
+ phy_info_cmp->port_details = port_details;
+- if (phy_info_cmp->phy_id < 64 )
+ if (phy_info_cmp->phy_id < 64)
-+ port_details->phy_bitmask |=
-+ (1 << phy_info_cmp->phy_id);
-+ port_details->num_phys++;
- }
-- return;
- }
-
-- /*
-- * enable work queue to remove device from upper layers
-- */
-- list_del(&target_reset_list->list);
-+ out:
-
-- ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
-- if (!ev) {
-- dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, failed to allocate mem @%d..!!\n",
-- ioc->name,__func__, __LINE__));
-- return;
-+ for (i = 0; i < port_info->num_phys; i++) {
-+ port_details = port_info->phy_info[i].port_details;
-+ if (!port_details)
-+ continue;
-+ dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+ "%s: [%p]: phy_id=%02d num_phys=%02d "
-+ "bitmask=0x%016llX\n", ioc->name, __func__,
-+ port_details, i, port_details->num_phys,
-+ (unsigned long long)port_details->phy_bitmask));
+ port_details->phy_bitmask |=
+ (1 << phy_info_cmp->phy_id);
+ port_details->num_phys++;
+@@ -500,19 +1050,19 @@
+ "bitmask=0x%016llX\n", ioc->name, __func__,
+ port_details, i, port_details->num_phys,
+ (unsigned long long)port_details->phy_bitmask));
+- dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\t\tport = %p rphy=%p\n",
+- ioc->name, port_details->port, port_details->rphy));
+ dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "\t\tport = %p rphy=%p\n",
+ ioc->name, port_details->port, port_details->rphy));
}
-+ dsaswideprintk(ioc, printk("\n"));
-+ mutex_unlock(&ioc->sas_topology_mutex);
-+}
-+
-+/**
+ dsaswideprintk(ioc, printk("\n"));
+ mutex_unlock(&ioc->sas_topology_mutex);
+ }
+
+ /**
+- * csmisas_find_vtarget
+- *
+- * @ioc
+- * @volume_id
+- * @volume_bus
+ * mptsas_find_vtarget - obtain vtarget object for non-raid devices
+ * @ioc: Pointer to MPT_ADAPTER structure
+ * @channel:
+ * @id:
-+ *
-+ **/
-+static VirtTarget *
-+mptsas_find_vtarget(MPT_ADAPTER *ioc, u8 channel, u8 id)
-+{
-+ struct scsi_device *sdev;
-+ VirtDevice *vdevice;
-+ VirtTarget *vtarget = NULL;
+ *
+ **/
+ static VirtTarget *
+@@ -523,7 +1073,12 @@
+ VirtTarget *vtarget = NULL;
-- INIT_WORK(&ev->work, mptsas_hotplug_work);
-- ev->ioc = ioc;
-- ev->handle = le16_to_cpu(sas_event_data->DevHandle);
-- ev->parent_handle =
-- le16_to_cpu(sas_event_data->ParentDevHandle);
-- ev->channel = channel;
-- ev->id =id;
-- ev->phy_id = sas_event_data->PhyNum;
-- memcpy(&sas_address, &sas_event_data->SASAddress,
-- sizeof(__le64));
-- ev->sas_address = le64_to_cpu(sas_address);
-- ev->device_info = le32_to_cpu(sas_event_data->DeviceInfo);
-- ev->event_type = MPTSAS_DEL_DEVICE;
-- schedule_work(&ev->work);
-- kfree(target_reset_list);
-+ shost_for_each_device(sdev, ioc->sh) {
+ shost_for_each_device(sdev, ioc->sh) {
+- if ((vdevice = sdev->hostdata) == NULL)
+ if ((vdevice = sdev->hostdata) == NULL ||
+ (vdevice->vtarget == NULL))
+ continue;
+ if ((vdevice->vtarget->tflags &
+ MPT_TARGET_FLAGS_RAID_COMPONENT ||
+ vdevice->vtarget->raidVolume))
-+ continue;
-+ if (vdevice->vtarget->id == id &&
-+ vdevice->vtarget->channel == channel)
-+ vtarget = vdevice->vtarget;
-+ }
-+ return vtarget;
-+}
+ continue;
+ if (vdevice->vtarget->id == id &&
+ vdevice->vtarget->channel == channel)
+@@ -532,17 +1087,56 @@
+ return vtarget;
+ }
-- /*
-- * issue target reset to next device in the queue
-- */
+-/**
+- * mptsas_target_reset
+- *
+- * Issues TARGET_RESET to end device using handshaking method
+- *
+- * @ioc
+- * @channel
+- * @id
+- *
+- * Returns (1) success
+- * (0) failure
+static void
+mptsas_queue_device_delete(MPT_ADAPTER *ioc,
+ MpiEventDataSasDeviceStatusChange_t *sas_event_data)
+{
+ struct fw_event_work *fw_event;
+ int sz;
-
-- head = &hd->target_reset_list;
-- if (list_empty(head))
++
+ sz = offsetof(struct fw_event_work, event_data) +
+ sizeof(MpiEventDataSasDeviceStatusChange_t);
+ fw_event = kzalloc(sz, GFP_ATOMIC);
+ if (!fw_event) {
+ printk(MYIOC_s_WARN_FMT "%s: failed at (line=%d)\n",
+ ioc->name, __func__, __LINE__);
- return;
++ return;
+ }
+ memcpy(fw_event->event_data, sas_event_data,
+ sizeof(MpiEventDataSasDeviceStatusChange_t));
+ fw_event->ioc = ioc;
+ mptsas_add_fw_event(ioc, fw_event, msecs_to_jiffies(1));
+}
-
-- target_reset_list = list_entry(head->next, struct mptsas_target_reset_event,
-- list);
--
-- sas_event_data = &target_reset_list->sas_event_data;
-- id = sas_event_data->TargetID;
-- channel = sas_event_data->Bus;
++
+static void
+mptsas_queue_rescan(MPT_ADAPTER *ioc)
+{
+ struct fw_event_work *fw_event;
+ int sz;
-
-- if (mptsas_target_reset(ioc, channel, id)) {
-- target_reset_list->target_reset_issued = 1;
-- hd->resetPending = 1;
++
+ sz = offsetof(struct fw_event_work, event_data);
+ fw_event = kzalloc(sz, GFP_ATOMIC);
+ if (!fw_event) {
+ printk(MYIOC_s_WARN_FMT "%s: failed at (line=%d)\n",
+ ioc->name, __func__, __LINE__);
+ return;
- }
++ }
+ fw_event->event = -1;
+ fw_event->ioc = ioc;
+ mptsas_add_fw_event(ioc, fw_event, msecs_to_jiffies(1));
- }
-
++}
+
- /**
-- * mptsas_taskmgmt_complete
++
++/**
+ * mptsas_target_reset - Issues TARGET_RESET to end device using
+ * handshaking method
+ * @ioc: Pointer to MPT_ADAPTER structure
+ * @channel:
+ * @id:
- *
-- * @ioc
-- * @mf
-- * @mr
++ *
+ * Returns (1) success
+ * (0) failure
*
**/
static int
--mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
-+mptsas_target_reset(MPT_ADAPTER *ioc, u8 channel, u8 id)
-+{
-+ MPT_FRAME_HDR *mf;
-+ SCSITaskMgmt_t *pScsiTm;
-+
+@@ -551,16 +1145,23 @@
+ MPT_FRAME_HDR *mf;
+ SCSITaskMgmt_t *pScsiTm;
+
+- if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) {
+- dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, no msg frames @%d!!\n",
+- ioc->name,__func__, __LINE__));
+- return 0;
+- }
+ if (mpt_set_taskmgmt_in_progress_flag(ioc) != 0)
+ return 0;
+
+
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt request (mf=%p)\n",
+ ioc->name, mf));
-+
-+ /* Format the Request
-+ */
-+ pScsiTm = (SCSITaskMgmt_t *) mf;
+
+ /* Format the Request
+ */
+ pScsiTm = (SCSITaskMgmt_t *) mf;
+- memset (pScsiTm, 0, sizeof(SCSITaskMgmt_t));
+ memset(pScsiTm, 0, sizeof(SCSITaskMgmt_t));
-+ pScsiTm->TargetID = id;
-+ pScsiTm->Bus = channel;
-+ pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
-+ pScsiTm->TaskType = MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET;
-+ pScsiTm->MsgFlags = MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION;
-+
-+ DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)mf);
-+
+ pScsiTm->TargetID = id;
+ pScsiTm->Bus = channel;
+ pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
+@@ -569,21 +1170,27 @@
+
+ DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)mf);
+
+- mpt_put_msg_frame_hi_pri(ioc->TaskCtx, ioc, mf);
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "TaskMgmt type=%d (sas device delete) fw_channel = %d fw_id = %d)\n",
+ ioc->name, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET, channel, id));
+
+ mpt_put_msg_frame_hi_pri(mptsasDeviceResetCtx, ioc, mf);
-+
-+ return 1;
+
+ return 1;
+-}
+-
+-/**
+- * mptsas_target_reset_queue
+- *
+- * Receive request for TARGET_RESET after recieving an firmware
+- * event NOT_RESPONDING_EVENT, then put command in link list
+- * and queue if task_queue already in use.
+- *
+- * @ioc
+- * @sas_event_data
+- *
+
+ out_fail:
+
+ * Receive request for TARGET_RESET after
+ * recieving an firmware event NOT_RESPONDING_EVENT, then put command in
+ * link list and queue if task_queue already in use.
-+ **/
-+static void
-+mptsas_target_reset_queue(MPT_ADAPTER *ioc,
-+ EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data)
+ **/
+ static void
+ mptsas_target_reset_queue(MPT_ADAPTER *ioc,
+@@ -591,22 +1198,23 @@
{
-- mptsas_dev_reset_complete(ioc);
-- return mptscsih_taskmgmt_complete(ioc, mf, mr);
-+ MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
-+ VirtTarget *vtarget = NULL;
+ MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
+ VirtTarget *vtarget = NULL;
+- struct mptsas_target_reset_event *target_reset_list;
+ struct mptsas_target_reset_event *target_reset_list;
-+ u8 id, channel;
-+
-+ id = sas_event_data->TargetID;
-+ channel = sas_event_data->Bus;
-+
+ u8 id, channel;
+
+ id = sas_event_data->TargetID;
+ channel = sas_event_data->Bus;
+
+- if (!(vtarget = mptsas_find_vtarget(ioc, channel, id)))
+- return;
+-
+- vtarget->deleted = 1; /* block IO */
+-
+- target_reset_list = kzalloc(sizeof(*target_reset_list),
+ if ((vtarget = mptsas_find_vtarget(ioc, channel, id))) {
+ if (!ioc->disable_hotplug_remove)
+ vtarget->deleted = 1; /* block IO */
+ }
+
+ target_reset_list = kzalloc(sizeof(struct mptsas_target_reset_event),
-+ GFP_ATOMIC);
-+ if (!target_reset_list) {
+ GFP_ATOMIC);
+ if (!target_reset_list) {
+- dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, failed to allocate mem @%d..!!\n",
+- ioc->name,__func__, __LINE__));
+ dfailprintk(ioc, printk(MYIOC_s_WARN_FMT
+ "%s, failed to allocate mem @%d..!!\n",
+ ioc->name, __func__, __LINE__));
-+ return;
-+ }
-+
-+ memcpy(&target_reset_list->sas_event_data, sas_event_data,
-+ sizeof(*sas_event_data));
-+ list_add_tail(&target_reset_list->list, &hd->target_reset_list);
-+
+ return;
+ }
+
+@@ -614,84 +1222,99 @@
+ sizeof(*sas_event_data));
+ list_add_tail(&target_reset_list->list, &hd->target_reset_list);
+
+- if (hd->resetPending)
+- return;
+-
+- if (mptsas_target_reset(ioc, channel, id)) {
+ target_reset_list->time_count = jiffies;
+
+ if (mptsas_target_reset(ioc, channel, id))
-+ target_reset_list->target_reset_issued = 1;
- }
-
- /**
-- * mptscsih_ioc_reset
+ target_reset_list->target_reset_issued = 1;
+- hd->resetPending = 1;
+- }
+-}
+-
+-/**
+- * mptsas_dev_reset_complete
+- *
+- * Completion for TARGET_RESET after NOT_RESPONDING_EVENT,
+- * enable work queue to finish off removing device from upper layers.
+- * then send next TARGET_RESET in the queue.
+- *
+- * @ioc
+- *
+- **/
+-static void
+-mptsas_dev_reset_complete(MPT_ADAPTER *ioc)
++}
++
++/**
+ * mptsas_taskmgmt_complete - Completion for TARGET_RESET after
+ * NOT_RESPONDING_EVENT, enable work queue to finish off removing device
+ * from upper layers. then send next TARGET_RESET in the queue.
+ * @ioc: Pointer to MPT_ADAPTER structure
- *
-- * @ioc
-- * @reset_phase
++ *
+ **/
+static int
+mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
-+{
-+ MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
+ {
+ MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
+- struct list_head *head = &hd->target_reset_list;
+- struct mptsas_target_reset_event *target_reset_list;
+- struct mptsas_hotplug_event *ev;
+- EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data;
+ struct list_head *head = &hd->target_reset_list;
+ struct mptsas_target_reset_event *target_reset_list;
-+ u8 id, channel;
+ u8 id, channel;
+- __le64 sas_address;
+ SCSITaskMgmtReply_t *pScsiTmReply;
+
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt completed: "
+ }
+
+ mpt_clear_taskmgmt_in_progress_flag(ioc);
-+
-+ if (list_empty(head))
+
+ if (list_empty(head))
+- return;
+-
+- target_reset_list = list_entry(head->next, struct mptsas_target_reset_event, list);
+-
+- sas_event_data = &target_reset_list->sas_event_data;
+- id = sas_event_data->TargetID;
+- channel = sas_event_data->Bus;
+- hd->resetPending = 0;
+ return 1;
+
+ target_reset_list = list_entry(head->next,
+ id = pScsiTmReply->TargetID;
+ channel = pScsiTmReply->Bus;
+ target_reset_list->time_count = jiffies;
-+
-+ /*
-+ * retry target reset
-+ */
-+ if (!target_reset_list->target_reset_issued) {
+
+ /*
+ * retry target reset
+ */
+ if (!target_reset_list->target_reset_issued) {
+- if (mptsas_target_reset(ioc, channel, id)) {
+ if (mptsas_target_reset(ioc, channel, id))
-+ target_reset_list->target_reset_issued = 1;
+ target_reset_list->target_reset_issued = 1;
+- hd->resetPending = 1;
+- }
+- return;
+ return 1;
-+ }
-+
-+ /*
-+ * enable work queue to remove device from upper layers
-+ */
-+ list_del(&target_reset_list->list);
+ }
+
+ /*
+ * enable work queue to remove device from upper layers
+ */
+ list_del(&target_reset_list->list);
+-
+- ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
+- if (!ev) {
+- dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, failed to allocate mem @%d..!!\n",
+- ioc->name,__func__, __LINE__));
+- return;
+- }
+-
+- INIT_WORK(&ev->work, mptsas_hotplug_work);
+- ev->ioc = ioc;
+- ev->handle = le16_to_cpu(sas_event_data->DevHandle);
+- ev->parent_handle =
+- le16_to_cpu(sas_event_data->ParentDevHandle);
+- ev->channel = channel;
+- ev->id =id;
+- ev->phy_id = sas_event_data->PhyNum;
+- memcpy(&sas_address, &sas_event_data->SASAddress,
+- sizeof(__le64));
+- ev->sas_address = le64_to_cpu(sas_address);
+- ev->device_info = le32_to_cpu(sas_event_data->DeviceInfo);
+- ev->event_type = MPTSAS_DEL_DEVICE;
+- schedule_work(&ev->work);
+- kfree(target_reset_list);
+ if ((mptsas_find_vtarget(ioc, channel, id)) && !ioc->fw_events_off)
+ mptsas_queue_device_delete(ioc,
+ &target_reset_list->sas_event_data);
+
-+
-+ /*
-+ * issue target reset to next device in the queue
-+ */
-+
-+ head = &hd->target_reset_list;
-+ if (list_empty(head))
+
+ /*
+ * issue target reset to next device in the queue
+@@ -699,78 +1322,78 @@
+
+ head = &hd->target_reset_list;
+ if (list_empty(head))
+- return;
+-
+- target_reset_list = list_entry(head->next, struct mptsas_target_reset_event,
+- list);
+-
+- sas_event_data = &target_reset_list->sas_event_data;
+- id = sas_event_data->TargetID;
+- channel = sas_event_data->Bus;
+-
+- if (mptsas_target_reset(ioc, channel, id)) {
+ return 1;
+
+ target_reset_list = list_entry(head->next,
+ target_reset_list->time_count = jiffies;
+
+ if (mptsas_target_reset(ioc, channel, id))
-+ target_reset_list->target_reset_issued = 1;
+ target_reset_list->target_reset_issued = 1;
+- hd->resetPending = 1;
+- }
+-}
+-
+-/**
+- * mptsas_taskmgmt_complete
+- *
+- * @ioc
+- * @mf
+- * @mr
+- *
+- **/
+-static int
+-mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
+-{
+- mptsas_dev_reset_complete(ioc);
+- return mptscsih_taskmgmt_complete(ioc, mf, mr);
+-}
+-
+-/**
+- * mptscsih_ioc_reset
+- *
+- * @ioc
+- * @reset_phase
+
+ return 1;
+}
int rc;
rc = mptscsih_ioc_reset(ioc, reset_phase);
-+ if ((ioc->bus_type != SAS) || (!rc))
-+ return rc;
-
+-
- if (ioc->bus_type != SAS)
- goto out;
-
-
- if (!ioc->sh || !ioc->sh->hostdata)
- goto out;
++ if ((ioc->bus_type != SAS) || (!rc))
++ return rc;
++
hd = shost_priv(ioc->sh);
if (!hd->ioc)
goto out;
static int
mptsas_sas_enclosure_pg0(MPT_ADAPTER *ioc, struct mptsas_enclosure *enclosure,
u32 form, u32 form_specific)
-@@ -793,7 +1416,7 @@ mptsas_sas_enclosure_pg0(MPT_ADAPTER *io
+@@ -793,7 +1416,7 @@
cfg.pageAddr = form + form_specific;
cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
cfg.dir = 0; /* read */
error = mpt_config(ioc, &cfg);
if (error)
-@@ -836,19 +1459,341 @@ mptsas_sas_enclosure_pg0(MPT_ADAPTER *io
+@@ -836,19 +1459,341 @@
return error;
}
static int
mptsas_slave_configure(struct scsi_device *sdev)
{
+-
+- if (sdev->channel == MPTSAS_RAID_CHANNEL)
+- goto out;
+ struct Scsi_Host *host = sdev->host;
+ MPT_SCSI_HOST *hd = shost_priv(host);
+ MPT_ADAPTER *ioc = hd->ioc;
+ VirtDevice *vdevice = sdev->hostdata;
-
-- if (sdev->channel == MPTSAS_RAID_CHANNEL)
++
+
+ if (vdevice->vtarget->deleted) {
+ sdev_printk(KERN_INFO, sdev, "clearing deleted flag\n");
+ */
+ if (sdev->channel == MPTSAS_RAID_CHANNEL) {
+ mptsas_add_device_component_starget_ir(ioc, scsi_target(sdev));
- goto out;
++ goto out;
+ }
sas_read_port_mode_page(sdev);
+- out:
+ mptsas_add_device_component_starget(ioc, scsi_target(sdev));
+
+ if (sdev->type == TYPE_TAPE &&
+ (ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_TLR))
+ mptsas_issue_tlr(hd, sdev);
- out:
++ out:
+
return mptscsih_slave_configure(sdev);
}
static int
mptsas_target_alloc(struct scsi_target *starget)
{
-@@ -875,9 +1820,14 @@ mptsas_target_alloc(struct scsi_target *
+@@ -875,9 +1820,14 @@
* RAID volumes placed beyond the last expected port.
*/
if (starget->channel == MPTSAS_RAID_CHANNEL) {
goto out;
}
-@@ -886,18 +1836,26 @@ mptsas_target_alloc(struct scsi_target *
+@@ -886,18 +1836,26 @@
list_for_each_entry(p, &ioc->sas_topology, list) {
for (i = 0; i < p->num_phys; i++) {
if (p->phy_info[i].attached.sas_address !=
id = p->phy_info[i].attached.id;
channel = p->phy_info[i].attached.channel;
mptsas_set_starget(&p->phy_info[i], starget);
-
++
+ starget_printk(KERN_INFO, starget, MYIOC_s_FMT
+ "add device: fw_channel %d, fw_id %d, phy %d,"
+ " sas_addr 0x%llx\n",
+ p->phy_info[i].attached.id,
+ p->phy_info[i].attached.phy_id,
+ (unsigned long long)p->phy_info[i].attached.sas_address);
-+
+
/*
* Exposing hidden raid components
*/
vtarget->tflags |=
MPT_TARGET_FLAGS_RAID_COMPONENT;
p->phy_info[i].attached.phys_disk_num = id;
-@@ -918,6 +1876,11 @@ mptsas_target_alloc(struct scsi_target *
+@@ -918,6 +1876,11 @@
return 0;
}
static void
mptsas_target_destroy(struct scsi_target *starget)
{
-@@ -926,11 +1889,14 @@ mptsas_target_destroy(struct scsi_target
+@@ -926,10 +1889,13 @@
struct sas_rphy *rphy;
struct mptsas_portinfo *p;
int i;
if (!starget->hostdata)
return;
-
++
+ mptsas_del_device_component_by_os(ioc, starget->channel,
+ starget->id);
-+
+
if (starget->channel == MPTSAS_RAID_CHANNEL)
goto out;
-
-@@ -940,8 +1906,16 @@ mptsas_target_destroy(struct scsi_target
+@@ -940,8 +1906,16 @@
if (p->phy_info[i].attached.sas_address !=
rphy->identify.sas_address)
continue;
}
}
-@@ -950,7 +1924,11 @@ mptsas_target_destroy(struct scsi_target
+@@ -950,7 +1924,11 @@
starget->hostdata = NULL;
}
static int
mptsas_slave_alloc(struct scsi_device *sdev)
{
-@@ -961,17 +1939,20 @@ mptsas_slave_alloc(struct scsi_device *s
+@@ -961,17 +1939,20 @@
VirtDevice *vdevice;
struct scsi_target *starget;
int i;
if (sdev->channel == MPTSAS_RAID_CHANNEL)
goto out;
-@@ -1005,9 +1986,17 @@ mptsas_slave_alloc(struct scsi_device *s
+@@ -1005,9 +1986,17 @@
return 0;
}
VirtDevice *vdevice = SCpnt->device->hostdata;
if (!vdevice || !vdevice->vtarget || vdevice->vtarget->deleted) {
-@@ -1016,9 +2005,13 @@ mptsas_qcmd(struct scsi_cmnd *SCpnt, voi
+@@ -1016,9 +2005,13 @@
return 0;
}
-// scsi_print_command(SCpnt);
+-
+- return mptscsih_qcmd(SCpnt,done);
+ hd = shost_priv(SCpnt->device->host);
+ ioc = hd->ioc;
-
-- return mptscsih_qcmd(SCpnt,done);
++
+ if (ioc->sas_discovery_quiesce_io)
+ return SCSI_MLQUEUE_HOST_BUSY;
+
}
-@@ -1049,6 +2042,11 @@ static struct scsi_host_template mptsas_
+@@ -1049,6 +2042,11 @@
.shost_attrs = mptscsih_host_attrs,
};
static int mptsas_get_linkerrors(struct sas_phy *phy)
{
MPT_ADAPTER *ioc = phy_to_ioc(phy);
-@@ -1058,7 +2056,6 @@ static int mptsas_get_linkerrors(struct
+@@ -1058,7 +2056,6 @@
dma_addr_t dma_handle;
int error;
if (!scsi_is_sas_phy_local(phy))
return -EINVAL;
-@@ -1075,7 +2072,7 @@ static int mptsas_get_linkerrors(struct
+@@ -1075,7 +2072,7 @@
cfg.pageAddr = phy->identify.phy_identifier;
cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
cfg.dir = 0; /* read */
error = mpt_config(ioc, &cfg);
if (error)
-@@ -1111,19 +2108,37 @@ static int mptsas_get_linkerrors(struct
+@@ -1111,19 +2108,37 @@
return error;
}
}
- complete(&ioc->sas_mgmt.done);
- return 1;
+-}
+-
+
+ if (ioc->sas_mgmt.status & MPT_MGMT_STATUS_PENDING) {
+ ioc->sas_mgmt.status &= ~MPT_MGMT_STATUS_PENDING;
+ return 1;
+ }
+ return 0;
- }
-
++}
++
+/**
+ * mptsas_phy_reset -
+ * @phy:
static int mptsas_phy_reset(struct sas_phy *phy, int hard_reset)
{
MPT_ADAPTER *ioc = phy_to_ioc(phy);
-@@ -1134,7 +2149,6 @@ static int mptsas_phy_reset(struct sas_p
+@@ -1134,7 +2149,6 @@
unsigned long timeleft;
int error = -ERESTARTSYS;
if (!scsi_is_sas_phy_local(phy))
return -EINVAL;
-@@ -1160,21 +2174,24 @@ static int mptsas_phy_reset(struct sas_p
+@@ -1160,21 +2174,24 @@
MPI_SAS_OP_PHY_HARD_RESET : MPI_SAS_OP_PHY_LINK_RESET;
req->PhyNum = phy->identify.phy_identifier;
error = -ENXIO;
goto out_unlock;
}
-@@ -1191,11 +2208,18 @@ static int mptsas_phy_reset(struct sas_p
+@@ -1191,11 +2208,18 @@
error = 0;
out_unlock:
static int
mptsas_get_enclosure_identifier(struct sas_rphy *rphy, u64 *identifier)
{
-@@ -1224,12 +2248,18 @@ mptsas_get_enclosure_identifier(struct s
+@@ -1224,12 +2248,18 @@
memset(&enclosure_info, 0, sizeof(struct mptsas_enclosure));
error = mptsas_sas_enclosure_pg0(ioc, &enclosure_info,
(MPI_SAS_ENCLOS_PGAD_FORM_HANDLE <<
static int
mptsas_get_bay_identifier(struct sas_rphy *rphy)
{
-@@ -1269,14 +2299,16 @@ static int mptsas_smp_handler(struct Scs
+@@ -1269,14 +2299,16 @@
u64 sas_address = 0;
if (!rsp) {
ioc->name, __func__, req->bio->bi_vcnt, req->data_len,
rsp->bio->bi_vcnt, rsp->data_len);
return -EINVAL;
-@@ -1304,7 +2336,7 @@ static int mptsas_smp_handler(struct Scs
+@@ -1304,7 +2336,7 @@
struct mptsas_portinfo *port_info;
mutex_lock(&ioc->sas_topology_mutex);
if (port_info && port_info->phy_info)
sas_address =
port_info->phy_info[0].phy->identify.sas_address;
-@@ -1317,41 +2349,58 @@ static int mptsas_smp_handler(struct Scs
+@@ -1317,41 +2349,58 @@
(((int *) mf) + (offsetof(SmpPassthroughRequest_t, SGL) / 4));
/* request */
if (!dma_addr_in)
- goto unmap;
- mpt_add_sge(psge, flagsLength, dma_addr_in);
+-
+ goto out_unmap;
-
++
+ ioc->add_sge(psge, flagsLength, dma_addr_in);
+
+ INITIALIZE_MGMT_STATUS(ioc->sas_mgmt.status)
- mpt_HardResetHandler(ioc, CAN_SLEEP);
- ret = -ETIMEDOUT;
- goto unmap;
+- }
+ if (!(ioc->sas_mgmt.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
+ ret = -ETIME;
+ mpt_free_msg_frame(ioc, mf);
+ mpt_HardResetHandler(ioc, CAN_SLEEP);
+ }
+ goto out_unmap;
- }
++ }
+
mf = NULL;
SmpPassthroughReply_t *smprep;
smprep = (SmpPassthroughReply_t *)ioc->sas_mgmt.reply;
-@@ -1360,11 +2409,12 @@ static int mptsas_smp_handler(struct Scs
+@@ -1360,11 +2409,12 @@
req->data_len = 0;
rsp->data_len -= smprep->ResponseDataLength;
} else {
if (dma_addr_out)
pci_unmap_single(ioc->pcidev, dma_addr_out, req->data_len,
PCI_DMA_BIDIRECTIONAL);
-@@ -1375,6 +2425,7 @@ put_mf:
+@@ -1375,6 +2425,7 @@
if (mf)
mpt_free_msg_frame(ioc, mf);
out_unlock:
mutex_unlock(&ioc->sas_mgmt.mutex);
out:
return ret;
-@@ -1390,6 +2441,12 @@ static struct sas_function_template mpts
+@@ -1390,6 +2441,12 @@
static struct scsi_transport_template *mptsas_transport_template;
static int
mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
{
-@@ -1412,7 +2469,7 @@ mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc,
+@@ -1412,7 +2469,7 @@
cfg.pageAddr = 0;
cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
cfg.dir = 0; /* read */
error = mpt_config(ioc, &cfg);
if (error)
-@@ -1438,7 +2495,7 @@ mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc,
+@@ -1438,7 +2495,7 @@
port_info->num_phys = buffer->NumPhys;
port_info->phy_info = kcalloc(port_info->num_phys,
if (!port_info->phy_info) {
error = -ENOMEM;
goto out_free_consistent;
-@@ -1459,6 +2516,8 @@ mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc,
+@@ -1459,15 +2516,22 @@
port_info->phy_info[i].portinfo = port_info;
port_info->phy_info[i].handle =
le16_to_cpu(buffer->PhyData[i].ControllerDevHandle);
+- }
+-
+- out_free_consistent:
+- pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
+- buffer, dma_handle);
+- out:
+- return error;
+-}
+-
+ port_info->phy_info[i].port_flags =
+ buffer->PhyData[i].PortFlags;
- }
-
- out_free_consistent:
-@@ -1468,6 +2527,11 @@ mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc,
- return error;
- }
-
++ }
++
++ out_free_consistent:
++ pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
++ buffer, dma_handle);
++ out:
++ return error;
++}
++
+/**
+ * mptsas_sas_io_unit_pg1 -
+ * @ioc: Pointer to MPT_ADAPTER structure
static int
mptsas_sas_io_unit_pg1(MPT_ADAPTER *ioc)
{
-@@ -1483,11 +2547,11 @@ mptsas_sas_io_unit_pg1(MPT_ADAPTER *ioc)
+@@ -1483,11 +2547,11 @@
cfg.cfghdr.ehdr = &hdr;
cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
error = mpt_config(ioc, &cfg);
if (error)
-@@ -1525,6 +2589,14 @@ mptsas_sas_io_unit_pg1(MPT_ADAPTER *ioc)
+@@ -1525,6 +2589,14 @@
return error;
}
static int
mptsas_sas_phy_pg0(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info,
u32 form, u32 form_specific)
-@@ -1545,12 +2617,12 @@ mptsas_sas_phy_pg0(MPT_ADAPTER *ioc, str
+@@ -1545,12 +2617,12 @@
cfg.cfghdr.ehdr = &hdr;
cfg.dir = 0; /* read */
error = mpt_config(ioc, &cfg);
if (error)
-@@ -1581,6 +2653,8 @@ mptsas_sas_phy_pg0(MPT_ADAPTER *ioc, str
+@@ -1581,14 +2653,24 @@
phy_info->programmed_link_rate = buffer->ProgrammedLinkRate;
phy_info->identify.handle = le16_to_cpu(buffer->OwnerDevHandle);
phy_info->attached.handle = le16_to_cpu(buffer->AttachedDevHandle);
+-
+- out_free_consistent:
+- pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
+- buffer, dma_handle);
+- out:
+- return error;
+-}
+-
+ phy_info->change_count = buffer->ChangeCount;
+ phy_info->phy_info = le32_to_cpu(buffer->PhyInfo);
-
- out_free_consistent:
- pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
-@@ -1589,6 +2663,14 @@ mptsas_sas_phy_pg0(MPT_ADAPTER *ioc, str
- return error;
- }
-
++
++ out_free_consistent:
++ pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
++ buffer, dma_handle);
++ out:
++ return error;
++}
++
+/**
+ * mptsas_sas_device_pg0 -
+ * @ioc: Pointer to MPT_ADAPTER structure
static int
mptsas_sas_device_pg0(MPT_ADAPTER *ioc, struct mptsas_devinfo *device_info,
u32 form, u32 form_specific)
-@@ -1600,10 +2682,6 @@ mptsas_sas_device_pg0(MPT_ADAPTER *ioc,
+@@ -1600,10 +2682,6 @@
__le64 sas_address;
int error=0;
hdr.PageVersion = MPI_SASDEVICE0_PAGEVERSION;
hdr.ExtPageLength = 0;
hdr.PageNumber = 0;
-@@ -1617,9 +2695,8 @@ mptsas_sas_device_pg0(MPT_ADAPTER *ioc,
+@@ -1617,33 +2695,39 @@
cfg.physAddr = -1;
cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
cfg.dir = 0; /* read */
- cfg.timeout = 10;
+ cfg.timeout = SAS_CONFIG_PAGE_TIMEOUT;
-
-- memset(device_info, 0, sizeof(struct mptsas_devinfo));
- error = mpt_config(ioc, &cfg);
- if (error)
- goto out;
-@@ -1639,11 +2716,18 @@ mptsas_sas_device_pg0(MPT_ADAPTER *ioc,
- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-
- error = mpt_config(ioc, &cfg);
++
++ error = mpt_config(ioc, &cfg);
++ if (error)
++ goto out;
++ if (!hdr.ExtPageLength) {
++ error = -ENXIO;
++ goto out;
++ }
++
++ buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
++ &dma_handle);
++ if (!buffer) {
++ error = -ENOMEM;
++ goto out;
++ }
++
++ cfg.physAddr = dma_handle;
++ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
++
++ error = mpt_config(ioc, &cfg);
+
+ if (error == MPI_IOCSTATUS_CONFIG_INVALID_PAGE) {
+ error = -ENODEV;
+ goto out_free_consistent;
+ }
+
- if (error)
- goto out_free_consistent;
-
- mptsas_print_device_pg0(ioc, buffer);
++ if (error)
++ goto out_free_consistent;
++
++ mptsas_print_device_pg0(ioc, buffer);
-+ memset(device_info, 0, sizeof(struct mptsas_devinfo));
+ memset(device_info, 0, sizeof(struct mptsas_devinfo));
+- error = mpt_config(ioc, &cfg);
+- if (error)
+- goto out;
+- if (!hdr.ExtPageLength) {
+- error = -ENXIO;
+- goto out;
+- }
+-
+- buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
+- &dma_handle);
+- if (!buffer) {
+- error = -ENOMEM;
+- goto out;
+- }
+-
+- cfg.physAddr = dma_handle;
+- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
+-
+- error = mpt_config(ioc, &cfg);
+- if (error)
+- goto out_free_consistent;
+-
+- mptsas_print_device_pg0(ioc, buffer);
+-
device_info->handle = le16_to_cpu(buffer->DevHandle);
device_info->handle_parent = le16_to_cpu(buffer->ParentDevHandle);
device_info->handle_enclosure =
-@@ -1666,6 +2750,14 @@ mptsas_sas_device_pg0(MPT_ADAPTER *ioc,
+@@ -1666,6 +2750,14 @@
return error;
}
static int
mptsas_sas_expander_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info,
u32 form, u32 form_specific)
-@@ -1675,7 +2767,9 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc
+@@ -1675,7 +2767,9 @@
SasExpanderPage0_t *buffer;
dma_addr_t dma_handle;
int i, error;
+-
+ __le64 sas_address;
-
++
+ memset(port_info, 0, sizeof(struct mptsas_portinfo));
hdr.PageVersion = MPI_SASEXPANDER0_PAGEVERSION;
hdr.ExtPageLength = 0;
hdr.PageNumber = 0;
-@@ -1689,9 +2783,8 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc
+@@ -1689,9 +2783,8 @@
cfg.pageAddr = form + form_specific;
cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
cfg.dir = 0; /* read */
- cfg.timeout = 10;
-+ cfg.timeout = SAS_CONFIG_PAGE_TIMEOUT;
-
+-
- memset(port_info, 0, sizeof(struct mptsas_portinfo));
++ cfg.timeout = SAS_CONFIG_PAGE_TIMEOUT;
++
error = mpt_config(ioc, &cfg);
if (error)
goto out;
-@@ -1712,27 +2805,32 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc
+@@ -1712,36 +2805,49 @@
cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
error = mpt_config(ioc, &cfg);
- goto out_free_consistent;
-
- if (!buffer->NumPhys) {
+- error = -ENODEV;
+- goto out_free_consistent;
+- }
+ if (error == MPI_IOCSTATUS_CONFIG_INVALID_PAGE) {
- error = -ENODEV;
- goto out_free_consistent;
- }
-
-+ if (error)
++ error = -ENODEV;
+ goto out_free_consistent;
++ }
+
++ if (error)
++ goto out_free_consistent;
+
/* save config data */
- port_info->num_phys = buffer->NumPhys;
+ port_info->num_phys = (buffer->NumPhys) ? buffer->NumPhys : 1;
port_info->phy_info[i].portinfo = port_info;
port_info->phy_info[i].handle =
le16_to_cpu(buffer->DevHandle);
+- }
+-
+- out_free_consistent:
+- pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
+- buffer, dma_handle);
+- out:
+- return error;
+-}
+-
+ port_info->phy_info[i].identify.sas_address =
+ le64_to_cpu(sas_address);
+ port_info->phy_info[i].identify.handle_parent =
+ le16_to_cpu(buffer->ParentDevHandle);
- }
-
- out_free_consistent:
-@@ -1742,6 +2840,14 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc
- return error;
- }
-
++ }
++
++ out_free_consistent:
++ pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
++ buffer, dma_handle);
++ out:
++ return error;
++}
++
+/**
+ * mptsas_sas_expander_pg1 -
+ * @ioc: Pointer to MPT_ADAPTER structure
static int
mptsas_sas_expander_pg1(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info,
u32 form, u32 form_specific)
-@@ -1752,11 +2858,7 @@ mptsas_sas_expander_pg1(MPT_ADAPTER *ioc
+@@ -1752,11 +2858,7 @@
dma_addr_t dma_handle;
int error=0;
hdr.ExtPageLength = 0;
hdr.PageNumber = 1;
hdr.Reserved1 = 0;
-@@ -1769,7 +2871,7 @@ mptsas_sas_expander_pg1(MPT_ADAPTER *ioc
+@@ -1769,7 +2871,7 @@
cfg.pageAddr = form + form_specific;
cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
cfg.dir = 0; /* read */
error = mpt_config(ioc, &cfg);
if (error)
-@@ -1791,6 +2893,11 @@ mptsas_sas_expander_pg1(MPT_ADAPTER *ioc
+@@ -1791,6 +2893,11 @@
cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
error = mpt_config(ioc, &cfg);
if (error)
goto out_free_consistent;
-@@ -1805,6 +2912,8 @@ mptsas_sas_expander_pg1(MPT_ADAPTER *ioc
+@@ -1805,14 +2912,22 @@
phy_info->hw_link_rate = buffer->HwLinkRate;
phy_info->identify.handle = le16_to_cpu(buffer->OwnerDevHandle);
phy_info->attached.handle = le16_to_cpu(buffer->AttachedDevHandle);
+-
+- out_free_consistent:
+- pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
+- buffer, dma_handle);
+- out:
+- return error;
+-}
+-
+ phy_info->change_count = buffer->ChangeCount;
+ phy_info->phy_info = le32_to_cpu(buffer->PhyInfo);
-
- out_free_consistent:
- pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
-@@ -1813,6 +2922,12 @@ mptsas_sas_expander_pg1(MPT_ADAPTER *ioc
- return error;
- }
-
++
++ out_free_consistent:
++ pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
++ buffer, dma_handle);
++ out:
++ return error;
++}
++
+/**
+ * mptsas_parse_device_info -
+ * @identify:
static void
mptsas_parse_device_info(struct sas_identify *identify,
struct mptsas_devinfo *device_info)
-@@ -1872,6 +2987,13 @@ mptsas_parse_device_info(struct sas_iden
+@@ -1872,6 +2987,13 @@
}
}
static int mptsas_probe_one_phy(struct device *dev,
struct mptsas_phyinfo *phy_info, int index, int local)
{
-@@ -1995,7 +3117,6 @@ static int mptsas_probe_one_phy(struct d
+@@ -1995,7 +3117,6 @@
ioc = phy_to_ioc(phy_info->phy);
if (phy_info->sas_port_add_phy) {
if (!port) {
port = sas_port_alloc_num(dev);
if (!port) {
-@@ -2010,14 +3131,16 @@ static int mptsas_probe_one_phy(struct d
+@@ -2010,14 +3131,16 @@
goto out;
}
mptsas_set_port(ioc, phy_info, port);
- dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
- "sas_port_alloc: port=%p dev=%p port_id=%d\n",
- ioc->name, port, dev, port->port_identifier));
+- }
+- dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "sas_port_add_phy: phy_id=%d\n",
+- ioc->name, phy_info->phy_id));
+ devtprintk(ioc, dev_printk(KERN_DEBUG, &port->dev,
+ MYIOC_s_FMT "add port %d, sas_addr (0x%llx)\n",
+ ioc->name, port->port_identifier,
+ (unsigned long long)phy_info->attached.sas_address));
- }
-- dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "sas_port_add_phy: phy_id=%d\n",
-- ioc->name, phy_info->phy_id));
++ }
sas_port_add_phy(port, phy_info->phy);
phy_info->sas_port_add_phy = 0;
+ devtprintk(ioc, dev_printk(KERN_DEBUG, &phy_info->phy->dev,
}
if (!mptsas_get_rphy(phy_info) && port && !port->rphy) {
-@@ -2027,30 +3150,24 @@ static int mptsas_probe_one_phy(struct d
+@@ -2027,30 +3150,24 @@
struct sas_identify identify;
parent = dev->parent->parent;
} else if (scsi_is_sas_rphy(parent)) {
struct sas_rphy *parent_rphy = dev_to_rphy(parent);
-@@ -2096,14 +3213,20 @@ static int mptsas_probe_one_phy(struct d
+@@ -2096,14 +3213,20 @@
return error;
}
goto out;
error = mptsas_sas_io_unit_pg0(ioc, hba);
-@@ -2112,9 +3235,10 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc)
+@@ -2112,9 +3235,10 @@
mptsas_sas_io_unit_pg1(ioc);
mutex_lock(&ioc->sas_topology_mutex);
list_add_tail(&port_info->list, &ioc->sas_topology);
} else {
for (i = 0; i < hba->num_phys; i++) {
-@@ -2124,21 +3248,30 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc)
+@@ -2124,21 +3248,30 @@
hba->phy_info[i].handle;
port_info->phy_info[i].port_id =
hba->phy_info[i].port_id;
port_info->phy_info[i].identify.phy_id =
port_info->phy_info[i].phy_id = i;
if (port_info->phy_info[i].attached.handle)
-@@ -2163,249 +3296,12 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc)
+@@ -2163,249 +3296,12 @@
return error;
}
-/*
- * mptsas_delete_expander_phys
- *
-+/**
-+ * mptsas_find_phyinfo_by_sas_address -
-+ * @ioc: Pointer to MPT_ADAPTER structure
-+ * @sas_address:
- *
+- *
- * This will traverse topology, and remove expanders
- * that are no longer present
- */
- kfree(ev);
-}
-
++/**
++ * mptsas_find_phyinfo_by_sas_address -
++ * @ioc: Pointer to MPT_ADAPTER structure
++ * @sas_address:
++ *
+ **/
static struct mptsas_phyinfo *
mptsas_find_phyinfo_by_sas_address(MPT_ADAPTER *ioc, u64 sas_address)
{
-@@ -2430,686 +3326,1889 @@ mptsas_find_phyinfo_by_sas_address(MPT_A
+@@ -2430,69 +3326,85 @@
return phy_info;
}
+ **/
static struct mptsas_phyinfo *
-mptsas_find_phyinfo_by_target(MPT_ADAPTER *ioc, u8 channel, u8 id)
+-{
+- struct mptsas_portinfo *port_info;
+- struct mptsas_phyinfo *phy_info = NULL;
+- int i;
+-
+mptsas_find_phyinfo_by_phys_disk_num(MPT_ADAPTER *ioc, u8 phys_disk_num,
+ u8 channel, u8 id)
- {
++{
+ struct mptsas_phyinfo *phy_info;
- struct mptsas_portinfo *port_info;
-- struct mptsas_phyinfo *phy_info = NULL;
++ struct mptsas_portinfo *port_info;
+ RaidPhysDiskPage1_t *phys_disk = NULL;
+ int num_paths;
+ u64 sas_address = 0;
- int i;
-
-- mutex_lock(&ioc->sas_topology_mutex);
-- list_for_each_entry(port_info, &ioc->sas_topology, list) {
-- for (i = 0; i < port_info->num_phys; i++) {
-- if (!mptsas_is_end_device(
-- &port_info->phy_info[i].attached))
-- continue;
-- if (port_info->phy_info[i].attached.id != id)
-- continue;
-- if (port_info->phy_info[i].attached.channel != channel)
-- continue;
-- phy_info = &port_info->phy_info[i];
-- break;
++ int i;
++
+ phy_info = NULL;
+ if (!ioc->raid_data.pIocPg3)
+ return NULL;
+ phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
+ sas_address);
+ goto out;
- }
- }
-- mutex_unlock(&ioc->sas_topology_mutex);
-- return phy_info;
--}
-
--static struct mptsas_phyinfo *
--mptsas_find_phyinfo_by_phys_disk_num(MPT_ADAPTER *ioc, u8 channel, u8 id)
--{
-- struct mptsas_portinfo *port_info;
-- struct mptsas_phyinfo *phy_info = NULL;
-- int i;
++ }
++ }
++
+ out:
+ kfree(phys_disk);
+ if (phy_info)
+ return phy_info;
-
++
+ /*
+ * Extra code to handle RAID0 case, where the sas_address is not updated
+ * in phys_disk_page_1 when hotswapped
if (!mptsas_is_end_device(
&port_info->phy_info[i].attached))
continue;
- if (port_info->phy_info[i].attached.phys_disk_num == ~0)
- continue;
-- if (port_info->phy_info[i].attached.phys_disk_num != id)
+- if (port_info->phy_info[i].attached.id != id)
- continue;
- if (port_info->phy_info[i].attached.channel != channel)
- continue;
- phy_info = &port_info->phy_info[i];
- break;
++ if (port_info->phy_info[i].attached.phys_disk_num == ~0)
++ continue;
+ if (port_info->phy_info[i].attached.phys_disk_num ==
+ phys_disk_num &&
+ port_info->phy_info[i].attached.id == id &&
return phy_info;
}
+-static struct mptsas_phyinfo *
+-mptsas_find_phyinfo_by_phys_disk_num(MPT_ADAPTER *ioc, u8 channel, u8 id)
+-{
+- struct mptsas_portinfo *port_info;
+- struct mptsas_phyinfo *phy_info = NULL;
+- int i;
+-
+- mutex_lock(&ioc->sas_topology_mutex);
+- list_for_each_entry(port_info, &ioc->sas_topology, list) {
+- for (i = 0; i < port_info->num_phys; i++) {
+- if (!mptsas_is_end_device(
+- &port_info->phy_info[i].attached))
+- continue;
+- if (port_info->phy_info[i].attached.phys_disk_num == ~0)
+- continue;
+- if (port_info->phy_info[i].attached.phys_disk_num != id)
+- continue;
+- if (port_info->phy_info[i].attached.channel != channel)
+- continue;
+- phy_info = &port_info->phy_info[i];
+- break;
+- }
+- }
+- mutex_unlock(&ioc->sas_topology_mutex);
+- return phy_info;
+-}
+-
-/*
- * Work queue thread to clear the persitency table
- */
+-static void
+-mptsas_persist_clear_table(struct work_struct *work)
+-{
+- MPT_ADAPTER *ioc = container_of(work, MPT_ADAPTER, sas_persist_task);
+-
+- mptbase_sas_persist_operation(ioc, MPI_SAS_OP_CLEAR_NOT_PRESENT);
+-}
+-
+/**
+ * mptsas_reprobe_lun -
+ * @sdev:
+ * @data:
+ *
+ **/
-+static void
-+mptsas_reprobe_lun(struct scsi_device *sdev, void *data)
-+{
-+ int rc;
-+
-+ sdev->no_uld_attach = data ? 1 : 0;
-+ rc = scsi_device_reprobe(sdev);
-+}
-+
+ static void
+ mptsas_reprobe_lun(struct scsi_device *sdev, void *data)
+ {
+@@ -2502,6 +3414,12 @@
+ rc = scsi_device_reprobe(sdev);
+ }
+
+/**
+ * mptsas_reprobe_target -
+ * @starget:
+ * @uld_attach:
+ *
+ **/
-+static void
-+mptsas_reprobe_target(struct scsi_target *starget, int uld_attach)
-+{
-+ starget_for_each_device(starget, uld_attach ? (void *)1 : NULL,
-+ mptsas_reprobe_lun);
-+}
-+
+ static void
+ mptsas_reprobe_target(struct scsi_target *starget, int uld_attach)
+ {
+@@ -2509,6 +3427,14 @@
+ mptsas_reprobe_lun);
+ }
+
+/**
+ * mptsas_adding_inactive_raid_components -
+ * @ioc: Pointer to MPT_ADAPTER structure
+ *
+ *
+ **/
-+static void
-+mptsas_adding_inactive_raid_components(MPT_ADAPTER *ioc, u8 channel, u8 id)
-+{
-+ CONFIGPARMS cfg;
-+ ConfigPageHeader_t hdr;
-+ dma_addr_t dma_handle;
-+ pRaidVolumePage0_t buffer = NULL;
-+ RaidPhysDiskPage0_t phys_disk;
-+ int i;
+ static void
+ mptsas_adding_inactive_raid_components(MPT_ADAPTER *ioc, u8 channel, u8 id)
+ {
+@@ -2518,7 +3444,8 @@
+ pRaidVolumePage0_t buffer = NULL;
+ RaidPhysDiskPage0_t phys_disk;
+ int i;
+- struct mptsas_hotplug_event *ev;
+ struct mptsas_phyinfo *phy_info;
+ struct mptsas_devinfo sas_device;
-+
-+ memset(&cfg, 0 , sizeof(CONFIGPARMS));
-+ memset(&hdr, 0 , sizeof(ConfigPageHeader_t));
-+ hdr.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME;
-+ cfg.pageAddr = (channel << 8) + id;
-+ cfg.cfghdr.hdr = &hdr;
-+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
+
+ memset(&cfg, 0 , sizeof(CONFIGPARMS));
+ memset(&hdr, 0 , sizeof(ConfigPageHeader_t));
+@@ -2526,6 +3453,7 @@
+ cfg.pageAddr = (channel << 8) + id;
+ cfg.cfghdr.hdr = &hdr;
+ cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
+ cfg.timeout = SAS_CONFIG_PAGE_TIMEOUT;
-+
-+ if (mpt_config(ioc, &cfg) != 0)
-+ goto out;
-+
-+ if (!hdr.PageLength)
-+ goto out;
-+
-+ buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4,
-+ &dma_handle);
-+
-+ if (!buffer)
-+ goto out;
-+
-+ cfg.physAddr = dma_handle;
-+ cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+
-+ if (mpt_config(ioc, &cfg) != 0)
-+ goto out;
-+
-+ if (!(buffer->VolumeStatus.Flags &
-+ MPI_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE))
-+ goto out;
-+
-+ if (!buffer->NumPhysDisks)
-+ goto out;
-+
-+ for (i = 0; i < buffer->NumPhysDisks; i++) {
-+
-+ if (mpt_raid_phys_disk_pg0(ioc,
-+ buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0)
-+ continue;
-+
+
+ if (mpt_config(ioc, &cfg) != 0)
+ goto out;
+@@ -2558,20 +3486,16 @@
+ buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0)
+ continue;
+
+- ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
+- if (!ev) {
+- printk(MYIOC_s_WARN_FMT "mptsas: lost hotplug event\n", ioc->name);
+- goto out;
+- }
+-
+- INIT_WORK(&ev->work, mptsas_hotplug_work);
+- ev->ioc = ioc;
+- ev->id = phys_disk.PhysDiskID;
+- ev->channel = phys_disk.PhysDiskBus;
+- ev->phys_disk_num_valid = 1;
+- ev->phys_disk_num = phys_disk.PhysDiskNum;
+- ev->event_type = MPTSAS_ADD_DEVICE;
+- schedule_work(&ev->work);
+ if (mptsas_sas_device_pg0(ioc, &sas_device,
+ (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
+ MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
+ phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
+ sas_device.sas_address);
+ mptsas_add_end_device(ioc, phy_info);
-+ }
-+
-+ out:
-+ if (buffer)
-+ pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer,
-+ dma_handle);
-+}
+ }
+
+ out:
+@@ -2579,421 +3503,619 @@
+ pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer,
+ dma_handle);
+ }
+-/*
+- * Work queue thread to handle SAS hotplug events
+- */
+-static void
+-mptsas_hotplug_work(struct work_struct *work)
+-{
+- struct mptsas_hotplug_event *ev =
+- container_of(work, struct mptsas_hotplug_event, work);
+-
+- MPT_ADAPTER *ioc = ev->ioc;
+- struct mptsas_phyinfo *phy_info;
+
+/**
+ * mptsas_add_end_device - report a new end device to sas transport layer
+static int
+mptsas_add_end_device(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info)
+{
-+ struct sas_rphy *rphy;
-+ struct sas_port *port;
-+ struct sas_identify identify;
-+ char *ds = NULL;
+ struct sas_rphy *rphy;
+ struct sas_port *port;
+- struct scsi_device *sdev;
+- struct scsi_target * starget;
+ struct sas_identify identify;
+ char *ds = NULL;
+ u8 fw_id;
+
+ if (!phy_info) {
+{
+ struct mptsas_phyinfo *phy_info;
+ struct scsi_target *starget;
-+ struct mptsas_devinfo sas_device;
-+ VirtTarget *vtarget;
+ struct mptsas_devinfo sas_device;
+ VirtTarget *vtarget;
+- VirtDevice *vdevice;
+-
+- mutex_lock(&ioc->sas_discovery_mutex);
+- switch (ev->event_type) {
+ enum device_state state;
+ int i;
+
+ mptsas_add_end_device(ioc, phy_info);
+ break;
+
-+ case MPTSAS_DEL_DEVICE:
-+
+ case MPTSAS_DEL_DEVICE:
+
+- phy_info = NULL;
+- if (ev->phys_disk_num_valid) {
+- if (ev->hidden_raid_component){
+- if (mptsas_sas_device_pg0(ioc, &sas_device,
+- (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
+- MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
+- (ev->channel << 8) + ev->id)) {
+- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+- "%s: exit at line=%d\n", ioc->name,
+- __func__, __LINE__));
+- break;
+- }
+- phy_info = mptsas_find_phyinfo_by_sas_address(
+- ioc, sas_device.sas_address);
+- }else
+- phy_info = mptsas_find_phyinfo_by_phys_disk_num(
+- ioc, ev->channel, ev->phys_disk_num);
+- }
+-
+- if (!phy_info)
+- phy_info = mptsas_find_phyinfo_by_target(ioc,
+- ev->channel, ev->id);
+-
+- /*
+- * Sanity checks, for non-existing phys and remote rphys.
+- */
+- if (!phy_info){
+- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+- "%s: exit at line=%d\n", ioc->name,
+- __func__, __LINE__));
+- break;
+- }
+- if (!phy_info->port_details) {
+- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+- "%s: exit at line=%d\n", ioc->name,
+- __func__, __LINE__));
+- break;
+- }
+- rphy = mptsas_get_rphy(phy_info);
+- if (!rphy) {
+- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+- "%s: exit at line=%d\n", ioc->name,
+- __func__, __LINE__));
+- break;
+- }
+-
+- port = mptsas_get_port(phy_info);
+- if (!port) {
+- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+- "%s: exit at line=%d\n", ioc->name,
+- __func__, __LINE__));
+- break;
+- }
+-
+- starget = mptsas_get_starget(phy_info);
+- if (starget) {
+- vtarget = starget->hostdata;
+-
+- if (!vtarget) {
+- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+- "%s: exit at line=%d\n", ioc->name,
+- __func__, __LINE__));
+- break;
+- }
+-
+- /*
+- * Handling RAID components
+- */
+- if (ev->phys_disk_num_valid &&
+- ev->hidden_raid_component) {
+- printk(MYIOC_s_INFO_FMT
+- "RAID Hidding: channel=%d, id=%d, "
+- "physdsk %d \n", ioc->name, ev->channel,
+- ev->id, ev->phys_disk_num);
+- vtarget->id = ev->phys_disk_num;
+- vtarget->tflags |=
+- MPT_TARGET_FLAGS_RAID_COMPONENT;
+- mptsas_reprobe_target(starget, 1);
+- phy_info->attached.phys_disk_num =
+- ev->phys_disk_num;
+- break;
+- }
+- }
+-
+- if (phy_info->attached.device_info &
+- MPI_SAS_DEVICE_INFO_SSP_TARGET)
+- ds = "ssp";
+- if (phy_info->attached.device_info &
+- MPI_SAS_DEVICE_INFO_STP_TARGET)
+- ds = "stp";
+- if (phy_info->attached.device_info &
+- MPI_SAS_DEVICE_INFO_SATA_DEVICE)
+- ds = "sata";
+-
+- printk(MYIOC_s_INFO_FMT
+- "removing %s device, channel %d, id %d, phy %d\n",
+- ioc->name, ds, ev->channel, ev->id, phy_info->phy_id);
+- dev_printk(KERN_DEBUG, &port->dev, MYIOC_s_FMT
+- "delete port (%d)\n", ioc->name, port->port_identifier);
+- sas_port_delete(port);
+- mptsas_port_delete(ioc, phy_info->port_details);
+- break;
+- case MPTSAS_ADD_DEVICE:
+-
+- if (ev->phys_disk_num_valid)
+- mpt_findImVolumes(ioc);
+-
+- /*
+- * Refresh sas device pg0 data
+- */
+ if (!ioc->disable_hotplug_remove) {
+ phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
+ hot_plug_info->sas_address);
+
+ case MPTSAS_ADD_PHYSDISK_REPROBE:
+
-+ if (mptsas_sas_device_pg0(ioc, &sas_device,
-+ (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
-+ MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
+ if (mptsas_sas_device_pg0(ioc, &sas_device,
+ (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
+ MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
+- (ev->channel << 8) + ev->id)) {
+ (hot_plug_info->channel << 8) + hot_plug_info->id)) {
+ dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+ "%s: fw_id=%d exit at line=%d\n", ioc->name,
+ (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
+ MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
+ (hot_plug_info->channel << 8) + hot_plug_info->id)) {
-+ dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+ dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+- "%s: exit at line=%d\n", ioc->name,
+- __func__, __LINE__));
+- break;
+- }
+-
+- __mptsas_discovery_work(ioc);
+ "%s: fw_id=%d exit at line=%d\n",
+ ioc->name, __func__,
+ hot_plug_info->id, __LINE__));
+ break;
+ }
-+
-+ phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
-+ sas_device.sas_address);
+
+ phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
+ sas_device.sas_address);
+-
+- if (!phy_info || !phy_info->port_details) {
+- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+- "%s: exit at line=%d\n", ioc->name,
+- __func__, __LINE__));
+ if (!phy_info) {
+ dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+ "%s: fw_id=%d exit at line=%d\n", ioc->name,
+ __func__, hot_plug_info->id, __LINE__));
-+ break;
-+ }
-+
-+ starget = mptsas_get_starget(phy_info);
+ break;
+ }
+
+ starget = mptsas_get_starget(phy_info);
+- if (starget && (!ev->hidden_raid_component)){
+-
+- vtarget = starget->hostdata;
+-
+- if (!vtarget) {
+- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+- "%s: exit at line=%d\n", ioc->name,
+- __func__, __LINE__));
+- break;
+- }
+- /*
+- * Handling RAID components
+- */
+- if (vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT) {
+- printk(MYIOC_s_INFO_FMT
+- "RAID Exposing: channel=%d, id=%d, "
+- "physdsk %d \n", ioc->name, ev->channel,
+- ev->id, ev->phys_disk_num);
+- vtarget->tflags &=
+- ~MPT_TARGET_FLAGS_RAID_COMPONENT;
+- vtarget->id = ev->id;
+- mptsas_reprobe_target(starget, 0);
+- phy_info->attached.phys_disk_num = ~0;
+- }
+- break;
+- }
+-
+- if (mptsas_get_rphy(phy_info)) {
+- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+- "%s: exit at line=%d\n", ioc->name,
+- __func__, __LINE__));
+- if (ev->channel) printk("%d\n", __LINE__);
+- break;
+- }
+-
+- port = mptsas_get_port(phy_info);
+- if (!port) {
+- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+- "%s: exit at line=%d\n", ioc->name,
+- __func__, __LINE__));
+- break;
+- }
+- memcpy(&phy_info->attached, &sas_device,
+- sizeof(struct mptsas_devinfo));
+-
+- if (phy_info->attached.device_info &
+- MPI_SAS_DEVICE_INFO_SSP_TARGET)
+- ds = "ssp";
+- if (phy_info->attached.device_info &
+- MPI_SAS_DEVICE_INFO_STP_TARGET)
+- ds = "stp";
+- if (phy_info->attached.device_info &
+- MPI_SAS_DEVICE_INFO_SATA_DEVICE)
+- ds = "sata";
+-
+- printk(MYIOC_s_INFO_FMT
+- "attaching %s device, channel %d, id %d, phy %d\n",
+- ioc->name, ds, ev->channel, ev->id, ev->phy_id);
+-
+- mptsas_parse_device_info(&identify, &phy_info->attached);
+- rphy = sas_end_device_alloc(port);
+- if (!rphy) {
+- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+- "%s: exit at line=%d\n", ioc->name,
+- __func__, __LINE__));
+- break; /* non-fatal: an rphy can be added later */
+- }
+-
+- rphy->identify = identify;
+- if (sas_rphy_add(rphy)) {
+- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+- "%s: exit at line=%d\n", ioc->name,
+- __func__, __LINE__));
+- sas_rphy_free(rphy);
+- break;
+- }
+- mptsas_set_rphy(ioc, phy_info, rphy);
+- break;
+ if (!starget) {
+ dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+ "%s: fw_id=%d exit at line=%d\n", ioc->name,
+ hot_plug_info->channel, hot_plug_info->id);
+ break;
+
-+ case MPTSAS_ADD_RAID:
+ case MPTSAS_ADD_RAID:
+- sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL,
+- ev->id, 0);
+- if (sdev) {
+- scsi_device_put(sdev);
+- break;
+- }
+- printk(MYIOC_s_INFO_FMT
+- "attaching raid volume, channel %d, id %d\n",
+- ioc->name, MPTSAS_RAID_CHANNEL, ev->id);
+- scsi_add_device(ioc->sh, MPTSAS_RAID_CHANNEL, ev->id, 0);
+- mpt_findImVolumes(ioc);
+- break;
+
+ mpt_findImVolumes(ioc);
+ printk(MYIOC_s_INFO_FMT "attaching raid volume, channel %d, "
+ hot_plug_info->id, 0);
+ break;
+
-+ case MPTSAS_DEL_RAID:
+ case MPTSAS_DEL_RAID:
+- sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL,
+- ev->id, 0);
+- if (!sdev)
+- break;
+- printk(MYIOC_s_INFO_FMT
+- "removing raid volume, channel %d, id %d\n",
+- ioc->name, MPTSAS_RAID_CHANNEL, ev->id);
+- vdevice = sdev->hostdata;
+- scsi_remove_device(sdev);
+- scsi_device_put(sdev);
+- mpt_findImVolumes(ioc);
+- break;
+
+ mpt_findImVolumes(ioc);
+ printk(MYIOC_s_INFO_FMT "removing raid volume, channel %d, "
+ scsi_device_put(hot_plug_info->sdev);
+ break;
+
-+ case MPTSAS_ADD_INACTIVE_VOLUME:
+ case MPTSAS_ADD_INACTIVE_VOLUME:
+
+ mpt_findImVolumes(ioc);
-+ mptsas_adding_inactive_raid_components(ioc,
+ mptsas_adding_inactive_raid_components(ioc,
+- ev->channel, ev->id);
+- break;
+- case MPTSAS_IGNORE_EVENT:
+- default:
+- break;
+- }
+-
+- mutex_unlock(&ioc->sas_discovery_mutex);
+- kfree(ev);
+-}
+-
+-static void
+-mptsas_send_sas_event(MPT_ADAPTER *ioc,
+- EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data)
+-{
+- struct mptsas_hotplug_event *ev;
+- u32 device_info = le32_to_cpu(sas_event_data->DeviceInfo);
+- __le64 sas_address;
+ hot_plug_info->channel, hot_plug_info->id);
+ break;
+
+ sas_event_data = (EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *)
+ fw_event->event_data;
+ device_info = le32_to_cpu(sas_event_data->DeviceInfo);
-+
-+ if ((device_info &
-+ (MPI_SAS_DEVICE_INFO_SSP_TARGET |
-+ MPI_SAS_DEVICE_INFO_STP_TARGET |
+
+ if ((device_info &
+ (MPI_SAS_DEVICE_INFO_SSP_TARGET |
+ MPI_SAS_DEVICE_INFO_STP_TARGET |
+- MPI_SAS_DEVICE_INFO_SATA_DEVICE )) == 0)
+- return;
+ MPI_SAS_DEVICE_INFO_SATA_DEVICE)) == 0) {
+ mptsas_free_fw_event(ioc, fw_event);
+ return;
+ mptsas_free_fw_event(ioc, fw_event);
+ return;
+ }
-+
-+ switch (sas_event_data->ReasonCode) {
-+ case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING:
-+ case MPI_EVENT_SAS_DEV_STAT_RC_ADDED:
+
+ switch (sas_event_data->ReasonCode) {
+ case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING:
+-
+- mptsas_target_reset_queue(ioc, sas_event_data);
+- break;
+-
+ case MPI_EVENT_SAS_DEV_STAT_RC_ADDED:
+- ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
+- if (!ev) {
+- printk(MYIOC_s_WARN_FMT "lost hotplug event\n", ioc->name);
+- break;
+- }
+-
+- INIT_WORK(&ev->work, mptsas_hotplug_work);
+- ev->ioc = ioc;
+- ev->handle = le16_to_cpu(sas_event_data->DevHandle);
+- ev->parent_handle =
+- le16_to_cpu(sas_event_data->ParentDevHandle);
+- ev->channel = sas_event_data->Bus;
+- ev->id = sas_event_data->TargetID;
+- ev->phy_id = sas_event_data->PhyNum;
+ memset(&hot_plug_info, 0, sizeof(struct mptsas_hotplug_event));
+ hot_plug_info.handle = le16_to_cpu(sas_event_data->DevHandle);
+ hot_plug_info.channel = sas_event_data->Bus;
+ hot_plug_info.id = sas_event_data->TargetID;
+ hot_plug_info.phy_id = sas_event_data->PhyNum;
-+ memcpy(&sas_address, &sas_event_data->SASAddress,
+ memcpy(&sas_address, &sas_event_data->SASAddress,
+- sizeof(__le64));
+- ev->sas_address = le64_to_cpu(sas_address);
+- ev->device_info = device_info;
+-
+ sizeof(u64));
+ hot_plug_info.sas_address = le64_to_cpu(sas_address);
+ hot_plug_info.device_info = device_info;
-+ if (sas_event_data->ReasonCode &
-+ MPI_EVENT_SAS_DEV_STAT_RC_ADDED)
+ if (sas_event_data->ReasonCode &
+ MPI_EVENT_SAS_DEV_STAT_RC_ADDED)
+- ev->event_type = MPTSAS_ADD_DEVICE;
+ hot_plug_info.event_type = MPTSAS_ADD_DEVICE;
-+ else
+ else
+- ev->event_type = MPTSAS_DEL_DEVICE;
+- schedule_work(&ev->work);
+- break;
+ hot_plug_info.event_type = MPTSAS_DEL_DEVICE;
+ mptsas_hotplug_work(ioc, fw_event, &hot_plug_info);
+ break;
+
-+ case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED:
+ case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED:
+- /*
+- * Persistent table is full.
+- */
+- INIT_WORK(&ioc->sas_persist_task,
+- mptsas_persist_clear_table);
+- schedule_work(&ioc->sas_persist_task);
+- break;
+- /*
+- * TODO, handle other events
+- */
+ mptbase_sas_persist_operation(ioc,
+ MPI_SAS_OP_CLEAR_NOT_PRESENT);
+ mptsas_free_fw_event(ioc, fw_event);
+ break;
+
-+ case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA:
-+ case MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET:
+ case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA:
+- case MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED:
+ case MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET:
+- case MPI_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL:
+- case MPI_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL:
+- case MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL:
+- case MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL:
+- default:
+- break;
+- }
+-}
+-static void
+-mptsas_send_raid_event(MPT_ADAPTER *ioc,
+- EVENT_DATA_RAID *raid_event_data)
+-{
+- struct mptsas_hotplug_event *ev;
+- int status = le32_to_cpu(raid_event_data->SettingsStatus);
+- int state = (status >> 8) & 0xff;
+-
+- if (ioc->bus_type != SAS)
+- return;
+-
+- ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
+- if (!ev) {
+- printk(MYIOC_s_WARN_FMT "lost hotplug event\n", ioc->name);
+- return;
+- }
+-
+- INIT_WORK(&ev->work, mptsas_hotplug_work);
+- ev->ioc = ioc;
+- ev->id = raid_event_data->VolumeID;
+- ev->channel = raid_event_data->VolumeBus;
+- ev->event_type = MPTSAS_IGNORE_EVENT;
+ default:
+ mptsas_free_fw_event(ioc, fw_event);
+ break;
+ devtprintk(ioc, printk(MYIOC_s_INFO_FMT "Entering %s: "
+ "ReasonCode=%02x\n", ioc->name, __func__,
+ raid_event_data->ReasonCode));
-+
-+ switch (raid_event_data->ReasonCode) {
-+ case MPI_EVENT_RAID_RC_PHYSDISK_DELETED:
+
+ switch (raid_event_data->ReasonCode) {
+ case MPI_EVENT_RAID_RC_PHYSDISK_DELETED:
+- ev->phys_disk_num_valid = 1;
+- ev->phys_disk_num = raid_event_data->PhysDiskNum;
+- ev->event_type = MPTSAS_ADD_DEVICE;
+ hot_plug_info.event_type = MPTSAS_DEL_PHYSDISK_REPROBE;
-+ break;
-+ case MPI_EVENT_RAID_RC_PHYSDISK_CREATED:
+ break;
+ case MPI_EVENT_RAID_RC_PHYSDISK_CREATED:
+- ev->phys_disk_num_valid = 1;
+- ev->phys_disk_num = raid_event_data->PhysDiskNum;
+- ev->hidden_raid_component = 1;
+- ev->event_type = MPTSAS_DEL_DEVICE;
+ hot_plug_info.event_type = MPTSAS_ADD_PHYSDISK_REPROBE;
-+ break;
-+ case MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED:
-+ switch (state) {
-+ case MPI_PD_STATE_ONLINE:
-+ case MPI_PD_STATE_NOT_COMPATIBLE:
+ break;
+ case MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED:
+ switch (state) {
+ case MPI_PD_STATE_ONLINE:
+ case MPI_PD_STATE_NOT_COMPATIBLE:
+- ev->phys_disk_num_valid = 1;
+- ev->phys_disk_num = raid_event_data->PhysDiskNum;
+- ev->hidden_raid_component = 1;
+- ev->event_type = MPTSAS_ADD_DEVICE;
+- break;
+ mpt_raid_phys_disk_pg0(ioc,
+ raid_event_data->PhysDiskNum, &phys_disk);
+ hot_plug_info.id = phys_disk.PhysDiskID;
+ hot_plug_info.event_type = MPTSAS_ADD_PHYSDISK;
+ break;
+ case MPI_PD_STATE_FAILED:
-+ case MPI_PD_STATE_MISSING:
-+ case MPI_PD_STATE_OFFLINE_AT_HOST_REQUEST:
-+ case MPI_PD_STATE_FAILED_AT_HOST_REQUEST:
-+ case MPI_PD_STATE_OFFLINE_FOR_ANOTHER_REASON:
+ case MPI_PD_STATE_MISSING:
+ case MPI_PD_STATE_OFFLINE_AT_HOST_REQUEST:
+ case MPI_PD_STATE_FAILED_AT_HOST_REQUEST:
+ case MPI_PD_STATE_OFFLINE_FOR_ANOTHER_REASON:
+- ev->phys_disk_num_valid = 1;
+- ev->phys_disk_num = raid_event_data->PhysDiskNum;
+- ev->event_type = MPTSAS_DEL_DEVICE;
+ hot_plug_info.event_type = MPTSAS_DEL_PHYSDISK;
-+ break;
-+ default:
-+ break;
-+ }
-+ break;
-+ case MPI_EVENT_RAID_RC_VOLUME_DELETED:
+ break;
+ default:
+ break;
+ }
+ break;
+ case MPI_EVENT_RAID_RC_VOLUME_DELETED:
+- ev->event_type = MPTSAS_DEL_RAID;
+ if (!sdev)
+ break;
+ vdevice->vtarget->deleted = 1; /* block IO */
+ hot_plug_info.event_type = MPTSAS_DEL_RAID;
-+ break;
-+ case MPI_EVENT_RAID_RC_VOLUME_CREATED:
+ break;
+ case MPI_EVENT_RAID_RC_VOLUME_CREATED:
+- ev->event_type = MPTSAS_ADD_RAID;
+ if (sdev) {
+ scsi_device_put(sdev);
+ break;
+ }
+ hot_plug_info.event_type = MPTSAS_ADD_RAID;
-+ break;
-+ case MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED:
+ break;
+ case MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED:
+ if (!(status & MPI_RAIDVOL0_STATUS_FLAG_ENABLED)) {
+ if (!sdev)
+ break;
+ hot_plug_info.event_type = MPTSAS_DEL_RAID;
+ break;
+ }
-+ switch (state) {
-+ case MPI_RAIDVOL0_STATUS_STATE_FAILED:
-+ case MPI_RAIDVOL0_STATUS_STATE_MISSING:
+ switch (state) {
+ case MPI_RAIDVOL0_STATUS_STATE_FAILED:
+ case MPI_RAIDVOL0_STATUS_STATE_MISSING:
+- ev->event_type = MPTSAS_DEL_RAID;
+ if (!sdev)
+ break;
+ vdevice->vtarget->deleted = 1; /* block IO */
+ hot_plug_info.event_type = MPTSAS_DEL_RAID;
-+ break;
-+ case MPI_RAIDVOL0_STATUS_STATE_OPTIMAL:
-+ case MPI_RAIDVOL0_STATUS_STATE_DEGRADED:
+ break;
+ case MPI_RAIDVOL0_STATUS_STATE_OPTIMAL:
+ case MPI_RAIDVOL0_STATUS_STATE_DEGRADED:
+- ev->event_type = MPTSAS_ADD_RAID;
+ if (sdev) {
+ scsi_device_put(sdev);
+ break;
+ }
+ hot_plug_info.event_type = MPTSAS_ADD_RAID;
-+ break;
-+ default:
-+ break;
-+ }
-+ break;
-+ default:
-+ break;
-+ }
+ break;
+ default:
+ break;
+@@ -3002,114 +4124,1091 @@
+ default:
+ break;
+ }
+- schedule_work(&ev->work);
+-}
+-
+-static void
+-mptsas_send_discovery_event(MPT_ADAPTER *ioc,
+- EVENT_DATA_SAS_DISCOVERY *discovery_data)
+-{
+- struct mptsas_discovery_event *ev;
+-
+- /*
+- * DiscoveryStatus
+- *
+- * This flag will be non-zero when firmware
+- * kicks off discovery, and return to zero
+- * once its completed.
+- */
+- if (discovery_data->DiscoveryStatus)
+- return;
+-
+- ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
+- if (!ev)
+- return;
+- INIT_WORK(&ev->work, mptsas_discovery_work);
+- ev->ioc = ioc;
+- schedule_work(&ev->work);
+-};
+-
+-/*
+- * mptsas_send_ir2_event - handle exposing hidden disk when
+- * an inactive raid volume is added
+- *
+
+ if (hot_plug_info.event_type != MPTSAS_IGNORE_EVENT)
+ mptsas_hotplug_work(ioc, fw_event, &hot_plug_info);
+ ioc->sas_index, 0);
+}
+
- static void
--mptsas_persist_clear_table(struct work_struct *work)
++static void
+mptsas_expander_event_add(MPT_ADAPTER *ioc,
+ MpiEventDataSasExpanderStatusChange_t *expander_data)
- {
-- MPT_ADAPTER *ioc = container_of(work, MPT_ADAPTER, sas_persist_task);
++{
+ struct mptsas_portinfo *port_info;
+ int i;
+ __le64 sas_address;
-
-- mptbase_sas_persist_operation(ioc, MPI_SAS_OP_CLEAR_NOT_PRESENT);
--}
++
+ port_info = kzalloc(sizeof(struct mptsas_portinfo), GFP_KERNEL);
+ if (!port_info)
+ BUG();
+ port_info->phy_info[i].identify.handle_parent =
+ le16_to_cpu(expander_data->ParentDevHandle);
+ }
-
--static void
--mptsas_reprobe_lun(struct scsi_device *sdev, void *data)
--{
-- int rc;
++
+ mutex_lock(&ioc->sas_topology_mutex);
+ list_add_tail(&port_info->list, &ioc->sas_topology);
+ mutex_unlock(&ioc->sas_topology_mutex);
-
-- sdev->no_uld_attach = data ? 1 : 0;
-- rc = scsi_device_reprobe(sdev);
--}
++
+ printk(MYIOC_s_INFO_FMT "add expander: num_phys %d, "
+ "sas_addr (0x%llx)\n", ioc->name, port_info->num_phys,
+ (unsigned long long)sas_address);
-
--static void
--mptsas_reprobe_target(struct scsi_target *starget, int uld_attach)
--{
-- starget_for_each_device(starget, uld_attach ? (void *)1 : NULL,
-- mptsas_reprobe_lun);
++
+ mptsas_expander_refresh(ioc, port_info);
- }
-
++}
++
+/**
+ * mptsas_delete_expander_siblings - remove siblings attached to expander
-+ * @ioc: Pointer to MPT_ADAPTER structure
+ * @ioc: Pointer to MPT_ADAPTER structure
+- * @ir2_data
+- *
+- */
+-static void
+-mptsas_send_ir2_event(MPT_ADAPTER *ioc, PTR_MPI_EVENT_DATA_IR2 ir2_data)
+-{
+- struct mptsas_hotplug_event *ev;
+-
+- if (ir2_data->ReasonCode !=
+- MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED)
+- return;
+-
+- ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
+- if (!ev)
+- return;
+-
+- INIT_WORK(&ev->work, mptsas_hotplug_work);
+- ev->ioc = ioc;
+- ev->id = ir2_data->TargetID;
+- ev->channel = ir2_data->Bus;
+- ev->event_type = MPTSAS_ADD_INACTIVE_VOLUME;
+-
+- schedule_work(&ev->work);
+-};
+-
+ * @parent: the parent port_info object
+ * @expander: the expander port_info object
+ **/
- static void
--mptsas_adding_inactive_raid_components(MPT_ADAPTER *ioc, u8 channel, u8 id)
++static void
+mptsas_delete_expander_siblings(MPT_ADAPTER *ioc, struct mptsas_portinfo
+ *parent, struct mptsas_portinfo *expander)
- {
-- CONFIGPARMS cfg;
-- ConfigPageHeader_t hdr;
-- dma_addr_t dma_handle;
-- pRaidVolumePage0_t buffer = NULL;
-- RaidPhysDiskPage0_t phys_disk;
-- int i;
-- struct mptsas_hotplug_event *ev;
++{
+ struct mptsas_phyinfo *phy_info;
+ struct mptsas_portinfo *port_info;
+ struct sas_rphy *rphy;
+ int i;
-
-- memset(&cfg, 0 , sizeof(CONFIGPARMS));
-- memset(&hdr, 0 , sizeof(ConfigPageHeader_t));
-- hdr.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME;
-- cfg.pageAddr = (channel << 8) + id;
-- cfg.cfghdr.hdr = &hdr;
-- cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
++
+ phy_info = expander->phy_info;
+ for (i = 0; i < expander->num_phys; i++, phy_info++) {
+ if (!(rphy = mptsas_get_rphy(phy_info)))
+ if (rphy->identify.device_type == SAS_END_DEVICE)
+ mptsas_del_end_device(ioc, phy_info);
+ }
-
-- if (mpt_config(ioc, &cfg) != 0)
-- goto out;
++
+ phy_info = expander->phy_info;
+ for (i = 0; i < expander->num_phys; i++, phy_info++) {
+ if (!(rphy = mptsas_get_rphy(phy_info)))
+ }
+ }
+}
-
-- if (!hdr.PageLength)
-- goto out;
-
-- buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4,
-- &dma_handle);
++
++
+/**
+ * mptsas_expander_delete - remove this expander
+ * @ioc: Pointer to MPT_ADAPTER structure
+ * @port_info: expander port_info struct
+ *
+ **/
-
-- if (!buffer)
-- goto out;
++
+static void
+mptsas_expander_delete(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
+{
-
-- cfg.physAddr = dma_handle;
-- cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
++
+ struct mptsas_portinfo *parent;
+ int i;
+ u64 expander_sas_address;
+ struct mptsas_portinfo buffer;
+ struct mptsas_portinfo_details *port_details;
+ struct sas_port *port;
-
-- if (mpt_config(ioc, &cfg) != 0)
-- goto out;
++
+ if (!port_info)
+ return;
-
-- if (!(buffer->VolumeStatus.Flags &
-- MPI_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE))
-- goto out;
++
+ /* see if expander is still there before deleting */
+ mptsas_sas_expander_pg0(ioc, &buffer,
+ (MPI_SAS_EXPAND_PGAD_FORM_HANDLE <<
+ MPI_SAS_EXPAND_PGAD_FORM_SHIFT),
+ port_info->phy_info[0].identify.handle);
-
-- if (!buffer->NumPhysDisks)
-- goto out;
++
+ if (buffer.num_phys) {
+ kfree(buffer.phy_info);
+ return;
+ }
-
-- for (i = 0; i < buffer->NumPhysDisks; i++) {
-
-- if (mpt_raid_phys_disk_pg0(ioc,
-- buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0)
-- continue;
++
++
+ /*
+ * Obtain the port_info instance to the parent port
+ */
+ mptsas_delete_expander_siblings(ioc, parent, port_info);
+ if (!parent)
+ goto out;
-
-- ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
-- if (!ev) {
-- printk(MYIOC_s_WARN_FMT "mptsas: lost hotplug event\n", ioc->name);
-- goto out;
++
+ /*
+ * Delete rphys in the parent that point
+ * to this expander.
+ if (!port) {
+ port = mptsas_get_port(phy_info);
+ port_details = phy_info->port_details;
- }
--
-- INIT_WORK(&ev->work, mptsas_hotplug_work);
-- ev->ioc = ioc;
-- ev->id = phys_disk.PhysDiskID;
-- ev->channel = phys_disk.PhysDiskBus;
-- ev->phys_disk_num_valid = 1;
-- ev->phys_disk_num = phys_disk.PhysDiskNum;
-- ev->event_type = MPTSAS_ADD_DEVICE;
-- schedule_work(&ev->work);
++ }
+ dev_printk(KERN_DEBUG, &phy_info->phy->dev,
+ MYIOC_s_FMT "delete phy %d, phy-obj (0x%p)\n", ioc->name,
+ phy_info->phy_id, phy_info->phy);
+ (unsigned long long)expander_sas_address);
+ sas_port_delete(port);
+ mptsas_port_delete(ioc, port_details);
- }
--
- out:
-- if (buffer)
-- pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer,
-- dma_handle);
++ }
++ out:
+
+ printk(MYIOC_s_INFO_FMT "delete expander: num_phys %d, "
+ "sas_addr (0x%llx)\n", ioc->name, port_info->num_phys,
+ list_del(&port_info->list);
+ kfree(port_info->phy_info);
+ kfree(port_info);
- }
--/*
-- * Work queue thread to handle SAS hotplug events
++}
+
+
+/**
+ *
+ * This function handles adding, removing, and refreshing
+ * device handles within the expander objects.
- */
- static void
--mptsas_hotplug_work(struct work_struct *work)
++ */
++static void
+mptsas_send_expander_event(struct fw_event_work *fw_event)
- {
-- struct mptsas_hotplug_event *ev =
-- container_of(work, struct mptsas_hotplug_event, work);
++{
+ MPT_ADAPTER *ioc;
+ MpiEventDataSasExpanderStatusChange_t *expander_data;
+ struct mptsas_portinfo *port_info;
+ __le64 sas_address;
+ int i;
-
-- MPT_ADAPTER *ioc = ev->ioc;
-- struct mptsas_phyinfo *phy_info;
-- struct sas_rphy *rphy;
-- struct sas_port *port;
-- struct scsi_device *sdev;
-- struct scsi_target * starget;
-- struct sas_identify identify;
-- char *ds = NULL;
-- struct mptsas_devinfo sas_device;
-- VirtTarget *vtarget;
-- VirtDevice *vdevice;
++
+ ioc = fw_event->ioc;
+ expander_data = (MpiEventDataSasExpanderStatusChange_t *)
+ fw_event->event_data;
+ } else if (expander_data->ReasonCode ==
+ MPI_EVENT_SAS_EXP_RC_NOT_RESPONDING)
+ mptsas_expander_delete(ioc, port_info);
-
-- mutex_lock(&ioc->sas_discovery_mutex);
-- switch (ev->event_type) {
-- case MPTSAS_DEL_DEVICE:
++
+ mptsas_free_fw_event(ioc, fw_event);
+}
-
-- phy_info = NULL;
-- if (ev->phys_disk_num_valid) {
-- if (ev->hidden_raid_component){
-- if (mptsas_sas_device_pg0(ioc, &sas_device,
-- (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
-- MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
-- (ev->channel << 8) + ev->id)) {
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
-- "%s: exit at line=%d\n", ioc->name,
-- __func__, __LINE__));
-- break;
-- }
-- phy_info = mptsas_find_phyinfo_by_sas_address(
-- ioc, sas_device.sas_address);
-- }else
-- phy_info = mptsas_find_phyinfo_by_phys_disk_num(
-- ioc, ev->channel, ev->phys_disk_num);
-- }
-
-- if (!phy_info)
-- phy_info = mptsas_find_phyinfo_by_target(ioc,
-- ev->channel, ev->id);
++
++
+/**
+ * mptsas_expander_add -
+ * @ioc: Pointer to MPT_ADAPTER structure
+{
+ struct mptsas_portinfo buffer, *port_info;
+ int i;
-
-- /*
-- * Sanity checks, for non-existing phys and remote rphys.
-- */
-- if (!phy_info){
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
-- "%s: exit at line=%d\n", ioc->name,
-- __func__, __LINE__));
-- break;
-- }
-- if (!phy_info->port_details) {
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
-- "%s: exit at line=%d\n", ioc->name,
-- __func__, __LINE__));
-- break;
-- }
-- rphy = mptsas_get_rphy(phy_info);
-- if (!rphy) {
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
-- "%s: exit at line=%d\n", ioc->name,
-- __func__, __LINE__));
-- break;
-- }
++
+ if ((mptsas_sas_expander_pg0(ioc, &buffer,
+ (MPI_SAS_EXPAND_PGAD_FORM_HANDLE <<
+ MPI_SAS_EXPAND_PGAD_FORM_SHIFT), handle)))
+ return NULL;
-
-- port = mptsas_get_port(phy_info);
-- if (!port) {
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
-- "%s: exit at line=%d\n", ioc->name,
-- __func__, __LINE__));
-- break;
-- }
++
+ port_info = kzalloc(sizeof(struct mptsas_portinfo), GFP_ATOMIC);
+ if (!port_info) {
+ dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+ mptsas_expander_refresh(ioc, port_info);
+ return port_info;
+}
-
-- starget = mptsas_get_starget(phy_info);
-- if (starget) {
-- vtarget = starget->hostdata;
++
+static void
+mptsas_send_link_status_event(struct fw_event_work *fw_event)
+{
+ __le64 sas_address;
+ u8 phy_num;
+ u8 link_rate;
-
-- if (!vtarget) {
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
-- "%s: exit at line=%d\n", ioc->name,
-- __func__, __LINE__));
-- break;
-- }
++
+ ioc = fw_event->ioc;
+ link_data = (MpiEventDataSasPhyLinkStatus_t *)fw_event->event_data;
-
-- /*
-- * Handling RAID components
-- */
-- if (ev->phys_disk_num_valid &&
-- ev->hidden_raid_component) {
-- printk(MYIOC_s_INFO_FMT
-- "RAID Hidding: channel=%d, id=%d, "
-- "physdsk %d \n", ioc->name, ev->channel,
-- ev->id, ev->phys_disk_num);
-- vtarget->id = ev->phys_disk_num;
-- vtarget->tflags |=
-- MPT_TARGET_FLAGS_RAID_COMPONENT;
-- mptsas_reprobe_target(starget, 1);
-- phy_info->attached.phys_disk_num =
-- ev->phys_disk_num;
-- break;
++
+ memcpy(&sas_address, &link_data->SASAddress, sizeof(__le64));
+ sas_address = le64_to_cpu(sas_address);
+ link_rate = link_data->LinkRates >> 4;
+ le16_to_cpu(link_data->DevHandle));
+ if (port_info)
+ goto out;
- }
++ }
+ goto out;
- }
++ }
+ if (port_info == ioc->hba_port_info)
+ mptsas_probe_hba_phys(ioc);
+ else
+ out:
+ mptsas_free_fw_event(ioc, fw_event);
+}
-
-- if (phy_info->attached.device_info &
-- MPI_SAS_DEVICE_INFO_SSP_TARGET)
-- ds = "ssp";
-- if (phy_info->attached.device_info &
-- MPI_SAS_DEVICE_INFO_STP_TARGET)
-- ds = "stp";
-- if (phy_info->attached.device_info &
-- MPI_SAS_DEVICE_INFO_SATA_DEVICE)
-- ds = "sata";
--
-- printk(MYIOC_s_INFO_FMT
-- "removing %s device, channel %d, id %d, phy %d\n",
-- ioc->name, ds, ev->channel, ev->id, phy_info->phy_id);
-- dev_printk(KERN_DEBUG, &port->dev, MYIOC_s_FMT
-- "delete port (%d)\n", ioc->name, port->port_identifier);
-- sas_port_delete(port);
-- mptsas_port_delete(ioc, phy_info->port_details);
-- break;
-- case MPTSAS_ADD_DEVICE:
--
-- if (ev->phys_disk_num_valid)
-- mpt_findImVolumes(ioc);
-
-- /*
-- * Refresh sas device pg0 data
-- */
-- if (mptsas_sas_device_pg0(ioc, &sas_device,
-- (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
-- MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
-- (ev->channel << 8) + ev->id)) {
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
-- "%s: exit at line=%d\n", ioc->name,
-- __func__, __LINE__));
-- break;
++
++
+static void
+mptsas_handle_queue_full_event(struct fw_event_work *fw_event)
+{
+ channel = MPTSAS_RAID_CHANNEL;
+ goto out;
+ }
- }
--
-- __mptsas_discovery_work(ioc);
--
-- phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
-- sas_device.sas_address);
--
-- if (!phy_info || !phy_info->port_details) {
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
-- "%s: exit at line=%d\n", ioc->name,
-- __func__, __LINE__));
-- break;
++ }
+ } else {
+ list_for_each_entry(sas_info, &ioc->sas_device_info_list,
+ list) {
+ channel = sas_info->os.channel;
+ goto out;
+ }
- }
-
-- starget = mptsas_get_starget(phy_info);
-- if (starget && (!ev->hidden_raid_component)){
++ }
++
+ }
-
-- vtarget = starget->hostdata;
++
+ out:
+ mutex_unlock(&ioc->sas_device_info_mutex);
-
-- if (!vtarget) {
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
-- "%s: exit at line=%d\n", ioc->name,
-- __func__, __LINE__));
-- break;
-- }
-- /*
-- * Handling RAID components
-- */
-- if (vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT) {
-- printk(MYIOC_s_INFO_FMT
-- "RAID Exposing: channel=%d, id=%d, "
-- "physdsk %d \n", ioc->name, ev->channel,
-- ev->id, ev->phys_disk_num);
-- vtarget->tflags &=
-- ~MPT_TARGET_FLAGS_RAID_COMPONENT;
-- vtarget->id = ev->id;
-- mptsas_reprobe_target(starget, 0);
-- phy_info->attached.phys_disk_num = ~0;
++
+ if (id != -1) {
+ shost_for_each_device(sdev, ioc->sh) {
+ if (sdev->id == id && sdev->channel == channel) {
+ else if (depth == 0)
+ sdev_printk(KERN_INFO, sdev,
+ "Queue depth not changed yet\n");
- }
-- break;
-- }
--
-- if (mptsas_get_rphy(phy_info)) {
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
-- "%s: exit at line=%d\n", ioc->name,
-- __func__, __LINE__));
-- if (ev->channel) printk("%d\n", __LINE__);
-- break;
- }
++ }
++ }
+ }
-
-- port = mptsas_get_port(phy_info);
-- if (!port) {
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
-- "%s: exit at line=%d\n", ioc->name,
-- __func__, __LINE__));
-- break;
-- }
-- memcpy(&phy_info->attached, &sas_device,
-- sizeof(struct mptsas_devinfo));
++
+ mptsas_free_fw_event(ioc, fw_event);
+}
-
-- if (phy_info->attached.device_info &
-- MPI_SAS_DEVICE_INFO_SSP_TARGET)
-- ds = "ssp";
-- if (phy_info->attached.device_info &
-- MPI_SAS_DEVICE_INFO_STP_TARGET)
-- ds = "stp";
-- if (phy_info->attached.device_info &
-- MPI_SAS_DEVICE_INFO_SATA_DEVICE)
-- ds = "sata";
++
+/**
+ * mptsas_firmware_event_work - work thread for processing fw events
+ * @work: work queue payload containing info describing the event
+ mptsas_free_fw_event(ioc, fw_event);
+ return;
+ }
-
-- printk(MYIOC_s_INFO_FMT
-- "attaching %s device, channel %d, id %d, phy %d\n",
-- ioc->name, ds, ev->channel, ev->id, ev->phy_id);
++
+ /* events handling turned off during host reset */
+ if (ioc->fw_events_off) {
+ mptsas_free_fw_event(ioc, fw_event);
+ return;
+ }
-
-- mptsas_parse_device_info(&identify, &phy_info->attached);
-- rphy = sas_end_device_alloc(port);
-- if (!rphy) {
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
-- "%s: exit at line=%d\n", ioc->name,
-- __func__, __LINE__));
-- break; /* non-fatal: an rphy can be added later */
-- }
++
+ devtprintk(ioc, printk(MYIOC_s_INFO_FMT "%s: fw_event=(0x%p), "
+ "event = (0x%02x)\n", ioc->name, __func__, fw_event,
+ (fw_event->event & 0xFF)));
-
-- rphy->identify = identify;
-- if (sas_rphy_add(rphy)) {
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
-- "%s: exit at line=%d\n", ioc->name,
-- __func__, __LINE__));
-- sas_rphy_free(rphy);
-- break;
-- }
-- mptsas_set_rphy(ioc, phy_info, rphy);
++
+ switch (fw_event->event) {
+ case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:
+ mptsas_send_sas_event(fw_event);
- break;
-- case MPTSAS_ADD_RAID:
-- sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL,
-- ev->id, 0);
-- if (sdev) {
-- scsi_device_put(sdev);
-- break;
-- }
-- printk(MYIOC_s_INFO_FMT
-- "attaching raid volume, channel %d, id %d\n",
-- ioc->name, MPTSAS_RAID_CHANNEL, ev->id);
-- scsi_add_device(ioc->sh, MPTSAS_RAID_CHANNEL, ev->id, 0);
-- mpt_findImVolumes(ioc);
++ break;
+ case MPI_EVENT_INTEGRATED_RAID:
+ mptsas_send_raid_event(fw_event);
- break;
-- case MPTSAS_DEL_RAID:
-- sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL,
-- ev->id, 0);
-- if (!sdev)
-- break;
-- printk(MYIOC_s_INFO_FMT
-- "removing raid volume, channel %d, id %d\n",
-- ioc->name, MPTSAS_RAID_CHANNEL, ev->id);
-- vdevice = sdev->hostdata;
-- scsi_remove_device(sdev);
-- scsi_device_put(sdev);
-- mpt_findImVolumes(ioc);
++ break;
+ case MPI_EVENT_IR2:
+ mptsas_send_ir2_event(fw_event);
- break;
-- case MPTSAS_ADD_INACTIVE_VOLUME:
-- mptsas_adding_inactive_raid_components(ioc,
-- ev->channel, ev->id);
++ break;
+ case MPI_EVENT_PERSISTENT_TABLE_FULL:
+ mptbase_sas_persist_operation(ioc,
+ MPI_SAS_OP_CLEAR_NOT_PRESENT);
+ mptsas_free_fw_event(ioc, fw_event);
- break;
-- case MPTSAS_IGNORE_EVENT:
-- default:
++ break;
+ case MPI_EVENT_SAS_BROADCAST_PRIMITIVE:
+ mptsas_broadcast_primative_work(fw_event);
+ break;
+ break;
+ case MPI_EVENT_QUEUE_FULL:
+ mptsas_handle_queue_full_event(fw_event);
- break;
- }
--
-- mutex_unlock(&ioc->sas_discovery_mutex);
-- kfree(ev);
- }
-
--static void
--mptsas_send_sas_event(MPT_ADAPTER *ioc,
-- EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data)
--{
-- struct mptsas_hotplug_event *ev;
-- u32 device_info = le32_to_cpu(sas_event_data->DeviceInfo);
-- __le64 sas_address;
-
-- if ((device_info &
-- (MPI_SAS_DEVICE_INFO_SSP_TARGET |
-- MPI_SAS_DEVICE_INFO_STP_TARGET |
-- MPI_SAS_DEVICE_INFO_SATA_DEVICE )) == 0)
-- return;
++ break;
++ }
++}
++
++
+/**
+ * mptsas_event_process -
+ * @ioc: Pointer to MPT_ADAPTER structure
+ * @reply:
+ *
+ **/
-+static int
-+mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply)
-+{
+ static int
+ mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply)
+ {
+- int rc=1;
+- u8 event = le32_to_cpu(reply->Event) & 0xFF;
+-
+- if (!ioc->sh)
+- goto out;
+-
+- /*
+- * sas_discovery_ignore_events
+- *
+- * This flag is to prevent anymore processing of
+- * sas events once mptsas_remove function is called.
+- */
+- if (ioc->sas_discovery_ignore_events) {
+- rc = mptscsih_event_process(ioc, reply);
+- goto out;
+- }
+-
+ u32 event = le32_to_cpu(reply->Event);
+ int sz, event_data_sz;
+ struct fw_event_work *fw_event;
+ unsigned long delay;
-
-- switch (sas_event_data->ReasonCode) {
-- case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING:
++
+ /* events turned off due to host reset or driver unloading */
+ if (ioc->fw_events_off)
+ return 0;
-
-- mptsas_target_reset_queue(ioc, sas_event_data);
++
+ delay = msecs_to_jiffies(1);
-+ switch (event) {
+ switch (event) {
+ case MPI_EVENT_SAS_BROADCAST_PRIMITIVE:
+ {
+ EVENT_DATA_SAS_BROADCAST_PRIMITIVE *broadcast_event_data =
+ if (ioc->broadcast_aen_busy)
+ return 0;
+ ioc->broadcast_aen_busy = 1;
- break;
++ break;
+ }
-+ case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:
+ case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:
+- mptsas_send_sas_event(ioc,
+- (EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *)reply->Data);
+- break;
+ {
+ EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data =
+ (EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *)reply->Data;
-
-- case MPI_EVENT_SAS_DEV_STAT_RC_ADDED:
-- ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
-- if (!ev) {
-- printk(MYIOC_s_WARN_FMT "lost hotplug event\n", ioc->name);
-- break;
++
+ if (sas_event_data->ReasonCode ==
+ MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING) {
+ mptsas_target_reset_queue(ioc, sas_event_data);
+ return 0;
- }
++ }
+ break;
+ }
+ case MPI_EVENT_SAS_EXPANDER_STATUS_CHANGE:
+ {
+ MpiEventDataSasExpanderStatusChange_t *expander_data =
+ (MpiEventDataSasExpanderStatusChange_t *)reply->Data;
-
-- INIT_WORK(&ev->work, mptsas_hotplug_work);
-- ev->ioc = ioc;
-- ev->handle = le16_to_cpu(sas_event_data->DevHandle);
-- ev->parent_handle =
-- le16_to_cpu(sas_event_data->ParentDevHandle);
-- ev->channel = sas_event_data->Bus;
-- ev->id = sas_event_data->TargetID;
-- ev->phy_id = sas_event_data->PhyNum;
-- memcpy(&sas_address, &sas_event_data->SASAddress,
-- sizeof(__le64));
-- ev->sas_address = le64_to_cpu(sas_address);
-- ev->device_info = device_info;
++
+ if (ioc->old_sas_discovery_protocal)
+ return 0;
-
-- if (sas_event_data->ReasonCode &
-- MPI_EVENT_SAS_DEV_STAT_RC_ADDED)
-- ev->event_type = MPTSAS_ADD_DEVICE;
-- else
-- ev->event_type = MPTSAS_DEL_DEVICE;
-- schedule_work(&ev->work);
++
+ if (expander_data->ReasonCode ==
+ MPI_EVENT_SAS_EXP_RC_NOT_RESPONDING &&
+ ioc->device_missing_delay)
+ delay = HZ * ioc->device_missing_delay;
- break;
-- case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED:
-- /*
-- * Persistent table is full.
-- */
-- INIT_WORK(&ioc->sas_persist_task,
-- mptsas_persist_clear_table);
-- schedule_work(&ioc->sas_persist_task);
++ break;
+ }
+ case MPI_EVENT_SAS_DISCOVERY:
+ {
+ mptsas_queue_rescan(ioc);
+ return 0;
+ }
-+ case MPI_EVENT_INTEGRATED_RAID:
-+ case MPI_EVENT_PERSISTENT_TABLE_FULL:
-+ case MPI_EVENT_IR2:
+ case MPI_EVENT_INTEGRATED_RAID:
+- mptsas_send_raid_event(ioc,
+- (EVENT_DATA_RAID *)reply->Data);
+- break;
+ case MPI_EVENT_PERSISTENT_TABLE_FULL:
+- INIT_WORK(&ioc->sas_persist_task,
+- mptsas_persist_clear_table);
+- schedule_work(&ioc->sas_persist_task);
+- break;
+- case MPI_EVENT_SAS_DISCOVERY:
+- mptsas_send_discovery_event(ioc,
+- (EVENT_DATA_SAS_DISCOVERY *)reply->Data);
+- break;
+ case MPI_EVENT_IR2:
+- mptsas_send_ir2_event(ioc,
+- (PTR_MPI_EVENT_DATA_IR2)reply->Data);
+- break;
+- default:
+- rc = mptscsih_event_process(ioc, reply);
+- break;
+- }
+- out:
+-
+- return rc;
+-}
+-
+ case MPI_EVENT_SAS_PHY_LINK_STATUS:
+ case MPI_EVENT_QUEUE_FULL:
- break;
-- /*
-- * TODO, handle other events
-- */
-- case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA:
-- case MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED:
-- case MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET:
-- case MPI_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL:
-- case MPI_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL:
-- case MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL:
-- case MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL:
- default:
-- break;
++ break;
++ default:
+ return 0;
+ }
+
+ printk(MYIOC_s_WARN_FMT "%s: failed at (line=%d)\n", ioc->name,
+ __func__, __LINE__);
+ return 0;
- }
++ }
+ memcpy(fw_event->event_data, reply->Data, event_data_sz);
+ fw_event->event = event;
+ fw_event->ioc = ioc;
+ mptsas_add_fw_event(ioc, fw_event, delay);
+ return 0;
- }
--static void
--mptsas_send_raid_event(MPT_ADAPTER *ioc,
-- EVENT_DATA_RAID *raid_event_data)
++}
+
+
+/* Delete a volume when no longer listed in ioc pg2
+ */
+static void mptsas_volume_delete(MPT_ADAPTER *ioc, u8 id)
- {
-- struct mptsas_hotplug_event *ev;
-- int status = le32_to_cpu(raid_event_data->SettingsStatus);
-- int state = (status >> 8) & 0xff;
++{
+ struct scsi_device *sdev;
+ int i;
-
-- if (ioc->bus_type != SAS)
++
+ sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL, id, 0);
+ if (!sdev)
- return;
++ return;
+ if (!ioc->raid_data.pIocPg2)
+ goto out;
+ if (!ioc->raid_data.pIocPg2->NumActiveVolumes)
+ VirtTarget *vtarget = NULL;
+ struct mptsas_phyinfo *phy_info;
+ u8 found_expander;
-
-- ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
-- if (!ev) {
-- printk(MYIOC_s_WARN_FMT "lost hotplug event\n", ioc->name);
++
+ if (ioc->disable_hotplug_remove)
- return;
++ return;
+
+ mpt_findImVolumes(ioc);
+
+ }
+ } else
+ mptsas_volume_delete(ioc, sas_info->fw.id);
- }
-
-- INIT_WORK(&ev->work, mptsas_hotplug_work);
-- ev->ioc = ioc;
-- ev->id = raid_event_data->VolumeID;
-- ev->channel = raid_event_data->VolumeBus;
-- ev->event_type = MPTSAS_IGNORE_EVENT;
++ }
++
+ /* expanders */
+ redo_expander_scan:
+ list_for_each_entry(port_info, &ioc->sas_topology, list) {
-
-- switch (raid_event_data->ReasonCode) {
-- case MPI_EVENT_RAID_RC_PHYSDISK_DELETED:
-- ev->phys_disk_num_valid = 1;
-- ev->phys_disk_num = raid_event_data->PhysDiskNum;
-- ev->event_type = MPTSAS_ADD_DEVICE;
-- break;
-- case MPI_EVENT_RAID_RC_PHYSDISK_CREATED:
-- ev->phys_disk_num_valid = 1;
-- ev->phys_disk_num = raid_event_data->PhysDiskNum;
-- ev->hidden_raid_component = 1;
-- ev->event_type = MPTSAS_DEL_DEVICE;
-- break;
-- case MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED:
-- switch (state) {
-- case MPI_PD_STATE_ONLINE:
-- case MPI_PD_STATE_NOT_COMPATIBLE:
-- ev->phys_disk_num_valid = 1;
-- ev->phys_disk_num = raid_event_data->PhysDiskNum;
-- ev->hidden_raid_component = 1;
-- ev->event_type = MPTSAS_ADD_DEVICE;
-- break;
-- case MPI_PD_STATE_MISSING:
-- case MPI_PD_STATE_OFFLINE_AT_HOST_REQUEST:
-- case MPI_PD_STATE_FAILED_AT_HOST_REQUEST:
-- case MPI_PD_STATE_OFFLINE_FOR_ANOTHER_REASON:
-- ev->phys_disk_num_valid = 1;
-- ev->phys_disk_num = raid_event_data->PhysDiskNum;
-- ev->event_type = MPTSAS_DEL_DEVICE;
-- break;
-- default:
-- break;
++
+ if (port_info->phy_info &&
+ (!(port_info->phy_info[0].identify.device_info &
+ MPI_SAS_DEVICE_INFO_SMP_TARGET)))
+ found_expander = 1;
+ }
+ kfree(buffer.phy_info);
- }
-- break;
-- case MPI_EVENT_RAID_RC_VOLUME_DELETED:
-- ev->event_type = MPTSAS_DEL_RAID;
-- break;
-- case MPI_EVENT_RAID_RC_VOLUME_CREATED:
-- ev->event_type = MPTSAS_ADD_RAID;
-- break;
-- case MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED:
-- switch (state) {
-- case MPI_RAIDVOL0_STATUS_STATE_FAILED:
-- case MPI_RAIDVOL0_STATUS_STATE_MISSING:
-- ev->event_type = MPTSAS_DEL_RAID;
-- break;
-- case MPI_RAIDVOL0_STATUS_STATE_OPTIMAL:
-- case MPI_RAIDVOL0_STATUS_STATE_DEGRADED:
-- ev->event_type = MPTSAS_ADD_RAID;
-- break;
-- default:
-- break;
++ }
+
+ if (!found_expander) {
+ mptsas_expander_delete(ioc, port_info);
+ goto redo_expander_scan;
- }
-- break;
-- default:
-- break;
- }
-- schedule_work(&ev->work);
- }
-
++ }
++ }
++}
++
+/**
+ * mptsas_probe_expanders - adding expanders
+ * @ioc: Pointer to MPT_ADAPTER structure
+ *
+ **/
- static void
--mptsas_send_discovery_event(MPT_ADAPTER *ioc,
-- EVENT_DATA_SAS_DISCOVERY *discovery_data)
++static void
+mptsas_probe_expanders(MPT_ADAPTER *ioc)
- {
-- struct mptsas_discovery_event *ev;
++{
+ struct mptsas_portinfo buffer, *port_info;
+ u32 handle;
+ int i;
-
-- /*
-- * DiscoveryStatus
-- *
-- * This flag will be non-zero when firmware
-- * kicks off discovery, and return to zero
-- * once its completed.
-- */
-- if (discovery_data->DiscoveryStatus)
-- return;
++
+ handle = 0xFFFF;
+ while (!mptsas_sas_expander_pg0(ioc, &buffer,
+ (MPI_SAS_EXPAND_PGAD_FORM_GET_NEXT_HANDLE <<
+ MPI_SAS_EXPAND_PGAD_FORM_SHIFT), handle)) {
-
-- ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
-- if (!ev)
-- return;
-- INIT_WORK(&ev->work, mptsas_discovery_work);
-- ev->ioc = ioc;
-- schedule_work(&ev->work);
--};
++
+ handle = buffer.phy_info[0].handle;
+ port_info = mptsas_find_portinfo_by_sas_address(ioc,
+ buffer.phy_info[0].identify.sas_address);
+ mptsas_expander_refresh(ioc, port_info);
+ }
+}
-
--/*
-- * mptsas_send_ir2_event - handle exposing hidden disk when
-- * an inactive raid volume is added
-- *
-- * @ioc: Pointer to MPT_ADAPTER structure
-- * @ir2_data
-- *
-- */
- static void
--mptsas_send_ir2_event(MPT_ADAPTER *ioc, PTR_MPI_EVENT_DATA_IR2 ir2_data)
++
++static void
+mptsas_probe_devices(MPT_ADAPTER *ioc)
- {
-- struct mptsas_hotplug_event *ev;
++{
+ u16 retry_count;
+ u16 handle;
+ struct mptsas_devinfo sas_device;
+ struct mptsas_phyinfo *phy_info;
+ enum device_state state;
-
-- if (ir2_data->ReasonCode !=
-- MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED)
-- return;
++
+ handle = 0xFFFF;
+ while (!(mptsas_sas_device_pg0(ioc, &sas_device,
+ MPI_SAS_DEVICE_PGAD_FORM_GET_NEXT_HANDLE, handle))) {
+ MPI_SAS_DEVICE_INFO_STP_TARGET |
+ MPI_SAS_DEVICE_INFO_SATA_DEVICE)) == 0)
+ continue;
-
-- ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
-- if (!ev)
-- return;
++
+ phy_info = mptsas_refreshing_device_handles(ioc, &sas_device);
+ if (!phy_info)
+ continue;
-
-- INIT_WORK(&ev->work, mptsas_hotplug_work);
-- ev->ioc = ioc;
-- ev->id = ir2_data->TargetID;
-- ev->channel = ir2_data->Bus;
-- ev->event_type = MPTSAS_ADD_INACTIVE_VOLUME;
++
+ if (mptsas_get_rphy(phy_info))
+ continue;
-
-- schedule_work(&ev->work);
--};
++
+ state = DEVICE_RETRY;
+ retry_count = 0;
+ while (state == DEVICE_RETRY) {
+ mptsas_add_end_device(ioc, phy_info);
+ }
+}
-
--static int
--mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply)
++
+/**
+ * mptsas_scan_sas_topology -
+ * @ioc: Pointer to MPT_ADAPTER structure
+ **/
+static void
+mptsas_scan_sas_topology(MPT_ADAPTER *ioc)
- {
-- int rc=1;
-- u8 event = le32_to_cpu(reply->Event) & 0xFF;
++{
+ struct scsi_device *sdev;
+ int i;
-
-- if (!ioc->sh)
-- goto out;
++
+ mptsas_probe_hba_phys(ioc);
+ mptsas_probe_expanders(ioc);
+ mptsas_probe_devices(ioc);
-
- /*
-- * sas_discovery_ignore_events
-- *
-- * This flag is to prevent anymore processing of
-- * sas events once mptsas_remove function is called.
-- */
-- if (ioc->sas_discovery_ignore_events) {
-- rc = mptscsih_event_process(ioc, reply);
-- goto out;
-- }
--
-- switch (event) {
-- case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:
-- mptsas_send_sas_event(ioc,
-- (EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *)reply->Data);
-- break;
-- case MPI_EVENT_INTEGRATED_RAID:
-- mptsas_send_raid_event(ioc,
-- (EVENT_DATA_RAID *)reply->Data);
-- break;
-- case MPI_EVENT_PERSISTENT_TABLE_FULL:
-- INIT_WORK(&ioc->sas_persist_task,
-- mptsas_persist_clear_table);
-- schedule_work(&ioc->sas_persist_task);
-- break;
-- case MPI_EVENT_SAS_DISCOVERY:
-- mptsas_send_discovery_event(ioc,
-- (EVENT_DATA_SAS_DISCOVERY *)reply->Data);
-- break;
-- case MPI_EVENT_IR2:
-- mptsas_send_ir2_event(ioc,
-- (PTR_MPI_EVENT_DATA_IR2)reply->Data);
-- break;
-- default:
-- rc = mptscsih_event_process(ioc, reply);
-- break;
++
++ /*
+ Reporting RAID volumes.
+ */
+ if (!ioc->ir_firmware || !ioc->raid_data.pIocPg2 ||
+ ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID);
+ scsi_add_device(ioc->sh, MPTSAS_RAID_CHANNEL,
+ ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID, 0);
- }
-- out:
--
-- return rc;
- }
-
++ }
++}
++
+/**
+ * mptsas_probe -
+ * @pdev:
static int
mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
-@@ -3129,6 +5228,7 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3129,6 +5228,7 @@
return r;
ioc = pci_get_drvdata(pdev);
ioc->DoneCtx = mptsasDoneCtx;
ioc->TaskCtx = mptsasTaskCtx;
ioc->InternalCtx = mptsasInternalCtx;
-@@ -3173,7 +5273,7 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3173,7 +5273,7 @@
ioc->name);
error = -1;
goto out_mptsas_probe;
spin_lock_irqsave(&ioc->FreeQlock, flags);
-@@ -3187,10 +5287,9 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3187,10 +5287,9 @@
/* set 16 byte cdb's */
sh->max_cmd_len = 16;
sh->transportt = mptsas_transport_template;
/* Required entry.
-@@ -3199,10 +5298,10 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3199,9 +5298,9 @@
INIT_LIST_HEAD(&ioc->sas_topology);
mutex_init(&ioc->sas_topology_mutex);
- mutex_init(&ioc->sas_discovery_mutex);
mutex_init(&ioc->sas_mgmt.mutex);
init_completion(&ioc->sas_mgmt.done);
-
+
+
/* Verify that we won't exceed the maximum
* number of chain buffers
- * We can optimize: ZZ = req_sz/sizeof(SGE)
-@@ -3212,17 +5311,16 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3212,17 +5311,16 @@
* A slightly different algorithm is required for
* 64bit SGEs.
*/
}
if (numSGE < sh->sg_tablesize) {
-@@ -3250,34 +5348,18 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3250,34 +5348,18 @@
dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n",
ioc->name, ioc->ScsiLookup));
spin_unlock_irqrestore(&ioc->FreeQlock, flags);
if (ioc->sas_data.ptClear==1) {
-@@ -3292,8 +5374,11 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3292,8 +5374,11 @@
goto out_mptsas_probe;
}
return 0;
out_mptsas_probe:
-@@ -3302,13 +5387,23 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3302,13 +5387,23 @@
return error;
}
sas_remove_host(ioc->sh);
mutex_lock(&ioc->sas_topology_mutex);
-@@ -3316,11 +5411,12 @@ static void __devexit mptsas_remove(stru
+@@ -3316,11 +5411,12 @@
list_del(&p->list);
for (i = 0 ; i < p->num_phys ; i++)
mptsas_port_delete(ioc, p->phy_info[i].port_details);
mptscsih_remove(pdev);
}
-@@ -3352,6 +5448,10 @@ static struct pci_driver mptsas_driver =
+@@ -3352,6 +5448,10 @@
#endif
};
static int __init
mptsas_init(void)
{
-@@ -3365,10 +5465,12 @@ mptsas_init(void)
+@@ -3365,10 +5465,12 @@
return -ENODEV;
mptsasDoneCtx = mpt_register(mptscsih_io_done, MPTSAS_DRIVER);
mpt_event_register(mptsasDoneCtx, mptsas_event_process);
mpt_reset_register(mptsasDoneCtx, mptsas_ioc_reset);
-@@ -3380,6 +5482,10 @@ mptsas_init(void)
+@@ -3380,6 +5482,10 @@
return error;
}
static void __exit
mptsas_exit(void)
{
-@@ -3393,6 +5499,7 @@ mptsas_exit(void)
+@@ -3393,6 +5499,7 @@
mpt_deregister(mptsasInternalCtx);
mpt_deregister(mptsasTaskCtx);
mpt_deregister(mptsasDoneCtx);
}
module_init(mptsas_init);
-diff -purN linux-2.6.27/drivers/message/fusion/mptsas.h linux-2.6.27.19-5.1/drivers/message/fusion/mptsas.h
---- linux-2.6.27/drivers/message/fusion/mptsas.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptsas.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptsas.h
+--- a/drivers/message/fusion/mptsas.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptsas.h Wed May 06 16:56:21 2009 +0100
@@ -50,9 +50,10 @@
/*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
};
enum mptsas_hotplug_action {
-@@ -61,11 +62,37 @@ enum mptsas_hotplug_action {
+@@ -61,11 +62,37 @@
MPTSAS_ADD_RAID,
MPTSAS_DEL_RAID,
MPTSAS_ADD_INACTIVE_VOLUME,
MPT_ADAPTER *ioc;
enum mptsas_hotplug_action event_type;
u64 sas_address;
-@@ -73,17 +100,28 @@ struct mptsas_hotplug_event {
+@@ -73,17 +100,28 @@
u8 id;
u32 device_info;
u16 handle;
/*
* SAS topology structures
-@@ -113,32 +151,35 @@ struct mptsas_devinfo {
+@@ -113,32 +151,35 @@
* Specific details on ports, wide/narrow
*/
struct mptsas_portinfo_details{
struct mptsas_phyinfo *phy_info;
};
-@@ -156,3 +197,4 @@ struct mptsas_enclosure {
+@@ -156,3 +197,4 @@
/*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#endif
+
-diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/drivers/message/fusion/mptscsih.c
---- linux-2.6.27/drivers/message/fusion/mptscsih.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptscsih.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptscsih.c
+--- a/drivers/message/fusion/mptscsih.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptscsih.c Wed May 06 16:56:21 2009 +0100
@@ -53,7 +53,9 @@
#include <linux/delay.h> /* for mdelay */
#include <linux/interrupt.h> /* needed for in_interrupt() proto */
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
-@@ -77,10 +79,15 @@ MODULE_LICENSE("GPL");
+@@ -77,10 +79,15 @@
MODULE_VERSION(my_VERSION);
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
static struct scsi_cmnd * mptscsih_getclear_scsi_lookup(MPT_ADAPTER *ioc, int i);
static void mptscsih_set_scsi_lookup(MPT_ADAPTER *ioc, int i, struct scsi_cmnd *scmd);
static int SCPNT_TO_LOOKUP_IDX(MPT_ADAPTER *ioc, struct scsi_cmnd *scmd);
-@@ -92,17 +99,11 @@ static int mptscsih_AddSGE(MPT_ADAPTER *
+@@ -92,17 +99,11 @@
SCSIIORequest_t *pReq, int req_idx);
static void mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx);
static void mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply);
void mptscsih_remove(struct pci_dev *);
void mptscsih_shutdown(struct pci_dev *);
-@@ -111,81 +112,15 @@ int mptscsih_suspend(struct pci_dev *p
+@@ -111,81 +112,15 @@
int mptscsih_resume(struct pci_dev *pdev);
#endif
-#define SNS_LEN(scp) SCSI_SENSE_BUFFERSIZE
-
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--/**
+ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+ /**
- * mptscsih_add_sge - Place a simple SGE at address pAddr.
- * @pAddr: virtual address for SGE
- * @flagslength: SGE flags and data transfer length
- }
-} /* mptscsih_add_sge() */
-
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /**
+-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+-/**
- * mptscsih_add_chain - Place a chain SGE at address pAddr.
- * @pAddr: virtual address for SGE
- * @next: nextChainOffset value (u32's)
static inline int
mptscsih_getFreeChainBuffer(MPT_ADAPTER *ioc, int *retIndex)
{
-@@ -195,7 +130,7 @@ mptscsih_getFreeChainBuffer(MPT_ADAPTER
+@@ -195,7 +130,7 @@
int chain_idx;
dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT "getFreeChainBuffer called\n",
spin_lock_irqsave(&ioc->FreeQlock, flags);
if (!list_empty(&ioc->FreeChainQ)) {
int offset;
-@@ -207,13 +142,16 @@ mptscsih_getFreeChainBuffer(MPT_ADAPTER
+@@ -207,13 +142,16 @@
chain_idx = offset / ioc->req_sz;
rc = SUCCESS;
dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT
}
spin_unlock_irqrestore(&ioc->FreeQlock, flags);
-@@ -222,7 +160,7 @@ mptscsih_getFreeChainBuffer(MPT_ADAPTER
+@@ -222,7 +160,7 @@
} /* mptscsih_getFreeChainBuffer() */
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
* mptscsih_AddSGE - Add a SGE (plus chain buffers) to the
* SCSIIORequest_t Message Frame.
* @ioc: Pointer to MPT_ADAPTER structure
-@@ -230,7 +168,7 @@ mptscsih_getFreeChainBuffer(MPT_ADAPTER
+@@ -230,7 +168,7 @@
* @pReq: Pointer to SCSIIORequest_t structure
*
* Returns ...
static int
mptscsih_AddSGE(MPT_ADAPTER *ioc, struct scsi_cmnd *SCpnt,
SCSIIORequest_t *pReq, int req_idx)
-@@ -281,10 +219,10 @@ mptscsih_AddSGE(MPT_ADAPTER *ioc, struct
+@@ -281,10 +219,10 @@
*/
nextSGEset:
/* Get first (num - 1) SG elements
* Skip any SG entries with a length of 0
-@@ -299,11 +237,11 @@ nextSGEset:
+@@ -299,11 +237,11 @@
}
v2 = sg_dma_address(sg);
sg_done++;
}
-@@ -320,12 +258,8 @@ nextSGEset:
+@@ -320,12 +258,8 @@
thisxfer = sg_dma_len(sg);
v2 = sg_dma_address(sg);
sg_done++;
if (chainSge) {
-@@ -334,7 +268,8 @@ nextSGEset:
+@@ -334,7 +268,8 @@
* Update the chain element
* Offset and Length fields.
*/
} else {
/* The current buffer is the original MF
* and there is no Chain buffer.
-@@ -367,7 +302,7 @@ nextSGEset:
+@@ -367,7 +302,7 @@
* set properly).
*/
if (sg_done) {
sgflags = le32_to_cpu(*ptmp);
sgflags |= MPT_SGE_FLAGS_LAST_ELEMENT;
*ptmp = cpu_to_le32(sgflags);
-@@ -381,8 +316,9 @@ nextSGEset:
+@@ -381,8 +316,9 @@
* Old chain element is now complete.
*/
u8 nextChain = (u8) (sgeOffset >> 2);
} else {
/* The original MF buffer requires a chain buffer -
* set the offset.
-@@ -592,14 +528,16 @@ mptscsih_info_scsiio(MPT_ADAPTER *ioc, s
+@@ -592,14 +528,16 @@
}
scsi_print_command(sc);
printk(MYIOC_s_DEBUG_FMT "\tiocstatus = %s (0x%04x), "
"scsi_status = %s (0x%02x), scsi_state = (0x%02x)\n",
ioc->name, desc, ioc_status, desc1, pScsiReply->SCSIStatus,
-@@ -625,7 +563,7 @@ mptscsih_info_scsiio(MPT_ADAPTER *ioc, s
+@@ -625,7 +563,7 @@
#endif
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
* mptscsih_io_done - Main SCSI IO callback routine registered to
* Fusion MPT (base) driver
* @ioc: Pointer to MPT_ADAPTER structure
-@@ -638,7 +576,7 @@ mptscsih_info_scsiio(MPT_ADAPTER *ioc, s
+@@ -638,7 +576,7 @@
* load/init time via the mpt_register() API call.
*
* Returns 1 indicating alloc'd request frame ptr should be freed.
int
mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
{
-@@ -651,14 +589,15 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -651,14 +589,15 @@
VirtTarget *vtarget;
hd = shost_priv(ioc->sh);
"req_idx=%x req_idx_MR=%x mf=%p mr=%p sc=%p\n",
ioc->name, req_idx, req_idx_MR, mf, mr,
mptscsih_get_scsi_lookup(ioc, req_idx_MR));
-@@ -693,7 +632,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -693,7 +632,7 @@
if((ioc->facts.MsgVersion >= MPI_VERSION_01_05) && pScsiReply){
dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT
ioc->name, mf, mr, sc, req_idx, pScsiReply->TaskTag));
}else{
dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-@@ -706,6 +645,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -706,6 +645,7 @@
;
} else {
u32 xfer_cnt;
u16 status;
u8 scsi_state, scsi_status;
u32 log_info;
-@@ -716,6 +656,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -716,6 +656,7 @@
xfer_cnt = le32_to_cpu(pScsiReply->TransferCount);
scsi_set_resid(sc, scsi_bufflen(sc) - xfer_cnt);
log_info = le32_to_cpu(pScsiReply->IOCLogInfo);
/*
* if we get a data underrun indication, yet no data was
-@@ -733,20 +674,9 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -733,20 +674,9 @@
if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID)
mptscsih_copy_sense_data(sc, hd, mf, pScsiReply);
/* CHECKME!
* Maybe: DRIVER_BUSY | SUGGEST_RETRY | DID_SOFT_ERROR (retry)
* But not: DID_BUS_BUSY lest one risk
-@@ -771,7 +701,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -771,7 +701,6 @@
if (hd->sel_timeout[pScsiReq->TargetID] < 0xFFFF)
hd->sel_timeout[pScsiReq->TargetID]++;
if (!vdevice)
break;
vtarget = vdevice->vtarget;
-@@ -793,14 +722,12 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -793,14 +722,12 @@
}
}
} else if (ioc->bus_type == FC) {
sc->result = DID_ERROR << 16;
break;
}
-@@ -810,12 +737,16 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -810,12 +737,16 @@
*/
case MPI_IOCSTATUS_SCSI_TASK_TERMINATED: /* 0x0048 */
break;
case MPI_IOCSTATUS_SCSI_RESIDUAL_MISMATCH: /* 0x0049 */
-@@ -824,9 +755,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -824,9 +755,6 @@
sc->result=DID_SOFT_ERROR << 16;
else /* Sufficient data transfer occurred */
sc->result = (DID_OK << 16) | scsi_status;
break;
case MPI_IOCSTATUS_SCSI_DATA_UNDERRUN: /* 0x0045 */
-@@ -835,11 +763,34 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -835,11 +763,34 @@
* precedence!
*/
sc->result = (DID_OK << 16) | scsi_status;
if (xfer_cnt < sc->underflow) {
if (scsi_status == SAM_STAT_BUSY)
sc->result = SAM_STAT_BUSY;
-@@ -848,7 +799,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -848,7 +799,7 @@
}
if (scsi_state & (MPI_SCSI_STATE_AUTOSENSE_FAILED | MPI_SCSI_STATE_NO_SCSI_STATUS)) {
/* What to do?
sc->result = DID_SOFT_ERROR << 16;
}
else if (scsi_state & MPI_SCSI_STATE_TERMINATED) {
-@@ -857,13 +808,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -856,13 +807,6 @@
+ sc->result = DID_RESET << 16;
}
}
-
+-
-
- dreplyprintk(ioc, printk(MYIOC_s_DEBUG_FMT
- " sc->underflow={report ERR if < %02xh bytes xfer'd}\n",
- ioc->name, sc->underflow));
- dreplyprintk(ioc, printk(MYIOC_s_DEBUG_FMT
- " ActBytesXferd=%02xh\n", ioc->name, xfer_cnt));
--
+
/* Report Queue Full
*/
- if (scsi_status == MPI_SCSI_STATUS_TASK_SET_FULL)
-@@ -879,6 +823,44 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -879,6 +823,44 @@
if (scsi_state == 0) {
;
} else if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID) {
/*
* If running against circa 200003dd 909 MPT f/w,
* may get this (AUTOSENSE_VALID) for actual TASK_SET_FULL
-@@ -890,7 +872,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -890,7 +872,7 @@
}
else if (scsi_state &
) {
/*
* What to do?
-@@ -926,7 +908,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -926,7 +908,6 @@
case MPI_IOCSTATUS_INVALID_SGL: /* 0x0003 */
case MPI_IOCSTATUS_INTERNAL_ERROR: /* 0x0004 */
case MPI_IOCSTATUS_RESERVED: /* 0x0005 */
case MPI_IOCSTATUS_INVALID_FIELD: /* 0x0007 */
case MPI_IOCSTATUS_INVALID_STATE: /* 0x0008 */
case MPI_IOCSTATUS_SCSI_IO_DATA_ERROR: /* 0x0046 */
-@@ -957,7 +938,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -957,7 +938,7 @@
return 1;
}
* mptscsih_flush_running_cmds - For each command found, search
* Scsi_Host instance taskQ and reply to OS.
* Called only if recovering from a FW reload.
-@@ -966,7 +947,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -966,7 +947,7 @@
* Returns: None.
*
* Must be called while new I/Os are being queued.
static void
mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd)
{
-@@ -992,14 +973,14 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOS
+@@ -992,14 +973,14 @@
scsi_dma_unmap(sc);
sc->result = DID_RESET << 16;
sc->host_scribble = NULL;
* mptscsih_search_running_cmds - Delete any commands associated
* with the specified target and lun. Function called only
* when a lun is disable by mid-layer.
-@@ -1012,15 +993,15 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOS
+@@ -1012,15 +993,15 @@
* Returns: None.
*
* Called from slave_destroy.
unsigned long flags;
spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
-@@ -1030,8 +1011,11 @@ mptscsih_search_running_cmds(MPT_SCSI_HO
+@@ -1030,8 +1011,11 @@
mf = (SCSIIORequest_t *)MPT_INDEX_2_MFPTR(ioc, ii);
if (mf == NULL)
continue;
*/
if (vdevice->vtarget->tflags &
MPT_TARGET_FLAGS_RAID_COMPONENT && mf->Function !=
-@@ -1053,9 +1037,11 @@ mptscsih_search_running_cmds(MPT_SCSI_HO
+@@ -1053,9 +1037,11 @@
scsi_dma_unmap(sc);
sc->host_scribble = NULL;
sc->result = DID_NO_CONNECT << 16;
sc->scsi_done(sc);
spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
}
-@@ -1067,7 +1053,7 @@ mptscsih_search_running_cmds(MPT_SCSI_HO
+@@ -1067,7 +1053,7 @@
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
* mptscsih_report_queue_full - Report QUEUE_FULL status returned
* from a SCSI target device.
* @sc: Pointer to scsi_cmnd structure
-@@ -1077,12 +1063,12 @@ mptscsih_search_running_cmds(MPT_SCSI_HO
+@@ -1077,12 +1063,12 @@
* This routine periodically reports QUEUE_FULL status returned from a
* SCSI target device. It reports this to the console via kernel
* printk() API call, not more than once every 10 seconds.
MPT_ADAPTER *ioc;
if (sc->device == NULL)
-@@ -1100,12 +1086,12 @@ mptscsih_report_queue_full(struct scsi_c
+@@ -1100,12 +1086,12 @@
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
void
mptscsih_remove(struct pci_dev *pdev)
{
-@@ -1151,10 +1137,10 @@ mptscsih_remove(struct pci_dev *pdev)
+@@ -1151,10 +1137,10 @@
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
void
mptscsih_shutdown(struct pci_dev *pdev)
{
-@@ -1162,11 +1148,11 @@ mptscsih_shutdown(struct pci_dev *pdev)
+@@ -1162,11 +1148,11 @@
#ifdef CONFIG_PM
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
int
mptscsih_suspend(struct pci_dev *pdev, pm_message_t state)
{
-@@ -1179,11 +1165,11 @@ mptscsih_suspend(struct pci_dev *pdev, p
+@@ -1179,11 +1165,11 @@
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
int
mptscsih_resume(struct pci_dev *pdev)
{
-@@ -1205,7 +1191,7 @@ mptscsih_resume(struct pci_dev *pdev)
+@@ -1205,7 +1191,7 @@
* (linux scsi_host_template.info routine)
*
* Returns pointer to buffer where information was written.
const char *
mptscsih_info(struct Scsi_Host *SChost)
{
-@@ -1338,7 +1324,7 @@ mptscsih_proc_info(struct Scsi_Host *hos
+@@ -1338,7 +1324,7 @@
* from a linux scsi_cmnd request and send it to the IOC.
*
* Returns 0. (rtn value discarded by linux scsi mid-layer)
int
mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
{
-@@ -1346,7 +1332,6 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v
+@@ -1346,7 +1332,6 @@
MPT_FRAME_HDR *mf;
SCSIIORequest_t *pScsiReq;
VirtDevice *vdevice = SCpnt->device->hostdata;
u32 datalen;
u32 scsictl;
u32 scsidir;
-@@ -1357,24 +1342,20 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v
+@@ -1357,24 +1342,20 @@
hd = shost_priv(SCpnt->device->host);
ioc = hd->ioc;
return SCSI_MLQUEUE_HOST_BUSY;
}
-@@ -1422,7 +1403,7 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v
+@@ -1422,7 +1403,7 @@
pScsiReq->CDBLength = SCpnt->cmd_len;
pScsiReq->SenseBufferLength = MPT_SENSE_BUFFER_SIZE;
pScsiReq->Reserved = 0;
int_to_scsilun(SCpnt->device->lun, (struct scsi_lun *)pScsiReq->LUN);
pScsiReq->Control = cpu_to_le32(scsictl);
-@@ -1448,8 +1429,8 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v
+@@ -1448,8 +1429,8 @@
*/
if (datalen == 0) {
/* Add a NULL SGE */
} else {
/* Add a 32 or 64 bit SGE */
if (mptscsih_AddSGE(ioc, SCpnt, pScsiReq, my_idx) != SUCCESS)
-@@ -1472,7 +1453,7 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v
+@@ -1472,7 +1453,7 @@
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
* mptscsih_freeChainBuffers - Function to free chain buffers associated
* with a SCSI IO request
* @hd: Pointer to the MPT_SCSI_HOST instance
-@@ -1480,7 +1461,7 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v
+@@ -1480,7 +1461,7 @@
*
* Called if SG chain buffer allocation fails and mptscsih callbacks.
* No return.
static void
mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx)
{
-@@ -1527,243 +1508,466 @@ mptscsih_freeChainBuffers(MPT_ADAPTER *i
+@@ -1527,118 +1508,297 @@
*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--/**
-- * mptscsih_TMHandler - Generic handler for SCSI Task Management.
-- * @hd: Pointer to MPT SCSI HOST structure
-- * @type: Task Management type
-- * @channel: channel number for task management
-- * @id: Logical Target ID for reset (if appropriate)
-- * @lun: Logical Unit for reset (if appropriate)
-- * @ctx2abort: Context for the task to be aborted (if appropriate)
-- * @timeout: timeout for task management control
-- *
-- * Fall through to mpt_HardResetHandler if: not operational, too many
-- * failed TM requests or handshake failure.
-- *
-- * Remark: Currently invoked from a non-interrupt thread (_bh).
-- *
-- * Note: With old EH code, at most 1 SCSI TaskMgmt function per IOC
-- * will be active.
-- *
-- * Returns 0 for SUCCESS, or %FAILED.
-- **/
--int
--mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout)
--{
-- MPT_ADAPTER *ioc;
-- int rc = -1;
-- u32 ioc_raw_state;
-- unsigned long flags;
--
-- ioc = hd->ioc;
-- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler Entered!\n", ioc->name));
--
-- // SJR - CHECKME - Can we avoid this here?
-- // (mpt_HardResetHandler has this check...)
-- spin_lock_irqsave(&ioc->diagLock, flags);
-- if ((ioc->diagPending) || (ioc->alt_ioc && ioc->alt_ioc->diagPending)) {
-- spin_unlock_irqrestore(&ioc->diagLock, flags);
-- return FAILED;
-- }
-- spin_unlock_irqrestore(&ioc->diagLock, flags);
--
-- /* Wait a fixed amount of time for the TM pending flag to be cleared.
-- * If we time out and not bus reset, then we return a FAILED status
-- * to the caller.
-- * The call to mptscsih_tm_pending_wait() will set the pending flag
-- * if we are
-- * successful. Otherwise, reload the FW.
-- */
-- if (mptscsih_tm_pending_wait(hd) == FAILED) {
-- if (type == MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK) {
-- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler abort: "
-- "Timed out waiting for last TM (%d) to complete! \n",
-- ioc->name, hd->tmPending));
-- return FAILED;
-- } else if (type == MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET) {
-- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler target "
-- "reset: Timed out waiting for last TM (%d) "
-- "to complete! \n", ioc->name,
-- hd->tmPending));
-- return FAILED;
-- } else if (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) {
-- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler bus reset: "
-- "Timed out waiting for last TM (%d) to complete! \n",
-- ioc->name, hd->tmPending));
-- return FAILED;
-- }
-- } else {
-- spin_lock_irqsave(&ioc->FreeQlock, flags);
-- hd->tmPending |= (1 << type);
-- spin_unlock_irqrestore(&ioc->FreeQlock, flags);
-- }
--
-- ioc_raw_state = mpt_GetIocState(ioc, 0);
--
-- if ((ioc_raw_state & MPI_IOC_STATE_MASK) != MPI_IOC_STATE_OPERATIONAL) {
-- printk(MYIOC_s_WARN_FMT
-- "TM Handler for type=%x: IOC Not operational (0x%x)!\n",
-- ioc->name, type, ioc_raw_state);
-- printk(MYIOC_s_WARN_FMT " Issuing HardReset!!\n", ioc->name);
-- if (mpt_HardResetHandler(ioc, CAN_SLEEP) < 0)
-- printk(MYIOC_s_WARN_FMT "TMHandler: HardReset "
-- "FAILED!!\n", ioc->name);
-- return FAILED;
-- }
--
-- if (ioc_raw_state & MPI_DOORBELL_ACTIVE) {
-- printk(MYIOC_s_WARN_FMT
-- "TM Handler for type=%x: ioc_state: "
-- "DOORBELL_ACTIVE (0x%x)!\n",
-- ioc->name, type, ioc_raw_state);
-- return FAILED;
-- }
--
-- /* Isse the Task Mgmt request.
-- */
-- if (hd->hard_resets < -1)
-- hd->hard_resets++;
--
-- rc = mptscsih_IssueTaskMgmt(hd, type, channel, id, lun,
-- ctx2abort, timeout);
-- if (rc)
-- printk(MYIOC_s_INFO_FMT "Issue of TaskMgmt failed!\n",
-- ioc->name);
-- else
-- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Issue of TaskMgmt Successful!\n",
-- ioc->name));
--
-- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-- "TMHandler rc = %d!\n", ioc->name, rc));
--
-- return rc;
--}
--
--
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--/**
-- * mptscsih_IssueTaskMgmt - Generic send Task Management function.
-- * @hd: Pointer to MPT_SCSI_HOST structure
-- * @type: Task Management type
-- * @channel: channel number for task management
-- * @id: Logical Target ID for reset (if appropriate)
-- * @lun: Logical Unit for reset (if appropriate)
-- * @ctx2abort: Context for the task to be aborted (if appropriate)
-- * @timeout: timeout for task management control
-- *
-- * Remark: _HardResetHandler can be invoked from an interrupt thread (timer)
-- * or a non-interrupt thread. In the former, must not call schedule().
-- *
-- * Not all fields are meaningfull for all task types.
-- *
-- * Returns 0 for SUCCESS, or FAILED.
-- *
-- **/
++/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+
- static int
--mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout)
++static int
+mptscsih_scandv_bus_reset(MPT_ADAPTER *ioc)
- {
- MPT_FRAME_HDR *mf;
- SCSITaskMgmt_t *pScsiTm;
++{
++ MPT_FRAME_HDR *mf;
++ SCSITaskMgmt_t *pScsiTm;
+ SCSITaskMgmtReply_t *pScsiTmReply;
- int ii;
- int retval;
-- MPT_ADAPTER *ioc = hd->ioc;
++ int ii;
++ int retval;
+ unsigned long timeout;
+ unsigned long time_count;
+ u16 iocstatus;
+ mutex_unlock(&ioc->taskmgmt_cmds.mutex);
+ return -EPERM;
+ }
-
-- /* Return Fail to calling function if no message frames available.
++
+ /* Send request
- */
- if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) {
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "IssueTaskMgmt, no msg frames!!\n",
-- ioc->name));
-- return FAILED;
++ */
++ if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) {
+ dtmprintk(ioc, printk(MYIOC_s_WARN_FMT
+ "TaskMgmt, no msg frames!!\n", ioc->name));
+ mpt_clear_taskmgmt_in_progress_flag(ioc);
+ retval = -ENOMEM;
+ goto out;
- }
-- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "IssueTaskMgmt request @ %p\n",
-- ioc->name, mf));
-
-- /* Format the Request
-- */
++ }
++
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt request (mf=%p)\n",
+ ioc->name, mf));
+
- pScsiTm = (SCSITaskMgmt_t *) mf;
-- pScsiTm->TargetID = id;
-- pScsiTm->Bus = channel;
-- pScsiTm->ChainOffset = 0;
++ pScsiTm = (SCSITaskMgmt_t *) mf;
+ memset(pScsiTm, 0, sizeof(SCSITaskMgmt_t));
- pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
--
++ pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
+ pScsiTm->TaskType = MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS;
+ pScsiTm->MsgFlags = MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION;
+ pScsiTm->TargetID = 0;
+ pScsiTm->Bus = 0;
+ pScsiTm->ChainOffset = 0;
- pScsiTm->Reserved = 0;
-- pScsiTm->TaskType = type;
- pScsiTm->Reserved1 = 0;
-- pScsiTm->MsgFlags = (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS)
-- ? MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION : 0;
--
-- int_to_scsilun(lun, (struct scsi_lun *)pScsiTm->LUN);
--
-- for (ii=0; ii < 7; ii++)
++ pScsiTm->Reserved = 0;
++ pScsiTm->Reserved1 = 0;
+ pScsiTm->TaskMsgContext = 0;
+ for (ii = 0; ii < 8; ii++)
+ pScsiTm->LUN[ii] = 0;
+ for (ii = 0; ii < 7; ii++)
- pScsiTm->Reserved2[ii] = 0;
-
-- pScsiTm->TaskMsgContext = ctx2abort;
--
-- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "IssueTaskMgmt: ctx2abort (0x%08x) "
-- "type=%d\n", ioc->name, ctx2abort, type));
++ pScsiTm->Reserved2[ii] = 0;
++
+ switch (ioc->bus_type) {
+ case FC:
+ timeout = 40;
+ timeout = 10;
+ break;
+ }
-
-- DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)pScsiTm);
++
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "TaskMgmt type=%d timeout=%ld\n", ioc->name,
+ MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS, timeout));
-
++
+ INITIALIZE_MGMT_STATUS(ioc->taskmgmt_cmds.status)
+ CLEAR_MGMT_STATUS(ioc->internal_cmds.status)
+ retval = 0;
+ time_count = jiffies;
- if ((ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) &&
- (ioc->facts.MsgVersion >= MPI_VERSION_01_05))
- mpt_put_msg_frame_hi_pri(ioc->TaskCtx, ioc, mf);
- else {
- retval = mpt_send_handshake_request(ioc->TaskCtx, ioc,
-- sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, CAN_SLEEP);
-- if (retval) {
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "send_handshake FAILED!"
-- " (hd %p, ioc %p, mf %p, rc=%d) \n", ioc->name, hd,
-- ioc, mf, retval));
-- goto fail_out;
++ if ((ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) &&
++ (ioc->facts.MsgVersion >= MPI_VERSION_01_05))
++ mpt_put_msg_frame_hi_pri(ioc->TaskCtx, ioc, mf);
++ else {
++ retval = mpt_send_handshake_request(ioc->TaskCtx, ioc,
+ sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, CAN_SLEEP);
+ if (retval != 0) {
+ dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+ ioc, mf, retval));
+ mpt_clear_taskmgmt_in_progress_flag(ioc);
+ goto out;
- }
- }
-
-- if(mptscsih_tm_wait_for_completion(hd, timeout) == FAILED) {
-- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "task management request TIMED OUT!"
-- " (hd %p, ioc %p, mf %p) \n", ioc->name, hd,
-- ioc, mf));
-- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Calling HardReset! \n",
-- ioc->name));
-- retval = mpt_HardResetHandler(ioc, CAN_SLEEP);
-- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "rc=%d \n",
-- ioc->name, retval));
-- goto fail_out;
++ }
++ }
++
+ /* Now wait for the command to complete */
+ ii = wait_for_completion_timeout(&ioc->taskmgmt_cmds.done, timeout*HZ);
+ if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
+ mpt_clear_taskmgmt_in_progress_flag(ioc);
+ retval = -1; /* return failure */
+ goto out;
- }
-
-- /*
-- * Handle success case, see if theres a non-zero ioc_status.
-- */
-- if (hd->tm_iocstatus == MPI_IOCSTATUS_SUCCESS ||
-- hd->tm_iocstatus == MPI_IOCSTATUS_SCSI_TASK_TERMINATED ||
-- hd->tm_iocstatus == MPI_IOCSTATUS_SCSI_IOC_TERMINATED)
-- retval = 0;
-- else
-- retval = FAILED;
++ }
++
+ if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_RF_VALID)) {
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "TaskMgmt failed\n", ioc->name));
+ retval = -1; /* return failure */
+ goto out;
+ }
-
-- return retval;
++
+ pScsiTmReply = (SCSITaskMgmtReply_t *) ioc->taskmgmt_cmds.reply;
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "TaskMgmt fw_channel = %d, fw_id = %d, task_type = 0x%02X,\n"
+ le32_to_cpu(pScsiTmReply->IOCLogInfo),
+ pScsiTmReply->ResponseCode,
+ le32_to_cpu(pScsiTmReply->TerminationCount)));
-
-- fail_out:
++
+ iocstatus = le16_to_cpu(pScsiTmReply->IOCStatus) & MPI_IOCSTATUS_MASK;
-
-- /*
-- * Free task management mf, and corresponding tm flags
-- */
-- mpt_free_msg_frame(ioc, mf);
-- hd->tmPending = 0;
-- hd->tmState = TM_STATE_NONE;
-- return FAILED;
++
+ if (iocstatus == MPI_IOCSTATUS_SCSI_TASK_TERMINATED ||
+ iocstatus == MPI_IOCSTATUS_SCSI_IOC_TERMINATED ||
+ iocstatus == MPI_IOCSTATUS_SUCCESS)
+ mutex_unlock(&ioc->taskmgmt_cmds.mutex);
+ CLEAR_MGMT_STATUS(ioc->taskmgmt_cmds.status)
+ return retval;
- }
-
--static int
--mptscsih_get_tm_timeout(MPT_ADAPTER *ioc)
++}
++
+int
+mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
- {
-- switch (ioc->bus_type) {
++{
+ MPT_SCSI_HOST *hd;
+
+ if ((ioc->sh == NULL) || (ioc->sh->hostdata == NULL))
+}
+
+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/**
+ /**
+- * mptscsih_TMHandler - Generic handler for SCSI Task Management.
+- * @hd: Pointer to MPT SCSI HOST structure
+- * @type: Task Management type
+- * @channel: channel number for task management
+- * @id: Logical Target ID for reset (if appropriate)
+- * @lun: Logical Unit for reset (if appropriate)
+- * @ctx2abort: Context for the task to be aborted (if appropriate)
+- * @timeout: timeout for task management control
+ * mptscsih_taskmgmt_complete - Registered with Fusion MPT base driver
+ * @ioc: Pointer to MPT_ADAPTER structure
+ * @mf: Pointer to SCSI task mgmt request frame
+ * @mr: Pointer to SCSI task mgmt reply frame
-+ *
+ *
+- * Fall through to mpt_HardResetHandler if: not operational, too many
+- * failed TM requests or handshake failure.
+ * This routine is called from mptbase.c::mpt_interrupt() at the completion
+ * of any SCSI task management request.
+ * This routine is registered with the MPT (base) driver at driver
+ * load/init time via the mpt_register() API call.
-+ *
+ *
+- * Remark: Currently invoked from a non-interrupt thread (_bh).
+- *
+- * Note: With old EH code, at most 1 SCSI TaskMgmt function per IOC
+- * will be active.
+- *
+- * Returns 0 for SUCCESS, or %FAILED.
+ * Returns 1 indicating alloc'd request frame ptr should be freed.
-+ **/
-+int
+ **/
+ int
+-mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout)
+mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf,
+ MPT_FRAME_HDR *mr)
-+{
+ {
+- MPT_ADAPTER *ioc;
+- int rc = -1;
+- u32 ioc_raw_state;
+- unsigned long flags;
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt completed (mf=%p, mr=%p)\n",
+ ioc->name, mf, mr));
-+
+
+- ioc = hd->ioc;
+- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler Entered!\n", ioc->name));
+ ioc->taskmgmt_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD;
-+
+
+- // SJR - CHECKME - Can we avoid this here?
+- // (mpt_HardResetHandler has this check...)
+- spin_lock_irqsave(&ioc->diagLock, flags);
+- if ((ioc->diagPending) || (ioc->alt_ioc && ioc->alt_ioc->diagPending)) {
+- spin_unlock_irqrestore(&ioc->diagLock, flags);
+- return FAILED;
+ if (!mr)
+ goto out;
+
+ ioc->taskmgmt_cmds.status &= ~MPT_MGMT_STATUS_PENDING;
+ complete(&ioc->taskmgmt_cmds.done);
+ return 1;
-+ }
+ }
+- spin_unlock_irqrestore(&ioc->diagLock, flags);
+-
+- /* Wait a fixed amount of time for the TM pending flag to be cleared.
+- * If we time out and not bus reset, then we return a FAILED status
+- * to the caller.
+- * The call to mptscsih_tm_pending_wait() will set the pending flag
+- * if we are
+- * successful. Otherwise, reload the FW.
+- */
+- if (mptscsih_tm_pending_wait(hd) == FAILED) {
+- if (type == MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK) {
+- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler abort: "
+- "Timed out waiting for last TM (%d) to complete! \n",
+- ioc->name, hd->tmPending));
+- return FAILED;
+- } else if (type == MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET) {
+- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler target "
+- "reset: Timed out waiting for last TM (%d) "
+- "to complete! \n", ioc->name,
+- hd->tmPending));
+- return FAILED;
+- } else if (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) {
+- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler bus reset: "
+- "Timed out waiting for last TM (%d) to complete! \n",
+- ioc->name, hd->tmPending));
+- return FAILED;
+- }
+- } else {
+- spin_lock_irqsave(&ioc->FreeQlock, flags);
+- hd->tmPending |= (1 << type);
+- spin_unlock_irqrestore(&ioc->FreeQlock, flags);
+- }
+-
+- ioc_raw_state = mpt_GetIocState(ioc, 0);
+-
+- if ((ioc_raw_state & MPI_IOC_STATE_MASK) != MPI_IOC_STATE_OPERATIONAL) {
+- printk(MYIOC_s_WARN_FMT
+- "TM Handler for type=%x: IOC Not operational (0x%x)!\n",
+- ioc->name, type, ioc_raw_state);
+- printk(MYIOC_s_WARN_FMT " Issuing HardReset!!\n", ioc->name);
+- if (mpt_HardResetHandler(ioc, CAN_SLEEP) < 0)
+- printk(MYIOC_s_WARN_FMT "TMHandler: HardReset "
+- "FAILED!!\n", ioc->name);
+- return FAILED;
+- }
+-
+- if (ioc_raw_state & MPI_DOORBELL_ACTIVE) {
+- printk(MYIOC_s_WARN_FMT
+- "TM Handler for type=%x: ioc_state: "
+- "DOORBELL_ACTIVE (0x%x)!\n",
+- ioc->name, type, ioc_raw_state);
+- return FAILED;
+- }
+-
+- /* Isse the Task Mgmt request.
+- */
+- if (hd->hard_resets < -1)
+- hd->hard_resets++;
+-
+- rc = mptscsih_IssueTaskMgmt(hd, type, channel, id, lun,
+- ctx2abort, timeout);
+- if (rc)
+- printk(MYIOC_s_INFO_FMT "Issue of TaskMgmt failed!\n",
+- ioc->name);
+- else
+- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Issue of TaskMgmt Successful!\n",
+- ioc->name));
+-
+- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+- "TMHandler rc = %d!\n", ioc->name, rc));
+-
+- return rc;
+ return 0;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/**
-+ * mptscsih_IssueTaskMgmt - Generic send Task Management function.
-+ * @hd: Pointer to MPT_SCSI_HOST structure
-+ * @type: Task Management type
-+ * @channel: channel number for task management
-+ * @id: Logical Target ID for reset (if appropriate)
-+ * @lun: Logical Unit for reset (if appropriate)
-+ * @ctx2abort: Context for the task to be aborted (if appropriate)
-+ * @timeout: timeout for task management control
-+ *
-+ * Remark: _HardResetHandler can be invoked from an interrupt thread (timer)
-+ * or a non-interrupt thread. In the former, must not call schedule().
-+ *
-+ * Not all fields are meaningfull for all task types.
-+ *
-+ * Returns 0 for SUCCESS, or FAILED.
-+ *
-+ **/
+ }
+-
+
+ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+ /**
+@@ -1659,23 +1819,61 @@
+ * Returns 0 for SUCCESS, or FAILED.
+ *
+ **/
+-static int
+-mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout)
+int
+mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun,
+ int ctx2abort, ulong timeout)
-+{
+ {
+- MPT_FRAME_HDR *mf;
+ MPT_FRAME_HDR *mf = NULL;
-+ SCSITaskMgmt_t *pScsiTm;
-+ int ii;
-+ int retval;
+ SCSITaskMgmt_t *pScsiTm;
+ int ii;
+ int retval;
+- MPT_ADAPTER *ioc = hd->ioc;
+ MPT_ADAPTER *ioc = hd->ioc;
+ unsigned long timeleft;
+ u8 issue_hard_reset;
+ retval = FAILED;
+ goto out;
+ }
-+
-+ /* Return Fail to calling function if no message frames available.
-+ */
-+ if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) {
+
+ /* Return Fail to calling function if no message frames available.
+ */
+ if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) {
+- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "IssueTaskMgmt, no msg frames!!\n",
+- ioc->name));
+- return FAILED;
+ dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+ "TaskMgmt no msg frames!!\n",
+ ioc->name));
+ retval = FAILED;
+ mpt_clear_taskmgmt_in_progress_flag(ioc);
+ goto out;
-+ }
+ }
+- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "IssueTaskMgmt request @ %p\n",
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt request (mf=%p)\n",
-+ ioc->name, mf));
-+
-+ /* Format the Request
-+ */
-+ pScsiTm = (SCSITaskMgmt_t *) mf;
-+ pScsiTm->TargetID = id;
-+ pScsiTm->Bus = channel;
-+ pScsiTm->ChainOffset = 0;
-+ pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
-+
-+ pScsiTm->Reserved = 0;
-+ pScsiTm->TaskType = type;
-+ pScsiTm->Reserved1 = 0;
-+ pScsiTm->MsgFlags = (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS)
+ ioc->name, mf));
+
+ /* Format the Request
+@@ -1690,67 +1888,73 @@
+ pScsiTm->TaskType = type;
+ pScsiTm->Reserved1 = 0;
+ pScsiTm->MsgFlags = (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS)
+- ? MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION : 0;
+ ? MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION : 0;
-+
-+ int_to_scsilun(lun, (struct scsi_lun *)pScsiTm->LUN);
-+
+
+ int_to_scsilun(lun, (struct scsi_lun *)pScsiTm->LUN);
+
+- for (ii=0; ii < 7; ii++)
+ for (ii = 0; ii < 7; ii++)
-+ pScsiTm->Reserved2[ii] = 0;
-+
-+ pScsiTm->TaskMsgContext = ctx2abort;
-+
+ pScsiTm->Reserved2[ii] = 0;
+
+ pScsiTm->TaskMsgContext = ctx2abort;
+
+- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "IssueTaskMgmt: ctx2abort (0x%08x) "
+- "type=%d\n", ioc->name, ctx2abort, type));
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt: ctx2abort (0x%08x) "
+ "task_type = 0x%02X, timeout = %ld\n", ioc->name, ctx2abort,
+ type, timeout));
-+
-+ DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)pScsiTm);
-+
+
+ DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)pScsiTm);
+
+ INITIALIZE_MGMT_STATUS(ioc->taskmgmt_cmds.status)
+ time_count = jiffies;
-+ if ((ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) &&
-+ (ioc->facts.MsgVersion >= MPI_VERSION_01_05))
-+ mpt_put_msg_frame_hi_pri(ioc->TaskCtx, ioc, mf);
-+ else {
-+ retval = mpt_send_handshake_request(ioc->TaskCtx, ioc,
+ if ((ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) &&
+ (ioc->facts.MsgVersion >= MPI_VERSION_01_05))
+ mpt_put_msg_frame_hi_pri(ioc->TaskCtx, ioc, mf);
+ else {
+ retval = mpt_send_handshake_request(ioc->TaskCtx, ioc,
+- sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, CAN_SLEEP);
+ sizeof(SCSITaskMgmt_t), (u32 *)pScsiTm, CAN_SLEEP);
-+ if (retval) {
+ if (retval) {
+- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "send_handshake FAILED!"
+- " (hd %p, ioc %p, mf %p, rc=%d) \n", ioc->name, hd,
+- ioc, mf, retval));
+- goto fail_out;
+ dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+ "TaskMgmt handshake FAILED!"
+ " (mf=%p, rc=%d) \n", ioc->name, mf, retval));
+ mpt_free_msg_frame(ioc, mf);
+ mpt_clear_taskmgmt_in_progress_flag(ioc);
+ goto out;
-+ }
-+ }
-+
+ }
+ }
+
+- if(mptscsih_tm_wait_for_completion(hd, timeout) == FAILED) {
+- dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "task management request TIMED OUT!"
+- " (hd %p, ioc %p, mf %p) \n", ioc->name, hd,
+- ioc, mf));
+- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Calling HardReset! \n",
+- ioc->name));
+- retval = mpt_HardResetHandler(ioc, CAN_SLEEP);
+- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "rc=%d \n",
+- ioc->name, retval));
+- goto fail_out;
+ timeleft = wait_for_completion_timeout(&ioc->taskmgmt_cmds.done,
+ timeout*HZ);
+ if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
+ goto out;
+ issue_hard_reset = 1;
+ goto out;
-+ }
-+
+ }
+
+- /*
+- * Handle success case, see if theres a non-zero ioc_status.
+- */
+- if (hd->tm_iocstatus == MPI_IOCSTATUS_SUCCESS ||
+- hd->tm_iocstatus == MPI_IOCSTATUS_SCSI_TASK_TERMINATED ||
+- hd->tm_iocstatus == MPI_IOCSTATUS_SCSI_IOC_TERMINATED)
+- retval = 0;
+- else
+- retval = FAILED;
+ retval = mptscsih_taskmgmt_reply(ioc, type,
+ (SCSITaskMgmtReply_t *) ioc->taskmgmt_cmds.reply);
-+
+
+ dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+ "TaskMgmt completed (%d seconds)\n",
+ ioc->name, jiffies_to_msecs(jiffies - time_count)/1000));
+
+ retval = (retval == 0) ? 0 : FAILED;
+ mutex_unlock(&ioc->taskmgmt_cmds.mutex);
-+ return retval;
-+}
-+
-+static int
-+mptscsih_get_tm_timeout(MPT_ADAPTER *ioc)
-+{
-+ switch (ioc->bus_type) {
+ return retval;
+-
+- fail_out:
+-
+- /*
+- * Free task management mf, and corresponding tm flags
+- */
+- mpt_free_msg_frame(ioc, mf);
+- hd->tmPending = 0;
+- hd->tmState = TM_STATE_NONE;
+- return FAILED;
+ }
+
+ static int
+@@ -1760,10 +1964,10 @@
case FC:
return 40;
case SAS:
}
}
-@@ -1786,7 +1990,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
+@@ -1786,7 +1990,7 @@
int retval;
VirtDevice *vdevice;
ulong sn = SCpnt->serial_number;
/* If we can't locate our host adapter structure, return FAILED status.
*/
-@@ -1810,7 +2014,21 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
+@@ -1810,7 +2014,21 @@
ioc->name, SCpnt));
SCpnt->result = DID_NO_CONNECT << 16;
SCpnt->scsi_done(SCpnt);
goto out;
}
-@@ -1825,27 +2043,23 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
+@@ -1825,27 +2043,23 @@
goto out;
}
/* Most important! Set TaskMsgContext to SCpnt's MsgContext!
* (the IO to be ABORT'd)
-@@ -1856,25 +2070,31 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
+@@ -1856,25 +2070,31 @@
*/
mf = MPT_INDEX_2_MFPTR(ioc, scpnt_idx);
ctx2abort = mf->u.frame.hwhdr.msgctxu.MsgContext;
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -1907,14 +2127,9 @@ mptscsih_dev_reset(struct scsi_cmnd * SC
+@@ -1907,14 +2127,9 @@
ioc->name, SCpnt);
scsi_print_command(SCpnt);
goto out;
}
-@@ -1925,12 +2140,12 @@ mptscsih_dev_reset(struct scsi_cmnd * SC
+@@ -1925,12 +2140,12 @@
goto out;
}
ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt);
if (retval == 0)
-@@ -1955,12 +2170,12 @@ mptscsih_bus_reset(struct scsi_cmnd * SC
+@@ -1955,12 +2170,12 @@
MPT_SCSI_HOST *hd;
int retval;
VirtDevice *vdevice;
"Can't locate host! (sc=%p)\n", SCpnt);
return FAILED;
}
-@@ -1970,11 +2185,13 @@ mptscsih_bus_reset(struct scsi_cmnd * SC
+@@ -1970,11 +2185,13 @@
ioc->name, SCpnt);
scsi_print_command(SCpnt);
vdevice->vtarget->channel, 0, 0, 0, mptscsih_get_tm_timeout(ioc));
printk(MYIOC_s_INFO_FMT "bus reset: %s (sc=%p)\n",
-@@ -1999,8 +2216,9 @@ int
+@@ -1999,8 +2216,9 @@
mptscsih_host_reset(struct scsi_cmnd *SCpnt)
{
MPT_SCSI_HOST * hd;
/* If we can't locate the host to reset, then we failed. */
if ((hd = shost_priv(SCpnt->device->host)) == NULL){
-@@ -2011,237 +2229,29 @@ mptscsih_host_reset(struct scsi_cmnd *SC
+@@ -2011,237 +2229,29 @@
ioc = hd->ioc;
printk(MYIOC_s_INFO_FMT "attempting host reset! (sc=%p)\n",
printk(MYIOC_s_INFO_FMT "host reset: %s (sc=%p)\n",
ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt);
-
+-
- return retval;
-}
-
- spin_unlock_irqrestore(&ioc->FreeQlock, flags);
- msleep(250);
- } while (--loop_count);
--
+
return status;
}
- * load/init time via the mpt_register() API call.
- *
- * Returns 1 indicating alloc'd request frame ptr should be freed.
-- **/
++ * This is anyones guess quite frankly.
+ **/
-int
-mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
-{
-
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/*
- * This is anyones guess quite frankly.
+- * This is anyones guess quite frankly.
- */
-+ **/
int
mptscsih_bios_param(struct scsi_device * sdev, struct block_device *bdev,
sector_t capacity, int geom[])
-@@ -2278,26 +2288,68 @@ mptscsih_bios_param(struct scsi_device *
+@@ -2278,24 +2288,66 @@
return 0;
}
rc = 1;
goto out;
}
- }
-
++ }
++
+ if (ioc->bus_type != SAS)
+ goto out;
+
+ }
+ }
+ kfree(phys_disk);
-+ }
-+
+ }
+
/*
- * Check inactive list for matching phys disks
- */
-@@ -2311,7 +2363,7 @@ mptscsih_is_phys_disk(MPT_ADAPTER *ioc,
+@@ -2311,7 +2363,7 @@
(component_info->d.PhysDiskBus == channel))
rc = 1;
}
out:
return rc;
-@@ -2322,19 +2374,60 @@ u8
+@@ -2322,17 +2374,58 @@
mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id)
{
struct inactive_raid_component_info *component_info;
rc = ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskNum;
goto out;
}
- }
-
++ }
++
+ if (ioc->bus_type != SAS)
+ goto out;
+
+ }
+ }
+ kfree(phys_disk);
-+ }
-+
+ }
+
/*
- * Check inactive list for matching phys disks
- */
-@@ -2355,10 +2448,10 @@ mptscsih_raid_id_to_num(MPT_ADAPTER *ioc
+@@ -2355,10 +2448,10 @@
}
EXPORT_SYMBOL(mptscsih_raid_id_to_num);
void
mptscsih_slave_destroy(struct scsi_device *sdev)
{
-@@ -2370,23 +2463,25 @@ mptscsih_slave_destroy(struct scsi_devic
+@@ -2370,23 +2463,25 @@
starget = scsi_target(sdev);
vtarget = starget->hostdata;
int
mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth)
{
-@@ -2401,15 +2496,16 @@ mptscsih_change_queue_depth(struct scsi_
+@@ -2401,15 +2496,16 @@
vtarget = starget->hostdata;
if (ioc->bus_type == SPI) {
if (qdepth > max_depth)
qdepth = max_depth;
-@@ -2419,15 +2515,24 @@ mptscsih_change_queue_depth(struct scsi_
+@@ -2419,15 +2515,24 @@
tagged = MSG_SIMPLE_TAG;
scsi_adjust_queue_depth(sdev, tagged, qdepth);
int
mptscsih_slave_configure(struct scsi_device *sdev)
{
-@@ -2436,52 +2541,37 @@ mptscsih_slave_configure(struct scsi_dev
+@@ -2436,52 +2541,37 @@
VirtDevice *vdevice;
struct scsi_target *starget;
MPT_SCSI_HOST *hd = shost_priv(sh);
static void
mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply)
{
-@@ -2502,7 +2592,11 @@ mptscsih_copy_sense_data(struct scsi_cmn
+@@ -2502,7 +2592,11 @@
/* Copy the sense received into the scsi command block. */
req_index = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
sense_data = ((u8 *)ioc->sense_buf_pool + (req_index * MPT_SENSE_BUFFER_ALLOC));
/* Log SMART data (asc = 0x5D, non-IM case only) if required.
*/
-@@ -2521,10 +2615,10 @@ mptscsih_copy_sense_data(struct scsi_cmn
+@@ -2521,10 +2615,10 @@
ioc->events[idx].data[1] = (sense_data[13] << 8) | sense_data[12];
ioc->eventContext++;
vdevice->vtarget->tflags |=
MPT_TARGET_FLAGS_LED_ON;
}
-@@ -2532,20 +2626,22 @@ mptscsih_copy_sense_data(struct scsi_cmn
+@@ -2532,20 +2626,22 @@
}
} else {
dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Hmmm... SenseData len=0! (?)\n",
/**
* mptscsih_get_scsi_lookup
-- * @ioc: Pointer to MPT_ADAPTER structure
-- * @i: index into the array
- *
- * retrieves scmd entry from ScsiLookup[] array list
- *
-+ * @ioc: Pointer to MPT_ADAPTER structure
-+ * @i: index into the array
+ *
- * Returns the scsi_cmd pointer
++ * retrieves scmd entry from ScsiLookup[] array list
+ *
+ * @ioc: Pointer to MPT_ADAPTER structure
+ * @i: index into the array
+ *
+- * retrieves scmd entry from ScsiLookup[] array list
++ * Returns the scsi_cmd pointer
+ *
+- * Returns the scsi_cmd pointer
**/
-static struct scsi_cmnd *
+struct scsi_cmnd *
mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i)
{
unsigned long flags;
-@@ -2560,12 +2656,14 @@ mptscsih_get_scsi_lookup(MPT_ADAPTER *io
+@@ -2560,12 +2656,14 @@
/**
* mptscsih_getclear_scsi_lookup
-- * @ioc: Pointer to MPT_ADAPTER structure
-- * @i: index into the array
- *
- * retrieves and clears scmd entry from ScsiLookup[] array list
- *
-+ * @ioc: Pointer to MPT_ADAPTER structure
-+ * @i: index into the array
+ *
- * Returns the scsi_cmd pointer
++ * retrieves and clears scmd entry from ScsiLookup[] array list
+ *
+ * @ioc: Pointer to MPT_ADAPTER structure
+ * @i: index into the array
+ *
+- * retrieves and clears scmd entry from ScsiLookup[] array list
++ * Returns the scsi_cmd pointer
+ *
+- * Returns the scsi_cmd pointer
**/
static struct scsi_cmnd *
mptscsih_getclear_scsi_lookup(MPT_ADAPTER *ioc, int i)
-@@ -2602,10 +2700,14 @@ mptscsih_set_scsi_lookup(MPT_ADAPTER *io
+@@ -2602,10 +2700,14 @@
}
/**
static int
SCPNT_TO_LOOKUP_IDX(MPT_ADAPTER *ioc, struct scsi_cmnd *sc)
{
-@@ -2627,380 +2729,233 @@ SCPNT_TO_LOOKUP_IDX(MPT_ADAPTER *ioc, st
+@@ -2627,378 +2729,231 @@
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
int
{
- MPT_SCSI_HOST *hd;
- unsigned long flags;
--
++ u8 event = le32_to_cpu(pEvReply->Event) & 0xFF;
+
- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
- ": IOC %s_reset routed to SCSI host driver!\n",
- ioc->name, reset_phase==MPT_IOC_SETUP_RESET ? "setup" : (
- reset_phase==MPT_IOC_PRE_RESET ? "pre" : "post")));
--
++ devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++ "MPT event (=%02Xh) routed to SCSI host driver!\n",
++ ioc->name, event));
+
- /* If a FW reload request arrives after base installed but
- * before all scsi hosts have been attached, then an alt_ioc
- * may have a NULL sh pointer.
- wake_up(&hd->scandv_waitq);
- hd->cmdPtr = NULL;
- }
-+ u8 event = le32_to_cpu(pEvReply->Event) & 0xFF;
-
+-
- dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Post-Reset complete.\n", ioc->name));
-+ devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+ "MPT event (=%02Xh) routed to SCSI host driver!\n",
-+ ioc->name, event));
-
+-
- }
+ if ((event == MPI_EVENT_IOC_BUS_RESET ||
+ event == MPI_EVENT_EXT_BUS_RESET) &&
+ pReq->MsgFlags = 0;
+ pReq->Reserved2 = 0;
+ pReq->ActionDataWord = 0; /* Reserved for this action */
-+
-+ ioc->add_sge((char *)&pReq->ActionDataSGE,
-+ MPT_SGE_FLAGS_SSIMPLE_READ | 0, (dma_addr_t) -1);
-+
-+ ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+ "RAID Volume action=%x channel=%d id=%d\n",
-+ ioc->name, pReq->Action, channel, id));
- switch (event) {
- case MPI_EVENT_UNIT_ATTENTION: /* 03 */
- break;
- case MPI_EVENT_LOGOUT: /* 09 */
- /* FIXME! */
-- break;
++ ioc->add_sge((char *)&pReq->ActionDataSGE,
++ MPT_SGE_FLAGS_SSIMPLE_READ | 0, (dma_addr_t) -1);
++
++ ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++ "RAID Volume action=%x channel=%d id=%d\n",
++ ioc->name, pReq->Action, channel, id));
++
+ INITIALIZE_MGMT_STATUS(ioc->internal_cmds.status)
+ mpt_put_msg_frame(ioc->InternalCtx, ioc, mf);
+ timeleft = wait_for_completion_timeout(&ioc->internal_cmds.done, 10*HZ);
+ }
+ goto out;
+ }
-
-- case MPI_EVENT_RESCAN: /* 06 */
-- break;
++
+ ret = ioc->internal_cmds.completion_code;
-
-- /*
-- * CHECKME! Don't think we need to do
-- * anything for these, but...
-- */
-- case MPI_EVENT_LINK_STATUS_CHANGE: /* 07 */
-- case MPI_EVENT_LOOP_STATE_CHANGE: /* 08 */
-- /*
-- * CHECKME! Falling thru...
-- */
-- break;
++
+ out:
+ CLEAR_MGMT_STATUS(ioc->internal_cmds.status)
+ mutex_unlock(&ioc->internal_cmds.mutex);
+ return ret;
+}
-
-- case MPI_EVENT_INTEGRATED_RAID: /* 0B */
++
+/**
+ * mptscsih_get_completion_code -
+ * @ioc: Pointer to MPT_ADAPTER structure
+
+ case MPI_IOCSTATUS_SCSI_DEVICE_NOT_THERE: /* 0x0043 */
+ completion_code = MPT_SCANDV_SELECTION_TIMEOUT;
-+ break;
-+
+ break;
+
+- case MPI_EVENT_RESCAN: /* 06 */
+ case MPI_IOCSTATUS_SCSI_IO_DATA_ERROR: /* 0x0046 */
+ case MPI_IOCSTATUS_SCSI_TASK_TERMINATED: /* 0x0048 */
+ case MPI_IOCSTATUS_SCSI_IOC_TERMINATED: /* 0x004B */
+ case MPI_IOCSTATUS_SCSI_EXT_TERMINATED: /* 0x004C */
+ completion_code = MPT_SCANDV_DID_RESET;
-+ break;
-+
+ break;
+
+- /*
+- * CHECKME! Don't think we need to do
+- * anything for these, but...
+- */
+- case MPI_EVENT_LINK_STATUS_CHANGE: /* 07 */
+- case MPI_EVENT_LOOP_STATE_CHANGE: /* 08 */
+- /*
+- * CHECKME! Falling thru...
+- */
+ case MPI_IOCSTATUS_BUSY:
+ case MPI_IOCSTATUS_INSUFFICIENT_RESOURCES:
+ completion_code = MPT_SCANDV_BUSY;
-+ break;
-+
+ break;
+
+- case MPI_EVENT_INTEGRATED_RAID: /* 0B */
+ case MPI_IOCSTATUS_SCSI_DATA_UNDERRUN: /* 0x0045 */
+ case MPI_IOCSTATUS_SCSI_RECOVERED_ERROR: /* 0x0040 */
+ case MPI_IOCSTATUS_SUCCESS: /* 0x0000 */
- }
- return 1; /* currently means nothing really */
--}
+ } /* switch(status) */
++
++ devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++ " completionCode set to %08xh\n", ioc->name, completion_code));
++ return completion_code;
+ }
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/*
- * Bus Scan and Domain Validation functionality ...
- */
-+ devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+ " completionCode set to %08xh\n", ioc->name, completion_code));
-+ return completion_code;
-+}
++/**
++ * mptscsih_scandv_complete -
++ * @ioc: Pointer to MPT_ADAPTER structure
++ * @req:
++ * @reply:
++ *
++ **/
++int
++mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req,
++ MPT_FRAME_HDR *reply)
++{
++ SCSIIORequest_t *pReq;
++ SCSIIOReply_t *pReply;
++ u8 cmd;
++ u16 req_idx;
++ u8 *sense_data;
++ int sz;
-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/*
- * mptscsih_scandv_complete - Scan and DV callback routine registered
- * to Fustion MPT (base) driver.
- *
-+/**
-+ * mptscsih_scandv_complete -
- * @ioc: Pointer to MPT_ADAPTER structure
+- * @ioc: Pointer to MPT_ADAPTER structure
- * @mf: Pointer to original MPT request frame
- * @mr: Pointer to MPT reply frame (NULL if TurboReply)
- *
- * load/init time via the mpt_register() API call.
- *
- * Returns 1 indicating alloc'd request frame ptr should be freed.
-+ * @req:
-+ * @reply:
- *
+- *
- * Remark: Sets a completion code and (possibly) saves sense data
- * in the IOC member localReply structure.
- * Used ONLY for DV and other internal commands.
- */
-+ **/
- int
+-int
-mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
-+mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req,
-+ MPT_FRAME_HDR *reply)
- {
+-{
- MPT_SCSI_HOST *hd;
- SCSIIORequest_t *pReq;
+- SCSIIORequest_t *pReq;
- int completionCode;
-+ SCSIIOReply_t *pReply;
-+ u8 cmd;
- u16 req_idx;
-+ u8 *sense_data;
-+ int sz;
+- u16 req_idx;
++ ioc->internal_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD;
++ ioc->internal_cmds.completion_code = MPT_SCANDV_GOOD;
++ if (!reply)
++ goto out;
- hd = shost_priv(ioc->sh);
-
- "ScanDvComplete, %s req frame ptr! (=%p)\n",
- ioc->name, mf?"BAD":"NULL", (void *) mf);
- goto wakeup;
-- }
--
-- del_timer(&hd->timer);
-- req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
-- mptscsih_set_scsi_lookup(ioc, req_idx, NULL);
-- pReq = (SCSIIORequest_t *) mf;
-+ ioc->internal_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD;
-+ ioc->internal_cmds.completion_code = MPT_SCANDV_GOOD;
-+ if (!reply)
-+ goto out;
-
-- if (mf != hd->cmdPtr) {
-- printk(MYIOC_s_WARN_FMT "ScanDvComplete (mf=%p, cmdPtr=%p, idx=%d)\n",
-- ioc->name, (void *)mf, (void *) hd->cmdPtr, req_idx);
+ pReply = (SCSIIOReply_t *) reply;
+ pReq = (SCSIIORequest_t *) req;
+ ioc->internal_cmds.completion_code =
+ MPT_SENSE_BUFFER_ALLOC);
+ memcpy(ioc->internal_cmds.sense, sense_data, sz);
}
+-
+- del_timer(&hd->timer);
+- req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
+- mptscsih_set_scsi_lookup(ioc, req_idx, NULL);
+- pReq = (SCSIIORequest_t *) mf;
+-
+- if (mf != hd->cmdPtr) {
+- printk(MYIOC_s_WARN_FMT "ScanDvComplete (mf=%p, cmdPtr=%p, idx=%d)\n",
+- ioc->name, (void *)mf, (void *) hd->cmdPtr, req_idx);
+- }
- hd->cmdPtr = NULL;
-
- ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScanDvComplete (mf=%p,mr=%p,idx=%d)\n",
+ complete(&ioc->internal_cmds.done);
return 1;
}
-
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+-
+-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-/* mptscsih_timer_expired - Call back for timer process.
- * Used only for dv functionality.
- * @data: Pointer to MPT_SCSI_HOST recast as an unsigned long
- return;
-}
-
--
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+
+ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/**
- * mptscsih_do_cmd - Do internal command.
- * @hd: MPT_SCSI_HOST pointer
-@@ -3019,28 +2974,33 @@ mptscsih_timer_expired(unsigned long dat
+@@ -3019,28 +2974,33 @@
* 0 if good
*
* > 0 if command complete but some type of completion error.
/* Set command specific information
*/
-@@ -3050,13 +3010,13 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3050,13 +3010,13 @@
dir = MPI_SCSIIO_CONTROL_READ;
CDB[0] = cmd;
CDB[4] = io->size;
break;
case START_STOP:
-@@ -3064,7 +3024,7 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3064,7 +3024,7 @@
dir = MPI_SCSIIO_CONTROL_READ;
CDB[0] = cmd;
CDB[4] = 1; /*Spin up the disk */
break;
case REQUEST_SENSE:
-@@ -3072,7 +3032,7 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3072,7 +3032,7 @@
CDB[0] = cmd;
CDB[4] = io->size;
dir = MPI_SCSIIO_CONTROL_READ;
break;
case READ_BUFFER:
-@@ -3091,7 +3051,7 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3091,7 +3051,7 @@
CDB[6] = (io->size >> 16) & 0xFF;
CDB[7] = (io->size >> 8) & 0xFF;
CDB[8] = io->size & 0xFF;
break;
case WRITE_BUFFER:
-@@ -3106,21 +3066,21 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3106,21 +3066,21 @@
CDB[6] = (io->size >> 16) & 0xFF;
CDB[7] = (io->size >> 8) & 0xFF;
CDB[8] = io->size & 0xFF;
break;
case SYNCHRONIZE_CACHE:
-@@ -3128,20 +3088,42 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3128,20 +3088,42 @@
dir = MPI_SCSIIO_CONTROL_READ;
CDB[0] = cmd;
// CDB[1] = 0x02; /* set immediate bit */
}
pScsiReq = (SCSIIORequest_t *) mf;
-@@ -3164,14 +3146,10 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3164,14 +3146,10 @@
pScsiReq->CDBLength = cmdLen;
pScsiReq->SenseBufferLength = MPT_SENSE_BUFFER_SIZE;
if (io->flags & MPT_ICFLAG_TAGGED_CMD)
pScsiReq->Control = cpu_to_le32(dir | MPI_SCSIIO_CONTROL_SIMPLEQ);
else
-@@ -3179,74 +3157,61 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3179,74 +3157,61 @@
if (cmd == REQUEST_SENSE) {
pScsiReq->Control = cpu_to_le32(dir | MPI_SCSIIO_CONTROL_UNTAGGED);
- ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Sending Command 0x%x for (%d:%d:%d)\n",
- ioc->name, cmd, io->channel, io->id, io->lun));
--
++ devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++ "%s: Sending Command 0x%02x for fw_channel=%d fw_id=%d lun=%d\n",
++ ioc->name, __func__, cmd, io->channel, io->id, io->lun));
+
- if (dir == MPI_SCSIIO_CONTROL_READ) {
- mpt_add_sge((char *) &pScsiReq->SGL,
- MPT_SGE_FLAGS_SSIMPLE_READ | io->size,
- mpt_add_sge((char *) &pScsiReq->SGL,
- MPT_SGE_FLAGS_SSIMPLE_WRITE | io->size,
- io->data_dma);
-- }
--
++ if (dir == MPI_SCSIIO_CONTROL_READ)
++ ioc->add_sge((char *) &pScsiReq->SGL,
++ MPT_SGE_FLAGS_SSIMPLE_READ | io->size, io->data_dma);
++ else
++ ioc->add_sge((char *) &pScsiReq->SGL,
++ MPT_SGE_FLAGS_SSIMPLE_WRITE | io->size, io->data_dma);
++
++ INITIALIZE_MGMT_STATUS(ioc->internal_cmds.status)
++ mpt_put_msg_frame(ioc->InternalCtx, ioc, mf);
++ timeleft = wait_for_completion_timeout(&ioc->internal_cmds.done,
++ timeout*HZ);
++ if (!(ioc->internal_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
++ ret = MPT_SCANDV_DID_RESET;
++ dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++ "%s: TIMED OUT for cmd=0x%02x\n", ioc->name, __func__,
++ cmd));
++ if (ioc->internal_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) {
++ mpt_free_msg_frame(ioc, mf);
++ goto out;
++ }
++ if (!timeleft) {
++ if (!mptscsih_scandv_bus_reset(ioc))
++ goto out;
++ printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
++ ioc->name, __func__);
++ if (mpt_SoftResetHandler(ioc, CAN_SLEEP) != 0)
++ mpt_HardResetHandler(ioc, CAN_SLEEP);
++ mpt_free_msg_frame(ioc, mf);
++ }
++ goto out;
+ }
+
- /* The ISR will free the request frame, but we need
- * the information to initialize the target. Duplicate.
- */
- memcpy(&ReqCopy, pScsiReq, sizeof(SCSIIORequest_t));
--
++ ret = ioc->internal_cmds.completion_code;
++ devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: success, rc=0x%02x\n",
++ ioc->name, __func__, ret));
+
- /* Issue this command after:
- * finish init
- * add timer
- * FW reload occurs
- */
- hd->cmdPtr = mf;
-+ devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+ "%s: Sending Command 0x%02x for fw_channel=%d fw_id=%d lun=%d\n",
-+ ioc->name, __func__, cmd, io->channel, io->id, io->lun));
-+
-+ if (dir == MPI_SCSIIO_CONTROL_READ)
-+ ioc->add_sge((char *) &pScsiReq->SGL,
-+ MPT_SGE_FLAGS_SSIMPLE_READ | io->size, io->data_dma);
-+ else
-+ ioc->add_sge((char *) &pScsiReq->SGL,
-+ MPT_SGE_FLAGS_SSIMPLE_WRITE | io->size, io->data_dma);
-
+-
- add_timer(&hd->timer);
-+ INITIALIZE_MGMT_STATUS(ioc->internal_cmds.status)
- mpt_put_msg_frame(ioc->InternalCtx, ioc, mf);
+- mpt_put_msg_frame(ioc->InternalCtx, ioc, mf);
- wait_event(hd->scandv_waitq, hd->scandv_wait_done);
-
- if (hd->pLocal) {
- /* This should never happen. */
- ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT "_do_cmd: Null pLocal!!!\n",
- ioc->name));
-+ timeleft = wait_for_completion_timeout(&ioc->internal_cmds.done,
-+ timeout*HZ);
-+ if (!(ioc->internal_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
-+ ret = MPT_SCANDV_DID_RESET;
-+ dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+ "%s: TIMED OUT for cmd=0x%02x\n", ioc->name, __func__,
-+ cmd));
-+ if (ioc->internal_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) {
-+ mpt_free_msg_frame(ioc, mf);
-+ goto out;
-+ }
-+ if (!timeleft) {
-+ if (!mptscsih_scandv_bus_reset(ioc))
-+ goto out;
-+ printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
-+ ioc->name, __func__);
-+ if (mpt_SoftResetHandler(ioc, CAN_SLEEP) != 0)
-+ mpt_HardResetHandler(ioc, CAN_SLEEP);
-+ mpt_free_msg_frame(ioc, mf);
-+ }
-+ goto out;
- }
-
+- }
+-
- return rc;
-+ ret = ioc->internal_cmds.completion_code;
-+ devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: success, rc=0x%02x\n",
-+ ioc->name, __func__, ret));
-+
+ out:
+ CLEAR_MGMT_STATUS(ioc->internal_cmds.status)
+ mutex_unlock(&ioc->internal_cmds.mutex);
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -3260,9 +3225,11 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3260,9 +3225,11 @@
*
*/
static void
/* Ignore hidden raid components, this is handled when the command
* is sent to the volume
-@@ -3274,23 +3241,24 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST
+@@ -3274,23 +3241,24 @@
!vdevice->configured_lun)
return;
static ssize_t
mptscsih_version_fw_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -3464,13 +3432,47 @@ mptscsih_debug_level_store(struct device
+@@ -3464,12 +3432,46 @@
return -EINVAL;
ioc->debug_level = val;
}
static DEVICE_ATTR(debug_level, S_IRUGO | S_IWUSR,
mptscsih_debug_level_show, mptscsih_debug_level_store);
-
++
+static ssize_t
+mptscsih_disable_hotplug_remove_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+static DEVICE_ATTR(disable_hotplug_remove, S_IRUGO | S_IWUSR,
+ mptscsih_disable_hotplug_remove_show,
+ mptscsih_disable_hotplug_remove_store);
-+
+
struct device_attribute *mptscsih_host_attrs[] = {
&dev_attr_version_fw,
- &dev_attr_version_bios,
-@@ -3484,6 +3486,7 @@ struct device_attribute *mptscsih_host_a
+@@ -3484,6 +3486,7 @@
&dev_attr_io_delay,
&dev_attr_device_delay,
&dev_attr_debug_level,
NULL,
};
EXPORT_SYMBOL(mptscsih_host_attrs);
-@@ -3510,7 +3513,9 @@ EXPORT_SYMBOL(mptscsih_scandv_complete);
+@@ -3510,7 +3513,9 @@
EXPORT_SYMBOL(mptscsih_event_process);
EXPORT_SYMBOL(mptscsih_ioc_reset);
EXPORT_SYMBOL(mptscsih_change_queue_depth);
+EXPORT_SYMBOL(mptscsih_get_scsi_lookup);
+EXPORT_SYMBOL(mptscsih_taskmgmt_response_code);
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.h linux-2.6.27.19-5.1/drivers/message/fusion/mptscsih.h
---- linux-2.6.27/drivers/message/fusion/mptscsih.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptscsih.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptscsih.h
+--- a/drivers/message/fusion/mptscsih.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptscsih.h Wed May 06 16:56:21 2009 +0100
@@ -60,6 +60,7 @@
#define MPT_SCANDV_SELECTION_TIMEOUT (0x00000008)
#define MPT_SCANDV_ISSUE_SENSE (0x00000010)
#define MPT_SCANDV_MAX_RETRIES (10)
-@@ -71,6 +72,7 @@
+@@ -70,6 +71,7 @@
+ #define MPT_ICFLAG_TAGGED_CMD 0x10 /* Do tagged IO */
#define MPT_ICFLAG_DID_RESET 0x20 /* Bus Reset occurred with this command */
#define MPT_ICFLAG_RESERVED 0x40 /* Reserved has been issued */
-
+
+
#define MPT_SCSI_CMD_PER_DEV_HIGH 64
#define MPT_SCSI_CMD_PER_DEV_LOW 32
-
@@ -84,9 +86,11 @@
#define MPTSCSIH_DOMAIN_VALIDATION 1
#define MPTSCSIH_MAX_WIDTH 1
#endif
typedef struct _internal_cmd {
-@@ -112,7 +116,7 @@ extern int mptscsih_resume(struct pci_de
+@@ -112,7 +116,7 @@
extern int mptscsih_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, int func);
extern const char * mptscsih_info(struct Scsi_Host *SChost);
extern int mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *));
extern int mptscsih_slave_configure(struct scsi_device *device);
extern int mptscsih_abort(struct scsi_cmnd * SCpnt);
extern int mptscsih_dev_reset(struct scsi_cmnd * SCpnt);
-@@ -125,8 +129,13 @@ extern int mptscsih_scandv_complete(MPT_
+@@ -125,8 +129,13 @@
extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply);
extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset);
extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth);
+ u8 id);
+extern struct scsi_cmnd * mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i);
+extern void mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code);
-diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/drivers/message/fusion/mptspi.c
---- linux-2.6.27/drivers/message/fusion/mptspi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptspi.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptspi.c
+--- a/drivers/message/fusion/mptspi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptspi.c Wed May 06 16:56:21 2009 +0100
@@ -53,8 +53,10 @@
#include <linux/delay.h> /* for mdelay */
#include <linux/interrupt.h> /* needed for in_interrupt() proto */
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
-@@ -83,6 +85,11 @@ static int mpt_saf_te = MPTSCSIH_SAF_TE;
+@@ -83,6 +85,11 @@
module_param(mpt_saf_te, int, 0);
MODULE_PARM_DESC(mpt_saf_te, " Force enabling SEP Processor: enable=1 (default=MPTSCSIH_SAF_TE=0)");
static void mptspi_write_offset(struct scsi_target *, int);
static void mptspi_write_width(struct scsi_target *, int);
static int mptspi_write_spi_device_pg1(struct scsi_target *,
-@@ -95,12 +102,12 @@ static u8 mptspiTaskCtx = MPT_MAX_PROTOC
+@@ -95,12 +102,12 @@
static u8 mptspiInternalCtx = MPT_MAX_PROTOCOL_DRIVERS; /* Used only for internal commands */
/**
* data, adapter capabilities, and NVRAM settings.
**/
static void
-@@ -131,7 +138,7 @@ mptspi_setTargetNegoParms(MPT_SCSI_HOST
+@@ -131,7 +138,7 @@
if (scsi_device_sync(sdev)) {
factor = pspi_data->minSyncFactor;
if (!scsi_device_dt(sdev))
else {
if (!scsi_device_ius(sdev) &&
!scsi_device_qas(sdev))
-@@ -209,6 +216,10 @@ mptspi_setTargetNegoParms(MPT_SCSI_HOST
+@@ -209,6 +216,10 @@
target->maxOffset = offset;
target->maxWidth = width;
target->tflags |= MPT_TARGET_FLAGS_VALID_NEGO;
/* Disable unused features.
-@@ -262,7 +273,7 @@ mptspi_writeIOCPage4(MPT_SCSI_HOST *hd,
+@@ -262,7 +273,7 @@
*/
if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) {
dfailprintk(ioc, printk(MYIOC_s_WARN_FMT
return -EAGAIN;
}
-@@ -300,7 +311,7 @@ mptspi_writeIOCPage4(MPT_SCSI_HOST *hd,
+@@ -300,7 +311,7 @@
flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE |
(IOCPage4Ptr->Header.PageLength + ii) * 4;
ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
"writeIOCPage4: MaxSEP=%d ActiveSEP=%d id=%d bus=%d\n",
-@@ -371,7 +382,7 @@ mptspi_initTarget(MPT_SCSI_HOST *hd, Vir
+@@ -371,7 +382,7 @@
* non-zero = true
* zero = false
*
static int
mptspi_is_raid(struct _MPT_SCSI_HOST *hd, u32 id)
{
-@@ -399,12 +410,11 @@ static int mptspi_target_alloc(struct sc
+@@ -399,12 +410,11 @@
struct Scsi_Host *shost = dev_to_shost(&starget->dev);
struct _MPT_SCSI_HOST *hd = shost_priv(shost);
VirtTarget *vtarget;
vtarget = kzalloc(sizeof(VirtTarget), GFP_KERNEL);
if (!vtarget)
return -ENOMEM;
-@@ -471,9 +481,12 @@ mptspi_target_destroy(struct scsi_target
+@@ -471,9 +481,12 @@
static void
mptspi_print_write_nego(struct _MPT_SCSI_HOST *hd, struct scsi_target *starget, u32 ii)
{
ii & MPI_SCSIDEVPAGE0_NP_WIDE ? "Wide ": "",
((ii >> 8) & 0xFF), ((ii >> 16) & 0xFF),
ii & MPI_SCSIDEVPAGE0_NP_IU ? "IU ": "",
-@@ -483,7 +496,7 @@ mptspi_print_write_nego(struct _MPT_SCSI
+@@ -483,7 +496,7 @@
ii & MPI_SCSIDEVPAGE0_NP_WR_FLOW ? "WRFLOW ": "",
ii & MPI_SCSIDEVPAGE0_NP_RD_STRM ? "RDSTRM ": "",
ii & MPI_SCSIDEVPAGE0_NP_RTI ? "RTI ": "",
}
/**
-@@ -496,9 +509,12 @@ mptspi_print_write_nego(struct _MPT_SCSI
+@@ -496,9 +509,12 @@
static void
mptspi_print_read_nego(struct _MPT_SCSI_HOST *hd, struct scsi_target *starget, u32 ii)
{
ii & MPI_SCSIDEVPAGE0_NP_WIDE ? "Wide ": "",
((ii >> 8) & 0xFF), ((ii >> 16) & 0xFF),
ii & MPI_SCSIDEVPAGE0_NP_IU ? "IU ": "",
-@@ -508,7 +524,7 @@ mptspi_print_read_nego(struct _MPT_SCSI_
+@@ -508,7 +524,7 @@
ii & MPI_SCSIDEVPAGE0_NP_WR_FLOW ? "WRFLOW ": "",
ii & MPI_SCSIDEVPAGE0_NP_RD_STRM ? "RDSTRM ": "",
ii & MPI_SCSIDEVPAGE0_NP_RTI ? "RTI ": "",
}
static int mptspi_read_spi_device_pg0(struct scsi_target *starget,
-@@ -557,9 +573,11 @@ static int mptspi_read_spi_device_pg0(st
+@@ -557,9 +573,11 @@
cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
cfg.dir = 0;
cfg.pageAddr = starget->id;
goto out_free;
}
err = 0;
-@@ -614,64 +632,11 @@ static void mptspi_read_parameters(struc
+@@ -614,64 +632,11 @@
spi_width(starget) = (nego & MPI_SCSIDEVPAGE0_NP_WIDE) ? 1 : 0;
}
MPT_ADAPTER *ioc = hd->ioc;
/* no DV on RAID devices */
-@@ -679,11 +644,20 @@ static void mptspi_dv_device(struct _MPT
+@@ -679,11 +644,20 @@
mptspi_is_raid(hd, sdev->id))
return;
return;
}
-@@ -693,8 +667,8 @@ static void mptspi_dv_device(struct _MPT
+@@ -693,8 +667,8 @@
if (sdev->channel == 1 &&
mptscsih_quiesce_raid(hd, 0, vtarget->channel, vtarget->id) < 0)
mptspi_read_parameters(sdev->sdev_target);
spi_display_xfer_agreement(sdev->sdev_target);
-@@ -716,7 +690,7 @@ static int mptspi_slave_alloc(struct scs
+@@ -716,7 +690,7 @@
vdevice = kzalloc(sizeof(VirtDevice), GFP_KERNEL);
if (!vdevice) {
printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n",
return -ENOMEM;
}
-@@ -738,21 +712,13 @@ static int mptspi_slave_configure(struct
+@@ -738,20 +712,12 @@
{
struct _MPT_SCSI_HOST *hd = shost_priv(sdev->host);
VirtTarget *vtarget = scsi_target(sdev)->hostdata;
-
if (ret)
return ret;
-
+-
- ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d min_period=0x%02x"
- " max_offset=0x%02x max_width=%d\n", hd->ioc->name,
- sdev->id, spi_min_period(scsi_target(sdev)),
- spi_max_offset(scsi_target(sdev)),
- spi_max_width(scsi_target(sdev))));
--
+
if ((sdev->channel == 1 ||
!(mptspi_is_raid(hd, sdev->id))) &&
- !spi_initial_dv(sdev->sdev_target))
-@@ -887,8 +853,8 @@ static int mptspi_write_spi_device_pg1(s
+@@ -887,8 +853,8 @@
mptspi_print_write_nego(hd, starget, le32_to_cpu(pg1->RequestedParameters));
if (mpt_config(ioc, &cfg)) {
goto out_free;
}
err = 0;
-@@ -963,14 +929,15 @@ static void mptspi_write_dt(struct scsi_
+@@ -963,13 +929,14 @@
if (spi_period(starget) == -1)
mptspi_read_parameters(starget);
spi_dt(starget) = dt;
nego = mptspi_getRP(starget);
-
-
+
pg1.RequestedParameters = cpu_to_le32(nego);
pg1.Reserved = 0;
- pg1.Configuration = 0;
-@@ -986,9 +953,6 @@ static void mptspi_write_iu(struct scsi_
+@@ -985,9 +952,6 @@
+
if (spi_period(starget) == -1)
mptspi_read_parameters(starget);
-
+-
- if (!iu && spi_period(starget) < 9)
- spi_period(starget) = 9;
--
+
spi_iu(starget) = iu;
- nego = mptspi_getRP(starget);
-@@ -1030,9 +994,11 @@ static void mptspi_write_qas(struct scsi
+@@ -1030,9 +994,11 @@
struct _MPT_SCSI_HOST *hd = shost_priv(shost);
VirtTarget *vtarget = starget->hostdata;
u32 nego;
spi_qas(starget) = 0;
else
spi_qas(starget) = qas;
-@@ -1053,8 +1019,8 @@ static void mptspi_write_width(struct sc
+@@ -1053,8 +1019,8 @@
if (!width) {
spi_dt(starget) = 0;
}
spi_width(starget) = width;
-@@ -1074,7 +1040,8 @@ struct work_queue_wrapper {
+@@ -1074,7 +1040,8 @@
int disk;
};
{
struct work_queue_wrapper *wqw =
container_of(work, struct work_queue_wrapper, work);
-@@ -1213,9 +1180,9 @@ static struct pci_device_id mptspi_pci_t
+@@ -1213,9 +1180,9 @@
MODULE_DEVICE_TABLE(pci, mptspi_pci_table);
static void
mptspi_dv_renegotiate_work(struct work_struct *work)
{
-@@ -1261,32 +1228,33 @@ mptspi_dv_renegotiate(struct _MPT_SCSI_H
+@@ -1261,32 +1228,33 @@
schedule_work(&wqw->work);
}
static int
mptspi_resume(struct pci_dev *pdev)
{
-@@ -1303,13 +1271,13 @@ mptspi_resume(struct pci_dev *pdev)
+@@ -1303,13 +1271,13 @@
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
static int
mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
-@@ -1423,19 +1391,18 @@ mptspi_probe(struct pci_dev *pdev, const
+@@ -1423,18 +1391,17 @@
* A slightly different algorithm is required for
* 64bit SGEs.
*/
- sizeof(u32));
+ (ioc->req_sz - 64) / ioc->SGE_size;
}
-
+
+
if (numSGE < sh->sg_tablesize) {
/* Reset this value */
- dprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-@@ -1444,11 +1411,11 @@ mptspi_probe(struct pci_dev *pdev, const
+@@ -1444,10 +1411,10 @@
sh->sg_tablesize = numSGE;
}
-
hd = shost_priv(sh);
hd->ioc = ioc;
-
-+ spin_unlock_irqrestore(&ioc->FreeQlock, flags);
+
++ spin_unlock_irqrestore(&ioc->FreeQlock, flags);
+
/* SCSI needs scsi_cmnd lookup table!
* (with size equal to req_depth*PtrSz!)
- */
-@@ -1462,39 +1429,12 @@ mptspi_probe(struct pci_dev *pdev, const
+@@ -1462,39 +1429,12 @@
dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n",
ioc->name, ioc->ScsiLookup));
- hd->tmState = TM_STATE_NONE;
- hd->resetPending = 0;
- hd->abortSCpnt = NULL;
--
++ ioc->sdev_queue_depth = MPT_SCSI_CMD_PER_DEV_HIGH;
++ ioc->spi_data.Saf_Te = mpt_saf_te;
++ ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++ "saf_te %x\n", ioc->name, mpt_saf_te));
++ ioc->spi_data.noQas = mpt_qas ? 0 : MPT_TARGET_NO_NEGO_QAS;
+
- /* Clear the pointer used to store
- * single-threaded commands, i.e., those
- * issued during a bus scan, dv and
- hd->timer.data = (unsigned long) hd;
- hd->timer.function = mptscsih_timer_expired;
-
-+ ioc->sdev_queue_depth = MPT_SCSI_CMD_PER_DEV_HIGH;
- ioc->spi_data.Saf_Te = mpt_saf_te;
+- ioc->spi_data.Saf_Te = mpt_saf_te;
-
- hd->negoNvram = MPT_SCSICFG_USE_NVRAM;
- ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+- ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
- "saf_te %x\n",
- ioc->name,
- mpt_saf_te));
- ioc->spi_data.noQas = 0;
-+ "saf_te %x\n", ioc->name, mpt_saf_te));
-+ ioc->spi_data.noQas = mpt_qas ? 0 : MPT_TARGET_NO_NEGO_QAS;
-
+-
- init_waitqueue_head(&hd->scandv_waitq);
- hd->scandv_wait_done = 0;
hd->last_queue_full = 0;
hd->spi_pending = 0;
-@@ -1514,7 +1454,7 @@ mptspi_probe(struct pci_dev *pdev, const
+@@ -1514,7 +1454,7 @@
* issue internal bus reset
*/
if (ioc->spi_data.bus_reset)
MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS,
0, 0, 0, 0, 5);
-@@ -1544,7 +1484,7 @@ static struct pci_driver mptspi_driver =
+@@ -1544,7 +1484,7 @@
* mptspi_init - Register MPT adapter(s) as SCSI host(s) with SCSI mid-layer.
*
* Returns 0 for success, non-zero for failure.
static int __init
mptspi_init(void)
{
-@@ -1574,7 +1514,8 @@ mptspi_init(void)
+@@ -1574,7 +1514,8 @@
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/**
* mptspi_exit - Unregisters MPT adapter(s)
static void __exit
mptspi_exit(void)
{
-@@ -1582,7 +1523,6 @@ mptspi_exit(void)
+@@ -1582,7 +1523,6 @@
mpt_reset_deregister(mptspiDoneCtx);
mpt_event_deregister(mptspiDoneCtx);
mpt_deregister(mptspiInternalCtx);
mpt_deregister(mptspiTaskCtx);
mpt_deregister(mptspiDoneCtx);
-diff -purN linux-2.6.27/drivers/message/fusion/rejected_ioctls/diag_buffer.c linux-2.6.27.19-5.1/drivers/message/fusion/rejected_ioctls/diag_buffer.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/rejected_ioctls/diag_buffer.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/rejected_ioctls/diag_buffer.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/message/fusion/rejected_ioctls/diag_buffer.c Wed May 06 16:56:21 2009 +0100
@@ -0,0 +1,675 @@
+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+/* REGISTER DIAG BUFFER Routine.
+ SET_MGMT_MSG_CONTEXT(ioc->ioctl_cmds.msg_context, 0);
+ return rc;
+}
-diff -purN linux-2.6.27/drivers/message/fusion/rejected_ioctls/diag_buffer.h linux-2.6.27.19-5.1/drivers/message/fusion/rejected_ioctls/diag_buffer.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/rejected_ioctls/diag_buffer.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/rejected_ioctls/diag_buffer.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/message/fusion/rejected_ioctls/diag_buffer.h Wed May 06 16:56:21 2009 +0100
@@ -0,0 +1,107 @@
+#define MPTDIAGREGISTER \
+ _IOWR(MPT_MAGIC_NUMBER, 26, mpt_diag_register_t)
+ mpt_ioctl_header hdr;
+ MPI_FW_DIAG_READ_BUFFER data;
+} mpt_diag_read_buffer_t;
-diff -purN linux-2.6.27/drivers/misc/Kconfig linux-2.6.27.19-5.1/drivers/misc/Kconfig
---- linux-2.6.27/drivers/misc/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/Kconfig 2009-03-25 16:11:30.000000000 +0000
-@@ -245,6 +245,17 @@ config MSI_LAPTOP
+diff -r 9608d5473017 drivers/misc/Kconfig
+--- a/drivers/misc/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/Kconfig Wed May 06 16:56:21 2009 +0100
+@@ -245,6 +245,17 @@
If you have an MSI S270 laptop, say Y or M here.
config COMPAL_LAPTOP
tristate "Compal Laptop Extras"
depends on X86
-@@ -427,7 +438,7 @@ config ENCLOSURE_SERVICES
+@@ -427,7 +438,7 @@
config SGI_XP
tristate "Support communication between SGI SSIs"
depends on NET
select IA64_UNCACHED_ALLOCATOR if IA64_GENERIC || IA64_SGI_SN2
select GENERIC_ALLOCATOR if IA64_GENERIC || IA64_SGI_SN2
select SGI_GRU if (IA64_GENERIC || IA64_SGI_UV || X86_64) && SMP
-@@ -454,7 +465,7 @@ config HP_ILO
+@@ -454,7 +465,7 @@
config SGI_GRU
tristate "SGI GRU driver"
default n
select MMU_NOTIFIER
---help---
-diff -purN linux-2.6.27/drivers/misc/Makefile linux-2.6.27.19-5.1/drivers/misc/Makefile
---- linux-2.6.27/drivers/misc/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/Makefile 2009-03-25 16:11:30.000000000 +0000
-@@ -23,6 +23,7 @@ obj-$(CONFIG_SGI_IOC4) += ioc4.o
+diff -r 9608d5473017 drivers/misc/Makefile
+--- a/drivers/misc/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/Makefile Wed May 06 16:56:21 2009 +0100
+@@ -23,6 +23,7 @@
obj-$(CONFIG_SONY_LAPTOP) += sony-laptop.o
obj-$(CONFIG_THINKPAD_ACPI) += thinkpad_acpi.o
obj-$(CONFIG_FUJITSU_LAPTOP) += fujitsu-laptop.o
obj-$(CONFIG_EEPROM_93CX6) += eeprom_93cx6.o
obj-$(CONFIG_INTEL_MENLOW) += intel_menlow.o
obj-$(CONFIG_ENCLOSURE_SERVICES) += enclosure.o
-diff -purN linux-2.6.27/drivers/misc/acer-wmi.c linux-2.6.27.19-5.1/drivers/misc/acer-wmi.c
---- linux-2.6.27/drivers/misc/acer-wmi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/acer-wmi.c 2009-03-25 16:11:30.000000000 +0000
-@@ -1242,6 +1242,12 @@ static int __init acer_wmi_init(void)
+diff -r 9608d5473017 drivers/misc/acer-wmi.c
+--- a/drivers/misc/acer-wmi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/acer-wmi.c Wed May 06 16:56:22 2009 +0100
+@@ -1242,6 +1242,12 @@
set_quirks();
if (platform_driver_register(&acer_platform_driver)) {
printk(ACER_ERR "Unable to register platform driver.\n");
goto error_platform_register;
-diff -purN linux-2.6.27/drivers/misc/asus-laptop.c linux-2.6.27.19-5.1/drivers/misc/asus-laptop.c
---- linux-2.6.27/drivers/misc/asus-laptop.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/asus-laptop.c 2009-03-25 16:11:30.000000000 +0000
-@@ -139,6 +139,7 @@ ASUS_HANDLE(lcd_switch, "\\_SB.PCI0.SBRG
+diff -r 9608d5473017 drivers/misc/asus-laptop.c
+--- a/drivers/misc/asus-laptop.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/asus-laptop.c Wed May 06 16:56:22 2009 +0100
+@@ -139,6 +139,7 @@
"\\_SB.PCI0.PX40.ECD0._Q10", /* L3C */
"\\_SB.PCI0.PX40.EC0.Q10", /* M1A */
"\\_SB.PCI0.LPCB.EC0._Q10", /* P30 */
"\\_SB.PCI0.PX40.Q10", /* S1x */
"\\Q10"); /* A2x, L2D, L3D, M2E */
-@@ -280,7 +281,7 @@ static int write_acpi_int(acpi_handle ha
+@@ -280,7 +281,7 @@
static int read_wireless_status(int mask)
{
acpi_status rv = AE_OK;
if (!wireless_status_handle)
-@@ -297,7 +298,7 @@ static int read_wireless_status(int mask
+@@ -297,7 +298,7 @@
static int read_gps_status(void)
{
acpi_status rv = AE_OK;
rv = acpi_evaluate_integer(gps_status_handle, NULL, NULL, &status);
-@@ -350,7 +351,7 @@ static void write_status(acpi_handle han
+@@ -350,7 +351,7 @@
static void object##_led_set(struct led_classdev *led_cdev, \
enum led_brightness value) \
{ \
queue_work(led_workqueue, &object##_led_work); \
} \
static void object##_led_update(struct work_struct *ignored) \
-@@ -404,7 +405,7 @@ static void lcd_blank(int blank)
+@@ -404,7 +405,7 @@
static int read_brightness(struct backlight_device *bd)
{
acpi_status rv = AE_OK;
rv = acpi_evaluate_integer(brightness_get_handle, NULL, NULL, &value);
-@@ -455,7 +456,7 @@ static ssize_t show_infos(struct device
+@@ -455,7 +456,7 @@
struct device_attribute *attr, char *page)
{
int len = 0;
char buf[16]; //enough for all info
acpi_status rv = AE_OK;
-@@ -603,7 +604,7 @@ static void set_display(int value)
+@@ -603,7 +604,7 @@
static int read_display(void)
{
acpi_status rv = AE_OK;
/* In most of the case, we know how to set the display, but sometime
-@@ -849,7 +850,7 @@ static int asus_hotk_get_info(void)
+@@ -849,7 +850,7 @@
{
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
union acpi_object *model = NULL;
char *string = NULL;
acpi_status status;
-@@ -1207,9 +1208,13 @@ static int __init asus_laptop_init(void)
+@@ -1207,9 +1208,13 @@
dev = acpi_get_physical_device(hotk->device->handle);
result = asus_led_init(dev);
if (result)
-diff -purN linux-2.6.27/drivers/misc/compal-laptop.c linux-2.6.27.19-5.1/drivers/misc/compal-laptop.c
---- linux-2.6.27/drivers/misc/compal-laptop.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/compal-laptop.c 2009-03-25 16:11:30.000000000 +0000
-@@ -326,12 +326,14 @@ static int __init compal_init(void)
+diff -r 9608d5473017 drivers/misc/compal-laptop.c
+--- a/drivers/misc/compal-laptop.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/compal-laptop.c Wed May 06 16:56:22 2009 +0100
+@@ -326,12 +326,14 @@
/* Register backlight stuff */
ret = platform_driver_register(&compal_driver);
if (ret)
-diff -purN linux-2.6.27/drivers/misc/eeepc-laptop.c linux-2.6.27.19-5.1/drivers/misc/eeepc-laptop.c
---- linux-2.6.27/drivers/misc/eeepc-laptop.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/eeepc-laptop.c 2009-03-25 16:11:30.000000000 +0000
-@@ -204,7 +204,7 @@ static int write_acpi_int(acpi_handle ha
+diff -r 9608d5473017 drivers/misc/eeepc-laptop.c
+--- a/drivers/misc/eeepc-laptop.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/eeepc-laptop.c Wed May 06 16:56:22 2009 +0100
+@@ -204,7 +204,7 @@
static int read_acpi_int(acpi_handle handle, const char *method, int *val)
{
acpi_status status;
status = acpi_evaluate_integer(handle, (char *)method, NULL, &result);
if (ACPI_FAILURE(status)) {
-@@ -381,7 +381,8 @@ static void notify_wlan(u32 *event)
+@@ -381,7 +381,8 @@
static void notify_brn(void)
{
struct backlight_device *bd = eeepc_backlight_device;
}
static void eeepc_hotk_notify(acpi_handle handle, u32 event, void *data)
-@@ -635,9 +636,15 @@ static int __init eeepc_laptop_init(void
+@@ -635,9 +636,15 @@
return -ENODEV;
}
dev = acpi_get_physical_device(ehotk->device->handle);
result = eeepc_hwmon_init(dev);
if (result)
goto fail_hwmon;
-diff -purN linux-2.6.27/drivers/misc/fujitsu-laptop.c linux-2.6.27.19-5.1/drivers/misc/fujitsu-laptop.c
---- linux-2.6.27/drivers/misc/fujitsu-laptop.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/fujitsu-laptop.c 2009-03-25 16:11:30.000000000 +0000
-@@ -224,7 +224,7 @@ static int set_lcd_level_alt(int level)
+diff -r 9608d5473017 drivers/misc/fujitsu-laptop.c
+--- a/drivers/misc/fujitsu-laptop.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/fujitsu-laptop.c Wed May 06 16:56:22 2009 +0100
+@@ -224,7 +224,7 @@
static int get_lcd_level(void)
{
acpi_status status = AE_OK;
vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLL\n");
-@@ -246,7 +246,7 @@ static int get_lcd_level(void)
+@@ -246,7 +246,7 @@
static int get_max_brightness(void)
{
acpi_status status = AE_OK;
vdbg_printk(FUJLAPTOP_DBG_TRACE, "get max lcd level via RBLL\n");
-@@ -263,7 +263,7 @@ static int get_max_brightness(void)
+@@ -263,7 +263,7 @@
static int get_lcd_level_alt(void)
{
acpi_status status = AE_OK;
vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLS\n");
-@@ -384,7 +384,7 @@ static ssize_t store_lcd_level(struct de
+@@ -384,7 +384,7 @@
static int get_irb(void)
{
acpi_status status = AE_OK;
vdbg_printk(FUJLAPTOP_DBG_TRACE, "Get irb\n");
-@@ -455,7 +455,7 @@ static int dmi_check_cb_s6410(const stru
+@@ -455,7 +455,7 @@
return 0;
}
{
.ident = "Fujitsu Siemens",
.matches = {
-@@ -970,16 +970,16 @@ static int __init fujitsu_init(void)
+@@ -970,16 +970,16 @@
/* Register backlight stuff */
ret = platform_driver_register(&fujitsupf_driver);
if (ret)
-@@ -1015,7 +1015,8 @@ fail_hotkey:
+@@ -1015,7 +1015,8 @@
fail_backlight:
fail_platform_device2:
-@@ -1042,7 +1043,8 @@ static void __exit fujitsu_cleanup(void)
+@@ -1042,7 +1043,8 @@
&fujitsupf_attribute_group);
platform_device_unregister(fujitsu->pf_device);
platform_driver_unregister(&fujitsupf_driver);
acpi_bus_unregister_driver(&acpi_fujitsu_driver);
-diff -purN linux-2.6.27/drivers/misc/hpilo.c linux-2.6.27.19-5.1/drivers/misc/hpilo.c
---- linux-2.6.27/drivers/misc/hpilo.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/hpilo.c 2009-03-25 16:11:30.000000000 +0000
-@@ -207,7 +207,7 @@ static void ilo_ccb_close(struct pci_dev
+diff -r 9608d5473017 drivers/misc/hpilo.c
+--- a/drivers/misc/hpilo.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/hpilo.c Wed May 06 16:56:22 2009 +0100
+@@ -207,7 +207,7 @@
&device_ccb->recv_ctrl);
/* give iLO some time to process stop request */
doorbell_set(driver_ccb);
udelay(1);
if (!(ioread32(&device_ccb->send_ctrl) & (1 << CTRL_BITPOS_A))
-@@ -309,7 +309,7 @@ static int ilo_ccb_open(struct ilo_hwinf
+@@ -309,7 +309,7 @@
doorbell_clr(driver_ccb);
/* make sure iLO is really handling requests */
if (ilo_pkt_dequeue(hw, driver_ccb, SENDQ, &pkt_id, NULL, NULL))
break;
udelay(1);
-@@ -326,7 +326,7 @@ static int ilo_ccb_open(struct ilo_hwinf
+@@ -326,7 +326,7 @@
return 0;
free:
out:
return error;
}
-@@ -758,7 +758,7 @@ static void __exit ilo_exit(void)
+@@ -758,7 +758,7 @@
class_destroy(ilo_class);
}
MODULE_ALIAS(ILO_NAME);
MODULE_DESCRIPTION(ILO_NAME);
MODULE_AUTHOR("David Altobelli <david.altobelli@hp.com>");
-diff -purN linux-2.6.27/drivers/misc/hpilo.h linux-2.6.27.19-5.1/drivers/misc/hpilo.h
---- linux-2.6.27/drivers/misc/hpilo.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/hpilo.h 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/misc/hpilo.h
+--- a/drivers/misc/hpilo.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/hpilo.h Wed May 06 16:56:22 2009 +0100
@@ -19,6 +19,8 @@
#define MAX_ILO_DEV 1
/* max number of files */
/*
* Per device, used to track global memory allocations.
-diff -purN linux-2.6.27/drivers/misc/intel_menlow.c linux-2.6.27.19-5.1/drivers/misc/intel_menlow.c
---- linux-2.6.27/drivers/misc/intel_menlow.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/intel_menlow.c 2009-03-25 16:11:30.000000000 +0000
-@@ -57,7 +57,7 @@ static int memory_get_int_max_bandwidth(
+diff -r 9608d5473017 drivers/misc/intel_menlow.c
+--- a/drivers/misc/intel_menlow.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/intel_menlow.c Wed May 06 16:56:22 2009 +0100
+@@ -57,7 +57,7 @@
{
struct acpi_device *device = cdev->devdata;
acpi_handle handle = device->handle;
struct acpi_object_list arg_list;
union acpi_object arg;
acpi_status status = AE_OK;
-@@ -90,7 +90,7 @@ static int memory_get_cur_bandwidth(stru
+@@ -90,7 +90,7 @@
{
struct acpi_device *device = cdev->devdata;
acpi_handle handle = device->handle;
struct acpi_object_list arg_list;
union acpi_object arg;
acpi_status status = AE_OK;
-@@ -104,7 +104,7 @@ static int memory_get_cur_bandwidth(stru
+@@ -104,7 +104,7 @@
if (ACPI_FAILURE(status))
return -EFAULT;
}
static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,
-@@ -115,7 +115,7 @@ static int memory_set_cur_bandwidth(stru
+@@ -115,7 +115,7 @@
struct acpi_object_list arg_list;
union acpi_object arg;
acpi_status status;
unsigned long max_state;
if (memory_get_int_max_bandwidth(cdev, &max_state))
-@@ -131,7 +131,7 @@ static int memory_set_cur_bandwidth(stru
+@@ -131,7 +131,7 @@
status =
acpi_evaluate_integer(handle, MEMORY_SET_BANDWIDTH, &arg_list,
printk(KERN_INFO
"Bandwidth value was %d: status is %d\n", state, status);
-@@ -252,7 +252,8 @@ static DEFINE_MUTEX(intel_menlow_attr_lo
+@@ -252,7 +252,8 @@
* @auxtype : AUX0/AUX1
* @buf: syfs buffer
*/
{
acpi_status status;
-@@ -260,7 +261,7 @@ static int sensor_get_auxtrip(acpi_handl
+@@ -260,7 +261,7 @@
return -EINVAL;
status = acpi_evaluate_integer(handle, index ? GET_AUX1 : GET_AUX0,
if (ACPI_FAILURE(status))
return -EIO;
-@@ -282,13 +283,13 @@ static int sensor_set_auxtrip(acpi_handl
+@@ -282,13 +283,13 @@
struct acpi_object_list args = {
1, &arg
};
if (ACPI_FAILURE(status))
return -EIO;
if ((index && value < temp) || (!index && value > temp))
-@@ -296,7 +297,7 @@ static int sensor_set_auxtrip(acpi_handl
+@@ -296,7 +297,7 @@
arg.integer.value = value;
status = acpi_evaluate_integer(handle, index ? SET_AUX1 : SET_AUX0,
if (ACPI_FAILURE(status))
return -EIO;
-@@ -312,7 +313,7 @@ static ssize_t aux0_show(struct device *
+@@ -312,7 +313,7 @@
struct device_attribute *dev_attr, char *buf)
{
struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr);
int result;
result = sensor_get_auxtrip(attr->handle, 0, &value);
-@@ -324,7 +325,7 @@ static ssize_t aux1_show(struct device *
+@@ -324,7 +325,7 @@
struct device_attribute *dev_attr, char *buf)
{
struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr);
int result;
result = sensor_get_auxtrip(attr->handle, 1, &value);
-@@ -376,7 +377,7 @@ static ssize_t bios_enabled_show(struct
+@@ -376,7 +377,7 @@
struct device_attribute *attr, char *buf)
{
acpi_status status;
status = acpi_evaluate_integer(NULL, BIOS_ENABLED, NULL, &bios_enabled);
if (ACPI_FAILURE(status))
-@@ -492,7 +493,7 @@ static int __init intel_menlow_module_in
+@@ -492,7 +493,7 @@
{
int result = -ENODEV;
acpi_status status;
if (acpi_disabled)
return result;
-diff -purN linux-2.6.27/drivers/misc/ioc4.c linux-2.6.27.19-5.1/drivers/misc/ioc4.c
---- linux-2.6.27/drivers/misc/ioc4.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/ioc4.c 2009-03-25 16:11:30.000000000 +0000
-@@ -269,6 +269,17 @@ ioc4_variant(struct ioc4_driver_data *id
+diff -r 9608d5473017 drivers/misc/ioc4.c
+--- a/drivers/misc/ioc4.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/ioc4.c Wed May 06 16:56:23 2009 +0100
+@@ -269,6 +269,17 @@
return IOC4_VARIANT_PCI_RT;
}
/* Adds a new instance of an IOC4 card */
static int
ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
-@@ -378,6 +389,22 @@ ioc4_probe(struct pci_dev *pdev, const s
+@@ -378,6 +389,22 @@
}
mutex_unlock(&ioc4_mutex);
return 0;
out_misc_region:
-diff -purN linux-2.6.27/drivers/misc/msi-laptop.c linux-2.6.27.19-5.1/drivers/misc/msi-laptop.c
---- linux-2.6.27/drivers/misc/msi-laptop.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/msi-laptop.c 2009-03-25 16:11:30.000000000 +0000
-@@ -347,12 +347,16 @@ static int __init msi_init(void)
+diff -r 9608d5473017 drivers/misc/msi-laptop.c
+--- a/drivers/misc/msi-laptop.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/msi-laptop.c Wed May 06 16:56:23 2009 +0100
+@@ -347,12 +347,16 @@
/* Register backlight stuff */
ret = platform_driver_register(&msipf_driver);
if (ret)
-diff -purN linux-2.6.27/drivers/misc/panasonic-laptop.c linux-2.6.27.19-5.1/drivers/misc/panasonic-laptop.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/panasonic-laptop.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/misc/panasonic-laptop.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/misc/panasonic-laptop.c Wed May 06 16:56:23 2009 +0100
@@ -0,0 +1,767 @@
+/*
+ * Panasonic HotKey and LCD brightness control driver
+
+module_init(acpi_pcc_init);
+module_exit(acpi_pcc_exit);
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/Makefile linux-2.6.27.19-5.1/drivers/misc/sgi-xp/Makefile
---- linux-2.6.27/drivers/misc/sgi-xp/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/Makefile 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/misc/sgi-xp/Makefile
+--- a/drivers/misc/sgi-xp/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/Makefile Wed May 06 16:56:23 2009 +0100
@@ -5,14 +5,14 @@
obj-$(CONFIG_SGI_XP) += xp.o
xp-y := xp_main.o
xpc-$(CONFIG_IA64_SGI_UV) += xpc_uv.o
xpc-$(CONFIG_X86_64) += xpc_uv.o
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xp.h linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp.h
---- linux-2.6.27/drivers/misc/sgi-xp/xp.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp.h 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/misc/sgi-xp/xp.h
+--- a/drivers/misc/sgi-xp/xp.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xp.h Wed May 06 16:56:23 2009 +0100
@@ -19,7 +19,11 @@
#include <asm/system.h>
#include <asm/sn/arch.h> /* defines is_shub1() and is_shub2() */
#endif
#ifdef CONFIG_X86_64
#include <asm/genapic.h>
-@@ -190,9 +194,10 @@ enum xp_retval {
+@@ -190,9 +194,10 @@
xpGruSendMqError, /* 59: gru send message queue related error */
xpBadChannelNumber, /* 60: invalid channel number */
};
/*
-@@ -341,6 +346,8 @@ extern unsigned long (*xp_pa) (void *);
+@@ -341,6 +346,8 @@
extern enum xp_retval (*xp_remote_memcpy) (unsigned long, const unsigned long,
size_t);
extern int (*xp_cpu_to_nasid) (int);
extern u64 xp_nofault_PIOR_target;
extern int xp_nofault_PIOR(void *);
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xp_main.c linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp_main.c
---- linux-2.6.27/drivers/misc/sgi-xp/xp_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp_main.c 2009-03-25 16:11:30.000000000 +0000
-@@ -51,6 +51,13 @@ EXPORT_SYMBOL_GPL(xp_remote_memcpy);
+diff -r 9608d5473017 drivers/misc/sgi-xp/xp_main.c
+--- a/drivers/misc/sgi-xp/xp_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xp_main.c Wed May 06 16:56:23 2009 +0100
+@@ -50,6 +50,13 @@
+
int (*xp_cpu_to_nasid) (int cpuid);
EXPORT_SYMBOL_GPL(xp_cpu_to_nasid);
-
++
+enum xp_retval (*xp_expand_memprotect) (unsigned long phys_addr,
+ unsigned long size);
+EXPORT_SYMBOL_GPL(xp_expand_memprotect);
+enum xp_retval (*xp_restrict_memprotect) (unsigned long phys_addr,
+ unsigned long size);
+EXPORT_SYMBOL_GPL(xp_restrict_memprotect);
-+
+
/*
* xpc_registrations[] keeps track of xpc_connect()'s done by the kernel-level
- * users of XPC.
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xp_sn2.c linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp_sn2.c
---- linux-2.6.27/drivers/misc/sgi-xp/xp_sn2.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp_sn2.c 2009-03-25 16:11:30.000000000 +0000
-@@ -120,6 +120,38 @@ xp_cpu_to_nasid_sn2(int cpuid)
+diff -r 9608d5473017 drivers/misc/sgi-xp/xp_sn2.c
+--- a/drivers/misc/sgi-xp/xp_sn2.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xp_sn2.c Wed May 06 16:56:23 2009 +0100
+@@ -120,6 +120,38 @@
return cpuid_to_nasid(cpuid);
}
enum xp_retval
xp_init_sn2(void)
{
-@@ -132,6 +164,8 @@ xp_init_sn2(void)
+@@ -132,6 +164,8 @@
xp_pa = xp_pa_sn2;
xp_remote_memcpy = xp_remote_memcpy_sn2;
xp_cpu_to_nasid = xp_cpu_to_nasid_sn2;
return xp_register_nofault_code_sn2();
}
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xp_uv.c linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp_uv.c
---- linux-2.6.27/drivers/misc/sgi-xp/xp_uv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp_uv.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/misc/sgi-xp/xp_uv.c
+--- a/drivers/misc/sgi-xp/xp_uv.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xp_uv.c Wed May 06 16:56:23 2009 +0100
@@ -15,6 +15,11 @@
#include <linux/device.h>
#include "../sgi-gru/grukservices.h"
#include "xp.h"
-@@ -49,18 +54,79 @@ xp_cpu_to_nasid_uv(int cpuid)
+@@ -49,18 +54,79 @@
return UV_PNODE_TO_NASID(uv_cpu_to_pnode(cpuid));
}
return xpSuccess;
}
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc.h linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc.h
---- linux-2.6.27/drivers/misc/sgi-xp/xpc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc.h 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/misc/sgi-xp/xpc.h
+--- a/drivers/misc/sgi-xp/xpc.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xpc.h Wed May 06 16:56:23 2009 +0100
@@ -3,7 +3,7 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
/*
-@@ -181,6 +181,18 @@ struct xpc_vars_part_sn2 {
+@@ -181,6 +181,18 @@
xpc_nasid_mask_nlongs))
/*
* The activate_mq is used to send/receive GRU messages that affect XPC's
* heartbeat, partition active state, and channel state. This is UV only.
*/
-@@ -502,7 +514,8 @@ struct xpc_channel_uv {
+@@ -502,7 +514,8 @@
/* partition's notify mq */
struct xpc_send_msg_slot_uv *send_msg_slots;
struct xpc_fifo_head_uv msg_slot_free_list;
struct xpc_fifo_head_uv recv_msg_list; /* deliverable payloads */
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_main.c linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc_main.c
---- linux-2.6.27/drivers/misc/sgi-xp/xpc_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc_main.c 2009-03-25 16:11:30.000000000 +0000
-@@ -1104,7 +1104,7 @@ xpc_do_exit(enum xp_retval reason)
+diff -r 9608d5473017 drivers/misc/sgi-xp/xpc_main.c
+--- a/drivers/misc/sgi-xp/xpc_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xpc_main.c Wed May 06 16:56:23 2009 +0100
+@@ -1104,7 +1104,7 @@
if (is_shub())
xpc_exit_sn2();
xpc_exit_uv();
}
-@@ -1363,7 +1363,7 @@ out_2:
+@@ -1363,7 +1363,7 @@
out_1:
if (is_shub())
xpc_exit_sn2();
xpc_exit_uv();
return ret;
}
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_sn2.c linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc_sn2.c
---- linux-2.6.27/drivers/misc/sgi-xp/xpc_sn2.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc_sn2.c 2009-03-25 16:11:30.000000000 +0000
-@@ -553,22 +553,17 @@ static u64 xpc_prot_vec_sn2[MAX_NUMNODES
+diff -r 9608d5473017 drivers/misc/sgi-xp/xpc_sn2.c
+--- a/drivers/misc/sgi-xp/xpc_sn2.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xpc_sn2.c Wed May 06 16:56:23 2009 +0100
+@@ -553,22 +553,17 @@
static enum xp_retval
xpc_allow_amo_ops_sn2(struct amo *amos_page)
{
}
/*
-@@ -904,7 +899,7 @@ xpc_update_partition_info_sn2(struct xpc
+@@ -904,7 +899,7 @@
dev_dbg(xpc_part, " remote_vars_pa = 0x%016lx\n",
part_sn2->remote_vars_pa);
dev_dbg(xpc_part, " last_heartbeat = 0x%016lx\n",
part->last_heartbeat);
-@@ -1841,6 +1836,7 @@ xpc_process_msg_chctl_flags_sn2(struct x
+@@ -1841,6 +1836,7 @@
*/
xpc_clear_remote_msgqueue_flags_sn2(ch);
ch_sn2->w_remote_GP.put = ch_sn2->remote_GP.put;
dev_dbg(xpc_chan, "w_remote_GP.put changed to %ld, partid=%d, "
-@@ -1939,7 +1935,7 @@ xpc_get_deliverable_payload_sn2(struct x
+@@ -1939,7 +1935,7 @@
break;
get = ch_sn2->w_local_GP.get;
if (get == ch_sn2->w_remote_GP.put)
break;
-@@ -1961,11 +1957,13 @@ xpc_get_deliverable_payload_sn2(struct x
+@@ -1961,11 +1957,13 @@
msg = xpc_pull_remote_msg_sn2(ch, get);
break;
}
-@@ -2058,7 +2056,7 @@ xpc_allocate_msg_sn2(struct xpc_channel
+@@ -2058,7 +2056,7 @@
while (1) {
put = ch_sn2->w_local_GP.put;
if (put - ch_sn2->w_remote_GP.get < ch->local_nentries) {
/* There are available message entries. We need to try
-@@ -2191,7 +2189,7 @@ xpc_send_payload_sn2(struct xpc_channel
+@@ -2191,7 +2189,7 @@
* The preceding store of msg->flags must occur before the following
* load of local_GP->put.
*/
/* see if the message is next in line to be sent, if so send it */
-@@ -2292,7 +2290,7 @@ xpc_received_payload_sn2(struct xpc_chan
+@@ -2292,7 +2290,7 @@
* The preceding store of msg->flags must occur before the following
* load of local_GP->get.
*/
/*
* See if this message is next in line to be acknowledged as having
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc_uv.c
---- linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc_uv.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/misc/sgi-xp/xpc_uv.c
+--- a/drivers/misc/sgi-xp/xpc_uv.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xpc_uv.c Wed May 06 16:56:23 2009 +0100
@@ -3,7 +3,7 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
#include "../sgi-gru/gru.h"
#include "../sgi-gru/grukservices.h"
#include "xpc.h"
-@@ -27,15 +35,17 @@ static atomic64_t xpc_heartbeat_uv;
+@@ -27,15 +35,17 @@
static DECLARE_BITMAP(xpc_heartbeating_to_mask_uv, XP_MAX_NPARTITIONS_UV);
#define XPC_ACTIVATE_MSG_SIZE_UV (1 * GRU_CACHE_LINE_BYTES)
--#define XPC_NOTIFY_MSG_SIZE_UV (2 * GRU_CACHE_LINE_BYTES)
+#define XPC_ACTIVATE_MQ_SIZE_UV (4 * XP_MAX_NPARTITIONS_UV * \
+ XPC_ACTIVATE_MSG_SIZE_UV)
+#define XPC_ACTIVATE_IRQ_NAME "xpc_activate"
++
+ #define XPC_NOTIFY_MSG_SIZE_UV (2 * GRU_CACHE_LINE_BYTES)
++#define XPC_NOTIFY_MQ_SIZE_UV (4 * XP_MAX_NPARTITIONS_UV * \
++ XPC_NOTIFY_MSG_SIZE_UV)
++#define XPC_NOTIFY_IRQ_NAME "xpc_notify"
-#define XPC_ACTIVATE_MQ_SIZE_UV (4 * XP_MAX_NPARTITIONS_UV * \
- XPC_ACTIVATE_MSG_SIZE_UV)
-#define XPC_NOTIFY_MQ_SIZE_UV (4 * XP_MAX_NPARTITIONS_UV * \
- XPC_NOTIFY_MSG_SIZE_UV)
-+#define XPC_NOTIFY_MSG_SIZE_UV (2 * GRU_CACHE_LINE_BYTES)
-+#define XPC_NOTIFY_MQ_SIZE_UV (4 * XP_MAX_NPARTITIONS_UV * \
-+ XPC_NOTIFY_MSG_SIZE_UV)
-+#define XPC_NOTIFY_IRQ_NAME "xpc_notify"
-
+-
-static void *xpc_activate_mq_uv;
-static void *xpc_notify_mq_uv;
+static struct xpc_gru_mq_uv *xpc_activate_mq_uv;
static int
xpc_setup_partitions_sn_uv(void)
-@@ -52,62 +62,209 @@ xpc_setup_partitions_sn_uv(void)
+@@ -52,62 +62,209 @@
return 0;
}
struct page *page;
- void *mq;
+ struct xpc_gru_mq_uv *mq;
-+
+
+- nid = cpu_to_node(cpuid);
+- mq_order = get_order(mq_size);
+ mq = kmalloc(sizeof(struct xpc_gru_mq_uv), GFP_KERNEL);
+ if (mq == NULL) {
+ dev_err(xpc_part, "xpc_create_gru_mq_uv() failed to kmalloc() "
+ ret = -ENOMEM;
+ goto out_1;
+ }
-
-- nid = cpu_to_node(cpuid);
-- mq_order = get_order(mq_size);
++
+ pg_order = get_order(mq_size);
+ mq->order = pg_order + PAGE_SHIFT;
+ mq_size = 1UL << mq->order;
+ mq_size = 1UL << mq->order;
+ ret = xp_restrict_memprotect(xp_pa(mq->address), mq_size);
+ BUG_ON(ret != xpSuccess);
-+
+
+- free_irq(irq, NULL);
+ /* unregister irq handler and release mq irq/vector mapping */
+ free_irq(mq->irq, NULL);
+ xpc_release_gru_mq_irq_uv(mq);
-- free_irq(irq, NULL);
+- free_pages((unsigned long)mq, get_order(mq_size));
+ /* disable generation of irq when GRU mq op occurs to this mq */
+ xpc_gru_mq_watchlist_free_uv(mq);
-
-- free_pages((unsigned long)mq, get_order(mq_size));
++
+ pg_order = mq->order - PAGE_SHIFT;
+ free_pages((unsigned long)mq->address, pg_order);
+
}
static enum xp_retval
-@@ -402,7 +559,10 @@ xpc_handle_activate_IRQ_uv(int irq, void
+@@ -402,7 +559,10 @@
struct xpc_partition *part;
int wakeup_hb_checker = 0;
partid = msg_hdr->partid;
if (partid < 0 || partid >= XP_MAX_NPARTITIONS_UV) {
-@@ -418,7 +578,7 @@ xpc_handle_activate_IRQ_uv(int irq, void
+@@ -418,7 +578,7 @@
}
}
}
if (wakeup_hb_checker)
-@@ -482,7 +642,7 @@ xpc_send_local_activate_IRQ_uv(struct xp
+@@ -482,7 +642,7 @@
struct xpc_partition_uv *part_uv = &part->sn.uv;
/*
* !!! message our way by doing what the activate IRQ handler would
* !!! do had one really been sent.
*/
-@@ -500,14 +660,39 @@ static enum xp_retval
+@@ -500,14 +660,39 @@
xpc_get_partition_rsvd_page_pa_uv(void *buf, u64 *cookie, unsigned long *rp_pa,
size_t *len)
{
return 0;
}
-@@ -825,8 +1010,8 @@ xpc_allocate_recv_msg_slot_uv(struct xpc
+@@ -825,8 +1010,8 @@
continue;
for (entry = 0; entry < nentries; entry++) {
msg_slot->hdr.msg_slot_number = entry;
}
-@@ -1123,9 +1308,8 @@ xpc_handle_notify_mq_msg_uv(struct xpc_p
+@@ -1123,9 +1308,8 @@
/* we're dealing with a normal message sent via the notify_mq */
ch_uv = &ch->sn.uv;
BUG_ON(msg->hdr.msg_slot_number != msg_slot->hdr.msg_slot_number);
BUG_ON(msg_slot->hdr.size != 0);
-@@ -1238,7 +1422,7 @@ xpc_send_payload_uv(struct xpc_channel *
+@@ -1238,7 +1422,7 @@
atomic_inc(&ch->n_to_notify);
msg_slot->key = key;
msg_slot->func = func;
if (ch->flags & XPC_C_DISCONNECTING) {
-@@ -1411,22 +1595,18 @@ xpc_init_uv(void)
+@@ -1411,22 +1595,18 @@
return -E2BIG;
}
}
return 0;
-@@ -1435,9 +1615,6 @@ xpc_init_uv(void)
+@@ -1435,9 +1615,6 @@
void
xpc_exit_uv(void)
{
+ xpc_destroy_gru_mq_uv(xpc_notify_mq_uv);
+ xpc_destroy_gru_mq_uv(xpc_activate_mq_uv);
}
-diff -purN linux-2.6.27/drivers/misc/sony-laptop.c linux-2.6.27.19-5.1/drivers/misc/sony-laptop.c
---- linux-2.6.27/drivers/misc/sony-laptop.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sony-laptop.c 2009-03-25 16:11:30.000000000 +0000
-@@ -1038,7 +1038,11 @@ static int sony_nc_add(struct acpi_devic
+diff -r 9608d5473017 drivers/misc/sony-laptop.c
+--- a/drivers/misc/sony-laptop.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sony-laptop.c Wed May 06 16:56:23 2009 +0100
+@@ -1038,7 +1038,11 @@
goto outinput;
}
sony_backlight_device = backlight_device_register("sony", NULL,
NULL,
&sony_backlight_ops);
-@@ -2315,8 +2319,10 @@ end:
+@@ -2315,8 +2319,10 @@
*/
static int sony_pic_disable(struct acpi_device *device)
{
return -ENXIO;
dprintk("Device disabled\n");
-diff -purN linux-2.6.27/drivers/misc/thinkpad_acpi.c linux-2.6.27.19-5.1/drivers/misc/thinkpad_acpi.c
---- linux-2.6.27/drivers/misc/thinkpad_acpi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/thinkpad_acpi.c 2009-03-25 16:11:30.000000000 +0000
-@@ -240,6 +240,7 @@ static struct {
+diff -r 9608d5473017 drivers/misc/thinkpad_acpi.c
+--- a/drivers/misc/thinkpad_acpi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/thinkpad_acpi.c Wed May 06 16:56:23 2009 +0100
+@@ -240,6 +240,7 @@
u32 light_status:1;
u32 bright_16levels:1;
u32 bright_acpimode:1;
u32 wan:1;
u32 fan_ctrl_status_undef:1;
u32 input_device_registered:1;
-@@ -2353,6 +2354,9 @@ err_exit:
+@@ -2353,6 +2354,9 @@
return (res < 0)? res : 1;
}
static void hotkey_notify(struct ibm_struct *ibm, u32 event)
{
u32 hkey;
-@@ -2391,6 +2395,28 @@ static void hotkey_notify(struct ibm_str
+@@ -2391,6 +2395,28 @@
case 1:
/* 0x1000-0x1FFF: key presses */
scancode = hkey & 0xfff;
if (scancode > 0 && scancode < 0x21) {
scancode--;
if (!(hotkey_source_mask & (1 << scancode))) {
-@@ -4770,7 +4796,6 @@ enum {
+@@ -4770,7 +4796,6 @@
TP_EC_BACKLIGHT_MAPSW = 0x20,
};
static int brightness_mode;
static unsigned int brightness_enable = 2; /* 2 = auto, 0 = no, 1 = yes */
-@@ -4909,7 +4934,7 @@ static struct backlight_ops ibm_backligh
+@@ -4909,7 +4934,7 @@
static int __init brightness_init(struct ibm_init_struct *iibm)
{
int b;
vdbg_printk(TPACPI_DBG_INIT, "initializing brightness subdriver\n");
mutex_init(&brightness_mutex);
-@@ -4921,16 +4946,32 @@ static int __init brightness_init(struct
+@@ -4921,16 +4946,32 @@
*/
b = tpacpi_check_std_acpi_brightness_support();
if (b > 0) {
}
}
-diff -purN linux-2.6.27/drivers/mmc/card/block.c linux-2.6.27.19-5.1/drivers/mmc/card/block.c
---- linux-2.6.27/drivers/mmc/card/block.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mmc/card/block.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/mmc/card/block.c
+--- a/drivers/mmc/card/block.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mmc/card/block.c Wed May 06 16:56:23 2009 +0100
@@ -29,6 +29,7 @@
#include <linux/blkdev.h>
#include <linux/mutex.h>
#include <linux/mmc/card.h>
#include <linux/mmc/host.h>
-@@ -532,6 +533,8 @@ static int mmc_blk_probe(struct mmc_card
+@@ -532,6 +533,8 @@
struct mmc_blk_data *md;
int err;
/*
* Check that the card supports the command class(es) we need.
*/
-@@ -546,10 +549,11 @@ static int mmc_blk_probe(struct mmc_card
+@@ -546,10 +549,11 @@
if (err)
goto out;
mmc_set_drvdata(card, md);
add_disk(md->disk);
-diff -purN linux-2.6.27/drivers/mmc/core/core.c linux-2.6.27.19-5.1/drivers/mmc/core/core.c
---- linux-2.6.27/drivers/mmc/core/core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mmc/core/core.c 2009-03-25 16:11:30.000000000 +0000
-@@ -280,7 +280,11 @@ void mmc_set_data_timeout(struct mmc_dat
+diff -r 9608d5473017 drivers/mmc/core/core.c
+--- a/drivers/mmc/core/core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mmc/core/core.c Wed May 06 16:56:23 2009 +0100
+@@ -280,7 +280,11 @@
(card->host->ios.clock / 1000);
if (data->flags & MMC_DATA_WRITE)
else
limit_us = 100000;
-diff -purN linux-2.6.27/drivers/mtd/chips/cfi_cmdset_0002.c linux-2.6.27.19-5.1/drivers/mtd/chips/cfi_cmdset_0002.c
---- linux-2.6.27/drivers/mtd/chips/cfi_cmdset_0002.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/chips/cfi_cmdset_0002.c 2009-03-25 16:11:20.000000000 +0000
-@@ -362,19 +362,6 @@ struct mtd_info *cfi_cmdset_0002(struct
+diff -r 9608d5473017 drivers/mtd/chips/cfi_cmdset_0002.c
+--- a/drivers/mtd/chips/cfi_cmdset_0002.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/chips/cfi_cmdset_0002.c Wed May 06 16:56:23 2009 +0100
+@@ -362,19 +362,6 @@
/* Set the default CFI lock/unlock addresses */
cfi->addr_unlock1 = 0x555;
cfi->addr_unlock2 = 0x2aa;
} /* CFI mode */
else if (cfi->cfi_mode == CFI_MODE_JEDEC) {
-diff -purN linux-2.6.27/drivers/mtd/chips/jedec_probe.c linux-2.6.27.19-5.1/drivers/mtd/chips/jedec_probe.c
---- linux-2.6.27/drivers/mtd/chips/jedec_probe.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/chips/jedec_probe.c 2009-03-25 16:11:20.000000000 +0000
-@@ -1808,9 +1808,7 @@ static inline u32 jedec_read_mfr(struct
+diff -r 9608d5473017 drivers/mtd/chips/jedec_probe.c
+--- a/drivers/mtd/chips/jedec_probe.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/chips/jedec_probe.c Wed May 06 16:56:23 2009 +0100
+@@ -1808,9 +1808,7 @@
* several first banks can contain 0x7f instead of actual ID
*/
do {
mask = (1 << (cfi->device_type * 8)) - 1;
result = map_read(map, base + ofs);
bank++;
-@@ -1824,7 +1822,7 @@ static inline u32 jedec_read_id(struct m
+@@ -1824,7 +1822,7 @@
{
map_word result;
unsigned long mask;
mask = (1 << (cfi->device_type * 8)) -1;
result = map_read(map, base + ofs);
return result.x[0] & mask;
-@@ -2067,8 +2065,8 @@ static int jedec_probe_chip(struct map_i
+@@ -2067,8 +2065,8 @@
}
/* Ensure the unlock addresses we try stay inside the map */
if ( ((base + probe_offset1 + map_bankwidth(map)) >= map->size) ||
((base + probe_offset2 + map_bankwidth(map)) >= map->size))
goto retry;
-diff -purN linux-2.6.27/drivers/mtd/devices/Kconfig linux-2.6.27.19-5.1/drivers/mtd/devices/Kconfig
---- linux-2.6.27/drivers/mtd/devices/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/devices/Kconfig 2009-03-25 16:11:20.000000000 +0000
-@@ -99,6 +99,13 @@ config MTD_PHRAM
+diff -r 9608d5473017 drivers/mtd/devices/Kconfig
+--- a/drivers/mtd/devices/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/devices/Kconfig Wed May 06 16:56:23 2009 +0100
+@@ -98,6 +98,13 @@
+ Use this driver to access physical memory that the kernel proper
doesn't have access to, memory beyond the mem=xxx limit, nvram,
memory on the video card, etc...
-
++
+config MTD_PS3VRAM
+ tristate "PS3 video RAM"
+ depends on FB_PS3
+ help
+ This driver allows you to use excess PS3 video RAM as volatile
+ storage or system swap.
-+
+
config MTD_LART
tristate "28F160xx flash driver for LART"
- depends on SA1100_LART
-diff -purN linux-2.6.27/drivers/mtd/devices/Makefile linux-2.6.27.19-5.1/drivers/mtd/devices/Makefile
---- linux-2.6.27/drivers/mtd/devices/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/devices/Makefile 2009-03-25 16:11:20.000000000 +0000
-@@ -16,3 +16,4 @@ obj-$(CONFIG_MTD_LART) += lart.o
+diff -r 9608d5473017 drivers/mtd/devices/Makefile
+--- a/drivers/mtd/devices/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/devices/Makefile Wed May 06 16:56:23 2009 +0100
+@@ -16,3 +16,4 @@
obj-$(CONFIG_MTD_BLOCK2MTD) += block2mtd.o
obj-$(CONFIG_MTD_DATAFLASH) += mtd_dataflash.o
obj-$(CONFIG_MTD_M25P80) += m25p80.o
+obj-$(CONFIG_MTD_PS3VRAM) += ps3vram.o
-diff -purN linux-2.6.27/drivers/mtd/devices/ps3vram.c linux-2.6.27.19-5.1/drivers/mtd/devices/ps3vram.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/devices/ps3vram.c 2009-03-25 16:11:20.000000000 +0000
+diff -r 9608d5473017 drivers/mtd/devices/ps3vram.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/mtd/devices/ps3vram.c Wed May 06 16:56:23 2009 +0100
@@ -0,0 +1,776 @@
+/**
+ * ps3vram - Use extra PS3 video ram as MTD block device.
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jim Paris <jim@jtan.com>");
+MODULE_DESCRIPTION("MTD driver for PS3 video RAM");
-diff -purN linux-2.6.27/drivers/mtd/ftl.c linux-2.6.27.19-5.1/drivers/mtd/ftl.c
---- linux-2.6.27/drivers/mtd/ftl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/ftl.c 2009-03-25 16:11:20.000000000 +0000
-@@ -1005,6 +1005,29 @@ static int ftl_writesect(struct mtd_blkt
+diff -r 9608d5473017 drivers/mtd/ftl.c
+--- a/drivers/mtd/ftl.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/ftl.c Wed May 06 16:56:23 2009 +0100
+@@ -1005,6 +1005,29 @@
return ftl_write((void *)dev, buf, block, 1);
}
/*====================================================================*/
static void ftl_freepart(partition_t *part)
-@@ -1069,6 +1092,7 @@ static struct mtd_blktrans_ops ftl_tr =
+@@ -1069,6 +1092,7 @@
.blksize = SECTOR_SIZE,
.readsect = ftl_readsect,
.writesect = ftl_writesect,
.getgeo = ftl_getgeo,
.add_mtd = ftl_add_mtd,
.remove_dev = ftl_remove_dev,
-diff -purN linux-2.6.27/drivers/mtd/maps/physmap_of.c linux-2.6.27.19-5.1/drivers/mtd/maps/physmap_of.c
---- linux-2.6.27/drivers/mtd/maps/physmap_of.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/maps/physmap_of.c 2009-03-25 16:11:20.000000000 +0000
-@@ -281,6 +281,7 @@ static struct of_device_id of_flash_matc
+diff -r 9608d5473017 drivers/mtd/maps/physmap_of.c
+--- a/drivers/mtd/maps/physmap_of.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/maps/physmap_of.c Wed May 06 16:56:23 2009 +0100
+@@ -281,6 +281,7 @@
MODULE_DEVICE_TABLE(of, of_flash_match);
static struct of_platform_driver of_flash_driver = {
.name = "of-flash",
.match_table = of_flash_match,
.probe = of_flash_probe,
-diff -purN linux-2.6.27/drivers/mtd/maps/sun_uflash.c linux-2.6.27.19-5.1/drivers/mtd/maps/sun_uflash.c
---- linux-2.6.27/drivers/mtd/maps/sun_uflash.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/maps/sun_uflash.c 2009-03-25 16:11:20.000000000 +0000
-@@ -151,6 +151,7 @@ static struct of_device_id uflash_match[
+diff -r 9608d5473017 drivers/mtd/maps/sun_uflash.c
+--- a/drivers/mtd/maps/sun_uflash.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/maps/sun_uflash.c Wed May 06 16:56:23 2009 +0100
+@@ -151,6 +151,7 @@
MODULE_DEVICE_TABLE(of, uflash_match);
static struct of_platform_driver uflash_driver = {
.name = UFLASH_DEVNAME,
.match_table = uflash_match,
.probe = uflash_probe,
-diff -purN linux-2.6.27/drivers/mtd/mtd_blkdevs.c linux-2.6.27.19-5.1/drivers/mtd/mtd_blkdevs.c
---- linux-2.6.27/drivers/mtd/mtd_blkdevs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/mtd_blkdevs.c 2009-03-25 16:11:20.000000000 +0000
-@@ -32,6 +32,14 @@ struct mtd_blkcore_priv {
+diff -r 9608d5473017 drivers/mtd/mtd_blkdevs.c
+--- a/drivers/mtd/mtd_blkdevs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/mtd_blkdevs.c Wed May 06 16:56:23 2009 +0100
+@@ -32,6 +32,14 @@
spinlock_t queue_lock;
};
static int do_blktrans_request(struct mtd_blktrans_ops *tr,
struct mtd_blktrans_dev *dev,
struct request *req)
-@@ -44,6 +52,10 @@ static int do_blktrans_request(struct mt
+@@ -43,6 +51,10 @@
+ nsect = req->current_nr_sectors << 9 >> tr->blkshift;
buf = req->buffer;
-
++
+ if (req->cmd_type == REQ_TYPE_LINUX_BLOCK &&
+ req->cmd[0] == REQ_LB_OP_DISCARD)
+ return !tr->discard(dev, block, nsect);
-+
+
if (!blk_fs_request(req))
return 0;
-
-@@ -367,6 +379,10 @@ int register_mtd_blktrans(struct mtd_blk
+@@ -367,6 +379,10 @@
tr->blkcore_priv->rq->queuedata = tr;
blk_queue_hardsect_size(tr->blkcore_priv->rq, tr->blksize);
tr->blkshift = ffs(tr->blksize) - 1;
tr->blkcore_priv->thread = kthread_run(mtd_blktrans_thread, tr,
-diff -purN linux-2.6.27/drivers/mtd/nand/fsl_elbc_nand.c linux-2.6.27.19-5.1/drivers/mtd/nand/fsl_elbc_nand.c
---- linux-2.6.27/drivers/mtd/nand/fsl_elbc_nand.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/nand/fsl_elbc_nand.c 2009-03-25 16:11:20.000000000 +0000
-@@ -1079,6 +1079,7 @@ static const struct of_device_id fsl_elb
+diff -r 9608d5473017 drivers/mtd/nand/fsl_elbc_nand.c
+--- a/drivers/mtd/nand/fsl_elbc_nand.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/nand/fsl_elbc_nand.c Wed May 06 16:56:23 2009 +0100
+@@ -1079,6 +1079,7 @@
static struct of_platform_driver fsl_elbc_ctrl_driver = {
.driver = {
.name = "fsl-elbc",
},
.match_table = fsl_elbc_match,
.probe = fsl_elbc_ctrl_probe,
-diff -purN linux-2.6.27/drivers/mtd/nand/fsl_upm.c linux-2.6.27.19-5.1/drivers/mtd/nand/fsl_upm.c
---- linux-2.6.27/drivers/mtd/nand/fsl_upm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/nand/fsl_upm.c 2009-03-25 16:11:20.000000000 +0000
-@@ -267,6 +267,7 @@ static struct of_device_id of_fun_match[
+diff -r 9608d5473017 drivers/mtd/nand/fsl_upm.c
+--- a/drivers/mtd/nand/fsl_upm.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/nand/fsl_upm.c Wed May 06 16:56:23 2009 +0100
+@@ -267,6 +267,7 @@
MODULE_DEVICE_TABLE(of, of_fun_match);
static struct of_platform_driver of_fun_driver = {
.name = "fsl,upm-nand",
.match_table = of_fun_match,
.probe = fun_probe,
-diff -purN linux-2.6.27/drivers/mtd/nand/pasemi_nand.c linux-2.6.27.19-5.1/drivers/mtd/nand/pasemi_nand.c
---- linux-2.6.27/drivers/mtd/nand/pasemi_nand.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/nand/pasemi_nand.c 2009-03-25 16:11:20.000000000 +0000
-@@ -220,6 +220,7 @@ MODULE_DEVICE_TABLE(of, pasemi_nand_matc
+diff -r 9608d5473017 drivers/mtd/nand/pasemi_nand.c
+--- a/drivers/mtd/nand/pasemi_nand.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/nand/pasemi_nand.c Wed May 06 16:56:23 2009 +0100
+@@ -220,6 +220,7 @@
static struct of_platform_driver pasemi_nand_driver =
{
.name = (char*)driver_name,
.match_table = pasemi_nand_match,
.probe = pasemi_nand_probe,
-diff -purN linux-2.6.27/drivers/net/3c505.c linux-2.6.27.19-5.1/drivers/net/3c505.c
---- linux-2.6.27/drivers/net/3c505.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/3c505.c 2009-03-25 16:11:05.000000000 +0000
-@@ -493,21 +493,27 @@ static bool receive_pcb(struct net_devic
+diff -r 9608d5473017 drivers/net/3c505.c
+--- a/drivers/net/3c505.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/3c505.c Wed May 06 16:56:23 2009 +0100
+@@ -493,21 +493,27 @@
}
/* read the data */
spin_lock_irqsave(&adapter->lock, flags);
/* safety check total length vs data length */
if (total_length != (pcb->length + 2)) {
-diff -purN linux-2.6.27/drivers/net/Kconfig linux-2.6.27.19-5.1/drivers/net/Kconfig
---- linux-2.6.27/drivers/net/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/Kconfig 2009-03-25 16:11:04.000000000 +0000
-@@ -1840,6 +1840,17 @@ config NE_H8300
+diff -r 9608d5473017 drivers/net/Kconfig
+--- a/drivers/net/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/Kconfig Wed May 06 16:56:23 2009 +0100
+@@ -1840,6 +1840,17 @@
Say Y here if you want to use the NE2000 compatible
controller on the Renesas H8/300 processor.
source "drivers/net/fs_enet/Kconfig"
endif # NET_ETHERNET
-@@ -2046,6 +2057,7 @@ config R8169
+@@ -2046,6 +2057,7 @@
tristate "Realtek 8169 gigabit ethernet support"
depends on PCI
select CRC32
---help---
Say Y here if you have a Realtek 8169 PCI Gigabit Ethernet adapter.
-@@ -2380,7 +2392,6 @@ config EHEA
+@@ -2380,7 +2392,6 @@
config IXGBE
tristate "Intel(R) 10GbE PCI Express adapters support"
depends on PCI && INET
---help---
This driver supports Intel(R) 10GbE PCI Express family of
adapters. For more information on how to identify your adapter, go
-@@ -2396,6 +2407,26 @@ config IXGBE
+@@ -2395,6 +2406,26 @@
+
To compile this driver as a module, choose M here. The module
will be called ixgbe.
-
++
+config IXGBE_LRO
+ bool "Use software LRO"
+ depends on IXGBE && INET
+ driver.
+
+ If unsure, say N.
-+
+
config IXGB
tristate "Intel(R) PRO/10GbE support"
- depends on PCI
-@@ -2514,9 +2545,9 @@ source "drivers/atm/Kconfig"
+@@ -2514,9 +2545,9 @@
source "drivers/s390/net/Kconfig"
default y
help
The network device frontend driver allows the kernel to
-diff -purN linux-2.6.27/drivers/net/Makefile linux-2.6.27.19-5.1/drivers/net/Makefile
---- linux-2.6.27/drivers/net/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/Makefile 2009-03-25 16:11:07.000000000 +0000
-@@ -15,6 +15,7 @@ obj-$(CONFIG_EHEA) += ehea/
+diff -r 9608d5473017 drivers/net/Makefile
+--- a/drivers/net/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/Makefile Wed May 06 16:56:23 2009 +0100
+@@ -15,6 +15,7 @@
obj-$(CONFIG_CAN) += can/
obj-$(CONFIG_BONDING) += bonding/
obj-$(CONFIG_ATL1) += atlx/
obj-$(CONFIG_ATL1E) += atl1e/
obj-$(CONFIG_GIANFAR) += gianfar_driver.o
obj-$(CONFIG_TEHUTI) += tehuti.o
-@@ -141,7 +142,7 @@ obj-$(CONFIG_PPPOL2TP) += pppox.o pppol2
+@@ -141,7 +142,7 @@
obj-$(CONFIG_SLIP) += slip.o
obj-$(CONFIG_SLHC) += slhc.o
obj-$(CONFIG_DUMMY) += dummy.o
obj-$(CONFIG_IFB) += ifb.o
-diff -purN linux-2.6.27/drivers/net/atl1e/atl1e_hw.c linux-2.6.27.19-5.1/drivers/net/atl1e/atl1e_hw.c
---- linux-2.6.27/drivers/net/atl1e/atl1e_hw.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/atl1e/atl1e_hw.c 2009-03-25 16:11:07.000000000 +0000
-@@ -163,9 +163,6 @@ int atl1e_read_mac_addr(struct atl1e_hw
+diff -r 9608d5473017 drivers/net/atl1e/atl1e_hw.c
+--- a/drivers/net/atl1e/atl1e_hw.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/atl1e/atl1e_hw.c Wed May 06 16:56:24 2009 +0100
+@@ -163,9 +163,6 @@
* atl1e_hash_mc_addr
* purpose
* set hash value for a multicast address
*/
u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr)
{
-@@ -174,7 +171,6 @@ u32 atl1e_hash_mc_addr(struct atl1e_hw *
+@@ -174,7 +171,6 @@
int i;
crc32 = ether_crc_le(6, mc_addr);
for (i = 0; i < 32; i++)
value |= (((crc32 >> i) & 1) << (31 - i));
-diff -purN linux-2.6.27/drivers/net/atl1e/atl1e_main.c linux-2.6.27.19-5.1/drivers/net/atl1e/atl1e_main.c
---- linux-2.6.27/drivers/net/atl1e/atl1e_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/atl1e/atl1e_main.c 2009-03-25 16:11:07.000000000 +0000
-@@ -2390,9 +2390,7 @@ static int __devinit atl1e_probe(struct
+diff -r 9608d5473017 drivers/net/atl1e/atl1e_main.c
+--- a/drivers/net/atl1e/atl1e_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/atl1e/atl1e_main.c Wed May 06 16:56:24 2009 +0100
+@@ -2390,9 +2390,7 @@
}
/* Init GPHY as early as possible due to power saving issue */
/* reset the controller to
* put the device in a known good starting state */
err = atl1e_reset_hw(&adapter->hw);
-diff -purN linux-2.6.27/drivers/net/atlx/Makefile linux-2.6.27.19-5.1/drivers/net/atlx/Makefile
---- linux-2.6.27/drivers/net/atlx/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/atlx/Makefile 2009-03-25 16:11:04.000000000 +0000
-@@ -1 +1,3 @@
+diff -r 9608d5473017 drivers/net/atlx/Makefile
+--- a/drivers/net/atlx/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/atlx/Makefile Wed May 06 16:56:24 2009 +0100
+@@ -1,1 +1,3 @@
obj-$(CONFIG_ATL1) += atl1.o
+obj-$(CONFIG_ATL2) += atl2.o
+
-diff -purN linux-2.6.27/drivers/net/atlx/atl1.c linux-2.6.27.19-5.1/drivers/net/atlx/atl1.c
---- linux-2.6.27/drivers/net/atlx/atl1.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/atlx/atl1.c 2009-03-25 16:11:04.000000000 +0000
-@@ -2317,7 +2317,8 @@ static void atl1_tx_queue(struct atl1_ad
+diff -r 9608d5473017 drivers/net/atlx/atl1.c
+--- a/drivers/net/atlx/atl1.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/atlx/atl1.c Wed May 06 16:56:24 2009 +0100
+@@ -2317,7 +2317,8 @@
if (tpd != ptpd)
memcpy(tpd, ptpd, sizeof(struct tx_packet_desc));
tpd->buffer_addr = cpu_to_le64(buffer_info->dma);
TPD_BUFLEN_MASK) << TPD_BUFLEN_SHIFT;
/*
-@@ -2426,8 +2427,8 @@ static int atl1_xmit_frame(struct sk_buf
+@@ -2426,8 +2427,8 @@
vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) |
((vlan_tag >> 9) & 0x8);
ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;
}
tso = atl1_tso(adapter, skb, ptpd);
-diff -purN linux-2.6.27/drivers/net/atlx/atl1.h linux-2.6.27.19-5.1/drivers/net/atlx/atl1.h
---- linux-2.6.27/drivers/net/atlx/atl1.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/atlx/atl1.h 2009-03-25 16:11:04.000000000 +0000
-@@ -504,7 +504,7 @@ struct rx_free_desc {
+diff -r 9608d5473017 drivers/net/atlx/atl1.h
+--- a/drivers/net/atlx/atl1.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/atlx/atl1.h Wed May 06 16:56:24 2009 +0100
+@@ -504,7 +504,7 @@
#define TPD_PKTNT_MASK 0x0001
#define TPD_PKTINT_SHIFT 15
#define TPD_VLANTAG_MASK 0xFFFF
/* tpd word 3 bits 0:13 */
#define TPD_EOP_MASK 0x0001
-diff -purN linux-2.6.27/drivers/net/atlx/atl2.c linux-2.6.27.19-5.1/drivers/net/atlx/atl2.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/atlx/atl2.c 2009-03-25 16:11:04.000000000 +0000
+diff -r 9608d5473017 drivers/net/atlx/atl2.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/atlx/atl2.c Wed May 06 16:56:24 2009 +0100
@@ -0,0 +1,3127 @@
+/*
+ * Copyright(c) 2006 - 2007 Atheros Corporation. All rights reserved.
+ adapter->hw.MediaType = (u16)(opt.def);
+#endif
+}
-diff -purN linux-2.6.27/drivers/net/atlx/atl2.h linux-2.6.27.19-5.1/drivers/net/atlx/atl2.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/atlx/atl2.h 2009-03-25 16:11:04.000000000 +0000
+diff -r 9608d5473017 drivers/net/atlx/atl2.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/atlx/atl2.h Wed May 06 16:56:24 2009 +0100
@@ -0,0 +1,530 @@
+/* atl2.h -- atl2 driver definitions
+ *
+};
+
+#endif /* _ATL2_H_ */
-diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.c
---- linux-2.6.27/drivers/net/bnx2.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bnx2.c 2009-03-25 16:11:06.000000000 +0000
-@@ -89,6 +89,7 @@ typedef enum {
+diff -r 9608d5473017 drivers/net/bnx2.c
+--- a/drivers/net/bnx2.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bnx2.c Wed May 06 16:56:24 2009 +0100
+@@ -89,6 +89,7 @@
BCM5709,
BCM5709S,
BCM5716,
} board_t;
/* indexed by board_t, above */
-@@ -105,6 +106,7 @@ static struct {
+@@ -105,6 +106,7 @@
{ "Broadcom NetXtreme II BCM5709 1000Base-T" },
{ "Broadcom NetXtreme II BCM5709 1000Base-SX" },
{ "Broadcom NetXtreme II BCM5716 1000Base-T" },
};
static DEFINE_PCI_DEVICE_TABLE(bnx2_pci_tbl) = {
-@@ -128,6 +130,8 @@ static DEFINE_PCI_DEVICE_TABLE(bnx2_pci_
+@@ -128,6 +130,8 @@
PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5709S },
{ PCI_VENDOR_ID_BROADCOM, 0x163b,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5716 },
{ 0, }
};
-@@ -543,9 +547,9 @@ bnx2_free_rx_mem(struct bnx2 *bp)
+@@ -543,9 +547,9 @@
for (j = 0; j < bp->rx_max_pg_ring; j++) {
if (rxr->rx_pg_desc_ring[j])
pci_free_consistent(bp->pdev, RXBD_RING_SIZE,
}
if (rxr->rx_pg_ring)
vfree(rxr->rx_pg_ring);
-@@ -2472,7 +2476,7 @@ bnx2_alloc_rx_page(struct bnx2 *bp, stru
+@@ -2472,7 +2476,7 @@
struct sw_pg *rx_pg = &rxr->rx_pg_ring[index];
struct rx_bd *rxbd =
&rxr->rx_pg_desc_ring[RX_RING(index)][RX_IDX(index)];
if (!page)
return -ENOMEM;
-@@ -2497,7 +2501,7 @@ bnx2_free_rx_page(struct bnx2 *bp, struc
+@@ -2497,7 +2501,7 @@
pci_unmap_page(bp->pdev, pci_unmap_addr(rx_pg, mapping), PAGE_SIZE,
PCI_DMA_FROMDEVICE);
rx_pg->page = NULL;
}
-@@ -2828,9 +2832,7 @@ bnx2_rx_skb(struct bnx2 *bp, struct bnx2
+@@ -2828,9 +2832,7 @@
}
frag_size -= frag_len;
pg_prod = NEXT_RX_BD(pg_prod);
pg_cons = RX_PG_RING_IDX(NEXT_RX_BD(pg_cons));
-@@ -3250,6 +3252,9 @@ bnx2_set_rx_mode(struct net_device *dev)
+@@ -3250,6 +3252,9 @@
struct dev_addr_list *uc_ptr;
int i;
spin_lock_bh(&bp->phy_lock);
rx_mode = bp->rx_mode & ~(BNX2_EMAC_RX_MODE_PROMISCUOUS |
-@@ -5075,6 +5080,21 @@ bnx2_init_nic(struct bnx2 *bp, int reset
- }
-
- static int
+@@ -5072,6 +5077,21 @@
+ bnx2_remote_phy_event(bp);
+ spin_unlock_bh(&bp->phy_lock);
+ return 0;
++}
++
++static int
+bnx2_shutdown_chip(struct bnx2 *bp)
+{
+ u32 reset_code;
+ reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL;
+
+ return bnx2_reset_chip(bp, reset_code);
-+}
-+
-+static int
- bnx2_test_registers(struct bnx2 *bp)
- {
- int ret;
-@@ -5508,6 +5528,9 @@ bnx2_test_link(struct bnx2 *bp)
+ }
+
+ static int
+@@ -5508,6 +5528,9 @@
{
u32 bmsr;
if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) {
if (bp->link_up)
return 0;
-@@ -6097,20 +6120,13 @@ static int
+@@ -6097,20 +6120,13 @@
bnx2_close(struct net_device *dev)
{
struct bnx2 *bp = netdev_priv(dev);
bnx2_free_irq(bp);
bnx2_free_skbs(bp);
bnx2_free_mem(bp);
-@@ -6479,6 +6495,9 @@ bnx2_nway_reset(struct net_device *dev)
+@@ -6479,6 +6495,9 @@
struct bnx2 *bp = netdev_priv(dev);
u32 bmcr;
if (!(bp->autoneg & AUTONEG_SPEED)) {
return -EINVAL;
}
-@@ -6534,6 +6553,9 @@ bnx2_get_eeprom(struct net_device *dev,
+@@ -6534,6 +6553,9 @@
struct bnx2 *bp = netdev_priv(dev);
int rc;
/* parameters already validated in ethtool_get_eeprom */
rc = bnx2_nvram_read(bp, eeprom->offset, eebuf, eeprom->len);
-@@ -6548,6 +6570,9 @@ bnx2_set_eeprom(struct net_device *dev,
+@@ -6547,6 +6569,9 @@
+ {
struct bnx2 *bp = netdev_priv(dev);
int rc;
-
++
+ if (!netif_running(dev))
+ return -EAGAIN;
-+
+
/* parameters already validated in ethtool_set_eeprom */
- rc = bnx2_nvram_write(bp, eeprom->offset, eebuf, eeprom->len);
-@@ -6712,11 +6737,11 @@ bnx2_set_pauseparam(struct net_device *d
+@@ -6712,11 +6737,11 @@
bp->autoneg &= ~AUTONEG_FLOW_CTRL;
}
return 0;
}
-@@ -6907,6 +6932,8 @@ bnx2_self_test(struct net_device *dev, s
+@@ -6907,6 +6932,8 @@
{
struct bnx2 *bp = netdev_priv(dev);
memset(buf, 0, sizeof(u64) * BNX2_NUM_TESTS);
if (etest->flags & ETH_TEST_FL_OFFLINE) {
int i;
-@@ -6926,9 +6953,8 @@ bnx2_self_test(struct net_device *dev, s
+@@ -6926,9 +6953,8 @@
if ((buf[2] = bnx2_test_loopback(bp)) != 0)
etest->flags |= ETH_TEST_FL_FAILED;
else {
bnx2_init_nic(bp, 1);
bnx2_netif_start(bp);
-@@ -6956,6 +6982,8 @@ bnx2_self_test(struct net_device *dev, s
+@@ -6956,6 +6982,8 @@
etest->flags |= ETH_TEST_FL_FAILED;
}
}
static void
-@@ -7021,6 +7049,8 @@ bnx2_phys_id(struct net_device *dev, u32
+@@ -7021,6 +7049,8 @@
int i;
u32 save;
if (data == 0)
data = 2;
-@@ -7045,6 +7075,10 @@ bnx2_phys_id(struct net_device *dev, u32
+@@ -7045,6 +7075,10 @@
}
REG_WR(bp, BNX2_EMAC_LED, 0);
REG_WR(bp, BNX2_MISC_CFG, save);
return 0;
}
-@@ -7781,7 +7815,6 @@ bnx2_suspend(struct pci_dev *pdev, pm_me
+@@ -7781,7 +7815,6 @@
{
struct net_device *dev = pci_get_drvdata(pdev);
struct bnx2 *bp = netdev_priv(dev);
/* PCI register 4 needs to be saved whether netif_running() or not.
* MSI address and data need to be saved if using MSI and
-@@ -7795,13 +7828,7 @@ bnx2_suspend(struct pci_dev *pdev, pm_me
+@@ -7795,13 +7828,7 @@
bnx2_netif_stop(bp);
netif_device_detach(dev);
del_timer_sync(&bp->timer);
bnx2_free_skbs(bp);
bnx2_set_power_state(bp, pci_choose_state(pdev, state));
return 0;
-diff -purN linux-2.6.27/drivers/net/bnx2x.h linux-2.6.27.19-5.1/drivers/net/bnx2x.h
---- linux-2.6.27/drivers/net/bnx2x.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bnx2x.h 2009-03-25 16:11:08.000000000 +0000
+diff -r 9608d5473017 drivers/net/bnx2x.h
+--- a/drivers/net/bnx2x.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bnx2x.h Wed May 06 16:56:24 2009 +0100
@@ -1,6 +1,6 @@
/* bnx2x.h: Broadcom Everest network driver.
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
-@@ -20,6 +20,11 @@
+@@ -19,6 +19,11 @@
+ /* define this to make the driver freeze on error to allow getting debug info
* (you will need to reboot afterwards) */
/* #define BNX2X_STOP_ON_ERROR */
-
++
+#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
+#define BCM_VLAN 1
+#endif
+
-+
+
/* error/debug prints */
- #define DRV_MODULE_NAME "bnx2x"
@@ -78,11 +83,6 @@
#endif
#define U64_LO(x) (u32)(((u64)(x)) & 0xffffffff)
#define U64_HI(x) (u32)(((u64)(x)) >> 32)
#define HILO_U64(hi, lo) ((((u64)(hi)) << 32) + (lo))
-@@ -150,6 +150,9 @@ struct sw_rx_page {
+@@ -150,6 +150,9 @@
#define PAGES_PER_SGE_SHIFT 0
#define PAGES_PER_SGE (1 << PAGES_PER_SGE_SHIFT)
#define BCM_RX_ETH_PAYLOAD_ALIGN 64
-@@ -268,14 +271,7 @@ struct bnx2x_fastpath {
+@@ -268,14 +271,7 @@
#define bnx2x_fp(bp, nr, var) (bp->fp[nr].var)
/* MC hsi */
-@@ -736,7 +732,7 @@ struct bnx2x {
+@@ -736,7 +732,7 @@
struct bnx2x_fastpath fp[MAX_CONTEXT];
void __iomem *regview;
void __iomem *doorbells;
struct net_device *dev;
struct pci_dev *pdev;
-@@ -801,6 +797,8 @@ struct bnx2x {
+@@ -801,6 +797,8 @@
#define TPA_ENABLE_FLAG 0x80
#define NO_MCP_FLAG 0x100
#define BP_NOMCP(bp) (bp->flags & NO_MCP_FLAG)
int func;
#define BP_PORT(bp) (bp->func % PORT_MAX)
-@@ -811,7 +809,7 @@ struct bnx2x {
+@@ -811,7 +809,7 @@
int pm_cap;
int pcie_cap;
struct work_struct reset_task;
struct timer_list timer;
-diff -purN linux-2.6.27/drivers/net/bnx2x_init.h linux-2.6.27.19-5.1/drivers/net/bnx2x_init.h
---- linux-2.6.27/drivers/net/bnx2x_init.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bnx2x_init.h 2009-03-25 16:11:03.000000000 +0000
-@@ -564,14 +564,15 @@ static const struct arb_line write_arb_a
+diff -r 9608d5473017 drivers/net/bnx2x_init.h
+--- a/drivers/net/bnx2x_init.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bnx2x_init.h Wed May 06 16:56:24 2009 +0100
+@@ -564,14 +564,15 @@
static void bnx2x_init_pxp(struct bnx2x *bp)
{
if (r_order > MAX_RD_ORD) {
DP(NETIF_MSG_HW, "read order of %d order adjusted to %d\n",
-diff -purN linux-2.6.27/drivers/net/bnx2x_link.c linux-2.6.27.19-5.1/drivers/net/bnx2x_link.c
---- linux-2.6.27/drivers/net/bnx2x_link.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bnx2x_link.c 2009-03-25 16:11:08.000000000 +0000
+diff -r 9608d5473017 drivers/net/bnx2x_link.c
+--- a/drivers/net/bnx2x_link.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bnx2x_link.c Wed May 06 16:56:24 2009 +0100
@@ -1,4 +1,4 @@
-/* Copyright 2008 Broadcom Corporation
+/* Copyright 2008-2009 Broadcom Corporation
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
-@@ -317,6 +317,9 @@ static u8 bnx2x_emac_enable(struct link_
+@@ -317,6 +317,9 @@
val &= ~0x810;
EMAC_WR(bp, EMAC_REG_EMAC_MODE, val);
/* enable emac for jumbo packets */
EMAC_WR(bp, EMAC_REG_EMAC_RX_MTU_SIZE,
(EMAC_RX_MTU_SIZE_JUMBO_ENA |
-@@ -1609,7 +1612,7 @@ static u8 bnx2x_link_settings_status(str
+@@ -1609,7 +1612,7 @@
u32 gp_status)
{
struct bnx2x *bp = params->bp;
u8 rc = 0;
vars->link_status = 0;
-@@ -1629,7 +1632,7 @@ static u8 bnx2x_link_settings_status(str
+@@ -1629,7 +1632,7 @@
switch (gp_status & GP_STATUS_SPEED_MASK) {
case GP_STATUS_10M:
if (vars->duplex == DUPLEX_FULL)
vars->link_status |= LINK_10TFD;
else
-@@ -1637,7 +1640,7 @@ static u8 bnx2x_link_settings_status(str
+@@ -1637,7 +1640,7 @@
break;
case GP_STATUS_100M:
if (vars->duplex == DUPLEX_FULL)
vars->link_status |= LINK_100TXFD;
else
-@@ -1646,7 +1649,7 @@ static u8 bnx2x_link_settings_status(str
+@@ -1646,7 +1649,7 @@
case GP_STATUS_1G:
case GP_STATUS_1G_KX:
if (vars->duplex == DUPLEX_FULL)
vars->link_status |= LINK_1000TFD;
else
-@@ -1654,7 +1657,7 @@ static u8 bnx2x_link_settings_status(str
+@@ -1654,7 +1657,7 @@
break;
case GP_STATUS_2_5G:
if (vars->duplex == DUPLEX_FULL)
vars->link_status |= LINK_2500TFD;
else
-@@ -1671,32 +1674,32 @@ static u8 bnx2x_link_settings_status(str
+@@ -1671,32 +1674,32 @@
case GP_STATUS_10G_KX4:
case GP_STATUS_10G_HIG:
case GP_STATUS_10G_CX4:
vars->link_status |= LINK_16GTFD;
break;
-@@ -1708,6 +1711,15 @@ static u8 bnx2x_link_settings_status(str
+@@ -1708,6 +1711,15 @@
break;
}
vars->link_status |= LINK_STATUS_SERDES_LINK;
if ((params->req_line_speed == SPEED_AUTO_NEG) &&
-@@ -3571,7 +3583,7 @@ static void bnx2x_set_xgxs_loopback(stru
+@@ -3571,7 +3583,7 @@
(MDIO_REG_BANK_CL73_IEEEB0 +
(MDIO_CL73_IEEEB0_CL73_AN_CONTROL & 0xf)),
0x6041);
/* set aer mmd back */
bnx2x_set_aer_mmd(params, vars);
-@@ -3870,9 +3882,15 @@ static u8 bnx2x_link_initialize(struct l
+@@ -3870,9 +3882,15 @@
}
if (vars->phy_flags & PHY_XGXS_FLAG) {
vars->phy_flags |= PHY_SGMII_FLAG;
} else {
vars->phy_flags &= ~PHY_SGMII_FLAG;
-@@ -4194,6 +4212,11 @@ static u8 bnx2x_update_link_down(struct
+@@ -4194,6 +4212,11 @@
/* activate nig drain */
REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + port*4, 1);
/* reset BigMac */
bnx2x_bmac_rx_disable(bp, params->port);
REG_WR(bp, GRCBASE_MISC +
-@@ -4238,6 +4261,7 @@ static u8 bnx2x_update_link_up(struct li
+@@ -4238,6 +4261,7 @@
/* update shared memory */
bnx2x_update_mng(params, vars->link_status);
return rc;
}
/* This function should called upon link interrupt */
-@@ -4276,6 +4300,9 @@ u8 bnx2x_link_update(struct link_params
+@@ -4276,6 +4300,9 @@
REG_RD(bp, NIG_REG_XGXS0_STATUS_LINK10G + port*0x68),
REG_RD(bp, NIG_REG_XGXS0_STATUS_LINK_STATUS + port*0x68));
ext_phy_type = XGXS_EXT_PHY_TYPE(params->ext_phy_config);
/* Check external link change only for non-direct */
-@@ -4377,10 +4404,11 @@ static u8 bnx2x_8073_common_init_phy(str
+@@ -4377,10 +4404,11 @@
ext_phy_addr[port],
MDIO_PMA_DEVAD,
MDIO_PMA_REG_ROM_VER1, &fw_ver1);
- if (fw_ver1 == 0) {
-+ if (fw_ver1 == 0 || fw_ver1 == 0x4321) {
- DP(NETIF_MSG_LINK,
+- DP(NETIF_MSG_LINK,
- "bnx2x_8073_common_init_phy port %x "
- "fw Download failed\n", port);
++ if (fw_ver1 == 0 || fw_ver1 == 0x4321) {
++ DP(NETIF_MSG_LINK,
+ "bnx2x_8073_common_init_phy port %x:"
+ "Download failed. fw version = 0x%x\n",
+ port, fw_ver1);
return -EINVAL;
}
-diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net/bnx2x_main.c
---- linux-2.6.27/drivers/net/bnx2x_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bnx2x_main.c 2009-03-25 16:11:03.000000000 +0000
+diff -r 9608d5473017 drivers/net/bnx2x_main.c
+--- a/drivers/net/bnx2x_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bnx2x_main.c Wed May 06 16:56:24 2009 +0100
@@ -1,6 +1,6 @@
/* bnx2x_main.c: Broadcom Everest network driver.
*
#define BNX2X_BC_VER 0x040200
/* Time in jiffies before concluding the transmitter is hung */
-@@ -71,7 +69,7 @@ static char version[] __devinitdata =
+@@ -71,7 +69,7 @@
DRV_MODULE_NAME " " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
MODULE_AUTHOR("Eliezer Tamir");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_MODULE_VERSION);
-@@ -95,6 +93,7 @@ MODULE_PARM_DESC(debug, "default debug m
+@@ -95,6 +93,7 @@
module_param(use_multi, int, 0);
MODULE_PARM_DESC(use_multi, "use per-CPU queues");
#endif
enum bnx2x_board_type {
BCM57710 = 0,
-@@ -649,15 +648,16 @@ static void bnx2x_int_disable(struct bnx
+@@ -649,15 +648,16 @@
BNX2X_ERR("BUG! proper val not read from IGU!\n");
}
/* make sure all ISRs are done */
if (msix) {
-@@ -670,7 +670,8 @@ static void bnx2x_int_disable_sync(struc
+@@ -670,7 +670,8 @@
synchronize_irq(bp->pdev->irq);
/* make sure sp_task is not running */
}
/* fast path */
-@@ -732,6 +733,24 @@ static u16 bnx2x_ack_int(struct bnx2x *b
+@@ -731,6 +732,24 @@
+ /*
* fast path service functions
*/
-
++
+static inline int bnx2x_has_tx_work(struct bnx2x_fastpath *fp)
+{
+ u16 tx_cons_sb;
+ return (fp->tx_pkt_prod != fp->tx_pkt_cons);
+
+}
-+
+
/* free skb in the packet ring at pos idx
* return idx of last bd freed
- */
-@@ -971,7 +990,7 @@ static inline void bnx2x_free_rx_sge(str
+@@ -971,7 +990,7 @@
return;
pci_unmap_page(bp->pdev, pci_unmap_addr(sw_buf, mapping),
__free_pages(page, PAGES_PER_SGE_SHIFT);
sw_buf->page = NULL;
-@@ -999,7 +1018,7 @@ static inline int bnx2x_alloc_rx_sge(str
+@@ -999,7 +1018,7 @@
if (unlikely(page == NULL))
return -ENOMEM;
PCI_DMA_FROMDEVICE);
if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) {
__free_pages(page, PAGES_PER_SGE_SHIFT);
-@@ -1095,9 +1114,9 @@ static void bnx2x_update_sge_prod(struct
+@@ -1095,9 +1114,9 @@
struct eth_fast_path_rx_cqe *fp_cqe)
{
struct bnx2x *bp = fp->bp;
u16 last_max, last_elem, first_elem;
u16 delta = 0;
u16 i;
-@@ -1202,22 +1221,22 @@ static int bnx2x_fill_frag_skb(struct bn
+@@ -1202,22 +1221,22 @@
u16 cqe_idx)
{
struct sw_rx_page *rx_pg, old_rx_pg;
BNX2X_ERR("SGL length is too long: %d. CQE index is %d\n",
pages, cqe_idx);
BNX2X_ERR("fp_cqe->pkt_len = %d fp_cqe->len_on_bd = %d\n",
-@@ -1233,9 +1252,8 @@ static int bnx2x_fill_frag_skb(struct bn
+@@ -1233,9 +1252,8 @@
/* FW gives the indices of the SGE as if the ring is an array
(meaning that "next" element will consume 2 indices) */
old_rx_pg = *rx_pg;
/* If we fail to allocate a substitute page, we simply stop
-@@ -1248,7 +1266,7 @@ static int bnx2x_fill_frag_skb(struct bn
+@@ -1248,7 +1266,7 @@
/* Unmap the page as we r going to pass it to the stack */
pci_unmap_page(bp->pdev, pci_unmap_addr(&old_rx_pg, mapping),
/* Add one frag and update the appropriate fields in the skb */
skb_fill_page_desc(skb, j, old_rx_pg.page, 0, frag_len);
-@@ -1281,6 +1299,13 @@ static void bnx2x_tpa_stop(struct bnx2x
+@@ -1281,6 +1299,13 @@
if (likely(new_skb)) {
/* fix ip xsum and give it to the stack */
/* (no need to map the new skb) */
prefetch(skb);
prefetch(((char *)(skb)) + 128);
-@@ -1305,6 +1330,12 @@ static void bnx2x_tpa_stop(struct bnx2x
+@@ -1305,6 +1330,12 @@
struct iphdr *iph;
iph = (struct iphdr *)skb->data;
iph->check = 0;
iph->check = ip_fast_csum((u8 *)iph, iph->ihl);
}
-@@ -1312,9 +1343,8 @@ static void bnx2x_tpa_stop(struct bnx2x
+@@ -1312,9 +1343,8 @@
if (!bnx2x_fill_frag_skb(bp, fp, skb,
&cqe->fast_path_cqe, cqe_idx)) {
#ifdef BCM_VLAN
vlan_hwaccel_receive_skb(skb, bp->vlgrp,
le16_to_cpu(cqe->fast_path_cqe.
vlan_tag));
-@@ -1355,11 +1385,23 @@ static inline void bnx2x_update_rx_prod(
+@@ -1355,10 +1385,22 @@
rx_prods.cqe_prod = rx_comp_prod;
rx_prods.sge_prod = rx_sge_prod;
REG_WR(bp, BAR_TSTRORM_INTMEM +
TSTORM_RX_PRODS_OFFSET(BP_PORT(bp), FP_CL_ID(fp)) + i*4,
((u32 *)&rx_prods)[i]);
-
-+ mmiowb(); /* keep prod updates ordered */
+
++ mmiowb(); /* keep prod updates ordered */
+
DP(NETIF_MSG_RX_STATUS,
"Wrote: bd_prod %u cqe_prod %u sge_prod %u\n",
- bd_prod, rx_comp_prod, rx_sge_prod);
-@@ -1415,7 +1457,7 @@ static int bnx2x_rx_int(struct bnx2x_fas
+@@ -1415,7 +1457,7 @@
DP(NETIF_MSG_RX_STATUS, "CQE type %x err %x status %x"
" queue %x vlan %x len %u\n", CQE_TYPE(cqe_fp_flags),
cqe_fp_flags, cqe->fast_path_cqe.status_flags,
le16_to_cpu(cqe->fast_path_cqe.vlan_tag),
le16_to_cpu(cqe->fast_path_cqe.pkt_len));
-@@ -1547,7 +1589,7 @@ reuse_rx:
+@@ -1547,7 +1589,7 @@
}
#ifdef BCM_VLAN
(le16_to_cpu(cqe->fast_path_cqe.pars_flags.flags) &
PARSING_FLAGS_VLAN))
vlan_hwaccel_receive_skb(skb, bp->vlgrp,
-@@ -1581,7 +1623,6 @@ next_cqe:
+@@ -1581,7 +1623,6 @@
/* Update producers */
bnx2x_update_rx_prod(bp, fp, bd_prod_fw, sw_comp_prod,
fp->rx_sge_prod);
fp->rx_pkt += rx_pkt;
fp->rx_calls++;
-@@ -1662,7 +1703,7 @@ static irqreturn_t bnx2x_interrupt(int i
+@@ -1662,7 +1703,7 @@
if (unlikely(status & 0x1)) {
status &= ~0x1;
if (!status)
-@@ -1889,7 +1930,8 @@ static int bnx2x_set_spio(struct bnx2x *
+@@ -1889,7 +1930,8 @@
static void bnx2x_calc_fc_adv(struct bnx2x *bp)
{
case MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_NONE:
bp->port.advertising &= ~(ADVERTISED_Asym_Pause |
ADVERTISED_Pause);
-@@ -1959,10 +2001,11 @@ static u8 bnx2x_initial_phy_init(struct
+@@ -1959,10 +2001,11 @@
rc = bnx2x_phy_init(&bp->link_params, &bp->link_vars);
bnx2x_release_phy_lock(bp);
return rc;
}
-@@ -2222,9 +2265,7 @@ static void bnx2x_link_attn(struct bnx2x
+@@ -2222,9 +2265,7 @@
/* Make sure that we are synced with the current statistics */
bnx2x_stats_handle(bp, STATS_EVENT_STOP);
if (bp->link_vars.link_up) {
-@@ -2473,6 +2514,8 @@ static void bnx2x_attn_int_asserted(stru
+@@ -2473,6 +2514,8 @@
if (asserted & ATTN_HARD_WIRED_MASK) {
if (asserted & ATTN_NIG_FOR_FUNC) {
/* save nig interrupt mask */
bp->nig_mask = REG_RD(bp, nig_int_mask_addr);
REG_WR(bp, nig_int_mask_addr, 0);
-@@ -2528,8 +2571,10 @@ static void bnx2x_attn_int_asserted(stru
+@@ -2528,8 +2571,10 @@
REG_WR(bp, hc_addr, asserted);
/* now set back the mask */
}
static inline void bnx2x_attn_int_deasserted0(struct bnx2x *bp, u32 attn)
-@@ -2797,8 +2842,10 @@ static void bnx2x_attn_int_deasserted(st
+@@ -2797,8 +2842,10 @@
static void bnx2x_attn_int(struct bnx2x *bp)
{
/* read local copy of bits */
u32 attn_state = bp->attn_state;
/* look for changed bits */
-@@ -2822,7 +2869,7 @@ static void bnx2x_attn_int(struct bnx2x
+@@ -2822,7 +2869,7 @@
static void bnx2x_sp_task(struct work_struct *work)
{
u16 status;
-@@ -2846,7 +2893,7 @@ static void bnx2x_sp_task(struct work_st
+@@ -2846,7 +2893,7 @@
if (status & 0x2)
bp->stats_pending = 0;
IGU_INT_NOP, 1);
bnx2x_ack_sb(bp, DEF_SB_ID, USTORM_ID, le16_to_cpu(bp->def_u_idx),
IGU_INT_NOP, 1);
-@@ -2877,7 +2924,7 @@ static irqreturn_t bnx2x_msix_sp_int(int
+@@ -2877,7 +2924,7 @@
return IRQ_HANDLED;
#endif
return IRQ_HANDLED;
}
-@@ -2894,7 +2941,7 @@ static irqreturn_t bnx2x_msix_sp_int(int
+@@ -2894,7 +2941,7 @@
#define ADD_64(s_hi, a_hi, s_lo, a_lo) \
do { \
s_lo += a_lo; \
} while (0)
/* difference = minuend - subtrahend */
-@@ -4498,7 +4545,7 @@ static void bnx2x_init_context(struct bn
+@@ -4498,7 +4545,7 @@
static void bnx2x_init_ind_table(struct bnx2x *bp)
{
int i;
if (!is_multi(bp))
-@@ -4507,10 +4554,8 @@ static void bnx2x_init_ind_table(struct
+@@ -4507,10 +4554,8 @@
DP(NETIF_MSG_IFUP, "Initializing indirection table\n");
for (i = 0; i < TSTORM_INDIRECTION_TABLE_SIZE; i++)
REG_WR8(bp, BAR_TSTRORM_INTMEM +
}
static void bnx2x_set_client_config(struct bnx2x *bp)
-@@ -4519,12 +4564,12 @@ static void bnx2x_set_client_config(stru
+@@ -4519,12 +4564,12 @@
int port = BP_PORT(bp);
int i;
tstorm_client.config_flags |=
TSTORM_ETH_CLIENT_CONFIG_VLAN_REMOVAL_ENABLE;
DP(NETIF_MSG_IFUP, "vlan removal enabled\n");
-@@ -4533,7 +4578,7 @@ static void bnx2x_set_client_config(stru
+@@ -4533,7 +4578,7 @@
if (bp->flags & TPA_ENABLE_FLAG) {
tstorm_client.max_sges_for_packet =
tstorm_client.max_sges_for_packet =
((tstorm_client.max_sges_for_packet +
PAGES_PER_SGE - 1) & (~(PAGES_PER_SGE - 1))) >>
-@@ -4716,10 +4761,11 @@ static void bnx2x_init_internal_func(str
+@@ -4716,10 +4761,11 @@
bp->e1hov);
}
for_each_queue(bp, i) {
struct bnx2x_fastpath *fp = &bp->fp[i];
-@@ -4787,6 +4833,15 @@ static void bnx2x_nic_init(struct bnx2x
+@@ -4787,6 +4833,15 @@
bnx2x_init_context(bp);
bnx2x_init_internal(bp, load_code);
bnx2x_init_ind_table(bp);
bnx2x_int_enable(bp);
}
-@@ -5103,12 +5158,21 @@ static void enable_blocks_attention(stru
+@@ -5103,12 +5158,21 @@
}
REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, 0xffffffff);
REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, 0xfffc);
-@@ -5136,7 +5200,6 @@ static int bnx2x_init_common(struct bnx2
+@@ -5136,7 +5200,6 @@
REG_WR(bp, PXP2_REG_RQ_SRC_ENDIAN_M, 1);
REG_WR(bp, PXP2_REG_RQ_CDU_ENDIAN_M, 1);
REG_WR(bp, PXP2_REG_RQ_DBG_ENDIAN_M, 1);
/* REG_WR(bp, PXP2_REG_RD_PBF_SWAP_MODE, 1); */
REG_WR(bp, PXP2_REG_RD_QM_SWAP_MODE, 1);
-@@ -5214,6 +5277,7 @@ static int bnx2x_init_common(struct bnx2
+@@ -5214,6 +5277,7 @@
}
bnx2x_init_block(bp, PRS_COMMON_START, PRS_COMMON_END);
/* set NIC mode */
REG_WR(bp, PRS_REG_NIC_MODE, 1);
if (CHIP_IS_E1H(bp))
-@@ -6086,11 +6150,11 @@ static void bnx2x_netif_start(struct bnx
+@@ -6086,11 +6150,11 @@
}
}
-static void bnx2x_netif_stop(struct bnx2x *bp)
-+static void bnx2x_netif_stop(struct bnx2x *bp, int disable_hw)
- {
+-{
- bnx2x_int_disable_sync(bp);
++static void bnx2x_netif_stop(struct bnx2x *bp, int disable_hw)
++{
+ bnx2x_int_disable_sync(bp, disable_hw);
+ bnx2x_napi_disable(bp);
if (netif_running(bp->dev)) {
netif_tx_disable(bp->dev);
bp->dev->trans_start = jiffies; /* prevent tx timeout */
}
-@@ -6110,7 +6174,7 @@ static void bnx2x_set_mac_addr_e1(struct
+@@ -6110,7 +6174,7 @@
* multicast 64-127:port0 128-191:port1
*/
config->hdr.length_6b = 2;
config->hdr.client_id = BP_CL_ID(bp);
config->hdr.reserved1 = 0;
-@@ -6274,7 +6338,7 @@ static void bnx2x_set_rx_mode(struct net
+@@ -6274,13 +6338,84 @@
static int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
{
u32 load_code;
#ifdef BNX2X_STOP_ON_ERROR
if (unlikely(bp->panic))
return -EPERM;
-@@ -6282,48 +6346,6 @@ static int bnx2x_nic_load(struct bnx2x *
+ #endif
bp->state = BNX2X_STATE_OPENING_WAIT4_LOAD;
-
-- /* Send LOAD_REQUEST command to MCP
-- Returns the type of LOAD command:
-- if it is the first port to be initialized
-- common blocks should be initialized, otherwise - not
-- */
-- if (!BP_NOMCP(bp)) {
-- load_code = bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_REQ);
-- if (!load_code) {
-- BNX2X_ERR("MCP response failure, aborting\n");
-- return -EBUSY;
-- }
-- if (load_code == FW_MSG_CODE_DRV_LOAD_REFUSED)
-- return -EBUSY; /* other port in diagnostic mode */
--
-- } else {
-- int port = BP_PORT(bp);
--
-- DP(NETIF_MSG_IFUP, "NO MCP load counts before us %d, %d, %d\n",
-- load_count[0], load_count[1], load_count[2]);
-- load_count[0]++;
-- load_count[1 + port]++;
-- DP(NETIF_MSG_IFUP, "NO MCP new load counts %d, %d, %d\n",
-- load_count[0], load_count[1], load_count[2]);
-- if (load_count[0] == 1)
-- load_code = FW_MSG_CODE_DRV_LOAD_COMMON;
-- else if (load_count[1 + port] == 1)
-- load_code = FW_MSG_CODE_DRV_LOAD_PORT;
-- else
-- load_code = FW_MSG_CODE_DRV_LOAD_FUNCTION;
-- }
--
-- if ((load_code == FW_MSG_CODE_DRV_LOAD_COMMON) ||
-- (load_code == FW_MSG_CODE_DRV_LOAD_PORT))
-- bp->port.pmf = 1;
-- else
-- bp->port.pmf = 0;
-- DP(NETIF_MSG_LINK, "pmf %d\n", bp->port.pmf);
--
-- /* if we can't use MSI-X we only need one fp,
-- * so try to enable MSI-X with the requested number of fp's
-- * and fallback to inta with one fp
-- */
- if (use_inta) {
- bp->num_queues = 1;
-
-@@ -6338,7 +6360,15 @@ static int bnx2x_nic_load(struct bnx2x *
- else
- bp->num_queues = 1;
-
-- if (bnx2x_enable_msix(bp)) {
++
++ if (use_inta) {
++ bp->num_queues = 1;
++
++ } else {
++ if ((use_multi > 1) && (use_multi <= BP_MAX_QUEUES(bp)))
++ /* user requested number */
++ bp->num_queues = use_multi;
++
++ else if (use_multi)
++ bp->num_queues = min_t(u32, num_online_cpus(),
++ BP_MAX_QUEUES(bp));
++ else
++ bp->num_queues = 1;
++
+ DP(NETIF_MSG_IFUP,
+ "set number of queues to %d\n", bp->num_queues);
+
+ */
+ rc = bnx2x_enable_msix(bp);
+ if (rc) {
- /* failed to enable MSI-X */
- bp->num_queues = 1;
- if (use_multi)
-@@ -6346,8 +6376,6 @@ static int bnx2x_nic_load(struct bnx2x *
- " to enable MSI-X\n");
- }
- }
-- DP(NETIF_MSG_IFUP,
-- "set number of queues to %d\n", bp->num_queues);
-
- if (bnx2x_alloc_mem(bp))
- return -ENOMEM;
-@@ -6356,30 +6384,85 @@ static int bnx2x_nic_load(struct bnx2x *
- bnx2x_fp(bp, i, disable_tpa) =
- ((bp->flags & TPA_ENABLE_FLAG) == 0);
-
++ /* failed to enable MSI-X */
++ bp->num_queues = 1;
++ if (use_multi)
++ BNX2X_ERR("Multi requested but failed"
++ " to enable MSI-X\n");
++ }
++ }
++
++ if (bnx2x_alloc_mem(bp))
++ return -ENOMEM;
++
++ for_each_queue(bp, i)
++ bnx2x_fp(bp, i, disable_tpa) =
++ ((bp->flags & TPA_ENABLE_FLAG) == 0);
++
+ for_each_queue(bp, i)
+ netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi),
+ bnx2x_poll, 128);
+#endif
+ bnx2x_napi_enable(bp);
+
- if (bp->flags & USING_MSIX_FLAG) {
- rc = bnx2x_req_msix_irqs(bp);
- if (rc) {
- pci_disable_msix(bp->pdev);
-- goto load_error;
++ if (bp->flags & USING_MSIX_FLAG) {
++ rc = bnx2x_req_msix_irqs(bp);
++ if (rc) {
++ pci_disable_msix(bp->pdev);
+ goto load_error1;
- }
++ }
+ printk(KERN_INFO PFX "%s: using MSI-X\n", bp->dev->name);
- } else {
- bnx2x_ack_int(bp);
- rc = bnx2x_req_irq(bp);
- if (rc) {
-- BNX2X_ERR("IRQ request failed, aborting\n");
-- goto load_error;
++ } else {
++ bnx2x_ack_int(bp);
++ rc = bnx2x_req_irq(bp);
++ if (rc) {
+ BNX2X_ERR("IRQ request failed rc %d, aborting\n", rc);
+ goto load_error1;
- }
- }
++ }
++ }
-- for_each_queue(bp, i)
-- netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi),
-- bnx2x_poll, 128);
-+ /* Send LOAD_REQUEST command to MCP
-+ Returns the type of LOAD command:
-+ if it is the first port to be initialized
-+ common blocks should be initialized, otherwise - not
-+ */
-+ if (!BP_NOMCP(bp)) {
-+ load_code = bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_REQ);
-+ if (!load_code) {
-+ BNX2X_ERR("MCP response failure, aborting\n");
+ /* Send LOAD_REQUEST command to MCP
+ Returns the type of LOAD command:
+@@ -6291,10 +6426,13 @@
+ load_code = bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_REQ);
+ if (!load_code) {
+ BNX2X_ERR("MCP response failure, aborting\n");
+- return -EBUSY;
+- }
+- if (load_code == FW_MSG_CODE_DRV_LOAD_REFUSED)
+- return -EBUSY; /* other port in diagnostic mode */
+ rc = -EBUSY;
+ goto load_error2;
+ }
+ rc = -EBUSY; /* other port in diagnostic mode */
+ goto load_error2;
+ }
-+
-+ } else {
-+ int port = BP_PORT(bp);
-+
-+ DP(NETIF_MSG_IFUP, "NO MCP load counts before us %d, %d, %d\n",
-+ load_count[0], load_count[1], load_count[2]);
-+ load_count[0]++;
-+ load_count[1 + port]++;
-+ DP(NETIF_MSG_IFUP, "NO MCP new load counts %d, %d, %d\n",
-+ load_count[0], load_count[1], load_count[2]);
-+ if (load_count[0] == 1)
-+ load_code = FW_MSG_CODE_DRV_LOAD_COMMON;
-+ else if (load_count[1 + port] == 1)
-+ load_code = FW_MSG_CODE_DRV_LOAD_PORT;
-+ else
-+ load_code = FW_MSG_CODE_DRV_LOAD_FUNCTION;
-+ }
-+
-+ if ((load_code == FW_MSG_CODE_DRV_LOAD_COMMON) ||
-+ (load_code == FW_MSG_CODE_DRV_LOAD_PORT))
-+ bp->port.pmf = 1;
-+ else
-+ bp->port.pmf = 0;
-+ DP(NETIF_MSG_LINK, "pmf %d\n", bp->port.pmf);
+ } else {
+ int port = BP_PORT(bp);
+@@ -6320,66 +6458,11 @@
+ bp->port.pmf = 0;
+ DP(NETIF_MSG_LINK, "pmf %d\n", bp->port.pmf);
+
+- /* if we can't use MSI-X we only need one fp,
+- * so try to enable MSI-X with the requested number of fp's
+- * and fallback to inta with one fp
+- */
+- if (use_inta) {
+- bp->num_queues = 1;
+-
+- } else {
+- if ((use_multi > 1) && (use_multi <= BP_MAX_QUEUES(bp)))
+- /* user requested number */
+- bp->num_queues = use_multi;
+-
+- else if (use_multi)
+- bp->num_queues = min_t(u32, num_online_cpus(),
+- BP_MAX_QUEUES(bp));
+- else
+- bp->num_queues = 1;
+-
+- if (bnx2x_enable_msix(bp)) {
+- /* failed to enable MSI-X */
+- bp->num_queues = 1;
+- if (use_multi)
+- BNX2X_ERR("Multi requested but failed"
+- " to enable MSI-X\n");
+- }
+- }
+- DP(NETIF_MSG_IFUP,
+- "set number of queues to %d\n", bp->num_queues);
+-
+- if (bnx2x_alloc_mem(bp))
+- return -ENOMEM;
+-
+- for_each_queue(bp, i)
+- bnx2x_fp(bp, i, disable_tpa) =
+- ((bp->flags & TPA_ENABLE_FLAG) == 0);
+-
+- if (bp->flags & USING_MSIX_FLAG) {
+- rc = bnx2x_req_msix_irqs(bp);
+- if (rc) {
+- pci_disable_msix(bp->pdev);
+- goto load_error;
+- }
+- } else {
+- bnx2x_ack_int(bp);
+- rc = bnx2x_req_irq(bp);
+- if (rc) {
+- BNX2X_ERR("IRQ request failed, aborting\n");
+- goto load_error;
+- }
+- }
+-
+- for_each_queue(bp, i)
+- netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi),
+- bnx2x_poll, 128);
+-
/* Initialize HW */
rc = bnx2x_init_hw(bp, load_code);
if (rc) {
}
/* Setup NIC internals and enable interrupts */
-@@ -6391,25 +6474,16 @@ static int bnx2x_nic_load(struct bnx2x *
+@@ -6391,25 +6474,16 @@
if (!load_code) {
BNX2X_ERR("MCP response failure, aborting\n");
rc = -EBUSY;
- goto load_rings_free;
+- }
+- }
+-
+- bnx2x_stats_init(bp);
+ goto load_error3;
- }
- }
++ }
++ }
-- bnx2x_stats_init(bp);
--
bp->state = BNX2X_STATE_OPENING_WAIT4_PORT;
-
+-
- /* Enable Rx interrupt handling before sending the ramrod
- as it's completed on Rx FP queue */
- bnx2x_napi_enable(bp);
-
- /* Enable interrupt handling */
- atomic_set(&bp->intr_sem, 0);
--
+
rc = bnx2x_setup_leading(bp);
if (rc) {
BNX2X_ERR("Setup leading failed!\n");
}
if (CHIP_IS_E1H(bp))
-@@ -6422,7 +6496,7 @@ static int bnx2x_nic_load(struct bnx2x *
+@@ -6422,7 +6496,7 @@
for_each_nondefault_queue(bp, i) {
rc = bnx2x_setup_multi(bp, i);
if (rc)
}
if (CHIP_IS_E1(bp))
-@@ -6438,18 +6512,18 @@ static int bnx2x_nic_load(struct bnx2x *
+@@ -6438,18 +6512,18 @@
case LOAD_NORMAL:
/* Tx queue should be only reenabled */
netif_wake_queue(bp->dev);
bnx2x_set_rx_mode(bp->dev);
bp->state = BNX2X_STATE_DIAG;
break;
-@@ -6467,18 +6541,24 @@ static int bnx2x_nic_load(struct bnx2x *
+@@ -6467,18 +6541,24 @@
return 0;
bnx2x_free_mem(bp);
/* TBD we really need to reset the chip
-@@ -6552,6 +6632,7 @@ static int bnx2x_stop_leading(struct bnx
+@@ -6552,6 +6632,7 @@
}
cnt--;
msleep(1);
}
bp->state = BNX2X_STATE_CLOSING_WAIT4_UNLOAD;
bp->fp[0].state = BNX2X_FP_STATE_CLOSED;
-@@ -6603,14 +6684,6 @@ static void bnx2x_reset_port(struct bnx2
+@@ -6603,14 +6684,6 @@
/* TODO: Close Doorbell port? */
}
static void bnx2x_reset_chip(struct bnx2x *bp, u32 reset_code)
{
DP(BNX2X_MSG_MCP, "function %d reset_code %x\n",
-@@ -6650,21 +6723,23 @@ static int bnx2x_nic_unload(struct bnx2x
+@@ -6650,21 +6723,23 @@
bp->rx_mode = BNX2X_RX_MODE_NONE;
bnx2x_set_storm_rx_mode(bp);
bnx2x_tx_int(fp, 1000);
if (!cnt) {
-@@ -6685,9 +6760,6 @@ static int bnx2x_nic_unload(struct bnx2x
+@@ -6684,9 +6759,6 @@
+ }
/* Give HW time to discard old tx messages */
msleep(1);
-
+-
- /* Release IRQs */
- bnx2x_free_irq(bp);
--
+
if (CHIP_IS_E1(bp)) {
struct mac_configuration_cmd *config =
- bnx2x_sp(bp, mcast_config);
-@@ -6790,11 +6862,14 @@ unload_error:
+@@ -6790,11 +6862,14 @@
/* Report UNLOAD_DONE to MCP */
if (!BP_NOMCP(bp))
bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE);
bnx2x_free_mem(bp);
bp->state = BNX2X_STATE_CLOSED;
-@@ -6847,10 +6922,6 @@ static void __devinit bnx2x_undi_unload(
+@@ -6847,10 +6922,6 @@
*/
bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_UNDI);
val = REG_RD(bp, DORQ_REG_NORM_CID_OFST);
if (val == 0x7) {
u32 reset_code = DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS;
/* save our func */
-@@ -6858,6 +6929,9 @@ static void __devinit bnx2x_undi_unload(
+@@ -6858,6 +6929,9 @@
u32 swap_en;
u32 swap_val;
BNX2X_DEV_INFO("UNDI is active! reset device\n");
/* try unload UNDI on port 0 */
-@@ -6883,6 +6957,9 @@ static void __devinit bnx2x_undi_unload(
+@@ -6882,6 +6956,9 @@
+
bnx2x_fw_command(bp, reset_code);
}
-
++
+ /* now it's safe to release the lock */
+ bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_UNDI);
-+
+
REG_WR(bp, (BP_PORT(bp) ? HC_REG_CONFIG_1 :
HC_REG_CONFIG_0), 0x1000);
-
-@@ -6927,7 +7004,9 @@ static void __devinit bnx2x_undi_unload(
+@@ -6927,7 +7004,9 @@
bp->fw_seq =
(SHMEM_RD(bp, func_mb[bp->func].drv_mb_header) &
DRV_MSG_SEQ_NUMBER_MASK);
}
}
-@@ -6944,7 +7023,7 @@ static void __devinit bnx2x_get_common_h
+@@ -6944,7 +7023,7 @@
id |= ((val & 0xf) << 12);
val = REG_RD(bp, MISC_REG_CHIP_METAL);
id |= ((val & 0xff) << 4);
id |= (val & 0xf);
bp->common.chip_id = id;
bp->link_params.chip_id = bp->common.chip_id;
-@@ -7501,7 +7580,7 @@ static int __devinit bnx2x_init_bp(struc
+@@ -7501,7 +7580,7 @@
mutex_init(&bp->port.phy_mutex);
INIT_WORK(&bp->reset_task, bnx2x_reset_task);
rc = bnx2x_get_hwinfo(bp);
-@@ -8076,6 +8155,9 @@ static int bnx2x_get_eeprom(struct net_d
+@@ -8076,6 +8155,9 @@
struct bnx2x *bp = netdev_priv(dev);
int rc;
DP(BNX2X_MSG_NVM, "ethtool_eeprom: cmd %d\n"
DP_LEVEL " magic 0x%x offset 0x%x (%d) len 0x%x (%d)\n",
eeprom->cmd, eeprom->magic, eeprom->offset, eeprom->offset,
-@@ -8243,6 +8325,9 @@ static int bnx2x_set_eeprom(struct net_d
+@@ -8242,6 +8324,9 @@
+ {
struct bnx2x *bp = netdev_priv(dev);
int rc;
-
++
+ if (!netif_running(dev))
+ return -EAGAIN;
-+
+
DP(BNX2X_MSG_NVM, "ethtool_eeprom: cmd %d\n"
DP_LEVEL " magic 0x%x offset 0x%x (%d) len 0x%x (%d)\n",
- eeprom->cmd, eeprom->magic, eeprom->offset, eeprom->offset,
-@@ -8675,18 +8760,17 @@ static int bnx2x_run_loopback(struct bnx
+@@ -8675,18 +8760,17 @@
if (loopback_mode == BNX2X_MAC_LOOPBACK) {
bp->link_params.loopback_mode = LOOPBACK_BMAC;
} else
return -EINVAL;
-@@ -8724,6 +8808,8 @@ static int bnx2x_run_loopback(struct bnx
+@@ -8724,6 +8808,8 @@
tx_bd->general_data = ((UNICAST_ADDRESS <<
ETH_TX_BD_ETH_ADDR_TYPE_SHIFT) | 1);
fp->hw_tx_prods->bds_prod =
cpu_to_le16(le16_to_cpu(fp->hw_tx_prods->bds_prod) + 1);
mb(); /* FW restriction: must not reorder writing nbd and packets */
-@@ -8776,7 +8862,6 @@ test_loopback_rx_exit:
+@@ -8776,7 +8862,6 @@
/* Update producers */
bnx2x_update_rx_prod(bp, fp, fp->rx_bd_prod, fp->rx_comp_prod,
fp->rx_sge_prod);
test_loopback_exit:
bp->link_params.loopback_mode = LOOPBACK_NONE;
-@@ -8791,7 +8876,8 @@ static int bnx2x_test_loopback(struct bn
+@@ -8791,7 +8876,8 @@
if (!netif_running(bp->dev))
return BNX2X_LOOPBACK_FAILED;
if (bnx2x_run_loopback(bp, BNX2X_MAC_LOOPBACK, link_up)) {
DP(NETIF_MSG_PROBE, "MAC loopback failed\n");
-@@ -8803,6 +8889,7 @@ static int bnx2x_test_loopback(struct bn
+@@ -8803,6 +8889,7 @@
rc |= BNX2X_PHY_LOOPBACK_FAILED;
}
bnx2x_netif_start(bp);
return rc;
-@@ -8876,7 +8963,10 @@ static int bnx2x_test_intr(struct bnx2x
+@@ -8876,7 +8963,10 @@
return -ENODEV;
config->hdr.length_6b = 0;
config->hdr.client_id = BP_CL_ID(bp);
config->hdr.reserved1 = 0;
-@@ -9241,6 +9331,18 @@ static int bnx2x_set_power_state(struct
+@@ -9241,6 +9331,18 @@
return 0;
}
/*
* net_device service functions
*/
-@@ -9251,7 +9353,6 @@ static int bnx2x_poll(struct napi_struct
+@@ -9251,7 +9353,6 @@
napi);
struct bnx2x *bp = fp->bp;
int work_done = 0;
#ifdef BNX2X_STOP_ON_ERROR
if (unlikely(bp->panic))
-@@ -9264,19 +9365,12 @@ static int bnx2x_poll(struct napi_struct
+@@ -9264,19 +9365,12 @@
bnx2x_update_fpsb_idx(fp);
/* must not complete if we consumed full budget */
if ((work_done < budget) && !BNX2X_HAS_WORK(fp)) {
-@@ -9387,6 +9481,7 @@ static inline u32 bnx2x_xmit_type(struct
+@@ -9387,6 +9481,7 @@
return rc;
}
/* check if packet requires linearization (packet is too fragmented) */
static int bnx2x_pkt_req_lin(struct bnx2x *bp, struct sk_buff *skb,
u32 xmit_type)
-@@ -9464,6 +9559,7 @@ exit_lbl:
+@@ -9464,6 +9559,7 @@
return to_copy;
}
/* called with netif_tx_lock
* bnx2x_tx_int() runs without netif_tx_lock unless it needs to call
-@@ -9504,6 +9600,7 @@ static int bnx2x_start_xmit(struct sk_bu
+@@ -9504,6 +9600,7 @@
skb->ip_summed, skb->protocol, ipv6_hdr(skb)->nexthdr,
ip_hdr(skb)->protocol, skb_shinfo(skb)->gso_type, xmit_type);
/* First, check if we need to linearize the skb
(due to FW restrictions) */
if (bnx2x_pkt_req_lin(bp, skb, xmit_type)) {
-@@ -9516,6 +9613,7 @@ static int bnx2x_start_xmit(struct sk_bu
+@@ -9516,6 +9613,7 @@
return NETDEV_TX_OK;
}
}
/*
Please read carefully. First we use one BD which we mark as start,
-@@ -9547,11 +9645,14 @@ static int bnx2x_start_xmit(struct sk_bu
+@@ -9547,11 +9645,14 @@
"sending pkt %u @%p next_idx %u bd %u @%p\n",
pkt_prod, tx_buf, fp->tx_pkt_prod, bd_prod, tx_bd);
tx_bd->vlan = cpu_to_le16(pkt_prod);
if (xmit_type) {
-@@ -9703,6 +9804,15 @@ static int bnx2x_start_xmit(struct sk_bu
+@@ -9703,6 +9804,15 @@
DP(NETIF_MSG_TX_QUEUED, "doorbell: nbd %d bd %u\n", nbd, bd_prod);
fp->hw_tx_prods->bds_prod =
cpu_to_le16(le16_to_cpu(fp->hw_tx_prods->bds_prod) + nbd);
mb(); /* FW restriction: must not reorder writing nbd and packets */
-@@ -9716,6 +9826,9 @@ static int bnx2x_start_xmit(struct sk_bu
+@@ -9716,6 +9826,9 @@
dev->trans_start = jiffies;
if (unlikely(bnx2x_tx_avail(fp) < MAX_SKB_FRAGS + 3)) {
netif_stop_queue(dev);
bp->eth_stats.driver_xoff++;
if (bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3)
-@@ -9731,6 +9844,8 @@ static int bnx2x_open(struct net_device
+@@ -9730,6 +9843,8 @@
+ static int bnx2x_open(struct net_device *dev)
{
struct bnx2x *bp = netdev_priv(dev);
-
-+ netif_carrier_off(dev);
+
++ netif_carrier_off(dev);
+
bnx2x_set_power_state(bp, PCI_D0);
- return bnx2x_nic_load(bp, LOAD_OPEN);
-@@ -9814,7 +9929,7 @@ static void bnx2x_set_rx_mode(struct net
+@@ -9814,7 +9929,7 @@
for (; i < old; i++) {
if (CAM_IS_INVALID(config->
config_table[i])) {
break;
}
/* invalidate */
-@@ -9988,6 +10103,16 @@ static void bnx2x_vlan_rx_register(struc
+@@ -9988,6 +10103,16 @@
struct bnx2x *bp = netdev_priv(dev);
bp->vlgrp = vlgrp;
if (netif_running(dev))
bnx2x_set_client_config(bp);
}
-@@ -10139,6 +10264,7 @@ static int __devinit bnx2x_init_dev(stru
+@@ -10139,6 +10264,7 @@
dev->features |= NETIF_F_HIGHDMA;
#ifdef BCM_VLAN
dev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX);
#endif
dev->features |= (NETIF_F_TSO | NETIF_F_TSO_ECN);
dev->features |= NETIF_F_TSO6;
-@@ -10203,8 +10329,6 @@ static int __devinit bnx2x_init_one(stru
+@@ -10203,8 +10329,6 @@
return -ENOMEM;
}
bp = netdev_priv(dev);
bp->msglevel = debug;
-@@ -10214,17 +10338,15 @@ static int __devinit bnx2x_init_one(stru
+@@ -10214,17 +10338,15 @@
return rc;
}
-- rc = register_netdev(dev);
-- if (rc) {
-- dev_err(&pdev->dev, "Cannot register net device\n");
-- goto init_one_exit;
-- }
--
- pci_set_drvdata(pdev, dev);
-
- rc = bnx2x_init_bp(bp);
++ pci_set_drvdata(pdev, dev);
++
++ rc = bnx2x_init_bp(bp);
+ if (rc)
+ goto init_one_exit;
+
-+ rc = register_netdev(dev);
+ rc = register_netdev(dev);
if (rc) {
+ dev_err(&pdev->dev, "Cannot register net device\n");
+- goto init_one_exit;
+- }
+-
+- pci_set_drvdata(pdev, dev);
+-
+- rc = bnx2x_init_bp(bp);
+- if (rc) {
- unregister_netdev(dev);
-+ dev_err(&pdev->dev, "Cannot register net device\n");
goto init_one_exit;
}
-@@ -10346,6 +10468,76 @@ static int bnx2x_resume(struct pci_dev *
+@@ -10346,6 +10468,76 @@
return rc;
}
/**
* bnx2x_io_error_detected - called when PCI error is detected
* @pdev: Pointer to PCI device
-@@ -10365,7 +10557,7 @@ static pci_ers_result_t bnx2x_io_error_d
+@@ -10365,7 +10557,7 @@
netif_device_detach(dev);
if (netif_running(dev))
pci_disable_device(pdev);
-@@ -10420,8 +10612,10 @@ static void bnx2x_io_resume(struct pci_d
+@@ -10420,8 +10612,10 @@
rtnl_lock();
netif_device_attach(dev);
-@@ -10446,12 +10640,20 @@ static struct pci_driver bnx2x_pci_drive
+@@ -10446,12 +10640,20 @@
static int __init bnx2x_init(void)
{
}
module_init(bnx2x_init);
-diff -purN linux-2.6.27/drivers/net/bnx2x_reg.h linux-2.6.27.19-5.1/drivers/net/bnx2x_reg.h
---- linux-2.6.27/drivers/net/bnx2x_reg.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bnx2x_reg.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/bnx2x_reg.h
+--- a/drivers/net/bnx2x_reg.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bnx2x_reg.h Wed May 06 16:56:24 2009 +0100
@@ -1,6 +1,6 @@
/* bnx2x_reg.h: Broadcom Everest network driver.
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
-diff -purN linux-2.6.27/drivers/net/bonding/bond_alb.c linux-2.6.27.19-5.1/drivers/net/bonding/bond_alb.c
---- linux-2.6.27/drivers/net/bonding/bond_alb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bonding/bond_alb.c 2009-03-25 16:11:04.000000000 +0000
-@@ -167,11 +167,14 @@ static void tlb_clear_slave(struct bondi
+diff -r 9608d5473017 drivers/net/bonding/bond_alb.c
+--- a/drivers/net/bonding/bond_alb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bonding/bond_alb.c Wed May 06 16:56:24 2009 +0100
+@@ -167,11 +167,14 @@
/* clear slave from tx_hashtbl */
tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl;
}
tlb_init_slave(slave);
-diff -purN linux-2.6.27/drivers/net/bonding/bond_main.c linux-2.6.27.19-5.1/drivers/net/bonding/bond_main.c
---- linux-2.6.27/drivers/net/bonding/bond_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bonding/bond_main.c 2009-03-25 16:11:04.000000000 +0000
-@@ -2370,6 +2370,9 @@ static void bond_miimon_commit(struct bo
+diff -r 9608d5473017 drivers/net/bonding/bond_main.c
+--- a/drivers/net/bonding/bond_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bonding/bond_main.c Wed May 06 16:56:24 2009 +0100
+@@ -2370,6 +2370,9 @@
continue;
case BOND_LINK_DOWN:
slave->link = BOND_LINK_DOWN;
if (bond->params.mode == BOND_MODE_ACTIVEBACKUP ||
-diff -purN linux-2.6.27/drivers/net/cxgb3/adapter.h linux-2.6.27.19-5.1/drivers/net/cxgb3/adapter.h
---- linux-2.6.27/drivers/net/cxgb3/adapter.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/adapter.h 2009-03-25 16:11:05.000000000 +0000
-@@ -54,7 +54,6 @@ struct port_info {
+diff -r 9608d5473017 drivers/net/cxgb3/adapter.h
+--- a/drivers/net/cxgb3/adapter.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/adapter.h Wed May 06 16:56:24 2009 +0100
+@@ -54,7 +54,6 @@
struct adapter *adapter;
struct vlan_group *vlan_grp;
struct sge_qset *qs;
u8 port_id;
u8 rx_csum_offload;
u8 nqsets;
-@@ -64,6 +63,7 @@ struct port_info {
+@@ -64,6 +63,7 @@
struct link_config link_config;
struct net_device_stats netstats;
int activity;
};
enum { /* adapter flags */
-@@ -241,6 +241,7 @@ struct adapter {
+@@ -241,6 +241,7 @@
unsigned int check_task_cnt;
struct delayed_work adap_check_task;
struct work_struct ext_intr_handler_task;
struct dentry *debugfs_root;
-@@ -282,9 +283,11 @@ int t3_offload_tx(struct t3cdev *tdev, s
+@@ -282,9 +283,11 @@
void t3_os_ext_intr_handler(struct adapter *adapter);
void t3_os_link_changed(struct adapter *adapter, int port_id, int link_status,
int speed, int duplex, int fc);
void t3_free_sge_resources(struct adapter *adap);
void t3_sge_err_intr_handler(struct adapter *adapter);
irq_handler_t t3_intr_handler(struct adapter *adap, int polling);
-diff -purN linux-2.6.27/drivers/net/cxgb3/ael1002.c linux-2.6.27.19-5.1/drivers/net/cxgb3/ael1002.c
---- linux-2.6.27/drivers/net/cxgb3/ael1002.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/ael1002.c 2009-03-25 16:11:05.000000000 +0000
-@@ -33,17 +33,57 @@
+diff -r 9608d5473017 drivers/net/cxgb3/ael1002.c
+--- a/drivers/net/cxgb3/ael1002.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/ael1002.c Wed May 06 16:56:24 2009 +0100
+@@ -33,16 +33,56 @@
#include "regs.h"
enum {
+ unsigned short clear_bits;
+ unsigned short set_bits;
};
-
++
+static int set_phy_regs(struct cphy *phy, const struct reg_val *rv)
+{
+ int err;
+ }
+ return err;
+}
-+
+
static void ael100x_txon(struct cphy *phy)
{
- int tx_on_gpio = phy->addr == 0 ? F_GPIO7_OUT_VAL : F_GPIO2_OUT_VAL;
-@@ -84,23 +124,23 @@ static int ael1002_intr_noop(struct cphy
+@@ -84,23 +124,23 @@
return 0;
}
}
if (speed)
*speed = SPEED_10000;
-@@ -115,15 +155,18 @@ static struct cphy_ops ael1002_ops = {
+@@ -115,47 +155,23 @@
.intr_disable = ael1002_intr_noop,
.intr_clear = ael1002_intr_noop,
.intr_handler = ael1002_intr_noop,
}
static int ael1006_reset(struct cphy *phy, int wait)
-@@ -131,72 +174,985 @@ static int ael1006_reset(struct cphy *ph
+ {
return t3_phy_reset(phy, MDIO_DEV_PMA_PMD, wait);
+-}
+-
+-static int ael1006_intr_enable(struct cphy *phy)
+-{
+- return mdio_write(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, 1);
+-}
+-
+-static int ael1006_intr_disable(struct cphy *phy)
+-{
+- return mdio_write(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, 0);
+-}
+-
+-static int ael1006_intr_clear(struct cphy *phy)
+-{
+- u32 val;
+-
+- return mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_STAT, &val);
+-}
+-
+-static int ael1006_intr_handler(struct cphy *phy)
+-{
+- unsigned int status;
+- int err = mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_STAT, &status);
+-
+- if (err)
+- return err;
+- return (status & 1) ? cphy_cause_link_change : 0;
}
--static int ael1006_intr_enable(struct cphy *phy)
-+static int ael1006_power_down(struct cphy *phy, int enable)
-+{
-+ return t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR,
-+ BMCR_PDOWN, enable ? BMCR_PDOWN : 0);
-+}
-+
-+static struct cphy_ops ael1006_ops = {
-+ .reset = ael1006_reset,
+ static int ael1006_power_down(struct cphy *phy, int enable)
+@@ -166,37 +182,977 @@
+
+ static struct cphy_ops ael1006_ops = {
+ .reset = ael1006_reset,
+- .intr_enable = ael1006_intr_enable,
+- .intr_disable = ael1006_intr_disable,
+- .intr_clear = ael1006_intr_clear,
+- .intr_handler = ael1006_intr_handler,
+- .get_link_status = ael100x_get_link_status,
+ .intr_enable = t3_phy_lasi_intr_enable,
+ .intr_disable = t3_phy_lasi_intr_disable,
+ .intr_clear = t3_phy_lasi_intr_clear,
+ .intr_handler = t3_phy_lasi_intr_handler,
+ .get_link_status = get_link_status_r,
-+ .power_down = ael1006_power_down,
-+};
-+
+ .power_down = ael1006_power_down,
+ };
+
+-void t3_ael1006_phy_prep(struct cphy *phy, struct adapter *adapter,
+- int phy_addr, const struct mdio_ops *mdio_ops)
+int t3_ael1006_phy_prep(struct cphy *phy, struct adapter *adapter,
+ int phy_addr, const struct mdio_ops *mdio_ops)
{
-- return mdio_write(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, 1);
+- cphy_init(phy, adapter, phy_addr, &ael1006_ops, mdio_ops);
+ cphy_init(phy, adapter, phy_addr, &ael1006_ops, mdio_ops,
+ SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_FIBRE,
+ "10GBASE-SR");
-+ ael100x_txon(phy);
+ ael100x_txon(phy);
+ return 0;
- }
-
--static int ael1006_intr_disable(struct cphy *phy)
++}
++
+static int ael2005_setup_sr_edc(struct cphy *phy)
- {
-- return mdio_write(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, 0);
++{
+ static struct reg_val regs[] = {
+ { MDIO_DEV_PMA_PMD, 0xc003, 0xffff, 0x181 },
+ { MDIO_DEV_PMA_PMD, 0xc010, 0xffff, 0x448a },
+ if (!err)
+ phy->priv = edc_sr;
+ return err;
- }
-
--static int ael1006_intr_clear(struct cphy *phy)
++}
++
+static int ael2005_setup_twinax_edc(struct cphy *phy, int modtype)
- {
-- u32 val;
++{
+ static struct reg_val regs[] = {
+ { MDIO_DEV_PMA_PMD, 0xc04a, 0xffff, 0x5a00 },
+ { 0, 0, 0, 0 }
+ return err;
+
+ msleep(50);
-
-- return mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_STAT, &val);
++
+ for (i = 0; i < ARRAY_SIZE(twinax_edc) && !err; i += 2)
+ err = mdio_write(phy, MDIO_DEV_PMA_PMD, twinax_edc[i],
+ twinax_edc[i + 1]);
+ if (!err)
+ phy->priv = edc_twinax;
+ return err;
- }
-
--static int ael1006_intr_handler(struct cphy *phy)
++}
++
+static int ael2005_i2c_rd(struct cphy *phy, int dev_addr, int word_addr)
- {
-- unsigned int status;
-- int err = mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_STAT, &status);
++{
+ int i, err;
+ unsigned int stat, data;
-
++
+ err = mdio_write(phy, MDIO_DEV_PMA_PMD, AEL_I2C_CTRL,
+ (dev_addr << 8) | (1 << 8) | word_addr);
- if (err)
- return err;
-- return (status & 1) ? cphy_cause_link_change : 0;
++ if (err)
++ return err;
+
+ for (i = 0; i < 5; i++) {
+ msleep(1);
+ CH_WARN(phy->adapter, "PHY %u I2C read of addr %u timed out\n",
+ phy->addr, word_addr);
+ return -ETIMEDOUT;
- }
-
--static int ael1006_power_down(struct cphy *phy, int enable)
++}
++
+static int get_module_type(struct cphy *phy, int delay_ms)
- {
-- return t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR,
-- BMCR_PDOWN, enable ? BMCR_PDOWN : 0);
++{
+ int v;
+ unsigned int stat;
+
+ }
+unknown:
+ return phy_modtype_unknown;
- }
-
--static struct cphy_ops ael1006_ops = {
-- .reset = ael1006_reset,
-- .intr_enable = ael1006_intr_enable,
-- .intr_disable = ael1006_intr_disable,
-- .intr_clear = ael1006_intr_clear,
-- .intr_handler = ael1006_intr_handler,
-- .get_link_status = ael100x_get_link_status,
-- .power_down = ael1006_power_down,
++}
++
+static int ael2005_intr_enable(struct cphy *phy)
+{
+ int err = mdio_write(phy, MDIO_DEV_PMA_PMD, AEL2005_GPIO_CTRL, 0x200);
+ .intr_handler = ael2005_intr_handler,
+ .get_link_status = get_link_status_r,
+ .power_down = ael1002_power_down,
- };
-
--void t3_ael1006_phy_prep(struct cphy *phy, struct adapter *adapter,
-- int phy_addr, const struct mdio_ops *mdio_ops)
++};
++
+int t3_ael2005_phy_prep(struct cphy *phy, struct adapter *adapter,
+ int phy_addr, const struct mdio_ops *mdio_ops)
- {
-- cphy_init(phy, adapter, phy_addr, &ael1006_ops, mdio_ops);
-- ael100x_txon(phy);
++{
+ cphy_init(phy, adapter, phy_addr, &ael2005_ops, mdio_ops,
+ SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_FIBRE |
+ SUPPORTED_IRQ, "10GBASE-R");
/*
* Some cards where the PHY is supposed to be at address 0 actually
-@@ -205,6 +1161,7 @@ void t3_qt2045_phy_prep(struct cphy *phy
+@@ -205,6 +1161,7 @@
if (!phy_addr && !mdio_read(phy, MDIO_DEV_PMA_PMD, MII_BMSR, &stat) &&
stat == 0xffff)
phy->addr = 1;
}
static int xaui_direct_reset(struct cphy *phy, int wait)
-@@ -250,8 +1207,11 @@ static struct cphy_ops xaui_direct_ops =
+@@ -250,8 +1207,11 @@
.power_down = xaui_direct_power_down,
};
+ "10GBASE-CX4");
+ return 0;
}
-diff -purN linux-2.6.27/drivers/net/cxgb3/common.h linux-2.6.27.19-5.1/drivers/net/cxgb3/common.h
---- linux-2.6.27/drivers/net/cxgb3/common.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/common.h 2009-03-25 16:11:05.000000000 +0000
-@@ -193,22 +193,13 @@ struct mdio_ops {
+diff -r 9608d5473017 drivers/net/cxgb3/common.h
+--- a/drivers/net/cxgb3/common.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/common.h Wed May 06 16:56:24 2009 +0100
+@@ -193,20 +193,11 @@
struct adapter_info {
unsigned char nports; /* # of ports */
unsigned char phy_base_addr; /* MDIO PHY base address */
unsigned long caps; /* adapter capabilities */
const struct mdio_ops *mdio_ops; /* MDIO operations */
const char *desc; /* product description */
- };
-
+-};
+-
-struct port_type_info {
- void (*phy_prep)(struct cphy *phy, struct adapter *adapter,
- int phy_addr, const struct mdio_ops *ops);
- unsigned int caps;
- const char *desc;
--};
--
+ };
+
struct mc5_stats {
- unsigned long parity_err;
- unsigned long active_rgn_full;
-@@ -358,6 +349,7 @@ struct qset_params { /* SGE queue set p
+@@ -358,6 +349,7 @@
unsigned int jumbo_size; /* # of entries in jumbo free list */
unsigned int txq_size[SGE_TXQ_PER_SET]; /* Tx queue sizes */
unsigned int cong_thres; /* FL congestion threshold */
};
struct sge_params {
-@@ -525,12 +517,25 @@ enum {
+@@ -525,12 +517,25 @@
MAC_RXFIFO_SIZE = 32768
};
};
/* PHY loopback direction */
-@@ -542,12 +547,23 @@ enum {
+@@ -542,12 +547,23 @@
/* PHY interrupt types */
enum {
cphy_cause_link_change = 1,
int (*reset)(struct cphy *phy, int wait);
int (*intr_enable)(struct cphy *phy);
-@@ -568,8 +584,12 @@ struct cphy_ops {
+@@ -568,8 +584,12 @@
/* A PHY instance */
struct cphy {
unsigned long fifo_errors; /* FIFO over/under-flows */
const struct cphy_ops *ops; /* PHY operations */
int (*mdio_read)(struct adapter *adapter, int phy_addr, int mmd_addr,
-@@ -594,10 +614,13 @@ static inline int mdio_write(struct cphy
+@@ -594,10 +614,13 @@
/* Convenience initializer */
static inline void cphy_init(struct cphy *phy, struct adapter *adapter,
int phy_addr, struct cphy_ops *phy_ops,
+ const struct mdio_ops *mdio_ops,
+ unsigned int caps, const char *desc)
{
-- phy->adapter = adapter;
- phy->addr = phy_addr;
++ phy->addr = phy_addr;
+ phy->caps = caps;
-+ phy->adapter = adapter;
+ phy->adapter = adapter;
+- phy->addr = phy_addr;
+ phy->desc = desc;
phy->ops = phy_ops;
if (mdio_ops) {
phy->mdio_read = mdio_ops->read;
-@@ -668,7 +691,12 @@ int t3_mdio_change_bits(struct cphy *phy
+@@ -668,7 +691,12 @@
unsigned int set);
int t3_phy_reset(struct cphy *phy, int mmd, int wait);
int t3_phy_advertise(struct cphy *phy, unsigned int advert);
void t3_intr_enable(struct adapter *adapter);
void t3_intr_disable(struct adapter *adapter);
-@@ -698,6 +726,7 @@ int t3_check_fw_version(struct adapter *
+@@ -698,6 +726,7 @@
int t3_init_hw(struct adapter *adapter, u32 fw_params);
void mac_prep(struct cmac *mac, struct adapter *adapter, int index);
void early_hw_init(struct adapter *adapter, const struct adapter_info *ai);
int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai,
int reset);
int t3_replay_prep_adapter(struct adapter *adapter);
-@@ -774,14 +803,16 @@ int t3_sge_read_rspq(struct adapter *ada
+@@ -774,14 +803,16 @@
int t3_sge_cqcntxt_op(struct adapter *adapter, unsigned int id, unsigned int op,
unsigned int credits);
+int t3_xaui_direct_phy_prep(struct cphy *phy, struct adapter *adapter,
+ int phy_addr, const struct mdio_ops *mdio_ops);
#endif /* __CHELSIO_COMMON_H */
-diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_ctl_defs.h linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_ctl_defs.h
---- linux-2.6.27/drivers/net/cxgb3/cxgb3_ctl_defs.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_ctl_defs.h 2009-03-25 16:11:05.000000000 +0000
-@@ -57,6 +57,9 @@ enum {
+diff -r 9608d5473017 drivers/net/cxgb3/cxgb3_ctl_defs.h
+--- a/drivers/net/cxgb3/cxgb3_ctl_defs.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/cxgb3_ctl_defs.h Wed May 06 16:56:24 2009 +0100
+@@ -57,6 +57,9 @@
RDMA_GET_MIB = 19,
GET_RX_PAGE_INFO = 50,
};
/*
-@@ -86,6 +89,12 @@ struct iff_mac {
+@@ -84,6 +87,12 @@
+ struct net_device *dev; /* the net_device */
+ const unsigned char *mac_addr; /* MAC address to lookup */
u16 vlan_tag;
- };
-
++};
++
+/* Structure used to request a port's iSCSI IPv4 address */
+struct iscsi_ipv4addr {
+ struct net_device *dev; /* the net_device */
+ __be32 ipv4addr; /* the return iSCSI IPv4 address */
-+};
-+
- struct pci_dev;
+ };
- /*
-diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_ioctl.h linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_ioctl.h
---- linux-2.6.27/drivers/net/cxgb3/cxgb3_ioctl.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_ioctl.h 2009-03-25 16:11:05.000000000 +0000
-@@ -92,6 +92,8 @@ struct ch_qset_params {
+ struct pci_dev;
+diff -r 9608d5473017 drivers/net/cxgb3/cxgb3_ioctl.h
+--- a/drivers/net/cxgb3/cxgb3_ioctl.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/cxgb3_ioctl.h Wed May 06 16:56:24 2009 +0100
+@@ -92,6 +92,8 @@
int32_t polling;
int32_t lro;
int32_t cong_thres;
};
struct ch_pktsched_params {
-diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_main.c
---- linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_main.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/cxgb3/cxgb3_main.c
+--- a/drivers/net/cxgb3/cxgb3_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/cxgb3_main.c Wed May 06 16:56:24 2009 +0100
@@ -44,6 +44,7 @@
#include <linux/rtnetlink.h>
#include <linux/firmware.h>
#include <asm/uaccess.h>
#include "common.h"
-@@ -208,6 +209,31 @@ void t3_os_link_changed(struct adapter *
+@@ -208,6 +209,31 @@
}
}
static void cxgb_set_rxmode(struct net_device *dev)
{
struct t3_rx_mode rm;
-@@ -274,10 +300,10 @@ static void name_msix_vecs(struct adapte
+@@ -274,10 +300,10 @@
for (i = 0; i < pi->nqsets; i++, msi_idx++) {
snprintf(adap->msix_info[msi_idx].desc, n,
}
static int request_msix_data_irqs(struct adapter *adap)
-@@ -306,6 +332,22 @@ static int request_msix_data_irqs(struct
+@@ -304,6 +330,22 @@
+ }
+ }
return 0;
- }
-
++}
++
+static void free_irq_resources(struct adapter *adapter)
+{
+ if (adapter->flags & USING_MSIX) {
+ &adapter->sge.qs[i]);
+ } else
+ free_irq(adapter->pdev->irq, adapter);
-+}
-+
+ }
+
static int await_mgmt_replies(struct adapter *adap, unsigned long init_cnt,
- unsigned long n)
- {
-@@ -453,6 +495,36 @@ static void enable_all_napi(struct adapt
+@@ -453,6 +495,36 @@
}
/**
* setup_sge_qsets - configure SGE Tx/Rx/response queues
* @adap: the adapter
*
-@@ -473,12 +545,15 @@ static int setup_sge_qsets(struct adapte
+@@ -473,12 +545,15 @@
struct port_info *pi = netdev_priv(dev);
pi->qs = &adap->sge.qs[pi->first_qset];
t3_free_sge_resources(adap);
return err;
}
-@@ -687,6 +762,47 @@ static struct attribute *offload_attrs[]
+@@ -687,6 +762,47 @@
static struct attribute_group offload_attr_group = {.attrs = offload_attrs };
/*
* Sends an sk_buff to an offload queue driver
* after dealing with any active network taps.
-@@ -739,11 +855,12 @@ static void init_port_mtus(struct adapte
+@@ -739,11 +855,12 @@
t3_write_reg(adapter, A_TP_MTU_PORT_TABLE, mtus);
}
skb = alloc_skb(sizeof(*req), GFP_KERNEL | __GFP_NOFAIL);
req = (struct mngt_pktsched_wr *)skb_put(skb, sizeof(*req));
-@@ -754,20 +871,28 @@ static void send_pktsched_cmd(struct ada
+@@ -754,20 +871,28 @@
req->min = lo;
req->max = hi;
req->binding = port;
}
#define FW_FNAME "t3fw-%d.%d.%d.bin"
-@@ -891,6 +1016,13 @@ static int cxgb_up(struct adapter *adap)
+@@ -891,6 +1016,13 @@
goto out;
}
err = t3_init_hw(adap, 0);
if (err)
goto out;
-@@ -946,9 +1078,16 @@ static int cxgb_up(struct adapter *adap)
+@@ -946,9 +1078,16 @@
t3_write_reg(adap, A_TP_INT_ENABLE, 0x7fbfffff);
}
out:
return err;
-@@ -967,19 +1106,7 @@ static void cxgb_down(struct adapter *ad
+@@ -967,19 +1106,7 @@
t3_intr_disable(adapter);
spin_unlock_irq(&adapter->work_lock);
flush_workqueue(cxgb3_wq); /* wait for external IRQ handler */
quiesce_rx(adapter);
}
-@@ -1078,6 +1205,7 @@ static int cxgb_open(struct net_device *
+@@ -1078,6 +1205,7 @@
if (err)
printk(KERN_WARNING
"Could not initialize offload capabilities\n");
}
link_start(dev);
-@@ -1100,9 +1228,12 @@ static int cxgb_close(struct net_device
+@@ -1100,9 +1228,12 @@
netif_carrier_off(dev);
t3_mac_disable(&pi->mac, MAC_DIRECTION_TX | MAC_DIRECTION_RX);
if (!(adapter->open_device_map & PORT_MASK))
cancel_rearming_delayed_workqueue(cxgb3_wq,
-@@ -1251,8 +1382,10 @@ static void get_drvinfo(struct net_devic
+@@ -1251,8 +1382,10 @@
u32 fw_vers = 0;
u32 tp_vers = 0;
strcpy(info->driver, DRV_NAME);
strcpy(info->version, DRV_VERSION);
-@@ -1284,8 +1417,8 @@ static unsigned long collect_sge_port_st
+@@ -1284,8 +1417,8 @@
int i;
unsigned long tot = 0;
return tot;
}
-@@ -1485,11 +1618,22 @@ static int speed_duplex_to_caps(int spee
+@@ -1485,11 +1618,22 @@
static int set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
if (cmd->autoneg == AUTONEG_DISABLE) {
int cap = speed_duplex_to_caps(cmd->speed, cmd->duplex);
-@@ -1565,11 +1709,10 @@ static int set_rx_csum(struct net_device
+@@ -1565,11 +1709,10 @@
p->rx_csum_offload = data;
if (!data) {
}
return 0;
}
-@@ -1724,6 +1867,25 @@ static void get_wol(struct net_device *d
+@@ -1724,6 +1867,25 @@
memset(&wol->sopass, 0, sizeof(wol->sopass));
}
static const struct ethtool_ops cxgb_ethtool_ops = {
.get_settings = get_settings,
.set_settings = set_settings,
-@@ -1753,6 +1915,8 @@ static const struct ethtool_ops cxgb_eth
+@@ -1753,6 +1915,8 @@
.get_regs = get_regs,
.get_wol = get_wol,
.set_tso = ethtool_op_set_tso,
};
static int in_range(int val, int lo, int hi)
-@@ -1775,6 +1939,8 @@ static int cxgb_extension_ioctl(struct n
+@@ -1775,6 +1939,8 @@
int i;
struct qset_params *q;
struct ch_qset_params t;
if (!capable(CAP_NET_ADMIN))
return -EPERM;
-@@ -1797,6 +1963,16 @@ static int cxgb_extension_ioctl(struct n
+@@ -1797,12 +1963,36 @@
|| !in_range(t.rspq_size, MIN_RSPQ_ENTRIES,
MAX_RSPQ_ENTRIES))
return -EINVAL;
if ((adapter->flags & FULL_INIT_DONE) &&
(t.rspq_size >= 0 || t.fl_size[0] >= 0 ||
t.fl_size[1] >= 0 || t.txq_size[0] >= 0 ||
-@@ -1804,6 +1980,20 @@ static int cxgb_extension_ioctl(struct n
+ t.txq_size[1] >= 0 || t.txq_size[2] >= 0 ||
t.polling >= 0 || t.cong_thres >= 0))
return -EBUSY;
-
++
+ /* Allow setting of any available qset when offload enabled */
+ if (test_bit(OFFLOAD_DEVMAP_BIT, &adapter->open_device_map)) {
+ q1 = 0;
+ return -EINVAL;
+ if (t.qset_idx > q1 + nqsets - 1)
+ return -EINVAL;
-+
+
q = &adapter->params.sge.qset[t.qset_idx];
- if (t.rspq_size >= 0)
-@@ -1843,23 +2033,34 @@ static int cxgb_extension_ioctl(struct n
+@@ -1843,23 +2033,34 @@
}
}
}
t.rspq_size = q->rspq_size;
t.txq_size[0] = q->txq_size[0];
t.txq_size[1] = q->txq_size[1];
-@@ -1870,6 +2071,12 @@ static int cxgb_extension_ioctl(struct n
+@@ -1870,6 +2071,12 @@
t.lro = q->lro;
t.intr_lat = q->coalesce_usecs;
t.cong_thres = q->cong_thres;
if (copy_to_user(useraddr, &t, sizeof(t)))
return -EFAULT;
-@@ -2117,7 +2324,7 @@ static int cxgb_ioctl(struct net_device
+@@ -2117,7 +2324,7 @@
mmd = data->phy_id >> 8;
if (!mmd)
mmd = MDIO_DEV_PCS;
return -EINVAL;
ret =
-@@ -2143,7 +2350,7 @@ static int cxgb_ioctl(struct net_device
+@@ -2143,7 +2350,7 @@
mmd = data->phy_id >> 8;
if (!mmd)
mmd = MDIO_DEV_PCS;
return -EINVAL;
ret =
-@@ -2215,8 +2422,8 @@ static void t3_synchronize_rx(struct ada
+@@ -2215,8 +2422,8 @@
{
int i;
spin_lock_irq(&q->lock);
spin_unlock_irq(&q->lock);
-@@ -2290,7 +2497,7 @@ static void check_link_status(struct ada
+@@ -2290,7 +2497,7 @@
struct net_device *dev = adapter->port[i];
struct port_info *p = netdev_priv(dev);
t3_link_changed(adapter, i);
}
}
-@@ -2355,10 +2562,10 @@ static void t3_adap_check_task(struct wo
+@@ -2355,10 +2562,10 @@
check_t3b2_mac(adapter);
/* Schedule the next check update if any port is active. */
}
/*
-@@ -2403,6 +2610,96 @@ void t3_os_ext_intr_handler(struct adapt
+@@ -2403,6 +2610,96 @@
spin_unlock(&adapter->work_lock);
}
void t3_fatal_err(struct adapter *adapter)
{
unsigned int fw_status[4];
-@@ -2413,7 +2710,11 @@ void t3_fatal_err(struct adapter *adapte
+@@ -2413,7 +2710,11 @@
t3_write_reg(adapter, A_XGM_RX_CTRL, 0);
t3_write_reg(adapter, XGM_REG(A_XGM_TX_CTRL, 1), 0);
t3_write_reg(adapter, XGM_REG(A_XGM_RX_CTRL, 1), 0);
}
CH_ALERT(adapter, "encountered fatal error, operation suspended\n");
if (!t3_cim_ctl_blk_read(adapter, 0xa0, 4, fw_status))
-@@ -2435,23 +2736,9 @@ static pci_ers_result_t t3_io_error_dete
+@@ -2435,23 +2736,9 @@
pci_channel_state_t state)
{
struct adapter *adapter = pci_get_drvdata(pdev);
- int i;
--
++ int ret;
+
- /* Stop all ports */
- for_each_port(adapter, i) {
- struct net_device *netdev = adapter->port[i];
- offload_close(&adapter->tdev);
-
- adapter->flags &= ~FULL_INIT_DONE;
-+ int ret;
-
+-
- pci_disable_device(pdev);
+ ret = t3_adapter_error(adapter, 0);
/* Request a slot reset. */
return PCI_ERS_RESULT_NEED_RESET;
-@@ -2467,22 +2754,9 @@ static pci_ers_result_t t3_io_slot_reset
+@@ -2467,22 +2754,9 @@
{
struct adapter *adapter = pci_get_drvdata(pdev);
- }
- pci_set_master(pdev);
- pci_restore_state(pdev);
--
-- /* Free sge resources */
-- t3_free_sge_resources(adapter);
+ if (!t3_reenable_adapter(adapter))
+ return PCI_ERS_RESULT_RECOVERED;
+- /* Free sge resources */
+- t3_free_sge_resources(adapter);
+-
- if (t3_replay_prep_adapter(adapter))
- goto err;
-
return PCI_ERS_RESULT_DISCONNECT;
}
-@@ -2496,22 +2770,8 @@ err:
+@@ -2496,22 +2770,8 @@
static void t3_io_resume(struct pci_dev *pdev)
{
struct adapter *adapter = pci_get_drvdata(pdev);
- int i;
--
+
- /* Restart the ports */
- for_each_port(adapter, i) {
- struct net_device *netdev = adapter->port[i];
-
+-
- if (netif_running(netdev)) {
- if (cxgb_open(netdev)) {
- dev_err(&pdev->dev,
}
static struct pci_error_handlers t3_err_handler = {
-@@ -2520,6 +2780,42 @@ static struct pci_error_handlers t3_err_
+@@ -2519,6 +2779,42 @@
+ .slot_reset = t3_io_slot_reset,
.resume = t3_io_resume,
};
-
++
+/*
+ * Set the number of qsets based on the number of CPUs and the number of ports,
+ * not to exceed the number of available qsets, assuming there are enough qsets
+ "Port %d using %d queue sets.\n", i, nqsets);
+ }
+}
-+
+
static int __devinit cxgb_enable_msix(struct adapter *adap)
{
- struct msix_entry entries[SGE_QSETS + 1];
-@@ -2564,7 +2860,7 @@ static void __devinit print_port_info(st
+@@ -2564,7 +2860,7 @@
if (!test_bit(i, &adap->registered_device_map))
continue;
printk(KERN_INFO "%s: %s %s %sNIC (rev %d) %s%s\n",
is_offload(adap) ? "R" : "", adap->params.rev, buf,
(adap->flags & USING_MSIX) ? " MSI-X" :
(adap->flags & USING_MSI) ? " MSI" : "");
-@@ -2660,6 +2956,7 @@ static int __devinit init_one(struct pci
+@@ -2660,6 +2956,7 @@
INIT_LIST_HEAD(&adapter->adapter_list);
INIT_WORK(&adapter->ext_intr_handler_task, ext_intr_task);
INIT_DELAYED_WORK(&adapter->adap_check_task, t3_adap_check_task);
for (i = 0; i < ai->nports; ++i) {
-@@ -2677,9 +2974,6 @@ static int __devinit init_one(struct pci
+@@ -2677,9 +2974,6 @@
pi = netdev_priv(netdev);
pi->adapter = adapter;
pi->rx_csum_offload = 1;
pi->port_id = i;
netif_carrier_off(netdev);
netdev->irq = pdev->irq;
-@@ -2756,6 +3050,8 @@ static int __devinit init_one(struct pci
+@@ -2756,6 +3050,8 @@
else if (msi > 0 && pci_enable_msi(pdev) == 0)
adapter->flags |= USING_MSI;
err = sysfs_create_group(&adapter->port[0]->dev.kobj,
&cxgb3_attr_group);
-@@ -2801,6 +3097,7 @@ static void __devexit remove_one(struct
+@@ -2801,6 +3097,7 @@
if (test_bit(i, &adapter->registered_device_map))
unregister_netdev(adapter->port[i]);
t3_free_sge_resources(adapter);
cxgb_disable_msi(adapter);
-diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_offload.c linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_offload.c
---- linux-2.6.27/drivers/net/cxgb3/cxgb3_offload.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_offload.c 2009-03-25 16:11:05.000000000 +0000
-@@ -182,7 +182,9 @@ static struct net_device *get_iff_from_m
+diff -r 9608d5473017 drivers/net/cxgb3/cxgb3_offload.c
+--- a/drivers/net/cxgb3/cxgb3_offload.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/cxgb3_offload.c Wed May 06 16:56:24 2009 +0100
+@@ -182,7 +182,9 @@
static int cxgb_ulp_iscsi_ctl(struct adapter *adapter, unsigned int req,
void *data)
{
struct ulp_iscsi_info *uiip = data;
switch (req) {
-@@ -191,31 +193,36 @@ static int cxgb_ulp_iscsi_ctl(struct ada
+@@ -191,31 +193,36 @@
uiip->llimit = t3_read_reg(adapter, A_ULPRX_ISCSI_LLIMIT);
uiip->ulimit = t3_read_reg(adapter, A_ULPRX_ISCSI_ULIMIT);
uiip->tagmask = t3_read_reg(adapter, A_ULPRX_ISCSI_TAGMASK);
t3_write_reg(adapter, A_ULPRX_ISCSI_PSZ, val);
}
break;
-@@ -407,6 +414,18 @@ static int cxgb_offload_ctl(struct t3cde
+@@ -407,6 +414,18 @@
rx_page_info->page_size = tp->rx_pg_size;
rx_page_info->num = tp->rx_num_pgs;
break;
default:
return -EOPNOTSUPP;
}
-diff -purN linux-2.6.27/drivers/net/cxgb3/regs.h linux-2.6.27.19-5.1/drivers/net/cxgb3/regs.h
---- linux-2.6.27/drivers/net/cxgb3/regs.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/regs.h 2009-03-25 16:11:05.000000000 +0000
-@@ -573,6 +573,10 @@
+diff -r 9608d5473017 drivers/net/cxgb3/regs.h
+--- a/drivers/net/cxgb3/regs.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/regs.h Wed May 06 16:56:24 2009 +0100
+@@ -572,6 +572,10 @@
+ #define S_GPIO10 10
#define V_GPIO10(x) ((x) << S_GPIO10)
#define F_GPIO10 V_GPIO10(1U)
-
++
+#define S_GPIO9 9
+#define V_GPIO9(x) ((x) << S_GPIO9)
+#define F_GPIO9 V_GPIO9(1U)
-+
+
#define S_GPIO7 7
#define V_GPIO7(x) ((x) << S_GPIO7)
- #define F_GPIO7 V_GPIO7(1U)
-diff -purN linux-2.6.27/drivers/net/cxgb3/sge.c linux-2.6.27.19-5.1/drivers/net/cxgb3/sge.c
---- linux-2.6.27/drivers/net/cxgb3/sge.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/sge.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/cxgb3/sge.c
+--- a/drivers/net/cxgb3/sge.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/sge.c Wed May 06 16:56:24 2009 +0100
@@ -36,6 +36,7 @@
#include <linux/ip.h>
#include <linux/tcp.h>
#include "common.h"
#include "regs.h"
#include "sge_defs.h"
-@@ -351,7 +352,8 @@ static void free_rx_bufs(struct pci_dev
+@@ -351,7 +352,8 @@
pci_unmap_single(pdev, pci_unmap_addr(d, dma_addr),
q->buf_size, PCI_DMA_FROMDEVICE);
if (q->use_pages) {
d->pg_chunk.page = NULL;
} else {
kfree_skb(d->skb);
-@@ -583,7 +585,7 @@ static void t3_reset_qset(struct sge_qse
+@@ -583,7 +585,7 @@
memset(q->fl, 0, sizeof(struct sge_fl) * SGE_RXQ_PER_SET);
memset(q->txq, 0, sizeof(struct sge_txq) * SGE_TXQ_PER_SET);
q->txq_stopped = 0;
kfree(q->lro_frag_tbl);
q->lro_nfrags = q->lro_frag_len = 0;
}
-@@ -603,9 +605,6 @@ static void t3_free_qset(struct adapter
+@@ -602,9 +604,6 @@
+ {
int i;
struct pci_dev *pdev = adapter->pdev;
-
+-
- if (q->tx_reclaim_timer.function)
- del_timer_sync(&q->tx_reclaim_timer);
--
+
for (i = 0; i < SGE_RXQ_PER_SET; ++i)
if (q->fl[i].desc) {
- spin_lock_irq(&adapter->sge.reg_lock);
-@@ -1859,6 +1858,53 @@ static void restart_tx(struct sge_qset *
+@@ -1859,6 +1858,53 @@
}
/**
* rx_eth - process an ingress ethernet packet
* @adap: the adapter
* @rq: the response queue that received the packet
-@@ -1882,7 +1928,7 @@ static void rx_eth(struct adapter *adap,
+@@ -1882,7 +1928,7 @@
pi = netdev_priv(skb->dev);
if (pi->rx_csum_offload && p->csum_valid && p->csum == htons(0xffff) &&
!p->fragment) {
skb->ip_summed = CHECKSUM_UNNECESSARY;
} else
skb->ip_summed = CHECKSUM_NONE;
-@@ -1897,16 +1943,28 @@ static void rx_eth(struct adapter *adap,
+@@ -1897,16 +1943,28 @@
grp,
ntohs(p->vlan),
p);
} else
netif_rx(skb);
}
-@@ -1937,38 +1995,6 @@ static inline int lro_frame_ok(const str
+@@ -1937,38 +1995,6 @@
eh->h_proto == htons(ETH_P_IP) && ih->ihl == (sizeof(*ih) >> 2);
}
static int t3_get_lro_header(void **eh, void **iph, void **tcph,
u64 *hdr_flags, void *priv)
{
-@@ -1981,9 +2007,6 @@ static int t3_get_lro_header(void **eh,
+@@ -1980,9 +2006,6 @@
+ *eh = (struct ethhdr *)(cpl + 1);
*iph = (struct iphdr *)((struct ethhdr *)*eh + 1);
*tcph = (struct tcphdr *)((struct iphdr *)*iph + 1);
-
+-
- if (!lro_segment_ok(*tcph))
- return -1;
--
+
*hdr_flags = LRO_IPV4 | LRO_TCP;
return 0;
- }
-@@ -2075,6 +2098,7 @@ static void init_lro_mgr(struct sge_qset
+@@ -2075,6 +2098,7 @@
{
lro_mgr->dev = qs->netdev;
lro_mgr->features = LRO_F_NAPI;
lro_mgr->ip_summed = CHECKSUM_UNNECESSARY;
lro_mgr->ip_summed_aggr = CHECKSUM_UNNECESSARY;
lro_mgr->max_desc = T3_MAX_LRO_SES;
-@@ -2246,8 +2270,7 @@ no_mem:
+@@ -2246,8 +2270,7 @@
} else if ((len = ntohl(r->len_cq)) != 0) {
struct sge_fl *fl;
fl = (len & F_RSPD_FLQ) ? &qs->fl[1] : &qs->fl[0];
if (fl->use_pages) {
-@@ -2878,9 +2901,7 @@ int t3_sge_alloc_qset(struct adapter *ad
+@@ -2878,9 +2901,7 @@
struct net_lro_mgr *lro_mgr = &q->lro_mgr;
init_qset_cntxt(q, id);
q->fl[0].desc = alloc_ring(adapter->pdev, p->fl_size,
sizeof(struct rx_desc),
-@@ -3043,6 +3064,24 @@ err:
- }
-
- /**
+@@ -3040,6 +3061,24 @@
+ err:
+ t3_free_qset(adapter, q);
+ return ret;
++}
++
++/**
+ * t3_stop_sge_timers - stop SGE timer call backs
+ * @adap: the adapter
+ *
+ if (q->tx_reclaim_timer.function)
+ del_timer_sync(&q->tx_reclaim_timer);
+ }
-+}
-+
-+/**
- * t3_free_sge_resources - free SGE resources
- * @adap: the adapter
- *
-diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/net/cxgb3/t3_hw.c
---- linux-2.6.27/drivers/net/cxgb3/t3_hw.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/t3_hw.c 2009-03-25 16:11:05.000000000 +0000
-@@ -194,21 +194,18 @@ int t3_mc7_bd_read(struct mc7 *mc7, unsi
+ }
+
+ /**
+diff -r 9608d5473017 drivers/net/cxgb3/t3_hw.c
+--- a/drivers/net/cxgb3/t3_hw.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/t3_hw.c Wed May 06 16:56:24 2009 +0100
+@@ -194,21 +194,18 @@
static void mi1_init(struct adapter *adap, const struct adapter_info *ai)
{
u32 clkdiv = adap->params.vpd.cclk / (2 * adap->params.vpd.mdc) - 1;
{
int ret;
u32 addr = V_REGADDR(reg_addr) | V_PHYADDR(phy_addr);
-@@ -217,16 +214,17 @@ static int mi1_read(struct adapter *adap
+@@ -217,16 +214,17 @@
return -EINVAL;
mutex_lock(&adapter->mdio_lock);
int reg_addr, unsigned int val)
{
int ret;
-@@ -236,37 +234,51 @@ static int mi1_write(struct adapter *ada
+@@ -236,18 +234,36 @@
return -EINVAL;
mutex_lock(&adapter->mdio_lock);
+ t3_mi1_read,
+ t3_mi1_write
};
-
- /*
++
++/*
+ * Performs the address cycle for clause 45 PHYs.
+ * Must be called with the MDIO_LOCK held.
+ */
+ return t3_wait_op_done(adapter, A_MI1_OP, F_BUSY, 0,
+ MDIO_ATTEMPTS, 10);
+}
-+
-+/*
+
+ /*
* MI1 read/write operations for indirect-addressed PHYs.
- */
- static int mi1_ext_read(struct adapter *adapter, int phy_addr, int mmd_addr,
+@@ -256,17 +272,13 @@
int reg_addr, unsigned int *valp)
{
int ret;
if (!ret)
*valp = t3_read_reg(adapter, A_MI1_DATA);
}
-@@ -278,18 +290,14 @@ static int mi1_ext_write(struct adapter
+@@ -278,18 +290,14 @@
int reg_addr, unsigned int val)
{
int ret;
}
mutex_unlock(&adapter->mdio_lock);
return ret;
-@@ -400,6 +408,29 @@ int t3_phy_advertise(struct cphy *phy, u
+@@ -400,6 +408,29 @@
}
/**
* t3_set_phy_speed_duplex - force PHY speed and duplex
* @phy: the PHY to operate on
* @speed: requested PHY speed
-@@ -434,27 +465,52 @@ int t3_set_phy_speed_duplex(struct cphy
+@@ -434,27 +465,52 @@
return mdio_write(phy, 0, MII_BMCR, ctl);
}
&mi1_mdio_ext_ops, "Chelsio T320"},
};
-@@ -467,29 +523,23 @@ const struct adapter_info *t3_get_adapte
+@@ -467,28 +523,22 @@
return id < ARRAY_SIZE(t3_adap_info) ? &t3_adap_info[id] : NULL;
}
+ { t3_ael1006_phy_prep },
+ { NULL },
};
-
+-
-#undef CAPS_1G
-#undef CAPS_10G
--
+
#define VPD_ENTRY(name, len) \
u8 name##_kword[2]; u8 name##_len; u8 name##_data[len]
-
-@@ -522,7 +572,7 @@ struct t3_vpd {
+@@ -522,7 +572,7 @@
u32 pad; /* for multiple-of-4 sizing and alignment */
};
#define EEPROM_STAT_ADDR 0x4000
#define VPD_BASE 0xc00
-@@ -1132,6 +1182,15 @@ void t3_link_changed(struct adapter *ada
+@@ -1132,6 +1182,15 @@
phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc);
if (link_ok != lc->link_ok && adapter->params.rev > 0 &&
uses_xaui(adapter)) {
if (link_ok)
-@@ -1142,10 +1201,6 @@ void t3_link_changed(struct adapter *ada
+@@ -1142,10 +1201,6 @@
lc->link_ok = link_ok;
lc->speed = speed < 0 ? SPEED_INVALID : speed;
lc->duplex = duplex < 0 ? DUPLEX_INVALID : duplex;
if (link_ok && speed >= 0 && lc->autoneg == AUTONEG_ENABLE) {
/* Set MAC speed, duplex, and flow control to match PHY. */
-@@ -1191,7 +1246,6 @@ int t3_link_start(struct cphy *phy, stru
+@@ -1191,7 +1246,6 @@
fc);
/* Also disables autoneg */
phy->ops->set_speed_duplex(phy, lc->speed, lc->duplex);
} else
phy->ops->autoneg_enable(phy);
} else {
-@@ -1221,7 +1275,7 @@ struct intr_info {
+@@ -1221,7 +1275,7 @@
unsigned int mask; /* bits to check in interrupt status */
const char *msg; /* message to print or NULL */
short stat_idx; /* stat counter to increment or -1 */
};
/**
-@@ -1682,25 +1736,23 @@ static int mac_intr_handler(struct adapt
+@@ -1682,25 +1736,23 @@
*/
int t3_phy_intr_handler(struct adapter *adapter)
{
}
}
-@@ -1763,6 +1815,17 @@ int t3_slow_intr_handler(struct adapter
+@@ -1763,6 +1815,17 @@
return 1;
}
/**
* t3_intr_enable - enable interrupts
* @adapter: the adapter whose interrupts should be enabled
-@@ -1805,10 +1868,8 @@ void t3_intr_enable(struct adapter *adap
+@@ -1805,10 +1868,8 @@
t3_write_reg(adapter, A_ULPTX_INT_ENABLE, ULPTX_INTR_MASK);
}
if (is_pcie(adapter))
t3_write_reg(adapter, A_PCIE_INT_ENABLE, PCIE_INTR_MASK);
else
-@@ -3329,6 +3390,8 @@ int t3_init_hw(struct adapter *adapter,
+@@ -3329,6 +3390,8 @@
init_hw_for_avail_ports(adapter, adapter->params.nports);
t3_sge_init(adapter, &adapter->params.sge);
t3_write_reg(adapter, A_CIM_HOST_ACC_DATA, vpd->uclk | fw_params);
t3_write_reg(adapter, A_CIM_BOOT_CFG,
V_BOOTADDR(FW_FLASH_BOOT_ADDR >> 2));
-@@ -3488,7 +3551,7 @@ void early_hw_init(struct adapter *adapt
+@@ -3488,7 +3551,7 @@
* Older PCIe cards lose their config space during reset, PCI-X
* ones don't.
*/
{
int i, save_and_restore_pcie =
adapter->params.rev < T3_REV_B2 && is_pcie(adapter);
-@@ -3556,7 +3619,7 @@ int t3_prep_adapter(struct adapter *adap
+@@ -3556,7 +3619,7 @@
int reset)
{
int ret;
get_pci_mode(adapter, &adapter->params.pci);
-@@ -3620,16 +3683,24 @@ int t3_prep_adapter(struct adapter *adap
+@@ -3620,16 +3683,24 @@
for_each_port(adapter, i) {
u8 hw_addr[6];
- ++j;
+ while (!adapter->params.vpd.port_type[++j])
+ ;
-+
+
+- p->port_type = &port_types[adapter->params.vpd.port_type[j]];
+- p->port_type->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
+- ai->mdio_ops);
+ pti = &port_types[adapter->params.vpd.port_type[j]];
+ if (!pti->phy_prep) {
+ CH_ALERT(adapter, "Invalid port type index %d\n",
+ adapter->params.vpd.port_type[j]);
+ return -EINVAL;
+ }
-
-- p->port_type = &port_types[adapter->params.vpd.port_type[j]];
-- p->port_type->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
-- ai->mdio_ops);
++
+ ret = pti->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
+ ai->mdio_ops);
+ if (ret)
/*
* The VPD EEPROM stores the base Ethernet address for the
-@@ -3643,9 +3714,9 @@ int t3_prep_adapter(struct adapter *adap
+@@ -3643,9 +3714,9 @@
ETH_ALEN);
memcpy(adapter->port[i]->perm_addr, hw_addr,
ETH_ALEN);
adapter->params.linkpoll_period = 10;
}
-@@ -3661,7 +3732,7 @@ void t3_led_ready(struct adapter *adapte
+@@ -3661,7 +3732,7 @@
int t3_replay_prep_adapter(struct adapter *adapter)
{
const struct adapter_info *ai = adapter->params.info;
int ret;
early_hw_init(adapter, ai);
-@@ -3670,15 +3741,17 @@ int t3_replay_prep_adapter(struct adapte
+@@ -3670,15 +3741,17 @@
return ret;
for_each_port(adapter, i) {
}
return 0;
-diff -purN linux-2.6.27/drivers/net/cxgb3/version.h linux-2.6.27.19-5.1/drivers/net/cxgb3/version.h
---- linux-2.6.27/drivers/net/cxgb3/version.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/version.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/cxgb3/version.h
+--- a/drivers/net/cxgb3/version.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/version.h Wed May 06 16:56:24 2009 +0100
@@ -35,7 +35,7 @@
#define DRV_DESC "Chelsio T3 Network Driver"
#define DRV_NAME "cxgb3"
/* Firmware version */
#define FW_VERSION_MAJOR 7
-diff -purN linux-2.6.27/drivers/net/cxgb3/vsc8211.c linux-2.6.27.19-5.1/drivers/net/cxgb3/vsc8211.c
---- linux-2.6.27/drivers/net/cxgb3/vsc8211.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/vsc8211.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/cxgb3/vsc8211.c
+--- a/drivers/net/cxgb3/vsc8211.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/vsc8211.c Wed May 06 16:56:25 2009 +0100
@@ -33,28 +33,40 @@
/* VSC8211 PHY specific registers. */
VSC_INTR_NEG_DONE)
#define INTR_MASK (CFG_CHG_INTR_MASK | VSC_INTR_TX_FIFO | VSC_INTR_RX_FIFO | \
VSC_INTR_ENABLE)
-@@ -184,6 +196,112 @@ static int vsc8211_get_link_status(struc
+@@ -184,6 +196,112 @@
return 0;
}
static int vsc8211_power_down(struct cphy *cphy, int enable)
{
return t3_mdio_change_bits(cphy, 0, MII_BMCR, BMCR_PDOWN,
-@@ -221,8 +339,66 @@ static struct cphy_ops vsc8211_ops = {
+@@ -221,8 +339,66 @@
.power_down = vsc8211_power_down,
};
+ udelay(5); /* delay after reset before next SMI */
+ return 0;
}
-diff -purN linux-2.6.27/drivers/net/e1000/e1000_ethtool.c linux-2.6.27.19-5.1/drivers/net/e1000/e1000_ethtool.c
---- linux-2.6.27/drivers/net/e1000/e1000_ethtool.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000/e1000_ethtool.c 2009-03-25 16:11:03.000000000 +0000
-@@ -1774,7 +1774,8 @@ static void e1000_get_wol(struct net_dev
+diff -r 9608d5473017 drivers/net/e1000/e1000_ethtool.c
+--- a/drivers/net/e1000/e1000_ethtool.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000/e1000_ethtool.c Wed May 06 16:56:25 2009 +0100
+@@ -1774,7 +1774,8 @@
/* this function will set ->supported = 0 and return 1 if wol is not
* supported by this hardware */
return;
/* apply any specific unsupported masks here */
-@@ -1811,7 +1812,8 @@ static int e1000_set_wol(struct net_devi
+@@ -1811,7 +1812,8 @@
if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
return -EOPNOTSUPP;
return wol->wolopts ? -EOPNOTSUPP : 0;
switch (hw->device_id) {
-@@ -1838,6 +1840,8 @@ static int e1000_set_wol(struct net_devi
+@@ -1837,6 +1839,8 @@
+ adapter->wol |= E1000_WUFC_BC;
if (wol->wolopts & WAKE_MAGIC)
adapter->wol |= E1000_WUFC_MAG;
-
-+ device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
+
++ device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
+
return 0;
}
-
-diff -purN linux-2.6.27/drivers/net/e1000/e1000_main.c linux-2.6.27.19-5.1/drivers/net/e1000/e1000_main.c
---- linux-2.6.27/drivers/net/e1000/e1000_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000/e1000_main.c 2009-03-25 16:11:03.000000000 +0000
+diff -r 9608d5473017 drivers/net/e1000/e1000_main.c
+--- a/drivers/net/e1000/e1000_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000/e1000_main.c Wed May 06 16:56:25 2009 +0100
@@ -31,7 +31,7 @@
char e1000_driver_name[] = "e1000";
const char e1000_driver_version[] = DRV_VERSION;
static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
-@@ -927,7 +927,7 @@ static int __devinit e1000_probe(struct
+@@ -927,7 +927,7 @@
err = pci_enable_device(pdev);
} else {
bars = pci_select_bars(pdev, IORESOURCE_MEM);
}
if (err)
return err;
-@@ -1180,6 +1180,7 @@ static int __devinit e1000_probe(struct
+@@ -1180,6 +1180,7 @@
/* initialize the wol settings based on the eeprom settings */
adapter->wol = adapter->eeprom_wol;
/* print bus type/speed/width info */
DPRINTK(PROBE, INFO, "(PCI%s:%s:%s) ",
-@@ -3834,7 +3835,7 @@ static irqreturn_t e1000_intr(int irq, v
+@@ -3834,7 +3835,7 @@
struct e1000_hw *hw = &adapter->hw;
u32 rctl, icr = er32(ICR);
return IRQ_NONE; /* Not our interrupt */
/* IMS will not auto-mask if INT_ASSERTED is not set, and if it is
-@@ -4347,12 +4348,8 @@ static bool e1000_clean_rx_irq_ps(struct
+@@ -4347,12 +4348,8 @@
pci_unmap_page(pdev, ps_page_dma->ps_page_dma[j],
PAGE_SIZE, PCI_DMA_FROMDEVICE);
ps_page_dma->ps_page_dma[j] = 0;
}
/* strip the ethernet crc, problem is we're using pages now so
-@@ -4551,7 +4548,7 @@ static void e1000_alloc_rx_buffers_ps(st
+@@ -4551,7 +4548,7 @@
if (j < adapter->rx_ps_pages) {
if (likely(!ps_page->ps_page[j])) {
ps_page->ps_page[j] =
if (unlikely(!ps_page->ps_page[j])) {
adapter->alloc_rx_buff_failed++;
goto no_buffers;
-diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/net/e1000e/82571.c
---- linux-2.6.27/drivers/net/e1000e/82571.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/82571.c 2009-03-25 16:11:07.000000000 +0000
+diff -r 9608d5473017 drivers/net/e1000e/82571.c
+--- a/drivers/net/e1000e/82571.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/82571.c Wed May 06 16:56:25 2009 +0100
@@ -38,6 +38,7 @@
* 82573V Gigabit Ethernet Controller (Copper)
* 82573E Gigabit Ethernet Controller (Copper)
static s32 e1000_get_phy_id_82571(struct e1000_hw *hw);
static s32 e1000_setup_copper_link_82571(struct e1000_hw *hw);
static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw);
-@@ -63,6 +66,8 @@ static s32 e1000_fix_nvm_checksum_82571(
+@@ -63,6 +66,8 @@
static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw);
static s32 e1000_setup_link_82571(struct e1000_hw *hw);
static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw);
/**
* e1000_init_phy_params_82571 - Init PHY func ptrs.
-@@ -92,6 +97,9 @@ static s32 e1000_init_phy_params_82571(s
+@@ -92,6 +97,9 @@
case e1000_82573:
phy->type = e1000_phy_m88;
break;
default:
return -E1000_ERR_PHY;
break;
-@@ -111,6 +119,10 @@ static s32 e1000_init_phy_params_82571(s
- if (phy->id != M88E1111_I_PHY_ID)
- return -E1000_ERR_PHY;
+@@ -109,6 +117,10 @@
break;
-+ case e1000_82574:
-+ if (phy->id != BME1000_E_PHY_ID_R2)
+ case e1000_82573:
+ if (phy->id != M88E1111_I_PHY_ID)
+ return -E1000_ERR_PHY;
+ break;
- default:
- return -E1000_ERR_PHY;
++ case e1000_82574:
++ if (phy->id != BME1000_E_PHY_ID_R2)
+ return -E1000_ERR_PHY;
break;
-@@ -150,6 +162,7 @@ static s32 e1000_init_nvm_params_82571(s
+ default:
+@@ -150,6 +162,7 @@
switch (hw->mac.type) {
case e1000_82573:
if (((eecd >> 15) & 0x3) == 0x3) {
nvm->type = e1000_nvm_flash_hw;
nvm->word_size = 2048;
-@@ -245,6 +258,17 @@ static s32 e1000_init_mac_params_82571(s
+@@ -245,6 +258,17 @@
break;
}
return 0;
}
-@@ -330,6 +354,8 @@ static s32 e1000_get_variants_82571(stru
+@@ -330,6 +354,8 @@
static s32 e1000_get_phy_id_82571(struct e1000_hw *hw)
{
struct e1000_phy_info *phy = &hw->phy;
switch (hw->mac.type) {
case e1000_82571:
-@@ -345,6 +371,20 @@ static s32 e1000_get_phy_id_82571(struct
+@@ -344,6 +370,20 @@
+ break;
case e1000_82573:
return e1000e_get_phy_id(hw);
- break;
++ break;
+ case e1000_82574:
+ ret_val = e1e_rphy(hw, PHY_ID1, &phy_id);
+ if (ret_val)
+
+ phy->id |= (u32)(phy_id);
+ phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
-+ break;
+ break;
default:
return -E1000_ERR_PHY;
- break;
-@@ -421,7 +461,7 @@ static s32 e1000_acquire_nvm_82571(struc
+@@ -421,7 +461,7 @@
if (ret_val)
return ret_val;
ret_val = e1000e_acquire_nvm(hw);
if (ret_val)
-@@ -461,6 +501,7 @@ static s32 e1000_write_nvm_82571(struct
+@@ -461,6 +501,7 @@
switch (hw->mac.type) {
case e1000_82573:
ret_val = e1000_write_nvm_eewr_82571(hw, offset, words, data);
break;
case e1000_82571:
-@@ -735,7 +776,7 @@ static s32 e1000_reset_hw_82571(struct e
+@@ -735,7 +776,7 @@
* Must acquire the MDIO ownership before MAC reset.
* Ownership defaults to firmware after a reset.
*/
extcnf_ctrl = er32(EXTCNF_CTRL);
extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP;
-@@ -776,7 +817,7 @@ static s32 e1000_reset_hw_82571(struct e
+@@ -776,7 +817,7 @@
* Need to wait for Phy configuration completion before accessing
* NVM and Phy.
*/
msleep(25);
/* Clear any pending interrupt events. */
-@@ -843,7 +884,7 @@ static s32 e1000_init_hw_82571(struct e1
+@@ -843,7 +884,7 @@
ew32(TXDCTL(0), reg_data);
/* ...for both queues. */
reg_data = er32(TXDCTL(1));
reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) |
E1000_TXDCTL_FULL_TX_DESC_WB |
-@@ -918,19 +959,34 @@ static void e1000_initialize_hw_bits_825
+@@ -918,19 +959,34 @@
}
/* Device Control */
}
/**
-@@ -947,7 +1003,7 @@ void e1000e_clear_vfta(struct e1000_hw *
+@@ -947,7 +1003,7 @@
u32 vfta_offset = 0;
u32 vfta_bit_in_reg = 0;
if (hw->mng_cookie.vlan_id != 0) {
/*
* The VFTA is a 4096b bit-field, each identifying
-@@ -976,6 +1032,48 @@ void e1000e_clear_vfta(struct e1000_hw *
- }
-
- /**
+@@ -973,6 +1029,48 @@
+ E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, offset, vfta_value);
+ e1e_flush();
+ }
++}
++
++/**
+ * e1000_check_mng_mode_82574 - Check manageability is enabled
+ * @hw: pointer to the HW structure
+ *
+ ew32(LEDCTL, ctrl);
+
+ return 0;
-+}
-+
-+/**
- * e1000_update_mc_addr_list_82571 - Update Multicast addresses
- * @hw: pointer to the HW structure
- * @mc_addr_list: array of multicast addresses to program
-@@ -1018,7 +1116,8 @@ static s32 e1000_setup_link_82571(struct
+ }
+
+ /**
+@@ -1018,7 +1116,8 @@
* the default flow control setting, so we explicitly
* set it to full.
*/
hw->fc.type = e1000_fc_full;
return e1000e_setup_link(hw);
-@@ -1045,6 +1144,7 @@ static s32 e1000_setup_copper_link_82571
+@@ -1045,6 +1144,7 @@
switch (hw->phy.type) {
case e1000_phy_m88:
ret_val = e1000e_copper_link_setup_m88(hw);
break;
case e1000_phy_igp_2:
-@@ -1114,11 +1214,10 @@ static s32 e1000_valid_led_default_82571
+@@ -1114,11 +1214,10 @@
return ret_val;
}
*data = ID_LED_DEFAULT;
return 0;
-@@ -1265,13 +1364,13 @@ static void e1000_clear_hw_cntrs_82571(s
+@@ -1265,13 +1364,13 @@
}
static struct e1000_mac_operations e82571_mac_ops = {
.led_off = e1000e_led_off_generic,
.update_mc_addr_list = e1000_update_mc_addr_list_82571,
.reset_hw = e1000_reset_hw_82571,
-@@ -1312,6 +1411,22 @@ static struct e1000_phy_operations e82_p
+@@ -1310,6 +1409,22 @@
+ .set_d0_lplu_state = e1000_set_d0_lplu_state_82571,
+ .set_d3_lplu_state = e1000e_set_d3_lplu_state,
.write_phy_reg = e1000e_write_phy_reg_m88,
- };
-
++};
++
+static struct e1000_phy_operations e82_phy_ops_bm = {
+ .acquire_phy = e1000_get_hw_semaphore_82571,
+ .check_reset_block = e1000e_check_reset_block_generic,
+ .set_d0_lplu_state = e1000_set_d0_lplu_state_82571,
+ .set_d3_lplu_state = e1000e_set_d3_lplu_state,
+ .write_phy_reg = e1000e_write_phy_reg_bm2,
-+};
-+
+ };
+
static struct e1000_nvm_operations e82571_nvm_ops = {
- .acquire_nvm = e1000_acquire_nvm_82571,
- .read_nvm = e1000e_read_nvm_eerd,
-@@ -1375,3 +1490,21 @@ struct e1000_info e1000_82573_info = {
+@@ -1375,3 +1490,21 @@
.nvm_ops = &e82571_nvm_ops,
};
+ .nvm_ops = &e82571_nvm_ops,
+};
+
-diff -purN linux-2.6.27/drivers/net/e1000e/defines.h linux-2.6.27.19-5.1/drivers/net/e1000e/defines.h
---- linux-2.6.27/drivers/net/e1000e/defines.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/defines.h 2009-03-25 16:11:07.000000000 +0000
+diff -r 9608d5473017 drivers/net/e1000e/defines.h
+--- a/drivers/net/e1000e/defines.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/defines.h Wed May 06 16:56:25 2009 +0100
@@ -71,9 +71,11 @@
#define E1000_CTRL_EXT_RO_DIS 0x00020000 /* Relaxed Ordering disable */
#define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000
#define E1000_EECD_SIZE 0x00000200 /* NVM Size (0=64 word 1=256 word) */
/* NVM Addressing bits based on type (0-small, 1-large) */
#define E1000_EECD_ADDR_BITS 0x00000400
-diff -purN linux-2.6.27/drivers/net/e1000e/e1000.h linux-2.6.27.19-5.1/drivers/net/e1000e/e1000.h
---- linux-2.6.27/drivers/net/e1000e/e1000.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/e1000.h 2009-03-25 16:11:07.000000000 +0000
-@@ -62,6 +62,11 @@ struct e1000_info;
+diff -r 9608d5473017 drivers/net/e1000e/e1000.h
+--- a/drivers/net/e1000e/e1000.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/e1000.h Wed May 06 16:56:25 2009 +0100
+@@ -62,6 +62,11 @@
e_printk(KERN_NOTICE, adapter, format, ## arg)
/* Tx/Rx descriptor defines */
#define E1000_DEFAULT_TXD 256
#define E1000_MAX_TXD 4096
-@@ -95,9 +100,11 @@ enum e1000_boards {
+@@ -95,9 +100,11 @@
board_82571,
board_82572,
board_82573,
};
struct e1000_queue_stats {
-@@ -146,6 +153,12 @@ struct e1000_ring {
+@@ -145,6 +152,12 @@
+
/* array of buffer information structs */
struct e1000_buffer *buffer_info;
-
++
+ char name[IFNAMSIZ + 5];
+ u32 ims_val;
+ u32 itr_val;
+ u16 itr_register;
+ int set_itr;
-+
+
struct sk_buff *rx_skb_top;
- struct e1000_queue_stats stats;
-@@ -273,6 +286,9 @@ struct e1000_adapter {
+@@ -273,6 +286,9 @@
u32 test_icr;
u32 msg_enable;
u32 eeprom_wol;
u32 wol;
-@@ -283,6 +299,7 @@ struct e1000_adapter {
+@@ -283,6 +299,7 @@
unsigned long led_status;
unsigned int flags;
struct work_struct downshift_task;
struct work_struct update_phy_task;
};
-@@ -290,6 +307,7 @@ struct e1000_adapter {
+@@ -290,6 +307,7 @@
struct e1000_info {
enum e1000_mac_type mac;
unsigned int flags;
u32 pba;
s32 (*get_variants)(struct e1000_adapter *);
struct e1000_mac_operations *mac_ops;
-@@ -308,6 +326,7 @@ struct e1000_info {
+@@ -308,6 +326,7 @@
#define FLAG_HAS_JUMBO_FRAMES (1 << 7)
#define FLAG_READ_ONLY_NVM (1 << 8)
#define FLAG_IS_ICH (1 << 9)
#define FLAG_HAS_SMART_POWER_DOWN (1 << 11)
#define FLAG_IS_QUAD_PORT_A (1 << 12)
#define FLAG_IS_QUAD_PORT (1 << 13)
-@@ -330,6 +349,9 @@ struct e1000_info {
+@@ -329,6 +348,9 @@
+ #define FLAG_TSO_FORCE (1 << 29)
#define FLAG_RX_RESTART_NOW (1 << 30)
#define FLAG_MSI_TEST_FAILED (1 << 31)
-
++
+/* CRC Stripping defines */
+#define FLAG2_CRC_STRIPPING (1 << 0)
-+
+
#define E1000_RX_DESC_PS(R, i) \
(&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
- #define E1000_GET_DESC(R, i, type) (&(((struct type *)((R).desc))[i]))
-@@ -366,6 +388,8 @@ extern int e1000e_setup_tx_resources(str
+@@ -366,6 +388,8 @@
extern void e1000e_free_rx_resources(struct e1000_adapter *adapter);
extern void e1000e_free_tx_resources(struct e1000_adapter *adapter);
extern void e1000e_update_stats(struct e1000_adapter *adapter);
extern unsigned int copybreak;
-@@ -374,8 +398,10 @@ extern char *e1000e_get_hw_dev_name(stru
+@@ -374,8 +398,10 @@
extern struct e1000_info e1000_82571_info;
extern struct e1000_info e1000_82572_info;
extern struct e1000_info e1000_82573_info;
extern struct e1000_info e1000_es2_info;
extern s32 e1000e_read_pba_num(struct e1000_hw *hw, u32 *pba_num);
-@@ -449,10 +475,13 @@ extern s32 e1000e_get_cable_length_m88(s
+@@ -449,10 +475,13 @@
extern s32 e1000e_get_phy_info_m88(struct e1000_hw *hw);
extern s32 e1000e_read_phy_reg_m88(struct e1000_hw *hw, u32 offset, u16 *data);
extern s32 e1000e_write_phy_reg_m88(struct e1000_hw *hw, u32 offset, u16 data);
extern void e1000e_phy_force_speed_duplex_setup(struct e1000_hw *hw, u16 *phy_ctrl);
extern s32 e1000e_write_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 data);
extern s32 e1000e_read_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 *data);
-@@ -523,7 +552,12 @@ static inline s32 e1000_get_phy_info(str
+@@ -523,7 +552,12 @@
return hw->phy.ops.get_phy_info(hw);
}
extern bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw);
extern s32 e1000e_mng_write_dhcp_info(struct e1000_hw *hw, u8 *buffer, u16 length);
-diff -purN linux-2.6.27/drivers/net/e1000e/es2lan.c linux-2.6.27.19-5.1/drivers/net/e1000e/es2lan.c
---- linux-2.6.27/drivers/net/e1000e/es2lan.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/es2lan.c 2009-03-25 16:11:07.000000000 +0000
-@@ -1247,7 +1247,7 @@ static void e1000_clear_hw_cntrs_80003es
+diff -r 9608d5473017 drivers/net/e1000e/es2lan.c
+--- a/drivers/net/e1000e/es2lan.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/es2lan.c Wed May 06 16:56:25 2009 +0100
+@@ -1247,7 +1247,7 @@
}
static struct e1000_mac_operations es2_mac_ops = {
/* check_for_link dependent on media type */
.cleanup_led = e1000e_cleanup_led_generic,
.clear_hw_cntrs = e1000_clear_hw_cntrs_80003es2lan,
-diff -purN linux-2.6.27/drivers/net/e1000e/ethtool.c linux-2.6.27.19-5.1/drivers/net/e1000e/ethtool.c
---- linux-2.6.27/drivers/net/e1000e/ethtool.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/ethtool.c 2009-03-25 16:11:07.000000000 +0000
-@@ -575,6 +575,7 @@ static int e1000_set_eeprom(struct net_d
+diff -r 9608d5473017 drivers/net/e1000e/ethtool.c
+--- a/drivers/net/e1000e/ethtool.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/ethtool.c Wed May 06 16:56:25 2009 +0100
+@@ -575,6 +575,7 @@
* and flush shadow RAM for 82573 controllers
*/
if ((ret_val == 0) && ((first_word <= NVM_CHECKSUM_REG) ||
(hw->mac.type == e1000_82573)))
e1000e_update_nvm_checksum(hw);
-@@ -786,8 +787,10 @@ static int e1000_reg_test(struct e1000_a
+@@ -786,8 +787,10 @@
toggle = 0x7FFFF3FF;
break;
case e1000_82573:
toggle = 0x7FFFF033;
break;
default:
-@@ -840,7 +843,9 @@ static int e1000_reg_test(struct e1000_a
+@@ -840,7 +843,9 @@
REG_PATTERN_TEST(E1000_TIDV, 0x0000FFFF, 0x0000FFFF);
for (i = 0; i < mac->rar_entry_count; i++)
REG_PATTERN_TEST_ARRAY(E1000_RA, ((i << 1) + 1),
for (i = 0; i < mac->mta_reg_count; i++)
REG_PATTERN_TEST_ARRAY(E1000_MTA, i, 0xFFFFFFFF, 0xFFFFFFFF);
-@@ -891,10 +896,18 @@ static int e1000_intr_test(struct e1000_
+@@ -891,10 +896,18 @@
u32 shared_int = 1;
u32 irq = adapter->pdev->irq;
int i;
/* Hook up test interrupt handler just for this test */
if (!request_irq(irq, &e1000_test_intr, IRQF_PROBE_SHARED, netdev->name,
netdev)) {
-@@ -902,7 +915,8 @@ static int e1000_intr_test(struct e1000_
+@@ -902,7 +915,8 @@
} else if (request_irq(irq, &e1000_test_intr, IRQF_SHARED,
netdev->name, netdev)) {
*data = 1;
}
e_info("testing %s interrupt\n", (shared_int ? "shared" : "unshared"));
-@@ -912,12 +926,23 @@ static int e1000_intr_test(struct e1000_
+@@ -912,11 +926,22 @@
/* Test each interrupt */
for (i = 0; i < 10; i++) {
-
/* Interrupt to test */
mask = 1 << i;
-
++
+ if (adapter->flags & FLAG_IS_ICH) {
+ switch (mask) {
+ case E1000_ICR_RXSEQ:
+ break;
+ }
+ }
-+
+
if (!shared_int) {
/*
- * Disable the interrupt to be reported in
-@@ -981,7 +1006,14 @@ static int e1000_intr_test(struct e1000_
+@@ -981,7 +1006,14 @@
/* Unhook test interrupt handler */
free_irq(irq, netdev);
}
static void e1000_free_desc_rings(struct e1000_adapter *adapter)
-@@ -1681,7 +1713,8 @@ static void e1000_get_wol(struct net_dev
+@@ -1681,7 +1713,8 @@
wol->supported = 0;
wol->wolopts = 0;
return;
wol->supported = WAKE_UCAST | WAKE_MCAST |
-@@ -1719,7 +1752,8 @@ static int e1000_set_wol(struct net_devi
+@@ -1719,7 +1752,8 @@
if (wol->wolopts & WAKE_MAGICSECURE)
return -EOPNOTSUPP;
return wol->wolopts ? -EOPNOTSUPP : 0;
/* these settings will always override what we currently have */
-@@ -1738,6 +1772,8 @@ static int e1000_set_wol(struct net_devi
+@@ -1737,6 +1771,8 @@
+ adapter->wol |= E1000_WUFC_LNKC;
if (wol->wolopts & WAKE_ARP)
adapter->wol |= E1000_WUFC_ARP;
-
-+ device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
+
++ device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
+
return 0;
}
-
-@@ -1762,11 +1798,13 @@ static void e1000_led_blink_callback(uns
+@@ -1762,11 +1798,13 @@
static int e1000_phys_id(struct net_device *netdev, u32 data)
{
struct e1000_adapter *adapter = netdev_priv(netdev);
if (!adapter->blink_timer.function) {
init_timer(&adapter->blink_timer);
adapter->blink_timer.function =
-@@ -1776,16 +1814,16 @@ static int e1000_phys_id(struct net_devi
+@@ -1776,16 +1814,16 @@
mod_timer(&adapter->blink_timer, jiffies);
msleep_interruptible(data * 1000);
del_timer_sync(&adapter->blink_timer);
return 0;
}
-diff -purN linux-2.6.27/drivers/net/e1000e/hw.h linux-2.6.27.19-5.1/drivers/net/e1000e/hw.h
---- linux-2.6.27/drivers/net/e1000e/hw.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/hw.h 2009-03-25 16:11:07.000000000 +0000
-@@ -65,7 +65,11 @@ enum e1e_registers {
+diff -r 9608d5473017 drivers/net/e1000e/hw.h
+--- a/drivers/net/e1000e/hw.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/hw.h Wed May 06 16:56:25 2009 +0100
+@@ -65,7 +65,11 @@
E1000_ICS = 0x000C8, /* Interrupt Cause Set - WO */
E1000_IMS = 0x000D0, /* Interrupt Mask Set - RW */
E1000_IMC = 0x000D8, /* Interrupt Mask Clear - WO */
E1000_RCTL = 0x00100, /* Rx Control - RW */
E1000_FCTTV = 0x00170, /* Flow Control Transmit Timer Value - RW */
E1000_TXCW = 0x00178, /* Tx Configuration Word - RW */
-@@ -83,6 +87,7 @@ enum e1e_registers {
+@@ -83,6 +87,7 @@
E1000_EEMNGCTL = 0x01010, /* MNG EEprom Control */
E1000_EEWR = 0x0102C, /* EEPROM Write Register - RW */
E1000_FLOP = 0x0103C, /* FLASH Opcode Register */
E1000_ERT = 0x02008, /* Early Rx Threshold - RW */
E1000_FCRTL = 0x02160, /* Flow Control Receive Threshold Low - RW */
E1000_FCRTH = 0x02168, /* Flow Control Receive Threshold High - RW */
-@@ -332,6 +337,7 @@ enum e1e_registers {
+@@ -332,6 +337,7 @@
#define E1000_DEV_ID_82573E 0x108B
#define E1000_DEV_ID_82573E_IAMT 0x108C
#define E1000_DEV_ID_82573L 0x109A
#define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096
#define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098
-@@ -346,6 +352,7 @@ enum e1e_registers {
+@@ -346,6 +352,7 @@
#define E1000_DEV_ID_ICH8_IFE_G 0x10C5
#define E1000_DEV_ID_ICH8_IGP_M 0x104D
#define E1000_DEV_ID_ICH9_IGP_AMT 0x10BD
#define E1000_DEV_ID_ICH9_IGP_M_AMT 0x10F5
#define E1000_DEV_ID_ICH9_IGP_M 0x10BF
#define E1000_DEV_ID_ICH9_IGP_M_V 0x10CB
-@@ -356,6 +363,10 @@ enum e1e_registers {
+@@ -356,6 +363,10 @@
#define E1000_DEV_ID_ICH10_R_BM_LM 0x10CC
#define E1000_DEV_ID_ICH10_R_BM_LF 0x10CD
#define E1000_DEV_ID_ICH10_R_BM_V 0x10CE
#define E1000_FUNC_1 1
-@@ -363,9 +374,11 @@ enum e1000_mac_type {
+@@ -363,9 +374,11 @@
e1000_82571,
e1000_82572,
e1000_82573,
};
enum e1000_media_type {
-@@ -696,8 +709,7 @@ struct e1000_host_mng_command_info {
+@@ -696,8 +709,7 @@
/* Function pointers and static data for the MAC. */
struct e1000_mac_operations {
s32 (*check_for_link)(struct e1000_hw *);
s32 (*cleanup_led)(struct e1000_hw *);
void (*clear_hw_cntrs)(struct e1000_hw *);
-diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers/net/e1000e/ich8lan.c
---- linux-2.6.27/drivers/net/e1000e/ich8lan.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/ich8lan.c 2009-03-25 16:11:07.000000000 +0000
+diff -r 9608d5473017 drivers/net/e1000e/ich8lan.c
+--- a/drivers/net/e1000e/ich8lan.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/ich8lan.c Wed May 06 16:56:25 2009 +0100
@@ -43,7 +43,9 @@
* 82567LM-2 Gigabit Network Connection
* 82567LF-2 Gigabit Network Connection
*/
#include <linux/netdevice.h>
-@@ -171,12 +173,15 @@ static s32 e1000_check_polarity_ife_ich8
+@@ -171,12 +173,15 @@
static s32 e1000_erase_flash_bank_ich8lan(struct e1000_hw *hw, u32 bank);
static s32 e1000_retry_write_flash_byte_ich8lan(struct e1000_hw *hw,
u32 offset, u8 byte);
static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg)
{
-@@ -448,6 +453,22 @@ static void e1000_release_swflag_ich8lan
- }
+@@ -445,6 +450,22 @@
- /**
+ nvm_owner = -1;
+ mutex_unlock(&nvm_mutex);
++}
++
++/**
+ * e1000_check_mng_mode_ich8lan - Checks management mode
+ * @hw: pointer to the HW structure
+ *
+
+ return (fwsm & E1000_FWSM_MODE_MASK) ==
+ (E1000_ICH_MNG_IAMT_MODE << E1000_FWSM_MODE_SHIFT);
-+}
-+
-+/**
- * e1000_check_reset_block_ich8lan - Check if PHY reset is blocked
- * @hw: pointer to the HW structure
- *
-@@ -928,6 +949,56 @@ static s32 e1000_set_d3_lplu_state_ich8l
+ }
+
+ /**
+@@ -928,6 +949,56 @@
}
/**
* e1000_read_nvm_ich8lan - Read word(s) from the NVM
* @hw: pointer to the HW structure
* @offset: The offset (in bytes) of the word(s) to read.
-@@ -943,6 +1014,7 @@ static s32 e1000_read_nvm_ich8lan(struct
+@@ -943,6 +1014,7 @@
struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
u32 act_offset;
s32 ret_val;
u16 i, word;
if ((offset >= nvm->word_size) || (words > nvm->word_size - offset) ||
-@@ -955,10 +1027,11 @@ static s32 e1000_read_nvm_ich8lan(struct
+@@ -955,10 +1027,11 @@
if (ret_val)
return ret_val;
act_offset += offset;
for (i = 0; i < words; i++) {
-@@ -1106,6 +1179,29 @@ static s32 e1000_read_flash_word_ich8lan
+@@ -1106,6 +1179,29 @@
}
/**
* e1000_read_flash_data_ich8lan - Read byte or word from NVM
* @hw: pointer to the HW structure
* @offset: The offset (in bytes) of the byte or word to read.
-@@ -1236,7 +1332,7 @@ static s32 e1000_update_nvm_checksum_ich
+@@ -1236,7 +1332,7 @@
{
struct e1000_nvm_info *nvm = &hw->nvm;
struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
s32 ret_val;
u16 data;
-@@ -1256,7 +1352,11 @@ static s32 e1000_update_nvm_checksum_ich
+@@ -1256,7 +1352,11 @@
* write to bank 0 etc. We also need to erase the segment that
* is going to be written
*/
new_bank_offset = nvm->flash_bank_size;
old_bank_offset = 0;
e1000_erase_flash_bank_ich8lan(hw, 1);
-@@ -1791,12 +1891,17 @@ static s32 e1000_reset_hw_ich8lan(struct
+@@ -1791,12 +1891,17 @@
ctrl |= E1000_CTRL_PHY_RST;
}
ret_val = e1000_acquire_swflag_ich8lan(hw);
ret_val = e1000e_get_auto_rd_done(hw);
if (ret_val) {
-@@ -2267,13 +2372,14 @@ void e1000e_gig_downshift_workaround_ich
+@@ -2267,13 +2372,14 @@
* 'LPLU Enabled' and 'Gig Disable' to force link speed negotiation
* to a lower speed.
*
phy_ctrl = er32(PHY_CTRL);
phy_ctrl |= E1000_PHY_CTRL_D0A_LPLU |
E1000_PHY_CTRL_GBE_DISABLE;
-@@ -2331,6 +2437,39 @@ static s32 e1000_led_off_ich8lan(struct
+@@ -2331,6 +2437,39 @@
}
/**
* e1000_clear_hw_cntrs_ich8lan - Clear statistical counters
* @hw: pointer to the HW structure
*
-@@ -2360,7 +2499,7 @@ static void e1000_clear_hw_cntrs_ich8lan
+@@ -2360,7 +2499,7 @@
}
static struct e1000_mac_operations ich8_mac_ops = {
.check_for_link = e1000e_check_for_copper_link,
.cleanup_led = e1000_cleanup_led_ich8lan,
.clear_hw_cntrs = e1000_clear_hw_cntrs_ich8lan,
-@@ -2380,7 +2519,7 @@ static struct e1000_phy_operations ich8_
+@@ -2380,7 +2519,7 @@
.check_reset_block = e1000_check_reset_block_ich8lan,
.commit_phy = NULL,
.force_speed_duplex = e1000_phy_force_speed_duplex_ich8lan,
.get_cable_length = e1000e_get_cable_length_igp_2,
.get_phy_info = e1000_get_phy_info_ich8lan,
.read_phy_reg = e1000e_read_phy_reg_igp,
-@@ -2435,3 +2574,20 @@ struct e1000_info e1000_ich9_info = {
+@@ -2435,3 +2574,20 @@
.nvm_ops = &ich8_nvm_ops,
};
+ .phy_ops = &ich8_phy_ops,
+ .nvm_ops = &ich8_nvm_ops,
+};
-diff -purN linux-2.6.27/drivers/net/e1000e/lib.c linux-2.6.27.19-5.1/drivers/net/e1000e/lib.c
---- linux-2.6.27/drivers/net/e1000e/lib.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/lib.c 2009-03-25 16:11:07.000000000 +0000
-@@ -2222,17 +2222,18 @@ static s32 e1000_mng_enable_host_if(stru
+diff -r 9608d5473017 drivers/net/e1000e/lib.c
+--- a/drivers/net/e1000e/lib.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/lib.c Wed May 06 16:56:25 2009 +0100
+@@ -2222,17 +2222,18 @@
}
/**
}
/**
-diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/net/e1000e/netdev.c
---- linux-2.6.27/drivers/net/e1000e/netdev.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/netdev.c 2009-03-25 16:11:07.000000000 +0000
-@@ -55,9 +55,11 @@ static const struct e1000_info *e1000_in
+diff -r 9608d5473017 drivers/net/e1000e/netdev.c
+--- a/drivers/net/e1000e/netdev.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/netdev.c Wed May 06 16:56:25 2009 +0100
+@@ -55,9 +55,11 @@
[board_82571] = &e1000_82571_info,
[board_82572] = &e1000_82572_info,
[board_82573] = &e1000_82573_info,
};
#ifdef DEBUG
-@@ -256,7 +258,7 @@ static void e1000_alloc_rx_buffers_ps(st
+@@ -256,7 +258,7 @@
continue;
}
if (!ps_page->page) {
if (!ps_page->page) {
adapter->alloc_rx_buff_failed++;
goto no_buffers;
-@@ -497,6 +499,10 @@ static bool e1000_clean_rx_irq(struct e1
+@@ -496,6 +498,10 @@
+ buffer_info->skb = skb;
goto next_desc;
}
-
++
+ /* adjust length to remove Ethernet CRC */
+ if (!(adapter->flags2 & FLAG2_CRC_STRIPPING))
+ length -= 4;
-+
+
total_rx_bytes += length;
total_rx_packets++;
-
-@@ -802,6 +808,10 @@ static bool e1000_clean_rx_irq_ps(struct
+@@ -802,6 +808,10 @@
pci_dma_sync_single_for_device(pdev, ps_page->dma,
PAGE_SIZE, PCI_DMA_FROMDEVICE);
skb_put(skb, l1);
goto copydone;
} /* if */
-@@ -816,13 +826,16 @@ static bool e1000_clean_rx_irq_ps(struct
+@@ -816,12 +826,15 @@
pci_unmap_page(pdev, ps_page->dma, PAGE_SIZE,
PCI_DMA_FROMDEVICE);
ps_page->dma = 0;
- skb->len += length;
- skb->data_len += length;
- skb->truesize += length;
- }
-
+- }
++ }
++
+ /* strip the ethernet crc, problem is we're using pages now so
+ * this whole operation can get a little cpu intensive
+ */
+ if (!(adapter->flags2 & FLAG2_CRC_STRIPPING))
+ pskb_trim(skb, skb->len - 4);
-+
+
copydone:
total_rx_bytes += skb->len;
- total_rx_packets++;
-@@ -1187,8 +1200,8 @@ static irqreturn_t e1000_intr(int irq, v
+@@ -1187,8 +1200,8 @@
struct net_device *netdev = data;
struct e1000_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = &adapter->hw;
if (!icr)
return IRQ_NONE; /* Not our interrupt */
-@@ -1244,6 +1257,263 @@ static irqreturn_t e1000_intr(int irq, v
+@@ -1244,6 +1257,263 @@
return IRQ_HANDLED;
}
/**
* e1000_request_irq - initialize interrupts
*
-@@ -1253,29 +1523,33 @@ static irqreturn_t e1000_intr(int irq, v
+@@ -1253,28 +1523,32 @@
static int e1000_request_irq(struct e1000_adapter *adapter)
{
struct net_device *netdev = adapter->netdev;
- int irq_flags = IRQF_SHARED;
- int err;
-
+- int err;
+-
- if (!(adapter->flags & FLAG_MSI_TEST_FAILED)) {
- err = pci_enable_msi(adapter->pdev);
- if (!err) {
- adapter->flags |= FLAG_MSI_ENABLED;
- irq_flags = 0;
- }
+- }
+-
+- err = request_irq(adapter->pdev->irq,
+- ((adapter->flags & FLAG_MSI_ENABLED) ?
+- &e1000_intr_msi : &e1000_intr),
+- irq_flags, netdev->name, netdev);
+- if (err) {
+- if (adapter->flags & FLAG_MSI_ENABLED) {
+- pci_disable_msi(adapter->pdev);
+- adapter->flags &= ~FLAG_MSI_ENABLED;
+- }
++ int err;
++
+ if (adapter->msix_entries) {
+ err = e1000_request_msix(adapter);
+ if (!err)
+ e1000e_reset_interrupt_capability(adapter);
+ adapter->int_mode = E1000E_INT_MODE_MSI;
+ e1000e_set_interrupt_capability(adapter);
- }
++ }
+ if (adapter->flags & FLAG_MSI_ENABLED) {
+ err = request_irq(adapter->pdev->irq, &e1000_intr_msi, 0,
+ netdev->name, netdev);
+ if (!err)
+ return err;
-
-- err = request_irq(adapter->pdev->irq,
-- ((adapter->flags & FLAG_MSI_ENABLED) ?
-- &e1000_intr_msi : &e1000_intr),
-- irq_flags, netdev->name, netdev);
-- if (err) {
-- if (adapter->flags & FLAG_MSI_ENABLED) {
-- pci_disable_msi(adapter->pdev);
-- adapter->flags &= ~FLAG_MSI_ENABLED;
-- }
-- e_err("Unable to allocate interrupt, Error: %d\n", err);
++
+ /* fall back to legacy interrupt */
+ e1000e_reset_interrupt_capability(adapter);
+ adapter->int_mode = E1000E_INT_MODE_LEGACY;
- }
-
++ }
++
+ err = request_irq(adapter->pdev->irq, &e1000_intr, IRQF_SHARED,
+ netdev->name, netdev);
+ if (err)
-+ e_err("Unable to allocate interrupt, Error: %d\n", err);
-+
+ e_err("Unable to allocate interrupt, Error: %d\n", err);
+- }
+
return err;
}
-
-@@ -1283,11 +1557,21 @@ static void e1000_free_irq(struct e1000_
+@@ -1283,11 +1557,21 @@
{
struct net_device *netdev = adapter->netdev;
-- free_irq(adapter->pdev->irq, netdev);
-- if (adapter->flags & FLAG_MSI_ENABLED) {
-- pci_disable_msi(adapter->pdev);
-- adapter->flags &= ~FLAG_MSI_ENABLED;
+ if (adapter->msix_entries) {
+ int vector = 0;
+
+ /* Other Causes interrupt vector */
+ free_irq(adapter->msix_entries[vector].vector, netdev);
+ return;
- }
++ }
+
-+ free_irq(adapter->pdev->irq, netdev);
+ free_irq(adapter->pdev->irq, netdev);
+- if (adapter->flags & FLAG_MSI_ENABLED) {
+- pci_disable_msi(adapter->pdev);
+- adapter->flags &= ~FLAG_MSI_ENABLED;
+- }
}
/**
-@@ -1298,6 +1582,8 @@ static void e1000_irq_disable(struct e10
+@@ -1298,6 +1582,8 @@
struct e1000_hw *hw = &adapter->hw;
ew32(IMC, ~0);
e1e_flush();
synchronize_irq(adapter->pdev->irq);
}
-@@ -1309,7 +1595,12 @@ static void e1000_irq_enable(struct e100
+@@ -1309,7 +1595,12 @@
{
struct e1000_hw *hw = &adapter->hw;
e1e_flush();
}
-@@ -1559,9 +1850,8 @@ void e1000e_free_rx_resources(struct e10
+@@ -1559,9 +1850,8 @@
* traffic pattern. Constants in this function were computed
* based on theoretical maximum wire speed and thresholds were set based
* on testing data as well as attempting to minimize response time
**/
static unsigned int e1000_update_itr(struct e1000_adapter *adapter,
u16 itr_setting, int packets,
-@@ -1669,11 +1959,37 @@ set_itr_now:
+@@ -1669,8 +1959,34 @@
min(adapter->itr + (new_itr >> 2), new_itr) :
new_itr;
adapter->itr = new_itr;
- ew32(ITR, 1000000000 / (new_itr * 256));
+- }
+ adapter->rx_ring->itr_val = new_itr;
+ if (adapter->msix_entries)
+ adapter->rx_ring->set_itr = 1;
+ else
+ ew32(ITR, 1000000000 / (new_itr * 256));
- }
- }
-
- /**
++ }
++}
++
++/**
+ * e1000_alloc_queues - Allocate memory for all rings
+ * @adapter: board private structure to initialize
+ **/
+ kfree(adapter->rx_ring);
+ kfree(adapter->tx_ring);
+ return -ENOMEM;
-+}
-+
-+/**
- * e1000_clean - NAPI Rx polling callback
- * @napi: struct associated with this polling callback
- * @budget: amount of packets driver is allowed to process this poll
-@@ -1681,12 +1997,17 @@ set_itr_now:
+ }
+
+ /**
+@@ -1681,11 +1997,16 @@
static int e1000_clean(struct napi_struct *napi, int budget)
{
struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi);
/* Must NOT use netdev_priv macro here. */
adapter = poll_dev->priv;
-
++
+ if (adapter->msix_entries &&
+ !(adapter->rx_ring->ims_val & adapter->tx_ring->ims_val))
+ goto clean_rx;
-+
+
/*
* e1000_clean is called per-cpu. This lock protects
- * tx_ring from being cleaned by multiple cpus
-@@ -1698,6 +2019,7 @@ static int e1000_clean(struct napi_struc
+@@ -1698,6 +2019,7 @@
spin_unlock(&adapter->tx_queue_lock);
}
adapter->clean_rx(adapter, &work_done, budget);
if (tx_cleaned)
-@@ -1708,7 +2030,10 @@ static int e1000_clean(struct napi_struc
+@@ -1708,7 +2030,10 @@
if (adapter->itr_setting & 3)
e1000_set_itr(adapter);
netif_rx_complete(poll_dev, napi);
}
return work_done;
-@@ -1987,8 +2312,12 @@ static void e1000_setup_rctl(struct e100
+@@ -1987,8 +2312,12 @@
else
rctl |= E1000_RCTL_LPE;
/* Setup buffer sizes */
rctl &= ~E1000_RCTL_SZ_4096;
-@@ -2504,6 +2833,8 @@ int e1000e_up(struct e1000_adapter *adap
+@@ -2504,6 +2833,8 @@
clear_bit(__E1000_DOWN, &adapter->state);
napi_enable(&adapter->napi);
e1000_irq_enable(adapter);
/* fire a link change interrupt to start the watchdog */
-@@ -2587,13 +2918,10 @@ static int __devinit e1000_sw_init(struc
+@@ -2587,13 +2918,10 @@
adapter->max_frame_size = netdev->mtu + ETH_HLEN + ETH_FCS_LEN;
adapter->min_frame_size = ETH_ZLEN + ETH_FCS_LEN;
- adapter->tx_ring = kzalloc(sizeof(struct e1000_ring), GFP_KERNEL);
- if (!adapter->tx_ring)
- goto err;
-+ e1000e_set_interrupt_capability(adapter);
-
+-
- adapter->rx_ring = kzalloc(sizeof(struct e1000_ring), GFP_KERNEL);
- if (!adapter->rx_ring)
- goto err;
++ e1000e_set_interrupt_capability(adapter);
++
+ if (e1000_alloc_queues(adapter))
+ return -ENOMEM;
spin_lock_init(&adapter->tx_queue_lock);
-@@ -2602,12 +2930,6 @@ static int __devinit e1000_sw_init(struc
+@@ -2602,12 +2930,6 @@
set_bit(__E1000_DOWN, &adapter->state);
return 0;
}
/**
-@@ -2649,6 +2971,7 @@ static int e1000_test_msi_interrupt(stru
+@@ -2649,6 +2971,7 @@
/* free the real vector and request a test handler */
e1000_free_irq(adapter);
/* Assume that the test fails, if it succeeds then the test
* MSI irq handler will unset this flag */
-@@ -2679,6 +3002,7 @@ static int e1000_test_msi_interrupt(stru
+@@ -2679,6 +3002,7 @@
rmb();
if (adapter->flags & FLAG_MSI_TEST_FAILED) {
err = -EIO;
e_info("MSI interrupt test failed!\n");
}
-@@ -2692,7 +3016,7 @@ static int e1000_test_msi_interrupt(stru
+@@ -2692,7 +3016,7 @@
/* okay so the test worked, restore settings */
e_dbg("%s: MSI interrupt test succeeded!\n", netdev->name);
msi_test_failed:
e1000_request_irq(adapter);
return err;
}
-@@ -2802,7 +3126,7 @@ static int e1000_open(struct net_device
+@@ -2802,7 +3126,7 @@
* ignore e1000e MSI messages, which means we need to test our MSI
* interrupt now
*/
err = e1000_test_msi(adapter);
if (err) {
e_err("Interrupt allocation failed\n");
-@@ -2997,7 +3321,8 @@ void e1000e_update_stats(struct e1000_ad
+@@ -2997,7 +3321,8 @@
adapter->stats.algnerrc += er32(ALGNERRC);
adapter->stats.rxerrc += er32(RXERRC);
adapter->stats.cexterr += er32(CEXTERR);
adapter->stats.tsctc += er32(TSCTC);
adapter->stats.tsctfc += er32(TSCTFC);
-@@ -3193,6 +3518,27 @@ static void e1000_watchdog_task(struct w
+@@ -3192,6 +3517,27 @@
+ &adapter->link_speed,
&adapter->link_duplex);
e1000_print_link_info(adapter);
- /*
++ /*
+ * On supported PHYs, check for duplex mismatch only
+ * if link has autonegotiated at 10/100 half
+ */
+ "link gets many collisions.\n");
+ }
+
-+ /*
+ /*
* tweak tx_queue_len according to speed/duplex
* and adjust the timeout factor
- */
-@@ -3307,7 +3653,10 @@ link_up:
+@@ -3307,7 +3653,10 @@
}
/* Cause software interrupt to ensure Rx ring is cleaned */
/* Force detection of hung controller every watchdog period */
adapter->detect_tx_hung = 1;
-@@ -4024,6 +4373,7 @@ static int e1000_suspend(struct pci_dev
+@@ -4024,6 +4373,7 @@
e1000e_down(adapter);
e1000_free_irq(adapter);
}
retval = pci_save_state(pdev);
if (retval)
-@@ -4150,6 +4500,7 @@ static int e1000_resume(struct pci_dev *
+@@ -4150,6 +4500,7 @@
pci_enable_wake(pdev, PCI_D3hot, 0);
pci_enable_wake(pdev, PCI_D3cold, 0);
if (netif_running(netdev)) {
err = e1000_request_irq(adapter);
if (err)
-@@ -4412,6 +4763,7 @@ static int __devinit e1000_probe(struct
+@@ -4412,6 +4763,7 @@
adapter->ei = ei;
adapter->pba = ei->pba;
adapter->flags = ei->flags;
adapter->hw.adapter = adapter;
adapter->hw.mac.type = ei->mac;
adapter->msg_enable = (1 << NETIF_MSG_DRV | NETIF_MSG_PROBE) - 1;
-@@ -4616,6 +4968,7 @@ static int __devinit e1000_probe(struct
+@@ -4616,6 +4968,7 @@
/* initialize the wol settings based on the eeprom settings */
adapter->wol = adapter->eeprom_wol;
/* reset the hardware with the new settings */
e1000e_reset(adapter);
-@@ -4702,6 +5055,7 @@ static void __devexit e1000_remove(struc
+@@ -4702,6 +5055,7 @@
if (!e1000_check_reset_block(&adapter->hw))
e1000_phy_hw_reset(&adapter->hw);
kfree(adapter->tx_ring);
kfree(adapter->rx_ring);
-@@ -4743,6 +5097,8 @@ static struct pci_device_id e1000_pci_tb
+@@ -4743,6 +5097,8 @@
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82573E_IAMT), board_82573 },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82573L), board_82573 },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_80003ES2LAN_COPPER_DPT),
board_80003es2lan },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_80003ES2LAN_COPPER_SPT),
-@@ -4765,6 +5121,7 @@ static struct pci_device_id e1000_pci_tb
+@@ -4765,6 +5121,7 @@
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IFE_GT), board_ich9lan },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_AMT), board_ich9lan },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_C), board_ich9lan },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M), board_ich9lan },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M_AMT), board_ich9lan },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M_V), board_ich9lan },
-@@ -4773,6 +5130,9 @@ static struct pci_device_id e1000_pci_tb
+@@ -4772,6 +5129,9 @@
+ { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_LM), board_ich9lan },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_LF), board_ich9lan },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_V), board_ich9lan },
-
++
+ { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_D_BM_LM), board_ich10lan },
+ { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_D_BM_LF), board_ich10lan },
-+
+
{ } /* terminate list */
};
- MODULE_DEVICE_TABLE(pci, e1000_pci_tbl);
-diff -purN linux-2.6.27/drivers/net/e1000e/param.c linux-2.6.27.19-5.1/drivers/net/e1000e/param.c
---- linux-2.6.27/drivers/net/e1000e/param.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/param.c 2009-03-25 16:11:07.000000000 +0000
-@@ -114,6 +114,15 @@ E1000_PARAM(InterruptThrottleRate, "Inte
+diff -r 9608d5473017 drivers/net/e1000e/param.c
+--- a/drivers/net/e1000e/param.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/param.c Wed May 06 16:56:25 2009 +0100
+@@ -114,6 +114,15 @@
#define DEFAULT_ITR 3
#define MAX_ITR 100000
#define MIN_ITR 100
/*
* Enable Smart Power Down of the PHY
-@@ -142,6 +151,16 @@ E1000_PARAM(KumeranLockLoss, "Enable Kum
+@@ -141,6 +150,16 @@
+ * Default Value: 1 (enabled)
*/
E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can lead to corrupted NVM]");
-
++
+/*
+ * Enable CRC Stripping
+ *
+ */
+E1000_PARAM(CrcStripping, "Enable CRC Stripping, disable if your BMC needs " \
+ "the CRC");
-+
+
struct e1000_option {
enum { enable_option, range_option, list_option } type;
- const char *name;
-@@ -361,6 +380,24 @@ void __devinit e1000e_check_options(stru
+@@ -361,6 +380,24 @@
adapter->itr = 20000;
}
}
{ /* Smart Power Down */
const struct e1000_option opt = {
.type = enable_option,
-@@ -377,6 +414,21 @@ void __devinit e1000e_check_options(stru
+@@ -375,6 +412,21 @@
+ if ((adapter->flags & FLAG_HAS_SMART_POWER_DOWN)
+ && spd)
adapter->flags |= FLAG_SMART_POWER_DOWN;
- }
- }
++ }
++ }
+ { /* CRC Stripping */
+ const struct e1000_option opt = {
+ .type = enable_option,
+ e1000_validate_option(&crc_stripping, &opt, adapter);
+ if (crc_stripping == OPTION_ENABLED)
+ adapter->flags2 |= FLAG2_CRC_STRIPPING;
-+ }
-+ }
+ }
+ }
{ /* Kumeran Lock Loss Workaround */
- const struct e1000_option opt = {
- .type = enable_option,
-diff -purN linux-2.6.27/drivers/net/e1000e/phy.c linux-2.6.27.19-5.1/drivers/net/e1000e/phy.c
---- linux-2.6.27/drivers/net/e1000e/phy.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/phy.c 2009-03-25 16:11:07.000000000 +0000
-@@ -476,7 +476,9 @@ s32 e1000e_copper_link_setup_m88(struct
+diff -r 9608d5473017 drivers/net/e1000e/phy.c
+--- a/drivers/net/e1000e/phy.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/phy.c Wed May 06 16:56:25 2009 +0100
+@@ -476,7 +476,9 @@
if (ret_val)
return ret_val;
/*
* Force TX_CLK in the Extended PHY Specific Control Register
* to 25MHz clock.
-@@ -504,6 +506,18 @@ s32 e1000e_copper_link_setup_m88(struct
- return ret_val;
- }
-
+@@ -500,6 +502,18 @@
+ M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X);
+ }
+ ret_val = e1e_wphy(hw, M88E1000_EXT_PHY_SPEC_CTRL, phy_data);
++ if (ret_val)
++ return ret_val;
++ }
++
+ if ((phy->type == e1000_phy_bm) && (phy->id == BME1000_E_PHY_ID_R2)) {
+ /* Set PHY page 0, register 29 to 0x0003 */
+ ret_val = e1e_wphy(hw, 29, 0x0003);
+
+ /* Set PHY page 0, register 30 to 0x0000 */
+ ret_val = e1e_wphy(hw, 30, 0x0000);
-+ if (ret_val)
-+ return ret_val;
-+ }
-+
- /* Commit the changes. */
- ret_val = e1000e_commit_phy(hw);
- if (ret_val)
-@@ -1720,6 +1734,91 @@ s32 e1000e_get_cfg_done(struct e1000_hw
+ if (ret_val)
+ return ret_val;
+ }
+@@ -1720,6 +1734,91 @@
return 0;
}
/* Internal function pointers */
/**
-@@ -1969,6 +2068,99 @@ out:
+@@ -1969,6 +2068,99 @@
}
/**
* e1000_access_phy_wakeup_reg_bm - Read BM PHY wakeup register
* @hw: pointer to the HW structure
* @offset: register offset to be read or written
-diff -purN linux-2.6.27/drivers/net/ehea/ehea.h linux-2.6.27.19-5.1/drivers/net/ehea/ehea.h
---- linux-2.6.27/drivers/net/ehea/ehea.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ehea/ehea.h 2009-03-25 16:11:04.000000000 +0000
+diff -r 9608d5473017 drivers/net/ehea/ehea.h
+--- a/drivers/net/ehea/ehea.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ehea/ehea.h Wed May 06 16:56:25 2009 +0100
@@ -40,13 +40,13 @@
#include <asm/io.h>
#define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \
| NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
-diff -purN linux-2.6.27/drivers/net/ehea/ehea_main.c linux-2.6.27.19-5.1/drivers/net/ehea/ehea_main.c
---- linux-2.6.27/drivers/net/ehea/ehea_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ehea/ehea_main.c 2009-03-25 16:11:04.000000000 +0000
-@@ -111,6 +111,19 @@ static int __devinit ehea_probe_adapter(
+diff -r 9608d5473017 drivers/net/ehea/ehea_main.c
+--- a/drivers/net/ehea/ehea_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ehea/ehea_main.c Wed May 06 16:56:25 2009 +0100
+@@ -111,6 +111,19 @@
static int __devexit ehea_remove(struct of_device *dev);
static struct of_device_id ehea_device_table[] = {
{
.name = "lhea",
-@@ -118,10 +131,10 @@ static struct of_device_id ehea_device_t
+@@ -118,10 +131,10 @@
},
{},
};
.match_table = ehea_device_table,
.probe = ehea_probe_adapter,
.remove = ehea_remove,
-@@ -2863,7 +2876,7 @@ static void ehea_rereg_mrs(struct work_s
+@@ -2863,7 +2876,7 @@
struct ehea_adapter *adapter;
mutex_lock(&dlpar_mem_lock);
list_for_each_entry(adapter, &adapter_list, list)
if (adapter->active_ports) {
-@@ -2900,13 +2913,6 @@ static void ehea_rereg_mrs(struct work_s
+@@ -2899,13 +2912,6 @@
+ goto out;
}
}
-
+-
- ehea_destroy_busmap();
- ret = ehea_create_busmap();
- if (ret) {
- ehea_error("creating ehea busmap failed");
- goto out;
- }
--
+
clear_bit(__EHEA_STOP_XFER, &ehea_driver_flags);
- list_for_each_entry(adapter, &adapter_list, list)
-@@ -3519,9 +3525,23 @@ void ehea_crash_handler(void)
+@@ -3519,9 +3525,23 @@
static int ehea_mem_notifier(struct notifier_block *nb,
unsigned long action, void *data)
{
ehea_rereg_mrs(NULL);
break;
default:
-diff -purN linux-2.6.27/drivers/net/ehea/ehea_phyp.c linux-2.6.27.19-5.1/drivers/net/ehea/ehea_phyp.c
---- linux-2.6.27/drivers/net/ehea/ehea_phyp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ehea/ehea_phyp.c 2009-03-25 16:11:04.000000000 +0000
-@@ -535,7 +535,7 @@ u64 ehea_h_query_ehea(const u64 adapter_
+diff -r 9608d5473017 drivers/net/ehea/ehea_phyp.c
+--- a/drivers/net/ehea/ehea_phyp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ehea/ehea_phyp.c Wed May 06 16:56:25 2009 +0100
+@@ -535,7 +535,7 @@
cb_logaddr, /* R5 */
0, 0, 0, 0, 0); /* R6-R10 */
#ifdef DEBUG
#endif
return hret;
}
-diff -purN linux-2.6.27/drivers/net/ehea/ehea_qmr.c linux-2.6.27.19-5.1/drivers/net/ehea/ehea_qmr.c
---- linux-2.6.27/drivers/net/ehea/ehea_qmr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ehea/ehea_qmr.c 2009-03-25 16:11:04.000000000 +0000
-@@ -567,7 +567,7 @@ static inline int ehea_calc_index(unsign
+diff -r 9608d5473017 drivers/net/ehea/ehea_qmr.c
+--- a/drivers/net/ehea/ehea_qmr.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ehea/ehea_qmr.c Wed May 06 16:56:25 2009 +0100
+@@ -567,7 +567,7 @@
static inline int ehea_init_top_bmap(struct ehea_top_bmap *ehea_top_bmap,
int dir)
{
ehea_top_bmap->dir[dir] =
kzalloc(sizeof(struct ehea_dir_bmap), GFP_KERNEL);
if (!ehea_top_bmap->dir[dir])
-@@ -578,7 +578,7 @@ static inline int ehea_init_top_bmap(str
+@@ -578,7 +578,7 @@
static inline int ehea_init_bmap(struct ehea_bmap *ehea_bmap, int top, int dir)
{
ehea_bmap->top[top] =
kzalloc(sizeof(struct ehea_top_bmap), GFP_KERNEL);
if (!ehea_bmap->top[top])
-@@ -587,52 +587,171 @@ static inline int ehea_init_bmap(struct
+@@ -587,52 +587,171 @@
return ehea_init_top_bmap(ehea_bmap->top[top], dir);
}
+static void ehea_rebuild_busmap(void)
{
- unsigned long i, mr_len, start_section, end_section;
-- start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE;
-- end_section = start_section + ((nr_pages * PAGE_SIZE) / EHEA_SECTSIZE);
-- mr_len = *(unsigned long *)arg;
+ u64 vaddr = EHEA_BUSMAP_START;
+ int top, dir, idx;
-
-- ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL);
-- if (!ehea_bmap)
-- return -ENOMEM;
++
+ for (top = 0; top < EHEA_MAP_ENTRIES; top++) {
+ struct ehea_top_bmap *ehea_top;
+ int valid_dir_entries = 0;
-
-- for (i = start_section; i < end_section; i++) {
-- int ret;
-- int top, dir, idx;
-- u64 vaddr;
++
+ if (!ehea_bmap->top[top])
+ continue;
+ ehea_top = ehea_bmap->top[top];
+ for (dir = 0; dir < EHEA_MAP_ENTRIES; dir++) {
+ struct ehea_dir_bmap *ehea_dir;
+ int valid_entries = 0;
-
-- top = ehea_calc_index(i, EHEA_TOP_INDEX_SHIFT);
-- dir = ehea_calc_index(i, EHEA_DIR_INDEX_SHIFT);
++
+ if (!ehea_top->dir[dir])
+ continue;
+ valid_dir_entries++;
+ }
+ }
+}
-
-- ret = ehea_init_bmap(ehea_bmap, top, dir);
-- if(ret)
-- return ret;
++
+static int ehea_update_busmap(unsigned long pfn, unsigned long nr_pages, int add)
+{
+ unsigned long i, start_section, end_section;
-
-- idx = i & EHEA_INDEX_MASK;
-- vaddr = EHEA_BUSMAP_START + mr_len + i * EHEA_SECTSIZE;
++
+ if (!nr_pages)
+ return 0;
-
-- ehea_bmap->top[top]->dir[dir]->ent[idx] = vaddr;
++
+ if (!ehea_bmap) {
+ ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL);
+ if (!ehea_bmap)
+ return -ENOMEM;
- }
-
-- mr_len += nr_pages * PAGE_SIZE;
-- *(unsigned long *)arg = mr_len;
-+ start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE;
-+ end_section = start_section + ((nr_pages * PAGE_SIZE) / EHEA_SECTSIZE);
++ }
++
+ start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE;
+ end_section = start_section + ((nr_pages * PAGE_SIZE) / EHEA_SECTSIZE);
+- mr_len = *(unsigned long *)arg;
+ /* Mark entries as valid or invalid only; address is assigned later */
+ for (i = start_section; i < end_section; i++) {
+ u64 flag;
+ int top = ehea_calc_index(i, EHEA_TOP_INDEX_SHIFT);
+ int dir = ehea_calc_index(i, EHEA_DIR_INDEX_SHIFT);
+ int idx = i & EHEA_INDEX_MASK;
-+
+
+- ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL);
+- if (!ehea_bmap)
+- return -ENOMEM;
+ if (add) {
+ int ret = ehea_init_bmap(ehea_bmap, top, dir);
+ if (ret)
+ ehea_mr_len -= EHEA_SECTSIZE;
+ }
+- for (i = start_section; i < end_section; i++) {
+- int ret;
+- int top, dir, idx;
+- u64 vaddr;
+-
+- top = ehea_calc_index(i, EHEA_TOP_INDEX_SHIFT);
+- dir = ehea_calc_index(i, EHEA_DIR_INDEX_SHIFT);
+-
+- ret = ehea_init_bmap(ehea_bmap, top, dir);
+- if(ret)
+- return ret;
+-
+- idx = i & EHEA_INDEX_MASK;
+- vaddr = EHEA_BUSMAP_START + mr_len + i * EHEA_SECTSIZE;
+-
+- ehea_bmap->top[top]->dir[dir]->ent[idx] = vaddr;
+ ehea_bmap->top[top]->dir[dir]->ent[idx] = flag;
-+ }
+ }
+-
+- mr_len += nr_pages * PAGE_SIZE;
+- *(unsigned long *)arg = mr_len;
+-
+ ehea_rebuild_busmap(); /* Assign contiguous addresses for mr */
return 0;
}
ehea_create_busmap_callback);
mutex_unlock(&ehea_busmap_mutex);
return ret;
-diff -purN linux-2.6.27/drivers/net/ehea/ehea_qmr.h linux-2.6.27.19-5.1/drivers/net/ehea/ehea_qmr.h
---- linux-2.6.27/drivers/net/ehea/ehea_qmr.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ehea/ehea_qmr.h 2009-03-25 16:11:04.000000000 +0000
+diff -r 9608d5473017 drivers/net/ehea/ehea_qmr.h
+--- a/drivers/net/ehea/ehea_qmr.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ehea/ehea_qmr.h Wed May 06 16:56:25 2009 +0100
@@ -40,6 +40,9 @@
#define EHEA_PAGESIZE (1UL << EHEA_PAGESHIFT)
#define EHEA_SECTSIZE (1UL << 24)
#if ((1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE)
#error eHEA module cannot work if kernel sectionsize < ehea sectionsize
-@@ -378,6 +381,8 @@ int ehea_rem_mr(struct ehea_mr *mr);
+@@ -378,6 +381,8 @@
void ehea_error_data(struct ehea_adapter *adapter, u64 res_handle);
int ehea_create_busmap(void);
void ehea_destroy_busmap(void);
u64 ehea_map_vaddr(void *caddr);
-diff -purN linux-2.6.27/drivers/net/fec_mpc52xx_phy.c linux-2.6.27.19-5.1/drivers/net/fec_mpc52xx_phy.c
---- linux-2.6.27/drivers/net/fec_mpc52xx_phy.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/fec_mpc52xx_phy.c 2009-03-25 16:11:05.000000000 +0000
-@@ -185,6 +185,7 @@ static struct of_device_id mpc52xx_fec_m
+diff -r 9608d5473017 drivers/net/fec_mpc52xx_phy.c
+--- a/drivers/net/fec_mpc52xx_phy.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/fec_mpc52xx_phy.c Wed May 06 16:56:25 2009 +0100
+@@ -185,6 +185,7 @@
};
struct of_platform_driver mpc52xx_fec_mdio_driver = {
.name = "mpc5200b-fec-phy",
.probe = mpc52xx_fec_mdio_probe,
.remove = mpc52xx_fec_mdio_remove,
-diff -purN linux-2.6.27/drivers/net/fs_enet/fs_enet-main.c linux-2.6.27.19-5.1/drivers/net/fs_enet/fs_enet-main.c
---- linux-2.6.27/drivers/net/fs_enet/fs_enet-main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/fs_enet/fs_enet-main.c 2009-03-25 16:11:08.000000000 +0000
-@@ -1192,6 +1192,7 @@ static struct of_device_id fs_enet_match
+diff -r 9608d5473017 drivers/net/fs_enet/fs_enet-main.c
+--- a/drivers/net/fs_enet/fs_enet-main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/fs_enet/fs_enet-main.c Wed May 06 16:56:25 2009 +0100
+@@ -1192,6 +1192,7 @@
};
static struct of_platform_driver fs_enet_driver = {
.name = "fs_enet",
.match_table = fs_enet_match,
.probe = fs_enet_probe,
-diff -purN linux-2.6.27/drivers/net/fs_enet/mii-bitbang.c linux-2.6.27.19-5.1/drivers/net/fs_enet/mii-bitbang.c
---- linux-2.6.27/drivers/net/fs_enet/mii-bitbang.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/fs_enet/mii-bitbang.c 2009-03-25 16:11:08.000000000 +0000
-@@ -249,6 +249,7 @@ static struct of_device_id fs_enet_mdio_
+diff -r 9608d5473017 drivers/net/fs_enet/mii-bitbang.c
+--- a/drivers/net/fs_enet/mii-bitbang.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/fs_enet/mii-bitbang.c Wed May 06 16:56:25 2009 +0100
+@@ -249,6 +249,7 @@
};
static struct of_platform_driver fs_enet_bb_mdio_driver = {
.name = "fsl-bb-mdio",
.match_table = fs_enet_mdio_bb_match,
.probe = fs_enet_mdio_probe,
-diff -purN linux-2.6.27/drivers/net/fs_enet/mii-fec.c linux-2.6.27.19-5.1/drivers/net/fs_enet/mii-fec.c
---- linux-2.6.27/drivers/net/fs_enet/mii-fec.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/fs_enet/mii-fec.c 2009-03-25 16:11:08.000000000 +0000
-@@ -218,6 +218,7 @@ static struct of_device_id fs_enet_mdio_
+diff -r 9608d5473017 drivers/net/fs_enet/mii-fec.c
+--- a/drivers/net/fs_enet/mii-fec.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/fs_enet/mii-fec.c Wed May 06 16:56:25 2009 +0100
+@@ -218,6 +218,7 @@
};
static struct of_platform_driver fs_enet_fec_mdio_driver = {
.name = "fsl-fec-mdio",
.match_table = fs_enet_mdio_fec_match,
.probe = fs_enet_mdio_probe,
-diff -purN linux-2.6.27/drivers/net/ibm_newemac/core.c linux-2.6.27.19-5.1/drivers/net/ibm_newemac/core.c
---- linux-2.6.27/drivers/net/ibm_newemac/core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ibm_newemac/core.c 2009-03-25 16:11:07.000000000 +0000
-@@ -2923,6 +2923,7 @@ static struct of_device_id emac_match[]
+diff -r 9608d5473017 drivers/net/ibm_newemac/core.c
+--- a/drivers/net/ibm_newemac/core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ibm_newemac/core.c Wed May 06 16:56:25 2009 +0100
+@@ -2923,6 +2923,7 @@
};
static struct of_platform_driver emac_driver = {
.name = "emac",
.match_table = emac_match,
-diff -purN linux-2.6.27/drivers/net/ibm_newemac/mal.c linux-2.6.27.19-5.1/drivers/net/ibm_newemac/mal.c
---- linux-2.6.27/drivers/net/ibm_newemac/mal.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ibm_newemac/mal.c 2009-03-25 16:11:07.000000000 +0000
-@@ -724,6 +724,7 @@ static struct of_device_id mal_platform_
+diff -r 9608d5473017 drivers/net/ibm_newemac/mal.c
+--- a/drivers/net/ibm_newemac/mal.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ibm_newemac/mal.c Wed May 06 16:56:25 2009 +0100
+@@ -724,6 +724,7 @@
};
static struct of_platform_driver mal_of_driver = {
.name = "mcmal",
.match_table = mal_platform_match,
-diff -purN linux-2.6.27/drivers/net/ibm_newemac/rgmii.c linux-2.6.27.19-5.1/drivers/net/ibm_newemac/rgmii.c
---- linux-2.6.27/drivers/net/ibm_newemac/rgmii.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ibm_newemac/rgmii.c 2009-03-25 16:11:07.000000000 +0000
-@@ -317,6 +317,7 @@ static struct of_device_id rgmii_match[]
+diff -r 9608d5473017 drivers/net/ibm_newemac/rgmii.c
+--- a/drivers/net/ibm_newemac/rgmii.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ibm_newemac/rgmii.c Wed May 06 16:56:25 2009 +0100
+@@ -317,6 +317,7 @@
};
static struct of_platform_driver rgmii_driver = {
.name = "emac-rgmii",
.match_table = rgmii_match,
-diff -purN linux-2.6.27/drivers/net/ibm_newemac/tah.c linux-2.6.27.19-5.1/drivers/net/ibm_newemac/tah.c
---- linux-2.6.27/drivers/net/ibm_newemac/tah.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ibm_newemac/tah.c 2009-03-25 16:11:07.000000000 +0000
-@@ -165,6 +165,7 @@ static struct of_device_id tah_match[] =
+diff -r 9608d5473017 drivers/net/ibm_newemac/tah.c
+--- a/drivers/net/ibm_newemac/tah.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ibm_newemac/tah.c Wed May 06 16:56:25 2009 +0100
+@@ -165,6 +165,7 @@
};
static struct of_platform_driver tah_driver = {
.name = "emac-tah",
.match_table = tah_match,
-diff -purN linux-2.6.27/drivers/net/ibm_newemac/zmii.c linux-2.6.27.19-5.1/drivers/net/ibm_newemac/zmii.c
---- linux-2.6.27/drivers/net/ibm_newemac/zmii.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ibm_newemac/zmii.c 2009-03-25 16:11:07.000000000 +0000
-@@ -311,6 +311,7 @@ static struct of_device_id zmii_match[]
+diff -r 9608d5473017 drivers/net/ibm_newemac/zmii.c
+--- a/drivers/net/ibm_newemac/zmii.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ibm_newemac/zmii.c Wed May 06 16:56:25 2009 +0100
+@@ -311,6 +311,7 @@
};
static struct of_platform_driver zmii_driver = {
.name = "emac-zmii",
.match_table = zmii_match,
-diff -purN linux-2.6.27/drivers/net/igb/igb.h linux-2.6.27.19-5.1/drivers/net/igb/igb.h
---- linux-2.6.27/drivers/net/igb/igb.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/igb/igb.h 2009-03-25 16:11:08.000000000 +0000
-@@ -294,6 +294,8 @@ struct igb_adapter {
+diff -r 9608d5473017 drivers/net/igb/igb.h
+--- a/drivers/net/igb/igb.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/igb/igb.h Wed May 06 16:56:25 2009 +0100
+@@ -294,6 +294,8 @@
unsigned int lro_flushed;
unsigned int lro_no_desc;
#endif
};
#define IGB_FLAG_HAS_MSI (1 << 0)
-@@ -325,6 +327,8 @@ extern void igb_reset(struct igb_adapter
+@@ -325,6 +327,8 @@
extern int igb_set_spd_dplx(struct igb_adapter *, u16);
extern int igb_setup_tx_resources(struct igb_adapter *, struct igb_ring *);
extern int igb_setup_rx_resources(struct igb_adapter *, struct igb_ring *);
extern void igb_update_stats(struct igb_adapter *);
extern void igb_set_ethtool_ops(struct net_device *);
-diff -purN linux-2.6.27/drivers/net/igb/igb_ethtool.c linux-2.6.27.19-5.1/drivers/net/igb/igb_ethtool.c
---- linux-2.6.27/drivers/net/igb/igb_ethtool.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/igb/igb_ethtool.c 2009-03-25 16:11:08.000000000 +0000
-@@ -714,15 +714,13 @@ static void igb_get_ringparam(struct net
+diff -r 9608d5473017 drivers/net/igb/igb_ethtool.c
+--- a/drivers/net/igb/igb_ethtool.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/igb/igb_ethtool.c Wed May 06 16:56:25 2009 +0100
+@@ -714,15 +714,13 @@
struct ethtool_ringparam *ring)
{
struct igb_adapter *adapter = netdev_priv(netdev);
ring->rx_mini_pending = 0;
ring->rx_jumbo_pending = 0;
}
-@@ -731,12 +729,9 @@ static int igb_set_ringparam(struct net_
+@@ -731,12 +729,9 @@
struct ethtool_ringparam *ring)
{
struct igb_adapter *adapter = netdev_priv(netdev);
if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
return -EINVAL;
-@@ -749,12 +744,19 @@ static int igb_set_ringparam(struct net_
+@@ -749,11 +744,18 @@
new_tx_count = min(new_tx_count, (u32)IGB_MAX_TXD);
new_tx_count = ALIGN(new_tx_count, REQ_TX_DESCRIPTOR_MULTIPLE);
/* nothing to do */
return 0;
}
-
++
+ if (adapter->num_tx_queues > adapter->num_rx_queues)
+ temp_ring = vmalloc(adapter->num_tx_queues * sizeof(struct igb_ring));
+ else
+ temp_ring = vmalloc(adapter->num_rx_queues * sizeof(struct igb_ring));
+ if (!temp_ring)
+ return -ENOMEM;
-+
+
while (test_and_set_bit(__IGB_RESETTING, &adapter->state))
msleep(1);
-
-@@ -766,62 +768,55 @@ static int igb_set_ringparam(struct net_
+@@ -766,62 +768,55 @@
* because the ISRs in MSI-X mode get passed pointers
* to the tx and rx ring structs.
*/
}
if (new_rx_count != adapter->rx_ring->count) {
-- for (i = 0; i < adapter->num_rx_queues; i++) {
+ memcpy(temp_ring, adapter->rx_ring,
+ adapter->num_rx_queues * sizeof(struct igb_ring));
-
++
+ for (i = 0; i < adapter->num_rx_queues; i++) {
+-
- old_rx_buf = adapter->rx_ring[i].buffer_info;
- old_desc = adapter->rx_ring[i].desc;
- old_size = adapter->rx_ring[i].size;
- adapter->rx_ring[i].count = new_rx_count;
- err = igb_setup_rx_resources(adapter,
- &adapter->rx_ring[i]);
-+ for (i = 0; i < adapter->num_rx_queues; i++) {
+ temp_ring[i].count = new_rx_count;
+ err = igb_setup_rx_resources(adapter, &temp_ring[i]);
if (err) {
}
err = 0;
-@@ -830,6 +825,7 @@ err_setup:
+@@ -830,6 +825,7 @@
igb_up(adapter);
clear_bit(__IGB_RESETTING, &adapter->state);
return err;
}
-@@ -1776,7 +1772,8 @@ static void igb_get_wol(struct net_devic
+@@ -1776,7 +1772,8 @@
/* this function will set ->supported = 0 and return 1 if wol is not
* supported by this hardware */
return;
/* apply any specific unsupported masks here */
-@@ -1805,7 +1802,8 @@ static int igb_set_wol(struct net_device
+@@ -1805,7 +1802,8 @@
if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
return -EOPNOTSUPP;
return wol->wolopts ? -EOPNOTSUPP : 0;
switch (hw->device_id) {
-@@ -1825,6 +1823,8 @@ static int igb_set_wol(struct net_device
+@@ -1824,6 +1822,8 @@
+ adapter->wol |= E1000_WUFC_BC;
if (wol->wolopts & WAKE_MAGIC)
adapter->wol |= E1000_WUFC_MAG;
-
-+ device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
+
++ device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
+
return 0;
}
-
-@@ -2025,6 +2025,10 @@ static struct ethtool_ops igb_ethtool_op
+@@ -2025,6 +2025,10 @@
.get_ethtool_stats = igb_get_ethtool_stats,
.get_coalesce = igb_get_coalesce,
.set_coalesce = igb_set_coalesce,
};
void igb_set_ethtool_ops(struct net_device *netdev)
-diff -purN linux-2.6.27/drivers/net/igb/igb_main.c linux-2.6.27.19-5.1/drivers/net/igb/igb_main.c
---- linux-2.6.27/drivers/net/igb/igb_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/igb/igb_main.c 2009-03-25 16:11:08.000000000 +0000
-@@ -75,8 +75,6 @@ static int igb_setup_all_tx_resources(st
+diff -r 9608d5473017 drivers/net/igb/igb_main.c
+--- a/drivers/net/igb/igb_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/igb/igb_main.c Wed May 06 16:56:25 2009 +0100
+@@ -75,8 +75,6 @@
static int igb_setup_all_rx_resources(struct igb_adapter *);
static void igb_free_all_tx_resources(struct igb_adapter *);
static void igb_free_all_rx_resources(struct igb_adapter *);
void igb_update_stats(struct igb_adapter *);
static int igb_probe(struct pci_dev *, const struct pci_device_id *);
static void __devexit igb_remove(struct pci_dev *pdev);
-@@ -258,11 +256,13 @@ static int igb_alloc_queues(struct igb_a
+@@ -258,11 +256,13 @@
for (i = 0; i < adapter->num_tx_queues; i++) {
struct igb_ring *ring = &(adapter->tx_ring[i]);
ring->adapter = adapter;
ring->queue_index = i;
ring->itr_register = E1000_ITR;
-@@ -1220,6 +1220,7 @@ static int __devinit igb_probe(struct pc
+@@ -1220,6 +1220,7 @@
/* initialize the wol settings based on the eeprom settings */
adapter->wol = adapter->eeprom_wol;
/* reset the hardware with the new settings */
igb_reset(adapter);
-@@ -1373,6 +1374,8 @@ static int __devinit igb_sw_init(struct
+@@ -1373,6 +1374,8 @@
pci_read_config_word(pdev, PCI_COMMAND, &hw->bus.pci_cmd_word);
adapter->rx_buffer_len = MAXIMUM_ETHERNET_VLAN_SIZE;
adapter->rx_ps_hdr_size = 0; /* disable packet split */
adapter->max_frame_size = netdev->mtu + ETH_HLEN + ETH_FCS_LEN;
-@@ -1961,7 +1964,7 @@ static void igb_configure_rx(struct igb_
+@@ -1961,7 +1964,7 @@
*
* Free all transmit software resources
**/
{
struct pci_dev *pdev = tx_ring->adapter->pdev;
-@@ -2061,7 +2064,7 @@ static void igb_clean_all_tx_rings(struc
+@@ -2061,7 +2064,7 @@
*
* Free all receive software resources
**/
{
struct pci_dev *pdev = rx_ring->adapter->pdev;
-@@ -3882,7 +3885,7 @@ static bool igb_clean_rx_irq_adv(struct
+@@ -3882,7 +3885,7 @@
PAGE_SIZE / 2, PCI_DMA_FROMDEVICE);
buffer_info->page_dma = 0;
buffer_info->page,
buffer_info->page_offset,
length);
-@@ -3892,11 +3895,6 @@ static bool igb_clean_rx_irq_adv(struct
+@@ -3892,11 +3895,6 @@
buffer_info->page = NULL;
else
get_page(buffer_info->page);
}
send_up:
i++;
-@@ -3990,7 +3988,7 @@ static void igb_alloc_rx_buffers_adv(str
+@@ -3990,7 +3988,7 @@
if (adapter->rx_ps_hdr_size && !buffer_info->page_dma) {
if (!buffer_info->page) {
if (!buffer_info->page) {
adapter->alloc_rx_buff_failed++;
goto no_buffers;
-diff -purN linux-2.6.27/drivers/net/irda/irda-usb.c linux-2.6.27.19-5.1/drivers/net/irda/irda-usb.c
---- linux-2.6.27/drivers/net/irda/irda-usb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/irda/irda-usb.c 2009-03-25 16:11:04.000000000 +0000
-@@ -1075,7 +1075,7 @@ static int stir421x_patch_device(struct
+diff -r 9608d5473017 drivers/net/irda/irda-usb.c
+--- a/drivers/net/irda/irda-usb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/irda/irda-usb.c Wed May 06 16:56:25 2009 +0100
+@@ -1075,7 +1075,7 @@
{
unsigned int i;
int ret;
const struct firmware *fw;
const unsigned char *fw_version_ptr; /* pointer to version string */
unsigned long fw_version = 0;
-diff -purN linux-2.6.27/drivers/net/ixgb/ixgb_main.c linux-2.6.27.19-5.1/drivers/net/ixgb/ixgb_main.c
---- linux-2.6.27/drivers/net/ixgb/ixgb_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgb/ixgb_main.c 2009-03-25 16:11:05.000000000 +0000
-@@ -977,15 +977,17 @@ ixgb_clean_rx_ring(struct ixgb_adapter *
+diff -r 9608d5473017 drivers/net/ixgb/ixgb_main.c
+--- a/drivers/net/ixgb/ixgb_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgb/ixgb_main.c Wed May 06 16:56:25 2009 +0100
+@@ -977,15 +977,17 @@
for (i = 0; i < rx_ring->count; i++) {
buffer_info = &rx_ring->buffer_info[i];
buffer_info->skb = NULL;
}
}
-diff -purN linux-2.6.27/drivers/net/ixgbe/Makefile linux-2.6.27.19-5.1/drivers/net/ixgbe/Makefile
---- linux-2.6.27/drivers/net/ixgbe/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/Makefile 2009-03-25 16:11:05.000000000 +0000
-@@ -34,3 +34,5 @@ obj-$(CONFIG_IXGBE) += ixgbe.o
+diff -r 9608d5473017 drivers/net/ixgbe/Makefile
+--- a/drivers/net/ixgbe/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/Makefile Wed May 06 16:56:25 2009 +0100
+@@ -34,3 +34,5 @@
ixgbe-objs := ixgbe_main.o ixgbe_common.o ixgbe_ethtool.o \
ixgbe_82598.o ixgbe_phy.o
+
+ixgbe-$(CONFIG_IXGBE_DCB) += ixgbe_dcb.o ixgbe_dcb_82598.o ixgbe_dcb_nl.o
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe.h linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe.h
---- linux-2.6.27/drivers/net/ixgbe/ixgbe.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe.h
+--- a/drivers/net/ixgbe/ixgbe.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe.h Wed May 06 16:56:25 2009 +0100
@@ -1,7 +1,7 @@
/*******************************************************************************
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
-@@ -32,17 +31,21 @@
+@@ -32,16 +31,20 @@
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
+#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
#include <linux/dca.h>
#endif
-
--#define IXGBE_ERR(args...) printk(KERN_ERR "ixgbe: " args)
-
+-#define IXGBE_ERR(args...) printk(KERN_ERR "ixgbe: " args)
+
#define PFX "ixgbe: "
#define DPRINTK(nlevel, klevel, fmt, args...) \
- ((void)((NETIF_MSG_##nlevel & adapter->msg_enable) && \
@@ -58,23 +61,14 @@
#define IXGBE_MAX_RXD 4096
#define IXGBE_MIN_RXD 64
#define IXGBE_MIN_FCPAUSE 0
#define IXGBE_MAX_FCPAUSE 0xFFFF
-@@ -83,14 +77,12 @@
+@@ -83,13 +77,11 @@
#define IXGBE_RXBUFFER_128 128 /* Used for packet split */
#define IXGBE_RXBUFFER_256 256 /* Used for packet split */
#define IXGBE_RXBUFFER_2048 2048
#define IXGBE_RX_HDR_SIZE IXGBE_RXBUFFER_256
#define MAXIMUM_ETHERNET_VLAN_SIZE (ETH_FRAME_LEN + ETH_FCS_LEN + VLAN_HLEN)
-
+-
-/* How many Tx Descriptors do we need to call netif_wake_queue? */
-#define IXGBE_TX_QUEUE_WAKE 16
--
+
/* How many Rx Buffers do we bundle into one write to the hardware ? */
#define IXGBE_RX_BUFFER_WRITE 16 /* Must be power of 2 */
-
-@@ -99,11 +91,9 @@
+@@ -99,10 +91,8 @@
#define IXGBE_TX_FLAGS_TSO (u32)(1 << 2)
#define IXGBE_TX_FLAGS_IPV4 (u32)(1 << 3)
#define IXGBE_TX_FLAGS_VLAN_MASK 0xffff0000
+#define IXGBE_TX_FLAGS_VLAN_PRIO_MASK 0x0000e000
#define IXGBE_TX_FLAGS_VLAN_SHIFT 16
-
+-
-#define IXGBE_MAX_LRO_DESCRIPTORS 8
-#define IXGBE_MAX_LRO_AGGREGATE 32
--
+
/* wrapper around a pointer to a socket buffer,
* so a DMA handle can be stored along with the buffer */
- struct ixgbe_tx_buffer {
-@@ -119,6 +109,7 @@ struct ixgbe_rx_buffer {
+@@ -119,6 +109,7 @@
dma_addr_t dma;
struct page *page;
dma_addr_t page_dma;
};
struct ixgbe_queue_stats {
-@@ -148,28 +139,30 @@ struct ixgbe_ring {
+@@ -148,28 +139,30 @@
u16 reg_idx; /* holds the special value that gets the hardware register
* offset associated with this ring, which is different
#define IXGBE_MAX_RSS_INDICES 16
#define IXGBE_MAX_VMDQ_INDICES 16
struct ixgbe_ring_feature {
-@@ -180,6 +173,10 @@ struct ixgbe_ring_feature {
+@@ -179,6 +172,10 @@
+
#define MAX_RX_QUEUES 64
#define MAX_TX_QUEUES 32
-
++
+#define MAX_RX_PACKET_BUFFERS ((adapter->flags & IXGBE_FLAG_DCB_ENABLED) \
+ ? 8 : 1)
+#define MAX_TX_PACKET_BUFFERS MAX_RX_PACKET_BUFFERS
-+
+
/* MAX_MSIX_Q_VECTORS of these are allocated,
* but we only use one per queue-specific vector.
- */
-@@ -190,8 +187,8 @@ struct ixgbe_q_vector {
+@@ -190,8 +187,8 @@
DECLARE_BITMAP(txr_idx, MAX_TX_QUEUES); /* Tx ring indices */
u8 rxr_count; /* Rx ring count assigned to this vector */
u8 txr_count; /* Tx ring count assigned to this vector */
u32 eitr;
};
-@@ -228,10 +225,12 @@ struct ixgbe_adapter {
+@@ -228,10 +225,12 @@
struct timer_list watchdog_timer;
struct vlan_group *vlgrp;
u16 bd_number;
/* Interrupt Throttle Rate */
u32 itr_setting;
-@@ -240,7 +239,9 @@ struct ixgbe_adapter {
+@@ -240,7 +239,9 @@
/* TX */
struct ixgbe_ring *tx_ring; /* One per active queue */
u64 lsc_int;
u64 hw_tso_ctxt;
u64 hw_tso6_ctxt;
-@@ -249,12 +250,10 @@ struct ixgbe_adapter {
+@@ -249,12 +250,10 @@
/* RX */
struct ixgbe_ring *rx_ring; /* One per active queue */
int num_msix_vectors;
struct ixgbe_ring_feature ring_feature[3];
struct msix_entry *msix_entries;
-@@ -267,15 +266,30 @@ struct ixgbe_adapter {
+@@ -267,15 +266,30 @@
* thus the additional *_CAPABLE flags.
*/
u32 flags;
/* OS defined structs */
struct net_device *netdev;
-@@ -288,20 +302,32 @@ struct ixgbe_adapter {
+@@ -288,20 +302,32 @@
struct ixgbe_hw_stats stats;
/* Interrupt Throttle Rate */
};
enum ixgbe_boards {
-@@ -309,6 +335,13 @@ enum ixgbe_boards {
+@@ -309,6 +335,13 @@
};
extern struct ixgbe_info ixgbe_82598_info;
extern char ixgbe_driver_name[];
extern const char ixgbe_driver_version[];
-@@ -317,11 +350,14 @@ extern int ixgbe_up(struct ixgbe_adapter
+@@ -317,11 +350,14 @@
extern void ixgbe_down(struct ixgbe_adapter *adapter);
extern void ixgbe_reinit_locked(struct ixgbe_adapter *adapter);
extern void ixgbe_reset(struct ixgbe_adapter *adapter);
--extern void ixgbe_update_stats(struct ixgbe_adapter *adapter);
- extern void ixgbe_set_ethtool_ops(struct net_device *netdev);
++extern void ixgbe_set_ethtool_ops(struct net_device *netdev);
++extern int ixgbe_setup_rx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
++extern int ixgbe_setup_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
++extern void ixgbe_free_rx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
++extern void ixgbe_free_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
+ extern void ixgbe_update_stats(struct ixgbe_adapter *adapter);
+-extern void ixgbe_set_ethtool_ops(struct net_device *netdev);
-extern int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
- struct ixgbe_ring *rxdr);
-extern int ixgbe_setup_tx_resources(struct ixgbe_adapter *adapter,
- struct ixgbe_ring *txdr);
-
-+extern int ixgbe_setup_rx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
-+extern int ixgbe_setup_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
-+extern void ixgbe_free_rx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
-+extern void ixgbe_free_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
-+extern void ixgbe_update_stats(struct ixgbe_adapter *adapter);
+extern void ixgbe_reset_interrupt_capability(struct ixgbe_adapter *adapter);
+extern int ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter);
+void ixgbe_napi_add_all(struct ixgbe_adapter *adapter);
+void ixgbe_napi_del_all(struct ixgbe_adapter *adapter);
#endif /* _IXGBE_H_ */
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_82598.c
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_82598.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_82598.c
+--- a/drivers/net/ixgbe/ixgbe_82598.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_82598.c Wed May 06 16:56:25 2009 +0100
@@ -1,7 +1,7 @@
/*******************************************************************************
- bool autoneg,
- bool autoneg_wait_to_complete);
-static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw);
--
+static s32 ixgbe_setup_copper_link_speed_82598(struct ixgbe_hw *hw,
+ ixgbe_link_speed speed,
+ bool autoneg,
+static s32 ixgbe_read_i2c_eeprom_82598(struct ixgbe_hw *hw, u8 byte_offset,
+ u8 *eeprom_data);
+-
+/**
+ */
static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw)
- hw->mac.num_rx_queues = IXGBE_82598_MAX_RX_QUEUES;
- hw->mac.num_tx_queues = IXGBE_82598_MAX_TX_QUEUES;
- hw->mac.num_rx_addrs = IXGBE_82598_RAR_ENTRIES;
--
++ struct ixgbe_mac_info *mac = &hw->mac;
++ struct ixgbe_phy_info *phy = &hw->phy;
++ s32 ret_val = 0;
++ u16 list_offset, data_offset;
+
- /* PHY ops are filled in by default properly for Fiber only */
- if (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_copper) {
- hw->mac.ops.setup_link = &ixgbe_setup_copper_link_82598;
- hw->mac.ops.setup_link_speed = &ixgbe_setup_copper_link_speed_82598;
- hw->mac.ops.get_link_settings =
- &ixgbe_get_copper_link_settings_82598;
--
++ /* Call PHY identify routine to get the phy type */
++ ixgbe_identify_phy_generic(hw);
+
- /* Call PHY identify routine to get the phy type */
- ixgbe_identify_phy(hw);
--
++ /* PHY Init */
++ switch (phy->type) {
++ case ixgbe_phy_nl:
++ phy->ops.reset = &ixgbe_reset_phy_nl;
+
- switch (hw->phy.type) {
- case ixgbe_phy_tn:
- hw->phy.ops.setup_link = &ixgbe_setup_tnx_phy_link;
- break;
- default:
- break;
-+ struct ixgbe_mac_info *mac = &hw->mac;
-+ struct ixgbe_phy_info *phy = &hw->phy;
-+ s32 ret_val = 0;
-+ u16 list_offset, data_offset;
-+
-+ /* Call PHY identify routine to get the phy type */
-+ ixgbe_identify_phy_generic(hw);
-+
-+ /* PHY Init */
-+ switch (phy->type) {
-+ case ixgbe_phy_nl:
-+ phy->ops.reset = &ixgbe_reset_phy_nl;
-+
+ /* Call SFP+ identify routine to get the SFP+ module type */
+ ret_val = phy->ops.identify_sfp(hw);
+ if (ret_val != 0)
+ else if (hw->phy.sfp_type == ixgbe_sfp_type_unknown) {
+ ret_val = IXGBE_ERR_SFP_NOT_SUPPORTED;
+ goto out;
-+ }
+ }
+
+ /* Check to see if SFP+ module is supported */
+ ret_val = ixgbe_get_sfp_init_sequence_offsets(hw,
+ if (ret_val != 0) {
+ ret_val = IXGBE_ERR_SFP_NOT_SUPPORTED;
+ goto out;
- }
++ }
+ break;
+ case ixgbe_phy_tn:
+ phy->ops.check_link = &ixgbe_check_phy_link_tnx;
{
s32 status = 0;
s32 autoc_reg;
-@@ -145,15 +170,16 @@ static s32 ixgbe_get_link_settings_82598
+@@ -145,15 +170,16 @@
}
/**
{
s32 status = IXGBE_ERR_LINK_SETUP;
u16 speed_ability;
-@@ -161,9 +187,9 @@ static s32 ixgbe_get_copper_link_setting
+@@ -161,9 +187,9 @@
*speed = 0;
*autoneg = true;
if (status == 0) {
if (speed_ability & IXGBE_MDIO_PHY_SPEED_10G)
-@@ -191,9 +217,13 @@ static enum ixgbe_media_type ixgbe_get_m
+@@ -191,9 +217,13 @@
case IXGBE_DEV_ID_82598AF_SINGLE_PORT:
case IXGBE_DEV_ID_82598EB_CX4:
case IXGBE_DEV_ID_82598_CX4_DUAL_PORT:
media_type = ixgbe_media_type_copper;
break;
default:
-@@ -205,6 +235,122 @@ static enum ixgbe_media_type ixgbe_get_m
- }
+@@ -202,6 +232,122 @@
+ }
- /**
+ return media_type;
++}
++
++/**
+ * ixgbe_setup_fc_82598 - Configure flow control settings
+ * @hw: pointer to hardware structure
+ * @packetbuf_num: packet buffer number (0-7)
+ IXGBE_WRITE_REG(hw, IXGBE_FCRTV, (hw->fc.pause_time >> 1));
+
+ return 0;
-+}
-+
-+/**
- * ixgbe_setup_mac_link_82598 - Configures MAC link settings
- * @hw: pointer to hardware structure
- *
-@@ -248,8 +394,7 @@ static s32 ixgbe_setup_mac_link_82598(st
+ }
+
+ /**
+@@ -248,8 +394,7 @@
}
if (!(links_reg & IXGBE_LINKS_KX_AN_COMP)) {
status = IXGBE_ERR_AUTONEG_NOT_COMPLETE;
}
}
}
-@@ -259,8 +404,8 @@ static s32 ixgbe_setup_mac_link_82598(st
+@@ -259,8 +404,8 @@
* case we get disconnected and then reconnected into a different hub
* or switch with different Flow Control capabilities.
*/
/* Add delay to filter out noises during initial link setup */
msleep(50);
-@@ -273,29 +418,87 @@ static s32 ixgbe_setup_mac_link_82598(st
+@@ -273,28 +418,86 @@
* @hw: pointer to hardware structure
* @speed: pointer to link speed
* @link_up: true is link is up, false otherwise
u32 links_reg;
+ u32 i;
+ u16 link_reg, adapt_comp_reg;
-
-- links_reg = IXGBE_READ_REG(hw, IXGBE_LINKS);
++
+ /*
+ * SERDES PHY requires us to read link status from register 0xC79F.
+ * Bit 0 set indicates link is up/ready; clear indicates link down.
+ else
+ *link_up = false;
+ }
++
++ if (*link_up == false)
++ goto out;
++ }
+ links_reg = IXGBE_READ_REG(hw, IXGBE_LINKS);
+-
- if (links_reg & IXGBE_LINKS_UP)
- *link_up = true;
- else
- *link_up = false;
-+ if (*link_up == false)
-+ goto out;
-+ }
-+
-+ links_reg = IXGBE_READ_REG(hw, IXGBE_LINKS);
+ if (link_up_wait_to_complete) {
+ for (i = 0; i < IXGBE_LINK_UP_TIME; i++) {
+ if (links_reg & IXGBE_LINKS_UP) {
+out:
return 0;
}
-
+
+
/**
* ixgbe_setup_mac_link_speed_82598 - Set MAC link speed
- * @hw: pointer to hardware structure
-@@ -306,18 +509,18 @@ static s32 ixgbe_check_mac_link_82598(st
+@@ -306,18 +509,18 @@
* Set the link speed in the AUTOC register and restarts link.
**/
static s32 ixgbe_setup_mac_link_speed_82598(struct ixgbe_hw *hw,
/* BX mode - Autonegotiate 1G */
if (!(hw->mac.link_attach_type & IXGBE_AUTOC_1G_PMA_PMD))
hw->mac.link_mode_select = IXGBE_AUTOC_LMS_1G_AN;
-@@ -336,7 +539,7 @@ static s32 ixgbe_setup_mac_link_speed_82
+@@ -336,7 +539,7 @@
* ixgbe_hw This will write the AUTOC register based on the new
* stored values
*/
}
return status;
-@@ -354,18 +557,17 @@ static s32 ixgbe_setup_mac_link_speed_82
+@@ -354,18 +557,17 @@
**/
static s32 ixgbe_setup_copper_link_82598(struct ixgbe_hw *hw)
{
return status;
}
-@@ -379,23 +581,23 @@ static s32 ixgbe_setup_copper_link_82598
+@@ -379,23 +581,23 @@
*
* Sets the link speed in the AUTOC register in the MAC and restarts link.
**/
return status;
}
-@@ -404,7 +606,7 @@ static s32 ixgbe_setup_copper_link_speed
+@@ -404,7 +606,7 @@
* ixgbe_reset_hw_82598 - Performs hardware reset
* @hw: pointer to hardware structure
*
* clears all interrupts, performing a PHY reset, and performing a link (MAC)
* reset.
**/
-@@ -418,35 +620,44 @@ static s32 ixgbe_reset_hw_82598(struct i
+@@ -418,35 +620,44 @@
u8 analog_val;
/* Call adapter stop to disable tx/rx and clear interrupts */
/*
* Prevent the PCI-E bus from from hanging by disabling PCI-E master
-@@ -499,29 +710,401 @@ static s32 ixgbe_reset_hw_82598(struct i
+@@ -499,29 +710,401 @@
IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc);
} else {
hw->mac.link_attach_type =
/* Store the permanent mac address */
- ixgbe_get_mac_addr(hw, hw->mac.perm_addr);
+ hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr);
-+
-+ return status;
-+}
-+
+
+ return status;
+ }
+
+/**
+ * ixgbe_set_vmdq_82598 - Associate a VMDq set index with a rx address
+ * @hw: pointer to hardware struct
+ IXGBE_WRITE_REG(hw, IXGBE_ATLASCTL, atlas_ctl);
+ IXGBE_WRITE_FLUSH(hw);
+ udelay(10);
-
++
+ return 0;
+}
+
+ }
+
+out:
- return status;
- }
-
++ return status;
++}
++
+/**
+ * ixgbe_get_supported_physical_layer_82598 - Returns physical layer type
+ * @hw: pointer to hardware structure
+ .read_analog_reg8 = &ixgbe_read_analog_reg8_82598,
+ .write_analog_reg8 = &ixgbe_write_analog_reg8_82598,
.setup_link = &ixgbe_setup_mac_link_82598,
-- .check_link = &ixgbe_check_mac_link_82598,
- .setup_link_speed = &ixgbe_setup_mac_link_speed_82598,
++ .setup_link_speed = &ixgbe_setup_mac_link_speed_82598,
+ .check_link = &ixgbe_check_mac_link_82598,
+- .setup_link_speed = &ixgbe_setup_mac_link_speed_82598,
- .get_link_settings = &ixgbe_get_link_settings_82598,
-+ .check_link = &ixgbe_check_mac_link_82598,
+ .get_link_capabilities = &ixgbe_get_link_capabilities_82598,
+ .led_on = &ixgbe_led_on_generic,
+ .led_off = &ixgbe_led_off_generic,
+ .phy_ops = &phy_ops_82598,
};
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_common.c
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_common.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_common.c
+--- a/drivers/net/ixgbe/ixgbe_common.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_common.c Wed May 06 16:56:25 2009 +0100
@@ -1,7 +1,7 @@
/*******************************************************************************
* @hw: pointer to hardware structure
*
* Starts the hardware by filling the bus info structure and media type, clears
-@@ -54,7 +61,7 @@ static void ixgbe_add_mc_addr(struct ixg
+@@ -54,7 +61,7 @@
* table, VLAN filter table, calls routine to set up link and flow control
* settings, and leaves transmit and receive units disabled and uninitialized
**/
{
u32 ctrl_ext;
-@@ -62,22 +69,22 @@ s32 ixgbe_start_hw(struct ixgbe_hw *hw)
+@@ -62,22 +69,22 @@
hw->phy.media_type = hw->mac.ops.get_media_type(hw);
/* Identify the PHY */
/* Set No Snoop Disable */
ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT);
-@@ -92,34 +99,34 @@ s32 ixgbe_start_hw(struct ixgbe_hw *hw)
+@@ -92,34 +99,34 @@
}
/**
{
u16 i = 0;
-@@ -191,7 +198,36 @@ static s32 ixgbe_clear_hw_cntrs(struct i
+@@ -191,7 +198,36 @@
}
/**
* @hw: pointer to hardware structure
* @mac_addr: Adapter MAC address
*
-@@ -199,7 +235,7 @@ static s32 ixgbe_clear_hw_cntrs(struct i
+@@ -199,7 +235,7 @@
* A reset of the adapter must be performed prior to calling this function
* in order for the MAC address to have been loaded from the EEPROM into RAR0
**/
{
u32 rar_high;
u32 rar_low;
-@@ -217,30 +253,8 @@ s32 ixgbe_get_mac_addr(struct ixgbe_hw *
+@@ -217,30 +253,8 @@
return 0;
}
* @hw: pointer to hardware structure
*
* Sets the adapter_stopped flag within ixgbe_hw struct. Clears interrupts,
-@@ -248,7 +262,7 @@ s32 ixgbe_read_part_num(struct ixgbe_hw
+@@ -248,7 +262,7 @@
* the shared code and drivers to determine if the adapter is in a stopped
* state and should not touch the hardware.
**/
{
u32 number_of_queues;
u32 reg_val;
-@@ -264,6 +278,7 @@ s32 ixgbe_stop_adapter(struct ixgbe_hw *
+@@ -264,6 +278,7 @@
reg_val = IXGBE_READ_REG(hw, IXGBE_RXCTRL);
reg_val &= ~(IXGBE_RXCTRL_RXEN);
IXGBE_WRITE_REG(hw, IXGBE_RXCTRL, reg_val);
msleep(2);
/* Clear interrupt mask to stop from interrupts being generated */
-@@ -273,7 +288,7 @@ s32 ixgbe_stop_adapter(struct ixgbe_hw *
+@@ -273,7 +288,7 @@
IXGBE_READ_REG(hw, IXGBE_EICR);
/* Disable the transmit unit. Each queue must be disabled. */
for (i = 0; i < number_of_queues; i++) {
reg_val = IXGBE_READ_REG(hw, IXGBE_TXDCTL(i));
if (reg_val & IXGBE_TXDCTL_ENABLE) {
-@@ -282,15 +297,22 @@ s32 ixgbe_stop_adapter(struct ixgbe_hw *
+@@ -282,15 +297,22 @@
}
}
{
u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
-@@ -304,11 +326,11 @@ s32 ixgbe_led_on(struct ixgbe_hw *hw, u3
+@@ -304,11 +326,11 @@
}
/**
{
u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
-@@ -321,15 +343,14 @@ s32 ixgbe_led_off(struct ixgbe_hw *hw, u
+@@ -321,15 +343,14 @@
return 0;
}
{
struct ixgbe_eeprom_info *eeprom = &hw->eeprom;
u32 eec;
-@@ -337,6 +358,9 @@ s32 ixgbe_init_eeprom(struct ixgbe_hw *h
+@@ -337,6 +358,9 @@
if (eeprom->type == ixgbe_eeprom_uninitialized) {
eeprom->type = ixgbe_eeprom_none;
/*
* Check for EEPROM present first.
-@@ -369,18 +393,85 @@ s32 ixgbe_init_eeprom(struct ixgbe_hw *h
+@@ -369,17 +393,84 @@
}
/**
{
u32 eerd;
s32 status;
-
++
+ hw->eeprom.ops.init_params(hw);
+
+ if (offset >= hw->eeprom.word_size) {
+ status = IXGBE_ERR_EEPROM;
+ goto out;
+ }
-+
+
eerd = (offset << IXGBE_EEPROM_READ_ADDR_SHIFT) +
IXGBE_EEPROM_READ_REG_START;
-
-@@ -389,10 +480,11 @@ s32 ixgbe_read_eeprom(struct ixgbe_hw *h
+@@ -389,10 +480,11 @@
if (status == 0)
*data = (IXGBE_READ_REG(hw, IXGBE_EERD) >>
return status;
}
-@@ -420,6 +512,58 @@ static s32 ixgbe_poll_eeprom_eerd_done(s
- }
-
- /**
+@@ -415,6 +507,58 @@
+ break;
+ }
+ udelay(5);
++ }
++ return status;
++}
++
++/**
+ * ixgbe_acquire_eeprom - Acquire EEPROM using bit-bang
+ * @hw: pointer to hardware structure
+ *
+ IXGBE_WRITE_REG(hw, IXGBE_EEC, eec);
+ IXGBE_WRITE_FLUSH(hw);
+ udelay(1);
-+ }
-+ return status;
-+}
-+
-+/**
- * ixgbe_get_eeprom_semaphore - Get hardware semaphore
- * @hw: pointer to hardware structure
- *
-@@ -475,7 +619,7 @@ static s32 ixgbe_get_eeprom_semaphore(st
+ }
+ return status;
+ }
+@@ -475,7 +619,7 @@
*/
if (i >= timeout) {
hw_dbg(hw, "Driver can't access the Eeprom - Semaphore "
ixgbe_release_eeprom_semaphore(hw);
status = IXGBE_ERR_EEPROM;
}
-@@ -503,6 +647,217 @@ static void ixgbe_release_eeprom_semapho
+@@ -503,6 +647,217 @@
}
/**
* ixgbe_calc_eeprom_checksum - Calculates and returns the checksum
* @hw: pointer to hardware structure
**/
-@@ -517,7 +872,7 @@ static u16 ixgbe_calc_eeprom_checksum(st
+@@ -517,7 +872,7 @@
/* Include 0x0-0x3F in the checksum */
for (i = 0; i < IXGBE_EEPROM_CHECKSUM; i++) {
hw_dbg(hw, "EEPROM read failed\n");
break;
}
-@@ -526,15 +881,15 @@ static u16 ixgbe_calc_eeprom_checksum(st
+@@ -526,15 +881,15 @@
/* Include all data from pointers except for the fw pointer */
for (i = IXGBE_PCIE_ANALOG_PTR; i < IXGBE_FW_PTR; i++) {
checksum += word;
}
}
-@@ -547,14 +902,15 @@ static u16 ixgbe_calc_eeprom_checksum(st
+@@ -547,14 +902,15 @@
}
/**
{
s32 status;
u16 checksum;
-@@ -565,12 +921,12 @@ s32 ixgbe_validate_eeprom_checksum(struc
+@@ -565,12 +921,12 @@
* not continue or we could be in for a very long wait while every
* EEPROM read fails
*/
/*
* Verify read checksum from EEPROM is the same as
-@@ -590,6 +946,33 @@ s32 ixgbe_validate_eeprom_checksum(struc
- }
-
- /**
+@@ -582,6 +938,33 @@
+ /* If the user cares, return the calculated checksum */
+ if (checksum_val)
+ *checksum_val = checksum;
++ } else {
++ hw_dbg(hw, "EEPROM read failed\n");
++ }
++
++ return status;
++}
++
++/**
+ * ixgbe_update_eeprom_checksum_generic - Updates the EEPROM checksum
+ * @hw: pointer to hardware structure
+ **/
+ checksum = ixgbe_calc_eeprom_checksum(hw);
+ status = hw->eeprom.ops.write(hw, IXGBE_EEPROM_CHECKSUM,
+ checksum);
-+ } else {
-+ hw_dbg(hw, "EEPROM read failed\n");
-+ }
-+
-+ return status;
-+}
-+
-+/**
- * ixgbe_validate_mac_addr - Validate MAC address
- * @mac_addr: pointer to MAC address.
- *
-@@ -607,61 +990,140 @@ s32 ixgbe_validate_mac_addr(u8 *mac_addr
+ } else {
+ hw_dbg(hw, "EEPROM read failed\n");
+ }
+@@ -607,61 +990,140 @@
status = IXGBE_ERR_INVALID_MAC_ADDR;
/* Reject the zero address */
else if (mac_addr[0] == 0 && mac_addr[1] == 0 && mac_addr[2] == 0 &&
- * ixgbe_set_rar - Set RX address register
+ * ixgbe_set_rar_generic - Set Rx address register
* @hw: pointer to hardware structure
-- * @addr: Address to put into receive address register
- * @index: Receive address register to write
++ * @index: Receive address register to write
+ * @addr: Address to put into receive address register
+- * @index: Receive address register to write
- * @vind: Vind to set RAR to
-+ * @addr: Address to put into receive address register
+ * @vmdq: VMDq "set" or "pool" index
* @enable_addr: set flag that address is active
*
- ((u32)addr[1] << 8) |
- ((u32)addr[2] << 16) |
- ((u32)addr[3] << 24));
--
++ /* setup VMDq pool selection before this RAR gets enabled */
++ hw->mac.ops.set_vmdq(hw, index, vmdq);
+
- rar_high = ((u32)addr[4] |
- ((u32)addr[5] << 8) |
- ((vind << IXGBE_RAH_VIND_SHIFT) & IXGBE_RAH_VIND_MASK));
-+ /* setup VMDq pool selection before this RAR gets enabled */
-+ hw->mac.ops.set_vmdq(hw, index, vmdq);
-+
+ /* Make sure we are using a valid rar index range */
+ if (index < rar_entries) {
+ /*
/*
* If the current mac address is valid, assume it is a software override
-@@ -671,29 +1133,30 @@ static s32 ixgbe_init_rx_addrs(struct ix
+@@ -671,29 +1133,30 @@
if (ixgbe_validate_mac_addr(hw->mac.addr) ==
IXGBE_ERR_INVALID_MAC_ADDR) {
/* Get the MAC address from the RAR0 for later reference */
for (i = 1; i < rar_entries; i++) {
IXGBE_WRITE_REG(hw, IXGBE_RAL(i), 0);
IXGBE_WRITE_REG(hw, IXGBE_RAH(i), 0);
-@@ -705,9 +1168,113 @@ static s32 ixgbe_init_rx_addrs(struct ix
+@@ -705,9 +1168,113 @@
IXGBE_WRITE_REG(hw, IXGBE_MCSTCTRL, hw->mac.mc_filter_type);
hw_dbg(hw, " Clearing MTA\n");
return 0;
}
-@@ -720,7 +1287,7 @@ static s32 ixgbe_init_rx_addrs(struct ix
+@@ -720,7 +1287,7 @@
* bit-vector to set in the multicast table. The hardware uses 12 bits, from
* incoming rx multicast addresses, to determine the bit-vector to check in
* the MTA. Which of the 4 combination, of 12-bits, the hardware uses is set
* to mc_filter_type.
**/
static s32 ixgbe_mta_vector(struct ixgbe_hw *hw, u8 *mc_addr)
-@@ -728,19 +1295,19 @@ static s32 ixgbe_mta_vector(struct ixgbe
+@@ -728,19 +1295,19 @@
u32 vector = 0;
switch (hw->mac.mc_filter_type) {
hw_dbg(hw, "MC filter type param set incorrectly\n");
break;
}
-@@ -794,21 +1361,22 @@ static void ixgbe_set_mta(struct ixgbe_h
+@@ -794,21 +1361,22 @@
**/
static void ixgbe_add_mc_addr(struct ixgbe_hw *hw, u8 *mc_addr)
{
hw->addr_ctrl.rar_used_count++;
hw->addr_ctrl.mc_addr_in_rar_count++;
} else {
-@@ -819,22 +1387,23 @@ static void ixgbe_add_mc_addr(struct ixg
+@@ -819,22 +1387,23 @@
}
/**
/*
* Set the new number of MC addresses that we are being requested to
-@@ -846,7 +1415,8 @@ s32 ixgbe_update_mc_addr_list(struct ixg
+@@ -846,7 +1415,8 @@
hw->addr_ctrl.mta_in_use = 0;
/* Zero out the other receive addresses. */
for (i = hw->addr_ctrl.rar_used_count; i < rar_entries; i++) {
IXGBE_WRITE_REG(hw, IXGBE_RAL(i), 0);
IXGBE_WRITE_REG(hw, IXGBE_RAH(i), 0);
-@@ -854,186 +1424,67 @@ s32 ixgbe_update_mc_addr_list(struct ixg
+@@ -854,186 +1424,67 @@
/* Clear the MTA */
hw_dbg(hw, " Clearing MTA\n");
{
- u32 offset;
- u32 vlanbyte;
--
++ u32 i;
++ u32 rar_entries = hw->mac.num_rar_entries;
++ struct ixgbe_addr_filter_info *a = &hw->addr_ctrl;
+
- for (offset = 0; offset < IXGBE_VLAN_FILTER_TBL_SIZE; offset++)
- IXGBE_WRITE_REG(hw, IXGBE_VFTA(offset), 0);
--
++ if (a->mc_addr_in_rar_count > 0)
++ for (i = (rar_entries - a->mc_addr_in_rar_count);
++ i < rar_entries; i++)
++ ixgbe_enable_rar(hw, i);
+
- for (vlanbyte = 0; vlanbyte < 4; vlanbyte++)
- for (offset = 0; offset < IXGBE_VLAN_FILTER_TBL_SIZE; offset++)
- IXGBE_WRITE_REG(hw, IXGBE_VFTAVIND(vlanbyte, offset),
- 0);
--
-- return 0;
--}
-+ u32 i;
-+ u32 rar_entries = hw->mac.num_rar_entries;
-+ struct ixgbe_addr_filter_info *a = &hw->addr_ctrl;
++ if (a->mta_in_use > 0)
++ IXGBE_WRITE_REG(hw, IXGBE_MCSTCTRL, IXGBE_MCSTCTRL_MFE |
++ hw->mac.mc_filter_type);
--/**
+ return 0;
+ }
+
+ /**
- * ixgbe_set_vfta - Set VLAN filter table
-- * @hw: pointer to hardware structure
++ * ixgbe_disable_mc_generic - Disable multicast address in RAR
+ * @hw: pointer to hardware structure
- * @vlan: VLAN id to write to VLAN filter
- * @vind: VMDq output index that maps queue to VLAN id in VFTA
- * @vlan_on: boolean flag to turn on/off VLAN in VFTA
-- *
+ *
- * Turn on/off specified VLAN in the VLAN filter table.
-- **/
++ * Disables multicast address in RAR and the use of the multicast hash table.
+ **/
-s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, u32 vind,
- bool vlan_on)
--{
++s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw)
+ {
- u32 VftaIndex;
- u32 BitOffset;
- u32 VftaReg;
- u32 VftaByte;
--
++ u32 i;
++ u32 rar_entries = hw->mac.num_rar_entries;
++ struct ixgbe_addr_filter_info *a = &hw->addr_ctrl;
+
- /* Determine 32-bit word position in array */
- VftaIndex = (vlan >> 5) & 0x7F; /* upper seven bits */
--
++ if (a->mc_addr_in_rar_count > 0)
++ for (i = (rar_entries - a->mc_addr_in_rar_count);
++ i < rar_entries; i++)
++ ixgbe_disable_rar(hw, i);
+
- /* Determine the location of the (VMD) queue index */
- VftaByte = ((vlan >> 3) & 0x03); /* bits (4:3) indicating byte array */
- BitOffset = (vlan & 0x7) << 2; /* lower 3 bits indicate nibble */
- /* Turn off this VLAN id */
- VftaReg &= ~(1 << BitOffset);
- IXGBE_WRITE_REG(hw, IXGBE_VFTA(VftaIndex), VftaReg);
-+ if (a->mc_addr_in_rar_count > 0)
-+ for (i = (rar_entries - a->mc_addr_in_rar_count);
-+ i < rar_entries; i++)
-+ ixgbe_enable_rar(hw, i);
-+
-+ if (a->mta_in_use > 0)
-+ IXGBE_WRITE_REG(hw, IXGBE_MCSTCTRL, IXGBE_MCSTCTRL_MFE |
-+ hw->mac.mc_filter_type);
-
- return 0;
- }
-
- /**
+-
+- return 0;
+-}
+-
+-/**
- * ixgbe_setup_fc - Configure flow control settings
-+ * ixgbe_disable_mc_generic - Disable multicast address in RAR
- * @hw: pointer to hardware structure
+- * @hw: pointer to hardware structure
- * @packetbuf_num: packet buffer number (0-7)
- *
+- *
- * Configures the flow control settings based on SW configuration.
- * This function is used for 802.3x flow control configuration only.
-+ * Disables multicast address in RAR and the use of the multicast hash table.
- **/
+- **/
-s32 ixgbe_setup_fc(struct ixgbe_hw *hw, s32 packetbuf_num)
-+s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw)
- {
+-{
- u32 frctl_reg;
- u32 rmcs_reg;
-
- /* Enable 802.3x based flow control settings. */
- IXGBE_WRITE_REG(hw, IXGBE_FCTRL, frctl_reg);
- IXGBE_WRITE_REG(hw, IXGBE_RMCS, rmcs_reg);
-+ u32 i;
-+ u32 rar_entries = hw->mac.num_rar_entries;
-+ struct ixgbe_addr_filter_info *a = &hw->addr_ctrl;
-
+-
- /*
- * We need to set up the Receive Threshold high and low water
- * marks as well as (optionally) enabling the transmission of
- IXGBE_WRITE_REG(hw, IXGBE_FCRTH(packetbuf_num),
- (hw->fc.high_water)|IXGBE_FCRTH_FCEN);
- }
-+ if (a->mc_addr_in_rar_count > 0)
-+ for (i = (rar_entries - a->mc_addr_in_rar_count);
-+ i < rar_entries; i++)
-+ ixgbe_disable_rar(hw, i);
-
+-
- IXGBE_WRITE_REG(hw, IXGBE_FCTTV(0), hw->fc.pause_time);
- IXGBE_WRITE_REG(hw, IXGBE_FCRTV, (hw->fc.pause_time >> 1));
+ if (a->mta_in_use > 0)
return 0;
}
-@@ -1049,13 +1500,24 @@ s32 ixgbe_setup_fc(struct ixgbe_hw *hw,
+@@ -1049,13 +1500,24 @@
**/
s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw)
{
for (i = 0; i < IXGBE_PCI_MASTER_DISABLE_TIMEOUT; i++) {
if (!(IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_GIO)) {
-@@ -1070,11 +1532,11 @@ s32 ixgbe_disable_pcie_master(struct ixg
+@@ -1070,11 +1532,11 @@
/**
* function (CSR, PHY0, PHY1, EEPROM, Flash)
**/
s32 ixgbe_acquire_swfw_sync(struct ixgbe_hw *hw, u16 mask)
-@@ -1116,9 +1578,9 @@ s32 ixgbe_acquire_swfw_sync(struct ixgbe
+@@ -1116,9 +1578,9 @@
/**
* ixgbe_release_swfw_sync - Release SWFW semaphore
* @hw: pointer to hardware structure
* function (CSR, PHY0, PHY1, EEPROM, Flash)
**/
void ixgbe_release_swfw_sync(struct ixgbe_hw *hw, u16 mask)
-@@ -1135,45 +1597,3 @@ void ixgbe_release_swfw_sync(struct ixgb
+@@ -1135,45 +1597,3 @@
ixgbe_release_eeprom_semaphore(hw);
}
- return 0;
-}
-
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.h linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_common.h
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_common.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_common.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_common.h
+--- a/drivers/net/ixgbe/ixgbe_common.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_common.h Wed May 06 16:56:25 2009 +0100
@@ -1,7 +1,7 @@
/*******************************************************************************
-s32 ixgbe_get_mac_addr(struct ixgbe_hw *hw, u8 *mac_addr);
-s32 ixgbe_stop_adapter(struct ixgbe_hw *hw);
-s32 ixgbe_read_part_num(struct ixgbe_hw *hw, u32 *part_num);
--
--s32 ixgbe_led_on(struct ixgbe_hw *hw, u32 index);
--s32 ixgbe_led_off(struct ixgbe_hw *hw, u32 index);
--
--s32 ixgbe_init_eeprom(struct ixgbe_hw *hw);
--s32 ixgbe_read_eeprom(struct ixgbe_hw *hw, u16 offset, u16 *data);
--s32 ixgbe_validate_eeprom_checksum(struct ixgbe_hw *hw, u16 *checksum_val);
--
--s32 ixgbe_set_rar(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vind,
-- u32 enable_addr);
--s32 ixgbe_update_mc_addr_list(struct ixgbe_hw *hw, u8 *mc_addr_list,
-- u32 mc_addr_count, u32 pad);
--s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on);
--s32 ixgbe_validate_mac_addr(u8 *mac_addr);
--
--s32 ixgbe_setup_fc(struct ixgbe_hw *hw, s32 packtetbuf_num);
+s32 ixgbe_init_ops_generic(struct ixgbe_hw *hw);
+s32 ixgbe_init_hw_generic(struct ixgbe_hw *hw);
+s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw);
+s32 ixgbe_get_mac_addr_generic(struct ixgbe_hw *hw, u8 *mac_addr);
+s32 ixgbe_get_bus_info_generic(struct ixgbe_hw *hw);
+s32 ixgbe_stop_adapter_generic(struct ixgbe_hw *hw);
-+
+
+-s32 ixgbe_led_on(struct ixgbe_hw *hw, u32 index);
+-s32 ixgbe_led_off(struct ixgbe_hw *hw, u32 index);
+s32 ixgbe_led_on_generic(struct ixgbe_hw *hw, u32 index);
+s32 ixgbe_led_off_generic(struct ixgbe_hw *hw, u32 index);
-+
+
+-s32 ixgbe_init_eeprom(struct ixgbe_hw *hw);
+-s32 ixgbe_read_eeprom(struct ixgbe_hw *hw, u16 offset, u16 *data);
+-s32 ixgbe_validate_eeprom_checksum(struct ixgbe_hw *hw, u16 *checksum_val);
+s32 ixgbe_init_eeprom_params_generic(struct ixgbe_hw *hw);
+s32 ixgbe_read_eeprom_generic(struct ixgbe_hw *hw, u16 offset, u16 *data);
+s32 ixgbe_read_eeprom_bit_bang_generic(struct ixgbe_hw *hw, u16 offset,
+s32 ixgbe_validate_eeprom_checksum_generic(struct ixgbe_hw *hw,
+ u16 *checksum_val);
+s32 ixgbe_update_eeprom_checksum_generic(struct ixgbe_hw *hw);
-+
+
+-s32 ixgbe_set_rar(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vind,
+- u32 enable_addr);
+-s32 ixgbe_update_mc_addr_list(struct ixgbe_hw *hw, u8 *mc_addr_list,
+- u32 mc_addr_count, u32 pad);
+-s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on);
+s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
+ u32 enable_addr);
+s32 ixgbe_clear_rar_generic(struct ixgbe_hw *hw, u32 index);
+ u32 addr_count, ixgbe_mc_addr_itr func);
+s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw);
+s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw);
-
-+s32 ixgbe_validate_mac_addr(u8 *mac_addr);
++
+ s32 ixgbe_validate_mac_addr(u8 *mac_addr);
+-
+-s32 ixgbe_setup_fc(struct ixgbe_hw *hw, s32 packtetbuf_num);
+-
s32 ixgbe_acquire_swfw_sync(struct ixgbe_hw *hw, u16 mask);
void ixgbe_release_swfw_sync(struct ixgbe_hw *hw, u16 mask);
s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw);
#define IXGBE_WRITE_REG(a, reg, value) writel((value), ((a)->hw_addr + (reg)))
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_dcb.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_dcb.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/ixgbe/ixgbe_dcb.c Wed May 06 16:56:25 2009 +0100
@@ -0,0 +1,332 @@
+/*******************************************************************************
+
+ return ret;
+}
+
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_dcb.h linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_dcb.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/ixgbe/ixgbe_dcb.h Wed May 06 16:56:25 2009 +0100
@@ -0,0 +1,189 @@
+/*******************************************************************************
+
+#define MAX_CREDIT 4095 /* Maximum credit supported: 256KB * 1204 / 64B */
+
+#endif /* _DCB_CONFIG_H */
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_dcb_82598.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb_82598.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb_82598.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_dcb_82598.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/ixgbe/ixgbe_dcb_82598.c Wed May 06 16:56:25 2009 +0100
@@ -0,0 +1,398 @@
+/*******************************************************************************
+
+
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_dcb_82598.h linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb_82598.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb_82598.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_dcb_82598.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/ixgbe/ixgbe_dcb_82598.h Wed May 06 16:56:25 2009 +0100
@@ -0,0 +1,98 @@
+/*******************************************************************************
+
+ struct ixgbe_dcb_config *config);
+
+#endif /* _DCB_82598_CONFIG_H */
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_dcb_nl.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb_nl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb_nl.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_dcb_nl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c Wed May 06 16:56:25 2009 +0100
@@ -0,0 +1,639 @@
+/*******************************************************************************
+
+ .setbcnrp = ixgbe_dcbnl_setbcnrp
+};
+
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_ethtool.c
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_ethtool.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_ethtool.c
+--- a/drivers/net/ixgbe/ixgbe_ethtool.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_ethtool.c Wed May 06 16:56:25 2009 +0100
@@ -1,7 +1,7 @@
/*******************************************************************************
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
-@@ -48,7 +47,7 @@ struct ixgbe_stats {
+@@ -48,7 +47,7 @@
};
#define IXGBE_STAT(m) sizeof(((struct ixgbe_adapter *)0)->m), \
static struct ixgbe_stats ixgbe_gstrings_stats[] = {
{"rx_packets", IXGBE_STAT(net_stats.rx_packets)},
{"tx_packets", IXGBE_STAT(net_stats.tx_packets)},
-@@ -90,19 +89,31 @@ static struct ixgbe_stats ixgbe_gstrings
+@@ -90,19 +89,31 @@
{"rx_header_split", IXGBE_STAT(rx_hdr_split)},
{"alloc_rx_page_failed", IXGBE_STAT(alloc_rx_page_failed)},
{"alloc_rx_buff_failed", IXGBE_STAT(alloc_rx_buff_failed)},
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw;
-@@ -114,7 +125,7 @@ static int ixgbe_get_settings(struct net
+@@ -114,7 +125,7 @@
ecmd->transceiver = XCVR_EXTERNAL;
if (hw->phy.media_type == ixgbe_media_type_copper) {
ecmd->supported |= (SUPPORTED_1000baseT_Full |
ecmd->advertising = (ADVERTISED_TP | ADVERTISED_Autoneg);
if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL)
-@@ -126,14 +137,15 @@ static int ixgbe_get_settings(struct net
+@@ -126,14 +137,15 @@
} else {
ecmd->supported |= SUPPORTED_FIBRE;
ecmd->advertising = (ADVERTISED_10000baseT_Full |
ecmd->duplex = DUPLEX_FULL;
} else {
ecmd->speed = -1;
-@@ -144,10 +156,12 @@ static int ixgbe_get_settings(struct net
+@@ -144,10 +156,12 @@
}
static int ixgbe_set_settings(struct net_device *netdev,
switch (hw->phy.media_type) {
case ixgbe_media_type_fiber:
-@@ -156,6 +170,31 @@ static int ixgbe_set_settings(struct net
+@@ -155,6 +169,31 @@
+ (ecmd->speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL))
return -EINVAL;
/* in this case we currently only support 10Gb/FULL */
- break;
++ break;
+ case ixgbe_media_type_copper:
+ /* 10000/copper and 1000/copper must autoneg
+ * this function does not support any duplex forcing, but can
+ "setup link failed with code %d\n", err);
+ hw->mac.ops.setup_link_speed(hw, old, true, true);
+ }
-+ break;
+ break;
default:
break;
- }
-@@ -164,7 +203,7 @@ static int ixgbe_set_settings(struct net
+@@ -164,7 +203,7 @@
}
static void ixgbe_get_pauseparam(struct net_device *netdev,
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw;
-@@ -182,7 +221,7 @@ static void ixgbe_get_pauseparam(struct
+@@ -182,7 +221,7 @@
}
static int ixgbe_set_pauseparam(struct net_device *netdev,
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw;
-@@ -233,15 +272,15 @@ static int ixgbe_set_rx_csum(struct net_
+@@ -233,15 +272,15 @@
static u32 ixgbe_get_tx_csum(struct net_device *netdev)
{
return 0;
}
-@@ -281,7 +320,7 @@ static int ixgbe_get_regs_len(struct net
+@@ -281,7 +320,7 @@
#define IXGBE_GET_STAT(_A_, _R_) _A_->stats._R_
static void ixgbe_get_regs(struct net_device *netdev,
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw;
-@@ -315,7 +354,9 @@ static void ixgbe_get_regs(struct net_de
+@@ -315,7 +354,9 @@
regs_buff[17] = IXGBE_READ_REG(hw, IXGBE_GRC);
/* Interrupt */
regs_buff[19] = IXGBE_READ_REG(hw, IXGBE_EICS);
regs_buff[20] = IXGBE_READ_REG(hw, IXGBE_EIMS);
regs_buff[21] = IXGBE_READ_REG(hw, IXGBE_EIMC);
-@@ -325,7 +366,7 @@ static void ixgbe_get_regs(struct net_de
+@@ -325,7 +366,7 @@
regs_buff[25] = IXGBE_READ_REG(hw, IXGBE_IVAR(0));
regs_buff[26] = IXGBE_READ_REG(hw, IXGBE_MSIXT);
regs_buff[27] = IXGBE_READ_REG(hw, IXGBE_MSIXPBA);
regs_buff[29] = IXGBE_READ_REG(hw, IXGBE_GPIE);
/* Flow Control */
-@@ -371,7 +412,7 @@ static void ixgbe_get_regs(struct net_de
+@@ -371,7 +412,7 @@
regs_buff[482 + i] = IXGBE_READ_REG(hw, IXGBE_RAL(i));
for (i = 0; i < 16; i++)
regs_buff[498 + i] = IXGBE_READ_REG(hw, IXGBE_RAH(i));
regs_buff[515] = IXGBE_READ_REG(hw, IXGBE_FCTRL);
regs_buff[516] = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
regs_buff[517] = IXGBE_READ_REG(hw, IXGBE_MCSTCTRL);
-@@ -419,7 +460,6 @@ static void ixgbe_get_regs(struct net_de
+@@ -419,7 +460,6 @@
regs_buff[827] = IXGBE_READ_REG(hw, IXGBE_WUPM);
regs_buff[828] = IXGBE_READ_REG(hw, IXGBE_FHFT);
regs_buff[829] = IXGBE_READ_REG(hw, IXGBE_RMCS);
regs_buff[830] = IXGBE_READ_REG(hw, IXGBE_DPMCS);
regs_buff[831] = IXGBE_READ_REG(hw, IXGBE_PDPMCS);
-@@ -539,21 +579,17 @@ static void ixgbe_get_regs(struct net_de
+@@ -539,21 +579,17 @@
/* Diagnostic */
regs_buff[1071] = IXGBE_READ_REG(hw, IXGBE_RDSTATCTL);
for (i = 0; i < 8; i++)
regs_buff[1100] = IXGBE_READ_REG(hw, IXGBE_TDPROBE);
regs_buff[1101] = IXGBE_READ_REG(hw, IXGBE_TXBUFCTRL);
regs_buff[1102] = IXGBE_READ_REG(hw, IXGBE_TXBUFDATA0);
-@@ -566,7 +602,7 @@ static void ixgbe_get_regs(struct net_de
+@@ -566,7 +602,7 @@
regs_buff[1109] = IXGBE_READ_REG(hw, IXGBE_RXBUFDATA2);
regs_buff[1110] = IXGBE_READ_REG(hw, IXGBE_RXBUFDATA3);
for (i = 0; i < 8; i++)
regs_buff[1119] = IXGBE_READ_REG(hw, IXGBE_RFVAL);
regs_buff[1120] = IXGBE_READ_REG(hw, IXGBE_MDFTC1);
regs_buff[1121] = IXGBE_READ_REG(hw, IXGBE_MDFTC2);
-@@ -585,7 +621,7 @@ static int ixgbe_get_eeprom_len(struct n
+@@ -585,7 +621,7 @@
}
static int ixgbe_get_eeprom(struct net_device *netdev,
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw;
-@@ -608,8 +644,8 @@ static int ixgbe_get_eeprom(struct net_d
+@@ -608,8 +644,8 @@
return -ENOMEM;
for (i = 0; i < eeprom_len; i++) {
break;
}
-@@ -624,7 +660,7 @@ static int ixgbe_get_eeprom(struct net_d
+@@ -624,7 +660,7 @@
}
static void ixgbe_get_drvinfo(struct net_device *netdev,
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
-@@ -637,7 +673,7 @@ static void ixgbe_get_drvinfo(struct net
+@@ -637,7 +673,7 @@
}
static void ixgbe_get_ringparam(struct net_device *netdev,
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_ring *tx_ring = adapter->tx_ring;
-@@ -654,15 +690,12 @@ static void ixgbe_get_ringparam(struct n
+@@ -654,15 +690,12 @@
}
static int ixgbe_set_ringparam(struct net_device *netdev,
if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
return -EINVAL;
-@@ -681,6 +714,15 @@ static int ixgbe_set_ringparam(struct ne
+@@ -681,6 +714,15 @@
return 0;
}
while (test_and_set_bit(__IXGBE_RESETTING, &adapter->state))
msleep(1);
-@@ -693,66 +735,61 @@ static int ixgbe_set_ringparam(struct ne
+@@ -693,66 +735,61 @@
* to the tx and rx ring structs.
*/
if (new_tx_count != adapter->tx_ring->count) {
}
if (new_rx_count != adapter->rx_ring->count) {
-- for (i = 0; i < adapter->num_rx_queues; i++) {
+ memcpy(temp_ring, adapter->rx_ring,
+ adapter->num_rx_queues * sizeof(struct ixgbe_ring));
-
++
+ for (i = 0; i < adapter->num_rx_queues; i++) {
+-
- old_rx_buf = adapter->rx_ring[i].rx_buffer_info;
- old_desc = adapter->rx_ring[i].desc;
- old_size = adapter->rx_ring[i].size;
- adapter->rx_ring[i].count = new_rx_count;
- err = ixgbe_setup_rx_resources(adapter,
- &adapter->rx_ring[i]);
-+ for (i = 0; i < adapter->num_rx_queues; i++) {
+ temp_ring[i].count = new_rx_count;
+ err = ixgbe_setup_rx_resources(adapter, &temp_ring[i]);
if (err) {
+ }
goto err_setup;
}
--
++ }
+
- vfree(old_rx_buf);
- pci_free_consistent(adapter->pdev, old_size, old_desc,
- old_dma);
- }
-+
+- }
+ for (i = 0; i < adapter->num_rx_queues; i++)
+ ixgbe_free_rx_resources(adapter, &adapter->rx_ring[i]);
+
ixgbe_up(adapter);
clear_bit(__IXGBE_RESETTING, &adapter->state);
-@@ -770,20 +807,31 @@ static int ixgbe_get_sset_count(struct n
+@@ -770,20 +807,31 @@
}
static void ixgbe_get_ethtool_stats(struct net_device *netdev,
}
for (j = 0; j < adapter->num_tx_queues; j++) {
queue_stat = (u64 *)&adapter->tx_ring[j].stats;
-@@ -792,24 +840,28 @@ static void ixgbe_get_ethtool_stats(stru
+@@ -792,24 +840,28 @@
i += k;
}
for (j = 0; j < adapter->num_rx_queues; j++) {
int i;
switch (stringset) {
-@@ -831,14 +883,28 @@ static void ixgbe_get_strings(struct net
+@@ -831,14 +883,28 @@
sprintf(p, "rx_queue_%u_bytes", i);
p += ETH_GSTRING_LEN;
}
{
wol->supported = 0;
wol->wolopts = 0;
-@@ -859,16 +925,17 @@ static int ixgbe_nway_reset(struct net_d
+@@ -859,16 +925,17 @@
static int ixgbe_phys_id(struct net_device *netdev, u32 data)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
msleep_interruptible(200);
}
-@@ -879,67 +946,75 @@ static int ixgbe_phys_id(struct net_devi
+@@ -879,67 +946,75 @@
}
static int ixgbe_get_coalesce(struct net_device *netdev,
- ec->rx_coalesce_usecs = adapter->rx_eitr;
- else
- ec->rx_coalesce_usecs = 1000000 / adapter->rx_eitr;
--
++ ec->tx_max_coalesced_frames_irq = adapter->tx_ring[0].work_limit;
+
- if (adapter->tx_eitr < IXGBE_MIN_ITR_USECS)
- ec->tx_coalesce_usecs = adapter->tx_eitr;
- else
- ec->tx_coalesce_usecs = 1000000 / adapter->tx_eitr;
-
- ec->tx_max_coalesced_frames_irq = adapter->tx_ring[0].work_limit;
-+
+- ec->tx_max_coalesced_frames_irq = adapter->tx_ring[0].work_limit;
+ /* only valid if in constant ITR mode */
+ switch (adapter->itr_setting) {
+ case 0:
.get_settings = ixgbe_get_settings,
.set_settings = ixgbe_set_settings,
.get_drvinfo = ixgbe_get_drvinfo,
-@@ -966,7 +1041,7 @@ static struct ethtool_ops ixgbe_ethtool_
+@@ -966,7 +1041,7 @@
.set_tso = ixgbe_set_tso,
.get_strings = ixgbe_get_strings,
.phys_id = ixgbe_phys_id,
.get_ethtool_stats = ixgbe_get_ethtool_stats,
.get_coalesce = ixgbe_get_coalesce,
.set_coalesce = ixgbe_set_coalesce,
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_main.c
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_main.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_main.c
+--- a/drivers/net/ixgbe/ixgbe_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_main.c Wed May 06 16:56:25 2009 +0100
@@ -1,7 +1,7 @@
/*******************************************************************************
char ixgbe_driver_name[] = "ixgbe";
static const char ixgbe_driver_string[] =
- "Intel(R) 10 Gigabit PCI Express Network Driver";
-+ "Intel(R) 10 Gigabit PCI Express Network Driver";
-
+-
-#define DRV_VERSION "1.3.18-k4"
++ "Intel(R) 10 Gigabit PCI Express Network Driver";
++
+#define DRV_VERSION "1.3.30-k2"
const char ixgbe_driver_version[] = DRV_VERSION;
-static const char ixgbe_copyright[] =
};
/* ixgbe_pci_tbl - PCI Device ID Table
-@@ -70,19 +68,29 @@ static struct pci_device_id ixgbe_pci_tb
+@@ -70,9 +68,19 @@
board_82598 },
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_SINGLE_PORT),
board_82598 },
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_CX4),
board_82598 },
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT),
- board_82598 },
++ board_82598 },
+ {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_DA_DUAL_PORT),
+ board_82598 },
+ {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM),
+ {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_XF_LR),
+ board_82598 },
+ {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_SFP_LOM),
-+ board_82598 },
+ board_82598 },
/* required last entry */
- {0, }
+@@ -80,9 +88,9 @@
};
MODULE_DEVICE_TABLE(pci, ixgbe_pci_tbl);
static struct notifier_block dca_notifier = {
.notifier_call = ixgbe_notify_dca,
.next = NULL,
-@@ -104,7 +112,7 @@ static void ixgbe_release_hw_control(str
+@@ -104,7 +112,7 @@
/* Let firmware take over control of h/w */
ctrl_ext = IXGBE_READ_REG(&adapter->hw, IXGBE_CTRL_EXT);
IXGBE_WRITE_REG(&adapter->hw, IXGBE_CTRL_EXT,
}
static void ixgbe_get_hw_control(struct ixgbe_adapter *adapter)
-@@ -114,24 +122,11 @@ static void ixgbe_get_hw_control(struct
+@@ -114,24 +122,11 @@
/* Let firmware know the driver has taken over */
ctrl_ext = IXGBE_READ_REG(&adapter->hw, IXGBE_CTRL_EXT);
IXGBE_WRITE_REG(&adapter->hw, IXGBE_CTRL_EXT,
- struct ixgbe_adapter *adapter = hw->back;
- struct net_device *netdev = adapter->netdev;
- return netdev->name;
-+ ctrl_ext | IXGBE_CTRL_EXT_DRV_LOAD);
- }
+-}
-#endif
++ ctrl_ext | IXGBE_CTRL_EXT_DRV_LOAD);
++}
static void ixgbe_set_ivar(struct ixgbe_adapter *adapter, u16 int_alloc_entry,
- u8 msix_vector)
{
u32 ivar, index;
-@@ -144,13 +139,12 @@ static void ixgbe_set_ivar(struct ixgbe_
+@@ -144,13 +139,12 @@
}
static void ixgbe_unmap_and_free_tx_resource(struct ixgbe_adapter *adapter,
tx_buffer_info->dma = 0;
}
if (tx_buffer_info->skb) {
-@@ -161,107 +155,120 @@ static void ixgbe_unmap_and_free_tx_reso
+@@ -161,107 +155,120 @@
}
static inline bool ixgbe_check_tx_hang(struct ixgbe_adapter *adapter,
- struct ixgbe_ring *tx_ring,
- unsigned int eop,
- union ixgbe_adv_tx_desc *eop_desc)
+-{
+ struct ixgbe_ring *tx_ring,
+ unsigned int eop)
- {
++{
+ struct ixgbe_hw *hw = &adapter->hw;
+ u32 head, tail;
+
**/
static bool ixgbe_clean_tx_irq(struct ixgbe_adapter *adapter,
- struct ixgbe_ring *tx_ring)
-+ struct ixgbe_ring *tx_ring)
- {
+-{
- struct net_device *netdev = adapter->netdev;
- union ixgbe_adv_tx_desc *tx_desc, *eop_desc;
-+ union ixgbe_adv_tx_desc *tx_desc;
- struct ixgbe_tx_buffer *tx_buffer_info;
+- struct ixgbe_tx_buffer *tx_buffer_info;
- unsigned int i, eop;
- bool cleaned = false;
- unsigned int total_tx_bytes = 0, total_tx_packets = 0;
-
++ struct ixgbe_ring *tx_ring)
++{
++ union ixgbe_adv_tx_desc *tx_desc;
++ struct ixgbe_tx_buffer *tx_buffer_info;
+ struct net_device *netdev = adapter->netdev;
+ struct sk_buff *skb;
+ unsigned int i;
tx_desc = IXGBE_TX_DESC_ADV(*tx_ring, i);
tx_buffer_info = &tx_ring->tx_buffer_info[i];
- cleaned = (i == eop);
-+ skb = tx_buffer_info->skb;
-
+-
- tx_ring->stats.bytes += tx_buffer_info->length;
- if (cleaned) {
- struct sk_buff *skb = tx_buffer_info->skb;
++ skb = tx_buffer_info->skb;
++
+ if (skb) {
unsigned int segs, bytecount;
+
- skb->len;
- total_tx_packets += segs;
- total_tx_bytes += bytecount;
+- }
+ skb->len;
+ total_packets += segs;
+ total_bytes += bytecount;
- }
++ }
+
ixgbe_unmap_and_free_tx_resource(adapter,
- tx_buffer_info);
if (i == tx_ring->count)
i = 0;
- }
-
+-
- tx_ring->stats.packets++;
-
- eop = tx_ring->tx_buffer_info[i].next_to_watch;
- if (total_tx_packets >= tx_ring->work_limit)
- break;
- }
+-
++
+ count++;
+ if (count == tx_ring->count)
+ goto done_cleaning;
+ if (head == oldhead)
+ goto done_cleaning;
+ } /* while (1) */
-
++
+done_cleaning:
tx_ring->next_to_clean = i;
/* Make sure that anybody stopping the queue after this
* sees the new next_to_clean.
*/
-@@ -269,59 +276,68 @@ static bool ixgbe_clean_tx_irq(struct ix
+@@ -269,59 +276,68 @@
if (__netif_subqueue_stopped(netdev, tx_ring->queue_index) &&
!test_bit(__IXGBE_DOWN, &adapter->state)) {
netif_wake_subqueue(netdev, tx_ring->queue_index);
- adapter->restart_queue++;
-+ ++adapter->restart_queue;
- }
- }
-
+- }
+- }
+-
- if (adapter->detect_tx_hung)
- if (ixgbe_check_tx_hang(adapter, tx_ring, eop, eop_desc))
- netif_stop_subqueue(netdev, tx_ring->queue_index);
-
- if (total_tx_packets >= tx_ring->work_limit)
- IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, tx_ring->eims_value);
+-
+- tx_ring->total_bytes += total_tx_bytes;
+- tx_ring->total_packets += total_tx_packets;
+- adapter->net_stats.tx_bytes += total_tx_bytes;
+- adapter->net_stats.tx_packets += total_tx_packets;
+- cleaned = total_tx_packets ? true : false;
+- return cleaned;
+-}
+-
+-#ifdef CONFIG_DCA
++ ++adapter->restart_queue;
++ }
++ }
++
+ if (adapter->detect_tx_hung) {
+ if (ixgbe_check_tx_hang(adapter, tx_ring, i)) {
+ /* schedule immediate reset if we believe we hung */
+ ixgbe_tx_timeout(adapter->netdev);
+ }
+ }
-
-- tx_ring->total_bytes += total_tx_bytes;
-- tx_ring->total_packets += total_tx_packets;
-- adapter->net_stats.tx_bytes += total_tx_bytes;
-- adapter->net_stats.tx_packets += total_tx_packets;
-- cleaned = total_tx_packets ? true : false;
-- return cleaned;
++
+ /* re-arm the interrupt */
+ if ((total_packets >= tx_ring->work_limit) ||
+ (count == tx_ring->count))
+ adapter->net_stats.tx_bytes += total_bytes;
+ adapter->net_stats.tx_packets += total_packets;
+ return (total_packets ? true : false);
- }
-
--#ifdef CONFIG_DCA
++}
++
+#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
static void ixgbe_update_rx_dca(struct ixgbe_adapter *adapter,
- struct ixgbe_ring *rxr)
u32 rxctrl;
int cpu = get_cpu();
- int q = rxr - adapter->rx_ring;
-+ int q = rx_ring - adapter->rx_ring;
-
+-
- if (rxr->cpu != cpu) {
++ int q = rx_ring - adapter->rx_ring;
++
+ if (rx_ring->cpu != cpu) {
rxctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_DCA_RXCTRL(q));
rxctrl &= ~IXGBE_DCA_RXCTRL_CPUID_MASK;
u32 txctrl;
int cpu = get_cpu();
- int q = txr - adapter->tx_ring;
-+ int q = tx_ring - adapter->tx_ring;
-
+-
- if (txr->cpu != cpu) {
++ int q = tx_ring - adapter->tx_ring;
++
+ if (tx_ring->cpu != cpu) {
txctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_DCA_TXCTRL(q));
txctrl &= ~IXGBE_DCA_TXCTRL_CPUID_MASK;
}
put_cpu();
}
-@@ -351,11 +367,14 @@ static int __ixgbe_notify_dca(struct dev
+@@ -351,11 +367,14 @@
switch (event) {
case DCA_PROVIDER_ADD:
ixgbe_setup_dca(adapter);
break;
}
-@@ -372,7 +391,7 @@ static int __ixgbe_notify_dca(struct dev
+@@ -372,7 +391,7 @@
return 0;
}
/**
* ixgbe_receive_skb - Send a completed packet up the stack
* @adapter: board private structure
-@@ -382,16 +401,17 @@ static int __ixgbe_notify_dca(struct dev
+@@ -382,16 +401,17 @@
* @rx_desc: rx descriptor
**/
static void ixgbe_receive_skb(struct ixgbe_adapter *adapter,
lro_vlan_hwaccel_receive_skb(&ring->lro_mgr, skb,
adapter->vlgrp, tag,
rx_desc);
-@@ -399,18 +419,21 @@ static void ixgbe_receive_skb(struct ixg
+@@ -399,18 +419,21 @@
lro_receive_skb(&ring->lro_mgr, skb, rx_desc);
ring->lro_used = true;
} else {
else
netif_rx(skb);
}
+- }
+#ifdef CONFIG_IXGBE_LRO
- }
++ }
+#endif
}
/**
-@@ -420,14 +443,12 @@ static void ixgbe_receive_skb(struct ixg
+@@ -420,14 +443,12 @@
* @skb: skb currently being received and modified
**/
static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter,
return;
/* if IP and error */
-@@ -455,37 +476,45 @@ static inline void ixgbe_rx_checksum(str
+@@ -455,37 +476,45 @@
* @adapter: address of board private structure
**/
static void ixgbe_alloc_rx_buffers(struct ixgbe_adapter *adapter,
- struct ixgbe_ring *rx_ring,
- int cleaned_count)
+-{
+- struct net_device *netdev = adapter->netdev;
+- struct pci_dev *pdev = adapter->pdev;
+ struct ixgbe_ring *rx_ring,
+ int cleaned_count)
- {
-- struct net_device *netdev = adapter->netdev;
- struct pci_dev *pdev = adapter->pdev;
++{
++ struct pci_dev *pdev = adapter->pdev;
+ struct net_device *netdev = adapter->netdev;
union ixgbe_adv_rx_desc *rx_desc;
- struct ixgbe_rx_buffer *rx_buffer_info;
- struct sk_buff *skb;
-+ struct ixgbe_rx_buffer *bi;
- unsigned int i;
+- unsigned int i;
- unsigned int bufsz = adapter->rx_buf_len + NET_IP_ALIGN;
++ struct ixgbe_rx_buffer *bi;
++ unsigned int i;
+ unsigned int bufsz = rx_ring->rx_buf_len + NET_IP_ALIGN;
i = rx_ring->next_to_use;
- if (!rx_buffer_info->page) {
- adapter->alloc_rx_page_failed++;
- goto no_buffers;
+- }
+- rx_buffer_info->page_dma =
+- pci_map_page(pdev, rx_buffer_info->page,
+- 0, PAGE_SIZE, PCI_DMA_FROMDEVICE);
+- }
+-
+- if (!rx_buffer_info->skb) {
+- skb = netdev_alloc_skb(netdev, bufsz);
+ if (!bi->page_dma &&
+ (adapter->flags & IXGBE_FLAG_RX_PS_ENABLED)) {
+ if (!bi->page) {
+ } else {
+ /* use a half page if we're re-using */
+ bi->page_offset ^= (PAGE_SIZE / 2);
- }
-- rx_buffer_info->page_dma =
-- pci_map_page(pdev, rx_buffer_info->page,
-- 0, PAGE_SIZE, PCI_DMA_FROMDEVICE);
++ }
+
+ bi->page_dma = pci_map_page(pdev, bi->page,
+ bi->page_offset,
+ (PAGE_SIZE / 2),
+ PCI_DMA_FROMDEVICE);
- }
-
-- if (!rx_buffer_info->skb) {
-- skb = netdev_alloc_skb(netdev, bufsz);
++ }
++
+ if (!bi->skb) {
+ struct sk_buff *skb = netdev_alloc_skb(adapter->netdev,
+ bufsz);
if (!skb) {
adapter->alloc_rx_buff_failed++;
-@@ -499,28 +528,25 @@ static void ixgbe_alloc_rx_buffers(struc
+@@ -499,28 +528,25 @@
*/
skb_reserve(skb, NET_IP_ALIGN);
- cpu_to_le64(rx_buffer_info->page_dma);
- rx_desc->read.hdr_addr =
- cpu_to_le64(rx_buffer_info->dma);
-+ rx_desc->read.pkt_addr = cpu_to_le64(bi->page_dma);
-+ rx_desc->read.hdr_addr = cpu_to_le64(bi->dma);
- } else {
+- } else {
- rx_desc->read.pkt_addr =
- cpu_to_le64(rx_buffer_info->dma);
++ rx_desc->read.pkt_addr = cpu_to_le64(bi->page_dma);
++ rx_desc->read.hdr_addr = cpu_to_le64(bi->dma);
++ } else {
+ rx_desc->read.pkt_addr = cpu_to_le64(bi->dma);
}
if (i == rx_ring->count)
i = 0;
- rx_buffer_info = &rx_ring->rx_buffer_info[i];
+- }
+ bi = &rx_ring->rx_buffer_info[i];
- }
++ }
+
no_buffers:
if (rx_ring->next_to_use != i) {
rx_ring->next_to_use = i;
-@@ -538,46 +564,54 @@ no_buffers:
+@@ -538,46 +564,54 @@
}
}
static bool ixgbe_clean_rx_irq(struct ixgbe_adapter *adapter,
- struct ixgbe_ring *rx_ring,
- int *work_done, int work_to_do)
+-{
+- struct net_device *netdev = adapter->netdev;
+ struct ixgbe_ring *rx_ring,
+ int *work_done, int work_to_do)
- {
-- struct net_device *netdev = adapter->netdev;
++{
struct pci_dev *pdev = adapter->pdev;
union ixgbe_adv_rx_desc *rx_desc, *next_rxd;
struct ixgbe_rx_buffer *rx_buffer_info, *next_buffer;
cleaned = true;
skb = rx_buffer_info->skb;
-@@ -586,22 +620,26 @@ static bool ixgbe_clean_rx_irq(struct ix
+@@ -586,22 +620,26 @@
if (len && !skb_shinfo(skb)->nr_frags) {
pci_unmap_single(pdev, rx_buffer_info->dma,
}
i++;
-@@ -620,6 +658,7 @@ static bool ixgbe_clean_rx_irq(struct ix
+@@ -620,6 +658,7 @@
rx_buffer_info->skb = next_buffer->skb;
rx_buffer_info->dma = next_buffer->dma;
next_buffer->skb = skb;
adapter->non_eop_descs++;
goto next_desc;
}
-@@ -635,9 +674,9 @@ static bool ixgbe_clean_rx_irq(struct ix
+@@ -635,9 +674,9 @@
total_rx_bytes += skb->len;
total_rx_packets++;
next_desc:
rx_desc->wb.upper.status_error = 0;
-@@ -655,10 +694,12 @@ next_desc:
+@@ -655,19 +694,18 @@
staterr = le32_to_cpu(rx_desc->wb.upper.status_error);
}
rx_ring->next_to_clean = i;
cleaned_count = IXGBE_DESC_UNUSED(rx_ring);
-@@ -666,9 +707,6 @@ next_desc:
+
if (cleaned_count)
ixgbe_alloc_rx_buffers(adapter, rx_ring, cleaned_count);
-
+-
- adapter->net_stats.rx_bytes += total_rx_bytes;
- adapter->net_stats.rx_packets += total_rx_packets;
--
+
rx_ring->total_packets += total_rx_packets;
rx_ring->total_bytes += total_rx_bytes;
- adapter->net_stats.rx_bytes += total_rx_bytes;
-@@ -700,43 +738,43 @@ static void ixgbe_configure_msix(struct
+@@ -700,43 +738,43 @@
q_vector = &adapter->q_vector[v_idx];
/* XXX for_each_bit(...) */
r_idx = find_first_bit(q_vector->rxr_idx,
r_idx = find_next_bit(q_vector->txr_idx,
- adapter->num_tx_queues,
- r_idx + 1);
+- }
+-
+- /* if this is a tx only vector use half the irq (tx) rate */
+ adapter->num_tx_queues,
+ r_idx + 1);
- }
-
-- /* if this is a tx only vector use half the irq (tx) rate */
++ }
++
+ /* if this is a tx only vector halve the interrupt rate */
if (q_vector->txr_count && !q_vector->rxr_count)
- q_vector->eitr = adapter->tx_eitr;
IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIAC, mask);
}
-@@ -766,8 +804,8 @@ enum latency_range {
+@@ -766,8 +804,8 @@
* parameter (see ixgbe_param.c)
**/
static u8 ixgbe_update_itr(struct ixgbe_adapter *adapter,
{
unsigned int retval = itr_setting;
u32 timepassed_us;
-@@ -814,40 +852,40 @@ static void ixgbe_set_itr_msix(struct ix
+@@ -814,40 +852,40 @@
u32 new_itr;
u8 current_itr, ret_itr;
int i, r_idx, v_idx = ((void *)q_vector - (void *)(adapter->q_vector)) /
+ q_vector->rx_itr - 1 : ret_itr);
r_idx = find_next_bit(q_vector->rxr_idx, adapter->num_rx_queues,
- r_idx + 1);
-+ r_idx + 1);
- }
-
+- }
+-
- current_itr = max(q_vector->rx_eitr, q_vector->tx_eitr);
++ r_idx + 1);
++ }
++
+ current_itr = max(q_vector->rx_itr, q_vector->tx_itr);
switch (current_itr) {
/* counts and packets in update_itr are dependent on these numbers */
-@@ -871,13 +909,38 @@ static void ixgbe_set_itr_msix(struct ix
+@@ -871,13 +909,38 @@
itr_reg = EITR_INTS_PER_SEC_TO_REG(new_itr);
/* must write high and low 16 bits to reset counter */
DPRINTK(TX_ERR, DEBUG, "writing eitr(%d): %08X\n", v_idx,
static irqreturn_t ixgbe_msix_lsc(int irq, void *data)
{
struct net_device *netdev = data;
-@@ -885,11 +948,10 @@ static irqreturn_t ixgbe_msix_lsc(int ir
+@@ -885,11 +948,10 @@
struct ixgbe_hw *hw = &adapter->hw;
u32 eicr = IXGBE_READ_REG(hw, IXGBE_EICR);
if (!test_bit(__IXGBE_DOWN, &adapter->state))
IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EIMS_OTHER);
-@@ -901,7 +963,7 @@ static irqreturn_t ixgbe_msix_clean_tx(i
+@@ -901,7 +963,7 @@
{
struct ixgbe_q_vector *q_vector = data;
struct ixgbe_adapter *adapter = q_vector->adapter;
int i, r_idx;
if (!q_vector->txr_count)
-@@ -909,16 +971,16 @@ static irqreturn_t ixgbe_msix_clean_tx(i
+@@ -909,16 +971,16 @@
r_idx = find_first_bit(q_vector->txr_idx, adapter->num_tx_queues);
for (i = 0; i < q_vector->txr_count; i++) {
+#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
- ixgbe_update_tx_dca(adapter, txr);
-+ ixgbe_update_tx_dca(adapter, tx_ring);
- #endif
+-#endif
- txr->total_bytes = 0;
- txr->total_packets = 0;
- ixgbe_clean_tx_irq(adapter, txr);
++ ixgbe_update_tx_dca(adapter, tx_ring);
++#endif
+ tx_ring->total_bytes = 0;
+ tx_ring->total_packets = 0;
+ ixgbe_clean_tx_irq(adapter, tx_ring);
}
return IRQ_HANDLED;
-@@ -933,18 +995,26 @@ static irqreturn_t ixgbe_msix_clean_rx(i
+@@ -933,18 +995,26 @@
{
struct ixgbe_q_vector *q_vector = data;
struct ixgbe_adapter *adapter = q_vector->adapter;
- struct ixgbe_ring *rxr;
+ struct ixgbe_ring *rx_ring;
int r_idx;
+-
+- r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues);
+ int i;
-
- r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues);
++
++ r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues);
+ for (i = 0; i < q_vector->rxr_count; i++) {
+ rx_ring = &(adapter->rx_ring[r_idx]);
+ rx_ring->total_bytes = 0;
netif_rx_schedule(adapter->netdev, &q_vector->napi);
return IRQ_HANDLED;
-@@ -963,39 +1033,90 @@ static irqreturn_t ixgbe_msix_clean_many
+@@ -963,39 +1033,90 @@
* @napi: napi struct with our devices info in it
* @budget: amount of work driver is allowed to do this pass, in packets
*
+#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
- ixgbe_update_rx_dca(adapter, rxr);
-+ ixgbe_update_rx_dca(adapter, rx_ring);
- #endif
-
+-#endif
+-
- ixgbe_clean_rx_irq(adapter, rxr, &work_done, budget);
++ ixgbe_update_rx_dca(adapter, rx_ring);
++#endif
++
+ ixgbe_clean_rx_irq(adapter, rx_ring, &work_done, budget);
/* If all Rx work done, exit the polling mode */
{
a->q_vector[v_idx].adapter = a;
set_bit(r_idx, a->q_vector[v_idx].rxr_idx);
-@@ -1004,7 +1125,7 @@ static inline void map_vector_to_rxq(str
+@@ -1004,7 +1125,7 @@
}
static inline void map_vector_to_txq(struct ixgbe_adapter *a, int v_idx,
{
a->q_vector[v_idx].adapter = a;
set_bit(r_idx, a->q_vector[v_idx].txr_idx);
-@@ -1024,7 +1145,7 @@ static inline void map_vector_to_txq(str
+@@ -1024,7 +1145,7 @@
* mapping configurations in here.
**/
static int ixgbe_map_rings_to_vectors(struct ixgbe_adapter *adapter,
{
int v_start = 0;
int rxr_idx = 0, txr_idx = 0;
-@@ -1101,28 +1222,28 @@ static int ixgbe_request_msix_irqs(struc
+@@ -1101,28 +1222,28 @@
goto out;
#define SET_HANDLER(_v) ((!(_v)->rxr_count) ? &ixgbe_msix_clean_tx : \
if (err) {
DPRINTK(PROBE, ERR,
"request_irq for msix_lsc failed: %d\n", err);
-@@ -1134,7 +1255,7 @@ static int ixgbe_request_msix_irqs(struc
+@@ -1134,7 +1255,7 @@
free_queue_irqs:
for (i = vector - 1; i >= 0; i--)
free_irq(adapter->msix_entries[--vector].vector,
adapter->flags &= ~IXGBE_FLAG_MSIX_ENABLED;
pci_disable_msix(adapter->pdev);
kfree(adapter->msix_entries);
-@@ -1152,16 +1273,16 @@ static void ixgbe_set_itr(struct ixgbe_a
+@@ -1152,16 +1273,16 @@
struct ixgbe_ring *rx_ring = &adapter->rx_ring[0];
struct ixgbe_ring *tx_ring = &adapter->tx_ring[0];
- q_vector->rx_eitr,
- rx_ring->total_packets,
- rx_ring->total_bytes);
+-
+- current_itr = max(q_vector->rx_eitr, q_vector->tx_eitr);
+ q_vector->tx_itr = ixgbe_update_itr(adapter, new_itr,
+ q_vector->tx_itr,
+ tx_ring->total_packets,
+ q_vector->rx_itr,
+ rx_ring->total_packets,
+ rx_ring->total_bytes);
-
-- current_itr = max(q_vector->rx_eitr, q_vector->tx_eitr);
++
+ current_itr = max(q_vector->rx_itr, q_vector->tx_itr);
switch (current_itr) {
/* counts and packets in update_itr are dependent on these numbers */
-@@ -1206,19 +1327,21 @@ static irqreturn_t ixgbe_intr(int irq, v
+@@ -1206,19 +1327,21 @@
struct ixgbe_hw *hw = &adapter->hw;
u32 eicr;
- adapter->lsc_int++;
- if (!test_bit(__IXGBE_DOWN, &adapter->state))
- mod_timer(&adapter->watchdog_timer, jiffies);
- }
-
+- }
+-
++ }
++
+ if (eicr & IXGBE_EICR_LSC)
+ ixgbe_check_lsc(adapter);
+
if (netif_rx_schedule_prep(netdev, &adapter->q_vector[0].napi)) {
adapter->tx_ring[0].total_packets = 0;
-@@ -1261,10 +1384,10 @@ static int ixgbe_request_irq(struct ixgb
+@@ -1261,10 +1384,10 @@
err = ixgbe_request_msix_irqs(adapter);
} else if (adapter->flags & IXGBE_FLAG_MSI_ENABLED) {
err = request_irq(adapter->pdev->irq, &ixgbe_intr, 0,
}
if (err)
-@@ -1288,7 +1411,7 @@ static void ixgbe_free_irq(struct ixgbe_
+@@ -1288,7 +1411,7 @@
i--;
for (; i >= 0; i--) {
free_irq(adapter->msix_entries[i].vector,
}
ixgbe_reset_q_vectors(adapter);
-@@ -1322,6 +1445,8 @@ static inline void ixgbe_irq_enable(stru
+@@ -1322,6 +1445,8 @@
{
u32 mask;
mask = IXGBE_EIMS_ENABLE_MASK;
IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask);
IXGBE_WRITE_FLUSH(&adapter->hw);
}
-@@ -1335,7 +1460,7 @@ static void ixgbe_configure_msi_and_lega
+@@ -1335,7 +1460,7 @@
struct ixgbe_hw *hw = &adapter->hw;
IXGBE_WRITE_REG(hw, IXGBE_EITR(0),
ixgbe_set_ivar(adapter, IXGBE_IVAR_RX_QUEUE(0), 0);
ixgbe_set_ivar(adapter, IXGBE_IVAR_TX_QUEUE(0), 0);
-@@ -1347,26 +1472,31 @@ static void ixgbe_configure_msi_and_lega
+@@ -1347,26 +1472,31 @@
}
/**
IXGBE_WRITE_REG(hw, IXGBE_TDLEN(j), tdlen);
IXGBE_WRITE_REG(hw, IXGBE_TDH(j), 0);
IXGBE_WRITE_REG(hw, IXGBE_TDT(j), 0);
-@@ -1375,20 +1505,66 @@ static void ixgbe_configure_tx(struct ix
+@@ -1375,20 +1505,66 @@
/* Disable Tx Head Writeback RO bit, since this hoses
* bookkeeping if things aren't delivered in order.
*/
+ txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(j));
txctrl &= ~IXGBE_DCA_TXCTRL_TX_WB_RO_EN;
- IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(i), txctrl);
-+ IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(j), txctrl);
- }
- }
-
+- }
+-}
+-
-#define PAGE_USE_COUNT(S) (((S) >> PAGE_SHIFT) + \
- (((S) & (PAGE_SIZE - 1)) ? 1 : 0))
+-
+-#define IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT 2
++ IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(j), txctrl);
++ }
++}
++
+#define IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT 2
+
+static void ixgbe_configure_srrctl(struct ixgbe_adapter *adapter, int index)
+ rx_ring = &adapter->rx_ring[queue0];
+
+ srrctl = IXGBE_READ_REG(&adapter->hw, IXGBE_SRRCTL(index));
-
--#define IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT 2
++
+ srrctl &= ~IXGBE_SRRCTL_BSIZEHDR_MASK;
+ srrctl &= ~IXGBE_SRRCTL_BSIZEPKT_MASK;
+
* @tcph: pointer to tcp header structure
* @hdr_flags: pointer to header flags
* @priv: private data
-@@ -1399,8 +1575,8 @@ static int ixgbe_get_skb_hdr(struct sk_b
+@@ -1399,8 +1575,8 @@
union ixgbe_adv_rx_desc *rx_desc = priv;
/* Verify that this is a valid IPv4 TCP packet */
return -1;
/* Set network headers */
-@@ -1412,8 +1588,12 @@ static int ixgbe_get_skb_hdr(struct sk_b
+@@ -1412,8 +1588,12 @@
return 0;
}
+-/**
+- * ixgbe_configure_rx - Configure 8254x Receive Unit after Reset
+#endif /* CONFIG_IXGBE_LRO */
+#define PAGE_USE_COUNT(S) (((S) >> PAGE_SHIFT) + \
+ (((S) & (PAGE_SIZE - 1)) ? 1 : 0))
+
- /**
-- * ixgbe_configure_rx - Configure 8254x Receive Unit after Reset
++/**
+ * ixgbe_configure_rx - Configure 8259x Receive Unit after Reset
* @adapter: board private structure
*
* Configure the Rx unit of the MAC after a reset.
-@@ -1426,25 +1606,26 @@ static void ixgbe_configure_rx(struct ix
+@@ -1426,25 +1606,26 @@
int max_frame = netdev->mtu + ETH_HLEN + ETH_FCS_LEN;
int i, j;
u32 rdlen, rxctrl, rxcsum;
}
fctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_FCTRL);
-@@ -1461,28 +1642,6 @@ static void ixgbe_configure_rx(struct ix
+@@ -1461,28 +1642,6 @@
pages = PAGE_USE_COUNT(adapter->netdev->mtu);
rdlen = adapter->rx_ring[0].count * sizeof(union ixgbe_adv_rx_desc);
/* disable receives while setting up the descriptors */
rxctrl = IXGBE_READ_REG(hw, IXGBE_RXCTRL);
-@@ -1492,25 +1651,47 @@ static void ixgbe_configure_rx(struct ix
+@@ -1492,25 +1651,47 @@
* the Base and Length of the Rx Descriptor Ring */
for (i = 0; i < adapter->num_rx_queues; i++) {
rdba = adapter->rx_ring[i].dma;
if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) {
/* Fill out redirection table */
-@@ -1525,22 +1706,20 @@ static void ixgbe_configure_rx(struct ix
+@@ -1525,22 +1706,20 @@
}
/* Fill out hash function seeds */
IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc);
}
-@@ -1562,7 +1741,7 @@ static void ixgbe_configure_rx(struct ix
+@@ -1562,7 +1741,7 @@
}
static void ixgbe_vlan_rx_register(struct net_device *netdev,
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
u32 ctrl;
-@@ -1571,6 +1750,16 @@ static void ixgbe_vlan_rx_register(struc
+@@ -1570,6 +1749,16 @@
+ if (!test_bit(__IXGBE_DOWN, &adapter->state))
ixgbe_irq_disable(adapter);
adapter->vlgrp = grp;
-
++
+ /*
+ * For a DCB driver, always enable VLAN tag stripping so we can
+ * still receive traffic from a DCB-enabled host even if we're
+ ctrl |= IXGBE_VLNCTRL_VME;
+ ctrl &= ~IXGBE_VLNCTRL_CFIEN;
+ IXGBE_WRITE_REG(&adapter->hw, IXGBE_VLNCTRL, ctrl);
-+
+
if (grp) {
/* enable VLAN tag insert/strip */
- ctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_VLNCTRL);
-@@ -1586,14 +1775,16 @@ static void ixgbe_vlan_rx_register(struc
+@@ -1586,14 +1775,16 @@
static void ixgbe_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
if (!test_bit(__IXGBE_DOWN, &adapter->state))
ixgbe_irq_disable(adapter);
-@@ -1604,7 +1795,7 @@ static void ixgbe_vlan_rx_kill_vid(struc
+@@ -1604,7 +1795,7 @@
ixgbe_irq_enable(adapter);
/* remove VID from filter table */
}
static void ixgbe_restore_vlan(struct ixgbe_adapter *adapter)
-@@ -1621,23 +1812,37 @@ static void ixgbe_restore_vlan(struct ix
+@@ -1621,23 +1812,37 @@
}
}
+-/**
+- * ixgbe_set_multi - Multicast and Promiscuous mode set
+- * @netdev: network interface device structure
+- *
+- * The set_multi entry point is called whenever the multicast address
+- * list or the network interface flags are updated. This routine is
+- * responsible for configuring the hardware for proper multicast,
+- * promiscuous mode, and all-multi behavior.
+- **/
+-static void ixgbe_set_multi(struct net_device *netdev)
+-{
+- struct ixgbe_adapter *adapter = netdev_priv(netdev);
+- struct ixgbe_hw *hw = &adapter->hw;
+static u8 *ixgbe_addr_list_itr(struct ixgbe_hw *hw, u8 **mc_addr_ptr, u32 *vmdq)
+{
-+ struct dev_mc_list *mc_ptr;
+ struct dev_mc_list *mc_ptr;
+- u8 *mta_list;
+ u8 *addr = *mc_addr_ptr;
+ *vmdq = 0;
+
+ return addr;
+}
+
- /**
-- * ixgbe_set_multi - Multicast and Promiscuous mode set
++/**
+ * ixgbe_set_rx_mode - Unicast, Multicast and Promiscuous mode set
- * @netdev: network interface device structure
- *
-- * The set_multi entry point is called whenever the multicast address
-- * list or the network interface flags are updated. This routine is
-- * responsible for configuring the hardware for proper multicast,
-- * promiscuous mode, and all-multi behavior.
++ * @netdev: network interface device structure
++ *
+ * The set_rx_method entry point is called whenever the unicast/multicast
+ * address list or the network interface flags are updated. This routine is
+ * responsible for configuring the hardware for proper unicast, multicast and
+ * promiscuous mode.
- **/
--static void ixgbe_set_multi(struct net_device *netdev)
++ **/
+static void ixgbe_set_rx_mode(struct net_device *netdev)
- {
- struct ixgbe_adapter *adapter = netdev_priv(netdev);
- struct ixgbe_hw *hw = &adapter->hw;
-- struct dev_mc_list *mc_ptr;
-- u8 *mta_list;
++{
++ struct ixgbe_adapter *adapter = netdev_priv(netdev);
++ struct ixgbe_hw *hw = &adapter->hw;
u32 fctrl, vlnctrl;
- int i;
+ u8 *addr_list = NULL;
/* Check for Promiscuous and All Multicast modes */
-@@ -1645,6 +1850,7 @@ static void ixgbe_set_multi(struct net_d
+@@ -1645,6 +1850,7 @@
vlnctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
if (netdev->flags & IFF_PROMISC) {
fctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
vlnctrl &= ~IXGBE_VLNCTRL_VFE;
} else {
-@@ -1655,33 +1861,25 @@ static void ixgbe_set_multi(struct net_d
+@@ -1655,33 +1861,25 @@
fctrl &= ~(IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
}
vlnctrl |= IXGBE_VLNCTRL_VFE;
}
static void ixgbe_napi_enable_all(struct ixgbe_adapter *adapter)
-@@ -1695,10 +1893,16 @@ static void ixgbe_napi_enable_all(struct
+@@ -1695,10 +1893,16 @@
q_vectors = 1;
for (q_idx = 0; q_idx < q_vectors; q_idx++) {
}
}
-@@ -1720,20 +1924,69 @@ static void ixgbe_napi_disable_all(struc
+@@ -1720,20 +1924,69 @@
}
}
}
static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
-@@ -1751,7 +2004,7 @@ static int ixgbe_up_complete(struct ixgb
+@@ -1751,7 +2004,7 @@
(adapter->flags & IXGBE_FLAG_MSI_ENABLED)) {
if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
gpie = (IXGBE_GPIE_MSIX_MODE | IXGBE_GPIE_EIAME |
} else {
/* MSI only */
gpie = 0;
-@@ -1767,6 +2020,13 @@ static int ixgbe_up_complete(struct ixgb
+@@ -1767,6 +2020,13 @@
IXGBE_WRITE_REG(hw, IXGBE_EIAM, IXGBE_EICS_RTX_QUEUE);
}
mhadd = IXGBE_READ_REG(hw, IXGBE_MHADD);
if (max_frame != (mhadd >> IXGBE_MHADD_MFS_SHIFT)) {
mhadd &= ~IXGBE_MHADD_MFS_MASK;
-@@ -1778,6 +2038,8 @@ static int ixgbe_up_complete(struct ixgb
+@@ -1778,6 +2038,8 @@
for (i = 0; i < adapter->num_tx_queues; i++) {
j = adapter->tx_ring[i].reg_idx;
txdctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(j));
txdctl |= IXGBE_TXDCTL_ENABLE;
IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(j), txdctl);
}
-@@ -1812,6 +2074,8 @@ static int ixgbe_up_complete(struct ixgb
+@@ -1812,6 +2074,8 @@
/* bring the link up in the watchdog, this could race with our first
* link up interrupt but shouldn't be a problem */
mod_timer(&adapter->watchdog_timer, jiffies);
return 0;
}
-@@ -1836,50 +2100,14 @@ int ixgbe_up(struct ixgbe_adapter *adapt
+@@ -1836,50 +2100,14 @@
void ixgbe_reset(struct ixgbe_adapter *adapter)
{
- if (err)
- return err;
- }
-+ hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
-
+-
- ixgbe_reset(adapter);
-
- if (netif_running(netdev))
- netif_device_attach(netdev);
-
- return 0;
- }
+-}
-#endif
++ hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
++
++}
/**
* ixgbe_clean_rx_ring - Free Rx Buffers per Queue
-@@ -1887,7 +2115,7 @@ static int ixgbe_resume(struct pci_dev *
+@@ -1887,7 +2115,7 @@
* @rx_ring: ring to free buffers from
**/
static void ixgbe_clean_rx_ring(struct ixgbe_adapter *adapter,
{
struct pci_dev *pdev = adapter->pdev;
unsigned long size;
-@@ -1901,8 +2129,8 @@ static void ixgbe_clean_rx_ring(struct i
+@@ -1901,8 +2129,8 @@
rx_buffer_info = &rx_ring->rx_buffer_info[i];
if (rx_buffer_info->dma) {
pci_unmap_single(pdev, rx_buffer_info->dma,
rx_buffer_info->dma = 0;
}
if (rx_buffer_info->skb) {
-@@ -1911,12 +2139,12 @@ static void ixgbe_clean_rx_ring(struct i
+@@ -1911,12 +2139,12 @@
}
if (!rx_buffer_info->page)
continue;
}
size = sizeof(struct ixgbe_rx_buffer) * rx_ring->count;
-@@ -1938,7 +2166,7 @@ static void ixgbe_clean_rx_ring(struct i
+@@ -1938,7 +2166,7 @@
* @tx_ring: ring to be cleaned
**/
static void ixgbe_clean_tx_ring(struct ixgbe_adapter *adapter,
{
struct ixgbe_tx_buffer *tx_buffer_info;
unsigned long size;
-@@ -1991,75 +2219,64 @@ static void ixgbe_clean_all_tx_rings(str
+@@ -1991,75 +2219,64 @@
void ixgbe_down(struct ixgbe_adapter *adapter)
{
struct net_device *netdev = adapter->netdev;
+ IXGBE_WRITE_FLUSH(hw);
msleep(10);
-- ixgbe_irq_disable(adapter);
+ netif_tx_stop_all_queues(netdev);
+
-+ ixgbe_irq_disable(adapter);
+ ixgbe_irq_disable(adapter);
ixgbe_napi_disable_all(adapter);
+
netif_carrier_off(netdev);
- netif_tx_stop_all_queues(netdev);
-
+-
++
+#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
+ if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
+ adapter->flags &= ~IXGBE_FLAG_DCA_ENABLED;
- if (netif_running(netdev)) {
- ixgbe_down(adapter);
- ixgbe_free_irq(adapter);
-+#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
-+ /* since we reset the hardware DCA settings were cleared */
-+ if (dca_add_requester(&adapter->pdev->dev) == 0) {
-+ adapter->flags |= IXGBE_FLAG_DCA_ENABLED;
-+ /* always use CB2 mode, difference is masked
-+ * in the CB driver */
-+ IXGBE_WRITE_REG(hw, IXGBE_DCA_CTRL, 2);
-+ ixgbe_setup_dca(adapter);
- }
+- }
-
-#ifdef CONFIG_PM
- retval = pci_save_state(pdev);
- if (retval)
- return retval;
- #endif
+-#endif
-
- pci_enable_wake(pdev, PCI_D3hot, 0);
- pci_enable_wake(pdev, PCI_D3cold, 0);
-static void ixgbe_shutdown(struct pci_dev *pdev)
-{
- ixgbe_suspend(pdev, PMSG_SUSPEND);
++#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
++ /* since we reset the hardware DCA settings were cleared */
++ if (dca_add_requester(&adapter->pdev->dev) == 0) {
++ adapter->flags |= IXGBE_FLAG_DCA_ENABLED;
++ /* always use CB2 mode, difference is masked
++ * in the CB driver */
++ IXGBE_WRITE_REG(hw, IXGBE_DCA_CTRL, 2);
++ ixgbe_setup_dca(adapter);
++ }
++#endif
}
/**
-@@ -2072,11 +2289,11 @@ static void ixgbe_shutdown(struct pci_de
+@@ -2072,11 +2289,11 @@
static int ixgbe_poll(struct napi_struct *napi, int budget)
{
struct ixgbe_q_vector *q_vector = container_of(napi,
+ struct ixgbe_q_vector, napi);
struct ixgbe_adapter *adapter = q_vector->adapter;
- int tx_cleaned = 0, work_done = 0;
-+ int tx_cleaned, work_done = 0;
-
+-
-#ifdef CONFIG_DCA
++ int tx_cleaned, work_done = 0;
++
+#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
ixgbe_update_tx_dca(adapter, adapter->tx_ring);
ixgbe_update_rx_dca(adapter, adapter->rx_ring);
-@@ -2092,12 +2309,11 @@ static int ixgbe_poll(struct napi_struct
+@@ -2092,12 +2309,11 @@
/* If budget not fully consumed, exit the polling mode */
if (work_done < budget) {
netif_rx_complete(adapter->netdev, napi);
return work_done;
}
-@@ -2118,13 +2334,82 @@ static void ixgbe_reset_task(struct work
+@@ -2118,13 +2334,82 @@
struct ixgbe_adapter *adapter;
adapter = container_of(work, struct ixgbe_adapter, reset_task);
{
int err, vector_threshold;
-@@ -2143,7 +2428,7 @@ static void ixgbe_acquire_msix_vectors(s
+@@ -2143,7 +2428,7 @@
*/
while (vectors >= vector_threshold) {
err = pci_enable_msix(adapter->pdev, adapter->msix_entries,
if (!err) /* Success in acquiring all requested vectors. */
break;
else if (err < 0)
-@@ -2161,55 +2446,15 @@ static void ixgbe_acquire_msix_vectors(s
+@@ -2161,78 +2446,62 @@
adapter->flags &= ~IXGBE_FLAG_MSIX_ENABLED;
kfree(adapter->msix_entries);
adapter->msix_entries = NULL;
-{
- int nrq, ntq;
- int feature_mask = 0, rss_i, rss_m;
--
-- /* Number of supported queues */
-- switch (adapter->hw.mac.type) {
-- case ixgbe_mac_82598EB:
++/**
++ * ixgbe_cache_ring_register - Descriptor ring to register mapping
++ * @adapter: board private structure to initialize
++ *
++ * Once we know the feature-set enabled for the device, we'll cache
++ * the register offset the descriptor ring is assigned to.
++ **/
++static void __devinit ixgbe_cache_ring_register(struct ixgbe_adapter *adapter)
++{
++ int feature_mask = 0, rss_i;
++ int i, txr_idx, rxr_idx;
++ int dcb_i;
+
+ /* Number of supported queues */
+ switch (adapter->hw.mac.type) {
+ case ixgbe_mac_82598EB:
- rss_i = adapter->ring_feature[RING_F_RSS].indices;
- rss_m = 0;
- feature_mask |= IXGBE_FLAG_RSS_ENABLED;
- adapter->num_tx_queues = ntq;
-}
-
- /**
- * ixgbe_cache_ring_register - Descriptor ring to register mapping
- * @adapter: board private structure to initialize
-@@ -2219,20 +2464,44 @@ static void __devinit ixgbe_set_num_queu
- **/
- static void __devinit ixgbe_cache_ring_register(struct ixgbe_adapter *adapter)
- {
+-/**
+- * ixgbe_cache_ring_register - Descriptor ring to register mapping
+- * @adapter: board private structure to initialize
+- *
+- * Once we know the feature-set enabled for the device, we'll cache
+- * the register offset the descriptor ring is assigned to.
+- **/
+-static void __devinit ixgbe_cache_ring_register(struct ixgbe_adapter *adapter)
+-{
- /* TODO: Remove all uses of the indices in the cases where multiple
- * features are OR'd together, if the feature set makes sense.
- */
- int feature_mask = 0, rss_i;
- int i, txr_idx, rxr_idx;
-+ int dcb_i;
-
- /* Number of supported queues */
- switch (adapter->hw.mac.type) {
- case ixgbe_mac_82598EB:
+- int feature_mask = 0, rss_i;
+- int i, txr_idx, rxr_idx;
+-
+- /* Number of supported queues */
+- switch (adapter->hw.mac.type) {
+- case ixgbe_mac_82598EB:
+ dcb_i = adapter->ring_feature[RING_F_DCB].indices;
rss_i = adapter->ring_feature[RING_F_RSS].indices;
txr_idx = 0;
case (IXGBE_FLAG_RSS_ENABLED):
for (i = 0; i < adapter->num_rx_queues; i++)
adapter->rx_ring[i].reg_idx = i;
-@@ -2257,26 +2526,27 @@ static void __devinit ixgbe_cache_ring_r
+@@ -2257,26 +2526,27 @@
* number of queues at compile-time. The polling_netdev array is
* intended for Multiqueue, but should work fine with a single queue.
**/
+ adapter->tx_ring[i].count = adapter->tx_ring_count;
adapter->tx_ring[i].queue_index = i;
}
-+
- for (i = 0; i < adapter->num_rx_queues; i++) {
+- for (i = 0; i < adapter->num_rx_queues; i++) {
- adapter->rx_ring[i].count = IXGBE_DEFAULT_RXD;
++
++ for (i = 0; i < adapter->num_rx_queues; i++) {
+ adapter->rx_ring[i].count = adapter->rx_ring_count;
adapter->rx_ring[i].queue_index = i;
}
-@@ -2297,26 +2567,19 @@ err_tx_ring_allocation:
+@@ -2297,17 +2567,10 @@
* Attempt to configure the interrupts using the best available
* capabilities of the hardware and the kernel.
**/
{
int err = 0;
int vector, v_budget;
-
- /*
+-
+- /*
- * Set the default interrupt throttle rate.
- */
- adapter->rx_eitr = (1000000 / IXGBE_DEFAULT_ITR_RX_USECS);
- adapter->tx_eitr = (1000000 / IXGBE_DEFAULT_ITR_TX_USECS);
--
-- /*
+
+ /*
* It's easy to be greedy for MSI-X vectors, but it really
- * doesn't do us much good if we have a lot more vectors
- * than CPU's. So let's be conservative and only ask for
+@@ -2316,7 +2579,7 @@
* (roughly) twice the number of vectors as there are CPU's.
*/
v_budget = min(adapter->num_rx_queues + adapter->num_tx_queues,
/*
* At the same time, hardware can only support a maximum of
-@@ -2330,8 +2593,9 @@ static int __devinit ixgbe_set_interrupt
+@@ -2330,8 +2593,9 @@
/* A failure in MSI-X entry allocation isn't fatal, but it does
* mean we disable MSI-X capabilities of the adapter. */
adapter->msix_entries = kcalloc(v_budget,
adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED;
ixgbe_set_num_queues(adapter);
kfree(adapter->tx_ring);
-@@ -2339,7 +2603,7 @@ static int __devinit ixgbe_set_interrupt
+@@ -2339,7 +2603,7 @@
err = ixgbe_alloc_queues(adapter);
if (err) {
DPRINTK(PROBE, ERR, "Unable to allocate memory "
goto out;
}
-@@ -2360,7 +2624,7 @@ try_msi:
+@@ -2360,7 +2624,7 @@
adapter->flags |= IXGBE_FLAG_MSI_ENABLED;
} else {
DPRINTK(HW, DEBUG, "Unable to allocate MSI interrupt, "
/* reset err */
err = 0;
}
-@@ -2372,7 +2636,7 @@ out:
+@@ -2372,7 +2636,7 @@
return err;
}
{
if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
adapter->flags &= ~IXGBE_FLAG_MSIX_ENABLED;
-@@ -2396,7 +2660,7 @@ static void ixgbe_reset_interrupt_capabi
+@@ -2396,7 +2660,7 @@
* - Hardware queue count (num_*_queues)
* - defined by miscellaneous hardware support/features (RSS, etc.)
**/
{
int err;
-@@ -2416,9 +2680,9 @@ static int __devinit ixgbe_init_interrup
+@@ -2416,9 +2680,9 @@
}
DPRINTK(DRV, INFO, "Multiqueue %s: Rx Queue count = %u, "
set_bit(__IXGBE_DOWN, &adapter->state);
-@@ -2432,6 +2696,56 @@ err_alloc_queues:
+@@ -2432,6 +2696,56 @@
}
/**
* ixgbe_sw_init - Initialize general software structures (struct ixgbe_adapter)
* @adapter: board private structure to initialize
*
-@@ -2444,34 +2758,72 @@ static int __devinit ixgbe_sw_init(struc
+@@ -2444,34 +2758,72 @@
struct ixgbe_hw *hw = &adapter->hw;
struct pci_dev *pdev = adapter->pdev;
unsigned int rss;
dev_err(&pdev->dev, "EEPROM initialization failed\n");
return -EIO;
}
-@@ -2487,105 +2839,160 @@ static int __devinit ixgbe_sw_init(struc
+@@ -2487,169 +2839,43 @@
/**
* ixgbe_setup_tx_resources - allocate Tx resources (Descriptors)
* @adapter: board private structure
/* round up to nearest 4K */
- txdr->size = txdr->count * sizeof(union ixgbe_adv_tx_desc);
- txdr->size = ALIGN(txdr->size, 4096);
+-
+- txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma);
+- if (!txdr->desc) {
+- vfree(txdr->tx_buffer_info);
+- DPRINTK(PROBE, ERR,
+- "Memory allocation failed for the tx desc ring\n");
+- return -ENOMEM;
+- }
+-
+- txdr->next_to_use = 0;
+- txdr->next_to_clean = 0;
+- txdr->work_limit = txdr->count;
+-
+- return 0;
+-}
+-
+-/**
+- * ixgbe_setup_rx_resources - allocate Rx resources (Descriptors)
+- * @adapter: board private structure
+- * @rxdr: rx descriptor ring (for a specific queue) to setup
+- *
+- * Returns 0 on success, negative on failure
+- **/
+-int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
+- struct ixgbe_ring *rxdr)
+-{
+- struct pci_dev *pdev = adapter->pdev;
+- int size;
+-
+- size = sizeof(struct net_lro_desc) * IXGBE_MAX_LRO_DESCRIPTORS;
+- rxdr->lro_mgr.lro_arr = vmalloc(size);
+- if (!rxdr->lro_mgr.lro_arr)
+- return -ENOMEM;
+- memset(rxdr->lro_mgr.lro_arr, 0, size);
+-
+- size = sizeof(struct ixgbe_rx_buffer) * rxdr->count;
+- rxdr->rx_buffer_info = vmalloc(size);
+- if (!rxdr->rx_buffer_info) {
+- DPRINTK(PROBE, ERR,
+- "vmalloc allocation failed for the rx desc ring\n");
+- goto alloc_failed;
+- }
+- memset(rxdr->rx_buffer_info, 0, size);
+-
+- /* Round up to nearest 4K */
+- rxdr->size = rxdr->count * sizeof(union ixgbe_adv_rx_desc);
+- rxdr->size = ALIGN(rxdr->size, 4096);
+-
+- rxdr->desc = pci_alloc_consistent(pdev, rxdr->size, &rxdr->dma);
+-
+- if (!rxdr->desc) {
+- DPRINTK(PROBE, ERR,
+- "Memory allocation failed for the rx desc ring\n");
+- vfree(rxdr->rx_buffer_info);
+- goto alloc_failed;
+- }
+-
+- rxdr->next_to_clean = 0;
+- rxdr->next_to_use = 0;
+-
+- return 0;
+-
+-alloc_failed:
+- vfree(rxdr->lro_mgr.lro_arr);
+- rxdr->lro_mgr.lro_arr = NULL;
+- return -ENOMEM;
+-}
+-
+-/**
+- * ixgbe_free_tx_resources - Free Tx Resources per Queue
+- * @adapter: board private structure
+- * @tx_ring: Tx descriptor ring for a specific queue
+- *
+- * Free all transmit software resources
+- **/
+-static void ixgbe_free_tx_resources(struct ixgbe_adapter *adapter,
+- struct ixgbe_ring *tx_ring)
+-{
+- struct pci_dev *pdev = adapter->pdev;
+-
+- ixgbe_clean_tx_ring(adapter, tx_ring);
+-
+ tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc) +
+ sizeof(u32);
+ tx_ring->size = ALIGN(tx_ring->size, 4096);
+ &tx_ring->dma);
+ if (!tx_ring->desc)
+ goto err;
-
-- txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma);
-- if (!txdr->desc) {
-- vfree(txdr->tx_buffer_info);
-- DPRINTK(PROBE, ERR,
-- "Memory allocation failed for the tx desc ring\n");
-- return -ENOMEM;
-- }
++
+ tx_ring->next_to_use = 0;
+ tx_ring->next_to_clean = 0;
+ tx_ring->work_limit = tx_ring->count;
+ return 0;
-
-- txdr->next_to_use = 0;
-- txdr->next_to_clean = 0;
-- txdr->work_limit = txdr->count;
++
+err:
-+ vfree(tx_ring->tx_buffer_info);
-+ tx_ring->tx_buffer_info = NULL;
+ vfree(tx_ring->tx_buffer_info);
+ tx_ring->tx_buffer_info = NULL;
+-
+- pci_free_consistent(pdev, tx_ring->size, tx_ring->desc, tx_ring->dma);
+-
+- tx_ring->desc = NULL;
+-}
+-
+-/**
+- * ixgbe_free_all_tx_resources - Free Tx Resources for All Queues
+- * @adapter: board private structure
+- *
+- * Free all transmit software resources
+- **/
+-static void ixgbe_free_all_tx_resources(struct ixgbe_adapter *adapter)
+-{
+- int i;
+-
+- for (i = 0; i < adapter->num_tx_queues; i++)
+- ixgbe_free_tx_resources(adapter, &adapter->tx_ring[i]);
+-}
+-
+-/**
+- * ixgbe_free_rx_resources - Free Rx Resources
+- * @adapter: board private structure
+- * @rx_ring: ring to clean the resources from
+- *
+- * Free all receive software resources
+- **/
+-static void ixgbe_free_rx_resources(struct ixgbe_adapter *adapter,
+- struct ixgbe_ring *rx_ring)
+-{
+- struct pci_dev *pdev = adapter->pdev;
+-
+- vfree(rx_ring->lro_mgr.lro_arr);
+- rx_ring->lro_mgr.lro_arr = NULL;
+-
+- ixgbe_clean_rx_ring(adapter, rx_ring);
+-
+- vfree(rx_ring->rx_buffer_info);
+- rx_ring->rx_buffer_info = NULL;
+-
+- pci_free_consistent(pdev, rx_ring->size, rx_ring->desc, rx_ring->dma);
+-
+- rx_ring->desc = NULL;
+-}
+-
+-/**
+- * ixgbe_free_all_rx_resources - Free Rx Resources for All Queues
+- * @adapter: board private structure
+- *
+- * Free all receive software resources
+- **/
+-static void ixgbe_free_all_rx_resources(struct ixgbe_adapter *adapter)
+-{
+- int i;
+-
+- for (i = 0; i < adapter->num_rx_queues; i++)
+- ixgbe_free_rx_resources(adapter, &adapter->rx_ring[i]);
+ DPRINTK(PROBE, ERR, "Unable to allocate memory for the transmit "
+ "descriptor ring\n");
+ return -ENOMEM;
-+}
+ }
-- return 0;
-+/**
-+ * ixgbe_setup_all_tx_resources - allocate all queues Tx resources
-+ * @adapter: board private structure
-+ *
-+ * If this function returns with an error, then it's possible one or
-+ * more of the rings is populated (while the rest are not). It is the
-+ * callers duty to clean those orphaned rings.
-+ *
-+ * Return 0 on success, negative on failure
-+ **/
-+static int ixgbe_setup_all_tx_resources(struct ixgbe_adapter *adapter)
-+{
-+ int i, err = 0;
-+
-+ for (i = 0; i < adapter->num_tx_queues; i++) {
-+ err = ixgbe_setup_tx_resources(adapter, &adapter->tx_ring[i]);
+ /**
+@@ -2668,14 +2894,68 @@
+
+ for (i = 0; i < adapter->num_tx_queues; i++) {
+ err = ixgbe_setup_tx_resources(adapter, &adapter->tx_ring[i]);
+- if (err) {
+- DPRINTK(PROBE, ERR,
+- "Allocation for Tx Queue %u failed\n", i);
+- break;
+- }
+- }
+-
+- return err;
+ if (!err)
+ continue;
+ DPRINTK(PROBE, ERR, "Allocation for Tx Queue %u failed\n", i);
+ }
+
+ return err;
- }
-
- /**
- * ixgbe_setup_rx_resources - allocate Rx resources (Descriptors)
- * @adapter: board private structure
-- * @rxdr: rx descriptor ring (for a specific queue) to setup
++}
++
++/**
++ * ixgbe_setup_rx_resources - allocate Rx resources (Descriptors)
++ * @adapter: board private structure
+ * @rx_ring: rx descriptor ring (for a specific queue) to setup
- *
- * Returns 0 on success, negative on failure
- **/
- int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
-- struct ixgbe_ring *rxdr)
++ *
++ * Returns 0 on success, negative on failure
++ **/
++int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
+ struct ixgbe_ring *rx_ring)
- {
- struct pci_dev *pdev = adapter->pdev;
- int size;
-
++{
++ struct pci_dev *pdev = adapter->pdev;
++ int size;
++
+#ifdef CONFIG_IXGBE_LRO
- size = sizeof(struct net_lro_desc) * IXGBE_MAX_LRO_DESCRIPTORS;
-- rxdr->lro_mgr.lro_arr = vmalloc(size);
-- if (!rxdr->lro_mgr.lro_arr)
++ size = sizeof(struct net_lro_desc) * IXGBE_MAX_LRO_DESCRIPTORS;
+ rx_ring->lro_mgr.lro_arr = vmalloc(size);
+ if (!rx_ring->lro_mgr.lro_arr)
- return -ENOMEM;
-- memset(rxdr->lro_mgr.lro_arr, 0, size);
--
-- size = sizeof(struct ixgbe_rx_buffer) * rxdr->count;
-- rxdr->rx_buffer_info = vmalloc(size);
-- if (!rxdr->rx_buffer_info) {
++ return -ENOMEM;
+ memset(rx_ring->lro_mgr.lro_arr, 0, size);
+#endif
+ size = sizeof(struct ixgbe_rx_buffer) * rx_ring->count;
+ rx_ring->rx_buffer_info = vmalloc(size);
+ if (!rx_ring->rx_buffer_info) {
- DPRINTK(PROBE, ERR,
-- "vmalloc allocation failed for the rx desc ring\n");
++ DPRINTK(PROBE, ERR,
+ "vmalloc allocation failed for the rx desc ring\n");
- goto alloc_failed;
- }
-- memset(rxdr->rx_buffer_info, 0, size);
++ goto alloc_failed;
++ }
+ memset(rx_ring->rx_buffer_info, 0, size);
-
- /* Round up to nearest 4K */
-- rxdr->size = rxdr->count * sizeof(union ixgbe_adv_rx_desc);
-- rxdr->size = ALIGN(rxdr->size, 4096);
++
++ /* Round up to nearest 4K */
+ rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc);
+ rx_ring->size = ALIGN(rx_ring->size, 4096);
-
-- rxdr->desc = pci_alloc_consistent(pdev, rxdr->size, &rxdr->dma);
++
+ rx_ring->desc = pci_alloc_consistent(pdev, rx_ring->size, &rx_ring->dma);
-
-- if (!rxdr->desc) {
++
+ if (!rx_ring->desc) {
- DPRINTK(PROBE, ERR,
-- "Memory allocation failed for the rx desc ring\n");
-- vfree(rxdr->rx_buffer_info);
++ DPRINTK(PROBE, ERR,
+ "Memory allocation failed for the rx desc ring\n");
+ vfree(rx_ring->rx_buffer_info);
- goto alloc_failed;
- }
-
-- rxdr->next_to_clean = 0;
-- rxdr->next_to_use = 0;
++ goto alloc_failed;
++ }
++
+ rx_ring->next_to_clean = 0;
+ rx_ring->next_to_use = 0;
-
- return 0;
-
- alloc_failed:
-- vfree(rxdr->lro_mgr.lro_arr);
-- rxdr->lro_mgr.lro_arr = NULL;
++
++ return 0;
++
++alloc_failed:
+#ifdef CONFIG_IXGBE_LRO
+ vfree(rx_ring->lro_mgr.lro_arr);
+ rx_ring->lro_mgr.lro_arr = NULL;
+#endif
- return -ENOMEM;
++ return -ENOMEM;
}
/**
-+ * ixgbe_setup_all_rx_resources - allocate all queues Rx resources
-+ * @adapter: board private structure
-+ *
-+ * If this function returns with an error, then it's possible one or
-+ * more of the rings is populated (while the rest are not). It is the
-+ * callers duty to clean those orphaned rings.
-+ *
-+ * Return 0 on success, negative on failure
-+ **/
-+
-+static int ixgbe_setup_all_rx_resources(struct ixgbe_adapter *adapter)
-+{
-+ int i, err = 0;
-+
-+ for (i = 0; i < adapter->num_rx_queues; i++) {
-+ err = ixgbe_setup_rx_resources(adapter, &adapter->rx_ring[i]);
+@@ -2695,14 +2975,90 @@
+
+ for (i = 0; i < adapter->num_rx_queues; i++) {
+ err = ixgbe_setup_rx_resources(adapter, &adapter->rx_ring[i]);
+- if (err) {
+- DPRINTK(PROBE, ERR,
+- "Allocation for Rx Queue %u failed\n", i);
+- break;
+- }
+- }
+-
+- return err;
+ if (!err)
+ continue;
+ DPRINTK(PROBE, ERR, "Allocation for Rx Queue %u failed\n", i);
+}
+
+/**
- * ixgbe_free_tx_resources - Free Tx Resources per Queue
- * @adapter: board private structure
- * @tx_ring: Tx descriptor ring for a specific queue
- *
- * Free all transmit software resources
- **/
--static void ixgbe_free_tx_resources(struct ixgbe_adapter *adapter,
-- struct ixgbe_ring *tx_ring)
++ * ixgbe_free_tx_resources - Free Tx Resources per Queue
++ * @adapter: board private structure
++ * @tx_ring: Tx descriptor ring for a specific queue
++ *
++ * Free all transmit software resources
++ **/
+void ixgbe_free_tx_resources(struct ixgbe_adapter *adapter,
+ struct ixgbe_ring *tx_ring)
- {
- struct pci_dev *pdev = adapter->pdev;
-
-@@ -2620,89 +3027,38 @@ static void ixgbe_free_all_tx_resources(
- *
- * Free all receive software resources
- **/
--static void ixgbe_free_rx_resources(struct ixgbe_adapter *adapter,
-- struct ixgbe_ring *rx_ring)
++{
++ struct pci_dev *pdev = adapter->pdev;
++
++ ixgbe_clean_tx_ring(adapter, tx_ring);
++
++ vfree(tx_ring->tx_buffer_info);
++ tx_ring->tx_buffer_info = NULL;
++
++ pci_free_consistent(pdev, tx_ring->size, tx_ring->desc, tx_ring->dma);
++
++ tx_ring->desc = NULL;
++}
++
++/**
++ * ixgbe_free_all_tx_resources - Free Tx Resources for All Queues
++ * @adapter: board private structure
++ *
++ * Free all transmit software resources
++ **/
++static void ixgbe_free_all_tx_resources(struct ixgbe_adapter *adapter)
++{
++ int i;
++
++ for (i = 0; i < adapter->num_tx_queues; i++)
++ ixgbe_free_tx_resources(adapter, &adapter->tx_ring[i]);
++}
++
++/**
++ * ixgbe_free_rx_resources - Free Rx Resources
++ * @adapter: board private structure
++ * @rx_ring: ring to clean the resources from
++ *
++ * Free all receive software resources
++ **/
+void ixgbe_free_rx_resources(struct ixgbe_adapter *adapter,
+ struct ixgbe_ring *rx_ring)
- {
- struct pci_dev *pdev = adapter->pdev;
-
++{
++ struct pci_dev *pdev = adapter->pdev;
++
+#ifdef CONFIG_IXGBE_LRO
- vfree(rx_ring->lro_mgr.lro_arr);
- rx_ring->lro_mgr.lro_arr = NULL;
++ vfree(rx_ring->lro_mgr.lro_arr);
++ rx_ring->lro_mgr.lro_arr = NULL;
+#endif
-
- ixgbe_clean_rx_ring(adapter, rx_ring);
-
- vfree(rx_ring->rx_buffer_info);
- rx_ring->rx_buffer_info = NULL;
-
-- pci_free_consistent(pdev, rx_ring->size, rx_ring->desc, rx_ring->dma);
--
-- rx_ring->desc = NULL;
--}
--
--/**
-- * ixgbe_free_all_rx_resources - Free Rx Resources for All Queues
-- * @adapter: board private structure
-- *
-- * Free all receive software resources
-- **/
--static void ixgbe_free_all_rx_resources(struct ixgbe_adapter *adapter)
--{
-- int i;
--
-- for (i = 0; i < adapter->num_rx_queues; i++)
-- ixgbe_free_rx_resources(adapter, &adapter->rx_ring[i]);
--}
--
--/**
-- * ixgbe_setup_all_tx_resources - allocate all queues Tx resources
-- * @adapter: board private structure
-- *
-- * If this function returns with an error, then it's possible one or
-- * more of the rings is populated (while the rest are not). It is the
-- * callers duty to clean those orphaned rings.
-- *
-- * Return 0 on success, negative on failure
-- **/
--static int ixgbe_setup_all_tx_resources(struct ixgbe_adapter *adapter)
--{
-- int i, err = 0;
--
-- for (i = 0; i < adapter->num_tx_queues; i++) {
-- err = ixgbe_setup_tx_resources(adapter, &adapter->tx_ring[i]);
-- if (err) {
-- DPRINTK(PROBE, ERR,
-- "Allocation for Tx Queue %u failed\n", i);
-- break;
-- }
-- }
++
++ ixgbe_clean_rx_ring(adapter, rx_ring);
++
++ vfree(rx_ring->rx_buffer_info);
++ rx_ring->rx_buffer_info = NULL;
++
+ pci_free_consistent(pdev, rx_ring->size, rx_ring->desc, rx_ring->dma);
-
-- return err;
++
+ rx_ring->desc = NULL;
- }
-
- /**
-- * ixgbe_setup_all_rx_resources - allocate all queues Rx resources
++}
++
++/**
+ * ixgbe_free_all_rx_resources - Free Rx Resources for All Queues
- * @adapter: board private structure
- *
-- * If this function returns with an error, then it's possible one or
-- * more of the rings is populated (while the rest are not). It is the
-- * callers duty to clean those orphaned rings.
-- *
-- * Return 0 on success, negative on failure
++ * @adapter: board private structure
++ *
+ * Free all receive software resources
- **/
--
--static int ixgbe_setup_all_rx_resources(struct ixgbe_adapter *adapter)
++ **/
+static void ixgbe_free_all_rx_resources(struct ixgbe_adapter *adapter)
- {
-- int i, err = 0;
--
-- for (i = 0; i < adapter->num_rx_queues; i++) {
-- err = ixgbe_setup_rx_resources(adapter, &adapter->rx_ring[i]);
-- if (err) {
-- DPRINTK(PROBE, ERR,
-- "Allocation for Rx Queue %u failed\n", i);
-- break;
-- }
-- }
++{
+ int i;
-
-- return err;
++
+ for (i = 0; i < adapter->num_rx_queues; i++)
+ ixgbe_free_rx_resources(adapter, &adapter->rx_ring[i]);
}
/**
-@@ -2717,12 +3073,12 @@ static int ixgbe_change_mtu(struct net_d
+@@ -2717,12 +3073,12 @@
struct ixgbe_adapter *adapter = netdev_priv(netdev);
int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN;
/* must set new MTU before calling down or up */
netdev->mtu = new_mtu;
-@@ -2817,6 +3173,135 @@ static int ixgbe_close(struct net_device
- }
+@@ -2814,6 +3170,135 @@
+ ixgbe_release_hw_control(adapter);
- /**
+ return 0;
++}
++
++/**
+ * ixgbe_napi_add_all - prep napi structs for use
+ * @adapter: private struct
+ * helper function to napi_add each possible q_vector->napi
+static void ixgbe_shutdown(struct pci_dev *pdev)
+{
+ ixgbe_suspend(pdev, PMSG_SUSPEND);
-+}
-+
-+/**
- * ixgbe_update_stats - Update the board statistics counters.
- * @adapter: board private structure
- **/
-@@ -2834,6 +3319,18 @@ void ixgbe_update_stats(struct ixgbe_ada
+ }
+
+ /**
+@@ -2834,6 +3319,18 @@
adapter->stats.mpc[i] += mpc;
total_mpc += adapter->stats.mpc[i];
adapter->stats.rnbc[i] += IXGBE_READ_REG(hw, IXGBE_RNBC(i));
}
adapter->stats.gprc += IXGBE_READ_REG(hw, IXGBE_GPRC);
/* work around hardware counting issue */
-@@ -2889,7 +3386,7 @@ void ixgbe_update_stats(struct ixgbe_ada
+@@ -2889,7 +3386,7 @@
/* Rx Errors */
adapter->net_stats.rx_errors = adapter->stats.crcerrs +
adapter->net_stats.rx_dropped = 0;
adapter->net_stats.rx_length_errors = adapter->stats.rlec;
adapter->net_stats.rx_crc_errors = adapter->stats.crcerrs;
-@@ -2903,27 +3400,74 @@ void ixgbe_update_stats(struct ixgbe_ada
+@@ -2903,73 +3400,105 @@
static void ixgbe_watchdog(unsigned long data)
{
struct ixgbe_adapter *adapter = (struct ixgbe_adapter *)data;
+- struct net_device *netdev = adapter->netdev;
+- bool link_up;
+- u32 link_speed = 0;
+-
+- adapter->hw.mac.ops.check_link(&adapter->hw, &(link_speed), &link_up);
+-
+- if (link_up) {
+- if (!netif_carrier_ok(netdev)) {
+- u32 frctl = IXGBE_READ_REG(&adapter->hw, IXGBE_FCTRL);
+- u32 rmcs = IXGBE_READ_REG(&adapter->hw, IXGBE_RMCS);
+-#define FLOW_RX (frctl & IXGBE_FCTRL_RFCE)
+-#define FLOW_TX (rmcs & IXGBE_RMCS_TFCE_802_3X)
+- DPRINTK(LINK, INFO, "NIC Link is Up %s, "
+- "Flow Control: %s\n",
+- (link_speed == IXGBE_LINK_SPEED_10GB_FULL ?
+- "10 Gbps" :
+- (link_speed == IXGBE_LINK_SPEED_1GB_FULL ?
+- "1 Gbps" : "unknown speed")),
+- ((FLOW_RX && FLOW_TX) ? "RX/TX" :
+- (FLOW_RX ? "RX" :
+- (FLOW_TX ? "TX" : "None"))));
+-
+- netif_carrier_on(netdev);
+- netif_tx_wake_all_queues(netdev);
+- } else {
+- /* Force detection of hung controller */
+- adapter->detect_tx_hung = true;
+- }
+- } else {
+- if (netif_carrier_ok(netdev)) {
+- DPRINTK(LINK, INFO, "NIC Link is Down\n");
+- netif_carrier_off(netdev);
+- netif_tx_stop_all_queues(netdev);
+- }
+- }
+-
+- ixgbe_update_stats(adapter);
+-
+ struct ixgbe_hw *hw = &adapter->hw;
+
+ /* Do the watchdog outside of interrupt context due to the lovely
+ * delays that some of the newer hardware requires */
-+ if (!test_bit(__IXGBE_DOWN, &adapter->state)) {
-+ /* Cause software interrupt to ensure rx rings are cleaned */
-+ if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
-+ u32 eics =
-+ (1 << (adapter->num_msix_vectors - NON_Q_VECTORS)) - 1;
+ if (!test_bit(__IXGBE_DOWN, &adapter->state)) {
+ /* Cause software interrupt to ensure rx rings are cleaned */
+ if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
+ u32 eics =
+ (1 << (adapter->num_msix_vectors - NON_Q_VECTORS)) - 1;
+- IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, eics);
+- } else {
+- /* for legacy and MSI interrupts don't set any bits that
+ IXGBE_WRITE_REG(hw, IXGBE_EICS, eics);
+ } else {
+ /* For legacy and MSI interrupts don't set any bits that
-+ * are enabled for EIAM, because this operation would
-+ * set *both* EIMS and EICS for any bit in EIAM */
+ * are enabled for EIAM, because this operation would
+ * set *both* EIMS and EICS for any bit in EIAM */
+- IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS,
+- (IXGBE_EICS_TCP_TIMER | IXGBE_EICS_OTHER));
+ IXGBE_WRITE_REG(hw, IXGBE_EICS,
+ (IXGBE_EICS_TCP_TIMER | IXGBE_EICS_OTHER));
-+ }
-+ /* Reset the timer */
-+ mod_timer(&adapter->watchdog_timer,
+ }
+ /* Reset the timer */
+ mod_timer(&adapter->watchdog_timer,
+- round_jiffies(jiffies + 2 * HZ));
+- }
+ round_jiffies(jiffies + 2 * HZ));
+ }
+
+ struct ixgbe_adapter *adapter = container_of(work,
+ struct ixgbe_adapter,
+ watchdog_task);
- struct net_device *netdev = adapter->netdev;
-- bool link_up;
-- u32 link_speed = 0;
++ struct net_device *netdev = adapter->netdev;
+ struct ixgbe_hw *hw = &adapter->hw;
+ u32 link_speed = adapter->link_speed;
+ bool link_up = adapter->link_up;
-
-- adapter->hw.mac.ops.check_link(&adapter->hw, &(link_speed), &link_up);
++
+ adapter->flags |= IXGBE_FLAG_IN_WATCHDOG_TASK;
+
+ if (adapter->flags & IXGBE_FLAG_NEED_LINK_UPDATE) {
+ adapter->link_up = link_up;
+ adapter->link_speed = link_speed;
+ }
-
- if (link_up) {
- if (!netif_carrier_ok(netdev)) {
-- u32 frctl = IXGBE_READ_REG(&adapter->hw, IXGBE_FCTRL);
-- u32 rmcs = IXGBE_READ_REG(&adapter->hw, IXGBE_RMCS);
++
++ if (link_up) {
++ if (!netif_carrier_ok(netdev)) {
+ u32 frctl = IXGBE_READ_REG(hw, IXGBE_FCTRL);
+ u32 rmcs = IXGBE_READ_REG(hw, IXGBE_RMCS);
- #define FLOW_RX (frctl & IXGBE_FCTRL_RFCE)
- #define FLOW_TX (rmcs & IXGBE_RMCS_TFCE_802_3X)
- DPRINTK(LINK, INFO, "NIC Link is Up %s, "
-- "Flow Control: %s\n",
-- (link_speed == IXGBE_LINK_SPEED_10GB_FULL ?
-- "10 Gbps" :
-- (link_speed == IXGBE_LINK_SPEED_1GB_FULL ?
-- "1 Gbps" : "unknown speed")),
-- ((FLOW_RX && FLOW_TX) ? "RX/TX" :
-- (FLOW_RX ? "RX" :
-- (FLOW_TX ? "TX" : "None"))));
++#define FLOW_RX (frctl & IXGBE_FCTRL_RFCE)
++#define FLOW_TX (rmcs & IXGBE_RMCS_TFCE_802_3X)
++ DPRINTK(LINK, INFO, "NIC Link is Up %s, "
+ "Flow Control: %s\n",
+ (link_speed == IXGBE_LINK_SPEED_10GB_FULL ?
+ "10 Gbps" :
+ ((FLOW_RX && FLOW_TX) ? "RX/TX" :
+ (FLOW_RX ? "RX" :
+ (FLOW_TX ? "TX" : "None"))));
-
- netif_carrier_on(netdev);
- netif_tx_wake_all_queues(netdev);
-@@ -2932,6 +3476,8 @@ static void ixgbe_watchdog(unsigned long
- adapter->detect_tx_hung = true;
- }
- } else {
++
++ netif_carrier_on(netdev);
++ netif_tx_wake_all_queues(netdev);
++ } else {
++ /* Force detection of hung controller */
++ adapter->detect_tx_hung = true;
++ }
++ } else {
+ adapter->link_up = false;
+ adapter->link_speed = 0;
- if (netif_carrier_ok(netdev)) {
- DPRINTK(LINK, INFO, "NIC Link is Down\n");
- netif_carrier_off(netdev);
-@@ -2940,36 +3486,19 @@ static void ixgbe_watchdog(unsigned long
- }
-
- ixgbe_update_stats(adapter);
--
-- if (!test_bit(__IXGBE_DOWN, &adapter->state)) {
-- /* Cause software interrupt to ensure rx rings are cleaned */
-- if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
-- u32 eics =
-- (1 << (adapter->num_msix_vectors - NON_Q_VECTORS)) - 1;
-- IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, eics);
-- } else {
-- /* for legacy and MSI interrupts don't set any bits that
-- * are enabled for EIAM, because this operation would
-- * set *both* EIMS and EICS for any bit in EIAM */
-- IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS,
-- (IXGBE_EICS_TCP_TIMER | IXGBE_EICS_OTHER));
-- }
-- /* Reset the timer */
-- mod_timer(&adapter->watchdog_timer,
-- round_jiffies(jiffies + 2 * HZ));
-- }
++ if (netif_carrier_ok(netdev)) {
++ DPRINTK(LINK, INFO, "NIC Link is Down\n");
++ netif_carrier_off(netdev);
++ netif_tx_stop_all_queues(netdev);
++ }
++ }
++
++ ixgbe_update_stats(adapter);
+ adapter->flags &= ~IXGBE_FLAG_IN_WATCHDOG_TASK;
}
if (skb_is_gso(skb)) {
if (skb_header_cloned(skb)) {
-@@ -2985,16 +3514,16 @@ static int ixgbe_tso(struct ixgbe_adapte
+@@ -2985,16 +3514,16 @@
iph->tot_len = 0;
iph->check = 0;
tcp_hdr(skb)->check = ~csum_tcpudp_magic(iph->saddr,
adapter->hw_tso6_ctxt++;
}
-@@ -3008,7 +3537,7 @@ static int ixgbe_tso(struct ixgbe_adapte
+@@ -3008,7 +3537,7 @@
vlan_macip_lens |=
(tx_flags & IXGBE_TX_FLAGS_VLAN_MASK);
vlan_macip_lens |= ((skb_network_offset(skb)) <<
*hdr_len += skb_network_offset(skb);
vlan_macip_lens |=
(skb_transport_header(skb) - skb_network_header(skb));
-@@ -3018,8 +3547,8 @@ static int ixgbe_tso(struct ixgbe_adapte
+@@ -3018,8 +3547,8 @@
context_desc->seqnum_seed = 0;
/* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */
if (skb->protocol == htons(ETH_P_IP))
type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4;
-@@ -3027,9 +3556,11 @@ static int ixgbe_tso(struct ixgbe_adapte
+@@ -3027,9 +3556,11 @@
context_desc->type_tucmd_mlhl = cpu_to_le32(type_tucmd_mlhl);
/* MSS L4LEN IDX */
context_desc->mss_l4len_idx = cpu_to_le32(mss_l4len_idx);
tx_buffer_info->time_stamp = jiffies;
-@@ -3046,8 +3577,8 @@ static int ixgbe_tso(struct ixgbe_adapte
+@@ -3046,8 +3577,8 @@
}
static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter,
{
struct ixgbe_adv_tx_context_desc *context_desc;
unsigned int i;
-@@ -3064,16 +3595,16 @@ static bool ixgbe_tx_csum(struct ixgbe_a
+@@ -3064,16 +3595,16 @@
vlan_macip_lens |=
(tx_flags & IXGBE_TX_FLAGS_VLAN_MASK);
vlan_macip_lens |= (skb_network_offset(skb) <<
if (skb->ip_summed == CHECKSUM_PARTIAL) {
switch (skb->protocol) {
-@@ -3081,16 +3612,14 @@ static bool ixgbe_tx_csum(struct ixgbe_a
+@@ -3081,16 +3612,14 @@
type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4;
if (ip_hdr(skb)->protocol == IPPROTO_TCP)
type_tucmd_mlhl |=
default:
if (unlikely(net_ratelimit())) {
DPRINTK(PROBE, WARNING,
-@@ -3102,10 +3631,12 @@ static bool ixgbe_tx_csum(struct ixgbe_a
+@@ -3102,10 +3631,12 @@
}
context_desc->type_tucmd_mlhl = cpu_to_le32(type_tucmd_mlhl);
adapter->hw_csum_tx_good++;
i++;
if (i == tx_ring->count)
-@@ -3114,12 +3645,13 @@ static bool ixgbe_tx_csum(struct ixgbe_a
+@@ -3114,12 +3645,13 @@
return true;
}
{
struct ixgbe_tx_buffer *tx_buffer_info;
unsigned int len = skb->len;
-@@ -3137,8 +3669,8 @@ static int ixgbe_tx_map(struct ixgbe_ada
+@@ -3137,8 +3669,8 @@
tx_buffer_info->length = size;
tx_buffer_info->dma = pci_map_single(adapter->pdev,
tx_buffer_info->time_stamp = jiffies;
tx_buffer_info->next_to_watch = i;
-@@ -3163,9 +3695,10 @@ static int ixgbe_tx_map(struct ixgbe_ada
+@@ -3163,9 +3695,10 @@
tx_buffer_info->length = size;
tx_buffer_info->dma = pci_map_page(adapter->pdev,
tx_buffer_info->time_stamp = jiffies;
tx_buffer_info->next_to_watch = i;
-@@ -3188,8 +3721,8 @@ static int ixgbe_tx_map(struct ixgbe_ada
+@@ -3188,8 +3721,8 @@
}
static void ixgbe_tx_queue(struct ixgbe_adapter *adapter,
{
union ixgbe_adv_tx_desc *tx_desc = NULL;
struct ixgbe_tx_buffer *tx_buffer_info;
-@@ -3208,15 +3741,17 @@ static void ixgbe_tx_queue(struct ixgbe_
+@@ -3208,15 +3741,17 @@
cmd_type_len |= IXGBE_ADVTXD_DCMD_TSE;
olinfo_status |= IXGBE_TXD_POPTS_TXSM <<
- IXGBE_ADVTXD_POPTS_SHIFT;
+-
+ IXGBE_ADVTXD_POPTS_SHIFT;
-
++
+ /* use index 1 context for tso */
+ olinfo_status |= (1 << IXGBE_ADVTXD_IDX_SHIFT);
if (tx_flags & IXGBE_TX_FLAGS_IPV4)
olinfo_status |= ((paylen - hdr_len) << IXGBE_ADVTXD_PAYLEN_SHIFT);
-@@ -3226,9 +3761,8 @@ static void ixgbe_tx_queue(struct ixgbe_
+@@ -3226,9 +3761,8 @@
tx_desc = IXGBE_TX_DESC_ADV(*tx_ring, i);
tx_desc->read.buffer_addr = cpu_to_le64(tx_buffer_info->dma);
tx_desc->read.cmd_type_len =
i++;
if (i == tx_ring->count)
i = 0;
-@@ -3249,7 +3783,7 @@ static void ixgbe_tx_queue(struct ixgbe_
+@@ -3249,7 +3783,7 @@
}
static int __ixgbe_maybe_stop_tx(struct net_device *netdev,
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
-@@ -3265,61 +3799,60 @@ static int __ixgbe_maybe_stop_tx(struct
+@@ -3265,60 +3799,59 @@
return -EBUSY;
/* A reprieve! - use start_queue because it doesn't call schedule */
- if (skb->len <= 0) {
- dev_kfree_skb(skb);
- return NETDEV_TX_OK;
+- }
+- mss = skb_shinfo(skb)->gso_size;
+-
+- if (mss)
+ if (adapter->vlgrp && vlan_tx_tag_present(skb)) {
+ tx_flags |= vlan_tx_tag_get(skb);
+ if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
+ tx_flags |= (skb->queue_mapping << 13);
+ tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT;
+ tx_flags |= IXGBE_TX_FLAGS_VLAN;
- }
-- mss = skb_shinfo(skb)->gso_size;
--
-- if (mss)
-- count++;
-- else if (skb->ip_summed == CHECKSUM_PARTIAL)
++ }
+ /* three things can cause us to need a context descriptor */
+ if (skb_is_gso(skb) ||
+ (skb->ip_summed == CHECKSUM_PARTIAL) ||
+ (tx_flags & IXGBE_TX_FLAGS_VLAN))
count++;
-
+- else if (skb->ip_summed == CHECKSUM_PARTIAL)
+- count++;
+-
- count += TXD_USE_COUNT(len);
- for (f = 0; f < nr_frags; f++)
++
+ count += TXD_USE_COUNT(skb_headlen(skb));
+ for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);
if (ixgbe_maybe_stop_tx(netdev, tx_ring, count)) {
adapter->tx_busy++;
return NETDEV_TX_BUSY;
- }
+- }
- if (adapter->vlgrp && vlan_tx_tag_present(skb)) {
- tx_flags |= IXGBE_TX_FLAGS_VLAN;
- tx_flags |= (vlan_tx_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT);
-- }
+ }
if (skb->protocol == htons(ETH_P_IP))
- tx_flags |= IXGBE_TX_FLAGS_IPV4;
-@@ -3333,12 +3866,12 @@ static int ixgbe_xmit_frame(struct sk_bu
+@@ -3333,12 +3866,12 @@
if (tso)
tx_flags |= IXGBE_TX_FLAGS_TSO;
else if (ixgbe_tx_csum(adapter, tx_ring, skb, tx_flags) &&
netdev->trans_start = jiffies;
-@@ -3372,15 +3905,16 @@ static struct net_device_stats *ixgbe_ge
+@@ -3372,15 +3905,16 @@
static int ixgbe_set_mac(struct net_device *netdev, void *p)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
- memcpy(adapter->hw.mac.addr, addr->sa_data, netdev->addr_len);
-+ memcpy(hw->mac.addr, addr->sa_data, netdev->addr_len);
-
+-
- ixgbe_set_rar(&adapter->hw, 0, adapter->hw.mac.addr, 0, IXGBE_RAH_AV);
++ memcpy(hw->mac.addr, addr->sa_data, netdev->addr_len);
++
+ hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
return 0;
}
-@@ -3404,28 +3938,23 @@ static void ixgbe_netpoll(struct net_dev
+@@ -3404,28 +3938,23 @@
#endif
/**
- * helper function to napi_add each possible q_vector->napi
- */
-static void ixgbe_napi_add_all(struct ixgbe_adapter *adapter)
-+ * ixgbe_link_config - set up initial link with default speed and duplex
-+ * @hw: pointer to private hardware struct
-+ *
-+ * Returns 0 on success, negative on failure
-+ **/
-+static int ixgbe_link_config(struct ixgbe_hw *hw)
- {
+-{
- int i, q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS;
- int (*poll)(struct napi_struct *, int);
-+ u32 autoneg = IXGBE_LINK_SPEED_10GB_FULL;
-
+-
- if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
- poll = &ixgbe_clean_rxonly;
- } else {
- /* only one q_vector for legacy modes */
- q_vectors = 1;
- }
-+ /* must always autoneg for both 1G and 10G link */
-+ hw->mac.autoneg = true;
-
+-
- for (i = 0; i < q_vectors; i++) {
- struct ixgbe_q_vector *q_vector = &adapter->q_vector[i];
- netif_napi_add(adapter->netdev, &q_vector->napi,
- (*poll), 64);
- }
++ * ixgbe_link_config - set up initial link with default speed and duplex
++ * @hw: pointer to private hardware struct
++ *
++ * Returns 0 on success, negative on failure
++ **/
++static int ixgbe_link_config(struct ixgbe_hw *hw)
++{
++ u32 autoneg = IXGBE_LINK_SPEED_10GB_FULL;
++
++ /* must always autoneg for both 1G and 10G link */
++ hw->mac.autoneg = true;
++
+ if ((hw->mac.type == ixgbe_mac_82598EB) &&
+ (hw->phy.media_type == ixgbe_media_type_copper))
+ autoneg = IXGBE_LINK_SPEED_82598_AUTONEG;
}
/**
-@@ -3440,17 +3969,16 @@ static void ixgbe_napi_add_all(struct ix
+@@ -3440,17 +3969,16 @@
* and a hardware reset occur.
**/
static int __devinit ixgbe_probe(struct pci_dev *pdev,
err = pci_enable_device(pdev);
if (err)
-@@ -3465,7 +3993,7 @@ static int __devinit ixgbe_probe(struct
+@@ -3465,7 +3993,7 @@
err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
if (err) {
dev_err(&pdev->dev, "No usable DMA "
goto err_dma;
}
}
-@@ -3498,10 +4026,8 @@ static int __devinit ixgbe_probe(struct
+@@ -3498,10 +4026,8 @@
hw->back = adapter;
adapter->msg_enable = (1 << DEFAULT_DEBUG_LEVEL_SHIFT) - 1;
if (!hw->hw_addr) {
err = -EIO;
goto err_ioremap;
-@@ -3516,7 +4042,8 @@ static int __devinit ixgbe_probe(struct
+@@ -3516,7 +4042,8 @@
netdev->stop = &ixgbe_close;
netdev->hard_start_xmit = &ixgbe_xmit_frame;
netdev->get_stats = &ixgbe_get_stats;
netdev->set_mac_address = &ixgbe_set_mac;
netdev->change_mtu = &ixgbe_change_mtu;
ixgbe_set_ethtool_ops(netdev);
-@@ -3530,51 +4057,88 @@ static int __devinit ixgbe_probe(struct
+@@ -3530,51 +4057,88 @@
#endif
strcpy(netdev->name, pci_name(pdev));
- netdev->mem_end = mmio_start + mmio_len;
-
adapter->bd_number = cards_found;
-
+-
- /* PCI config space info */
- hw->vendor_id = pdev->vendor;
- hw->device_id = pdev->device;
- hw->revision_id = pdev->revision;
- hw->subsystem_vendor_id = pdev->subsystem_vendor;
- hw->subsystem_device_id = pdev->subsystem_device;
--
+
/* Setup hw api */
memcpy(&hw->mac.ops, ii->mac_ops, sizeof(hw->mac.ops));
hw->mac.type = ii->mac;
+ } else if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {
+ DPRINTK(PROBE, ERR, "failed to load because an "
+ "unsupported SFP+ module type was detected.\n");
-+ goto err_hw_init;
-+ } else if (err) {
goto err_hw_init;
++ } else if (err) {
++ goto err_hw_init;
+ }
/* setup the private structure */
- NETIF_F_HW_VLAN_TX |
- NETIF_F_HW_VLAN_RX |
- NETIF_F_HW_VLAN_FILTER;
+-
+- netdev->features |= NETIF_F_LRO;
+ NETIF_F_IP_CSUM |
+ NETIF_F_HW_VLAN_TX |
+ NETIF_F_HW_VLAN_RX |
+ NETIF_F_HW_VLAN_FILTER;
-
-- netdev->features |= NETIF_F_LRO;
++
+ netdev->features |= NETIF_F_IPV6_CSUM;
netdev->features |= NETIF_F_TSO;
netdev->features |= NETIF_F_TSO6;
- netdev->vlan_features |= NETIF_F_HW_CSUM;
+ netdev->vlan_features |= NETIF_F_IP_CSUM;
netdev->vlan_features |= NETIF_F_SG;
-
++
+ if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
+ adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED;
+
+#ifdef CONFIG_IXGBE_DCB
+ netdev->dcbnl_ops = &dcbnl_ops;
+#endif /* CONFIG_IXGBE_DCB */
-+
+
if (pci_using_dac)
netdev->features |= NETIF_F_HIGHDMA;
dev_err(&pdev->dev, "The EEPROM Checksum Is Not Valid\n");
err = -EIO;
goto err_eeprom;
-@@ -3583,7 +4147,8 @@ static int __devinit ixgbe_probe(struct
+@@ -3583,7 +4147,8 @@
memcpy(netdev->dev_addr, hw->mac.perm_addr, netdev->addr_len);
memcpy(netdev->perm_addr, hw->mac.perm_addr, netdev->addr_len);
err = -EIO;
goto err_eeprom;
}
-@@ -3593,13 +4158,7 @@ static int __devinit ixgbe_probe(struct
+@@ -3593,13 +4158,7 @@
adapter->watchdog_timer.data = (unsigned long)adapter;
INIT_WORK(&adapter->reset_task, ixgbe_reset_task);
err = ixgbe_init_interrupt_scheme(adapter);
if (err)
-@@ -3610,32 +4169,39 @@ static int __devinit ixgbe_probe(struct
+@@ -3610,32 +4169,39 @@
link_speed = link_status & IXGBE_PCI_LINK_SPEED;
link_width = link_status & IXGBE_PCI_LINK_WIDTH;
dev_info(&pdev->dev, "(PCI Express:%s:%s) "
netif_carrier_off(netdev);
netif_tx_stop_all_queues(netdev);
-@@ -3647,7 +4213,7 @@ static int __devinit ixgbe_probe(struct
+@@ -3647,7 +4213,7 @@
if (err)
goto err_register;
if (dca_add_requester(&pdev->dev) == 0) {
adapter->flags |= IXGBE_FLAG_DCA_ENABLED;
/* always use CB2 mode, difference is masked
-@@ -3667,6 +4233,9 @@ err_hw_init:
+@@ -3667,6 +4233,9 @@
err_sw_init:
ixgbe_reset_interrupt_capability(adapter);
err_eeprom:
iounmap(hw->hw_addr);
err_ioremap:
free_netdev(netdev);
-@@ -3693,11 +4262,16 @@ static void __devexit ixgbe_remove(struc
+@@ -3693,11 +4262,16 @@
struct ixgbe_adapter *adapter = netdev_priv(netdev);
set_bit(__IXGBE_DOWN, &adapter->state);
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
adapter->flags &= ~IXGBE_FLAG_DCA_ENABLED;
dca_remove_requester(&pdev->dev);
-@@ -3705,7 +4279,8 @@ static void __devexit ixgbe_remove(struc
+@@ -3705,7 +4279,8 @@
}
#endif
ixgbe_reset_interrupt_capability(adapter);
-@@ -3715,6 +4290,7 @@ static void __devexit ixgbe_remove(struc
+@@ -3715,6 +4290,7 @@
pci_release_regions(pdev);
DPRINTK(PROBE, INFO, "complete\n");
kfree(adapter->tx_ring);
kfree(adapter->rx_ring);
-@@ -3732,7 +4308,7 @@ static void __devexit ixgbe_remove(struc
+@@ -3732,7 +4308,7 @@
* this device has been detected.
*/
static pci_ers_result_t ixgbe_io_error_detected(struct pci_dev *pdev,
{
struct net_device *netdev = pci_get_drvdata(pdev);
struct ixgbe_adapter *adapter = netdev->priv;
-@@ -3743,7 +4319,7 @@ static pci_ers_result_t ixgbe_io_error_d
+@@ -3743,7 +4319,7 @@
ixgbe_down(adapter);
pci_disable_device(pdev);
return PCI_ERS_RESULT_NEED_RESET;
}
-@@ -3760,7 +4336,7 @@ static pci_ers_result_t ixgbe_io_slot_re
+@@ -3760,7 +4336,7 @@
if (pci_enable_device(pdev)) {
DPRINTK(PROBE, ERR,
return PCI_ERS_RESULT_DISCONNECT;
}
pci_set_master(pdev);
-@@ -3794,7 +4370,6 @@ static void ixgbe_io_resume(struct pci_d
+@@ -3794,7 +4370,6 @@
}
netif_device_attach(netdev);
}
static struct pci_error_handlers ixgbe_err_handler = {
-@@ -3824,19 +4399,18 @@ static struct pci_driver ixgbe_driver =
+@@ -3824,19 +4399,18 @@
**/
static int __init ixgbe_init_module(void)
{
#endif
- ret = pci_register_driver(&ixgbe_driver);
- return ret;
+-}
+ return pci_register_driver(&ixgbe_driver);
- }
++}
+
module_init(ixgbe_init_module);
/**
-@@ -3847,24 +4421,24 @@ module_init(ixgbe_init_module);
+@@ -3847,24 +4421,24 @@
**/
static void __exit ixgbe_exit_module(void)
{
module_exit(ixgbe_exit_module);
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_phy.c
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_phy.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_phy.c
+--- a/drivers/net/ixgbe/ixgbe_phy.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_phy.c Wed May 06 16:56:25 2009 +0100
@@ -1,7 +1,7 @@
/*******************************************************************************
return status;
}
-@@ -73,10 +76,8 @@ static bool ixgbe_validate_phy_addr(stru
+@@ -73,10 +76,8 @@
bool valid = false;
hw->phy.addr = phy_addr;
if (phy_id != 0xFFFF && phy_id != 0x0)
valid = true;
-@@ -95,21 +96,18 @@ static s32 ixgbe_get_phy_id(struct ixgbe
+@@ -95,21 +96,18 @@
u16 phy_id_high = 0;
u16 phy_id_low = 0;
return status;
}
-@@ -129,6 +127,9 @@ static enum ixgbe_phy_type ixgbe_get_phy
+@@ -129,6 +127,9 @@
case QT2022_PHY_ID:
phy_type = ixgbe_phy_qt;
break;
default:
phy_type = ixgbe_phy_unknown;
break;
-@@ -138,32 +139,31 @@ static enum ixgbe_phy_type ixgbe_get_phy
+@@ -138,32 +139,31 @@
}
/**
u32 data;
s32 status = 0;
u16 gssr;
-@@ -179,9 +179,9 @@ s32 ixgbe_read_phy_reg(struct ixgbe_hw *
+@@ -179,9 +179,9 @@
if (status == 0) {
/* Setup and write the address cycle command */
command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT) |
IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
-@@ -190,7 +190,7 @@ s32 ixgbe_read_phy_reg(struct ixgbe_hw *
+@@ -190,7 +190,7 @@
* The MDI Command bit will clear when the operation is
* complete
*/
udelay(10);
command = IXGBE_READ_REG(hw, IXGBE_MSCA);
-@@ -210,9 +210,9 @@ s32 ixgbe_read_phy_reg(struct ixgbe_hw *
+@@ -210,9 +210,9 @@
* command
*/
command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT) |
IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
-@@ -221,7 +221,7 @@ s32 ixgbe_read_phy_reg(struct ixgbe_hw *
+@@ -221,7 +221,7 @@
* completed. The MDI Command bit will clear when the
* operation is complete
*/
udelay(10);
command = IXGBE_READ_REG(hw, IXGBE_MSCA);
-@@ -231,8 +231,7 @@ s32 ixgbe_read_phy_reg(struct ixgbe_hw *
+@@ -231,8 +231,7 @@
}
if ((command & IXGBE_MSCA_MDI_COMMAND) != 0) {
status = IXGBE_ERR_PHY;
} else {
/*
-@@ -247,22 +246,22 @@ s32 ixgbe_read_phy_reg(struct ixgbe_hw *
+@@ -247,22 +246,22 @@
ixgbe_release_swfw_sync(hw, gssr);
}
s32 status = 0;
u16 gssr;
-@@ -280,9 +279,9 @@ static s32 ixgbe_write_phy_reg(struct ix
+@@ -280,9 +279,9 @@
/* Setup and write the address cycle command */
command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT) |
IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
-@@ -291,19 +290,19 @@ static s32 ixgbe_write_phy_reg(struct ix
+@@ -291,19 +290,19 @@
* The MDI Command bit will clear when the operation is
* complete
*/
if (status == 0) {
/*
-@@ -311,9 +310,9 @@ static s32 ixgbe_write_phy_reg(struct ix
+@@ -311,9 +310,9 @@
* command
*/
command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT) |
IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
-@@ -322,20 +321,19 @@ static s32 ixgbe_write_phy_reg(struct ix
+@@ -322,20 +321,19 @@
* completed. The MDI Command bit will clear when the
* operation is complete
*/
}
ixgbe_release_swfw_sync(hw, gssr);
-@@ -345,67 +343,54 @@ static s32 ixgbe_write_phy_reg(struct ix
+@@ -345,67 +343,54 @@
}
/**
- IXGBE_MDIO_AUTO_NEG_CONTROL,
- IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
- &autoneg_reg);
--
++ hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL,
++ IXGBE_MDIO_AUTO_NEG_DEV_TYPE, &autoneg_reg);
+
- autoneg_reg |= autoneg_restart_mask;
--
++ autoneg_reg |= IXGBE_MII_RESTART;
+
- ixgbe_write_phy_reg(hw,
- IXGBE_MDIO_AUTO_NEG_CONTROL,
- IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
- autoneg_reg);
-+ hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL,
-+ IXGBE_MDIO_AUTO_NEG_DEV_TYPE, &autoneg_reg);
-+
-+ autoneg_reg |= IXGBE_MII_RESTART;
-+
+ hw->phy.ops.write_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL,
+ IXGBE_MDIO_AUTO_NEG_DEV_TYPE, autoneg_reg);
status = 0;
break;
}
-@@ -418,14 +403,299 @@ s32 ixgbe_setup_tnx_phy_link(struct ixgb
+@@ -418,14 +403,299 @@
}
/**
{
s32 status = 0;
u32 time_out;
-@@ -445,21 +715,20 @@ s32 ixgbe_check_tnx_phy_link(struct ixgb
+@@ -445,21 +715,20 @@
*/
for (time_out = 0; time_out < max_time_out; time_out++) {
udelay(10);
}
}
-@@ -467,28 +736,19 @@ s32 ixgbe_check_tnx_phy_link(struct ixgb
+@@ -467,28 +736,19 @@
}
/**
- * speed.
- */
- hw->phy.autoneg_advertised = 0;
--
++ s32 status = 0;
+
- if (speed & IXGBE_LINK_SPEED_10GB_FULL)
- hw->phy.autoneg_advertised |= IXGBE_LINK_SPEED_10GB_FULL;
- if (speed & IXGBE_LINK_SPEED_1GB_FULL)
- hw->phy.autoneg_advertised |= IXGBE_LINK_SPEED_1GB_FULL;
-+ s32 status = 0;
-
-- /* Setup link based on the new speed settings */
-- ixgbe_setup_tnx_phy_link(hw);
+ status = hw->phy.ops.read_reg(hw, TNX_FW_REV,
+ IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE,
+ firmware_version);
-- return 0;
+- /* Setup link based on the new speed settings */
+- ixgbe_setup_tnx_phy_link(hw);
+ return status;
- }
-+
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.h linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_phy.h
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_phy.h 2009-03-25 16:11:05.000000000 +0000
++}
+
+- return 0;
+-}
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_phy.h
+--- a/drivers/net/ixgbe/ixgbe_phy.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_phy.h Wed May 06 16:56:25 2009 +0100
@@ -1,7 +1,7 @@
/*******************************************************************************
+ u16 *list_offset,
+ u16 *data_offset);
#endif /* _IXGBE_PHY_H_ */
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_type.h
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_type.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_type.h
+--- a/drivers/net/ixgbe/ixgbe_type.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_type.h Wed May 06 16:56:25 2009 +0100
@@ -1,7 +1,7 @@
/*******************************************************************************
#define IXGBE_WUPL 0x05900
#define IXGBE_WUPM 0x05A00 /* wake up pkt memory 0x5A00-0x5A7C */
#define IXGBE_FHFT 0x09000 /* Flex host filter table 9000-93FC */
-@@ -170,6 +189,8 @@
+@@ -169,6 +188,8 @@
+ #define IXGBE_TDTQ2TCSR(_i) (0x0622C + ((_i) * 0x40)) /* 8 of these (0-7) */
#define IXGBE_TDPT2TCCR(_i) (0x0CD20 + ((_i) * 4)) /* 8 of these (0-7) */
#define IXGBE_TDPT2TCSR(_i) (0x0CD40 + ((_i) * 4)) /* 8 of these (0-7) */
-
+
+
+
/* Stats registers */
#define IXGBE_CRCERRS 0x04000
- #define IXGBE_ILLERRC 0x04004
@@ -224,7 +245,7 @@
#define IXGBE_XEC 0x04120
+#define IXGBE_MDIO_PHY_SPEED_ABILITY 0x4 /* Speed Ability Reg */
#define IXGBE_MDIO_PHY_SPEED_10G 0x0001 /* 10G capable */
#define IXGBE_MDIO_PHY_SPEED_1G 0x0010 /* 1G capable */
-
++
+#define IXGBE_MDIO_PMA_PMD_SDA_SCL_ADDR 0xC30A /* PHY_XS SDA/SCL Address Reg */
+#define IXGBE_MDIO_PMA_PMD_SDA_SCL_DATA 0xC30B /* PHY_XS SDA/SCL Data Reg */
+#define IXGBE_MDIO_PMA_PMD_SDA_SCL_STAT 0xC30C /* PHY_XS SDA/SCL Status Reg */
+#define IXGBE_MII_RESTART 0x200
+#define IXGBE_MII_AUTONEG_COMPLETE 0x20
+#define IXGBE_MII_AUTONEG_REG 0x0
-+
+
#define IXGBE_PHY_REVISION_MASK 0xFFFFFFF0
#define IXGBE_MAX_PHY_ADDR 32
#define IXGBE_IMIR_PORT_IM_EN 0x00010000 /* TCP port enable */
#define IXGBE_IMIR_PORT_BP 0x00020000 /* TCP port check bypass */
#define IXGBE_IMIREXT_SIZE_BP 0x00001000 /* Packet size bypass */
-@@ -623,6 +678,7 @@
+@@ -622,6 +677,7 @@
+ #define IXGBE_VLNCTRL_CFIEN 0x20000000 /* bit 29 */
#define IXGBE_VLNCTRL_VFE 0x40000000 /* bit 30 */
#define IXGBE_VLNCTRL_VME 0x80000000 /* bit 31 */
-
+
+
#define IXGBE_ETHERNET_IEEE_VLAN_TYPE 0x8100 /* 802.1q protocol */
- /* STATUS Bit Masks */
@@ -670,16 +726,16 @@
#define IXGBE_AUTOC_AN_RESTART 0x00001000
#define IXGBE_AUTOC_FLU 0x00000001
#define IXGBE_RXDADV_PKTTYPE_UDP 0x00000200 /* UDP hdr present */
#define IXGBE_RXDADV_PKTTYPE_SCTP 0x00000400 /* SCTP hdr present */
#define IXGBE_RXDADV_PKTTYPE_NFS 0x00000800 /* NFS hdr present */
--
- /* Masks to determine if packets should be dropped due to frame errors */
++/* Masks to determine if packets should be dropped due to frame errors */
++#define IXGBE_RXD_ERR_FRAME_ERR_MASK ( \
++ IXGBE_RXD_ERR_CE | \
++ IXGBE_RXD_ERR_LE | \
++ IXGBE_RXD_ERR_PE | \
++ IXGBE_RXD_ERR_OSE | \
++ IXGBE_RXD_ERR_USE)
+
+-/* Masks to determine if packets should be dropped due to frame errors */
-#define IXGBE_RXD_ERR_FRAME_ERR_MASK (\
- IXGBE_RXD_ERR_CE | \
- IXGBE_RXD_ERR_LE | \
- IXGBE_RXDADV_ERR_PE | \
- IXGBE_RXDADV_ERR_OSE | \
- IXGBE_RXDADV_ERR_USE)
-+#define IXGBE_RXD_ERR_FRAME_ERR_MASK ( \
-+ IXGBE_RXD_ERR_CE | \
-+ IXGBE_RXD_ERR_LE | \
-+ IXGBE_RXD_ERR_PE | \
-+ IXGBE_RXD_ERR_OSE | \
-+ IXGBE_RXD_ERR_USE)
-+
+#define IXGBE_RXDADV_ERR_FRAME_ERR_MASK ( \
+ IXGBE_RXDADV_ERR_CE | \
+ IXGBE_RXDADV_ERR_LE | \
/* Transmit Descriptor - Legacy */
struct ixgbe_legacy_tx_desc {
u64 buffer_addr; /* Address of the descriptor's data buffer */
-@@ -1007,15 +1064,15 @@ struct ixgbe_legacy_tx_desc {
+@@ -1007,15 +1064,15 @@
__le32 data;
struct {
__le16 length; /* Data buffer length */
__le16 vlan;
} fields;
} upper;
-@@ -1024,7 +1081,7 @@ struct ixgbe_legacy_tx_desc {
+@@ -1024,7 +1081,7 @@
/* Transmit Descriptor - Advanced */
union ixgbe_adv_tx_desc {
struct {
__le32 cmd_type_len;
__le32 olinfo_status;
} read;
-@@ -1039,9 +1096,9 @@ union ixgbe_adv_tx_desc {
+@@ -1039,9 +1096,9 @@
struct ixgbe_legacy_rx_desc {
__le64 buffer_addr; /* Address of the descriptor's data buffer */
__le16 length; /* Length of data DMAed into data buffer */
__le16 vlan;
};
-@@ -1053,15 +1110,18 @@ union ixgbe_adv_rx_desc {
+@@ -1053,15 +1110,18 @@
} read;
struct {
struct {
} csum_ip;
} hi_dword;
} lower;
-@@ -1082,49 +1142,69 @@ struct ixgbe_adv_tx_context_desc {
+@@ -1082,49 +1142,69 @@
};
/* Adv Transmit Descriptor Config Masks */
enum ixgbe_eeprom_type {
-@@ -1143,14 +1223,39 @@ enum ixgbe_phy_type {
+@@ -1143,14 +1223,39 @@
ixgbe_phy_unknown = 0,
ixgbe_phy_tn,
ixgbe_phy_qt,
};
/* Flow Control Settings */
-@@ -1167,6 +1272,8 @@ struct ixgbe_addr_filter_info {
+@@ -1167,6 +1272,8 @@
u32 rar_used_count;
u32 mc_addr_in_rar_count;
u32 mta_in_use;
};
/* Flow control parameters */
-@@ -1242,57 +1349,120 @@ struct ixgbe_hw_stats {
+@@ -1242,57 +1349,120 @@
/* forward declaration */
struct ixgbe_hw;
s32 (*setup_link)(struct ixgbe_hw *);
- s32 (*check_link)(struct ixgbe_hw *, u32 *, bool *);
- s32 (*setup_link_speed)(struct ixgbe_hw *, u32, bool, bool);
--};
--
--struct ixgbe_mac_info {
-- struct ixgbe_mac_operations ops;
-- enum ixgbe_mac_type type;
-- u8 addr[IXGBE_ETH_LENGTH_OF_ADDRESS];
-- u8 perm_addr[IXGBE_ETH_LENGTH_OF_ADDRESS];
-- s32 mc_filter_type;
-- u32 num_rx_queues;
-- u32 num_tx_queues;
-- u32 num_rx_addrs;
-- u32 link_attach_type;
-- u32 link_mode_select;
-- bool link_settings_loaded;
+ s32 (*setup_link_speed)(struct ixgbe_hw *, ixgbe_link_speed, bool,
+ bool);
+ s32 (*check_link)(struct ixgbe_hw *, ixgbe_link_speed *, bool *);
+ s32 (*write_i2c_byte)(struct ixgbe_hw *, u8, u8, u8);
+ s32 (*read_i2c_eeprom)(struct ixgbe_hw *, u8 , u8 *);
+ s32 (*write_i2c_eeprom)(struct ixgbe_hw *, u8, u8);
- };
-
- struct ixgbe_eeprom_info {
-- enum ixgbe_eeprom_type type;
-- u16 word_size;
-- u16 address_bits;
++};
++
++struct ixgbe_eeprom_info {
+ struct ixgbe_eeprom_operations ops;
+ enum ixgbe_eeprom_type type;
+ u32 semaphore_delay;
+ u16 address_bits;
};
--struct ixgbe_phy_info {
-- struct ixgbe_phy_operations ops;
+ struct ixgbe_mac_info {
+- struct ixgbe_mac_operations ops;
+- enum ixgbe_mac_type type;
+- u8 addr[IXGBE_ETH_LENGTH_OF_ADDRESS];
+- u8 perm_addr[IXGBE_ETH_LENGTH_OF_ADDRESS];
+- s32 mc_filter_type;
+- u32 num_rx_queues;
+- u32 num_tx_queues;
+- u32 num_rx_addrs;
+- u32 link_attach_type;
+- u32 link_mode_select;
+- bool link_settings_loaded;
+-};
-
-- enum ixgbe_phy_type type;
-- u32 addr;
-- u32 id;
-- u32 revision;
-- enum ixgbe_media_type media_type;
-- u32 autoneg_advertised;
-- bool autoneg_wait_to_complete;
-+struct ixgbe_mac_info {
+-struct ixgbe_eeprom_info {
+- enum ixgbe_eeprom_type type;
+- u16 word_size;
+- u16 address_bits;
+ struct ixgbe_mac_operations ops;
+ enum ixgbe_mac_type type;
+ u8 addr[IXGBE_ETH_LENGTH_OF_ADDRESS];
+ bool autoneg_failed;
};
+ struct ixgbe_phy_info {
+- struct ixgbe_phy_operations ops;
+-
+- enum ixgbe_phy_type type;
+- u32 addr;
+- u32 id;
+- u32 revision;
+- enum ixgbe_media_type media_type;
+- u32 autoneg_advertised;
+- bool autoneg_wait_to_complete;
+-};
+-
-struct ixgbe_info {
- enum ixgbe_mac_type mac;
- s32 (*get_invariants)(struct ixgbe_hw *);
- struct ixgbe_mac_operations *mac_ops;
-+struct ixgbe_phy_info {
+ struct ixgbe_phy_operations ops;
+ enum ixgbe_phy_type type;
+ u32 addr;
};
struct ixgbe_hw {
-@@ -1311,6 +1481,15 @@ struct ixgbe_hw {
+@@ -1310,6 +1480,15 @@
+ u8 revision_id;
bool adapter_stopped;
};
-
++
+struct ixgbe_info {
+ enum ixgbe_mac_type mac;
+ s32 (*get_invariants)(struct ixgbe_hw *);
+ struct ixgbe_phy_operations *phy_ops;
+};
+
-+
+
/* Error Codes */
#define IXGBE_ERR_EEPROM -1
- #define IXGBE_ERR_EEPROM_CHECKSUM -2
-@@ -1329,6 +1508,9 @@ struct ixgbe_hw {
+@@ -1329,6 +1508,9 @@
#define IXGBE_ERR_RESET_FAILED -15
#define IXGBE_ERR_SWFW_SYNC -16
#define IXGBE_ERR_PHY_ADDR_INVALID -17
#define IXGBE_NOT_IMPLEMENTED 0x7FFFFFFF
#endif /* _IXGBE_TYPE_H_ */
-diff -purN linux-2.6.27/drivers/net/mlx4/catas.c linux-2.6.27.19-5.1/drivers/net/mlx4/catas.c
---- linux-2.6.27/drivers/net/mlx4/catas.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/mlx4/catas.c 2009-03-25 16:11:04.000000000 +0000
-@@ -45,7 +45,7 @@ static LIST_HEAD(catas_list);
+diff -r 9608d5473017 drivers/net/mlx4/catas.c
+--- a/drivers/net/mlx4/catas.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/mlx4/catas.c Wed May 06 16:56:25 2009 +0100
+@@ -45,7 +45,7 @@
static struct workqueue_struct *catas_wq;
static struct work_struct catas_work;
module_param(internal_err_reset, int, 0644);
MODULE_PARM_DESC(internal_err_reset,
"Reset device on internal errors if non-zero (default 1)");
-diff -purN linux-2.6.27/drivers/net/myri_sbus.c linux-2.6.27.19-5.1/drivers/net/myri_sbus.c
---- linux-2.6.27/drivers/net/myri_sbus.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/myri_sbus.c 2009-03-25 16:11:04.000000000 +0000
-@@ -1150,6 +1150,7 @@ static struct of_device_id myri_sbus_mat
+diff -r 9608d5473017 drivers/net/myri_sbus.c
+--- a/drivers/net/myri_sbus.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/myri_sbus.c Wed May 06 16:56:25 2009 +0100
+@@ -1150,6 +1150,7 @@
MODULE_DEVICE_TABLE(of, myri_sbus_match);
static struct of_platform_driver myri_sbus_driver = {
.name = "myri",
.match_table = myri_sbus_match,
.probe = myri_sbus_probe,
-diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic.h linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic.h
---- linux-2.6.27/drivers/net/netxen/netxen_nic.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic.h 2009-03-25 16:11:07.000000000 +0000
+diff -r 9608d5473017 drivers/net/netxen/netxen_nic.h
+--- a/drivers/net/netxen/netxen_nic.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/netxen/netxen_nic.h Wed May 06 16:56:25 2009 +0100
@@ -146,7 +146,7 @@
#define MAX_RX_BUFFER_LENGTH 1760
#define MAX_RCVSTATUS_DESCRIPTORS MAX_RCV_DESCRIPTORS
#define MAX_JUMBO_RCV_DESC MAX_JUMBO_RCV_DESCRIPTORS
#define MAX_RCV_DESC MAX_RCV_DESCRIPTORS
-@@ -308,27 +308,16 @@ struct netxen_ring_ctx {
+@@ -308,27 +308,16 @@
#define netxen_set_cmd_desc_ctxid(cmd_desc, var) \
((cmd_desc)->port_ctxid |= ((var) << 4 & 0xF0))
-#define netxen_set_cmd_desc_opcode(cmd_desc, val) \
- (cmd_desc)->flags_opcode = ((cmd_desc)->flags_opcode & \
- ~cpu_to_le16((u16)0x3f << 7)) | cpu_to_le16(((val) & 0x3f) << 7)
--
++#define netxen_set_tx_port(_desc, _port) \
++ (_desc)->port_ctxid = ((_port) & 0xf) | (((_port) << 4) & 0xf0)
+
-#define netxen_set_cmd_desc_num_of_buff(cmd_desc, val) \
- (cmd_desc)->num_of_buffers_total_length = \
- ((cmd_desc)->num_of_buffers_total_length & \
- ((cmd_desc)->num_of_buffers_total_length & \
- ~cpu_to_le32((u32)0xffffff << 8)) | \
- cpu_to_le32(((val) & 0xffffff) << 8)
--
++#define netxen_set_tx_flags_opcode(_desc, _flags, _opcode) \
++ (_desc)->flags_opcode = \
++ cpu_to_le16(((_flags) & 0x7f) | (((_opcode) & 0x3f) << 7))
+
-#define netxen_get_cmd_desc_opcode(cmd_desc) \
- ((le16_to_cpu((cmd_desc)->flags_opcode) >> 7) & 0x003f)
-#define netxen_get_cmd_desc_totallength(cmd_desc) \
- ((le32_to_cpu((cmd_desc)->num_of_buffers_total_length) >> 8) & 0xffffff)
-+#define netxen_set_tx_port(_desc, _port) \
-+ (_desc)->port_ctxid = ((_port) & 0xf) | (((_port) << 4) & 0xf0)
-+
-+#define netxen_set_tx_flags_opcode(_desc, _flags, _opcode) \
-+ (_desc)->flags_opcode = \
-+ cpu_to_le16(((_flags) & 0x7f) | (((_opcode) & 0x3f) << 7))
-+
+#define netxen_set_tx_frags_len(_desc, _frags, _len) \
+ (_desc)->num_of_buffers_total_length = \
+ cpu_to_le32(((_frags) & 0xff) | (((_len) & 0xffffff) << 8))
struct cmd_desc_type0 {
u8 tcp_hdr_offset; /* For LSO only */
-@@ -510,7 +499,8 @@ typedef enum {
+@@ -510,7 +499,8 @@
NETXEN_BRDTYPE_P3_10G_SFP_CT = 0x002a,
NETXEN_BRDTYPE_P3_10G_SFP_QT = 0x002b,
NETXEN_BRDTYPE_P3_10G_CX4 = 0x0031,
} netxen_brdtype_t;
-@@ -757,7 +747,7 @@ extern char netxen_nic_driver_name[];
+@@ -757,7 +747,7 @@
*/
struct netxen_skb_frag {
u64 dma;
};
#define _netxen_set_bits(config_word, start, bits, val) {\
-@@ -783,13 +773,7 @@ struct netxen_skb_frag {
+@@ -783,13 +773,7 @@
struct netxen_cmd_buffer {
struct sk_buff *skb;
struct netxen_skb_frag frag_array[MAX_BUFFERS_PER_CMD + 1];
};
/* In rx_buffer, we do not need multiple fragments as is a single buffer */
-@@ -876,7 +860,6 @@ struct nx_host_rds_ring {
+@@ -876,7 +860,6 @@
u32 skb_size;
struct netxen_rx_buffer *rx_buf_arr; /* rx buffers for receive */
struct list_head free_list;
};
/*
-@@ -995,31 +978,31 @@ struct netxen_recv_context {
+@@ -995,31 +978,31 @@
*/
typedef struct {
u8 reserved[128]; /* reserve space for future expansion*/
/* MUST BE 64-bit aligned.
The following is packed:
-@@ -1029,24 +1012,24 @@ typedef struct {
+@@ -1029,24 +1012,24 @@
} nx_hostrq_rx_ctx_t;
typedef struct {
u8 phys_port; /* Physical id of port */
u8 virt_port; /* Virtual/Logical id of port */
u8 reserved[128]; /* save space for future expansion */
-@@ -1072,34 +1055,34 @@ typedef struct {
+@@ -1072,34 +1055,34 @@
*/
typedef struct {
u8 phys_port; /* Physical id of port */
u8 virt_port; /* Virtual/Logical id of port */
nx_cardrsp_cds_ring_t cds_ring; /* Card cds settings */
-@@ -1202,9 +1185,9 @@ enum {
+@@ -1202,9 +1185,9 @@
#define VPORT_MISS_MODE_ACCEPT_MULTI 2 /* accept unmatched multicast */
typedef struct {
} nx_nic_req_t;
typedef struct {
-@@ -1486,8 +1469,6 @@ void netxen_release_tx_buffers(struct ne
+@@ -1486,8 +1469,6 @@
void netxen_initialize_adapter_ops(struct netxen_adapter *adapter);
int netxen_init_firmware(struct netxen_adapter *adapter);
void netxen_nic_clear_stats(struct netxen_adapter *adapter);
void netxen_watchdog_task(struct work_struct *work);
void netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ctx,
-@@ -1496,6 +1477,7 @@ int netxen_process_cmd_ring(struct netxe
+@@ -1496,6 +1477,7 @@
u32 netxen_process_rcv_ring(struct netxen_adapter *adapter, int ctx, int max);
void netxen_p2_nic_set_multi(struct net_device *netdev);
void netxen_p3_nic_set_multi(struct net_device *netdev);
int netxen_p3_nic_set_promisc(struct netxen_adapter *adapter, u32);
int netxen_config_intr_coalesce(struct netxen_adapter *adapter);
-diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ctx.c linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_ctx.c
---- linux-2.6.27/drivers/net/netxen/netxen_nic_ctx.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_ctx.c 2009-03-25 16:11:07.000000000 +0000
-@@ -76,7 +76,7 @@ netxen_api_unlock(struct netxen_adapter
+diff -r 9608d5473017 drivers/net/netxen/netxen_nic_ctx.c
+--- a/drivers/net/netxen/netxen_nic_ctx.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/netxen/netxen_nic_ctx.c Wed May 06 16:56:25 2009 +0100
+@@ -76,7 +76,7 @@
static u32
netxen_poll_rsp(struct netxen_adapter *adapter)
{
int timeout = 0;
do {
-@@ -86,10 +86,7 @@ netxen_poll_rsp(struct netxen_adapter *a
+@@ -86,10 +86,7 @@
if (++timeout > NX_OS_CRB_RETRY_COUNT)
return NX_CDRP_RSP_TIMEOUT;
} while (!NX_CDRP_IS_RSP(rsp));
return rsp;
-@@ -109,20 +106,16 @@ netxen_issue_cmd(struct netxen_adapter *
+@@ -109,20 +106,16 @@
if (netxen_api_lock(adapter))
return NX_RCODE_TIMEOUT;
rsp = netxen_poll_rsp(adapter);
-@@ -133,7 +126,6 @@ netxen_issue_cmd(struct netxen_adapter *
+@@ -133,7 +126,6 @@
rcode = NX_RCODE_TIMEOUT;
} else if (rsp == NX_CDRP_RSP_FAIL) {
netxen_nic_read_w1(adapter, NX_ARG1_CRB_OFFSET, &rcode);
printk(KERN_ERR "%s: failed card response code:0x%x\n",
netxen_nic_driver_name, rcode);
-@@ -183,7 +175,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_ad
+@@ -183,7 +175,7 @@
int i, nrds_rings, nsds_rings;
size_t rq_size, rsp_size;
int err;
-@@ -225,11 +217,14 @@ nx_fw_cmd_create_rx_ctx(struct netxen_ad
+@@ -225,11 +217,14 @@
prq->num_rds_rings = cpu_to_le16(nrds_rings);
prq->num_sds_rings = cpu_to_le16(nsds_rings);
for (i = 0; i < nrds_rings; i++) {
-@@ -241,17 +236,14 @@ nx_fw_cmd_create_rx_ctx(struct netxen_ad
+@@ -241,17 +236,14 @@
prq_rds[i].buff_size = cpu_to_le64(rds_ring->dma_size);
}
phys_addr = hostrq_phys_addr;
err = netxen_issue_cmd(adapter,
-@@ -269,9 +261,9 @@ nx_fw_cmd_create_rx_ctx(struct netxen_ad
+@@ -269,9 +261,9 @@
prsp_rds = ((nx_cardrsp_rds_ring_t *)
rds_ring = &recv_ctx->rds_rings[i];
reg = le32_to_cpu(prsp_rds[i].host_producer_crb);
-@@ -279,7 +271,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_ad
+@@ -279,7 +271,7 @@
}
prsp_sds = ((nx_cardrsp_sds_ring_t *)
reg = le32_to_cpu(prsp_sds[0].host_consumer_crb);
recv_ctx->crb_sts_consumer = NETXEN_NIC_REG(reg - 0x200);
-@@ -288,7 +280,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_ad
+@@ -288,7 +280,7 @@
recv_ctx->state = le32_to_cpu(prsp->host_ctx_state);
recv_ctx->context_id = le16_to_cpu(prsp->context_id);
out_free_rsp:
pci_free_consistent(adapter->pdev, rsp_size, prsp, cardrsp_phys_addr);
-diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ethtool.c linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_ethtool.c
---- linux-2.6.27/drivers/net/netxen/netxen_nic_ethtool.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_ethtool.c 2009-03-25 16:11:07.000000000 +0000
-@@ -136,11 +136,9 @@ netxen_nic_get_settings(struct net_devic
+diff -r 9608d5473017 drivers/net/netxen/netxen_nic_ethtool.c
+--- a/drivers/net/netxen/netxen_nic_ethtool.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/netxen/netxen_nic_ethtool.c Wed May 06 16:56:25 2009 +0100
+@@ -136,11 +136,9 @@
ecmd->port = PORT_TP;
} else if (adapter->ahw.board_type == NETXEN_NIC_XGBE) {
u32 val;
-@@ -171,7 +169,7 @@ netxen_nic_get_settings(struct net_devic
+@@ -171,7 +169,7 @@
} else
return -EIO;
ecmd->transceiver = XCVR_EXTERNAL;
switch ((netxen_brdtype_t) boardinfo->board_type) {
-@@ -180,13 +178,13 @@ netxen_nic_get_settings(struct net_devic
+@@ -180,13 +178,13 @@
case NETXEN_BRDTYPE_P3_REF_QG:
case NETXEN_BRDTYPE_P3_4_GB:
case NETXEN_BRDTYPE_P3_4_GB_MM:
ecmd->supported |= SUPPORTED_TP;
ecmd->advertising |= ADVERTISED_TP;
ecmd->port = PORT_TP;
-@@ -204,16 +202,33 @@ netxen_nic_get_settings(struct net_devic
+@@ -204,15 +202,32 @@
ecmd->port = PORT_FIBRE;
ecmd->autoneg = AUTONEG_DISABLE;
break;
ecmd->advertising |= ADVERTISED_FIBRE;
ecmd->port = PORT_FIBRE;
ecmd->autoneg = AUTONEG_DISABLE;
- break;
++ break;
+ case NETXEN_BRDTYPE_P3_10G_TP:
+ if (adapter->ahw.board_type == NETXEN_NIC_XGBE) {
+ ecmd->autoneg = AUTONEG_DISABLE;
+ (ADVERTISED_TP | ADVERTISED_Autoneg);
+ ecmd->port = PORT_TP;
+ }
-+ break;
+ break;
default:
printk(KERN_ERR "netxen-nic: Unsupported board model %d\n",
- (netxen_brdtype_t) boardinfo->board_type);
-@@ -546,7 +561,10 @@ netxen_nic_get_ringparam(struct net_devi
+@@ -546,7 +561,10 @@
}
ring->tx_pending = adapter->max_tx_desc_count;
ring->tx_max_pending = MAX_CMD_DESCRIPTORS_HOST;
ring->rx_jumbo_max_pending = MAX_JUMBO_RCV_DESCRIPTORS;
ring->rx_mini_max_pending = 0;
-diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_hw.c
---- linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_hw.c 2009-03-25 16:11:07.000000000 +0000
-@@ -503,17 +503,15 @@ netxen_send_cmd_descs(struct netxen_adap
+diff -r 9608d5473017 drivers/net/netxen/netxen_nic_hw.c
+--- a/drivers/net/netxen/netxen_nic_hw.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/netxen/netxen_nic_hw.c Wed May 06 16:56:25 2009 +0100
+@@ -503,17 +503,15 @@
i = 0;
/* adapter->ahw.cmd_desc_head[producer] = *cmd_desc; */
memcpy(&adapter->ahw.cmd_desc_head[producer],
-@@ -531,6 +529,8 @@ netxen_send_cmd_descs(struct netxen_adap
+@@ -531,6 +529,8 @@
netxen_nic_update_cmd_producer(adapter, adapter->cmd_producer);
return 0;
}
-@@ -539,16 +539,19 @@ static int nx_p3_sre_macaddr_change(stru
+@@ -539,16 +539,19 @@
{
struct netxen_adapter *adapter = (struct netxen_adapter *)dev->priv;
nx_nic_req_t req;
rv = netxen_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1);
if (rv != 0) {
-@@ -612,18 +615,35 @@ send_fw_cmd:
+@@ -612,16 +615,33 @@
int netxen_p3_nic_set_promisc(struct netxen_adapter *adapter, u32 mode)
{
nx_nic_req_t req;
return netxen_send_cmd_descs(adapter,
(struct cmd_desc_type0 *)&req, 1);
- }
-
++}
++
+void netxen_p3_free_mac_list(struct netxen_adapter *adapter)
+{
+ nx_mac_list_t *cur, *next;
+ kfree(cur);
+ cur = next;
+ }
-+}
-+
- #define NETXEN_CONFIG_INTR_COALESCE 3
+ }
- /*
-@@ -632,13 +652,15 @@ int netxen_p3_nic_set_promisc(struct net
+ #define NETXEN_CONFIG_INTR_COALESCE 3
+@@ -632,13 +652,15 @@
int netxen_config_intr_coalesce(struct netxen_adapter *adapter)
{
nx_nic_req_t req;
memcpy(&req.words[0], &adapter->coal, sizeof(adapter->coal));
-@@ -772,13 +794,10 @@ int netxen_p3_get_mac_addr(struct netxen
+@@ -772,13 +794,10 @@
adapter->hw_read_wx(adapter, crbaddr, &mac_lo, 4);
adapter->hw_read_wx(adapter, crbaddr+4, &mac_hi, 4);
return 0;
}
-@@ -937,7 +956,7 @@ int netxen_load_firmware(struct netxen_a
+@@ -937,7 +956,7 @@
{
int i;
u32 data, size = 0;
size = (NETXEN_IMAGE_START - NETXEN_BOOTLD_START)/4;
-@@ -949,10 +968,8 @@ int netxen_load_firmware(struct netxen_a
+@@ -949,10 +968,8 @@
if (netxen_rom_fast_read(adapter, flashaddr, (int *)&data) != 0)
return -EIO;
}
msleep(1);
-@@ -2034,7 +2051,13 @@ int netxen_nic_get_board_info(struct net
+@@ -2034,7 +2051,13 @@
rv = -1;
}
switch ((netxen_brdtype_t) boardinfo->board_type) {
case NETXEN_BRDTYPE_P2_SB35_4G:
adapter->ahw.board_type = NETXEN_NIC_GBE;
-@@ -2053,7 +2076,6 @@ int netxen_nic_get_board_info(struct net
+@@ -2053,7 +2076,6 @@
case NETXEN_BRDTYPE_P3_10G_SFP_QT:
case NETXEN_BRDTYPE_P3_10G_XFP:
case NETXEN_BRDTYPE_P3_10000_BASE_T:
adapter->ahw.board_type = NETXEN_NIC_XGBE;
break;
case NETXEN_BRDTYPE_P1_BD:
-@@ -2063,9 +2085,12 @@ int netxen_nic_get_board_info(struct net
+@@ -2063,8 +2085,11 @@
case NETXEN_BRDTYPE_P3_REF_QG:
case NETXEN_BRDTYPE_P3_4_GB:
case NETXEN_BRDTYPE_P3_4_GB_MM:
-
adapter->ahw.board_type = NETXEN_NIC_GBE;
- break;
++ break;
+ case NETXEN_BRDTYPE_P3_10G_TP:
+ adapter->ahw.board_type = (adapter->portnum < 2) ?
+ NETXEN_NIC_XGBE : NETXEN_NIC_GBE;
-+ break;
+ break;
default:
printk("%s: Unknown(%x)\n", netxen_nic_driver_name,
- boardinfo->board_type);
-@@ -2110,12 +2135,16 @@ void netxen_nic_set_link_parameters(stru
+@@ -2110,12 +2135,16 @@
{
__u32 status;
__u32 autoneg;
adapter->hw_read_wx(adapter,
NETXEN_PORT_MODE_ADDR, &port_mode, 4);
if (port_mode == NETXEN_PORT_MODE_802_3_AP) {
-@@ -2141,7 +2170,7 @@ void netxen_nic_set_link_parameters(stru
+@@ -2141,7 +2170,7 @@
adapter->link_speed = SPEED_1000;
break;
default:
break;
}
switch (netxen_get_phy_duplex(status)) {
-@@ -2164,7 +2193,7 @@ void netxen_nic_set_link_parameters(stru
+@@ -2164,7 +2193,7 @@
goto link_down;
} else {
link_down:
adapter->link_duplex = -1;
}
}
-diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_init.c linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_init.c
---- linux-2.6.27/drivers/net/netxen/netxen_nic_init.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_init.c 2009-03-25 16:11:07.000000000 +0000
-@@ -308,7 +308,6 @@ int netxen_alloc_sw_resources(struct net
+diff -r 9608d5473017 drivers/net/netxen/netxen_nic_init.c
+--- a/drivers/net/netxen/netxen_nic_init.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/netxen/netxen_nic_init.c Wed May 06 16:56:25 2009 +0100
+@@ -308,7 +308,6 @@
}
memset(rds_ring->rx_buf_arr, 0, RCV_BUFFSIZE);
INIT_LIST_HEAD(&rds_ring->free_list);
/*
* Now go through all of them, set reference handles
* and put them in the queues.
-@@ -439,6 +438,8 @@ static int netxen_wait_rom_done(struct n
+@@ -439,6 +438,8 @@
long timeout = 0;
long done = 0;
while (done == 0) {
done = netxen_nic_reg_read(adapter, NETXEN_ROMUSB_GLB_STATUS);
done &= 2;
-@@ -533,12 +534,9 @@ static int do_rom_fast_write(struct netx
+@@ -533,12 +534,9 @@
static int do_rom_fast_read(struct netxen_adapter *adapter,
int addr, int *valp)
{
- cond_resched();
-
netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_ADDRESS, addr);
-- netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_ABYTE_CNT, 3);
++ netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_DUMMY_BYTE_CNT, 0);
+ netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_ABYTE_CNT, 3);
- udelay(100); /* prevent bursting on CRB */
- netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_DUMMY_BYTE_CNT, 0);
-+ netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_ABYTE_CNT, 3);
+- netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_DUMMY_BYTE_CNT, 0);
netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_INSTR_OPCODE, 0xb);
if (netxen_wait_rom_done(adapter)) {
printk("Error waiting for rom done\n");
-@@ -546,7 +544,7 @@ static int do_rom_fast_read(struct netxe
+@@ -546,7 +544,7 @@
}
/* reset abyte_cnt and dummy_byte_cnt */
netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_ABYTE_CNT, 0);
netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_DUMMY_BYTE_CNT, 0);
*valp = netxen_nic_reg_read(adapter, NETXEN_ROMUSB_ROM_RDATA);
-@@ -884,14 +882,16 @@ int netxen_flash_unlock(struct netxen_ad
+@@ -884,14 +882,16 @@
int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose)
{
int addr, val;
if (verbose) {
if (netxen_rom_fast_read(adapter, NETXEN_BOARDTYPE, &val) == 0)
-@@ -910,7 +910,7 @@ int netxen_pinit_from_rom(struct netxen_
+@@ -910,7 +910,7 @@
if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) {
if (netxen_rom_fast_read(adapter, 0, &n) != 0 ||
netxen_rom_fast_read(adapter, 4, &n) != 0) {
printk(KERN_ERR "%s: ERROR Reading crb_init area: "
"n: %08x\n", netxen_nic_driver_name, n);
-@@ -947,8 +947,10 @@ int netxen_pinit_from_rom(struct netxen_
+@@ -947,8 +947,10 @@
}
for (i = 0; i < n; i++) {
if (netxen_rom_fast_read(adapter, 8*i + 4*offset, &val) != 0 ||
buf[i].addr = addr;
buf[i].data = val;
-@@ -975,6 +977,14 @@ int netxen_pinit_from_rom(struct netxen_
+@@ -975,6 +977,14 @@
/* do not reset PCI */
if (off == (ROMUSB_GLB + 0xbc))
continue;
if (off == (NETXEN_CRB_PEG_NET_1 + 0x18))
buf[i].data = 0x1020;
/* skip the function enable register */
-@@ -992,23 +1002,21 @@ int netxen_pinit_from_rom(struct netxen_
+@@ -992,23 +1002,21 @@
continue;
}
}
kfree(buf);
-@@ -1277,7 +1285,7 @@ static void netxen_process_rcv(struct ne
+@@ -1277,7 +1285,7 @@
dev_kfree_skb_any(skb);
for (i = 0; i < nr_frags; i++) {
skb = netxen_process_rxbuf(adapter,
rds_ring, index, cksum);
if (skb)
-@@ -1430,7 +1438,6 @@ void netxen_post_rx_buffers(struct netxe
+@@ -1430,7 +1438,6 @@
struct rcv_desc *pdesc;
struct netxen_rx_buffer *buffer;
int count = 0;
netxen_ctx_msg msg = 0;
dma_addr_t dma;
struct list_head *head;
-@@ -1438,7 +1445,6 @@ void netxen_post_rx_buffers(struct netxe
+@@ -1438,7 +1445,6 @@
rds_ring = &recv_ctx->rds_rings[ringid];
producer = rds_ring->producer;
head = &rds_ring->free_list;
/* We can start writing rx descriptors into the phantom memory. */
-@@ -1446,39 +1452,37 @@ void netxen_post_rx_buffers(struct netxe
+@@ -1446,39 +1452,37 @@
skb = dev_alloc_skb(rds_ring->skb_size);
if (unlikely(!skb)) {
rds_ring->producer = producer;
/* Window = 1 */
adapter->pci_write_normalize(adapter,
-@@ -1517,49 +1521,50 @@ static void netxen_post_rx_buffers_nodb(
+@@ -1517,49 +1521,50 @@
struct rcv_desc *pdesc;
struct netxen_rx_buffer *buffer;
int count = 0;
rds_ring->producer = producer;
/* Window = 1 */
adapter->pci_write_normalize(adapter,
-diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_main.c
---- linux-2.6.27/drivers/net/netxen/netxen_nic_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_main.c 2009-03-25 16:11:07.000000000 +0000
+diff -r 9608d5473017 drivers/net/netxen/netxen_nic_main.c
+--- a/drivers/net/netxen/netxen_nic_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/netxen/netxen_nic_main.c Wed May 06 16:56:25 2009 +0100
@@ -39,7 +39,9 @@
#include "netxen_nic_phan_reg.h"
MODULE_DESCRIPTION("NetXen Multi port (1/10) Gigabit Network Driver");
MODULE_LICENSE("GPL");
-@@ -241,8 +243,8 @@ static void netxen_check_options(struct
+@@ -241,14 +243,22 @@
case NETXEN_BRDTYPE_P3_REF_QG:
case NETXEN_BRDTYPE_P3_4_GB:
case NETXEN_BRDTYPE_P3_4_GB_MM:
break;
case NETXEN_BRDTYPE_P2_SB35_4G:
-@@ -251,6 +253,14 @@ static void netxen_check_options(struct
+ case NETXEN_BRDTYPE_P2_SB31_2G:
+ adapter->msix_supported = 0;
adapter->max_rx_desc_count = MAX_RCV_DESCRIPTORS_1G;
- break;
-
++ break;
++
+ case NETXEN_BRDTYPE_P3_10G_TP:
+ adapter->msix_supported = !!use_msi_x;
+ if (adapter->ahw.board_type == NETXEN_NIC_XGBE)
+ adapter->max_rx_desc_count = MAX_RCV_DESCRIPTORS_10G;
+ else
+ adapter->max_rx_desc_count = MAX_RCV_DESCRIPTORS_1G;
-+ break;
-+
+ break;
+
default:
- adapter->msix_supported = 0;
- adapter->max_rx_desc_count = MAX_RCV_DESCRIPTORS_1G;
-@@ -271,10 +281,15 @@ static void netxen_check_options(struct
+@@ -271,10 +281,15 @@
static int
netxen_check_hw_init(struct netxen_adapter *adapter, int first_boot)
{
/* PCI bus master workaround */
adapter->hw_read_wx(adapter,
-@@ -294,18 +309,26 @@ netxen_check_hw_init(struct netxen_adapt
+@@ -294,18 +309,26 @@
/* clear the register for future unloads/loads */
adapter->pci_write_normalize(adapter,
NETXEN_CAM_RAM(0x1fc), 0);
}
static void netxen_set_port_mode(struct netxen_adapter *adapter)
-@@ -773,8 +796,8 @@ netxen_nic_probe(struct pci_dev *pdev, c
+@@ -773,8 +796,8 @@
CRB_CMDPEG_STATE, 0);
netxen_pinit_from_rom(adapter, 0);
msleep(1);
if (NX_IS_REVISION_P3(revision_id))
netxen_pcie_strap_init(adapter);
-@@ -790,13 +813,6 @@ netxen_nic_probe(struct pci_dev *pdev, c
+@@ -790,13 +813,6 @@
}
err = netxen_initialize_adapter_offload(adapter);
if (err)
goto err_out_iounmap;
-@@ -810,7 +826,9 @@ netxen_nic_probe(struct pci_dev *pdev, c
+@@ -810,7 +826,9 @@
adapter->pci_write_normalize(adapter, CRB_DRIVER_VERSION, i);
/* Handshake with the card before we register the devices. */
} /* first_driver */
-@@ -914,6 +932,7 @@ err_out_disable_msi:
+@@ -914,6 +932,7 @@
if (adapter->flags & NETXEN_NIC_MSI_ENABLED)
pci_disable_msi(pdev);
if (first_driver)
netxen_free_adapter_offload(adapter);
-@@ -957,6 +976,9 @@ static void __devexit netxen_nic_remove(
+@@ -957,6 +976,9 @@
netxen_free_hw_resources(adapter);
netxen_release_rx_buffers(adapter);
netxen_free_sw_resources(adapter);
}
if (adapter->portnum == 0)
-@@ -972,8 +994,10 @@ static void __devexit netxen_nic_remove(
+@@ -972,8 +994,10 @@
iounmap(adapter->ahw.db_base);
iounmap(adapter->ahw.pci_base0);
pci_release_regions(pdev);
pci_disable_device(pdev);
-@@ -1126,29 +1150,72 @@ static int netxen_nic_close(struct net_d
+@@ -1126,29 +1150,72 @@
return 0;
}
- if (desc->mss) {
- desc->total_hdr_length = (sizeof(struct ethhdr) +
- ip_hdrlen(skb) + tcp_hdrlen(skb));
--
++ bool tso = false;
++ u8 opcode = TX_ETHER_PKT;
++ __be16 protocol = skb->protocol;
++ u16 flags = 0;
+
- if ((NX_IS_REVISION_P3(adapter->ahw.revision_id)) &&
- (skb->protocol == htons(ETH_P_IPV6)))
- netxen_set_cmd_desc_opcode(desc, TX_TCP_LSO6);
- else
- netxen_set_cmd_desc_opcode(desc, TX_TCP_LSO);
-+ bool tso = false;
-+ u8 opcode = TX_ETHER_PKT;
-+ __be16 protocol = skb->protocol;
-+ u16 flags = 0;
-+
+ if (protocol == __constant_htons(ETH_P_8021Q)) {
+ struct vlan_ethhdr *vh = (struct vlan_ethhdr *)skb->data;
+ protocol = vh->h_vlan_encapsulated_proto;
}
static int netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
-@@ -1156,33 +1223,22 @@ static int netxen_nic_xmit_frame(struct
+@@ -1156,33 +1223,22 @@
struct netxen_adapter *adapter = netdev_priv(netdev);
struct netxen_hardware_context *hw = &adapter->ahw;
unsigned int first_seg_len = skb->len - skb->data_len;
producer = adapter->cmd_producer;
smp_mb();
-@@ -1194,34 +1250,26 @@ static int netxen_nic_xmit_frame(struct
+@@ -1194,34 +1250,26 @@
}
/* Copy the descriptors into the hardware */
hwdesc->buffer1_length = cpu_to_le16(first_seg_len);
hwdesc->addr_buffer1 = cpu_to_le64(buffrag->dma);
-@@ -1229,7 +1277,6 @@ static int netxen_nic_xmit_frame(struct
+@@ -1229,7 +1277,6 @@
struct skb_frag_struct *frag;
int len, temp_len;
unsigned long offset;
/* move to next desc. if there is a need */
if ((i & 0x3) == 0) {
-@@ -1245,8 +1292,12 @@ static int netxen_nic_xmit_frame(struct
+@@ -1245,8 +1292,12 @@
offset = frag->page_offset;
temp_len = len;
buffrag++;
buffrag->dma = temp_dma;
-@@ -1274,16 +1325,12 @@ static int netxen_nic_xmit_frame(struct
+@@ -1274,16 +1325,12 @@
}
producer = get_next_index(producer, num_txd);
if (hdr_len > (sizeof(struct cmd_desc_type0) - 2)) {
first_hdr_len = sizeof(struct cmd_desc_type0) - 2;
more_hdr = 1;
-@@ -1325,6 +1372,11 @@ static int netxen_nic_xmit_frame(struct
+@@ -1324,6 +1371,11 @@
+ adapter->stats.xmitcalled++;
netdev->trans_start = jiffies;
- return NETDEV_TX_OK;
++ return NETDEV_TX_OK;
+
+drop_packet:
+ adapter->stats.txdropped++;
+ dev_kfree_skb_any(skb);
-+ return NETDEV_TX_OK;
+ return NETDEV_TX_OK;
}
- static int netxen_nic_check_temp(struct netxen_adapter *adapter)
-@@ -1396,6 +1448,8 @@ static void netxen_nic_handle_phy_intr(s
+@@ -1396,6 +1448,8 @@
netif_carrier_off(netdev);
netif_stop_queue(netdev);
}
} else if (!adapter->ahw.linkup && linkup) {
printk(KERN_INFO "%s: %s NIC Link is up\n",
netxen_nic_driver_name, netdev->name);
-@@ -1404,6 +1458,8 @@ static void netxen_nic_handle_phy_intr(s
+@@ -1404,6 +1458,8 @@
netif_carrier_on(netdev);
netif_wake_queue(netdev);
}
}
}
-diff -purN linux-2.6.27/drivers/net/niu.c linux-2.6.27.19-5.1/drivers/net/niu.c
---- linux-2.6.27/drivers/net/niu.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/niu.c 2009-03-25 16:11:07.000000000 +0000
-@@ -51,8 +51,7 @@ MODULE_VERSION(DRV_MODULE_VERSION);
+diff -r 9608d5473017 drivers/net/niu.c
+--- a/drivers/net/niu.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/niu.c Wed May 06 16:56:25 2009 +0100
+@@ -51,8 +51,7 @@
#ifndef readq
static u64 readq(void __iomem *reg)
{
}
static void writeq(u64 val, void __iomem *reg)
-@@ -9140,6 +9139,7 @@ static struct of_device_id niu_match[] =
+@@ -9140,6 +9139,7 @@
MODULE_DEVICE_TABLE(of, niu_match);
static struct of_platform_driver niu_of_driver = {
.name = "niu",
.match_table = niu_match,
.probe = niu_of_probe,
-diff -purN linux-2.6.27/drivers/net/pcmcia/axnet_cs.c linux-2.6.27.19-5.1/drivers/net/pcmcia/axnet_cs.c
---- linux-2.6.27/drivers/net/pcmcia/axnet_cs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/pcmcia/axnet_cs.c 2009-03-25 16:11:06.000000000 +0000
-@@ -787,6 +787,7 @@ static struct pcmcia_device_id axnet_ids
+diff -r 9608d5473017 drivers/net/pcmcia/axnet_cs.c
+--- a/drivers/net/pcmcia/axnet_cs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/pcmcia/axnet_cs.c Wed May 06 16:56:25 2009 +0100
+@@ -787,6 +787,7 @@
PCMCIA_DEVICE_PROD_ID12("IO DATA", "ETXPCM", 0x547e66dc, 0x233adac2),
PCMCIA_DEVICE_PROD_ID12("Linksys", "EtherFast 10/100 PC Card (PCMPC100 V3)", 0x0733cc81, 0x232019a8),
PCMCIA_DEVICE_PROD_ID12("MELCO", "LPC3-TX", 0x481e0094, 0xf91af609),
PCMCIA_DEVICE_PROD_ID12("PCMCIA", "100BASE", 0x281f1c5d, 0x7c2add04),
PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FastEtherCard", 0x281f1c5d, 0x7ef26116),
PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FEP501", 0x281f1c5d, 0x2e272058),
-diff -purN linux-2.6.27/drivers/net/pcmcia/pcnet_cs.c linux-2.6.27.19-5.1/drivers/net/pcmcia/pcnet_cs.c
---- linux-2.6.27/drivers/net/pcmcia/pcnet_cs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/pcmcia/pcnet_cs.c 2009-03-25 16:11:06.000000000 +0000
-@@ -1697,7 +1697,6 @@ static struct pcmcia_device_id pcnet_ids
+diff -r 9608d5473017 drivers/net/pcmcia/pcnet_cs.c
+--- a/drivers/net/pcmcia/pcnet_cs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/pcmcia/pcnet_cs.c Wed May 06 16:56:25 2009 +0100
+@@ -1697,7 +1697,6 @@
PCMCIA_DEVICE_PROD_ID12("National Semiconductor", "InfoMover NE4100", 0x36e1191f, 0xa6617ec8),
PCMCIA_DEVICE_PROD_ID12("NEC", "PC-9801N-J12", 0x18df0ba0, 0xbc912d76),
PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA410TX", 0x9aa79dc3, 0x60e5bc0e),
PCMCIA_DEVICE_PROD_ID12("Network Everywhere", "Fast Ethernet 10/100 PC Card", 0x820a67b6, 0x31ed1a5f),
PCMCIA_DEVICE_PROD_ID12("NextCom K.K.", "Next Hawk", 0xaedaec74, 0xad050ef1),
PCMCIA_DEVICE_PROD_ID12("PCMCIA", "10/100Mbps Ethernet Card", 0x281f1c5d, 0x6e41773b),
-diff -purN linux-2.6.27/drivers/net/phy/broadcom.c linux-2.6.27.19-5.1/drivers/net/phy/broadcom.c
---- linux-2.6.27/drivers/net/phy/broadcom.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/phy/broadcom.c 2009-03-25 16:11:07.000000000 +0000
-@@ -402,14 +402,29 @@ static struct phy_driver bcm5481_driver
+diff -r 9608d5473017 drivers/net/phy/broadcom.c
+--- a/drivers/net/phy/broadcom.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/phy/broadcom.c Wed May 06 16:56:25 2009 +0100
+@@ -402,14 +402,29 @@
};
static struct phy_driver bcm5482_driver = {
.ack_interrupt = bcm54xx_ack_interrupt,
.config_intr = bcm54xx_config_intr,
.driver = { .owner = THIS_MODULE },
-@@ -437,8 +452,13 @@ static int __init broadcom_init(void)
+@@ -437,8 +452,13 @@
ret = phy_driver_register(&bcm5482_driver);
if (ret)
goto out_5482;
out_5482:
phy_driver_unregister(&bcm5481_driver);
out_5481:
-diff -purN linux-2.6.27/drivers/net/phy/mdio-ofgpio.c linux-2.6.27.19-5.1/drivers/net/phy/mdio-ofgpio.c
---- linux-2.6.27/drivers/net/phy/mdio-ofgpio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/phy/mdio-ofgpio.c 2009-03-25 16:11:07.000000000 +0000
-@@ -185,6 +185,7 @@ static struct of_device_id mdio_ofgpio_m
+diff -r 9608d5473017 drivers/net/phy/mdio-ofgpio.c
+--- a/drivers/net/phy/mdio-ofgpio.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/phy/mdio-ofgpio.c Wed May 06 16:56:26 2009 +0100
+@@ -185,6 +185,7 @@
};
static struct of_platform_driver mdio_ofgpio_driver = {
.name = "mdio-gpio",
.match_table = mdio_ofgpio_match,
.probe = mdio_ofgpio_probe,
-diff -purN linux-2.6.27/drivers/net/pppol2tp.c linux-2.6.27.19-5.1/drivers/net/pppol2tp.c
---- linux-2.6.27/drivers/net/pppol2tp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/pppol2tp.c 2009-03-25 16:11:07.000000000 +0000
-@@ -1353,6 +1353,7 @@ static int pppol2tp_release(struct socke
+diff -r 9608d5473017 drivers/net/pppol2tp.c
+--- a/drivers/net/pppol2tp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/pppol2tp.c Wed May 06 16:56:26 2009 +0100
+@@ -1353,6 +1353,7 @@
kfree_skb(skb);
sock_put(sk);
}
}
release_sock(sk);
-diff -purN linux-2.6.27/drivers/net/r6040.c linux-2.6.27.19-5.1/drivers/net/r6040.c
---- linux-2.6.27/drivers/net/r6040.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/r6040.c 2009-03-25 16:11:08.000000000 +0000
+diff -r 9608d5473017 drivers/net/r6040.c
+--- a/drivers/net/r6040.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/r6040.c Wed May 06 16:56:26 2009 +0100
@@ -49,8 +49,8 @@
#include <asm/processor.h>
/* PHY CHIP Address */
#define PHY1_ADDR 1 /* For MAC1 */
-@@ -214,7 +214,7 @@ static int r6040_phy_read(void __iomem *
+@@ -214,7 +214,7 @@
/* Wait for the read bit to be cleared */
while (limit--) {
cmd = ioread16(ioaddr + MMDIO);
break;
}
-@@ -233,7 +233,7 @@ static void r6040_phy_write(void __iomem
+@@ -233,7 +233,7 @@
/* Wait for the write bit to be cleared */
while (limit--) {
cmd = ioread16(ioaddr + MMDIO);
break;
}
}
-@@ -681,8 +681,10 @@ static irqreturn_t r6040_interrupt(int i
+@@ -681,8 +681,10 @@
struct net_device *dev = dev_id;
struct r6040_private *lp = netdev_priv(dev);
void __iomem *ioaddr = lp->base;
/* Mask off RDC MAC interrupt */
iowrite16(MSK_INT, ioaddr + MIER);
/* Read MISR status and clear */
-@@ -702,7 +704,7 @@ static irqreturn_t r6040_interrupt(int i
+@@ -702,13 +704,16 @@
dev->stats.rx_fifo_errors++;
/* Mask off RX interrupt */
netif_rx_schedule(dev, &lp->napi);
}
-@@ -710,6 +712,9 @@ static irqreturn_t r6040_interrupt(int i
+ /* TX interrupt request */
if (status & TX_INTS)
r6040_tx(dev);
-
++
+ /* Restore RDC MAC interrupt */
+ iowrite16(misr, ioaddr + MIER);
-+
+
return IRQ_HANDLED;
}
-
-diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r8169.c
---- linux-2.6.27/drivers/net/r8169.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/r8169.c 2009-03-25 16:11:04.000000000 +0000
-@@ -61,6 +61,7 @@ static const int multicast_filter_limit
+diff -r 9608d5473017 drivers/net/r8169.c
+--- a/drivers/net/r8169.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/r8169.c Wed May 06 16:56:26 2009 +0100
+@@ -61,6 +61,7 @@
/* MAC address length */
#define MAC_ADDR_LEN 6
#define RX_FIFO_THRESH 7 /* 7 means NO threshold, Rx buffer level before first PCI xfer. */
#define RX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
#define TX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
-@@ -95,6 +96,10 @@ enum mac_version {
+@@ -95,6 +96,10 @@
RTL_GIGA_MAC_VER_04 = 0x04, // 8169SB
RTL_GIGA_MAC_VER_05 = 0x05, // 8110SCd
RTL_GIGA_MAC_VER_06 = 0x06, // 8110SCe
RTL_GIGA_MAC_VER_11 = 0x0b, // 8168Bb
RTL_GIGA_MAC_VER_12 = 0x0c, // 8168Be
RTL_GIGA_MAC_VER_13 = 0x0d, // 8101Eb
-@@ -121,6 +126,10 @@ static const struct {
+@@ -121,6 +126,10 @@
_R("RTL8169sb/8110sb", RTL_GIGA_MAC_VER_04, 0xff7e1880), // 8169SB
_R("RTL8169sc/8110sc", RTL_GIGA_MAC_VER_05, 0xff7e1880), // 8110SCd
_R("RTL8169sc/8110sc", RTL_GIGA_MAC_VER_06, 0xff7e1880), // 8110SCe
_R("RTL8168b/8111b", RTL_GIGA_MAC_VER_11, 0xff7e1880), // PCI-E
_R("RTL8168b/8111b", RTL_GIGA_MAC_VER_12, 0xff7e1880), // PCI-E
_R("RTL8101e", RTL_GIGA_MAC_VER_13, 0xff7e1880), // PCI-E 8139
-@@ -196,9 +205,6 @@ enum rtl_registers {
+@@ -196,9 +205,6 @@
Config5 = 0x56,
MultiIntr = 0x5c,
PHYAR = 0x60,
PHYstatus = 0x6c,
RxMaxSize = 0xda,
CPlusCmd = 0xe0,
-@@ -212,6 +218,32 @@ enum rtl_registers {
+@@ -210,6 +216,32 @@
+ FuncEventMask = 0xf4,
+ FuncPresetState = 0xf8,
FuncForceEvent = 0xfc,
- };
-
++};
++
+enum rtl8110_registers {
+ TBICSR = 0x64,
+ TBI_ANAR = 0x68,
+ DBG_REG = 0xd1,
+#define FIX_NAK_1 (1 << 4)
+#define FIX_NAK_2 (1 << 3)
-+};
-+
+ };
+
enum rtl_register_content {
- /* InterruptStatusBits */
- SYSErr = 0x8000,
-@@ -265,7 +297,13 @@ enum rtl_register_content {
+@@ -265,7 +297,13 @@
TxDMAShift = 8, /* DMA burst value (0-7) is shift this many bits */
/* Config1 register p.24 */
PMEnable = (1 << 0), /* Power Management Enable */
/* Config2 register p. 25 */
-@@ -275,6 +313,7 @@ enum rtl_register_content {
+@@ -275,6 +313,7 @@
/* Config3 register p.25 */
MagicPacket = (1 << 5), /* Wake up when receives a Magic Packet */
LinkUp = (1 << 4), /* Wake up when the cable connection is re-established */
/* Config5 register p.27 */
BWF = (1 << 6), /* Accept Broadcast wakeup frame */
-@@ -292,7 +331,16 @@ enum rtl_register_content {
+@@ -292,7 +331,16 @@
TBINwComplete = 0x01000000,
/* CPlusCmd p.31 */
RxVlan = (1 << 6),
RxChkSum = (1 << 5),
PCIDAC = (1 << 4),
-@@ -370,8 +418,9 @@ struct ring_info {
+@@ -370,8 +418,9 @@
};
enum features {
};
struct rtl8169_private {
-@@ -406,13 +455,16 @@ struct rtl8169_private {
+@@ -406,13 +455,16 @@
struct vlan_group *vlgrp;
#endif
int (*set_speed)(struct net_device *, u8 autoneg, u16 speed, u8 duplex);
};
MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>");
-@@ -482,6 +534,94 @@ static int mdio_read(void __iomem *ioadd
- return value;
- }
-
+@@ -479,6 +531,94 @@
+ }
+ udelay(25);
+ }
++ return value;
++}
++
+static void mdio_patch(void __iomem *ioaddr, int reg_addr, int value)
+{
+ mdio_write(ioaddr, reg_addr, mdio_read(ioaddr, reg_addr) | value);
+ udelay(10);
+ }
+
-+ return value;
-+}
-+
- static void rtl8169_irq_mask_and_ack(void __iomem *ioaddr)
- {
- RTL_W16(IntrMask, 0x0000);
-@@ -705,8 +845,12 @@ static int rtl8169_set_speed_xmii(struct
+ return value;
+ }
+
+@@ -705,8 +845,12 @@
}
}
(tp->mac_version == RTL_GIGA_MAC_VER_14) ||
(tp->mac_version == RTL_GIGA_MAC_VER_15) ||
(tp->mac_version == RTL_GIGA_MAC_VER_16)) {
-@@ -720,9 +864,13 @@ static int rtl8169_set_speed_xmii(struct
+@@ -720,9 +864,13 @@
auto_nego |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
mdio_write(ioaddr, 0x1f, 0x0000);
mdio_write(ioaddr, 0x0e, 0x0000);
}
-@@ -850,7 +998,7 @@ static int rtl8169_rx_vlan_skb(struct rt
+@@ -850,7 +998,7 @@
#endif
{
struct rtl8169_private *tp = netdev_priv(dev);
void __iomem *ioaddr = tp->mmio_addr;
-@@ -867,65 +1015,29 @@ static void rtl8169_gset_tbi(struct net_
+@@ -867,65 +1015,29 @@
cmd->speed = SPEED_1000;
cmd->duplex = DUPLEX_FULL; /* Always set */
struct rtl8169_private *tp = netdev_priv(dev);
- void __iomem *ioaddr = tp->mmio_addr;
- u8 status;
--
+
- cmd->supported = SUPPORTED_10baseT_Half |
- SUPPORTED_10baseT_Full |
- SUPPORTED_100baseT_Half |
- cmd->advertising |= ADVERTISED_Asym_Pause;
- if (status & RxFlowCtrl)
- cmd->advertising |= ADVERTISED_Pause;
-
+-
- cmd->duplex = ((status & _1000bpsF) || (status & FullDup)) ?
- DUPLEX_FULL : DUPLEX_HALF;
+ return mii_ethtool_gset(&tp->mii, cmd);
}
static void rtl8169_get_regs(struct net_device *dev, struct ethtool_regs *regs,
-@@ -1116,8 +1228,17 @@ static void rtl8169_get_mac_version(stru
+@@ -1116,8 +1228,17 @@
{ 0x7c800000, 0x30000000, RTL_GIGA_MAC_VER_11 },
/* 8101 family. */
{ 0x7c800000, 0x34000000, RTL_GIGA_MAC_VER_16 },
/* FIXME: where did these entries come from ? -- FR */
{ 0xfc800000, 0x38800000, RTL_GIGA_MAC_VER_15 },
-@@ -1279,6 +1400,22 @@ static void rtl8168cx_hw_phy_config(void
+@@ -1279,6 +1400,22 @@
rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
}
static void rtl_hw_phy_config(struct net_device *dev)
{
struct rtl8169_private *tp = netdev_priv(dev);
-@@ -1296,6 +1433,11 @@ static void rtl_hw_phy_config(struct net
+@@ -1295,6 +1432,11 @@
+ break;
case RTL_GIGA_MAC_VER_04:
rtl8169sb_hw_phy_config(ioaddr);
- break;
++ break;
+ case RTL_GIGA_MAC_VER_07:
+ case RTL_GIGA_MAC_VER_08:
+ case RTL_GIGA_MAC_VER_09:
+ rtl8102e_hw_phy_config(ioaddr);
-+ break;
+ break;
case RTL_GIGA_MAC_VER_18:
rtl8168cp_hw_phy_config(ioaddr);
- break;
-@@ -1513,7 +1655,7 @@ static const struct rtl_cfg_info {
+@@ -1513,7 +1655,7 @@
unsigned int align;
u16 intr_event;
u16 napi_event;
} rtl_cfg_infos [] = {
[RTL_CFG_0] = {
.hw_start = rtl_hw_start_8169,
-@@ -1522,7 +1664,7 @@ static const struct rtl_cfg_info {
+@@ -1522,7 +1664,7 @@
.intr_event = SYSErr | LinkChg | RxOverflow |
RxFIFOOver | TxErr | TxOK | RxOK | RxErr,
.napi_event = RxFIFOOver | TxErr | TxOK | RxOK | RxOverflow,
},
[RTL_CFG_1] = {
.hw_start = rtl_hw_start_8168,
-@@ -1531,7 +1673,7 @@ static const struct rtl_cfg_info {
+@@ -1531,7 +1673,7 @@
.intr_event = SYSErr | LinkChg | RxOverflow |
TxErr | TxOK | RxOK | RxErr,
.napi_event = TxErr | TxOK | RxOK | RxOverflow,
},
[RTL_CFG_2] = {
.hw_start = rtl_hw_start_8101,
-@@ -1540,7 +1682,7 @@ static const struct rtl_cfg_info {
+@@ -1540,7 +1682,7 @@
.intr_event = SYSErr | LinkChg | RxOverflow | PCSTimeout |
RxFIFOOver | TxErr | TxOK | RxOK | RxErr,
.napi_event = RxFIFOOver | TxErr | TxOK | RxOK | RxOverflow,
}
};
-@@ -1552,7 +1694,7 @@ static unsigned rtl_try_msi(struct pci_d
+@@ -1552,7 +1694,7 @@
u8 cfg2;
cfg2 = RTL_R8(Config2) & ~MSIEnable;
if (pci_enable_msi(pdev)) {
dev_info(&pdev->dev, "no MSI. Back to INTx.\n");
} else {
-@@ -1578,6 +1720,7 @@ rtl8169_init_one(struct pci_dev *pdev, c
+@@ -1578,6 +1720,7 @@
const struct rtl_cfg_info *cfg = rtl_cfg_infos + ent->driver_data;
const unsigned int region = cfg->region;
struct rtl8169_private *tp;
struct net_device *dev;
void __iomem *ioaddr;
unsigned int i;
-@@ -1602,6 +1745,14 @@ rtl8169_init_one(struct pci_dev *pdev, c
+@@ -1601,6 +1744,14 @@
+ tp->dev = dev;
tp->pci_dev = pdev;
tp->msg_enable = netif_msg_init(debug.msg_enable, R8169_MSG_DEFAULT);
-
++
+ mii = &tp->mii;
+ mii->dev = dev;
+ mii->mdio_read = rtl_mdio_read;
+ mii->phy_id_mask = 0x1f;
+ mii->reg_num_mask = 0x1f;
+ mii->supports_gmii = !!(cfg->features & RTL_FEATURE_GMII);
-+
+
/* enable device (incl. PCI PM wakeup and hotplug setup) */
rc = pci_enable_device(pdev);
- if (rc < 0) {
-@@ -1670,6 +1821,10 @@ rtl8169_init_one(struct pci_dev *pdev, c
+@@ -1669,6 +1820,10 @@
+ rc = -EIO;
goto err_out_free_res_4;
}
-
++
+ tp->pcie_cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
+ if (!tp->pcie_cap && netif_msg_probe(tp))
+ dev_info(&pdev->dev, "no PCI Express capability\n");
-+
+
/* Unneeded ? Don't mess with Mrs. Murphy. */
rtl8169_irq_mask_and_ack(ioaddr);
-
-@@ -2061,12 +2216,51 @@ static void rtl_hw_start_8169(struct net
+@@ -2061,12 +2216,51 @@
RTL_W16(IntrMask, tp->intr_event);
}
RTL_W8(Cfg9346, Cfg9346_Unlock);
-@@ -2080,10 +2274,7 @@ static void rtl_hw_start_8168(struct net
+@@ -2080,10 +2274,7 @@
RTL_W16(CPlusCmd, tp->cp_cmd);
RTL_W16(IntrMitigate, 0x5151);
-@@ -2099,8 +2290,6 @@ static void rtl_hw_start_8168(struct net
+@@ -2099,8 +2290,6 @@
RTL_R8(IntrMask);
rtl_set_rx_mode(dev);
RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
-@@ -2110,6 +2299,70 @@ static void rtl_hw_start_8168(struct net
- RTL_W16(IntrMask, tp->intr_event);
- }
+@@ -2108,6 +2297,70 @@
+ RTL_W16(MultiIntr, RTL_R16(MultiIntr) & 0xF000);
+ RTL_W16(IntrMask, tp->intr_event);
++}
++
+#define R810X_CPCMD_QUIRK_MASK (\
+ EnableBist | \
+ Mac_dbgo_oe | \
+ rtl_hw_start_8102e_2(ioaddr, pdev);
+
+ rtl_ephy_write(ioaddr, 0x03, 0xc2f9);
-+}
-+
+ }
+
static void rtl_hw_start_8101(struct net_device *dev)
- {
- struct rtl8169_private *tp = netdev_priv(dev);
-@@ -2118,8 +2371,26 @@ static void rtl_hw_start_8101(struct net
+@@ -2118,8 +2371,26 @@
if ((tp->mac_version == RTL_GIGA_MAC_VER_13) ||
(tp->mac_version == RTL_GIGA_MAC_VER_16)) {
}
RTL_W8(Cfg9346, Cfg9346_Unlock);
-@@ -2143,8 +2414,6 @@ static void rtl_hw_start_8101(struct net
+@@ -2142,8 +2413,6 @@
+ RTL_W8(Cfg9346, Cfg9346_Lock);
RTL_R8(IntrMask);
-
-- RTL_W32(RxMissed, 0);
-
+- RTL_W32(RxMissed, 0);
+
rtl_set_rx_mode(dev);
- RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
-@@ -2922,6 +3191,17 @@ static int rtl8169_poll(struct napi_stru
+@@ -2922,6 +3191,17 @@
return work_done;
}
static void rtl8169_down(struct net_device *dev)
{
struct rtl8169_private *tp = netdev_priv(dev);
-@@ -2939,9 +3219,7 @@ core_down:
+@@ -2939,9 +3219,7 @@
rtl8169_asic_down(ioaddr);
spin_unlock_irq(&tp->lock);
-@@ -3063,8 +3341,7 @@ static struct net_device_stats *rtl8169_
+@@ -3063,8 +3341,7 @@
if (netif_running(dev)) {
spin_lock_irqsave(&tp->lock, flags);
spin_unlock_irqrestore(&tp->lock, flags);
}
-@@ -3089,8 +3366,7 @@ static int rtl8169_suspend(struct pci_de
+@@ -3089,8 +3366,7 @@
rtl8169_asic_down(ioaddr);
spin_unlock_irq(&tp->lock);
-diff -purN linux-2.6.27/drivers/net/sfc/Kconfig linux-2.6.27.19-5.1/drivers/net/sfc/Kconfig
---- linux-2.6.27/drivers/net/sfc/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/Kconfig 2009-03-25 16:11:05.000000000 +0000
-@@ -12,3 +12,13 @@ config SFC
+diff -r 9608d5473017 drivers/net/sfc/Kconfig
+--- a/drivers/net/sfc/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sfc/Kconfig Wed May 06 16:56:26 2009 +0100
+@@ -12,3 +12,13 @@
To compile this driver as a module, choose M here. The module
will be called sfc.
+ tristate "Solarflare Solarstorm SFC4000 resource driver"
+ help
+ This module provides the SFC resource manager driver.
-diff -purN linux-2.6.27/drivers/net/sfc/Makefile linux-2.6.27.19-5.1/drivers/net/sfc/Makefile
---- linux-2.6.27/drivers/net/sfc/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/Makefile 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/Makefile
+--- a/drivers/net/sfc/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sfc/Makefile Wed May 06 16:56:26 2009 +0100
@@ -1,5 +1,7 @@
sfc-y += efx.o falcon.o tx.o rx.o falcon_xmac.o \
selftest.o ethtool.o xfp_phy.o \
mdio_10g.o tenxpress.o boards.o sfe4001.o
--
+sfc-$(CONFIG_SFC_DRIVERLINK) += driverlink.o
- obj-$(CONFIG_SFC) += sfc.o
-+
++obj-$(CONFIG_SFC) += sfc.o
+
+-obj-$(CONFIG_SFC) += sfc.o
+obj-$(CONFIG_SFC_RESOURCE) += sfc_resource/
-diff -purN linux-2.6.27/drivers/net/sfc/driverlink.c linux-2.6.27.19-5.1/drivers/net/sfc/driverlink.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/driverlink.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/driverlink.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/driverlink.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,366 @@
+/****************************************************************************
+ * Driver for Solarflare Solarstorm network controllers and boards
+
+ mutex_unlock(&efx_driverlink_lock);
+}
-diff -purN linux-2.6.27/drivers/net/sfc/driverlink.h linux-2.6.27.19-5.1/drivers/net/sfc/driverlink.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/driverlink.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/driverlink.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/driverlink.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,66 @@
+/****************************************************************************
+ * Driver for Solarflare Solarstorm network controllers and boards
+#endif /* CONFIG_SFC_DRIVERLINK */
+
+#endif /* EFX_DRIVERLINK_H */
-diff -purN linux-2.6.27/drivers/net/sfc/driverlink_api.h linux-2.6.27.19-5.1/drivers/net/sfc/driverlink_api.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/driverlink_api.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/driverlink_api.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/driverlink_api.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,303 @@
+/****************************************************************************
+ * Driver for Solarflare Solarstorm network controllers and boards
+ break;
+
+#endif /* EFX_DRIVERLINK_API_H */
-diff -purN linux-2.6.27/drivers/net/sfc/efx.c linux-2.6.27.19-5.1/drivers/net/sfc/efx.c
---- linux-2.6.27/drivers/net/sfc/efx.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/efx.c 2009-03-25 16:11:05.000000000 +0000
-@@ -1427,6 +1427,11 @@ static int efx_change_mtu(struct net_dev
+diff -r 9608d5473017 drivers/net/sfc/efx.c
+--- a/drivers/net/sfc/efx.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sfc/efx.c Wed May 06 16:56:26 2009 +0100
+@@ -1427,6 +1427,11 @@
efx_stop_all(efx);
EFX_LOG(efx, "changing MTU to %d\n", new_mtu);
efx_fini_channels(efx);
-@@ -1435,6 +1440,10 @@ static int efx_change_mtu(struct net_dev
+@@ -1435,6 +1440,10 @@
if (rc)
goto fail;
efx_start_all(efx);
return rc;
-@@ -1587,6 +1596,25 @@ static void efx_unregister_netdev(struct
+@@ -1587,6 +1596,25 @@
* Device reset and suspend
*
**************************************************************************/
/* The final hardware and software finalisation before reset. */
static int efx_reset_down(struct efx_nic *efx, struct ethtool_cmd *ecmd)
-@@ -1649,8 +1677,8 @@ static int efx_reset(struct efx_nic *efx
+@@ -1649,8 +1677,8 @@
enum reset_type method = efx->reset_pending;
int rc;
/* If we're not RUNNING then don't reset. Leave the reset_pending
* flag set so that efx_pci_probe_main will be retried */
-@@ -1717,6 +1745,7 @@ static int efx_reset(struct efx_nic *efx
+@@ -1717,6 +1745,7 @@
efx_start_all(efx);
unlock_rtnl:
rtnl_unlock();
return 0;
-@@ -1729,6 +1758,7 @@ static int efx_reset(struct efx_nic *efx
+@@ -1729,6 +1758,7 @@
efx->state = STATE_DISABLED;
mutex_unlock(&efx->mac_lock);
rtnl_unlock();
efx_unregister_netdev(efx);
efx_fini_port(efx);
-@@ -1871,6 +1901,11 @@ static int efx_init_struct(struct efx_ni
+@@ -1871,6 +1901,11 @@
mutex_init(&efx->mac_lock);
efx->phy_op = &efx_dummy_phy_operations;
efx->mii.dev = net_dev;
INIT_WORK(&efx->reconfigure_work, efx_reconfigure_work);
atomic_set(&efx->netif_stop_count, 1);
-@@ -1990,6 +2025,7 @@ static void efx_pci_remove(struct pci_de
+@@ -1990,6 +2025,7 @@
efx = pci_get_drvdata(pci_dev);
if (!efx)
return;
/* Mark the NIC as fini, then stop the interface */
rtnl_lock();
-@@ -2157,8 +2193,15 @@ static int __devinit efx_pci_probe(struc
+@@ -2157,8 +2193,15 @@
EFX_LOG(efx, "initialisation successful\n");
fail5:
efx_pci_remove_main(efx);
fail4:
-diff -purN linux-2.6.27/drivers/net/sfc/falcon.c linux-2.6.27.19-5.1/drivers/net/sfc/falcon.c
---- linux-2.6.27/drivers/net/sfc/falcon.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/falcon.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/falcon.c
+--- a/drivers/net/sfc/falcon.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sfc/falcon.c Wed May 06 16:56:26 2009 +0100
@@ -37,11 +37,16 @@
/**
* struct falcon_nic_data - Falcon NIC state
struct pci_dev *pci_dev2;
struct i2c_algo_bit_data i2c_data;
};
-@@ -322,8 +327,13 @@ static int falcon_alloc_special_buffer(s
+@@ -322,8 +327,13 @@
memset(buffer->addr, 0xff, len);
/* Select new buffer ID */
EFX_LOG(efx, "allocating special buffers %d-%d at %llx+%x "
"(virt %p phys %lx)\n", buffer->index,
-@@ -1115,10 +1125,12 @@ static void falcon_handle_driver_event(s
+@@ -1115,10 +1125,12 @@
case TX_DESCQ_FLS_DONE_EV_DECODE:
EFX_TRACE(efx, "channel %d TXQ %d flushed\n",
channel->channel, ev_sub_data);
break;
case EVQ_INIT_DONE_EV_DECODE:
EFX_LOG(efx, "channel %d EVQ %d initialised\n",
-@@ -1127,14 +1139,17 @@ static void falcon_handle_driver_event(s
+@@ -1127,14 +1139,17 @@
case SRM_UPD_DONE_EV_DECODE:
EFX_TRACE(efx, "channel %d SRAM update done\n",
channel->channel);
break;
case RX_RECOVERY_EV_DECODE:
EFX_ERR(efx, "channel %d seen DRIVER RX_RESET event. "
-@@ -1159,6 +1174,7 @@ static void falcon_handle_driver_event(s
+@@ -1159,6 +1174,7 @@
EFX_TRACE(efx, "channel %d unknown driver event code %d "
"data %04x\n", channel->channel, ev_sub_code,
ev_sub_data);
break;
}
}
-@@ -2371,6 +2387,61 @@ static int falcon_probe_nvconfig(struct
+@@ -2371,6 +2387,61 @@
return rc;
}
/* Probe the NIC variant (revision, ASIC vs FPGA, function count, port
* count, port speed). Set workaround and feature flags accordingly.
*/
-@@ -2403,10 +2474,12 @@ static int falcon_probe_nic_variant(stru
+@@ -2403,10 +2474,12 @@
EFX_ERR(efx, "1G mode not supported\n");
return -ENODEV;
}
break;
default:
-@@ -2472,6 +2545,10 @@ int falcon_probe_nic(struct efx_nic *efx
+@@ -2472,6 +2545,10 @@
if (rc)
goto fail5;
/* Initialise I2C adapter */
efx->i2c_adap.owner = THIS_MODULE;
nic_data->i2c_data = falcon_i2c_bit_operations;
-@@ -2481,10 +2558,14 @@ int falcon_probe_nic(struct efx_nic *efx
+@@ -2481,10 +2558,14 @@
strlcpy(efx->i2c_adap.name, "SFC4000 GPIO", sizeof(efx->i2c_adap.name));
rc = i2c_bit_add_bus(&efx->i2c_adap);
if (rc)
fail5:
falcon_free_buffer(efx, &efx->irq_status);
fail4:
-@@ -2675,6 +2756,9 @@ void falcon_remove_nic(struct efx_nic *e
+@@ -2675,6 +2756,9 @@
/* Tear down the private nic state */
kfree(efx->nic_data);
efx->nic_data = NULL;
}
void falcon_update_nic_stats(struct efx_nic *efx)
-diff -purN linux-2.6.27/drivers/net/sfc/net_driver.h linux-2.6.27.19-5.1/drivers/net/sfc/net_driver.h
---- linux-2.6.27/drivers/net/sfc/net_driver.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/net_driver.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/net_driver.h
+--- a/drivers/net/sfc/net_driver.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sfc/net_driver.h Wed May 06 16:56:26 2009 +0100
@@ -30,6 +30,7 @@
#include "enum.h"
#define EFX_MAX_LRO_DESCRIPTORS 8
#define EFX_MAX_LRO_AGGR MAX_SKB_FRAGS
-@@ -676,6 +677,12 @@ union efx_multicast_hash {
+@@ -676,6 +677,12 @@
* @loopback_mode: Loopback status
* @loopback_modes: Supported loopback mode bitmask
* @loopback_selftest: Offline self-test private state
*
* The @priv field of the corresponding &struct net_device points to
* this.
-@@ -752,6 +759,15 @@ struct efx_nic {
+@@ -752,6 +759,15 @@
unsigned int loopback_modes;
void *loopback_selftest;
};
static inline int efx_dev_registered(struct efx_nic *efx)
-diff -purN linux-2.6.27/drivers/net/sfc/rx.c linux-2.6.27.19-5.1/drivers/net/sfc/rx.c
---- linux-2.6.27/drivers/net/sfc/rx.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/rx.c 2009-03-25 16:11:05.000000000 +0000
-@@ -549,8 +549,22 @@ static inline void efx_rx_packet__check_
+diff -r 9608d5473017 drivers/net/sfc/rx.c
+--- a/drivers/net/sfc/rx.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sfc/rx.c Wed May 06 16:56:26 2009 +0100
+@@ -549,8 +549,22 @@
static inline void efx_rx_packet_lro(struct efx_channel *channel,
struct efx_rx_buffer *rx_buf)
{
/* Pass the skb/page into the LRO engine */
if (rx_buf->page) {
-@@ -686,6 +700,7 @@ void __efx_rx_packet(struct efx_channel
+@@ -686,6 +700,7 @@
struct efx_rx_buffer *rx_buf, int checksummed)
{
struct efx_nic *efx = channel->efx;
struct sk_buff *skb;
int lro = efx->net_dev->features & NETIF_F_LRO;
-@@ -723,6 +738,16 @@ void __efx_rx_packet(struct efx_channel
- goto done;
+@@ -720,6 +735,16 @@
}
-
+ if (likely(checksummed && lro)) {
+ efx_rx_packet_lro(channel, rx_buf);
++ goto done;
++ }
++
+ /* Allow callback to veto the packet */
+ veto = EFX_DL_CALLBACK(efx, rx_packet, rx_buf->data, rx_buf->len);
+ if (unlikely(veto)) {
+ efx->dl_cb_dev.rx_packet->driver->name);
+ /* Free the buffer now */
+ efx_free_rx_buffer(efx, rx_buf);
-+ goto done;
-+ }
-+
- /* Form an skb if required */
- if (rx_buf->page) {
- int hdr_len = min(rx_buf->len, EFX_SKB_HEADERS);
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/Makefile linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/Makefile 2009-03-25 16:11:05.000000000 +0000
+ goto done;
+ }
+
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/Makefile Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,14 @@
+obj-$(CONFIG_SFC_RESOURCE) := sfc_resource.o
+
+ iobufset_resource.o resource_manager.o resources.o \
+ vi_resource_alloc.o vi_resource_event.o vi_resource_flush.o \
+ vi_resource_manager.o driver_object.o kernel_compat.o
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/assert_valid.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/assert_valid.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/assert_valid.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/assert_valid.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/assert_valid.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,92 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+EXPORT_SYMBOL(efrm_resource_assert_valid);
+
+#endif
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/buddy.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/buddy.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/buddy.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/buddy.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/buddy.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,220 @@
+
+/****************************************************************************
+ ("buddy - free %x merged into order %d", addr, order););
+ efrm_buddy_free_list_add(b, order, addr);
+}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/buffer_table.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/buffer_table.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/buffer_table.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/buffer_table.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/buffer_table.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,209 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ EFRM_FOR_EACH_NIC(nic_i, nic)
+ efhw_nic_buffer_table_commit(nic);
+}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/common.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/common.h 2009-03-25 16:11:05.000000000 +0000
-@@ -0,0 +1,68 @@
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware.h Wed May 06 16:56:26 2009 +0100
+@@ -0,0 +1,188 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ * resource management for Xen backend, OpenOnload, etc
+ * (including support for SFE4001 10GBT NIC)
+ *
-+ * This file provides EtherFabric NIC hardware interface common
-+ * definitions.
++ * This file provides EtherFabric NIC hardware interface.
+ *
+ * Copyright 2005-2007: Solarflare Communications Inc,
+ * 9501 Jeronimo Road, Suite 250,
+ * <linux-xen-drivers@solarflare.com>
+ * <onload-dev@solarflare.com>
+ *
++ * Certain parts of the driver were implemented by
++ * Alexandra Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
++ * OKTET Labs Ltd, Russia,
++ * http://oktetlabs.ru, <info@oktetlabs.ru>
++ * by request of Solarflare Communications
++ *
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ ****************************************************************************
+ */
+
-+#ifndef __CI_DRIVER_EFAB_HARDWARE_COMMON_H__
-+#define __CI_DRIVER_EFAB_HARDWARE_COMMON_H__
++#ifndef __CI_DRIVER_EFAB_HARDWARE_H__
++#define __CI_DRIVER_EFAB_HARDWARE_H__
++
++#include "ci/driver/efab/hardware/workarounds.h"
++#include <ci/efhw/hardware_sysdep.h>
++
+
+/*----------------------------------------------------------------------------
+ *
-+ * EtherFabric constants
++ * Common EtherFabric definitions
+ *
+ *---------------------------------------------------------------------------*/
+
-+#define EFHW_1K 0x00000400u
-+#define EFHW_2K 0x00000800u
-+#define EFHW_4K 0x00001000u
-+#define EFHW_8K 0x00002000u
-+#define EFHW_16K 0x00004000u
-+#define EFHW_32K 0x00008000u
-+#define EFHW_64K 0x00010000u
-+#define EFHW_128K 0x00020000u
-+#define EFHW_256K 0x00040000u
-+#define EFHW_512K 0x00080000u
-+#define EFHW_1M 0x00100000u
-+#define EFHW_2M 0x00200000u
-+#define EFHW_4M 0x00400000u
-+#define EFHW_8M 0x00800000u
-+#define EFHW_16M 0x01000000u
-+#define EFHW_32M 0x02000000u
-+#define EFHW_48M 0x03000000u
-+#define EFHW_64M 0x04000000u
-+#define EFHW_128M 0x08000000u
-+#define EFHW_256M 0x10000000u
-+#define EFHW_512M 0x20000000u
-+#define EFHW_1G 0x40000000u
-+#define EFHW_2G 0x80000000u
-+#define EFHW_4G 0x100000000ULL
-+#define EFHW_8G 0x200000000ULL
++#include <ci/efhw/debug.h>
++#include <ci/efhw/common.h>
++#include <ci/driver/efab/hardware/common.h>
+
-+#endif /* __CI_DRIVER_EFAB_HARDWARE_COMMON_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_core.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_core.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_core.h 2009-03-25 16:11:05.000000000 +0000
-@@ -0,0 +1,1147 @@
++/*----------------------------------------------------------------------------
++ *
++ * EtherFabric varients
++ *
++ *---------------------------------------------------------------------------*/
++
++#include <ci/driver/efab/hardware/falcon.h>
++
++/*----------------------------------------------------------------------------
++ *
++ * EtherFabric Portable Hardware Layer defines
++ *
++ *---------------------------------------------------------------------------*/
++
++ /*-------------- Initialisation ------------ */
++#define efhw_nic_close_hardware(nic) \
++ ((nic)->efhw_func->close_hardware(nic))
++
++#define efhw_nic_init_hardware(nic, ev_handlers, mac_addr, non_irq_evq) \
++ ((nic)->efhw_func->init_hardware((nic), (ev_handlers), (mac_addr), \
++ (non_irq_evq)))
++
++/*-------------- Interrupt support ------------ */
++/** Handle interrupt. Return 0 if not handled, 1 if handled. */
++#define efhw_nic_interrupt(nic) \
++ ((nic)->efhw_func->interrupt(nic))
++
++#define efhw_nic_interrupt_enable(nic) \
++ ((nic)->efhw_func->interrupt_enable(nic))
++
++#define efhw_nic_interrupt_disable(nic) \
++ ((nic)->efhw_func->interrupt_disable(nic))
++
++#define efhw_nic_set_interrupt_moderation(nic, evq, val) \
++ ((nic)->efhw_func->set_interrupt_moderation(nic, evq, val))
++
++/*-------------- Event support ------------ */
++
++#define efhw_nic_event_queue_enable(nic, evq, size, q_base, buf_base, \
++ interrupting) \
++ ((nic)->efhw_func->event_queue_enable((nic), (evq), (size), (q_base), \
++ (buf_base), (interrupting)))
++
++#define efhw_nic_event_queue_disable(nic, evq, timer_only) \
++ ((nic)->efhw_func->event_queue_disable(nic, evq, timer_only))
++
++#define efhw_nic_wakeup_request(nic, q_base, index, evq) \
++ ((nic)->efhw_func->wakeup_request(nic, q_base, index, evq))
++
++#define efhw_nic_sw_event(nic, data, ev) \
++ ((nic)->efhw_func->sw_event(nic, data, ev))
++
++/*-------------- Filter support ------------ */
++#define efhw_nic_ipfilter_set(nic, type, index, dmaq, \
++ saddr, sport, daddr, dport) \
++ ((nic)->efhw_func->ipfilter_set(nic, type, index, dmaq, \
++ saddr, sport, daddr, dport))
++
++#define efhw_nic_ipfilter_clear(nic, index) \
++ ((nic)->efhw_func->ipfilter_clear(nic, index))
++
++/*-------------- DMA support ------------ */
++#define efhw_nic_dmaq_tx_q_init(nic, dmaq, evq, owner, tag, \
++ dmaq_size, index, flags) \
++ ((nic)->efhw_func->dmaq_tx_q_init(nic, dmaq, evq, owner, tag, \
++ dmaq_size, index, flags))
++
++#define efhw_nic_dmaq_rx_q_init(nic, dmaq, evq, owner, tag, \
++ dmaq_size, index, flags) \
++ ((nic)->efhw_func->dmaq_rx_q_init(nic, dmaq, evq, owner, tag, \
++ dmaq_size, index, flags))
++
++#define efhw_nic_dmaq_tx_q_disable(nic, dmaq) \
++ ((nic)->efhw_func->dmaq_tx_q_disable(nic, dmaq))
++
++#define efhw_nic_dmaq_rx_q_disable(nic, dmaq) \
++ ((nic)->efhw_func->dmaq_rx_q_disable(nic, dmaq))
++
++#define efhw_nic_flush_tx_dma_channel(nic, dmaq) \
++ ((nic)->efhw_func->flush_tx_dma_channel(nic, dmaq))
++
++#define efhw_nic_flush_rx_dma_channel(nic, dmaq) \
++ ((nic)->efhw_func->flush_rx_dma_channel(nic, dmaq))
++
++/*-------------- MAC Low level interface ---- */
++#define efhw_gmac_get_mac_addr(nic) \
++ ((nic)->gmac->get_mac_addr((nic)->gmac))
++
++/*-------------- Buffer table -------------- */
++#define efhw_nic_buffer_table_set(nic, addr, bufsz, region, \
++ own_id, buf_id) \
++ ((nic)->efhw_func->buffer_table_set(nic, addr, bufsz, region, \
++ own_id, buf_id))
++
++#define efhw_nic_buffer_table_set_n(nic, buf_id, addr, bufsz, \
++ region, n_pages, own_id) \
++ ((nic)->efhw_func->buffer_table_set_n(nic, buf_id, addr, bufsz, \
++ region, n_pages, own_id))
++
++#define efhw_nic_buffer_table_clear(nic, id, num) \
++ ((nic)->efhw_func->buffer_table_clear(nic, id, num))
++
++#define efhw_nic_buffer_table_commit(nic) \
++ ((nic)->efhw_func->buffer_table_commit(nic))
++
++/*-------------- New filter API ------------ */
++#define efhw_nic_filter_set(nic, spec, index_out) \
++ ((nic)->efhw_func->filter_set(nic, spec, index_out))
++
++#define efhw_nic_filter_clear(nic, type, index_out) \
++ ((nic)->efhw_func->filter_clear(nic, type, index_out))
++
++
++/* --- DMA --- */
++#define EFHW_DMA_ADDRMASK (0xffffffffffffffffULL)
++
++/* --- Buffers --- */
++#define EFHW_BUFFER_ADDR FALCON_BUFFER_4K_ADDR
++#define EFHW_BUFFER_PAGE FALCON_BUFFER_4K_PAGE
++#define EFHW_BUFFER_OFF FALCON_BUFFER_4K_OFF
++
++/* --- Filters --- */
++#define EFHW_IP_FILTER_NUM FALCON_FILTER_TBL_NUM
++
++#define EFHW_MAX_PAGE_SIZE FALCON_MAX_PAGE_SIZE
++
++#if PAGE_SIZE <= EFHW_MAX_PAGE_SIZE
++#define EFHW_NIC_PAGE_SIZE PAGE_SIZE
++#else
++#define EFHW_NIC_PAGE_SIZE EFHW_MAX_PAGE_SIZE
++#endif
++#define EFHW_NIC_PAGE_MASK (~(EFHW_NIC_PAGE_SIZE-1))
++
++#endif /* __CI_DRIVER_EFAB_HARDWARE_H__ */
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/common.h Wed May 06 16:56:26 2009 +0100
+@@ -0,0 +1,68 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ * resource management for Xen backend, OpenOnload, etc
+ * (including support for SFE4001 10GBT NIC)
+ *
-+ * This file provides EtherFabric NIC - EFXXXX (aka Falcon) core register
++ * This file provides EtherFabric NIC hardware interface common
++ * definitions.
++ *
++ * Copyright 2005-2007: Solarflare Communications Inc,
++ * 9501 Jeronimo Road, Suite 250,
++ * Irvine, CA 92618, USA
++ *
++ * Developed and maintained by Solarflare Communications:
++ * <linux-xen-drivers@solarflare.com>
++ * <onload-dev@solarflare.com>
++ *
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published
++ * by the Free Software Foundation, incorporated herein by reference.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
++ ****************************************************************************
++ */
++
++#ifndef __CI_DRIVER_EFAB_HARDWARE_COMMON_H__
++#define __CI_DRIVER_EFAB_HARDWARE_COMMON_H__
++
++/*----------------------------------------------------------------------------
++ *
++ * EtherFabric constants
++ *
++ *---------------------------------------------------------------------------*/
++
++#define EFHW_1K 0x00000400u
++#define EFHW_2K 0x00000800u
++#define EFHW_4K 0x00001000u
++#define EFHW_8K 0x00002000u
++#define EFHW_16K 0x00004000u
++#define EFHW_32K 0x00008000u
++#define EFHW_64K 0x00010000u
++#define EFHW_128K 0x00020000u
++#define EFHW_256K 0x00040000u
++#define EFHW_512K 0x00080000u
++#define EFHW_1M 0x00100000u
++#define EFHW_2M 0x00200000u
++#define EFHW_4M 0x00400000u
++#define EFHW_8M 0x00800000u
++#define EFHW_16M 0x01000000u
++#define EFHW_32M 0x02000000u
++#define EFHW_48M 0x03000000u
++#define EFHW_64M 0x04000000u
++#define EFHW_128M 0x08000000u
++#define EFHW_256M 0x10000000u
++#define EFHW_512M 0x20000000u
++#define EFHW_1G 0x40000000u
++#define EFHW_2G 0x80000000u
++#define EFHW_4G 0x100000000ULL
++#define EFHW_8G 0x200000000ULL
++
++#endif /* __CI_DRIVER_EFAB_HARDWARE_COMMON_H__ */
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon.h Wed May 06 16:56:26 2009 +0100
+@@ -0,0 +1,422 @@
++/****************************************************************************
++ * Driver for Solarflare network controllers -
++ * resource management for Xen backend, OpenOnload, etc
++ * (including support for SFE4001 10GBT NIC)
++ *
++ * This file provides EtherFabric NIC - EFXXXX (aka Falcon) specific
++ * definitions.
++ *
++ * Copyright 2005-2007: Solarflare Communications Inc,
++ * 9501 Jeronimo Road, Suite 250,
++ * Irvine, CA 92618, USA
++ *
++ * Developed and maintained by Solarflare Communications:
++ * <linux-xen-drivers@solarflare.com>
++ * <onload-dev@solarflare.com>
++ *
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published
++ * by the Free Software Foundation, incorporated herein by reference.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
++ ****************************************************************************
++ */
++
++#ifndef __CI_DRIVER_EFAB_HARDWARE_FALCON_H__
++#define __CI_DRIVER_EFAB_HARDWARE_FALCON_H__
++
++/*----------------------------------------------------------------------------
++ * Compile options
++ *---------------------------------------------------------------------------*/
++
++/* Falcon has an 8K maximum page size. */
++#define FALCON_MAX_PAGE_SIZE EFHW_8K
++
++/* include the register definitions */
++#include <ci/driver/efab/hardware/falcon/falcon_core.h>
++#include <ci/driver/efab/hardware/falcon/falcon_desc.h>
++#include <ci/driver/efab/hardware/falcon/falcon_event.h>
++#include <ci/driver/efab/hardware/falcon/falcon_intr_vec.h>
++
++#define FALCON_DMA_TX_DESC_BYTES 8
++#define FALCON_DMA_RX_PHYS_DESC_BYTES 8
++#define FALCON_DMA_RX_BUF_DESC_BYTES 4
++
++
++/* ---- efhw_event_t helpers --- */
++
++#ifndef EFHW_IS_LITTLE_ENDIAN
++#error This needs lots of cpu_to_le64s() in
++#endif
++
++/*!\ TODO look at whether there is an efficiency gain to be had by
++ treating the event codes to 32bit masks as is done for EF1
++
++ These masks apply to the full 64 bits of the event to extract the
++ event code - followed by the common event codes to expect
++ */
++#define __FALCON_OPEN_MASK(WIDTH) ((((uint64_t)1) << (WIDTH)) - 1)
++#define FALCON_EVENT_CODE_MASK \
++ (__FALCON_OPEN_MASK(EV_CODE_WIDTH) << EV_CODE_LBN)
++#define FALCON_EVENT_EV_Q_ID_MASK \
++ (__FALCON_OPEN_MASK(DRIVER_EV_EVQ_ID_WIDTH) << DRIVER_EV_EVQ_ID_LBN)
++#define FALCON_EVENT_TX_FLUSH_Q_ID_MASK \
++ (__FALCON_OPEN_MASK(DRIVER_EV_TX_DESCQ_ID_WIDTH) << \
++ DRIVER_EV_TX_DESCQ_ID_LBN)
++#define FALCON_EVENT_RX_FLUSH_Q_ID_MASK \
++ (__FALCON_OPEN_MASK(DRIVER_EV_RX_DESCQ_ID_WIDTH) << \
++ DRIVER_EV_RX_DESCQ_ID_LBN)
++#define FALCON_EVENT_DRV_SUBCODE_MASK \
++ (__FALCON_OPEN_MASK(DRIVER_EV_SUB_CODE_WIDTH) << \
++ DRIVER_EV_SUB_CODE_LBN)
++
++#define FALCON_EVENT_FMT "[ev:%x:%08x:%08x]"
++#define FALCON_EVENT_PRI_ARG(e) \
++ ((unsigned)(((e).u64 & FALCON_EVENT_CODE_MASK) >> EV_CODE_LBN)), \
++ ((unsigned)((e).u64 >> 32)), ((unsigned)((e).u64 & 0xFFFFFFFF))
++
++#define FALCON_EVENT_CODE(evp) ((evp)->u64 & FALCON_EVENT_CODE_MASK)
++#define FALCON_EVENT_WAKE_EVQ_ID(evp) \
++ (((evp)->u64 & FALCON_EVENT_EV_Q_ID_MASK) >> DRIVER_EV_EVQ_ID_LBN)
++#define FALCON_EVENT_TX_FLUSH_Q_ID(evp) \
++ (((evp)->u64 & FALCON_EVENT_TX_FLUSH_Q_ID_MASK) >> \
++ DRIVER_EV_TX_DESCQ_ID_LBN)
++#define FALCON_EVENT_RX_FLUSH_Q_ID(evp) \
++ (((evp)->u64 & FALCON_EVENT_RX_FLUSH_Q_ID_MASK) >> \
++ DRIVER_EV_RX_DESCQ_ID_LBN)
++#define FALCON_EVENT_DRIVER_SUBCODE(evp) \
++ (((evp)->u64 & FALCON_EVENT_DRV_SUBCODE_MASK) >> \
++ DRIVER_EV_SUB_CODE_LBN)
++
++#define FALCON_EVENT_CODE_CHAR ((uint64_t)DRIVER_EV_DECODE << EV_CODE_LBN)
++#define FALCON_EVENT_CODE_SW ((uint64_t)DRV_GEN_EV_DECODE << EV_CODE_LBN)
++
++
++/* so this is the size in bytes of an awful lot of things */
++#define FALCON_REGISTER128 (16)
++
++/* we define some unique dummy values as a debug aid */
++#ifdef _WIN32
++#define FALCON_ATOMIC_BASE 0xdeadbeef00000000ui64
++#else
++#define FALCON_ATOMIC_BASE 0xdeadbeef00000000ULL
++#endif
++#define FALCON_ATOMIC_UPD_REG (FALCON_ATOMIC_BASE | 0x1)
++#define FALCON_ATOMIC_PTR_TBL_REG (FALCON_ATOMIC_BASE | 0x2)
++#define FALCON_ATOMIC_SRPM_UDP_EVQ_REG (FALCON_ATOMIC_BASE | 0x3)
++#define FALCON_ATOMIC_RX_FLUSH_DESCQ (FALCON_ATOMIC_BASE | 0x4)
++#define FALCON_ATOMIC_TX_FLUSH_DESCQ (FALCON_ATOMIC_BASE | 0x5)
++#define FALCON_ATOMIC_INT_EN_REG (FALCON_ATOMIC_BASE | 0x6)
++#define FALCON_ATOMIC_TIMER_CMD_REG (FALCON_ATOMIC_BASE | 0x7)
++#define FALCON_ATOMIC_PACE_REG (FALCON_ATOMIC_BASE | 0x8)
++#define FALCON_ATOMIC_INT_ACK_REG (FALCON_ATOMIC_BASE | 0x9)
++/* XXX It crashed with odd value in FALCON_ATOMIC_INT_ADR_REG */
++#define FALCON_ATOMIC_INT_ADR_REG (FALCON_ATOMIC_BASE | 0xa)
++
++/*----------------------------------------------------------------------------
++ *
++ * PCI control blocks for Falcon -
++ * (P) primary is for NET
++ * (S) secondary is for CHAR
++ *
++ *---------------------------------------------------------------------------*/
++
++#define FALCON_P_CTR_AP_BAR 2
++#define FALCON_S_CTR_AP_BAR 0
++#define FALCON_S_DEVID 0x6703
++
++
++/*----------------------------------------------------------------------------
++ *
++ * Falcon constants
++ *
++ *---------------------------------------------------------------------------*/
++
++/* Note: the following constants have moved to values in struct efhw_nic:
++ * FALCON_EVQ_TBL_NUM -> nic->num_evqs
++ * FALCON_DMAQ_NUM -> nic->num_dmaqs
++ * FALCON_TIMERS_NUM -> nic->num_times
++ * These replacement constants are used as sanity checks in assertions in
++ * certain functions that don't have access to struct efhw_nic.
++ */
++#define FALCON_DMAQ_NUM_SANITY (EFHW_4K)
++#define FALCON_EVQ_TBL_NUM_SANITY (EFHW_4K)
++#define FALCON_TIMERS_NUM_SANITY (EFHW_4K)
++
++/* This value is an upper limit on the total number of filter table
++ * entries. The actual size of filter table is determined at runtime, as
++ * it can vary.
++ */
++#define FALCON_FILTER_TBL_NUM (EFHW_8K)
++
++/* max number of buffers which can be pushed before commiting */
++#define FALCON_BUFFER_UPD_MAX (128)
++
++/* We can tell falcon to write its RX buffers in 32 byte quantums,
++ and since we pad packets 2 bytes to the right we can't use
++ a full page (not unless we use jumbo mode for all queues)
++
++ NOTE: tests/nic/dma.c assumes that the value here is the real NIC
++ value, so we explicitly round it down to the nearest 32 bytes */
++
++/* #define FALCON_RX_USR_BUF_SIZE round_down(4096-2,32) */
++#define FALCON_RX_USR_BUF_SIZE 4064
++
++#define FALCON_EVQ_RPTR_REG_P0 0x400
++
++/*----------------------------------------------------------------------------
++ *
++ * Falcon requires user-space descriptor pushes to be:
++ * dword[0-2]; wiob(); dword[3]
++ *
++ * Driver register access must be locked against other threads from
++ * the same driver but can be in any order: i.e dword[0-3]; wiob()
++ *
++ * The following helpers ensure that valid dword orderings are exercised
++ *
++ *---------------------------------------------------------------------------*/
++
++/* A union to allow writting 64bit values as 32bit values, without
++ * hitting the compilers aliasing rules. We hope the compiler optimises
++ * away the copy's anyway */
++union __u64to32 {
++ uint64_t u64;
++ struct {
++#ifdef EFHW_IS_LITTLE_ENDIAN
++ uint32_t a;
++ uint32_t b;
++#else
++ uint32_t b;
++ uint32_t a;
++#endif
++ } s;
++};
++
++static inline void
++falcon_write_ddd_d(volatile char __iomem *kva,
++ uint32_t d0, uint32_t d1, uint32_t d2, uint32_t d3)
++{
++ writel(d0, kva + 0);
++ writel(d1, kva + 4);
++ writel(d2, kva + 8);
++ mmiowb();
++ writel(d3, kva + 12);
++}
++
++static inline void falcon_write_q(volatile char __iomem *kva, uint64_t q)
++{
++ union __u64to32 u;
++ u.u64 = q;
++
++ writel(u.s.a, kva);
++ mmiowb();
++ writel(u.s.b, kva + 4);
++}
++
++static inline void falcon_read_q(volatile char __iomem *addr, uint64_t *q0)
++{
++ /* It is essential that we read dword0 first, so that
++ * the shadow register is updated with the latest value
++ * and we get a self consistent value.
++ */
++ union __u64to32 u;
++ u.s.a = readl(addr);
++ rmb();
++ u.s.b = readl(addr + 4);
++
++ *q0 = u.u64;
++}
++
++static inline void
++falcon_write_qq(volatile char __iomem *kva, uint64_t q0, uint64_t q1)
++{
++ writeq(q0, kva + 0);
++ falcon_write_q(kva + 8, q1);
++}
++
++static inline void
++falcon_read_qq(volatile char __iomem *addr, uint64_t *q0, uint64_t *q1)
++{
++ falcon_read_q(addr, q0);
++ *q1 = readq(addr + 8);
++}
++
++
++
++/*----------------------------------------------------------------------------
++ *
++ * Buffer virtual addresses (4K buffers)
++ *
++ *---------------------------------------------------------------------------*/
++
++/* Form a buffer virtual address from buffer ID and offset. If the offset
++** is larger than the buffer size, then the buffer indexed will be
++** calculated appropriately. It is the responsibility of the caller to
++** ensure that they have valid buffers programmed at that address.
++*/
++#define FALCON_VADDR_8K_S (13)
++#define FALCON_VADDR_4K_S (12)
++#define FALCON_VADDR_M 0xfffff /* post shift mask */
++
++#define FALCON_BUFFER_8K_ADDR(id, off) (((id) << FALCON_VADDR_8K_S) + (off))
++#define FALCON_BUFFER_8K_PAGE(vaddr) \
++ (((vaddr) >> FALCON_VADDR_8K_S) & FALCON_VADDR_M)
++#define FALCON_BUFFER_8K_OFF(vaddr) \
++ ((vaddr) & __FALCON_MASK32(FALCON_VADDR_8K_S))
++
++#define FALCON_BUFFER_4K_ADDR(id, off) (((id) << FALCON_VADDR_4K_S) + (off))
++#define FALCON_BUFFER_4K_PAGE(vaddr) \
++ (((vaddr) >> FALCON_VADDR_4K_S) & FALCON_VADDR_M)
++#define FALCON_BUFFER_4K_OFF(vaddr) \
++ ((vaddr) & __FALCON_MASK32(FALCON_VADDR_4K_S))
++
++/*----------------------------------------------------------------------------
++ *
++ * Timer helpers
++ *
++ *---------------------------------------------------------------------------*/
++
++static inline int falcon_timer_page_addr(uint idx)
++{
++
++ EFHW_ASSERT(TIMER_CMD_REG_KER_OFST ==
++ (TIMER_CMD_REG_PAGE4_OFST - 4 * EFHW_8K));
++
++ EFHW_ASSERT(idx < FALCON_TIMERS_NUM_SANITY);
++
++ if (idx < 4)
++ return TIMER_CMD_REG_KER_OFST + (idx * EFHW_8K);
++ else if (idx < 1024)
++ return TIMER_CMD_REG_PAGE4_OFST + ((idx - 4) * EFHW_8K);
++ else
++ return TIMER_CMD_REG_PAGE123K_OFST + ((idx - 1024) * EFHW_8K);
++}
++
++#define FALCON_TIMER_PAGE_MASK (EFHW_8K-1)
++
++static inline int falcon_timer_page_offset(uint idx)
++{
++ return falcon_timer_page_addr(idx) & FALCON_TIMER_PAGE_MASK;
++}
++
++/*----------------------------------------------------------------------------
++ *
++ * DMA Queue helpers
++ *
++ *---------------------------------------------------------------------------*/
++
++/* iSCSI queue for A1; see bug 5427 for more details. */
++#define FALCON_A1_ISCSI_DMAQ 4
++
++/*! returns an address within a bar of the TX DMA doorbell */
++static inline uint falcon_tx_dma_page_addr(uint dmaq_idx)
++{
++ uint page;
++
++ EFHW_ASSERT((((TX_DESC_UPD_REG_PAGE123K_OFST) & (EFHW_8K - 1)) ==
++ (((TX_DESC_UPD_REG_PAGE4_OFST) & (EFHW_8K - 1)))));
++
++ EFHW_ASSERT(dmaq_idx < FALCON_DMAQ_NUM_SANITY);
++
++ if (dmaq_idx < 1024)
++ page = TX_DESC_UPD_REG_PAGE4_OFST + ((dmaq_idx - 4) * EFHW_8K);
++ else
++ page =
++ TX_DESC_UPD_REG_PAGE123K_OFST +
++ ((dmaq_idx - 1024) * EFHW_8K);
++
++ return page;
++}
++
++/*! returns an address within a bar of the RX DMA doorbell */
++static inline uint falcon_rx_dma_page_addr(uint dmaq_idx)
++{
++ uint page;
++
++ EFHW_ASSERT((((RX_DESC_UPD_REG_PAGE123K_OFST) & (EFHW_8K - 1)) ==
++ ((RX_DESC_UPD_REG_PAGE4_OFST) & (EFHW_8K - 1))));
++
++ EFHW_ASSERT(dmaq_idx < FALCON_DMAQ_NUM_SANITY);
++
++ if (dmaq_idx < 1024)
++ page = RX_DESC_UPD_REG_PAGE4_OFST + ((dmaq_idx - 4) * EFHW_8K);
++ else
++ page =
++ RX_DESC_UPD_REG_PAGE123K_OFST +
++ ((dmaq_idx - 1024) * EFHW_8K);
++
++ return page;
++}
++
++/*! "page"=NIC-dependent register set size */
++#define FALCON_DMA_PAGE_MASK (EFHW_8K-1)
++
++/*! returns an address within a bar of the start of the "page"
++ containing the TX DMA doorbell */
++static inline int falcon_tx_dma_page_base(uint dma_idx)
++{
++ return falcon_tx_dma_page_addr(dma_idx) & ~FALCON_DMA_PAGE_MASK;
++}
++
++/*! returns an address within a bar of the start of the "page"
++ containing the RX DMA doorbell */
++static inline int falcon_rx_dma_page_base(uint dma_idx)
++{
++ return falcon_rx_dma_page_addr(dma_idx) & ~FALCON_DMA_PAGE_MASK;
++}
++
++/*! returns an offset within a "page" of the TX DMA doorbell */
++static inline int falcon_tx_dma_page_offset(uint dma_idx)
++{
++ return falcon_tx_dma_page_addr(dma_idx) & FALCON_DMA_PAGE_MASK;
++}
++
++/*! returns an offset within a "page" of the RX DMA doorbell */
++static inline int falcon_rx_dma_page_offset(uint dma_idx)
++{
++ return falcon_rx_dma_page_addr(dma_idx) & FALCON_DMA_PAGE_MASK;
++}
++
++/*----------------------------------------------------------------------------
++ *
++ * Events
++ *
++ *---------------------------------------------------------------------------*/
++
++/* Falcon nails down the event queue mappings */
++#define FALCON_EVQ_KERNEL0 (0) /* hardwired for net driver */
++#define FALCON_EVQ_CHAR (4) /* char driver's event queue */
++
++/* reserved by the drivers */
++#define FALCON_EVQ_TBL_RESERVED (8)
++
++/* default DMA-Q sizes */
++#define FALCON_DMA_Q_DEFAULT_TX_SIZE 512
++
++#define FALCON_DMA_Q_DEFAULT_RX_SIZE 512
++
++#define FALCON_DMA_Q_DEFAULT_MMAP \
++ (FALCON_DMA_Q_DEFAULT_TX_SIZE * (FALCON_DMA_TX_DESC_BYTES * 2))
++
++/*----------------------------------------------------------------------------
++ *
++ * DEBUG - Analyser trigger
++ *
++ *---------------------------------------------------------------------------*/
++
++static inline void
++falcon_deadbeef(volatile char __iomem *efhw_kva, unsigned what)
++{
++ writel(what, efhw_kva + 0x300);
++ mmiowb();
++}
++#endif /* __CI_DRIVER_EFAB_HARDWARE_FALCON_H__ */
++/*! \cidoxg_end */
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_core.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_core.h Wed May 06 16:56:26 2009 +0100
+@@ -0,0 +1,1147 @@
++/****************************************************************************
++ * Driver for Solarflare network controllers -
++ * resource management for Xen backend, OpenOnload, etc
++ * (including support for SFE4001 10GBT NIC)
++ *
++ * This file provides EtherFabric NIC - EFXXXX (aka Falcon) core register
+ * definitions.
+ *
+ * Copyright 2005-2007: Solarflare Communications Inc,
+#define EE_VPD_SW_DATA_REG_OFST 0x160 /* VPD access SW data register */
+ #define EE_VPD_CYC_DAT_LBN 0
+ #define EE_VPD_CYC_DAT_WIDTH 32
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_desc.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_desc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_desc.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_desc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_desc.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,75 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ #define TX_USR_BUF_ID_WIDTH 20
+ #define TX_USR_BYTE_OFS_LBN 0
+ #define TX_USR_BYTE_OFS_WIDTH 13
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_event.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_event.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_event.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_event.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_event.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,155 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ #define DRV_GEN_EV_CODE_WIDTH 4
+ #define DRV_GEN_EV_DATA_LBN 0
+ #define DRV_GEN_EV_DATA_WIDTH 60
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_intr_vec.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_intr_vec.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_intr_vec.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_intr_vec.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_intr_vec.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,44 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+#define DW2_OFST 0x8 /* Double-word 2: Fatal interrupts */
+ #define FATAL_INT_LBN 0
+ #define FATAL_INT_WIDTH 1
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon.h 2009-03-25 16:11:05.000000000 +0000
-@@ -0,0 +1,422 @@
-+/****************************************************************************
-+ * Driver for Solarflare network controllers -
-+ * resource management for Xen backend, OpenOnload, etc
-+ * (including support for SFE4001 10GBT NIC)
-+ *
-+ * This file provides EtherFabric NIC - EFXXXX (aka Falcon) specific
-+ * definitions.
-+ *
-+ * Copyright 2005-2007: Solarflare Communications Inc,
-+ * 9501 Jeronimo Road, Suite 250,
-+ * Irvine, CA 92618, USA
-+ *
-+ * Developed and maintained by Solarflare Communications:
-+ * <linux-xen-drivers@solarflare.com>
-+ * <onload-dev@solarflare.com>
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published
-+ * by the Free Software Foundation, incorporated herein by reference.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-+ ****************************************************************************
-+ */
-+
-+#ifndef __CI_DRIVER_EFAB_HARDWARE_FALCON_H__
-+#define __CI_DRIVER_EFAB_HARDWARE_FALCON_H__
-+
-+/*----------------------------------------------------------------------------
-+ * Compile options
-+ *---------------------------------------------------------------------------*/
-+
-+/* Falcon has an 8K maximum page size. */
-+#define FALCON_MAX_PAGE_SIZE EFHW_8K
-+
-+/* include the register definitions */
-+#include <ci/driver/efab/hardware/falcon/falcon_core.h>
-+#include <ci/driver/efab/hardware/falcon/falcon_desc.h>
-+#include <ci/driver/efab/hardware/falcon/falcon_event.h>
-+#include <ci/driver/efab/hardware/falcon/falcon_intr_vec.h>
-+
-+#define FALCON_DMA_TX_DESC_BYTES 8
-+#define FALCON_DMA_RX_PHYS_DESC_BYTES 8
-+#define FALCON_DMA_RX_BUF_DESC_BYTES 4
-+
-+
-+/* ---- efhw_event_t helpers --- */
-+
-+#ifndef EFHW_IS_LITTLE_ENDIAN
-+#error This needs lots of cpu_to_le64s() in
-+#endif
-+
-+/*!\ TODO look at whether there is an efficiency gain to be had by
-+ treating the event codes to 32bit masks as is done for EF1
-+
-+ These masks apply to the full 64 bits of the event to extract the
-+ event code - followed by the common event codes to expect
-+ */
-+#define __FALCON_OPEN_MASK(WIDTH) ((((uint64_t)1) << (WIDTH)) - 1)
-+#define FALCON_EVENT_CODE_MASK \
-+ (__FALCON_OPEN_MASK(EV_CODE_WIDTH) << EV_CODE_LBN)
-+#define FALCON_EVENT_EV_Q_ID_MASK \
-+ (__FALCON_OPEN_MASK(DRIVER_EV_EVQ_ID_WIDTH) << DRIVER_EV_EVQ_ID_LBN)
-+#define FALCON_EVENT_TX_FLUSH_Q_ID_MASK \
-+ (__FALCON_OPEN_MASK(DRIVER_EV_TX_DESCQ_ID_WIDTH) << \
-+ DRIVER_EV_TX_DESCQ_ID_LBN)
-+#define FALCON_EVENT_RX_FLUSH_Q_ID_MASK \
-+ (__FALCON_OPEN_MASK(DRIVER_EV_RX_DESCQ_ID_WIDTH) << \
-+ DRIVER_EV_RX_DESCQ_ID_LBN)
-+#define FALCON_EVENT_DRV_SUBCODE_MASK \
-+ (__FALCON_OPEN_MASK(DRIVER_EV_SUB_CODE_WIDTH) << \
-+ DRIVER_EV_SUB_CODE_LBN)
-+
-+#define FALCON_EVENT_FMT "[ev:%x:%08x:%08x]"
-+#define FALCON_EVENT_PRI_ARG(e) \
-+ ((unsigned)(((e).u64 & FALCON_EVENT_CODE_MASK) >> EV_CODE_LBN)), \
-+ ((unsigned)((e).u64 >> 32)), ((unsigned)((e).u64 & 0xFFFFFFFF))
-+
-+#define FALCON_EVENT_CODE(evp) ((evp)->u64 & FALCON_EVENT_CODE_MASK)
-+#define FALCON_EVENT_WAKE_EVQ_ID(evp) \
-+ (((evp)->u64 & FALCON_EVENT_EV_Q_ID_MASK) >> DRIVER_EV_EVQ_ID_LBN)
-+#define FALCON_EVENT_TX_FLUSH_Q_ID(evp) \
-+ (((evp)->u64 & FALCON_EVENT_TX_FLUSH_Q_ID_MASK) >> \
-+ DRIVER_EV_TX_DESCQ_ID_LBN)
-+#define FALCON_EVENT_RX_FLUSH_Q_ID(evp) \
-+ (((evp)->u64 & FALCON_EVENT_RX_FLUSH_Q_ID_MASK) >> \
-+ DRIVER_EV_RX_DESCQ_ID_LBN)
-+#define FALCON_EVENT_DRIVER_SUBCODE(evp) \
-+ (((evp)->u64 & FALCON_EVENT_DRV_SUBCODE_MASK) >> \
-+ DRIVER_EV_SUB_CODE_LBN)
-+
-+#define FALCON_EVENT_CODE_CHAR ((uint64_t)DRIVER_EV_DECODE << EV_CODE_LBN)
-+#define FALCON_EVENT_CODE_SW ((uint64_t)DRV_GEN_EV_DECODE << EV_CODE_LBN)
-+
-+
-+/* so this is the size in bytes of an awful lot of things */
-+#define FALCON_REGISTER128 (16)
-+
-+/* we define some unique dummy values as a debug aid */
-+#ifdef _WIN32
-+#define FALCON_ATOMIC_BASE 0xdeadbeef00000000ui64
-+#else
-+#define FALCON_ATOMIC_BASE 0xdeadbeef00000000ULL
-+#endif
-+#define FALCON_ATOMIC_UPD_REG (FALCON_ATOMIC_BASE | 0x1)
-+#define FALCON_ATOMIC_PTR_TBL_REG (FALCON_ATOMIC_BASE | 0x2)
-+#define FALCON_ATOMIC_SRPM_UDP_EVQ_REG (FALCON_ATOMIC_BASE | 0x3)
-+#define FALCON_ATOMIC_RX_FLUSH_DESCQ (FALCON_ATOMIC_BASE | 0x4)
-+#define FALCON_ATOMIC_TX_FLUSH_DESCQ (FALCON_ATOMIC_BASE | 0x5)
-+#define FALCON_ATOMIC_INT_EN_REG (FALCON_ATOMIC_BASE | 0x6)
-+#define FALCON_ATOMIC_TIMER_CMD_REG (FALCON_ATOMIC_BASE | 0x7)
-+#define FALCON_ATOMIC_PACE_REG (FALCON_ATOMIC_BASE | 0x8)
-+#define FALCON_ATOMIC_INT_ACK_REG (FALCON_ATOMIC_BASE | 0x9)
-+/* XXX It crashed with odd value in FALCON_ATOMIC_INT_ADR_REG */
-+#define FALCON_ATOMIC_INT_ADR_REG (FALCON_ATOMIC_BASE | 0xa)
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * PCI control blocks for Falcon -
-+ * (P) primary is for NET
-+ * (S) secondary is for CHAR
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+#define FALCON_P_CTR_AP_BAR 2
-+#define FALCON_S_CTR_AP_BAR 0
-+#define FALCON_S_DEVID 0x6703
-+
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * Falcon constants
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+/* Note: the following constants have moved to values in struct efhw_nic:
-+ * FALCON_EVQ_TBL_NUM -> nic->num_evqs
-+ * FALCON_DMAQ_NUM -> nic->num_dmaqs
-+ * FALCON_TIMERS_NUM -> nic->num_times
-+ * These replacement constants are used as sanity checks in assertions in
-+ * certain functions that don't have access to struct efhw_nic.
-+ */
-+#define FALCON_DMAQ_NUM_SANITY (EFHW_4K)
-+#define FALCON_EVQ_TBL_NUM_SANITY (EFHW_4K)
-+#define FALCON_TIMERS_NUM_SANITY (EFHW_4K)
-+
-+/* This value is an upper limit on the total number of filter table
-+ * entries. The actual size of filter table is determined at runtime, as
-+ * it can vary.
-+ */
-+#define FALCON_FILTER_TBL_NUM (EFHW_8K)
-+
-+/* max number of buffers which can be pushed before commiting */
-+#define FALCON_BUFFER_UPD_MAX (128)
-+
-+/* We can tell falcon to write its RX buffers in 32 byte quantums,
-+ and since we pad packets 2 bytes to the right we can't use
-+ a full page (not unless we use jumbo mode for all queues)
-+
-+ NOTE: tests/nic/dma.c assumes that the value here is the real NIC
-+ value, so we explicitly round it down to the nearest 32 bytes */
-+
-+/* #define FALCON_RX_USR_BUF_SIZE round_down(4096-2,32) */
-+#define FALCON_RX_USR_BUF_SIZE 4064
-+
-+#define FALCON_EVQ_RPTR_REG_P0 0x400
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * Falcon requires user-space descriptor pushes to be:
-+ * dword[0-2]; wiob(); dword[3]
-+ *
-+ * Driver register access must be locked against other threads from
-+ * the same driver but can be in any order: i.e dword[0-3]; wiob()
-+ *
-+ * The following helpers ensure that valid dword orderings are exercised
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+/* A union to allow writting 64bit values as 32bit values, without
-+ * hitting the compilers aliasing rules. We hope the compiler optimises
-+ * away the copy's anyway */
-+union __u64to32 {
-+ uint64_t u64;
-+ struct {
-+#ifdef EFHW_IS_LITTLE_ENDIAN
-+ uint32_t a;
-+ uint32_t b;
-+#else
-+ uint32_t b;
-+ uint32_t a;
-+#endif
-+ } s;
-+};
-+
-+static inline void
-+falcon_write_ddd_d(volatile char __iomem *kva,
-+ uint32_t d0, uint32_t d1, uint32_t d2, uint32_t d3)
-+{
-+ writel(d0, kva + 0);
-+ writel(d1, kva + 4);
-+ writel(d2, kva + 8);
-+ mmiowb();
-+ writel(d3, kva + 12);
-+}
-+
-+static inline void falcon_write_q(volatile char __iomem *kva, uint64_t q)
-+{
-+ union __u64to32 u;
-+ u.u64 = q;
-+
-+ writel(u.s.a, kva);
-+ mmiowb();
-+ writel(u.s.b, kva + 4);
-+}
-+
-+static inline void falcon_read_q(volatile char __iomem *addr, uint64_t *q0)
-+{
-+ /* It is essential that we read dword0 first, so that
-+ * the shadow register is updated with the latest value
-+ * and we get a self consistent value.
-+ */
-+ union __u64to32 u;
-+ u.s.a = readl(addr);
-+ rmb();
-+ u.s.b = readl(addr + 4);
-+
-+ *q0 = u.u64;
-+}
-+
-+static inline void
-+falcon_write_qq(volatile char __iomem *kva, uint64_t q0, uint64_t q1)
-+{
-+ writeq(q0, kva + 0);
-+ falcon_write_q(kva + 8, q1);
-+}
-+
-+static inline void
-+falcon_read_qq(volatile char __iomem *addr, uint64_t *q0, uint64_t *q1)
-+{
-+ falcon_read_q(addr, q0);
-+ *q1 = readq(addr + 8);
-+}
-+
-+
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * Buffer virtual addresses (4K buffers)
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+/* Form a buffer virtual address from buffer ID and offset. If the offset
-+** is larger than the buffer size, then the buffer indexed will be
-+** calculated appropriately. It is the responsibility of the caller to
-+** ensure that they have valid buffers programmed at that address.
-+*/
-+#define FALCON_VADDR_8K_S (13)
-+#define FALCON_VADDR_4K_S (12)
-+#define FALCON_VADDR_M 0xfffff /* post shift mask */
-+
-+#define FALCON_BUFFER_8K_ADDR(id, off) (((id) << FALCON_VADDR_8K_S) + (off))
-+#define FALCON_BUFFER_8K_PAGE(vaddr) \
-+ (((vaddr) >> FALCON_VADDR_8K_S) & FALCON_VADDR_M)
-+#define FALCON_BUFFER_8K_OFF(vaddr) \
-+ ((vaddr) & __FALCON_MASK32(FALCON_VADDR_8K_S))
-+
-+#define FALCON_BUFFER_4K_ADDR(id, off) (((id) << FALCON_VADDR_4K_S) + (off))
-+#define FALCON_BUFFER_4K_PAGE(vaddr) \
-+ (((vaddr) >> FALCON_VADDR_4K_S) & FALCON_VADDR_M)
-+#define FALCON_BUFFER_4K_OFF(vaddr) \
-+ ((vaddr) & __FALCON_MASK32(FALCON_VADDR_4K_S))
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * Timer helpers
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+static inline int falcon_timer_page_addr(uint idx)
-+{
-+
-+ EFHW_ASSERT(TIMER_CMD_REG_KER_OFST ==
-+ (TIMER_CMD_REG_PAGE4_OFST - 4 * EFHW_8K));
-+
-+ EFHW_ASSERT(idx < FALCON_TIMERS_NUM_SANITY);
-+
-+ if (idx < 4)
-+ return TIMER_CMD_REG_KER_OFST + (idx * EFHW_8K);
-+ else if (idx < 1024)
-+ return TIMER_CMD_REG_PAGE4_OFST + ((idx - 4) * EFHW_8K);
-+ else
-+ return TIMER_CMD_REG_PAGE123K_OFST + ((idx - 1024) * EFHW_8K);
-+}
-+
-+#define FALCON_TIMER_PAGE_MASK (EFHW_8K-1)
-+
-+static inline int falcon_timer_page_offset(uint idx)
-+{
-+ return falcon_timer_page_addr(idx) & FALCON_TIMER_PAGE_MASK;
-+}
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * DMA Queue helpers
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+/* iSCSI queue for A1; see bug 5427 for more details. */
-+#define FALCON_A1_ISCSI_DMAQ 4
-+
-+/*! returns an address within a bar of the TX DMA doorbell */
-+static inline uint falcon_tx_dma_page_addr(uint dmaq_idx)
-+{
-+ uint page;
-+
-+ EFHW_ASSERT((((TX_DESC_UPD_REG_PAGE123K_OFST) & (EFHW_8K - 1)) ==
-+ (((TX_DESC_UPD_REG_PAGE4_OFST) & (EFHW_8K - 1)))));
-+
-+ EFHW_ASSERT(dmaq_idx < FALCON_DMAQ_NUM_SANITY);
-+
-+ if (dmaq_idx < 1024)
-+ page = TX_DESC_UPD_REG_PAGE4_OFST + ((dmaq_idx - 4) * EFHW_8K);
-+ else
-+ page =
-+ TX_DESC_UPD_REG_PAGE123K_OFST +
-+ ((dmaq_idx - 1024) * EFHW_8K);
-+
-+ return page;
-+}
-+
-+/*! returns an address within a bar of the RX DMA doorbell */
-+static inline uint falcon_rx_dma_page_addr(uint dmaq_idx)
-+{
-+ uint page;
-+
-+ EFHW_ASSERT((((RX_DESC_UPD_REG_PAGE123K_OFST) & (EFHW_8K - 1)) ==
-+ ((RX_DESC_UPD_REG_PAGE4_OFST) & (EFHW_8K - 1))));
-+
-+ EFHW_ASSERT(dmaq_idx < FALCON_DMAQ_NUM_SANITY);
-+
-+ if (dmaq_idx < 1024)
-+ page = RX_DESC_UPD_REG_PAGE4_OFST + ((dmaq_idx - 4) * EFHW_8K);
-+ else
-+ page =
-+ RX_DESC_UPD_REG_PAGE123K_OFST +
-+ ((dmaq_idx - 1024) * EFHW_8K);
-+
-+ return page;
-+}
-+
-+/*! "page"=NIC-dependent register set size */
-+#define FALCON_DMA_PAGE_MASK (EFHW_8K-1)
-+
-+/*! returns an address within a bar of the start of the "page"
-+ containing the TX DMA doorbell */
-+static inline int falcon_tx_dma_page_base(uint dma_idx)
-+{
-+ return falcon_tx_dma_page_addr(dma_idx) & ~FALCON_DMA_PAGE_MASK;
-+}
-+
-+/*! returns an address within a bar of the start of the "page"
-+ containing the RX DMA doorbell */
-+static inline int falcon_rx_dma_page_base(uint dma_idx)
-+{
-+ return falcon_rx_dma_page_addr(dma_idx) & ~FALCON_DMA_PAGE_MASK;
-+}
-+
-+/*! returns an offset within a "page" of the TX DMA doorbell */
-+static inline int falcon_tx_dma_page_offset(uint dma_idx)
-+{
-+ return falcon_tx_dma_page_addr(dma_idx) & FALCON_DMA_PAGE_MASK;
-+}
-+
-+/*! returns an offset within a "page" of the RX DMA doorbell */
-+static inline int falcon_rx_dma_page_offset(uint dma_idx)
-+{
-+ return falcon_rx_dma_page_addr(dma_idx) & FALCON_DMA_PAGE_MASK;
-+}
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * Events
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+/* Falcon nails down the event queue mappings */
-+#define FALCON_EVQ_KERNEL0 (0) /* hardwired for net driver */
-+#define FALCON_EVQ_CHAR (4) /* char driver's event queue */
-+
-+/* reserved by the drivers */
-+#define FALCON_EVQ_TBL_RESERVED (8)
-+
-+/* default DMA-Q sizes */
-+#define FALCON_DMA_Q_DEFAULT_TX_SIZE 512
-+
-+#define FALCON_DMA_Q_DEFAULT_RX_SIZE 512
-+
-+#define FALCON_DMA_Q_DEFAULT_MMAP \
-+ (FALCON_DMA_Q_DEFAULT_TX_SIZE * (FALCON_DMA_TX_DESC_BYTES * 2))
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * DEBUG - Analyser trigger
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+static inline void
-+falcon_deadbeef(volatile char __iomem *efhw_kva, unsigned what)
-+{
-+ writel(what, efhw_kva + 0x300);
-+ mmiowb();
-+}
-+#endif /* __CI_DRIVER_EFAB_HARDWARE_FALCON_H__ */
-+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/workarounds.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/workarounds.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/workarounds.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/workarounds.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/workarounds.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,67 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+#endif /* B0/A01 */
+
+#endif /* __CI_DRIVER_EFAB_WORKAROUNDS_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware.h 2009-03-25 16:11:05.000000000 +0000
-@@ -0,0 +1,188 @@
-+/****************************************************************************
-+ * Driver for Solarflare network controllers -
-+ * resource management for Xen backend, OpenOnload, etc
-+ * (including support for SFE4001 10GBT NIC)
-+ *
-+ * This file provides EtherFabric NIC hardware interface.
-+ *
-+ * Copyright 2005-2007: Solarflare Communications Inc,
-+ * 9501 Jeronimo Road, Suite 250,
-+ * Irvine, CA 92618, USA
-+ *
-+ * Developed and maintained by Solarflare Communications:
-+ * <linux-xen-drivers@solarflare.com>
-+ * <onload-dev@solarflare.com>
-+ *
-+ * Certain parts of the driver were implemented by
-+ * Alexandra Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
-+ * OKTET Labs Ltd, Russia,
-+ * http://oktetlabs.ru, <info@oktetlabs.ru>
-+ * by request of Solarflare Communications
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published
-+ * by the Free Software Foundation, incorporated herein by reference.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-+ ****************************************************************************
-+ */
-+
-+#ifndef __CI_DRIVER_EFAB_HARDWARE_H__
-+#define __CI_DRIVER_EFAB_HARDWARE_H__
-+
-+#include "ci/driver/efab/hardware/workarounds.h"
-+#include <ci/efhw/hardware_sysdep.h>
-+
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * Common EtherFabric definitions
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+#include <ci/efhw/debug.h>
-+#include <ci/efhw/common.h>
-+#include <ci/driver/efab/hardware/common.h>
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * EtherFabric varients
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+#include <ci/driver/efab/hardware/falcon.h>
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * EtherFabric Portable Hardware Layer defines
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+ /*-------------- Initialisation ------------ */
-+#define efhw_nic_close_hardware(nic) \
-+ ((nic)->efhw_func->close_hardware(nic))
-+
-+#define efhw_nic_init_hardware(nic, ev_handlers, mac_addr, non_irq_evq) \
-+ ((nic)->efhw_func->init_hardware((nic), (ev_handlers), (mac_addr), \
-+ (non_irq_evq)))
-+
-+/*-------------- Interrupt support ------------ */
-+/** Handle interrupt. Return 0 if not handled, 1 if handled. */
-+#define efhw_nic_interrupt(nic) \
-+ ((nic)->efhw_func->interrupt(nic))
-+
-+#define efhw_nic_interrupt_enable(nic) \
-+ ((nic)->efhw_func->interrupt_enable(nic))
-+
-+#define efhw_nic_interrupt_disable(nic) \
-+ ((nic)->efhw_func->interrupt_disable(nic))
-+
-+#define efhw_nic_set_interrupt_moderation(nic, evq, val) \
-+ ((nic)->efhw_func->set_interrupt_moderation(nic, evq, val))
-+
-+/*-------------- Event support ------------ */
-+
-+#define efhw_nic_event_queue_enable(nic, evq, size, q_base, buf_base, \
-+ interrupting) \
-+ ((nic)->efhw_func->event_queue_enable((nic), (evq), (size), (q_base), \
-+ (buf_base), (interrupting)))
-+
-+#define efhw_nic_event_queue_disable(nic, evq, timer_only) \
-+ ((nic)->efhw_func->event_queue_disable(nic, evq, timer_only))
-+
-+#define efhw_nic_wakeup_request(nic, q_base, index, evq) \
-+ ((nic)->efhw_func->wakeup_request(nic, q_base, index, evq))
-+
-+#define efhw_nic_sw_event(nic, data, ev) \
-+ ((nic)->efhw_func->sw_event(nic, data, ev))
-+
-+/*-------------- Filter support ------------ */
-+#define efhw_nic_ipfilter_set(nic, type, index, dmaq, \
-+ saddr, sport, daddr, dport) \
-+ ((nic)->efhw_func->ipfilter_set(nic, type, index, dmaq, \
-+ saddr, sport, daddr, dport))
-+
-+#define efhw_nic_ipfilter_clear(nic, index) \
-+ ((nic)->efhw_func->ipfilter_clear(nic, index))
-+
-+/*-------------- DMA support ------------ */
-+#define efhw_nic_dmaq_tx_q_init(nic, dmaq, evq, owner, tag, \
-+ dmaq_size, index, flags) \
-+ ((nic)->efhw_func->dmaq_tx_q_init(nic, dmaq, evq, owner, tag, \
-+ dmaq_size, index, flags))
-+
-+#define efhw_nic_dmaq_rx_q_init(nic, dmaq, evq, owner, tag, \
-+ dmaq_size, index, flags) \
-+ ((nic)->efhw_func->dmaq_rx_q_init(nic, dmaq, evq, owner, tag, \
-+ dmaq_size, index, flags))
-+
-+#define efhw_nic_dmaq_tx_q_disable(nic, dmaq) \
-+ ((nic)->efhw_func->dmaq_tx_q_disable(nic, dmaq))
-+
-+#define efhw_nic_dmaq_rx_q_disable(nic, dmaq) \
-+ ((nic)->efhw_func->dmaq_rx_q_disable(nic, dmaq))
-+
-+#define efhw_nic_flush_tx_dma_channel(nic, dmaq) \
-+ ((nic)->efhw_func->flush_tx_dma_channel(nic, dmaq))
-+
-+#define efhw_nic_flush_rx_dma_channel(nic, dmaq) \
-+ ((nic)->efhw_func->flush_rx_dma_channel(nic, dmaq))
-+
-+/*-------------- MAC Low level interface ---- */
-+#define efhw_gmac_get_mac_addr(nic) \
-+ ((nic)->gmac->get_mac_addr((nic)->gmac))
-+
-+/*-------------- Buffer table -------------- */
-+#define efhw_nic_buffer_table_set(nic, addr, bufsz, region, \
-+ own_id, buf_id) \
-+ ((nic)->efhw_func->buffer_table_set(nic, addr, bufsz, region, \
-+ own_id, buf_id))
-+
-+#define efhw_nic_buffer_table_set_n(nic, buf_id, addr, bufsz, \
-+ region, n_pages, own_id) \
-+ ((nic)->efhw_func->buffer_table_set_n(nic, buf_id, addr, bufsz, \
-+ region, n_pages, own_id))
-+
-+#define efhw_nic_buffer_table_clear(nic, id, num) \
-+ ((nic)->efhw_func->buffer_table_clear(nic, id, num))
-+
-+#define efhw_nic_buffer_table_commit(nic) \
-+ ((nic)->efhw_func->buffer_table_commit(nic))
-+
-+/*-------------- New filter API ------------ */
-+#define efhw_nic_filter_set(nic, spec, index_out) \
-+ ((nic)->efhw_func->filter_set(nic, spec, index_out))
-+
-+#define efhw_nic_filter_clear(nic, type, index_out) \
-+ ((nic)->efhw_func->filter_clear(nic, type, index_out))
-+
-+
-+/* --- DMA --- */
-+#define EFHW_DMA_ADDRMASK (0xffffffffffffffffULL)
-+
-+/* --- Buffers --- */
-+#define EFHW_BUFFER_ADDR FALCON_BUFFER_4K_ADDR
-+#define EFHW_BUFFER_PAGE FALCON_BUFFER_4K_PAGE
-+#define EFHW_BUFFER_OFF FALCON_BUFFER_4K_OFF
-+
-+/* --- Filters --- */
-+#define EFHW_IP_FILTER_NUM FALCON_FILTER_TBL_NUM
-+
-+#define EFHW_MAX_PAGE_SIZE FALCON_MAX_PAGE_SIZE
-+
-+#if PAGE_SIZE <= EFHW_MAX_PAGE_SIZE
-+#define EFHW_NIC_PAGE_SIZE PAGE_SIZE
-+#else
-+#define EFHW_NIC_PAGE_SIZE EFHW_MAX_PAGE_SIZE
-+#endif
-+#define EFHW_NIC_PAGE_MASK (~(EFHW_NIC_PAGE_SIZE-1))
-+
-+#endif /* __CI_DRIVER_EFAB_HARDWARE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/resource/efx_vi.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/resource/efx_vi.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/resource/efx_vi.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/resource/efx_vi.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/resource/efx_vi.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,273 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ int *length);
+
+#endif /* __CI_DRIVER_RESOURCE_EFX_VI_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/resource/linux_efhw_nic.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/resource/linux_efhw_nic.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/resource/linux_efhw_nic.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/resource/linux_efhw_nic.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/resource/linux_efhw_nic.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,69 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ container_of(_efhw_nic, struct linux_efhw_nic, efrm_nic.efhw_nic)
+
+#endif /* __CI_DRIVER_RESOURCE_LINUX_RESOURCE__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/checks.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/checks.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/checks.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/checks.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/checks.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,118 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ EFHW_ASSERT(((LBN) >= 0) && (((LBN)+(WIDTH)) <= 64))
+
+#endif /* __CI_EFHW_CHECK_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/common.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/common.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/common.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,93 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ support */
+
+#endif /* __CI_EFHW_COMMON_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,61 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+#endif
+
+#endif /* __CI_EFHW_COMMON_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/debug.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/debug.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/debug.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/debug.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/debug.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,84 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+#endif
+
+#endif /* __CI_EFHW_DEBUG_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/efhw_config.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/efhw_config.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/efhw_config.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/efhw_config.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/efhw_config.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,43 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+#define EFHW_MAX_NR_DEVS 5 /* max number of efhw devices supported */
+
+#endif /* __CI_EFHW_EFAB_CONFIG_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/efhw_types.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/efhw_types.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/efhw_types.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/efhw_types.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/efhw_types.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,382 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+
+
+#endif /* __CI_EFHW_EFHW_TYPES_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/eventq.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/eventq.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/eventq.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/eventq.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/eventq.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,72 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ efhw_event_t *);
+
+#endif /* __CI_EFHW_EVENTQ_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/eventq_macros.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/eventq_macros.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/eventq_macros.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/eventq_macros.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/eventq_macros.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,77 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ (EFHW_IS_EVENT(EFHW_EVENT_PTR(evq, s, 1)))
+
+#endif /* __CI_EFHW_EVENTQ_MACROS_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/falcon.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/falcon.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/falcon.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/falcon.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/falcon.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,94 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+extern void falcon_nic_filter_dtor(struct efhw_nic *nic);
+
+#endif /* __CI_EFHW_FALCON_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/falcon_hash.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/falcon_hash.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/falcon_hash.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/falcon_hash.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/falcon_hash.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,58 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ unsigned int n_search, unsigned int nfilters);
+
+#endif /* __CI_EFHW_FALCON_HASH_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/hardware_sysdep.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/hardware_sysdep.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/hardware_sysdep.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/hardware_sysdep.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/hardware_sysdep.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,69 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+#endif
+
+#endif /* __CI_EFHW_HARDWARE_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/iopage.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/iopage.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/iopage.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/iopage.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/iopage.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,58 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+extern void efhw_iopages_free(struct efhw_nic *, struct efhw_iopages *p);
+
+#endif /* __CI_DRIVER_RESOURCE_IOPAGE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/iopage_types.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/iopage_types.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/iopage_types.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/iopage_types.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/iopage_types.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,190 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+}
+
+#endif /* __CI_EFHW_IOPAGE_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/nic.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/nic.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/nic.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/nic.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/nic.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,62 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+extern void efhw_nic_close_interrupts(struct efhw_nic *nic);
+
+#endif /* __CI_EFHW_NIC_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/public.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/public.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/public.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/public.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/public.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,104 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ uint32_t *udp_full, uint32_t *udp_wild);
+
+#endif /* __CI_EFHW_PUBLIC_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/sysdep.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/sysdep.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/sysdep.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/sysdep.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/sysdep.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,55 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+#define spin_lock_destroy(l_) do {} while (0)
+
+#endif /* __CI_EFHW_SYSDEP_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/buddy.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/buddy.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/buddy.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/buddy.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/buddy.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,68 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+
+
+#endif /* __CI_EFRM_BUDDY_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/buffer_table.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/buffer_table.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/buffer_table.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/buffer_table.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/buffer_table.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,81 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+
+
+#endif /* __CI_EFRM_BUFFER_TABLE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/debug.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/debug.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/debug.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/debug.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/debug.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,78 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+#endif
+
+#endif /* __CI_EFRM_DEBUG_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/driver_private.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/driver_private.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/driver_private.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/driver_private.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/driver_private.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,89 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+extern void efrm_resources_fini(void);
+
+#endif /* __CI_EFRM_DRIVER_PRIVATE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/efrm_client.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/efrm_client.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/efrm_client.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/efrm_client.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/efrm_client.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,32 @@
+#ifndef __EFRM_CLIENT_H__
+#define __EFRM_CLIENT_H__
+
+
+#endif /* __EFRM_CLIENT_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/efrm_nic.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/efrm_nic.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/efrm_nic.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/efrm_nic.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/efrm_nic.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,26 @@
+#ifndef __EFRM_NIC_H__
+#define __EFRM_NIC_H__
+
+
+#endif /* __EFRM_NIC_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/filter.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/filter.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/filter.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/filter.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/filter.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,122 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+
+#endif /* __CI_EFRM_FILTER_H__ */
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/iobufset.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/iobufset.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/iobufset.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/iobufset.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/iobufset.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,110 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+}
+
+#endif /* __CI_EFRM_IOBUFSET_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/nic_set.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/nic_set.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/nic_set.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/nic_set.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/nic_set.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,104 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ if (efrm_nic_set_read((_set), (_nic_i)))
+
+#endif /* __CI_EFRM_NIC_SET_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/nic_table.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/nic_table.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/nic_table.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/nic_table.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/nic_table.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,98 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ efrm_nic_set_read((_set), (_i)))
+
+#endif /* __CI_EFRM_NIC_TABLE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/private.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/private.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/private.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/private.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/private.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,118 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+
+
+#endif /* __CI_EFRM_PRIVATE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/resource.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/resource.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/resource.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/resource.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/resource.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,119 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+
+
+#endif /* __CI_EFRM_RESOURCE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/resource_id.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/resource_id.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/resource_id.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/resource_id.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/resource_id.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,104 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ "<invalid>")
+
+#endif /* __CI_DRIVER_EFRM_RESOURCE_ID_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/sysdep.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/sysdep.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/sysdep.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/sysdep.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/sysdep.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,46 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+#include <ci/efrm/sysdep_linux.h>
+
+#endif /* __CI_EFRM_SYSDEP_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/sysdep_linux.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/sysdep_linux.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/sysdep_linux.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/sysdep_linux.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/sysdep_linux.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,93 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+}
+
+#endif /* __CI_EFRM_SYSDEP_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/vi_resource.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,157 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+
+
+#endif /* __CI_EFRM_VI_RESOURCE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_manager.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_manager.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_manager.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_manager.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_manager.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,155 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+}
+
+#endif /* __CI_DRIVER_EFAB_VI_RESOURCE_MANAGER_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_private.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_private.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_private.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_private.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_private.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,65 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+extern void efrm_handle_sram_event(struct efhw_nic *nic);
+
+#endif /* __CI_EFRM_VI_RESOURCE_PRIVATE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/driver_object.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/driver_object.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/driver_object.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/driver_object.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/driver_object.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,328 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ return client->nic;
+}
+EXPORT_SYMBOL(efrm_client_get_nic);
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/driverlink_new.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/driverlink_new.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/driverlink_new.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/driverlink_new.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/driverlink_new.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,260 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ break;
+ }
+}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/efrm_internal.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/efrm_internal.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/efrm_internal.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/efrm_internal.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/efrm_internal.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,41 @@
+#ifndef __EFRM_INTERNAL_H__
+#define __EFRM_INTERNAL_H__
+
+
+#endif /* __EFRM_INTERNAL_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/efx_vi_shm.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/efx_vi_shm.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/efx_vi_shm.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/efx_vi_shm.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/efx_vi_shm.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,707 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ return 0;
+}
+EXPORT_SYMBOL(efx_vi_hw_resource_get_phys);
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/eventq.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/eventq.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/eventq.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/eventq.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/eventq.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,321 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ false);
+ return count;
+}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/falcon.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/falcon.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/falcon.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/falcon.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/falcon.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,2525 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+};
+
+
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/falcon_hash.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/falcon_hash.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/falcon_hash.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/falcon_hash.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/falcon_hash.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,159 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ return (hash1 + (n_search * hash2)) & (nfilters - 1);
+}
+
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/filter_resource.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/filter_resource.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/filter_resource.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/filter_resource.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/filter_resource.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,250 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ return filter_resource(rs);
+}
+EXPORT_SYMBOL(efrm_filter_resource_from_resource);
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/iobufset_resource.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/iobufset_resource.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/iobufset_resource.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/iobufset_resource.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/iobufset_resource.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,404 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ kfree(efrm_iobufset_manager);
+ return rc;
+}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/iopage.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/iopage.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/iopage.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/iopage.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/iopage.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,103 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ efrm_dma_free_coherent(&lnic->pci_dev->dev, bytes,
+ (void *)p->kva, p->dma_addr);
+}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/kernel_compat.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kernel_compat.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kernel_compat.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/kernel_compat.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/kernel_compat.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,118 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+
+ dma_free_coherent(dev, size, ptr, dma_addr);
+}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/kernel_compat.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kernel_compat.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kernel_compat.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/kernel_compat.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/kernel_compat.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,70 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+
+
+#endif /* DRIVER_LINUX_RESOURCE_KERNEL_COMPAT_H */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/kernel_proc.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kernel_proc.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kernel_proc.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/kernel_proc.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/kernel_proc.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,109 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+
+ return count ? strlen(buf) : 0;
+}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/kfifo.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kfifo.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kfifo.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/kfifo.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/kfifo.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,208 @@
+/*
+ * A simple kernel FIFO implementation.
+EXPORT_SYMBOL(__kfifo_get);
+
+#endif
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/linux_resource_internal.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/linux_resource_internal.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/linux_resource_internal.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/linux_resource_internal.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/linux_resource_internal.h Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,76 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+extern void efrm_uninstall_proc_entries(void);
+
+#endif /* __LINUX_RESOURCE_INTERNAL__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/nic.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/nic.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/nic.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/nic.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/nic.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,174 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+
+ EFHW_TRACE("%s: DONE", __func__);
+}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/resource_driver.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/resource_driver.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/resource_driver.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/resource_driver.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/resource_driver.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,600 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+
+module_init(init_sfc_resource);
+module_exit(cleanup_sfc_resource);
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/resource_manager.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/resource_manager.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/resource_manager.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/resource_manager.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/resource_manager.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,145 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+/*
+ * vi: sw=8:ai:aw
+ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/resources.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/resources.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/resources.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/resources.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/resources.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,94 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+
+ efrm_buffer_table_dtor();
+}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/vi_resource_alloc.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_alloc.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_alloc.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/vi_resource_alloc.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/vi_resource_alloc.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,820 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ efrm_vi_rm_detach_evq(virs);
+ efrm_vi_rm_drop_ref(virs);
+}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/vi_resource_event.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_event.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_event.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/vi_resource_event.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/vi_resource_event.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,250 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ if (nic->buf_commit_outstanding > 0)
+ nic->buf_commit_outstanding--;
+}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/vi_resource_flush.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_flush.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_flush.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/vi_resource_flush.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/vi_resource_flush.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,483 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+/*
+ * vi: sw=8:ai:aw
+ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/vi_resource_manager.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_manager.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_manager.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/vi_resource_manager.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/vi_resource_manager.c Wed May 06 16:56:26 2009 +0100
@@ -0,0 +1,231 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+{
+ efrm_create_or_destroy_vi_resource_manager(&rm, NULL, true);
+}
-diff -purN linux-2.6.27/drivers/net/sfc/tx.c linux-2.6.27.19-5.1/drivers/net/sfc/tx.c
---- linux-2.6.27/drivers/net/sfc/tx.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/tx.c 2009-03-25 16:11:05.000000000 +0000
-@@ -368,7 +368,21 @@ inline int efx_xmit(struct efx_nic *efx,
+diff -r 9608d5473017 drivers/net/sfc/tx.c
+--- a/drivers/net/sfc/tx.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sfc/tx.c Wed May 06 16:56:26 2009 +0100
+@@ -368,7 +368,21 @@
int efx_hard_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
{
struct efx_nic *efx = net_dev->priv;
}
void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index)
-diff -purN linux-2.6.27/drivers/net/skfp/skfddi.c linux-2.6.27.19-5.1/drivers/net/skfp/skfddi.c
---- linux-2.6.27/drivers/net/skfp/skfddi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/skfp/skfddi.c 2009-03-25 16:11:06.000000000 +0000
-@@ -998,9 +998,9 @@ static int skfp_ioctl(struct net_device
+diff -r 9608d5473017 drivers/net/skfp/skfddi.c
+--- a/drivers/net/skfp/skfddi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/skfp/skfddi.c Wed May 06 16:56:26 2009 +0100
+@@ -998,9 +998,9 @@
break;
case SKFP_CLR_STATS: /* Zero out the driver statistics */
if (!capable(CAP_NET_ADMIN)) {
-- memset(&lp->MacStat, 0, sizeof(lp->MacStat));
-- } else {
- status = -EPERM;
++ status = -EPERM;
+ } else {
-+ memset(&lp->MacStat, 0, sizeof(lp->MacStat));
+ memset(&lp->MacStat, 0, sizeof(lp->MacStat));
+- } else {
+- status = -EPERM;
}
break;
default:
-diff -purN linux-2.6.27/drivers/net/sky2.c linux-2.6.27.19-5.1/drivers/net/sky2.c
---- linux-2.6.27/drivers/net/sky2.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sky2.c 2009-03-25 16:11:03.000000000 +0000
-@@ -1272,7 +1272,7 @@ static struct sk_buff *sky2_rx_alloc(str
+diff -r 9608d5473017 drivers/net/sky2.c
+--- a/drivers/net/sky2.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sky2.c Wed May 06 16:56:27 2009 +0100
+@@ -1272,7 +1272,7 @@
}
for (i = 0; i < sky2->rx_nfrags; i++) {
if (!page)
goto free_partial;
-@@ -1403,9 +1403,6 @@ static int sky2_up(struct net_device *de
+@@ -1403,9 +1403,6 @@
}
netif_carrier_off(dev);
/* must be power of 2 */
-@@ -1484,6 +1481,9 @@ static int sky2_up(struct net_device *de
+@@ -1484,6 +1481,9 @@
sky2_write32(hw, B0_IMSK, imask);
sky2_set_multicast(dev);
return 0;
err_out:
-@@ -2141,8 +2141,8 @@ static struct sk_buff *receive_copy(stru
+@@ -2141,8 +2141,8 @@
}
/* Adjust length of skb with fragments to match received data */
{
int i, num_frags;
unsigned int size;
-@@ -2159,15 +2159,11 @@ static void skb_put_frags(struct sk_buff
+@@ -2159,15 +2159,11 @@
if (length == 0) {
/* don't need this page */
length -= size;
}
}
-@@ -2194,7 +2190,7 @@ static struct sk_buff *receive_new(struc
+@@ -2194,7 +2190,7 @@
sky2_rx_map_skb(sky2->hw->pdev, re, hdr_space);
if (skb_shinfo(skb)->nr_frags)
else
skb_put(skb, length);
return skb;
-@@ -3034,7 +3030,8 @@ static int sky2_set_wol(struct net_devic
+@@ -3034,7 +3030,8 @@
struct sky2_port *sky2 = netdev_priv(dev);
struct sky2_hw *hw = sky2->hw;
return -EOPNOTSUPP;
sky2->wol = wol->wolopts;
-@@ -3045,6 +3042,8 @@ static int sky2_set_wol(struct net_devic
+@@ -3044,6 +3041,8 @@
+ hw->chip_id == CHIP_ID_YUKON_FE_P)
sky2_write32(hw, B0_CTST, sky2->wol
? Y2_HW_WOL_ON : Y2_HW_WOL_OFF);
-
-+ device_set_wakeup_enable(&hw->pdev->dev, sky2->wol);
+
++ device_set_wakeup_enable(&hw->pdev->dev, sky2->wol);
+
if (!netif_running(dev))
sky2_wol_init(sky2);
- return 0;
-@@ -4166,18 +4165,6 @@ static int __devinit sky2_test_msi(struc
+@@ -4166,18 +4165,6 @@
return err;
}
/* This driver supports yukon2 chipset only */
static const char *sky2_name(u8 chipid, char *buf, int sz)
{
-@@ -4238,7 +4225,7 @@ static int __devinit sky2_probe(struct p
+@@ -4238,7 +4225,7 @@
}
}
err = -ENOMEM;
hw = kzalloc(sizeof(*hw), GFP_KERNEL);
-diff -purN linux-2.6.27/drivers/net/starfire.c linux-2.6.27.19-5.1/drivers/net/starfire.c
---- linux-2.6.27/drivers/net/starfire.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/starfire.c 2009-03-25 16:11:03.000000000 +0000
-@@ -1509,6 +1509,11 @@ static int __netdev_rx(struct net_device
+diff -r 9608d5473017 drivers/net/starfire.c
+--- a/drivers/net/starfire.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/starfire.c Wed May 06 16:56:27 2009 +0100
+@@ -1509,6 +1509,11 @@
desc->status = 0;
np->rx_done = (np->rx_done + 1) % DONE_Q_SIZE;
}
writew(np->rx_done, np->base + CompletionQConsumerIdx);
out:
-diff -purN linux-2.6.27/drivers/net/sunbmac.c linux-2.6.27.19-5.1/drivers/net/sunbmac.c
---- linux-2.6.27/drivers/net/sunbmac.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sunbmac.c 2009-03-25 16:11:08.000000000 +0000
-@@ -1305,6 +1305,7 @@ static struct of_device_id bigmac_sbus_m
+diff -r 9608d5473017 drivers/net/sunbmac.c
+--- a/drivers/net/sunbmac.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sunbmac.c Wed May 06 16:56:27 2009 +0100
+@@ -1305,6 +1305,7 @@
MODULE_DEVICE_TABLE(of, bigmac_sbus_match);
static struct of_platform_driver bigmac_sbus_driver = {
.name = "sunbmac",
.match_table = bigmac_sbus_match,
.probe = bigmac_sbus_probe,
-diff -purN linux-2.6.27/drivers/net/sungem.c linux-2.6.27.19-5.1/drivers/net/sungem.c
---- linux-2.6.27/drivers/net/sungem.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sungem.c 2009-03-25 16:11:07.000000000 +0000
-@@ -2205,6 +2205,8 @@ static int gem_do_start(struct net_devic
+diff -r 9608d5473017 drivers/net/sungem.c
+--- a/drivers/net/sungem.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sungem.c Wed May 06 16:56:27 2009 +0100
+@@ -2205,6 +2205,8 @@
gp->running = 1;
if (gp->lstate == link_up) {
netif_carrier_on(gp->dev);
gem_set_link_modes(gp);
-@@ -2222,6 +2224,8 @@ static int gem_do_start(struct net_devic
+@@ -2221,6 +2223,8 @@
+
spin_lock_irqsave(&gp->lock, flags);
spin_lock(&gp->tx_lock);
-
-+ napi_disable(&gp->napi);
+
++ napi_disable(&gp->napi);
+
gp->running = 0;
gem_reset(gp);
- gem_clean_rings(gp);
-@@ -2322,8 +2326,6 @@ static int gem_open(struct net_device *d
+@@ -2322,8 +2326,6 @@
if (!gp->asleep)
rc = gem_do_start(dev);
gp->opened = (rc == 0);
mutex_unlock(&gp->pm_mutex);
-@@ -2460,8 +2462,6 @@ static int gem_resume(struct pci_dev *pd
+@@ -2460,8 +2462,6 @@
/* Re-attach net device */
netif_device_attach(dev);
}
spin_lock_irqsave(&gp->lock, flags);
-diff -purN linux-2.6.27/drivers/net/sunhme.c linux-2.6.27.19-5.1/drivers/net/sunhme.c
---- linux-2.6.27/drivers/net/sunhme.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sunhme.c 2009-03-25 16:11:05.000000000 +0000
-@@ -3336,6 +3336,7 @@ static struct of_device_id hme_sbus_matc
+diff -r 9608d5473017 drivers/net/sunhme.c
+--- a/drivers/net/sunhme.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sunhme.c Wed May 06 16:56:27 2009 +0100
+@@ -3336,6 +3336,7 @@
MODULE_DEVICE_TABLE(of, hme_sbus_match);
static struct of_platform_driver hme_sbus_driver = {
.name = "hme",
.match_table = hme_sbus_match,
.probe = hme_sbus_probe,
-diff -purN linux-2.6.27/drivers/net/sunlance.c linux-2.6.27.19-5.1/drivers/net/sunlance.c
---- linux-2.6.27/drivers/net/sunlance.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sunlance.c 2009-03-25 16:11:04.000000000 +0000
-@@ -1583,6 +1583,7 @@ static struct of_device_id sunlance_sbus
+diff -r 9608d5473017 drivers/net/sunlance.c
+--- a/drivers/net/sunlance.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sunlance.c Wed May 06 16:56:27 2009 +0100
+@@ -1583,6 +1583,7 @@
MODULE_DEVICE_TABLE(of, sunlance_sbus_match);
static struct of_platform_driver sunlance_sbus_driver = {
.name = "sunlance",
.match_table = sunlance_sbus_match,
.probe = sunlance_sbus_probe,
-diff -purN linux-2.6.27/drivers/net/sunqe.c linux-2.6.27.19-5.1/drivers/net/sunqe.c
---- linux-2.6.27/drivers/net/sunqe.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sunqe.c 2009-03-25 16:11:03.000000000 +0000
-@@ -983,6 +983,7 @@ static struct of_device_id qec_sbus_matc
+diff -r 9608d5473017 drivers/net/sunqe.c
+--- a/drivers/net/sunqe.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sunqe.c Wed May 06 16:56:27 2009 +0100
+@@ -983,6 +983,7 @@
MODULE_DEVICE_TABLE(of, qec_sbus_match);
static struct of_platform_driver qec_sbus_driver = {
.name = "qec",
.match_table = qec_sbus_match,
.probe = qec_sbus_probe,
-diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
---- linux-2.6.27/drivers/net/tg3.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/tg3.c 2009-03-25 16:11:05.000000000 +0000
-@@ -205,7 +205,10 @@ static struct pci_device_id tg3_pci_tbl[
+diff -r 9608d5473017 drivers/net/tg3.c
+--- a/drivers/net/tg3.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/tg3.c Wed May 06 16:56:27 2009 +0100
+@@ -205,7 +205,10 @@
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5723)},
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5761)},
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5761E)},
{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
{PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},
-@@ -990,7 +993,14 @@ static int tg3_mdio_init(struct tg3 *tp)
+@@ -990,7 +993,14 @@
phydev = tp->mdio_bus.phy_map[PHY_ADDR];
case TG3_PHY_ID_BCM50610:
phydev->interface = PHY_INTERFACE_MODE_RGMII;
if (tp->tg3_flags3 & TG3_FLG3_RGMII_STD_IBND_DISABLE)
-@@ -5812,6 +5822,7 @@ static int tg3_chip_reset(struct tg3 *tp
+@@ -5812,6 +5822,7 @@
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
tw32(GRC_FASTBOOT_PC, 0);
-@@ -7112,6 +7123,7 @@ static int tg3_reset_hw(struct tg3 *tp,
+@@ -7112,6 +7123,7 @@
return err;
if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5784 &&
GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5761 &&
GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5785) {
/* This value is determined during the probe time DMA
-@@ -7353,6 +7365,7 @@ static int tg3_reset_hw(struct tg3 *tp,
+@@ -7353,6 +7365,7 @@
RDMAC_MODE_LNGREAD_ENAB);
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
rdmac_mode |= RDMAC_MODE_BD_SBD_CRPT_ENAB |
RDMAC_MODE_MBUF_RBD_CRPT_ENAB |
-@@ -7525,6 +7538,7 @@ static int tg3_reset_hw(struct tg3 *tp,
+@@ -7525,6 +7538,7 @@
if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) ||
(GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) ||
(GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784) ||
(GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761) ||
(GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785))
val |= WDMAC_MODE_STATUS_TAG_FIX;
-@@ -7589,6 +7603,7 @@ static int tg3_reset_hw(struct tg3 *tp,
+@@ -7589,6 +7603,7 @@
tp->rx_mode = RX_MODE_ENABLE;
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
tp->rx_mode |= RX_MODE_IPV6_CSUM_ENABLE;
-@@ -9144,6 +9159,7 @@ static int tg3_set_tso(struct net_device
+@@ -9144,6 +9159,7 @@
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
(GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 &&
GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5784_AX) ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
dev->features |= NETIF_F_TSO_ECN;
} else
-@@ -9402,6 +9418,7 @@ static int tg3_set_tx_csum(struct net_de
+@@ -9402,6 +9418,7 @@
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
ethtool_op_set_tx_ipv6_csum(dev, data);
-@@ -9924,6 +9941,7 @@ static int tg3_test_memory(struct tg3 *t
+@@ -9924,6 +9941,7 @@
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
mem_tbl = mem_tbl_5755;
-@@ -10132,6 +10150,7 @@ static int tg3_test_loopback(struct tg3
+@@ -10132,6 +10150,7 @@
return TG3_LOOPBACK_FAILED;
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785) {
int i;
-@@ -10161,6 +10180,7 @@ static int tg3_test_loopback(struct tg3
+@@ -10161,6 +10180,7 @@
err |= TG3_MAC_LOOPBACK_FAILED;
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785) {
tw32(TG3_CPMU_CTRL, cpmuctrl);
-@@ -10811,6 +10831,7 @@ static void __devinit tg3_nvram_init(str
+@@ -10811,6 +10831,7 @@
tg3_get_5755_nvram_info(tp);
else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
tg3_get_5787_nvram_info(tp);
else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761)
-@@ -11141,6 +11162,7 @@ static int tg3_nvram_write_block_buffere
+@@ -11141,6 +11162,7 @@
(GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5755) &&
(GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787) &&
(GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5784) &&
(GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5761) &&
(GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5785) &&
(tp->nvram_jedecnum == JEDEC_ST) &&
-@@ -11317,9 +11339,10 @@ static void __devinit tg3_get_eeprom_hw_
+@@ -11317,9 +11339,10 @@
if (val & VCPU_CFGSHDW_ASPM_DBNC)
tp->tg3_flags |= TG3_FLAG_ASPM_WORKAROUND;
if ((val & VCPU_CFGSHDW_WOL_ENABLE) &&
return;
}
-@@ -11449,9 +11472,10 @@ static void __devinit tg3_get_eeprom_hw_
+@@ -11449,9 +11472,10 @@
tp->tg3_flags &= ~TG3_FLAG_WOL_CAP;
if ((tp->tg3_flags & TG3_FLAG_WOL_CAP) &&
if (cfg2 & (1 << 17))
tp->tg3_flags2 |= TG3_FLG2_CAPACITIVE_COUPLING;
-@@ -11903,7 +11927,7 @@ static int __devinit tg3_get_invariants(
+@@ -11903,7 +11927,7 @@
pci_read_config_dword(tp->pdev, TG3PCI_PRODID_ASICREV,
&prod_id_asic_rev);
}
/* Wrong chip ID in 5752 A0. This code can be removed later
-@@ -12057,6 +12081,7 @@ static int __devinit tg3_get_invariants(
+@@ -12057,6 +12081,7 @@
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906 ||
-@@ -12079,6 +12104,7 @@ static int __devinit tg3_get_invariants(
+@@ -12079,6 +12104,7 @@
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) {
-@@ -12283,6 +12309,7 @@ static int __devinit tg3_get_invariants(
+@@ -12283,6 +12309,7 @@
}
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785) {
tp->tg3_flags |= TG3_FLAG_CPMU_PRESENT;
-@@ -12371,6 +12398,7 @@ static int __devinit tg3_get_invariants(
+@@ -12371,6 +12398,7 @@
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761) {
if (tp->pdev->device != PCI_DEVICE_ID_TIGON3_5756 &&
tp->pdev->device != PCI_DEVICE_ID_TIGON3_5722)
-@@ -12539,6 +12567,7 @@ static int __devinit tg3_get_invariants(
+@@ -12539,6 +12567,7 @@
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
-@@ -13161,6 +13190,7 @@ static char * __devinit tg3_phy_string(s
+@@ -13161,6 +13190,7 @@
case PHY_ID_BCM5756: return "5722/5756";
case PHY_ID_BCM5906: return "5906";
case PHY_ID_BCM5761: return "5761";
case PHY_ID_BCM8002: return "8002/serdes";
case 0: return "serdes";
default: return "unknown";
-@@ -13467,6 +13497,7 @@ static int __devinit tg3_init_one(struct
+@@ -13467,6 +13497,7 @@
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
(GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 &&
GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5784_AX) ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
dev->features |= NETIF_F_TSO_ECN;
}
-@@ -13533,6 +13564,7 @@ static int __devinit tg3_init_one(struct
+@@ -13533,6 +13564,7 @@
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
dev->features |= NETIF_F_IPV6_CSUM;
-diff -purN linux-2.6.27/drivers/net/tg3.h linux-2.6.27.19-5.1/drivers/net/tg3.h
---- linux-2.6.27/drivers/net/tg3.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/tg3.h 2009-03-25 16:11:08.000000000 +0000
+diff -r 9608d5473017 drivers/net/tg3.h
+--- a/drivers/net/tg3.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/tg3.h Wed May 06 16:56:27 2009 +0100
@@ -38,6 +38,10 @@
#define TG3PCI_DEVICE_TIGON3_2 0x1645 /* BCM5701 */
#define TG3PCI_DEVICE_TIGON3_3 0x1646 /* BCM5702 */
#define GET_CHIP_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 8)
#define CHIPREV_5700_AX 0x70
#define CHIPREV_5700_BX 0x71
-@@ -2581,14 +2586,16 @@ struct tg3 {
+@@ -2581,14 +2586,16 @@
#define PHY_ID_BCM5761 0xbc050fd0
#define PHY_ID_BCM5906 0xdc00ac40
#define PHY_ID_BCM8002 0x60010140
u32 led_ctrl;
-diff -purN linux-2.6.27/drivers/net/tulip/tulip_core.c linux-2.6.27.19-5.1/drivers/net/tulip/tulip_core.c
---- linux-2.6.27/drivers/net/tulip/tulip_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/tulip/tulip_core.c 2009-03-25 16:11:04.000000000 +0000
-@@ -1788,6 +1788,10 @@ static void __devexit tulip_remove_one (
+diff -r 9608d5473017 drivers/net/tulip/tulip_core.c
+--- a/drivers/net/tulip/tulip_core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/tulip/tulip_core.c Wed May 06 16:56:27 2009 +0100
+@@ -1788,6 +1788,10 @@
return;
tp = netdev_priv(dev);
unregister_netdev(dev);
pci_free_consistent (pdev,
sizeof (struct tulip_rx_desc) * RX_RING_SIZE +
-diff -purN linux-2.6.27/drivers/net/tun.c linux-2.6.27.19-5.1/drivers/net/tun.c
---- linux-2.6.27/drivers/net/tun.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/tun.c 2009-03-25 16:11:04.000000000 +0000
-@@ -157,10 +157,16 @@ static int update_filter(struct tap_filt
+diff -r 9608d5473017 drivers/net/tun.c
+--- a/drivers/net/tun.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/tun.c Wed May 06 16:56:27 2009 +0100
+@@ -157,10 +157,16 @@
nexact = n;
/* For ALLMULTI just set the mask to all ones.
* This overrides the mask populated above. */
-diff -purN linux-2.6.27/drivers/net/ucc_geth.c linux-2.6.27.19-5.1/drivers/net/ucc_geth.c
---- linux-2.6.27/drivers/net/ucc_geth.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ucc_geth.c 2009-03-25 16:11:07.000000000 +0000
-@@ -4083,6 +4083,7 @@ static struct of_device_id ucc_geth_matc
+diff -r 9608d5473017 drivers/net/ucc_geth.c
+--- a/drivers/net/ucc_geth.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ucc_geth.c Wed May 06 16:56:27 2009 +0100
+@@ -4083,6 +4083,7 @@
MODULE_DEVICE_TABLE(of, ucc_geth_match);
static struct of_platform_driver ucc_geth_driver = {
.name = DRV_NAME,
.match_table = ucc_geth_match,
.probe = ucc_geth_probe,
-diff -purN linux-2.6.27/drivers/net/ucc_geth_mii.c linux-2.6.27.19-5.1/drivers/net/ucc_geth_mii.c
---- linux-2.6.27/drivers/net/ucc_geth_mii.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ucc_geth_mii.c 2009-03-25 16:11:04.000000000 +0000
-@@ -268,6 +268,7 @@ static struct of_device_id uec_mdio_matc
+diff -r 9608d5473017 drivers/net/ucc_geth_mii.c
+--- a/drivers/net/ucc_geth_mii.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ucc_geth_mii.c Wed May 06 16:56:27 2009 +0100
+@@ -268,6 +268,7 @@
};
static struct of_platform_driver uec_mdio_driver = {
.name = MII_DRV_NAME,
.probe = uec_mdio_probe,
.remove = uec_mdio_remove,
-diff -purN linux-2.6.27/drivers/net/usb/asix.c linux-2.6.27.19-5.1/drivers/net/usb/asix.c
---- linux-2.6.27/drivers/net/usb/asix.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/usb/asix.c 2009-03-25 16:11:07.000000000 +0000
-@@ -1444,6 +1444,18 @@ static const struct usb_device_id produc
+diff -r 9608d5473017 drivers/net/usb/asix.c
+--- a/drivers/net/usb/asix.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/usb/asix.c Wed May 06 16:56:27 2009 +0100
+@@ -1444,6 +1444,18 @@
// Apple USB Ethernet Adapter
USB_DEVICE(0x05ac, 0x1402),
.driver_info = (unsigned long) &ax88772_info,
},
{ }, // END
};
-diff -purN linux-2.6.27/drivers/net/usb/hso.c linux-2.6.27.19-5.1/drivers/net/usb/hso.c
---- linux-2.6.27/drivers/net/usb/hso.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/usb/hso.c 2009-03-25 16:11:07.000000000 +0000
-@@ -2047,7 +2047,7 @@ static void hso_create_rfkill(struct hso
+diff -r 9608d5473017 drivers/net/usb/hso.c
+--- a/drivers/net/usb/hso.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/usb/hso.c Wed May 06 16:56:27 2009 +0100
+@@ -2047,7 +2047,7 @@
char *rfkn;
hso_net->rfkill = rfkill_allocate(&interface_to_usbdev(interface)->dev,
if (!hso_net->rfkill) {
dev_err(dev, "%s - Out of memory", __func__);
return;
-diff -purN linux-2.6.27/drivers/net/virtio_net.c linux-2.6.27.19-5.1/drivers/net/virtio_net.c
---- linux-2.6.27/drivers/net/virtio_net.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/virtio_net.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/virtio_net.c
+--- a/drivers/net/virtio_net.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/virtio_net.c Wed May 06 16:56:27 2009 +0100
@@ -24,6 +24,7 @@
#include <linux/virtio.h>
#include <linux/virtio_net.h>
static int napi_weight = 128;
module_param(napi_weight, int, 0444);
-@@ -33,7 +34,7 @@ module_param(csum, bool, 0444);
+@@ -33,7 +34,7 @@
module_param(gso, bool, 0444);
/* FIXME: MTU in config. */
struct virtnet_info
{
-diff -purN linux-2.6.27/drivers/net/wireless/Kconfig linux-2.6.27.19-5.1/drivers/net/wireless/Kconfig
---- linux-2.6.27/drivers/net/wireless/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/Kconfig 2009-03-25 16:11:08.000000000 +0000
-@@ -461,7 +461,6 @@ config AIRO_CS
+diff -r 9608d5473017 drivers/net/wireless/Kconfig
+--- a/drivers/net/wireless/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/Kconfig Wed May 06 16:56:27 2009 +0100
+@@ -461,7 +461,6 @@
depends on PCMCIA && (BROKEN || !M32R) && WLAN_80211
select WIRELESS_EXT
select CRYPTO
---help---
This is the standard Linux driver to support Cisco/Aironet PCMCIA
802.11 wireless cards. This driver is the same as the Aironet
-diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.c linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/base.c
---- linux-2.6.27/drivers/net/wireless/ath5k/base.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/base.c 2009-03-25 16:11:09.000000000 +0000
-@@ -294,9 +294,9 @@ static inline u64 ath5k_extend_tsf(struc
+diff -r 9608d5473017 drivers/net/wireless/ath5k/base.c
+--- a/drivers/net/wireless/ath5k/base.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath5k/base.c Wed May 06 16:56:28 2009 +0100
+@@ -294,9 +294,9 @@
}
/* Interrupt handling */
static irqreturn_t ath5k_intr(int irq, void *dev_id);
static void ath5k_tasklet_reset(unsigned long data);
-@@ -584,7 +584,7 @@ ath5k_pci_suspend(struct pci_dev *pdev,
+@@ -584,7 +584,7 @@
ath5k_led_off(sc);
free_irq(pdev->irq, sc);
pci_save_state(pdev);
-@@ -599,8 +599,7 @@ ath5k_pci_resume(struct pci_dev *pdev)
+@@ -599,8 +599,7 @@
{
struct ieee80211_hw *hw = pci_get_drvdata(pdev);
struct ath5k_softc *sc = hw->priv;
pci_restore_state(pdev);
-@@ -621,21 +620,11 @@ ath5k_pci_resume(struct pci_dev *pdev)
+@@ -621,20 +620,10 @@
goto err_no_irq;
}
if (err)
goto err_irq;
ath5k_led_enable(sc);
-
+-
- /*
- * Reset the key cache since some parts do not
- * reset the contents on initial power up or resume.
- */
- for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
- ath5k_hw_reset_key(ah, i);
--
+
return 0;
err_irq:
- free_irq(pdev->irq, sc);
-@@ -657,7 +646,6 @@ ath5k_attach(struct pci_dev *pdev, struc
+@@ -657,7 +646,6 @@
struct ath5k_softc *sc = hw->priv;
struct ath5k_hw *ah = sc->ah;
u8 mac[ETH_ALEN];
int ret;
ATH5K_DBG(sc, ATH5K_DEBUG_ANY, "devid 0x%x\n", pdev->device);
-@@ -676,13 +664,6 @@ ath5k_attach(struct pci_dev *pdev, struc
+@@ -674,13 +662,6 @@
+ goto err;
+ if (ret > 0)
__set_bit(ATH_STAT_MRRETRY, sc->status);
-
- /*
+-
+- /*
- * Reset the key cache since some parts do not
- * reset the contents on initial power up.
- */
- for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
- ath5k_hw_reset_key(ah, i);
--
-- /*
+
+ /*
* Collect the channel list. The 802.11 layer
- * is resposible for filtering this list based
- * on settings like the phy mode and regulatory
-@@ -2197,12 +2178,18 @@ ath5k_beacon_config(struct ath5k_softc *
+@@ -2197,11 +2178,17 @@
\********************/
static int
+ int ret, i;
mutex_lock(&sc->lock);
-
++
+ if (is_resume && !test_bit(ATH_STAT_STARTED, sc->status))
+ goto out_ok;
+
+ __clear_bit(ATH_STAT_STARTED, sc->status);
-+
+
ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "mode %d\n", sc->opmode);
- /*
-@@ -2220,7 +2207,7 @@ ath5k_init(struct ath5k_softc *sc)
+@@ -2220,7 +2207,7 @@
*/
sc->curchan = sc->hw->conf.channel;
sc->curband = &sc->sbands[sc->curchan->band];
if (ret) {
ATH5K_ERR(sc, "unable to reset hardware: %d\n", ret);
goto done;
-@@ -2229,7 +2216,14 @@ ath5k_init(struct ath5k_softc *sc)
+@@ -2229,7 +2216,14 @@
* This is needed only to setup initial state
* but it's best done after a reset.
*/
/*
* Setup the hardware after reset: the key cache
-@@ -2249,13 +2243,17 @@ ath5k_init(struct ath5k_softc *sc)
+@@ -2249,13 +2243,17 @@
AR5K_INT_RXORN | AR5K_INT_FATAL | AR5K_INT_GLOBAL |
AR5K_INT_MIB;
ret = 0;
done:
mmiowb();
-@@ -2310,7 +2308,7 @@ ath5k_stop_locked(struct ath5k_softc *sc
+@@ -2310,7 +2308,7 @@
* stop is preempted).
*/
static int
{
int ret;
-@@ -2341,6 +2339,9 @@ ath5k_stop_hw(struct ath5k_softc *sc)
+@@ -2341,6 +2339,9 @@
}
}
ath5k_txbuf_free(sc, sc->bbuf);
mmiowb();
mutex_unlock(&sc->lock);
-@@ -2719,12 +2720,12 @@ err:
+@@ -2719,12 +2720,12 @@
static int ath5k_start(struct ieee80211_hw *hw)
{
}
static int ath5k_add_interface(struct ieee80211_hw *hw,
-diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.h linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/base.h
---- linux-2.6.27/drivers/net/wireless/ath5k/base.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/base.h 2009-03-25 16:11:09.000000000 +0000
-@@ -132,11 +132,12 @@ struct ath5k_softc {
+diff -r 9608d5473017 drivers/net/wireless/ath5k/base.h
+--- a/drivers/net/wireless/ath5k/base.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath5k/base.h Wed May 06 16:56:28 2009 +0100
+@@ -132,11 +132,12 @@
size_t desc_len; /* size of TX/RX descriptors */
u16 cachelsz; /* cache line size */
unsigned int filter_flags; /* HW flags, AR5K_RX_FILTER_* */
unsigned int curmode; /* current phy mode */
-diff -purN linux-2.6.27/drivers/net/wireless/ath5k/hw.c linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/hw.c
---- linux-2.6.27/drivers/net/wireless/ath5k/hw.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/hw.c 2009-03-25 16:11:09.000000000 +0000
-@@ -826,9 +826,10 @@ int ath5k_hw_reset(struct ath5k_hw *ah,
+diff -r 9608d5473017 drivers/net/wireless/ath5k/hw.c
+--- a/drivers/net/wireless/ath5k/hw.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath5k/hw.c Wed May 06 16:56:28 2009 +0100
+@@ -826,9 +826,10 @@
mdelay(1);
/*
- * Write some more initial register settings
-+ * Write some more initial register settings for revised chips
- */
+- */
- if (ah->ah_version == AR5K_AR5212) {
++ * Write some more initial register settings for revised chips
++ */
+ if (ah->ah_version == AR5K_AR5212 &&
+ ah->ah_phy_revision > 0x41) {
ath5k_hw_reg_write(ah, 0x0002a002, 0x982c);
if (channel->hw_value == CHANNEL_G)
-@@ -847,19 +848,10 @@ int ath5k_hw_reset(struct ath5k_hw *ah,
+@@ -847,19 +848,10 @@
else
ath5k_hw_reg_write(ah, 0x00000000, 0x994c);
/* Just write 0x9b5 ? */
/* ath5k_hw_reg_write(ah, 0x000009b5, 0xa228); */
-@@ -1139,9 +1131,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah,
+@@ -1139,9 +1131,7 @@
*
* XXX: Find an interval that's OK for all cards...
*/
/*
* Reset queues and start beacon timers at the end of the reset routine
-diff -purN linux-2.6.27/drivers/net/wireless/ath5k/initvals.c linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/initvals.c
---- linux-2.6.27/drivers/net/wireless/ath5k/initvals.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/initvals.c 2009-03-25 16:11:09.000000000 +0000
-@@ -810,6 +810,8 @@ static const struct ath5k_ini_mode ar521
+diff -r 9608d5473017 drivers/net/wireless/ath5k/initvals.c
+--- a/drivers/net/wireless/ath5k/initvals.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath5k/initvals.c Wed May 06 16:56:28 2009 +0100
+@@ -810,6 +810,8 @@
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
{ AR5K_PHY(642),
{ 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788 } },
{ 0xa23c,
{ 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af } },
};
-diff -purN linux-2.6.27/drivers/net/wireless/ath5k/phy.c linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/phy.c
---- linux-2.6.27/drivers/net/wireless/ath5k/phy.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/phy.c 2009-03-25 16:11:09.000000000 +0000
-@@ -2193,9 +2193,7 @@ static int ath5k_hw_rf5110_calibrate(str
+diff -r 9608d5473017 drivers/net/wireless/ath5k/phy.c
+--- a/drivers/net/wireless/ath5k/phy.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath5k/phy.c Wed May 06 16:56:28 2009 +0100
+@@ -2193,9 +2193,7 @@
return ret;
}
/*
* Re-enable RX/TX and beacons
-diff -purN linux-2.6.27/drivers/net/wireless/ath9k/core.h linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/core.h
---- linux-2.6.27/drivers/net/wireless/ath9k/core.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/core.h 2009-03-25 16:11:09.000000000 +0000
-@@ -316,7 +316,7 @@ void ath_descdma_cleanup(struct ath_soft
+diff -r 9608d5473017 drivers/net/wireless/ath9k/core.h
+--- a/drivers/net/wireless/ath9k/core.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath9k/core.h Wed May 06 16:56:28 2009 +0100
+@@ -316,7 +316,7 @@
#define ATH_RX_TIMEOUT 40 /* 40 milliseconds */
#define WME_NUM_TID 16
#define IEEE80211_BAR_CTL_TID_M 0xF000 /* tid mask */
enum ATH_RX_TYPE {
ATH_RX_NON_CONSUMED = 0,
-diff -purN linux-2.6.27/drivers/net/wireless/ath9k/hw.c linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/hw.c
---- linux-2.6.27/drivers/net/wireless/ath9k/hw.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/hw.c 2009-03-25 16:11:09.000000000 +0000
-@@ -729,7 +729,7 @@ ath9k_hw_eeprom_set_board_values(struct
+diff -r 9608d5473017 drivers/net/wireless/ath9k/hw.c
+--- a/drivers/net/wireless/ath9k/hw.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath9k/hw.c Wed May 06 16:56:28 2009 +0100
+@@ -729,7 +729,7 @@
AR_AN_TOP2_LOCALBIAS,
AR_AN_TOP2_LOCALBIAS_S,
pModal->local_bias);
pModal->force_xpaon);
REG_RMW_FIELD(ah, AR_PHY_XPA_CFG, AR_PHY_FORCE_XPA_CFG,
pModal->force_xpaon);
-diff -purN linux-2.6.27/drivers/net/wireless/ath9k/main.c linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/main.c
---- linux-2.6.27/drivers/net/wireless/ath9k/main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/main.c 2009-03-25 16:11:09.000000000 +0000
-@@ -1007,6 +1007,11 @@ static int ath9k_ampdu_action(struct iee
+diff -r 9608d5473017 drivers/net/wireless/ath9k/main.c
+--- a/drivers/net/wireless/ath9k/main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath9k/main.c Wed May 06 16:56:28 2009 +0100
+@@ -1007,6 +1007,11 @@
return ret;
}
static struct ieee80211_ops ath9k_ops = {
.tx = ath9k_tx,
.start = ath9k_start,
-@@ -1031,7 +1036,8 @@ static struct ieee80211_ops ath9k_ops =
+@@ -1031,7 +1036,8 @@
.get_tsf = ath9k_get_tsf,
.reset_tsf = ath9k_reset_tsf,
.tx_last_beacon = NULL,
};
void ath_get_beaconconfig(struct ath_softc *sc,
-diff -purN linux-2.6.27/drivers/net/wireless/ath9k/recv.c linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/recv.c
---- linux-2.6.27/drivers/net/wireless/ath9k/recv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/recv.c 2009-03-25 16:11:09.000000000 +0000
-@@ -52,7 +52,7 @@ static void ath_rx_buf_link(struct ath_s
+diff -r 9608d5473017 drivers/net/wireless/ath9k/recv.c
+--- a/drivers/net/wireless/ath9k/recv.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath9k/recv.c Wed May 06 16:56:28 2009 +0100
+@@ -52,7 +52,7 @@
/* setup rx descriptors */
ath9k_hw_setuprxdesc(ah,
ds,
0);
if (sc->sc_rxlink == NULL)
-@@ -1011,7 +1011,7 @@ int ath_rx_tasklet(struct ath_softc *sc,
+@@ -1011,7 +1011,7 @@
pci_dma_sync_single_for_cpu(sc->pdev,
bf->bf_buf_addr,
PCI_DMA_FROMDEVICE);
pci_unmap_single(sc->pdev,
bf->bf_buf_addr,
-@@ -1303,8 +1303,7 @@ dma_addr_t ath_skb_map_single(struct ath
+@@ -1303,8 +1303,7 @@
* NB: do NOT use skb->len, which is 0 on initialization.
* Use skb's entire data area instead.
*/
return *pa;
}
-@@ -1314,6 +1313,5 @@ void ath_skb_unmap_single(struct ath_sof
+@@ -1314,6 +1313,5 @@
dma_addr_t *pa)
{
/* Unmap skb's entire data area */
- skb_end_pointer(skb) - skb->head, direction);
+ pci_unmap_single(sc->pdev, *pa, sc->sc_rxbufsize, direction);
}
-diff -purN linux-2.6.27/drivers/net/wireless/b43legacy/leds.c linux-2.6.27.19-5.1/drivers/net/wireless/b43legacy/leds.c
---- linux-2.6.27/drivers/net/wireless/b43legacy/leds.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/b43legacy/leds.c 2009-03-25 16:11:08.000000000 +0000
-@@ -146,12 +146,12 @@ static void b43legacy_map_led(struct b43
+diff -r 9608d5473017 drivers/net/wireless/b43legacy/leds.c
+--- a/drivers/net/wireless/b43legacy/leds.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/b43legacy/leds.c Wed May 06 16:56:28 2009 +0100
+@@ -146,12 +146,12 @@
case B43legacy_LED_TRANSFER:
case B43legacy_LED_APTRANSFER:
snprintf(name, sizeof(name),
b43legacy_register_led(dev, &dev->led_rx, name,
ieee80211_get_rx_led_name(hw),
led_index, activelow);
-@@ -161,7 +161,7 @@ static void b43legacy_map_led(struct b43
+@@ -161,7 +161,7 @@
case B43legacy_LED_RADIO_B:
case B43legacy_LED_MODE_BG:
snprintf(name, sizeof(name),
b43legacy_register_led(dev, &dev->led_radio, name,
b43legacy_rfkill_led_name(dev),
led_index, activelow);
-@@ -172,7 +172,7 @@ static void b43legacy_map_led(struct b43
+@@ -172,7 +172,7 @@
case B43legacy_LED_WEIRD:
case B43legacy_LED_ASSOC:
snprintf(name, sizeof(name),
b43legacy_register_led(dev, &dev->led_assoc, name,
ieee80211_get_assoc_led_name(hw),
led_index, activelow);
-diff -purN linux-2.6.27/drivers/net/wireless/b43legacy/xmit.c linux-2.6.27.19-5.1/drivers/net/wireless/b43legacy/xmit.c
---- linux-2.6.27/drivers/net/wireless/b43legacy/xmit.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/b43legacy/xmit.c 2009-03-25 16:11:08.000000000 +0000
-@@ -626,7 +626,7 @@ void b43legacy_handle_hwtxstatus(struct
+diff -r 9608d5473017 drivers/net/wireless/b43legacy/xmit.c
+--- a/drivers/net/wireless/b43legacy/xmit.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/b43legacy/xmit.c Wed May 06 16:56:28 2009 +0100
+@@ -626,7 +626,7 @@
tmp = hw->count;
status.frame_count = (tmp >> 4);
status.rts_count = (tmp & 0x0F);
status.supp_reason = ((tmp & 0x1C) >> 2);
status.pm_indicated = !!(tmp & 0x80);
status.intermediate = !!(tmp & 0x40);
-diff -purN linux-2.6.27/drivers/net/wireless/hostap/hostap_wlan.h linux-2.6.27.19-5.1/drivers/net/wireless/hostap/hostap_wlan.h
---- linux-2.6.27/drivers/net/wireless/hostap/hostap_wlan.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/hostap/hostap_wlan.h 2009-03-25 16:11:08.000000000 +0000
-@@ -918,9 +918,12 @@ struct hostap_interface {
+diff -r 9608d5473017 drivers/net/wireless/hostap/hostap_wlan.h
+--- a/drivers/net/wireless/hostap/hostap_wlan.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/hostap/hostap_wlan.h Wed May 06 16:56:28 2009 +0100
+@@ -918,9 +918,12 @@
/*
* TX meta data - stored in skb->cb buffer, so this must not be increased over
u32 magic; /* HOSTAP_SKB_TX_DATA_MAGIC */
u8 rate; /* transmit rate */
#define HOSTAP_TX_FLAGS_WDS BIT(0)
-diff -purN linux-2.6.27/drivers/net/wireless/ipw2200.c linux-2.6.27.19-5.1/drivers/net/wireless/ipw2200.c
---- linux-2.6.27/drivers/net/wireless/ipw2200.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ipw2200.c 2009-03-25 16:11:08.000000000 +0000
-@@ -4346,7 +4346,8 @@ static void ipw_handle_missed_beacon(str
+diff -r 9608d5473017 drivers/net/wireless/ipw2200.c
+--- a/drivers/net/wireless/ipw2200.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ipw2200.c Wed May 06 16:56:28 2009 +0100
+@@ -4346,7 +4346,8 @@
return;
}
/* Stop scan to keep fw from getting
* stuck (only if we aren't roaming --
* otherwise we'll never scan more than 2 or 3
-@@ -6276,6 +6277,20 @@ static void ipw_add_scan_channels(struct
+@@ -6276,6 +6277,20 @@
}
}
static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct)
{
struct ipw_scan_request_ext scan;
-@@ -6319,16 +6334,16 @@ static int ipw_request_scan_helper(struc
+@@ -6319,16 +6334,16 @@
scan.full_scan_index = cpu_to_le32(ieee80211_get_scans(priv->ieee));
if (type == IW_SCAN_TYPE_PASSIVE) {
scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_SCAN] =
cpu_to_le16(30);
else
-@@ -6338,7 +6353,8 @@ static int ipw_request_scan_helper(struc
+@@ -6338,7 +6353,8 @@
scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN] =
cpu_to_le16(20);
scan.dwell_time[IPW_SCAN_ACTIVE_DIRECT_SCAN] = cpu_to_le16(20);
#ifdef CONFIG_IPW2200_MONITOR
-@@ -10190,6 +10206,11 @@ static int ipw_tx_skb(struct ipw_priv *p
+@@ -10190,6 +10206,11 @@
u16 remaining_bytes;
int fc;
hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
switch (priv->ieee->iw_mode) {
case IW_MODE_ADHOC:
-diff -purN linux-2.6.27/drivers/net/wireless/ipw2200.h linux-2.6.27.19-5.1/drivers/net/wireless/ipw2200.h
---- linux-2.6.27/drivers/net/wireless/ipw2200.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ipw2200.h 2009-03-25 16:11:08.000000000 +0000
-@@ -244,6 +244,7 @@ enum connection_manager_assoc_states {
+diff -r 9608d5473017 drivers/net/wireless/ipw2200.h
+--- a/drivers/net/wireless/ipw2200.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ipw2200.h Wed May 06 16:56:28 2009 +0100
+@@ -244,6 +244,7 @@
#define HOST_NOTIFICATION_S36_MEASUREMENT_REFUSED 31
#define HOST_NOTIFICATION_STATUS_BEACON_MISSING 1
#define IPW_MB_ROAMING_THRESHOLD_MIN 1
#define IPW_MB_ROAMING_THRESHOLD_DEFAULT 8
#define IPW_MB_ROAMING_THRESHOLD_MAX 30
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945-led.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-3945-led.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945-led.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-3945-led.c 2009-03-25 16:11:08.000000000 +0000
-@@ -317,7 +317,7 @@ int iwl3945_led_register(struct iwl3945_
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-3945-led.c
+--- a/drivers/net/wireless/iwlwifi/iwl-3945-led.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-3945-led.c Wed May 06 16:56:28 2009 +0100
+@@ -317,7 +317,7 @@
trigger = ieee80211_get_radio_led_name(priv->hw);
snprintf(priv->led[IWL_LED_TRG_RADIO].name,
wiphy_name(priv->hw->wiphy));
priv->led[IWL_LED_TRG_RADIO].led_on = iwl3945_led_on;
-@@ -333,7 +333,7 @@ int iwl3945_led_register(struct iwl3945_
+@@ -333,7 +333,7 @@
trigger = ieee80211_get_assoc_led_name(priv->hw);
snprintf(priv->led[IWL_LED_TRG_ASSOC].name,
wiphy_name(priv->hw->wiphy));
ret = iwl3945_led_register_led(priv,
-@@ -350,7 +350,7 @@ int iwl3945_led_register(struct iwl3945_
+@@ -350,7 +350,7 @@
trigger = ieee80211_get_rx_led_name(priv->hw);
snprintf(priv->led[IWL_LED_TRG_RX].name,
wiphy_name(priv->hw->wiphy));
ret = iwl3945_led_register_led(priv,
-@@ -366,7 +366,7 @@ int iwl3945_led_register(struct iwl3945_
+@@ -366,7 +366,7 @@
trigger = ieee80211_get_tx_led_name(priv->hw);
snprintf(priv->led[IWL_LED_TRG_TX].name,
wiphy_name(priv->hw->wiphy));
ret = iwl3945_led_register_led(priv,
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945-rs.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945-rs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-3945-rs.c 2009-03-25 16:11:08.000000000 +0000
-@@ -652,7 +652,8 @@ static void rs_get_rate(void *priv_rate,
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-3945-rs.c
+--- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c Wed May 06 16:56:28 2009 +0100
+@@ -652,7 +652,8 @@
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct sta_info *sta;
struct iwl3945_priv *priv = (struct iwl3945_priv *)priv_rate;
DECLARE_MAC_BUF(mac);
-@@ -661,6 +662,8 @@ static void rs_get_rate(void *priv_rate,
+@@ -661,6 +662,8 @@
rcu_read_lock();
sta = sta_info_get(local, hdr->addr1);
/* Send management frames and broadcast/multicast data using lowest
* rate. */
-@@ -669,12 +672,14 @@ static void rs_get_rate(void *priv_rate,
+@@ -669,12 +672,14 @@
is_multicast_ether_addr(hdr->addr1) ||
!sta || !sta->rate_ctrl_priv) {
IWL_DEBUG_RATE("leave: No STA priv data to update!\n");
index = min(sta->last_txrate_idx & 0xffff, IWL_RATE_COUNT - 1);
if (sband->band == IEEE80211_BAND_5GHZ)
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945.h linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-3945.h
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-3945.h 2009-03-25 16:11:08.000000000 +0000
-@@ -893,6 +893,7 @@ struct iwl3945_priv {
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-3945.h
+--- a/drivers/net/wireless/iwlwifi/iwl-3945.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-3945.h Wed May 06 16:56:28 2009 +0100
+@@ -893,6 +893,7 @@
struct delayed_work alive_start;
struct delayed_work activity_timer;
struct delayed_work thermal_periodic;
struct delayed_work gather_stats;
struct delayed_work scan_check;
struct delayed_work post_associate;
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-5000-hw.h linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-5000-hw.h
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-5000-hw.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-5000-hw.h 2009-03-25 16:11:08.000000000 +0000
-@@ -129,6 +129,13 @@ struct iwl5000_shared {
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-5000-hw.h
+--- a/drivers/net/wireless/iwlwifi/iwl-5000-hw.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-5000-hw.h Wed May 06 16:56:28 2009 +0100
+@@ -129,6 +129,13 @@
__le32 padding2;
} __attribute__ ((packed));
#endif /* __iwl_5000_hw_h__ */
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-5000.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-5000.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-5000.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-5000.c 2009-03-25 16:11:08.000000000 +0000
-@@ -445,48 +445,6 @@ static int iwl5000_send_Xtal_calib(struc
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-5000.c
+--- a/drivers/net/wireless/iwlwifi/iwl-5000.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-5000.c Wed May 06 16:56:28 2009 +0100
+@@ -445,48 +445,6 @@
sizeof(cal_cmd), &cal_cmd);
}
static int iwl5000_send_calib_cfg(struct iwl_priv *priv)
{
struct iwl5000_calib_cfg_cmd calib_cfg_cmd;
-@@ -511,33 +469,30 @@ static void iwl5000_rx_calib_result(stru
+@@ -511,33 +469,30 @@
struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
struct iwl5000_calib_hdr *hdr = (struct iwl5000_calib_hdr *)pkt->u.raw;
int len = le32_to_cpu(pkt->len) & FH_RSCSR_FRAME_SIZE_MSK;
}
static void iwl5000_rx_calib_complete(struct iwl_priv *priv,
-@@ -832,7 +787,7 @@ static int iwl5000_alive_notify(struct i
+@@ -832,7 +787,7 @@
iwl5000_send_Xtal_calib(priv);
if (priv->ucode_type == UCODE_RT)
return 0;
}
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn-rs.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn-rs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-agn-rs.c 2009-03-25 16:11:08.000000000 +0000
-@@ -795,9 +795,12 @@ static void rs_tx_status(void *priv_rate
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c Wed May 06 16:56:28 2009 +0100
+@@ -795,8 +795,11 @@
u8 active_index = 0;
__le16 fc = hdr->frame_control;
s32 tpt = 0;
+ struct ieee80211_supported_band *sband;
IWL_DEBUG_RATE_LIMIT("get frame ack response, update rate scale window\n");
-
-+ sband = local->hw.wiphy->bands[info->band];
+
++ sband = local->hw.wiphy->bands[info->band];
+
if (!ieee80211_is_data(fc) || is_multicast_ether_addr(hdr->addr1))
return;
-
-@@ -965,7 +968,8 @@ static void rs_tx_status(void *priv_rate
+@@ -965,7 +968,8 @@
}
/* See if there's a better rate or modulation mode to try. */
out:
rcu_read_unlock();
return;
-@@ -2090,19 +2094,25 @@ static void rs_get_rate(void *priv_rate,
+@@ -2090,19 +2094,25 @@
__le16 fc;
struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
struct iwl_lq_sta *lq_sta;
goto out;
}
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-agn.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-agn.c 2009-03-25 16:11:08.000000000 +0000
-@@ -1334,16 +1334,6 @@ static void iwl_setup_rx_handlers(struct
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-agn.c
+--- a/drivers/net/wireless/iwlwifi/iwl-agn.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-agn.c Wed May 06 16:56:28 2009 +0100
+@@ -1334,16 +1334,6 @@
priv->cfg->ops->lib->rx_handler_setup(priv);
}
/**
* iwl_rx_handle - Main entry function for receiving responses from uCode
*
-@@ -1384,7 +1374,7 @@ void iwl_rx_handle(struct iwl_priv *priv
+@@ -1384,7 +1374,7 @@
rxq->queue[i] = NULL;
priv->hw_params.rx_buf_size,
PCI_DMA_FROMDEVICE);
pkt = (struct iwl_rx_packet *)rxb->skb->data;
-@@ -1436,8 +1426,8 @@ void iwl_rx_handle(struct iwl_priv *priv
+@@ -1436,8 +1426,8 @@
rxb->skb = NULL;
}
PCI_DMA_FROMDEVICE);
spin_lock_irqsave(&rxq->lock, flags);
list_add_tail(&rxb->list, &priv->rxq.rx_used);
-@@ -1449,7 +1439,7 @@ void iwl_rx_handle(struct iwl_priv *priv
+@@ -1449,7 +1439,7 @@
count++;
if (count >= 8) {
priv->rxq.read = i;
count = 0;
}
}
-@@ -1653,11 +1643,17 @@ static void iwl4965_irq_tasklet(struct i
+@@ -1653,11 +1643,17 @@
hw_rf_kill ? "disable radio":"enable radio");
/* driver only loads ucode once setting the interface up.
handled |= CSR_INT_BIT_RF_KILL;
}
-@@ -2090,7 +2086,6 @@ static void iwl_alive_start(struct iwl_p
+@@ -2090,7 +2086,6 @@
iwl4965_error_recovery(priv);
iwl_power_update_mode(priv, 1);
if (test_and_clear_bit(STATUS_MODE_PENDING, &priv->status))
iwl4965_set_mode(priv, priv->iw_mode);
-@@ -2342,6 +2337,7 @@ static void iwl_bg_alive_start(struct wo
+@@ -2342,6 +2337,7 @@
mutex_lock(&priv->mutex);
iwl_alive_start(priv);
mutex_unlock(&priv->mutex);
}
static void iwl4965_bg_rf_kill(struct work_struct *work)
-@@ -2359,7 +2355,8 @@ static void iwl4965_bg_rf_kill(struct wo
+@@ -2359,7 +2355,8 @@
IWL_DEBUG(IWL_DL_RF_KILL,
"HW and/or SW RF Kill no longer active, restarting "
"device\n");
queue_work(priv->workqueue, &priv->restart);
} else {
/* make sure mac80211 stop sending Tx frame */
-@@ -2486,6 +2483,7 @@ static void iwl4965_post_associate(struc
+@@ -2486,6 +2483,7 @@
if (!priv->vif || !priv->is_open)
return;
iwl_scan_cancel_timeout(priv, 200);
conf = ieee80211_get_hw_conf(priv->hw);
-@@ -2503,8 +2501,7 @@ static void iwl4965_post_associate(struc
+@@ -2503,8 +2501,7 @@
priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK;
iwl_set_rxon_chain(priv);
priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id);
-@@ -2550,10 +2547,6 @@ static void iwl4965_post_associate(struc
+@@ -2550,18 +2547,19 @@
break;
}
-- /* Enable Rx differential gain and sensitivity calibrations */
-- iwl_chain_noise_reset(priv);
-- priv->start_calib = 1;
--
- if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS)
- priv->assoc_station_added = 1;
-
-@@ -2561,7 +2554,12 @@ static void iwl4965_post_associate(struc
- iwl_activate_qos(priv, 0);
- spin_unlock_irqrestore(&priv->lock, flags);
-
-- iwl_power_update_mode(priv, 0);
-+ iwl_power_enable_management(priv);
++ if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS)
++ priv->assoc_station_added = 1;
+
-+ /* Enable Rx differential gain and sensitivity calibrations */
-+ iwl_chain_noise_reset(priv);
-+ priv->start_calib = 1;
++ spin_lock_irqsave(&priv->lock, flags);
++ iwl_activate_qos(priv, 0);
++ spin_unlock_irqrestore(&priv->lock, flags);
+
++ iwl_power_enable_management(priv);
++
+ /* Enable Rx differential gain and sensitivity calibrations */
+ iwl_chain_noise_reset(priv);
+ priv->start_calib = 1;
+
+- if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS)
+- priv->assoc_station_added = 1;
+-
+- spin_lock_irqsave(&priv->lock, flags);
+- iwl_activate_qos(priv, 0);
+- spin_unlock_irqrestore(&priv->lock, flags);
+-
+- iwl_power_update_mode(priv, 0);
/* we have just associated, don't start scan too early */
priv->next_scan_jiffies = jiffies + IWL_DELAY_NEXT_SCAN;
}
-@@ -2602,31 +2600,9 @@ static int iwl4965_mac_start(struct ieee
+@@ -2602,30 +2600,8 @@
{
struct iwl_priv *priv = hw->priv;
int ret;
- u16 pci_cmd;
-
- IWL_DEBUG_MAC80211("enter\n");
-
+-
+- IWL_DEBUG_MAC80211("enter\n");
+-
- if (pci_enable_device(priv->pci_dev)) {
- IWL_ERROR("Fail to pci_enable_device\n");
- return -ENODEV;
- IWL_ERROR("Error allocating IRQ %d\n", priv->pci_dev->irq);
- goto out_disable_msi;
- }
--
++
++ IWL_DEBUG_MAC80211("enter\n");
+
/* we should be verifying the device is ready to be opened */
mutex_lock(&priv->mutex);
-
-@@ -2639,7 +2615,7 @@ static int iwl4965_mac_start(struct ieee
+@@ -2639,7 +2615,7 @@
if (ret) {
IWL_ERROR("Could not read microcode: %d\n", ret);
mutex_unlock(&priv->mutex);
}
}
-@@ -2650,7 +2626,7 @@ static int iwl4965_mac_start(struct ieee
+@@ -2650,7 +2626,7 @@
iwl_rfkill_set_hw_state(priv);
if (ret)
if (iwl_is_rfkill(priv))
goto out;
-@@ -2669,8 +2645,7 @@ static int iwl4965_mac_start(struct ieee
+@@ -2669,8 +2645,7 @@
if (!test_bit(STATUS_READY, &priv->status)) {
IWL_ERROR("START_ALIVE timeout after %dms.\n",
jiffies_to_msecs(UCODE_READY_TIMEOUT));
}
}
-@@ -2678,15 +2653,6 @@ out:
+@@ -2678,15 +2653,6 @@
priv->is_open = 1;
IWL_DEBUG_MAC80211("leave\n");
return 0;
}
static void iwl4965_mac_stop(struct ieee80211_hw *hw)
-@@ -2714,10 +2680,10 @@ static void iwl4965_mac_stop(struct ieee
+@@ -2714,10 +2680,10 @@
iwl4965_down(priv);
flush_workqueue(priv->workqueue);
IWL_DEBUG_MAC80211("leave\n");
}
-@@ -3212,18 +3178,26 @@ static int iwl4965_mac_hw_scan(struct ie
+@@ -3212,18 +3178,26 @@
goto out_unlock;
}
if (len) {
IWL_DEBUG_SCAN("direct scan for %s [%d]\n ",
iwl_escape_essid(ssid, len), (int)len);
-@@ -3266,7 +3240,11 @@ static void iwl4965_mac_update_tkip_key(
+@@ -3266,7 +3240,11 @@
return;
}
key_flags |= (STA_KEY_FLG_TKIP | STA_KEY_FLG_MAP_KEY_MSK);
key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS);
-@@ -3546,6 +3524,16 @@ static void iwl4965_mac_reset_tsf(struct
+@@ -3546,6 +3524,16 @@
/* Per mac80211.h: This is only used in IBSS mode... */
if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) {
IWL_DEBUG_MAC80211("leave - not in IBSS\n");
mutex_unlock(&priv->mutex);
return;
-@@ -4083,6 +4071,7 @@ static void iwl_setup_deferred_work(stru
+@@ -4083,6 +4071,7 @@
/* FIXME : remove when resolved PENDING */
INIT_WORK(&priv->scan_completed, iwl_bg_scan_completed);
iwl_setup_scan_deferred_work(priv);
if (priv->cfg->ops->lib->setup_deferred_work)
priv->cfg->ops->lib->setup_deferred_work(priv);
-@@ -4102,6 +4091,7 @@ static void iwl_cancel_deferred_work(str
+@@ -4102,6 +4091,7 @@
cancel_delayed_work_sync(&priv->init_alive_start);
cancel_delayed_work(&priv->scan_check);
cancel_delayed_work(&priv->alive_start);
cancel_work_sync(&priv->beacon_update);
del_timer_sync(&priv->statistics_periodic);
-@@ -4161,6 +4151,7 @@ static int iwl4965_pci_probe(struct pci_
+@@ -4161,6 +4151,7 @@
struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data);
unsigned long flags;
DECLARE_MAC_BUF(mac);
/************************
* 1. Allocating HW data
-@@ -4204,13 +4195,13 @@ static int iwl4965_pci_probe(struct pci_
+@@ -4204,13 +4195,13 @@
pci_set_master(pdev);
/* both attempts failed: */
if (err) {
printk(KERN_WARNING "%s: No suitable DMA available.\n",
-@@ -4305,26 +4296,36 @@ static int iwl4965_pci_probe(struct pci_
+@@ -4305,26 +4296,36 @@
iwl4965_disable_interrupts(priv);
spin_unlock_irqrestore(&priv->lock, flags);
if (err) {
IWL_ERROR("failed to create sysfs device attributes\n");
- goto out_uninit_drv;
+- }
+-
+ goto out_free_irq;
- }
++ }
--
iwl_setup_deferred_work(priv);
iwl_setup_rx_handlers(priv);
err = iwl_setup_mac(priv);
if (err)
goto out_remove_sysfs;
-@@ -4333,15 +4334,28 @@ static int iwl4965_pci_probe(struct pci_
+@@ -4332,16 +4333,29 @@
+ err = iwl_dbgfs_register(priv, DRV_NAME);
if (err)
IWL_ERROR("failed to create debugfs files\n");
-
++
+ /* If platform's RF_KILL switch is NOT set to KILL */
+ if (iwl_read32(priv, CSR_GP_CNTRL) & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)
+ clear_bit(STATUS_RF_KILL_HW, &priv->status);
+ else
+ set_bit(STATUS_RF_KILL_HW, &priv->status);
-+
+
err = iwl_rfkill_init(priv);
if (err)
IWL_ERROR("Unable to initialize RFKILL system. "
out_uninit_drv:
iwl_uninit_drv(priv);
out_free_eeprom:
-@@ -4413,6 +4427,8 @@ static void __devexit iwl4965_pci_remove
+@@ -4413,6 +4427,8 @@
destroy_workqueue(priv->workqueue);
priv->workqueue = NULL;
pci_iounmap(pdev, priv->hw_base);
pci_release_regions(pdev);
pci_disable_device(pdev);
-@@ -4438,6 +4454,8 @@ static int iwl4965_pci_suspend(struct pc
+@@ -4438,6 +4454,8 @@
priv->is_open = 1;
}
pci_set_power_state(pdev, PCI_D3hot);
return 0;
-@@ -4448,6 +4466,9 @@ static int iwl4965_pci_resume(struct pci
+@@ -4448,6 +4466,9 @@
struct iwl_priv *priv = pci_get_drvdata(pdev);
pci_set_power_state(pdev, PCI_D0);
if (priv->is_open)
iwl4965_mac_start(priv->hw);
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-calib.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-calib.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-calib.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-calib.c 2009-03-25 16:11:08.000000000 +0000
-@@ -66,6 +66,66 @@
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-calib.c
+--- a/drivers/net/wireless/iwlwifi/iwl-calib.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-calib.c Wed May 06 16:56:28 2009 +0100
+@@ -65,6 +65,66 @@
+ #include "iwl-dev.h"
#include "iwl-core.h"
#include "iwl-calib.h"
-
++
+/*****************************************************************************
+ * INIT calibrations framework
+ *****************************************************************************/
+/*****************************************************************************
+ * RUNTIME calibrations framework
+ *****************************************************************************/
-+
+
/* "false alarms" are signals that our DSP tries to lock onto,
* but then determines that they are either noise, or transmissions
- * from a distant wireless network (also "noise", really) that get
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-core.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-core.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-core.c 2009-03-25 16:11:08.000000000 +0000
-@@ -290,6 +290,9 @@ void iwl_clear_stations_table(struct iwl
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-core.c
+--- a/drivers/net/wireless/iwlwifi/iwl-core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-core.c Wed May 06 16:56:28 2009 +0100
+@@ -289,6 +289,9 @@
+
priv->num_stations = 0;
memset(priv->stations, 0, sizeof(priv->stations));
-
++
+ /* clean ucode key table bit map */
+ priv->ucode_key_table = 0;
-+
+
spin_unlock_irqrestore(&priv->sta_lock, flags);
}
- EXPORT_SYMBOL(iwl_clear_stations_table);
-@@ -646,8 +649,14 @@ void iwl_set_rxon_ht(struct iwl_priv *pr
+@@ -646,8 +649,14 @@
struct iwl_rxon_cmd *rxon = &priv->staging_rxon;
u32 val;
/* Set up channel bandwidth: 20 MHz only, or 20/40 mixed if fat ok */
if (iwl_is_fat_tx_allowed(priv, NULL))
-@@ -950,22 +959,6 @@ err:
+@@ -950,22 +959,6 @@
}
EXPORT_SYMBOL(iwl_init_drv);
int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)
{
int ret = 0;
-@@ -993,10 +986,9 @@ int iwl_set_tx_power(struct iwl_priv *pr
+@@ -993,10 +986,9 @@
}
EXPORT_SYMBOL(iwl_set_tx_power);
iwlcore_free_geos(priv);
iwl_free_channel_map(priv);
kfree(priv->scan);
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-core.h linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-core.h
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-core.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-core.h 2009-03-25 16:11:08.000000000 +0000
-@@ -186,7 +186,6 @@ struct ieee80211_hw *iwl_alloc_all(struc
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-core.h
+--- a/drivers/net/wireless/iwlwifi/iwl-core.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-core.h Wed May 06 16:56:28 2009 +0100
+@@ -186,7 +186,6 @@
void iwl_hw_detect(struct iwl_priv *priv);
void iwl_clear_stations_table(struct iwl_priv *priv);
void iwl_reset_qos(struct iwl_priv *priv);
void iwl_set_rxon_chain(struct iwl_priv *priv);
int iwl_set_rxon_channel(struct iwl_priv *priv,
-@@ -291,6 +290,13 @@ int iwl_scan_initiate(struct iwl_priv *p
+@@ -291,6 +290,13 @@
void iwl_setup_rx_scan_handlers(struct iwl_priv *priv);
void iwl_setup_scan_deferred_work(struct iwl_priv *priv);
/*****************************************************
* S e n d i n g H o s t C o m m a n d s *
*****************************************************/
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-dev.h linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-dev.h
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-dev.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-dev.h 2009-03-25 16:11:08.000000000 +0000
-@@ -89,7 +89,8 @@ extern struct iwl_cfg iwl5100_abg_cfg;
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-dev.h
+--- a/drivers/net/wireless/iwlwifi/iwl-dev.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-dev.h Wed May 06 16:56:28 2009 +0100
+@@ -89,7 +89,8 @@
#define DEFAULT_LONG_RETRY_LIMIT 4U
struct iwl_rx_mem_buffer {
struct sk_buff *skb;
struct list_head list;
};
-@@ -745,13 +746,10 @@ struct statistics_general_data {
+@@ -745,13 +746,10 @@
u32 beacon_energy_c;
};
};
enum ucode_type {
-@@ -813,6 +811,7 @@ enum {
+@@ -813,6 +811,7 @@
#define IWL_MAX_NUM_QUEUES 20 /* FIXME: do dynamic allocation */
struct iwl_priv {
-@@ -857,7 +856,7 @@ struct iwl_priv {
+@@ -857,7 +856,7 @@
s32 last_temperature;
/* init calibration results */
/* Scan related variables */
unsigned long last_scan_jiffies;
-@@ -1047,6 +1046,7 @@ struct iwl_priv {
+@@ -1047,6 +1046,7 @@
struct tasklet_struct irq_tasklet;
struct delayed_work init_alive_start;
struct delayed_work alive_start;
struct delayed_work scan_check;
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-led.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-led.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-led.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-led.c 2009-03-25 16:11:08.000000000 +0000
-@@ -353,7 +353,7 @@ int iwl_leds_register(struct iwl_priv *p
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-led.c
+--- a/drivers/net/wireless/iwlwifi/iwl-led.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-led.c Wed May 06 16:56:28 2009 +0100
+@@ -353,7 +353,7 @@
trigger = ieee80211_get_radio_led_name(priv->hw);
snprintf(priv->led[IWL_LED_TRG_RADIO].name,
wiphy_name(priv->hw->wiphy));
priv->led[IWL_LED_TRG_RADIO].led_on = iwl4965_led_on_reg;
-@@ -367,7 +367,7 @@ int iwl_leds_register(struct iwl_priv *p
+@@ -367,7 +367,7 @@
trigger = ieee80211_get_assoc_led_name(priv->hw);
snprintf(priv->led[IWL_LED_TRG_ASSOC].name,
wiphy_name(priv->hw->wiphy));
ret = iwl_leds_register_led(priv, &priv->led[IWL_LED_TRG_ASSOC],
-@@ -383,7 +383,7 @@ int iwl_leds_register(struct iwl_priv *p
+@@ -383,7 +383,7 @@
trigger = ieee80211_get_rx_led_name(priv->hw);
snprintf(priv->led[IWL_LED_TRG_RX].name,
wiphy_name(priv->hw->wiphy));
ret = iwl_leds_register_led(priv, &priv->led[IWL_LED_TRG_RX],
-@@ -398,7 +398,7 @@ int iwl_leds_register(struct iwl_priv *p
+@@ -398,7 +398,7 @@
trigger = ieee80211_get_tx_led_name(priv->hw);
snprintf(priv->led[IWL_LED_TRG_TX].name,
wiphy_name(priv->hw->wiphy));
ret = iwl_leds_register_led(priv, &priv->led[IWL_LED_TRG_TX],
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-power.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-power.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-power.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-power.c 2009-03-25 16:11:08.000000000 +0000
-@@ -324,7 +324,7 @@ EXPORT_SYMBOL(iwl_power_update_mode);
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-power.c
+--- a/drivers/net/wireless/iwlwifi/iwl-power.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-power.c Wed May 06 16:56:28 2009 +0100
+@@ -324,7 +324,7 @@
* this will be usefull for rate scale to disable PM during heavy
* Tx/Rx activities
*/
{
u16 prev_mode;
int ret = 0;
-@@ -337,6 +337,11 @@ int iwl_power_disable_management(struct
+@@ -337,6 +337,11 @@
ret = iwl_power_update_mode(priv, 0);
priv->power_data.power_disabled = 1;
priv->power_data.user_power_setting = prev_mode;
return ret;
}
-@@ -431,3 +436,35 @@ int iwl_power_temperature_change(struct
+@@ -431,3 +436,35 @@
return ret;
}
EXPORT_SYMBOL(iwl_power_temperature_change);
+ cancel_delayed_work(&priv->set_power_save);
+}
+EXPORT_SYMBOL(iwl_power_cancel_timeout);
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-power.h linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-power.h
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-power.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-power.h 2009-03-25 16:11:08.000000000 +0000
-@@ -78,8 +78,10 @@ struct iwl_power_mgr {
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-power.h
+--- a/drivers/net/wireless/iwlwifi/iwl-power.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-power.h Wed May 06 16:56:28 2009 +0100
+@@ -78,8 +78,10 @@
u8 power_disabled; /* flag to disable using power saving level */
};
int iwl_power_enable_management(struct iwl_priv *priv);
int iwl_power_set_user_mode(struct iwl_priv *priv, u16 mode);
int iwl_power_set_system_mode(struct iwl_priv *priv, u16 mode);
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-rx.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-rx.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-rx.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-rx.c 2009-03-25 16:11:08.000000000 +0000
-@@ -204,7 +204,7 @@ int iwl_rx_queue_restock(struct iwl_priv
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-rx.c
+--- a/drivers/net/wireless/iwlwifi/iwl-rx.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-rx.c Wed May 06 16:56:28 2009 +0100
+@@ -204,7 +204,7 @@
list_del(element);
/* Point to Rx buffer via next RBD in circular buffer */
rxq->queue[rxq->write] = rxb;
rxq->write = (rxq->write + 1) & RX_QUEUE_MASK;
rxq->free_count--;
-@@ -245,34 +245,52 @@ void iwl_rx_allocate(struct iwl_priv *pr
+@@ -245,34 +245,52 @@
struct list_head *element;
struct iwl_rx_mem_buffer *rxb;
unsigned long flags;
}
EXPORT_SYMBOL(iwl_rx_allocate);
-@@ -300,8 +318,8 @@ void iwl_rx_queue_free(struct iwl_priv *
+@@ -300,8 +318,8 @@
for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) {
if (rxq->pool[i].skb != NULL) {
pci_unmap_single(priv->pci_dev,
PCI_DMA_FROMDEVICE);
dev_kfree_skb(rxq->pool[i].skb);
}
-@@ -354,8 +372,8 @@ void iwl_rx_queue_reset(struct iwl_priv
+@@ -354,8 +372,8 @@
* to an SKB, so we need to unmap and free potential storage */
if (rxq->pool[i].skb != NULL) {
pci_unmap_single(priv->pci_dev,
PCI_DMA_FROMDEVICE);
priv->alloc_rxb_skb--;
dev_kfree_skb(rxq->pool[i].skb);
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-scan.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-scan.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-scan.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-scan.c 2009-03-25 16:11:08.000000000 +0000
-@@ -464,11 +464,6 @@ void iwl_init_scan_params(struct iwl_pri
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-scan.c
+--- a/drivers/net/wireless/iwlwifi/iwl-scan.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-scan.c Wed May 06 16:56:28 2009 +0100
+@@ -464,11 +464,6 @@
int iwl_scan_initiate(struct iwl_priv *priv)
{
if (!iwl_is_ready_rf(priv)) {
IWL_DEBUG_SCAN("Aborting scan due to not ready.\n");
return -EIO;
-@@ -480,8 +475,7 @@ int iwl_scan_initiate(struct iwl_priv *p
+@@ -480,8 +475,7 @@
}
if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) {
return -EAGAIN;
}
-@@ -710,7 +704,7 @@ static void iwl_bg_request_scan(struct w
+@@ -710,7 +704,7 @@
u16 cmd_len;
enum ieee80211_band band;
u8 n_probes = 2;
conf = ieee80211_get_hw_conf(priv->hw);
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-sta.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-sta.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-sta.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-sta.c 2009-03-25 16:11:08.000000000 +0000
-@@ -475,7 +475,7 @@ static int iwl_get_free_ucode_key_index(
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-sta.c
+--- a/drivers/net/wireless/iwlwifi/iwl-sta.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-sta.c Wed May 06 16:56:28 2009 +0100
+@@ -475,7 +475,7 @@
if (!test_and_set_bit(i, &priv->ucode_key_table))
return i;
}
int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empty)
-@@ -620,6 +620,9 @@ static int iwl_set_wep_dynamic_key_info(
+@@ -620,6 +620,9 @@
/* else, we are overriding an existing key => no need to allocated room
* in uCode. */
priv->stations[sta_id].sta.key.key_flags = key_flags;
priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
-@@ -637,6 +640,7 @@ static int iwl_set_ccmp_dynamic_key_info
+@@ -637,6 +640,7 @@
{
unsigned long flags;
__le16 key_flags = 0;
key_flags |= (STA_KEY_FLG_CCMP | STA_KEY_FLG_MAP_KEY_MSK);
key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS);
-@@ -664,14 +668,18 @@ static int iwl_set_ccmp_dynamic_key_info
+@@ -664,14 +668,18 @@
/* else, we are overriding an existing key => no need to allocated room
* in uCode. */
}
static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
-@@ -696,6 +704,9 @@ static int iwl_set_tkip_dynamic_key_info
+@@ -695,6 +703,9 @@
+ iwl_get_free_ucode_key_index(priv);
/* else, we are overriding an existing key => no need to allocated room
* in uCode. */
-
++
+ WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
+ "no space for new kew");
-+
+
/* This copy is acutally not needed: we get the key with each TX */
memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key, 16);
-
-@@ -734,6 +745,13 @@ int iwl_remove_dynamic_key(struct iwl_pr
- return 0;
- }
-
-+ if (priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET) {
-+ IWL_WARNING("Removing wrong key %d 0x%x\n",
-+ keyconf->keyidx, key_flags);
+@@ -730,6 +741,13 @@
+ * been replaced by another one with different index.
+ * Don't do anything and return ok
+ */
+ spin_unlock_irqrestore(&priv->sta_lock, flags);
+ return 0;
+ }
+
- if (!test_and_clear_bit(priv->stations[sta_id].sta.key.key_offset,
- &priv->ucode_key_table))
- IWL_ERROR("index %d not used in uCode key table.\n",
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-tx.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-tx.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-tx.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-tx.c 2009-03-25 16:11:08.000000000 +0000
-@@ -1192,10 +1192,9 @@ void iwl_tx_cmd_complete(struct iwl_priv
++ if (priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET) {
++ IWL_WARNING("Removing wrong key %d 0x%x\n",
++ keyconf->keyidx, key_flags);
+ spin_unlock_irqrestore(&priv->sta_lock, flags);
+ return 0;
+ }
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-tx.c
+--- a/drivers/net/wireless/iwlwifi/iwl-tx.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-tx.c Wed May 06 16:56:29 2009 +0100
+@@ -1192,10 +1192,9 @@
/* If a Tx command is being handled and it isn't in the actual
* command queue then there a command routing bug has been introduced
* in the queue management code. */
cmd_index = get_cmd_index(&priv->txq[IWL_CMD_QUEUE_NUM].q, index, huge);
cmd = priv->txq[IWL_CMD_QUEUE_NUM].cmd[cmd_index];
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl3945-base.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl3945-base.c 2009-03-25 16:11:08.000000000 +0000
-@@ -5761,7 +5761,6 @@ static void iwl3945_alive_start(struct i
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl3945-base.c
+--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c Wed May 06 16:56:29 2009 +0100
+@@ -5761,7 +5761,6 @@
if (priv->error_recovering)
iwl3945_error_recovery(priv);
return;
restart:
-@@ -6006,6 +6005,7 @@ static void iwl3945_bg_alive_start(struc
+@@ -6006,6 +6005,7 @@
mutex_lock(&priv->mutex);
iwl3945_alive_start(priv);
mutex_unlock(&priv->mutex);
}
static void iwl3945_bg_rf_kill(struct work_struct *work)
-@@ -6023,7 +6023,8 @@ static void iwl3945_bg_rf_kill(struct wo
+@@ -6023,7 +6023,8 @@
IWL_DEBUG(IWL_DL_INFO | IWL_DL_RF_KILL,
"HW and/or SW RF Kill no longer active, restarting "
"device\n");
queue_work(priv->workqueue, &priv->restart);
} else {
-@@ -6040,6 +6041,25 @@ static void iwl3945_bg_rf_kill(struct wo
- iwl3945_rfkill_set_hw_state(priv);
- }
+@@ -6038,6 +6039,25 @@
+ mutex_unlock(&priv->mutex);
+ iwl3945_rfkill_set_hw_state(priv);
++}
++
+static void iwl3945_rfkill_poll(struct work_struct *data)
+{
+ struct iwl3945_priv *priv =
+ queue_delayed_work(priv->workqueue, &priv->rfkill_poll,
+ round_jiffies_relative(2 * HZ));
+
-+}
-+
+ }
+
static void iwl3945_bg_set_monitor(struct work_struct *work)
- {
- struct iwl3945_priv *priv = container_of(work,
-@@ -6259,6 +6279,11 @@ static void iwl3945_bg_request_scan(stru
+@@ -6259,6 +6279,11 @@
direct_mask,
(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);
cmd.len += le16_to_cpu(scan->tx_cmd.len) +
scan->channel_count * sizeof(struct iwl3945_scan_channel);
cmd.data = scan;
-@@ -6476,20 +6501,6 @@ static int iwl3945_mac_start(struct ieee
+@@ -6475,20 +6500,6 @@
+ int ret;
IWL_DEBUG_MAC80211("enter\n");
-
+-
- if (pci_enable_device(priv->pci_dev)) {
- IWL_ERROR("Fail to pci_enable_device\n");
- return -ENODEV;
- IWL_ERROR("Error allocating IRQ %d\n", priv->pci_dev->irq);
- goto out_disable_msi;
- }
--
+
/* we should be verifying the device is ready to be opened */
mutex_lock(&priv->mutex);
-
-@@ -6534,15 +6545,15 @@ static int iwl3945_mac_start(struct ieee
+@@ -6534,15 +6545,15 @@
}
}
priv->is_open = 0;
IWL_DEBUG_MAC80211("leave - failed\n");
return ret;
-@@ -6574,10 +6585,10 @@ static void iwl3945_mac_stop(struct ieee
+@@ -6574,10 +6585,10 @@
iwl3945_down(priv);
flush_workqueue(priv->workqueue);
IWL_DEBUG_MAC80211("leave\n");
}
-@@ -7771,6 +7782,7 @@ static void iwl3945_setup_deferred_work(
+@@ -7771,6 +7782,7 @@
INIT_DELAYED_WORK(&priv->init_alive_start, iwl3945_bg_init_alive_start);
INIT_DELAYED_WORK(&priv->alive_start, iwl3945_bg_alive_start);
INIT_DELAYED_WORK(&priv->scan_check, iwl3945_bg_scan_check);
iwl3945_hw_setup_deferred_work(priv);
-@@ -7983,6 +7995,15 @@ static int iwl3945_pci_probe(struct pci_
+@@ -7983,6 +7995,15 @@
iwl3945_disable_interrupts(priv);
spin_unlock_irqrestore(&priv->lock, flags);
err = sysfs_create_group(&pdev->dev.kobj, &iwl3945_attribute_group);
if (err) {
IWL_ERROR("failed to create sysfs device attributes\n");
-@@ -8032,14 +8053,16 @@ static int iwl3945_pci_probe(struct pci_
+@@ -8032,13 +8053,15 @@
priv->hw->conf.beacon_int = 100;
priv->mac80211_registered = 1;
if (err)
IWL_ERROR("Unable to initialize RFKILL system. "
"Ignoring error: %d\n", err);
-
++
+ /* Start monitoring the killswitch */
+ queue_delayed_work(priv->workqueue, &priv->rfkill_poll,
+ 2 * HZ);
-+
+
return 0;
- out_free_geos:
-@@ -8050,9 +8073,12 @@ static int iwl3945_pci_probe(struct pci_
+@@ -8050,9 +8073,12 @@
sysfs_remove_group(&pdev->dev.kobj, &iwl3945_attribute_group);
out_release_irq:
out_iounmap:
pci_iounmap(pdev, priv->hw_base);
-@@ -8093,6 +8119,8 @@ static void __devexit iwl3945_pci_remove
+@@ -8093,6 +8119,8 @@
sysfs_remove_group(&pdev->dev.kobj, &iwl3945_attribute_group);
iwl3945_rfkill_unregister(priv);
iwl3945_dealloc_ucode_pci(priv);
if (priv->rxq.bd)
-@@ -8114,6 +8142,9 @@ static void __devexit iwl3945_pci_remove
+@@ -8114,6 +8142,9 @@
destroy_workqueue(priv->workqueue);
priv->workqueue = NULL;
pci_iounmap(pdev, priv->hw_base);
pci_release_regions(pdev);
pci_disable_device(pdev);
-@@ -8139,7 +8170,8 @@ static int iwl3945_pci_suspend(struct pc
+@@ -8139,7 +8170,8 @@
iwl3945_mac_stop(priv->hw);
priv->is_open = 1;
}
pci_set_power_state(pdev, PCI_D3hot);
return 0;
-@@ -8150,6 +8182,8 @@ static int iwl3945_pci_resume(struct pci
+@@ -8150,6 +8182,8 @@
struct iwl3945_priv *priv = pci_get_drvdata(pdev);
pci_set_power_state(pdev, PCI_D0);
if (priv->is_open)
iwl3945_mac_start(priv->hw);
-diff -purN linux-2.6.27/drivers/net/wireless/libertas/main.c linux-2.6.27.19-5.1/drivers/net/wireless/libertas/main.c
---- linux-2.6.27/drivers/net/wireless/libertas/main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/libertas/main.c 2009-03-25 16:11:09.000000000 +0000
-@@ -1196,7 +1196,13 @@ void lbs_remove_card(struct lbs_private
+diff -r 9608d5473017 drivers/net/wireless/libertas/main.c
+--- a/drivers/net/wireless/libertas/main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/libertas/main.c Wed May 06 16:56:29 2009 +0100
+@@ -1196,7 +1196,13 @@
cancel_delayed_work_sync(&priv->scan_work);
cancel_delayed_work_sync(&priv->assoc_work);
cancel_work_sync(&priv->mcast_work);
if (priv->psmode == LBS802_11POWERMODEMAX_PSP) {
priv->psmode = LBS802_11POWERMODECAM;
-@@ -1314,14 +1320,26 @@ void lbs_stop_card(struct lbs_private *p
+@@ -1314,14 +1320,26 @@
device_remove_file(&dev->dev, &dev_attr_lbs_rtap);
}
-- /* Flush pending command nodes */
+ /* Delete the timeout of the currently processing command */
- del_timer_sync(&priv->command_timer);
++ del_timer_sync(&priv->command_timer);
+
-+ /* Flush pending command nodes */
+ /* Flush pending command nodes */
+- del_timer_sync(&priv->command_timer);
spin_lock_irqsave(&priv->driver_lock, flags);
+ lbs_deb_main("clearing pending commands\n");
list_for_each_entry(cmdnode, &priv->cmdpendingq, list) {
spin_unlock_irqrestore(&priv->driver_lock, flags);
unregister_netdev(dev);
-diff -purN linux-2.6.27/drivers/net/wireless/libertas/scan.c linux-2.6.27.19-5.1/drivers/net/wireless/libertas/scan.c
---- linux-2.6.27/drivers/net/wireless/libertas/scan.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/libertas/scan.c 2009-03-25 16:11:09.000000000 +0000
-@@ -598,8 +598,8 @@ static int lbs_process_bss(struct bss_de
+diff -r 9608d5473017 drivers/net/wireless/libertas/scan.c
+--- a/drivers/net/wireless/libertas/scan.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/libertas/scan.c Wed May 06 16:56:29 2009 +0100
+@@ -598,8 +598,8 @@
switch (elem->id) {
case MFIE_TYPE_SSID:
lbs_deb_scan("got SSID IE: '%s', len %u\n",
escape_essid(bss->ssid, bss->ssid_len),
bss->ssid_len);
-diff -purN linux-2.6.27/drivers/net/wireless/p54/p54usb.c linux-2.6.27.19-5.1/drivers/net/wireless/p54/p54usb.c
---- linux-2.6.27/drivers/net/wireless/p54/p54usb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/p54/p54usb.c 2009-03-25 16:11:08.000000000 +0000
-@@ -53,6 +53,7 @@ static struct usb_device_id p54u_table[]
+diff -r 9608d5473017 drivers/net/wireless/p54/p54usb.c
+--- a/drivers/net/wireless/p54/p54usb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/p54/p54usb.c Wed May 06 16:56:29 2009 +0100
+@@ -53,6 +53,7 @@
{USB_DEVICE(0x050d, 0x7050)}, /* Belkin F5D7050 ver 1000 */
{USB_DEVICE(0x0572, 0x2000)}, /* Cohiba Proto board */
{USB_DEVICE(0x0572, 0x2002)}, /* Cohiba Proto board */
{USB_DEVICE(0x0707, 0xee13)}, /* SMC 2862W-G version 2 */
{USB_DEVICE(0x083a, 0x4521)}, /* Siemens Gigaset USB Adapter 54 version 2 */
{USB_DEVICE(0x0846, 0x4240)}, /* Netgear WG111 (v2) */
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2400pci.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2400pci.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2400pci.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2400pci.c 2009-03-25 16:11:09.000000000 +0000
-@@ -1241,7 +1241,7 @@ static irqreturn_t rt2400pci_interrupt(i
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2400pci.c
+--- a/drivers/net/wireless/rt2x00/rt2400pci.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2400pci.c Wed May 06 16:56:29 2009 +0100
+@@ -1241,7 +1241,7 @@
if (!reg)
return IRQ_NONE;
return IRQ_HANDLED;
/*
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2500pci.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2500pci.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2500pci.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2500pci.c 2009-03-25 16:11:09.000000000 +0000
-@@ -1377,7 +1377,7 @@ static irqreturn_t rt2500pci_interrupt(i
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2500pci.c
+--- a/drivers/net/wireless/rt2x00/rt2500pci.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2500pci.c Wed May 06 16:56:29 2009 +0100
+@@ -1377,7 +1377,7 @@
if (!reg)
return IRQ_NONE;
return IRQ_HANDLED;
/*
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2500usb.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2500usb.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2500usb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2500usb.c 2009-03-25 16:11:09.000000000 +0000
-@@ -1297,7 +1297,7 @@ static void rt2500usb_beacondone(struct
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2500usb.c
+--- a/drivers/net/wireless/rt2x00/rt2500usb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2500usb.c Wed May 06 16:56:29 2009 +0100
+@@ -1297,7 +1297,7 @@
struct queue_entry *entry = (struct queue_entry *)urb->context;
struct queue_entry_priv_usb_bcn *bcn_priv = entry->priv_data;
return;
/*
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00.h linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00.h
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00.h 2009-03-25 16:11:09.000000000 +0000
-@@ -599,14 +599,14 @@ enum rt2x00_flags {
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00.h
+--- a/drivers/net/wireless/rt2x00/rt2x00.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00.h Wed May 06 16:56:29 2009 +0100
+@@ -599,14 +599,14 @@
/*
* Device state flags
*/
/*
* Driver features
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00config.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00config.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00config.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00config.c 2009-03-25 16:11:09.000000000 +0000
-@@ -121,7 +121,7 @@ void rt2x00lib_config_antenna(struct rt2
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00config.c
+--- a/drivers/net/wireless/rt2x00/rt2x00config.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00config.c Wed May 06 16:56:29 2009 +0100
+@@ -121,7 +121,7 @@
* Antenna setup changes require the RX to be disabled,
* else the changes will be ignored by the device.
*/
rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF_LINK);
/*
-@@ -136,7 +136,7 @@ void rt2x00lib_config_antenna(struct rt2
+@@ -136,7 +136,7 @@
rt2x00dev->link.ant.active.rx = libconf.ant.rx;
rt2x00dev->link.ant.active.tx = libconf.ant.tx;
rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON_LINK);
}
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00dev.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00dev.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00dev.c
+--- a/drivers/net/wireless/rt2x00/rt2x00dev.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00dev.c Wed May 06 16:56:29 2009 +0100
@@ -34,7 +34,7 @@
*/
void rt2x00lib_reset_link_tuner(struct rt2x00_dev *rt2x00dev)
return;
/*
-@@ -94,8 +94,8 @@ int rt2x00lib_enable_radio(struct rt2x00
+@@ -94,8 +94,8 @@
* Don't enable the radio twice.
* And check if the hardware button has been disabled.
*/
return 0;
/*
-@@ -117,7 +117,7 @@ int rt2x00lib_enable_radio(struct rt2x00
+@@ -117,7 +117,7 @@
rt2x00leds_led_radio(rt2x00dev, true);
rt2x00led_led_activity(rt2x00dev, true);
/*
* Enable RX.
-@@ -134,7 +134,7 @@ int rt2x00lib_enable_radio(struct rt2x00
+@@ -134,7 +134,7 @@
void rt2x00lib_disable_radio(struct rt2x00_dev *rt2x00dev)
{
return;
/*
-@@ -354,7 +354,7 @@ static void rt2x00lib_link_tuner(struct
+@@ -354,7 +354,7 @@
* When the radio is shutting down we should
* immediately cease all link tuning.
*/
return;
/*
-@@ -431,7 +431,7 @@ static void rt2x00lib_intf_scheduled_ite
+@@ -431,7 +431,7 @@
* note that in the spinlock protected area above the delayed_flags
* have been cleared correctly.
*/
return;
if (delayed_flags & DELAYED_UPDATE_BEACON)
-@@ -484,7 +484,7 @@ static void rt2x00lib_beacondone_iter(vo
+@@ -484,7 +484,7 @@
void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev)
{
return;
ieee80211_iterate_active_interfaces_atomic(rt2x00dev->hw,
-@@ -563,7 +563,7 @@ void rt2x00lib_txdone(struct queue_entry
+@@ -563,7 +563,7 @@
rt2x00dev->ops->lib->init_txentry(rt2x00dev, entry);
rt2x00queue_index_inc(entry->queue, Q_INDEX_DONE);
/*
-@@ -878,7 +878,7 @@ static int rt2x00lib_probe_hw_modes(stru
+@@ -878,7 +878,7 @@
static void rt2x00lib_remove_hw(struct rt2x00_dev *rt2x00dev)
{
ieee80211_unregister_hw(rt2x00dev->hw);
if (likely(rt2x00dev->hw->wiphy->bands[IEEE80211_BAND_2GHZ])) {
-@@ -894,6 +894,9 @@ static int rt2x00lib_probe_hw(struct rt2
+@@ -893,6 +893,9 @@
+ {
struct hw_mode_spec *spec = &rt2x00dev->spec;
int status;
-
++
+ if (test_bit(DEVICE_STATE_REGISTERED_HW, &rt2x00dev->flags))
+ return 0;
-+
+
/*
* Initialize HW modes.
- */
-@@ -915,7 +918,7 @@ static int rt2x00lib_probe_hw(struct rt2
+@@ -915,7 +918,7 @@
return status;
}
return 0;
}
-@@ -925,7 +928,7 @@ static int rt2x00lib_probe_hw(struct rt2
+@@ -925,7 +928,7 @@
*/
static void rt2x00lib_uninitialize(struct rt2x00_dev *rt2x00dev)
{
return;
/*
-@@ -948,7 +951,7 @@ static int rt2x00lib_initialize(struct r
+@@ -948,7 +951,7 @@
{
int status;
return 0;
/*
-@@ -967,7 +970,7 @@ static int rt2x00lib_initialize(struct r
+@@ -967,7 +970,7 @@
return status;
}
/*
* Register the extra components.
-@@ -981,7 +984,7 @@ int rt2x00lib_start(struct rt2x00_dev *r
+@@ -981,7 +984,7 @@
{
int retval;
return 0;
/*
-@@ -1012,15 +1015,15 @@ int rt2x00lib_start(struct rt2x00_dev *r
+@@ -1012,15 +1015,15 @@
rt2x00dev->intf_sta_count = 0;
rt2x00dev->intf_associated = 0;
return;
/*
-@@ -1032,8 +1035,6 @@ void rt2x00lib_stop(struct rt2x00_dev *r
+@@ -1032,8 +1035,6 @@
rt2x00dev->intf_ap_count = 0;
rt2x00dev->intf_sta_count = 0;
rt2x00dev->intf_associated = 0;
}
/*
-@@ -1088,7 +1089,7 @@ int rt2x00lib_probe_dev(struct rt2x00_de
+@@ -1088,7 +1089,7 @@
rt2x00rfkill_allocate(rt2x00dev);
rt2x00debug_register(rt2x00dev);
return 0;
-@@ -1101,7 +1102,7 @@ EXPORT_SYMBOL_GPL(rt2x00lib_probe_dev);
+@@ -1101,7 +1102,7 @@
void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
{
/*
* Disable radio.
-@@ -1146,14 +1147,15 @@ int rt2x00lib_suspend(struct rt2x00_dev
+@@ -1146,14 +1147,15 @@
int retval;
NOTICE(rt2x00dev, "Going to sleep.\n");
/*
* Disable radio.
-@@ -1225,7 +1227,7 @@ int rt2x00lib_resume(struct rt2x00_dev *
+@@ -1225,7 +1227,7 @@
/*
* Only continue if mac80211 had open interfaces.
*/
return 0;
/*
-@@ -1252,7 +1254,7 @@ int rt2x00lib_resume(struct rt2x00_dev *
+@@ -1252,7 +1254,7 @@
/*
* We are ready again to receive requests from mac80211.
*/
/*
* It is possible that during that mac80211 has attempted
-@@ -1272,7 +1274,7 @@ int rt2x00lib_resume(struct rt2x00_dev *
+@@ -1272,7 +1274,7 @@
return 0;
exit:
rt2x00lib_uninitialize(rt2x00dev);
rt2x00debug_deregister(rt2x00dev);
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00leds.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00leds.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00leds.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00leds.c 2009-03-25 16:11:09.000000000 +0000
-@@ -149,7 +149,7 @@ void rt2x00leds_register(struct rt2x00_d
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00leds.c
+--- a/drivers/net/wireless/rt2x00/rt2x00leds.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00leds.c Wed May 06 16:56:29 2009 +0100
+@@ -149,7 +149,7 @@
rt2x00dev->ops->name, wiphy_name(rt2x00dev->hw->wiphy));
if (rt2x00dev->led_radio.flags & LED_INITIALIZED) {
retval = rt2x00leds_register_led(rt2x00dev,
&rt2x00dev->led_radio,
-@@ -159,7 +159,7 @@ void rt2x00leds_register(struct rt2x00_d
+@@ -159,7 +159,7 @@
}
if (rt2x00dev->led_assoc.flags & LED_INITIALIZED) {
retval = rt2x00leds_register_led(rt2x00dev,
&rt2x00dev->led_assoc,
-@@ -169,7 +169,7 @@ void rt2x00leds_register(struct rt2x00_d
+@@ -169,7 +169,7 @@
}
if (rt2x00dev->led_qual.flags & LED_INITIALIZED) {
retval = rt2x00leds_register_led(rt2x00dev,
&rt2x00dev->led_qual,
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00mac.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00mac.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00mac.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00mac.c 2009-03-25 16:11:09.000000000 +0000
-@@ -106,7 +106,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00mac.c
+--- a/drivers/net/wireless/rt2x00/rt2x00mac.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00mac.c Wed May 06 16:56:29 2009 +0100
+@@ -106,7 +106,7 @@
* Note that we can only stop the TX queues inside the TX path
* due to possible race conditions in mac80211.
*/
ieee80211_stop_queues(hw);
dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
-@@ -168,7 +168,7 @@ int rt2x00mac_start(struct ieee80211_hw
+@@ -168,7 +168,7 @@
{
struct rt2x00_dev *rt2x00dev = hw->priv;
return 0;
return rt2x00lib_start(rt2x00dev);
-@@ -179,7 +179,7 @@ void rt2x00mac_stop(struct ieee80211_hw
+@@ -179,7 +179,7 @@
{
struct rt2x00_dev *rt2x00dev = hw->priv;
return;
rt2x00lib_stop(rt2x00dev);
-@@ -199,8 +199,8 @@ int rt2x00mac_add_interface(struct ieee8
+@@ -199,8 +199,8 @@
* Don't allow interfaces to be added
* the device has disappeared.
*/
return -ENODEV;
switch (conf->type) {
-@@ -249,7 +249,7 @@ int rt2x00mac_add_interface(struct ieee8
+@@ -249,7 +249,7 @@
*/
for (i = 0; i < queue->limit; i++) {
entry = &queue->entries[i];
break;
}
-@@ -303,7 +303,7 @@ void rt2x00mac_remove_interface(struct i
+@@ -303,7 +303,7 @@
* either the device has disappeared or when
* no interface is present.
*/
(conf->type == IEEE80211_IF_TYPE_AP && !rt2x00dev->intf_ap_count) ||
(conf->type != IEEE80211_IF_TYPE_AP && !rt2x00dev->intf_sta_count))
return;
-@@ -317,7 +317,7 @@ void rt2x00mac_remove_interface(struct i
+@@ -317,7 +317,7 @@
* Release beacon entry so it is available for
* new interfaces again.
*/
/*
* Make sure the bssid and mac address registers
-@@ -337,14 +337,14 @@ int rt2x00mac_config(struct ieee80211_hw
+@@ -337,14 +337,14 @@
* Mac80211 might be calling this function while we are trying
* to remove the device or perhaps suspending it.
*/
if (!conf->radio_enabled)
rt2x00lib_disable_radio(rt2x00dev);
else
-@@ -359,14 +359,14 @@ int rt2x00mac_config(struct ieee80211_hw
+@@ -359,14 +359,14 @@
* initialized.
*/
force_reconfig =
rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
else if (conf->radio_enabled)
return rt2x00lib_enable_radio(rt2x00dev);
-@@ -388,7 +388,7 @@ int rt2x00mac_config_interface(struct ie
+@@ -388,7 +388,7 @@
* Mac80211 might be calling this function while we are trying
* to remove the device or perhaps suspending it.
*/
return 0;
spin_lock(&intf->lock);
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00queue.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00queue.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00queue.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00queue.c 2009-03-25 16:11:09.000000000 +0000
-@@ -309,7 +309,7 @@ int rt2x00queue_write_tx_frame(struct da
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00queue.c
+--- a/drivers/net/wireless/rt2x00/rt2x00queue.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00queue.c Wed May 06 16:56:29 2009 +0100
+@@ -309,7 +309,7 @@
if (unlikely(rt2x00queue_full(queue)))
return -EINVAL;
ERROR(queue->rt2x00dev,
"Arrived at non-free entry in the non-full queue %d.\n"
"Please file bug report to %s.\n",
-@@ -333,14 +333,14 @@ int rt2x00queue_write_tx_frame(struct da
+@@ -333,14 +333,14 @@
skbdesc->entry = entry;
if (unlikely(queue->rt2x00dev->ops->lib->write_tx_data(entry))) {
rt2x00queue_index_inc(queue, Q_INDEX);
rt2x00queue_write_tx_descriptor(entry, &txdesc);
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00rfkill.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00rfkill.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00rfkill.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00rfkill.c 2009-03-25 16:11:09.000000000 +0000
-@@ -41,16 +41,16 @@ static int rt2x00rfkill_toggle_radio(voi
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00rfkill.c
+--- a/drivers/net/wireless/rt2x00/rt2x00rfkill.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00rfkill.c Wed May 06 16:56:29 2009 +0100
+@@ -41,16 +41,16 @@
/*
* Only continue if there are enabled interfaces.
*/
rt2x00lib_disable_radio(rt2x00dev);
} else {
WARNING(rt2x00dev, "Received unexpected rfkill state %d.\n",
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00usb.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00usb.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00usb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00usb.c 2009-03-25 16:11:09.000000000 +0000
-@@ -163,7 +163,7 @@ static void rt2x00usb_interrupt_txdone(s
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00usb.c
+--- a/drivers/net/wireless/rt2x00/rt2x00usb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00usb.c Wed May 06 16:56:29 2009 +0100
+@@ -163,7 +163,7 @@
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
struct txdone_entry_desc txdesc;
!test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
return;
-@@ -232,7 +232,7 @@ static inline void rt2x00usb_kick_tx_ent
+@@ -232,7 +232,7 @@
{
struct queue_entry_priv_usb *entry_priv = entry->priv_data;
usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
}
-@@ -283,7 +283,7 @@ static void rt2x00usb_interrupt_rxdone(s
+@@ -283,7 +283,7 @@
struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb);
u8 rxd[32];
!test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
return;
-@@ -293,7 +293,7 @@ static void rt2x00usb_interrupt_rxdone(s
+@@ -293,7 +293,7 @@
* a problem.
*/
if (urb->actual_length < entry->queue->desc_size || urb->status) {
usb_submit_urb(urb, GFP_ATOMIC);
return;
}
-@@ -361,7 +361,7 @@ void rt2x00usb_init_rxentry(struct rt2x0
+@@ -361,7 +361,7 @@
entry->skb->data, entry->skb->len,
rt2x00usb_interrupt_rxdone, entry);
usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
}
EXPORT_SYMBOL_GPL(rt2x00usb_init_rxentry);
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt61pci.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt61pci.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt61pci.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt61pci.c 2009-03-25 16:11:09.000000000 +0000
-@@ -1860,7 +1860,7 @@ static irqreturn_t rt61pci_interrupt(int
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt61pci.c
+--- a/drivers/net/wireless/rt2x00/rt61pci.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt61pci.c Wed May 06 16:56:29 2009 +0100
+@@ -1860,7 +1860,7 @@
if (!reg && !reg_mcu)
return IRQ_NONE;
return IRQ_HANDLED;
/*
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt73usb.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt73usb.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt73usb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt73usb.c 2009-03-25 16:11:09.000000000 +0000
-@@ -2113,6 +2113,7 @@ static struct usb_device_id rt73usb_devi
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt73usb.c
+--- a/drivers/net/wireless/rt2x00/rt73usb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt73usb.c Wed May 06 16:56:29 2009 +0100
+@@ -2113,6 +2113,7 @@
/* Linksys */
{ USB_DEVICE(0x13b1, 0x0020), USB_DEVICE_DATA(&rt73usb_ops) },
{ USB_DEVICE(0x13b1, 0x0023), USB_DEVICE_DATA(&rt73usb_ops) },
/* MSI */
{ USB_DEVICE(0x0db0, 0x6877), USB_DEVICE_DATA(&rt73usb_ops) },
{ USB_DEVICE(0x0db0, 0x6874), USB_DEVICE_DATA(&rt73usb_ops) },
-diff -purN linux-2.6.27/drivers/net/wireless/rtl8187_dev.c linux-2.6.27.19-5.1/drivers/net/wireless/rtl8187_dev.c
---- linux-2.6.27/drivers/net/wireless/rtl8187_dev.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rtl8187_dev.c 2009-03-25 16:11:09.000000000 +0000
-@@ -33,10 +33,13 @@ MODULE_LICENSE("GPL");
+diff -r 9608d5473017 drivers/net/wireless/rtl8187_dev.c
+--- a/drivers/net/wireless/rtl8187_dev.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rtl8187_dev.c Wed May 06 16:56:29 2009 +0100
+@@ -33,10 +33,13 @@
static struct usb_device_id rtl8187_table[] __devinitdata = {
/* Asus */
{USB_DEVICE(0x0b05, 0x171d), .driver_info = DEVICE_RTL8187},
/* Netgear */
{USB_DEVICE(0x0846, 0x6100), .driver_info = DEVICE_RTL8187},
{USB_DEVICE(0x0846, 0x6a00), .driver_info = DEVICE_RTL8187},
-@@ -45,6 +48,9 @@ static struct usb_device_id rtl8187_tabl
+@@ -45,6 +48,9 @@
{USB_DEVICE(0x03f0, 0xca02), .driver_info = DEVICE_RTL8187},
/* Sitecom */
{USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187},
{}
};
-@@ -257,6 +263,7 @@ static int rtl8187_tx(struct ieee80211_h
+@@ -257,6 +263,7 @@
usb_fill_bulk_urb(urb, priv->udev, usb_sndbulkpipe(priv->udev, ep),
buf, skb->len, rtl8187_tx_cb, skb);
rc = usb_submit_urb(urb, GFP_ATOMIC);
if (rc < 0) {
usb_free_urb(urb);
-diff -purN linux-2.6.27/drivers/net/wireless/rtl8187_rtl8225.c linux-2.6.27.19-5.1/drivers/net/wireless/rtl8187_rtl8225.c
---- linux-2.6.27/drivers/net/wireless/rtl8187_rtl8225.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rtl8187_rtl8225.c 2009-03-25 16:11:09.000000000 +0000
-@@ -287,7 +287,10 @@ static void rtl8225_rf_set_tx_power(stru
+diff -r 9608d5473017 drivers/net/wireless/rtl8187_rtl8225.c
+--- a/drivers/net/wireless/rtl8187_rtl8225.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rtl8187_rtl8225.c Wed May 06 16:56:29 2009 +0100
+@@ -287,7 +287,10 @@
ofdm_power = priv->channels[channel - 1].hw_value >> 4;
cck_power = min(cck_power, (u8)11);
rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK,
rtl8225_tx_gain_cck_ofdm[cck_power / 6] >> 1);
-@@ -540,7 +543,10 @@ static void rtl8225z2_rf_set_tx_power(st
+@@ -540,7 +543,10 @@
cck_power += priv->txpwr_base & 0xF;
cck_power = min(cck_power, (u8)35);
ofdm_power += priv->txpwr_base >> 4;
ofdm_power = min(ofdm_power, (u8)35);
-diff -purN linux-2.6.27/drivers/net/wireless/zd1211rw/zd_rf.c linux-2.6.27.19-5.1/drivers/net/wireless/zd1211rw/zd_rf.c
---- linux-2.6.27/drivers/net/wireless/zd1211rw/zd_rf.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/zd1211rw/zd_rf.c 2009-03-25 16:11:08.000000000 +0000
-@@ -86,6 +86,7 @@ int zd_rf_init_hw(struct zd_rf *rf, u8 t
+diff -r 9608d5473017 drivers/net/wireless/zd1211rw/zd_rf.c
+--- a/drivers/net/wireless/zd1211rw/zd_rf.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/zd1211rw/zd_rf.c Wed May 06 16:56:29 2009 +0100
+@@ -86,6 +86,7 @@
case AL7230B_RF:
r = zd_rf_init_al7230b(rf);
break;
case UW2453_RF:
r = zd_rf_init_uw2453(rf);
break;
-diff -purN linux-2.6.27/drivers/net/wireless/zd1211rw/zd_usb.c linux-2.6.27.19-5.1/drivers/net/wireless/zd1211rw/zd_usb.c
---- linux-2.6.27/drivers/net/wireless/zd1211rw/zd_usb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/zd1211rw/zd_usb.c 2009-03-25 16:11:08.000000000 +0000
+diff -r 9608d5473017 drivers/net/wireless/zd1211rw/zd_usb.c
+--- a/drivers/net/wireless/zd1211rw/zd_usb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/zd1211rw/zd_usb.c Wed May 06 16:56:29 2009 +0100
@@ -37,6 +37,7 @@
static struct usb_device_id usb_ids[] = {
/* ZD1211 */
{ USB_DEVICE(0x07b8, 0x6001), .driver_info = DEVICE_ZD1211 },
{ USB_DEVICE(0x126f, 0xa006), .driver_info = DEVICE_ZD1211 },
{ USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 },
-@@ -61,6 +62,7 @@ static struct usb_device_id usb_ids[] =
+@@ -61,6 +62,7 @@
{ USB_DEVICE(0x0105, 0x145f), .driver_info = DEVICE_ZD1211 },
/* ZD1211B */
{ USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x079b, 0x0062), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x1582, 0x6003), .driver_info = DEVICE_ZD1211B },
-@@ -82,6 +84,7 @@ static struct usb_device_id usb_ids[] =
+@@ -82,6 +84,7 @@
{ USB_DEVICE(0x0cde, 0x001a), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x0586, 0x340a), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x0471, 0x1237), .driver_info = DEVICE_ZD1211B },
/* "Driverless" devices that need ejecting */
{ USB_DEVICE(0x0ace, 0x2011), .driver_info = DEVICE_INSTALLER },
{ USB_DEVICE(0x0ace, 0x20ff), .driver_info = DEVICE_INSTALLER },
-diff -purN linux-2.6.27/drivers/net/xen-netfront.c linux-2.6.27.19-5.1/drivers/net/xen-netfront.c
---- linux-2.6.27/drivers/net/xen-netfront.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/xen-netfront.c 2009-03-25 16:11:04.000000000 +0000
+diff -r 9608d5473017 drivers/net/xen-netfront.c
+--- a/drivers/net/xen-netfront.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/xen-netfront.c Wed May 06 16:56:29 2009 +0100
@@ -36,8 +36,6 @@
#include <linux/skbuff.h>
#include <linux/ethtool.h>
#include <linux/moduleparam.h>
#include <linux/mm.h>
#include <net/ip.h>
-@@ -765,45 +763,6 @@ static RING_IDX xennet_fill_frags(struct
- return cons;
- }
+@@ -763,45 +761,6 @@
+ shinfo->nr_frags = nr_frags;
+ return cons;
+-}
+-
-static int skb_checksum_setup(struct sk_buff *skb)
-{
- struct iphdr *iph;
-
-out:
- return err;
--}
--
+ }
+
static int handle_incoming_queue(struct net_device *dev,
- struct sk_buff_head *rxq)
- {
-@@ -1784,7 +1743,6 @@ static int __devexit xennet_remove(struc
+@@ -1784,7 +1743,6 @@
static struct xenbus_driver netfront = {
.name = "vif",
.ids = netfront_ids,
.probe = netfront_probe,
.remove = __devexit_p(xennet_remove),
-diff -purN linux-2.6.27/drivers/oprofile/buffer_sync.c linux-2.6.27.19-5.1/drivers/oprofile/buffer_sync.c
---- linux-2.6.27/drivers/oprofile/buffer_sync.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/oprofile/buffer_sync.c 2009-03-25 16:11:13.000000000 +0000
-@@ -6,6 +6,10 @@
+diff -r 9608d5473017 drivers/oprofile/buffer_sync.c
+--- a/drivers/oprofile/buffer_sync.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/oprofile/buffer_sync.c Wed May 06 16:56:29 2009 +0100
+@@ -5,6 +5,10 @@
+ * @remark Read the file COPYING
*
* @author John Levon <levon@movementarian.org>
- *
++ *
+ * Modified by Aravind Menon for Xen
+ * These modifications are:
+ * Copyright (C) 2005 Hewlett-Packard Co.
-+ *
+ *
* This is the core of the buffer management. Each
* CPU buffer is processed and entered into the
- * global event buffer. Such processing is necessary
-@@ -40,6 +44,9 @@ static cpumask_t marked_cpus = CPU_MASK_
+@@ -40,6 +44,9 @@
static DEFINE_SPINLOCK(task_mortuary);
static void process_task_mortuary(void);
/* Take ownership of the task struct and place it on the
* list for processing. Only after two full buffer syncs
-@@ -148,6 +155,13 @@ static void end_sync(void)
+@@ -148,6 +155,13 @@
int sync_start(void)
{
int err;
start_cpu_work();
-@@ -274,15 +288,33 @@ static void add_cpu_switch(int i)
+@@ -274,15 +288,33 @@
last_cookie = INVALID_COOKIE;
}
static void
add_user_ctx_switch(struct task_struct const * task, unsigned long cookie)
{
-@@ -347,9 +379,9 @@ static int add_us_sample(struct mm_struc
+@@ -347,9 +379,9 @@
* for later lookup from userspace.
*/
static int
add_sample_entry(s->eip, s->event);
return 1;
} else if (mm) {
-@@ -495,15 +527,24 @@ void sync_buffer(int cpu)
+@@ -495,14 +527,23 @@
struct mm_struct *mm = NULL;
struct task_struct * new;
unsigned long cookie = 0;
mutex_lock(&buffer_mutex);
add_cpu_switch(cpu);
-
++
+#ifdef CONFIG_XEN
+ /* We need to assign the first samples in this CPU buffer to the
+ same domain that we were processing at the last sync_buffer */
+ add_domain_switch(cpu_current_domain[cpu]);
+ }
+#endif
-+
+
/* Remember, only we can modify tail_pos */
- available = get_slots(cpu_buf);
-@@ -511,16 +552,20 @@ void sync_buffer(int cpu)
+@@ -511,16 +552,20 @@
for (i = 0; i < available; ++i) {
struct op_sample * s = &cpu_buf->buffer[cpu_buf->tail_pos];
} else {
struct mm_struct * oldmm = mm;
-@@ -534,8 +579,18 @@ void sync_buffer(int cpu)
+@@ -534,8 +579,18 @@
add_user_ctx_switch(new, cookie);
}
} else {
if (state == sb_bt_start) {
state = sb_bt_ignore;
atomic_inc(&oprofile_stats.bt_lost_no_mapping);
-@@ -547,7 +602,38 @@ void sync_buffer(int cpu)
+@@ -547,7 +602,38 @@
}
release_mm(mm);
+ mutex_unlock(&buffer_mutex);
+}
+
-diff -purN linux-2.6.27/drivers/oprofile/cpu_buffer.c linux-2.6.27.19-5.1/drivers/oprofile/cpu_buffer.c
---- linux-2.6.27/drivers/oprofile/cpu_buffer.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/oprofile/cpu_buffer.c 2009-03-25 16:11:13.000000000 +0000
-@@ -6,6 +6,10 @@
+diff -r 9608d5473017 drivers/oprofile/cpu_buffer.c
+--- a/drivers/oprofile/cpu_buffer.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/oprofile/cpu_buffer.c Wed May 06 16:56:29 2009 +0100
+@@ -5,6 +5,10 @@
+ * @remark Read the file COPYING
*
* @author John Levon <levon@movementarian.org>
- *
++ *
+ * Modified by Aravind Menon for Xen
+ * These modifications are:
+ * Copyright (C) 2005 Hewlett-Packard Co.
-+ *
+ *
* Each CPU has a local buffer that stores PC value/event
* pairs. We also log context switches when we notice them.
- * Eventually each CPU's buffer is processed into the global
-@@ -34,16 +38,35 @@ static void wq_sync_buffer(struct work_s
+@@ -34,14 +38,33 @@
#define DEFAULT_TIMER_EXPIRE (HZ / 10)
static int work_enabled;
vfree(per_cpu(cpu_buffer, i).buffer);
per_cpu(cpu_buffer, i).buffer = NULL;
}
- }
-
++}
++
+unsigned long oprofile_get_cpu_buffer_size(void)
+{
+ return fs_cpu_buffer_size;
+ = &__get_cpu_var(cpu_buffer);
+
+ cpu_buf->sample_lost_overflow++;
-+}
-+
+ }
+
int alloc_cpu_buffers(void)
- {
- int i;
-@@ -59,7 +82,7 @@ int alloc_cpu_buffers(void)
+@@ -59,7 +82,7 @@
goto fail;
b->last_task = NULL;
b->tracing = 0;
b->buffer_size = buffer_size;
b->tail_pos = 0;
-@@ -117,7 +140,7 @@ void cpu_buffer_reset(struct oprofile_cp
+@@ -117,7 +140,7 @@
* collected will populate the buffer with proper
* values to initialize the buffer
*/
cpu_buf->last_task = NULL;
}
-@@ -167,13 +190,13 @@ add_code(struct oprofile_cpu_buffer * bu
+@@ -167,13 +190,13 @@
* because of the head/tail separation of the writer and reader
* of the CPU buffer.
*
{
struct task_struct * task;
-@@ -189,18 +212,18 @@ static int log_sample(struct oprofile_cp
+@@ -189,18 +212,18 @@
return 0;
}
cpu_buf->last_task = task;
add_code(cpu_buf, (unsigned long)task);
}
-@@ -284,6 +307,27 @@ void oprofile_add_trace(unsigned long pc
+@@ -284,6 +307,27 @@
add_sample(cpu_buf, pc, 0);
}
/*
* This serves to avoid cpu buffer overflow, and makes sure
* the task mortuary progresses
-diff -purN linux-2.6.27/drivers/oprofile/cpu_buffer.h linux-2.6.27.19-5.1/drivers/oprofile/cpu_buffer.h
---- linux-2.6.27/drivers/oprofile/cpu_buffer.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/oprofile/cpu_buffer.h 2009-03-25 16:11:13.000000000 +0000
-@@ -37,7 +37,7 @@ struct oprofile_cpu_buffer {
+diff -r 9608d5473017 drivers/oprofile/cpu_buffer.h
+--- a/drivers/oprofile/cpu_buffer.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/oprofile/cpu_buffer.h Wed May 06 16:56:29 2009 +0100
+@@ -37,7 +37,7 @@
volatile unsigned long tail_pos;
unsigned long buffer_size;
struct task_struct * last_task;
int tracing;
struct op_sample * buffer;
unsigned long sample_received;
-@@ -53,7 +53,10 @@ DECLARE_PER_CPU(struct oprofile_cpu_buff
+@@ -53,7 +53,10 @@
void cpu_buffer_reset(struct oprofile_cpu_buffer * cpu_buf);
/* transient events for the CPU buffer -> event buffer */
+#define CPU_DOMAIN_SWITCH 4
#endif /* OPROFILE_CPU_BUFFER_H */
-diff -purN linux-2.6.27/drivers/oprofile/event_buffer.h linux-2.6.27.19-5.1/drivers/oprofile/event_buffer.h
---- linux-2.6.27/drivers/oprofile/event_buffer.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/oprofile/event_buffer.h 2009-03-25 16:11:13.000000000 +0000
-@@ -17,12 +17,22 @@ int alloc_event_buffer(void);
+diff -r 9608d5473017 drivers/oprofile/event_buffer.h
+--- a/drivers/oprofile/event_buffer.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/oprofile/event_buffer.h Wed May 06 16:56:29 2009 +0100
+@@ -17,11 +17,21 @@
void free_event_buffer(void);
#define INVALID_COOKIE ~0UL
#define NO_COOKIE 0UL
-
++
+/* Constant used to refer to coordinator domain (Xen) */
+#define COORDINATOR_DOMAIN -1
-+
+
extern const struct file_operations event_buffer_fops;
- /* mutex between sync_cpu_buffers() and the
-diff -purN linux-2.6.27/drivers/oprofile/oprof.c linux-2.6.27.19-5.1/drivers/oprofile/oprof.c
---- linux-2.6.27/drivers/oprofile/oprof.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/oprofile/oprof.c 2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/oprofile/oprof.c
+--- a/drivers/oprofile/oprof.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/oprofile/oprof.c Wed May 06 16:56:29 2009 +0100
@@ -5,6 +5,10 @@
* @remark Read the file COPYING
*
*/
#include <linux/kernel.h>
-@@ -33,6 +37,34 @@ static DEFINE_MUTEX(start_mutex);
+@@ -32,6 +36,34 @@
+ 1 - use the timer int mechanism regardless
*/
static int timer = 0;
-
++
+#ifdef CONFIG_XEN
+int oprofile_set_active(int active_domains[], unsigned int adomains)
+{
+ return err;
+}
+#endif
-+
+
int oprofile_setup(void)
{
- int err;
-diff -purN linux-2.6.27/drivers/oprofile/oprof.h linux-2.6.27.19-5.1/drivers/oprofile/oprof.h
---- linux-2.6.27/drivers/oprofile/oprof.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/oprofile/oprof.h 2009-03-25 16:11:13.000000000 +0000
-@@ -35,5 +35,8 @@ void oprofile_create_files(struct super_
+diff -r 9608d5473017 drivers/oprofile/oprof.h
+--- a/drivers/oprofile/oprof.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/oprofile/oprof.h Wed May 06 16:56:29 2009 +0100
+@@ -35,5 +35,8 @@
void oprofile_timer_init(struct oprofile_operations * ops);
int oprofile_set_backtrace(unsigned long depth);
+int oprofile_set_passive(int passive_domains[], unsigned int pdomains);
#endif /* OPROF_H */
-diff -purN linux-2.6.27/drivers/oprofile/oprofile_files.c linux-2.6.27.19-5.1/drivers/oprofile/oprofile_files.c
---- linux-2.6.27/drivers/oprofile/oprofile_files.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/oprofile/oprofile_files.c 2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/oprofile/oprofile_files.c
+--- a/drivers/oprofile/oprofile_files.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/oprofile/oprofile_files.c Wed May 06 16:56:29 2009 +0100
@@ -5,15 +5,21 @@
* @remark Read the file COPYING
*
unsigned long fs_buffer_size = 131072;
unsigned long fs_cpu_buffer_size = 8192;
unsigned long fs_buffer_watershed = 32768; /* FIXME: tune */
-@@ -117,11 +123,208 @@ static ssize_t dump_write(struct file *
+@@ -117,11 +123,208 @@
static const struct file_operations dump_fops = {
.write = dump_write,
};
oprofilefs_create_file(sb, root, "buffer", &event_buffer_fops);
oprofilefs_create_ulong(sb, root, "buffer_size", &fs_buffer_size);
oprofilefs_create_ulong(sb, root, "buffer_watershed", &fs_buffer_watershed);
-diff -purN linux-2.6.27/drivers/parport/parport_serial.c linux-2.6.27.19-5.1/drivers/parport/parport_serial.c
---- linux-2.6.27/drivers/parport/parport_serial.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/parport/parport_serial.c 2009-03-25 16:11:18.000000000 +0000
-@@ -64,12 +64,19 @@ struct parport_pc_pci {
+diff -r 9608d5473017 drivers/parport/parport_serial.c
+--- a/drivers/parport/parport_serial.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/parport/parport_serial.c Wed May 06 16:56:29 2009 +0100
+@@ -64,12 +64,19 @@
static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc_pci *card, int autoirq, int autodma)
{
return 0;
}
-diff -purN linux-2.6.27/drivers/parport/parport_sunbpp.c linux-2.6.27.19-5.1/drivers/parport/parport_sunbpp.c
---- linux-2.6.27/drivers/parport/parport_sunbpp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/parport/parport_sunbpp.c 2009-03-25 16:11:18.000000000 +0000
-@@ -389,6 +389,7 @@ static struct of_device_id bpp_match[] =
+diff -r 9608d5473017 drivers/parport/parport_sunbpp.c
+--- a/drivers/parport/parport_sunbpp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/parport/parport_sunbpp.c Wed May 06 16:56:29 2009 +0100
+@@ -389,6 +389,7 @@
MODULE_DEVICE_TABLE(of, bpp_match);
static struct of_platform_driver bpp_sbus_driver = {
.name = "bpp",
.match_table = bpp_match,
.probe = bpp_probe,
-diff -purN linux-2.6.27/drivers/pci/Kconfig linux-2.6.27.19-5.1/drivers/pci/Kconfig
---- linux-2.6.27/drivers/pci/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/Kconfig 2009-03-25 16:11:12.000000000 +0000
-@@ -21,6 +21,9 @@ config PCI_MSI
+diff -r 9608d5473017 drivers/pci/Kconfig
+--- a/drivers/pci/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/Kconfig Wed May 06 16:56:29 2009 +0100
+@@ -20,6 +20,9 @@
+ entire system.
If you don't know what to do here, say N.
-
++
+config PCI_REASSIGN
+ bool
-+
+
config PCI_LEGACY
bool "Enable deprecated pci_find_* API"
- depends on PCI
-@@ -45,7 +48,7 @@ config PCI_DEBUG
+@@ -45,7 +48,7 @@
config HT_IRQ
bool "Interrupts on hypertransport devices"
default y
help
This allows native hypertransport devices to use interrupts.
-diff -purN linux-2.6.27/drivers/pci/Makefile linux-2.6.27.19-5.1/drivers/pci/Makefile
---- linux-2.6.27/drivers/pci/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/Makefile 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/Makefile
+--- a/drivers/pci/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/Makefile Wed May 06 16:56:29 2009 +0100
@@ -4,6 +4,7 @@
obj-y += access.o bus.o probe.o remove.o pci.o quirks.o slot.o \
obj-$(CONFIG_PROC_FS) += proc.o
# Build PCI Express stuff if needed
-@@ -26,6 +27,8 @@ obj-$(CONFIG_HT_IRQ) += htirq.o
+@@ -25,6 +26,8 @@
+
# Build Intel IOMMU support
obj-$(CONFIG_DMAR) += dmar.o iova.o intel-iommu.o
-
-+obj-$(CONFIG_INTR_REMAP) += dmar.o intr_remapping.o
+
++obj-$(CONFIG_INTR_REMAP) += dmar.o intr_remapping.o
+
#
# Some architectures use the generic PCI setup functions
- #
-diff -purN linux-2.6.27/drivers/pci/dma_remapping.h linux-2.6.27.19-5.1/drivers/pci/dma_remapping.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/dma_remapping.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/dma_remapping.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/pci/dma_remapping.h Wed May 06 16:56:29 2009 +0100
@@ -0,0 +1,157 @@
+#ifndef _DMA_REMAPPING_H
+#define _DMA_REMAPPING_H
+#endif /* !CONFIG_DMAR_GFX_WA */
+
+#endif
-diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.c
---- linux-2.6.27/drivers/pci/dmar.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/dmar.c 2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/pci/dmar.c
+--- a/drivers/pci/dmar.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/dmar.c Wed May 06 16:56:29 2009 +0100
@@ -19,13 +19,16 @@
* Author: Shaohua Li <shaohua.li@intel.com>
* Author: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
static struct acpi_table_header * __initdata dmar_tbl;
-@@ -53,11 +55,6 @@ static void __init dmar_register_drhd_un
+@@ -51,11 +53,6 @@
+ list_add_tail(&drhd->list, &dmar_drhd_units);
+ else
list_add(&drhd->list, &dmar_drhd_units);
- }
-
+-}
+-
-static void __init dmar_register_rmrr_unit(struct dmar_rmrr_unit *rmrr)
-{
- list_add(&rmrr->list, &dmar_rmrr_units);
--}
--
+ }
+
static int __init dmar_parse_one_dev_scope(struct acpi_dmar_device_scope *scope,
- struct pci_dev **dev, u16 segment)
- {
-@@ -172,19 +169,37 @@ dmar_parse_one_drhd(struct acpi_dmar_hea
+@@ -172,19 +169,37 @@
struct acpi_dmar_hardware_unit *drhd;
struct dmar_drhd_unit *dmaru;
int ret = 0;
&dmaru->devices_cnt, &dmaru->devices,
drhd->segment);
else {
-@@ -197,37 +212,59 @@ dmar_parse_one_drhd(struct acpi_dmar_hea
+@@ -197,37 +212,59 @@
include_all = 1;
}
+ }
return ret;
}
-
++
+#ifdef CONFIG_DMAR
+LIST_HEAD(dmar_rmrr_units);
+
+ list_add(&rmrr->list, &dmar_rmrr_units);
+}
+
-+
+
static int __init
dmar_parse_one_rmrr(struct acpi_dmar_header *header)
{
static void __init
dmar_table_print_dmar_entry(struct acpi_dmar_header *header)
-@@ -253,6 +290,25 @@ dmar_table_print_dmar_entry(struct acpi_
+@@ -253,6 +290,25 @@
}
/**
* parse_dmar_table - parses the DMA reporting table
*/
static int __init
-@@ -262,6 +318,12 @@ parse_dmar_table(void)
+@@ -261,6 +317,12 @@
+ struct acpi_table_dmar *dmar;
struct acpi_dmar_header *entry_header;
int ret = 0;
-
++
+ /*
+ * Do it again, earlier dmar_tbl mapping could be mapped with
+ * fixed map.
+ */
+ dmar_table_detect();
-+
+
dmar = (struct acpi_table_dmar *)dmar_tbl;
if (!dmar)
- return -ENODEV;
-@@ -284,7 +346,9 @@ parse_dmar_table(void)
+@@ -284,7 +346,9 @@
ret = dmar_parse_one_drhd(entry_header);
break;
case ACPI_DMAR_TYPE_RESERVED_MEMORY:
break;
default:
printk(KERN_WARNING PREFIX
-@@ -300,15 +364,77 @@ parse_dmar_table(void)
+@@ -300,15 +364,77 @@
return ret;
}
+ struct pci_dev *dev)
+{
+ int index;
-
--int __init dmar_table_init(void)
++
+ while (dev) {
+ for (index = 0; index < cnt; index++)
+ if (dev == devices[index])
+}
+
+int __init dmar_dev_scope_init(void)
- {
++{
+ struct dmar_drhd_unit *drhd, *drhd_n;
+ int ret = -ENODEV;
-
++
+ list_for_each_entry_safe(drhd, drhd_n, &dmar_drhd_units, list) {
+ ret = dmar_parse_dev(drhd);
+ if (ret)
+ return ret;
+}
+
-+
-+int __init dmar_table_init(void)
-+{
+
+ int __init dmar_table_init(void)
+ {
+ static int dmar_table_initialized;
- int ret;
++ int ret;
+- int ret;
+ if (dmar_table_initialized)
+ return 0;
+
+ dmar_table_initialized = 1;
-+
+
ret = parse_dmar_table();
if (ret) {
- printk(KERN_INFO PREFIX "parse DMAR table failure.\n");
return ret;
}
-@@ -317,27 +443,269 @@ int __init dmar_table_init(void)
+@@ -317,27 +443,269 @@
return -ENODEV;
}
+ return -ENODEV;
+ }
+#endif
-
++
+#ifdef CONFIG_INTR_REMAP
+ parse_ioapics_under_ir();
+#endif
- return 0;
- }
-
--/**
-- * early_dmar_detect - checks to see if the platform supports DMAR devices
++ return 0;
++}
++
+void __init detect_intel_iommu(void)
+{
+ int ret;
+
+/*
+ * Reclaim all the submitted descriptors which have completed its work.
- */
--int __init early_dmar_detect(void)
++ */
+static inline void reclaim_free_desc(struct q_inval *qi)
- {
-- acpi_status status = AE_OK;
++{
+ while (qi->desc_status[qi->free_tail] == QI_DONE) {
+ qi->desc_status[qi->free_tail] = QI_FREE;
+ qi->free_tail = (qi->free_tail + 1) % QI_LENGTH;
+ qi->free_cnt++;
+ }
+}
-
-- /* if we could find DMAR table, then there are DMAR devices */
-- status = acpi_get_table(ACPI_SIG_DMAR, 0,
-- (struct acpi_table_header **)&dmar_tbl);
++
+/*
+ * Submit the queued invalidation descriptor to the remapping
+ * hardware unit and wait for its completion.
+ struct qi_desc *hw, wait_desc;
+ int wait_index, index;
+ unsigned long flags;
-
-- if (ACPI_SUCCESS(status) && !dmar_tbl) {
-- printk (KERN_WARNING PREFIX "Unable to map DMAR\n");
-- status = AE_NOT_FOUND;
++
+ if (!qi)
+ return;
+
+ spin_unlock(&qi->q_lock);
+ cpu_relax();
+ spin_lock(&qi->q_lock);
- }
-
-- return (ACPI_SUCCESS(status) ? 1 : 0);
++ }
++
+ index = qi->free_head;
+ wait_index = (index + 1) % QI_LENGTH;
+
+ /* Make sure hardware complete it */
+ IOMMU_WAIT_OP(iommu, DMAR_GSTS_REG, readl, (sts & DMA_GSTS_QIES), sts);
+ spin_unlock_irqrestore(&iommu->register_lock, flags);
-+
-+ return 0;
+
+ return 0;
}
-diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp.h linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp.h
---- linux-2.6.27/drivers/pci/hotplug/acpiphp.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp.h 2009-03-25 16:11:12.000000000 +0000
+-
+-/**
+- * early_dmar_detect - checks to see if the platform supports DMAR devices
+- */
+-int __init early_dmar_detect(void)
+-{
+- acpi_status status = AE_OK;
+-
+- /* if we could find DMAR table, then there are DMAR devices */
+- status = acpi_get_table(ACPI_SIG_DMAR, 0,
+- (struct acpi_table_header **)&dmar_tbl);
+-
+- if (ACPI_SUCCESS(status) && !dmar_tbl) {
+- printk (KERN_WARNING PREFIX "Unable to map DMAR\n");
+- status = AE_NOT_FOUND;
+- }
+-
+- return (ACPI_SUCCESS(status) ? 1 : 0);
+-}
+diff -r 9608d5473017 drivers/pci/hotplug/acpiphp.h
+--- a/drivers/pci/hotplug/acpiphp.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/acpiphp.h Wed May 06 16:56:30 2009 +0100
@@ -50,9 +50,6 @@
#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME , ## arg)
#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)
struct acpiphp_bridge;
struct acpiphp_slot;
-@@ -63,9 +60,13 @@ struct slot {
+@@ -63,8 +60,12 @@
struct hotplug_slot *hotplug_slot;
struct acpiphp_slot *acpi_slot;
struct hotplug_slot_info info;
- char name[SLOT_NAME_SIZE];
};
-
++
+static inline const char *slot_name(struct slot *slot)
+{
+ return hotplug_slot_name(slot->hotplug_slot);
+}
-+
+
/*
* struct acpiphp_bridge - PCI bridge information
- *
-diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp_core.c
---- linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp_core.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/hotplug/acpiphp_core.c
+--- a/drivers/pci/hotplug/acpiphp_core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/acpiphp_core.c Wed May 06 16:56:30 2009 +0100
@@ -44,6 +44,9 @@
#define MY_NAME "acpiphp"
static int debug;
int acpiphp_debug;
-@@ -84,7 +87,6 @@ static struct hotplug_slot_ops acpi_hotp
+@@ -84,7 +87,6 @@
.get_adapter_status = get_adapter_status,
};
/**
* acpiphp_register_attention - set attention LED callback
* @info: must be completely filled with LED callbacks
-@@ -136,7 +138,7 @@ static int enable_slot(struct hotplug_sl
+@@ -136,7 +138,7 @@
{
struct slot *slot = hotplug_slot->private;
/* enable the specified slot */
return acpiphp_enable_slot(slot->acpi_slot);
-@@ -154,7 +156,7 @@ static int disable_slot(struct hotplug_s
+@@ -154,7 +156,7 @@
struct slot *slot = hotplug_slot->private;
int retval;
/* disable the specified slot */
retval = acpiphp_disable_slot(slot->acpi_slot);
-@@ -177,7 +179,7 @@ static int disable_slot(struct hotplug_s
+@@ -177,7 +179,7 @@
{
int retval = -ENODEV;
if (attention_info && try_module_get(attention_info->owner)) {
retval = attention_info->set_attn(hotplug_slot, status);
-@@ -200,7 +202,7 @@ static int get_power_status(struct hotpl
+@@ -200,7 +202,7 @@
{
struct slot *slot = hotplug_slot->private;
*value = acpiphp_get_power_status(slot->acpi_slot);
-@@ -222,7 +224,7 @@ static int get_attention_status(struct h
+@@ -222,7 +224,7 @@
{
int retval = -EINVAL;
if (attention_info && try_module_get(attention_info->owner)) {
retval = attention_info->get_attn(hotplug_slot, value);
-@@ -245,7 +247,7 @@ static int get_latch_status(struct hotpl
+@@ -245,7 +247,7 @@
{
struct slot *slot = hotplug_slot->private;
*value = acpiphp_get_latch_status(slot->acpi_slot);
-@@ -265,7 +267,7 @@ static int get_adapter_status(struct hot
+@@ -265,7 +267,7 @@
{
struct slot *slot = hotplug_slot->private;
*value = acpiphp_get_adapter_status(slot->acpi_slot);
-@@ -299,7 +301,7 @@ static void release_slot(struct hotplug_
+@@ -299,7 +301,7 @@
{
struct slot *slot = hotplug_slot->private;
kfree(slot->hotplug_slot);
kfree(slot);
-@@ -310,6 +312,7 @@ int acpiphp_register_hotplug_slot(struct
+@@ -310,6 +312,7 @@
{
struct slot *slot;
int retval = -ENOMEM;
slot = kzalloc(sizeof(*slot), GFP_KERNEL);
if (!slot)
-@@ -321,8 +324,6 @@ int acpiphp_register_hotplug_slot(struct
+@@ -320,8 +323,6 @@
+ goto error_slot;
slot->hotplug_slot->info = &slot->info;
-
-- slot->hotplug_slot->name = slot->name;
-
+- slot->hotplug_slot->name = slot->name;
+
slot->hotplug_slot->private = slot;
slot->hotplug_slot->release = &release_slot;
- slot->hotplug_slot->ops = &acpi_hotplug_slot_ops;
-@@ -336,11 +337,12 @@ int acpiphp_register_hotplug_slot(struct
+@@ -336,11 +337,12 @@
slot->hotplug_slot->info->cur_bus_speed = PCI_SPEED_UNKNOWN;
acpiphp_slot->slot = slot;
if (retval == -EBUSY)
goto error_hpslot;
if (retval) {
-@@ -348,7 +350,7 @@ int acpiphp_register_hotplug_slot(struct
+@@ -348,7 +350,7 @@
goto error_hpslot;
}
return 0;
error_hpslot:
-@@ -365,7 +367,7 @@ void acpiphp_unregister_hotplug_slot(str
+@@ -365,7 +367,7 @@
struct slot *slot = acpiphp_slot->slot;
int retval = 0;
retval = pci_hp_deregister(slot->hotplug_slot);
if (retval)
-diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp_glue.c
---- linux-2.6.27/drivers/pci/hotplug/acpiphp_glue.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp_glue.c 2009-03-25 16:11:12.000000000 +0000
-@@ -169,7 +169,9 @@ static int post_dock_fixups(struct notif
+diff -r 9608d5473017 drivers/pci/hotplug/acpiphp_glue.c
+--- a/drivers/pci/hotplug/acpiphp_glue.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/acpiphp_glue.c Wed May 06 16:56:30 2009 +0100
+@@ -169,7 +169,9 @@
}
/* callback routine to register each ACPI PCI slot object */
static acpi_status
-@@ -180,7 +182,7 @@ register_slot(acpi_handle handle, u32 lv
+@@ -180,7 +182,7 @@
struct acpiphp_func *newfunc;
acpi_handle tmp;
acpi_status status = AE_OK;
int device, function, retval;
status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr);
-@@ -285,7 +287,7 @@ register_slot(acpi_handle handle, u32 lv
+@@ -285,7 +287,7 @@
*/
newfunc->flags &= ~FUNC_HAS_EJ0;
if (register_hotplug_dock_device(handle,
dbg("failed to register dock device\n");
/* we need to be notified when dock events happen
-@@ -528,7 +530,7 @@ find_p2p_bridge(acpi_handle handle, u32
+@@ -528,7 +530,7 @@
{
acpi_status status;
acpi_handle dummy_handle;
int device, function;
struct pci_dev *dev;
struct pci_bus *pci_bus = context;
-@@ -573,7 +575,7 @@ find_p2p_bridge(acpi_handle handle, u32
+@@ -573,7 +575,7 @@
static int add_bridge(acpi_handle handle)
{
acpi_status status;
int seg, bus;
acpi_handle dummy_handle;
struct pci_bus *pci_bus;
-@@ -767,7 +769,7 @@ static int get_gsi_base(acpi_handle hand
+@@ -767,7 +769,7 @@
{
acpi_status status;
int result = -1;
struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
union acpi_object *obj;
void *table;
-@@ -808,7 +810,7 @@ static acpi_status
+@@ -808,7 +810,7 @@
ioapic_add(acpi_handle handle, u32 lvl, void *context, void **rv)
{
acpi_status status;
acpi_handle tmp;
struct pci_dev *pdev;
u32 gsi_base;
-@@ -872,7 +874,7 @@ static acpi_status
+@@ -872,7 +874,7 @@
ioapic_remove(acpi_handle handle, u32 lvl, void *context, void **rv)
{
acpi_status status;
acpi_handle tmp;
u32 gsi_base;
struct acpiphp_ioapic *pos, *n, *ioapic = NULL;
-@@ -1264,7 +1266,7 @@ static int disable_device(struct acpiphp
+@@ -1264,7 +1266,7 @@
static unsigned int get_slot_status(struct acpiphp_slot *slot)
{
acpi_status status;
u32 dvid;
struct list_head *l;
struct acpiphp_func *func;
-diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_ibm.c linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp_ibm.c
---- linux-2.6.27/drivers/pci/hotplug/acpiphp_ibm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp_ibm.c 2009-03-25 16:11:12.000000000 +0000
-@@ -183,7 +183,7 @@ static int ibm_set_attention_status(stru
+diff -r 9608d5473017 drivers/pci/hotplug/acpiphp_ibm.c
+--- a/drivers/pci/hotplug/acpiphp_ibm.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/acpiphp_ibm.c Wed May 06 16:56:30 2009 +0100
+@@ -183,7 +183,7 @@
union acpi_object args[2];
struct acpi_object_list params = { .pointer = args, .count = 2 };
acpi_status stat;
union apci_descriptor *ibm_slot;
ibm_slot = ibm_slot_from_id(hpslot_to_sun(slot));
-@@ -204,7 +204,7 @@ static int ibm_set_attention_status(stru
+@@ -204,7 +204,7 @@
err("APLS evaluation failed: 0x%08x\n", stat);
return -ENODEV;
} else if (!rc) {
return -ERANGE;
}
return 0;
-diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug.h linux-2.6.27.19-5.1/drivers/pci/hotplug/cpci_hotplug.h
---- linux-2.6.27/drivers/pci/hotplug/cpci_hotplug.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/cpci_hotplug.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/hotplug/cpci_hotplug.h
+--- a/drivers/pci/hotplug/cpci_hotplug.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/cpci_hotplug.h Wed May 06 16:56:30 2009 +0100
@@ -30,6 +30,7 @@
#include <linux/types.h>
/* PICMG 2.1 R2.0 HS CSR bits: */
#define HS_CSR_INS 0x0080
-@@ -69,6 +70,11 @@ struct cpci_hp_controller {
+@@ -69,6 +70,11 @@
struct cpci_hp_controller_ops *ops;
};
extern int cpci_hp_register_controller(struct cpci_hp_controller *controller);
extern int cpci_hp_unregister_controller(struct cpci_hp_controller *controller);
extern int cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last);
-diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c linux-2.6.27.19-5.1/drivers/pci/hotplug/cpci_hotplug_core.c
---- linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/cpci_hotplug_core.c 2009-03-25 16:11:12.000000000 +0000
-@@ -108,7 +108,7 @@ enable_slot(struct hotplug_slot *hotplug
+diff -r 9608d5473017 drivers/pci/hotplug/cpci_hotplug_core.c
+--- a/drivers/pci/hotplug/cpci_hotplug_core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/cpci_hotplug_core.c Wed May 06 16:56:30 2009 +0100
+@@ -108,7 +108,7 @@
struct slot *slot = hotplug_slot->private;
int retval = 0;
if (controller->ops->set_power)
retval = controller->ops->set_power(slot, 1);
-@@ -121,25 +121,23 @@ disable_slot(struct hotplug_slot *hotplu
+@@ -121,25 +121,23 @@
struct slot *slot = hotplug_slot->private;
int retval = 0;
retval = -ENODEV;
goto disable_error;
}
-@@ -214,7 +212,6 @@ static void release_slot(struct hotplug_
+@@ -214,7 +212,6 @@
struct slot *slot = hotplug_slot->private;
kfree(slot->hotplug_slot->info);
kfree(slot->hotplug_slot);
if (slot->dev)
pci_dev_put(slot->dev);
-@@ -222,12 +219,6 @@ static void release_slot(struct hotplug_
+@@ -222,12 +219,6 @@
}
#define SLOT_NAME_SIZE 6
int
cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last)
-@@ -235,7 +226,7 @@ cpci_hp_register_bus(struct pci_bus *bus
+@@ -235,7 +226,7 @@
struct slot *slot;
struct hotplug_slot *hotplug_slot;
struct hotplug_slot_info *info;
int status = -ENOMEM;
int i;
-@@ -262,34 +253,31 @@ cpci_hp_register_bus(struct pci_bus *bus
+@@ -262,34 +253,31 @@
goto error_hpslot;
hotplug_slot->info = info;
/* Add slot to our internal list */
down_write(&list_rwsem);
-@@ -298,8 +286,6 @@ cpci_hp_register_bus(struct pci_bus *bus
+@@ -298,8 +286,6 @@
up_write(&list_rwsem);
}
return 0;
error_info:
kfree(info);
error_hpslot:
-@@ -327,7 +313,7 @@ cpci_hp_unregister_bus(struct pci_bus *b
+@@ -327,7 +313,7 @@
list_del(&slot->slot_list);
slots--;
status = pci_hp_deregister(slot->hotplug_slot);
if (status) {
err("pci_hp_deregister failed with error %d",
-@@ -379,11 +365,10 @@ init_slots(int clear_ins)
+@@ -379,11 +365,10 @@
return -1;
}
list_for_each_entry(slot, &slot_list, slot_list) {
dev = pci_get_slot(slot->bus, PCI_DEVFN(slot->number, 0));
if (dev) {
if (update_adapter_status(slot->hotplug_slot, 1))
-@@ -414,8 +399,7 @@ check_slots(void)
+@@ -414,8 +399,7 @@
}
extracted = inserted = 0;
list_for_each_entry(slot, &slot_list, slot_list) {
if (cpci_check_and_clear_ins(slot)) {
/*
* Some broken hardware (e.g. PLX 9054AB) asserts
-@@ -423,35 +407,34 @@ check_slots(void)
+@@ -423,35 +407,34 @@
*/
if (slot->dev) {
warn("slot %s already inserted",
if (update_latch_status(slot->hotplug_slot, 1))
warn("failure to update latch file");
-@@ -464,18 +447,18 @@ check_slots(void)
+@@ -464,18 +447,18 @@
/* GSM, debug */
hs_csr = cpci_get_hs_csr(slot);
dbg("%s - slot %s HS_CSR (3) = %04x",
if (!slot->extracting) {
if (update_latch_status(slot->hotplug_slot, 0)) {
-@@ -493,7 +476,7 @@ check_slots(void)
+@@ -493,7 +476,7 @@
* bother trying to tell the driver or not?
*/
err("card in slot %s was improperly removed",
if (update_adapter_status(slot->hotplug_slot, 0))
warn("failure to update adapter file");
slot->extracting = 0;
-diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_pci.c linux-2.6.27.19-5.1/drivers/pci/hotplug/cpci_hotplug_pci.c
---- linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_pci.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/cpci_hotplug_pci.c 2009-03-25 16:11:12.000000000 +0000
-@@ -209,7 +209,7 @@ int cpci_led_on(struct slot* slot)
+diff -r 9608d5473017 drivers/pci/hotplug/cpci_hotplug_pci.c
+--- a/drivers/pci/hotplug/cpci_hotplug_pci.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/cpci_hotplug_pci.c Wed May 06 16:56:30 2009 +0100
+@@ -209,7 +209,7 @@
hs_cap + 2,
hs_csr)) {
err("Could not set LOO for slot %s",
return -ENODEV;
}
}
-@@ -238,7 +238,7 @@ int cpci_led_off(struct slot* slot)
+@@ -238,7 +238,7 @@
hs_cap + 2,
hs_csr)) {
err("Could not clear LOO for slot %s",
return -ENODEV;
}
}
-diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp.h linux-2.6.27.19-5.1/drivers/pci/hotplug/cpqphp.h
---- linux-2.6.27/drivers/pci/hotplug/cpqphp.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/cpqphp.h 2009-03-25 16:11:12.000000000 +0000
-@@ -449,6 +449,11 @@ extern u8 cpqhp_disk_irq;
+diff -r 9608d5473017 drivers/pci/hotplug/cpqphp.h
+--- a/drivers/pci/hotplug/cpqphp.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/cpqphp.h Wed May 06 16:56:30 2009 +0100
+@@ -449,6 +449,11 @@
/* inline functions */
/*
* return_resource
*
-@@ -696,14 +701,6 @@ static inline int get_presence_status(st
+@@ -696,14 +701,6 @@
return presence_save;
}
static inline int wait_for_ctrl_irq(struct controller *ctrl)
{
DECLARE_WAITQUEUE(wait, current);
-diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/drivers/pci/hotplug/cpqphp_core.c
---- linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/cpqphp_core.c 2009-03-25 16:11:12.000000000 +0000
-@@ -315,14 +315,15 @@ static void release_slot(struct hotplug_
+diff -r 9608d5473017 drivers/pci/hotplug/cpqphp_core.c
+--- a/drivers/pci/hotplug/cpqphp_core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/cpqphp_core.c Wed May 06 16:56:30 2009 +0100
+@@ -315,13 +315,14 @@
{
struct slot *slot = hotplug_slot->private;
kfree(slot->hotplug_slot);
kfree(slot);
}
-
-+#define SLOT_NAME_SIZE 10
+
++#define SLOT_NAME_SIZE 10
+
static int ctrl_slot_setup(struct controller *ctrl,
void __iomem *smbios_start,
- void __iomem *smbios_table)
-@@ -335,6 +336,7 @@ static int ctrl_slot_setup(struct contro
+@@ -335,6 +336,7 @@
u8 slot_number;
u8 ctrl_slot;
u32 tempdword;
void __iomem *slot_entry= NULL;
int result = -ENOMEM;
-@@ -363,16 +365,12 @@ static int ctrl_slot_setup(struct contro
+@@ -363,16 +365,12 @@
if (!hotplug_slot->info)
goto error_hpslot;
hotplug_slot_info = hotplug_slot->info;
slot_entry = get_SMBIOS_entry(smbios_start, smbios_table, 9,
slot_entry);
-@@ -418,9 +416,9 @@ static int ctrl_slot_setup(struct contro
+@@ -418,9 +416,9 @@
/* register this slot with the hotplug pci core */
hotplug_slot->release = &release_slot;
hotplug_slot->private = slot;
hotplug_slot_info->power_status = get_slot_enabled(ctrl, slot);
hotplug_slot_info->attention_status =
cpq_get_attention_status(ctrl, slot);
-@@ -435,11 +433,12 @@ static int ctrl_slot_setup(struct contro
+@@ -435,11 +433,12 @@
slot->number, ctrl->slot_device_offset,
slot_number);
result = pci_hp_register(hotplug_slot,
}
slot->next = ctrl->slot;
-@@ -451,8 +450,6 @@ static int ctrl_slot_setup(struct contro
+@@ -451,8 +450,6 @@
}
return 0;
error_info:
kfree(hotplug_slot_info);
error_hpslot:
-@@ -638,7 +635,7 @@ static int set_attention_status (struct
+@@ -638,7 +635,7 @@
u8 device;
u8 function;
if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1)
return -ENODEV;
-@@ -665,7 +662,7 @@ static int process_SI(struct hotplug_slo
+@@ -665,7 +662,7 @@
u8 device;
u8 function;
if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1)
return -ENODEV;
-@@ -697,7 +694,7 @@ static int process_SS(struct hotplug_slo
+@@ -697,7 +694,7 @@
u8 device;
u8 function;
if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1)
return -ENODEV;
-@@ -720,7 +717,7 @@ static int hardware_test(struct hotplug_
+@@ -720,7 +717,7 @@
struct slot *slot = hotplug_slot->private;
struct controller *ctrl = slot->ctrl;
return cpqhp_hardware_test(ctrl, value);
}
-@@ -731,7 +728,7 @@ static int get_power_status(struct hotpl
+@@ -731,7 +728,7 @@
struct slot *slot = hotplug_slot->private;
struct controller *ctrl = slot->ctrl;
*value = get_slot_enabled(ctrl, slot);
return 0;
-@@ -742,7 +739,7 @@ static int get_attention_status(struct h
+@@ -742,7 +739,7 @@
struct slot *slot = hotplug_slot->private;
struct controller *ctrl = slot->ctrl;
*value = cpq_get_attention_status(ctrl, slot);
return 0;
-@@ -753,7 +750,7 @@ static int get_latch_status(struct hotpl
+@@ -753,7 +750,7 @@
struct slot *slot = hotplug_slot->private;
struct controller *ctrl = slot->ctrl;
*value = cpq_get_latch_status(ctrl, slot);
-@@ -765,7 +762,7 @@ static int get_adapter_status(struct hot
+@@ -765,7 +762,7 @@
struct slot *slot = hotplug_slot->private;
struct controller *ctrl = slot->ctrl;
*value = get_presence_status(ctrl, slot);
-@@ -777,7 +774,7 @@ static int get_max_bus_speed (struct hot
+@@ -777,7 +774,7 @@
struct slot *slot = hotplug_slot->private;
struct controller *ctrl = slot->ctrl;
*value = ctrl->speed_capability;
-@@ -789,7 +786,7 @@ static int get_cur_bus_speed (struct hot
+@@ -789,7 +786,7 @@
struct slot *slot = hotplug_slot->private;
struct controller *ctrl = slot->ctrl;
*value = ctrl->speed;
-diff -purN linux-2.6.27/drivers/pci/hotplug/fakephp.c linux-2.6.27.19-5.1/drivers/pci/hotplug/fakephp.c
---- linux-2.6.27/drivers/pci/hotplug/fakephp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/fakephp.c 2009-03-25 16:11:12.000000000 +0000
-@@ -66,7 +66,6 @@ struct dummy_slot {
+diff -r 9608d5473017 drivers/pci/hotplug/fakephp.c
+--- a/drivers/pci/hotplug/fakephp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/fakephp.c Wed May 06 16:56:30 2009 +0100
+@@ -66,7 +66,6 @@
struct pci_dev *dev;
struct work_struct remove_work;
unsigned long removed;
};
static int debug;
-@@ -96,10 +95,13 @@ static void dummy_release(struct hotplug
+@@ -96,10 +95,13 @@
kfree(dslot);
}
int retval = -ENOMEM;
static int count = 1;
-@@ -119,19 +121,18 @@ static int add_slot(struct pci_dev *dev)
+@@ -119,19 +121,18 @@
if (!dslot)
goto error_info;
dslot->slot = slot;
dslot->dev = pci_dev_get(dev);
list_add (&dslot->node, &slot_list);
-@@ -167,10 +168,11 @@ static void remove_slot(struct dummy_slo
+@@ -167,10 +168,11 @@
{
int retval;
}
/* called from the single-threaded workqueue handler to remove a slot */
-@@ -308,7 +310,7 @@ static int disable_slot(struct hotplug_s
+@@ -308,7 +310,7 @@
return -ENODEV;
dslot = slot->private;
for (func = 7; func >= 0; func--) {
dev = pci_get_slot(dslot->dev->bus, dslot->dev->devfn + func);
-diff -purN linux-2.6.27/drivers/pci/hotplug/ibmphp.h linux-2.6.27.19-5.1/drivers/pci/hotplug/ibmphp.h
---- linux-2.6.27/drivers/pci/hotplug/ibmphp.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/ibmphp.h 2009-03-25 16:11:12.000000000 +0000
-@@ -707,17 +707,16 @@ struct slot {
+diff -r 9608d5473017 drivers/pci/hotplug/ibmphp.h
+--- a/drivers/pci/hotplug/ibmphp.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/ibmphp.h Wed May 06 16:56:30 2009 +0100
+@@ -707,17 +707,16 @@
u8 device;
u8 number;
u8 real_physical_slot_num;
struct bus_info *bus_on;
struct list_head ibm_slot_list;
u8 status;
-diff -purN linux-2.6.27/drivers/pci/hotplug/ibmphp_ebda.c linux-2.6.27.19-5.1/drivers/pci/hotplug/ibmphp_ebda.c
---- linux-2.6.27/drivers/pci/hotplug/ibmphp_ebda.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/ibmphp_ebda.c 2009-03-25 16:11:12.000000000 +0000
-@@ -620,11 +620,14 @@ static u8 calculate_first_slot (u8 slot_
+diff -r 9608d5473017 drivers/pci/hotplug/ibmphp_ebda.c
+--- a/drivers/pci/hotplug/ibmphp_ebda.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/ibmphp_ebda.c Wed May 06 16:56:30 2009 +0100
+@@ -620,11 +620,14 @@
return first_slot + 1;
}
int which = 0; /* rxe = 1, chassis = 0 */
u8 number = 1; /* either chassis or rxe # */
u8 first_slot = 1;
-@@ -736,7 +739,6 @@ static void release_slot(struct hotplug_
+@@ -736,7 +739,6 @@
slot = hotplug_slot->private;
kfree(slot->hotplug_slot->info);
kfree(slot->hotplug_slot);
slot->ctrl = NULL;
slot->bus_on = NULL;
-@@ -768,6 +770,7 @@ static int __init ebda_rsrc_controller (
+@@ -768,6 +770,7 @@
int rc;
struct slot *tmp_slot;
struct list_head *list;
addr = hpc_list_ptr->phys_addr;
for (ctlr = 0; ctlr < hpc_list_ptr->num_ctlrs; ctlr++) {
-@@ -931,12 +934,6 @@ static int __init ebda_rsrc_controller (
+@@ -931,12 +934,6 @@
goto error_no_hp_info;
}
tmp_slot = kzalloc(sizeof(*tmp_slot), GFP_KERNEL);
if (!tmp_slot) {
rc = -ENOMEM;
-@@ -1000,9 +997,9 @@ static int __init ebda_rsrc_controller (
+@@ -1000,9 +997,9 @@
list_for_each (list, &ibmphp_slot_head) {
tmp_slot = list_entry (list, struct slot, ibm_slot_list);
}
print_ebda_hpc ();
-@@ -1012,8 +1009,6 @@ static int __init ebda_rsrc_controller (
+@@ -1012,8 +1009,6 @@
error:
kfree (hp_slot_ptr->private);
error_no_slot:
kfree (hp_slot_ptr->info);
error_no_hp_info:
kfree (hp_slot_ptr);
-diff -purN linux-2.6.27/drivers/pci/hotplug/pci_hotplug_core.c linux-2.6.27.19-5.1/drivers/pci/hotplug/pci_hotplug_core.c
---- linux-2.6.27/drivers/pci/hotplug/pci_hotplug_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/pci_hotplug_core.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/hotplug/pci_hotplug_core.c
+--- a/drivers/pci/hotplug/pci_hotplug_core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/pci_hotplug_core.c Wed May 06 16:56:30 2009 +0100
@@ -37,6 +37,7 @@
#include <linux/init.h>
#include <linux/mount.h>
#include <linux/pci.h>
#include <linux/pci_hotplug.h>
#include <asm/uaccess.h>
-@@ -61,7 +62,7 @@ static int debug;
+@@ -61,7 +62,7 @@
//////////////////////////////////////////////////////////////////
static LIST_HEAD(pci_hotplug_slot_list);
/* these strings match up with the values in pci_bus_speed */
static char *pci_bus_speed_strings[] = {
-@@ -530,16 +531,12 @@ static struct hotplug_slot *get_slot_fro
+@@ -530,16 +531,12 @@
struct hotplug_slot *slot;
struct list_head *tmp;
}
/**
-@@ -547,13 +544,15 @@ out:
+@@ -547,13 +544,15 @@
* @bus: bus this slot is on
* @slot: pointer to the &struct hotplug_slot to register
* @slot_nr: slot number
{
int result;
struct pci_slot *pci_slot;
-@@ -568,48 +567,29 @@ int pci_hp_register(struct hotplug_slot
+@@ -568,48 +567,29 @@
return -EINVAL;
}
return result;
}
-@@ -630,21 +610,23 @@ int pci_hp_deregister(struct hotplug_slo
+@@ -630,21 +610,23 @@
if (!hotplug)
return -ENODEV;
return 0;
}
-diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp.h linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp.h
---- linux-2.6.27/drivers/pci/hotplug/pciehp.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp.h 2009-03-25 16:11:12.000000000 +0000
-@@ -61,15 +61,13 @@ extern struct workqueue_struct *pciehp_w
+diff -r 9608d5473017 drivers/pci/hotplug/pciehp.h
+--- a/drivers/pci/hotplug/pciehp.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/pciehp.h Wed May 06 16:56:30 2009 +0100
+@@ -61,15 +61,13 @@
struct slot {
u8 bus;
u8 device;
-- u32 number;
- u8 state;
++ u8 state;
++ u8 hp_slot;
+ u32 number;
+- u8 state;
- struct timer_list task_event;
- u8 hp_slot;
-+ u32 number;
+- u8 hp_slot;
struct controller *ctrl;
struct hpc_ops *hpc_ops;
struct hotplug_slot *hotplug_slot;
unsigned long last_emi_toggle;
struct delayed_work work; /* work for button event */
struct mutex lock;
-@@ -161,6 +159,11 @@ int pciehp_enable_slot(struct slot *p_sl
+@@ -161,6 +159,11 @@
int pciehp_disable_slot(struct slot *p_slot);
int pcie_enable_notification(struct controller *ctrl);
static inline struct slot *pciehp_find_slot(struct controller *ctrl, u8 device)
{
struct slot *slot;
-diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp_core.c
---- linux-2.6.27/drivers/pci/hotplug/pciehp_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp_core.c 2009-03-25 16:11:12.000000000 +0000
-@@ -126,8 +126,10 @@ static int set_lock_status(struct hotplu
+diff -r 9608d5473017 drivers/pci/hotplug/pciehp_core.c
+--- a/drivers/pci/hotplug/pciehp_core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/pciehp_core.c Wed May 06 16:56:30 2009 +0100
+@@ -126,8 +126,10 @@
mutex_lock(&slot->ctrl->crit_sect);
/* has it been >1 sec since our last toggle? */
/* see what our current state is */
retval = get_lock_status(hotplug_slot, &value);
-@@ -180,7 +182,8 @@ static struct hotplug_slot_attribute hot
+@@ -180,7 +182,8 @@
*/
static void release_slot(struct hotplug_slot *hotplug_slot)
{
kfree(hotplug_slot->info);
kfree(hotplug_slot);
-@@ -191,7 +194,7 @@ static int init_slots(struct controller
+@@ -191,7 +194,7 @@
struct slot *slot;
struct hotplug_slot *hotplug_slot;
struct hotplug_slot_info *info;
int retval = -ENOMEM;
list_for_each_entry(slot, &ctrl->slot_list, slot_list) {
-@@ -205,39 +208,27 @@ static int init_slots(struct controller
+@@ -205,39 +208,27 @@
/* register this slot with the hotplug pci core */
hotplug_slot->info = info;
hotplug_slot->private = slot;
hotplug_slot->release = &release_slot;
hotplug_slot->ops = &pciehp_hotplug_slot_ops;
-- get_power_status(hotplug_slot, &info->power_status);
-- get_attention_status(hotplug_slot, &info->attention_status);
-- get_latch_status(hotplug_slot, &info->latch_status);
-- get_adapter_status(hotplug_slot, &info->adapter_status);
- slot->hotplug_slot = hotplug_slot;
++ slot->hotplug_slot = hotplug_slot;
+ snprintf(name, SLOT_NAME_SIZE, "%u", slot->number);
-
- dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x "
- "slot_device_offset=%x\n", slot->bus, slot->device,
- slot->hp_slot, slot->number, ctrl->slot_device_offset);
--duplicate_name:
- retval = pci_hp_register(hotplug_slot,
- ctrl->pci_dev->subordinate,
-- slot->device);
++
++ dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x "
++ "slot_device_offset=%x\n", slot->bus, slot->device,
++ slot->hp_slot, slot->number, ctrl->slot_device_offset);
++ retval = pci_hp_register(hotplug_slot,
++ ctrl->pci_dev->subordinate,
+ slot->device,
+ name);
- if (retval) {
++ if (retval) {
++ err("pci_hp_register failed with error %d\n", retval);
++ goto error_info;
++ }
+ get_power_status(hotplug_slot, &info->power_status);
+ get_attention_status(hotplug_slot, &info->attention_status);
+ get_latch_status(hotplug_slot, &info->latch_status);
+ get_adapter_status(hotplug_slot, &info->adapter_status);
+- slot->hotplug_slot = hotplug_slot;
+-
+- dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x "
+- "slot_device_offset=%x\n", slot->bus, slot->device,
+- slot->hp_slot, slot->number, ctrl->slot_device_offset);
+-duplicate_name:
+- retval = pci_hp_register(hotplug_slot,
+- ctrl->pci_dev->subordinate,
+- slot->device);
+- if (retval) {
- /*
- * If slot N already exists, we'll try to create
- * slot N-1, N-2 ... N-M, until we overflow.
- else
- err("duplicate slot name overflow\n");
- }
- err("pci_hp_register failed with error %d\n", retval);
- goto error_info;
- }
-+ get_power_status(hotplug_slot, &info->power_status);
-+ get_attention_status(hotplug_slot, &info->attention_status);
-+ get_latch_status(hotplug_slot, &info->latch_status);
-+ get_adapter_status(hotplug_slot, &info->adapter_status);
+- err("pci_hp_register failed with error %d\n", retval);
+- goto error_info;
+- }
/* create additional sysfs entries */
if (EMI(ctrl)) {
retval = sysfs_create_file(&hotplug_slot->pci_slot->kobj,
-@@ -278,7 +269,7 @@ static int set_attention_status(struct h
+@@ -278,7 +269,7 @@
{
struct slot *slot = hotplug_slot->private;
hotplug_slot->info->attention_status = status;
-@@ -293,7 +284,7 @@ static int enable_slot(struct hotplug_sl
+@@ -293,7 +284,7 @@
{
struct slot *slot = hotplug_slot->private;
return pciehp_sysfs_enable_slot(slot);
}
-@@ -303,7 +294,7 @@ static int disable_slot(struct hotplug_s
+@@ -303,7 +294,7 @@
{
struct slot *slot = hotplug_slot->private;
return pciehp_sysfs_disable_slot(slot);
}
-@@ -313,7 +304,7 @@ static int get_power_status(struct hotpl
+@@ -313,7 +304,7 @@
struct slot *slot = hotplug_slot->private;
int retval;
retval = slot->hpc_ops->get_power_status(slot, value);
if (retval < 0)
-@@ -327,7 +318,7 @@ static int get_attention_status(struct h
+@@ -327,7 +318,7 @@
struct slot *slot = hotplug_slot->private;
int retval;
retval = slot->hpc_ops->get_attention_status(slot, value);
if (retval < 0)
-@@ -341,7 +332,7 @@ static int get_latch_status(struct hotpl
+@@ -341,7 +332,7 @@
struct slot *slot = hotplug_slot->private;
int retval;
retval = slot->hpc_ops->get_latch_status(slot, value);
if (retval < 0)
-@@ -355,7 +346,7 @@ static int get_adapter_status(struct hot
+@@ -355,7 +346,7 @@
struct slot *slot = hotplug_slot->private;
int retval;
retval = slot->hpc_ops->get_adapter_status(slot, value);
if (retval < 0)
-@@ -370,7 +361,7 @@ static int get_max_bus_speed(struct hotp
+@@ -370,7 +361,7 @@
struct slot *slot = hotplug_slot->private;
int retval;
retval = slot->hpc_ops->get_max_bus_speed(slot, value);
if (retval < 0)
-@@ -384,7 +375,7 @@ static int get_cur_bus_speed(struct hotp
+@@ -384,7 +375,7 @@
struct slot *slot = hotplug_slot->private;
int retval;
retval = slot->hpc_ops->get_cur_bus_speed(slot, value);
if (retval < 0)
-diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp_ctrl.c
---- linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp_ctrl.c 2009-03-25 16:11:12.000000000 +0000
-@@ -65,7 +65,7 @@ u8 pciehp_handle_attention_button(struct
+diff -r 9608d5473017 drivers/pci/hotplug/pciehp_ctrl.c
+--- a/drivers/pci/hotplug/pciehp_ctrl.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/pciehp_ctrl.c Wed May 06 16:56:30 2009 +0100
+@@ -65,7 +65,7 @@
/*
* Button pressed - See if need to TAKE ACTION!!!
*/
event_type = INT_BUTTON_PRESS;
queue_interrupt_event(p_slot, event_type);
-@@ -86,13 +86,13 @@ u8 pciehp_handle_switch_change(struct sl
+@@ -86,13 +86,13 @@
/*
* Switch opened
*/
event_type = INT_SWITCH_CLOSE;
}
-@@ -117,13 +117,13 @@ u8 pciehp_handle_presence_change(struct
+@@ -117,13 +117,13 @@
/*
* Card Present
*/
event_type = INT_PRESENCE_OFF;
}
-@@ -143,13 +143,13 @@ u8 pciehp_handle_power_fault(struct slot
+@@ -143,13 +143,13 @@
/*
* power fault Cleared
*/
event_type = INT_POWER_FAULT;
info("power fault bit %x set\n", 0);
}
-@@ -404,11 +404,11 @@ static void handle_button_press_event(st
+@@ -404,11 +404,11 @@
if (getstatus) {
p_slot->state = BLINKINGOFF_STATE;
info("PCI slot #%s - powering off due to button "
}
/* blink green LED and turn off amber */
if (PWR_LED(ctrl))
-@@ -425,7 +425,7 @@ static void handle_button_press_event(st
+@@ -425,7 +425,7 @@
* press the attention again before the 5 sec. limit
* expires to cancel hot-add or hot-remove
*/
dbg("%s: button cancel\n", __func__);
cancel_delayed_work(&p_slot->work);
if (p_slot->state == BLINKINGOFF_STATE) {
-@@ -438,7 +438,7 @@ static void handle_button_press_event(st
+@@ -438,7 +438,7 @@
if (ATTN_LED(ctrl))
p_slot->hpc_ops->set_attention_status(p_slot, 0);
info("PCI slot #%s - action canceled due to button press\n",
p_slot->state = STATIC_STATE;
break;
case POWEROFF_STATE:
-@@ -448,7 +448,7 @@ static void handle_button_press_event(st
+@@ -448,7 +448,7 @@
* this means that the previous attention button action
* to hot-add or hot-remove is undergoing
*/
update_slot_info(p_slot);
break;
default:
-@@ -529,7 +529,7 @@ int pciehp_enable_slot(struct slot *p_sl
+@@ -529,7 +529,7 @@
rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
if (rc || !getstatus) {
info("%s: no adapter on slot(%s)\n", __func__,
mutex_unlock(&p_slot->ctrl->crit_sect);
return -ENODEV;
}
-@@ -537,7 +537,7 @@ int pciehp_enable_slot(struct slot *p_sl
+@@ -537,7 +537,7 @@
rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
if (rc || getstatus) {
info("%s: latch open on slot(%s)\n", __func__,
mutex_unlock(&p_slot->ctrl->crit_sect);
return -ENODEV;
}
-@@ -547,7 +547,7 @@ int pciehp_enable_slot(struct slot *p_sl
+@@ -547,7 +547,7 @@
rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
if (rc || getstatus) {
info("%s: already enabled on slot(%s)\n", __func__,
mutex_unlock(&p_slot->ctrl->crit_sect);
return -EINVAL;
}
-@@ -582,7 +582,7 @@ int pciehp_disable_slot(struct slot *p_s
+@@ -582,7 +582,7 @@
ret = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
if (ret || !getstatus) {
info("%s: no adapter on slot(%s)\n", __func__,
mutex_unlock(&p_slot->ctrl->crit_sect);
return -ENODEV;
}
-@@ -592,7 +592,7 @@ int pciehp_disable_slot(struct slot *p_s
+@@ -592,7 +592,7 @@
ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
if (ret || getstatus) {
info("%s: latch open on slot(%s)\n", __func__,
mutex_unlock(&p_slot->ctrl->crit_sect);
return -ENODEV;
}
-@@ -602,7 +602,7 @@ int pciehp_disable_slot(struct slot *p_s
+@@ -602,7 +602,7 @@
ret = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
if (ret || !getstatus) {
info("%s: already disabled slot(%s)\n", __func__,
mutex_unlock(&p_slot->ctrl->crit_sect);
return -EINVAL;
}
-@@ -632,14 +632,14 @@ int pciehp_sysfs_enable_slot(struct slot
+@@ -632,14 +632,14 @@
break;
case POWERON_STATE:
info("Slot %s is already in powering on state\n",
break;
}
mutex_unlock(&p_slot->lock);
-@@ -664,14 +664,14 @@ int pciehp_sysfs_disable_slot(struct slo
+@@ -664,14 +664,14 @@
break;
case POWEROFF_STATE:
info("Slot %s is already in powering off state\n",
break;
}
mutex_unlock(&p_slot->lock);
-diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_hpc.c linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp_hpc.c
---- linux-2.6.27/drivers/pci/hotplug/pciehp_hpc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp_hpc.c 2009-03-25 16:11:12.000000000 +0000
-@@ -1044,7 +1044,6 @@ static int pcie_init_slot(struct control
+diff -r 9608d5473017 drivers/pci/hotplug/pciehp_hpc.c
+--- a/drivers/pci/hotplug/pciehp_hpc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/pciehp_hpc.c Wed May 06 16:56:30 2009 +0100
+@@ -1044,7 +1044,6 @@
slot->device = ctrl->slot_device_offset + slot->hp_slot;
slot->hpc_ops = ctrl->hpc_ops;
slot->number = ctrl->first_slot;
mutex_init(&slot->lock);
INIT_DELAYED_WORK(&slot->work, pciehp_queue_pushbutton_work);
list_add(&slot->slot_list, &ctrl->slot_list);
-diff -purN linux-2.6.27/drivers/pci/hotplug/rpadlpar_core.c linux-2.6.27.19-5.1/drivers/pci/hotplug/rpadlpar_core.c
---- linux-2.6.27/drivers/pci/hotplug/rpadlpar_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/rpadlpar_core.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/hotplug/rpadlpar_core.c
+--- a/drivers/pci/hotplug/rpadlpar_core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/rpadlpar_core.c Wed May 06 16:56:30 2009 +0100
@@ -14,6 +14,8 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/string.h>
-@@ -155,16 +157,15 @@ static void dlpar_pci_add_bus(struct dev
+@@ -155,16 +157,15 @@
dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
of_scan_pci_bridge(dn, dev);
}
static int dlpar_add_pci_slot(char *drc_name, struct device_node *dn)
-@@ -206,22 +207,19 @@ static int dlpar_add_pci_slot(char *drc_
+@@ -206,22 +207,19 @@
static int dlpar_remove_root_bus(struct pci_controller *phb)
{
struct pci_bus *phb_bus;
}
static int dlpar_remove_phb(char *drc_name, struct device_node *dn)
-@@ -233,6 +231,8 @@ static int dlpar_remove_phb(char *drc_na
+@@ -232,6 +230,8 @@
+
if (!pcibios_find_pci_bus(dn))
return -EINVAL;
-
-+ pr_debug("PCI: Removing PHB %s...\n", dn->full_name);
+
++ pr_debug("PCI: Removing PHB %s...\n", dn->full_name);
+
/* If pci slot is hotplugable, use hotplug to remove it */
slot = find_php_slot(dn);
- if (slot) {
-@@ -378,25 +378,36 @@ int dlpar_remove_pci_slot(char *drc_name
+@@ -378,25 +378,36 @@
if (!bus)
return -EINVAL;
- } else
- pcibios_remove_pci_devices(bus);
+ }
-+
+
+ /* Remove all devices below slot */
+ pcibios_remove_pci_devices(bus);
-
++
+ /* Unmap PCI IO space */
if (pcibios_unmap_io_space(bus)) {
printk(KERN_ERR "%s: failed to unmap bus range\n",
pci_remove_bus_device(bus->self);
return 0;
}
-diff -purN linux-2.6.27/drivers/pci/hotplug/rpaphp_slot.c linux-2.6.27.19-5.1/drivers/pci/hotplug/rpaphp_slot.c
---- linux-2.6.27/drivers/pci/hotplug/rpaphp_slot.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/rpaphp_slot.c 2009-03-25 16:11:12.000000000 +0000
-@@ -43,7 +43,7 @@ static void rpaphp_release_slot(struct h
+diff -r 9608d5473017 drivers/pci/hotplug/rpaphp_slot.c
+--- a/drivers/pci/hotplug/rpaphp_slot.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/rpaphp_slot.c Wed May 06 16:56:30 2009 +0100
+@@ -43,7 +43,7 @@
void dealloc_slot_struct(struct slot *slot)
{
kfree(slot->hotplug_slot->info);
kfree(slot->hotplug_slot);
kfree(slot);
}
-@@ -63,11 +63,9 @@ struct slot *alloc_slot_struct(struct de
+@@ -63,11 +63,9 @@
GFP_KERNEL);
if (!slot->hotplug_slot->info)
goto error_hpslot;
slot->dn = dn;
slot->index = drc_index;
slot->power_domain = power_domain;
-@@ -137,7 +135,7 @@ int rpaphp_register_slot(struct slot *sl
+@@ -137,7 +135,7 @@
slotno = PCI_SLOT(PCI_DN(slot->dn->child)->devfn);
else
slotno = -1;
if (retval) {
err("pci_hp_register failed with error %d\n", retval);
return retval;
-@@ -147,9 +145,5 @@ int rpaphp_register_slot(struct slot *sl
+@@ -147,9 +145,5 @@
list_add(&slot->rpaphp_slot_list, &rpaphp_slot_head);
info("Slot [%s] registered\n", slot->name);
return 0;
- return retval;
}
-diff -purN linux-2.6.27/drivers/pci/hotplug/sgi_hotplug.c linux-2.6.27.19-5.1/drivers/pci/hotplug/sgi_hotplug.c
---- linux-2.6.27/drivers/pci/hotplug/sgi_hotplug.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/sgi_hotplug.c 2009-03-25 16:11:12.000000000 +0000
-@@ -161,7 +161,8 @@ static int sn_pci_bus_valid(struct pci_b
+diff -r 9608d5473017 drivers/pci/hotplug/sgi_hotplug.c
+--- a/drivers/pci/hotplug/sgi_hotplug.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/sgi_hotplug.c Wed May 06 16:56:30 2009 +0100
+@@ -161,7 +161,8 @@
}
static int sn_hp_slot_private_alloc(struct hotplug_slot *bss_hotplug_slot,
{
struct pcibus_info *pcibus_info;
struct slot *slot;
-@@ -173,15 +174,9 @@ static int sn_hp_slot_private_alloc(stru
+@@ -173,15 +174,9 @@
return -ENOMEM;
bss_hotplug_slot->private = slot;
pci_domain_nr(pci_bus),
((u16)pcibus_info->pbi_buscommon.bs_persist_busnum),
device + 1);
-@@ -418,7 +413,7 @@ static int enable_slot(struct hotplug_sl
+@@ -418,7 +413,7 @@
/*
* Add the slot's devices to the ACPI infrastructure */
if (SN_ACPI_BASE_SUPPORT() && ssdt) {
struct acpi_device *pdevice;
struct acpi_device *device;
acpi_handle phandle;
-@@ -510,7 +505,7 @@ static int disable_slot(struct hotplug_s
+@@ -510,7 +505,7 @@
/* free the ACPI resources for the slot */
if (SN_ACPI_BASE_SUPPORT() &&
PCI_CONTROLLER(slot->pci_bus)->acpi_handle) {
struct acpi_device *device;
acpi_handle phandle;
acpi_handle chandle = NULL;
-@@ -608,7 +603,6 @@ static inline int get_power_status(struc
+@@ -608,7 +603,6 @@
static void sn_release_slot(struct hotplug_slot *bss_hotplug_slot)
{
kfree(bss_hotplug_slot->info);
kfree(bss_hotplug_slot->private);
kfree(bss_hotplug_slot);
}
-@@ -618,6 +612,7 @@ static int sn_hotplug_slot_register(stru
+@@ -618,6 +612,7 @@
int device;
struct pci_slot *pci_slot;
struct hotplug_slot *bss_hotplug_slot;
int rc = 0;
/*
-@@ -645,15 +640,14 @@ static int sn_hotplug_slot_register(stru
+@@ -645,15 +640,14 @@
}
if (sn_hp_slot_private_alloc(bss_hotplug_slot,
if (rc)
goto register_err;
-diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp.h linux-2.6.27.19-5.1/drivers/pci/hotplug/shpchp.h
---- linux-2.6.27/drivers/pci/hotplug/shpchp.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/shpchp.h 2009-03-25 16:11:12.000000000 +0000
-@@ -69,15 +69,13 @@ struct slot {
+diff -r 9608d5473017 drivers/pci/hotplug/shpchp.h
+--- a/drivers/pci/hotplug/shpchp.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/shpchp.h Wed May 06 16:56:30 2009 +0100
+@@ -69,15 +69,13 @@
u8 state;
u8 presence_save;
u8 pwr_save;
};
struct event_info {
-@@ -169,6 +167,11 @@ extern void cleanup_slots(struct control
+@@ -168,6 +166,11 @@
+ extern void cleanup_slots(struct controller *ctrl);
extern void shpchp_queue_pushbutton_work(struct work_struct *work);
extern int shpc_init( struct controller *ctrl, struct pci_dev *pdev);
-
++
+static inline const char *slot_name(struct slot *slot)
+{
+ return hotplug_slot_name(slot->hotplug_slot);
+}
-+
+
#ifdef CONFIG_ACPI
#include <linux/pci-acpi.h>
- static inline int get_hp_params_from_firmware(struct pci_dev *dev,
-diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_core.c linux-2.6.27.19-5.1/drivers/pci/hotplug/shpchp_core.c
---- linux-2.6.27/drivers/pci/hotplug/shpchp_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/shpchp_core.c 2009-03-25 16:11:12.000000000 +0000
-@@ -89,7 +89,7 @@ static void release_slot(struct hotplug_
+diff -r 9608d5473017 drivers/pci/hotplug/shpchp_core.c
+--- a/drivers/pci/hotplug/shpchp_core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/shpchp_core.c Wed May 06 16:56:30 2009 +0100
+@@ -89,7 +89,7 @@
{
struct slot *slot = hotplug_slot->private;
kfree(slot->hotplug_slot->info);
kfree(slot->hotplug_slot);
-@@ -101,8 +101,9 @@ static int init_slots(struct controller
+@@ -101,8 +101,9 @@
struct slot *slot;
struct hotplug_slot *hotplug_slot;
struct hotplug_slot_info *info;
for (i = 0; i < ctrl->num_slots; i++) {
slot = kzalloc(sizeof(*slot), GFP_KERNEL);
-@@ -119,8 +120,6 @@ static int init_slots(struct controller
+@@ -119,8 +120,6 @@
goto error_hpslot;
hotplug_slot->info = info;
slot->hp_slot = i;
slot->ctrl = ctrl;
slot->bus = ctrl->pci_dev->subordinate->number;
-@@ -133,37 +132,24 @@ static int init_slots(struct controller
+@@ -133,36 +132,23 @@
/* register this slot with the hotplug pci core */
hotplug_slot->private = slot;
hotplug_slot->release = &release_slot;
- snprintf(slot->name, SLOT_NAME_SIZE, "%d", slot->number);
+ snprintf(name, SLOT_NAME_SIZE, "%d", slot->number);
hotplug_slot->ops = &shpchp_hotplug_slot_ops;
++
++ dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x "
++ "slot_device_offset=%x\n", slot->bus, slot->device,
++ slot->hp_slot, slot->number, ctrl->slot_device_offset);
++ retval = pci_hp_register(slot->hotplug_slot,
++ ctrl->pci_dev->subordinate, slot->device, name);
++ if (retval) {
++ err("pci_hp_register failed with error %d\n", retval);
++ goto error_info;
++ }
-- get_power_status(hotplug_slot, &info->power_status);
-- get_attention_status(hotplug_slot, &info->attention_status);
-- get_latch_status(hotplug_slot, &info->latch_status);
-- get_adapter_status(hotplug_slot, &info->adapter_status);
+ get_power_status(hotplug_slot, &info->power_status);
+ get_attention_status(hotplug_slot, &info->attention_status);
+ get_latch_status(hotplug_slot, &info->latch_status);
+ get_adapter_status(hotplug_slot, &info->adapter_status);
-
- dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x "
- "slot_device_offset=%x\n", slot->bus, slot->device,
- slot->hp_slot, slot->number, ctrl->slot_device_offset);
+- dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x "
+- "slot_device_offset=%x\n", slot->bus, slot->device,
+- slot->hp_slot, slot->number, ctrl->slot_device_offset);
-duplicate_name:
- retval = pci_hp_register(slot->hotplug_slot,
+- retval = pci_hp_register(slot->hotplug_slot,
- ctrl->pci_dev->subordinate, slot->device);
-+ ctrl->pci_dev->subordinate, slot->device, name);
- if (retval) {
+- if (retval) {
- /*
- * If slot N already exists, we'll try to create
- * slot N-1, N-2 ... N-M, until we overflow.
- else
- err("duplicate slot name overflow\n");
- }
- err("pci_hp_register failed with error %d\n", retval);
- goto error_info;
- }
+- err("pci_hp_register failed with error %d\n", retval);
+- goto error_info;
+- }
-+ get_power_status(hotplug_slot, &info->power_status);
-+ get_attention_status(hotplug_slot, &info->attention_status);
-+ get_latch_status(hotplug_slot, &info->latch_status);
-+ get_adapter_status(hotplug_slot, &info->adapter_status);
-+
list_add(&slot->slot_list, &ctrl->slot_list);
}
-
-@@ -201,7 +187,7 @@ static int set_attention_status (struct
+@@ -201,7 +187,7 @@
{
struct slot *slot = get_slot(hotplug_slot);
hotplug_slot->info->attention_status = status;
slot->hpc_ops->set_attention_status(slot, status);
-@@ -213,7 +199,7 @@ static int enable_slot (struct hotplug_s
+@@ -213,7 +199,7 @@
{
struct slot *slot = get_slot(hotplug_slot);
return shpchp_sysfs_enable_slot(slot);
}
-@@ -222,7 +208,7 @@ static int disable_slot (struct hotplug_
+@@ -222,7 +208,7 @@
{
struct slot *slot = get_slot(hotplug_slot);
return shpchp_sysfs_disable_slot(slot);
}
-@@ -232,7 +218,7 @@ static int get_power_status (struct hotp
+@@ -232,7 +218,7 @@
struct slot *slot = get_slot(hotplug_slot);
int retval;
retval = slot->hpc_ops->get_power_status(slot, value);
if (retval < 0)
-@@ -246,7 +232,7 @@ static int get_attention_status (struct
+@@ -246,7 +232,7 @@
struct slot *slot = get_slot(hotplug_slot);
int retval;
retval = slot->hpc_ops->get_attention_status(slot, value);
if (retval < 0)
-@@ -260,7 +246,7 @@ static int get_latch_status (struct hotp
+@@ -260,7 +246,7 @@
struct slot *slot = get_slot(hotplug_slot);
int retval;
retval = slot->hpc_ops->get_latch_status(slot, value);
if (retval < 0)
-@@ -274,7 +260,7 @@ static int get_adapter_status (struct ho
+@@ -274,7 +260,7 @@
struct slot *slot = get_slot(hotplug_slot);
int retval;
retval = slot->hpc_ops->get_adapter_status(slot, value);
if (retval < 0)
-@@ -289,7 +275,7 @@ static int get_max_bus_speed(struct hotp
+@@ -289,7 +275,7 @@
struct slot *slot = get_slot(hotplug_slot);
int retval;
retval = slot->hpc_ops->get_max_bus_speed(slot, value);
if (retval < 0)
-@@ -303,7 +289,7 @@ static int get_cur_bus_speed (struct hot
+@@ -303,7 +289,7 @@
struct slot *slot = get_slot(hotplug_slot);
int retval;
retval = slot->hpc_ops->get_cur_bus_speed(slot, value);
if (retval < 0)
-diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c linux-2.6.27.19-5.1/drivers/pci/hotplug/shpchp_ctrl.c
---- linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/shpchp_ctrl.c 2009-03-25 16:11:12.000000000 +0000
-@@ -70,7 +70,7 @@ u8 shpchp_handle_attention_button(u8 hp_
+diff -r 9608d5473017 drivers/pci/hotplug/shpchp_ctrl.c
+--- a/drivers/pci/hotplug/shpchp_ctrl.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/shpchp_ctrl.c Wed May 06 16:56:30 2009 +0100
+@@ -70,7 +70,7 @@
/*
* Button pressed - See if need to TAKE ACTION!!!
*/
event_type = INT_BUTTON_PRESS;
queue_interrupt_event(p_slot, event_type);
-@@ -98,7 +98,7 @@ u8 shpchp_handle_switch_change(u8 hp_slo
+@@ -98,7 +98,7 @@
/*
* Switch opened
*/
event_type = INT_SWITCH_OPEN;
if (p_slot->pwr_save && p_slot->presence_save) {
event_type = INT_POWER_FAULT;
-@@ -108,7 +108,7 @@ u8 shpchp_handle_switch_change(u8 hp_slo
+@@ -108,7 +108,7 @@
/*
* Switch closed
*/
event_type = INT_SWITCH_CLOSE;
}
-@@ -135,13 +135,13 @@ u8 shpchp_handle_presence_change(u8 hp_s
+@@ -135,13 +135,13 @@
/*
* Card Present
*/
event_type = INT_PRESENCE_OFF;
}
-@@ -164,14 +164,14 @@ u8 shpchp_handle_power_fault(u8 hp_slot,
+@@ -164,14 +164,14 @@
/*
* Power fault Cleared
*/
event_type = INT_POWER_FAULT;
/* set power fault status for this board */
p_slot->status = 0xFF;
-@@ -493,11 +493,11 @@ static void handle_button_press_event(st
+@@ -493,11 +493,11 @@
if (getstatus) {
p_slot->state = BLINKINGOFF_STATE;
info("PCI slot #%s - powering off due to button "
}
/* blink green LED and turn off amber */
p_slot->hpc_ops->green_led_blink(p_slot);
-@@ -512,7 +512,7 @@ static void handle_button_press_event(st
+@@ -512,7 +512,7 @@
* press the attention again before the 5 sec. limit
* expires to cancel hot-add or hot-remove
*/
dbg("%s: button cancel\n", __func__);
cancel_delayed_work(&p_slot->work);
if (p_slot->state == BLINKINGOFF_STATE)
-@@ -521,7 +521,7 @@ static void handle_button_press_event(st
+@@ -521,7 +521,7 @@
p_slot->hpc_ops->green_led_off(p_slot);
p_slot->hpc_ops->set_attention_status(p_slot, 0);
info("PCI slot #%s - action canceled due to button press\n",
p_slot->state = STATIC_STATE;
break;
case POWEROFF_STATE:
-@@ -531,7 +531,7 @@ static void handle_button_press_event(st
+@@ -531,7 +531,7 @@
* this means that the previous attention button action
* to hot-add or hot-remove is undergoing
*/
update_slot_info(p_slot);
break;
default:
-@@ -574,17 +574,17 @@ static int shpchp_enable_slot (struct sl
+@@ -574,17 +574,17 @@
mutex_lock(&p_slot->ctrl->crit_sect);
rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
if (rc || !getstatus) {
goto out;
}
-@@ -633,17 +633,17 @@ static int shpchp_disable_slot (struct s
+@@ -633,17 +633,17 @@
rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
if (rc || !getstatus) {
goto out;
}
-@@ -671,14 +671,14 @@ int shpchp_sysfs_enable_slot(struct slot
+@@ -671,14 +671,14 @@
break;
case POWERON_STATE:
info("Slot %s is already in powering on state\n",
break;
}
mutex_unlock(&p_slot->lock);
-@@ -703,14 +703,14 @@ int shpchp_sysfs_disable_slot(struct slo
+@@ -703,14 +703,14 @@
break;
case POWEROFF_STATE:
info("Slot %s is already in powering off state\n",
break;
}
mutex_unlock(&p_slot->lock);
-diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pci/intel-iommu.c
---- linux-2.6.27/drivers/pci/intel-iommu.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/intel-iommu.c 2009-03-25 16:11:12.000000000 +0000
-@@ -49,8 +49,6 @@
+diff -r 9608d5473017 drivers/pci/intel-iommu.c
+--- a/drivers/pci/intel-iommu.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/intel-iommu.c Wed May 06 16:56:30 2009 +0100
+@@ -49,16 +49,12 @@
#define DEFAULT_DOMAIN_ADDRESS_WIDTH 48
#define DOMAIN_MAX_ADDR(gaw) ((((u64)1) << gaw) - 1)
-@@ -58,8 +56,6 @@ static void flush_unmaps_timeout(unsigne
+ static void flush_unmaps_timeout(unsigned long data);
DEFINE_TIMER(unmap_timer, flush_unmaps_timeout, 0, 0);
-
--static struct intel_iommu *g_iommus;
-
+-static struct intel_iommu *g_iommus;
+
#define HIGH_WATER_MARK 250
struct deferred_flush_tables {
- int next;
-@@ -72,6 +68,8 @@ static struct deferred_flush_tables *def
+@@ -72,6 +68,8 @@
/* bitmap for indexing intel_iommus */
static int g_num_of_iommus;
static DEFINE_SPINLOCK(async_umap_flush_lock);
static LIST_HEAD(unmaps_to_do);
-@@ -80,7 +78,7 @@ static long list_size;
+@@ -80,7 +78,7 @@
static void domain_remove_dev_info(struct dmar_domain *domain);
static int __initdata dmar_map_gfx = 1;
static int dmar_forcedac;
static int intel_iommu_strict;
-@@ -185,13 +183,6 @@ void free_iova_mem(struct iova *iova)
+@@ -183,13 +181,6 @@
+ void free_iova_mem(struct iova *iova)
+ {
kmem_cache_free(iommu_iova_cache, iova);
- }
-
+-}
+-
-static inline void __iommu_flush_cache(
- struct intel_iommu *iommu, void *addr, int size)
-{
- if (!ecap_coherent(iommu->ecap))
- clflush_cache_range(addr, size);
--}
--
+ }
+
/* Gets context entry for a given bus and devfn */
- static struct context_entry * device_to_context_entry(struct intel_iommu *iommu,
- u8 bus, u8 devfn)
-@@ -488,19 +479,6 @@ static int iommu_alloc_root_entry(struct
+@@ -488,19 +479,6 @@
return 0;
}
static void iommu_set_root_entry(struct intel_iommu *iommu)
{
void *addr;
-@@ -527,7 +505,7 @@ static void iommu_flush_write_buffer(str
+@@ -527,7 +505,7 @@
u32 val;
unsigned long flag;
return;
val = iommu->gcmd | DMA_GCMD_WBF;
-@@ -990,6 +968,8 @@ static int iommu_init_domains(struct int
+@@ -990,6 +968,8 @@
return -ENOMEM;
}
/*
* if Caching mode is set, then invalid translations are tagged
* with domainid 0. Hence we need to pre-allocate it.
-@@ -998,62 +978,15 @@ static int iommu_init_domains(struct int
+@@ -998,61 +978,14 @@
set_bit(0, iommu->domain_ids);
return 0;
}
- int ret;
- int map_size;
- u32 ver;
--
+
- iommu->reg = ioremap(drhd->reg_base_addr, PAGE_SIZE_4K);
- if (!iommu->reg) {
- printk(KERN_ERR "IOMMU: can't map the region\n");
- }
- iommu->cap = dmar_readq(iommu->reg + DMAR_CAP_REG);
- iommu->ecap = dmar_readq(iommu->reg + DMAR_ECAP_REG);
-
+-
- /* the registers might be more than one page */
- map_size = max_t(int, ecap_max_iotlb_offset(iommu->ecap),
- cap_max_fault_reg_offset(iommu->cap));
{
struct dmar_domain *domain;
int i;
-
+-
- if (!iommu)
- return;
--
+
i = find_first_bit(iommu->domain_ids, cap_ndoms(iommu->cap));
for (; i < cap_ndoms(iommu->cap); ) {
- domain = iommu->domains[i];
-@@ -1078,10 +1011,6 @@ static void free_iommu(struct intel_iomm
+@@ -1078,10 +1011,6 @@
/* free context mapping */
free_context_table(iommu);
}
static struct dmar_domain * iommu_alloc_domain(struct intel_iommu *iommu)
-@@ -1426,37 +1355,6 @@ find_domain(struct pci_dev *pdev)
+@@ -1426,37 +1355,6 @@
return NULL;
}
/* domain is initialized */
static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw)
{
-@@ -1729,8 +1627,6 @@ int __init init_dmars(void)
+@@ -1729,20 +1627,12 @@
* endfor
*/
for_each_drhd_unit(drhd) {
g_num_of_iommus++;
/*
* lock not needed as this is only incremented in the single
-@@ -1739,12 +1635,6 @@ int __init init_dmars(void)
+ * threaded kernel __init code path all other access are read
+ * only
*/
- }
-
+- }
+-
- g_iommus = kzalloc(g_num_of_iommus * sizeof(*iommu), GFP_KERNEL);
- if (!g_iommus) {
- ret = -ENOMEM;
- goto error;
-- }
--
+ }
+
deferred_flush = kzalloc(g_num_of_iommus *
- sizeof(struct deferred_flush_tables), GFP_KERNEL);
- if (!deferred_flush) {
-@@ -1752,16 +1642,15 @@ int __init init_dmars(void)
+@@ -1752,16 +1642,15 @@
goto error;
}
/*
* TBD:
-@@ -1845,7 +1734,6 @@ error:
+@@ -1845,7 +1734,6 @@
iommu = drhd->iommu;
free_iommu(iommu);
}
return ret;
}
-@@ -2002,7 +1890,10 @@ static void flush_unmaps(void)
+@@ -2002,7 +1890,10 @@
/* just flush them all */
for (i = 0; i < g_num_of_iommus; i++) {
if (deferred_flush[i].next) {
for (j = 0; j < deferred_flush[i].next; j++) {
__free_iova(&deferred_flush[i].domain[j]->iovad,
deferred_flush[i].iova[j]);
-@@ -2032,7 +1923,8 @@ static void add_unmap(struct dmar_domain
+@@ -2032,7 +1923,8 @@
if (list_size == HIGH_WATER_MARK)
flush_unmaps();
next = deferred_flush[iommu_id].next;
deferred_flush[iommu_id].domain[next] = dom;
deferred_flush[iommu_id].iova[next] = iova;
-@@ -2367,19 +2259,6 @@ static struct dmi_system_id __initdata i
+@@ -2367,19 +2259,6 @@
{ }
};
static void __init init_no_remapping_devices(void)
{
struct dmar_drhd_unit *drhd;
-@@ -2426,12 +2305,19 @@ int __init intel_iommu_init(void)
+@@ -2426,11 +2305,18 @@
{
int ret = 0;
-- if (no_iommu || swiotlb || dmar_disabled)
-- return -ENODEV;
--
- if (dmar_table_init())
- return -ENODEV;
-
++ if (dmar_table_init())
++ return -ENODEV;
++
+ if (dmar_dev_scope_init())
+ return -ENODEV;
+
+ * Check the need for DMA-remapping initialization now.
+ * Above initialization will also be used by Interrupt-remapping.
+ */
-+ if (no_iommu || swiotlb || dmar_disabled)
-+ return -ENODEV;
-+
+ if (no_iommu || swiotlb || dmar_disabled)
+ return -ENODEV;
+-
+- if (dmar_table_init())
+- return -ENODEV;
+
iommu_init_mempool();
dmar_init_reserved_ranges();
-
-@@ -2453,3 +2339,12 @@ int __init intel_iommu_init(void)
+@@ -2453,3 +2339,12 @@
return 0;
}
+}
+
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf);
-diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pci/intel-iommu.h
---- linux-2.6.27/drivers/pci/intel-iommu.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/intel-iommu.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/intel-iommu.h
+--- a/drivers/pci/intel-iommu.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/intel-iommu.h Wed May 06 16:56:30 2009 +0100
@@ -27,19 +27,8 @@
#include <linux/sysdev.h>
#include "iova.h"
#define OFFSET_STRIDE (9)
/*
-@@ -126,6 +120,10 @@ static inline void dmar_writeq(void __io
+@@ -126,6 +120,10 @@
#define ecap_max_iotlb_offset(e) \
(ecap_iotlb_offset(e) + ecap_niotlb_iunits(e) * 16)
#define ecap_coherent(e) ((e) & 0x1)
/* IOTLB_REG */
-@@ -141,6 +139,17 @@ static inline void dmar_writeq(void __io
+@@ -141,6 +139,17 @@
#define DMA_TLB_IH_NONLEAF (((u64)1) << 6)
#define DMA_TLB_MAX_SIZE (0x3f)
/* PMEN_REG */
#define DMA_PMEN_EPM (((u32)1)<<31)
#define DMA_PMEN_PRS (((u32)1)<<0)
-@@ -151,6 +160,9 @@ static inline void dmar_writeq(void __io
+@@ -151,6 +160,9 @@
#define DMA_GCMD_SFL (((u32)1) << 29)
#define DMA_GCMD_EAFL (((u32)1) << 28)
#define DMA_GCMD_WBF (((u32)1) << 27)
/* GSTS_REG */
#define DMA_GSTS_TES (((u32)1) << 31)
-@@ -158,6 +170,9 @@ static inline void dmar_writeq(void __io
+@@ -158,6 +170,9 @@
#define DMA_GSTS_FLS (((u32)1) << 29)
#define DMA_GSTS_AFLS (((u32)1) << 28)
#define DMA_GSTS_WBFS (((u32)1) << 27)
/* CCMD_REG */
#define DMA_CCMD_ICC (((u64)1) << 63)
-@@ -187,158 +202,106 @@ static inline void dmar_writeq(void __io
+@@ -187,158 +202,106 @@
#define dma_frcd_source_id(c) (c & 0xffff)
#define dma_frcd_page_addr(d) (d & (((u64)-1) << 12)) /* low 64 bit */
-static inline void set_root_value(struct root_entry *root, unsigned long value)
-{
- root->val |= value & PAGE_MASK_4K;
--}
+#define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000) /* 10sec */
-
--struct context_entry;
--static inline struct context_entry *
--get_context_addr_from_root(struct root_entry *root)
--{
-- return (struct context_entry *)
-- (root_present(root)?phys_to_virt(
-- root->val & PAGE_MASK_4K):
-- NULL);
++
+#define IOMMU_WAIT_OP(iommu, offset, op, cond, sts) \
+{\
+ cycles_t start_time = get_cycles();\
+ }\
}
+-struct context_entry;
+-static inline struct context_entry *
+-get_context_addr_from_root(struct root_entry *root)
+-{
+- return (struct context_entry *)
+- (root_present(root)?phys_to_virt(
+- root->val & PAGE_MASK_4K):
+- NULL);
+-}
++#define QI_LENGTH 256 /* queue length */
+
-/*
- * low 64 bits:
- * 0: present
-#define context_set_domain_id(c, val) \
- do {(c).hi |= ((val) & ((1 << 16) - 1)) << 8;} while (0)
-#define context_clear_entry(c) do {(c).lo = 0; (c).hi = 0;} while (0)
-+#define QI_LENGTH 256 /* queue length */
-
+-
-/*
- * 0: readable
- * 1: writable
- */
-struct dma_pte {
- u64 val;
-+enum {
-+ QI_FREE,
-+ QI_IN_USE,
-+ QI_DONE
- };
+-};
-#define dma_clear_pte(p) do {(p).val = 0;} while (0)
-
-#define DMA_PTE_READ (1)
-#define DMA_PTE_WRITE (2)
-
+-
-#define dma_set_pte_readable(p) do {(p).val |= DMA_PTE_READ;} while (0)
-#define dma_set_pte_writable(p) do {(p).val |= DMA_PTE_WRITE;} while (0)
-#define dma_set_pte_prot(p, prot) \
- struct dma_pte *pgd; /* virtual address */
- spinlock_t mapping_lock; /* page table lock */
- int gaw; /* max guest address width */
+-
+- /* adjusted guest address width, 0 is level 2 30-bit */
+- int agaw;
+-
+-#define DOMAIN_FLAG_MULTIPLE_DEVICES 1
+- int flags;
++enum {
++ QI_FREE,
++ QI_IN_USE,
++ QI_DONE
+ };
+
+-/* PCI domain-device relationship */
+-struct device_domain_info {
+- struct list_head link; /* link to domain siblings */
+- struct list_head global; /* link to global list */
+- u8 bus; /* PCI bus numer */
+- u8 devfn; /* PCI devfn number */
+- struct pci_dev *dev; /* it's NULL for PCIE-to-PCI bridge */
+- struct dmar_domain *domain; /* pointer to domain */
+#define QI_CC_TYPE 0x1
+#define QI_IOTLB_TYPE 0x2
+#define QI_DIOTLB_TYPE 0x3
+#define QI_IEC_SELECTIVE (((u64)1) << 4)
+#define QI_IEC_IIDEX(idx) (((u64)(idx & 0xffff) << 32))
+#define QI_IEC_IM(m) (((u64)(m & 0x1f) << 27))
-
-- /* adjusted guest address width, 0 is level 2 30-bit */
-- int agaw;
++
+#define QI_IWD_STATUS_DATA(d) (((u64)d) << 32)
+#define QI_IWD_STATUS_WRITE (((u64)1) << 5)
-
--#define DOMAIN_FLAG_MULTIPLE_DEVICES 1
-- int flags;
++
+struct qi_desc {
+ u64 low, high;
};
--/* PCI domain-device relationship */
--struct device_domain_info {
-- struct list_head link; /* link to domain siblings */
-- struct list_head global; /* link to global list */
-- u8 bus; /* PCI bus numer */
-- u8 devfn; /* PCI devfn number */
-- struct pci_dev *dev; /* it's NULL for PCIE-to-PCI bridge */
-- struct dmar_domain *domain; /* pointer to domain */
+-extern int init_dmars(void);
+struct q_inval {
+ spinlock_t q_lock;
+ struct qi_desc *desc; /* invalidation queue */
+ int free_head; /* first free entry */
+ int free_tail; /* last free entry */
+ int free_cnt;
- };
-
--extern int init_dmars(void);
++};
++
+#ifdef CONFIG_INTR_REMAP
+/* 1MB - maximum possible interrupt remapping table size */
+#define INTR_REMAP_PAGE_ORDER 8
void __iomem *reg; /* Pointer to hardware regs, virtual addr */
u64 cap;
u64 ecap;
-- unsigned long *domain_ids; /* bitmap of domains */
-- struct dmar_domain **domains; /* ptr to domains */
- int seg;
- u32 gcmd; /* Holds TE, EAFL. Don't need SRTP, SFL, WBF */
-- spinlock_t lock; /* protect context, domain ids */
- spinlock_t register_lock; /* protect register handling */
++ int seg;
++ u32 gcmd; /* Holds TE, EAFL. Don't need SRTP, SFL, WBF */
++ spinlock_t register_lock; /* protect register handling */
+ int seq_id; /* sequence id of the iommu */
+
+#ifdef CONFIG_DMAR
-+ unsigned long *domain_ids; /* bitmap of domains */
-+ struct dmar_domain **domains; /* ptr to domains */
-+ spinlock_t lock; /* protect context, domain ids */
+ unsigned long *domain_ids; /* bitmap of domains */
+ struct dmar_domain **domains; /* ptr to domains */
+- int seg;
+- u32 gcmd; /* Holds TE, EAFL. Don't need SRTP, SFL, WBF */
+ spinlock_t lock; /* protect context, domain ids */
+- spinlock_t register_lock; /* protect register handling */
struct root_entry *root_entry; /* virtual address */
unsigned int irq;
+
+extern void qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu);
#endif
-diff -purN linux-2.6.27/drivers/pci/intr_remapping.c linux-2.6.27.19-5.1/drivers/pci/intr_remapping.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/intr_remapping.c 2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/pci/intr_remapping.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/pci/intr_remapping.c Wed May 06 16:56:30 2009 +0100
@@ -0,0 +1,471 @@
+#include <linux/dmar.h>
+#include <linux/spinlock.h>
+
+ return ir_supported;
+}
-diff -purN linux-2.6.27/drivers/pci/intr_remapping.h linux-2.6.27.19-5.1/drivers/pci/intr_remapping.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/intr_remapping.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/intr_remapping.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/pci/intr_remapping.h Wed May 06 16:56:30 2009 +0100
@@ -0,0 +1,8 @@
+#include "intel-iommu.h"
+
+};
+
+#define IR_X2APIC_MODE(mode) (mode ? (1 << 11) : 0)
-diff -purN linux-2.6.27/drivers/pci/msi-xen.c linux-2.6.27.19-5.1/drivers/pci/msi-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/msi-xen.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/msi-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/pci/msi-xen.c Wed May 06 16:56:30 2009 +0100
@@ -0,0 +1,790 @@
+/*
+ * File: msi.c
+ INIT_LIST_HEAD(&dev->msi_list);
+#endif
+}
-diff -purN linux-2.6.27/drivers/pci/msi.c linux-2.6.27.19-5.1/drivers/pci/msi.c
---- linux-2.6.27/drivers/pci/msi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/msi.c 2009-03-25 16:11:12.000000000 +0000
-@@ -757,6 +757,17 @@ void pci_no_msi(void)
+diff -r 9608d5473017 drivers/pci/msi.c
+--- a/drivers/pci/msi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/msi.c Wed May 06 16:56:30 2009 +0100
+@@ -757,6 +757,17 @@
pci_msi_enable = 0;
}
void pci_msi_init_pci_dev(struct pci_dev *dev)
{
INIT_LIST_HEAD(&dev->msi_list);
-diff -purN linux-2.6.27/drivers/pci/pci-acpi.c linux-2.6.27.19-5.1/drivers/pci/pci-acpi.c
---- linux-2.6.27/drivers/pci/pci-acpi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pci-acpi.c 2009-03-25 16:11:12.000000000 +0000
-@@ -35,6 +35,8 @@ struct acpi_osc_args {
+diff -r 9608d5473017 drivers/pci/pci-acpi.c
+--- a/drivers/pci/pci-acpi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pci-acpi.c Wed May 06 16:56:30 2009 +0100
+@@ -34,6 +34,8 @@
+ u32 capbuf[3];
u32 query_result;
};
-
-+static DEFINE_MUTEX(pci_acpi_lock);
+
++static DEFINE_MUTEX(pci_acpi_lock);
+
static struct acpi_osc_data *acpi_get_osc_data(acpi_handle handle)
{
- struct acpi_osc_data *data;
-@@ -118,32 +120,19 @@ out_kfree:
+@@ -118,24 +120,11 @@
return status;
}
- acpi_handle tmp;
+ u32 support_set;
struct acpi_osc_args osc_args;
-
+-
- status = acpi_get_handle(handle, "_OSC", &tmp);
- if (ACPI_FAILURE(status))
- return status;
- printk(KERN_ERR "acpi osc data array is full\n");
- return AE_ERROR;
- }
--
+
/* do _OSC query for all possible controls */
support_set = osc_data->support_set | (flags & OSC_SUPPORT_MASKS);
- osc_args.capbuf[OSC_QUERY_TYPE] = OSC_QUERY_ENABLE;
+@@ -143,7 +132,7 @@
osc_args.capbuf[OSC_SUPPORT_TYPE] = support_set;
osc_args.capbuf[OSC_CONTROL_TYPE] = OSC_CONTROL_MASKS;
if (ACPI_SUCCESS(status)) {
osc_data->support_set = support_set;
osc_data->query_result = osc_args.query_result;
-@@ -153,22 +142,35 @@ static acpi_status acpi_query_osc(acpi_h
+@@ -153,22 +142,35 @@
return status;
}
+ acpi_handle tmp;
+ struct acpi_osc_data *osc_data;
+ int rc = 0;
-+
-+ status = acpi_get_handle(handle, "_OSC", &tmp);
-+ if (ACPI_FAILURE(status))
-+ return -ENOTTY;
- acpi_get_devices(hid, acpi_query_osc,
- (void *)(unsigned long)flags, NULL);
- return AE_OK;
++ status = acpi_get_handle(handle, "_OSC", &tmp);
++ if (ACPI_FAILURE(status))
++ return -ENOTTY;
++
+ mutex_lock(&pci_acpi_lock);
+ osc_data = acpi_get_osc_data(handle);
+ if (!osc_data) {
}
/**
-@@ -190,19 +192,30 @@ acpi_status pci_osc_control_set(acpi_han
+@@ -190,19 +192,30 @@
if (ACPI_FAILURE(status))
return status;
control_set = osc_data->control_set | ctrlset;
osc_args.capbuf[OSC_QUERY_TYPE] = 0;
-@@ -211,7 +224,8 @@ acpi_status pci_osc_control_set(acpi_han
+@@ -211,7 +224,8 @@
status = acpi_run_osc(handle, &osc_args);
if (ACPI_SUCCESS(status))
osc_data->control_set = control_set;
return status;
}
EXPORT_SYMBOL(pci_osc_control_set);
-diff -purN linux-2.6.27/drivers/pci/pci-driver.c linux-2.6.27.19-5.1/drivers/pci/pci-driver.c
---- linux-2.6.27/drivers/pci/pci-driver.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pci-driver.c 2009-03-25 16:11:12.000000000 +0000
-@@ -287,6 +287,14 @@ static void pci_device_shutdown(struct d
+diff -r 9608d5473017 drivers/pci/pci-driver.c
+--- a/drivers/pci/pci-driver.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pci-driver.c Wed May 06 16:56:30 2009 +0100
+@@ -287,6 +287,14 @@
#ifdef CONFIG_PM_SLEEP
/*
* Default "suspend" method for devices that have no driver provided suspend,
* or not even a driver at all.
-@@ -304,14 +312,22 @@ static void pci_default_pm_suspend(struc
+@@ -304,14 +312,22 @@
/*
* Default "resume" method for devices that have no driver provided resume,
/* if the device was enabled before suspend, reenable */
retval = pci_reenable_device(pci_dev);
/*
-@@ -358,10 +374,12 @@ static int pci_legacy_resume(struct devi
+@@ -358,10 +374,12 @@
struct pci_dev * pci_dev = to_pci_dev(dev);
struct pci_driver * drv = pci_dev->driver;
return error;
}
-@@ -407,10 +425,8 @@ static int pci_pm_suspend(struct device
+@@ -407,10 +425,8 @@
if (drv->pm->suspend) {
error = drv->pm->suspend(dev);
suspend_report_result(drv->pm->suspend, error);
error = pci_legacy_suspend(dev, PMSG_SUSPEND);
}
pci_fixup_device(pci_fixup_suspend, pci_dev);
-@@ -429,8 +445,10 @@ static int pci_pm_suspend_noirq(struct d
+@@ -429,8 +445,10 @@
error = drv->pm->suspend_noirq(dev);
suspend_report_result(drv->pm->suspend_noirq, error);
}
-- } else {
+ } else if (pci_has_legacy_pm_support(pci_dev)) {
- error = pci_legacy_suspend_late(dev, PMSG_SUSPEND);
-+ } else {
++ error = pci_legacy_suspend_late(dev, PMSG_SUSPEND);
+ } else {
+- error = pci_legacy_suspend_late(dev, PMSG_SUSPEND);
+ pci_default_pm_suspend(pci_dev);
}
return error;
-@@ -440,15 +458,17 @@ static int pci_pm_resume(struct device *
+@@ -440,15 +458,17 @@
{
struct pci_dev *pci_dev = to_pci_dev(dev);
struct device_driver *drv = dev->driver;
if (drv && drv->pm) {
- error = drv->pm->resume ? drv->pm->resume(dev) :
- pci_default_pm_resume(pci_dev);
-- } else {
+ if (drv->pm->resume)
+ error = drv->pm->resume(dev);
+ } else if (pci_has_legacy_pm_support(pci_dev)) {
- error = pci_legacy_resume(dev);
-+ } else {
++ error = pci_legacy_resume(dev);
+ } else {
+- error = pci_legacy_resume(dev);
+ error = pci_default_pm_resume_late(pci_dev);
}
return error;
-@@ -465,8 +485,10 @@ static int pci_pm_resume_noirq(struct de
+@@ -465,8 +485,10 @@
if (drv && drv->pm) {
if (drv->pm->resume_noirq)
error = drv->pm->resume_noirq(dev);
-- } else {
+ } else if (pci_has_legacy_pm_support(pci_dev)) {
- error = pci_legacy_resume_early(dev);
-+ } else {
++ error = pci_legacy_resume_early(dev);
+ } else {
+- error = pci_legacy_resume_early(dev);
+ pci_default_pm_resume_early(pci_dev);
}
return error;
-@@ -493,10 +515,8 @@ static int pci_pm_freeze(struct device *
+@@ -493,10 +515,8 @@
if (drv->pm->freeze) {
error = drv->pm->freeze(dev);
suspend_report_result(drv->pm->freeze, error);
error = pci_legacy_suspend(dev, PMSG_FREEZE);
pci_fixup_device(pci_fixup_suspend, pci_dev);
}
-@@ -515,8 +535,10 @@ static int pci_pm_freeze_noirq(struct de
+@@ -515,8 +535,10 @@
error = drv->pm->freeze_noirq(dev);
suspend_report_result(drv->pm->freeze_noirq, error);
}
-- } else {
+ } else if (pci_has_legacy_pm_support(pci_dev)) {
- error = pci_legacy_suspend_late(dev, PMSG_FREEZE);
-+ } else {
++ error = pci_legacy_suspend_late(dev, PMSG_FREEZE);
+ } else {
+- error = pci_legacy_suspend_late(dev, PMSG_FREEZE);
+ pci_default_pm_suspend(pci_dev);
}
return error;
-@@ -524,14 +546,15 @@ static int pci_pm_freeze_noirq(struct de
+@@ -524,14 +546,15 @@
static int pci_pm_thaw(struct device *dev)
{
error = pci_legacy_resume(dev);
}
-@@ -547,7 +570,7 @@ static int pci_pm_thaw_noirq(struct devi
+@@ -547,7 +570,7 @@
if (drv && drv->pm) {
if (drv->pm->thaw_noirq)
error = drv->pm->thaw_noirq(dev);
pci_fixup_device(pci_fixup_resume_early, pci_dev);
error = pci_legacy_resume_early(dev);
}
-@@ -557,17 +580,18 @@ static int pci_pm_thaw_noirq(struct devi
+@@ -557,17 +580,18 @@
static int pci_pm_poweroff(struct device *dev)
{
error = pci_legacy_suspend(dev, PMSG_HIBERNATE);
}
-@@ -585,7 +609,7 @@ static int pci_pm_poweroff_noirq(struct
+@@ -585,7 +609,7 @@
error = drv->pm->poweroff_noirq(dev);
suspend_report_result(drv->pm->poweroff_noirq, error);
}
error = pci_legacy_suspend_late(dev, PMSG_HIBERNATE);
}
-@@ -596,13 +620,15 @@ static int pci_pm_restore(struct device
+@@ -596,13 +620,15 @@
{
struct pci_dev *pci_dev = to_pci_dev(dev);
struct device_driver *drv = dev->driver;
if (drv && drv->pm) {
- error = drv->pm->restore ? drv->pm->restore(dev) :
- pci_default_pm_resume(pci_dev);
-- } else {
+ if (drv->pm->restore)
+ error = drv->pm->restore(dev);
+ } else if (pci_has_legacy_pm_support(pci_dev)) {
- error = pci_legacy_resume(dev);
-+ } else {
++ error = pci_legacy_resume(dev);
+ } else {
+- error = pci_legacy_resume(dev);
+ error = pci_default_pm_resume_late(pci_dev);
}
pci_fixup_device(pci_fixup_resume, pci_dev);
-@@ -620,8 +646,10 @@ static int pci_pm_restore_noirq(struct d
+@@ -620,8 +646,10 @@
if (drv && drv->pm) {
if (drv->pm->restore_noirq)
error = drv->pm->restore_noirq(dev);
-- } else {
+ } else if (pci_has_legacy_pm_support(pci_dev)) {
- error = pci_legacy_resume_early(dev);
-+ } else {
++ error = pci_legacy_resume_early(dev);
+ } else {
+- error = pci_legacy_resume_early(dev);
+ pci_default_pm_resume_early(pci_dev);
}
pci_fixup_device(pci_fixup_resume_early, pci_dev);
-diff -purN linux-2.6.27/drivers/pci/pci-sysfs.c linux-2.6.27.19-5.1/drivers/pci/pci-sysfs.c
---- linux-2.6.27/drivers/pci/pci-sysfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pci-sysfs.c 2009-03-25 16:11:12.000000000 +0000
-@@ -694,8 +694,8 @@ pci_read_rom(struct kobject *kobj, struc
+diff -r 9608d5473017 drivers/pci/pci-sysfs.c
+--- a/drivers/pci/pci-sysfs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pci-sysfs.c Wed May 06 16:56:30 2009 +0100
+@@ -694,8 +694,8 @@
return -EINVAL;
rom = pci_map_rom(pdev, &size); /* size starts out as PCI window size */
if (off >= size)
count = 0;
-diff -purN linux-2.6.27/drivers/pci/pci.c linux-2.6.27.19-5.1/drivers/pci/pci.c
---- linux-2.6.27/drivers/pci/pci.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pci.c 2009-03-25 16:11:12.000000000 +0000
-@@ -353,7 +353,12 @@ pci_find_parent_resource(const struct pc
+diff -r 9608d5473017 drivers/pci/pci.c
+--- a/drivers/pci/pci.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pci.c Wed May 06 16:56:30 2009 +0100
+@@ -353,7 +353,12 @@
* Restore the BAR values for a given device, so as to make it
* accessible by its driver.
*/
pci_restore_bars(struct pci_dev *dev)
{
int i, numres;
-@@ -636,19 +641,14 @@ static int pci_save_pcie_state(struct pc
+@@ -636,19 +641,14 @@
int pos, i = 0;
struct pci_cap_saved_state *save_state;
u16 *cap;
return -ENOMEM;
}
cap = (u16 *)&save_state->data[0];
-@@ -657,9 +657,7 @@ static int pci_save_pcie_state(struct pc
+@@ -657,9 +657,7 @@
pci_read_config_word(dev, pos + PCI_EXP_LNKCTL, &cap[i++]);
pci_read_config_word(dev, pos + PCI_EXP_SLTCTL, &cap[i++]);
pci_read_config_word(dev, pos + PCI_EXP_RTCTL, &cap[i++]);
return 0;
}
-@@ -684,30 +682,21 @@ static void pci_restore_pcie_state(struc
+@@ -684,30 +682,21 @@
static int pci_save_pcix_state(struct pci_dev *dev)
{
return 0;
}
-@@ -726,6 +715,50 @@ static void pci_restore_pcix_state(struc
+@@ -726,6 +715,50 @@
pci_write_config_word(dev, pos + PCI_X_CMD, cap[i++]);
}
/**
* pci_save_state - save the PCI configuration space of a device before suspending
-@@ -1871,6 +1904,19 @@ static void __devinit pci_no_domains(voi
+@@ -1871,6 +1904,19 @@
#endif
}
static int __devinit pci_init(void)
{
struct pci_dev *dev = NULL;
-diff -purN linux-2.6.27/drivers/pci/pci.h linux-2.6.27.19-5.1/drivers/pci/pci.h
---- linux-2.6.27/drivers/pci/pci.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pci.h 2009-03-25 16:11:12.000000000 +0000
-@@ -35,6 +35,7 @@ struct pci_platform_pm_ops {
+diff -r 9608d5473017 drivers/pci/pci.h
+--- a/drivers/pci/pci.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pci.h Wed May 06 16:56:30 2009 +0100
+@@ -35,6 +35,7 @@
extern int pci_set_platform_pm(struct pci_platform_pm_ops *ops);
extern void pci_pm_init(struct pci_dev *dev);
extern int pci_user_read_config_byte(struct pci_dev *dev, int where, u8 *val);
extern int pci_user_read_config_word(struct pci_dev *dev, int where, u16 *val);
-@@ -144,3 +145,9 @@ struct pci_slot_attribute {
+@@ -144,3 +145,9 @@
};
#define to_pci_slot_attr(s) container_of(s, struct pci_slot_attribute, attr)
+#else
+#define is_reassigndev(dev) 0
+#endif
-diff -purN linux-2.6.27/drivers/pci/pcie/aer/aerdrv_acpi.c linux-2.6.27.19-5.1/drivers/pci/pcie/aer/aerdrv_acpi.c
---- linux-2.6.27/drivers/pci/pcie/aer/aerdrv_acpi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pcie/aer/aerdrv_acpi.c 2009-03-25 16:11:13.000000000 +0000
-@@ -38,7 +38,6 @@ int aer_osc_setup(struct pcie_device *pc
+diff -r 9608d5473017 drivers/pci/pcie/aer/aerdrv_acpi.c
+--- a/drivers/pci/pcie/aer/aerdrv_acpi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pcie/aer/aerdrv_acpi.c Wed May 06 16:56:30 2009 +0100
+@@ -38,7 +38,6 @@
handle = acpi_find_root_bridge_handle(pdev);
if (handle) {
status = pci_osc_control_set(handle,
OSC_PCI_EXPRESS_AER_CONTROL |
OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL);
-diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/pcie/aspm.c
---- linux-2.6.27/drivers/pci/pcie/aspm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pcie/aspm.c 2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/pci/pcie/aspm.c
+--- a/drivers/pci/pcie/aspm.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pcie/aspm.c Wed May 06 16:56:30 2009 +0100
@@ -16,6 +16,7 @@
#include <linux/pm.h>
#include <linux/init.h>
#include <linux/pci-aspm.h>
#include "../pci.h"
-@@ -32,6 +33,11 @@ struct endpoint_state {
+@@ -32,6 +33,11 @@
struct pcie_link_state {
struct list_head sibiling;
struct pci_dev *pdev;
/* ASPM state */
unsigned int support_state;
-@@ -124,7 +130,7 @@ static void pcie_set_clock_pm(struct pci
+@@ -124,7 +130,7 @@
link_state->clk_pm_enabled = !!enable;
}
{
int pos;
u32 reg32;
-@@ -148,10 +154,26 @@ static void pcie_check_clock_pm(struct p
+@@ -148,10 +154,26 @@
if (!(reg16 & PCI_EXP_LNKCTL_CLKREQ_EN))
enabled = 0;
}
}
/*
-@@ -161,11 +183,12 @@ static void pcie_check_clock_pm(struct p
+@@ -161,11 +183,12 @@
*/
static void pcie_aspm_configure_common_clock(struct pci_dev *pdev)
{
/*
* all functions of a slot should have the same Slot Clock
* Configuration, so just check one function
-@@ -191,16 +214,19 @@ static void pcie_aspm_configure_common_c
+@@ -191,16 +214,19 @@
child_pos = pci_find_capability(child_dev, PCI_CAP_ID_EXP);
pci_read_config_word(child_dev, child_pos + PCI_EXP_LNKCTL,
®16);
if (same_clock)
reg16 |= PCI_EXP_LNKCTL_CCC;
else
-@@ -212,12 +238,30 @@ static void pcie_aspm_configure_common_c
+@@ -212,11 +238,29 @@
pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, reg16);
/* Wait for link training end */
if (!(reg16 & PCI_EXP_LNKSTA_LT))
break;
cpu_relax();
- }
++ }
+ /* training failed -> recover */
+ if ((jiffies - start_jiffies) >= HZ) {
+ dev_printk (KERN_ERR, &pdev->dev, "ASPM: Could not configure"
+ i++;
+ }
+ pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, parent_reg);
-+ }
+ }
}
- /*
-@@ -396,9 +440,9 @@ static unsigned int pcie_aspm_check_stat
+@@ -396,9 +440,9 @@
{
struct pci_dev *child_dev;
list_for_each_entry(child_dev, &pdev->subordinate->devices, bus_list) {
if (child_dev->pcie_type == PCI_EXP_TYPE_PCI_BRIDGE) {
/*
-@@ -439,6 +483,9 @@ static void __pcie_aspm_config_link(stru
+@@ -439,6 +483,9 @@
int valid = 1;
struct pcie_link_state *link_state = pdev->link_state;
/*
* if the downstream component has pci bridge function, don't do ASPM
* now
-@@ -470,20 +517,52 @@ static void __pcie_aspm_config_link(stru
+@@ -470,20 +517,52 @@
link_state->enabled_state = state;
}
}
/*
-@@ -547,6 +626,7 @@ void pcie_aspm_init_link_state(struct pc
+@@ -547,6 +626,7 @@
unsigned int state;
struct pcie_link_state *link_state;
int error = 0;
if (aspm_disabled || !pdev->is_pcie || pdev->link_state)
return;
-@@ -557,29 +637,58 @@ void pcie_aspm_init_link_state(struct pc
+@@ -557,28 +637,57 @@
if (list_empty(&pdev->subordinate->devices))
goto out;
link_state = kzalloc(sizeof(*link_state), GFP_KERNEL);
if (!link_state)
goto unlock_out;
-- pdev->link_state = link_state;
--
-- pcie_aspm_configure_common_clock(pdev);
-
-- pcie_aspm_cap_init(pdev);
++
+ link_state->downstream_has_switch = pcie_aspm_downstream_has_switch(pdev);
+ INIT_LIST_HEAD(&link_state->children);
+ INIT_LIST_HEAD(&link_state->link);
+ list_add(&link_state->link, &parent_link_state->children);
+ link_state->parent = parent_link_state;
+ }
++
+ pdev->link_state = link_state;
+- pcie_aspm_configure_common_clock(pdev);
+-
+- pcie_aspm_cap_init(pdev);
+-
- /* config link state to avoid BIOS error */
- state = pcie_aspm_check_state(pdev, policy_to_aspm_state(pdev));
- __pcie_aspm_config_link(pdev, state);
-+ pdev->link_state = link_state;
-
+-
- pcie_check_clock_pm(pdev);
+ if (!blacklist) {
+ pcie_aspm_configure_common_clock(pdev);
link_state->pdev = pdev;
list_add(&link_state->sibiling, &link_list);
-
++
+ if (link_state->downstream_has_switch) {
+ /*
+ * If link has switch, delay the link config. The leaf link
+ policy_to_aspm_state(pdev));
+
+ pcie_check_clock_pm(pdev, blacklist);
-+
+
unlock_out:
if (error)
- free_link_state(pdev);
-@@ -604,14 +713,15 @@ void pcie_aspm_exit_link_state(struct pc
+@@ -604,14 +713,15 @@
/*
* All PCIe functions are in one slot, remove one function will remove
/* Clock PM is for endpoint device */
free_link_state(parent);
-@@ -834,24 +944,15 @@ void pcie_no_aspm(void)
+@@ -834,24 +944,15 @@
aspm_disabled = 1;
}
{
- pcie_osc_support_set(OSC_ACTIVE_STATE_PWR_SUPPORT|
- OSC_CLOCK_PWR_CAPABILITY_SUPPORT);
--}
++ return !aspm_disabled;
+ }
-#else
-static inline void pcie_aspm_platform_init(void) { }
-#endif
--
++EXPORT_SYMBOL(pcie_aspm_enabled);
+
-static int __init pcie_aspm_init(void)
-{
- if (aspm_disabled)
- return 0;
- pcie_aspm_platform_init();
- return 0;
-+ return !aspm_disabled;
- }
-+EXPORT_SYMBOL(pcie_aspm_enabled);
-
+-}
+-
-fs_initcall(pcie_aspm_init);
-diff -purN linux-2.6.27/drivers/pci/pcie/portdrv_pci.c linux-2.6.27.19-5.1/drivers/pci/pcie/portdrv_pci.c
---- linux-2.6.27/drivers/pci/pcie/portdrv_pci.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pcie/portdrv_pci.c 2009-03-25 16:11:13.000000000 +0000
-@@ -41,7 +41,6 @@ static int pcie_portdrv_restore_config(s
+diff -r 9608d5473017 drivers/pci/pcie/portdrv_pci.c
+--- a/drivers/pci/pcie/portdrv_pci.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pcie/portdrv_pci.c Wed May 06 16:56:30 2009 +0100
+@@ -41,7 +41,6 @@
{
int retval;
retval = pci_enable_device(dev);
if (retval)
return retval;
-@@ -52,11 +51,18 @@ static int pcie_portdrv_restore_config(s
+@@ -52,11 +51,18 @@
#ifdef CONFIG_PM
static int pcie_portdrv_suspend(struct pci_dev *dev, pm_message_t state)
{
}
static int pcie_portdrv_resume(struct pci_dev *dev)
-@@ -66,6 +72,8 @@ static int pcie_portdrv_resume(struct pc
+@@ -66,6 +72,8 @@
}
#else
#define pcie_portdrv_suspend NULL
#define pcie_portdrv_resume NULL
#endif
-@@ -221,6 +229,7 @@ static pci_ers_result_t pcie_portdrv_slo
+@@ -221,6 +229,7 @@
/* If fatal, restore cfg space for possible link reset at upstream */
if (dev->error_state == pci_channel_io_frozen) {
pcie_portdrv_restore_config(dev);
pci_enable_pcie_error_reporting(dev);
}
-@@ -283,6 +292,8 @@ static struct pci_driver pcie_portdriver
+@@ -283,6 +292,8 @@
.remove = pcie_portdrv_remove,
.suspend = pcie_portdrv_suspend,
.resume = pcie_portdrv_resume,
.err_handler = &pcie_portdrv_err_handler,
-diff -purN linux-2.6.27/drivers/pci/probe.c linux-2.6.27.19-5.1/drivers/pci/probe.c
---- linux-2.6.27/drivers/pci/probe.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/probe.c 2009-03-25 16:11:12.000000000 +0000
-@@ -219,7 +219,7 @@ static inline enum pci_bar_type decode_b
+diff -r 9608d5473017 drivers/pci/probe.c
+--- a/drivers/pci/probe.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/probe.c Wed May 06 16:56:30 2009 +0100
+@@ -219,7 +219,7 @@
res->flags = bar & ~PCI_BASE_ADDRESS_MEM_MASK;
return pci_bar_mem64;
return pci_bar_mem32;
}
-@@ -1028,6 +1028,9 @@ void pci_device_add(struct pci_dev *dev,
+@@ -1028,6 +1028,9 @@
/* Fix up broken headers */
pci_fixup_device(pci_fixup_header, dev);
/* Initialize power management of the device */
pci_pm_init(dev);
-diff -purN linux-2.6.27/drivers/pci/quirks.c linux-2.6.27.19-5.1/drivers/pci/quirks.c
---- linux-2.6.27/drivers/pci/quirks.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/quirks.c 2009-03-25 16:11:12.000000000 +0000
-@@ -24,6 +24,52 @@
+diff -r 9608d5473017 drivers/pci/quirks.c
+--- a/drivers/pci/quirks.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/quirks.c Wed May 06 16:56:30 2009 +0100
+@@ -23,6 +23,52 @@
+ #include <linux/acpi.h>
#include <linux/kallsyms.h>
#include "pci.h"
-
++
+#ifdef CONFIG_PCI_REASSIGN
+/*
+ * This quirk function disables the device and releases resources
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_release_resources);
+#endif
-+
+
/* The Mellanox Tavor device gives false positive parity errors
* Mark this device with a broken_parity_status, to allow
- * PCI scanning code to "skip" this now blacklisted device.
-@@ -602,27 +648,6 @@ static void __init quirk_ioapic_rmw(stru
+@@ -602,27 +648,6 @@
sis_apic_bug = 1;
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_ANY_ID, quirk_ioapic_rmw);
#endif /* CONFIG_X86_IO_APIC */
/*
-@@ -1422,6 +1447,160 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
+@@ -1422,6 +1447,160 @@
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260a, quirk_intel_pcie_pm);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260b, quirk_intel_pcie_pm);
/*
* Toshiba TC86C001 IDE controller reports the standard 8-byte BAR0 size
* but the PIO transfers won't work if BAR0 falls at the odd 8 bytes.
-@@ -1807,6 +1986,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AT
+@@ -1807,6 +1986,7 @@
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3336, quirk_disable_all_msi);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi);
/* Disable MSI on chipsets that are known to not support it */
static void __devinit quirk_disable_msi(struct pci_dev *dev)
-diff -purN linux-2.6.27/drivers/pci/reassigndev.c linux-2.6.27.19-5.1/drivers/pci/reassigndev.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/reassigndev.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/reassigndev.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/pci/reassigndev.c Wed May 06 16:56:30 2009 +0100
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2008, NEC Corporation.
+
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/pci/rom.c linux-2.6.27.19-5.1/drivers/pci/rom.c
---- linux-2.6.27/drivers/pci/rom.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/rom.c 2009-03-25 16:11:12.000000000 +0000
-@@ -63,7 +63,7 @@ static void pci_disable_rom(struct pci_d
+diff -r 9608d5473017 drivers/pci/rom.c
+--- a/drivers/pci/rom.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/rom.c Wed May 06 16:56:30 2009 +0100
+@@ -63,7 +63,7 @@
* The PCI window size could be much larger than the
* actual image size.
*/
{
void __iomem *image;
int last_image;
-@@ -72,8 +72,10 @@ size_t pci_get_rom_size(void __iomem *ro
+@@ -72,8 +72,10 @@
do {
void __iomem *pds;
/* Standard PCI ROMs start out with these bytes 55 AA */
if (readb(image + 1) != 0xAA)
break;
/* get the PCI data structure and check its signature */
-@@ -158,7 +160,7 @@ void __iomem *pci_map_rom(struct pci_dev
+@@ -158,7 +160,7 @@
* size is much larger than the actual size of the ROM.
* True size is important if the ROM is going to be copied.
*/
return rom;
}
-diff -purN linux-2.6.27/drivers/pci/setup-bus.c linux-2.6.27.19-5.1/drivers/pci/setup-bus.c
---- linux-2.6.27/drivers/pci/setup-bus.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/setup-bus.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/setup-bus.c
+--- a/drivers/pci/setup-bus.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/setup-bus.c Wed May 06 16:56:30 2009 +0100
@@ -26,6 +26,7 @@
#include <linux/cache.h>
#include <linux/slab.h>
static void pbus_assign_resources_sorted(struct pci_bus *bus)
{
-@@ -343,7 +344,8 @@ static int pbus_size_mem(struct pci_bus
+@@ -343,7 +344,8 @@
list_for_each_entry(dev, &bus->devices, bus_list) {
int i;
for (i = 0; i < PCI_NUM_RESOURCES; i++) {
struct resource *r = &dev->resource[i];
resource_size_t r_size;
-@@ -351,6 +353,10 @@ static int pbus_size_mem(struct pci_bus
+@@ -351,6 +353,10 @@
if (r->parent || (r->flags & mask) != type)
continue;
r_size = r->end - r->start + 1;
/* For bridges size != alignment */
align = resource_alignment(r);
order = __ffs(align) - 20;
-diff -purN linux-2.6.27/drivers/pci/setup-res.c linux-2.6.27.19-5.1/drivers/pci/setup-res.c
---- linux-2.6.27/drivers/pci/setup-res.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/setup-res.c 2009-03-25 16:11:12.000000000 +0000
-@@ -126,6 +126,21 @@ int pci_claim_resource(struct pci_dev *d
+diff -r 9608d5473017 drivers/pci/setup-res.c
+--- a/drivers/pci/setup-res.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/setup-res.c Wed May 06 16:56:30 2009 +0100
+@@ -126,6 +126,21 @@
return err;
}
int pci_assign_resource(struct pci_dev *dev, int resno)
{
struct pci_bus *bus = dev->bus;
-@@ -144,6 +159,10 @@ int pci_assign_resource(struct pci_dev *
+@@ -144,6 +159,10 @@
(unsigned long long)res->end, res->flags);
return -EINVAL;
}
/* First, try exact prefetching match.. */
ret = pci_bus_alloc_resource(bus, res, size, align, min,
-@@ -169,8 +188,15 @@ int pci_assign_resource(struct pci_dev *
+@@ -169,8 +188,15 @@
(unsigned long long)res->end);
} else {
res->flags &= ~IORESOURCE_STARTALIGN;
}
return ret;
-@@ -208,6 +234,12 @@ int pci_assign_resource_fixed(struct pci
+@@ -208,6 +234,12 @@
(unsigned long long)res->start,
(unsigned long long)res->end);
} else if (resno < PCI_BRIDGE_RESOURCES) {
pci_update_resource(dev, res, resno);
}
-@@ -220,6 +252,7 @@ EXPORT_SYMBOL_GPL(pci_assign_resource_fi
+@@ -220,6 +252,7 @@
void pdev_sort_resources(struct pci_dev *dev, struct resource_list *head)
{
int i;
for (i = 0; i < PCI_NUM_RESOURCES; i++) {
struct resource *r;
-@@ -242,12 +275,22 @@ void pdev_sort_resources(struct pci_dev
+@@ -242,12 +275,22 @@
(unsigned long long)r->end, r->flags);
continue;
}
if (r_align > align) {
tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
-diff -purN linux-2.6.27/drivers/pci/slot.c linux-2.6.27.19-5.1/drivers/pci/slot.c
---- linux-2.6.27/drivers/pci/slot.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/slot.c 2009-03-25 16:11:12.000000000 +0000
-@@ -73,18 +73,100 @@ static struct kobj_type pci_slot_ktype =
+diff -r 9608d5473017 drivers/pci/slot.c
+--- a/drivers/pci/slot.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/slot.c Wed May 06 16:56:30 2009 +0100
+@@ -73,18 +73,100 @@
.default_attrs = pci_slot_default_attrs,
};
*
* Placeholder slots:
* In most cases, @pci_bus, @slot_nr will be sufficient to uniquely identify
-@@ -93,12 +175,8 @@ static struct kobj_type pci_slot_ktype =
+@@ -93,12 +175,8 @@
* the slot. In this scenario, the caller may pass -1 for @slot_nr.
*
* The following semantics are imposed when the caller passes @slot_nr ==
* user-visible, which is the 'address' parameter presented in sysfs will
* consist solely of a dddd:bb tuple, where dddd is the PCI domain of the
* %struct pci_bus and bb is the bus number. In other words, the devfn of
-@@ -106,47 +184,57 @@ static struct kobj_type pci_slot_ktype =
+@@ -106,46 +184,56 @@
*/
struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
+ err = -ENOMEM;
goto err;
}
-
++
+ err = kobject_init_and_add(&slot->kobj, &pci_slot_ktype, NULL,
+ "%s", slot_name);
+ if (err)
+ goto err;
-+
+
INIT_LIST_HEAD(&slot->list);
list_add(&slot->list, &parent->slots);
-
-@@ -154,10 +242,11 @@ placeholder:
+@@ -154,10 +242,11 @@
pr_debug("%s: created pci_slot on %04x:%02x:%02x\n",
__func__, pci_domain_nr(parent), parent->number, slot_nr);
kfree(slot);
slot = ERR_PTR(err);
goto out;
-@@ -203,7 +292,6 @@ EXPORT_SYMBOL_GPL(pci_update_slot_number
+@@ -203,7 +292,6 @@
* just call kobject_put on its kobj and let our release methods do the
* rest.
*/
void pci_destroy_slot(struct pci_slot *slot)
{
pr_debug("%s: dec refcount to %d on %04x:%02x:%02x\n", __func__,
-diff -purN linux-2.6.27/drivers/pci/syscall.c linux-2.6.27.19-5.1/drivers/pci/syscall.c
---- linux-2.6.27/drivers/pci/syscall.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/syscall.c 2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/pci/syscall.c
+--- a/drivers/pci/syscall.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/syscall.c Wed May 06 16:56:30 2009 +0100
@@ -14,10 +14,8 @@
#include <asm/uaccess.h>
#include "pci.h"
{
struct pci_dev *dev;
u8 byte;
-@@ -86,10 +84,8 @@ error:
+@@ -86,10 +84,8 @@
return err;
}
{
struct pci_dev *dev;
u8 byte;
-diff -purN linux-2.6.27/drivers/pcmcia/electra_cf.c linux-2.6.27.19-5.1/drivers/pcmcia/electra_cf.c
---- linux-2.6.27/drivers/pcmcia/electra_cf.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pcmcia/electra_cf.c 2009-03-25 16:11:18.000000000 +0000
-@@ -356,6 +356,7 @@ static struct of_device_id electra_cf_ma
+diff -r 9608d5473017 drivers/pcmcia/electra_cf.c
+--- a/drivers/pcmcia/electra_cf.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pcmcia/electra_cf.c Wed May 06 16:56:30 2009 +0100
+@@ -356,6 +356,7 @@
MODULE_DEVICE_TABLE(of, electra_cf_match);
static struct of_platform_driver electra_cf_driver = {
.name = (char *)driver_name,
.match_table = electra_cf_match,
.probe = electra_cf_probe,
-diff -purN linux-2.6.27/drivers/pcmcia/m8xx_pcmcia.c linux-2.6.27.19-5.1/drivers/pcmcia/m8xx_pcmcia.c
---- linux-2.6.27/drivers/pcmcia/m8xx_pcmcia.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pcmcia/m8xx_pcmcia.c 2009-03-25 16:11:18.000000000 +0000
-@@ -1319,6 +1319,7 @@ static struct of_device_id m8xx_pcmcia_m
+diff -r 9608d5473017 drivers/pcmcia/m8xx_pcmcia.c
+--- a/drivers/pcmcia/m8xx_pcmcia.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pcmcia/m8xx_pcmcia.c Wed May 06 16:56:30 2009 +0100
+@@ -1319,6 +1319,7 @@
MODULE_DEVICE_TABLE(of, m8xx_pcmcia_match);
static struct of_platform_driver m8xx_pcmcia_driver = {
.name = driver_name,
.match_table = m8xx_pcmcia_match,
.probe = m8xx_probe,
-diff -purN linux-2.6.27/drivers/pnp/base.h linux-2.6.27.19-5.1/drivers/pnp/base.h
---- linux-2.6.27/drivers/pnp/base.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pnp/base.h 2009-03-25 16:11:23.000000000 +0000
-@@ -147,7 +147,7 @@ char *pnp_resource_type_name(struct reso
+diff -r 9608d5473017 drivers/pnp/base.h
+--- a/drivers/pnp/base.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pnp/base.h Wed May 06 16:56:30 2009 +0100
+@@ -147,7 +147,7 @@
void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc);
void pnp_free_resources(struct pnp_dev *dev);
struct pnp_resource {
struct list_head list;
-diff -purN linux-2.6.27/drivers/pnp/pnpacpi/core.c linux-2.6.27.19-5.1/drivers/pnp/pnpacpi/core.c
---- linux-2.6.27/drivers/pnp/pnpacpi/core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pnp/pnpacpi/core.c 2009-03-25 16:11:23.000000000 +0000
-@@ -148,9 +148,13 @@ static int __init pnpacpi_add_device(str
+diff -r 9608d5473017 drivers/pnp/pnpacpi/core.c
+--- a/drivers/pnp/pnpacpi/core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pnp/pnpacpi/core.c Wed May 06 16:56:30 2009 +0100
+@@ -148,9 +148,13 @@
acpi_status status;
struct pnp_dev *dev;
return 0;
dev = pnp_alloc_dev(&pnpacpi_protocol, num, acpi_device_hid(device));
-diff -purN linux-2.6.27/drivers/pnp/quirks.c linux-2.6.27.19-5.1/drivers/pnp/quirks.c
---- linux-2.6.27/drivers/pnp/quirks.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pnp/quirks.c 2009-03-25 16:11:23.000000000 +0000
-@@ -245,7 +245,7 @@ static void quirk_system_pci_resources(s
+diff -r 9608d5473017 drivers/pnp/quirks.c
+--- a/drivers/pnp/quirks.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pnp/quirks.c Wed May 06 16:56:30 2009 +0100
+@@ -245,7 +245,7 @@
*/
for_each_pci_dev(pdev) {
for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
type = pci_resource_flags(pdev, i) &
(IORESOURCE_IO | IORESOURCE_MEM);
-diff -purN linux-2.6.27/drivers/pnp/resource.c linux-2.6.27.19-5.1/drivers/pnp/resource.c
---- linux-2.6.27/drivers/pnp/resource.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pnp/resource.c 2009-03-25 16:11:23.000000000 +0000
-@@ -467,14 +467,14 @@ int pnp_check_dma(struct pnp_dev *dev, s
+diff -r 9608d5473017 drivers/pnp/resource.c
+--- a/drivers/pnp/resource.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pnp/resource.c Wed May 06 16:56:30 2009 +0100
+@@ -467,14 +467,14 @@
#endif
}
{
struct pnp_resource *pnp_res;
struct resource *res;
-diff -purN linux-2.6.27/drivers/ps3/ps3av.c linux-2.6.27.19-5.1/drivers/ps3/ps3av.c
---- linux-2.6.27/drivers/ps3/ps3av.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ps3/ps3av.c 2009-03-25 16:11:24.000000000 +0000
-@@ -59,8 +59,6 @@ static struct ps3av {
+diff -r 9608d5473017 drivers/ps3/ps3av.c
+--- a/drivers/ps3/ps3av.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ps3/ps3av.c Wed May 06 16:56:30 2009 +0100
+@@ -59,8 +59,6 @@
struct ps3av_reply_hdr reply_hdr;
u8 raw[PS3AV_BUF_SIZE];
} recv_buf;
} *ps3av;
/* color space */
-@@ -915,6 +913,22 @@ int ps3av_video_mute(int mute)
+@@ -915,6 +913,22 @@
EXPORT_SYMBOL_GPL(ps3av_video_mute);
int ps3av_audio_mute(int mute)
{
return ps3av_set_audio_mute(mute ? PS3AV_CMD_MUTE_ON
-@@ -923,24 +937,6 @@ int ps3av_audio_mute(int mute)
+@@ -922,24 +936,6 @@
+ }
EXPORT_SYMBOL_GPL(ps3av_audio_mute);
-
+-
-void ps3av_register_flip_ctl(void (*flip_ctl)(int on, void *data),
- void *flip_data)
-{
- ps3av->flip_ctl(on, ps3av->flip_data);
- mutex_unlock(&ps3av->mutex);
-}
--
+
static int ps3av_probe(struct ps3_system_bus_device *dev)
{
- int res;
-diff -purN linux-2.6.27/drivers/ps3/ps3av_cmd.c linux-2.6.27.19-5.1/drivers/ps3/ps3av_cmd.c
---- linux-2.6.27/drivers/ps3/ps3av_cmd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ps3/ps3av_cmd.c 2009-03-25 16:11:24.000000000 +0000
-@@ -660,9 +660,10 @@ u32 ps3av_cmd_set_av_audio_param(void *p
+diff -r 9608d5473017 drivers/ps3/ps3av_cmd.c
+--- a/drivers/ps3/ps3av_cmd.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ps3/ps3av_cmd.c Wed May 06 16:56:31 2009 +0100
+@@ -660,9 +660,10 @@
}
/* default cs val */
#define CS_44 0x00
#define CS_48 0x02
-@@ -677,7 +678,7 @@ void ps3av_cmd_set_audio_mode(struct ps3
+@@ -677,7 +678,7 @@
u32 ch, u32 fs, u32 word_bits, u32 format,
u32 source)
{
int i;
if (!(ch | fs | format | word_bits | source)) {
-@@ -687,7 +688,6 @@ void ps3av_cmd_set_audio_mode(struct ps3
+@@ -687,7 +688,6 @@
format = PS3AV_CMD_AUDIO_FORMAT_PCM;
source = PS3AV_CMD_AUDIO_SOURCE_SERIAL;
}
/* audio mode */
memset(audio, 0, sizeof(*audio));
-@@ -777,16 +777,17 @@ void ps3av_cmd_set_audio_mode(struct ps3
+@@ -777,16 +777,17 @@
break;
}
}
}
-@@ -863,7 +864,7 @@ int ps3av_cmd_avb_param(struct ps3av_pkt
+@@ -863,7 +864,7 @@
{
int res;
/* avb packet */
res = ps3av_do_pkt(PS3AV_CID_AVB_PARAM, send_len, sizeof(*avb),
-@@ -877,7 +878,7 @@ int ps3av_cmd_avb_param(struct ps3av_pkt
+@@ -877,7 +878,7 @@
res);
out:
return res;
}
-diff -purN linux-2.6.27/drivers/rtc/rtc-cmos.c linux-2.6.27.19-5.1/drivers/rtc/rtc-cmos.c
---- linux-2.6.27/drivers/rtc/rtc-cmos.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/rtc/rtc-cmos.c 2009-03-25 16:11:13.000000000 +0000
-@@ -1030,29 +1030,32 @@ static struct platform_driver cmos_platf
+diff -r 9608d5473017 drivers/rtc/rtc-cmos.c
+--- a/drivers/rtc/rtc-cmos.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/rtc/rtc-cmos.c Wed May 06 16:56:31 2009 +0100
+@@ -1030,29 +1030,32 @@
static int __init cmos_init(void)
{
+ int retval = 0;
-+
-+#ifdef CONFIG_PNP
-+ pnp_register_driver(&cmos_pnp_driver);
-+#endif
-+
-+ if (!cmos_rtc.dev)
-+ retval = platform_driver_probe(&cmos_platform_driver,
-+ cmos_platform_probe);
-+
-+ if (retval == 0)
-+ return 0;
+
#ifdef CONFIG_PNP
- if (pnp_platform_devices)
- return platform_driver_probe(&cmos_platform_driver,
- cmos_platform_probe);
-#endif /* CONFIG_PNP */
++ pnp_register_driver(&cmos_pnp_driver);
++#endif
++
++ if (!cmos_rtc.dev)
++ retval = platform_driver_probe(&cmos_platform_driver,
++ cmos_platform_probe);
++
++ if (retval == 0)
++ return 0;
++
++#ifdef CONFIG_PNP
+ pnp_unregister_driver(&cmos_pnp_driver);
+#endif
+ return retval;
}
module_exit(cmos_exit);
-diff -purN linux-2.6.27/drivers/s390/block/dasd.c linux-2.6.27.19-5.1/drivers/s390/block/dasd.c
---- linux-2.6.27/drivers/s390/block/dasd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/block/dasd.c 2009-03-25 16:11:24.000000000 +0000
-@@ -335,7 +335,9 @@ static int dasd_state_unfmt_to_basic(str
+diff -r 9608d5473017 drivers/s390/block/dasd.c
+--- a/drivers/s390/block/dasd.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/block/dasd.c Wed May 06 16:56:31 2009 +0100
+@@ -335,7 +335,9 @@
static int
dasd_state_ready_to_online(struct dasd_device * device)
{
if (device->discipline->ready_to_online) {
rc = device->discipline->ready_to_online(device);
-@@ -343,8 +345,19 @@ dasd_state_ready_to_online(struct dasd_d
+@@ -343,8 +345,19 @@
return rc;
}
device->state = DASD_STATE_ONLINE;
return 0;
}
-@@ -353,7 +366,9 @@ dasd_state_ready_to_online(struct dasd_d
+@@ -353,7 +366,9 @@
*/
static int dasd_state_online_to_ready(struct dasd_device *device)
{
if (device->discipline->online_to_ready) {
rc = device->discipline->online_to_ready(device);
-@@ -361,6 +376,18 @@ static int dasd_state_online_to_ready(st
+@@ -361,6 +376,18 @@
return rc;
}
device->state = DASD_STATE_READY;
return 0;
}
-@@ -1746,6 +1773,11 @@ restart:
+@@ -1746,6 +1773,11 @@
goto restart;
}
/* First of all call extended error reporting. */
if (dasd_eer_enabled(base) &&
cqr->status == DASD_CQR_FAILED) {
-diff -purN linux-2.6.27/drivers/s390/block/dasd_devmap.c linux-2.6.27.19-5.1/drivers/s390/block/dasd_devmap.c
---- linux-2.6.27/drivers/s390/block/dasd_devmap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/block/dasd_devmap.c 2009-03-25 16:11:24.000000000 +0000
-@@ -205,6 +205,8 @@ dasd_feature_list(char *str, char **endp
+diff -r 9608d5473017 drivers/s390/block/dasd_devmap.c
+--- a/drivers/s390/block/dasd_devmap.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/block/dasd_devmap.c Wed May 06 16:56:31 2009 +0100
+@@ -205,6 +205,8 @@
features |= DASD_FEATURE_USEDIAG;
else if (len == 6 && !strncmp(str, "erplog", 6))
features |= DASD_FEATURE_ERPLOG;
else {
MESSAGE(KERN_WARNING,
"unsupported feature: %*s, "
-@@ -666,6 +668,51 @@ dasd_device_from_cdev(struct ccw_device
+@@ -666,6 +668,51 @@
*/
/*
* readonly controls the readonly status of a dasd
*/
static ssize_t
-@@ -1019,6 +1066,7 @@ static struct attribute * dasd_attrs[] =
+@@ -1019,6 +1066,7 @@
&dev_attr_use_diag.attr,
&dev_attr_eer_enabled.attr,
&dev_attr_erplog.attr,
NULL,
};
-diff -purN linux-2.6.27/drivers/s390/block/dasd_diag.c linux-2.6.27.19-5.1/drivers/s390/block/dasd_diag.c
---- linux-2.6.27/drivers/s390/block/dasd_diag.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/block/dasd_diag.c 2009-03-25 16:11:24.000000000 +0000
-@@ -544,7 +544,8 @@ static struct dasd_ccw_req *dasd_diag_bu
+diff -r 9608d5473017 drivers/s390/block/dasd_diag.c
+--- a/drivers/s390/block/dasd_diag.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/block/dasd_diag.c Wed May 06 16:56:31 2009 +0100
+@@ -544,7 +544,8 @@
}
cqr->retries = DIAG_MAX_RETRIES;
cqr->buildclk = get_clock();
set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags);
cqr->startdev = memdev;
cqr->memdev = memdev;
-diff -purN linux-2.6.27/drivers/s390/block/dasd_eckd.c linux-2.6.27.19-5.1/drivers/s390/block/dasd_eckd.c
---- linux-2.6.27/drivers/s390/block/dasd_eckd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/block/dasd_eckd.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/block/dasd_eckd.c
+--- a/drivers/s390/block/dasd_eckd.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/block/dasd_eckd.c Wed May 06 16:56:31 2009 +0100
@@ -6,6 +6,8 @@
* Martin Schwidefsky <schwidefsky@de.ibm.com>
* Bugreports.to..: <Linux390@de.ibm.com>
*
*/
-@@ -1494,19 +1496,34 @@ static void dasd_eckd_handle_unsolicited
+@@ -1494,19 +1496,34 @@
/* service information message SIM */
- DEV_MESSAGE(KERN_DEBUG, device, "%s",
- "unsolicited interrupt received");
- device->discipline->dump_sense(device, NULL, irb);
-- dasd_schedule_device_bh(device);
+ if ((irb->scsw.cmd.cc == 1) &&
+ (irb->scsw.cmd.fctl & SCSW_FCTL_START_FUNC) &&
+ (irb->scsw.cmd.actl & SCSW_ACTL_START_PEND) &&
+ "(sense available)");
+ device->discipline->dump_sense(device, NULL, irb);
+ }
-
-+ dasd_schedule_device_bh(device);
++
+ dasd_schedule_device_bh(device);
+-
return;
};
-@@ -1683,7 +1700,8 @@ static struct dasd_ccw_req *dasd_eckd_bu
+@@ -1683,7 +1700,8 @@
recid++;
}
}
set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags);
cqr->startdev = startdev;
cqr->memdev = startdev;
-@@ -2068,6 +2086,103 @@ dasd_eckd_set_attrib(struct dasd_device
+@@ -2068,6 +2086,103 @@
return 0;
}
static int
dasd_eckd_ioctl(struct dasd_block *block, unsigned int cmd, void __user *argp)
{
-@@ -2086,6 +2201,8 @@ dasd_eckd_ioctl(struct dasd_block *block
+@@ -2086,6 +2201,8 @@
return dasd_eckd_reserve(device);
case BIODASDSLCK:
return dasd_eckd_steal_lock(device);
default:
return -ENOIOCTLCMD;
}
-diff -purN linux-2.6.27/drivers/s390/block/dasd_fba.c linux-2.6.27.19-5.1/drivers/s390/block/dasd_fba.c
---- linux-2.6.27/drivers/s390/block/dasd_fba.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/block/dasd_fba.c 2009-03-25 16:11:24.000000000 +0000
-@@ -355,7 +355,8 @@ static struct dasd_ccw_req *dasd_fba_bui
+diff -r 9608d5473017 drivers/s390/block/dasd_fba.c
+--- a/drivers/s390/block/dasd_fba.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/block/dasd_fba.c Wed May 06 16:56:31 2009 +0100
+@@ -355,7 +355,8 @@
recid++;
}
}
set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags);
cqr->startdev = memdev;
cqr->memdev = memdev;
-diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers/s390/block/dcssblk.c
---- linux-2.6.27/drivers/s390/block/dcssblk.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/block/dcssblk.c 2009-03-25 16:11:24.000000000 +0000
-@@ -4,6 +4,8 @@
+diff -r 9608d5473017 drivers/s390/block/dcssblk.c
+--- a/drivers/s390/block/dcssblk.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/block/dcssblk.c Wed May 06 16:56:31 2009 +0100
+@@ -3,6 +3,8 @@
+ *
* Authors: Carsten Otte, Stefan Weinhuber, Gerald Schaefer
*/
-
-+#define KMSG_COMPONENT "dcssblk"
+
++#define KMSG_COMPONENT "dcssblk"
+
#include <linux/module.h>
#include <linux/moduleparam.h>
- #include <linux/ctype.h>
-@@ -17,21 +19,10 @@
+@@ -17,20 +19,9 @@
#include <linux/interrupt.h>
#include <asm/s390_rdev.h>
#define DCSSBLK_NAME "dcssblk"
#define DCSSBLK_MINORS_PER_DISK 1
#define DCSSBLK_PARM_LEN 400
-
+-
-#ifdef DCSSBLK_DEBUG
-#define PRINT_DEBUG(x...) printk(KERN_DEBUG DCSSBLK_NAME " debug: " x)
-#else
-#define PRINT_WARN(x...) printk(KERN_WARNING DCSSBLK_NAME " warning: " x)
-#define PRINT_ERR(x...) printk(KERN_ERR DCSSBLK_NAME " error: " x)
-
--
+
static int dcssblk_open(struct inode *inode, struct file *filp);
static int dcssblk_release(struct inode *inode, struct file *filp);
- static int dcssblk_make_request(struct request_queue *q, struct bio *bio);
-@@ -48,6 +39,30 @@ static struct block_device_operations dc
+@@ -48,26 +39,6 @@
.direct_access = dcssblk_direct_access,
};
-+struct dcssblk_dev_info {
-+ struct list_head lh;
-+ struct device dev;
-+ char segment_name[BUS_ID_SIZE];
-+ atomic_t use_count;
-+ struct gendisk *gd;
-+ unsigned long start;
-+ unsigned long end;
-+ int segment_type;
-+ unsigned char save_pending;
-+ unsigned char is_shared;
-+ struct request_queue *dcssblk_queue;
+-static ssize_t dcssblk_add_store(struct device * dev, struct device_attribute *attr, const char * buf,
+- size_t count);
+-static ssize_t dcssblk_remove_store(struct device * dev, struct device_attribute *attr, const char * buf,
+- size_t count);
+-static ssize_t dcssblk_save_store(struct device * dev, struct device_attribute *attr, const char * buf,
+- size_t count);
+-static ssize_t dcssblk_save_show(struct device *dev, struct device_attribute *attr, char *buf);
+-static ssize_t dcssblk_shared_store(struct device * dev, struct device_attribute *attr, const char * buf,
+- size_t count);
+-static ssize_t dcssblk_shared_show(struct device *dev, struct device_attribute *attr, char *buf);
+-
+-static DEVICE_ATTR(add, S_IWUSR, NULL, dcssblk_add_store);
+-static DEVICE_ATTR(remove, S_IWUSR, NULL, dcssblk_remove_store);
+-static DEVICE_ATTR(save, S_IWUSR | S_IRUGO, dcssblk_save_show,
+- dcssblk_save_store);
+-static DEVICE_ATTR(shared, S_IWUSR | S_IRUGO, dcssblk_shared_show,
+- dcssblk_shared_store);
+-
+-static struct device *dcssblk_root_dev;
+-
+ struct dcssblk_dev_info {
+ struct list_head lh;
+ struct device dev;
+@@ -80,7 +51,41 @@
+ unsigned char save_pending;
+ unsigned char is_shared;
+ struct request_queue *dcssblk_queue;
+ int num_of_segments;
+ struct list_head seg_list;
-+};
+ };
+
+struct segment_info {
+ struct list_head lh;
+ int segment_type;
+};
+
- static ssize_t dcssblk_add_store(struct device * dev, struct device_attribute *attr, const char * buf,
- size_t count);
- static ssize_t dcssblk_remove_store(struct device * dev, struct device_attribute *attr, const char * buf,
-@@ -58,30 +73,20 @@ static ssize_t dcssblk_save_show(struct
- static ssize_t dcssblk_shared_store(struct device * dev, struct device_attribute *attr, const char * buf,
- size_t count);
- static ssize_t dcssblk_shared_show(struct device *dev, struct device_attribute *attr, char *buf);
++static ssize_t dcssblk_add_store(struct device * dev, struct device_attribute *attr, const char * buf,
++ size_t count);
++static ssize_t dcssblk_remove_store(struct device * dev, struct device_attribute *attr, const char * buf,
++ size_t count);
++static ssize_t dcssblk_save_store(struct device * dev, struct device_attribute *attr, const char * buf,
++ size_t count);
++static ssize_t dcssblk_save_show(struct device *dev, struct device_attribute *attr, char *buf);
++static ssize_t dcssblk_shared_store(struct device * dev, struct device_attribute *attr, const char * buf,
++ size_t count);
++static ssize_t dcssblk_shared_show(struct device *dev, struct device_attribute *attr, char *buf);
+static ssize_t dcssblk_seglist_show(struct device *dev,
+ struct device_attribute *attr,
+ char *buf);
-
- static DEVICE_ATTR(add, S_IWUSR, NULL, dcssblk_add_store);
- static DEVICE_ATTR(remove, S_IWUSR, NULL, dcssblk_remove_store);
--static DEVICE_ATTR(save, S_IWUSR | S_IRUGO, dcssblk_save_show,
++
++static DEVICE_ATTR(add, S_IWUSR, NULL, dcssblk_add_store);
++static DEVICE_ATTR(remove, S_IWUSR, NULL, dcssblk_remove_store);
+static DEVICE_ATTR(save, S_IWUSR | S_IRUSR, dcssblk_save_show,
- dcssblk_save_store);
--static DEVICE_ATTR(shared, S_IWUSR | S_IRUGO, dcssblk_shared_show,
++ dcssblk_save_store);
+static DEVICE_ATTR(shared, S_IWUSR | S_IRUSR, dcssblk_shared_show,
- dcssblk_shared_store);
++ dcssblk_shared_store);
+static DEVICE_ATTR(seglist, S_IRUSR, dcssblk_seglist_show, NULL);
++
++static struct device *dcssblk_root_dev;
- static struct device *dcssblk_root_dev;
-
--struct dcssblk_dev_info {
-- struct list_head lh;
-- struct device dev;
-- char segment_name[BUS_ID_SIZE];
-- atomic_t use_count;
-- struct gendisk *gd;
-- unsigned long start;
-- unsigned long end;
-- int segment_type;
-- unsigned char save_pending;
-- unsigned char is_shared;
-- struct request_queue *dcssblk_queue;
--};
--
static LIST_HEAD(dcssblk_devices);
static struct rw_semaphore dcssblk_devices_sem;
-
-@@ -91,8 +96,15 @@ static struct rw_semaphore dcssblk_devic
+@@ -91,8 +96,15 @@
static void
dcssblk_release_segment(struct device *dev)
{
module_put(THIS_MODULE);
}
-@@ -142,6 +154,168 @@ dcssblk_get_device_by_name(char *name)
+@@ -142,6 +154,168 @@
return NULL;
}
static void dcssblk_unregister_callback(struct device *dev)
{
device_unregister(dev);
-@@ -165,6 +339,7 @@ static ssize_t
+@@ -165,6 +339,7 @@
dcssblk_shared_store(struct device *dev, struct device_attribute *attr, const char *inbuf, size_t count)
{
struct dcssblk_dev_info *dev_info;
int rc;
if ((count > 1) && (inbuf[1] != '\n') && (inbuf[1] != '\0'))
-@@ -172,46 +347,47 @@ dcssblk_shared_store(struct device *dev,
+@@ -172,46 +347,47 @@
down_write(&dcssblk_devices_sem);
dev_info = container_of(dev, struct dcssblk_dev_info, dev);
if (atomic_read(&dev_info->use_count)) {
} else {
rc = -EINVAL;
goto out;
-@@ -220,8 +396,13 @@ dcssblk_shared_store(struct device *dev,
+@@ -220,8 +396,13 @@
goto out;
removeseg:
list_del(&dev_info->lh);
del_gendisk(dev_info->gd);
-@@ -254,6 +435,7 @@ static ssize_t
+@@ -254,6 +435,7 @@
dcssblk_save_store(struct device *dev, struct device_attribute *attr, const char *inbuf, size_t count)
{
struct dcssblk_dev_info *dev_info;
if ((count > 1) && (inbuf[1] != '\n') && (inbuf[1] != '\0'))
return -EINVAL;
-@@ -263,15 +445,17 @@ dcssblk_save_store(struct device *dev, s
+@@ -263,15 +445,17 @@
if (inbuf[0] == '1') {
if (atomic_read(&dev_info->use_count) == 0) {
// device is idle => we save immediately
dev_info->save_pending = 1;
}
} else if (inbuf[0] == '0') {
-@@ -279,8 +463,9 @@ dcssblk_save_store(struct device *dev, s
+@@ -279,8 +463,9 @@
// device is busy & the user wants to undo his save
// request
dev_info->save_pending = 0;
}
} else {
up_write(&dcssblk_devices_sem);
-@@ -291,66 +476,123 @@ dcssblk_save_store(struct device *dev, s
+@@ -291,66 +476,123 @@
}
/*
+ num_of_segments = 0;
for (i = 0; ((buf[i] != '\0') && (buf[i] != '\n') && i < count); i++) {
- local_buf[i] = toupper(buf[i]);
+- }
+- local_buf[i] = '\0';
+- if ((i == 0) || (i > 8)) {
+- rc = -ENAMETOOLONG;
+- goto out;
+- }
+- /*
+- * already loaded?
+- */
+- down_read(&dcssblk_devices_sem);
+- dev_info = dcssblk_get_device_by_name(local_buf);
+- up_read(&dcssblk_devices_sem);
+- if (dev_info != NULL) {
+- PRINT_WARN("Segment %s already loaded!\n", local_buf);
+- rc = -EEXIST;
+- goto out;
+- }
+- /*
+- * get a struct dcssblk_dev_info
+- */
+- dev_info = kzalloc(sizeof(struct dcssblk_dev_info), GFP_KERNEL);
+- if (dev_info == NULL) {
+- rc = -ENOMEM;
+- goto out;
+ for (j = i; (buf[j] != ':') &&
+ (buf[j] != '\0') &&
+ (buf[j] != '\n') &&
+ if ((buf[j] == '\0') || (buf[j] == '\n'))
+ break;
}
-- local_buf[i] = '\0';
-- if ((i == 0) || (i > 8)) {
-+
+
+- strcpy(dev_info->segment_name, local_buf);
+- strlcpy(dev_info->dev.bus_id, local_buf, BUS_ID_SIZE);
+ /* no trailing colon at the end of the input */
+ if ((i > 0) && (buf[i-1] == ':')) {
- rc = -ENAMETOOLONG;
-- goto out;
-- }
-- /*
-- * already loaded?
-- */
-- down_read(&dcssblk_devices_sem);
-- dev_info = dcssblk_get_device_by_name(local_buf);
-- up_read(&dcssblk_devices_sem);
-- if (dev_info != NULL) {
-- PRINT_WARN("Segment %s already loaded!\n", local_buf);
-- rc = -EEXIST;
-- goto out;
-- }
-- /*
-- * get a struct dcssblk_dev_info
-- */
-- dev_info = kzalloc(sizeof(struct dcssblk_dev_info), GFP_KERNEL);
-- if (dev_info == NULL) {
-- rc = -ENOMEM;
-- goto out;
++ rc = -ENAMETOOLONG;
+ goto seg_list_del;
- }
++ }
+ strlcpy(local_buf, buf, i + 1);
+ dev_info->num_of_segments = num_of_segments;
+ rc = dcssblk_is_continuous(dev_info);
+ if (rc < 0)
+ goto seg_list_del;
-
-- strcpy(dev_info->segment_name, local_buf);
-- strlcpy(dev_info->dev.bus_id, local_buf, BUS_ID_SIZE);
++
+ dev_info->start = dcssblk_find_lowest_addr(dev_info);
+ dev_info->end = dcssblk_find_highest_addr(dev_info);
+
}
dev_info->gd->major = dcssblk_major;
dev_info->gd->fops = &dcssblk_devops;
-@@ -360,59 +602,42 @@ dcssblk_add_store(struct device *dev, st
+@@ -360,65 +602,51 @@
dev_info->gd->driverfs_dev = &dev_info->dev;
blk_queue_make_request(dev_info->dcssblk_queue, dcssblk_make_request);
blk_queue_hardsect_size(dev_info->dcssblk_queue, 4096);
}
get_device(&dev_info->dev);
rc = device_create_file(&dev_info->dev, &dev_attr_shared);
-@@ -421,6 +646,9 @@ dcssblk_add_store(struct device *dev, st
- rc = device_create_file(&dev_info->dev, &dev_attr_save);
if (rc)
goto unregister_dev;
-+ rc = device_create_file(&dev_info->dev, &dev_attr_seglist);
+ rc = device_create_file(&dev_info->dev, &dev_attr_save);
+ if (rc)
+ goto unregister_dev;
++ rc = device_create_file(&dev_info->dev, &dev_attr_seglist);
+ if (rc)
+ goto unregister_dev;
- add_disk(dev_info->gd);
-
-@@ -434,7 +662,6 @@ dcssblk_add_store(struct device *dev, st
+@@ -434,7 +662,6 @@
set_disk_ro(dev_info->gd,0);
break;
}
up_write(&dcssblk_devices_sem);
rc = count;
goto out;
-@@ -445,20 +672,27 @@ unregister_dev:
+@@ -445,20 +672,27 @@
dev_info->gd->queue = NULL;
put_disk(dev_info->gd);
device_unregister(&dev_info->dev);
kfree(dev_info);
out:
kfree(local_buf);
-@@ -473,6 +707,7 @@ static ssize_t
+@@ -473,6 +707,7 @@
dcssblk_remove_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
{
struct dcssblk_dev_info *dev_info;
int rc, i;
char *local_buf;
-@@ -499,26 +734,30 @@ dcssblk_remove_store(struct device *dev,
+@@ -499,26 +734,30 @@
dev_info = dcssblk_get_device_by_name(local_buf);
if (dev_info == NULL) {
up_write(&dcssblk_devices_sem);
rc = -EBUSY;
goto out_buf;
}
-- list_del(&dev_info->lh);
-
-+ list_del(&dev_info->lh);
++
+ list_del(&dev_info->lh);
+-
del_gendisk(dev_info->gd);
blk_cleanup_queue(dev_info->dcssblk_queue);
dev_info->gd->queue = NULL;
put_device(&dev_info->dev);
up_write(&dcssblk_devices_sem);
-@@ -550,6 +789,7 @@ static int
+@@ -550,6 +789,7 @@
dcssblk_release(struct inode *inode, struct file *filp)
{
struct dcssblk_dev_info *dev_info;
int rc;
dev_info = inode->i_bdev->bd_disk->private_data;
-@@ -560,9 +800,11 @@ dcssblk_release(struct inode *inode, str
+@@ -560,9 +800,11 @@
down_write(&dcssblk_devices_sem);
if (atomic_dec_and_test(&dev_info->use_count)
&& (dev_info->save_pending)) {
dev_info->save_pending = 0;
}
up_write(&dcssblk_devices_sem);
-@@ -602,7 +844,9 @@ dcssblk_make_request(struct request_queu
+@@ -602,7 +844,9 @@
case SEG_TYPE_SC:
/* cannot write to these segments */
if (bio_data_dir(bio) == WRITE) {
goto fail;
}
}
-@@ -657,7 +901,7 @@ static void
+@@ -657,7 +901,7 @@
dcssblk_check_params(void)
{
int rc, i, j, k;
struct dcssblk_dev_info *dev_info;
for (i = 0; (i < DCSSBLK_PARM_LEN) && (dcssblk_segments[i] != '\0');
-@@ -665,15 +909,16 @@ dcssblk_check_params(void)
+@@ -665,15 +909,16 @@
for (j = i; (dcssblk_segments[j] != ',') &&
(dcssblk_segments[j] != '\0') &&
(dcssblk_segments[j] != '(') &&
if (!strncmp(&dcssblk_segments[j], "(local)", 7)) {
down_read(&dcssblk_devices_sem);
dev_info = dcssblk_get_device_by_name(buf);
-@@ -740,10 +985,12 @@ module_exit(dcssblk_exit);
+@@ -740,10 +985,12 @@
module_param_string(segments, dcssblk_segments, DCSSBLK_PARM_LEN, 0444);
MODULE_PARM_DESC(segments, "Name of DCSS segment(s) to be loaded, "
+ "e.g. segments=\"mydcss1,mydcss2:mydcss3,mydcss4(local)\"");
MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/s390/block/xpram.c linux-2.6.27.19-5.1/drivers/s390/block/xpram.c
---- linux-2.6.27/drivers/s390/block/xpram.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/block/xpram.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/block/xpram.c
+--- a/drivers/s390/block/xpram.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/block/xpram.c Wed May 06 16:56:31 2009 +0100
@@ -25,6 +25,8 @@
* generic hard disk support to replace ad-hoc partitioning
*/
typedef struct {
unsigned int size; /* size of xpram segment in pages */
unsigned int offset; /* start page of xpram segment */
-@@ -56,6 +52,7 @@ typedef struct {
+@@ -56,6 +52,7 @@
static xpram_device_t xpram_devices[XPRAM_MAX_DEVS];
static unsigned int xpram_sizes[XPRAM_MAX_DEVS];
static struct gendisk *xpram_disks[XPRAM_MAX_DEVS];
static unsigned int xpram_pages;
static int xpram_devs;
-@@ -263,7 +260,7 @@ static int __init xpram_setup_sizes(unsi
+@@ -263,7 +260,7 @@
/* Check number of devices. */
if (devs <= 0 || devs > XPRAM_MAX_DEVS) {
return -EINVAL;
}
xpram_devs = devs;
-@@ -294,22 +291,22 @@ static int __init xpram_setup_sizes(unsi
+@@ -294,22 +291,22 @@
mem_auto_no++;
}
return -EINVAL;
}
-@@ -321,8 +318,8 @@ static int __init xpram_setup_sizes(unsi
+@@ -321,8 +318,8 @@
*/
if (mem_auto_no) {
mem_auto = ((pages - mem_needed / 4) / mem_auto_no) * 4;
for (i = 0; i < xpram_devs; i++)
if (xpram_sizes[i] == 0)
xpram_sizes[i] = mem_auto;
-@@ -330,18 +327,22 @@ static int __init xpram_setup_sizes(unsi
+@@ -330,18 +327,22 @@
return 0;
}
- if (!disk)
+ xpram_disks[i] = alloc_disk(1);
+ if (!xpram_disks[i])
-+ goto out;
+ goto out;
+- xpram_disks[i] = disk;
+ xpram_queues[i] = blk_alloc_queue(GFP_KERNEL);
+ if (!xpram_queues[i]) {
+ put_disk(xpram_disks[i]);
- goto out;
-- xpram_disks[i] = disk;
++ goto out;
+ }
+ blk_queue_make_request(xpram_queues[i], xpram_make_request);
+ blk_queue_hardsect_size(xpram_queues[i], 4096);
}
/*
-@@ -352,18 +353,6 @@ static int __init xpram_setup_blkdev(voi
+@@ -350,18 +351,6 @@
+ rc = register_blkdev(XPRAM_MAJOR, XPRAM_NAME);
+ if (rc < 0)
goto out;
-
- /*
+-
+- /*
- * Assign the other needed values: make request function, sizes and
- * hardsect size. All the minor devices feature the same value.
- */
- }
- blk_queue_make_request(xpram_queue, xpram_make_request);
- blk_queue_hardsect_size(xpram_queue, 4096);
--
-- /*
+
+ /*
* Setup device structures.
- */
- offset = 0;
-@@ -377,18 +366,18 @@ static int __init xpram_setup_blkdev(voi
+@@ -377,18 +366,18 @@
disk->first_minor = i;
disk->fops = &xpram_devops;
disk->private_data = &xpram_devices[i];
return rc;
}
-@@ -400,10 +389,10 @@ static void __exit xpram_exit(void)
+@@ -400,10 +389,10 @@
int i;
for (i = 0; i < xpram_devs; i++) {
del_gendisk(xpram_disks[i]);
}
static int __init xpram_init(void)
-@@ -412,12 +401,12 @@ static int __init xpram_init(void)
+@@ -412,12 +401,12 @@
/* Find out size of expanded memory. */
if (xpram_present() != 0) {
rc = xpram_setup_sizes(xpram_pages);
if (rc)
return rc;
-diff -purN linux-2.6.27/drivers/s390/char/monreader.c linux-2.6.27.19-5.1/drivers/s390/char/monreader.c
---- linux-2.6.27/drivers/s390/char/monreader.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/monreader.c 2009-03-25 16:11:24.000000000 +0000
-@@ -7,6 +7,8 @@
+diff -r 9608d5473017 drivers/s390/char/monreader.c
+--- a/drivers/s390/char/monreader.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/monreader.c Wed May 06 16:56:31 2009 +0100
+@@ -6,6 +6,8 @@
+ * Copyright IBM Corp. 2004, 2008
* Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
*/
-
-+#define KMSG_COMPONENT "monreader"
+
++#define KMSG_COMPONENT "monreader"
+
#include <linux/module.h>
#include <linux/moduleparam.h>
- #include <linux/init.h>
@@ -24,19 +26,6 @@
#include <asm/ebcdic.h>
#include <asm/extmem.h>
#define MON_COLLECT_SAMPLE 0x80
#define MON_COLLECT_EVENT 0x40
-@@ -172,7 +161,7 @@ static int mon_send_reply(struct mon_msg
+@@ -172,7 +161,7 @@
} else
monmsg->replied_msglim = 1;
if (rc) {
return -EIO;
}
return 0;
-@@ -251,7 +240,8 @@ static void mon_iucv_path_severed(struct
+@@ -251,7 +240,8 @@
{
struct mon_private *monpriv = path->private;
iucv_path_sever(path, NULL);
atomic_set(&monpriv->iucv_severed, 1);
wake_up(&mon_conn_wait_queue);
-@@ -266,8 +256,7 @@ static void mon_iucv_message_pending(str
+@@ -266,8 +256,7 @@
memcpy(&monpriv->msg_array[monpriv->write_index]->msg,
msg, sizeof(*msg));
if (atomic_inc_return(&monpriv->msglim_count) == MON_MSGLIM) {
monpriv->msg_array[monpriv->write_index]->msglim_reached = 1;
}
monpriv->write_index = (monpriv->write_index + 1) % MON_MSGLIM;
-@@ -311,8 +300,8 @@ static int mon_open(struct inode *inode,
+@@ -311,8 +300,8 @@
rc = iucv_path_connect(monpriv->path, &monreader_iucv_handler,
MON_SERVICE, NULL, user_data_connect, monpriv);
if (rc) {
rc = -EIO;
goto out_path;
}
-@@ -353,7 +342,8 @@ static int mon_close(struct inode *inode
+@@ -353,7 +342,8 @@
*/
rc = iucv_path_sever(monpriv->path, user_data_sever);
if (rc)
atomic_set(&monpriv->iucv_severed, 0);
atomic_set(&monpriv->iucv_connected, 0);
-@@ -469,7 +459,8 @@ static int __init mon_init(void)
+@@ -469,7 +459,8 @@
int rc;
if (!MACHINE_IS_VM) {
return -ENODEV;
}
-@@ -478,7 +469,8 @@ static int __init mon_init(void)
+@@ -478,7 +469,8 @@
*/
rc = iucv_register(&monreader_iucv_handler, 1);
if (rc) {
return rc;
}
-@@ -488,8 +480,8 @@ static int __init mon_init(void)
+@@ -488,8 +480,8 @@
goto out_iucv;
}
if (rc != SEG_TYPE_SC) {
rc = -EINVAL;
goto out_iucv;
}
-diff -purN linux-2.6.27/drivers/s390/char/monwriter.c linux-2.6.27.19-5.1/drivers/s390/char/monwriter.c
---- linux-2.6.27/drivers/s390/char/monwriter.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/monwriter.c 2009-03-25 16:11:24.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 drivers/s390/char/monwriter.c
+--- a/drivers/s390/char/monwriter.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/monwriter.c Wed May 06 16:56:31 2009 +0100
+@@ -7,6 +7,8 @@
+ *
* Author(s): Melissa Howland <Melissa.Howland@us.ibm.com>
*/
-
-+#define KMSG_COMPONENT "monwriter"
+
++#define KMSG_COMPONENT "monwriter"
+
#include <linux/module.h>
#include <linux/moduleparam.h>
- #include <linux/init.h>
-@@ -64,9 +66,9 @@ static int monwrite_diag(struct monwrite
+@@ -64,9 +66,9 @@
rc = appldata_asm(&id, fcn, (void *) buffer, myhdr->datalen);
if (rc <= 0)
return rc;
return -EINVAL;
}
-diff -purN linux-2.6.27/drivers/s390/char/sclp.c linux-2.6.27.19-5.1/drivers/s390/char/sclp.c
---- linux-2.6.27/drivers/s390/char/sclp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/sclp.c 2009-03-25 16:11:24.000000000 +0000
-@@ -280,8 +280,11 @@ sclp_dispatch_evbufs(struct sccb_header
+diff -r 9608d5473017 drivers/s390/char/sclp.c
+--- a/drivers/s390/char/sclp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/sclp.c Wed May 06 16:56:31 2009 +0100
+@@ -280,8 +280,11 @@
rc = 0;
for (offset = sizeof(struct sccb_header); offset < sccb->length;
offset += evbuf->length) {
-- /* Search for event handler */
- evbuf = (struct evbuf_header *) ((addr_t) sccb + offset);
++ evbuf = (struct evbuf_header *) ((addr_t) sccb + offset);
+ /* Check for malformed hardware response */
+ if (evbuf->length == 0)
+ break;
-+ /* Search for event handler */
+ /* Search for event handler */
+- evbuf = (struct evbuf_header *) ((addr_t) sccb + offset);
reg = NULL;
list_for_each(l, &sclp_reg_list) {
reg = list_entry(l, struct sclp_register, list);
-diff -purN linux-2.6.27/drivers/s390/char/sclp_cmd.c linux-2.6.27.19-5.1/drivers/s390/char/sclp_cmd.c
---- linux-2.6.27/drivers/s390/char/sclp_cmd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/sclp_cmd.c 2009-03-25 16:11:24.000000000 +0000
-@@ -6,6 +6,8 @@
+diff -r 9608d5473017 drivers/s390/char/sclp_cmd.c
+--- a/drivers/s390/char/sclp_cmd.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/sclp_cmd.c Wed May 06 16:56:31 2009 +0100
+@@ -5,6 +5,8 @@
+ * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>,
* Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
*/
-
-+#define KMSG_COMPONENT "sclp_cmd"
+
++#define KMSG_COMPONENT "sclp_cmd"
+
#include <linux/completion.h>
#include <linux/init.h>
- #include <linux/errno.h>
@@ -16,9 +18,9 @@
#include <linux/memory.h>
#include <asm/chpid.h>
#include <asm/sclp.h>
--#include "sclp.h"
+#include <asm/setup.h>
-
++
+ #include "sclp.h"
+-
-#define TAG "sclp_cmd: "
-+#include "sclp.h"
#define SCLP_CMDW_READ_SCP_INFO 0x00020001
#define SCLP_CMDW_READ_SCP_INFO_FORCED 0x00120001
-@@ -169,8 +171,8 @@ static int do_sync_request(sclp_cmdw_t c
+@@ -169,8 +171,8 @@
/* Check response. */
if (request->status != SCLP_REQ_DONE) {
rc = -EIO;
}
out:
-@@ -224,8 +226,8 @@ int sclp_get_cpu_info(struct sclp_cpu_in
+@@ -224,8 +226,8 @@
if (rc)
goto out;
if (sccb->header.response_code != 0x0010) {
rc = -EIO;
goto out;
}
-@@ -262,8 +264,9 @@ static int do_cpu_configure(sclp_cmdw_t
+@@ -262,8 +264,9 @@
case 0x0120:
break;
default:
rc = -EIO;
break;
}
-@@ -468,6 +471,10 @@ static void __init add_memory_merged(u16
+@@ -468,6 +471,10 @@
goto skip_add;
if (start + size > VMEM_MAX_PHYS)
size = VMEM_MAX_PHYS - start;
add_memory(0, start, size);
skip_add:
first_rn = rn;
-@@ -623,9 +630,9 @@ static int do_chp_configure(sclp_cmdw_t
+@@ -623,9 +630,9 @@
case 0x0450:
break;
default:
rc = -EIO;
break;
}
-@@ -692,8 +699,8 @@ int sclp_chp_read_info(struct sclp_chp_i
+@@ -692,8 +699,8 @@
if (rc)
goto out;
if (sccb->header.response_code != 0x0010) {
rc = -EIO;
goto out;
}
-diff -purN linux-2.6.27/drivers/s390/char/sclp_config.c linux-2.6.27.19-5.1/drivers/s390/char/sclp_config.c
---- linux-2.6.27/drivers/s390/char/sclp_config.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/sclp_config.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/char/sclp_config.c
+--- a/drivers/s390/char/sclp_config.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/sclp_config.c Wed May 06 16:56:31 2009 +0100
@@ -5,15 +5,16 @@
* Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
*/
#include <linux/sysdev.h>
#include <linux/workqueue.h>
#include <asm/smp.h>
--#include "sclp.h"
-
++
+ #include "sclp.h"
+-
-#define TAG "sclp_config: "
-+#include "sclp.h"
struct conf_mgm_data {
u8 reserved;
-@@ -31,7 +32,7 @@ static void sclp_cpu_capability_notify(s
+@@ -31,7 +32,7 @@
int cpu;
struct sys_device *sysdev;
get_online_cpus();
for_each_online_cpu(cpu) {
sysdev = get_cpu_sysdev(cpu);
-@@ -78,7 +79,7 @@ static int __init sclp_conf_init(void)
+@@ -78,7 +79,7 @@
return rc;
if (!(sclp_conf_register.sclp_send_mask & EVTYP_CONFMGMDATA_MASK)) {
sclp_unregister(&sclp_conf_register);
rc = -ENOSYS;
}
-diff -purN linux-2.6.27/drivers/s390/char/sclp_cpi_sys.c linux-2.6.27.19-5.1/drivers/s390/char/sclp_cpi_sys.c
---- linux-2.6.27/drivers/s390/char/sclp_cpi_sys.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/sclp_cpi_sys.c 2009-03-25 16:11:24.000000000 +0000
-@@ -7,6 +7,8 @@
+diff -r 9608d5473017 drivers/s390/char/sclp_cpi_sys.c
+--- a/drivers/s390/char/sclp_cpi_sys.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/sclp_cpi_sys.c Wed May 06 16:56:31 2009 +0100
+@@ -6,6 +6,8 @@
+ * Author(s): Martin Peschke <mpeschke@de.ibm.com>
* Michael Ernst <mernst@de.ibm.com>
*/
-
-+#define KMSG_COMPONENT "sclp_cpi"
+
++#define KMSG_COMPONENT "sclp_cpi"
+
#include <linux/kernel.h>
#include <linux/init.h>
- #include <linux/stat.h>
@@ -20,6 +22,7 @@
#include <linux/completion.h>
#include <asm/ebcdic.h>
#include "sclp.h"
#include "sclp_rw.h"
#include "sclp_cpi_sys.h"
-@@ -150,16 +153,16 @@ static int cpi_req(void)
+@@ -150,16 +153,16 @@
wait_for_completion(&completion);
if (req->status != SCLP_REQ_DONE) {
rc = -EIO;
}
-diff -purN linux-2.6.27/drivers/s390/char/sclp_sdias.c linux-2.6.27.19-5.1/drivers/s390/char/sclp_sdias.c
---- linux-2.6.27/drivers/s390/char/sclp_sdias.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/sclp_sdias.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/char/sclp_sdias.c
+--- a/drivers/s390/char/sclp_sdias.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/sclp_sdias.c Wed May 06 16:56:31 2009 +0100
@@ -5,15 +5,17 @@
* Author(s): Michael Holzheu
*/
#define SDIAS_RETRIES 300
#define SDIAS_SLEEP_TICKS 50
-@@ -131,7 +133,7 @@ int sclp_sdias_blk_count(void)
+@@ -131,7 +133,7 @@
rc = sdias_sclp_send(&request);
if (rc) {
goto out;
}
if (sccb.hdr.response_code != 0x0020) {
-@@ -145,7 +147,8 @@ int sclp_sdias_blk_count(void)
+@@ -145,7 +147,8 @@
rc = sccb.evbuf.blk_cnt;
break;
default:
rc = -EIO;
goto out;
}
-@@ -201,7 +204,7 @@ int sclp_sdias_copy(void *dest, int star
+@@ -201,7 +204,7 @@
rc = sdias_sclp_send(&request);
if (rc) {
goto out;
}
if (sccb.hdr.response_code != 0x0020) {
-@@ -219,9 +222,9 @@ int sclp_sdias_copy(void *dest, int star
+@@ -219,9 +222,9 @@
case EVSTATE_NO_DATA:
TRACE("no data\n");
default:
rc = -EIO;
}
out:
-diff -purN linux-2.6.27/drivers/s390/char/tape_block.c linux-2.6.27.19-5.1/drivers/s390/char/tape_block.c
---- linux-2.6.27/drivers/s390/char/tape_block.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/tape_block.c 2009-03-25 16:11:24.000000000 +0000
-@@ -76,7 +76,7 @@ tapeblock_trigger_requeue(struct tape_de
+diff -r 9608d5473017 drivers/s390/char/tape_block.c
+--- a/drivers/s390/char/tape_block.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/tape_block.c Wed May 06 16:56:31 2009 +0100
+@@ -76,7 +76,7 @@
static void
tapeblock_end_request(struct request *req, int error)
{
BUG();
}
-@@ -166,7 +166,7 @@ tapeblock_requeue(struct work_struct *wo
+@@ -166,7 +166,7 @@
nr_queued++;
spin_unlock(get_ccwdev_lock(device->cdev));
while (
!blk_queue_plugged(queue) &&
elv_next_request(queue) &&
-@@ -176,7 +176,9 @@ tapeblock_requeue(struct work_struct *wo
+@@ -176,7 +176,9 @@
if (rq_data_dir(req) == WRITE) {
DBF_EVENT(1, "TBLOCK: Rejecting write request\n");
blkdev_dequeue_request(req);
continue;
}
blkdev_dequeue_request(req);
-diff -purN linux-2.6.27/drivers/s390/char/tape_core.c linux-2.6.27.19-5.1/drivers/s390/char/tape_core.c
---- linux-2.6.27/drivers/s390/char/tape_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/tape_core.c 2009-03-25 16:11:24.000000000 +0000
-@@ -1199,7 +1199,7 @@ tape_open(struct tape_device *device)
+diff -r 9608d5473017 drivers/s390/char/tape_core.c
+--- a/drivers/s390/char/tape_core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/tape_core.c Wed May 06 16:56:31 2009 +0100
+@@ -1199,7 +1199,7 @@
{
int rc;
if (device->tape_state == TS_NOT_OPER) {
DBF_EVENT(6, "TAPE:nodev\n");
rc = -ENODEV;
-@@ -1217,7 +1217,7 @@ tape_open(struct tape_device *device)
+@@ -1217,7 +1217,7 @@
tape_state_set(device, TS_IN_USE);
rc = 0;
}
return rc;
}
-@@ -1227,11 +1227,11 @@ tape_open(struct tape_device *device)
+@@ -1227,11 +1227,11 @@
int
tape_release(struct tape_device *device)
{
return 0;
}
-diff -purN linux-2.6.27/drivers/s390/char/vmcp.c linux-2.6.27.19-5.1/drivers/s390/char/vmcp.c
---- linux-2.6.27/drivers/s390/char/vmcp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/vmcp.c 2009-03-25 16:11:24.000000000 +0000
-@@ -11,6 +11,8 @@
+diff -r 9608d5473017 drivers/s390/char/vmcp.c
+--- a/drivers/s390/char/vmcp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/vmcp.c Wed May 06 16:56:31 2009 +0100
+@@ -10,6 +10,8 @@
+
* The idea of this driver is based on cpint from Neale Ferguson and #CP in CMS
*/
-
-+#define KMSG_COMPONENT "vmcp"
+
++#define KMSG_COMPONENT "vmcp"
+
#include <linux/fs.h>
#include <linux/init.h>
- #include <linux/kernel.h>
-@@ -26,8 +28,6 @@ MODULE_LICENSE("GPL");
+@@ -25,8 +27,6 @@
+ MODULE_LICENSE("GPL");
MODULE_AUTHOR("Christian Borntraeger <borntraeger@de.ibm.com>");
MODULE_DESCRIPTION("z/VM CP interface");
-
--#define PRINTK_HEADER "vmcp: "
-
+-#define PRINTK_HEADER "vmcp: "
+
static debug_info_t *vmcp_debug;
- static int vmcp_open(struct inode *inode, struct file *file)
-@@ -193,7 +193,8 @@ static int __init vmcp_init(void)
+@@ -193,7 +193,8 @@
int ret;
if (!MACHINE_IS_VM) {
return -ENODEV;
}
-diff -purN linux-2.6.27/drivers/s390/char/vmlogrdr.c linux-2.6.27.19-5.1/drivers/s390/char/vmlogrdr.c
---- linux-2.6.27/drivers/s390/char/vmlogrdr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/vmlogrdr.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/char/vmlogrdr.c
+--- a/drivers/s390/char/vmlogrdr.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/vmlogrdr.c Wed May 06 16:56:31 2009 +0100
@@ -10,6 +10,9 @@
* Stefan Weinhuber <wein@de.ibm.com>
*
#include <linux/module.h>
#include <linux/init.h>
#include <linux/errno.h>
-@@ -28,8 +31,6 @@
+@@ -27,8 +30,6 @@
+ #include <linux/device.h>
#include <linux/smp_lock.h>
#include <linux/string.h>
-
-
-
+
MODULE_AUTHOR
("(C) 2004 IBM Corporation by Xenia Tkatschow (xenia@us.ibm.com)\n"
- " Stefan Weinhuber (wein@de.ibm.com)");
-@@ -174,8 +175,7 @@ static void vmlogrdr_iucv_path_severed(s
+@@ -174,8 +175,7 @@
struct vmlogrdr_priv_t * logptr = path->private;
u8 reason = (u8) ipuser[8];
iucv_path_sever(path, NULL);
kfree(path);
-@@ -333,8 +333,8 @@ static int vmlogrdr_open (struct inode *
+@@ -333,8 +333,8 @@
if (logptr->autorecording) {
ret = vmlogrdr_recording(logptr,1,logptr->autopurge);
if (ret)
}
/* create connection to the system service */
-@@ -345,9 +345,9 @@ static int vmlogrdr_open (struct inode *
+@@ -345,9 +345,9 @@
logptr->system_service, NULL, NULL,
logptr);
if (connect_rc) {
goto out_path;
}
-@@ -388,8 +388,8 @@ static int vmlogrdr_release (struct inod
+@@ -388,8 +388,8 @@
if (logptr->autorecording) {
ret = vmlogrdr_recording(logptr,0,logptr->autopurge);
if (ret)
}
logptr->dev_in_use = 0;
-@@ -824,8 +824,7 @@ static int __init vmlogrdr_init(void)
+@@ -824,8 +824,7 @@
dev_t dev;
if (! MACHINE_IS_VM) {
return -ENODEV;
}
-diff -purN linux-2.6.27/drivers/s390/char/vmur.c linux-2.6.27.19-5.1/drivers/s390/char/vmur.c
---- linux-2.6.27/drivers/s390/char/vmur.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/vmur.c 2009-03-25 16:11:24.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 drivers/s390/char/vmur.c
+--- a/drivers/s390/char/vmur.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/vmur.c Wed May 06 16:56:31 2009 +0100
+@@ -7,6 +7,8 @@
+ * Michael Holzheu <holzheu@de.ibm.com>
* Frank Munzert <munzert@de.ibm.com>
*/
-
-+#define KMSG_COMPONENT "vmur"
+
++#define KMSG_COMPONENT "vmur"
+
#include <linux/cdev.h>
#include <linux/smp_lock.h>
-
-@@ -40,8 +42,6 @@ MODULE_AUTHOR("IBM Corporation");
+@@ -39,8 +41,6 @@
+ MODULE_AUTHOR("IBM Corporation");
MODULE_DESCRIPTION("s390 z/VM virtual unit record device driver");
MODULE_LICENSE("GPL");
-
--#define PRINTK_HEADER "vmur: "
-
+-#define PRINTK_HEADER "vmur: "
+
static dev_t ur_first_dev_maj_min;
static struct class *vmur_class;
- static struct debug_info *vmur_dbf;
-@@ -988,7 +988,8 @@ static int __init ur_init(void)
+@@ -988,7 +988,8 @@
dev_t dev;
if (!MACHINE_IS_VM) {
return -ENODEV;
}
-@@ -1007,7 +1008,8 @@ static int __init ur_init(void)
+@@ -1007,7 +1008,8 @@
rc = alloc_chrdev_region(&dev, 0, NUM_MINORS, "vmur");
if (rc) {
goto fail_unregister_driver;
}
ur_first_dev_maj_min = MKDEV(MAJOR(dev), 0);
-@@ -1017,7 +1019,7 @@ static int __init ur_init(void)
+@@ -1017,7 +1019,7 @@
rc = PTR_ERR(vmur_class);
goto fail_unregister_region;
}
return 0;
fail_unregister_region:
-@@ -1035,7 +1037,7 @@ static void __exit ur_exit(void)
+@@ -1035,7 +1037,7 @@
unregister_chrdev_region(ur_first_dev_maj_min, NUM_MINORS);
ccw_driver_unregister(&ur_driver);
debug_unregister(vmur_dbf);
}
module_init(ur_init);
-diff -purN linux-2.6.27/drivers/s390/char/zcore.c linux-2.6.27.19-5.1/drivers/s390/char/zcore.c
---- linux-2.6.27/drivers/s390/char/zcore.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/zcore.c 2009-03-25 16:11:24.000000000 +0000
-@@ -9,6 +9,8 @@
+diff -r 9608d5473017 drivers/s390/char/zcore.c
+--- a/drivers/s390/char/zcore.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/zcore.c Wed May 06 16:56:31 2009 +0100
+@@ -8,6 +8,8 @@
+ * Copyright IBM Corp. 2003,2007
* Author(s): Michael Holzheu
*/
-
-+#define KMSG_COMPONENT "zdump"
+
++#define KMSG_COMPONENT "zdump"
+
#include <linux/init.h>
#include <linux/miscdevice.h>
- #include <linux/utsname.h>
@@ -24,8 +26,6 @@
#include "sclp.h"
#define TO_USER 0
#define TO_KERNEL 1
-@@ -563,19 +563,19 @@ static int __init sys_info_init(enum arc
+@@ -563,19 +563,19 @@
switch (arch) {
case ARCH_S390X:
return -EINVAL;
}
sys_info.arch = arch;
-@@ -674,7 +674,8 @@ static int __init zcore_init(void)
+@@ -674,7 +674,8 @@
#ifndef __s390x__
if (arch == ARCH_S390X) {
rc = -EINVAL;
goto fail;
}
-diff -purN linux-2.6.27/drivers/s390/cio/blacklist.c linux-2.6.27.19-5.1/drivers/s390/cio/blacklist.c
---- linux-2.6.27/drivers/s390/cio/blacklist.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/blacklist.c 2009-03-25 16:11:24.000000000 +0000
-@@ -9,6 +9,8 @@
+diff -r 9608d5473017 drivers/s390/cio/blacklist.c
+--- a/drivers/s390/cio/blacklist.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/blacklist.c Wed May 06 16:56:31 2009 +0100
+@@ -8,6 +8,8 @@
+ * Cornelia Huck (cornelia.huck@de.ibm.com)
* Arnd Bergmann (arndb@de.ibm.com)
*/
-
-+#define KMSG_COMPONENT "cio"
+
++#define KMSG_COMPONENT "cio"
+
#include <linux/init.h>
#include <linux/vmalloc.h>
- #include <linux/slab.h>
-@@ -49,9 +51,10 @@ static int blacklist_range(range_action
+@@ -49,9 +51,10 @@
{
if ((from_ssid > to_ssid) || ((from_ssid == to_ssid) && (from > to))) {
if (msgtrigger)
return 1;
}
-@@ -139,8 +142,8 @@ static int parse_busid(char *str, unsign
+@@ -139,8 +142,8 @@
rc = 0;
out:
if (rc && msgtrigger)
return rc;
}
-diff -purN linux-2.6.27/drivers/s390/cio/ccwgroup.c linux-2.6.27.19-5.1/drivers/s390/cio/ccwgroup.c
---- linux-2.6.27/drivers/s390/cio/ccwgroup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/ccwgroup.c 2009-03-25 16:11:24.000000000 +0000
-@@ -89,15 +89,23 @@ ccwgroup_ungroup_store(struct device *de
+diff -r 9608d5473017 drivers/s390/cio/ccwgroup.c
+--- a/drivers/s390/cio/ccwgroup.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/ccwgroup.c Wed May 06 16:56:31 2009 +0100
+@@ -89,15 +89,23 @@
gdev = to_ccwgroupdev(dev);
return count;
}
-diff -purN linux-2.6.27/drivers/s390/cio/chsc.c linux-2.6.27.19-5.1/drivers/s390/cio/chsc.c
---- linux-2.6.27/drivers/s390/cio/chsc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/chsc.c 2009-03-25 16:11:24.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 drivers/s390/cio/chsc.c
+--- a/drivers/s390/cio/chsc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/chsc.c Wed May 06 16:56:31 2009 +0100
+@@ -7,6 +7,8 @@
+ * Cornelia Huck (cornelia.huck@de.ibm.com)
* Arnd Bergmann (arndb@de.ibm.com)
*/
-
-+#define KMSG_COMPONENT "cio"
+
++#define KMSG_COMPONENT "cio"
+
#include <linux/module.h>
#include <linux/slab.h>
- #include <linux/init.h>
-@@ -333,6 +335,7 @@ static void chsc_process_sei_chp_config(
+@@ -333,6 +335,7 @@
struct chp_config_data *data;
struct chp_id chpid;
int num;
CIO_CRW_EVENT(4, "chsc: channel-path-configuration notification\n");
if (sei_area->rs != 0)
-@@ -343,8 +346,8 @@ static void chsc_process_sei_chp_config(
+@@ -343,8 +346,8 @@
if (!chp_test_bit(data->map, num))
continue;
chpid.id = num;
switch (data->op) {
case 0:
chp_cfg_schedule(chpid, 1);
-diff -purN linux-2.6.27/drivers/s390/cio/cio.c linux-2.6.27.19-5.1/drivers/s390/cio/cio.c
---- linux-2.6.27/drivers/s390/cio/cio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/cio.c 2009-03-25 16:11:24.000000000 +0000
-@@ -9,6 +9,8 @@
+diff -r 9608d5473017 drivers/s390/cio/cio.c
+--- a/drivers/s390/cio/cio.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/cio.c Wed May 06 16:56:31 2009 +0100
+@@ -8,6 +8,8 @@
+ * Arnd Bergmann (arndb@de.ibm.com)
* Martin Schwidefsky (schwidefsky@de.ibm.com)
*/
-
-+#define KMSG_COMPONENT "cio"
+
++#define KMSG_COMPONENT "cio"
+
#include <linux/module.h>
#include <linux/init.h>
- #include <linux/slab.h>
-@@ -462,25 +464,16 @@ int cio_disable_subchannel(struct subcha
+@@ -462,25 +464,16 @@
if (ccode == 3) /* Not operational. */
return -ENODEV;
if (ret == 0) {
stsch (sch->schid, &sch->schib);
if (!sch->schib.pmcw.ena)
-@@ -773,7 +766,7 @@ cio_probe_console(void)
+@@ -773,7 +766,7 @@
sch_no = cio_get_console_sch_no();
if (sch_no == -1) {
console_subchannel_in_use = 0;
return ERR_PTR(-ENODEV);
}
memset(&console_subchannel, 0, sizeof(struct subchannel));
-diff -purN linux-2.6.27/drivers/s390/cio/cio.h linux-2.6.27.19-5.1/drivers/s390/cio/cio.h
---- linux-2.6.27/drivers/s390/cio/cio.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/cio.h 2009-03-25 16:11:24.000000000 +0000
-@@ -82,6 +82,7 @@ struct subchannel {
+diff -r 9608d5473017 drivers/s390/cio/cio.h
+--- a/drivers/s390/cio/cio.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/cio.h Wed May 06 16:56:31 2009 +0100
+@@ -82,6 +82,7 @@
struct device dev; /* entry in device tree */
struct css_driver *driver;
void *private; /* private per subchannel type data */
} __attribute__ ((aligned(8)));
#define IO_INTERRUPT_TYPE 0 /* I/O interrupt type */
-diff -purN linux-2.6.27/drivers/s390/cio/cmf.c linux-2.6.27.19-5.1/drivers/s390/cio/cmf.c
---- linux-2.6.27/drivers/s390/cio/cmf.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/cmf.c 2009-03-25 16:11:24.000000000 +0000
-@@ -25,6 +25,8 @@
+diff -r 9608d5473017 drivers/s390/cio/cmf.c
+--- a/drivers/s390/cio/cmf.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/cmf.c Wed May 06 16:56:31 2009 +0100
+@@ -24,6 +24,8 @@
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
-+#define KMSG_COMPONENT "cio"
+
++#define KMSG_COMPONENT "cio"
+
#include <linux/bootmem.h>
#include <linux/device.h>
- #include <linux/init.h>
-@@ -1359,9 +1361,8 @@ static int __init init_cmf(void)
+@@ -1359,9 +1361,8 @@
default:
return 1;
}
return 0;
}
-diff -purN linux-2.6.27/drivers/s390/cio/css.c linux-2.6.27.19-5.1/drivers/s390/cio/css.c
---- linux-2.6.27/drivers/s390/cio/css.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/css.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/cio/css.c
+--- a/drivers/s390/cio/css.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/css.c Wed May 06 16:56:31 2009 +0100
@@ -6,6 +6,9 @@
* Author(s): Arnd Bergmann (arndb@de.ibm.com)
* Cornelia Huck (cornelia.huck@de.ibm.com)
#include <linux/module.h>
#include <linux/init.h>
#include <linux/device.h>
-@@ -844,8 +847,8 @@ out:
+@@ -844,8 +847,8 @@
s390_unregister_crw_handler(CRW_RSC_CSS);
chsc_free_sei_area();
kfree(slow_subchannel_set);
return ret;
}
-diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s390/cio/device.c
---- linux-2.6.27/drivers/s390/cio/device.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/device.c 2009-03-25 16:11:24.000000000 +0000
-@@ -716,6 +716,8 @@ ccw_device_release(struct device *dev)
+diff -r 9608d5473017 drivers/s390/cio/device.c
+--- a/drivers/s390/cio/device.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/device.c Wed May 06 16:56:31 2009 +0100
+@@ -716,6 +716,8 @@
struct ccw_device *cdev;
cdev = to_ccwdev(dev);
kfree(cdev->private);
kfree(cdev);
}
-@@ -790,37 +792,55 @@ static void sch_attach_disconnected_devi
+@@ -790,37 +792,55 @@
struct subchannel *other_sch;
int ret;
sch_set_cdev(other_sch, NULL);
/* No need to keep a subchannel without ccw device around. */
css_sch_device_unregister(other_sch);
-- put_device(&other_sch->dev);
- sch_attach_device(sch, cdev);
++ sch_attach_device(sch, cdev);
+ /* Put reference for old parent. */
-+ put_device(&other_sch->dev);
+ put_device(&other_sch->dev);
+- sch_attach_device(sch, cdev);
}
static void sch_attach_orphaned_device(struct subchannel *sch,
}
static void sch_create_and_recog_new_device(struct subchannel *sch)
-@@ -842,9 +862,11 @@ static void sch_create_and_recog_new_dev
+@@ -842,9 +862,11 @@
spin_lock_irq(sch->lock);
sch_set_cdev(sch, NULL);
spin_unlock_irq(sch->lock);
}
}
-@@ -866,15 +888,20 @@ void ccw_device_move_to_orphanage(struct
+@@ -866,15 +888,20 @@
dev_id.devno = sch->schib.pmcw.dev;
dev_id.ssid = sch->schid.ssid;
return;
}
cdev->ccwlock = css->pseudo_subchannel->lock;
-@@ -886,14 +913,20 @@ void ccw_device_move_to_orphanage(struct
+@@ -886,14 +913,20 @@
replacing_cdev = get_disc_ccwdev_by_dev_id(&dev_id, cdev);
if (replacing_cdev) {
sch_attach_disconnected_device(sch, replacing_cdev);
}
/*
-@@ -911,6 +944,14 @@ io_subchannel_register(struct work_struc
+@@ -911,6 +944,14 @@
priv = container_of(work, struct ccw_device_private, kick_work);
cdev = priv->cdev;
sch = to_subchannel(cdev->dev.parent);
css_update_ssd_info(sch);
/*
* io_subchannel_register() will also be called after device
-@@ -942,22 +983,19 @@ io_subchannel_register(struct work_struc
+@@ -942,22 +983,19 @@
CIO_MSG_EVENT(0, "Could not register ccw dev 0.%x.%04x: %d\n",
cdev->private->dev_id.ssid,
cdev->private->dev_id.devno, ret);
if (atomic_dec_and_test(&ccw_device_init_count))
wake_up(&ccw_device_init_wq);
}
-@@ -1068,10 +1106,15 @@ static void ccw_device_move_to_sch(struc
+@@ -1068,10 +1106,15 @@
priv = container_of(work, struct ccw_device_private, kick_work);
sch = priv->sch;
cdev = priv->cdev;
rc = device_move(&cdev->dev, &sch->dev);
mutex_unlock(&sch->reg_mutex);
if (rc) {
-@@ -1081,9 +1124,11 @@ static void ccw_device_move_to_sch(struc
+@@ -1081,9 +1124,11 @@
cdev->private->dev_id.devno, sch->schid.ssid,
sch->schid.sch_no, rc);
css_sch_device_unregister(sch);
spin_lock_irq(former_parent->lock);
sch_set_cdev(former_parent, NULL);
spin_unlock_irq(former_parent->lock);
-@@ -1094,8 +1139,8 @@ static void ccw_device_move_to_sch(struc
+@@ -1094,8 +1139,8 @@
}
sch_attach_device(sch, cdev);
out:
put_device(&cdev->dev);
}
-@@ -1137,6 +1182,30 @@ static void io_subchannel_init_fields(st
+@@ -1137,6 +1182,30 @@
sch->schib.mba = 0;
}
static int io_subchannel_probe(struct subchannel *sch)
{
struct ccw_device *cdev;
-@@ -1177,6 +1246,9 @@ static int io_subchannel_probe(struct su
+@@ -1177,6 +1246,9 @@
return 0;
}
io_subchannel_init_fields(sch);
/*
* First check if a fitting device may be found amongst the
* disconnected devices or in the orphanage.
-@@ -1186,14 +1258,12 @@ static int io_subchannel_probe(struct su
+@@ -1186,14 +1258,12 @@
rc = sysfs_create_group(&sch->dev.kobj,
&io_subchannel_attr_group);
if (rc)
cdev = get_disc_ccwdev_by_dev_id(&dev_id, NULL);
if (!cdev)
cdev = get_orphaned_ccwdev_by_dev_id(to_css(sch->dev.parent),
-@@ -1211,24 +1281,23 @@ static int io_subchannel_probe(struct su
+@@ -1211,24 +1281,23 @@
return 0;
}
cdev = io_subchannel_create_ccwdev(sch);
}
static int
-@@ -1610,6 +1679,9 @@ static int ccw_device_console_enable(str
+@@ -1610,6 +1679,9 @@
sch->private = cio_get_console_priv();
memset(sch->private, 0, sizeof(struct io_subchannel_private));
io_subchannel_init_fields(sch);
sch->driver = &io_subchannel_driver;
/* Initialize the ccw_device structure. */
cdev->dev.parent= &sch->dev;
-diff -purN linux-2.6.27/drivers/s390/cio/device_fsm.c linux-2.6.27.19-5.1/drivers/s390/cio/device_fsm.c
---- linux-2.6.27/drivers/s390/cio/device_fsm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/device_fsm.c 2009-03-25 16:11:24.000000000 +0000
-@@ -726,7 +726,7 @@ static void ccw_device_generic_notoper(s
+diff -r 9608d5473017 drivers/s390/cio/device_fsm.c
+--- a/drivers/s390/cio/device_fsm.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/device_fsm.c Wed May 06 16:56:31 2009 +0100
+@@ -726,7 +726,7 @@
{
struct subchannel *sch;
sch = to_subchannel(cdev->dev.parent);
css_schedule_eval(sch->schid);
}
-@@ -1028,6 +1028,8 @@ void ccw_device_trigger_reprobe(struct c
+@@ -1028,6 +1028,8 @@
sch->schib.pmcw.ena = 0;
if ((sch->lpm & (sch->lpm - 1)) != 0)
sch->schib.pmcw.mp = 1;
/* We should also udate ssd info, but this has to wait. */
/* Check if this is another device which appeared on the same sch. */
if (sch->schib.pmcw.dev != cdev->private->dev_id.devno) {
-@@ -1046,7 +1048,7 @@ ccw_device_offline_irq(struct ccw_device
+@@ -1046,7 +1048,7 @@
sch = to_subchannel(cdev->dev.parent);
/*
* An interrupt in state offline means a previous disable was not
*/
cio_disable_subchannel(sch);
}
-diff -purN linux-2.6.27/drivers/s390/cio/qdio.h linux-2.6.27.19-5.1/drivers/s390/cio/qdio.h
---- linux-2.6.27/drivers/s390/cio/qdio.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio.h 2009-03-25 16:11:24.000000000 +0000
-@@ -10,12 +10,21 @@
+diff -r 9608d5473017 drivers/s390/cio/qdio.h
+--- a/drivers/s390/cio/qdio.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio.h Wed May 06 16:56:31 2009 +0100
+@@ -10,11 +10,20 @@
#include <asm/page.h>
#include <asm/schid.h>
#define QDIO_BUSY_BIT_PATIENCE 100 /* 100 microseconds */
#define QDIO_BUSY_BIT_GIVE_UP 2000000 /* 2 seconds = eternity */
#define QDIO_INPUT_THRESHOLD 500 /* 500 microseconds */
-
++
+/*
+ * if an asynchronous HiperSockets queue runs full, the 10 seconds timer wait
+ * till next initiative to give transmitted skbs back to the stack is too long.
+ * than 50 percent.
+ */
+#define QDIO_IQDIO_POLL_LVL 65 /* HS multicast queue */
-+
+
enum qdio_irq_states {
QDIO_IRQ_STATE_INACTIVE,
- QDIO_IRQ_STATE_ESTABLISHED,
-@@ -103,12 +112,12 @@ static inline int do_sqbs(u64 token, uns
+@@ -103,12 +112,12 @@
}
static inline int do_eqbs(u64 token, unsigned char *state, int queue,
asm volatile(
" .insn rrf,0xB99c0000,%1,%2,0,0"
-@@ -125,7 +134,7 @@ static inline int do_eqbs(u64 token, uns
+@@ -125,7 +134,7 @@
static inline int do_sqbs(u64 token, unsigned char state, int queue,
int *start, int *count) { return 0; }
static inline int do_eqbs(u64 token, unsigned char *state, int queue,
#endif /* CONFIG_64BIT */
struct qdio_irq;
-@@ -178,11 +187,11 @@ struct qdio_input_q {
+@@ -178,11 +187,11 @@
/* input buffer acknowledgement flag */
int polling;
};
struct qdio_output_q {
-@@ -289,11 +298,13 @@ struct qdio_irq {
+@@ -289,11 +298,13 @@
struct qdio_q *input_qs[QDIO_MAX_QUEUES_PER_IRQ];
struct qdio_q *output_qs[QDIO_MAX_QUEUES_PER_IRQ];
#define is_thinint_irq(irq) \
(irq->qib.qfmt == QDIO_IQDIO_QFMT || \
-@@ -337,10 +348,13 @@ static inline unsigned long long get_use
+@@ -337,10 +348,13 @@
((bufnr + 1) & QDIO_MAX_BUFFERS_MASK)
#define add_buf(bufnr, inc) \
((bufnr + inc) & QDIO_MAX_BUFFERS_MASK)
void qdio_check_outbound_after_thinint(struct qdio_q *q);
int qdio_inbound_q_moved(struct qdio_q *q);
void qdio_kick_inbound_handler(struct qdio_q *q);
-@@ -367,10 +381,15 @@ void qdio_int_handler(struct ccw_device
+@@ -367,10 +381,15 @@
int qdio_allocate_qs(struct qdio_irq *irq_ptr, int nr_input_qs,
int nr_output_qs);
void qdio_setup_ssqd_info(struct qdio_irq *irq_ptr);
int qdio_setup_init(void);
void qdio_setup_exit(void);
-diff -purN linux-2.6.27/drivers/s390/cio/qdio_debug.c linux-2.6.27.19-5.1/drivers/s390/cio/qdio_debug.c
---- linux-2.6.27/drivers/s390/cio/qdio_debug.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio_debug.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/cio/qdio_debug.c
+--- a/drivers/s390/cio/qdio_debug.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio_debug.c Wed May 06 16:56:31 2009 +0100
@@ -14,66 +14,40 @@
#include "qdio.h"
- QDIO_DBF_HEX0(0, setup, &init_data->input_sbal_addr_array, sizeof(void *));
- QDIO_DBF_HEX0(0, setup, &init_data->output_sbal_addr_array, sizeof(void *));
-}
--
++ DBF_EVENT("qfmt:%1d", init_data->q_format);
++ DBF_HEX(init_data->adapter_name, 8);
++ DBF_EVENT("qpff%4x", init_data->qib_param_field_format);
++ DBF_HEX(&init_data->qib_param_field, sizeof(void *));
++ DBF_HEX(&init_data->input_slib_elements, sizeof(void *));
++ DBF_HEX(&init_data->output_slib_elements, sizeof(void *));
++ DBF_EVENT("niq:%1d noq:%1d", init_data->no_input_qs,
++ init_data->no_output_qs);
++ DBF_HEX(&init_data->input_handler, sizeof(void *));
++ DBF_HEX(&init_data->output_handler, sizeof(void *));
++ DBF_HEX(&init_data->int_parm, sizeof(long));
++ DBF_HEX(&init_data->flags, sizeof(long));
++ DBF_HEX(&init_data->input_sbal_addr_array, sizeof(void *));
++ DBF_HEX(&init_data->output_sbal_addr_array, sizeof(void *));
++ DBF_EVENT("irq:%8lx", (unsigned long)irq_ptr);
+
-static void qdio_unregister_dbf_views(void)
-{
- if (qdio_dbf_setup)
-oom:
- qdio_unregister_dbf_views();
- return -ENOMEM;
-+ DBF_EVENT("qfmt:%1d", init_data->q_format);
-+ DBF_HEX(init_data->adapter_name, 8);
-+ DBF_EVENT("qpff%4x", init_data->qib_param_field_format);
-+ DBF_HEX(&init_data->qib_param_field, sizeof(void *));
-+ DBF_HEX(&init_data->input_slib_elements, sizeof(void *));
-+ DBF_HEX(&init_data->output_slib_elements, sizeof(void *));
-+ DBF_EVENT("niq:%1d noq:%1d", init_data->no_input_qs,
-+ init_data->no_output_qs);
-+ DBF_HEX(&init_data->input_handler, sizeof(void *));
-+ DBF_HEX(&init_data->output_handler, sizeof(void *));
-+ DBF_HEX(&init_data->int_parm, sizeof(long));
-+ DBF_HEX(&init_data->flags, sizeof(long));
-+ DBF_HEX(&init_data->input_sbal_addr_array, sizeof(void *));
-+ DBF_HEX(&init_data->output_sbal_addr_array, sizeof(void *));
-+ DBF_EVENT("irq:%8lx", (unsigned long)irq_ptr);
-+
+ /* allocate trace view for the interface */
+ snprintf(text, 20, "qdio_%s", dev_name(&init_data->cdev->dev));
+ irq_ptr->debug_area = debug_register(text, 2, 1, 16);
}
static int qstat_show(struct seq_file *m, void *v)
-@@ -85,16 +59,18 @@ static int qstat_show(struct seq_file *m
+@@ -85,16 +59,18 @@
if (!q)
return 0;
switch (state) {
case SLSB_P_INPUT_NOT_INIT:
case SLSB_P_OUTPUT_NOT_INIT:
-@@ -126,6 +102,7 @@ static int qstat_show(struct seq_file *m
+@@ -126,6 +102,7 @@
seq_printf(m, "\n");
}
seq_printf(m, "\n");
return 0;
}
-@@ -230,11 +207,24 @@ void qdio_shutdown_debug_entries(struct
+@@ -230,11 +207,24 @@
int __init qdio_debug_init(void)
{
debugfs_root = debugfs_create_dir("qdio_queues", NULL);
+ if (qdio_dbf_error)
+ debug_unregister(qdio_dbf_error);
}
-diff -purN linux-2.6.27/drivers/s390/cio/qdio_debug.h linux-2.6.27.19-5.1/drivers/s390/cio/qdio_debug.h
---- linux-2.6.27/drivers/s390/cio/qdio_debug.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio_debug.h 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/cio/qdio_debug.h
+--- a/drivers/s390/cio/qdio_debug.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio_debug.h Wed May 06 16:56:31 2009 +0100
@@ -12,80 +12,72 @@
#include <asm/qdio.h>
#include "qdio.h"
-#define QDIO_DBF_HEX(ex, name, level, addr, len) \
-- do { \
++/* that gives us 15 characters in the text event views */
++#define QDIO_DBF_LEN 16
++
++extern debug_info_t *qdio_dbf_setup;
++extern debug_info_t *qdio_dbf_error;
++
++/* sort out low debug levels early to avoid wasted sprints */
++static inline int qdio_dbf_passes(debug_info_t *dbf_grp, int level)
++{
++ return (level <= dbf_grp->level);
++}
++
++#define DBF_ERR 3 /* error conditions */
++#define DBF_WARN 4 /* warning conditions */
++#define DBF_INFO 6 /* informational */
++
++#undef DBF_EVENT
++#undef DBF_ERROR
++#undef DBF_DEV_EVENT
++
++#define DBF_EVENT(text...) \
+ do { \
- if (ex) \
- debug_exception(qdio_dbf_##name, level, (void *)(addr), len); \
- else \
- debug_text_exception(qdio_dbf_##name, level, text); \
- else \
- debug_text_event(qdio_dbf_##name, level, text); \
-- } while (0)
--
++ char debug_buffer[QDIO_DBF_LEN]; \
++ snprintf(debug_buffer, QDIO_DBF_LEN, text); \
++ debug_text_event(qdio_dbf_setup, DBF_ERR, debug_buffer); \
+ } while (0)
+
-#define QDIO_DBF_HEX0(ex, name, addr, len) QDIO_DBF_HEX(ex, name, 0, addr, len)
-#define QDIO_DBF_HEX1(ex, name, addr, len) QDIO_DBF_HEX(ex, name, 1, addr, len)
-#define QDIO_DBF_HEX2(ex, name, addr, len) QDIO_DBF_HEX(ex, name, 2, addr, len)
--
++#define DBF_HEX(addr, len) \
++ do { \
++ debug_event(qdio_dbf_setup, DBF_ERR, (void*)(addr), len); \
++ } while (0)
+
-#ifdef CONFIG_QDIO_DEBUG
-#define QDIO_DBF_HEX3(ex, name, addr, len) QDIO_DBF_HEX(ex, name, 3, addr, len)
-#define QDIO_DBF_HEX4(ex, name, addr, len) QDIO_DBF_HEX(ex, name, 4, addr, len)
-#define QDIO_DBF_HEX5(ex, name, addr, len) do {} while (0)
-#define QDIO_DBF_HEX6(ex, name, addr, len) do {} while (0)
-#endif /* CONFIG_QDIO_DEBUG */
--
++#define DBF_ERROR(text...) \
++ do { \
++ char debug_buffer[QDIO_DBF_LEN]; \
++ snprintf(debug_buffer, QDIO_DBF_LEN, text); \
++ debug_text_event(qdio_dbf_error, DBF_ERR, debug_buffer); \
++ } while (0)
+
-#define QDIO_DBF_TEXT0(ex, name, text) QDIO_DBF_TEXT(ex, name, 0, text)
-#define QDIO_DBF_TEXT1(ex, name, text) QDIO_DBF_TEXT(ex, name, 1, text)
-#define QDIO_DBF_TEXT2(ex, name, text) QDIO_DBF_TEXT(ex, name, 2, text)
--
++#define DBF_ERROR_HEX(addr, len) \
++ do { \
++ debug_event(qdio_dbf_error, DBF_ERR, (void*)(addr), len); \
++ } while (0)
+
-#ifdef CONFIG_QDIO_DEBUG
-#define QDIO_DBF_TEXT3(ex, name, text) QDIO_DBF_TEXT(ex, name, 3, text)
-#define QDIO_DBF_TEXT4(ex, name, text) QDIO_DBF_TEXT(ex, name, 4, text)
-#define QDIO_DBF_TEXT5(ex, name, text) do {} while (0)
-#define QDIO_DBF_TEXT6(ex, name, text) do {} while (0)
-#endif /* CONFIG_QDIO_DEBUG */
--
+
-/* s390dbf views */
-#define QDIO_DBF_SETUP_LEN 8
-#define QDIO_DBF_SETUP_PAGES 8
-#define QDIO_DBF_SETUP_NR_AREAS 1
--
++#define DBF_DEV_EVENT(level, device, text...) \
++ do { \
++ char debug_buffer[QDIO_DBF_LEN]; \
++ if (qdio_dbf_passes(device->debug_area, level)) { \
++ snprintf(debug_buffer, QDIO_DBF_LEN, text); \
++ debug_text_event(device->debug_area, level, debug_buffer); \
++ } \
++ } while (0)
+
-#define QDIO_DBF_TRACE_LEN 8
-#define QDIO_DBF_TRACE_NR_AREAS 2
--
++#define DBF_DEV_HEX(level, device, addr, len) \
++ do { \
++ debug_event(device->debug_area, level, (void*)(addr), len); \
++ } while (0)
+
-#ifdef CONFIG_QDIO_DEBUG
-#define QDIO_DBF_TRACE_PAGES 32
-#define QDIO_DBF_SETUP_LEVEL 6
-#define QDIO_DBF_SETUP_LEVEL 2
-#define QDIO_DBF_TRACE_LEVEL 2
-#endif /* CONFIG_QDIO_DEBUG */
-+/* that gives us 15 characters in the text event views */
-+#define QDIO_DBF_LEN 16
-
- extern debug_info_t *qdio_dbf_setup;
+-
+-extern debug_info_t *qdio_dbf_setup;
-extern debug_info_t *qdio_dbf_trace;
-+extern debug_info_t *qdio_dbf_error;
-+
-+/* sort out low debug levels early to avoid wasted sprints */
-+static inline int qdio_dbf_passes(debug_info_t *dbf_grp, int level)
-+{
-+ return (level <= dbf_grp->level);
-+}
-+
-+#define DBF_ERR 3 /* error conditions */
-+#define DBF_WARN 4 /* warning conditions */
-+#define DBF_INFO 6 /* informational */
-+
-+#undef DBF_EVENT
-+#undef DBF_ERROR
-+#undef DBF_DEV_EVENT
-+
-+#define DBF_EVENT(text...) \
-+ do { \
-+ char debug_buffer[QDIO_DBF_LEN]; \
-+ snprintf(debug_buffer, QDIO_DBF_LEN, text); \
-+ debug_text_event(qdio_dbf_setup, DBF_ERR, debug_buffer); \
-+ } while (0)
-+
-+#define DBF_HEX(addr, len) \
-+ do { \
-+ debug_event(qdio_dbf_setup, DBF_ERR, (void*)(addr), len); \
-+ } while (0)
-+
-+#define DBF_ERROR(text...) \
-+ do { \
-+ char debug_buffer[QDIO_DBF_LEN]; \
-+ snprintf(debug_buffer, QDIO_DBF_LEN, text); \
-+ debug_text_event(qdio_dbf_error, DBF_ERR, debug_buffer); \
-+ } while (0)
-
+-
-void qdio_allocate_do_dbf(struct qdio_initialize *init_data);
-void debug_print_bstat(struct qdio_q *q);
-+#define DBF_ERROR_HEX(addr, len) \
-+ do { \
-+ debug_event(qdio_dbf_error, DBF_ERR, (void*)(addr), len); \
-+ } while (0)
-+
-+
-+#define DBF_DEV_EVENT(level, device, text...) \
-+ do { \
-+ char debug_buffer[QDIO_DBF_LEN]; \
-+ if (qdio_dbf_passes(device->debug_area, level)) { \
-+ snprintf(debug_buffer, QDIO_DBF_LEN, text); \
-+ debug_text_event(device->debug_area, level, debug_buffer); \
-+ } \
-+ } while (0)
-+
-+#define DBF_DEV_HEX(level, device, addr, len) \
-+ do { \
-+ debug_event(device->debug_area, level, (void*)(addr), len); \
-+ } while (0)
-+
+void qdio_allocate_dbf(struct qdio_initialize *init_data,
+ struct qdio_irq *irq_ptr);
void qdio_setup_debug_entries(struct qdio_irq *irq_ptr,
void qdio_debug_exit(void);
+
#endif
-diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers/s390/cio/qdio_main.c
---- linux-2.6.27/drivers/s390/cio/qdio_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio_main.c 2009-03-25 16:11:24.000000000 +0000
-@@ -95,8 +95,6 @@ static inline int do_siga_output(unsigne
+diff -r 9608d5473017 drivers/s390/cio/qdio_main.c
+--- a/drivers/s390/cio/qdio_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio_main.c Wed May 06 16:56:31 2009 +0100
+@@ -95,8 +95,6 @@
static inline int qdio_check_ccq(struct qdio_q *q, unsigned int ccq)
{
/* all done or next buffer state different */
if (ccq == 0 || ccq == 32)
return 0;
-@@ -104,8 +102,7 @@ static inline int qdio_check_ccq(struct
+@@ -104,8 +102,7 @@
if (ccq == 96 || ccq == 97)
return 1;
/* notify devices immediately */
return -EIO;
}
-@@ -115,25 +112,26 @@ static inline int qdio_check_ccq(struct
+@@ -115,25 +112,26 @@
* @state: state of the extracted buffers
* @start: buffer number to start at
* @count: count of buffers to examine
rc = qdio_check_ccq(q, ccq);
/* At least one buffer was processed, return and extract the remaining
-@@ -142,14 +140,13 @@ again:
+@@ -142,14 +140,13 @@
if ((ccq == 96) && (count != tmp_count))
return (count - tmp_count);
if (rc == 1) {
q->handler(q->irq_ptr->cdev,
QDIO_ERROR_ACTIVATE_CHECK_CONDITION,
0, -1, -1, q->irq_ptr->int_parm);
-@@ -176,7 +173,9 @@ static int qdio_do_sqbs(struct qdio_q *q
+@@ -176,7 +173,9 @@
int tmp_count = count, tmp_start = start;
int nr = q->nr;
int rc;
BUG_ON(!q->irq_ptr->sch_token);
-@@ -186,16 +185,12 @@ again:
+@@ -186,16 +185,12 @@
ccq = do_sqbs(q->irq_ptr->sch_token, state, nr, &tmp_start, &tmp_count);
rc = qdio_check_ccq(q, ccq);
if (rc == 1) {
q->handler(q->irq_ptr->cdev,
QDIO_ERROR_ACTIVATE_CHECK_CONDITION,
0, -1, -1, q->irq_ptr->int_parm);
-@@ -207,7 +202,8 @@ again:
+@@ -207,7 +202,8 @@
/* returns number of examined buffers and their common state in *state */
static inline int get_buf_states(struct qdio_q *q, unsigned int bufnr,
{
unsigned char __state = 0;
int i;
-@@ -216,7 +212,7 @@ static inline int get_buf_states(struct
+@@ -216,7 +212,7 @@
BUG_ON(count > QDIO_MAX_BUFFERS_PER_Q);
if (is_qebsm(q))
for (i = 0; i < count; i++) {
if (!__state)
-@@ -230,9 +226,9 @@ static inline int get_buf_states(struct
+@@ -230,9 +226,9 @@
}
inline int get_buf_state(struct qdio_q *q, unsigned int bufnr,
}
/* wrap-around safe setting of slsb states, returns number of changed buffers */
-@@ -282,14 +278,13 @@ static int qdio_siga_sync(struct qdio_q
+@@ -282,14 +278,13 @@
if (!need_siga_sync(q))
return 0;
return cc;
}
-@@ -330,17 +325,13 @@ static int qdio_siga_output(struct qdio_
+@@ -330,17 +325,13 @@
int cc;
u32 busy_bit;
u64 start_time = 0;
- char dbf_text[15];
--
+
- QDIO_DBF_TEXT5(0, trace, "sigaout");
- QDIO_DBF_HEX5(0, trace, &q, sizeof(void *));
-
+-
+ DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "siga-w:%1d", q->nr);
qdio_perf_stat_inc(&perf_stats.siga_out);
again:
if (!start_time)
start_time = get_usecs();
-@@ -351,7 +342,7 @@ again:
+@@ -351,7 +342,7 @@
if (cc == 2 && busy_bit)
cc |= QDIO_ERROR_SIGA_BUSY;
if (cc)
return cc;
}
-@@ -359,14 +350,12 @@ static inline int qdio_siga_input(struct
+@@ -359,14 +350,12 @@
{
int cc;
return cc;
}
-@@ -384,35 +373,91 @@ void qdio_sync_after_thinint(struct qdio
+@@ -384,48 +373,97 @@
inline void qdio_stop_polling(struct qdio_q *q)
{
}
static int get_inbound_buffer_frontier(struct qdio_q *q)
-@@ -421,13 +466,6 @@ static int get_inbound_buffer_frontier(s
+ {
+ int count, stop;
unsigned char state;
-
- /*
+-
+- /*
- * If we still poll don't update last_move_ftc, keep the
- * previously ACK buffer there.
- */
- if (!q->u.in.polling)
- q->last_move_ftc = q->first_to_check;
--
-- /*
+
+ /*
* Don't check 128 buffers, as otherwise qdio_inbound_q_moved
- * would return 0.
- */
-@@ -447,34 +485,13 @@ check_next:
+@@ -447,34 +485,13 @@
if (q->first_to_check == stop)
goto out;
/*
* No siga-sync needed for non-qebsm here, as the inbound queue
* will be synced on the next siga-r, resp.
-@@ -484,7 +501,7 @@ check_next:
+@@ -484,7 +501,7 @@
atomic_sub(count, &q->nr_buf_used);
goto check_next;
case SLSB_P_INPUT_ERROR:
/* process the buffer, the upper layer will take care of it */
q->first_to_check = add_buf(q->first_to_check, count);
atomic_sub(count, &q->nr_buf_used);
-@@ -492,13 +509,12 @@ check_next:
+@@ -492,13 +509,12 @@
case SLSB_CU_INPUT_EMPTY:
case SLSB_P_INPUT_NOT_INIT:
case SLSB_P_INPUT_ACK:
return q->first_to_check;
}
-@@ -512,8 +528,7 @@ int qdio_inbound_q_moved(struct qdio_q *
+@@ -512,8 +528,7 @@
if (!need_siga_sync(q) && !pci_out_supported(q))
q->u.in.timestamp = get_usecs();
return 1;
} else
return 0;
-@@ -522,9 +537,6 @@ int qdio_inbound_q_moved(struct qdio_q *
+@@ -522,9 +537,6 @@
static int qdio_inbound_q_done(struct qdio_q *q)
{
unsigned char state;
if (!atomic_read(&q->nr_buf_used))
return 1;
-@@ -535,7 +547,7 @@ static int qdio_inbound_q_done(struct qd
+@@ -535,7 +547,7 @@
*/
qdio_siga_sync_q(q);
if (state == SLSB_P_INPUT_PRIMED)
/* we got something to do */
return 0;
-@@ -549,20 +561,12 @@ static int qdio_inbound_q_done(struct qd
+@@ -549,20 +561,12 @@
* has (probably) not moved (see qdio_inbound_processing).
*/
if (get_usecs() > q->u.in.timestamp + QDIO_INPUT_THRESHOLD) {
return 0;
}
}
-@@ -570,9 +574,6 @@ static int qdio_inbound_q_done(struct qd
+@@ -570,9 +574,6 @@
void qdio_kick_inbound_handler(struct qdio_q *q)
{
int count, start, end;
qdio_perf_stat_inc(&perf_stats.inbound_handler);
-@@ -583,10 +584,7 @@ void qdio_kick_inbound_handler(struct qd
+@@ -583,10 +584,7 @@
else
count = end + QDIO_MAX_BUFFERS_PER_Q - start;
if (unlikely(q->irq_ptr->state != QDIO_IRQ_STATE_ACTIVE))
return;
-@@ -652,14 +650,14 @@ check_next:
+@@ -652,14 +650,14 @@
if (q->first_to_check == stop)
return q->first_to_check;
atomic_sub(count, &q->nr_buf_used);
q->first_to_check = add_buf(q->first_to_check, count);
-@@ -671,14 +669,14 @@ check_next:
+@@ -671,14 +669,14 @@
break;
goto check_next;
case SLSB_P_OUTPUT_ERROR:
break;
case SLSB_P_OUTPUT_NOT_INIT:
case SLSB_P_OUTPUT_HALTED:
-@@ -703,8 +701,7 @@ static inline int qdio_outbound_q_moved(
+@@ -703,8 +701,7 @@
if ((bufnr != q->last_move_ftc) || q->qdio_error) {
q->last_move_ftc = bufnr;
return 1;
} else
return 0;
-@@ -739,12 +736,8 @@ static inline int qdio_outbound_q_moved(
+@@ -739,12 +736,8 @@
static void qdio_kick_outbound_q(struct qdio_q *q)
{
int rc;
if (!need_siga_out(q))
return;
-@@ -753,15 +746,9 @@ static void qdio_kick_outbound_q(struct
+@@ -753,15 +746,9 @@
switch (rc) {
case 0:
/* TODO: improve error handling for CC=0 case */
/* went smooth this time, reset timestamp */
q->u.out.timestamp = 0;
break;
-@@ -778,12 +765,7 @@ static void qdio_kick_outbound_q(struct
+@@ -778,12 +765,7 @@
tasklet_schedule(&q->tasklet);
break;
}
default:
/* for plain cc=1, 2 or 3 */
q->qdio_error = rc;
-@@ -793,9 +775,6 @@ static void qdio_kick_outbound_q(struct
+@@ -793,9 +775,6 @@
static void qdio_kick_outbound_handler(struct qdio_q *q)
{
int start, end, count;
start = q->first_to_kick;
end = q->last_move_ftc;
-@@ -804,13 +783,8 @@ static void qdio_kick_outbound_handler(s
+@@ -804,13 +783,8 @@
else
count = end + QDIO_MAX_BUFFERS_PER_Q - start;
if (unlikely(q->irq_ptr->state != QDIO_IRQ_STATE_ACTIVE))
return;
-@@ -851,6 +825,12 @@ static void __qdio_outbound_processing(s
+@@ -850,6 +824,12 @@
+ /* bail out for HiperSockets unicast queues */
if (queue_type(q) == QDIO_IQDIO_QFMT && !multicast_outbound(q))
return;
-
++
+ if ((queue_type(q) == QDIO_IQDIO_QFMT) &&
+ (atomic_read(&q->nr_buf_used)) > QDIO_IQDIO_POLL_LVL) {
+ tasklet_schedule(&q->tasklet);
+ return;
+ }
-+
+
if (q->u.out.pci_out_enabled)
return;
-
-@@ -899,27 +879,18 @@ void qdio_check_outbound_after_thinint(s
+@@ -899,27 +879,18 @@
static inline void qdio_set_state(struct qdio_irq *irq_ptr,
enum qdio_irq_states state)
{
}
}
-@@ -953,14 +924,10 @@ static void qdio_handle_activate_check(s
+@@ -953,14 +924,10 @@
{
struct qdio_irq *irq_ptr = cdev->private->qdio_data;
struct qdio_q *q;
if (irq_ptr->nr_input_qs) {
q = irq_ptr->input_qs[0];
-@@ -1013,28 +980,29 @@ static void qdio_int_error(struct ccw_de
+@@ -1013,28 +980,29 @@
}
static int qdio_establish_check_errors(struct ccw_device *cdev, int cstat,
qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ERR);
return 1;
}
-@@ -1043,12 +1011,8 @@ static void qdio_establish_handle_irq(st
+@@ -1043,12 +1011,8 @@
int dstat)
{
struct qdio_irq *irq_ptr = cdev->private->qdio_data;
- char dbf_text[15];
--
+
- sprintf(dbf_text, "qehi%4x", cdev->private->schid.sch_no);
- QDIO_DBF_TEXT0(0, setup, dbf_text);
- QDIO_DBF_TEXT0(0, trace, dbf_text);
-
+-
+ DBF_DEV_EVENT(DBF_INFO, irq_ptr, "qest irq");
if (!qdio_establish_check_errors(cdev, cstat, dstat))
qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ESTABLISHED);
}
-@@ -1059,26 +1023,21 @@ void qdio_int_handler(struct ccw_device
+@@ -1059,26 +1023,21 @@
{
struct qdio_irq *irq_ptr = cdev->private->qdio_data;
int cstat, dstat;
qdio_int_error(cdev);
return;
default:
-@@ -1086,7 +1045,7 @@ void qdio_int_handler(struct ccw_device
+@@ -1086,7 +1045,7 @@
return;
}
}
cstat = irb->scsw.cmd.cstat;
dstat = irb->scsw.cmd.dstat;
-@@ -1121,23 +1080,20 @@ void qdio_int_handler(struct ccw_device
+@@ -1121,23 +1080,20 @@
/**
* qdio_get_ssqd_desc - get qdio subchannel description
* @cdev: ccw device to get description for
{
- struct qdio_irq *irq_ptr;
- char dbf_text[15];
--
+
- sprintf(dbf_text, "qssq%4x", cdev->private->schid.sch_no);
- QDIO_DBF_TEXT0(0, setup, dbf_text);
++ if (!cdev || !cdev->private)
++ return -EINVAL;
- irq_ptr = cdev->private->qdio_data;
- if (!irq_ptr)
- return NULL;
-+ if (!cdev || !cdev->private)
-+ return -EINVAL;
-
+-
- return &irq_ptr->ssqd_desc;
+ DBF_EVENT("get ssqd:%4x", cdev->private->schid.sch_no);
+ return qdio_setup_get_ssqd(NULL, &cdev->private->schid, data);
}
EXPORT_SYMBOL_GPL(qdio_get_ssqd_desc);
-@@ -1151,14 +1107,9 @@ EXPORT_SYMBOL_GPL(qdio_get_ssqd_desc);
+@@ -1151,14 +1107,9 @@
*/
int qdio_cleanup(struct ccw_device *cdev, int how)
{
if (!irq_ptr)
return -ENODEV;
-@@ -1191,18 +1142,15 @@ static void qdio_shutdown_queues(struct
+@@ -1191,17 +1142,14 @@
*/
int qdio_shutdown(struct ccw_device *cdev, int how)
{
- irq_ptr = cdev->private->qdio_data;
if (!irq_ptr)
return -ENODEV;
-
-+ DBF_EVENT("qshutdown:%4x", cdev->private->schid.sch_no);
+
++ DBF_EVENT("qshutdown:%4x", cdev->private->schid.sch_no);
+
mutex_lock(&irq_ptr->setup_mutex);
/*
- * Subchannel was already shot down. We cannot prevent being called
-@@ -1226,10 +1174,8 @@ int qdio_shutdown(struct ccw_device *cde
+@@ -1226,10 +1174,8 @@
/* default behaviour is halt */
rc = ccw_device_halt(cdev, QDIO_DOING_CLEANUP);
if (rc) {
goto no_cleanup;
}
-@@ -1263,17 +1209,18 @@ EXPORT_SYMBOL_GPL(qdio_shutdown);
+@@ -1263,17 +1209,18 @@
*/
int qdio_free(struct ccw_device *cdev)
{
- struct qdio_irq *irq_ptr;
- char dbf_text[15];
--
-- sprintf(dbf_text, "qfre%4x", cdev->private->schid.sch_no);
-- QDIO_DBF_TEXT0(0, setup, dbf_text);
+ struct qdio_irq *irq_ptr = cdev->private->qdio_data;
+- sprintf(dbf_text, "qfre%4x", cdev->private->schid.sch_no);
+- QDIO_DBF_TEXT0(0, setup, dbf_text);
+-
- irq_ptr = cdev->private->qdio_data;
if (!irq_ptr)
return -ENODEV;
cdev->private->qdio_data = NULL;
mutex_unlock(&irq_ptr->setup_mutex);
-@@ -1292,10 +1239,6 @@ EXPORT_SYMBOL_GPL(qdio_free);
+@@ -1292,10 +1239,6 @@
int qdio_initialize(struct qdio_initialize *init_data)
{
int rc;
rc = qdio_allocate(init_data);
if (rc)
-@@ -1315,10 +1258,8 @@ EXPORT_SYMBOL_GPL(qdio_initialize);
+@@ -1315,10 +1258,8 @@
int qdio_allocate(struct qdio_initialize *init_data)
{
struct qdio_irq *irq_ptr;
if ((init_data->no_input_qs && !init_data->input_handler) ||
(init_data->no_output_qs && !init_data->output_handler))
-@@ -1332,16 +1273,13 @@ int qdio_allocate(struct qdio_initialize
+@@ -1332,16 +1273,13 @@
(!init_data->output_sbal_addr_array))
return -EINVAL;
/*
* Allocate a page for the chsc calls in qdio_establish.
-@@ -1359,9 +1297,6 @@ int qdio_allocate(struct qdio_initialize
+@@ -1358,9 +1296,6 @@
+ if (!irq_ptr->qdr)
goto out_rel;
WARN_ON((unsigned long)irq_ptr->qdr & 0xfff);
-
+-
- QDIO_DBF_TEXT0(0, setup, "qdr:");
- QDIO_DBF_HEX0(0, setup, &irq_ptr->qdr, sizeof(void *));
--
+
if (qdio_allocate_qs(irq_ptr, init_data->no_input_qs,
init_data->no_output_qs))
- goto out_rel;
-@@ -1382,14 +1317,12 @@ EXPORT_SYMBOL_GPL(qdio_allocate);
+@@ -1382,14 +1317,12 @@
*/
int qdio_establish(struct qdio_initialize *init_data)
{
irq_ptr = cdev->private->qdio_data;
if (!irq_ptr)
-@@ -1419,10 +1352,8 @@ int qdio_establish(struct qdio_initializ
+@@ -1419,10 +1352,8 @@
rc = ccw_device_start(cdev, &irq_ptr->ccw, QDIO_DOING_ESTABLISH, 0, 0);
if (rc) {
}
spin_unlock_irqrestore(get_ccwdev_lock(cdev), saveflags);
-@@ -1443,8 +1374,7 @@ int qdio_establish(struct qdio_initializ
+@@ -1443,8 +1374,7 @@
}
qdio_setup_ssqd_info(irq_ptr);
/* qebsm is now setup if available, initialize buffer states */
qdio_init_buf_states(irq_ptr);
-@@ -1465,10 +1395,8 @@ int qdio_activate(struct ccw_device *cde
+@@ -1465,10 +1395,8 @@
struct qdio_irq *irq_ptr;
int rc;
unsigned long saveflags;
irq_ptr = cdev->private->qdio_data;
if (!irq_ptr)
-@@ -1494,10 +1422,8 @@ int qdio_activate(struct ccw_device *cde
+@@ -1494,10 +1422,8 @@
rc = ccw_device_start(cdev, &irq_ptr->ccw, QDIO_DOING_ACTIVATE,
0, DOIO_DENY_PREFETCH);
if (rc) {
}
spin_unlock_irqrestore(get_ccwdev_lock(cdev), saveflags);
-@@ -1555,23 +1481,38 @@ static inline int buf_in_between(int buf
+@@ -1555,23 +1481,38 @@
static void handle_inbound(struct qdio_q *q, unsigned int callflags,
int bufnr, int count)
{
used = atomic_add_return(count, &q->nr_buf_used) - count;
BUG_ON(used + count > QDIO_MAX_BUFFERS_PER_Q);
-@@ -1630,11 +1571,11 @@ static void handle_outbound(struct qdio_
+@@ -1630,11 +1571,11 @@
}
/* try to fast requeue buffers */
qdio_perf_stat_inc(&perf_stats.fast_requeue);
}
out:
-@@ -1654,12 +1595,6 @@ int do_QDIO(struct ccw_device *cdev, uns
+@@ -1654,12 +1595,6 @@
int q_nr, int bufnr, int count)
{
struct qdio_irq *irq_ptr;
if ((bufnr > QDIO_MAX_BUFFERS_PER_Q) ||
(count > QDIO_MAX_BUFFERS_PER_Q) ||
-@@ -1673,33 +1608,24 @@ int do_QDIO(struct ccw_device *cdev, uns
+@@ -1673,33 +1608,24 @@
if (!irq_ptr)
return -ENODEV;
return 0;
}
EXPORT_SYMBOL_GPL(do_QDIO);
-diff -purN linux-2.6.27/drivers/s390/cio/qdio_perf.c linux-2.6.27.19-5.1/drivers/s390/cio/qdio_perf.c
---- linux-2.6.27/drivers/s390/cio/qdio_perf.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio_perf.c 2009-03-25 16:11:24.000000000 +0000
-@@ -74,6 +74,8 @@ static int qdio_perf_proc_show(struct se
+diff -r 9608d5473017 drivers/s390/cio/qdio_perf.c
+--- a/drivers/s390/cio/qdio_perf.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio_perf.c Wed May 06 16:56:31 2009 +0100
+@@ -74,6 +74,8 @@
seq_printf(m, "\n");
seq_printf(m, "Number of fast requeues (outg. SBAL w/o SIGA)\t: %li\n",
(long)atomic_long_read(&perf_stats.fast_requeue));
seq_printf(m, "Number of outbound tasklet mod_timer calls\t: %li\n",
(long)atomic_long_read(&perf_stats.debug_tl_out_timer));
seq_printf(m, "Number of stop polling calls\t\t\t: %li\n",
-diff -purN linux-2.6.27/drivers/s390/cio/qdio_perf.h linux-2.6.27.19-5.1/drivers/s390/cio/qdio_perf.h
---- linux-2.6.27/drivers/s390/cio/qdio_perf.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio_perf.h 2009-03-25 16:11:24.000000000 +0000
-@@ -36,6 +36,7 @@ struct qdio_perf_stats {
+diff -r 9608d5473017 drivers/s390/cio/qdio_perf.h
+--- a/drivers/s390/cio/qdio_perf.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio_perf.h Wed May 06 16:56:31 2009 +0100
+@@ -36,6 +36,7 @@
atomic_long_t inbound_handler;
atomic_long_t outbound_handler;
atomic_long_t fast_requeue;
/* for debugging */
atomic_long_t debug_tl_out_timer;
-diff -purN linux-2.6.27/drivers/s390/cio/qdio_setup.c linux-2.6.27.19-5.1/drivers/s390/cio/qdio_setup.c
---- linux-2.6.27/drivers/s390/cio/qdio_setup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio_setup.c 2009-03-25 16:11:24.000000000 +0000
-@@ -120,14 +120,12 @@ static void setup_queues_misc(struct qdi
+diff -r 9608d5473017 drivers/s390/cio/qdio_setup.c
+--- a/drivers/s390/cio/qdio_setup.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio_setup.c Wed May 06 16:56:31 2009 +0100
+@@ -120,14 +120,12 @@
}
static void setup_storage_lists(struct qdio_q *q, struct qdio_irq *irq_ptr,
q->sl = (struct sl *)((char *)q->slib + PAGE_SIZE / 2);
/* fill in sbal */
-@@ -150,31 +148,26 @@ static void setup_storage_lists(struct q
+@@ -150,31 +148,26 @@
for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; j++)
q->sl->element[j].sbal = (unsigned long)q->sbal[j];
input_sbal_array += QDIO_MAX_BUFFERS_PER_Q;
if (is_thinint_irq(irq_ptr))
-@@ -186,12 +179,11 @@ static void setup_queues(struct qdio_irq
+@@ -186,12 +179,11 @@
}
for_each_output_queue(irq_ptr, q, i) {
output_sbal_array += QDIO_MAX_BUFFERS_PER_Q;
tasklet_init(&q->tasklet, qdio_outbound_processing,
-@@ -222,8 +214,6 @@ static void process_ac_flags(struct qdio
+@@ -222,8 +214,6 @@
static void check_and_setup_qebsm(struct qdio_irq *irq_ptr,
unsigned char qdioac, unsigned long token)
{
if (!(irq_ptr->qib.rflags & QIB_RFLAGS_ENABLE_QEBSM))
goto no_qebsm;
if (!(qdioac & AC1_SC_QEBSM_AVAILABLE) ||
-@@ -232,33 +222,41 @@ static void check_and_setup_qebsm(struct
+@@ -232,33 +222,41 @@
irq_ptr->sch_token = token;
if (chsc(ssqd))
return -EIO;
-@@ -268,27 +266,29 @@ static int __get_ssqd_info(struct qdio_i
+@@ -268,27 +266,29 @@
if (!(ssqd->qdio_ssqd.flags & CHSC_FLAG_QDIO_CAPABILITY) ||
!(ssqd->qdio_ssqd.flags & CHSC_FLAG_VALIDITY) ||
/* all flags set, worst case */
qdioac = AC1_SIGA_INPUT_NEEDED | AC1_SIGA_OUTPUT_NEEDED |
AC1_SIGA_SYNC_NEEDED;
-@@ -297,9 +297,7 @@ void qdio_setup_ssqd_info(struct qdio_ir
+@@ -297,9 +297,7 @@
check_and_setup_qebsm(irq_ptr, qdioac, irq_ptr->ssqd_desc.sch_token);
process_ac_flags(irq_ptr, qdioac);
}
void qdio_release_memory(struct qdio_irq *irq_ptr)
-@@ -419,7 +417,7 @@ int qdio_setup_irq(struct qdio_initializ
+@@ -419,7 +417,7 @@
/* get qdio commands */
ciw = ccw_device_get_ciw(init_data->cdev, CIW_TYPE_EQUEUE);
if (!ciw) {
rc = -EINVAL;
goto out_err;
}
-@@ -427,7 +425,7 @@ int qdio_setup_irq(struct qdio_initializ
+@@ -427,7 +425,7 @@
ciw = ccw_device_get_ciw(init_data->cdev, CIW_TYPE_AQUEUE);
if (!ciw) {
rc = -EINVAL;
goto out_err;
}
-@@ -447,56 +445,38 @@ void qdio_print_subchannel_info(struct q
+@@ -447,56 +445,38 @@
{
char s[80];
return 0;
}
-diff -purN linux-2.6.27/drivers/s390/cio/qdio_thinint.c linux-2.6.27.19-5.1/drivers/s390/cio/qdio_thinint.c
---- linux-2.6.27/drivers/s390/cio/qdio_thinint.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio_thinint.c 2009-03-25 16:11:24.000000000 +0000
-@@ -131,7 +131,7 @@ static inline int tiqdio_inbound_q_done(
+diff -r 9608d5473017 drivers/s390/cio/qdio_thinint.c
+--- a/drivers/s390/cio/qdio_thinint.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio_thinint.c Wed May 06 16:56:31 2009 +0100
+@@ -131,7 +131,7 @@
return 1;
qdio_siga_sync_q(q);
if (state == SLSB_P_INPUT_PRIMED)
/* more work coming */
-@@ -258,8 +258,6 @@ static void tiqdio_thinint_handler(void
+@@ -258,8 +258,6 @@
static int set_subchannel_ind(struct qdio_irq *irq_ptr, int reset)
{
struct scssc_area *scssc_area;
int rc;
scssc_area = (struct scssc_area *)irq_ptr->chsc_page;
-@@ -294,19 +292,15 @@ static int set_subchannel_ind(struct qdi
+@@ -294,19 +292,15 @@
rc = chsc_error_from_response(scssc_area->response.code);
if (rc) {
return 0;
}
-@@ -327,14 +321,11 @@ void tiqdio_free_memory(void)
+@@ -327,14 +321,11 @@
int __init tiqdio_register_thinints(void)
{
tiqdio_alsi = NULL;
isc_unregister(QDIO_AIRQ_ISC);
return -ENOMEM;
-@@ -360,7 +351,7 @@ void qdio_setup_thinint(struct qdio_irq
+@@ -360,7 +351,7 @@
if (!is_thinint_irq(irq_ptr))
return;
irq_ptr->dsci = get_indicator();
}
void qdio_shutdown_thinint(struct qdio_irq *irq_ptr)
-diff -purN linux-2.6.27/drivers/s390/crypto/ap_bus.c linux-2.6.27.19-5.1/drivers/s390/crypto/ap_bus.c
---- linux-2.6.27/drivers/s390/crypto/ap_bus.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/crypto/ap_bus.c 2009-03-25 16:11:24.000000000 +0000
-@@ -23,6 +23,8 @@
+diff -r 9608d5473017 drivers/s390/crypto/ap_bus.c
+--- a/drivers/s390/crypto/ap_bus.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/crypto/ap_bus.c Wed May 06 16:56:31 2009 +0100
+@@ -22,6 +22,8 @@
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
-+#define KMSG_COMPONENT "ap"
+
++#define KMSG_COMPONENT "ap"
+
#include <linux/module.h>
#include <linux/init.h>
- #include <linux/delay.h>
-@@ -1337,12 +1339,13 @@ int __init ap_module_init(void)
+@@ -1337,12 +1339,13 @@
int rc, i;
if (ap_domain_index < -1 || ap_domain_index >= AP_DOMAINS) {
return -ENODEV;
}
register_reset_call(&ap_reset_call);
-diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390/net/claw.c
---- linux-2.6.27/drivers/s390/net/claw.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/claw.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/s390/net/claw.c
+--- a/drivers/s390/net/claw.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/claw.c Wed May 06 16:56:31 2009 +0100
@@ -60,6 +60,9 @@
* 1.25 Added Packing support
* 1.5
static char debug_buffer[255];
/**
* Debug Facility Stuff
-@@ -298,8 +301,7 @@ claw_probe(struct ccwgroup_device *cgdev
+@@ -298,8 +301,7 @@
if (rc) {
probe_error(cgdev);
put_device(&cgdev->dev);
CLAW_DBF_TEXT_(2, setup, "probex%d", rc);
return rc;
}
-@@ -496,7 +498,8 @@ claw_open(struct net_device *dev)
+@@ -496,7 +498,8 @@
~(DEV_STAT_CHN_END | DEV_STAT_DEV_END)) != 0x00) ||
(((privptr->channel[READ].flag |
privptr->channel[WRITE].flag) & CLAW_TIMER) != 0x00)) {
CLAW_DBF_TEXT(2, trace, "notrdy");
for ( i = 0; i < 2; i++) {
-@@ -582,10 +585,9 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -582,10 +585,9 @@
CLAW_DBF_TEXT(4, trace, "clawirq");
/* Bypass all 'unsolicited interrupts' */
if (!cdev->dev.driver_data) {
CLAW_DBF_TEXT(2, trace, "badirq");
return;
}
-@@ -597,8 +599,8 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -597,8 +599,8 @@
else if (privptr->channel[WRITE].cdev == cdev)
p_ch = &privptr->channel[WRITE];
else {
CLAW_DBF_TEXT(2, trace, "badchan");
return;
}
-@@ -612,7 +614,8 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -612,7 +614,8 @@
/* Check for good subchannel return code, otherwise info message */
if (irb->scsw.cmd.cstat && !(irb->scsw.cmd.cstat & SCHN_STAT_PCI)) {
" Sch Stat %02x Dev Stat %02x CPA - %04x\n",
dev->name, p_ch->devno,
irb->scsw.cmd.cstat, irb->scsw.cmd.dstat,
-@@ -651,7 +654,7 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -651,7 +654,7 @@
wake_up(&p_ch->wait); /* wake claw_open (READ)*/
} else if (p_ch->flag == CLAW_WRITE) {
p_ch->claw_state = CLAW_START_WRITE;
claw_strt_read(dev, LOCK_NO);
claw_send_control(dev,
SYSTEM_VALIDATE_REQUEST,
-@@ -659,10 +662,9 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -659,10 +662,9 @@
p_env->host_name,
p_env->adapter_name);
} else {
irb->scsw.cmd.cstat,
irb->scsw.cmd.dstat);
return;
-@@ -677,8 +679,8 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -677,8 +679,8 @@
(p_ch->irb->ecw[0] & 0x40) == 0x40 ||
(p_ch->irb->ecw[0]) == 0) {
privptr->stats.rx_errors++;
"side recovers \n",
dev->name);
}
-@@ -713,11 +715,13 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -713,11 +715,13 @@
return;
case CLAW_START_WRITE:
if (p_ch->irb->scsw.cmd.dstat & DEV_STAT_UNIT_CHECK) {
"occurred:\n", dev->name);
init_timer(&p_ch->timer);
p_ch->timer.function =
-@@ -725,7 +729,8 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -725,7 +729,8 @@
p_ch->timer.data = (unsigned long)p_ch;
p_ch->timer.expires = jiffies + 10*HZ;
add_timer(&p_ch->timer);
"restarting\n", dev->name);
}
CLAW_DBF_TEXT(4, trace, "rstrtwrt");
-@@ -733,9 +738,10 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -733,9 +738,10 @@
}
if (p_ch->irb->scsw.cmd.dstat & DEV_STAT_UNIT_EXCEP) {
clear_bit(0, (void *)&p_ch->IO_active);
}
if (!((p_ch->irb->scsw.cmd.stctl & SCSW_STCTL_SEC_STATUS) ||
(p_ch->irb->scsw.cmd.stctl == SCSW_STCTL_STATUS_PEND) ||
-@@ -757,7 +763,8 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -757,7 +763,8 @@
CLAW_DBF_TEXT(4, trace, "StWtExit");
return;
default:
"state=%d\n", dev->name, p_ch->claw_state);
CLAW_DBF_TEXT(2, trace, "badIRQ");
return;
-@@ -910,7 +917,8 @@ claw_release(struct net_device *dev)
+@@ -910,7 +917,8 @@
if (((privptr->channel[READ].last_dstat |
privptr->channel[WRITE].last_dstat) &
~(DEV_STAT_CHN_END | DEV_STAT_DEV_END)) != 0x00) {
"read: %02x - write: %02x\n",
dev->name,
privptr->channel[READ].last_dstat,
-@@ -1135,20 +1143,19 @@ ccw_check_return_code(struct ccw_device
+@@ -1135,20 +1143,19 @@
case -EBUSY: /* BUSY is a transient state no action needed */
break;
case -ENODEV:
}
}
CLAW_DBF_TEXT(4, trace, "ccwret");
-@@ -1162,39 +1169,40 @@ static void
+@@ -1162,39 +1169,40 @@
ccw_check_unit_check(struct chbk * p_ch, unsigned char sense )
{
struct net_device *ndev = p_ch->ndev;
"(remote side)\n", ndev->name);
}
}
-@@ -2002,7 +2010,7 @@ claw_process_control( struct net_device
+@@ -2002,7 +2010,7 @@
tdev = &privptr->channel[READ].cdev->dev;
memcpy( &temp_host_name, p_env->host_name, 8);
memcpy( &temp_ws_name, p_env->adapter_name , 8);
"Received Control Packet\n",
dev->name, temp_ws_name);
if (privptr->release_pend==1) {
-@@ -2021,30 +2029,28 @@ claw_process_control( struct net_device
+@@ -2021,30 +2029,28 @@
if (p_ctlbk->version != CLAW_VERSION_ID) {
claw_snd_sys_validate_rsp(dev, p_ctlbk,
CLAW_RC_WRONG_VERSION);
dev->name,
p_sysval->host_name,
temp_host_name);
-@@ -2055,35 +2061,36 @@ claw_process_control( struct net_device
+@@ -2055,35 +2061,36 @@
CLAW_DBF_TEXT(2, setup, "WSNBAD");
CLAW_DBF_TEXT_(2, setup, "%s", p_sysval->WS_name);
CLAW_DBF_TEXT_(2, setup, "%s", temp_ws_name);
privptr->system_validate_comp = 1;
if (strncmp(p_env->api_type, WS_APPL_NAME_PACKED, 6) == 0)
p_env->packing = PACKING_ASK;
-@@ -2091,8 +2098,9 @@ claw_process_control( struct net_device
+@@ -2091,8 +2098,9 @@
break;
case SYSTEM_VALIDATE_RESPONSE:
p_sysval = (struct sysval *)&(p_ctlbk->data);
dev->name,
p_ctlbk->version,
p_ctlbk->correlator,
-@@ -2101,32 +2109,31 @@ claw_process_control( struct net_device
+@@ -2101,32 +2109,31 @@
p_sysval->host_name);
switch (p_ctlbk->rc) {
case 0:
"error code=%d \n",
dev->name, p_ctlbk->rc);
break;
-@@ -2135,7 +2142,7 @@ claw_process_control( struct net_device
+@@ -2135,7 +2142,7 @@
case CONNECTION_REQUEST:
p_connect = (struct conncmd *)&(p_ctlbk->data);
"Corr=%d,HOST appl=%.8s,WS appl=%.8s\n",
dev->name,
p_ctlbk->version,
-@@ -2145,20 +2152,20 @@ claw_process_control( struct net_device
+@@ -2145,20 +2152,20 @@
p_connect->WS_name);
if (privptr->active_link_ID != 0) {
claw_snd_disc(dev, p_ctlbk);
"req appl name does not match\n",
dev->name);
}
-@@ -2171,7 +2178,7 @@ claw_process_control( struct net_device
+@@ -2171,7 +2178,7 @@
p_env->packing = PACK_SEND;
claw_snd_conn_req(dev, 0);
}
"completed link_id=%d.\n",
dev->name, temp_ws_name,
p_ctlbk->linkid);
-@@ -2181,7 +2188,7 @@ claw_process_control( struct net_device
+@@ -2181,7 +2188,7 @@
break;
case CONNECTION_RESPONSE:
p_connect = (struct conncmd *)&(p_ctlbk->data);
"Corr=%d,RC=%d,Host appl=%.8s, WS appl=%.8s\n",
dev->name,
p_ctlbk->version,
-@@ -2192,7 +2199,7 @@ claw_process_control( struct net_device
+@@ -2192,7 +2199,7 @@
p_connect->WS_name);
if (p_ctlbk->rc != 0) {
dev->name, p_ctlbk->rc);
return 1;
}
-@@ -2200,7 +2207,7 @@ claw_process_control( struct net_device
+@@ -2200,7 +2207,7 @@
p_connect->host_name, p_connect->WS_name);
if (rc != 0) {
claw_snd_disc(dev, p_ctlbk);
"req appl name does not match\n",
dev->name);
}
-@@ -2209,7 +2216,8 @@ claw_process_control( struct net_device
+@@ -2209,7 +2216,8 @@
break;
case CONNECTION_CONFIRM:
p_connect = (struct conncmd *)&(p_ctlbk->data);
"Corr=%d,Host appl=%.8s,WS appl=%.8s\n",
dev->name,
p_ctlbk->version,
-@@ -2220,21 +2228,21 @@ claw_process_control( struct net_device
+@@ -2220,21 +2228,21 @@
if (p_ctlbk->linkid == -(privptr->active_link_ID)) {
privptr->active_link_ID = p_ctlbk->linkid;
if (p_env->packing > PACKING_ASK) {
"Vers=%d,link_id=%d,Corr=%d\n",
dev->name, p_ctlbk->version,
p_ctlbk->linkid, p_ctlbk->correlator);
-@@ -2246,11 +2254,11 @@ claw_process_control( struct net_device
+@@ -2246,11 +2254,11 @@
privptr->active_link_ID = 0;
break;
case CLAW_ERROR:
dev->name, p_ctlbk->command);
break;
}
-@@ -2510,7 +2518,8 @@ unpack_read(struct net_device *dev )
+@@ -2510,7 +2518,8 @@
mtc_this_frm=1;
if (p_this_ccw->header.length!=
privptr->p_env->read_size ) {
"length is %02x\n" ,
dev->name, p_this_ccw->header.length);
}
-@@ -2594,8 +2603,8 @@ unpack_next:
+@@ -2594,8 +2603,8 @@
}
else {
privptr->stats.rx_dropped++;
}
privptr->mtc_offset=0;
privptr->mtc_logical_link=-1;
-@@ -2879,7 +2888,8 @@ claw_new_device(struct ccwgroup_device *
+@@ -2879,7 +2888,8 @@
int ret;
struct ccw_dev_id dev_id;
CLAW_DBF_TEXT(2, setup, "new_dev");
privptr = cgdev->dev.driver_data;
cgdev->cdev[READ]->dev.driver_data = privptr;
-@@ -2895,27 +2905,28 @@ claw_new_device(struct ccwgroup_device *
+@@ -2895,27 +2905,28 @@
if (ret == 0)
ret = add_channel(cgdev->cdev[1],1,privptr);
if (ret != 0) {
goto out;
}
dev->ml_priv = privptr;
-@@ -2943,13 +2954,13 @@ claw_new_device(struct ccwgroup_device *
+@@ -2943,13 +2954,13 @@
privptr->channel[WRITE].ndev = dev;
privptr->p_env->ndev = dev;
":%.8s api_type: %.8s\n",
dev->name, p_env->host_name,
p_env->adapter_name , p_env->api_type);
-@@ -2993,8 +3004,8 @@ claw_shutdown_device(struct ccwgroup_dev
+@@ -2993,8 +3004,8 @@
ndev = priv->channel[READ].ndev;
if (ndev) {
/* Close the device */
if (ndev->flags & IFF_RUNNING)
ret = claw_release(ndev);
ndev->flags &=~IFF_RUNNING;
-@@ -3019,8 +3030,7 @@ claw_remove_device(struct ccwgroup_devic
+@@ -3019,8 +3030,7 @@
CLAW_DBF_TEXT_(2, setup, "%s", cgdev->dev.bus_id);
priv = cgdev->dev.driver_data;
BUG_ON(!priv);
if (cgdev->state == CCWGROUP_ONLINE)
claw_shutdown_device(cgdev);
claw_remove_files(&cgdev->dev);
-@@ -3285,7 +3295,7 @@ claw_cleanup(void)
+@@ -3285,7 +3295,7 @@
{
unregister_cu3088_discipline(&claw_group_driver);
claw_unregister_debug_facility();
}
-@@ -3299,12 +3309,11 @@ static int __init
+@@ -3299,12 +3309,11 @@
claw_init(void)
{
int ret = 0;
return ret;
}
CLAW_DBF_TEXT(2, setup, "init_mod");
-@@ -3312,8 +3321,7 @@ claw_init(void)
+@@ -3312,8 +3321,7 @@
if (ret) {
CLAW_DBF_TEXT(2, setup, "init_bad");
claw_unregister_debug_facility();
}
return ret;
}
-diff -purN linux-2.6.27/drivers/s390/net/ctcm_fsms.c linux-2.6.27.19-5.1/drivers/s390/net/ctcm_fsms.c
---- linux-2.6.27/drivers/s390/net/ctcm_fsms.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/ctcm_fsms.c 2009-03-25 16:11:23.000000000 +0000
-@@ -13,6 +13,8 @@
+diff -r 9608d5473017 drivers/s390/net/ctcm_fsms.c
+--- a/drivers/s390/net/ctcm_fsms.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/ctcm_fsms.c Wed May 06 16:56:31 2009 +0100
+@@ -12,6 +12,8 @@
+ #undef DEBUG
#undef DEBUGDATA
#undef DEBUGCCW
-
-+#define KMSG_COMPONENT "ctcm"
+
++#define KMSG_COMPONENT "ctcm"
+
#include <linux/module.h>
#include <linux/init.h>
- #include <linux/kernel.h>
-@@ -190,21 +192,22 @@ static void ctcmpc_chx_send_sweep(fsm_in
+@@ -190,21 +192,22 @@
void ctcm_ccw_check_rc(struct channel *ch, int rc, char *msg)
{
CTCM_DBF_TEXT_(ERROR, CTC_DBF_ERROR,
fsm_event(ch->fsm, CTC_EVENT_IO_UNKNOWN, ch);
}
}
-@@ -886,8 +889,15 @@ static void ctcm_chx_rxiniterr(fsm_insta
+@@ -886,8 +889,15 @@
fsm_newstate(fi, CTC_STATE_RXERR);
fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev);
}
}
/**
-@@ -969,7 +979,9 @@ static void ctcm_chx_txiniterr(fsm_insta
+@@ -969,7 +979,9 @@
"%s(%s): %s in %s", CTCM_FUNTAIL, ch->id,
ctc_ch_event_names[event], fsm_getstate_str(fi));
}
}
-@@ -2101,14 +2113,11 @@ static void dev_action_restart(fsm_insta
+@@ -2101,14 +2113,11 @@
CTCMY_DBF_DEV_NAME(TRACE, dev, "");
if (IS_MPC(priv)) {
dev_action_stop(fi, event, arg);
fsm_event(priv->fsm, DEV_EVENT_STOP, dev);
-@@ -2150,16 +2159,16 @@ static void dev_action_chup(fsm_instance
+@@ -2150,16 +2159,16 @@
case DEV_STATE_STARTWAIT_RX:
if (event == DEV_EVENT_RXUP) {
fsm_newstate(fi, DEV_STATE_RUNNING);
ctcm_clear_busy(dev);
}
break;
-diff -purN linux-2.6.27/drivers/s390/net/ctcm_main.c linux-2.6.27.19-5.1/drivers/s390/net/ctcm_main.c
---- linux-2.6.27/drivers/s390/net/ctcm_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/ctcm_main.c 2009-03-25 16:11:23.000000000 +0000
-@@ -21,6 +21,8 @@
+diff -r 9608d5473017 drivers/s390/net/ctcm_main.c
+--- a/drivers/s390/net/ctcm_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/ctcm_main.c Wed May 06 16:56:32 2009 +0100
+@@ -20,6 +20,8 @@
+ #undef DEBUG
#undef DEBUGDATA
#undef DEBUGCCW
-
-+#define KMSG_COMPONENT "ctcm"
+
++#define KMSG_COMPONENT "ctcm"
+
#include <linux/module.h>
#include <linux/init.h>
- #include <linux/kernel.h>
-@@ -281,14 +283,16 @@ static long ctcm_check_irb_error(struct
+@@ -281,14 +283,16 @@
switch (PTR_ERR(irb)) {
case -EIO:
}
return PTR_ERR(irb);
}
-@@ -309,15 +313,17 @@ static inline void ccw_unit_check(struct
+@@ -309,15 +313,17 @@
if (sense & SNS0_INTERVENTION_REQ) {
if (sense & 0x01) {
if (ch->sense_rc != 0x01) {
ch->sense_rc = SNS0_INTERVENTION_REQ;
}
fsm_event(ch->fsm, CTC_EVENT_UC_RSRESET, ch);
-@@ -1194,8 +1200,11 @@ static void ctcm_irq_handler(struct ccw_
+@@ -1194,8 +1200,11 @@
/* Check for unsolicited interrupts. */
if (cgdev == NULL) {
return;
}
-@@ -1207,31 +1216,34 @@ static void ctcm_irq_handler(struct ccw_
+@@ -1207,31 +1216,34 @@
else if (priv->channel[WRITE]->cdev == cdev)
ch = priv->channel[WRITE];
else {
+ /* Explain: inconsistent internal structures */
return;
}
-
+-
- CTCM_DBF_TEXT_(TRACE, CTC_DBF_DEBUG,
- "%s(%s): int. for %s: cstat=%02x dstat=%02x",
- CTCM_FUNTAIL, dev->name, ch->id, cstat, dstat);
--
+
/* Copy interruption response block. */
memcpy(ch->irb, irb, sizeof(struct irb));
return;
}
-@@ -1239,7 +1251,7 @@ static void ctcm_irq_handler(struct ccw_
+@@ -1239,7 +1251,7 @@
if (irb->scsw.cmd.dstat & DEV_STAT_UNIT_CHECK) {
if ((irb->ecw[0] & ch->sense_rc) == 0)
/* print it only once */
"%s(%s): sense=%02x, ds=%02x",
CTCM_FUNTAIL, ch->id, irb->ecw[0], dstat);
ccw_unit_check(ch, irb->ecw[0]);
-@@ -1574,6 +1586,11 @@ static int ctcm_new_device(struct ccwgro
+@@ -1574,6 +1586,11 @@
strlcpy(priv->fsm->name, dev->name, sizeof(priv->fsm->name));
CTCM_DBF_TEXT_(SETUP, CTC_DBF_INFO,
"setup(%s) OK : r/w = %s/%s, protocol : %d", dev->name,
priv->channel[READ]->id,
-@@ -1687,7 +1704,7 @@ static void __exit ctcm_exit(void)
+@@ -1687,7 +1704,7 @@
{
unregister_cu3088_discipline(&ctcm_group_driver);
ctcm_unregister_dbf_views();
}
/*
-@@ -1695,7 +1712,7 @@ static void __exit ctcm_exit(void)
+@@ -1695,7 +1712,7 @@
*/
static void print_banner(void)
{
}
/**
-@@ -1717,8 +1734,8 @@ static int __init ctcm_init(void)
+@@ -1717,8 +1734,8 @@
ret = register_cu3088_discipline(&ctcm_group_driver);
if (ret) {
ctcm_unregister_dbf_views();
return ret;
}
print_banner();
-diff -purN linux-2.6.27/drivers/s390/net/ctcm_main.h linux-2.6.27.19-5.1/drivers/s390/net/ctcm_main.h
---- linux-2.6.27/drivers/s390/net/ctcm_main.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/ctcm_main.h 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/s390/net/ctcm_main.h
+--- a/drivers/s390/net/ctcm_main.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/ctcm_main.h Wed May 06 16:56:32 2009 +0100
@@ -41,12 +41,6 @@
#define LOG_FLAG_NOMEM 8
#define CTCM_PR_DEBUG(fmt, arg...) \
do { \
-diff -purN linux-2.6.27/drivers/s390/net/ctcm_mpc.c linux-2.6.27.19-5.1/drivers/s390/net/ctcm_mpc.c
---- linux-2.6.27/drivers/s390/net/ctcm_mpc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/ctcm_mpc.c 2009-03-25 16:11:24.000000000 +0000
-@@ -19,6 +19,8 @@
+diff -r 9608d5473017 drivers/s390/net/ctcm_mpc.c
+--- a/drivers/s390/net/ctcm_mpc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/ctcm_mpc.c Wed May 06 16:56:32 2009 +0100
+@@ -18,6 +18,8 @@
+ #undef DEBUG
#undef DEBUGDATA
#undef DEBUGCCW
-
-+#define KMSG_COMPONENT "ctcm"
+
++#define KMSG_COMPONENT "ctcm"
+
#include <linux/module.h>
#include <linux/init.h>
- #include <linux/kernel.h>
-@@ -386,7 +388,7 @@ int ctc_mpc_alloc_channel(int port_num,
+@@ -386,7 +388,7 @@
if (grp->allocchan_callback_retries < 4) {
if (grp->allochanfunc)
grp->allochanfunc(grp->port_num,
} else {
/* there are problems...bail out */
/* there may be a state mismatch so restart */
-@@ -1232,8 +1234,9 @@ done:
+@@ -1232,8 +1234,9 @@
dev_kfree_skb_any(pskb);
if (sendrc == NET_RX_DROP) {
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
}
-@@ -1670,10 +1673,11 @@ static int mpc_validate_xid(struct mpcg_
+@@ -1670,10 +1673,11 @@
CTCM_FUNTAIL, ch->id);
}
}
priv->xid->xid2_flag2 = 0x40;
grp->saved_xid2->xid2_flag2 = 0x40;
}
-diff -purN linux-2.6.27/drivers/s390/net/ctcm_sysfs.c linux-2.6.27.19-5.1/drivers/s390/net/ctcm_sysfs.c
---- linux-2.6.27/drivers/s390/net/ctcm_sysfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/ctcm_sysfs.c 2009-03-25 16:11:23.000000000 +0000
-@@ -10,6 +10,8 @@
+diff -r 9608d5473017 drivers/s390/net/ctcm_sysfs.c
+--- a/drivers/s390/net/ctcm_sysfs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/ctcm_sysfs.c Wed May 06 16:56:32 2009 +0100
+@@ -9,6 +9,8 @@
+ #undef DEBUG
#undef DEBUGDATA
#undef DEBUGCCW
-
-+#define KMSG_COMPONENT "ctcm"
+
++#define KMSG_COMPONENT "ctcm"
+
#include <linux/sysfs.h>
#include "ctcm_main.h"
-
-diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/net/lcs.c
---- linux-2.6.27/drivers/s390/net/lcs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/lcs.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/s390/net/lcs.c
+--- a/drivers/s390/net/lcs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/lcs.c Wed May 06 16:56:32 2009 +0100
@@ -26,6 +26,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/module.h>
#include <linux/if.h>
#include <linux/netdevice.h>
-@@ -54,8 +56,6 @@
+@@ -53,8 +55,6 @@
+ !defined(CONFIG_TR) && !defined(CONFIG_FDDI)
#error Cannot compile lcs.c without some net devices switched on.
#endif
-
--#define PRINTK_HEADER " lcs: "
-
+-#define PRINTK_HEADER " lcs: "
+
/**
* initialization string for output
- */
-@@ -96,7 +96,7 @@ lcs_register_debug_facility(void)
+@@ -96,7 +96,7 @@
lcs_dbf_setup = debug_register("lcs_setup", 2, 1, 8);
lcs_dbf_trace = debug_register("lcs_trace", 4, 1, 8);
if (lcs_dbf_setup == NULL || lcs_dbf_trace == NULL) {
lcs_unregister_debug_facility();
return -ENOMEM;
}
-@@ -502,7 +502,9 @@ lcs_start_channel(struct lcs_channel *ch
+@@ -502,7 +502,9 @@
spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags);
if (rc) {
LCS_DBF_TEXT_(4,trace,"essh%s", channel->ccwdev->dev.bus_id);
}
return rc;
}
-@@ -636,7 +638,9 @@ __lcs_resume_channel(struct lcs_channel
+@@ -636,7 +638,9 @@
rc = ccw_device_resume(channel->ccwdev);
if (rc) {
LCS_DBF_TEXT_(4, trace, "ersc%s", channel->ccwdev->dev.bus_id);
} else
channel->state = LCS_CH_STATE_RUNNING;
return rc;
-@@ -1082,7 +1086,7 @@ lcs_check_multicast_support(struct lcs_c
+@@ -1082,7 +1086,7 @@
cmd->cmd.lcs_qipassist.num_ip_pairs = 1;
rc = lcs_send_lancmd(card, buffer, __lcs_check_multicast_cb);
if (rc != 0) {
return -EOPNOTSUPP;
}
if (card->ip_assists_supported & LCS_IPASS_MULTICAST_SUPPORT)
-@@ -1115,8 +1119,8 @@ list_modified:
+@@ -1115,8 +1119,8 @@
rc = lcs_send_setipm(card, ipm);
spin_lock_irqsave(&card->ipm_lock, flags);
if (rc) {
/* store ipm in failed list -> will be added
* to ipm_list again, so a retry will be done
* during the next call of this function */
-@@ -1227,8 +1231,8 @@ lcs_set_mc_addresses(struct lcs_card *ca
+@@ -1227,8 +1231,8 @@
ipm = (struct lcs_ipm_list *)
kzalloc(sizeof(struct lcs_ipm_list), GFP_ATOMIC);
if (ipm == NULL) {
break;
}
memcpy(&ipm->ipm.mac_addr, buf, LCS_MAC_LENGTH);
-@@ -1302,18 +1306,21 @@ lcs_check_irb_error(struct ccw_device *c
+@@ -1302,18 +1306,21 @@
switch (PTR_ERR(irb)) {
case -EIO:
LCS_DBF_TEXT(2, trace, "ckirberr");
LCS_DBF_TEXT(2, trace, " rc???");
}
-@@ -1399,8 +1406,10 @@ lcs_irq(struct ccw_device *cdev, unsigne
+@@ -1399,8 +1406,10 @@
/* Check for channel and device errors presented */
rc = lcs_get_problem(cdev, irb);
if (rc || (dstat & DEV_STAT_UNIT_EXCEP)) {
if (rc) {
channel->state = LCS_CH_STATE_ERROR;
}
-@@ -1757,8 +1766,8 @@ lcs_get_control(struct lcs_card *card, s
+@@ -1757,8 +1766,8 @@
lcs_schedule_recovery(card);
break;
case LCS_CMD_STOPLAN:
if (card->dev)
netif_carrier_off(card->dev);
break;
-@@ -1786,7 +1795,8 @@ lcs_get_skb(struct lcs_card *card, char
+@@ -1786,7 +1795,8 @@
skb = dev_alloc_skb(skb_len);
if (skb == NULL) {
card->dev->name);
card->stats.rx_dropped++;
return;
-@@ -1882,7 +1892,8 @@ lcs_stop_device(struct net_device *dev)
+@@ -1882,7 +1892,8 @@
(card->write.state != LCS_CH_STATE_RUNNING));
rc = lcs_stopcard(card);
if (rc)
return rc;
}
-@@ -1901,7 +1912,7 @@ lcs_open_device(struct net_device *dev)
+@@ -1901,7 +1912,7 @@
/* initialize statistics */
rc = lcs_detect(card);
if (rc) {
} else {
dev->flags |= IFF_UP;
-@@ -2109,8 +2120,9 @@ lcs_new_device(struct ccwgroup_device *c
+@@ -2109,8 +2120,9 @@
rc = lcs_detect(card);
if (rc) {
LCS_DBF_TEXT(2, setup, "dtctfail");
lcs_stopcard(card);
goto out;
}
-@@ -2140,7 +2152,7 @@ lcs_new_device(struct ccwgroup_device *c
+@@ -2140,7 +2152,7 @@
#endif
default:
LCS_DBF_TEXT(3, setup, "errinit");
goto out;
}
if (!dev)
-@@ -2172,13 +2184,13 @@ netdev_out:
+@@ -2172,13 +2184,13 @@
goto out;
/* Print out supported assists: IPv6 */
return 0;
out:
-@@ -2244,15 +2256,16 @@ lcs_recovery(void *ptr)
+@@ -2244,15 +2256,16 @@
return 0;
LCS_DBF_TEXT(4, trace, "recover2");
gdev = card->gdev;
lcs_clear_thread_running_bit(card, LCS_RECOVERY_THREAD);
return 0;
}
-@@ -2304,17 +2317,17 @@ __init lcs_init_module(void)
+@@ -2304,17 +2317,17 @@
{
int rc;
return rc;
}
return 0;
-@@ -2327,7 +2340,7 @@ __init lcs_init_module(void)
+@@ -2327,7 +2340,7 @@
static void
__exit lcs_cleanup_module(void)
{
LCS_DBF_TEXT(0, trace, "cleanup");
unregister_cu3088_discipline(&lcs_group_driver);
lcs_unregister_debug_facility();
-diff -purN linux-2.6.27/drivers/s390/net/netiucv.c linux-2.6.27.19-5.1/drivers/s390/net/netiucv.c
---- linux-2.6.27/drivers/s390/net/netiucv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/netiucv.c 2009-03-25 16:11:23.000000000 +0000
-@@ -31,6 +31,8 @@
+diff -r 9608d5473017 drivers/s390/net/netiucv.c
+--- a/drivers/s390/net/netiucv.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/netiucv.c Wed May 06 16:56:32 2009 +0100
+@@ -30,6 +30,8 @@
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
-
-+#define KMSG_COMPONENT "netiucv"
+
++#define KMSG_COMPONENT "netiucv"
+
#undef DEBUG
- #include <linux/module.h>
-@@ -846,7 +848,8 @@ static void conn_action_connsever(fsm_in
+@@ -846,7 +848,8 @@
fsm_deltimer(&conn->timer);
iucv_path_sever(conn->path, NULL);
IUCV_DBF_TEXT(data, 2,
"conn_action_connsever: Remote dropped connection\n");
fsm_newstate(fi, CONN_STATE_STARTWAIT);
-@@ -856,13 +859,15 @@ static void conn_action_connsever(fsm_in
+@@ -856,13 +859,15 @@
static void conn_action_start(fsm_instance *fi, int event, void *arg)
{
struct iucv_connection *conn = arg;
/*
* We must set the state before calling iucv_connect because the
-@@ -876,41 +881,45 @@ static void conn_action_start(fsm_instan
+@@ -876,41 +881,45 @@
NULL, iucvMagic, conn);
switch (rc) {
case 0:
fsm_newstate(fi, CONN_STATE_CONNERR);
break;
}
-@@ -1059,8 +1068,9 @@ dev_action_connup(fsm_instance *fi, int
+@@ -1059,8 +1068,9 @@
switch (fsm_getstate(fi)) {
case DEV_STATE_STARTWAIT:
fsm_newstate(fi, DEV_STATE_RUNNING);
IUCV_DBF_TEXT(setup, 3,
"connection is up and running\n");
break;
-@@ -1982,6 +1992,8 @@ static ssize_t conn_write(struct device_
+@@ -1982,6 +1992,8 @@
if (rc)
goto out_unreg;
return count;
-@@ -2027,10 +2039,9 @@ static ssize_t remove_write (struct devi
+@@ -2027,10 +2039,9 @@
continue;
read_unlock_bh(&iucv_connection_rwlock);
if (ndev->flags & (IFF_UP | IFF_RUNNING)) {
IUCV_DBF_TEXT(data, 2, "remove_write: still active\n");
return -EPERM;
}
-@@ -2062,7 +2073,7 @@ static struct attribute_group *netiucv_d
+@@ -2062,7 +2073,7 @@
static void netiucv_banner(void)
{
}
static void __exit netiucv_exit(void)
-@@ -2088,7 +2099,7 @@ static void __exit netiucv_exit(void)
+@@ -2088,7 +2099,7 @@
iucv_unregister(&netiucv_handler, 1);
iucv_unregister_dbf_views();
return;
}
-diff -purN linux-2.6.27/drivers/s390/net/qeth_core.h linux-2.6.27.19-5.1/drivers/s390/net/qeth_core.h
---- linux-2.6.27/drivers/s390/net/qeth_core.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/qeth_core.h 2009-03-25 16:11:24.000000000 +0000
-@@ -34,8 +34,6 @@
+diff -r 9608d5473017 drivers/s390/net/qeth_core.h
+--- a/drivers/s390/net/qeth_core.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/qeth_core.h Wed May 06 16:56:32 2009 +0100
+@@ -33,8 +33,6 @@
+ #include <asm/ccwgroup.h>
#include "qeth_core_mpc.h"
-
--#define KMSG_COMPONENT "qeth"
-
+-#define KMSG_COMPONENT "qeth"
+
/**
* Debug Facility stuff
- */
-@@ -74,11 +72,6 @@ struct qeth_dbf_info {
+@@ -73,11 +71,6 @@
+
#define QETH_DBF_TEXT_(name, level, text...) \
qeth_dbf_longtext(QETH_DBF_##name, level, text)
-
+-
-/**
- * some more debug stuff
- */
-#define PRINTK_HEADER "qeth: "
--
+
#define SENSE_COMMAND_REJECT_BYTE 0
#define SENSE_COMMAND_REJECT_FLAG 0x80
- #define SENSE_RESETTING_EVENT_BYTE 1
-@@ -649,7 +642,6 @@ struct qeth_card_options {
+@@ -649,7 +642,6 @@
int macaddr_mode;
int fake_broadcast;
int add_hhlen;
int layer2;
enum qeth_large_send_types large_send;
int performance_stats;
-diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/drivers/s390/net/qeth_core_main.c
---- linux-2.6.27/drivers/s390/net/qeth_core_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/qeth_core_main.c 2009-03-25 16:11:24.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 drivers/s390/net/qeth_core_main.c
+--- a/drivers/s390/net/qeth_core_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/qeth_core_main.c Wed May 06 16:56:32 2009 +0100
+@@ -7,6 +7,8 @@
+ * Thomas Spatzier <tspat@de.ibm.com>,
* Frank Blaschka <frank.blaschka@de.ibm.com>
*/
-
-+#define KMSG_COMPONENT "qeth"
+
++#define KMSG_COMPONENT "qeth"
+
#include <linux/module.h>
#include <linux/moduleparam.h>
- #include <linux/string.h>
-@@ -319,7 +321,10 @@ static int qeth_issue_next_read(struct q
+@@ -319,7 +321,10 @@
return -EIO;
iob = qeth_get_buffer(&card->read);
if (!iob) {
return -ENOMEM;
}
qeth_setup_ccw(&card->read, iob->data, QETH_BUFSIZE);
-@@ -327,7 +332,8 @@ static int qeth_issue_next_read(struct q
+@@ -327,7 +332,8 @@
rc = ccw_device_start(card->read.ccwdev, &card->read.ccw,
(addr_t) iob, 0, 0);
if (rc) {
atomic_set(&card->read.irq_pending, 0);
qeth_schedule_recovery(card);
wake_up(&card->wait_q);
-@@ -393,10 +399,9 @@ static struct qeth_ipa_cmd *qeth_check_i
+@@ -393,10 +399,9 @@
} else {
switch (cmd->hdr.command) {
case IPA_CMD_STOPLAN:
QETH_CARD_IFNAME(card),
card->info.chpid);
card->lan_online = 0;
-@@ -404,9 +409,9 @@ static struct qeth_ipa_cmd *qeth_check_i
+@@ -404,9 +409,9 @@
netif_carrier_off(card->dev);
return NULL;
case IPA_CMD_STARTLAN:
QETH_CARD_IFNAME(card),
card->info.chpid);
netif_carrier_on(card->dev);
-@@ -458,7 +463,7 @@ static int qeth_check_idx_response(unsig
+@@ -458,7 +463,7 @@
QETH_DBF_HEX(CTRL, 2, buffer, QETH_DBF_CTRL_LEN);
if ((buffer[2] & 0xc0) == 0xc0) {
"with cause code 0x%02x%s\n",
buffer[4],
((buffer[4] == 0x22) ?
-@@ -566,6 +571,10 @@ static void qeth_send_control_data_cb(st
+@@ -566,6 +571,10 @@
card = CARD_FROM_CDEV(channel->ccwdev);
if (qeth_check_idx_response(iob->data)) {
qeth_clear_ipacmd_list(card);
qeth_schedule_recovery(card);
goto out;
}
-@@ -744,8 +753,10 @@ static int qeth_get_problem(struct ccw_d
+@@ -744,8 +753,10 @@
SCHN_STAT_CHN_DATA_CHK | SCHN_STAT_CHAIN_CHECK |
SCHN_STAT_PROT_CHECK | SCHN_STAT_PROG_CHECK)) {
QETH_DBF_TEXT(TRACE, 2, "CGENCHK");
print_hex_dump(KERN_WARNING, "qeth: irb ", DUMP_PREFIX_OFFSET,
16, 1, irb, 64, 1);
return 1;
-@@ -760,7 +771,7 @@ static int qeth_get_problem(struct ccw_d
+@@ -760,7 +771,7 @@
if (sense[SENSE_COMMAND_REJECT_BYTE] &
SENSE_COMMAND_REJECT_FLAG) {
QETH_DBF_TEXT(TRACE, 2, "CMDREJi");
}
if ((sense[2] == 0xaf) && (sense[3] == 0xfe)) {
QETH_DBF_TEXT(TRACE, 2, "AFFE");
-@@ -784,12 +795,14 @@ static long __qeth_check_irb_error(struc
+@@ -784,12 +795,14 @@
switch (PTR_ERR(irb)) {
case -EIO:
QETH_DBF_TEXT(TRACE, 2, "ckirberr");
QETH_DBF_TEXT_(TRACE, 2, " rc%d", -ETIMEDOUT);
if (intparm == QETH_RCD_PARM) {
-@@ -802,8 +815,8 @@ static long __qeth_check_irb_error(struc
+@@ -802,8 +815,8 @@
}
break;
default:
QETH_DBF_TEXT(TRACE, 2, "ckirberr");
QETH_DBF_TEXT(TRACE, 2, " rc???");
}
-@@ -869,10 +882,12 @@ static void qeth_irq(struct ccw_device *
+@@ -869,10 +882,12 @@
(dstat & DEV_STAT_UNIT_CHECK) ||
(cstat)) {
if (irb->esw.esw0.erw.cons) {
print_hex_dump(KERN_WARNING, "qeth: irb ",
DUMP_PREFIX_OFFSET, 16, 1, irb, 32, 1);
print_hex_dump(KERN_WARNING, "qeth: sense data ",
-@@ -884,6 +899,7 @@ static void qeth_irq(struct ccw_device *
+@@ -884,6 +899,7 @@
}
rc = qeth_get_problem(cdev, irb);
if (rc) {
qeth_schedule_recovery(card);
goto out;
}
-@@ -1059,7 +1075,6 @@ static void qeth_set_intial_options(stru
+@@ -1059,7 +1075,6 @@
card->options.macaddr_mode = QETH_TR_MACADDR_NONCANONICAL;
card->options.fake_broadcast = 0;
card->options.add_hhlen = DEFAULT_ADD_HHLEN;
card->options.performance_stats = 0;
card->options.rx_sg_cb = QETH_RX_SG_CB;
}
-@@ -1174,8 +1189,8 @@ static int qeth_determine_card_type(stru
+@@ -1174,8 +1189,8 @@
card->qdio.no_out_queues = known_devices[i][8];
card->info.is_multicast_different = known_devices[i][9];
if (qeth_is_1920_device(card)) {
card->qdio.no_out_queues = 1;
card->qdio.default_out_queue = 0;
}
-@@ -1184,7 +1199,8 @@ static int qeth_determine_card_type(stru
+@@ -1184,7 +1199,8 @@
i++;
}
card->info.type = QETH_CARD_TYPE_UNKNOWN;
return -ENOENT;
}
-@@ -1367,8 +1383,8 @@ static int qeth_get_unitaddr(struct qeth
+@@ -1367,8 +1383,8 @@
QETH_DBF_TEXT(SETUP, 2, "getunit");
rc = qeth_read_conf_data(card, (void **) &prcd, &length);
if (rc) {
return rc;
}
card->info.chpid = prcd[30];
-@@ -1518,7 +1534,10 @@ static int qeth_idx_activate_channel(str
+@@ -1518,7 +1534,10 @@
if (rc == -ERESTARTSYS)
return rc;
if (channel->state != CH_STATE_ACTIVATING) {
QETH_DBF_TEXT_(SETUP, 2, "2err%d", -ETIME);
qeth_clear_cmd_buffers(channel);
return -ETIME;
-@@ -1551,20 +1570,21 @@ static void qeth_idx_write_cb(struct qet
+@@ -1551,20 +1570,21 @@
if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
- PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
- "adapter exclusively used by another host\n",
- CARD_WDEV_ID(card));
+- else
+- PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
+- "negative reply\n", CARD_WDEV_ID(card));
+ dev_err(&card->write.ccwdev->dev,
+ "The adapter is used exclusively by another "
+ "host\n");
- else
-- PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
-- "negative reply\n", CARD_WDEV_ID(card));
++ else
+ QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on write channel:"
+ " negative reply\n",
+ dev_name(&card->write.ccwdev->dev));
goto out;
}
channel->state = CH_STATE_UP;
-@@ -1590,12 +1610,13 @@ static void qeth_idx_read_cb(struct qeth
+@@ -1590,12 +1610,13 @@
if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
- PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
- "adapter exclusively used by another host\n",
- CARD_RDEV_ID(card));
+- else
+- PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
+- "negative reply\n", CARD_RDEV_ID(card));
+ dev_err(&card->write.ccwdev->dev,
+ "The adapter is used exclusively by another "
+ "host\n");
- else
-- PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
-- "negative reply\n", CARD_RDEV_ID(card));
++ else
+ QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on read channel:"
+ " negative reply\n",
+ dev_name(&card->read.ccwdev->dev));
goto out;
}
-@@ -1609,9 +1630,10 @@ static void qeth_idx_read_cb(struct qeth
+@@ -1609,9 +1630,10 @@
memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2);
if (temp != qeth_peer_func_level(card->info.func_level)) {
goto out;
}
memcpy(&card->token.issuer_rm_r,
-@@ -1685,8 +1707,9 @@ int qeth_send_control_data(struct qeth_c
+@@ -1685,8 +1707,9 @@
(addr_t) iob, 0, 0);
spin_unlock_irqrestore(get_ccwdev_lock(card->write.ccwdev), flags);
if (rc) {
QETH_DBF_TEXT_(TRACE, 2, " err%d", rc);
spin_lock_irqsave(&card->lock, flags);
list_del_init(&reply->list);
-@@ -2169,11 +2192,8 @@ static void qeth_print_status_with_portn
+@@ -2169,11 +2192,8 @@
dbf_text[i] =
(char) _ebcasc[(__u8) dbf_text[i]];
dbf_text[8] = 0;
qeth_get_cardname(card),
(card->info.mcl_level[0]) ? " (level: " : "",
(card->info.mcl_level[0]) ? card->info.mcl_level : "",
-@@ -2186,23 +2206,17 @@ static void qeth_print_status_with_portn
+@@ -2186,23 +2206,17 @@
static void qeth_print_status_no_portname(struct qeth_card *card)
{
if (card->info.portname[0])
qeth_get_cardname(card),
(card->info.mcl_level[0]) ? " (level: " : "",
(card->info.mcl_level[0]) ? card->info.mcl_level : "",
-@@ -2228,7 +2242,8 @@ void qeth_print_status_message(struct qe
+@@ -2228,7 +2242,8 @@
}
/* fallthrough */
case QETH_CARD_TYPE_IQD:
card->info.mcl_level[0] = (char) _ebcasc[(__u8)
card->info.mcl_level[0]];
card->info.mcl_level[1] = (char) _ebcasc[(__u8)
-@@ -2629,9 +2644,8 @@ void qeth_queue_input_buffer(struct qeth
+@@ -2629,9 +2644,8 @@
qeth_get_micros() -
card->perf_stats.inbound_do_qdio_start_time;
if (rc) {
QETH_DBF_TEXT(TRACE, 2, "qinberr");
QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card));
}
-@@ -3024,7 +3038,7 @@ static inline void __qeth_fill_buffer(st
+@@ -3024,7 +3038,7 @@
struct qdio_buffer *buffer, int is_tso, int *next_element_to_fill,
int offset)
{
int length_here;
int element;
char *data;
-@@ -3036,6 +3050,7 @@ static inline void __qeth_fill_buffer(st
+@@ -3036,6 +3050,7 @@
if (offset >= 0) {
data = skb->data + offset;
first_lap = 0;
}
-@@ -3755,7 +3770,7 @@ static int qeth_core_driver_group(const
+@@ -3755,7 +3770,7 @@
int qeth_core_hardsetup_card(struct qeth_card *card)
{
int retries = 3;
int mpno = 0;
int rc;
-@@ -3764,7 +3779,8 @@ int qeth_core_hardsetup_card(struct qeth
+@@ -3764,7 +3779,8 @@
atomic_set(&card->force_alloc_skb, 0);
retry:
if (retries < 3) {
ccw_device_set_offline(CARD_DDEV(card));
ccw_device_set_offline(CARD_WDEV(card));
ccw_device_set_offline(CARD_RDEV(card));
-@@ -3790,9 +3806,16 @@ retry:
+@@ -3790,9 +3806,16 @@
return rc;
}
if (mpno)
mpno = min(mpno - 1, QETH_MAX_PORTNO);
if (card->info.portno > mpno) {
-@@ -3832,7 +3855,10 @@ retry:
+@@ -3832,7 +3855,10 @@
}
return 0;
out:
return rc;
}
EXPORT_SYMBOL_GPL(qeth_core_hardsetup_card);
-@@ -4052,8 +4078,8 @@ int qeth_core_load_discipline(struct qet
+@@ -4052,8 +4078,8 @@
break;
}
if (!card->discipline.ccwgdriver) {
rc = -EINVAL;
}
return rc;
-@@ -4147,6 +4173,7 @@ static void qeth_core_remove_device(stru
+@@ -4147,6 +4173,7 @@
unsigned long flags;
struct qeth_card *card = dev_get_drvdata(&gdev->dev);
if (card->discipline.ccwgdriver) {
card->discipline.ccwgdriver->remove(gdev);
qeth_core_free_discipline(card);
-@@ -4445,7 +4472,7 @@ static int __init qeth_core_init(void)
+@@ -4445,7 +4472,7 @@
{
int rc;
INIT_LIST_HEAD(&qeth_core_card_list.list);
rwlock_init(&qeth_core_card_list.rwlock);
-@@ -4485,9 +4512,10 @@ driver_err:
+@@ -4485,9 +4512,10 @@
ccwgroup_err:
ccw_driver_unregister(&qeth_ccw_driver);
ccw_err:
return rc;
}
-@@ -4500,7 +4528,7 @@ static void __exit qeth_core_exit(void)
+@@ -4500,7 +4528,7 @@
ccw_driver_unregister(&qeth_ccw_driver);
kmem_cache_destroy(qeth_core_header_cache);
qeth_unregister_dbf_views();
}
module_init(qeth_core_init);
-diff -purN linux-2.6.27/drivers/s390/net/qeth_l2_main.c linux-2.6.27.19-5.1/drivers/s390/net/qeth_l2_main.c
---- linux-2.6.27/drivers/s390/net/qeth_l2_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/qeth_l2_main.c 2009-03-25 16:11:24.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 drivers/s390/net/qeth_l2_main.c
+--- a/drivers/s390/net/qeth_l2_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/qeth_l2_main.c Wed May 06 16:56:32 2009 +0100
+@@ -7,6 +7,8 @@
+ * Thomas Spatzier <tspat@de.ibm.com>,
* Frank Blaschka <frank.blaschka@de.ibm.com>
*/
-
-+#define KMSG_COMPONENT "qeth"
+
++#define KMSG_COMPONENT "qeth"
+
#include <linux/module.h>
#include <linux/moduleparam.h>
- #include <linux/string.h>
-@@ -395,7 +397,8 @@ static int qeth_l2_stop_card(struct qeth
+@@ -395,7 +397,8 @@
}
if (card->state == CARD_STATE_SOFTSETUP) {
qeth_l2_process_vlans(card, 1);
qeth_clear_ipacmd_list(card);
card->state = CARD_STATE_HARDSETUP;
}
-@@ -450,12 +453,15 @@ static void qeth_l2_process_inbound_buff
+@@ -450,12 +453,15 @@
netif_rx(skb);
break;
case QETH_HEADER_TYPE_OSN:
default:
dev_kfree_skb_any(skb);
QETH_DBF_TEXT(TRACE, 3, "inbunkno");
-@@ -501,12 +507,13 @@ static int qeth_l2_send_setmac_cb(struct
+@@ -501,12 +507,13 @@
card->info.mac_bits |= QETH_LAYER2_MAC_REGISTERED;
memcpy(card->dev->dev_addr, cmd->data.setdelmac.mac,
OSA_ADDR_LEN);
}
return 0;
}
-@@ -559,7 +566,8 @@ static int qeth_l2_request_initial_mac(s
+@@ -559,7 +566,8 @@
"device %s: x%x\n", CARD_BUS_ID(card), rc);
}
rc = qeth_setadpparms_change_macaddr(card);
if (rc) {
QETH_DBF_MESSAGE(2, "couldn't get MAC address on "
-@@ -825,7 +833,6 @@ static int qeth_l2_open(struct net_devic
+@@ -825,7 +833,6 @@
}
card->data.state = CH_STATE_UP;
card->state = CARD_STATE_UP;
netif_start_queue(dev);
if (!card->lan_online && netif_carrier_ok(dev))
-@@ -840,7 +847,6 @@ static int qeth_l2_stop(struct net_devic
+@@ -840,7 +847,6 @@
QETH_DBF_TEXT(TRACE, 4, "qethstop");
netif_tx_disable(dev);
if (card->state == CARD_STATE_UP)
card->state = CARD_STATE_SOFTSETUP;
return 0;
-@@ -976,8 +982,6 @@ static int __qeth_l2_set_online(struct c
+@@ -976,8 +982,6 @@
qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);
if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) {
return -ERESTARTSYS;
}
-@@ -1020,9 +1024,8 @@ static int __qeth_l2_set_online(struct c
+@@ -1020,9 +1024,8 @@
if (rc) {
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
if (rc == 0xe080) {
card->lan_online = 0;
}
return rc;
-@@ -1092,8 +1095,6 @@ static int __qeth_l2_set_offline(struct
+@@ -1092,8 +1095,6 @@
netif_carrier_off(card->dev);
recover_flag = card->state;
if (qeth_l2_stop_card(card, recovery_mode) == -ERESTARTSYS) {
return -ERESTARTSYS;
}
rc = ccw_device_set_offline(CARD_DDEV(card));
-@@ -1126,8 +1127,8 @@ static int qeth_l2_recover(void *ptr)
+@@ -1126,8 +1127,8 @@
if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD))
return 0;
QETH_DBF_TEXT(TRACE, 2, "recover2");
card->use_hard_stop = 1;
__qeth_l2_set_offline(card->gdev, 1);
rc = __qeth_l2_set_online(card->gdev, 1);
-@@ -1135,23 +1136,29 @@ static int qeth_l2_recover(void *ptr)
+@@ -1135,23 +1136,29 @@
qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD);
qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD);
if (!rc)
}
static void qeth_l2_shutdown(struct ccwgroup_device *gdev)
-diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/drivers/s390/net/qeth_l3_main.c
---- linux-2.6.27/drivers/s390/net/qeth_l3_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/qeth_l3_main.c 2009-03-25 16:11:23.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 drivers/s390/net/qeth_l3_main.c
+--- a/drivers/s390/net/qeth_l3_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/qeth_l3_main.c Wed May 06 16:56:32 2009 +0100
+@@ -7,6 +7,8 @@
+ * Thomas Spatzier <tspat@de.ibm.com>,
* Frank Blaschka <frank.blaschka@de.ibm.com>
*/
-
-+#define KMSG_COMPONENT "qeth"
+
++#define KMSG_COMPONENT "qeth"
+
#include <linux/module.h>
#include <linux/moduleparam.h>
- #include <linux/string.h>
-@@ -917,8 +919,8 @@ static int qeth_l3_register_addr_entry(s
+@@ -917,8 +919,8 @@
if (rc) {
QETH_DBF_TEXT(TRACE, 2, "FAILED");
qeth_l3_ipaddr_to_string(addr->proto, (u8 *)&addr->u, buf);
}
return rc;
}
-@@ -1029,24 +1031,22 @@ static int qeth_l3_setadapter_parms(stru
+@@ -1029,24 +1031,22 @@
QETH_DBF_TEXT(SETUP, 2, "setadprm");
if (!qeth_is_supported(card, IPA_SETADAPTERPARMS)) {
}
if ((card->info.link_type == QETH_LINK_TYPE_HSTR) ||
-@@ -1160,16 +1160,17 @@ static int qeth_l3_start_ipa_arp_process
+@@ -1160,16 +1160,17 @@
QETH_DBF_TEXT(TRACE, 3, "ipaarp");
if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) {
}
return rc;
}
-@@ -1181,19 +1182,21 @@ static int qeth_l3_start_ipa_ip_fragment
+@@ -1181,19 +1182,21 @@
QETH_DBF_TEXT(TRACE, 3, "ipaipfrg");
if (!qeth_is_supported(card, IPA_IP_FRAGMENTATION)) {
return rc;
}
-@@ -1203,21 +1206,19 @@ static int qeth_l3_start_ipa_source_mac(
+@@ -1203,21 +1206,19 @@
QETH_DBF_TEXT(TRACE, 3, "stsrcmac");
return rc;
}
-@@ -1228,19 +1229,19 @@ static int qeth_l3_start_ipa_vlan(struct
+@@ -1228,19 +1229,19 @@
QETH_DBF_TEXT(TRACE, 3, "strtvlan");
if (!qeth_is_supported(card, IPA_FULL_VLAN)) {
}
return rc;
}
-@@ -1252,19 +1253,20 @@ static int qeth_l3_start_ipa_multicast(s
+@@ -1252,19 +1253,20 @@
QETH_DBF_TEXT(TRACE, 3, "stmcast");
if (!qeth_is_supported(card, IPA_MULTICASTING)) {
card->dev->flags |= IFF_MULTICAST;
}
return rc;
-@@ -1315,36 +1317,37 @@ static int qeth_l3_softsetup_ipv6(struct
+@@ -1315,36 +1317,37 @@
rc = qeth_l3_query_ipassists(card, QETH_PROT_IPV6);
if (rc) {
return 0;
}
#endif
-@@ -1356,8 +1359,8 @@ static int qeth_l3_start_ipa_ipv6(struct
+@@ -1356,8 +1359,8 @@
QETH_DBF_TEXT(TRACE, 3, "strtipv6");
if (!qeth_is_supported(card, IPA_IPV6)) {
return 0;
}
#ifdef CONFIG_QETH_IPV6
-@@ -1373,34 +1376,35 @@ static int qeth_l3_start_ipa_broadcast(s
+@@ -1373,34 +1376,35 @@
QETH_DBF_TEXT(TRACE, 3, "stbrdcst");
card->info.broadcast_capable = 0;
if (!qeth_is_supported(card, IPA_FILTERING)) {
goto out;
}
card->info.broadcast_capable = QETH_BROADCAST_WITHOUT_ECHO;
-@@ -1419,18 +1423,18 @@ static int qeth_l3_send_checksum_command
+@@ -1419,18 +1423,18 @@
rc = qeth_l3_send_simple_setassparms(card, IPA_INBOUND_CHECKSUM,
IPA_CMD_ASS_START, 0);
if (rc) {
return rc;
}
return 0;
-@@ -1443,26 +1447,30 @@ static int qeth_l3_start_ipa_checksum(st
+@@ -1443,26 +1447,30 @@
QETH_DBF_TEXT(TRACE, 3, "strtcsum");
if (card->options.checksum_type == NO_CHECKSUMMING) {
return rc;
}
-@@ -1474,18 +1482,20 @@ static int qeth_l3_start_ipa_tso(struct
+@@ -1474,18 +1482,20 @@
QETH_DBF_TEXT(TRACE, 3, "sttso");
if (!qeth_is_supported(card, IPA_OUTBOUND_TSO)) {
}
if (rc && (card->options.large_send == QETH_LARGE_SEND_TSO)) {
card->options.large_send = QETH_LARGE_SEND_NO;
-@@ -1578,12 +1588,8 @@ static int qeth_l3_get_unique_id_cb(stru
+@@ -1578,12 +1588,8 @@
else {
card->info.unique_id = UNIQUE_ID_IF_CREATE_ADDR_FAILED |
UNIQUE_ID_NOT_BY_CARD;
}
return 0;
}
-@@ -1911,8 +1917,13 @@ static inline __u16 qeth_l3_rebuild_skb(
+@@ -1911,8 +1917,13 @@
memcpy(tg_addr, card->dev->dev_addr,
card->dev->addr_len);
}
}
#ifdef CONFIG_TR
-@@ -2072,9 +2083,11 @@ static int qeth_l3_stop_card(struct qeth
+@@ -2072,9 +2083,11 @@
if (recovery_mode)
qeth_l3_stop(card->dev);
else {
}
if (!card->use_hard_stop) {
rc = qeth_send_stoplan(card);
-@@ -2795,7 +2808,6 @@ static int qeth_l3_open(struct net_devic
+@@ -2795,7 +2808,6 @@
return -ENODEV;
card->data.state = CH_STATE_UP;
card->state = CARD_STATE_UP;
netif_start_queue(dev);
if (!card->lan_online && netif_carrier_ok(dev))
-@@ -2809,7 +2821,6 @@ static int qeth_l3_stop(struct net_devic
+@@ -2809,7 +2821,6 @@
QETH_DBF_TEXT(TRACE, 4, "qethstop");
netif_tx_disable(dev);
if (card->state == CARD_STATE_UP)
card->state = CARD_STATE_SOFTSETUP;
return 0;
-@@ -3052,8 +3063,6 @@ static int __qeth_l3_set_online(struct c
+@@ -3052,8 +3063,6 @@
qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);
if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) {
return -ERESTARTSYS;
}
-@@ -3095,9 +3104,8 @@ static int __qeth_l3_set_online(struct c
+@@ -3095,9 +3104,8 @@
if (rc) {
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
if (rc == 0xe080) {
card->lan_online = 0;
}
return rc;
-@@ -3173,8 +3181,6 @@ static int __qeth_l3_set_offline(struct
+@@ -3173,8 +3181,6 @@
netif_carrier_off(card->dev);
recover_flag = card->state;
if (qeth_l3_stop_card(card, recovery_mode) == -ERESTARTSYS) {
return -ERESTARTSYS;
}
rc = ccw_device_set_offline(CARD_DDEV(card));
-@@ -3207,8 +3213,8 @@ static int qeth_l3_recover(void *ptr)
+@@ -3207,8 +3213,8 @@
if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD))
return 0;
QETH_DBF_TEXT(TRACE, 2, "recover2");
card->use_hard_stop = 1;
__qeth_l3_set_offline(card->gdev, 1);
rc = __qeth_l3_set_online(card->gdev, 1);
-@@ -3216,11 +3222,15 @@ static int qeth_l3_recover(void *ptr)
+@@ -3216,11 +3222,15 @@
qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD);
qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD);
if (!rc)
return 0;
}
-@@ -3353,7 +3363,7 @@ static int qeth_l3_register_notifiers(vo
+@@ -3353,7 +3363,7 @@
return rc;
}
#else
#endif
return 0;
}
-@@ -3372,7 +3382,7 @@ static int __init qeth_l3_init(void)
+@@ -3372,7 +3382,7 @@
{
int rc = 0;
rc = qeth_l3_register_notifiers();
return rc;
}
-@@ -3380,7 +3390,7 @@ static int __init qeth_l3_init(void)
+@@ -3380,7 +3390,7 @@
static void __exit qeth_l3_exit(void)
{
qeth_l3_unregister_notifiers();
}
module_init(qeth_l3_init);
-diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_sys.c linux-2.6.27.19-5.1/drivers/s390/net/qeth_l3_sys.c
---- linux-2.6.27/drivers/s390/net/qeth_l3_sys.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/qeth_l3_sys.c 2009-03-25 16:11:23.000000000 +0000
-@@ -121,9 +121,6 @@ static ssize_t qeth_l3_dev_route6_show(s
+diff -r 9608d5473017 drivers/s390/net/qeth_l3_sys.c
+--- a/drivers/s390/net/qeth_l3_sys.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/qeth_l3_sys.c Wed May 06 16:56:32 2009 +0100
+@@ -121,9 +121,6 @@
if (!card)
return -EINVAL;
return qeth_l3_dev_route_show(card, &card->options.route6, buf);
}
-@@ -135,10 +132,6 @@ static ssize_t qeth_l3_dev_route6_store(
+@@ -134,10 +131,6 @@
+
if (!card)
return -EINVAL;
-
+-
- if (!qeth_is_supported(card, IPA_IPV6)) {
- return -EOPNOTSUPP;
- }
--
+
return qeth_l3_dev_route_store(card, &card->options.route6,
QETH_PROT_IPV6, buf, count);
- }
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_aux.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_aux.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_aux.c 2009-03-25 16:11:24.000000000 +0000
-@@ -25,6 +25,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_aux.c
+--- a/drivers/s390/scsi/zfcp_aux.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_aux.c Wed May 06 16:56:32 2009 +0100
+@@ -24,6 +24,8 @@
+ * Martin Petermann
* Sven Schuetz
*/
-
-+#define KMSG_COMPONENT "zfcp"
+
++#define KMSG_COMPONENT "zfcp"
+
#include <linux/miscdevice.h>
#include "zfcp_ext.h"
-
-@@ -88,11 +90,13 @@ static int __init zfcp_device_setup(char
+@@ -88,11 +90,13 @@
strncpy(zfcp_data.init_busid, token, BUS_ID_SIZE);
token = strsep(&str, ",");
goto err_out;
kfree(str);
-@@ -100,24 +104,10 @@ static int __init zfcp_device_setup(char
+@@ -100,22 +104,8 @@
err_out:
kfree(str);
- "device not attached.\n", devstr);
+ pr_err("%s is not a valid SCSI device\n", devstr);
return 0;
- }
-
+-}
+-
-static struct zfcp_adapter *zfcp_get_adapter_by_busid(char *bus_id)
-{
- struct zfcp_adapter *adapter;
- ZFCP_STATUS_COMMON_REMOVE))
- return adapter;
- return NULL;
--}
--
+ }
+
static void __init zfcp_init_device_configure(void)
- {
- struct zfcp_adapter *adapter;
-@@ -141,7 +131,12 @@ static void __init zfcp_init_device_conf
+@@ -141,7 +131,12 @@
goto out_unit;
up(&zfcp_data.config_sema);
ccw_device_set_online(adapter->ccw_device);
down(&zfcp_data.config_sema);
zfcp_unit_put(unit);
out_unit:
-@@ -180,9 +175,14 @@ static int __init zfcp_module_init(void)
+@@ -180,9 +175,14 @@
if (!zfcp_data.gid_pn_cache)
goto out_gid_cache;
-- INIT_LIST_HEAD(&zfcp_data.adapter_list_head);
-- INIT_LIST_HEAD(&zfcp_data.adapter_remove_lh);
+ zfcp_data.gpn_ft_cache = zfcp_cache_create(
+ sizeof(struct ct_iu_gpn_ft_req), "zfcp_gpn");
+ if (!zfcp_data.gpn_ft_cache)
+ goto out_gpn_cache;
-
++
+ zfcp_data.work_queue = create_singlethread_workqueue("zfcp_wq");
+
-+ INIT_LIST_HEAD(&zfcp_data.adapter_list_head);
+ INIT_LIST_HEAD(&zfcp_data.adapter_list_head);
+- INIT_LIST_HEAD(&zfcp_data.adapter_remove_lh);
+-
sema_init(&zfcp_data.config_sema, 1);
rwlock_init(&zfcp_data.config_lock);
-@@ -193,13 +193,14 @@ static int __init zfcp_module_init(void)
+@@ -193,13 +193,14 @@
retval = misc_register(&zfcp_cfdc_misc);
if (retval) {
goto out_ccw_register;
}
-@@ -213,6 +214,8 @@ out_ccw_register:
+@@ -213,6 +214,8 @@
out_misc:
fc_release_transport(zfcp_data.scsi_transport_template);
out_transport:
kmem_cache_destroy(zfcp_data.gid_pn_cache);
out_gid_cache:
kmem_cache_destroy(zfcp_data.sr_buffer_cache);
-@@ -231,8 +234,7 @@ module_init(zfcp_module_init);
+@@ -231,8 +234,7 @@
*
* Returns: pointer to zfcp_unit or NULL
*/
{
struct zfcp_unit *unit;
-@@ -251,7 +253,7 @@ struct zfcp_unit *zfcp_get_unit_by_lun(s
+@@ -251,7 +253,7 @@
* Returns: pointer to zfcp_port or NULL
*/
struct zfcp_port *zfcp_get_port_by_wwpn(struct zfcp_adapter *adapter,
{
struct zfcp_port *port;
-@@ -276,7 +278,7 @@ static void zfcp_sysfs_unit_release(stru
+@@ -276,7 +278,7 @@
*
* Sets up some unit internal structures and creates sysfs entry.
*/
{
struct zfcp_unit *unit;
-@@ -290,7 +292,8 @@ struct zfcp_unit *zfcp_unit_enqueue(stru
+@@ -290,7 +292,8 @@
unit->port = port;
unit->fcp_lun = fcp_lun;
unit->sysfs_device.parent = &port->sysfs_device;
unit->sysfs_device.release = zfcp_sysfs_unit_release;
dev_set_drvdata(&unit->sysfs_device, unit);
-@@ -323,7 +326,6 @@ struct zfcp_unit *zfcp_unit_enqueue(stru
+@@ -323,7 +326,6 @@
}
zfcp_unit_get(unit);
write_lock_irq(&zfcp_data.config_lock);
list_add_tail(&unit->list, &port->unit_list_head);
-@@ -332,7 +334,6 @@ struct zfcp_unit *zfcp_unit_enqueue(stru
+@@ -332,7 +334,6 @@
write_unlock_irq(&zfcp_data.config_lock);
zfcp_port_get(port);
return unit;
-@@ -351,11 +352,10 @@ err_out_free:
+@@ -351,11 +352,10 @@
*/
void zfcp_unit_dequeue(struct zfcp_unit *unit)
{
zfcp_port_put(unit->port);
sysfs_remove_group(&unit->sysfs_device.kobj, &zfcp_sysfs_unit_attrs);
device_unregister(&unit->sysfs_device);
-@@ -416,11 +416,6 @@ static void zfcp_free_low_mem_buffers(st
+@@ -416,11 +416,6 @@
mempool_destroy(adapter->pool.data_gid_pn);
}
/**
* zfcp_status_read_refill - refill the long running status_read_requests
* @adapter: ptr to struct zfcp_adapter for which the buffers should be refilled
-@@ -450,19 +445,6 @@ static void _zfcp_status_read_scheduler(
+@@ -448,19 +443,6 @@
+ {
+ zfcp_status_read_refill(container_of(work, struct zfcp_adapter,
stat_work));
- }
-
+-}
+-
-static int zfcp_nameserver_enqueue(struct zfcp_adapter *adapter)
-{
- struct zfcp_port *port;
- zfcp_port_put(port);
-
- return 0;
--}
--
+ }
+
/**
- * zfcp_adapter_enqueue - enqueue a new adapter to the list
- * @ccw_device: pointer to the struct cc_device
-@@ -508,7 +490,6 @@ int zfcp_adapter_enqueue(struct ccw_devi
+@@ -508,7 +490,6 @@
init_waitqueue_head(&adapter->erp_done_wqh);
INIT_LIST_HEAD(&adapter->port_list_head);
INIT_LIST_HEAD(&adapter->erp_ready_head);
INIT_LIST_HEAD(&adapter->erp_running_head);
-@@ -518,7 +499,8 @@ int zfcp_adapter_enqueue(struct ccw_devi
+@@ -518,7 +499,8 @@
spin_lock_init(&adapter->san_dbf_lock);
spin_lock_init(&adapter->scsi_dbf_lock);
spin_lock_init(&adapter->rec_dbf_lock);
rwlock_init(&adapter->erp_lock);
rwlock_init(&adapter->abort_lock);
-@@ -537,28 +519,16 @@ int zfcp_adapter_enqueue(struct ccw_devi
+@@ -537,28 +519,16 @@
&zfcp_sysfs_adapter_attrs))
goto sysfs_failed;
write_unlock_irq(&zfcp_data.config_lock);
- zfcp_data.adapters++;
--
-- zfcp_nameserver_enqueue(adapter);
+ zfcp_fc_nameserver_init(adapter);
-- return 0;
+- zfcp_nameserver_enqueue(adapter);
+ if (!zfcp_adapter_scsi_register(adapter))
+ return 0;
+- return 0;
+-
-generic_services_failed:
- sysfs_remove_group(&ccw_device->dev.kobj,
- &zfcp_sysfs_adapter_attrs);
sysfs_failed:
zfcp_adapter_debug_unregister(adapter);
debug_register_failed:
-@@ -585,7 +555,6 @@ void zfcp_adapter_dequeue(struct zfcp_ad
+@@ -585,7 +555,6 @@
cancel_work_sync(&adapter->scan_work);
cancel_work_sync(&adapter->stat_work);
zfcp_adapter_scsi_unregister(adapter);
sysfs_remove_group(&adapter->ccw_device->dev.kobj,
&zfcp_sysfs_adapter_attrs);
dev_set_drvdata(&adapter->ccw_device->dev, NULL);
-@@ -603,9 +572,6 @@ void zfcp_adapter_dequeue(struct zfcp_ad
+@@ -602,9 +571,6 @@
+ write_lock_irq(&zfcp_data.config_lock);
list_del(&adapter->list);
write_unlock_irq(&zfcp_data.config_lock);
-
+-
- /* decrease number of adapters in list */
- zfcp_data.adapters--;
--
+
zfcp_qdio_free(adapter);
- zfcp_free_low_mem_buffers(adapter);
-@@ -633,21 +599,19 @@ static void zfcp_sysfs_port_release(stru
+@@ -633,21 +599,19 @@
* d_id is used to enqueue ports with a well known address like the Directory
* Service for nameserver lookup.
*/
port->adapter = adapter;
port->d_id = d_id;
-@@ -657,34 +621,9 @@ struct zfcp_port *zfcp_port_enqueue(stru
+@@ -657,34 +621,9 @@
atomic_set_mask(status | ZFCP_STATUS_COMMON_REMOVE, &port->status);
atomic_set(&port->refcount, 0);
port->sysfs_device.release = zfcp_sysfs_port_release;
dev_set_drvdata(&port->sysfs_device, port);
-@@ -700,12 +639,8 @@ struct zfcp_port *zfcp_port_enqueue(stru
+@@ -700,12 +639,8 @@
if (device_register(&port->sysfs_device))
goto err_out_free;
if (retval) {
device_unregister(&port->sysfs_device);
-@@ -718,10 +653,6 @@ struct zfcp_port *zfcp_port_enqueue(stru
+@@ -718,10 +653,6 @@
list_add_tail(&port->list, &adapter->port_list_head);
atomic_clear_mask(ZFCP_STATUS_COMMON_REMOVE, &port->status);
atomic_set_mask(ZFCP_STATUS_COMMON_RUNNING, &port->status);
write_unlock_irq(&zfcp_data.config_lock);
-@@ -740,21 +671,15 @@ err_out:
+@@ -740,21 +671,15 @@
*/
void zfcp_port_dequeue(struct zfcp_port *port)
{
device_unregister(&port->sysfs_device);
}
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ccw.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_ccw.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_ccw.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_ccw.c 2009-03-25 16:11:24.000000000 +0000
-@@ -6,6 +6,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_ccw.c
+--- a/drivers/s390/scsi/zfcp_ccw.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_ccw.c Wed May 06 16:56:32 2009 +0100
+@@ -5,6 +5,8 @@
+ *
* Copyright IBM Corporation 2002, 2008
*/
-
-+#define KMSG_COMPONENT "zfcp"
+
++#define KMSG_COMPONENT "zfcp"
+
#include "zfcp_ext.h"
- /**
-@@ -25,7 +27,8 @@ static int zfcp_ccw_probe(struct ccw_dev
+@@ -25,7 +27,8 @@
down(&zfcp_data.config_sema);
if (zfcp_adapter_enqueue(ccw_device)) {
dev_err(&ccw_device->dev,
retval = -EINVAL;
}
up(&zfcp_data.config_sema);
-@@ -46,6 +49,8 @@ static void zfcp_ccw_remove(struct ccw_d
+@@ -46,6 +49,8 @@
struct zfcp_adapter *adapter;
struct zfcp_port *port, *p;
struct zfcp_unit *unit, *u;
ccw_device_set_offline(ccw_device);
down(&zfcp_data.config_sema);
-@@ -54,26 +59,26 @@ static void zfcp_ccw_remove(struct ccw_d
+@@ -54,26 +59,26 @@
write_lock_irq(&zfcp_data.config_lock);
list_for_each_entry_safe(port, p, &adapter->port_list_head, list) {
list_for_each_entry_safe(unit, u, &port->unit_list_head, list) {
zfcp_adapter_dequeue(adapter);
up(&zfcp_data.config_sema);
-@@ -100,10 +105,6 @@ static int zfcp_ccw_set_online(struct cc
+@@ -100,10 +105,6 @@
if (retval)
goto out;
/* initialize request counter */
BUG_ON(!zfcp_reqlist_isempty(adapter));
adapter->req_no = 0;
-@@ -113,10 +114,10 @@ static int zfcp_ccw_set_online(struct cc
+@@ -113,10 +114,10 @@
zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85,
NULL);
zfcp_erp_wait(adapter);
out:
up(&zfcp_data.config_sema);
return retval;
-@@ -156,15 +157,18 @@ static int zfcp_ccw_notify(struct ccw_de
+@@ -156,15 +157,18 @@
switch (event) {
case CIO_GONE:
zfcp_erp_modify_adapter_status(adapter, 11, NULL,
ZFCP_STATUS_COMMON_RUNNING,
ZFCP_SET);
-@@ -220,3 +224,20 @@ int __init zfcp_ccw_register(void)
+@@ -220,3 +224,20 @@
{
return ccw_driver_register(&zfcp_ccw_driver);
}
+ }
+ return adapter;
+}
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_cfdc.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_cfdc.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_cfdc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_cfdc.c 2009-03-25 16:11:24.000000000 +0000
-@@ -7,6 +7,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_cfdc.c
+--- a/drivers/s390/scsi/zfcp_cfdc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_cfdc.c Wed May 06 16:56:32 2009 +0100
+@@ -6,6 +6,8 @@
+ *
* Copyright IBM Corporation 2008
*/
-
-+#define KMSG_COMPONENT "zfcp"
+
++#define KMSG_COMPONENT "zfcp"
+
#include <linux/types.h>
#include <linux/miscdevice.h>
- #include <asm/ccwdev.h>
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_dbf.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_dbf.c 2009-03-25 16:11:24.000000000 +0000
-@@ -6,6 +6,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_dbf.c
+--- a/drivers/s390/scsi/zfcp_dbf.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_dbf.c Wed May 06 16:56:32 2009 +0100
+@@ -5,6 +5,8 @@
+ *
* Copyright IBM Corporation 2002, 2008
*/
-
-+#define KMSG_COMPONENT "zfcp"
+
++#define KMSG_COMPONENT "zfcp"
+
#include <linux/ctype.h>
#include <asm/debug.h>
- #include "zfcp_ext.h"
-@@ -30,7 +32,7 @@ static void zfcp_dbf_hexdump(debug_info_
+@@ -30,7 +32,7 @@
dump->offset = offset;
dump->size = min(from_len - offset, room);
memcpy(dump->data, from + offset, dump->size);
}
}
-@@ -108,7 +110,7 @@ static int zfcp_dbf_view_header(debug_in
+@@ -108,7 +110,7 @@
t.tv_sec, t.tv_nsec);
zfcp_dbf_out(&p, "cpu", "%02i", entry->id.fields.cpuid);
} else {
dump->total_size);
if ((dump->offset + dump->size) == dump->total_size)
p += sprintf(p, "\n");
-@@ -318,6 +320,26 @@ void zfcp_hba_dbf_event_qdio(struct zfcp
+@@ -318,6 +320,26 @@
spin_unlock_irqrestore(&adapter->hba_dbf_lock, flags);
}
static void zfcp_hba_dbf_view_response(char **p,
struct zfcp_hba_dbf_record_response *r)
{
-@@ -346,6 +368,7 @@ static void zfcp_hba_dbf_view_response(c
+@@ -346,6 +368,7 @@
break;
zfcp_dbf_out(p, "scsi_cmnd", "0x%0Lx", r->u.fcp.cmnd);
zfcp_dbf_out(p, "scsi_serial", "0x%016Lx", r->u.fcp.serial);
break;
case FSF_QTCB_OPEN_PORT_WITH_DID:
-@@ -399,6 +422,30 @@ static void zfcp_hba_dbf_view_qdio(char
+@@ -399,6 +422,30 @@
zfcp_dbf_out(p, "sbal_count", "0x%02x", r->sbal_count);
}
static int zfcp_hba_dbf_view_format(debug_info_t *id, struct debug_view *view,
char *out_buf, const char *in_buf)
{
-@@ -418,8 +465,11 @@ static int zfcp_hba_dbf_view_format(debu
+@@ -418,8 +465,11 @@
zfcp_hba_dbf_view_status(&p, &r->u.status);
else if (strncmp(r->tag, "qdio", ZFCP_DBF_TAG_SIZE) == 0)
zfcp_hba_dbf_view_qdio(&p, &r->u.qdio);
return p - out_buf;
}
-@@ -471,7 +521,7 @@ static const char *zfcp_rec_dbf_ids[] =
+@@ -471,7 +521,7 @@
[29] = "link down",
[30] = "link up status read",
[31] = "open port failed",
[33] = "close port",
[34] = "open unit failed",
[35] = "exclusive open unit failed",
-@@ -519,14 +569,14 @@ static const char *zfcp_rec_dbf_ids[] =
+@@ -519,14 +569,14 @@
[75] = "physical port recovery escalation after failed port "
"recovery",
[76] = "port recovery escalation after failed unit recovery",
[85] = "online",
[86] = "offline",
[87] = "ccw device gone",
-@@ -829,11 +879,12 @@ void zfcp_rec_dbf_event_action(u8 id2, s
+@@ -829,11 +879,12 @@
void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req)
{
struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data;
unsigned long flags;
spin_lock_irqsave(&adapter->san_dbf_lock, flags);
-@@ -842,7 +893,7 @@ void zfcp_san_dbf_event_ct_request(struc
+@@ -842,7 +893,7 @@
r->fsf_reqid = (unsigned long)fsf_req;
r->fsf_seqno = fsf_req->seq_no;
r->s_id = fc_host_port_id(adapter->scsi_host);
oct->cmd_req_code = hdr->cmd_rsp_code;
oct->revision = hdr->revision;
oct->gs_type = hdr->gs_type;
-@@ -850,9 +901,10 @@ void zfcp_san_dbf_event_ct_request(struc
+@@ -850,9 +901,10 @@
oct->options = hdr->options;
oct->max_res_size = hdr->max_res_size;
oct->len = min((int)ct->req->length - (int)sizeof(struct ct_hdr),
spin_unlock_irqrestore(&adapter->san_dbf_lock, flags);
}
-@@ -863,11 +915,12 @@ void zfcp_san_dbf_event_ct_request(struc
+@@ -863,11 +915,12 @@
void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req)
{
struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data;
unsigned long flags;
spin_lock_irqsave(&adapter->san_dbf_lock, flags);
-@@ -875,17 +928,19 @@ void zfcp_san_dbf_event_ct_response(stru
+@@ -875,17 +928,19 @@
strncpy(r->tag, "rctc", ZFCP_DBF_TAG_SIZE);
r->fsf_reqid = (unsigned long)fsf_req;
r->fsf_seqno = fsf_req->seq_no;
spin_unlock_irqrestore(&adapter->san_dbf_lock, flags);
}
-@@ -908,7 +963,7 @@ static void zfcp_san_dbf_event_els(const
+@@ -908,7 +963,7 @@
rec->u.els.ls_code = ls_code;
debug_event(adapter->san_dbf, level, rec, sizeof(*rec));
zfcp_dbf_hexdump(adapter->san_dbf, rec, sizeof(*rec), level,
spin_unlock_irqrestore(&adapter->san_dbf_lock, flags);
}
-@@ -922,8 +977,8 @@ void zfcp_san_dbf_event_els_request(stru
+@@ -922,8 +977,8 @@
zfcp_san_dbf_event_els("oels", 2, fsf_req,
fc_host_port_id(els->adapter->scsi_host),
}
/**
-@@ -936,8 +991,7 @@ void zfcp_san_dbf_event_els_response(str
+@@ -936,8 +991,7 @@
zfcp_san_dbf_event_els("rels", 2, fsf_req, els->d_id,
fc_host_port_id(els->adapter->scsi_host),
els->resp->length);
}
-@@ -963,8 +1017,6 @@ static int zfcp_san_dbf_view_format(debu
+@@ -963,8 +1017,6 @@
char *out_buf, const char *in_buf)
{
struct zfcp_san_dbf_record *r = (struct zfcp_san_dbf_record *)in_buf;
char *p = out_buf;
if (strncmp(r->tag, "dump", ZFCP_DBF_TAG_SIZE) == 0)
-@@ -984,9 +1036,6 @@ static int zfcp_san_dbf_view_format(debu
+@@ -984,9 +1036,6 @@
zfcp_dbf_out(&p, "gs_subtype", "0x%02x", ct->gs_subtype);
zfcp_dbf_out(&p, "options", "0x%02x", ct->options);
zfcp_dbf_out(&p, "max_res_size", "0x%04x", ct->max_res_size);
} else if (strncmp(r->tag, "rctc", ZFCP_DBF_TAG_SIZE) == 0) {
struct zfcp_san_dbf_record_ct_response *ct = &r->u.ct_resp;
zfcp_dbf_out(&p, "cmd_rsp_code", "0x%04x", ct->cmd_rsp_code);
-@@ -994,23 +1043,13 @@ static int zfcp_san_dbf_view_format(debu
+@@ -994,23 +1043,13 @@
zfcp_dbf_out(&p, "reason_code", "0x%02x", ct->reason_code);
zfcp_dbf_out(&p, "reason_code_expl", "0x%02x", ct->expl);
zfcp_dbf_out(&p, "vendor_unique", "0x%02x", ct->vendor_unique);
return p - out_buf;
}
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.h linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_dbf.h
---- linux-2.6.27/drivers/s390/scsi/zfcp_dbf.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_dbf.h 2009-03-25 16:11:24.000000000 +0000
-@@ -151,6 +151,7 @@ struct zfcp_hba_dbf_record {
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_dbf.h
+--- a/drivers/s390/scsi/zfcp_dbf.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_dbf.h Wed May 06 16:56:32 2009 +0100
+@@ -151,6 +151,7 @@
struct zfcp_hba_dbf_record_response response;
struct zfcp_hba_dbf_record_status status;
struct zfcp_hba_dbf_record_qdio qdio;
} u;
} __attribute__ ((packed));
-@@ -162,8 +163,6 @@ struct zfcp_san_dbf_record_ct_request {
+@@ -162,8 +163,6 @@
u8 options;
u16 max_res_size;
u32 len;
} __attribute__ ((packed));
struct zfcp_san_dbf_record_ct_response {
-@@ -172,16 +171,13 @@ struct zfcp_san_dbf_record_ct_response {
+@@ -172,16 +171,13 @@
u8 reason_code;
u8 expl;
u8 vendor_unique;
} __attribute__ ((packed));
struct zfcp_san_dbf_record {
-@@ -195,6 +191,8 @@ struct zfcp_san_dbf_record {
+@@ -195,6 +191,8 @@
struct zfcp_san_dbf_record_ct_response ct_resp;
struct zfcp_san_dbf_record_els els;
} u;
} __attribute__ ((packed));
struct zfcp_scsi_dbf_record {
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_def.h
---- linux-2.6.27/drivers/s390/scsi/zfcp_def.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_def.h 2009-03-25 16:11:24.000000000 +0000
-@@ -39,29 +39,6 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_def.h
+--- a/drivers/s390/scsi/zfcp_def.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_def.h Wed May 06 16:56:32 2009 +0100
+@@ -38,29 +38,6 @@
- /********************* GENERAL DEFINES *********************************/
+ /********************* GENERAL DEFINES *********************************/
+-
-/**
- * zfcp_sg_to_address - determine kernel address from struct scatterlist
- * @list: struct scatterlist
-{
- sg_set_buf(list, address, size);
-}
--
+
#define REQUEST_LIST_SIZE 128
- /********************* SCSI SPECIFIC DEFINES *********************************/
-@@ -101,11 +78,6 @@ zfcp_address_to_sg(void *address, struct
+@@ -101,11 +78,6 @@
/*************** FIBRE CHANNEL PROTOCOL SPECIFIC DEFINES ********************/
/* timeout for name-server lookup (in seconds) */
#define ZFCP_NS_GID_PN_TIMEOUT 10
-@@ -129,7 +101,7 @@ typedef unsigned int fcp_dl_t;
+@@ -129,7 +101,7 @@
/* FCP(-2) FCP_CMND IU */
struct fcp_cmnd_iu {
u8 crn; /* command reference number */
u8 reserved0:5; /* reserved */
u8 task_attribute:3; /* task attribute */
-@@ -204,7 +176,7 @@ struct fcp_rscn_element {
+@@ -204,7 +176,7 @@
struct fcp_logo {
u32 command;
u32 nport_did;
} __attribute__((packed));
/*
-@@ -218,13 +190,6 @@ struct fcp_logo {
+@@ -218,13 +190,6 @@
#define ZFCP_LS_RSCN 0x61
#define ZFCP_LS_RNID 0x78
struct zfcp_ls_adisc {
u8 code;
u8 field[3];
-@@ -234,20 +199,6 @@ struct zfcp_ls_adisc {
+@@ -233,20 +198,6 @@
+ u64 wwnn;
u32 nport_id;
} __attribute__ ((packed));
-
+-
-struct zfcp_ls_adisc_acc {
- u8 code;
- u8 field[3];
- u8 code;
- const char *description;
-};
--
+
/*
* FC-GS-2 stuff
- */
-@@ -259,7 +210,6 @@ struct zfcp_rc_entry {
+@@ -259,7 +210,6 @@
#define ZFCP_CT_UNABLE_TO_PERFORM_CMD 0x09
#define ZFCP_CT_GID_PN 0x0121
#define ZFCP_CT_GPN_FT 0x0172
#define ZFCP_CT_ACCEPT 0x8002
#define ZFCP_CT_REJECT 0x8001
-@@ -281,9 +231,7 @@ struct zfcp_rc_entry {
+@@ -281,9 +231,7 @@
#define ZFCP_STATUS_COMMON_RUNNING 0x40000000
#define ZFCP_STATUS_COMMON_ERP_FAILED 0x20000000
#define ZFCP_STATUS_COMMON_UNBLOCKED 0x10000000
#define ZFCP_STATUS_COMMON_ERP_INUSE 0x01000000
#define ZFCP_STATUS_COMMON_ACCESS_DENIED 0x00800000
#define ZFCP_STATUS_COMMON_ACCESS_BOXED 0x00400000
-@@ -291,16 +239,15 @@ struct zfcp_rc_entry {
+@@ -291,16 +239,15 @@
/* adapter status */
#define ZFCP_STATUS_ADAPTER_QDIOUP 0x00000002
#define ZFCP_DID_MANAGEMENT_SERVICE 0xFFFFFA
#define ZFCP_DID_TIME_SERVICE 0xFFFFFB
#define ZFCP_DID_DIRECTORY_SERVICE 0xFFFFFC
-@@ -312,29 +259,27 @@ struct zfcp_rc_entry {
+@@ -312,29 +259,27 @@
#define ZFCP_STATUS_PORT_DID_DID 0x00000002
#define ZFCP_STATUS_PORT_PHYS_CLOSING 0x00000004
#define ZFCP_STATUS_PORT_NO_WWPN 0x00000008
#define ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED 0x00000040
#define ZFCP_STATUS_FSFREQ_ABORTNOTNEEDED 0x00000080
#define ZFCP_STATUS_FSFREQ_ABORTED 0x00000100
-@@ -379,7 +324,7 @@ struct ct_hdr {
+@@ -379,7 +324,7 @@
* a port name is required */
struct ct_iu_gid_pn_req {
struct ct_hdr header;
} __attribute__ ((packed));
/* FS_ACC IU and data unit for GID_PN nameserver request */
-@@ -388,15 +333,19 @@ struct ct_iu_gid_pn_resp {
+@@ -388,15 +333,19 @@
u32 d_id;
} __attribute__ ((packed));
* @handler: handler function (called for response to the request)
* @handler_data: data passed to handler function
* @timeout: FSF timeout for this request
-@@ -404,12 +353,10 @@ typedef void (*zfcp_send_ct_handler_t)(u
+@@ -404,12 +353,10 @@
* @status: used to pass error status to calling function
*/
struct zfcp_send_ct {
unsigned long handler_data;
int timeout;
struct completion *completion;
-@@ -426,8 +373,6 @@ struct zfcp_gid_pn_data {
+@@ -426,8 +373,6 @@
struct zfcp_port *port;
};
/**
* struct zfcp_send_els - used to pass parameters to function zfcp_fsf_send_els
* @adapter: adapter where request is sent from
-@@ -435,8 +380,6 @@ typedef void (*zfcp_send_els_handler_t)(
+@@ -435,8 +380,6 @@
* @d_id: destiniation id of port where request is sent to
* @req: scatter-gather list for request
* @resp: scatter-gather list for response
* @handler: handler function (called for response to the request)
* @handler_data: data passed to handler function
* @completion: completion for synchronization purposes
-@@ -449,24 +392,28 @@ struct zfcp_send_els {
+@@ -449,24 +392,28 @@
u32 d_id;
struct scatterlist *req;
struct scatterlist *resp;
};
struct zfcp_erp_action {
-@@ -475,7 +422,7 @@ struct zfcp_erp_action {
+@@ -475,7 +422,7 @@
struct zfcp_adapter *adapter; /* device which should be recovered */
struct zfcp_port *port;
struct zfcp_unit *unit;
u32 step; /* active step of this erp action */
struct zfcp_fsf_req *fsf_req; /* fsf request currently pending
for this action */
-@@ -506,8 +453,8 @@ struct zfcp_adapter {
+@@ -506,8 +453,8 @@
atomic_t refcount; /* reference count */
wait_queue_head_t remove_wq; /* can be used to wait for
refcount drop to zero */
u32 peer_d_id; /* P2P peer D_ID */
struct ccw_device *ccw_device; /* S/390 ccw device */
u32 hydra_version; /* Hydra version */
-@@ -518,13 +465,16 @@ struct zfcp_adapter {
+@@ -518,13 +465,16 @@
u16 timer_ticks; /* time int for a tick */
struct Scsi_Host *scsi_host; /* Pointer to mid-layer */
struct list_head port_list_head; /* remote port list */
u32 fsf_req_seq_no; /* FSF cmnd seq number */
wait_queue_head_t request_wq; /* can be used to wait for
more avaliable SBALs */
-@@ -548,7 +498,7 @@ struct zfcp_adapter {
+@@ -548,7 +498,7 @@
actions */
u32 erp_low_mem_count; /* nr of erp actions waiting
for memory */
debug_info_t *rec_dbf;
debug_info_t *hba_dbf;
debug_info_t *san_dbf; /* debug feature areas */
-@@ -563,11 +513,11 @@ struct zfcp_adapter {
+@@ -563,11 +513,11 @@
struct zfcp_scsi_dbf_record scsi_dbf_buf;
struct zfcp_adapter_mempool pool; /* Adapter memory pools */
struct qdio_initialize qdio_init_data; /* for qdio_establish */
};
struct zfcp_port {
-@@ -579,18 +529,16 @@ struct zfcp_port {
+@@ -579,18 +529,16 @@
refcount drop to zero */
struct zfcp_adapter *adapter; /* adapter used to access port */
struct list_head unit_list_head; /* head of logical unit list */
};
struct zfcp_unit {
-@@ -601,8 +549,7 @@ struct zfcp_unit {
+@@ -601,8 +549,7 @@
refcount drop to zero */
struct zfcp_port *port; /* remote port of unit */
atomic_t status; /* status of this logical unit */
u32 handle; /* handle assigned by FSF */
struct scsi_device *device; /* scsi device struct pointer */
struct zfcp_erp_action erp_action; /* pending error recovery */
-@@ -625,7 +572,7 @@ struct zfcp_fsf_req {
+@@ -625,7 +572,7 @@
u8 sbal_response; /* SBAL used in interrupt */
wait_queue_head_t completion_wq; /* can be used by a routine
to wait for completion */
u32 fsf_command; /* FSF Command copy */
struct fsf_qtcb *qtcb; /* address of associated QTCB */
u32 seq_no; /* Sequence number of request */
-@@ -638,17 +585,15 @@ struct zfcp_fsf_req {
+@@ -638,17 +585,15 @@
unsigned long long issued; /* request sent time (STCK) */
struct zfcp_unit *unit;
void (*handler)(struct zfcp_fsf_req *);
rwlock_t config_lock; /* serialises changes
to adapter/port/unit
lists */
-@@ -656,11 +601,13 @@ struct zfcp_data {
+@@ -656,11 +601,13 @@
changes */
atomic_t loglevel; /* current loglevel */
char init_busid[BUS_ID_SIZE];
};
/* struct used by memory pools for fsf_requests */
-@@ -677,14 +624,7 @@ struct zfcp_fsf_req_qtcb {
+@@ -677,14 +624,7 @@
#define ZFCP_SET 0x00000100
#define ZFCP_CLEAR 0x00000200
/*
* Helper functions for request ID management.
-@@ -745,12 +685,6 @@ zfcp_unit_put(struct zfcp_unit *unit)
+@@ -745,12 +685,6 @@
}
static inline void
zfcp_port_get(struct zfcp_port *port)
{
atomic_inc(&port->refcount);
-@@ -764,12 +698,6 @@ zfcp_port_put(struct zfcp_port *port)
- }
-
- static inline void
--zfcp_port_wait(struct zfcp_port *port)
--{
-- wait_event(port->remove_wq, atomic_read(&port->refcount) == 0);
+@@ -761,12 +695,6 @@
+ {
+ if (atomic_dec_return(&port->refcount) == 0)
+ wake_up(&port->remove_wq);
-}
-
-static inline void
- zfcp_adapter_get(struct zfcp_adapter *adapter)
- {
- atomic_inc(&adapter->refcount);
-@@ -782,10 +710,4 @@ zfcp_adapter_put(struct zfcp_adapter *ad
+-zfcp_port_wait(struct zfcp_port *port)
+-{
+- wait_event(port->remove_wq, atomic_read(&port->refcount) == 0);
+ }
+
+ static inline void
+@@ -782,10 +710,4 @@
wake_up(&adapter->remove_wq);
}
-}
-
#endif /* ZFCP_DEF_H */
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_erp.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_erp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_erp.c 2009-03-25 16:11:24.000000000 +0000
-@@ -6,6 +6,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_erp.c
+--- a/drivers/s390/scsi/zfcp_erp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_erp.c Wed May 06 16:56:32 2009 +0100
+@@ -5,6 +5,8 @@
+ *
* Copyright IBM Corporation 2002, 2008
*/
-
-+#define KMSG_COMPONENT "zfcp"
+
++#define KMSG_COMPONENT "zfcp"
+
#include "zfcp_ext.h"
- #define ZFCP_MAX_ERPS 3
-@@ -23,7 +25,6 @@ enum zfcp_erp_steps {
+@@ -23,7 +25,6 @@
ZFCP_ERP_STEP_FSF_XCONFIG = 0x0001,
ZFCP_ERP_STEP_PHYS_PORT_CLOSING = 0x0010,
ZFCP_ERP_STEP_PORT_CLOSING = 0x0100,
ZFCP_ERP_STEP_NAMESERVER_LOOKUP = 0x0400,
ZFCP_ERP_STEP_PORT_OPENING = 0x0800,
ZFCP_ERP_STEP_UNIT_CLOSING = 0x1000,
-@@ -473,6 +474,7 @@ static void zfcp_erp_strategy_check_fsfr
+@@ -473,6 +474,7 @@
ZFCP_STATUS_ERP_TIMEDOUT)) {
act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED;
zfcp_rec_dbf_event_action(142, act);
}
if (act->status & ZFCP_STATUS_ERP_TIMEDOUT)
zfcp_rec_dbf_event_action(143, act);
-@@ -532,8 +534,7 @@ static void _zfcp_erp_port_reopen_all(st
+@@ -532,8 +534,7 @@
struct zfcp_port *port;
list_for_each_entry(port, &adapter->port_list_head, list)
}
static void _zfcp_erp_unit_reopen_all(struct zfcp_port *port, int clear, u8 id,
-@@ -669,8 +670,6 @@ static int zfcp_erp_adapter_strategy_ope
+@@ -669,8 +670,6 @@
int ret;
struct zfcp_adapter *adapter = act->adapter;
write_lock_irq(&adapter->erp_lock);
zfcp_erp_action_to_running(act);
write_unlock_irq(&adapter->erp_lock);
-@@ -741,8 +740,7 @@ static int zfcp_erp_adapter_strategy_gen
+@@ -741,8 +740,7 @@
ZFCP_STATUS_COMMON_OPEN, ZFCP_CLEAR);
failed_qdio:
atomic_clear_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK |
&act->adapter->status);
return retval;
}
-@@ -751,15 +749,11 @@ static int zfcp_erp_adapter_strategy(str
+@@ -751,15 +749,11 @@
{
int retval;
if (retval == ZFCP_ERP_FAILED)
ssleep(8);
-@@ -783,10 +777,7 @@ static int zfcp_erp_port_forced_strategy
+@@ -783,10 +777,7 @@
static void zfcp_erp_port_strategy_clearstati(struct zfcp_port *port)
{
ZFCP_STATUS_PORT_PHYS_CLOSING |
ZFCP_STATUS_PORT_INVALID_WWPN,
&port->status);
-@@ -839,73 +830,12 @@ static int zfcp_erp_port_strategy_open_p
+@@ -839,73 +830,12 @@
return ZFCP_ERP_CONTINUES;
}
zfcp_erp_port_failed(port, 25, NULL);
return ZFCP_ERP_FAILED;
}
-@@ -914,11 +844,25 @@ static int zfcp_erp_open_ptp_port(struct
+@@ -914,11 +844,25 @@
return zfcp_erp_port_strategy_open_port(act);
}
int p_status = atomic_read(&port->status);
switch (act->step) {
-@@ -927,28 +871,10 @@ static int zfcp_erp_port_strategy_open_c
+@@ -927,28 +871,10 @@
case ZFCP_ERP_STEP_PORT_CLOSING:
if (fc_host_port_type(adapter->scsi_host) == FC_PORTTYPE_PTP)
return zfcp_erp_open_ptp_port(act);
- dev_err(&adapter->ccw_device->dev,
- "Nameserver port unavailable.\n");
- return ZFCP_ERP_FAILED;
-- }
++ if (!(p_status & ZFCP_STATUS_PORT_DID_DID)) {
++ queue_work(zfcp_data.work_queue, &port->gid_pn_work);
++ return ZFCP_ERP_CONTINUES;
+ }
- if (!(atomic_read(&ns_port->status) &
- ZFCP_STATUS_COMMON_UNBLOCKED)) {
- /* nameserver port may live again */
- return ZFCP_ERP_CONTINUES;
- }
- return ZFCP_ERP_FAILED;
-+ if (!(p_status & ZFCP_STATUS_PORT_DID_DID)) {
-+ queue_work(zfcp_data.work_queue, &port->gid_pn_work);
-+ return ZFCP_ERP_CONTINUES;
- }
+- }
- /* else nameserver port is already open, fall through */
- case ZFCP_ERP_STEP_NAMESERVER_OPEN:
- if (!(atomic_read(&ns_port->status) & ZFCP_STATUS_COMMON_OPEN))
case ZFCP_ERP_STEP_NAMESERVER_LOOKUP:
if (!(p_status & ZFCP_STATUS_PORT_DID_DID)) {
if (p_status & (ZFCP_STATUS_PORT_INVALID_WWPN)) {
-@@ -961,25 +887,26 @@ static int zfcp_erp_port_strategy_open_c
+@@ -961,24 +887,25 @@
case ZFCP_ERP_STEP_PORT_OPENING:
/* D_ID might have changed during open */
+ }
}
return ZFCP_ERP_FAILED;
- }
-
+-}
+-
-static int zfcp_erp_port_strategy_open(struct zfcp_erp_action *act)
-{
- if (atomic_read(&act->port->status) & (ZFCP_STATUS_PORT_WKA))
- return zfcp_erp_port_strategy_open_nameserver(act);
- return zfcp_erp_port_strategy_open_common(act);
--}
--
+ }
+
static int zfcp_erp_port_strategy(struct zfcp_erp_action *erp_action)
{
struct zfcp_port *port = erp_action->port;
-
++
+ if (atomic_read(&port->status) & ZFCP_STATUS_COMMON_NOESC)
+ goto close_init_done;
-+
+
switch (erp_action->step) {
case ZFCP_ERP_STEP_UNINITIALIZED:
- zfcp_erp_port_strategy_clearstati(port);
-@@ -992,19 +919,17 @@ static int zfcp_erp_port_strategy(struct
+@@ -992,19 +919,17 @@
return ZFCP_ERP_FAILED;
break;
}
ZFCP_STATUS_UNIT_SHARED |
ZFCP_STATUS_UNIT_READONLY,
&unit->status);
-@@ -1065,8 +990,14 @@ static int zfcp_erp_strategy_check_unit(
+@@ -1065,8 +990,14 @@
break;
case ZFCP_ERP_FAILED :
atomic_inc(&unit->erp_counter);
break;
}
-@@ -1091,8 +1022,12 @@ static int zfcp_erp_strategy_check_port(
+@@ -1091,8 +1022,12 @@
result = ZFCP_ERP_EXIT;
}
atomic_inc(&port->erp_counter);
break;
}
-@@ -1114,8 +1049,12 @@ static int zfcp_erp_strategy_check_adapt
+@@ -1114,8 +1049,12 @@
case ZFCP_ERP_FAILED :
atomic_inc(&adapter->erp_counter);
break;
}
-@@ -1249,10 +1188,13 @@ static void zfcp_erp_scsi_scan(struct wo
+@@ -1249,10 +1188,13 @@
container_of(work, struct zfcp_erp_add_work, work);
struct zfcp_unit *unit = p->unit;
struct fc_rport *rport = unit->port->rport;
kfree(p);
}
-@@ -1263,9 +1205,9 @@ static void zfcp_erp_schedule_work(struc
+@@ -1263,9 +1205,9 @@
p = kzalloc(sizeof(*p), GFP_KERNEL);
if (!p) {
dev_err(&unit->port->adapter->ccw_device->dev,
return;
}
-@@ -1273,7 +1215,7 @@ static void zfcp_erp_schedule_work(struc
+@@ -1273,7 +1215,7 @@
atomic_set_mask(ZFCP_STATUS_UNIT_SCSI_WORK_PENDING, &unit->status);
INIT_WORK(&p->work, zfcp_erp_scsi_scan);
p->unit = unit;
}
static void zfcp_erp_rport_register(struct zfcp_port *port)
-@@ -1286,8 +1228,8 @@ static void zfcp_erp_rport_register(stru
+@@ -1286,8 +1228,8 @@
port->rport = fc_remote_port_add(port->adapter->scsi_host, 0, &ids);
if (!port->rport) {
dev_err(&port->adapter->ccw_device->dev,
return;
}
-@@ -1299,12 +1241,12 @@ static void zfcp_erp_rport_register(stru
+@@ -1299,12 +1241,12 @@
static void zfcp_erp_rports_del(struct zfcp_adapter *adapter)
{
struct zfcp_port *port;
}
static void zfcp_erp_action_cleanup(struct zfcp_erp_action *act, int result)
-@@ -1459,9 +1401,9 @@ static int zfcp_erp_thread(void *data)
+@@ -1459,9 +1401,9 @@
zfcp_erp_wakeup(adapter);
}
}
atomic_clear_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_UP, &adapter->status);
-@@ -1484,7 +1426,7 @@ int zfcp_erp_thread_setup(struct zfcp_ad
+@@ -1484,7 +1426,7 @@
retval = kernel_thread(zfcp_erp_thread, adapter, SIGCHLD);
if (retval < 0) {
dev_err(&adapter->ccw_device->dev,
return retval;
}
wait_event(adapter->erp_thread_wqh,
-@@ -1506,7 +1448,7 @@ void zfcp_erp_thread_kill(struct zfcp_ad
+@@ -1506,7 +1448,7 @@
{
atomic_set_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL, &adapter->status);
up(&adapter->erp_ready_sem);
wait_event(adapter->erp_thread_wqh,
!(atomic_read(&adapter->status) &
-@@ -1526,7 +1468,6 @@ void zfcp_erp_adapter_failed(struct zfcp
+@@ -1526,7 +1468,6 @@
{
zfcp_erp_modify_adapter_status(adapter, id, ref,
ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);
}
/**
-@@ -1539,15 +1480,6 @@ void zfcp_erp_port_failed(struct zfcp_po
+@@ -1539,15 +1480,6 @@
{
zfcp_erp_modify_port_status(port, id, ref,
ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);
}
/**
-@@ -1560,10 +1492,6 @@ void zfcp_erp_unit_failed(struct zfcp_un
+@@ -1560,10 +1492,6 @@
{
zfcp_erp_modify_unit_status(unit, id, ref,
ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);
}
/**
-@@ -1754,9 +1682,8 @@ static void zfcp_erp_port_access_changed
+@@ -1754,9 +1682,8 @@
if (!(status & (ZFCP_STATUS_COMMON_ACCESS_DENIED |
ZFCP_STATUS_COMMON_ACCESS_BOXED))) {
return;
}
-@@ -1779,10 +1706,7 @@ void zfcp_erp_adapter_access_changed(str
+@@ -1779,10 +1706,7 @@
return;
read_lock_irqsave(&zfcp_data.config_lock, flags);
+ zfcp_erp_port_access_changed(port, id, ref);
read_unlock_irqrestore(&zfcp_data.config_lock, flags);
}
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ext.h linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_ext.h
---- linux-2.6.27/drivers/s390/scsi/zfcp_ext.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_ext.h 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_ext.h
+--- a/drivers/s390/scsi/zfcp_ext.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_ext.h Wed May 06 16:56:32 2009 +0100
@@ -12,16 +12,14 @@
#include "zfcp_def.h"
extern void zfcp_unit_dequeue(struct zfcp_unit *);
extern int zfcp_reqlist_isempty(struct zfcp_adapter *);
extern void zfcp_sg_free_table(struct scatterlist *, int);
-@@ -29,6 +27,7 @@ extern int zfcp_sg_setup_table(struct sc
+@@ -29,6 +27,7 @@
/* zfcp_ccw.c */
extern int zfcp_ccw_register(void);
/* zfcp_cfdc.c */
extern struct miscdevice zfcp_cfdc_misc;
-@@ -50,6 +49,8 @@ extern void zfcp_hba_dbf_event_fsf_unsol
+@@ -50,6 +49,8 @@
struct fsf_status_read_buffer *);
extern void zfcp_hba_dbf_event_qdio(struct zfcp_adapter *, unsigned int, int,
int);
extern void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *);
extern void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *);
extern void zfcp_san_dbf_event_els_request(struct zfcp_fsf_req *);
-@@ -91,17 +92,21 @@ extern void zfcp_erp_port_access_denied(
+@@ -91,17 +92,21 @@
extern void zfcp_erp_unit_access_denied(struct zfcp_unit *, u8, void *);
extern void zfcp_erp_adapter_access_changed(struct zfcp_adapter *, u8, void *);
extern void zfcp_erp_timeout_handler(unsigned long);
extern int zfcp_fsf_close_port(struct zfcp_erp_action *);
extern int zfcp_fsf_close_physical_port(struct zfcp_erp_action *);
extern int zfcp_fsf_open_unit(struct zfcp_erp_action *);
-@@ -135,10 +140,8 @@ extern struct zfcp_fsf_req *zfcp_fsf_abo
+@@ -135,10 +140,8 @@
extern int zfcp_qdio_allocate(struct zfcp_adapter *);
extern void zfcp_qdio_free(struct zfcp_adapter *);
extern int zfcp_qdio_send(struct zfcp_fsf_req *);
extern int zfcp_qdio_sbals_from_sg(struct zfcp_fsf_req *, unsigned long,
struct scatterlist *, int);
extern int zfcp_qdio_open(struct zfcp_adapter *);
-@@ -148,14 +151,12 @@ extern void zfcp_qdio_close(struct zfcp_
+@@ -148,14 +151,12 @@
extern struct zfcp_data zfcp_data;
extern int zfcp_adapter_scsi_register(struct zfcp_adapter *);
extern void zfcp_adapter_scsi_unregister(struct zfcp_adapter *);
extern struct attribute_group zfcp_sysfs_port_attrs;
extern struct device_attribute *zfcp_sysfs_sdev_attrs[];
extern struct device_attribute *zfcp_sysfs_shost_attrs[];
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_fc.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_fc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_fc.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_fc.c
+--- a/drivers/s390/scsi/zfcp_fc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_fc.c Wed May 06 16:56:32 2009 +0100
@@ -6,15 +6,9 @@
* Copyright IBM Corporation 2008
*/
--#include "zfcp_ext.h"
+#define KMSG_COMPONENT "zfcp"
-
++
+ #include "zfcp_ext.h"
+-
-struct ct_iu_gpn_ft_req {
- struct ct_hdr header;
- u8 flags;
- u8 area_id_scope;
- u8 fc4_type;
-} __attribute__ ((packed));
-+#include "zfcp_ext.h"
struct gpn_ft_resp_acc {
u8 control;
-@@ -23,9 +17,12 @@ struct gpn_ft_resp_acc {
+@@ -23,9 +17,12 @@
u64 wwpn;
} __attribute__ ((packed));
#define ZFCP_GPN_FT_MAX_ENTRIES ZFCP_GPN_FT_BUFFERS * (ZFCP_GPN_FT_ENTRIES + 1)
struct ct_iu_gpn_ft_resp {
-@@ -39,6 +36,85 @@ struct zfcp_gpn_ft {
+@@ -39,6 +36,85 @@
struct scatterlist sg_resp[ZFCP_GPN_FT_BUFFERS];
};
static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range,
struct fcp_rscn_element *elem)
{
-@@ -47,10 +123,7 @@ static void _zfcp_fc_incoming_rscn(struc
+@@ -47,10 +123,7 @@
read_lock_irqsave(&zfcp_data.config_lock, flags);
list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) {
/* Try to connect to unused ports anyway. */
zfcp_erp_port_reopen(port,
ZFCP_STATUS_COMMON_ERP_FAILED,
-@@ -102,7 +175,7 @@ static void zfcp_fc_incoming_rscn(struct
+@@ -102,7 +175,7 @@
schedule_work(&fsf_req->adapter->scan_work);
}
{
struct zfcp_adapter *adapter = req->adapter;
struct zfcp_port *port;
-@@ -157,7 +230,18 @@ void zfcp_fc_incoming_els(struct zfcp_fs
+@@ -157,7 +230,18 @@
zfcp_fc_incoming_rscn(fsf_req);
}
{
struct zfcp_gid_pn_data *gid_pn = (struct zfcp_gid_pn_data *) data;
struct zfcp_send_ct *ct = &gid_pn->ct;
-@@ -166,48 +250,34 @@ static void zfcp_ns_gid_pn_handler(unsig
+@@ -166,19 +250,56 @@
struct zfcp_port *port = gid_pn->port;
if (ct->status)
atomic_set_mask(ZFCP_STATUS_PORT_DID_DID, &port->status);
-out:
- mempool_free(gid_pn, port->adapter->pool.data_gid_pn);
- }
-
--/**
-- * zfcp_fc_ns_gid_pn_request - initiate GID_PN nameserver request
-- * @erp_action: pointer to zfcp_erp_action where GID_PN request is needed
-- * return: -ENOMEM on error, 0 otherwise
-- */
--int zfcp_fc_ns_gid_pn_request(struct zfcp_erp_action *erp_action)
++}
++
+int static zfcp_fc_ns_gid_pn_request(struct zfcp_erp_action *erp_action,
+ struct zfcp_gid_pn_data *gid_pn)
- {
-- int ret;
-- struct zfcp_gid_pn_data *gid_pn;
- struct zfcp_adapter *adapter = erp_action->adapter;
--
-- gid_pn = mempool_alloc(adapter->pool.data_gid_pn, GFP_ATOMIC);
-- if (!gid_pn)
-- return -ENOMEM;
--
-- memset(gid_pn, 0, sizeof(*gid_pn));
++{
++ struct zfcp_adapter *adapter = erp_action->adapter;
+ struct zfcp_fc_ns_handler_data compl_rec;
+ int ret;
-
- /* setup parameters for send generic command */
- gid_pn->port = erp_action->port;
-- gid_pn->ct.port = adapter->nameserver_port;
-- gid_pn->ct.handler = zfcp_ns_gid_pn_handler;
-- gid_pn->ct.handler_data = (unsigned long) gid_pn;
++
++ /* setup parameters for send generic command */
++ gid_pn->port = erp_action->port;
+ gid_pn->ct.wka_port = &adapter->nsp;
+ gid_pn->ct.handler = zfcp_fc_ns_handler;
+ gid_pn->ct.handler_data = (unsigned long) &compl_rec;
- gid_pn->ct.timeout = ZFCP_NS_GID_PN_TIMEOUT;
- gid_pn->ct.req = &gid_pn->req;
- gid_pn->ct.resp = &gid_pn->resp;
-- gid_pn->ct.req_count = 1;
-- gid_pn->ct.resp_count = 1;
- sg_init_one(&gid_pn->req, &gid_pn->ct_iu_req,
- sizeof(struct ct_iu_gid_pn_req));
- sg_init_one(&gid_pn->resp, &gid_pn->ct_iu_resp,
-@@ -219,13 +289,45 @@ int zfcp_fc_ns_gid_pn_request(struct zfc
- gid_pn->ct_iu_req.header.gs_subtype = ZFCP_CT_NAME_SERVER;
- gid_pn->ct_iu_req.header.options = ZFCP_CT_SYNCHRONOUS;
- gid_pn->ct_iu_req.header.cmd_rsp_code = ZFCP_CT_GID_PN;
-- gid_pn->ct_iu_req.header.max_res_size = ZFCP_CT_MAX_SIZE;
++ gid_pn->ct.timeout = ZFCP_NS_GID_PN_TIMEOUT;
++ gid_pn->ct.req = &gid_pn->req;
++ gid_pn->ct.resp = &gid_pn->resp;
++ sg_init_one(&gid_pn->req, &gid_pn->ct_iu_req,
++ sizeof(struct ct_iu_gid_pn_req));
++ sg_init_one(&gid_pn->resp, &gid_pn->ct_iu_resp,
++ sizeof(struct ct_iu_gid_pn_resp));
++
++ /* setup nameserver request */
++ gid_pn->ct_iu_req.header.revision = ZFCP_CT_REVISION;
++ gid_pn->ct_iu_req.header.gs_type = ZFCP_CT_DIRECTORY_SERVICE;
++ gid_pn->ct_iu_req.header.gs_subtype = ZFCP_CT_NAME_SERVER;
++ gid_pn->ct_iu_req.header.options = ZFCP_CT_SYNCHRONOUS;
++ gid_pn->ct_iu_req.header.cmd_rsp_code = ZFCP_CT_GID_PN;
+ gid_pn->ct_iu_req.header.max_res_size = ZFCP_CT_SIZE_ONE_PAGE / 4;
- gid_pn->ct_iu_req.wwpn = erp_action->port->wwpn;
-
++ gid_pn->ct_iu_req.wwpn = erp_action->port->wwpn;
++
+ init_completion(&compl_rec.done);
+ compl_rec.handler = zfcp_fc_ns_gid_pn_eval;
+ compl_rec.handler_data = (unsigned long) gid_pn;
- ret = zfcp_fsf_send_ct(&gid_pn->ct, adapter->pool.fsf_req_erp,
- erp_action);
++ ret = zfcp_fsf_send_ct(&gid_pn->ct, adapter->pool.fsf_req_erp,
++ erp_action);
+ if (!ret)
+ wait_for_completion(&compl_rec.done);
+ return ret;
-+}
-+
-+/**
-+ * zfcp_fc_ns_gid_pn_request - initiate GID_PN nameserver request
-+ * @erp_action: pointer to zfcp_erp_action where GID_PN request is needed
-+ * return: -ENOMEM on error, 0 otherwise
-+ */
+ }
+
+ /**
+@@ -186,7 +307,7 @@
+ * @erp_action: pointer to zfcp_erp_action where GID_PN request is needed
+ * return: -ENOMEM on error, 0 otherwise
+ */
+-int zfcp_fc_ns_gid_pn_request(struct zfcp_erp_action *erp_action)
+int zfcp_fc_ns_gid_pn(struct zfcp_erp_action *erp_action)
-+{
-+ int ret;
-+ struct zfcp_gid_pn_data *gid_pn;
-+ struct zfcp_adapter *adapter = erp_action->adapter;
-+
-+ gid_pn = mempool_alloc(adapter->pool.data_gid_pn, GFP_ATOMIC);
-+ if (!gid_pn)
-+ return -ENOMEM;
-+
-+ memset(gid_pn, 0, sizeof(*gid_pn));
-+
+ {
+ int ret;
+ struct zfcp_gid_pn_data *gid_pn;
+@@ -198,34 +319,15 @@
+
+ memset(gid_pn, 0, sizeof(*gid_pn));
+
+- /* setup parameters for send generic command */
+- gid_pn->port = erp_action->port;
+- gid_pn->ct.port = adapter->nameserver_port;
+- gid_pn->ct.handler = zfcp_ns_gid_pn_handler;
+- gid_pn->ct.handler_data = (unsigned long) gid_pn;
+- gid_pn->ct.timeout = ZFCP_NS_GID_PN_TIMEOUT;
+- gid_pn->ct.req = &gid_pn->req;
+- gid_pn->ct.resp = &gid_pn->resp;
+- gid_pn->ct.req_count = 1;
+- gid_pn->ct.resp_count = 1;
+- sg_init_one(&gid_pn->req, &gid_pn->ct_iu_req,
+- sizeof(struct ct_iu_gid_pn_req));
+- sg_init_one(&gid_pn->resp, &gid_pn->ct_iu_resp,
+- sizeof(struct ct_iu_gid_pn_resp));
+ ret = zfcp_wka_port_get(&adapter->nsp);
- if (ret)
-- mempool_free(gid_pn, adapter->pool.data_gid_pn);
++ if (ret)
+ goto out;
-+
+
+- /* setup nameserver request */
+- gid_pn->ct_iu_req.header.revision = ZFCP_CT_REVISION;
+- gid_pn->ct_iu_req.header.gs_type = ZFCP_CT_DIRECTORY_SERVICE;
+- gid_pn->ct_iu_req.header.gs_subtype = ZFCP_CT_NAME_SERVER;
+- gid_pn->ct_iu_req.header.options = ZFCP_CT_SYNCHRONOUS;
+- gid_pn->ct_iu_req.header.cmd_rsp_code = ZFCP_CT_GID_PN;
+- gid_pn->ct_iu_req.header.max_res_size = ZFCP_CT_MAX_SIZE;
+- gid_pn->ct_iu_req.wwpn = erp_action->port->wwpn;
+ ret = zfcp_fc_ns_gid_pn_request(erp_action, gid_pn);
-+
+
+- ret = zfcp_fsf_send_ct(&gid_pn->ct, adapter->pool.fsf_req_erp,
+- erp_action);
+- if (ret)
+- mempool_free(gid_pn, adapter->pool.data_gid_pn);
+ zfcp_wka_port_put(&adapter->nsp);
+out:
+ mempool_free(gid_pn, adapter->pool.data_gid_pn);
return ret;
}
-@@ -255,14 +357,14 @@ struct zfcp_els_adisc {
+@@ -255,14 +357,14 @@
struct scatterlist req;
struct scatterlist resp;
struct zfcp_ls_adisc ls_adisc;
if (adisc->els.status) {
/* request rejected or timed out */
-@@ -295,10 +397,8 @@ static int zfcp_fc_adisc(struct zfcp_por
+@@ -295,10 +397,8 @@
sg_init_one(adisc->els.req, &adisc->ls_adisc,
sizeof(struct zfcp_ls_adisc));
sg_init_one(adisc->els.resp, &adisc->ls_adisc_acc,
adisc->els.adapter = adapter;
adisc->els.port = port;
adisc->els.d_id = port->d_id;
-@@ -338,41 +438,18 @@ void zfcp_test_link(struct zfcp_port *po
+@@ -338,41 +438,18 @@
zfcp_erp_port_forced_reopen(port, 0, 65, NULL);
}
{
struct zfcp_gpn_ft *gpn_ft;
struct ct_iu_gpn_ft_req *req;
-@@ -381,7 +458,7 @@ static struct zfcp_gpn_ft *zfcp_alloc_sg
+@@ -381,7 +458,7 @@
if (!gpn_ft)
return NULL;
if (!req) {
kfree(gpn_ft);
gpn_ft = NULL;
-@@ -389,8 +466,8 @@ static struct zfcp_gpn_ft *zfcp_alloc_sg
+@@ -389,8 +466,8 @@
}
sg_init_one(&gpn_ft->sg_req, req, sizeof(*req));
gpn_ft = NULL;
}
out:
-@@ -399,11 +476,12 @@ out:
+@@ -399,11 +476,12 @@
static int zfcp_scan_issue_gpn_ft(struct zfcp_gpn_ft *gpn_ft,
int ret;
/* prepare CT IU for GPN_FT */
-@@ -412,27 +490,25 @@ static int zfcp_scan_issue_gpn_ft(struct
+@@ -412,27 +490,25 @@
req->header.gs_subtype = ZFCP_CT_NAME_SERVER;
req->header.options = ZFCP_CT_SYNCHRONOUS;
req->header.cmd_rsp_code = ZFCP_CT_GPN_FT;
return ret;
}
-@@ -442,9 +518,8 @@ static void zfcp_validate_port(struct zf
+@@ -442,9 +518,8 @@
atomic_clear_mask(ZFCP_STATUS_COMMON_NOESC, &port->status);
zfcp_port_put(port);
return;
}
-@@ -454,13 +529,13 @@ static void zfcp_validate_port(struct zf
+@@ -454,13 +529,13 @@
zfcp_port_dequeue(port);
}
struct zfcp_port *port, *tmp;
u32 d_id;
int ret = 0, x, last = 0;
-@@ -474,13 +549,17 @@ static int zfcp_scan_eval_gpn_ft(struct
+@@ -474,13 +549,17 @@
return -EIO;
}
if (x % (ZFCP_GPN_FT_ENTRIES + 1))
acc++;
else
-@@ -490,6 +569,9 @@ static int zfcp_scan_eval_gpn_ft(struct
+@@ -490,6 +569,9 @@
d_id = acc->port_id[0] << 16 | acc->port_id[1] << 8 |
acc->port_id[2];
/* skip the adapter's port and known remote ports */
if (acc->wwpn == fc_host_port_name(adapter->scsi_host))
continue;
-@@ -523,31 +605,40 @@ int zfcp_scan_ports(struct zfcp_adapter
+@@ -523,31 +605,40 @@
{
int ret, i;
struct zfcp_gpn_ft *gpn_ft;
return ret;
}
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_fsf.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_fsf.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_fsf.c
+--- a/drivers/s390/scsi/zfcp_fsf.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_fsf.c Wed May 06 16:56:32 2009 +0100
@@ -6,6 +6,9 @@
* Copyright IBM Corporation 2002, 2008
*/
#include "zfcp_ext.h"
static void zfcp_fsf_request_timeout_handler(unsigned long data)
-@@ -50,19 +53,16 @@ static u32 fsf_qtcb_type[] = {
+@@ -50,19 +53,16 @@
[FSF_QTCB_UPLOAD_CONTROL_FILE] = FSF_SUPPORT_COMMAND
};
}
static void zfcp_fsf_access_denied_port(struct zfcp_fsf_req *req,
-@@ -70,8 +70,8 @@ static void zfcp_fsf_access_denied_port(
+@@ -70,8 +70,8 @@
{
struct fsf_qtcb_header *header = &req->qtcb->header;
dev_warn(&req->adapter->ccw_device->dev,
zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]);
zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]);
zfcp_erp_port_access_denied(port, 55, req);
-@@ -83,8 +83,9 @@ static void zfcp_fsf_access_denied_unit(
+@@ -83,8 +83,9 @@
{
struct fsf_qtcb_header *header = &req->qtcb->header;
dev_warn(&req->adapter->ccw_device->dev,
zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]);
zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]);
zfcp_erp_unit_access_denied(unit, 59, req);
-@@ -93,9 +94,8 @@ static void zfcp_fsf_access_denied_unit(
+@@ -93,9 +94,8 @@
static void zfcp_fsf_class_not_supp(struct zfcp_fsf_req *req)
{
zfcp_erp_adapter_shutdown(req->adapter, 0, 123, req);
req->status |= ZFCP_STATUS_FSFREQ_ERROR;
}
-@@ -171,42 +171,6 @@ static void zfcp_fsf_status_read_port_cl
+@@ -171,42 +171,6 @@
read_unlock_irqrestore(&zfcp_data.config_lock, flags);
}
static void zfcp_fsf_link_down_info_eval(struct zfcp_fsf_req *req, u8 id,
struct fsf_link_down_info *link_down)
{
-@@ -223,62 +187,66 @@ static void zfcp_fsf_link_down_info_eval
+@@ -223,62 +187,66 @@
switch (link_down->error_code) {
case FSF_PSQ_LINK_NO_LIGHT:
dev_warn(&req->adapter->ccw_device->dev,
}
out:
zfcp_erp_adapter_failed(adapter, id, req);
-@@ -286,27 +254,18 @@ out:
+@@ -286,27 +254,18 @@
static void zfcp_fsf_status_read_link_down(struct zfcp_fsf_req *req)
{
zfcp_fsf_link_down_info_eval(req, 40, NULL);
};
}
-@@ -335,14 +294,17 @@ static void zfcp_fsf_status_read_handler
+@@ -335,14 +294,17 @@
case FSF_STATUS_READ_SENSE_DATA_AVAIL:
break;
case FSF_STATUS_READ_BIT_ERROR_THRESHOLD:
/* All ports should be marked as ready to run again */
zfcp_erp_modify_adapter_status(adapter, 30, NULL,
ZFCP_STATUS_COMMON_RUNNING,
-@@ -370,7 +332,7 @@ static void zfcp_fsf_status_read_handler
+@@ -370,7 +332,7 @@
zfcp_fsf_req_free(req);
atomic_inc(&adapter->stat_miss);
}
static void zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *req)
-@@ -386,8 +348,8 @@ static void zfcp_fsf_fsfstatus_qual_eval
+@@ -386,8 +348,8 @@
break;
case FSF_SQ_NO_RECOM:
dev_err(&req->adapter->ccw_device->dev,
zfcp_erp_adapter_shutdown(req->adapter, 0, 121, req);
break;
}
-@@ -403,8 +365,7 @@ static void zfcp_fsf_fsfstatus_eval(stru
+@@ -403,8 +365,7 @@
switch (req->qtcb->header.fsf_status) {
case FSF_UNKNOWN_COMMAND:
dev_err(&req->adapter->ccw_device->dev,
req->qtcb->header.fsf_command);
zfcp_erp_adapter_shutdown(req->adapter, 0, 120, req);
req->status |= ZFCP_STATUS_FSFREQ_ERROR;
-@@ -435,11 +396,9 @@ static void zfcp_fsf_protstatus_eval(str
+@@ -435,11 +396,9 @@
return;
case FSF_PROT_QTCB_VERSION_ERROR:
dev_err(&adapter->ccw_device->dev,
zfcp_erp_adapter_shutdown(adapter, 0, 117, req);
break;
case FSF_PROT_ERROR_STATE:
-@@ -449,8 +408,7 @@ static void zfcp_fsf_protstatus_eval(str
+@@ -449,8 +408,7 @@
break;
case FSF_PROT_UNSUPP_QTCB_TYPE:
dev_err(&adapter->ccw_device->dev,
zfcp_erp_adapter_shutdown(adapter, 0, 118, req);
break;
case FSF_PROT_HOST_CONNECTION_INITIALIZING:
-@@ -459,7 +417,7 @@ static void zfcp_fsf_protstatus_eval(str
+@@ -459,7 +417,7 @@
break;
case FSF_PROT_DUPLICATE_REQUEST_ID:
dev_err(&adapter->ccw_device->dev,
(unsigned long long)qtcb->bottom.support.req_handle);
zfcp_erp_adapter_shutdown(adapter, 0, 78, req);
break;
-@@ -479,9 +437,7 @@ static void zfcp_fsf_protstatus_eval(str
+@@ -479,9 +437,7 @@
break;
default:
dev_err(&adapter->ccw_device->dev,
qtcb->prefix.prot_status);
zfcp_erp_adapter_shutdown(adapter, 0, 119, req);
}
-@@ -559,33 +515,17 @@ static int zfcp_fsf_exchange_config_eval
+@@ -559,33 +515,17 @@
adapter->peer_wwpn = bottom->plogi_payload.wwpn;
adapter->peer_wwnn = bottom->plogi_payload.wwnn;
fc_host_port_type(shost) = FC_PORTTYPE_PTP;
break;
case FSF_TOPO_AL:
fc_host_port_type(shost) = FC_PORTTYPE_NLPORT;
-- dev_err(&adapter->ccw_device->dev,
++ default:
+ dev_err(&adapter->ccw_device->dev,
- "Unsupported arbitrated loop fibrechannel "
- "topology detected, shutting down "
- "adapter.\n");
-- zfcp_erp_adapter_shutdown(adapter, 0, 127, req);
++ "Unknown or unsupported arbitrated loop "
++ "fibre channel topology detected\n");
+ zfcp_erp_adapter_shutdown(adapter, 0, 127, req);
- return -EIO;
- default:
+- default:
- fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN;
- dev_err(&adapter->ccw_device->dev,
+- dev_err(&adapter->ccw_device->dev,
- "The fibrechannel topology reported by the"
- " adapter is not known by the zfcp driver,"
- " shutting down adapter.\n");
- zfcp_erp_adapter_shutdown(adapter, 0, 128, req);
-+ "Unknown or unsupported arbitrated loop "
-+ "fibre channel topology detected\n");
-+ zfcp_erp_adapter_shutdown(adapter, 0, 127, req);
return -EIO;
}
-@@ -616,11 +556,9 @@ static void zfcp_fsf_exchange_config_dat
+@@ -616,11 +556,9 @@
if (bottom->max_qtcb_size < sizeof(struct fsf_qtcb)) {
dev_err(&adapter->ccw_device->dev,
zfcp_erp_adapter_shutdown(adapter, 0, 129, req);
return;
}
-@@ -656,15 +594,15 @@ static void zfcp_fsf_exchange_config_dat
+@@ -656,15 +594,15 @@
if (FSF_QTCB_CURRENT_VERSION < bottom->low_qtcb_version) {
dev_err(&adapter->ccw_device->dev,
zfcp_erp_adapter_shutdown(adapter, 0, 126, req);
}
}
-@@ -688,7 +626,6 @@ static void zfcp_fsf_exchange_port_evalu
+@@ -688,7 +626,6 @@
static void zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *req)
{
struct fsf_qtcb *qtcb = req->qtcb;
if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
-@@ -697,38 +634,47 @@ static void zfcp_fsf_exchange_port_data_
+@@ -697,38 +634,47 @@
switch (qtcb->header.fsf_status) {
case FSF_GOOD:
zfcp_fsf_exchange_port_evaluate(req);
- spin_unlock_bh(&queue->lock);
+ spin_unlock_bh(&adapter->req_q_lock);
return 0;
- }
-
++}
++
+static int zfcp_fsf_sbal_available(struct zfcp_adapter *adapter)
+{
+ unsigned int count = atomic_read(&adapter->req_q.count);
+ if (!count)
+ atomic_inc(&adapter->qdio_outb_full);
+ return count > 0;
-+}
-+
+ }
+
static int zfcp_fsf_req_sbal_get(struct zfcp_adapter *adapter)
{
long ret;
return -EIO;
}
-@@ -739,6 +685,7 @@ static struct zfcp_fsf_req *zfcp_fsf_all
+@@ -739,6 +685,7 @@
if (!req)
return NULL;
memset(req, 0, sizeof(*req));
return req;
}
-@@ -765,7 +712,7 @@ static struct zfcp_fsf_req *zfcp_fsf_req
+@@ -765,7 +712,7 @@
u32 fsf_cmd, int req_flags,
mempool_t *pool)
{
struct zfcp_fsf_req *req;
struct zfcp_qdio_queue *req_q = &adapter->req_q;
-@@ -825,27 +772,24 @@ static struct zfcp_fsf_req *zfcp_fsf_req
+@@ -825,27 +772,24 @@
static int zfcp_fsf_req_send(struct zfcp_fsf_req *req)
{
struct zfcp_adapter *adapter = req->adapter;
zfcp_erp_adapter_reopen(adapter, 0, 116, req);
return -EIO;
}
-@@ -867,10 +811,10 @@ int zfcp_fsf_status_read(struct zfcp_ada
+@@ -867,10 +811,10 @@
{
struct zfcp_fsf_req *req;
struct fsf_status_read_buffer *sr_buf;
if (zfcp_fsf_req_sbal_get(adapter))
goto out;
-@@ -910,7 +854,7 @@ failed_buf:
+@@ -910,7 +854,7 @@
zfcp_fsf_req_free(req);
zfcp_hba_dbf_event_fsf_unsol("fail", adapter, NULL);
out:
return retval;
}
-@@ -980,16 +924,18 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_
+@@ -980,16 +924,18 @@
struct zfcp_unit *unit,
int req_flags)
{
if (unlikely(!(atomic_read(&unit->status) &
ZFCP_STATUS_COMMON_UNBLOCKED)))
-@@ -1013,7 +959,7 @@ out_error_free:
+@@ -1013,7 +959,7 @@
zfcp_fsf_req_free(req);
req = NULL;
out:
return req;
}
-@@ -1021,7 +967,6 @@ static void zfcp_fsf_send_ct_handler(str
+@@ -1021,7 +967,6 @@
{
struct zfcp_adapter *adapter = req->adapter;
struct zfcp_send_ct *send_ct = req->data;
struct fsf_qtcb_header *header = &req->qtcb->header;
send_ct->status = -EINVAL;
-@@ -1040,17 +985,14 @@ static void zfcp_fsf_send_ct_handler(str
+@@ -1040,17 +985,14 @@
case FSF_ADAPTER_STATUS_AVAILABLE:
switch (header->fsf_status_qual.word[0]){
case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
req->status |= ZFCP_STATUS_FSFREQ_ERROR |
ZFCP_STATUS_FSFREQ_RETRY;
break;
-@@ -1070,12 +1012,29 @@ skip_fsfstatus:
+@@ -1070,11 +1012,28 @@
send_ct->handler(send_ct->handler_data);
}
+ struct qdio_buffer_element *sbale = zfcp_qdio_sbale_req(req);
+ u32 feat = req->adapter->adapter_features;
int bytes;
-
++
+ if (!(feat & FSF_FEATURE_ELS_CT_CHAINED_SBALS)) {
+ if (sg_req->length > PAGE_SIZE || sg_resp->length > PAGE_SIZE ||
+ !sg_is_last(sg_req) || !sg_is_last(sg_resp))
+ sbale[3].flags |= SBAL_FLAGS_LAST_ENTRY;
+ return 0;
+ }
-+
+
bytes = zfcp_qdio_sbals_from_sg(req, SBAL_FLAGS0_TYPE_WRITE_READ,
sg_req, max_sbals);
- if (bytes <= 0)
-@@ -1101,12 +1060,12 @@ static int zfcp_fsf_setup_sbals(struct z
+@@ -1101,12 +1060,12 @@
int zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool,
struct zfcp_erp_action *erp_action)
{
if (zfcp_fsf_req_sbal_get(adapter))
goto out;
-@@ -1117,13 +1076,13 @@ int zfcp_fsf_send_ct(struct zfcp_send_ct
+@@ -1117,13 +1076,13 @@
goto out;
}
req->qtcb->bottom.support.service_class = FSF_CLASS_3;
req->qtcb->bottom.support.timeout = ct->timeout;
req->data = ct;
-@@ -1148,7 +1107,7 @@ failed_send:
+@@ -1148,7 +1107,7 @@
if (erp_action)
erp_action->fsf_req = NULL;
out:
return ret;
}
-@@ -1218,8 +1177,8 @@ int zfcp_fsf_send_els(struct zfcp_send_e
+@@ -1218,8 +1177,8 @@
ZFCP_STATUS_COMMON_UNBLOCKED)))
return -EBUSY;
goto out;
req = zfcp_fsf_req_create(adapter, FSF_QTCB_SEND_ELS,
ZFCP_REQ_AUTO_CLEANUP, NULL);
-@@ -1228,8 +1187,8 @@ int zfcp_fsf_send_els(struct zfcp_send_e
+@@ -1228,8 +1187,8 @@
goto out;
}
if (ret)
goto failed_send;
-@@ -1252,19 +1211,19 @@ int zfcp_fsf_send_els(struct zfcp_send_e
+@@ -1252,19 +1211,19 @@
failed_send:
zfcp_fsf_req_free(req);
out:
goto out;
req = zfcp_fsf_req_create(adapter,
FSF_QTCB_EXCHANGE_CONFIG_DATA,
-@@ -1295,18 +1254,18 @@ int zfcp_fsf_exchange_config_data(struct
+@@ -1295,18 +1254,18 @@
erp_action->fsf_req = NULL;
}
out:
if (zfcp_fsf_req_sbal_get(adapter))
goto out;
-@@ -1334,7 +1293,7 @@ int zfcp_fsf_exchange_config_data_sync(s
+@@ -1334,7 +1293,7 @@
zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
retval = zfcp_fsf_req_send(req);
out:
if (!retval)
wait_event(req->completion_wq,
req->status & ZFCP_STATUS_FSFREQ_COMPLETED);
-@@ -1351,7 +1310,7 @@ out:
+@@ -1351,7 +1310,7 @@
*/
int zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action)
{
struct zfcp_fsf_req *req;
struct zfcp_adapter *adapter = erp_action->adapter;
int retval = -EIO;
-@@ -1359,8 +1318,8 @@ int zfcp_fsf_exchange_port_data(struct z
+@@ -1359,8 +1318,8 @@
if (!(adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT))
return -EOPNOTSUPP;
goto out;
req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA,
ZFCP_REQ_AUTO_CLEANUP,
-@@ -1385,7 +1344,7 @@ int zfcp_fsf_exchange_port_data(struct z
+@@ -1385,7 +1344,7 @@
erp_action->fsf_req = NULL;
}
out:
return retval;
}
-@@ -1398,15 +1357,15 @@ out:
+@@ -1398,15 +1357,15 @@
int zfcp_fsf_exchange_port_data_sync(struct zfcp_adapter *adapter,
struct fsf_qtcb_bottom_port *data)
{
goto out;
req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, 0,
-@@ -1427,7 +1386,7 @@ int zfcp_fsf_exchange_port_data_sync(str
+@@ -1427,7 +1386,7 @@
zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
retval = zfcp_fsf_req_send(req);
out:
if (!retval)
wait_event(req->completion_wq,
req->status & ZFCP_STATUS_FSFREQ_COMPLETED);
-@@ -1443,7 +1402,7 @@ static void zfcp_fsf_open_port_handler(s
+@@ -1443,7 +1402,7 @@
struct fsf_plogi *plogi;
if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
switch (header->fsf_status) {
case FSF_PORT_ALREADY_OPEN:
-@@ -1453,9 +1412,9 @@ static void zfcp_fsf_open_port_handler(s
+@@ -1453,9 +1412,9 @@
break;
case FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED:
dev_warn(&req->adapter->ccw_device->dev,
zfcp_erp_port_failed(port, 31, req);
req->status |= ZFCP_STATUS_FSFREQ_ERROR;
break;
-@@ -1463,13 +1422,7 @@ static void zfcp_fsf_open_port_handler(s
+@@ -1463,13 +1422,7 @@
switch (header->fsf_status_qual.word[0]) {
case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
req->status |= ZFCP_STATUS_FSFREQ_ERROR;
break;
}
-@@ -1496,11 +1449,9 @@ static void zfcp_fsf_open_port_handler(s
+@@ -1496,11 +1449,9 @@
* another GID_PN straight after a port has been opened.
* Alternately, an ADISC/PDISC ELS should suffice, as well.
*/
if (plogi->serv_param.wwpn != port->wwpn)
atomic_clear_mask(ZFCP_STATUS_PORT_DID_DID,
&port->status);
-@@ -1514,9 +1465,6 @@ static void zfcp_fsf_open_port_handler(s
+@@ -1514,9 +1465,6 @@
req->status |= ZFCP_STATUS_FSFREQ_ERROR;
break;
}
}
/**
-@@ -1526,12 +1474,12 @@ skip_fsfstatus:
+@@ -1526,12 +1474,12 @@
*/
int zfcp_fsf_open_port(struct zfcp_erp_action *erp_action)
{
if (zfcp_fsf_req_sbal_get(adapter))
goto out;
-@@ -1553,7 +1501,6 @@ int zfcp_fsf_open_port(struct zfcp_erp_a
+@@ -1553,7 +1501,6 @@
req->data = erp_action->port;
req->erp_action = erp_action;
erp_action->fsf_req = req;
zfcp_fsf_start_erp_timer(req);
retval = zfcp_fsf_req_send(req);
-@@ -1562,7 +1509,7 @@ int zfcp_fsf_open_port(struct zfcp_erp_a
+@@ -1562,7 +1509,7 @@
erp_action->fsf_req = NULL;
}
out:
return retval;
}
-@@ -1571,7 +1518,7 @@ static void zfcp_fsf_close_port_handler(
+@@ -1571,7 +1518,7 @@
struct zfcp_port *port = req->data;
if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
switch (req->qtcb->header.fsf_status) {
case FSF_PORT_HANDLE_NOT_VALID:
-@@ -1586,9 +1533,6 @@ static void zfcp_fsf_close_port_handler(
+@@ -1586,9 +1533,6 @@
ZFCP_CLEAR);
break;
}
}
/**
-@@ -1598,12 +1542,12 @@ skip_fsfstatus:
+@@ -1598,12 +1542,12 @@
*/
int zfcp_fsf_close_port(struct zfcp_erp_action *erp_action)
{
if (zfcp_fsf_req_sbal_get(adapter))
goto out;
-@@ -1624,7 +1568,6 @@ int zfcp_fsf_close_port(struct zfcp_erp_
+@@ -1624,7 +1568,6 @@
req->erp_action = erp_action;
req->qtcb->header.port_handle = erp_action->port->handle;
erp_action->fsf_req = req;
zfcp_fsf_start_erp_timer(req);
retval = zfcp_fsf_req_send(req);
-@@ -1633,7 +1576,132 @@ int zfcp_fsf_close_port(struct zfcp_erp_
+@@ -1633,7 +1576,132 @@
erp_action->fsf_req = NULL;
}
out:
return retval;
}
-@@ -1695,12 +1763,12 @@ skip_fsfstatus:
+@@ -1695,12 +1763,12 @@
*/
int zfcp_fsf_close_physical_port(struct zfcp_erp_action *erp_action)
{
if (zfcp_fsf_req_sbal_get(adapter))
goto out;
-@@ -1731,7 +1799,7 @@ int zfcp_fsf_close_physical_port(struct
+@@ -1731,7 +1799,7 @@
erp_action->fsf_req = NULL;
}
out:
return retval;
}
-@@ -1746,7 +1814,7 @@ static void zfcp_fsf_open_unit_handler(s
+@@ -1746,7 +1814,7 @@
int exclusive, readwrite;
if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
atomic_clear_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED |
ZFCP_STATUS_COMMON_ACCESS_BOXED |
-@@ -1774,14 +1842,12 @@ static void zfcp_fsf_open_unit_handler(s
+@@ -1774,14 +1842,12 @@
case FSF_LUN_SHARING_VIOLATION:
if (header->fsf_status_qual.word[0])
dev_warn(&adapter->ccw_device->dev,
else
zfcp_act_eval_err(adapter,
header->fsf_status_qual.word[2]);
-@@ -1792,9 +1858,10 @@ static void zfcp_fsf_open_unit_handler(s
+@@ -1792,9 +1858,10 @@
break;
case FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED:
dev_warn(&adapter->ccw_device->dev,
zfcp_erp_unit_failed(unit, 34, req);
/* fall through */
case FSF_INVALID_COMMAND_OPTION:
-@@ -1831,26 +1898,29 @@ static void zfcp_fsf_open_unit_handler(s
+@@ -1831,26 +1898,29 @@
atomic_set_mask(ZFCP_STATUS_UNIT_READONLY,
&unit->status);
dev_info(&adapter->ccw_device->dev,
zfcp_erp_unit_failed(unit, 36, req);
req->status |= ZFCP_STATUS_FSFREQ_ERROR;
zfcp_erp_unit_shutdown(unit, 0, 81, req);
-@@ -1858,9 +1928,6 @@ static void zfcp_fsf_open_unit_handler(s
+@@ -1858,9 +1928,6 @@
}
break;
}
}
/**
-@@ -1870,12 +1937,12 @@ skip_fsfstatus:
+@@ -1870,12 +1937,12 @@
*/
int zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action)
{
if (zfcp_fsf_req_sbal_get(adapter))
goto out;
-@@ -1901,8 +1968,6 @@ int zfcp_fsf_open_unit(struct zfcp_erp_a
+@@ -1901,8 +1968,6 @@
if (!(adapter->connection_features & FSF_FEATURE_NPIV_MODE))
req->qtcb->bottom.support.option = FSF_OPEN_LUN_SUPPRESS_BOXING;
zfcp_fsf_start_erp_timer(req);
retval = zfcp_fsf_req_send(req);
if (retval) {
-@@ -1910,7 +1975,7 @@ int zfcp_fsf_open_unit(struct zfcp_erp_a
+@@ -1910,7 +1975,7 @@
erp_action->fsf_req = NULL;
}
out:
return retval;
}
-@@ -1919,7 +1984,7 @@ static void zfcp_fsf_close_unit_handler(
+@@ -1919,7 +1984,7 @@
struct zfcp_unit *unit = req->data;
if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
switch (req->qtcb->header.fsf_status) {
case FSF_PORT_HANDLE_NOT_VALID:
-@@ -1949,8 +2014,6 @@ static void zfcp_fsf_close_unit_handler(
+@@ -1949,8 +2014,6 @@
atomic_clear_mask(ZFCP_STATUS_COMMON_OPEN, &unit->status);
break;
}
}
/**
-@@ -1960,12 +2023,12 @@ skip_fsfstatus:
+@@ -1960,12 +2023,12 @@
*/
int zfcp_fsf_close_unit(struct zfcp_erp_action *erp_action)
{
if (zfcp_fsf_req_sbal_get(adapter))
goto out;
req = zfcp_fsf_req_create(adapter, FSF_QTCB_CLOSE_LUN,
-@@ -1986,7 +2049,6 @@ int zfcp_fsf_close_unit(struct zfcp_erp_
+@@ -1986,7 +2049,6 @@
req->data = erp_action->unit;
req->erp_action = erp_action;
erp_action->fsf_req = req;
zfcp_fsf_start_erp_timer(req);
retval = zfcp_fsf_req_send(req);
-@@ -1995,7 +2057,7 @@ int zfcp_fsf_close_unit(struct zfcp_erp_
+@@ -1995,7 +2057,7 @@
erp_action->fsf_req = NULL;
}
out:
return retval;
}
-@@ -2036,20 +2098,53 @@ static void zfcp_fsf_req_latency(struct
+@@ -2036,19 +2098,52 @@
spin_unlock_irqrestore(&unit->latencies.lock, flags);
}
unsigned long flags;
- if (unlikely(!scpnt))
-- return;
--
- read_lock_irqsave(&req->adapter->abort_lock, flags);
-
++ read_lock_irqsave(&req->adapter->abort_lock, flags);
++
+ scpnt = req->data;
+ if (unlikely(!scpnt)) {
+ read_unlock_irqrestore(&req->adapter->abort_lock, flags);
-+ return;
+ return;
+-
+- read_lock_irqsave(&req->adapter->abort_lock, flags);
+ }
-+
+
if (unlikely(req->status & ZFCP_STATUS_FSFREQ_ABORTED)) {
set_host_byte(scpnt, DID_SOFT_ERROR);
- set_driver_byte(scpnt, SUGGEST_RETRY);
-@@ -2068,6 +2163,8 @@ static void zfcp_fsf_send_fcp_command_ta
+@@ -2067,6 +2162,8 @@
+
if (req->adapter->adapter_features & FSF_FEATURE_MEASUREMENT_DATA)
zfcp_fsf_req_latency(req);
-
-+ zfcp_fsf_trace_latency(req);
+
++ zfcp_fsf_trace_latency(req);
+
if (unlikely(fcp_rsp_iu->validity.bits.fcp_rsp_len_valid)) {
if (fcp_rsp_info[3] == RSP_CODE_GOOD)
- set_host_byte(scpnt, DID_OK);
-@@ -2102,7 +2199,8 @@ skip_fsfstatus:
+@@ -2102,7 +2199,8 @@
zfcp_scsi_dbf_event_result("norm", 6, req->adapter, scpnt, req);
scpnt->host_scribble = NULL;
/*
* We must hold this lock until scsi_done has been called.
* Otherwise we may call scsi_done after abort regarding this
-@@ -2156,21 +2254,21 @@ static void zfcp_fsf_send_fcp_command_ha
+@@ -2156,21 +2254,21 @@
break;
case FSF_DIRECTION_INDICATOR_NOT_VALID:
dev_err(&req->adapter->ccw_device->dev,
zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 134, req);
req->status |= ZFCP_STATUS_FSFREQ_ERROR;
break;
-@@ -2201,6 +2299,20 @@ skip_fsfstatus:
+@@ -2201,6 +2299,20 @@
}
}
/**
* zfcp_fsf_send_fcp_command_task - initiate an FCP command (for a SCSI command)
* @adapter: adapter where scsi command is issued
-@@ -2223,8 +2335,8 @@ int zfcp_fsf_send_fcp_command_task(struc
+@@ -2223,8 +2335,8 @@
ZFCP_STATUS_COMMON_UNBLOCKED)))
return -EBUSY;
goto out;
req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags,
adapter->pool.fsf_req_scsi);
-@@ -2286,7 +2398,7 @@ int zfcp_fsf_send_fcp_command_task(struc
+@@ -2286,7 +2398,7 @@
memcpy(fcp_cmnd_iu->fcp_cdb, scsi_cmnd->cmnd, scsi_cmnd->cmd_len);
req->qtcb->bottom.io.fcp_cmnd_length = sizeof(struct fcp_cmnd_iu) +
real_bytes = zfcp_qdio_sbals_from_sg(req, sbtype,
scsi_sglist(scsi_cmnd),
-@@ -2296,10 +2408,10 @@ int zfcp_fsf_send_fcp_command_task(struc
+@@ -2296,10 +2408,10 @@
retval = -EIO;
else {
dev_err(&adapter->ccw_device->dev,
zfcp_erp_unit_shutdown(unit, 0, 131, req);
retval = -EINVAL;
}
-@@ -2322,7 +2434,7 @@ failed_scsi_cmnd:
+@@ -2322,7 +2434,7 @@
zfcp_fsf_req_free(req);
scsi_cmnd->host_scribble = NULL;
out:
return retval;
}
-@@ -2338,7 +2450,7 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_c
+@@ -2338,7 +2450,7 @@
struct zfcp_unit *unit,
u8 tm_flags, int req_flags)
{
struct zfcp_fsf_req *req = NULL;
struct fcp_cmnd_iu *fcp_cmnd_iu;
-@@ -2346,13 +2458,15 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_c
+@@ -2346,13 +2458,15 @@
ZFCP_STATUS_COMMON_UNBLOCKED)))
return NULL;
req->status |= ZFCP_STATUS_FSFREQ_TASK_MANAGEMENT;
req->data = unit;
-@@ -2362,7 +2476,7 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_c
+@@ -2362,7 +2476,7 @@
req->qtcb->bottom.io.data_direction = FSF_DATADIR_CMND;
req->qtcb->bottom.io.service_class = FSF_CLASS_3;
req->qtcb->bottom.io.fcp_cmnd_length = sizeof(struct fcp_cmnd_iu) +
sbale = zfcp_qdio_sbale_req(req);
sbale[0].flags |= SBAL_FLAGS0_TYPE_WRITE;
-@@ -2379,7 +2493,7 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_c
+@@ -2379,7 +2493,7 @@
zfcp_fsf_req_free(req);
req = NULL;
out:
return req;
}
-@@ -2398,7 +2512,7 @@ static void zfcp_fsf_control_file_handle
+@@ -2398,7 +2512,7 @@
struct zfcp_fsf_req *zfcp_fsf_control_file(struct zfcp_adapter *adapter,
struct zfcp_fsf_cfdc *fsf_cfdc)
{
struct zfcp_fsf_req *req = NULL;
struct fsf_qtcb_bottom_support *bottom;
int direction, retval = -EIO, bytes;
-@@ -2417,7 +2531,7 @@ struct zfcp_fsf_req *zfcp_fsf_control_fi
+@@ -2417,7 +2531,7 @@
return ERR_PTR(-EINVAL);
}
if (zfcp_fsf_req_sbal_get(adapter))
goto out;
-@@ -2447,7 +2561,7 @@ struct zfcp_fsf_req *zfcp_fsf_control_fi
+@@ -2447,7 +2561,7 @@
zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
retval = zfcp_fsf_req_send(req);
out:
if (!retval) {
wait_event(req->completion_wq,
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.h linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_fsf.h
---- linux-2.6.27/drivers/s390/scsi/zfcp_fsf.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_fsf.h 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_fsf.h
+--- a/drivers/s390/scsi/zfcp_fsf.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_fsf.h Wed May 06 16:56:32 2009 +0100
@@ -71,13 +71,6 @@
#define FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED 0x00000041
#define FSF_ELS_COMMAND_REJECTED 0x00000050
#define FSF_UNKNOWN_COMMAND 0x000000E2
#define FSF_UNKNOWN_OP_SUBTYPE 0x000000E3
#define FSF_INVALID_COMMAND_OPTION 0x000000E5
-@@ -102,20 +93,9 @@
+@@ -102,19 +93,8 @@
#define FSF_SQ_RETRY_IF_POSSIBLE 0x02
#define FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED 0x03
#define FSF_SQ_INVOKE_LINK_TEST_PROCEDURE 0x04
-#define FSF_SQ_ULP_PROGRAMMING_ERROR 0x05
#define FSF_SQ_COMMAND_ABORTED 0x06
#define FSF_SQ_NO_RETRY_POSSIBLE 0x07
-
+-
-/* FSF status qualifier for CFDC commands */
-#define FSF_SQ_CFDC_HARDENED_ON_SE 0x00000000
-#define FSF_SQ_CFDC_COULD_NOT_HARDEN_ON_SE 0x00000001
-#define FSF_SQ_CFDC_SUBTABLE_PORT_WWPN 0x0002
-#define FSF_SQ_CFDC_SUBTABLE_PORT_DID 0x0003
-#define FSF_SQ_CFDC_SUBTABLE_LUN 0x0004
--
+
/* FSF status qualifier (most significant 4 bytes), local link down */
#define FSF_PSQ_LINK_NO_LIGHT 0x00000004
- #define FSF_PSQ_LINK_WRAP_PLUG 0x00000008
@@ -145,7 +125,6 @@
#define FSF_STATUS_READ_LINK_UP 0x00000006
#define FSF_STATUS_READ_NOTIFICATION_LOST 0x00000009
#define FSF_UNIT_ACCESS_EXCLUSIVE 0x02000000
#define FSF_UNIT_ACCESS_OUTBOUND_TRANSFER 0x10000000
-@@ -265,11 +196,6 @@ struct fsf_queue_designator {
+@@ -263,11 +194,6 @@
+ u8 hla;
+ u8 ua;
u32 res1;
- } __attribute__ ((packed));
-
+-} __attribute__ ((packed));
+-
-struct fsf_port_closed_payload {
- struct fsf_queue_designator queue_designator;
- u32 port_handle;
--} __attribute__ ((packed));
--
+ } __attribute__ ((packed));
+
struct fsf_bit_error_payload {
- u32 res1;
- u32 link_failure_error_count;
-@@ -397,6 +323,7 @@ struct fsf_nport_serv_param {
+@@ -397,6 +323,7 @@
u8 vendor_version_level[16];
} __attribute__ ((packed));
struct fsf_plogi {
u32 code;
struct fsf_nport_serv_param serv_param;
-@@ -514,4 +441,16 @@ struct fsf_qtcb {
+@@ -514,4 +441,16 @@
u8 log[FSF_QTCB_LOG_SIZE];
} __attribute__ ((packed));
+} __attribute__ ((packed));
+
#endif /* FSF_H */
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_qdio.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_qdio.c 2009-03-25 16:11:24.000000000 +0000
-@@ -6,6 +6,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_qdio.c
+--- a/drivers/s390/scsi/zfcp_qdio.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_qdio.c Wed May 06 16:56:32 2009 +0100
+@@ -5,6 +5,8 @@
+ *
* Copyright IBM Corporation 2002, 2008
*/
-
-+#define KMSG_COMPONENT "zfcp"
+
++#define KMSG_COMPONENT "zfcp"
+
#include "zfcp_ext.h"
- /* FIXME(tune): free space should be one max. SBAL chain plus what? */
-@@ -28,7 +30,7 @@ static int zfcp_qdio_buffers_enqueue(str
+@@ -28,7 +30,7 @@
return 0;
}
zfcp_qdio_sbale(struct zfcp_qdio_queue *q, int sbal_idx, int sbale_idx)
{
return &q->sbal[sbal_idx]->element[sbale_idx];
-@@ -57,7 +59,7 @@ void zfcp_qdio_free(struct zfcp_adapter
+@@ -57,7 +59,7 @@
static void zfcp_qdio_handler_error(struct zfcp_adapter *adapter, u8 id)
{
zfcp_erp_adapter_reopen(adapter,
ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED |
-@@ -74,6 +76,23 @@ static void zfcp_qdio_zero_sbals(struct
+@@ -72,6 +74,23 @@
+ sbal_idx = i % QDIO_MAX_BUFFERS_PER_Q;
+ memset(sbal[sbal_idx], 0, sizeof(struct qdio_buffer));
}
- }
-
++}
++
+/* this needs to be called prior to updating the queue fill level */
+static void zfcp_qdio_account(struct zfcp_adapter *adapter)
+{
+ adapter->req_q_util += used * span;
+ adapter->req_q_time = now;
+ spin_unlock(&adapter->qdio_stat_lock);
-+}
-+
+ }
+
static void zfcp_qdio_int_req(struct ccw_device *cdev, unsigned int qdio_err,
- int queue_no, int first, int count,
- unsigned long parm)
-@@ -90,6 +109,7 @@ static void zfcp_qdio_int_req(struct ccw
+@@ -90,6 +109,7 @@
/* cleanup all SBALs being program-owned now */
zfcp_qdio_zero_sbals(queue->sbal, first, count);
atomic_add(count, &queue->count);
wake_up(&adapter->request_wq);
}
-@@ -115,6 +135,7 @@ static void zfcp_qdio_reqid_check(struct
+@@ -115,6 +135,7 @@
spin_unlock_irqrestore(&adapter->req_list_lock, flags);
fsf_req->sbal_response = sbal_idx;
zfcp_fsf_req_complete(fsf_req);
}
-@@ -145,7 +166,7 @@ static void zfcp_qdio_int_resp(struct cc
+@@ -145,7 +166,7 @@
{
struct zfcp_adapter *adapter = (struct zfcp_adapter *) parm;
struct zfcp_qdio_queue *queue = &adapter->resp_q;
int sbal_idx, sbale_idx, sbal_no;
if (unlikely(qdio_err)) {
-@@ -174,8 +195,8 @@ static void zfcp_qdio_int_resp(struct cc
+@@ -174,8 +195,8 @@
if (unlikely(!(sbale->flags & SBAL_FLAGS_LAST_ENTRY)))
dev_warn(&adapter->ccw_device->dev,
}
/*
-@@ -190,8 +211,7 @@ static void zfcp_qdio_int_resp(struct cc
+@@ -190,8 +211,7 @@
* @fsf_req: pointer to struct fsf_req
* Returns: pointer to qdio_buffer_element (SBALE) structure
*/
{
return zfcp_qdio_sbale(&req->adapter->req_q, req->sbal_last, 0);
}
-@@ -201,8 +221,7 @@ zfcp_qdio_sbale_req(struct zfcp_fsf_req
+@@ -201,8 +221,7 @@
* @fsf_req: pointer to struct fsf_req
* Returns: pointer to qdio_buffer_element (SBALE) structure
*/
{
return zfcp_qdio_sbale(&req->adapter->req_q, req->sbal_last,
req->sbale_curr);
-@@ -216,10 +235,10 @@ static void zfcp_qdio_sbal_limit(struct
+@@ -216,10 +235,10 @@
% QDIO_MAX_BUFFERS_PER_Q;
}
/* set last entry flag in current SBALE of current SBAL */
sbale = zfcp_qdio_sbale_curr(fsf_req);
-@@ -250,7 +269,7 @@ zfcp_qdio_sbal_chain(struct zfcp_fsf_req
+@@ -250,7 +269,7 @@
return sbale;
}
zfcp_qdio_sbale_next(struct zfcp_fsf_req *fsf_req, unsigned long sbtype)
{
if (fsf_req->sbale_curr == ZFCP_LAST_SBALE_PER_SBAL)
-@@ -273,7 +292,7 @@ static int zfcp_qdio_fill_sbals(struct z
+@@ -273,7 +292,7 @@
unsigned int sbtype, void *start_addr,
unsigned int total_length)
{
unsigned long remaining, length;
void *addr;
-@@ -282,6 +301,7 @@ static int zfcp_qdio_fill_sbals(struct z
+@@ -282,6 +301,7 @@
addr += length, remaining -= length) {
sbale = zfcp_qdio_sbale_next(fsf_req, sbtype);
if (!sbale) {
zfcp_qdio_undo_sbals(fsf_req);
return -EINVAL;
}
-@@ -307,7 +327,7 @@ static int zfcp_qdio_fill_sbals(struct z
+@@ -307,7 +327,7 @@
int zfcp_qdio_sbals_from_sg(struct zfcp_fsf_req *fsf_req, unsigned long sbtype,
struct scatterlist *sg, int max_sbals)
{
int retval, bytes = 0;
/* figure out last allowed SBAL */
-@@ -344,10 +364,10 @@ int zfcp_qdio_send(struct zfcp_fsf_req *
+@@ -344,10 +364,10 @@
int first = fsf_req->sbal_first;
int count = fsf_req->sbal_number;
int retval, pci, pci_batch;
if (unlikely(pci_batch >= ZFCP_QDIO_PCI_INTERVAL)) {
pci_batch %= ZFCP_QDIO_PCI_INTERVAL;
pci = first + count - (pci_batch + 1);
-@@ -356,6 +376,8 @@ int zfcp_qdio_send(struct zfcp_fsf_req *
+@@ -355,6 +375,8 @@
+ sbale = zfcp_qdio_sbale(req_q, pci, 0);
sbale->flags |= SBAL_FLAGS0_PCI;
}
-
-+ zfcp_qdio_account(adapter);
+
++ zfcp_qdio_account(adapter);
+
retval = do_QDIO(adapter->ccw_device, QDIO_FLAG_SYNC_OUTPUT, 0, first,
count);
- if (unlikely(retval)) {
-@@ -367,7 +389,7 @@ int zfcp_qdio_send(struct zfcp_fsf_req *
+@@ -367,7 +389,7 @@
atomic_sub(count, &req_q->count);
req_q->first += count;
req_q->first %= QDIO_MAX_BUFFERS_PER_Q;
return 0;
}
-@@ -418,14 +440,14 @@ void zfcp_qdio_close(struct zfcp_adapter
+@@ -418,14 +440,14 @@
struct zfcp_qdio_queue *req_q;
int first, count;
qdio_shutdown(adapter->ccw_device, QDIO_FLAG_CLEANUP_USING_CLEAR);
-@@ -438,7 +460,7 @@ void zfcp_qdio_close(struct zfcp_adapter
+@@ -438,7 +460,7 @@
}
req_q->first = 0;
atomic_set(&req_q->count, 0);
adapter->resp_q.first = 0;
atomic_set(&adapter->resp_q.count, 0);
}
-@@ -450,23 +472,17 @@ void zfcp_qdio_close(struct zfcp_adapter
+@@ -450,23 +472,17 @@
*/
int zfcp_qdio_open(struct zfcp_adapter *adapter)
{
for (cc = 0; cc < QDIO_MAX_BUFFERS_PER_Q; cc++) {
sbale = &(adapter->resp_q.sbal[cc]->element[0]);
-@@ -476,20 +492,20 @@ int zfcp_qdio_open(struct zfcp_adapter *
+@@ -476,20 +492,20 @@
}
if (do_QDIO(adapter->ccw_device, QDIO_FLAG_SYNC_INPUT, 0, 0,
+ "Setting up the QDIO connection to the FCP adapter failed\n");
return -EIO;
}
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_scsi.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_scsi.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_scsi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_scsi.c 2009-03-25 16:11:24.000000000 +0000
-@@ -6,6 +6,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_scsi.c
+--- a/drivers/s390/scsi/zfcp_scsi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_scsi.c Wed May 06 16:56:32 2009 +0100
+@@ -5,6 +5,8 @@
+ *
* Copyright IBM Corporation 2002, 2008
*/
-
-+#define KMSG_COMPONENT "zfcp"
+
++#define KMSG_COMPONENT "zfcp"
+
#include "zfcp_ext.h"
#include <asm/atomic.h>
-
-@@ -21,31 +23,13 @@ char *zfcp_get_fcp_sns_info_ptr(struct f
+@@ -21,31 +23,13 @@
return fcp_sns_info_ptr;
}
}
static int zfcp_scsi_slave_configure(struct scsi_device *sdp)
-@@ -106,7 +90,7 @@ static int zfcp_scsi_queuecommand(struct
+@@ -106,7 +90,7 @@
ret = zfcp_fsf_send_fcp_command_task(adapter, unit, scpnt, 0,
ZFCP_REQ_AUTO_CLEANUP);
if (unlikely(ret == -EBUSY))
else if (unlikely(ret < 0))
return SCSI_MLQUEUE_HOST_BUSY;
-@@ -119,13 +103,17 @@ static struct zfcp_unit *zfcp_unit_looku
+@@ -119,13 +103,17 @@
{
struct zfcp_port *port;
struct zfcp_unit *unit;
}
return NULL;
-@@ -183,7 +171,6 @@ static int zfcp_scsi_eh_abort_handler(st
+@@ -183,7 +171,6 @@
return retval;
}
fsf_req->data = NULL;
/* don't access old fsf_req after releasing the abort_lock */
write_unlock_irqrestore(&adapter->abort_lock, flags);
-@@ -294,7 +281,8 @@ int zfcp_adapter_scsi_register(struct zf
+@@ -294,7 +281,8 @@
sizeof (struct zfcp_adapter *));
if (!adapter->scsi_host) {
dev_err(&adapter->ccw_device->dev,
return -EIO;
}
-@@ -312,7 +300,6 @@ int zfcp_adapter_scsi_register(struct zf
+@@ -312,7 +300,6 @@
scsi_host_put(adapter->scsi_host);
return -EIO;
}
return 0;
}
-@@ -336,7 +323,6 @@ void zfcp_adapter_scsi_unregister(struct
+@@ -336,7 +323,6 @@
scsi_remove_host(shost);
scsi_host_put(shost);
adapter->scsi_host = NULL;
return;
}
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_sysfs.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_sysfs.c 2009-03-25 16:11:24.000000000 +0000
-@@ -6,6 +6,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_sysfs.c
+--- a/drivers/s390/scsi/zfcp_sysfs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_sysfs.c Wed May 06 16:56:32 2009 +0100
+@@ -5,6 +5,8 @@
+ *
* Copyright IBM Corporation 2008
*/
-
-+#define KMSG_COMPONENT "zfcp"
+
++#define KMSG_COMPONENT "zfcp"
+
#include "zfcp_ext.h"
- #define ZFCP_DEV_ATTR(_feat, _name, _mode, _show, _store) \
-@@ -26,9 +28,9 @@ static ZFCP_DEV_ATTR(_feat, _name, S_IRU
+@@ -26,9 +28,9 @@
ZFCP_DEFINE_ATTR(zfcp_adapter, adapter, status, "0x%08x\n",
atomic_read(&adapter->status));
ZFCP_DEFINE_ATTR(zfcp_adapter, adapter, peer_wwnn, "0x%016llx\n",
ZFCP_DEFINE_ATTR(zfcp_adapter, adapter, peer_d_id, "0x%06x\n",
adapter->peer_d_id);
ZFCP_DEFINE_ATTR(zfcp_adapter, adapter, card_version, "0x%04x\n",
-@@ -135,8 +137,9 @@ static ssize_t zfcp_sysfs_port_remove_st
+@@ -135,8 +137,9 @@
{
struct zfcp_adapter *adapter = dev_get_drvdata(dev);
struct zfcp_port *port;
down(&zfcp_data.config_sema);
if (atomic_read(&adapter->status) & ZFCP_STATUS_COMMON_REMOVE) {
-@@ -144,7 +147,7 @@ static ssize_t zfcp_sysfs_port_remove_st
+@@ -144,7 +147,7 @@
goto out;
}
retval = -EINVAL;
goto out;
}
-@@ -154,7 +157,7 @@ static ssize_t zfcp_sysfs_port_remove_st
+@@ -154,7 +157,7 @@
if (port && (atomic_read(&port->refcount) == 0)) {
zfcp_port_get(port);
atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &port->status);
} else
port = NULL;
write_unlock_irq(&zfcp_data.config_lock);
-@@ -200,7 +203,7 @@ static ssize_t zfcp_sysfs_unit_add_store
+@@ -200,7 +203,7 @@
{
struct zfcp_port *port = dev_get_drvdata(dev);
struct zfcp_unit *unit;
int retval = -EINVAL;
down(&zfcp_data.config_sema);
-@@ -209,7 +212,7 @@ static ssize_t zfcp_sysfs_unit_add_store
+@@ -209,7 +212,7 @@
goto out;
}
goto out;
unit = zfcp_unit_enqueue(port, fcp_lun);
-@@ -233,8 +236,9 @@ static ssize_t zfcp_sysfs_unit_remove_st
+@@ -233,8 +236,9 @@
{
struct zfcp_port *port = dev_get_drvdata(dev);
struct zfcp_unit *unit;
down(&zfcp_data.config_sema);
if (atomic_read(&port->status) & ZFCP_STATUS_COMMON_REMOVE) {
-@@ -242,7 +246,7 @@ static ssize_t zfcp_sysfs_unit_remove_st
+@@ -242,7 +246,7 @@
goto out;
}
retval = -EINVAL;
goto out;
}
-@@ -252,7 +256,7 @@ static ssize_t zfcp_sysfs_unit_remove_st
+@@ -252,7 +256,7 @@
if (unit && (atomic_read(&unit->refcount) == 0)) {
zfcp_unit_get(unit);
atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &unit->status);
} else
unit = NULL;
-@@ -273,22 +277,7 @@ out:
+@@ -273,22 +277,7 @@
}
static DEVICE_ATTR(unit_remove, S_IWUSR, NULL, zfcp_sysfs_unit_remove_store);
&dev_attr_unit_add.attr,
&dev_attr_unit_remove.attr,
&dev_attr_port_failed.attr,
-@@ -302,7 +291,7 @@ static struct attribute *zfcp_port_no_ns
+@@ -302,7 +291,7 @@
* zfcp_sysfs_port_attrs - sysfs attributes for all other ports
*/
struct attribute_group zfcp_sysfs_port_attrs = {
};
static struct attribute *zfcp_unit_attrs[] = {
-@@ -395,8 +384,10 @@ static DEVICE_ATTR(_name, S_IRUGO, zfcp_
+@@ -395,8 +384,10 @@
ZFCP_DEFINE_SCSI_ATTR(hba_id, "%s\n",
unit->port->adapter->ccw_device->dev.bus_id);
struct device_attribute *zfcp_sysfs_sdev_attrs[] = {
&dev_attr_fcp_lun,
-@@ -487,10 +478,24 @@ ZFCP_SHOST_ATTR(megabytes, "%llu %llu\n"
+@@ -487,10 +478,24 @@
ZFCP_SHOST_ATTR(seconds_active, "%llu\n",
(unsigned long long) stat_info.seconds_act);
+ &dev_attr_queue_full,
NULL
};
-diff -purN linux-2.6.27/drivers/scsi/Kconfig linux-2.6.27.19-5.1/drivers/scsi/Kconfig
---- linux-2.6.27/drivers/scsi/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/Kconfig 2009-03-25 16:11:15.000000000 +0000
-@@ -352,6 +352,8 @@ config ISCSI_TCP
+diff -r 9608d5473017 drivers/scsi/Kconfig
+--- a/drivers/scsi/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/Kconfig Wed May 06 16:56:32 2009 +0100
+@@ -352,6 +352,8 @@
http://open-iscsi.org
config SGIWD93_SCSI
tristate "SGI WD93C93 SCSI Driver"
depends on SGI_HAS_WD93 && SCSI
-@@ -603,6 +605,20 @@ config SCSI_FLASHPOINT
+@@ -602,6 +604,20 @@
+ BusLogic SCSI driver. The FlashPoint SCCB Manager code is
substantial, so users of MultiMaster Host Adapters may not
wish to include it.
-
++
+config LIBFC
+ tristate "LibFC module"
+ depends on SCSI && SCSI_FC_ATTRS
+ ---help---
+ Fibre Channel over Ethernet module
+
-+
+
config SCSI_DMX3191D
tristate "DMX3191D SCSI support"
- depends on PCI && SCSI
-diff -purN linux-2.6.27/drivers/scsi/Makefile linux-2.6.27.19-5.1/drivers/scsi/Makefile
---- linux-2.6.27/drivers/scsi/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/Makefile 2009-03-25 16:11:17.000000000 +0000
-@@ -36,8 +36,11 @@ obj-$(CONFIG_SCSI_SAS_LIBSAS) += libsas/
+diff -r 9608d5473017 drivers/scsi/Makefile
+--- a/drivers/scsi/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/Makefile Wed May 06 16:56:32 2009 +0100
+@@ -36,8 +36,11 @@
obj-$(CONFIG_SCSI_SRP_ATTRS) += scsi_transport_srp.o
obj-$(CONFIG_SCSI_DH) += device_handler/
obj-$(CONFIG_SCSI_A4000T) += 53c700.o a4000t.o
obj-$(CONFIG_SCSI_ZORRO7XX) += 53c700.o zorro7xx.o
obj-$(CONFIG_A3000_SCSI) += a3000.o wd33c93.o
-diff -purN linux-2.6.27/drivers/scsi/aacraid/aachba.c linux-2.6.27.19-5.1/drivers/scsi/aacraid/aachba.c
---- linux-2.6.27/drivers/scsi/aacraid/aachba.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/aacraid/aachba.c 2009-03-25 16:11:15.000000000 +0000
-@@ -1139,7 +1139,7 @@ static struct aac_srb * aac_scsi_common(
+diff -r 9608d5473017 drivers/scsi/aacraid/aachba.c
+--- a/drivers/scsi/aacraid/aachba.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/aacraid/aachba.c Wed May 06 16:56:32 2009 +0100
+@@ -1139,7 +1139,7 @@
srbcmd->id = cpu_to_le32(scmd_id(cmd));
srbcmd->lun = cpu_to_le32(cmd->device->lun);
srbcmd->flags = cpu_to_le32(flag);
if (timeout == 0)
timeout = 1;
srbcmd->timeout = cpu_to_le32(timeout); // timeout in seconds
-diff -purN linux-2.6.27/drivers/scsi/aacraid/linit.c linux-2.6.27.19-5.1/drivers/scsi/aacraid/linit.c
---- linux-2.6.27/drivers/scsi/aacraid/linit.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/aacraid/linit.c 2009-03-25 16:11:15.000000000 +0000
-@@ -175,8 +175,8 @@ static struct aac_driver_ident aac_drive
+diff -r 9608d5473017 drivers/scsi/aacraid/linit.c
+--- a/drivers/scsi/aacraid/linit.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/aacraid/linit.c Wed May 06 16:56:33 2009 +0100
+@@ -175,8 +175,8 @@
{ aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* PERC 3/Di (Boxster/PERC3DiB) */
{ aac_rx_init, "aacraid", "ADAPTEC ", "catapult ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* catapult */
{ aac_rx_init, "aacraid", "ADAPTEC ", "tomcat ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* tomcat */
{ aac_rx_init, "aacraid", "ADAPTEC ", "Adaptec 2200S ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Adaptec 2200S (Vulcan-2m) */
{ aac_rx_init, "aacraid", "Legend ", "Legend S220 ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Legend S220 (Legend Crusader) */
{ aac_rx_init, "aacraid", "Legend ", "Legend S230 ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Legend S230 (Legend Vulcan) */
-@@ -427,8 +427,8 @@ static int aac_slave_configure(struct sc
+@@ -427,8 +427,8 @@
* Firmware has an individual device recovery time typically
* of 35 seconds, give us a margin.
*/
for (cid = 0; cid < aac->maximum_num_containers; ++cid)
if (aac->fsa_dev[cid].valid)
++num_lsu;
-diff -purN linux-2.6.27/drivers/scsi/constants.c linux-2.6.27.19-5.1/drivers/scsi/constants.c
---- linux-2.6.27/drivers/scsi/constants.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/constants.c 2009-03-25 16:11:15.000000000 +0000
-@@ -1364,7 +1364,8 @@ EXPORT_SYMBOL(scsi_print_sense);
+diff -r 9608d5473017 drivers/scsi/constants.c
+--- a/drivers/scsi/constants.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/constants.c Wed May 06 16:56:33 2009 +0100
+@@ -1364,7 +1364,8 @@
static const char * const hostbyte_table[]={
"DID_OK", "DID_NO_CONNECT", "DID_BUS_BUSY", "DID_TIME_OUT", "DID_BAD_TARGET",
"DID_ABORT", "DID_PARITY", "DID_ERROR", "DID_RESET", "DID_BAD_INTR",
#define NUM_HOSTBYTE_STRS ARRAY_SIZE(hostbyte_table)
static const char * const driverbyte_table[]={
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/Kconfig linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/Kconfig 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/Kconfig Wed May 06 16:56:33 2009 +0100
@@ -0,0 +1,7 @@
+config SCSI_CXGB3_ISCSI
+ tristate "Chelsio S3xx iSCSI support"
+ select ISCSI_TCP
+ ---help---
+ This driver supports iSCSI offload for the Chelsio S3 series devices.
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/Makefile linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/Makefile 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/Makefile Wed May 06 16:56:33 2009 +0100
@@ -0,0 +1,5 @@
+EXTRA_CFLAGS += -I$(TOPDIR)/drivers/net/cxgb3
+
+cxgb3i-y := cxgb3i_init.o cxgb3i_iscsi.o cxgb3i_ulp2.o cxgb3i_offload.o
+
+obj-$(CONFIG_SCSI_CXGB3_ISCSI) += cxgb3i.o
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i.h linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i.h 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/cxgb3i.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/cxgb3i.h Wed May 06 16:56:33 2009 +0100
@@ -0,0 +1,335 @@
+/*
+ * cxgb3i.h: Chelsio S3xx iSCSI driver.
+ unsigned int, int);
+int cxgb3i_conn_ulp2_xmit(struct iscsi_conn *);
+#endif
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_init.c linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_init.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_init.c 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/cxgb3i_init.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/cxgb3i_init.c Wed May 06 16:56:33 2009 +0100
@@ -0,0 +1,107 @@
+/* cxgb3i_init.c: Chelsio S3xx iSCSI driver.
+ *
+
+module_init(cxgb3i_init_module);
+module_exit(cxgb3i_exit_module);
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_iscsi.c linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_iscsi.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_iscsi.c 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/cxgb3i_iscsi.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/cxgb3i_iscsi.c Wed May 06 16:56:33 2009 +0100
@@ -0,0 +1,904 @@
+/* cxgb3i_iscsi.c: Chelsio S3xx iSCSI driver.
+ *
+ iscsi_unregister_transport(&cxgb3i_iscsi_transport);
+ }
+}
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_offload.c linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_offload.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_offload.c 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/cxgb3i_offload.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/cxgb3i_offload.c Wed May 06 16:56:33 2009 +0100
@@ -0,0 +1,1870 @@
+/*
+ * cxgb3i_offload.c: Chelsio S3xx iscsi offloaded tcp connection management
+
+ sdev_data_cleanup(cdata);
+}
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_offload.h linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_offload.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_offload.h 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/cxgb3i_offload.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/cxgb3i_offload.h Wed May 06 16:56:33 2009 +0100
@@ -0,0 +1,231 @@
+/*
+ * cxgb3i_offload.h: Chelsio S3xx iscsi offloaded tcp connection management
+/* max. connections per adapter */
+#define CXGB3I_MAX_CONN 16384
+#endif /* _CXGB3_OFFLOAD_H */
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_ulp2.c linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_ulp2.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_ulp2.c 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/cxgb3i_ulp2.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/cxgb3i_ulp2.c Wed May 06 16:56:33 2009 +0100
@@ -0,0 +1,991 @@
+/*
+ * cxgb3i_ulp2.c: Chelsio S3xx iSCSI driver.
+ cxgb3i_free_big_mem(ddp);
+ }
+}
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_ulp2.h linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_ulp2.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_ulp2.h 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/cxgb3i_ulp2.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/cxgb3i_ulp2.h Wed May 06 16:56:33 2009 +0100
@@ -0,0 +1,128 @@
+/*
+ * cxgb3i_ulp2.h: Chelsio S3xx iSCSI driver.
+ kfree(addr);
+}
+#endif
-diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh.c linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh.c
---- linux-2.6.27/drivers/scsi/device_handler/scsi_dh.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh.c 2009-03-25 16:11:14.000000000 +0000
-@@ -28,6 +28,7 @@ struct scsi_dh_devinfo_list {
+diff -r 9608d5473017 drivers/scsi/device_handler/scsi_dh.c
+--- a/drivers/scsi/device_handler/scsi_dh.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/device_handler/scsi_dh.c Wed May 06 16:56:33 2009 +0100
+@@ -28,6 +28,7 @@
struct list_head node;
char vendor[9];
char model[17];
struct scsi_device_handler *handler;
};
-@@ -60,7 +61,8 @@ scsi_dh_cache_lookup(struct scsi_device
+@@ -60,7 +61,8 @@
spin_lock(&list_lock);
list_for_each_entry(tmp, &scsi_dh_dev_list, node) {
if (!strncmp(sdev->vendor, tmp->vendor, strlen(tmp->vendor)) &&
found_dh = tmp->handler;
break;
}
-@@ -79,7 +81,9 @@ static int scsi_dh_handler_lookup(struct
+@@ -79,7 +81,9 @@
if (!strncmp(sdev->vendor, scsi_dh->devlist[i].vendor,
strlen(scsi_dh->devlist[i].vendor)) &&
!strncmp(sdev->model, scsi_dh->devlist[i].model,
found = 1;
break;
}
-@@ -128,6 +132,7 @@ device_handler_match(struct scsi_device_
+@@ -128,6 +132,7 @@
strncpy(tmp->model, sdev->model, 16);
tmp->vendor[8] = '\0';
tmp->model[16] = '\0';
tmp->handler = found_dh;
spin_lock(&list_lock);
list_add(&tmp->node, &scsi_dh_dev_list);
-@@ -493,7 +498,6 @@ void scsi_dh_detach(struct request_queue
+@@ -493,7 +498,6 @@
{
unsigned long flags;
struct scsi_device *sdev;
spin_lock_irqsave(q->queue_lock, flags);
sdev = q->queuedata;
-@@ -504,12 +508,9 @@ void scsi_dh_detach(struct request_queue
+@@ -504,12 +508,9 @@
if (!sdev)
return;
put_device(&sdev->sdev_gendev);
}
EXPORT_SYMBOL_GPL(scsi_dh_detach);
-diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_alua.c linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_alua.c
---- linux-2.6.27/drivers/scsi/device_handler/scsi_dh_alua.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_alua.c 2009-03-25 16:11:14.000000000 +0000
-@@ -109,7 +109,8 @@ static struct request *get_alua_req(stru
+diff -r 9608d5473017 drivers/scsi/device_handler/scsi_dh_alua.c
+--- a/drivers/scsi/device_handler/scsi_dh_alua.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/device_handler/scsi_dh_alua.c Wed May 06 16:56:33 2009 +0100
+@@ -109,48 +109,12 @@
}
rq->cmd_type = REQ_TYPE_BLOCK_PC;
rq->retries = ALUA_FAILOVER_RETRIES;
rq->timeout = ALUA_FAILOVER_TIMEOUT;
-@@ -117,43 +118,6 @@ static struct request *get_alua_req(stru
- }
-
- /*
+ return rq;
+-}
+-
+-/*
- * submit_std_inquiry - Issue a standard INQUIRY command
- * @sdev: sdev the command should be send to
- */
- blk_put_request(rq);
-done:
- return err;
--}
--
--/*
- * submit_vpd_inquiry - Issue an INQUIRY VPD page 0x83 command
- * @sdev: sdev the command should be sent to
- */
-@@ -246,8 +210,8 @@ static unsigned submit_stpg(struct scsi_
+ }
+
+ /*
+@@ -246,8 +210,8 @@
/* Prepare the data buffer */
memset(h->buff, 0, stpg_len);
h->buff[4] = TPGS_STATE_OPTIMIZED & 0x0f;
rq = get_alua_req(sdev, h->buff, stpg_len, WRITE);
if (!rq)
-@@ -280,23 +244,19 @@ done:
+@@ -280,23 +244,19 @@
}
/*
switch (h->tpgs) {
case TPGS_MODE_EXPLICIT|TPGS_MODE_IMPLICIT:
sdev_printk(KERN_INFO, sdev,
-@@ -443,24 +403,16 @@ static int alua_check_sense(struct scsi_
+@@ -443,24 +403,16 @@
return SUCCESS;
break;
case UNIT_ATTENTION:
- if (sense_hdr->asc == 0x29 && sense_hdr->ascq == 0x00)
-- /*
++ if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x02)
+ /*
- * Power On, Reset, or Bus Device Reset, just retry.
-- */
++ * LUN not ready, initialization command required
+ */
- return ADD_TO_MLQUEUE;
- if (sense_hdr->asc == 0x2a && sense_hdr->ascq == 0x06) {
- /*
- return ADD_TO_MLQUEUE;
- }
- if (sense_hdr->asc == 0x2a && sense_hdr->ascq == 0x07) {
-+ if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x02)
- /*
+- /*
- * Implicit ALUA state transition failed
-+ * LUN not ready, initialization command required
- */
+- */
- return ADD_TO_MLQUEUE;
- }
- break;
}
return SCSI_RETURN_NOT_HANDLED;
-@@ -616,7 +568,7 @@ static int alua_initialize(struct scsi_d
+@@ -616,7 +568,7 @@
{
int err;
if (err != SCSI_DH_OK)
goto out;
-@@ -647,13 +599,11 @@ static int alua_activate(struct scsi_dev
+@@ -647,13 +599,11 @@
struct alua_dh_data *h = get_alua_data(sdev);
int err = SCSI_DH_OK;
err = alua_stpg(sdev, TPGS_STATE_OPTIMIZED, h);
out:
-@@ -681,16 +631,8 @@ static int alua_prep_fn(struct scsi_devi
+@@ -681,16 +631,8 @@
}
static const struct scsi_dh_devlist alua_dev_list[] = {
};
static int alua_bus_attach(struct scsi_device *sdev);
-diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_emc.c linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_emc.c
---- linux-2.6.27/drivers/scsi/device_handler/scsi_dh_emc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_emc.c 2009-03-25 16:11:14.000000000 +0000
-@@ -272,13 +272,12 @@ static struct request *get_req(struct sc
+diff -r 9608d5473017 drivers/scsi/device_handler/scsi_dh_emc.c
+--- a/drivers/scsi/device_handler/scsi_dh_emc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/device_handler/scsi_dh_emc.c Wed May 06 16:56:33 2009 +0100
+@@ -272,13 +272,12 @@
int len = 0;
rq = blk_get_request(sdev->request_queue,
rq->cmd_len = COMMAND_SIZE(cmd);
rq->cmd[0] = cmd;
-@@ -304,7 +303,8 @@ static struct request *get_req(struct sc
+@@ -304,7 +303,8 @@
rq->cmd[4] = len;
rq->cmd_type = REQ_TYPE_BLOCK_PC;
rq->timeout = CLARIION_TIMEOUT;
rq->retries = CLARIION_RETRIES;
-@@ -563,10 +563,10 @@ done:
+@@ -563,10 +563,10 @@
}
static const struct scsi_dh_devlist clariion_dev_list[] = {
};
static int clariion_bus_attach(struct scsi_device *sdev);
-diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_hp_sw.c linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_hp_sw.c
---- linux-2.6.27/drivers/scsi/device_handler/scsi_dh_hp_sw.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_hp_sw.c 2009-03-25 16:11:14.000000000 +0000
-@@ -112,9 +112,9 @@ static int hp_sw_tur(struct scsi_device
+diff -r 9608d5473017 drivers/scsi/device_handler/scsi_dh_hp_sw.c
+--- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c Wed May 06 16:56:33 2009 +0100
+@@ -112,9 +112,9 @@
return SCSI_DH_RES_TEMP_UNAVAIL;
req->cmd_type = REQ_TYPE_BLOCK_PC;
req->cmd[0] = TEST_UNIT_READY;
req->timeout = HP_SW_TIMEOUT;
req->sense = h->sense;
-@@ -205,9 +205,9 @@ static int hp_sw_start_stop(struct scsi_
+@@ -205,9 +205,9 @@
return SCSI_DH_RES_TEMP_UNAVAIL;
req->cmd_type = REQ_TYPE_BLOCK_PC;
req->cmd[0] = START_STOP;
req->cmd[4] = 1; /* Start spin cycle */
req->timeout = HP_SW_TIMEOUT;
-@@ -283,11 +283,11 @@ static int hp_sw_activate(struct scsi_de
+@@ -283,11 +283,11 @@
}
static const struct scsi_dh_devlist hp_sw_dh_data_list[] = {
};
static int hp_sw_bus_attach(struct scsi_device *sdev);
-diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_rdac.c linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_rdac.c
---- linux-2.6.27/drivers/scsi/device_handler/scsi_dh_rdac.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_rdac.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/device_handler/scsi_dh_rdac.c
+--- a/drivers/scsi/device_handler/scsi_dh_rdac.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/device_handler/scsi_dh_rdac.c Wed May 06 16:56:33 2009 +0100
@@ -24,6 +24,7 @@
#include <scsi/scsi_dh.h>
/*
* LSI mode page stuff
-@@ -225,10 +226,9 @@ static struct request *get_rdac_req(stru
+@@ -225,10 +226,9 @@
return NULL;
}
rq->retries = RDAC_RETRIES;
rq->timeout = RDAC_TIMEOUT;
-@@ -387,6 +387,7 @@ static int check_ownership(struct scsi_d
+@@ -387,6 +387,7 @@
struct c9_inquiry *inqp;
h->lun_state = RDAC_LUN_UNOWNED;
err = submit_inquiry(sdev, 0xC9, sizeof(struct c9_inquiry), h);
if (err == SCSI_DH_OK) {
inqp = &h->inq.c9;
-@@ -402,6 +403,9 @@ static int check_ownership(struct scsi_d
+@@ -401,6 +402,9 @@
+ h->lun_state = RDAC_LUN_OWNED;
}
}
-
++
+ if (h->lun_state == RDAC_LUN_UNOWNED)
+ h->state = RDAC_STATE_PASSIVE;
-+
+
return err;
}
-
-@@ -455,11 +459,10 @@ static int mode_select_handle_sense(stru
+@@ -455,11 +459,10 @@
sense = (sense_hdr.sense_key << 16) | (sense_hdr.asc << 8) |
sense_hdr.ascq;
/* If it is retryable failure, submit the c9 inquiry again */
*/
err = SCSI_DH_RETRY;
}
-@@ -475,21 +478,27 @@ static int send_mode_select(struct scsi_
+@@ -475,21 +478,27 @@
{
struct request *rq;
struct request_queue *q = sdev->request_queue;
done:
return err;
}
-@@ -569,6 +578,11 @@ static int rdac_check_sense(struct scsi_
+@@ -569,6 +578,11 @@
* Power On, Reset, or Bus Device Reset, just retry.
*/
return ADD_TO_MLQUEUE;
break;
}
/* success just means we do not care what scsi-ml does */
-@@ -576,21 +590,25 @@ static int rdac_check_sense(struct scsi_
+@@ -576,21 +590,25 @@
}
static const struct scsi_dh_devlist rdac_dev_list[] = {
};
static int rdac_bus_attach(struct scsi_device *sdev);
-diff -purN linux-2.6.27/drivers/scsi/dpt_i2o.c linux-2.6.27.19-5.1/drivers/scsi/dpt_i2o.c
---- linux-2.6.27/drivers/scsi/dpt_i2o.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/dpt_i2o.c 2009-03-25 16:11:16.000000000 +0000
-@@ -2445,7 +2445,7 @@ static s32 adpt_i2o_to_scsi(void __iomem
+diff -r 9608d5473017 drivers/scsi/dpt_i2o.c
+--- a/drivers/scsi/dpt_i2o.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/dpt_i2o.c Wed May 06 16:56:33 2009 +0100
+@@ -2445,7 +2445,7 @@
hba_status = detailed_status >> 8;
// calculate resid for sg
pHba = (adpt_hba*) cmd->device->host->hostdata[0];
-@@ -2456,7 +2456,7 @@ static s32 adpt_i2o_to_scsi(void __iomem
+@@ -2456,7 +2456,7 @@
case I2O_SCSI_DSC_SUCCESS:
cmd->result = (DID_OK << 16);
// handle underflow
cmd->result = (DID_ERROR <<16);
printk(KERN_WARNING"%s: SCSI CMD underflow\n",pHba->name);
}
-diff -purN linux-2.6.27/drivers/scsi/eata.c linux-2.6.27.19-5.1/drivers/scsi/eata.c
---- linux-2.6.27/drivers/scsi/eata.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/eata.c 2009-03-25 16:11:17.000000000 +0000
-@@ -1626,8 +1626,15 @@ static void map_dma(unsigned int i, stru
+diff -r 9608d5473017 drivers/scsi/eata.c
+--- a/drivers/scsi/eata.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/eata.c Wed May 06 16:56:33 2009 +0100
+@@ -1626,8 +1626,15 @@
cpp->sense_len = SCSI_SENSE_BUFFERSIZE;
scsi_for_each_sg(SCpnt, sg, count, k) {
cpp->sglist[k].address = H2DEV(sg_dma_address(sg));
cpp->sglist[k].num_bytes = H2DEV(sg_dma_len(sg));
-@@ -1655,7 +1662,9 @@ static void unmap_dma(unsigned int i, st
+@@ -1655,7 +1662,9 @@
pci_unmap_single(ha->pdev, DEV2H(cpp->sense_addr),
DEV2H(cpp->sense_len), PCI_DMA_FROMDEVICE);
if (!DEV2H(cpp->data_len))
pci_dir = PCI_DMA_BIDIRECTIONAL;
-diff -purN linux-2.6.27/drivers/scsi/fcoe/Makefile linux-2.6.27.19-5.1/drivers/scsi/fcoe/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/fcoe/Makefile 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/fcoe/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/fcoe/Makefile Wed May 06 16:56:33 2009 +0100
@@ -0,0 +1,8 @@
+# $Id: Makefile
+
+ libfcoe.o \
+ fcoe_sw.o \
+ fc_transport_fcoe.o
-diff -purN linux-2.6.27/drivers/scsi/fcoe/fc_transport_fcoe.c linux-2.6.27.19-5.1/drivers/scsi/fcoe/fc_transport_fcoe.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/fcoe/fc_transport_fcoe.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/fcoe/fc_transport_fcoe.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/fcoe/fc_transport_fcoe.c Wed May 06 16:56:33 2009 +0100
@@ -0,0 +1,446 @@
+/*
+ * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
+ mutex_unlock(&fcoe_transports_lock);
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/scsi/fcoe/fcoe_sw.c linux-2.6.27.19-5.1/drivers/scsi/fcoe/fcoe_sw.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/fcoe/fcoe_sw.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/fcoe/fcoe_sw.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/fcoe/fcoe_sw.c Wed May 06 16:56:33 2009 +0100
@@ -0,0 +1,495 @@
+/*
+ * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
+ fcoe_transport_unregister(&fcoe_sw_transport);
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/scsi/fcoe/libfcoe.c linux-2.6.27.19-5.1/drivers/scsi/fcoe/libfcoe.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/fcoe/libfcoe.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/fcoe/libfcoe.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/fcoe/libfcoe.c Wed May 06 16:56:33 2009 +0100
@@ -0,0 +1,1463 @@
+/*
+ * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
+ fcoe_transport_exit();
+}
+module_exit(fcoe_exit);
-diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdth.c
---- linux-2.6.27/drivers/scsi/gdth.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/gdth.c 2009-03-25 16:11:14.000000000 +0000
-@@ -328,7 +328,7 @@ static int irq[MAXHA] __initdata =
+diff -r 9608d5473017 drivers/scsi/gdth.c
+--- a/drivers/scsi/gdth.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/gdth.c Wed May 06 16:56:33 2009 +0100
+@@ -328,7 +328,7 @@
{0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
/* disable driver flag */
/* reserve flag */
static int reserve_mode = 1;
/* reserve list */
-@@ -464,7 +464,6 @@ int __gdth_execute(struct scsi_device *s
+@@ -464,7 +464,6 @@
/* use request field to save the ptr. to completion struct. */
scp->request = (struct request *)&wait;
scp->cmd_len = 12;
scp->cmnd = cmnd;
cmndinfo.priority = IOCTL_PRI;
-@@ -589,7 +588,7 @@ static struct pci_driver gdth_pci_driver
+@@ -589,7 +588,7 @@
.remove = gdth_pci_remove_one,
};
{
gdth_ha_str *ha = pci_get_drvdata(pdev);
-@@ -601,7 +600,7 @@ static void gdth_pci_remove_one(struct p
+@@ -601,7 +600,7 @@
pci_disable_device(pdev);
}
const struct pci_device_id *ent)
{
ushort vendor = pdev->vendor;
-@@ -659,7 +658,7 @@ static int gdth_pci_init_one(struct pci_
+@@ -659,7 +658,7 @@
#endif /* CONFIG_PCI */
#ifdef CONFIG_EISA
{
ulong32 retries,id;
unchar prot_ver,eisacf,i,irq_found;
-@@ -753,7 +752,7 @@ static int __init gdth_init_eisa(ushort
+@@ -753,7 +752,7 @@
#endif /* CONFIG_EISA */
#ifdef CONFIG_ISA
{
register gdt2_dpram_str __iomem *dp2_ptr;
int i;
-@@ -854,7 +853,7 @@ static int __init gdth_init_isa(ulong32
+@@ -854,7 +853,7 @@
#endif /* CONFIG_ISA */
#ifdef CONFIG_PCI
gdth_ha_str *ha)
{
register gdt6_dpram_str __iomem *dp6_ptr;
-@@ -1238,7 +1237,7 @@ static int gdth_init_pci(struct pci_dev
+@@ -1238,7 +1237,7 @@
/* controller protocol functions */
{
ulong flags;
gdt2_dpram_str __iomem *dp2_ptr;
-@@ -1554,7 +1553,7 @@ static int gdth_internal_cmd(gdth_ha_str
+@@ -1554,7 +1553,7 @@
/* search for devices */
{
ushort cdev_cnt, i;
int ok;
-@@ -1995,23 +1994,12 @@ static void gdth_putq(gdth_ha_str *ha, S
+@@ -1995,23 +1994,12 @@
register Scsi_Cmnd *pscp;
register Scsi_Cmnd *nscp;
ulong flags;
if (ha->req_first==NULL) {
ha->req_first = scp; /* queue was empty */
-@@ -3899,6 +3887,39 @@ static const char *gdth_info(struct Scsi
+@@ -3899,6 +3887,39 @@
return ((const char *)ha->binfo.type_string);
}
static int gdth_eh_bus_reset(Scsi_Cmnd *scp)
{
gdth_ha_str *ha = shost_priv(scp->device->host);
-@@ -3992,7 +4013,7 @@ static int gdth_queuecommand(struct scsi
+@@ -3992,7 +4013,7 @@
BUG_ON(!cmndinfo);
scp->scsi_done = done;
cmndinfo->priority = DEFAULT_PRI;
return __gdth_queuecommand(ha, scp, cmndinfo);
-@@ -4096,12 +4117,10 @@ static int ioc_lockdrv(void __user *arg)
+@@ -4096,12 +4117,10 @@
ha->hdr[j].lock = 1;
spin_unlock_irqrestore(&ha->smp_lock, flags);
gdth_wait_completion(ha, ha->bus_cnt, j);
gdth_next(ha);
}
}
-@@ -4539,18 +4558,14 @@ static int gdth_ioctl(struct inode *inod
+@@ -4539,18 +4558,14 @@
spin_lock_irqsave(&ha->smp_lock, flags);
ha->raw[i].lock = 1;
spin_unlock_irqrestore(&ha->smp_lock, flags);
}
}
break;
-@@ -4644,6 +4659,7 @@ static struct scsi_host_template gdth_te
+@@ -4644,6 +4659,7 @@
.slave_configure = gdth_slave_configure,
.bios_param = gdth_bios_param,
.proc_info = gdth_proc_info,
.proc_name = "gdth",
.can_queue = GDTH_MAXCMDS,
.this_id = -1,
-@@ -4654,7 +4670,7 @@ static struct scsi_host_template gdth_te
+@@ -4654,7 +4670,7 @@
};
#ifdef CONFIG_ISA
{
struct Scsi_Host *shp;
gdth_ha_str *ha;
-@@ -4786,7 +4802,7 @@ static int __init gdth_isa_probe_one(ulo
+@@ -4786,7 +4802,7 @@
#endif /* CONFIG_ISA */
#ifdef CONFIG_EISA
{
struct Scsi_Host *shp;
gdth_ha_str *ha;
-@@ -4919,7 +4935,7 @@ static int __init gdth_eisa_probe_one(us
+@@ -4919,7 +4935,7 @@
#endif /* CONFIG_EISA */
#ifdef CONFIG_PCI
gdth_ha_str **ha_out)
{
struct Scsi_Host *shp;
-@@ -5122,7 +5138,7 @@ static struct notifier_block gdth_notifi
+@@ -5122,7 +5138,7 @@
gdth_halt, NULL, 0
};
{
if (disable) {
printk("GDT-HA: Controller driver disabled from"
-@@ -5176,7 +5192,7 @@ static int __init gdth_init(void)
+@@ -5176,7 +5192,7 @@
return 0;
}
{
gdth_ha_str *ha;
-diff -purN linux-2.6.27/drivers/scsi/gdth.h linux-2.6.27.19-5.1/drivers/scsi/gdth.h
---- linux-2.6.27/drivers/scsi/gdth.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/gdth.h 2009-03-25 16:11:15.000000000 +0000
-@@ -916,7 +916,7 @@ typedef struct {
+diff -r 9608d5473017 drivers/scsi/gdth.h
+--- a/drivers/scsi/gdth.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/gdth.h Wed May 06 16:56:33 2009 +0100
+@@ -916,7 +916,7 @@
gdth_cmd_str *internal_cmd_str; /* crier for internal messages*/
dma_addr_t sense_paddr; /* sense dma-addr */
unchar priority;
volatile int wait_for_completion;
ushort status;
ulong32 info;
-diff -purN linux-2.6.27/drivers/scsi/gdth_proc.c linux-2.6.27.19-5.1/drivers/scsi/gdth_proc.c
---- linux-2.6.27/drivers/scsi/gdth_proc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/gdth_proc.c 2009-03-25 16:11:15.000000000 +0000
-@@ -748,69 +748,3 @@ static void gdth_wait_completion(gdth_ha
+diff -r 9608d5473017 drivers/scsi/gdth_proc.c
+--- a/drivers/scsi/gdth_proc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/gdth_proc.c Wed May 06 16:56:33 2009 +0100
+@@ -748,69 +748,3 @@
}
spin_unlock_irqrestore(&ha->smp_lock, flags);
}
-
- return oldto;
-}
-diff -purN linux-2.6.27/drivers/scsi/gdth_proc.h linux-2.6.27.19-5.1/drivers/scsi/gdth_proc.h
---- linux-2.6.27/drivers/scsi/gdth_proc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/gdth_proc.h 2009-03-25 16:11:15.000000000 +0000
-@@ -20,9 +20,6 @@ static char *gdth_ioctl_alloc(gdth_ha_st
+diff -r 9608d5473017 drivers/scsi/gdth_proc.h
+--- a/drivers/scsi/gdth_proc.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/gdth_proc.h Wed May 06 16:56:33 2009 +0100
+@@ -20,9 +20,6 @@
ulong64 *paddr);
static void gdth_ioctl_free(gdth_ha_str *ha, int size, char *buf, ulong64 paddr);
static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id);
#endif
-diff -purN linux-2.6.27/drivers/scsi/hosts.c linux-2.6.27.19-5.1/drivers/scsi/hosts.c
---- linux-2.6.27/drivers/scsi/hosts.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/hosts.c 2009-03-25 16:11:17.000000000 +0000
-@@ -464,7 +464,7 @@ static int __scsi_host_match(struct devi
+diff -r 9608d5473017 drivers/scsi/hosts.c
+--- a/drivers/scsi/hosts.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/hosts.c Wed May 06 16:56:33 2009 +0100
+@@ -464,7 +464,7 @@
struct Scsi_Host *scsi_host_lookup(unsigned short hostnum)
{
struct device *cdev;
cdev = class_find_device(&shost_class, NULL, &hostnum,
__scsi_host_match);
-@@ -472,7 +472,7 @@ struct Scsi_Host *scsi_host_lookup(unsig
+@@ -472,7 +472,7 @@
shost = scsi_host_get(class_to_shost(cdev));
put_device(cdev);
}
}
EXPORT_SYMBOL(scsi_host_lookup);
-diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvfc.c
---- linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvfc.c 2009-03-25 16:11:16.000000000 +0000
-@@ -101,7 +101,7 @@ static const struct {
+diff -r 9608d5473017 drivers/scsi/ibmvscsi/ibmvfc.c
+--- a/drivers/scsi/ibmvscsi/ibmvfc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ibmvscsi/ibmvfc.c Wed May 06 16:56:33 2009 +0100
+@@ -101,7 +101,7 @@
{ IBMVFC_FABRIC_MAPPED, IBMVFC_UNABLE_TO_ESTABLISH, DID_ERROR, 1, 1, "unable to establish" },
{ IBMVFC_FABRIC_MAPPED, IBMVFC_XPORT_FAULT, DID_OK, 1, 0, "transport fault" },
{ IBMVFC_FABRIC_MAPPED, IBMVFC_CMD_TIMEOUT, DID_TIME_OUT, 1, 1, "command timeout" },
{ IBMVFC_FABRIC_MAPPED, IBMVFC_HW_FAILURE, DID_ERROR, 1, 1, "hardware failure" },
{ IBMVFC_FABRIC_MAPPED, IBMVFC_LINK_DOWN_ERR, DID_REQUEUE, 0, 0, "link down" },
{ IBMVFC_FABRIC_MAPPED, IBMVFC_LINK_DEAD_ERR, DID_ERROR, 0, 0, "link dead" },
-@@ -115,12 +115,13 @@ static const struct {
+@@ -115,12 +115,13 @@
{ IBMVFC_VIOS_FAILURE, IBMVFC_CRQ_FAILURE, DID_REQUEUE, 1, 1, "CRQ failure" },
{ IBMVFC_VIOS_FAILURE, IBMVFC_SW_FAILURE, DID_ERROR, 0, 1, "software failure" },
{ IBMVFC_VIOS_FAILURE, IBMVFC_COMMAND_FAILED, DID_ERROR, 1, 1, "command failed" },
{ IBMVFC_FC_FAILURE, IBMVFC_INVALID_ELS_CMD_CODE, DID_ERROR, 0, 1, "invalid ELS command code" },
-@@ -278,13 +279,6 @@ static int ibmvfc_get_err_result(struct
+@@ -277,13 +278,6 @@
+ ((!fc_rsp_len && fc_rsp_len != 4 && fc_rsp_len != 8) ||
rsp->data.info.rsp_code))
return DID_ERROR << 16;
-
+-
- if (!vfc_cmd->status) {
- if (rsp->flags & FCP_RESID_OVER)
- return rsp->scsi_status | (DID_ERROR << 16);
- else
- return rsp->scsi_status | (DID_OK << 16);
- }
--
+
err = ibmvfc_get_err_index(vfc_cmd->status, vfc_cmd->error);
if (err >= 0)
- return rsp->scsi_status | (cmd_status[err].result << 16);
-@@ -503,6 +497,7 @@ static void ibmvfc_set_host_action(struc
+@@ -503,6 +497,7 @@
case IBMVFC_HOST_ACTION_INIT:
case IBMVFC_HOST_ACTION_TGT_DEL:
case IBMVFC_HOST_ACTION_QUERY_TGTS:
case IBMVFC_HOST_ACTION_TGT_ADD:
case IBMVFC_HOST_ACTION_NONE:
default:
-@@ -566,7 +561,7 @@ static void ibmvfc_init_host(struct ibmv
+@@ -566,7 +561,7 @@
struct ibmvfc_target *tgt;
if (vhost->action == IBMVFC_HOST_ACTION_INIT_WAIT) {
dev_err(vhost->dev,
"Host initialization retries exceeded. Taking adapter offline\n");
ibmvfc_link_down(vhost, IBMVFC_HOST_OFFLINE);
-@@ -645,6 +640,7 @@ static void ibmvfc_release_crq_queue(str
+@@ -645,6 +640,7 @@
ibmvfc_dbg(vhost, "Releasing CRQ\n");
free_irq(vdev->irq, vhost);
do {
rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address);
} while (rc == H_BUSY || H_IS_LONG_BUSY(rc));
-@@ -765,6 +761,9 @@ static void ibmvfc_scsi_eh_done(struct i
+@@ -764,6 +760,9 @@
+ scsi_dma_unmap(cmnd);
cmnd->scsi_done(cmnd);
}
-
++
+ if (evt->eh_comp)
+ complete(evt->eh_comp);
-+
+
ibmvfc_free_event(evt);
}
-
-@@ -847,11 +846,12 @@ static void ibmvfc_reset_host(struct ibm
+@@ -847,11 +846,12 @@
static void ibmvfc_retry_host_init(struct ibmvfc_host *vhost)
{
if (vhost->action == IBMVFC_HOST_ACTION_INIT_WAIT) {
__ibmvfc_reset_host(vhost);
else
ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_INIT);
-@@ -1252,6 +1252,7 @@ static void ibmvfc_init_event(struct ibm
+@@ -1252,6 +1252,7 @@
evt->sync_iu = NULL;
evt->crq.format = format;
evt->done = done;
}
/**
-@@ -1322,7 +1323,9 @@ static int ibmvfc_map_sg_data(struct scs
+@@ -1322,7 +1323,9 @@
&evt->ext_list_token);
if (!evt->ext_list) {
return -ENOMEM;
}
}
-@@ -1381,6 +1384,8 @@ static int ibmvfc_send_event(struct ibmv
+@@ -1380,6 +1383,8 @@
+ evt->timer.function = (void (*)(unsigned long))ibmvfc_timeout;
add_timer(&evt->timer);
}
-
-+ mb();
+
++ mb();
+
if ((rc = ibmvfc_send_crq(vhost, crq_as_u64[0], crq_as_u64[1]))) {
list_del(&evt->queue);
- del_timer(&evt->timer);
-@@ -1477,6 +1482,11 @@ static void ibmvfc_scsi_done(struct ibmv
+@@ -1477,6 +1482,11 @@
sense_len = SCSI_SENSE_BUFFERSIZE - rsp_len;
if ((rsp->flags & FCP_SNS_LEN_VALID) && rsp->fcp_sense_len && rsp_len <= 8)
memcpy(cmnd->sense_buffer, rsp->data.sense + rsp_len, sense_len);
ibmvfc_log_error(evt);
}
-@@ -1489,6 +1499,9 @@ static void ibmvfc_scsi_done(struct ibmv
+@@ -1488,6 +1498,9 @@
+ scsi_dma_unmap(cmnd);
cmnd->scsi_done(cmnd);
}
-
++
+ if (evt->eh_comp)
+ complete(evt->eh_comp);
-+
+
ibmvfc_free_event(evt);
}
-
-@@ -1561,9 +1574,6 @@ static int ibmvfc_queuecommand(struct sc
+@@ -1561,9 +1574,6 @@
vfc_cmd->resp_len = sizeof(vfc_cmd->rsp);
vfc_cmd->cancel_key = (unsigned long)cmnd->device->hostdata;
vfc_cmd->tgt_scsi_id = rport->port_id;
vfc_cmd->iu.xfer_len = scsi_bufflen(cmnd);
int_to_scsilun(cmnd->device->lun, &vfc_cmd->iu.lun);
memcpy(vfc_cmd->iu.cdb, cmnd->cmnd, cmnd->cmd_len);
-@@ -1627,7 +1637,7 @@ static int ibmvfc_reset_device(struct sc
+@@ -1627,7 +1637,7 @@
struct ibmvfc_host *vhost = shost_priv(sdev->host);
struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
struct ibmvfc_cmd *tmf;
union ibmvfc_iu rsp_iu;
struct ibmvfc_fcp_rsp *fc_rsp = &rsp_iu.cmd.rsp;
int rsp_rc = -EBUSY;
-@@ -1789,7 +1799,8 @@ static int ibmvfc_abort_task_set(struct
+@@ -1789,7 +1799,8 @@
static int ibmvfc_cancel_all(struct scsi_device *sdev, int type)
{
struct ibmvfc_host *vhost = shost_priv(sdev->host);
struct ibmvfc_tmf *tmf;
struct ibmvfc_event *evt, *found_evt;
union ibmvfc_iu rsp;
-@@ -1827,7 +1838,7 @@ static int ibmvfc_cancel_all(struct scsi
+@@ -1827,7 +1838,7 @@
int_to_scsilun(sdev->lun, &tmf->lun);
tmf->flags = (type | IBMVFC_TMF_LUA_VALID);
tmf->cancel_key = (unsigned long)sdev->hostdata;
evt->sync_iu = &rsp;
init_completion(&evt->comp);
-@@ -1859,6 +1870,91 @@ static int ibmvfc_cancel_all(struct scsi
+@@ -1859,6 +1870,91 @@
}
/**
* ibmvfc_eh_abort_handler - Abort a command
* @cmd: scsi command to abort
*
-@@ -1867,29 +1963,21 @@ static int ibmvfc_cancel_all(struct scsi
+@@ -1867,29 +1963,21 @@
**/
static int ibmvfc_eh_abort_handler(struct scsi_cmnd *cmd)
{
ibmvfc_wait_while_resetting(vhost);
- cancel_rc = ibmvfc_cancel_all(cmd->device, IBMVFC_TMF_ABORT_TASK_SET);
- abort_rc = ibmvfc_abort_task_set(cmd->device);
-+ cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_ABORT_TASK_SET);
-+ abort_rc = ibmvfc_abort_task_set(sdev);
-
+-
- if (!cancel_rc && !abort_rc) {
- spin_lock_irqsave(vhost->host->host_lock, flags);
- list_for_each_entry_safe(evt, pos, &vhost->sent, queue) {
- LEAVE;
- return SUCCESS;
- }
+-
+- LEAVE;
+- return FAILED;
++ cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_ABORT_TASK_SET);
++ abort_rc = ibmvfc_abort_task_set(sdev);
++
+ if (!cancel_rc && !abort_rc)
+ rc = ibmvfc_wait_for_ops(vhost, sdev, ibmvfc_match_lun);
-
- LEAVE;
-- return FAILED;
++
++ LEAVE;
+ return rc;
}
/**
-@@ -1901,29 +1989,21 @@ static int ibmvfc_eh_abort_handler(struc
+@@ -1901,29 +1989,21 @@
**/
static int ibmvfc_eh_device_reset_handler(struct scsi_cmnd *cmd)
{
ibmvfc_wait_while_resetting(vhost);
- cancel_rc = ibmvfc_cancel_all(cmd->device, IBMVFC_TMF_LUN_RESET);
- reset_rc = ibmvfc_reset_device(cmd->device, IBMVFC_LUN_RESET, "LUN");
-+ cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_LUN_RESET);
-+ reset_rc = ibmvfc_reset_device(sdev, IBMVFC_LUN_RESET, "LUN");
-
+-
- if (!cancel_rc && !reset_rc) {
- spin_lock_irqsave(vhost->host->host_lock, flags);
- list_for_each_entry_safe(evt, pos, &vhost->sent, queue) {
- LEAVE;
- return SUCCESS;
- }
+-
+- LEAVE;
+- return FAILED;
++ cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_LUN_RESET);
++ reset_rc = ibmvfc_reset_device(sdev, IBMVFC_LUN_RESET, "LUN");
++
+ if (!cancel_rc && !reset_rc)
+ rc = ibmvfc_wait_for_ops(vhost, sdev, ibmvfc_match_lun);
-
- LEAVE;
-- return FAILED;
++
++ LEAVE;
+ return rc;
}
/**
-@@ -1959,31 +2039,23 @@ static void ibmvfc_dev_abort_all(struct
+@@ -1959,31 +2039,23 @@
**/
static int ibmvfc_eh_target_reset_handler(struct scsi_cmnd *cmd)
{
ibmvfc_wait_while_resetting(vhost);
starget_for_each_device(starget, &cancel_rc, ibmvfc_dev_cancel_all);
- reset_rc = ibmvfc_reset_device(cmd->device, IBMVFC_TARGET_RESET, "target");
-+ reset_rc = ibmvfc_reset_device(sdev, IBMVFC_TARGET_RESET, "target");
-
+-
- if (!cancel_rc && !reset_rc) {
- spin_lock_irqsave(vhost->host->host_lock, flags);
- list_for_each_entry_safe(evt, pos, &vhost->sent, queue) {
- LEAVE;
- return SUCCESS;
- }
+-
+- LEAVE;
+- return FAILED;
++ reset_rc = ibmvfc_reset_device(sdev, IBMVFC_TARGET_RESET, "target");
++
+ if (!cancel_rc && !reset_rc)
+ rc = ibmvfc_wait_for_ops(vhost, starget, ibmvfc_match_target);
-
- LEAVE;
-- return FAILED;
++
++ LEAVE;
+ return rc;
}
/**
-@@ -2013,26 +2085,19 @@ static void ibmvfc_terminate_rport_io(st
+@@ -2013,26 +2085,19 @@
struct scsi_target *starget = to_scsi_target(&rport->dev);
struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
struct ibmvfc_host *vhost = shost_priv(shost);
- }
- spin_unlock_irqrestore(shost->host_lock, flags);
- } else
-- ibmvfc_issue_fc_host_lip(shost);
+ if (!cancel_rc && !abort_rc)
+ rc = ibmvfc_wait_for_ops(vhost, starget, ibmvfc_match_target);
-
-- scsi_target_unblock(&rport->dev);
++
+ if (rc == FAILED)
-+ ibmvfc_issue_fc_host_lip(shost);
+ ibmvfc_issue_fc_host_lip(shost);
+-
+- scsi_target_unblock(&rport->dev);
LEAVE;
}
-@@ -2091,15 +2156,17 @@ static void ibmvfc_handle_async(struct i
+@@ -2091,15 +2156,17 @@
case IBMVFC_AE_LINK_UP:
case IBMVFC_AE_RESUME:
vhost->events_to_log |= IBMVFC_AE_LINKUP;
vhost->events_to_log |= IBMVFC_AE_RSCN;
case IBMVFC_AE_ELS_LOGO:
case IBMVFC_AE_ELS_PRLO:
-@@ -2265,6 +2332,28 @@ static int ibmvfc_slave_alloc(struct scs
+@@ -2265,6 +2332,28 @@
}
/**
* ibmvfc_slave_configure - Configure the device
* @sdev: struct scsi_device device to configure
*
-@@ -2543,6 +2632,7 @@ static struct scsi_host_template driver_
+@@ -2543,6 +2632,7 @@
.eh_host_reset_handler = ibmvfc_eh_host_reset_handler,
.slave_alloc = ibmvfc_slave_alloc,
.slave_configure = ibmvfc_slave_configure,
.scan_finished = ibmvfc_scan_finished,
.change_queue_depth = ibmvfc_change_queue_depth,
.change_queue_type = ibmvfc_change_queue_type,
-@@ -2610,6 +2700,25 @@ static struct ibmvfc_crq *ibmvfc_next_cr
+@@ -2610,6 +2700,25 @@
static irqreturn_t ibmvfc_interrupt(int irq, void *dev_instance)
{
struct ibmvfc_host *vhost = (struct ibmvfc_host *)dev_instance;
struct vio_dev *vdev = to_vio_dev(vhost->dev);
struct ibmvfc_crq *crq;
struct ibmvfc_async_crq *async;
-@@ -2617,7 +2726,6 @@ static irqreturn_t ibmvfc_interrupt(int
+@@ -2617,7 +2726,6 @@
int done = 0;
spin_lock_irqsave(vhost->host->host_lock, flags);
while (!done) {
/* Pull all the valid messages off the CRQ */
while ((crq = ibmvfc_next_crq(vhost)) != NULL) {
-@@ -2639,13 +2747,12 @@ static irqreturn_t ibmvfc_interrupt(int
+@@ -2639,13 +2747,12 @@
} else if ((async = ibmvfc_next_async_crq(vhost)) != NULL) {
vio_disable_interrupts(vdev);
ibmvfc_handle_async(async, vhost);
}
/**
-@@ -2671,13 +2778,47 @@ static void ibmvfc_init_tgt(struct ibmvf
+@@ -2671,13 +2778,47 @@
static void ibmvfc_retry_tgt_init(struct ibmvfc_target *tgt,
void (*job_step) (struct ibmvfc_target *))
{
/**
* ibmvfc_tgt_prli_done - Completion handler for Process Login
* @evt: ibmvfc event struct
-@@ -2688,15 +2829,36 @@ static void ibmvfc_tgt_prli_done(struct
+@@ -2688,15 +2829,36 @@
struct ibmvfc_target *tgt = evt->tgt;
struct ibmvfc_host *vhost = evt->vhost;
struct ibmvfc_process_login *rsp = &evt->xfer_iu->prli;
+ struct ibmvfc_prli_svc_parms *parms = &rsp->parms;
u32 status = rsp->common.status;
-+ int index;
-
- vhost->discovery_threads--;
- ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_NONE);
- switch (status) {
- case IBMVFC_MAD_SUCCESS:
+-
+- vhost->discovery_threads--;
+- ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_NONE);
+- switch (status) {
+- case IBMVFC_MAD_SUCCESS:
- tgt_dbg(tgt, "Process Login succeeded\n");
- tgt->need_login = 0;
- ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_ADD_RPORT);
++ int index;
++
++ vhost->discovery_threads--;
++ ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_NONE);
++ switch (status) {
++ case IBMVFC_MAD_SUCCESS:
+ tgt_dbg(tgt, "Process Login succeeded: %X %02X %04X\n",
+ parms->type, parms->flags, parms->service_parms);
+
break;
case IBMVFC_MAD_DRIVER_FAILED:
break;
-@@ -2710,6 +2872,8 @@ static void ibmvfc_tgt_prli_done(struct
+@@ -2710,6 +2872,8 @@
rsp->status, rsp->error, status);
if (ibmvfc_retry_cmd(rsp->status, rsp->error))
ibmvfc_retry_tgt_init(tgt, ibmvfc_tgt_send_prli);
break;
};
-@@ -2783,7 +2947,6 @@ static void ibmvfc_tgt_plogi_done(struct
+@@ -2783,7 +2947,6 @@
tgt->ids.node_name = wwn_to_u64(rsp->service_parms.node_name);
tgt->ids.port_name = wwn_to_u64(rsp->service_parms.port_name);
tgt->ids.port_id = tgt->scsi_id;
memcpy(&tgt->service_parms, &rsp->service_parms,
sizeof(tgt->service_parms));
memcpy(&tgt->service_parms_change, &rsp->service_parms_change,
-@@ -2804,6 +2967,8 @@ static void ibmvfc_tgt_plogi_done(struct
+@@ -2804,6 +2967,8 @@
if (ibmvfc_retry_cmd(rsp->status, rsp->error))
ibmvfc_retry_tgt_init(tgt, ibmvfc_tgt_send_plogi);
break;
};
-@@ -3095,6 +3260,8 @@ static void ibmvfc_tgt_query_target_done
+@@ -3095,6 +3260,8 @@
ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_DEL_RPORT);
else if (ibmvfc_retry_cmd(rsp->status, rsp->error))
ibmvfc_retry_tgt_init(tgt, ibmvfc_tgt_query_target);
break;
};
-@@ -3168,6 +3335,7 @@ static int ibmvfc_alloc_target(struct ib
+@@ -3168,6 +3335,7 @@
return -ENOMEM;
}
tgt->scsi_id = scsi_id;
tgt->new_scsi_id = scsi_id;
tgt->vhost = vhost;
-@@ -3425,6 +3593,7 @@ static int __ibmvfc_work_to_do(struct ib
+@@ -3425,6 +3593,7 @@
case IBMVFC_HOST_ACTION_ALLOC_TGTS:
case IBMVFC_HOST_ACTION_TGT_ADD:
case IBMVFC_HOST_ACTION_TGT_DEL:
case IBMVFC_HOST_ACTION_QUERY:
default:
break;
-@@ -3477,9 +3646,18 @@ static void ibmvfc_log_ae(struct ibmvfc_
+@@ -3477,8 +3646,17 @@
static void ibmvfc_tgt_add_rport(struct ibmvfc_target *tgt)
{
struct ibmvfc_host *vhost = tgt->vhost;
- struct fc_rport *rport;
+- unsigned long flags;
+ struct fc_rport *rport = tgt->rport;
- unsigned long flags;
-
++ unsigned long flags;
++
+ if (rport) {
+ tgt_dbg(tgt, "Setting rport roles\n");
+ fc_remote_port_rolechg(rport, tgt->ids.roles);
+ spin_unlock_irqrestore(vhost->host->host_lock, flags);
+ return;
+ }
-+
+
tgt_dbg(tgt, "Adding rport\n");
rport = fc_remote_port_add(vhost->host, 0, &tgt->ids);
- spin_lock_irqsave(vhost->host->host_lock, flags);
-@@ -3521,7 +3699,13 @@ static void ibmvfc_do_work(struct ibmvfc
+@@ -3521,7 +3699,13 @@
break;
case IBMVFC_HOST_ACTION_INIT:
BUG_ON(vhost->state != IBMVFC_INITIALIZING);
break;
case IBMVFC_HOST_ACTION_QUERY:
list_for_each_entry(tgt, &vhost->targets, queue)
-@@ -3540,6 +3724,7 @@ static void ibmvfc_do_work(struct ibmvfc
+@@ -3540,6 +3724,7 @@
ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_TGT_DEL);
break;
case IBMVFC_HOST_ACTION_TGT_DEL:
list_for_each_entry(tgt, &vhost->targets, queue) {
if (tgt->action == IBMVFC_TGT_ACTION_DEL_RPORT) {
tgt_dbg(tgt, "Deleting rport\n");
-@@ -3555,8 +3740,17 @@ static void ibmvfc_do_work(struct ibmvfc
+@@ -3555,8 +3740,17 @@
}
if (vhost->state == IBMVFC_INITIALIZING) {
} else {
ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_NONE);
spin_unlock_irqrestore(vhost->host->host_lock, flags);
-@@ -3579,14 +3773,8 @@ static void ibmvfc_do_work(struct ibmvfc
+@@ -3579,30 +3773,14 @@
}
}
break;
case IBMVFC_HOST_ACTION_TGT_ADD:
list_for_each_entry(tgt, &vhost->targets, queue) {
-@@ -3594,16 +3782,6 @@ static void ibmvfc_do_work(struct ibmvfc
+ if (tgt->action == IBMVFC_TGT_ACTION_ADD_RPORT) {
spin_unlock_irqrestore(vhost->host->host_lock, flags);
ibmvfc_tgt_add_rport(tgt);
- return;
+- return;
- } else if (tgt->action == IBMVFC_TGT_ACTION_DEL_RPORT) {
- tgt_dbg(tgt, "Deleting rport\n");
- rport = tgt->rport;
- if (rport)
- fc_remote_port_delete(rport);
- kref_put(&tgt->kref, ibmvfc_release_tgt);
-- return;
+ return;
}
}
-
-@@ -3699,6 +3877,8 @@ static int ibmvfc_init_crq(struct ibmvfc
+@@ -3699,6 +3877,8 @@
retrc = 0;
if ((rc = request_irq(vdev->irq, ibmvfc_interrupt, 0, IBMVFC_NAME, vhost))) {
dev_err(dev, "Couldn't register irq 0x%x. rc=%d\n", vdev->irq, rc);
goto req_irq_failed;
-@@ -3714,6 +3894,7 @@ static int ibmvfc_init_crq(struct ibmvfc
+@@ -3714,6 +3894,7 @@
return retrc;
req_irq_failed:
do {
rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address);
} while (rc == H_BUSY || H_IS_LONG_BUSY(rc));
-diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.h linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvfc.h
---- linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvfc.h 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/ibmvscsi/ibmvfc.h
+--- a/drivers/scsi/ibmvscsi/ibmvfc.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ibmvscsi/ibmvfc.h Wed May 06 16:56:33 2009 +0100
@@ -29,11 +29,11 @@
#include "viosrp.h"
#define IBMVFC_DEV_LOSS_TMO (5 * 60)
#define IBMVFC_DEFAULT_LOG_LEVEL 2
#define IBMVFC_MAX_CDB_LEN 16
-@@ -109,6 +110,7 @@ enum ibmvfc_vios_errors {
+@@ -109,6 +110,7 @@
IBMVFC_TRANS_CANCELLED = 0x0006,
IBMVFC_TRANS_CANCELLED_IMPLICIT = 0x0007,
IBMVFC_INSUFFICIENT_RESOURCE = 0x0008,
IBMVFC_COMMAND_FAILED = 0x8000,
};
-@@ -337,7 +339,6 @@ struct ibmvfc_tmf {
+@@ -337,7 +339,6 @@
#define IBMVFC_TMF_LUA_VALID 0x40
u32 cancel_key;
u32 my_cancel_key;
u32 pad;
u64 reserved[2];
}__attribute__((packed, aligned (8)));
-@@ -524,10 +525,10 @@ enum ibmvfc_async_event {
+@@ -524,10 +525,10 @@
};
struct ibmvfc_crq {
}__attribute__((packed, aligned (8)));
struct ibmvfc_crq_queue {
-@@ -537,13 +538,13 @@ struct ibmvfc_crq_queue {
+@@ -537,13 +538,13 @@
};
struct ibmvfc_async_crq {
u64 reserved;
}__attribute__((packed, aligned (8)));
-@@ -606,6 +607,7 @@ struct ibmvfc_event {
+@@ -606,6 +607,7 @@
struct srp_direct_buf *ext_list;
dma_addr_t ext_list_token;
struct completion comp;
struct timer_list timer;
};
-@@ -626,6 +628,7 @@ enum ibmvfc_host_action {
+@@ -626,6 +628,7 @@
IBMVFC_HOST_ACTION_TGT_DEL,
IBMVFC_HOST_ACTION_ALLOC_TGTS,
IBMVFC_HOST_ACTION_TGT_INIT,
IBMVFC_HOST_ACTION_TGT_ADD,
};
-@@ -671,6 +674,7 @@ struct ibmvfc_host {
+@@ -671,6 +674,7 @@
int discovery_threads;
int client_migrated;
int reinit;
int events_to_log;
#define IBMVFC_AE_LINKUP 0x0001
#define IBMVFC_AE_LINKDOWN 0x0002
-@@ -680,6 +684,7 @@ struct ibmvfc_host {
+@@ -680,6 +684,7 @@
char partition_name[97];
void (*job_step) (struct ibmvfc_host *);
struct task_struct *work_thread;
wait_queue_head_t init_wait_q;
wait_queue_head_t work_wait_q;
};
-@@ -700,7 +705,7 @@ struct ibmvfc_host {
+@@ -700,7 +705,7 @@
#define ibmvfc_log(vhost, level, ...) \
do { \
dev_err((vhost)->dev, ##__VA_ARGS__); \
} while (0)
-diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvscsi.c
---- linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvscsi.c 2009-03-25 16:11:16.000000000 +0000
-@@ -89,13 +89,20 @@ static int max_id = 64;
+diff -r 9608d5473017 drivers/scsi/ibmvscsi/ibmvscsi.c
+--- a/drivers/scsi/ibmvscsi/ibmvscsi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ibmvscsi/ibmvscsi.c Wed May 06 16:56:33 2009 +0100
+@@ -89,13 +89,20 @@
static int max_channel = 3;
static int init_timeout = 5;
static int max_requests = IBMVSCSI_MAX_REQUESTS_DEFAULT;
MODULE_DESCRIPTION("IBM Virtual SCSI");
MODULE_AUTHOR("Dave Boutcher");
MODULE_LICENSE("GPL");
-@@ -431,6 +438,7 @@ static int map_sg_data(struct scsi_cmnd
+@@ -431,6 +438,7 @@
sdev_printk(KERN_ERR, cmd->device,
"Can't allocate memory "
"for indirect table\n");
return 0;
}
}
-@@ -756,7 +764,7 @@ static int ibmvscsi_queuecommand(struct
+@@ -756,7 +764,7 @@
init_event_struct(evt_struct,
handle_cmd_rsp,
VIOSRP_SRP_FORMAT,
evt_struct->cmnd = cmnd;
evt_struct->cmnd_done = done;
-@@ -1442,7 +1450,7 @@ static int ibmvscsi_slave_configure(stru
+@@ -1442,7 +1450,7 @@
spin_lock_irqsave(shost->host_lock, lock_flags);
if (sdev->type == TYPE_DISK) {
sdev->allow_restart = 1;
}
scsi_adjust_queue_depth(sdev, 0, shost->cmd_per_lun);
spin_unlock_irqrestore(shost->host_lock, lock_flags);
-@@ -1476,7 +1484,7 @@ static ssize_t show_host_srp_version(str
+@@ -1476,7 +1484,7 @@
struct ibmvscsi_host_data *hostdata = shost_priv(shost);
int len;
hostdata->madapter_info.srp_version);
return len;
}
-@@ -1497,7 +1505,7 @@ static ssize_t show_host_partition_name(
+@@ -1497,7 +1505,7 @@
struct ibmvscsi_host_data *hostdata = shost_priv(shost);
int len;
hostdata->madapter_info.partition_name);
return len;
}
-@@ -1518,7 +1526,7 @@ static ssize_t show_host_partition_numbe
+@@ -1518,7 +1526,7 @@
struct ibmvscsi_host_data *hostdata = shost_priv(shost);
int len;
hostdata->madapter_info.partition_number);
return len;
}
-@@ -1538,7 +1546,7 @@ static ssize_t show_host_mad_version(str
+@@ -1538,7 +1546,7 @@
struct ibmvscsi_host_data *hostdata = shost_priv(shost);
int len;
hostdata->madapter_info.mad_version);
return len;
}
-@@ -1558,7 +1566,7 @@ static ssize_t show_host_os_type(struct
+@@ -1558,7 +1566,7 @@
struct ibmvscsi_host_data *hostdata = shost_priv(shost);
int len;
return len;
}
-@@ -1577,7 +1585,7 @@ static ssize_t show_host_config(struct d
+@@ -1577,7 +1585,7 @@
struct ibmvscsi_host_data *hostdata = shost_priv(shost);
/* returns null-terminated host config data */
return strlen(buf);
else
return 0;
-@@ -1607,7 +1615,7 @@ static struct device_attribute *ibmvscsi
+@@ -1607,7 +1615,7 @@
static struct scsi_host_template driver_template = {
.module = THIS_MODULE,
.name = "IBM POWER Virtual SCSI Adapter " IBMVSCSI_VERSION,
.queuecommand = ibmvscsi_queuecommand,
.eh_abort_handler = ibmvscsi_eh_abort_handler,
.eh_device_reset_handler = ibmvscsi_eh_device_reset_handler,
-@@ -1633,7 +1641,7 @@ static struct scsi_host_template driver_
+@@ -1633,7 +1641,7 @@
static unsigned long ibmvscsi_get_desired_dma(struct vio_dev *vdev)
{
/* iu_storage data allocated in initialize_event_pool */
/* add io space for sg data */
desired_io += (IBMVSCSI_MAX_SECTORS_DEFAULT * 512 *
-@@ -1657,7 +1665,6 @@ static int ibmvscsi_probe(struct vio_dev
+@@ -1657,7 +1665,6 @@
vdev->dev.driver_data = NULL;
host = scsi_host_alloc(&driver_template, sizeof(*hostdata));
if (!host) {
dev_err(&vdev->dev, "couldn't allocate host data\n");
-@@ -1673,12 +1680,12 @@ static int ibmvscsi_probe(struct vio_dev
+@@ -1673,12 +1680,12 @@
atomic_set(&hostdata->request_limit, -1);
hostdata->host->max_sectors = IBMVSCSI_MAX_SECTORS_DEFAULT;
dev_err(&vdev->dev, "couldn't initialize event pool\n");
goto init_pool_failed;
}
-@@ -1730,7 +1737,7 @@ static int ibmvscsi_probe(struct vio_dev
+@@ -1730,7 +1737,7 @@
add_host_failed:
release_event_pool(&hostdata->pool, hostdata);
init_pool_failed:
init_crq_failed:
scsi_host_put(host);
scsi_host_alloc_failed:
-@@ -1742,7 +1749,7 @@ static int ibmvscsi_remove(struct vio_de
+@@ -1742,7 +1749,7 @@
struct ibmvscsi_host_data *hostdata = vdev->dev.driver_data;
release_event_pool(&hostdata->pool, hostdata);
ibmvscsi_ops->release_crq_queue(&hostdata->queue, hostdata,
srp_remove_host(hostdata->host);
scsi_remove_host(hostdata->host);
-@@ -1767,7 +1774,7 @@ static struct vio_driver ibmvscsi_driver
+@@ -1767,7 +1774,7 @@
.remove = ibmvscsi_remove,
.get_desired_dma = ibmvscsi_get_desired_dma,
.driver = {
.owner = THIS_MODULE,
}
};
-@@ -1779,6 +1786,10 @@ int __init ibmvscsi_module_init(void)
+@@ -1778,6 +1785,10 @@
+ int __init ibmvscsi_module_init(void)
{
int ret;
-
++
+ /* Ensure we have two requests to do error recovery */
+ driver_template.can_queue = max_requests;
+ max_events = max_requests + 2;
-+
+
if (firmware_has_feature(FW_FEATURE_ISERIES))
ibmvscsi_ops = &iseriesvscsi_ops;
- else if (firmware_has_feature(FW_FEATURE_VIO))
-diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvstgt.c linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvstgt.c
---- linux-2.6.27/drivers/scsi/ibmvscsi/ibmvstgt.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvstgt.c 2009-03-25 16:11:16.000000000 +0000
-@@ -864,21 +864,23 @@ static int ibmvstgt_probe(struct vio_dev
+diff -r 9608d5473017 drivers/scsi/ibmvscsi/ibmvstgt.c
+--- a/drivers/scsi/ibmvscsi/ibmvstgt.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ibmvscsi/ibmvstgt.c Wed May 06 16:56:33 2009 +0100
+@@ -864,21 +864,23 @@
INIT_WORK(&vport->crq_work, handle_crq);
goto free_srp_target;
- err = scsi_add_host(shost, target->dev);
-+ err = scsi_tgt_alloc_queue(shost);
+- if (err)
+- goto destroy_queue;
+-
+ err = scsi_tgt_alloc_queue(shost);
if (err)
- goto destroy_queue;
+ goto remove_host;
-
-- err = scsi_tgt_alloc_queue(shost);
++
+ err = crq_queue_create(&vport->crq_queue, target);
- if (err)
-- goto destroy_queue;
++ if (err)
+ goto free_queue;
return 0;
free_srp_target:
srp_target_free(target);
put_host:
-diff -purN linux-2.6.27/drivers/scsi/ide-scsi.c linux-2.6.27.19-5.1/drivers/scsi/ide-scsi.c
---- linux-2.6.27/drivers/scsi/ide-scsi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ide-scsi.c 2009-03-25 16:11:14.000000000 +0000
-@@ -612,7 +612,7 @@ static int idescsi_queue (struct scsi_cm
+diff -r 9608d5473017 drivers/scsi/ide-scsi.c
+--- a/drivers/scsi/ide-scsi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ide-scsi.c Wed May 06 16:56:33 2009 +0100
+@@ -612,7 +612,7 @@
pc->req_xfer = pc->buf_size = scsi_bufflen(cmd);
pc->scsi_cmd = cmd;
pc->done = done;
if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) {
printk ("ide-scsi: %s: que %lu, cmd = ", drive->name, cmd->serial_number);
-diff -purN linux-2.6.27/drivers/scsi/ipr.c linux-2.6.27.19-5.1/drivers/scsi/ipr.c
---- linux-2.6.27/drivers/scsi/ipr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ipr.c 2009-03-25 16:11:15.000000000 +0000
-@@ -3670,7 +3670,8 @@ static int ipr_slave_configure(struct sc
+diff -r 9608d5473017 drivers/scsi/ipr.c
+--- a/drivers/scsi/ipr.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ipr.c Wed May 06 16:56:33 2009 +0100
+@@ -3670,7 +3670,8 @@
sdev->no_uld_attach = 1;
}
if (ipr_is_vset_device(res)) {
blk_queue_max_sectors(sdev->request_queue, IPR_VSET_MAX_SECTORS);
}
if (ipr_is_vset_device(res) || ipr_is_scsi_disk(res))
-diff -purN linux-2.6.27/drivers/scsi/ips.c linux-2.6.27.19-5.1/drivers/scsi/ips.c
---- linux-2.6.27/drivers/scsi/ips.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ips.c 2009-03-25 16:11:16.000000000 +0000
-@@ -3818,7 +3818,7 @@ ips_send_cmd(ips_ha_t * ha, ips_scb_t *
+diff -r 9608d5473017 drivers/scsi/ips.c
+--- a/drivers/scsi/ips.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ips.c Wed May 06 16:56:33 2009 +0100
+@@ -3818,7 +3818,7 @@
scb->cmd.dcdb.segment_4G = 0;
scb->cmd.dcdb.enhanced_sg = 0;
if (ha->subsys->param[4] & 0x00100000) { /* If NEW Tape DCDB is Supported */
if (!scb->sg_len) {
-diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scsi/iscsi_tcp.c
---- linux-2.6.27/drivers/scsi/iscsi_tcp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/iscsi_tcp.c 2009-03-25 16:11:15.000000000 +0000
-@@ -97,7 +97,7 @@ static int iscsi_tcp_hdr_recv_done(struc
+diff -r 9608d5473017 drivers/scsi/iscsi_tcp.c
+--- a/drivers/scsi/iscsi_tcp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/iscsi_tcp.c Wed May 06 16:56:33 2009 +0100
+@@ -97,7 +97,7 @@
* data is copied to the indicated sg entry, at the given
* offset.
*/
iscsi_tcp_segment_init_sg(struct iscsi_segment *segment,
struct scatterlist *sg, unsigned int offset)
{
-@@ -107,6 +107,7 @@ iscsi_tcp_segment_init_sg(struct iscsi_s
+@@ -107,6 +107,7 @@
segment->total_size - segment->total_copied);
segment->data = NULL;
}
/**
* iscsi_tcp_segment_map - map the current S/G page
-@@ -117,7 +118,7 @@ iscsi_tcp_segment_init_sg(struct iscsi_s
+@@ -117,7 +118,7 @@
* because the iscsi passthrough and internal IO paths will never use high
* mem pages.
*/
iscsi_tcp_segment_map(struct iscsi_segment *segment, int recv)
{
struct scatterlist *sg;
-@@ -143,8 +144,9 @@ iscsi_tcp_segment_map(struct iscsi_segme
+@@ -143,8 +144,9 @@
segment->sg_mapped = kmap_atomic(sg_page(sg), KM_SOFTIRQ0);
segment->data = segment->sg_mapped + sg->offset + segment->sg_offset;
}
iscsi_tcp_segment_unmap(struct iscsi_segment *segment)
{
debug_tcp("iscsi_tcp_segment_unmap %p\n", segment);
-@@ -156,6 +158,7 @@ iscsi_tcp_segment_unmap(struct iscsi_seg
+@@ -156,6 +158,7 @@
segment->data = NULL;
}
}
/*
* Splice the digest buffer into the buffer
-@@ -376,6 +379,9 @@ static inline int
+@@ -376,6 +379,9 @@
iscsi_tcp_dgst_verify(struct iscsi_tcp_conn *tcp_conn,
struct iscsi_segment *segment)
{
if (!segment->digest_len)
return 1;
-@@ -448,7 +454,7 @@ iscsi_segment_seek_sg(struct iscsi_segme
+@@ -448,7 +454,7 @@
* function is called we do not yet know the final size of the header and want
* to delay the digest processing until we know that.
*/
iscsi_tcp_hdr_recv_prep(struct iscsi_tcp_conn *tcp_conn)
{
debug_tcp("iscsi_tcp_hdr_recv_prep(%p%s)\n", tcp_conn,
-@@ -457,6 +463,7 @@ iscsi_tcp_hdr_recv_prep(struct iscsi_tcp
+@@ -457,6 +463,7 @@
tcp_conn->in.hdr_buf, sizeof(struct iscsi_hdr),
iscsi_tcp_hdr_recv_done, NULL);
}
/*
* Handle incoming reply to any other type of command
-@@ -486,7 +493,8 @@ iscsi_tcp_data_recv_prep(struct iscsi_tc
+@@ -486,7 +493,8 @@
struct iscsi_conn *conn = tcp_conn->iscsi_conn;
struct hash_desc *rx_hash = NULL;
rx_hash = &tcp_conn->rx_hash;
iscsi_segment_init_linear(&tcp_conn->in.segment,
-@@ -497,7 +505,7 @@ iscsi_tcp_data_recv_prep(struct iscsi_tc
+@@ -497,7 +505,7 @@
/*
* must be called with session lock
*/
iscsi_tcp_cleanup_task(struct iscsi_conn *conn, struct iscsi_task *task)
{
struct iscsi_tcp_task *tcp_task = task->dd_data;
-@@ -521,6 +529,7 @@ iscsi_tcp_cleanup_task(struct iscsi_conn
+@@ -521,6 +529,7 @@
tcp_task->r2t = NULL;
}
}
/**
* iscsi_data_rsp - SCSI Data-In Response processing
-@@ -737,7 +746,7 @@ iscsi_tcp_process_data_in(struct iscsi_t
+@@ -737,7 +746,7 @@
* by data, the receive buffer is set up to copy the incoming data
* to the correct location.
*/
iscsi_tcp_hdr_dissect(struct iscsi_conn *conn, struct iscsi_hdr *hdr)
{
int rc = 0, opcode, ahslen;
-@@ -793,7 +802,8 @@ iscsi_tcp_hdr_dissect(struct iscsi_conn
+@@ -793,7 +802,8 @@
* we move on to the next scatterlist entry and
* update the digest per-entry.
*/
rx_hash = &tcp_conn->rx_hash;
debug_tcp("iscsi_tcp_begin_data_in(%p, offset=%d, "
-@@ -881,6 +891,7 @@ iscsi_tcp_hdr_dissect(struct iscsi_conn
+@@ -881,6 +891,7 @@
return rc;
}
/**
* iscsi_tcp_hdr_recv_done - process PDU header
-@@ -919,7 +930,8 @@ iscsi_tcp_hdr_recv_done(struct iscsi_tcp
+@@ -919,7 +930,8 @@
/* We're done processing the header. See if we're doing
* header digests; if so, set up the recv_digest buffer
* and go back for more. */
if (segment->digest_len == 0) {
iscsi_tcp_segment_splice_digest(segment,
segment->recv_digest);
-@@ -1161,10 +1173,11 @@ iscsi_tcp_xmit_qlen(struct iscsi_conn *c
+@@ -1161,10 +1173,11 @@
static inline int
iscsi_tcp_flush(struct iscsi_conn *conn)
{
if (rc == 0)
return -EAGAIN;
if (rc < 0)
-@@ -1205,7 +1218,8 @@ iscsi_tcp_send_hdr_prep(struct iscsi_con
+@@ -1205,7 +1218,8 @@
* sure that both iscsi_tcp_task and mtask have
* sufficient room.
*/
iscsi_tcp_dgst_header(&tcp_conn->tx_hash, hdr, hdrlen,
hdr + hdrlen);
hdrlen += ISCSI_DIGEST_SIZE;
-@@ -1243,7 +1257,8 @@ iscsi_tcp_send_data_prep(struct iscsi_co
+@@ -1243,7 +1257,8 @@
hdr_spec_len = ntoh24(tcp_conn->out.hdr->dlength);
WARN_ON(iscsi_padded(len) != iscsi_padded(hdr_spec_len));
tx_hash = &tcp_conn->tx_hash;
return iscsi_segment_seek_sg(&tcp_conn->out.data_segment,
-@@ -1267,7 +1282,8 @@ iscsi_tcp_send_linear_data_prepare(struc
+@@ -1267,7 +1282,8 @@
hdr_spec_len = ntoh24(tcp_conn->out.hdr->dlength);
WARN_ON(iscsi_padded(len) != iscsi_padded(hdr_spec_len));
tx_hash = &tcp_conn->tx_hash;
iscsi_segment_init_linear(&tcp_conn->out.data_segment,
-@@ -1329,7 +1345,7 @@ iscsi_solicit_data_cont(struct iscsi_con
+@@ -1329,7 +1345,7 @@
* @task: scsi command task
* @sc: scsi command
**/
iscsi_tcp_task_init(struct iscsi_task *task)
{
struct iscsi_tcp_task *tcp_task = task->dd_data;
-@@ -1378,6 +1394,7 @@ iscsi_tcp_task_init(struct iscsi_task *t
+@@ -1378,6 +1394,7 @@
task->imm_count = 0;
return 0;
}
/*
* iscsi_tcp_task_xmit - xmit normal PDU task
-@@ -1387,7 +1404,7 @@ iscsi_tcp_task_init(struct iscsi_task *t
+@@ -1387,7 +1404,7 @@
* -EAGAIN if there's still data in the queue, or != 0 for any other kind
* of error.
*/
iscsi_tcp_task_xmit(struct iscsi_task *task)
{
struct iscsi_conn *conn = task->conn;
-@@ -1490,6 +1507,7 @@ fail:
+@@ -1490,6 +1507,7 @@
iscsi_conn_failure(conn, rc);
return -EIO;
}
static struct iscsi_cls_conn *
iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx)
-@@ -1685,6 +1703,7 @@ iscsi_tcp_conn_bind(struct iscsi_cls_ses
+@@ -1685,6 +1703,7 @@
iscsi_conn_set_callbacks(conn);
tcp_conn->sendpage = tcp_conn->sock->ops->sendpage;
/*
* set receive state machine into initial state
*/
-@@ -1696,7 +1715,7 @@ free_socket:
+@@ -1696,7 +1715,7 @@
return err;
}
iscsi_r2tpool_alloc(struct iscsi_session *session)
{
int i;
-@@ -1742,8 +1761,9 @@ r2t_alloc_fail:
+@@ -1742,8 +1761,9 @@
}
return -ENOMEM;
}
iscsi_r2tpool_free(struct iscsi_session *session)
{
int i;
-@@ -1756,6 +1776,7 @@ iscsi_r2tpool_free(struct iscsi_session
+@@ -1756,6 +1776,7 @@
iscsi_pool_free(&tcp_task->r2tpool);
}
}
static int
iscsi_conn_set_param(struct iscsi_cls_conn *cls_conn, enum iscsi_param param,
-@@ -1904,6 +1925,7 @@ static void iscsi_tcp_session_destroy(st
+@@ -1904,6 +1925,7 @@
struct Scsi_Host *shost = iscsi_session_to_shost(cls_session);
iscsi_r2tpool_free(cls_session->dd_data);
iscsi_host_remove(shost);
iscsi_host_free(shost);
-diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.h linux-2.6.27.19-5.1/drivers/scsi/iscsi_tcp.h
---- linux-2.6.27/drivers/scsi/iscsi_tcp.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/iscsi_tcp.h 2009-03-25 16:11:15.000000000 +0000
-@@ -32,7 +32,9 @@ struct iscsi_segment;
+diff -r 9608d5473017 drivers/scsi/iscsi_tcp.h
+--- a/drivers/scsi/iscsi_tcp.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/iscsi_tcp.h Wed May 06 16:56:33 2009 +0100
+@@ -32,7 +32,9 @@
typedef int iscsi_segment_done_fn_t(struct iscsi_tcp_conn *,
struct iscsi_segment *);
unsigned char *data;
unsigned int size;
unsigned int copied;
-@@ -95,6 +97,8 @@ struct iscsi_tcp_conn {
+@@ -95,6 +97,8 @@
int error;
ssize_t (*sendpage)(struct socket *, struct page *, int, size_t, int);
};
-@@ -130,4 +134,16 @@ struct iscsi_tcp_task {
+@@ -130,4 +134,16 @@
struct iscsi_data_task unsol_dtask; /* Data-Out header buf */
};
+void iscsi_r2tpool_free(struct iscsi_session *);
+
#endif /* ISCSI_H */
-diff -purN linux-2.6.27/drivers/scsi/libfc/Makefile linux-2.6.27.19-5.1/drivers/scsi/libfc/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/Makefile 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/Makefile Wed May 06 16:56:33 2009 +0100
@@ -0,0 +1,12 @@
+# $Id: Makefile
+
+ fc_lport.o \
+ fc_rport.o \
+ fc_fcp.o
-diff -purN linux-2.6.27/drivers/scsi/libfc/fc_disc.c linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_disc.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_disc.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/fc_disc.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/fc_disc.c Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,845 @@
+/*
+ * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
+ return 0;
+}
+EXPORT_SYMBOL(fc_disc_init);
-diff -purN linux-2.6.27/drivers/scsi/libfc/fc_elsct.c linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_elsct.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_elsct.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/fc_elsct.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/fc_elsct.c Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,71 @@
+/*
+ * Copyright(c) 2008 Intel Corporation. All rights reserved.
+ return 0;
+}
+EXPORT_SYMBOL(fc_elsct_init);
-diff -purN linux-2.6.27/drivers/scsi/libfc/fc_exch.c linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_exch.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_exch.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/fc_exch.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/fc_exch.c Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,1969 @@
+/*
+ * Copyright(c) 2007 Intel Corporation. All rights reserved.
+{
+ kmem_cache_destroy(fc_em_cachep);
+}
-diff -purN linux-2.6.27/drivers/scsi/libfc/fc_fcp.c linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_fcp.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_fcp.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/fc_fcp.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/fc_fcp.c Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,2132 @@
+/*
+ * Copyright(c) 2007 Intel Corporation. All rights reserved.
+
+module_init(libfc_init);
+module_exit(libfc_exit);
-diff -purN linux-2.6.27/drivers/scsi/libfc/fc_frame.c linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_frame.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_frame.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/fc_frame.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/fc_frame.c Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,89 @@
+/*
+ * Copyright(c) 2007 Intel Corporation. All rights reserved.
+ }
+ return fp;
+}
-diff -purN linux-2.6.27/drivers/scsi/libfc/fc_lport.c linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_lport.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_lport.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/fc_lport.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/fc_lport.c Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,1582 @@
+/*
+ * Copyright(c) 2007 Intel Corporation. All rights reserved.
+ return 0;
+}
+EXPORT_SYMBOL(fc_lport_init);
-diff -purN linux-2.6.27/drivers/scsi/libfc/fc_rport.c linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_rport.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_rport.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/fc_rport.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/fc_rport.c Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,1313 @@
+/*
+ * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
+ lport->tt.exch_mgr_reset(lport, rport->port_id, 0);
+}
+EXPORT_SYMBOL(fc_rport_terminate_io);
-diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi/libiscsi.c
---- linux-2.6.27/drivers/scsi/libiscsi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libiscsi.c 2009-03-25 16:11:17.000000000 +0000
-@@ -218,7 +218,12 @@ static int iscsi_prep_scsi_cmd_pdu(struc
+diff -r 9608d5473017 drivers/scsi/libiscsi.c
+--- a/drivers/scsi/libiscsi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/libiscsi.c Wed May 06 16:56:34 2009 +0100
+@@ -218,7 +218,12 @@
hdr->opcode = ISCSI_OP_SCSI_CMD;
hdr->flags = ISCSI_ATTR_SIMPLE;
int_to_scsilun(sc->device->lun, (struct scsi_lun *)hdr->lun);
hdr->cmdsn = cpu_to_be32(session->cmdsn);
session->cmdsn++;
hdr->exp_statsn = cpu_to_be32(conn->exp_statsn);
-@@ -332,6 +337,9 @@ static void iscsi_complete_command(struc
+@@ -332,6 +337,9 @@
struct iscsi_session *session = conn->session;
struct scsi_cmnd *sc = task->sc;
list_del_init(&task->running);
task->state = ISCSI_TASK_COMPLETED;
task->sc = NULL;
-@@ -368,11 +376,12 @@ void __iscsi_get_task(struct iscsi_task
+@@ -368,11 +376,12 @@
}
EXPORT_SYMBOL_GPL(__iscsi_get_task);
void iscsi_put_task(struct iscsi_task *task)
{
-@@ -442,7 +451,12 @@ static int iscsi_prep_mgmt_task(struct i
+@@ -442,7 +451,12 @@
*/
nop->cmdsn = cpu_to_be32(session->cmdsn);
if (hdr->itt != RESERVED_ITT) {
/*
* TODO: We always use immediate, so we never hit this.
* If we start to send tmfs or nops as non-immediate then
-@@ -691,7 +705,13 @@ static int iscsi_handle_reject(struct is
+@@ -691,7 +705,13 @@
if (ntoh24(reject->dlength) >= sizeof(struct iscsi_hdr)) {
memcpy(&rejected_pdu, data, sizeof(struct iscsi_hdr));
iscsi_conn_printk(KERN_ERR, conn,
"itt 0x%x had pdu (op 0x%x) rejected "
"due to DataDigest error.\n", itt,
-@@ -711,7 +731,7 @@ static int iscsi_handle_reject(struct is
+@@ -711,7 +731,7 @@
*
* The session lock must be held.
*/
{
struct iscsi_session *session = conn->session;
uint32_t i;
-@@ -719,12 +739,16 @@ static struct iscsi_task *iscsi_itt_to_t
+@@ -719,12 +739,16 @@
if (itt == RESERVED_ITT)
return NULL;
/**
* __iscsi_complete_pdu - complete pdu
-@@ -750,9 +774,13 @@ int __iscsi_complete_pdu(struct iscsi_co
+@@ -750,9 +774,13 @@
if (rc)
return rc;
itt = ~0U;
debug_scsi("[op 0x%x cid %d itt 0x%x len %d]\n",
-@@ -899,20 +927,25 @@ EXPORT_SYMBOL_GPL(iscsi_complete_pdu);
+@@ -899,20 +927,25 @@
int iscsi_verify_itt(struct iscsi_conn *conn, itt_t itt)
{
struct iscsi_session *session = conn->session;
if (i >= session->cmds_max) {
iscsi_conn_printk(KERN_ERR, conn,
"received invalid itt index %u (max cmds "
-@@ -954,6 +987,38 @@ struct iscsi_task *iscsi_itt_to_ctask(st
+@@ -954,6 +987,38 @@
}
EXPORT_SYMBOL_GPL(iscsi_itt_to_ctask);
void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err)
{
struct iscsi_session *session = conn->session;
-@@ -968,6 +1033,7 @@ void iscsi_conn_failure(struct iscsi_con
+@@ -968,6 +1033,7 @@
if (conn->stop_stage == 0)
session->state = ISCSI_STATE_FAILED;
spin_unlock_irqrestore(&session->lock, flags);
set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx);
iscsi_conn_error(conn->cls_conn, err);
-@@ -1194,15 +1260,13 @@ int iscsi_queuecommand(struct scsi_cmnd
+@@ -1194,15 +1260,13 @@
switch (session->state) {
case ISCSI_STATE_IN_RECOVERY:
reason = FAILURE_SESSION_IN_RECOVERY;
break;
case ISCSI_STATE_TERMINATE:
reason = FAILURE_SESSION_TERMINATE;
-@@ -1267,7 +1331,7 @@ reject:
+@@ -1267,7 +1331,7 @@
spin_unlock(&session->lock);
debug_scsi("cmd 0x%x rejected (%d)\n", sc->cmnd[0], reason);
spin_lock(host->host_lock);
fault:
spin_unlock(&session->lock);
-@@ -1456,7 +1520,7 @@ static void fail_all_commands(struct isc
+@@ -1456,7 +1520,7 @@
if (lun == task->sc->device->lun || lun == -1) {
debug_scsi("failing in progress sc %p itt 0x%x\n",
task->sc, task->itt);
}
}
}
-@@ -1476,12 +1540,12 @@ static void iscsi_start_tx(struct iscsi_
+@@ -1476,12 +1540,12 @@
scsi_queue_work(conn->session->host, &conn->xmitwork);
}
cls_session = starget_to_session(scsi_target(scmd->device));
session = cls_session->dd_data;
-@@ -1494,14 +1558,14 @@ static enum scsi_eh_timer_return iscsi_e
+@@ -1494,14 +1558,14 @@
* We are probably in the middle of iscsi recovery so let
* that complete and handle the error.
*/
goto done;
}
-@@ -1513,20 +1577,21 @@ static enum scsi_eh_timer_return iscsi_e
+@@ -1513,20 +1577,21 @@
*/
if (time_before_eq(conn->last_recv + (conn->recv_timeout * HZ) +
(conn->ping_timeout * HZ), jiffies))
return rc;
}
-@@ -1844,6 +1909,7 @@ void iscsi_pool_free(struct iscsi_pool *
+@@ -1844,6 +1909,7 @@
kfree(q->pool[i]);
if (q->pool)
kfree(q->pool);
}
EXPORT_SYMBOL_GPL(iscsi_pool_free);
-@@ -1860,6 +1926,7 @@ int iscsi_host_add(struct Scsi_Host *sho
+@@ -1860,6 +1926,7 @@
if (!shost->can_queue)
shost->can_queue = ISCSI_DEF_XMIT_CMDS_MAX;
return scsi_add_host(shost, pdev);
}
EXPORT_SYMBOL_GPL(iscsi_host_add);
-@@ -1877,11 +1944,11 @@ struct Scsi_Host *iscsi_host_alloc(struc
+@@ -1877,11 +1944,11 @@
int dd_data_size, uint16_t qdepth)
{
struct Scsi_Host *shost;
if (qdepth > ISCSI_MAX_CMD_PER_LUN || qdepth < 1) {
if (qdepth != 0)
-@@ -1891,22 +1958,43 @@ struct Scsi_Host *iscsi_host_alloc(struc
+@@ -1891,22 +1958,43 @@
qdepth = ISCSI_DEF_CMD_PER_LUN;
}
shost->cmd_per_lun = qdepth;
return shost;
}
EXPORT_SYMBOL_GPL(iscsi_host_alloc);
-
++
+static void iscsi_notify_host_removed(struct iscsi_cls_session *cls_session)
+{
+ iscsi_session_failure(cls_session, ISCSI_ERR_INVALID_HOST);
+}
-+
+
/**
* iscsi_host_remove - remove host and sessions
* @shost: scsi host
scsi_remove_host(shost);
}
EXPORT_SYMBOL_GPL(iscsi_host_remove);
-@@ -1922,6 +2010,27 @@ void iscsi_host_free(struct Scsi_Host *s
+@@ -1921,6 +2009,27 @@
+ scsi_host_put(shost);
}
EXPORT_SYMBOL_GPL(iscsi_host_free);
-
++
+static void iscsi_host_dec_session_cnt(struct Scsi_Host *shost)
+{
+ struct iscsi_host *ihost = shost_priv(shost);
+ spin_unlock_irqrestore(&ihost->lock, flags);
+ scsi_host_put(shost);
+}
-+
+
/**
* iscsi_session_setup - create iscsi cls session and host and session
- * @iscsit: iscsi transport template
-@@ -1942,9 +2051,19 @@ iscsi_session_setup(struct iscsi_transpo
+@@ -1942,9 +2051,19 @@
uint16_t cmds_max, int cmd_task_size,
uint32_t initial_cmdsn, unsigned int id)
{
if (!total_cmds)
total_cmds = ISCSI_DEF_XMIT_CMDS_MAX;
-@@ -1957,7 +2076,7 @@ iscsi_session_setup(struct iscsi_transpo
+@@ -1957,7 +2076,7 @@
printk(KERN_ERR "iscsi: invalid can_queue of %d. can_queue "
"must be a power of two that is at least %d.\n",
total_cmds, ISCSI_TOTAL_CMDS_MIN);
}
if (total_cmds > ISCSI_TOTAL_CMDS_MAX) {
-@@ -1981,7 +2100,7 @@ iscsi_session_setup(struct iscsi_transpo
+@@ -1981,7 +2100,7 @@
cls_session = iscsi_alloc_session(shost, iscsit,
sizeof(struct iscsi_session));
if (!cls_session)
session = cls_session->dd_data;
session->cls_session = cls_session;
session->host = shost;
-@@ -2020,6 +2139,7 @@ iscsi_session_setup(struct iscsi_transpo
+@@ -2020,6 +2139,7 @@
if (iscsi_add_session(cls_session, id))
goto cls_session_fail;
return cls_session;
cls_session_fail:
-@@ -2028,6 +2148,8 @@ module_get_fail:
+@@ -2028,6 +2148,8 @@
iscsi_pool_free(&session->cmdpool);
cmdpool_alloc_fail:
iscsi_free_session(cls_session);
return NULL;
}
EXPORT_SYMBOL_GPL(iscsi_session_setup);
-@@ -2043,6 +2165,7 @@ void iscsi_session_teardown(struct iscsi
+@@ -2043,6 +2165,7 @@
{
struct iscsi_session *session = cls_session->dd_data;
struct module *owner = cls_session->transport->owner;
iscsi_pool_free(&session->cmdpool);
-@@ -2055,6 +2178,8 @@ void iscsi_session_teardown(struct iscsi
+@@ -2055,6 +2178,8 @@
kfree(session->ifacename);
iscsi_destroy_session(cls_session);
module_put(owner);
}
EXPORT_SYMBOL_GPL(iscsi_session_teardown);
-@@ -2334,8 +2459,10 @@ static void iscsi_start_session_recovery
+@@ -2334,8 +2459,10 @@
* flush queues.
*/
spin_lock_bh(&session->lock);
flush_control_queues(session, conn);
spin_unlock_bh(&session->lock);
mutex_unlock(&session->eh_mutex);
-diff -purN linux-2.6.27/drivers/scsi/libsas/sas_ata.c linux-2.6.27.19-5.1/drivers/scsi/libsas/sas_ata.c
---- linux-2.6.27/drivers/scsi/libsas/sas_ata.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libsas/sas_ata.c 2009-03-25 16:11:15.000000000 +0000
-@@ -294,10 +294,10 @@ static void sas_ata_post_internal(struct
+diff -r 9608d5473017 drivers/scsi/libsas/sas_ata.c
+--- a/drivers/scsi/libsas/sas_ata.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/libsas/sas_ata.c Wed May 06 16:56:34 2009 +0100
+@@ -294,10 +294,10 @@
}
}
SAS_DPRINTK("STUB %s\n", __func__);
switch (sc_reg_in) {
-@@ -319,10 +319,10 @@ static int sas_ata_scr_write(struct ata_
+@@ -319,10 +319,10 @@
return 0;
}
SAS_DPRINTK("STUB %s\n", __func__);
switch (sc_reg_in) {
-@@ -398,7 +398,7 @@ void sas_ata_task_abort(struct sas_task
+@@ -398,7 +398,7 @@
/* Bounce SCSI-initiated commands to the SCSI EH */
if (qc->scsicmd) {
scsi_schedule_eh(qc->scsicmd->device->host);
return;
}
-diff -purN linux-2.6.27/drivers/scsi/libsas/sas_internal.h linux-2.6.27.19-5.1/drivers/scsi/libsas/sas_internal.h
---- linux-2.6.27/drivers/scsi/libsas/sas_internal.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libsas/sas_internal.h 2009-03-25 16:11:15.000000000 +0000
-@@ -55,7 +55,7 @@ void sas_unregister_phys(struct sas_ha_s
+diff -r 9608d5473017 drivers/scsi/libsas/sas_internal.h
+--- a/drivers/scsi/libsas/sas_internal.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/libsas/sas_internal.h Wed May 06 16:56:34 2009 +0100
+@@ -55,7 +55,7 @@
int sas_register_ports(struct sas_ha_struct *sas_ha);
void sas_unregister_ports(struct sas_ha_struct *sas_ha);
int sas_init_queue(struct sas_ha_struct *sas_ha);
int sas_init_events(struct sas_ha_struct *sas_ha);
-diff -purN linux-2.6.27/drivers/scsi/libsas/sas_scsi_host.c linux-2.6.27.19-5.1/drivers/scsi/libsas/sas_scsi_host.c
---- linux-2.6.27/drivers/scsi/libsas/sas_scsi_host.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libsas/sas_scsi_host.c 2009-03-25 16:11:15.000000000 +0000
-@@ -673,43 +673,43 @@ out:
+diff -r 9608d5473017 drivers/scsi/libsas/sas_scsi_host.c
+--- a/drivers/scsi/libsas/sas_scsi_host.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/libsas/sas_scsi_host.c Wed May 06 16:56:34 2009 +0100
+@@ -673,43 +673,43 @@
return;
}
}
int sas_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
-@@ -1039,7 +1039,7 @@ void sas_task_abort(struct sas_task *tas
+@@ -1039,7 +1039,7 @@
return;
}
scsi_schedule_eh(sc->device->host);
}
-diff -purN linux-2.6.27/drivers/scsi/lpfc/Makefile linux-2.6.27.19-5.1/drivers/scsi/lpfc/Makefile
---- linux-2.6.27/drivers/scsi/lpfc/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/Makefile 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/Makefile
+--- a/drivers/scsi/lpfc/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/Makefile Wed May 06 16:56:34 2009 +0100
@@ -1,7 +1,7 @@
#/*******************************************************************
# * This file is part of the Emulex Linux Device Driver for *
# * EMULEX and SLI are trademarks of Emulex. *
# * www.emulex.com *
# * *
-@@ -28,4 +28,5 @@ obj-$(CONFIG_SCSI_LPFC) := lpfc.o
+@@ -28,4 +28,5 @@
lpfc-objs := lpfc_mem.o lpfc_sli.o lpfc_ct.o lpfc_els.o lpfc_hbadisc.o \
lpfc_init.o lpfc_mbox.o lpfc_nportdisc.o lpfc_scsi.o lpfc_attr.o \
- lpfc_vport.o lpfc_debugfs.o
+ lpfc_vport.o lpfc_debugfs.o lpfc_security.o lpfc_auth_access.o \
+ lpfc_auth.o lpfc_ioctl.o lpfc_menlo.o
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc.h 2009-03-25 16:11:16.000000000 +0000
-@@ -34,7 +34,14 @@ struct lpfc_sli2_slim;
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc.h
+--- a/drivers/scsi/lpfc/lpfc.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc.h Wed May 06 16:56:34 2009 +0100
+@@ -34,7 +34,14 @@
#define LPFC_IOCB_LIST_CNT 2250 /* list of IOCBs for fast-path usage. */
#define LPFC_Q_RAMP_UP_INTERVAL 120 /* lun q_depth ramp up interval */
#define LPFC_VNAME_LEN 100 /* vport symbolic name length */
/*
* Following time intervals are used of adjusting SCSI device
* queue depths when there are driver resource error or Firmware
-@@ -49,6 +56,9 @@ struct lpfc_sli2_slim;
+@@ -49,6 +56,9 @@
#define LPFC_HB_MBOX_INTERVAL 5 /* Heart beat interval in seconds. */
#define LPFC_HB_MBOX_TIMEOUT 30 /* Heart beat timeout in seconds. */
/* Define macros for 64 bit support */
#define putPaddrLow(addr) ((uint32_t) (0xffffffff & (u64)(addr)))
#define putPaddrHigh(addr) ((uint32_t) (0xffffffff & (((u64)(addr))>>32)))
-@@ -60,6 +70,12 @@ struct lpfc_sli2_slim;
+@@ -59,6 +69,12 @@
+ #define FC_MAX_ADPTMSG 64
#define MAX_HBAEVT 32
-
++
+/* Number of MSI-X vectors the driver uses */
+#define LPFC_MSIX_VECTORS 2
+
+/* Active interrupt test threshold */
+#define LPFC_INTR_THRESHOLD 1
-+
+
/* lpfc wait event data ready flag */
#define LPFC_DATA_READY (1<<0)
-
-@@ -204,18 +220,81 @@ struct lpfc_stats {
+@@ -204,17 +220,80 @@
uint32_t fcpLocalErr;
};
+ uint32_t extoff;
+ struct lpfc_dmabuf * txmit_buff;
+ struct lpfc_dmabuf * rcv_buff;
-+};
+ };
+#define MENLO_DID 0x0000FC0E
+
+enum sysfs_menlo_state {
+ struct lpfc_menlo_genreq64 cx;
+ pid_t pid;
+ struct list_head list;
- };
-
++};
+
- struct lpfc_hba;
+ struct lpfc_hba;
-@@ -248,6 +327,57 @@ enum hba_state {
+@@ -246,6 +325,57 @@
+ * CLEAR_LA */
+ LPFC_HBA_READY = 32,
LPFC_HBA_ERROR = -1
- };
-
++};
++
+enum auth_state {
+ LPFC_AUTH_UNKNOWN = 0,
+ LPFC_AUTH_SUCCESS = 1,
+ uint32_t dh_pub_key_len;
+
+ unsigned long last_auth;
-+};
-+
+ };
+
struct lpfc_vport {
- struct list_head listentry;
- struct lpfc_hba *phba;
-@@ -341,7 +471,14 @@ struct lpfc_vport {
+@@ -341,7 +471,14 @@
uint8_t load_flag;
#define FC_LOADING 0x1 /* HBA in process of loading drvr */
#define FC_UNLOADING 0x2 /* HBA in process of unloading drvr */
/* Vport Config Parameters */
uint32_t cfg_scan_down;
-@@ -357,6 +494,8 @@ struct lpfc_vport {
+@@ -357,6 +494,8 @@
uint32_t cfg_log_verbose;
uint32_t cfg_max_luns;
uint32_t cfg_enable_da_id;
uint32_t dev_loss_tmo_changed;
-@@ -369,6 +508,8 @@ struct lpfc_vport {
+@@ -369,6 +508,8 @@
struct lpfc_debugfs_trc *disc_trc;
atomic_t disc_trc_cnt;
#endif
};
struct hbq_s {
-@@ -407,10 +548,11 @@ struct lpfc_hba {
+@@ -407,10 +548,11 @@
struct lpfc_sli sli;
uint32_t sli_rev; /* SLI2 or SLI3 */
uint32_t sli3_options; /* Mask of enabled SLI3 options */
uint32_t iocb_cmd_size;
uint32_t iocb_rsp_size;
-@@ -422,10 +564,21 @@ struct lpfc_hba {
+@@ -422,10 +564,21 @@
#define LS_NPIV_FAB_SUPPORTED 0x2 /* Fabric supports NPIV */
#define LS_IGNORE_ERATT 0x4 /* intr handler should ignore ERATT */
- struct lpfc_sli2_slim *slim2p;
-- struct lpfc_dmabuf hbqslimp;
+ uint32_t hba_flag; /* hba generic flags */
+#define HBA_ERATT_HANDLED 0x1 /* This flag is set when eratt handled */
+
+ struct lpfc_dmabuf slim2p;
-
-- dma_addr_t slim2p_mapping;
++
+ MAILBOX_t *mbox;
+ uint32_t *mbox_ext;
+ uint32_t *inb_ha_copy;
+ struct _PCB *pcb;
+ struct _IOCB *IOCBs;
+
-+ struct lpfc_dmabuf hbqslimp;
+ struct lpfc_dmabuf hbqslimp;
+-
+- dma_addr_t slim2p_mapping;
uint16_t pci_cfg_value;
-@@ -480,6 +633,8 @@ struct lpfc_hba {
+@@ -480,6 +633,8 @@
uint32_t cfg_hba_queue_depth;
uint32_t cfg_enable_hba_reset;
uint32_t cfg_enable_hba_heartbeat;
lpfc_vpd_t vpd; /* vital product data */
-@@ -492,7 +647,7 @@ struct lpfc_hba {
+@@ -492,7 +647,7 @@
wait_queue_head_t work_waitq;
struct task_struct *worker_thread;
uint32_t hbq_in_use; /* HBQs in use flag */
struct list_head hbqbuf_in_list; /* in-fly hbq buffer list */
-@@ -514,6 +669,7 @@ struct lpfc_hba {
+@@ -514,6 +669,7 @@
void __iomem *HCregaddr; /* virtual address for host ctl reg */
struct lpfc_hgp __iomem *host_gp; /* Host side get/put pointers */
uint32_t __iomem *hbq_put; /* Address in SLIM to HBQ put ptrs */
uint32_t *hbq_get; /* Host mem address of HBQ get ptrs */
-@@ -536,6 +692,7 @@ struct lpfc_hba {
+@@ -536,6 +692,7 @@
uint8_t soft_wwn_enable;
struct timer_list fcp_poll_timer;
/*
* stat counters
-@@ -544,7 +701,9 @@ struct lpfc_hba {
+@@ -544,7 +701,9 @@
uint64_t fc4OutputRequests;
uint64_t fc4ControlRequests;
/* fastpath list. */
spinlock_t scsi_buf_list_lock;
-@@ -565,12 +724,16 @@ struct lpfc_hba {
+@@ -565,12 +724,16 @@
struct fc_host_statistics link_stats;
enum intr_type_t intr_type;
unsigned long *vpi_bmask; /* vpi allocation table */
/* Data structure used by fabric iocb scheduler */
-@@ -605,6 +768,7 @@ struct lpfc_hba {
+@@ -605,6 +768,7 @@
unsigned long last_completion_time;
struct timer_list hb_tmofunc;
uint8_t hb_outstanding;
/* ndlp reference management */
spinlock_t ndlp_lock;
/*
-@@ -613,7 +777,19 @@ struct lpfc_hba {
+@@ -613,7 +777,19 @@
*/
#define QUE_BUFTAG_BIT (1<<31)
uint32_t buffer_tag_count;
};
static inline struct Scsi_Host *
-@@ -650,15 +826,25 @@ lpfc_worker_wake_up(struct lpfc_hba *phb
+@@ -650,15 +826,25 @@
return;
}
-#define FC_REG_DUMP_EVENT 0x10 /* Register for Dump events */
-#define FC_REG_TEMPERATURE_EVENT 0x20 /* Register for temperature
- event */
--
--struct temp_event {
-- uint32_t event_type;
-- uint32_t event_code;
-- uint32_t data;
--};
--#define LPFC_CRIT_TEMP 0x1
--#define LPFC_THRESHOLD_TEMP 0x2
--#define LPFC_NORMAL_TEMP 0x3
+static inline void
+lpfc_sli_read_hs(struct lpfc_hba *phba)
+{
+ * the error event and process it.
+ */
+ phba->sli.slistat.err_attn_event++;
-+
+
+-struct temp_event {
+- uint32_t event_type;
+- uint32_t event_code;
+- uint32_t data;
+-};
+-#define LPFC_CRIT_TEMP 0x1
+-#define LPFC_THRESHOLD_TEMP 0x2
+-#define LPFC_NORMAL_TEMP 0x3
+ /* Save status info */
+ phba->work_hs = readl(phba->HSregaddr);
+ phba->work_status[0] = readl(phba->MBslimaddr + 0xa8);
+ return;
+}
+
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_attr.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_attr.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_attr.c
+--- a/drivers/scsi/lpfc/lpfc_attr.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_attr.c Wed May 06 16:56:34 2009 +0100
@@ -1,7 +1,7 @@
/*******************************************************************
* This file is part of the Emulex Linux Device Driver for *
static void
lpfc_jedec_to_ascii(int incr, char hdw[])
{
-@@ -65,6 +92,14 @@ lpfc_jedec_to_ascii(int incr, char hdw[]
+@@ -65,6 +92,14 @@
return;
}
static ssize_t
lpfc_drvr_version_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -72,6 +107,14 @@ lpfc_drvr_version_show(struct device *de
+@@ -72,6 +107,14 @@
return snprintf(buf, PAGE_SIZE, LPFC_MODULE_DESC "\n");
}
static ssize_t
lpfc_info_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -81,6 +124,14 @@ lpfc_info_show(struct device *dev, struc
+@@ -81,6 +124,14 @@
return snprintf(buf, PAGE_SIZE, "%s\n",lpfc_info(host));
}
static ssize_t
lpfc_serialnum_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -92,6 +143,18 @@ lpfc_serialnum_show(struct device *dev,
+@@ -92,6 +143,18 @@
return snprintf(buf, PAGE_SIZE, "%s\n",phba->SerialNumber);
}
static ssize_t
lpfc_temp_sensor_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -102,6 +165,14 @@ lpfc_temp_sensor_show(struct device *dev
+@@ -102,6 +165,14 @@
return snprintf(buf, PAGE_SIZE, "%d\n",phba->temp_sensor_support);
}
static ssize_t
lpfc_modeldesc_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -113,6 +184,14 @@ lpfc_modeldesc_show(struct device *dev,
+@@ -113,6 +184,14 @@
return snprintf(buf, PAGE_SIZE, "%s\n",phba->ModelDesc);
}
static ssize_t
lpfc_modelname_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -124,6 +203,14 @@ lpfc_modelname_show(struct device *dev,
+@@ -124,6 +203,14 @@
return snprintf(buf, PAGE_SIZE, "%s\n",phba->ModelName);
}
static ssize_t
lpfc_programtype_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -135,6 +222,33 @@ lpfc_programtype_show(struct device *dev
+@@ -135,6 +222,33 @@
return snprintf(buf, PAGE_SIZE, "%s\n",phba->ProgramType);
}
static ssize_t
lpfc_vportnum_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -146,6 +260,14 @@ lpfc_vportnum_show(struct device *dev, s
+@@ -146,6 +260,14 @@
return snprintf(buf, PAGE_SIZE, "%s\n",phba->Port);
}
static ssize_t
lpfc_fwrev_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -159,6 +281,14 @@ lpfc_fwrev_show(struct device *dev, stru
+@@ -159,6 +281,14 @@
return snprintf(buf, PAGE_SIZE, "%s, sli-%d\n", fwrev, phba->sli_rev);
}
static ssize_t
lpfc_hdw_show(struct device *dev, struct device_attribute *attr, char *buf)
{
-@@ -171,6 +301,15 @@ lpfc_hdw_show(struct device *dev, struct
+@@ -171,6 +301,15 @@
lpfc_jedec_to_ascii(vp->rev.biuRev, hdw);
return snprintf(buf, PAGE_SIZE, "%s\n", hdw);
}
static ssize_t
lpfc_option_rom_version_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -181,6 +320,18 @@ lpfc_option_rom_version_show(struct devi
+@@ -181,6 +320,18 @@
return snprintf(buf, PAGE_SIZE, "%s\n", phba->OptionROMVersion);
}
static ssize_t
lpfc_link_state_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -232,8 +383,10 @@ lpfc_link_state_show(struct device *dev,
+@@ -232,8 +383,10 @@
"Unknown\n");
break;
}
if (vport->fc_flag & FC_PUBLIC_LOOP)
len += snprintf(buf + len, PAGE_SIZE-len,
" Public Loop\n");
-@@ -253,6 +406,18 @@ lpfc_link_state_show(struct device *dev,
+@@ -253,6 +406,18 @@
return len;
}
static ssize_t
lpfc_num_discovered_ports_show(struct device *dev,
struct device_attribute *attr, char *buf)
-@@ -264,7 +429,20 @@ lpfc_num_discovered_ports_show(struct de
+@@ -264,7 +429,20 @@
vport->fc_map_cnt + vport->fc_unmap_cnt);
}
static int
lpfc_issue_lip(struct Scsi_Host *shost)
{
-@@ -306,6 +484,21 @@ lpfc_issue_lip(struct Scsi_Host *shost)
+@@ -306,6 +484,21 @@
return 0;
}
static int
lpfc_do_offline(struct lpfc_hba *phba, uint32_t type)
{
-@@ -353,7 +546,23 @@ lpfc_do_offline(struct lpfc_hba *phba, u
+@@ -353,7 +546,23 @@
return 0;
}
lpfc_selective_reset(struct lpfc_hba *phba)
{
struct completion online_compl;
-@@ -378,6 +587,27 @@ lpfc_selective_reset(struct lpfc_hba *ph
+@@ -378,6 +587,27 @@
return 0;
}
static ssize_t
lpfc_issue_reset(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
-@@ -397,6 +627,14 @@ lpfc_issue_reset(struct device *dev, str
+@@ -397,6 +627,14 @@
return status;
}
static ssize_t
lpfc_nport_evt_cnt_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -408,6 +646,14 @@ lpfc_nport_evt_cnt_show(struct device *d
+@@ -408,6 +646,14 @@
return snprintf(buf, PAGE_SIZE, "%d\n", phba->nport_event_cnt);
}
static ssize_t
lpfc_board_mode_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -429,6 +675,19 @@ lpfc_board_mode_show(struct device *dev,
+@@ -429,6 +675,19 @@
return snprintf(buf, PAGE_SIZE, "%s\n", state);
}
static ssize_t
lpfc_board_mode_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
-@@ -462,6 +721,24 @@ lpfc_board_mode_store(struct device *dev
+@@ -462,6 +721,24 @@
return -EIO;
}
static int
lpfc_get_hba_info(struct lpfc_hba *phba,
uint32_t *mxri, uint32_t *axri,
-@@ -524,6 +801,20 @@ lpfc_get_hba_info(struct lpfc_hba *phba,
+@@ -524,6 +801,20 @@
return 1;
}
static ssize_t
lpfc_max_rpi_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -538,6 +829,20 @@ lpfc_max_rpi_show(struct device *dev, st
+@@ -538,6 +829,20 @@
return snprintf(buf, PAGE_SIZE, "Unknown\n");
}
static ssize_t
lpfc_used_rpi_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -552,6 +857,20 @@ lpfc_used_rpi_show(struct device *dev, s
+@@ -552,6 +857,20 @@
return snprintf(buf, PAGE_SIZE, "Unknown\n");
}
static ssize_t
lpfc_max_xri_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -566,6 +885,20 @@ lpfc_max_xri_show(struct device *dev, st
+@@ -566,6 +885,20 @@
return snprintf(buf, PAGE_SIZE, "Unknown\n");
}
static ssize_t
lpfc_used_xri_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -580,6 +913,20 @@ lpfc_used_xri_show(struct device *dev, s
+@@ -580,6 +913,20 @@
return snprintf(buf, PAGE_SIZE, "Unknown\n");
}
static ssize_t
lpfc_max_vpi_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -594,6 +941,20 @@ lpfc_max_vpi_show(struct device *dev, st
+@@ -594,6 +941,20 @@
return snprintf(buf, PAGE_SIZE, "Unknown\n");
}
static ssize_t
lpfc_used_vpi_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -608,6 +969,19 @@ lpfc_used_vpi_show(struct device *dev, s
+@@ -608,6 +969,19 @@
return snprintf(buf, PAGE_SIZE, "Unknown\n");
}
static ssize_t
lpfc_npiv_info_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -623,6 +997,17 @@ lpfc_npiv_info_show(struct device *dev,
+@@ -623,6 +997,17 @@
return snprintf(buf, PAGE_SIZE, "NPIV Virtual (VPI %d)\n", vport->vpi);
}
static ssize_t
lpfc_poll_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -634,6 +1019,20 @@ lpfc_poll_show(struct device *dev, struc
+@@ -634,6 +1019,20 @@
return snprintf(buf, PAGE_SIZE, "%#x\n", phba->cfg_poll);
}
static ssize_t
lpfc_poll_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
-@@ -692,6 +1091,166 @@ lpfc_poll_store(struct device *dev, stru
+@@ -692,6 +1091,166 @@
return strlen(buf);
}
#define lpfc_param_show(attr) \
static ssize_t \
lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
-@@ -706,6 +1265,20 @@ lpfc_##attr##_show(struct device *dev, s
+@@ -706,6 +1265,20 @@
phba->cfg_##attr);\
}
#define lpfc_param_hex_show(attr) \
static ssize_t \
lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
-@@ -720,6 +1293,25 @@ lpfc_##attr##_show(struct device *dev, s
+@@ -720,6 +1293,25 @@
phba->cfg_##attr);\
}
#define lpfc_param_init(attr, default, minval, maxval) \
static int \
lpfc_##attr##_init(struct lpfc_hba *phba, int val) \
-@@ -735,6 +1327,26 @@ lpfc_##attr##_init(struct lpfc_hba *phba
+@@ -735,6 +1327,26 @@
return -EINVAL;\
}
#define lpfc_param_set(attr, default, minval, maxval) \
static int \
lpfc_##attr##_set(struct lpfc_hba *phba, int val) \
-@@ -749,6 +1361,27 @@ lpfc_##attr##_set(struct lpfc_hba *phba,
+@@ -749,6 +1361,27 @@
return -EINVAL;\
}
#define lpfc_param_store(attr) \
static ssize_t \
lpfc_##attr##_store(struct device *dev, struct device_attribute *attr, \
-@@ -768,6 +1401,20 @@ lpfc_##attr##_store(struct device *dev,
+@@ -768,6 +1401,20 @@
return -EINVAL;\
}
#define lpfc_vport_param_show(attr) \
static ssize_t \
lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
-@@ -780,6 +1427,21 @@ lpfc_##attr##_show(struct device *dev, s
+@@ -780,6 +1427,21 @@
return snprintf(buf, PAGE_SIZE, "%d\n", vport->cfg_##attr);\
}
#define lpfc_vport_param_hex_show(attr) \
static ssize_t \
lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
-@@ -792,6 +1454,24 @@ lpfc_##attr##_show(struct device *dev, s
+@@ -792,6 +1454,24 @@
return snprintf(buf, PAGE_SIZE, "%#x\n", vport->cfg_##attr);\
}
#define lpfc_vport_param_init(attr, default, minval, maxval) \
static int \
lpfc_##attr##_init(struct lpfc_vport *vport, int val) \
-@@ -801,12 +1481,29 @@ lpfc_##attr##_init(struct lpfc_vport *vp
+@@ -801,12 +1481,29 @@
return 0;\
}\
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, \
#define lpfc_vport_param_set(attr, default, minval, maxval) \
static int \
lpfc_##attr##_set(struct lpfc_vport *vport, int val) \
-@@ -816,11 +1513,28 @@ lpfc_##attr##_set(struct lpfc_vport *vpo
+@@ -816,11 +1513,28 @@
return 0;\
}\
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, \
#define lpfc_vport_param_store(attr) \
static ssize_t \
lpfc_##attr##_store(struct device *dev, struct device_attribute *attr, \
-@@ -941,6 +1655,7 @@ static DEVICE_ATTR(option_rom_version, S
+@@ -941,6 +1655,7 @@
lpfc_option_rom_version_show, NULL);
static DEVICE_ATTR(num_discovered_ports, S_IRUGO,
lpfc_num_discovered_ports_show, NULL);
static DEVICE_ATTR(nport_evt_cnt, S_IRUGO, lpfc_nport_evt_cnt_show, NULL);
static DEVICE_ATTR(lpfc_drvr_version, S_IRUGO, lpfc_drvr_version_show, NULL);
static DEVICE_ATTR(board_mode, S_IRUGO | S_IWUSR,
-@@ -954,10 +1669,66 @@ static DEVICE_ATTR(max_xri, S_IRUGO, lpf
+@@ -954,10 +1669,66 @@
static DEVICE_ATTR(used_xri, S_IRUGO, lpfc_used_xri_show, NULL);
static DEVICE_ATTR(npiv_info, S_IRUGO, lpfc_npiv_info_show, NULL);
static DEVICE_ATTR(lpfc_temp_sensor, S_IRUGO, lpfc_temp_sensor_show, NULL);
+-
+static DEVICE_ATTR(auth_state, S_IRUGO, lpfc_auth_state_show, NULL);
+static DEVICE_ATTR(auth_dir, S_IRUGO, lpfc_auth_dir_show, NULL);
+static DEVICE_ATTR(auth_protocol, S_IRUGO, lpfc_auth_protocol_show, NULL);
+ j = 0;
+ }
+ }
-
++
+ return 0;
+}
static ssize_t
lpfc_soft_wwn_enable_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
-@@ -994,6 +1765,14 @@ lpfc_soft_wwn_enable_store(struct device
+@@ -994,6 +1765,14 @@
static DEVICE_ATTR(lpfc_soft_wwn_enable, S_IWUSR, NULL,
lpfc_soft_wwn_enable_store);
static ssize_t
lpfc_soft_wwpn_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -1006,7 +1785,19 @@ lpfc_soft_wwpn_show(struct device *dev,
+@@ -1006,7 +1785,19 @@
(unsigned long long)phba->cfg_soft_wwpn);
}
static ssize_t
lpfc_soft_wwpn_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
-@@ -1080,6 +1871,14 @@ lpfc_soft_wwpn_store(struct device *dev,
+@@ -1080,6 +1871,14 @@
static DEVICE_ATTR(lpfc_soft_wwpn, S_IRUGO | S_IWUSR,\
lpfc_soft_wwpn_show, lpfc_soft_wwpn_store);
static ssize_t
lpfc_soft_wwnn_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -1090,7 +1889,16 @@ lpfc_soft_wwnn_show(struct device *dev,
+@@ -1090,7 +1889,16 @@
(unsigned long long)phba->cfg_soft_wwnn);
}
static ssize_t
lpfc_soft_wwnn_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
-@@ -1178,6 +1986,15 @@ module_param(lpfc_nodev_tmo, int, 0);
+@@ -1178,6 +1986,15 @@
MODULE_PARM_DESC(lpfc_nodev_tmo,
"Seconds driver will hold I/O waiting "
"for a device to come back");
static ssize_t
lpfc_nodev_tmo_show(struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -1189,6 +2006,21 @@ lpfc_nodev_tmo_show(struct device *dev,
+@@ -1189,6 +2006,21 @@
return snprintf(buf, PAGE_SIZE, "%d\n", vport->cfg_devloss_tmo);
}
static int
lpfc_nodev_tmo_init(struct lpfc_vport *vport, int val)
{
-@@ -1196,7 +2028,7 @@ lpfc_nodev_tmo_init(struct lpfc_vport *v
+@@ -1196,7 +2028,7 @@
vport->cfg_nodev_tmo = vport->cfg_devloss_tmo;
if (val != LPFC_DEF_DEVLOSS_TMO)
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
"parameter because devloss_tmo is "
"set.\n");
return 0;
-@@ -1215,6 +2047,13 @@ lpfc_nodev_tmo_init(struct lpfc_vport *v
+@@ -1215,6 +2047,13 @@
return -EINVAL;
}
static void
lpfc_update_rport_devloss_tmo(struct lpfc_vport *vport)
{
-@@ -1229,6 +2068,21 @@ lpfc_update_rport_devloss_tmo(struct lpf
+@@ -1229,6 +2068,21 @@
spin_unlock_irq(shost->host_lock);
}
static int
lpfc_nodev_tmo_set(struct lpfc_vport *vport, int val)
{
-@@ -1256,6 +2110,87 @@ lpfc_vport_param_store(nodev_tmo)
+@@ -1256,6 +2110,87 @@
static DEVICE_ATTR(lpfc_nodev_tmo, S_IRUGO | S_IWUSR,
lpfc_nodev_tmo_show, lpfc_nodev_tmo_store);
/*
# lpfc_devloss_tmo: If set, it will hold all I/O errors on devices that
-@@ -1269,6 +2204,21 @@ MODULE_PARM_DESC(lpfc_devloss_tmo,
+@@ -1269,6 +2204,21 @@
lpfc_vport_param_init(devloss_tmo, LPFC_DEF_DEVLOSS_TMO,
LPFC_MIN_DEVLOSS_TMO, LPFC_MAX_DEVLOSS_TMO)
lpfc_vport_param_show(devloss_tmo)
static int
lpfc_devloss_tmo_set(struct lpfc_vport *vport, int val)
{
-@@ -1327,6 +2277,16 @@ LPFC_VPORT_ATTR_R(lun_queue_depth, 30, 1
+@@ -1327,6 +2277,16 @@
"Max number of FCP commands we can queue to a specific LUN");
/*
# hba_queue_depth: This parameter is used to limit the number of outstanding
# commands per lpfc HBA. Value range is [32,8192]. If this parameter
# value is greater than the maximum number of exchanges supported by the HBA,
-@@ -1366,12 +2326,27 @@ MODULE_PARM_DESC(lpfc_restrict_login,
+@@ -1366,12 +2326,27 @@
"Restrict virtual ports login to remote initiators.");
lpfc_vport_param_show(restrict_login);
"be set to %d, allowed range is [0, 1]\n",
val);
vport->cfg_restrict_login = 1;
-@@ -1385,12 +2360,28 @@ lpfc_restrict_login_init(struct lpfc_vpo
+@@ -1385,12 +2360,28 @@
return 0;
}
"be set to %d, allowed range is [0, 1]\n",
val);
vport->cfg_restrict_login = 1;
-@@ -1441,18 +2432,58 @@ LPFC_VPORT_ATTR_R(scan_down, 1, 0, 1,
+@@ -1441,18 +2432,58 @@
# Set loop mode if you want to run as an NL_Port. Value range is [0,0x6].
# Default value is 0.
*/
-static int
-lpfc_topology_set(struct lpfc_hba *phba, int val)
+-{
+
+/**
+ * lpfc_topology_set: Set the adapters topology field.
+static ssize_t
+lpfc_topology_store(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
- {
++{
+ struct Scsi_Host *shost = class_to_shost(dev);
+ struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
+ struct lpfc_hba *phba = vport->phba;
}
lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
"%d:0467 lpfc_topology attribute cannot be set to %d, "
-@@ -1465,109 +2496,535 @@ module_param(lpfc_topology, int, 0);
+@@ -1465,9 +2496,337 @@
MODULE_PARM_DESC(lpfc_topology, "Select Fibre Channel topology");
lpfc_param_show(topology)
lpfc_param_init(topology, 0, 0, 6)
-lpfc_param_store(topology)
static DEVICE_ATTR(lpfc_topology, S_IRUGO | S_IWUSR,
lpfc_topology_show, lpfc_topology_store);
-
--/*
--# lpfc_link_speed: Link speed selection for initializing the Fibre Channel
--# connection.
--# 0 = auto select (default)
--# 1 = 1 Gigabaud
--# 2 = 2 Gigabaud
--# 4 = 4 Gigabaud
--# 8 = 8 Gigabaud
--# Value range is [0,8]. Default value is 0.
--*/
--static int
--lpfc_link_speed_set(struct lpfc_hba *phba, int val)
++
+
+/**
+ * lpfc_stat_data_ctrl_store: write call back for lpfc_stat_data_ctrl
+static ssize_t
+lpfc_stat_data_ctrl_store(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
- {
-- int err;
-- uint32_t prev_val;
++{
+ struct Scsi_Host *shost = class_to_shost(dev);
+ struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
+ struct lpfc_hba *phba = vport->phba;
+ struct Scsi_Host *v_shost;
+ char *bucket_type_str, *base_str, *step_str;
+ unsigned long base, step, bucket_type;
-
-- if (((val == LINK_SPEED_1G) && !(phba->lmt & LMT_1Gb)) ||
-- ((val == LINK_SPEED_2G) && !(phba->lmt & LMT_2Gb)) ||
-- ((val == LINK_SPEED_4G) && !(phba->lmt & LMT_4Gb)) ||
-- ((val == LINK_SPEED_8G) && !(phba->lmt & LMT_8Gb)) ||
-- ((val == LINK_SPEED_10G) && !(phba->lmt & LMT_10Gb)))
-- return -EINVAL;
++
+ if (!strncmp(buf, "setbucket", strlen("setbucket"))) {
+ if (strlen(buf) > LPFC_MAX_DATA_CTRL_LEN)
+ return -EINVAL;
-
-- if ((val >= 0 && val <= LPFC_MAX_LINK_SPEED)
-- && (LPFC_LINK_SPEED_BITMAP & (1 << val))) {
-- prev_val = phba->cfg_link_speed;
-- phba->cfg_link_speed = val;
-- err = lpfc_issue_lip(lpfc_shost_from_vport(phba->pport));
-- if (err)
-- phba->cfg_link_speed = prev_val;
-- return err;
-- }
++
+ strcpy(bucket_data, buf);
+ str_ptr = &bucket_data[0];
+ /* Ignore this token - this is command token */
+ token = strsep(&str_ptr, "\t ");
+ if (!token)
+ return -EINVAL;
-
-- lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
-- "%d:0469 lpfc_link_speed attribute cannot be set to %d, "
-- "allowed range is [0, 8]\n",
-- phba->brd_no, val);
-- return -EINVAL;
--}
++
+ bucket_type_str = strsep(&str_ptr, "\t ");
+ if (!bucket_type_str)
+ return -EINVAL;
-
--static int lpfc_link_speed = 0;
--module_param(lpfc_link_speed, int, 0);
--MODULE_PARM_DESC(lpfc_link_speed, "Select link speed");
--lpfc_param_show(link_speed)
--static int
--lpfc_link_speed_init(struct lpfc_hba *phba, int val)
--{
-- if ((val >= 0 && val <= LPFC_MAX_LINK_SPEED)
-- && (LPFC_LINK_SPEED_BITMAP & (1 << val))) {
-- phba->cfg_link_speed = val;
-- return 0;
-- }
-- lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
-- "0454 lpfc_link_speed attribute cannot "
-- "be set to %d, allowed values are "
-- "["LPFC_LINK_SPEED_STRING"]\n", val);
-- phba->cfg_link_speed = 0;
-- return -EINVAL;
--}
++
+ if (!strncmp(bucket_type_str, "linear", strlen("linear")))
+ bucket_type = LPFC_LINEAR_BUCKET;
+ else if (!strncmp(bucket_type_str, "power2", strlen("power2")))
+ bucket_type = LPFC_POWER2_BUCKET;
+ else
+ return -EINVAL;
-
--lpfc_param_store(link_speed)
--static DEVICE_ATTR(lpfc_link_speed, S_IRUGO | S_IWUSR,
-- lpfc_link_speed_show, lpfc_link_speed_store);
++
+ base_str = strsep(&str_ptr, "\t ");
+ if (!base_str)
+ return -EINVAL;
+ base = simple_strtoul(base_str, NULL, 0);
-
--/*
--# lpfc_fcp_class: Determines FC class to use for the FCP protocol.
--# Value range is [2,3]. Default value is 3.
--*/
--LPFC_VPORT_ATTR_R(fcp_class, 3, 2, 3,
-- "Select Fibre Channel class of service for FCP sequences");
++
+ step_str = strsep(&str_ptr, "\t ");
+ if (!step_str)
+ return -EINVAL;
+ step = simple_strtoul(step_str, NULL, 0);
+ if (!step)
+ return -EINVAL;
-
--/*
--# lpfc_use_adisc: Use ADISC for FCP rediscovery instead of PLOGI. Value range
--# is [0,1]. Default value is 0.
--*/
--LPFC_VPORT_ATTR_RW(use_adisc, 0, 0, 1,
-- "Use ADISC on rediscovery to authenticate FCP devices");
++
+ /* Block the data collection for every vport */
+ vports = lpfc_create_vport_work_array(phba);
+ if (vports == NULL)
+ return -ENOMEM;
-
--/*
--# lpfc_ack0: Use ACK0, instead of ACK1 for class 2 acknowledgement. Value
--# range is [0,1]. Default value is 0.
--*/
--LPFC_ATTR_R(ack0, 0, 0, 1, "Enable ACK0 support");
++
+ for (i = 0; i <= phba->max_vpi && vports[i] != NULL; i++) {
+ v_shost = lpfc_shost_from_vport(vports[i]);
+ spin_lock_irq(v_shost->host_lock);
+ lpfc_vport_reset_stat_data(vports[i]);
+ spin_unlock_irq(v_shost->host_lock);
+ }
-
--/*
--# lpfc_cr_delay & lpfc_cr_count: Default values for I/O colaesing
--# cr_delay (msec) or cr_count outstanding commands. cr_delay can take
--# value [0,63]. cr_count can take value [1,255]. Default value of cr_delay
--# is 0. Default value of cr_count is 1. The cr_count feature is disabled if
--# cr_delay is set to 0.
--*/
--LPFC_ATTR_RW(cr_delay, 0, 0, 63, "A count of milliseconds after which an "
-- "interrupt response is generated");
++
+ /* Set the bucket attributes */
+ phba->bucket_type = bucket_type;
+ phba->bucket_base = base;
+ lpfc_destroy_vport_work_array(phba, vports);
+ return strlen(buf);
+ }
-
--LPFC_ATTR_RW(cr_count, 1, 1, 255, "A count of I/O completions after which an "
-- "interrupt response is generated");
++
+ if (!strncmp(buf, "destroybucket", strlen("destroybucket"))) {
+ vports = lpfc_create_vport_work_array(phba);
+ if (vports == NULL)
+ return -ENOMEM;
-
--/*
--# lpfc_multi_ring_support: Determines how many rings to spread available
++
+ for (i = 0; i <= phba->max_vpi && vports[i] != NULL; i++) {
+ v_shost = lpfc_shost_from_vport(vports[i]);
+ spin_lock_irq(shost->host_lock);
+ .read = sysfs_drvr_stat_data_read,
+ .write = NULL,
+};
-+
-+/*
-+# lpfc_link_speed: Link speed selection for initializing the Fibre Channel
-+# connection.
-+# 0 = auto select (default)
-+# 1 = 1 Gigabaud
-+# 2 = 2 Gigabaud
-+# 4 = 4 Gigabaud
-+# 8 = 8 Gigabaud
-+# Value range is [0,8]. Default value is 0.
-+*/
+
+ /*
+ # lpfc_link_speed: Link speed selection for initializing the Fibre Channel
+@@ -1479,11 +2838,46 @@
+ # 8 = 8 Gigabaud
+ # Value range is [0,8]. Default value is 0.
+ */
+-static int
+-lpfc_link_speed_set(struct lpfc_hba *phba, int val)
+-{
+
+/**
+ * lpfc_link_speed_set: Set the adapters link speed.
+ int val = 0;
+ int nolip = 0;
+ const char *val_buf = buf;
-+ int err;
-+ uint32_t prev_val;
+ int err;
+ uint32_t prev_val;
+
+ if (!strncmp(buf, "nolip ", strlen("nolip "))) {
+ nolip = 1;
+ return -EINVAL;
+ if (sscanf(val_buf, "%i", &val) != 1)
+ return -EINVAL;
-+
-+ if (((val == LINK_SPEED_1G) && !(phba->lmt & LMT_1Gb)) ||
-+ ((val == LINK_SPEED_2G) && !(phba->lmt & LMT_2Gb)) ||
-+ ((val == LINK_SPEED_4G) && !(phba->lmt & LMT_4Gb)) ||
-+ ((val == LINK_SPEED_8G) && !(phba->lmt & LMT_8Gb)) ||
-+ ((val == LINK_SPEED_10G) && !(phba->lmt & LMT_10Gb)))
-+ return -EINVAL;
-+
+
+ if (((val == LINK_SPEED_1G) && !(phba->lmt & LMT_1Gb)) ||
+ ((val == LINK_SPEED_2G) && !(phba->lmt & LMT_2Gb)) ||
+@@ -1492,14 +2886,19 @@
+ ((val == LINK_SPEED_10G) && !(phba->lmt & LMT_10Gb)))
+ return -EINVAL;
+
+- if ((val >= 0 && val <= LPFC_MAX_LINK_SPEED)
+ if ((val >= 0 && val <= 8)
-+ && (LPFC_LINK_SPEED_BITMAP & (1 << val))) {
-+ prev_val = phba->cfg_link_speed;
-+ phba->cfg_link_speed = val;
+ && (LPFC_LINK_SPEED_BITMAP & (1 << val))) {
+ prev_val = phba->cfg_link_speed;
+ phba->cfg_link_speed = val;
+ if (nolip)
+ return strlen(buf);
+
-+ err = lpfc_issue_lip(lpfc_shost_from_vport(phba->pport));
+ err = lpfc_issue_lip(lpfc_shost_from_vport(phba->pport));
+- if (err)
+ if (err) {
-+ phba->cfg_link_speed = prev_val;
+ phba->cfg_link_speed = prev_val;
+- return err;
+ return -EINVAL;
+ } else
+ return strlen(buf);
-+ }
-+
-+ lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
-+ "%d:0469 lpfc_link_speed attribute cannot be set to %d, "
-+ "allowed range is [0, 8]\n",
-+ phba->brd_no, val);
-+ return -EINVAL;
-+}
-+
-+static int lpfc_link_speed = 0;
-+module_param(lpfc_link_speed, int, 0);
-+MODULE_PARM_DESC(lpfc_link_speed, "Select link speed");
-+lpfc_param_show(link_speed)
+ }
+
+ lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
+@@ -1513,6 +2912,23 @@
+ module_param(lpfc_link_speed, int, 0);
+ MODULE_PARM_DESC(lpfc_link_speed, "Select link speed");
+ lpfc_param_show(link_speed)
+
+/**
+ * lpfc_link_speed_init: Set the adapters link speed.
+ * zero if val saved.
+ * -EINVAL val out of range
+ **/
-+static int
-+lpfc_link_speed_init(struct lpfc_hba *phba, int val)
-+{
-+ if ((val >= 0 && val <= LPFC_MAX_LINK_SPEED)
-+ && (LPFC_LINK_SPEED_BITMAP & (1 << val))) {
-+ phba->cfg_link_speed = val;
-+ return 0;
-+ }
-+ lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
+ static int
+ lpfc_link_speed_init(struct lpfc_hba *phba, int val)
+ {
+@@ -1522,14 +2938,13 @@
+ return 0;
+ }
+ lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
+- "0454 lpfc_link_speed attribute cannot "
+ "0405 lpfc_link_speed attribute cannot "
-+ "be set to %d, allowed values are "
-+ "["LPFC_LINK_SPEED_STRING"]\n", val);
-+ phba->cfg_link_speed = 0;
-+ return -EINVAL;
-+}
-+
-+static DEVICE_ATTR(lpfc_link_speed, S_IRUGO | S_IWUSR,
-+ lpfc_link_speed_show, lpfc_link_speed_store);
-+
-+/*
-+# lpfc_fcp_class: Determines FC class to use for the FCP protocol.
-+# Value range is [2,3]. Default value is 3.
-+*/
-+LPFC_VPORT_ATTR_R(fcp_class, 3, 2, 3,
-+ "Select Fibre Channel class of service for FCP sequences");
-+
-+/*
-+# lpfc_use_adisc: Use ADISC for FCP rediscovery instead of PLOGI. Value range
-+# is [0,1]. Default value is 0.
-+*/
-+LPFC_VPORT_ATTR_RW(use_adisc, 0, 0, 1,
-+ "Use ADISC on rediscovery to authenticate FCP devices");
+ "be set to %d, allowed values are "
+ "["LPFC_LINK_SPEED_STRING"]\n", val);
+ phba->cfg_link_speed = 0;
+ return -EINVAL;
+ }
+
+-lpfc_param_store(link_speed)
+ static DEVICE_ATTR(lpfc_link_speed, S_IRUGO | S_IWUSR,
+ lpfc_link_speed_show, lpfc_link_speed_store);
+
+@@ -1546,6 +2961,48 @@
+ */
+ LPFC_VPORT_ATTR_RW(use_adisc, 0, 0, 1,
+ "Use ADISC on rediscovery to authenticate FCP devices");
+
+/*
+# lpfc_max_scsicmpl_time: Use scsi command completion time to control I/O queue
+static DEVICE_ATTR(lpfc_max_scsicmpl_time, S_IRUGO | S_IWUSR,
+ lpfc_max_scsicmpl_time_show,
+ lpfc_max_scsicmpl_time_store);
-+
-+/*
-+# lpfc_ack0: Use ACK0, instead of ACK1 for class 2 acknowledgement. Value
-+# range is [0,1]. Default value is 0.
-+*/
-+LPFC_ATTR_R(ack0, 0, 0, 1, "Enable ACK0 support");
-+
-+/*
-+# lpfc_cr_delay & lpfc_cr_count: Default values for I/O colaesing
-+# cr_delay (msec) or cr_count outstanding commands. cr_delay can take
-+# value [0,63]. cr_count can take value [1,255]. Default value of cr_delay
-+# is 0. Default value of cr_count is 1. The cr_count feature is disabled if
-+# cr_delay is set to 0.
-+*/
-+LPFC_ATTR_RW(cr_delay, 0, 0, 63, "A count of milliseconds after which an "
-+ "interrupt response is generated");
-+
-+LPFC_ATTR_RW(cr_count, 1, 1, 255, "A count of I/O completions after which an "
-+ "interrupt response is generated");
-+
-+/*
-+# lpfc_multi_ring_support: Determines how many rings to spread available
- # cmd/rsp IOCB entries across.
- # Value range is [1,2]. Default value is 1.
- */
-@@ -1625,13 +3082,55 @@ LPFC_ATTR_RW(poll_tmo, 10, 1, 255,
+
+ /*
+ # lpfc_ack0: Use ACK0, instead of ACK1 for class 2 acknowledgement. Value
+@@ -1625,11 +3082,53 @@
# support this feature
# 0 = MSI disabled (default)
# 1 = MSI enabled
*/
LPFC_ATTR_R(use_msi, 0, 0, 2, "Use Message Signaled Interrupts (1) or "
"MSI-X (2), if possible");
-
- /*
++
++/*
+# lpfc_enable_auth: controls FC Authentication.
+# 0 = Authentication OFF
+# 1 = Authentication ON
+lpfc_vport_param_store(enable_auth);
+static DEVICE_ATTR(lpfc_enable_auth, S_IRUGO | S_IWUSR,
+ lpfc_enable_auth_show, lpfc_enable_auth_store);
-+
-+/*
+
+ /*
# lpfc_enable_hba_reset: Allow or prevent HBA resets to the hardware.
- # 0 = HBA resets disabled
- # 1 = HBA resets enabled (default)
-@@ -1655,6 +3154,27 @@ LPFC_ATTR_R(enable_hba_heartbeat, 1, 0,
+@@ -1655,6 +3154,27 @@
*/
LPFC_ATTR_R(sg_seg_cnt, LPFC_DEFAULT_SG_SEG_CNT, LPFC_DEFAULT_SG_SEG_CNT,
LPFC_MAX_SG_SEG_CNT, "Max Scatter Gather Segment Count");
struct device_attribute *lpfc_hba_attrs[] = {
&dev_attr_info,
-@@ -1668,6 +3188,7 @@ struct device_attribute *lpfc_hba_attrs[
+@@ -1668,6 +3188,7 @@
&dev_attr_option_rom_version,
&dev_attr_link_state,
&dev_attr_num_discovered_ports,
&dev_attr_lpfc_drvr_version,
&dev_attr_lpfc_temp_sensor,
&dev_attr_lpfc_log_verbose,
-@@ -1690,6 +3211,7 @@ struct device_attribute *lpfc_hba_attrs[
+@@ -1690,6 +3211,7 @@
&dev_attr_lpfc_fdmi_on,
&dev_attr_lpfc_max_luns,
&dev_attr_lpfc_enable_npiv,
&dev_attr_nport_evt_cnt,
&dev_attr_board_mode,
&dev_attr_max_vpi,
-@@ -1703,12 +3225,26 @@ struct device_attribute *lpfc_hba_attrs[
+@@ -1703,12 +3225,26 @@
&dev_attr_lpfc_poll,
&dev_attr_lpfc_poll_tmo,
&dev_attr_lpfc_use_msi,
NULL,
};
-@@ -1731,9 +3267,37 @@ struct device_attribute *lpfc_vport_attr
+@@ -1731,9 +3267,37 @@
&dev_attr_nport_evt_cnt,
&dev_attr_npiv_info,
&dev_attr_lpfc_enable_da_id,
static ssize_t
sysfs_ctlreg_write(struct kobject *kobj, struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t count)
-@@ -1744,21 +3308,23 @@ sysfs_ctlreg_write(struct kobject *kobj,
+@@ -1744,21 +3308,23 @@
struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
struct lpfc_hba *phba = vport->phba;
- if ((off + count) > FF_REG_AREA_SIZE)
-+ if ((off + count) > FF_REG_AREA_SIZE + LPFC_REG_WRITE_KEY_SIZE)
- return -ERANGE;
-
+- return -ERANGE;
+-
- if (count == 0) return 0;
++ if ((off + count) > FF_REG_AREA_SIZE + LPFC_REG_WRITE_KEY_SIZE)
++ return -ERANGE;
++
+ if (count <= LPFC_REG_WRITE_KEY_SIZE)
+ return 0;
- if (!(vport->fc_flag & FC_OFFLINE_MODE)) {
- return -EPERM;
- }
+-
+- spin_lock_irq(&phba->hbalock);
+- for (buf_off = 0; buf_off < count; buf_off += sizeof(uint32_t))
+- writel(*((uint32_t *)(buf + buf_off)),
+ /* This is to protect HBA registers from accidental writes. */
+ if (memcmp(buf, LPFC_REG_WRITE_KEY, LPFC_REG_WRITE_KEY_SIZE))
+ return -EINVAL;
-
- spin_lock_irq(&phba->hbalock);
-- for (buf_off = 0; buf_off < count; buf_off += sizeof(uint32_t))
-- writel(*((uint32_t *)(buf + buf_off)),
++
++ spin_lock_irq(&phba->hbalock);
+ for (buf_off = 0; buf_off < count - LPFC_REG_WRITE_KEY_SIZE;
+ buf_off += sizeof(uint32_t))
+ writel(*((uint32_t *)(buf + buf_off + LPFC_REG_WRITE_KEY_SIZE)),
phba->ctrl_regs_memmap_p + off + buf_off);
spin_unlock_irq(&phba->hbalock);
-@@ -1766,6 +3332,23 @@ sysfs_ctlreg_write(struct kobject *kobj,
+@@ -1766,6 +3332,23 @@
return count;
}
static ssize_t
sysfs_ctlreg_read(struct kobject *kobj, struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t count)
-@@ -1810,20 +3393,234 @@ static struct bin_attribute sysfs_ctlreg
+@@ -1810,20 +3393,234 @@
.write = sysfs_ctlreg_write,
};
+-
+-static void
+-sysfs_mbox_idle(struct lpfc_hba *phba)
+-{
+- phba->sysfs_mbox.state = SMBOX_IDLE;
+- phba->sysfs_mbox.offset = 0;
+-
+- if (phba->sysfs_mbox.mbox) {
+- mempool_free(phba->sysfs_mbox.mbox,
+static struct lpfc_sysfs_mbox *
+lpfc_get_sysfs_mbox(struct lpfc_hba *phba, uint8_t create)
+{
+
+ spin_unlock_irq(&phba->hbalock);
+ return sysfs_mbox;
-
++
+}
+/**
+ * sysfs_mbox_idle: frees the sysfs mailbox.
+ * @phba: lpfc_hba pointer
+ **/
- static void
--sysfs_mbox_idle(struct lpfc_hba *phba)
++static void
+sysfs_mbox_idle(struct lpfc_hba *phba,
+ struct lpfc_sysfs_mbox *sysfs_mbox)
- {
-- phba->sysfs_mbox.state = SMBOX_IDLE;
-- phba->sysfs_mbox.offset = 0;
--
-- if (phba->sysfs_mbox.mbox) {
-- mempool_free(phba->sysfs_mbox.mbox,
++{
+ list_del_init(&sysfs_mbox->list);
+ if (sysfs_mbox->mbox) {
+ mempool_free(sysfs_mbox->mbox,
phba->mbox_mem_pool);
- phba->sysfs_mbox.mbox = NULL;
- }
+- }
+-}
+-
++ }
+
+ if (sysfs_mbox->mbext)
+ kfree(sysfs_mbox->mbext);
+ spin_unlock_irq(&phba->hbalock);
+
+ return count;
- }
-
++}
++
+/**
+ * sysfs_mbox_write: Write method for writing information via mbox.
+ * @kobj: kernel kobject that contains the kernel class device.
static ssize_t
sysfs_mbox_write(struct kobject *kobj, struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t count)
-@@ -1833,9 +3630,9 @@ sysfs_mbox_write(struct kobject *kobj, s
+@@ -1833,51 +3630,272 @@
struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
struct lpfc_hba *phba = vport->phba;
struct lpfcMboxq *mbox = NULL;
if (off % 4 || count % 4 || (unsigned long)buf % 4)
return -EINVAL;
-@@ -1844,40 +3641,261 @@ sysfs_mbox_write(struct kobject *kobj, s
- return 0;
- if (off == 0) {
+ if (count == 0)
+ return 0;
++
++ if (off == 0) {
+ sysfs_mbox = lpfc_get_sysfs_mbox(phba, 1);
+ if (sysfs_mbox == NULL)
+ return -ENOMEM;
+ spin_unlock_irq(&phba->hbalock);
+ return -ERANGE;
+ }
-+
-+ if (off == 0) {
+
+ if (off == 0) {
mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
- if (!mbox)
+- return -ENOMEM;
+ if (!mbox) {
+ spin_lock_irq(&phba->hbalock);
+ sysfs_mbox_idle(phba, sysfs_mbox);
+ spin_unlock_irq(&phba->hbalock);
- return -ENOMEM;
++ return -ENOMEM;
+ }
memset(mbox, 0, sizeof (LPFC_MBOXQ_t));
}
buf, count);
- phba->sysfs_mbox.offset = off + count;
+-
+- spin_unlock_irq(&phba->hbalock);
+-
+- return count;
+-}
+-
+ sysfs_mbox->offset = off + count;
+
+ if (sysfs_mbox->offset == sizeof(struct lpfc_sysfs_mbox_data)) {
+ }
+ return count;
+ }
-
- spin_unlock_irq(&phba->hbalock);
-
- return count;
- }
-
++
++ spin_unlock_irq(&phba->hbalock);
++
++ return count;
++}
++
+/**
+ * sysfs_mbox_read: Read method for reading information via mbox.
+ * @kobj: kernel kobject that contains the kernel class device.
static ssize_t
sysfs_mbox_read(struct kobject *kobj, struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t count)
-@@ -1887,6 +3905,42 @@ sysfs_mbox_read(struct kobject *kobj, st
+@@ -1887,6 +3905,42 @@
struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
struct lpfc_hba *phba = vport->phba;
int rc;
if (off > MAILBOX_CMD_SIZE)
return -ERANGE;
-@@ -1903,16 +3957,18 @@ sysfs_mbox_read(struct kobject *kobj, st
+@@ -1903,16 +3957,18 @@
spin_lock_irq(&phba->hbalock);
if (phba->over_temp_state == HBA_OVER_TEMP) {
if (off == 0 &&
- phba->sysfs_mbox.state == SMBOX_WRITING &&
- phba->sysfs_mbox.offset >= 2 * sizeof(uint32_t)) {
+-
+- switch (phba->sysfs_mbox.mbox->mb.mbxCommand) {
+ ((sysfs_mbox->state == SMBOX_WRITING) ||
+ (sysfs_mbox->state == SMBOX_WRITING_MBEXT) ||
+ (sysfs_mbox->state == SMBOX_WRITING_BUFF) ) &&
+ sysfs_mbox->offset >= 2 * sizeof(uint32_t)) {
-
-- switch (phba->sysfs_mbox.mbox->mb.mbxCommand) {
++
+ switch (sysfs_mbox->mbox->mb.mbxCommand) {
/* Offline only */
case MBX_INIT_LINK:
case MBX_DOWN_LINK:
-@@ -1925,12 +3981,11 @@ sysfs_mbox_read(struct kobject *kobj, st
+@@ -1925,12 +3981,11 @@
case MBX_RUN_DIAGS:
case MBX_RESTART:
case MBX_SET_MASK:
spin_unlock_irq(&phba->hbalock);
return -EPERM;
}
-@@ -1952,9 +4007,67 @@ sysfs_mbox_read(struct kobject *kobj, st
+@@ -1952,9 +4007,67 @@
case MBX_LOAD_EXP_ROM:
case MBX_BEACON:
case MBX_DEL_LD_ENTRY:
-- case MBX_SET_VARIABLE:
+ case MBX_SET_DEBUG:
- case MBX_WRITE_WWN:
++ case MBX_WRITE_WWN:
+ case MBX_READ_EVENT_LOG_STATUS:
+ case MBX_WRITE_EVENT_LOG:
+ case MBX_PORT_CAPABILITIES:
+ case MBX_PORT_IOV_CONTROL:
+ break;
-+ case MBX_SET_VARIABLE:
+ case MBX_SET_VARIABLE:
+- case MBX_WRITE_WWN:
+- break;
+ lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
+ "1226 mbox: set_variable 0x%x, 0x%x\n",
+ sysfs_mbox->mbox->mb.un.varWords[0],
+ phba->link_flag &= ~LS_LOOPBACK_MODE;
+ phba->fc_topology = TOPOLOGY_PT_PT;
+ }
- break;
++ break;
+ case MBX_RUN_BIU_DIAG64:
+ if (sysfs_mbox->mbox->mb.un.varBIUdiag.un.s2.
+ xmit_bde64.tus.f.bdeSize) {
case MBX_READ_SPARM64:
case MBX_READ_LA:
case MBX_READ_LA64:
-@@ -1963,40 +4076,51 @@ sysfs_mbox_read(struct kobject *kobj, st
+@@ -1963,40 +4076,51 @@
case MBX_CONFIG_PORT:
case MBX_RUN_BIU_DIAG:
printk(KERN_WARNING "mbox_read: Illegal Command 0x%x\n",
+ sysfs_mbox_idle(phba,sysfs_mbox);
spin_unlock_irq(&phba->hbalock);
return -EPERM;
- }
-
++ }
++
+ if (sysfs_mbox->mbox_data.in_ext_wlen ||
+ sysfs_mbox->mbox_data.out_ext_wlen) {
+ sysfs_mbox->mbox->context2 = sysfs_mbox->mbext;
+ sizeof(uint32_t);
+ sysfs_mbox->mbox->mbox_offset_word =
+ sysfs_mbox->mbox_data.mboffset;
-+ }
-+
+ }
+
/* If HBA encountered an error attention, allow only DUMP
* or RESTART mailbox commands until the HBA is restarted.
*/
- spin_unlock_irq(&phba->hbalock);
- return -EPERM;
- }
+-
+- phba->sysfs_mbox.mbox->vport = vport;
+ if (phba->pport->stopped &&
+ sysfs_mbox->mbox->mb.mbxCommand != MBX_DUMP_MEMORY &&
+ sysfs_mbox->mbox->mb.mbxCommand != MBX_RESTART &&
+ "1259 mbox: Issued mailbox cmd "
+ "0x%x while in stopped state.\n",
+ sysfs_mbox->mbox->mb.mbxCommand);
-
-- phba->sysfs_mbox.mbox->vport = vport;
++
+ sysfs_mbox->mbox->vport = vport;
/* Don't allow mailbox commands to be sent when blocked
spin_unlock_irq(&phba->hbalock);
return -EAGAIN;
}
-@@ -2006,43 +4130,86 @@ sysfs_mbox_read(struct kobject *kobj, st
+@@ -2006,43 +4130,86 @@
spin_unlock_irq(&phba->hbalock);
rc = lpfc_sli_issue_mbox (phba,
if (rc != MBX_SUCCESS) {
if (rc == MBX_TIMEOUT) {
- phba->sysfs_mbox.mbox = NULL;
-+ sysfs_mbox->mbox = NULL;
- }
+- }
- sysfs_mbox_idle(phba);
++ sysfs_mbox->mbox = NULL;
++ }
+ sysfs_mbox_idle(phba,sysfs_mbox);
spin_unlock_irq(&phba->hbalock);
return (rc == MBX_TIMEOUT) ? -ETIME : -ENODEV;
}
- phba->sysfs_mbox.state = SMBOX_READING;
+- }
+- else if (phba->sysfs_mbox.offset != off ||
+- phba->sysfs_mbox.state != SMBOX_READING) {
+- printk(KERN_WARNING "mbox_read: Bad State\n");
+- sysfs_mbox_idle(phba);
+- spin_unlock_irq(&phba->hbalock);
+- return -EAGAIN;
+- }
+-
+- memcpy(buf, (uint8_t *) & phba->sysfs_mbox.mbox->mb + off, count);
+-
+- phba->sysfs_mbox.offset = off + count;
+-
+- if (phba->sysfs_mbox.offset == MAILBOX_CMD_SIZE)
+- sysfs_mbox_idle(phba);
+ if (wait_4_menlo_maint) {
+ lpfc_printf_log(phba, KERN_WARNING, LOG_LIBDFC,
+ "1229 waiting for menlo mnt\n");
+
+ }
+ sysfs_mbox->state = SMBOX_READING;
- }
-- else if (phba->sysfs_mbox.offset != off ||
-- phba->sysfs_mbox.state != SMBOX_READING) {
-- printk(KERN_WARNING "mbox_read: Bad State\n");
-- sysfs_mbox_idle(phba);
++ }
+ else if (sysfs_mbox->offset != off ||
+ sysfs_mbox->state != SMBOX_READING) {
+ sysfs_mbox_idle(phba,sysfs_mbox);
- spin_unlock_irq(&phba->hbalock);
- return -EAGAIN;
- }
-
-- memcpy(buf, (uint8_t *) & phba->sysfs_mbox.mbox->mb + off, count);
++ spin_unlock_irq(&phba->hbalock);
++ return -EAGAIN;
++ }
++
+ memcpy(buf, (uint8_t *) & sysfs_mbox->mbox->mb + off, count);
-
-- phba->sysfs_mbox.offset = off + count;
++
+ sysfs_mbox->offset = off + count;
-
-- if (phba->sysfs_mbox.offset == MAILBOX_CMD_SIZE)
-- sysfs_mbox_idle(phba);
++
+ if ((sysfs_mbox->offset == MAILBOX_CMD_SIZE) &&
+ ((sysfs_mbox->mbox->mb.mbxCommand == MBX_RUN_BIU_DIAG64) ||
+ (sysfs_mbox->mbox->mb.mbxCommand == MBX_READ_EVENT_LOG))) {
spin_unlock_irq(&phba->hbalock);
-@@ -2054,11 +4221,19 @@ static struct bin_attribute sysfs_mbox_a
+@@ -2054,41 +4221,78 @@
.name = "mbox",
.mode = S_IRUSR | S_IWUSR,
},
int
lpfc_alloc_sysfs_attr(struct lpfc_vport *vport)
{
-@@ -2066,29 +4241,58 @@ lpfc_alloc_sysfs_attr(struct lpfc_vport
+ struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
int error;
-
- error = sysfs_create_bin_file(&shost->shost_dev.kobj,
++
++ error = sysfs_create_bin_file(&shost->shost_dev.kobj,
+ &sysfs_drvr_stat_data_attr);
+
+ /* Virtual ports do not need ctrl_reg and mbox */
+ if (error || vport->port_type == LPFC_NPIV_PORT)
+ goto out;
-+
-+ error = sysfs_create_bin_file(&shost->shost_dev.kobj,
+
+ error = sysfs_create_bin_file(&shost->shost_dev.kobj,
&sysfs_ctlreg_attr);
if (error)
- goto out;
}
-@@ -2096,6 +4300,10 @@ lpfc_free_sysfs_attr(struct lpfc_vport *
+@@ -2096,6 +4300,10 @@
* Dynamic FC Host Attributes Support
*/
static void
lpfc_get_host_port_id(struct Scsi_Host *shost)
{
-@@ -2105,6 +4313,10 @@ lpfc_get_host_port_id(struct Scsi_Host *
+@@ -2105,6 +4313,10 @@
fc_host_port_id(shost) = vport->fc_myDID;
}
static void
lpfc_get_host_port_type(struct Scsi_Host *shost)
{
-@@ -2133,6 +4345,10 @@ lpfc_get_host_port_type(struct Scsi_Host
+@@ -2133,6 +4345,10 @@
spin_unlock_irq(shost->host_lock);
}
static void
lpfc_get_host_port_state(struct Scsi_Host *shost)
{
-@@ -2144,6 +4360,13 @@ lpfc_get_host_port_state(struct Scsi_Hos
+@@ -2144,6 +4360,13 @@
if (vport->fc_flag & FC_OFFLINE_MODE)
fc_host_port_state(shost) = FC_PORTSTATE_OFFLINE;
else {
switch (phba->link_state) {
case LPFC_LINK_UNKNOWN:
case LPFC_LINK_DOWN:
-@@ -2167,6 +4390,10 @@ lpfc_get_host_port_state(struct Scsi_Hos
+@@ -2167,6 +4390,10 @@
spin_unlock_irq(shost->host_lock);
}
static void
lpfc_get_host_speed(struct Scsi_Host *shost)
{
-@@ -2199,6 +4426,10 @@ lpfc_get_host_speed(struct Scsi_Host *sh
+@@ -2199,6 +4426,10 @@
spin_unlock_irq(shost->host_lock);
}
static void
lpfc_get_host_fabric_name (struct Scsi_Host *shost)
{
-@@ -2221,6 +4452,18 @@ lpfc_get_host_fabric_name (struct Scsi_H
+@@ -2221,6 +4452,18 @@
fc_host_fabric_name(shost) = node_name;
}
static struct fc_host_statistics *
lpfc_get_stats(struct Scsi_Host *shost)
{
-@@ -2334,6 +4577,10 @@ lpfc_get_stats(struct Scsi_Host *shost)
+@@ -2334,6 +4577,10 @@
return hs;
}
static void
lpfc_reset_stats(struct Scsi_Host *shost)
{
-@@ -2411,6 +4658,14 @@ lpfc_reset_stats(struct Scsi_Host *shost
+@@ -2411,6 +4658,14 @@
* are no sysfs handlers for link_down_tmo.
*/
static struct lpfc_nodelist *
lpfc_get_node_by_target(struct scsi_target *starget)
{
-@@ -2432,6 +4687,10 @@ lpfc_get_node_by_target(struct scsi_targ
+@@ -2432,6 +4687,10 @@
return NULL;
}
static void
lpfc_get_starget_port_id(struct scsi_target *starget)
{
-@@ -2440,6 +4699,12 @@ lpfc_get_starget_port_id(struct scsi_tar
+@@ -2440,6 +4699,12 @@
fc_starget_port_id(starget) = ndlp ? ndlp->nlp_DID : -1;
}
static void
lpfc_get_starget_node_name(struct scsi_target *starget)
{
-@@ -2449,6 +4714,12 @@ lpfc_get_starget_node_name(struct scsi_t
+@@ -2449,6 +4714,12 @@
ndlp ? wwn_to_u64(ndlp->nlp_nodename.u.wwn) : 0;
}
static void
lpfc_get_starget_port_name(struct scsi_target *starget)
{
-@@ -2458,6 +4729,15 @@ lpfc_get_starget_port_name(struct scsi_t
+@@ -2458,6 +4729,15 @@
ndlp ? wwn_to_u64(ndlp->nlp_portname.u.wwn) : 0;
}
static void
lpfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout)
{
-@@ -2467,7 +4747,18 @@ lpfc_set_rport_loss_tmo(struct fc_rport
+@@ -2467,7 +4747,18 @@
rport->dev_loss_tmo = 1;
}
#define lpfc_rport_show_function(field, format_string, sz, cast) \
static ssize_t \
lpfc_show_rport_##field (struct device *dev, \
-@@ -2484,6 +4775,23 @@ lpfc_show_rport_##field (struct device *
+@@ -2484,6 +4775,23 @@
lpfc_rport_show_function(field, format_string, sz, ) \
static FC_RPORT_ATTR(field, S_IRUGO, lpfc_show_rport_##field, NULL)
struct fc_function_template lpfc_transport_functions = {
/* fixed attributes the driver supports */
-@@ -2493,6 +4801,7 @@ struct fc_function_template lpfc_transpo
+@@ -2493,6 +4801,7 @@
.show_host_supported_fc4s = 1,
.show_host_supported_speeds = 1,
.show_host_maxframe_size = 1,
/* dynamic attributes the driver supports */
.get_host_port_id = lpfc_get_host_port_id,
-@@ -2542,6 +4851,10 @@ struct fc_function_template lpfc_transpo
+@@ -2542,6 +4851,10 @@
.terminate_rport_io = lpfc_terminate_rport_io,
.dd_fcvport_size = sizeof(struct lpfc_vport *),
};
struct fc_function_template lpfc_vport_transport_functions = {
-@@ -2552,6 +4865,7 @@ struct fc_function_template lpfc_vport_t
+@@ -2552,6 +4865,7 @@
.show_host_supported_fc4s = 1,
.show_host_supported_speeds = 1,
.show_host_maxframe_size = 1,
/* dynamic attributes the driver supports */
.get_host_port_id = lpfc_get_host_port_id,
-@@ -2600,8 +4914,14 @@ struct fc_function_template lpfc_vport_t
+@@ -2600,8 +4914,14 @@
.terminate_rport_io = lpfc_terminate_rport_io,
.vport_disable = lpfc_vport_disable,
+-};
+-
+
+ .set_vport_symbolic_name = lpfc_set_vport_symbolic_name,
- };
-
++};
++
+/**
+ * lpfc_get_cfgparam: Used during probe_one to init the adapter structure.
+ * @phba: lpfc_hba pointer.
void
lpfc_get_cfgparam(struct lpfc_hba *phba)
{
-@@ -2615,9 +4935,11 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
+@@ -2615,9 +4935,11 @@
lpfc_link_speed_init(phba, lpfc_link_speed);
lpfc_poll_tmo_init(phba, lpfc_poll_tmo);
lpfc_enable_npiv_init(phba, lpfc_enable_npiv);
phba->cfg_poll = lpfc_poll;
phba->cfg_soft_wwnn = 0L;
phba->cfg_soft_wwpn = 0L;
-@@ -2637,6 +4959,10 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
+@@ -2637,6 +4959,10 @@
return;
}
void
lpfc_get_vport_cfgparam(struct lpfc_vport *vport)
{
-@@ -2648,10 +4974,12 @@ lpfc_get_vport_cfgparam(struct lpfc_vpor
+@@ -2648,10 +4974,12 @@
lpfc_restrict_login_init(vport, lpfc_restrict_login);
lpfc_fcp_class_init(vport, lpfc_fcp_class);
lpfc_use_adisc_init(vport, lpfc_use_adisc);
+ lpfc_enable_auth_init(vport, lpfc_enable_auth);
return;
}
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_auth.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_auth.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_auth.c Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,837 @@
+/*******************************************************************
+ * This file is part of the Emulex Linux Device Driver for *
+ return ((uint32_t)(message - message_start));
+}
+
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_auth.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth.h 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_auth.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_auth.h Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,92 @@
+/*******************************************************************
+ * This file is part of the Emulex Linux Device Driver for *
+ struct fc_auth_req *fc_req);
+int lpfc_unpack_dhchap_success(struct lpfc_vport *vport, uint8_t *message,
+ struct fc_auth_req *fc_req);
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_auth_access.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth_access.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth_access.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_auth_access.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_auth_access.c Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,601 @@
+/*******************************************************************
+ * This file is part of the Emulex Linux Device Driver for *
+ lpfc_fc_sc_schedule_notify_all(FC_NL_SC_DEREG);
+ }
+}
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_auth_access.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth_access.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth_access.h 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_auth_access.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_auth_access.h Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,225 @@
+/*******************************************************************
+ * This file is part of the Emulex Linux Device Driver for *
+ uint8_t data[0];
+} __attribute__((aligned(sizeof(uint64_t))));
+
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_crtn.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_crtn.h 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_crtn.h
+--- a/drivers/scsi/lpfc/lpfc_crtn.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_crtn.h Wed May 06 16:56:34 2009 +0100
@@ -18,24 +18,32 @@
* included with this package. *
*******************************************************************/
void lpfc_unreg_login(struct lpfc_hba *, uint16_t, uint32_t, LPFC_MBOXQ_t *);
void lpfc_unreg_did(struct lpfc_hba *, uint16_t, uint32_t, LPFC_MBOXQ_t *);
void lpfc_reg_vpi(struct lpfc_hba *, uint16_t, uint32_t, LPFC_MBOXQ_t *);
-@@ -43,7 +51,7 @@ void lpfc_unreg_vpi(struct lpfc_hba *, u
+@@ -43,7 +51,7 @@
void lpfc_init_link(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t, uint32_t);
struct lpfc_vport *lpfc_find_vport_by_did(struct lpfc_hba *, uint32_t);
int lpfc_linkdown(struct lpfc_hba *);
void lpfc_port_link_failure(struct lpfc_vport *);
void lpfc_mbx_cmpl_read_la(struct lpfc_hba *, LPFC_MBOXQ_t *);
-@@ -80,7 +88,10 @@ void lpfc_cleanup(struct lpfc_vport *);
+@@ -80,7 +88,10 @@
void lpfc_disc_timeout(unsigned long);
struct lpfc_nodelist *__lpfc_findnode_rpi(struct lpfc_vport *, uint16_t);
void lpfc_worker_wake_up(struct lpfc_hba *);
int lpfc_workq_post_event(struct lpfc_hba *, void *, void *, uint32_t);
int lpfc_do_work(void *);
-@@ -95,6 +106,9 @@ void lpfc_more_plogi(struct lpfc_vport *
+@@ -95,6 +106,9 @@
void lpfc_more_adisc(struct lpfc_vport *);
void lpfc_end_rscn(struct lpfc_vport *);
int lpfc_els_chk_latt(struct lpfc_vport *);
int lpfc_els_abort_flogi(struct lpfc_hba *);
int lpfc_initial_flogi(struct lpfc_vport *);
int lpfc_initial_fdisc(struct lpfc_vport *);
-@@ -117,6 +131,8 @@ int lpfc_els_rsp_prli_acc(struct lpfc_vp
+@@ -117,6 +131,8 @@
void lpfc_cancel_retry_delay_tmo(struct lpfc_vport *, struct lpfc_nodelist *);
void lpfc_els_retry_delay(unsigned long);
void lpfc_els_retry_delay_handler(struct lpfc_nodelist *);
void lpfc_els_unsol_event(struct lpfc_hba *, struct lpfc_sli_ring *,
struct lpfc_iocbq *);
int lpfc_els_handle_rscn(struct lpfc_vport *);
-@@ -135,7 +151,7 @@ void lpfc_ct_unsol_event(struct lpfc_hba
+@@ -135,7 +151,7 @@
int lpfc_ns_cmd(struct lpfc_vport *, int, uint8_t, uint32_t);
int lpfc_fdmi_cmd(struct lpfc_vport *, struct lpfc_nodelist *, int);
void lpfc_fdmi_tmo(unsigned long);
int lpfc_config_port_prep(struct lpfc_hba *);
int lpfc_config_port_post(struct lpfc_hba *);
-@@ -151,10 +167,14 @@ void lpfc_offline(struct lpfc_hba *);
+@@ -151,10 +167,14 @@
int lpfc_sli_setup(struct lpfc_hba *);
int lpfc_sli_queue_setup(struct lpfc_hba *);
void lpfc_read_rev(struct lpfc_hba *, LPFC_MBOXQ_t *);
void lpfc_config_ring(struct lpfc_hba *, int, LPFC_MBOXQ_t *);
-@@ -175,11 +195,12 @@ void lpfc_mem_free(struct lpfc_hba *);
+@@ -175,11 +195,12 @@
void lpfc_stop_vport_timers(struct lpfc_vport *);
void lpfc_poll_timeout(unsigned long ptr);
void lpfc_reset_barrier(struct lpfc_hba * phba);
int lpfc_sli_brdready(struct lpfc_hba *, uint32_t);
-@@ -187,11 +208,13 @@ int lpfc_sli_brdkill(struct lpfc_hba *);
+@@ -187,11 +208,13 @@
int lpfc_sli_brdreset(struct lpfc_hba *);
int lpfc_sli_brdrestart(struct lpfc_hba *);
int lpfc_sli_hba_setup(struct lpfc_hba *);
int lpfc_sli_handle_slow_ring_event(struct lpfc_hba *,
struct lpfc_sli_ring *, uint32_t);
void lpfc_sli_def_mbox_cmpl(struct lpfc_hba *, LPFC_MBOXQ_t *);
-@@ -199,6 +222,7 @@ int lpfc_sli_issue_iocb(struct lpfc_hba
+@@ -199,6 +222,7 @@
struct lpfc_iocbq *, uint32_t);
void lpfc_sli_pcimem_bcopy(void *, void *, uint32_t);
void lpfc_sli_abort_iocb_ring(struct lpfc_hba *, struct lpfc_sli_ring *);
int lpfc_sli_ringpostbuf_put(struct lpfc_hba *, struct lpfc_sli_ring *,
struct lpfc_dmabuf *);
struct lpfc_dmabuf *lpfc_sli_ringpostbuf_get(struct lpfc_hba *,
-@@ -226,17 +250,13 @@ struct lpfc_nodelist *lpfc_findnode_did(
+@@ -226,17 +250,13 @@
struct lpfc_nodelist *lpfc_findnode_wwpn(struct lpfc_vport *,
struct lpfc_name *);
void lpfc_sli_free_hbq(struct lpfc_hba *, struct hbq_dmabuf *);
-@@ -269,11 +289,27 @@ void lpfc_dev_loss_tmo_callbk(struct fc_
+@@ -269,10 +289,26 @@
struct lpfc_vport *lpfc_create_port(struct lpfc_hba *, int, struct device *);
int lpfc_vport_disable(struct fc_vport *fc_vport, bool disable);
void destroy_port(struct lpfc_vport *);
int lpfc_get_instance(void);
void lpfc_host_attrib_init(struct Scsi_Host *);
-
++
+int lpfc_selective_reset(struct lpfc_hba *);
+int lpfc_security_wait(struct lpfc_vport *);
+int lpfc_get_security_enabled(struct Scsi_Host *);
+void lpfc_start_discovery(struct lpfc_vport *vport);
+void lpfc_start_authentication(struct lpfc_vport *, struct lpfc_nodelist *);
+int lpfc_rcv_nl_msg(struct Scsi_Host *, void *, uint32_t, uint32_t);
-+
+
extern void lpfc_debugfs_initialize(struct lpfc_vport *);
extern void lpfc_debugfs_terminate(struct lpfc_vport *);
- extern void lpfc_debugfs_disc_trc(struct lpfc_vport *, int, char *, uint32_t,
-@@ -282,14 +318,25 @@ extern void lpfc_debugfs_slow_ring_trc(s
+@@ -282,14 +318,25 @@
uint32_t, uint32_t);
extern struct lpfc_hbq_init *lpfc_hbq_defs[];
#define ScsiResult(host_code, scsi_code) (((host_code) << 16) | scsi_code)
#define HBA_EVENT_RSCN 5
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ct.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_ct.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_ct.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_ct.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_ct.c
+--- a/drivers/scsi/lpfc/lpfc_ct.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_ct.c Wed May 06 16:56:34 2009 +0100
@@ -34,6 +34,7 @@
#include "lpfc_hw.h"
#include "lpfc_disc.h"
#include "lpfc_scsi.h"
#include "lpfc.h"
-@@ -134,25 +135,24 @@ lpfc_ct_unsol_event(struct lpfc_hba *phb
+@@ -134,25 +135,24 @@
}
list_del(&head);
} else {
}
}
-@@ -212,7 +212,7 @@ lpfc_alloc_ct_rsp(struct lpfc_hba *phba,
+@@ -212,7 +212,7 @@
else
list_add_tail(&mp->list, &mlist->list);
/* build buffer ptr list for IOCB */
bpl->addrLow = le32_to_cpu(putPaddrLow(mp->phys) );
bpl->addrHigh = le32_to_cpu(putPaddrHigh(mp->phys) );
-@@ -283,7 +283,7 @@ lpfc_gen_req(struct lpfc_vport *vport, s
+@@ -283,7 +283,7 @@
icmd->un.genreq64.bdl.ulpIoTag32 = 0;
icmd->un.genreq64.bdl.addrHigh = putPaddrHigh(bmp->phys);
icmd->un.genreq64.bdl.addrLow = putPaddrLow(bmp->phys);
icmd->un.genreq64.bdl.bdeSize = (num_entry * sizeof (struct ulp_bde64));
if (usr_flg)
-@@ -560,18 +560,25 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba
+@@ -560,18 +560,25 @@
irsp->ulpStatus, irsp->un.ulpWord[4], vport->fc_ns_retry);
/* Don't bother processing response if vport is being torn down. */
goto out;
}
if (irsp->ulpStatus) {
-@@ -587,6 +594,8 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba
+@@ -587,6 +594,8 @@
if (rc == 0)
goto out;
}
lpfc_vport_set_state(vport, FC_VPORT_FAILED);
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
"0257 GID_FT Query error: 0x%x 0x%x\n",
-@@ -861,7 +870,7 @@ lpfc_cmpl_ct(struct lpfc_hba *phba, stru
+@@ -861,7 +870,7 @@
retry++;
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
rc = lpfc_ns_cmd(vport, cmdcode, retry, 0);
if (rc == 0)
goto out;
-@@ -1008,8 +1017,10 @@ lpfc_vport_symbolic_port_name(struct lpf
+@@ -1008,8 +1017,10 @@
if (n < size)
n += snprintf(symbol + n, size - n, " VPort-%d", vport->vpi);
return n;
}
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_debugfs.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_debugfs.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_debugfs.c
+--- a/drivers/scsi/lpfc/lpfc_debugfs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_debugfs.c Wed May 06 16:56:34 2009 +0100
@@ -1,7 +1,7 @@
/*******************************************************************
* This file is part of the Emulex Linux Device Driver for *
*/
static int lpfc_debugfs_enable = 1;
module_param(lpfc_debugfs_enable, int, 0);
-@@ -117,6 +126,25 @@ struct lpfc_debug {
+@@ -117,6 +126,25 @@
static atomic_t lpfc_debugfs_seq_trc_cnt = ATOMIC_INIT(0);
static unsigned long lpfc_debugfs_start_time = 0L;
static int
lpfc_debugfs_disc_trc_data(struct lpfc_vport *vport, char *buf, int size)
{
-@@ -125,7 +153,6 @@ lpfc_debugfs_disc_trc_data(struct lpfc_v
+@@ -124,7 +152,6 @@
+ uint32_t ms;
struct lpfc_debugfs_trc *dtp;
char buffer[LPFC_DEBUG_TRC_ENTRY_SIZE];
-
-
+
enable = lpfc_debugfs_enable;
lpfc_debugfs_enable = 0;
-
-@@ -159,6 +186,25 @@ lpfc_debugfs_disc_trc_data(struct lpfc_v
+@@ -159,6 +186,25 @@
return len;
}
static int
lpfc_debugfs_slow_ring_trc_data(struct lpfc_hba *phba, char *buf, int size)
{
-@@ -203,6 +249,25 @@ lpfc_debugfs_slow_ring_trc_data(struct l
+@@ -203,6 +249,25 @@
static int lpfc_debugfs_last_hbq = -1;
static int
lpfc_debugfs_hbqinfo_data(struct lpfc_hba *phba, char *buf, int size)
{
-@@ -303,6 +368,24 @@ skipit:
+@@ -303,6 +368,24 @@
static int lpfc_debugfs_last_hba_slim_off;
static int
lpfc_debugfs_dumpHBASlim_data(struct lpfc_hba *phba, char *buf, int size)
{
-@@ -342,6 +425,21 @@ lpfc_debugfs_dumpHBASlim_data(struct lpf
+@@ -342,6 +425,21 @@
return len;
}
static int
lpfc_debugfs_dumpHostSlim_data(struct lpfc_hba *phba, char *buf, int size)
{
-@@ -357,7 +455,7 @@ lpfc_debugfs_dumpHostSlim_data(struct lp
+@@ -357,7 +455,7 @@
spin_lock_irq(&phba->hbalock);
len += snprintf(buf+len, size-len, "SLIM Mailbox\n");
i = sizeof(MAILBOX_t);
while (i > 0) {
len += snprintf(buf+len, size-len,
-@@ -370,7 +468,7 @@ lpfc_debugfs_dumpHostSlim_data(struct lp
+@@ -370,7 +468,7 @@
}
len += snprintf(buf+len, size-len, "SLIM PCB\n");
i = sizeof(PCB_t);
while (i > 0) {
len += snprintf(buf+len, size-len,
-@@ -382,44 +480,16 @@ lpfc_debugfs_dumpHostSlim_data(struct lp
+@@ -382,44 +480,16 @@
off += (8 * sizeof(uint32_t));
}
word0 = readl(phba->HAregaddr);
word1 = readl(phba->CAregaddr);
word2 = readl(phba->HSregaddr);
-@@ -430,6 +500,21 @@ lpfc_debugfs_dumpHostSlim_data(struct lp
+@@ -430,6 +500,21 @@
return len;
}
static int
lpfc_debugfs_nodelist_data(struct lpfc_vport *vport, char *buf, int size)
{
-@@ -513,7 +598,22 @@ lpfc_debugfs_nodelist_data(struct lpfc_v
+@@ -513,7 +598,22 @@
}
#endif
inline void
lpfc_debugfs_disc_trc(struct lpfc_vport *vport, int mask, char *fmt,
uint32_t data1, uint32_t data2, uint32_t data3)
-@@ -542,6 +642,19 @@ lpfc_debugfs_disc_trc(struct lpfc_vport
+@@ -542,6 +642,19 @@
return;
}
inline void
lpfc_debugfs_slow_ring_trc(struct lpfc_hba *phba, char *fmt,
uint32_t data1, uint32_t data2, uint32_t data3)
-@@ -568,6 +681,21 @@ lpfc_debugfs_slow_ring_trc(struct lpfc_h
+@@ -568,6 +681,21 @@
}
#ifdef CONFIG_LPFC_DEBUG_FS
static int
lpfc_debugfs_disc_trc_open(struct inode *inode, struct file *file)
{
-@@ -585,7 +713,7 @@ lpfc_debugfs_disc_trc_open(struct inode
+@@ -585,7 +713,7 @@
if (!debug)
goto out;
size = (lpfc_debugfs_max_disc_trc * LPFC_DEBUG_TRC_ENTRY_SIZE);
size = PAGE_ALIGN(size);
-@@ -603,6 +731,21 @@ out:
+@@ -603,6 +731,21 @@
return rc;
}
static int
lpfc_debugfs_slow_ring_trc_open(struct inode *inode, struct file *file)
{
-@@ -620,7 +763,7 @@ lpfc_debugfs_slow_ring_trc_open(struct i
+@@ -620,7 +763,7 @@
if (!debug)
goto out;
size = (lpfc_debugfs_max_slow_ring_trc * LPFC_DEBUG_TRC_ENTRY_SIZE);
size = PAGE_ALIGN(size);
-@@ -638,6 +781,21 @@ out:
+@@ -638,6 +781,21 @@
return rc;
}
static int
lpfc_debugfs_hbqinfo_open(struct inode *inode, struct file *file)
{
-@@ -649,7 +807,7 @@ lpfc_debugfs_hbqinfo_open(struct inode *
+@@ -649,7 +807,7 @@
if (!debug)
goto out;
debug->buffer = kmalloc(LPFC_HBQINFO_SIZE, GFP_KERNEL);
if (!debug->buffer) {
kfree(debug);
-@@ -665,6 +823,21 @@ out:
+@@ -665,6 +823,21 @@
return rc;
}
static int
lpfc_debugfs_dumpHBASlim_open(struct inode *inode, struct file *file)
{
-@@ -676,7 +849,7 @@ lpfc_debugfs_dumpHBASlim_open(struct ino
+@@ -676,7 +849,7 @@
if (!debug)
goto out;
debug->buffer = kmalloc(LPFC_DUMPHBASLIM_SIZE, GFP_KERNEL);
if (!debug->buffer) {
kfree(debug);
-@@ -692,6 +865,21 @@ out:
+@@ -692,6 +865,21 @@
return rc;
}
static int
lpfc_debugfs_dumpHostSlim_open(struct inode *inode, struct file *file)
{
-@@ -703,7 +891,7 @@ lpfc_debugfs_dumpHostSlim_open(struct in
+@@ -703,7 +891,7 @@
if (!debug)
goto out;
debug->buffer = kmalloc(LPFC_DUMPHOSTSLIM_SIZE, GFP_KERNEL);
if (!debug->buffer) {
kfree(debug);
-@@ -719,6 +907,21 @@ out:
+@@ -719,6 +907,21 @@
return rc;
}
static int
lpfc_debugfs_nodelist_open(struct inode *inode, struct file *file)
{
-@@ -730,7 +933,7 @@ lpfc_debugfs_nodelist_open(struct inode
+@@ -730,7 +933,7 @@
if (!debug)
goto out;
debug->buffer = kmalloc(LPFC_NODELIST_SIZE, GFP_KERNEL);
if (!debug->buffer) {
kfree(debug);
-@@ -746,6 +949,23 @@ out:
+@@ -746,6 +949,23 @@
return rc;
}
static loff_t
lpfc_debugfs_lseek(struct file *file, loff_t off, int whence)
{
-@@ -767,6 +987,22 @@ lpfc_debugfs_lseek(struct file *file, lo
+@@ -767,6 +987,22 @@
return (pos < 0 || pos > debug->len) ? -EINVAL : (file->f_pos = pos);
}
static ssize_t
lpfc_debugfs_read(struct file *file, char __user *buf,
size_t nbytes, loff_t *ppos)
-@@ -776,6 +1012,18 @@ lpfc_debugfs_read(struct file *file, cha
+@@ -776,6 +1012,18 @@
debug->len);
}
static int
lpfc_debugfs_release(struct inode *inode, struct file *file)
{
-@@ -845,6 +1093,16 @@ static struct dentry *lpfc_debugfs_root
+@@ -845,6 +1093,16 @@
static atomic_t lpfc_debugfs_hba_count;
#endif
inline void
lpfc_debugfs_initialize(struct lpfc_vport *vport)
{
-@@ -862,7 +1120,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -862,7 +1120,7 @@
atomic_set(&lpfc_debugfs_hba_count, 0);
if (!lpfc_debugfs_root) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
goto debug_failed;
}
}
-@@ -876,7 +1134,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -876,7 +1134,7 @@
debugfs_create_dir(name, lpfc_debugfs_root);
if (!phba->hba_debugfs_root) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
goto debug_failed;
}
atomic_inc(&lpfc_debugfs_hba_count);
-@@ -890,7 +1148,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -890,7 +1148,7 @@
phba, &lpfc_debugfs_op_hbqinfo);
if (!phba->debug_hbqinfo) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
goto debug_failed;
}
-@@ -902,7 +1160,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -902,7 +1160,7 @@
phba, &lpfc_debugfs_op_dumpHBASlim);
if (!phba->debug_dumpHBASlim) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
goto debug_failed;
}
-@@ -914,7 +1172,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -914,7 +1172,7 @@
phba, &lpfc_debugfs_op_dumpHostSlim);
if (!phba->debug_dumpHostSlim) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
goto debug_failed;
}
-@@ -944,7 +1202,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -944,7 +1202,7 @@
phba, &lpfc_debugfs_op_slow_ring_trc);
if (!phba->debug_slow_ring_trc) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
"slow_ring_trace\n");
goto debug_failed;
}
-@@ -955,7 +1213,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -955,7 +1213,7 @@
GFP_KERNEL);
if (!phba->slow_ring_trc) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
"slow_ring buffer\n");
goto debug_failed;
}
-@@ -972,7 +1230,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -972,7 +1230,7 @@
debugfs_create_dir(name, phba->hba_debugfs_root);
if (!vport->vport_debugfs_root) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
goto debug_failed;
}
atomic_inc(&phba->debugfs_vport_count);
-@@ -1001,7 +1259,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -1001,7 +1259,7 @@
if (!vport->disc_trc) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
"buffer\n");
goto debug_failed;
}
-@@ -1014,7 +1272,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -1014,7 +1272,7 @@
vport, &lpfc_debugfs_op_disc_trc);
if (!vport->debug_disc_trc) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
"discovery_trace\n");
goto debug_failed;
}
-@@ -1033,7 +1291,17 @@ debug_failed:
+@@ -1033,7 +1291,17 @@
#endif
}
inline void
lpfc_debugfs_terminate(struct lpfc_vport *vport)
{
-@@ -1096,5 +1364,3 @@ lpfc_debugfs_terminate(struct lpfc_vport
+@@ -1096,5 +1364,3 @@
#endif
return;
}
-
-
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_disc.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_disc.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_disc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_disc.h 2009-03-25 16:11:16.000000000 +0000
-@@ -37,6 +37,8 @@ enum lpfc_work_type {
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_disc.h
+--- a/drivers/scsi/lpfc/lpfc_disc.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_disc.h Wed May 06 16:56:34 2009 +0100
+@@ -37,6 +37,8 @@
LPFC_EVT_KILL,
LPFC_EVT_ELS_RETRY,
LPFC_EVT_DEV_LOSS,
};
/* structure used to queue event to the discovery tasklet */
-@@ -47,6 +49,24 @@ struct lpfc_work_evt {
+@@ -47,6 +49,24 @@
enum lpfc_work_type evt;
};
struct lpfc_nodelist {
struct list_head nlp_listp;
-@@ -80,14 +100,21 @@ struct lpfc_nodelist {
+@@ -80,14 +100,21 @@
#define NLP_USG_FREE_ACK_BIT 0x8 /* Indicate ndlp memory free invoked */
struct timer_list nlp_delayfunc; /* Used for delayed ELS cmds */
};
/* Defines for nlp_flag (uint32) */
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_els.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_els.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_els.c
+--- a/drivers/scsi/lpfc/lpfc_els.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_els.c Wed May 06 16:56:34 2009 +0100
@@ -30,6 +30,7 @@
#include "lpfc_hw.h"
static int lpfc_els_retry(struct lpfc_hba *, struct lpfc_iocbq *,
struct lpfc_iocbq *);
-@@ -53,6 +57,28 @@ static void lpfc_register_new_vport(stru
+@@ -53,6 +57,28 @@
static int lpfc_max_els_tries = 3;
int
lpfc_els_chk_latt(struct lpfc_vport *vport)
{
-@@ -92,7 +118,35 @@ lpfc_els_chk_latt(struct lpfc_vport *vpo
+@@ -92,7 +118,35 @@
return 1;
}
lpfc_prep_els_iocb(struct lpfc_vport *vport, uint8_t expectRsp,
uint16_t cmdSize, uint8_t retry,
struct lpfc_nodelist *ndlp, uint32_t did,
-@@ -150,7 +204,7 @@ lpfc_prep_els_iocb(struct lpfc_vport *vp
+@@ -150,7 +204,7 @@
icmd->un.elsreq64.bdl.addrHigh = putPaddrHigh(pbuflist->phys);
icmd->un.elsreq64.bdl.addrLow = putPaddrLow(pbuflist->phys);
icmd->un.elsreq64.remoteID = did; /* DID */
if (expectRsp) {
icmd->un.elsreq64.bdl.bdeSize = (2 * sizeof(struct ulp_bde64));
-@@ -170,7 +224,11 @@ lpfc_prep_els_iocb(struct lpfc_vport *vp
+@@ -170,7 +224,11 @@
/* For ELS_REQUEST64_CR, use the VPI by default */
icmd->ulpContext = vport->vpi;
icmd->ulpCt_h = 0;
}
bpl = (struct ulp_bde64 *) pbuflist->virt;
-@@ -185,7 +243,7 @@ lpfc_prep_els_iocb(struct lpfc_vport *vp
+@@ -185,7 +243,7 @@
bpl->addrLow = le32_to_cpu(putPaddrLow(prsp->phys));
bpl->addrHigh = le32_to_cpu(putPaddrHigh(prsp->phys));
bpl->tus.f.bdeSize = FCELSSIZE;
bpl->tus.w = le32_to_cpu(bpl->tus.w);
}
-@@ -220,7 +278,8 @@ lpfc_prep_els_iocb(struct lpfc_vport *vp
+@@ -220,7 +278,8 @@
return elsiocb;
els_iocb_free_pbuf_exit:
kfree(pbuflist);
els_iocb_free_prsp_exit:
-@@ -233,6 +292,22 @@ els_iocb_free_pcmb_exit:
+@@ -233,6 +292,22 @@
return NULL;
}
static int
lpfc_issue_fabric_reglogin(struct lpfc_vport *vport)
{
-@@ -313,6 +388,26 @@ fail:
+@@ -313,6 +388,26 @@
return -ENXIO;
}
static int
lpfc_cmpl_els_flogi_fabric(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
struct serv_parm *sp, IOCB_t *irsp)
-@@ -387,7 +482,7 @@ lpfc_cmpl_els_flogi_fabric(struct lpfc_v
+@@ -387,7 +482,7 @@
*/
list_for_each_entry_safe(np, next_np,
&vport->fc_nodes, nlp_listp) {
continue;
if ((np->nlp_state != NLP_STE_NPR_NODE) ||
!(np->nlp_flag & NLP_NPR_ADISC))
-@@ -416,9 +511,26 @@ lpfc_cmpl_els_flogi_fabric(struct lpfc_v
+@@ -416,9 +511,26 @@
return 0;
}
static int
lpfc_cmpl_els_flogi_nport(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
struct serv_parm *sp)
-@@ -516,6 +628,29 @@ fail:
+@@ -516,6 +628,29 @@
return -ENXIO;
}
static void
lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
-@@ -526,6 +661,7 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phb
+@@ -526,6 +661,7 @@
struct lpfc_nodelist *ndlp = cmdiocb->context1;
struct lpfc_dmabuf *pcmd = cmdiocb->context2, *prsp;
struct serv_parm *sp;
int rc;
/* Check to see if link went down during discovery */
-@@ -576,7 +712,10 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phb
+@@ -576,7 +712,10 @@
prsp = list_get_first(&pcmd->list, struct lpfc_dmabuf, list);
sp = prsp->virt + sizeof(uint32_t);
/* FLOGI completes successfully */
lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
"0101 FLOGI completes sucessfully "
-@@ -584,6 +723,20 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phb
+@@ -584,6 +723,20 @@
irsp->un.ulpWord[4], sp->cmn.e_d_tov,
sp->cmn.w2.r_a_tov, sp->cmn.edtovResolution);
if (vport->port_state == LPFC_FLOGI) {
/*
* If Common Service Parameters indicate Nport
-@@ -618,6 +771,28 @@ out:
+@@ -618,6 +771,28 @@
lpfc_els_free_iocb(phba, cmdiocb);
}
static int
lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
uint8_t retry)
-@@ -651,6 +826,10 @@ lpfc_issue_els_flogi(struct lpfc_vport *
+@@ -651,6 +826,10 @@
sp = (struct serv_parm *) pcmd;
/* Setup CSPs accordingly for Fabric */
sp->cmn.e_d_tov = 0;
sp->cmn.w2.r_a_tov = 0;
sp->cls1.classValid = 0;
-@@ -694,6 +873,20 @@ lpfc_issue_els_flogi(struct lpfc_vport *
+@@ -694,6 +873,20 @@
return 0;
}
int
lpfc_els_abort_flogi(struct lpfc_hba *phba)
{
-@@ -729,12 +922,32 @@ lpfc_els_abort_flogi(struct lpfc_hba *ph
+@@ -729,11 +922,31 @@
return 0;
}
{
struct lpfc_hba *phba = vport->phba;
struct lpfc_nodelist *ndlp;
-
++
+ if ((vport->cfg_enable_auth) &&
+ (vport->security_service_state == SECURITY_OFFLINE))
+ return 1;
-+
+
vport->port_state = LPFC_FLOGI;
lpfc_set_disctmo(vport);
-
-@@ -764,12 +977,39 @@ lpfc_initial_flogi(struct lpfc_vport *vp
+@@ -764,11 +977,38 @@
return 1;
}
{
struct lpfc_hba *phba = vport->phba;
struct lpfc_nodelist *ndlp;
-
++
+ if (vport->cfg_enable_auth) {
+ if (lpfc_security_wait(vport)) {
+ lpfc_printf_vlog(vport, KERN_ERR, LOG_SECURITY,
+ return 0;
+ }
+ }
-+
+
/* First look for the Fabric ndlp */
ndlp = lpfc_findnode_did(vport, Fabric_DID);
- if (!ndlp) {
-@@ -797,6 +1037,17 @@ lpfc_initial_fdisc(struct lpfc_vport *vp
+@@ -797,6 +1037,17 @@
return 1;
}
void
lpfc_more_plogi(struct lpfc_vport *vport)
{
-@@ -819,6 +1070,37 @@ lpfc_more_plogi(struct lpfc_vport *vport
+@@ -819,6 +1070,37 @@
return;
}
static struct lpfc_nodelist *
lpfc_plogi_confirm_nport(struct lpfc_hba *phba, uint32_t *prsp,
struct lpfc_nodelist *ndlp)
-@@ -922,6 +1204,17 @@ lpfc_plogi_confirm_nport(struct lpfc_hba
+@@ -922,6 +1204,17 @@
return new_ndlp;
}
void
lpfc_end_rscn(struct lpfc_vport *vport)
{
-@@ -943,6 +1236,26 @@ lpfc_end_rscn(struct lpfc_vport *vport)
+@@ -943,6 +1236,26 @@
}
}
static void
lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
-@@ -1048,6 +1361,27 @@ out:
+@@ -1048,6 +1361,27 @@
return;
}
int
lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry)
{
-@@ -1106,6 +1440,19 @@ lpfc_issue_els_plogi(struct lpfc_vport *
+@@ -1106,6 +1440,19 @@
return 0;
}
static void
lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
-@@ -1164,6 +1511,27 @@ out:
+@@ -1164,6 +1511,27 @@
return;
}
int
lpfc_issue_els_prli(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
uint8_t retry)
-@@ -1233,6 +1601,92 @@ lpfc_issue_els_prli(struct lpfc_vport *v
+@@ -1233,6 +1601,92 @@
return 0;
}
void
lpfc_more_adisc(struct lpfc_vport *vport)
{
-@@ -1252,23 +1706,27 @@ lpfc_more_adisc(struct lpfc_vport *vport
+@@ -1252,23 +1706,27 @@
/* go thru NPR nodes and issue any remaining ELS ADISCs */
sentadisc = lpfc_els_disc_adisc(vport);
}
-+ if (!vport->num_disc_nodes)
-+ lpfc_adisc_done(vport);
- return;
- }
-
+- return;
+-}
+-
-static void
-lpfc_rscn_disc(struct lpfc_vport *vport)
-{
- lpfc_end_rscn(vport);
-}
-
++ if (!vport->num_disc_nodes)
++ lpfc_adisc_done(vport);
++ return;
++}
++
+/**
+ * lpfc_cmpl_els_adisc: Completion callback function for adisc.
+ * @phba: pointer to lpfc hba data structure.
static void
lpfc_cmpl_els_adisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
-@@ -1333,57 +1791,34 @@ lpfc_cmpl_els_adisc(struct lpfc_hba *phb
+@@ -1333,57 +1791,34 @@
lpfc_disc_state_machine(vport, ndlp, cmdiocb,
NLP_EVT_CMPL_ADISC);
int
lpfc_issue_els_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
uint8_t retry)
-@@ -1437,6 +1872,18 @@ lpfc_issue_els_adisc(struct lpfc_vport *
+@@ -1437,6 +1872,18 @@
return 0;
}
static void
lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
-@@ -1502,6 +1949,26 @@ out:
+@@ -1502,6 +1949,26 @@
return;
}
int
lpfc_issue_els_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
uint8_t retry)
-@@ -1563,6 +2030,22 @@ lpfc_issue_els_logo(struct lpfc_vport *v
+@@ -1563,6 +2030,22 @@
return 0;
}
static void
lpfc_cmpl_els_cmd(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
-@@ -1587,6 +2070,28 @@ lpfc_cmpl_els_cmd(struct lpfc_hba *phba,
+@@ -1587,6 +2070,28 @@
return;
}
int
lpfc_issue_els_scr(struct lpfc_vport *vport, uint32_t nportid, uint8_t retry)
{
-@@ -1659,6 +2164,28 @@ lpfc_issue_els_scr(struct lpfc_vport *vp
+@@ -1659,6 +2164,28 @@
return 0;
}
static int
lpfc_issue_els_farpr(struct lpfc_vport *vport, uint32_t nportid, uint8_t retry)
{
-@@ -1748,6 +2275,18 @@ lpfc_issue_els_farpr(struct lpfc_vport *
+@@ -1748,6 +2275,18 @@
return 0;
}
void
lpfc_cancel_retry_delay_tmo(struct lpfc_vport *vport, struct lpfc_nodelist *nlp)
{
-@@ -1775,25 +2314,36 @@ lpfc_cancel_retry_delay_tmo(struct lpfc_
+@@ -1775,25 +2314,36 @@
if (vport->port_state < LPFC_VPORT_READY) {
/* Check if there are more ADISCs to be sent */
lpfc_more_adisc(vport);
- spin_unlock_irq(shost->host_lock);
- lpfc_can_disctmo(vport);
- lpfc_end_rscn(vport);
+- }
+- }
+- }
+- return;
+-}
+-
+ if (vport->num_disc_nodes == 0) {
+ spin_lock_irq(shost->host_lock);
+ vport->fc_flag &= ~FC_NDISC_ACTIVE;
+ lpfc_can_disctmo(vport);
+ lpfc_end_rscn(vport);
+ }
- }
- }
- }
- return;
- }
-
++ }
++ }
++ }
++ return;
++}
++
+/**
+ * lpfc_els_retry_delay: Timer function with a ndlp delayed function timer.
+ * @ptr: holder for the pointer to the timer function associated data (ndlp).
void
lpfc_els_retry_delay(unsigned long ptr)
{
-@@ -1822,6 +2372,15 @@ lpfc_els_retry_delay(unsigned long ptr)
+@@ -1822,6 +2372,15 @@
return;
}
void
lpfc_els_retry_delay_handler(struct lpfc_nodelist *ndlp)
{
-@@ -1884,6 +2443,27 @@ lpfc_els_retry_delay_handler(struct lpfc
+@@ -1884,6 +2443,27 @@
return;
}
static int
lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
-@@ -1933,6 +2513,17 @@ lpfc_els_retry(struct lpfc_hba *phba, st
+@@ -1933,6 +2513,17 @@
case IOSTAT_LOCAL_REJECT:
switch ((irsp->un.ulpWord[4] & 0xff)) {
case IOERR_LOOP_OPEN_FAILURE:
if (cmd == ELS_CMD_PLOGI && cmdiocb->retry == 0)
delay = 1000;
retry = 1;
-@@ -2051,7 +2642,7 @@ lpfc_els_retry(struct lpfc_hba *phba, st
+@@ -2051,7 +2642,7 @@
(stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_NPORT_ID))
) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
"Fabric Detected Bad WWN\n",
stat.un.lsRjtError);
lpfc_vport_set_state(vport,
-@@ -2162,6 +2753,17 @@ lpfc_els_retry(struct lpfc_hba *phba, st
+@@ -2162,6 +2753,17 @@
lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE);
lpfc_issue_els_logo(vport, ndlp, cmdiocb->retry);
return 1;
}
}
/* No retry ELS command <elsCmd> to remote NPORT <did> */
-@@ -2182,12 +2784,26 @@ lpfc_els_retry(struct lpfc_hba *phba, st
+@@ -2182,12 +2784,26 @@
return 0;
}
if (!list_empty(&buf_ptr1->list)) {
list_remove_head(&buf_ptr1->list, buf_ptr,
struct lpfc_dmabuf,
-@@ -2200,6 +2816,18 @@ lpfc_els_free_data(struct lpfc_hba *phba
+@@ -2200,6 +2816,18 @@
return 0;
}
static int
lpfc_els_free_bpl(struct lpfc_hba *phba, struct lpfc_dmabuf *buf_ptr)
{
-@@ -2208,6 +2836,33 @@ lpfc_els_free_bpl(struct lpfc_hba *phba,
+@@ -2208,6 +2836,33 @@
return 0;
}
int
lpfc_els_free_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *elsiocb)
{
-@@ -2274,6 +2929,23 @@ lpfc_els_free_iocb(struct lpfc_hba *phba
+@@ -2274,6 +2929,23 @@
return 0;
}
static void
lpfc_cmpl_els_logo_acc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
-@@ -2311,6 +2983,19 @@ lpfc_cmpl_els_logo_acc(struct lpfc_hba *
+@@ -2311,6 +2983,19 @@
return;
}
void
lpfc_mbx_cmpl_dflt_rpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
{
-@@ -2332,6 +3017,22 @@ lpfc_mbx_cmpl_dflt_rpi(struct lpfc_hba *
+@@ -2332,6 +3017,22 @@
return;
}
static void
lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
-@@ -2487,6 +3188,31 @@ out:
+@@ -2487,6 +3188,31 @@
return;
}
int
lpfc_els_rsp_acc(struct lpfc_vport *vport, uint32_t flag,
struct lpfc_iocbq *oldiocb, struct lpfc_nodelist *ndlp,
-@@ -2601,6 +3327,28 @@ lpfc_els_rsp_acc(struct lpfc_vport *vpor
+@@ -2601,6 +3327,28 @@
return 0;
}
int
lpfc_els_rsp_reject(struct lpfc_vport *vport, uint32_t rejectError,
struct lpfc_iocbq *oldiocb, struct lpfc_nodelist *ndlp,
-@@ -2660,6 +3408,25 @@ lpfc_els_rsp_reject(struct lpfc_vport *v
+@@ -2660,6 +3408,25 @@
return 0;
}
int
lpfc_els_rsp_adisc_acc(struct lpfc_vport *vport, struct lpfc_iocbq *oldiocb,
struct lpfc_nodelist *ndlp)
-@@ -2716,6 +3483,25 @@ lpfc_els_rsp_adisc_acc(struct lpfc_vport
+@@ -2716,6 +3483,25 @@
return 0;
}
int
lpfc_els_rsp_prli_acc(struct lpfc_vport *vport, struct lpfc_iocbq *oldiocb,
struct lpfc_nodelist *ndlp)
-@@ -2795,6 +3581,32 @@ lpfc_els_rsp_prli_acc(struct lpfc_vport
+@@ -2795,6 +3581,32 @@
return 0;
}
static int
lpfc_els_rsp_rnid_acc(struct lpfc_vport *vport, uint8_t format,
struct lpfc_iocbq *oldiocb, struct lpfc_nodelist *ndlp)
-@@ -2875,6 +3687,25 @@ lpfc_els_rsp_rnid_acc(struct lpfc_vport
+@@ -2875,6 +3687,25 @@
return 0;
}
int
lpfc_els_disc_adisc(struct lpfc_vport *vport)
{
-@@ -2914,6 +3745,25 @@ lpfc_els_disc_adisc(struct lpfc_vport *v
+@@ -2914,6 +3745,25 @@
return sentadisc;
}
int
lpfc_els_disc_plogi(struct lpfc_vport *vport)
{
-@@ -2954,6 +3804,15 @@ lpfc_els_disc_plogi(struct lpfc_vport *v
+@@ -2954,6 +3804,15 @@
return sentplogi;
}
void
lpfc_els_flush_rscn(struct lpfc_vport *vport)
{
-@@ -2984,6 +3843,18 @@ lpfc_els_flush_rscn(struct lpfc_vport *v
+@@ -2984,6 +3843,18 @@
vport->fc_rscn_flush = 0;
}
int
lpfc_rscn_payload_check(struct lpfc_vport *vport, uint32_t did)
{
-@@ -3019,27 +3890,21 @@ lpfc_rscn_payload_check(struct lpfc_vpor
+@@ -3019,27 +3890,21 @@
while (payload_len) {
rscn_did.un.word = be32_to_cpu(*lp++);
payload_len -= sizeof(uint32_t);
goto return_did_out;
}
}
-@@ -3053,6 +3918,17 @@ return_did_out:
+@@ -3053,6 +3918,17 @@
return did;
}
static int
lpfc_rscn_recovery_check(struct lpfc_vport *vport)
{
-@@ -3071,6 +3947,71 @@ lpfc_rscn_recovery_check(struct lpfc_vpo
+@@ -3071,6 +3947,71 @@
return 0;
}
static int
lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
struct lpfc_nodelist *ndlp)
-@@ -3096,6 +4037,10 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vpo
+@@ -3096,6 +4037,10 @@
"0214 RSCN received Data: x%x x%x x%x x%x\n",
vport->fc_flag, payload_len, *lp,
vport->fc_rscn_id_cnt);
for (i = 0; i < payload_len/sizeof(uint32_t); i++)
fc_host_post_event(shost, fc_get_event_number(),
FCH_EVT_RSCN, lp[i]);
-@@ -3130,7 +4075,7 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vpo
+@@ -3130,7 +4075,7 @@
if (rscn_id == hba_id) {
/* ALL NPortIDs in RSCN are on HBA */
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
"Data: x%x x%x x%x x%x\n",
vport->fc_flag, payload_len,
*lp, vport->fc_rscn_id_cnt);
-@@ -3241,6 +4186,22 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vpo
+@@ -3241,6 +4186,22 @@
return lpfc_els_handle_rscn(vport);
}
int
lpfc_els_handle_rscn(struct lpfc_vport *vport)
{
-@@ -3313,6 +4274,31 @@ lpfc_els_handle_rscn(struct lpfc_vport *
+@@ -3313,6 +4274,31 @@
return 0;
}
static int
lpfc_els_rcv_flogi(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
struct lpfc_nodelist *ndlp)
-@@ -3402,6 +4388,22 @@ lpfc_els_rcv_flogi(struct lpfc_vport *vp
+@@ -3402,6 +4388,22 @@
return 0;
}
static int
lpfc_els_rcv_rnid(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
struct lpfc_nodelist *ndlp)
-@@ -3441,6 +4443,19 @@ lpfc_els_rcv_rnid(struct lpfc_vport *vpo
+@@ -3441,6 +4443,19 @@
return 0;
}
static int
lpfc_els_rcv_lirr(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
struct lpfc_nodelist *ndlp)
-@@ -3456,6 +4471,25 @@ lpfc_els_rcv_lirr(struct lpfc_vport *vpo
+@@ -3456,6 +4471,25 @@
return 0;
}
static void
lpfc_els_rsp_rps_acc(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
{
-@@ -3531,6 +4565,24 @@ lpfc_els_rsp_rps_acc(struct lpfc_hba *ph
+@@ -3531,6 +4565,24 @@
return;
}
static int
lpfc_els_rcv_rps(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
struct lpfc_nodelist *ndlp)
-@@ -3544,14 +4596,9 @@ lpfc_els_rcv_rps(struct lpfc_vport *vpor
+@@ -3544,14 +4596,9 @@
struct ls_rjt stat;
if ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) &&
pcmd = (struct lpfc_dmabuf *) cmdiocb->context2;
lp = (uint32_t *) pcmd->virt;
-@@ -3584,6 +4631,9 @@ lpfc_els_rcv_rps(struct lpfc_vport *vpor
+@@ -3584,6 +4631,9 @@
mempool_free(mbox, phba->mbox_mem_pool);
}
}
stat.un.b.lsRjtRsvd0 = 0;
stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC;
stat.un.b.lsRjtRsnCodeExp = LSEXP_CANT_GIVE_DATA;
-@@ -3592,6 +4642,25 @@ lpfc_els_rcv_rps(struct lpfc_vport *vpor
+@@ -3592,6 +4642,25 @@
return 0;
}
static int
lpfc_els_rsp_rpl_acc(struct lpfc_vport *vport, uint16_t cmdsize,
struct lpfc_iocbq *oldiocb, struct lpfc_nodelist *ndlp)
-@@ -3645,6 +4714,22 @@ lpfc_els_rsp_rpl_acc(struct lpfc_vport *
+@@ -3645,6 +4714,22 @@
return 0;
}
static int
lpfc_els_rcv_rpl(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
struct lpfc_nodelist *ndlp)
-@@ -3658,12 +4743,15 @@ lpfc_els_rcv_rpl(struct lpfc_vport *vpor
+@@ -3658,12 +4743,15 @@
if ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) &&
(ndlp->nlp_state != NLP_STE_MAPPED_NODE)) {
}
pcmd = (struct lpfc_dmabuf *) cmdiocb->context2;
-@@ -3685,6 +4773,30 @@ lpfc_els_rcv_rpl(struct lpfc_vport *vpor
+@@ -3685,6 +4773,30 @@
return 0;
}
static int
lpfc_els_rcv_farp(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
struct lpfc_nodelist *ndlp)
-@@ -3744,6 +4856,20 @@ lpfc_els_rcv_farp(struct lpfc_vport *vpo
+@@ -3744,6 +4856,20 @@
return 0;
}
static int
lpfc_els_rcv_farpr(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
struct lpfc_nodelist *ndlp)
-@@ -3768,6 +4894,25 @@ lpfc_els_rcv_farpr(struct lpfc_vport *vp
+@@ -3768,6 +4894,25 @@
return 0;
}
static int
lpfc_els_rcv_fan(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
struct lpfc_nodelist *fan_ndlp)
-@@ -3797,6 +4942,16 @@ lpfc_els_rcv_fan(struct lpfc_vport *vpor
+@@ -3797,6 +4942,16 @@
return 0;
}
void
lpfc_els_timeout(unsigned long ptr)
{
-@@ -3816,6 +4971,15 @@ lpfc_els_timeout(unsigned long ptr)
+@@ -3816,6 +4971,15 @@
return;
}
void
lpfc_els_timeout_handler(struct lpfc_vport *vport)
{
-@@ -3828,10 +4992,6 @@ lpfc_els_timeout_handler(struct lpfc_vpo
+@@ -3828,10 +4992,6 @@
uint32_t timeout;
uint32_t remote_ID = 0xffffffff;
spin_lock_irq(&phba->hbalock);
timeout = (uint32_t)(phba->fc_ratov << 1);
-@@ -3886,6 +5046,26 @@ lpfc_els_timeout_handler(struct lpfc_vpo
+@@ -3886,6 +5046,26 @@
mod_timer(&vport->els_tmofunc, jiffies + HZ * timeout);
}
void
lpfc_els_flush_cmd(struct lpfc_vport *vport)
{
-@@ -3948,6 +5128,23 @@ lpfc_els_flush_cmd(struct lpfc_vport *vp
+@@ -3948,6 +5128,23 @@
return;
}
void
lpfc_els_flush_all_cmd(struct lpfc_hba *phba)
{
-@@ -3993,6 +5190,524 @@ lpfc_els_flush_all_cmd(struct lpfc_hba
+@@ -3992,6 +5189,524 @@
+ return;
}
- static void
++static void
+lpfc_els_rcv_auth_neg(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
+ struct lpfc_nodelist *ndlp)
+{
+ * IOCB is then used to invoke the proper routine and to set up proper state
+ * of the discovery state machine.
+ **/
-+static void
+ static void
lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
struct lpfc_vport *vport, struct lpfc_iocbq *elsiocb)
- {
-@@ -4059,8 +5774,6 @@ lpfc_els_unsol_buffer(struct lpfc_hba *p
+@@ -4059,8 +5774,6 @@
}
phba->fc_stat.elsRcvFrame++;
elsiocb->context1 = lpfc_nlp_get(ndlp);
elsiocb->vport = vport;
-@@ -4081,6 +5794,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *p
+@@ -4081,6 +5794,7 @@
phba->fc_stat.elsRcvPLOGI++;
ndlp = lpfc_plogi_confirm_nport(phba, payload, ndlp);
if (vport->port_state < LPFC_DISC_AUTH) {
if (!(phba->pport->fc_flag & FC_PT2PT) ||
(phba->pport->fc_flag & FC_PT2PT_PLOGI)) {
-@@ -4118,6 +5832,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *p
+@@ -4118,6 +5832,7 @@
did, vport->port_state, ndlp->nlp_flag);
phba->fc_stat.elsRcvLOGO++;
if (vport->port_state < LPFC_DISC_AUTH) {
rjt_err = LSRJT_UNABLE_TPC;
break;
-@@ -4130,6 +5845,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *p
+@@ -4130,6 +5845,7 @@
did, vport->port_state, ndlp->nlp_flag);
phba->fc_stat.elsRcvPRLO++;
if (vport->port_state < LPFC_DISC_AUTH) {
rjt_err = LSRJT_UNABLE_TPC;
break;
-@@ -4147,6 +5863,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *p
+@@ -4147,6 +5863,7 @@
"RCV ADISC: did:x%x/ste:x%x flg:x%x",
did, vport->port_state, ndlp->nlp_flag);
phba->fc_stat.elsRcvADISC++;
if (vport->port_state < LPFC_DISC_AUTH) {
rjt_err = LSRJT_UNABLE_TPC;
-@@ -4244,6 +5961,48 @@ lpfc_els_unsol_buffer(struct lpfc_hba *p
+@@ -4244,6 +5961,48 @@
if (newnode)
lpfc_nlp_put(ndlp);
break;
default:
lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL,
"RCV ELS cmd: cmd:x%x did:x%x/ste:x%x",
-@@ -4270,6 +6029,8 @@ lpfc_els_unsol_buffer(struct lpfc_hba *p
+@@ -4270,6 +6029,8 @@
NULL);
}
return;
dropit:
-@@ -4282,6 +6043,19 @@ dropit:
+@@ -4282,6 +6043,19 @@
phba->fc_stat.elsRcvDrop++;
}
static struct lpfc_vport *
lpfc_find_vport_by_vpid(struct lpfc_hba *phba, uint16_t vpi)
{
-@@ -4299,6 +6073,18 @@ lpfc_find_vport_by_vpid(struct lpfc_hba
+@@ -4299,6 +6073,18 @@
return NULL;
}
void
lpfc_els_unsol_event(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
struct lpfc_iocbq *elsiocb)
-@@ -4309,6 +6095,7 @@ lpfc_els_unsol_event(struct lpfc_hba *ph
+@@ -4309,6 +6095,7 @@
struct lpfc_dmabuf *bdeBuf1 = elsiocb->context2;
struct lpfc_dmabuf *bdeBuf2 = elsiocb->context3;
elsiocb->context2 = NULL;
elsiocb->context3 = NULL;
-@@ -4356,8 +6143,6 @@ lpfc_els_unsol_event(struct lpfc_hba *ph
+@@ -4356,8 +6143,6 @@
* The different unsolicited event handlers would tell us
* if they are done with "mp" by setting context2 to NULL.
*/
if (elsiocb->context2) {
lpfc_in_buf_free(phba, (struct lpfc_dmabuf *)elsiocb->context2);
elsiocb->context2 = NULL;
-@@ -4376,6 +6161,19 @@ lpfc_els_unsol_event(struct lpfc_hba *ph
+@@ -4376,6 +6161,19 @@
}
}
void
lpfc_do_scr_ns_plogi(struct lpfc_hba *phba, struct lpfc_vport *vport)
{
-@@ -4434,6 +6232,18 @@ lpfc_do_scr_ns_plogi(struct lpfc_hba *ph
+@@ -4434,6 +6232,18 @@
return;
}
static void
lpfc_cmpl_reg_new_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
{
-@@ -4478,7 +6288,7 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba
+@@ -4478,7 +6288,7 @@
} else {
if (vport == phba->pport)
lpfc_issue_fabric_reglogin(vport);
lpfc_do_scr_ns_plogi(phba, vport);
}
-@@ -4491,6 +6301,15 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba
+@@ -4491,6 +6301,15 @@
return;
}
static void
lpfc_register_new_vport(struct lpfc_hba *phba, struct lpfc_vport *vport,
struct lpfc_nodelist *ndlp)
-@@ -4531,6 +6350,26 @@ mbox_err_exit:
+@@ -4531,6 +6350,26 @@
return;
}
static void
lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
-@@ -4542,6 +6381,9 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phb
+@@ -4542,6 +6381,9 @@
struct lpfc_nodelist *next_np;
IOCB_t *irsp = &rspiocb->iocb;
struct lpfc_iocbq *piocb;
lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
"0123 FDISC completes. x%x/x%x prevDID: x%x\n",
-@@ -4565,58 +6407,95 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phb
+@@ -4565,58 +6407,95 @@
goto out;
/* FDISC failed */
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
- lpfc_nlp_put(ndlp);
- /* giving up on FDISC. Cancel discovery timer */
- lpfc_can_disctmo(vport);
+- } else {
+- spin_lock_irq(shost->host_lock);
+- vport->fc_flag |= FC_FABRIC;
+- if (vport->phba->fc_topology == TOPOLOGY_LOOP)
+- vport->fc_flag |= FC_PUBLIC_LOOP;
+- spin_unlock_irq(shost->host_lock);
+-
+- vport->fc_myDID = irsp->un.ulpWord[4] & Mask_DID;
+- lpfc_vport_set_state(vport, FC_VPORT_ACTIVE);
+- if ((vport->fc_prevDID != vport->fc_myDID) &&
+- !(vport->fc_flag & FC_VPORT_NEEDS_REG_VPI)) {
+- /* If our NportID changed, we need to ensure all
+- * remaining NPORTs get unreg_login'ed so we can
+- * issue unreg_vpi.
+- */
+- list_for_each_entry_safe(np, next_np,
+- &vport->fc_nodes, nlp_listp) {
+- if (!NLP_CHK_NODE_ACT(ndlp) ||
+- (np->nlp_state != NLP_STE_NPR_NODE) ||
+- !(np->nlp_flag & NLP_NPR_ADISC))
+- continue;
+- spin_lock_irq(shost->host_lock);
+- np->nlp_flag &= ~NLP_NPR_ADISC;
+- spin_unlock_irq(shost->host_lock);
+- lpfc_unreg_rpi(vport, np);
+- }
+- lpfc_mbx_unreg_vpi(vport);
+- spin_lock_irq(shost->host_lock);
+- vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
+- spin_unlock_irq(shost->host_lock);
+- }
+-
+- if (vport->fc_flag & FC_VPORT_NEEDS_REG_VPI)
+- lpfc_register_new_vport(phba, vport, ndlp);
+- else
+- lpfc_do_scr_ns_plogi(phba, vport);
+-
+- /* Unconditionaly kick off releasing fabric node for vports */
+- lpfc_nlp_put(ndlp);
+- }
+-
+ goto fdisc_failed;
+ }
+ prsp = list_get_first(&pcmd->list, struct lpfc_dmabuf, list);
+ u64_to_wwn(AUTH_FABRIC_WWN, wwpn.u.wwn);
+ if (lpfc_get_auth_config(ndlp, &wwpn))
+ goto fdisc_failed;
- } else {
-- spin_lock_irq(shost->host_lock);
-- vport->fc_flag |= FC_FABRIC;
-- if (vport->phba->fc_topology == TOPOLOGY_LOOP)
-- vport->fc_flag |= FC_PUBLIC_LOOP;
-- spin_unlock_irq(shost->host_lock);
++ } else {
+ vport->auth.security_active = 0;
+ if (sp->cmn.security) {
+ lpfc_printf_vlog(vport, KERN_ERR, LOG_SECURITY,
+ if (vport->phba->fc_topology == TOPOLOGY_LOOP)
+ vport->fc_flag |= FC_PUBLIC_LOOP;
+ spin_unlock_irq(shost->host_lock);
-
-- vport->fc_myDID = irsp->un.ulpWord[4] & Mask_DID;
-- lpfc_vport_set_state(vport, FC_VPORT_ACTIVE);
-- if ((vport->fc_prevDID != vport->fc_myDID) &&
-- !(vport->fc_flag & FC_VPORT_NEEDS_REG_VPI)) {
-- /* If our NportID changed, we need to ensure all
-- * remaining NPORTs get unreg_login'ed so we can
-- * issue unreg_vpi.
-- */
-- list_for_each_entry_safe(np, next_np,
-- &vport->fc_nodes, nlp_listp) {
-- if (!NLP_CHK_NODE_ACT(ndlp) ||
-- (np->nlp_state != NLP_STE_NPR_NODE) ||
-- !(np->nlp_flag & NLP_NPR_ADISC))
-- continue;
-- spin_lock_irq(shost->host_lock);
-- np->nlp_flag &= ~NLP_NPR_ADISC;
-- spin_unlock_irq(shost->host_lock);
-- lpfc_unreg_rpi(vport, np);
-- }
-- lpfc_mbx_unreg_vpi(vport);
++
+ vport->fc_myDID = irsp->un.ulpWord[4] & Mask_DID;
+ lpfc_vport_set_state(vport, FC_VPORT_ACTIVE);
+ if ((vport->fc_prevDID != vport->fc_myDID) &&
+ (np->nlp_state != NLP_STE_NPR_NODE) ||
+ !(np->nlp_flag & NLP_NPR_ADISC))
+ continue;
- spin_lock_irq(shost->host_lock);
-- vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
++ spin_lock_irq(shost->host_lock);
+ np->nlp_flag &= ~NLP_NPR_ADISC;
- spin_unlock_irq(shost->host_lock);
++ spin_unlock_irq(shost->host_lock);
+ lpfc_unreg_rpi(vport, np);
- }
--
-- if (vport->fc_flag & FC_VPORT_NEEDS_REG_VPI)
-- lpfc_register_new_vport(phba, vport, ndlp);
-- else
-- lpfc_do_scr_ns_plogi(phba, vport);
--
-- /* Unconditionaly kick off releasing fabric node for vports */
-- lpfc_nlp_put(ndlp);
++ }
+ lpfc_mbx_unreg_vpi(vport);
+ spin_lock_irq(shost->host_lock);
+ vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
+ spin_unlock_irq(shost->host_lock);
- }
-
++ }
++
+ if (vport->fc_flag & FC_VPORT_NEEDS_REG_VPI)
+ lpfc_register_new_vport(phba, vport, ndlp);
+ else if (!vport->cfg_enable_auth)
static int
lpfc_issue_els_fdisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
uint8_t retry)
-@@ -4660,6 +6539,10 @@ lpfc_issue_els_fdisc(struct lpfc_vport *
+@@ -4660,6 +6539,10 @@
sp->cls2.seqDelivery = 1;
sp->cls3.seqDelivery = 1;
pcmd += sizeof(uint32_t); /* CSP Word 2 */
pcmd += sizeof(uint32_t); /* CSP Word 3 */
pcmd += sizeof(uint32_t); /* CSP Word 4 */
-@@ -4691,6 +6574,20 @@ lpfc_issue_els_fdisc(struct lpfc_vport *
+@@ -4691,6 +6574,20 @@
return 0;
}
static void
lpfc_cmpl_els_npiv_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
-@@ -4712,6 +6609,22 @@ lpfc_cmpl_els_npiv_logo(struct lpfc_hba
+@@ -4712,6 +6609,22 @@
lpfc_nlp_put(ndlp);
}
int
lpfc_issue_els_npiv_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
{
-@@ -4757,6 +6670,17 @@ lpfc_issue_els_npiv_logo(struct lpfc_vpo
+@@ -4757,6 +6670,17 @@
return 0;
}
void
lpfc_fabric_block_timeout(unsigned long ptr)
{
-@@ -4775,6 +6699,16 @@ lpfc_fabric_block_timeout(unsigned long
+@@ -4775,6 +6699,16 @@
return;
}
static void
lpfc_resume_fabric_iocbs(struct lpfc_hba *phba)
{
-@@ -4824,6 +6758,15 @@ repeat:
+@@ -4824,6 +6758,15 @@
return;
}
void
lpfc_unblock_fabric_iocbs(struct lpfc_hba *phba)
{
-@@ -4833,6 +6776,15 @@ lpfc_unblock_fabric_iocbs(struct lpfc_hb
+@@ -4833,6 +6776,15 @@
return;
}
static void
lpfc_block_fabric_iocbs(struct lpfc_hba *phba)
{
-@@ -4846,6 +6798,19 @@ lpfc_block_fabric_iocbs(struct lpfc_hba
+@@ -4846,6 +6798,19 @@
return;
}
static void
lpfc_cmpl_fabric_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
-@@ -4892,6 +6857,30 @@ lpfc_cmpl_fabric_iocb(struct lpfc_hba *p
+@@ -4892,6 +6857,30 @@
}
}
static int
lpfc_issue_fabric_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *iocb)
{
-@@ -4937,7 +6926,17 @@ lpfc_issue_fabric_iocb(struct lpfc_hba *
+@@ -4937,7 +6926,17 @@
return ret;
}
static void lpfc_fabric_abort_vport(struct lpfc_vport *vport)
{
LIST_HEAD(completions);
-@@ -4967,10 +6966,21 @@ static void lpfc_fabric_abort_vport(stru
+@@ -4967,10 +6966,21 @@
}
}
struct lpfc_iocbq *tmp_iocb, *piocb;
struct lpfc_sli_ring *pring = &phba->sli.ring[LPFC_ELS_RING];
IOCB_t *cmd;
-@@ -4996,6 +7006,17 @@ void lpfc_fabric_abort_nport(struct lpfc
+@@ -4996,6 +7006,17 @@
}
}
void lpfc_fabric_abort_hba(struct lpfc_hba *phba)
{
LIST_HEAD(completions);
-@@ -5016,3 +7037,192 @@ void lpfc_fabric_abort_hba(struct lpfc_h
+@@ -5016,3 +7037,192 @@
(piocb->iocb_cmpl) (phba, piocb, piocb);
}
}
+
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_hbadisc.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_hbadisc.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_hbadisc.c
+--- a/drivers/scsi/lpfc/lpfc_hbadisc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_hbadisc.c Wed May 06 16:56:34 2009 +0100
@@ -30,6 +30,7 @@
#include <scsi/scsi_transport_fc.h>
/* AlpaArray for assignment of scsid for scan-down and bind_method */
static uint8_t lpfcAlpaArray[] = {
-@@ -58,6 +60,47 @@ static uint8_t lpfcAlpaArray[] = {
+@@ -58,6 +60,47 @@
static void lpfc_disc_timeout_handler(struct lpfc_vport *);
static void lpfc_disc_flush_list(struct lpfc_vport *vport);
void
lpfc_terminate_rport_io(struct fc_rport *rport)
-@@ -77,7 +120,7 @@ lpfc_terminate_rport_io(struct fc_rport
+@@ -77,7 +120,7 @@
return;
}
lpfc_debugfs_disc_trc(ndlp->vport, LPFC_DISC_TRC_RPORT,
"rport terminate: sid:x%x did:x%x flg:x%x",
-@@ -88,14 +131,6 @@ lpfc_terminate_rport_io(struct fc_rport
+@@ -88,14 +131,6 @@
&phba->sli.ring[phba->sli.fcp_ring],
ndlp->nlp_sid, 0, LPFC_CTX_TGT);
}
}
/*
-@@ -215,8 +250,16 @@ lpfc_dev_loss_tmo_handler(struct lpfc_no
+@@ -215,8 +250,16 @@
return;
}
if (ndlp->nlp_type & NLP_FABRIC) {
/* We will clean up these Nodes in linkup */
-@@ -237,8 +280,6 @@ lpfc_dev_loss_tmo_handler(struct lpfc_no
+@@ -237,8 +280,6 @@
lpfc_sli_abort_iocb(vport, &phba->sli.ring[phba->sli.fcp_ring],
ndlp->nlp_sid, 0, LPFC_CTX_TGT);
}
if (warn_on) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY,
-@@ -276,6 +317,124 @@ lpfc_dev_loss_tmo_handler(struct lpfc_no
+@@ -276,6 +317,124 @@
lpfc_disc_state_machine(vport, ndlp, NULL, NLP_EVT_DEVICE_RM);
}
static void
lpfc_work_list_done(struct lpfc_hba *phba)
{
-@@ -299,6 +458,15 @@ lpfc_work_list_done(struct lpfc_hba *phb
- */
- lpfc_nlp_put(ndlp);
- break;
-+ case LPFC_EVT_REAUTH:
-+ ndlp = (struct lpfc_nodelist *) (evtp->evt_arg1);
-+ lpfc_reauthentication_handler(ndlp);
+@@ -293,6 +452,15 @@
+ case LPFC_EVT_ELS_RETRY:
+ ndlp = (struct lpfc_nodelist *) (evtp->evt_arg1);
+ lpfc_els_retry_delay_handler(ndlp);
+ free_evt = 0; /* evt is part of ndlp */
+ /* decrement the node reference count held
+ * for this queued work
+ */
+ lpfc_nlp_put(ndlp);
+ break;
- case LPFC_EVT_DEV_LOSS:
- ndlp = (struct lpfc_nodelist *)(evtp->evt_arg1);
- lpfc_dev_loss_tmo_handler(ndlp);
-@@ -347,6 +515,10 @@ lpfc_work_list_done(struct lpfc_hba *phb
++ case LPFC_EVT_REAUTH:
++ ndlp = (struct lpfc_nodelist *) (evtp->evt_arg1);
++ lpfc_reauthentication_handler(ndlp);
+ free_evt = 0; /* evt is part of ndlp */
+ /* decrement the node reference count held
+ * for this queued work
+@@ -347,6 +515,10 @@
lpfc_unblock_mgmt_io(phba);
complete((struct completion *)(evtp->evt_arg2));
break;
}
if (free_evt)
kfree(evtp);
-@@ -371,6 +543,7 @@ lpfc_work_done(struct lpfc_hba *phba)
+@@ -371,6 +543,7 @@
spin_unlock_irq(&phba->hbalock);
if (ha_copy & HA_ERATT)
lpfc_handle_eratt(phba);
if (ha_copy & HA_MBATT)
-@@ -378,6 +551,7 @@ lpfc_work_done(struct lpfc_hba *phba)
+@@ -378,6 +551,7 @@
if (ha_copy & HA_LATT)
lpfc_handle_latt(phba);
vports = lpfc_create_vport_work_array(phba);
if (vports != NULL)
for(i = 0; i <= phba->max_vpi; i++) {
-@@ -462,20 +636,25 @@ lpfc_do_work(void *p)
+@@ -462,20 +636,25 @@
set_user_nice(current, -20);
phba->data_flags = 0;
return 0;
}
-@@ -525,6 +704,9 @@ lpfc_cleanup_rpis(struct lpfc_vport *vpo
+@@ -525,6 +704,9 @@
continue;
if (ndlp->nlp_state == NLP_STE_UNUSED_NODE)
continue;
if ((phba->sli3_options & LPFC_SLI3_VPORT_TEARDOWN) ||
((vport->port_type == LPFC_NPIV_PORT) &&
(ndlp->nlp_DID == NameServer_DID)))
-@@ -573,7 +755,25 @@ lpfc_linkdown_port(struct lpfc_vport *vp
+@@ -573,7 +755,25 @@
vport->port_state, vport->fc_ns_retry, vport->fc_flag);
lpfc_port_link_failure(vport);
+ vport->auth.auth_msg_state = LPFC_AUTH_NONE;
+ }
+}
-+
+
+void
+lpfc_port_auth_failed(struct lpfc_nodelist *ndlp, enum auth_state fail_state)
+{
+ struct lpfc_vport *vport = ndlp->vport;
-
++
+ vport->auth.auth_state = fail_state;
+ vport->auth.auth_msg_state = LPFC_AUTH_NONE;
+ lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE);
}
int
-@@ -678,7 +878,6 @@ lpfc_linkup_port(struct lpfc_vport *vpor
+@@ -678,7 +878,6 @@
return;
fc_host_post_event(shost, fc_get_event_number(), FCH_EVT_LINKUP, 0);
spin_lock_irq(shost->host_lock);
vport->fc_flag &= ~(FC_PT2PT | FC_PT2PT_PLOGI | FC_ABORT_DISCOVERY |
FC_RSCN_MODE | FC_NLP_MORE | FC_RSCN_DISCOVERY);
-@@ -689,6 +888,8 @@ lpfc_linkup_port(struct lpfc_vport *vpor
+@@ -689,6 +888,8 @@
if (vport->fc_flag & FC_LBIT)
lpfc_linkup_cleanup_nodes(vport);
}
static int
-@@ -808,9 +1009,12 @@ lpfc_mbx_cmpl_local_config_link(struct l
+@@ -808,9 +1009,12 @@
/* Start discovery by sending a FLOGI. port_state is identically
* LPFC_FLOGI while waiting for FLOGI cmpl
*/
return;
out:
-@@ -1013,14 +1217,10 @@ out:
+@@ -1013,14 +1217,10 @@
}
static void
spin_lock_irq(&phba->hbalock);
psli->sli_flag |= LPFC_PROCESS_LA;
control = readl(phba->HCregaddr);
-@@ -1030,6 +1230,15 @@ lpfc_mbx_issue_link_down(struct lpfc_hba
+@@ -1029,6 +1229,15 @@
+ readl(phba->HCregaddr); /* flush */
spin_unlock_irq(&phba->hbalock);
}
-
++
+static void
+lpfc_mbx_issue_link_down(struct lpfc_hba *phba)
+{
+ /* turn on Link Attention interrupts - no CLEAR_LA needed */
+}
+
-+
+
/*
* This routine handles processing a READ_LA mailbox
- * command upon completion. It is setup in the LPFC_MBOXQ
-@@ -1077,8 +1286,12 @@ lpfc_mbx_cmpl_read_la(struct lpfc_hba *p
+@@ -1077,8 +1286,12 @@
}
phba->fc_eventTag = la->eventTag;
phba->fc_stat.LinkUp++;
if (phba->link_flag & LS_LOOPBACK_MODE) {
lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT,
-@@ -1090,13 +1303,15 @@ lpfc_mbx_cmpl_read_la(struct lpfc_hba *p
+@@ -1090,13 +1303,15 @@
} else {
lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT,
"1303 Link Up Event x%x received "
phba->fc_stat.LinkDown++;
if (phba->link_flag & LS_LOOPBACK_MODE) {
lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT,
-@@ -1109,11 +1324,46 @@ lpfc_mbx_cmpl_read_la(struct lpfc_hba *p
+@@ -1109,11 +1324,46 @@
else {
lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT,
"1305 Link Down Event x%x received "
+ phba->fc_stat.LinkDown++;
+ lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT,
+ "1312 Link Down Event x%x received "
-+ "Data: x%x x%x x%x\n",
-+ la->eventTag, phba->fc_eventTag,
-+ phba->pport->port_state, vport->fc_flag);
+ "Data: x%x x%x x%x\n",
+ la->eventTag, phba->fc_eventTag,
+ phba->pport->port_state, vport->fc_flag);
+ lpfc_mbx_issue_link_down(phba);
+ } else
+ lpfc_enable_la(phba);
+
+ lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT,
+ "1310 Menlo Maint Mode Link up Event x%x rcvd "
- "Data: x%x x%x x%x\n",
- la->eventTag, phba->fc_eventTag,
- phba->pport->port_state, vport->fc_flag);
++ "Data: x%x x%x x%x\n",
++ la->eventTag, phba->fc_eventTag,
++ phba->pport->port_state, vport->fc_flag);
+ /*
+ * The cmnd that triggered this will be waiting for this
+ * signal.
}
lpfc_mbx_cmpl_read_la_free_mbuf:
-@@ -1177,7 +1427,7 @@ lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hba
+@@ -1177,7 +1427,7 @@
scsi_host_put(shost);
}
lpfc_mbx_unreg_vpi(struct lpfc_vport *vport)
{
struct lpfc_hba *phba = vport->phba;
-@@ -1186,7 +1436,7 @@ lpfc_mbx_unreg_vpi(struct lpfc_vport *vp
+@@ -1186,7 +1436,7 @@
mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
if (!mbox)
lpfc_unreg_vpi(phba, vport->vpi, mbox);
mbox->vport = vport;
-@@ -1197,7 +1447,9 @@ lpfc_mbx_unreg_vpi(struct lpfc_vport *vp
+@@ -1197,7 +1447,9 @@
"1800 Could not issue unreg_vpi\n");
mempool_free(mbox, phba->mbox_mem_pool);
vport->unreg_vpi_cmpl = VPORT_ERROR;
}
static void
-@@ -1253,8 +1505,6 @@ lpfc_mbx_cmpl_fabric_reg_login(struct lp
+@@ -1253,8 +1505,6 @@
MAILBOX_t *mb = &pmb->mb;
struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *) (pmb->context1);
struct lpfc_nodelist *ndlp;
ndlp = (struct lpfc_nodelist *) pmb->context2;
pmb->context1 = NULL;
-@@ -1292,33 +1542,9 @@ lpfc_mbx_cmpl_fabric_reg_login(struct lp
+@@ -1292,33 +1542,9 @@
ndlp->nlp_type |= NLP_FABRIC;
lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE);
lpfc_mbuf_free(phba, mp->virt, mp->phys);
kfree(mp);
-@@ -1553,6 +1779,22 @@ lpfc_nlp_state_cleanup(struct lpfc_vport
+@@ -1553,6 +1779,22 @@
*/
lpfc_register_remote_port(vport, ndlp);
}
/*
* if we added to Mapped list, but the remote port
* registration failed or assigned a target id outside
-@@ -1665,6 +1907,42 @@ lpfc_disable_node(struct lpfc_vport *vpo
+@@ -1665,6 +1907,42 @@
lpfc_nlp_state_cleanup(vport, ndlp, ndlp->nlp_state,
NLP_STE_UNUSED_NODE);
}
struct lpfc_nodelist *
lpfc_enable_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
-@@ -1705,17 +1983,7 @@ lpfc_enable_node(struct lpfc_vport *vpor
+@@ -1705,17 +1983,7 @@
/* re-initialize ndlp except of ndlp linked list pointer */
memset((((char *)ndlp) + sizeof (struct list_head)), 0,
sizeof (struct lpfc_nodelist) - sizeof (struct list_head));
spin_unlock_irqrestore(&phba->ndlp_lock, flags);
-@@ -1978,9 +2246,13 @@ lpfc_unreg_all_rpis(struct lpfc_vport *v
+@@ -1978,9 +2246,13 @@
mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
mbox->context1 = NULL;
rc = lpfc_sli_issue_mbox_wait(phba, mbox, LPFC_MBOX_TMO);
}
}
-@@ -1998,12 +2270,14 @@ lpfc_unreg_default_rpis(struct lpfc_vpor
+@@ -1998,12 +2270,14 @@
mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
mbox->context1 = NULL;
rc = lpfc_sli_issue_mbox_wait(phba, mbox, LPFC_MBOX_TMO);
}
}
-@@ -2077,9 +2351,12 @@ lpfc_cleanup_node(struct lpfc_vport *vpo
+@@ -2077,9 +2351,12 @@
ndlp->nlp_last_elscmd = 0;
del_timer_sync(&ndlp->nlp_delayfunc);
lpfc_unreg_rpi(vport, ndlp);
-@@ -2303,6 +2580,10 @@ lpfc_disc_list_loopmap(struct lpfc_vport
+@@ -2303,6 +2580,10 @@
if (phba->fc_topology != TOPOLOGY_LOOP)
return;
/* Check for loop map present or not */
if (phba->alpa_map[0]) {
for (j = 1; j <= phba->alpa_map[0]; j++) {
-@@ -2324,7 +2605,8 @@ lpfc_disc_list_loopmap(struct lpfc_vport
+@@ -2324,7 +2605,8 @@
alpa = lpfcAlpaArray[index];
if ((vport->fc_myDID & 0xff) == alpa)
continue;
}
}
return;
-@@ -2786,7 +3068,7 @@ restart_disc:
+@@ -2786,7 +3068,7 @@
default:
lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY,
"vport State x%x\n", vport->port_state);
break;
}
-@@ -2886,7 +3168,14 @@ lpfc_filter_by_wwpn(struct lpfc_nodelist
+@@ -2886,7 +3168,14 @@
sizeof(ndlp->nlp_portname)) == 0;
}
__lpfc_find_node(struct lpfc_vport *vport, node_filter filter, void *param)
{
struct lpfc_nodelist *ndlp;
-@@ -2899,6 +3188,22 @@ __lpfc_find_node(struct lpfc_vport *vpor
- }
-
- /*
+@@ -2896,6 +3185,22 @@
+ return ndlp;
+ }
+ return NULL;
++}
++
++/*
+ * Search node lists for a remote port matching filter criteria
+ * Caller needs to hold host_lock before calling this routine.
+ */
+ ndlp = __lpfc_find_node(vport, filter, param);
+ spin_unlock_irq(shost->host_lock);
+ return ndlp;
-+}
-+
-+/*
- * This routine looks up the ndlp lists for the given RPI. If rpi found it
- * returns the node list element pointer else return NULL.
- */
-@@ -2924,22 +3229,28 @@ lpfc_findnode_wwpn(struct lpfc_vport *vp
+ }
+
+ /*
+@@ -2924,22 +3229,28 @@
return ndlp;
}
lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_NODE,
"node init: did:x%x",
-@@ -2973,14 +3284,16 @@ lpfc_nlp_release(struct kref *kref)
+@@ -2973,14 +3284,16 @@
lpfc_nlp_remove(ndlp->vport, ndlp);
/* clear the ndlp active flag for all release cases */
}
/* This routine bumps the reference count for a ndlp structure to ensure
-@@ -3002,7 +3315,7 @@ lpfc_nlp_get(struct lpfc_nodelist *ndlp)
+@@ -3002,7 +3315,7 @@
* ndlp reference count that is in the process of being
* released.
*/
spin_lock_irqsave(&phba->ndlp_lock, flags);
if (!NLP_CHK_NODE_ACT(ndlp) || NLP_CHK_FREE_ACK(ndlp)) {
spin_unlock_irqrestore(&phba->ndlp_lock, flags);
-@@ -3038,7 +3351,7 @@ lpfc_nlp_put(struct lpfc_nodelist *ndlp)
+@@ -3038,7 +3351,7 @@
"node put: did:x%x flg:x%x refcnt:x%x",
ndlp->nlp_DID, ndlp->nlp_flag,
atomic_read(&ndlp->kref.refcount));
spin_lock_irqsave(&phba->ndlp_lock, flags);
/* Check the ndlp memory free acknowledge flag to avoid the
* possible race condition that kref_put got invoked again
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_hw.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_hw.h 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_hw.h
+--- a/drivers/scsi/lpfc/lpfc_hw.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_hw.h Wed May 06 16:56:34 2009 +0100
@@ -64,6 +64,10 @@
#define SLI3_IOCB_CMD_SIZE 128
#define SLI3_IOCB_RSP_SIZE 64
/* Common Transport structures and definitions */
-@@ -350,7 +354,8 @@ struct csp {
+@@ -350,7 +354,8 @@
uint16_t huntgroup:1; /* FC Word 1, bit 23 */
uint16_t simplex:1; /* FC Word 1, bit 22 */
uint16_t dhd:1; /* FC Word 1, bit 18 */
uint16_t contIncSeqCnt:1; /* FC Word 1, bit 17 */
uint16_t payloadlength:1; /* FC Word 1, bit 16 */
-@@ -367,7 +372,8 @@ struct csp {
+@@ -367,7 +372,8 @@
uint16_t payloadlength:1; /* FC Word 1, bit 16 */
uint16_t contIncSeqCnt:1; /* FC Word 1, bit 17 */
uint16_t dhd:1; /* FC Word 1, bit 18 */
uint16_t simplex:1; /* FC Word 1, bit 22 */
uint16_t huntgroup:1; /* FC Word 1, bit 23 */
#endif
-@@ -506,6 +512,17 @@ struct serv_parm { /* Structure is in Bi
+@@ -506,6 +512,17 @@
#define ELS_CMD_SCR 0x62000000
#define ELS_CMD_RNID 0x78000000
#define ELS_CMD_LIRR 0x7A000000
#else /* __LITTLE_ENDIAN_BITFIELD */
#define ELS_CMD_MASK 0xffff
#define ELS_RSP_MASK 0xff
-@@ -542,6 +559,17 @@ struct serv_parm { /* Structure is in Bi
+@@ -542,6 +559,17 @@
#define ELS_CMD_SCR 0x62
#define ELS_CMD_RNID 0x78
#define ELS_CMD_LIRR 0x7A
#endif
/*
-@@ -866,6 +894,12 @@ typedef struct _D_ID { /* Structure is
+@@ -866,6 +894,12 @@
} un;
} D_ID;
/*
* Structure to define all ELS Payload types
*/
-@@ -1107,6 +1141,8 @@ typedef struct {
+@@ -1107,6 +1141,8 @@
/* Start FireFly Register definitions */
#define PCI_VENDOR_ID_EMULEX 0x10df
#define PCI_DEVICE_ID_FIREFLY 0x1ae5
#define PCI_DEVICE_ID_SAT_SMB 0xf011
#define PCI_DEVICE_ID_SAT_MID 0xf015
#define PCI_DEVICE_ID_RFLY 0xf095
-@@ -1133,10 +1169,12 @@ typedef struct {
+@@ -1133,10 +1169,12 @@
#define PCI_DEVICE_ID_LP11000S 0xfc10
#define PCI_DEVICE_ID_LPE11000S 0xfc20
#define PCI_DEVICE_ID_SAT_S 0xfc40
#define PCI_DEVICE_ID_ZEPHYR_SCSP 0xfe11
#define PCI_DEVICE_ID_ZEPHYR_DCSP 0xfe12
-@@ -1154,6 +1192,7 @@ typedef struct {
+@@ -1154,6 +1192,7 @@
#define ZEPHYR_JEDEC_ID 0x0577
#define VIPER_JEDEC_ID 0x4838
#define SATURN_JEDEC_ID 0x1004
#define JEDEC_ID_MASK 0x0FFFF000
#define JEDEC_ID_SHIFT 12
-@@ -1198,6 +1237,18 @@ typedef struct { /* FireFly BIU registe
+@@ -1198,6 +1237,18 @@
#define HA_RXATT 0x00000008 /* Bit 3 */
#define HA_RXMASK 0x0000000f
/* Chip Attention Register */
#define CA_REG_OFFSET 4 /* Byte offset from register base address */
-@@ -1235,7 +1286,7 @@ typedef struct { /* FireFly BIU registe
+@@ -1235,7 +1286,7 @@
/* Host Control Register */
#define HC_MBINT_ENA 0x00000001 /* Bit 0 */
#define HC_R0INT_ENA 0x00000002 /* Bit 1 */
-@@ -1248,6 +1299,19 @@ typedef struct { /* FireFly BIU registe
+@@ -1247,6 +1298,19 @@
+ #define HC_INITFF 0x08000000 /* Bit 27 */
#define HC_LAINT_ENA 0x20000000 /* Bit 29 */
#define HC_ERINT_ENA 0x80000000 /* Bit 31 */
-
++
+/* Message Signaled Interrupt eXtension (MSI-X) message identifiers */
+#define MSIX_DFLT_ID 0
+#define MSIX_RNG0_ID 0
+
+#define MSIX_SPARE0_ID 6
+#define MSIX_SPARE1_ID 7
-+
+
/* Mailbox Commands */
#define MBX_SHUTDOWN 0x00 /* terminate testing */
- #define MBX_LOAD_SM 0x01
-@@ -1285,9 +1349,16 @@ typedef struct { /* FireFly BIU registe
+@@ -1285,9 +1349,16 @@
#define MBX_KILL_BOARD 0x24
#define MBX_CONFIG_FARP 0x25
#define MBX_BEACON 0x2A
#define MBX_CONFIG_HBQ 0x7C
#define MBX_LOAD_AREA 0x81
-@@ -1423,6 +1494,7 @@ typedef struct { /* FireFly BIU registe
+@@ -1423,6 +1494,7 @@
#define MBXERR_BAD_RCV_LENGTH 14
#define MBXERR_DMA_ERROR 15
#define MBXERR_ERROR 16
#define MBX_NOT_FINISHED 255
#define MBX_BUSY 0xffffff /* Attempted cmd to busy Mailbox */
-@@ -1474,24 +1546,18 @@ struct ulp_bde64 { /* SLI-2 */
+@@ -1474,24 +1546,18 @@
uint32_t bdeFlags:8; /* BDE Flags 0 IS A SUPPORTED
VALUE !! */
#endif
typedef struct ULP_BDL { /* SLI-2 */
#ifdef __BIG_ENDIAN_BITFIELD
-@@ -1596,6 +1662,13 @@ typedef struct {
+@@ -1595,6 +1661,13 @@
+ } s2;
} un;
} BIU_DIAG_VAR;
-
++
+/* Structure for MB command READ_EVENT_LOG (0x38) */
+typedef struct {
+ uint32_t rsvd1;
+ uint32_t offset;
+ struct ulp_bde64 rcv_bde64;
+}READ_EVENT_LOG_VAR;
-+
+
/* Structure for MB Command INIT_LINK (05) */
- typedef struct {
-@@ -2201,7 +2274,10 @@ typedef struct {
+@@ -2201,7 +2274,10 @@
typedef struct {
uint32_t eventTag; /* Event tag */
#ifdef __BIG_ENDIAN_BITFIELD
uint32_t pb:1;
uint32_t il:1;
uint32_t attType:8;
-@@ -2209,7 +2285,10 @@ typedef struct {
+@@ -2209,7 +2285,10 @@
uint32_t attType:8;
uint32_t il:1;
uint32_t pb:1;
#endif
#define AT_RESERVED 0x00 /* Reserved - attType */
-@@ -2230,6 +2309,7 @@ typedef struct {
+@@ -2230,6 +2309,7 @@
#define TOPOLOGY_PT_PT 0x01 /* Topology is pt-pt / pt-fabric */
#define TOPOLOGY_LOOP 0x02 /* Topology is FC-AL */
union {
struct ulp_bde lilpBde; /* This BDE points to a 128 byte buffer
-@@ -2290,6 +2370,14 @@ typedef struct {
+@@ -2290,6 +2370,14 @@
uint32_t rsvd1;
} CLEAR_LA_VAR;
/* Structure for MB Command DUMP */
typedef struct {
-@@ -2324,6 +2412,60 @@ typedef struct {
+@@ -2323,6 +2411,60 @@
+ #define DMP_VPD_SIZE 0x400 /* maximum amount of VPD */
#define DMP_RSP_OFFSET 0x14 /* word 5 contains first word of rsp */
#define DMP_RSP_SIZE 0x6C /* maximum of 27 words of rsp data */
-
++
+#define WAKE_UP_PARMS_REGION_ID 4
+#define WAKE_UP_PARMS_WORD_SIZE 15
+
+ uint32_t byte_cnt;
+ uint32_t data_offset;
+};
-+
+
struct hbq_mask {
#ifdef __BIG_ENDIAN_BITFIELD
- uint8_t tmatch;
-@@ -2487,10 +2629,17 @@ typedef struct {
+@@ -2487,10 +2629,17 @@
uint32_t pcbLow; /* bit 31:0 of memory based port config block */
uint32_t pcbHigh; /* bit 63:32 of memory based port config block */
uint32_t cmv : 1; /* Configure Max VPIs */
uint32_t ccrp : 1; /* Config Command Ring Polling */
uint32_t csah : 1; /* Configure Synchronous Abort Handling */
-@@ -2508,7 +2657,7 @@ typedef struct {
+@@ -2508,7 +2657,7 @@
uint32_t csah : 1; /* Configure Synchronous Abort Handling */
uint32_t ccrp : 1; /* Config Command Ring Polling */
uint32_t cmv : 1; /* Configure Max VPIs */
#endif
#ifdef __BIG_ENDIAN_BITFIELD
uint32_t rsvd2 : 24; /* Reserved */
-@@ -2560,6 +2709,40 @@ typedef struct {
+@@ -2559,6 +2708,40 @@
+ #endif
} CONFIG_PORT_VAR;
-
++
+/* Structure for MB Command CONFIG_MSI (0x30) */
+struct config_msi_var {
+#ifdef __BIG_ENDIAN_BITFIELD
+#endif
+ uint32_t rsvd4;
+};
-+
+
/* SLI-2 Port Control Block */
- /* SLIM POINTER */
-@@ -2645,6 +2828,10 @@ typedef struct {
+@@ -2645,6 +2828,10 @@
/* Union of all Mailbox Command types */
#define MAILBOX_CMD_WSIZE 32
#define MAILBOX_CMD_SIZE (MAILBOX_CMD_WSIZE * sizeof(uint32_t))
typedef union {
uint32_t varWords[MAILBOX_CMD_WSIZE - 1]; /* first word is type/
-@@ -2678,10 +2865,13 @@ typedef union {
+@@ -2678,10 +2865,13 @@
* NEW_FEATURE
*/
struct config_hbq_var varCfgHbq;/* cmd = 0x7c (CONFIG_HBQ) */
} MAILVARIANTS;
/*
-@@ -2715,11 +2905,19 @@ struct sli3_pgp {
+@@ -2715,11 +2905,19 @@
uint32_t hbq_get[16];
};
typedef struct {
#ifdef __BIG_ENDIAN_BITFIELD
-@@ -2737,7 +2935,7 @@ typedef struct {
+@@ -2737,7 +2935,7 @@
#endif
MAILVARIANTS un;
} MAILBOX_t;
/*
-@@ -3105,6 +3303,27 @@ struct que_xri64cx_ext_fields {
+@@ -3105,6 +3303,27 @@
struct lpfc_hbq_entry buff[5];
};
typedef struct _IOCB { /* IOCB structure */
union {
GENERIC_RSP grsp; /* Generic response */
-@@ -3190,7 +3409,7 @@ typedef struct _IOCB { /* IOCB structure
+@@ -3190,7 +3409,7 @@
/* words 8-31 used for que_xri_cx iocb */
struct que_xri64cx_ext_fields que_xri64cx_ext_words;
uint32_t sli3Words[24]; /* 96 extra bytes for SLI-3 */
} unsli3;
-@@ -3234,14 +3453,16 @@ typedef struct _IOCB { /* IOCB structure
+@@ -3234,14 +3453,16 @@
#define SLI1_SLIM_SIZE (4 * 1024)
/* Up to 498 IOCBs will fit into 16k
/* HBQ entries are 4 words each = 4k */
#define LPFC_TOTAL_HBQ_SIZE (sizeof(struct lpfc_hbq_entry) * \
-@@ -3249,6 +3470,7 @@ typedef struct _IOCB { /* IOCB structure
+@@ -3249,6 +3470,7 @@
struct lpfc_sli2_slim {
MAILBOX_t mbx;
PCB_t pcb;
IOCB_t IOCBs[MAX_SLIM_IOCB_SIZE];
};
-@@ -3292,3 +3514,10 @@ lpfc_error_lost_link(IOCB_t *iocbp)
+@@ -3292,3 +3514,10 @@
iocbp->un.ulpWord[4] == IOERR_LINK_DOWN ||
iocbp->un.ulpWord[4] == IOERR_SLI_DOWN));
}
+#define MENLO_TIMEOUT 30
+#define SETVAR_MLOMNT 0x103107
+#define SETVAR_MLORST 0x103007
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_init.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_init.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_init.c
+--- a/drivers/scsi/lpfc/lpfc_init.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_init.c Wed May 06 16:56:34 2009 +0100
@@ -36,6 +36,7 @@
#include "lpfc_hw.h"
#include "lpfc_crtn.h"
#include "lpfc_vport.h"
#include "lpfc_version.h"
--
+#include "lpfc_auth_access.h"
+#include "lpfc_security.h"
+#include <net/sock.h>
+#include <linux/netlink.h>
-+
+
+/* vendor ID used in SCSI netlink calls */
+#define LPFC_NL_VENDOR_ID (SCSI_NL_VID_TYPE_PCI | PCI_VENDOR_ID_EMULEX)
+const char *security_work_q_name = "fc_sc_wq";
static int lpfc_parse_vpd(struct lpfc_hba *, uint8_t *, int);
static void lpfc_get_hba_model_desc(struct lpfc_hba *, uint8_t *, uint8_t *);
static int lpfc_post_rcv_buf(struct lpfc_hba *);
-@@ -52,17 +68,40 @@ static struct scsi_transport_template *l
+@@ -52,17 +68,40 @@
static struct scsi_transport_template *lpfc_vport_transport_template = NULL;
static DEFINE_IDR(lpfc_hba_index);
int
lpfc_config_port_prep(struct lpfc_hba *phba)
{
-@@ -180,12 +219,9 @@ lpfc_config_port_prep(struct lpfc_hba *p
+@@ -180,12 +219,9 @@
sizeof (phba->RandomData));
/* Get adapter VPD information */
do {
lpfc_dump_mem(phba, pmb, offset);
-@@ -200,21 +236,29 @@ lpfc_config_port_prep(struct lpfc_hba *p
+@@ -200,21 +236,29 @@
}
if (mb->un.varDmp.word_cnt > DMP_VPD_SIZE - offset)
mb->un.varDmp.word_cnt = DMP_VPD_SIZE - offset;
static void
lpfc_config_async_cmpl(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmboxq)
{
-@@ -226,20 +270,69 @@ lpfc_config_async_cmpl(struct lpfc_hba *
+@@ -226,20 +270,69 @@
return;
}
LPFC_MBOXQ_t *pmb;
MAILBOX_t *mb;
struct lpfc_dmabuf *mp;
-@@ -297,6 +390,11 @@ lpfc_config_port_post(struct lpfc_hba *p
+@@ -297,6 +390,11 @@
sizeof (struct lpfc_name));
memcpy(&vport->fc_portname, &vport->fc_sparam.portName,
sizeof (struct lpfc_name));
/* If no serial number in VPD data, use low 6 bytes of WWNN */
/* This should be consolidated into parse_vpd ? - mr */
if (phba->SerialNumber[0] == 0) {
-@@ -378,6 +476,29 @@ lpfc_config_port_post(struct lpfc_hba *p
+@@ -378,6 +476,29 @@
if (phba->sli_rev != 3)
lpfc_post_rcv_buf(phba);
/* Enable appropriate host interrupts */
spin_lock_irq(&phba->hbalock);
status = readl(phba->HCregaddr);
-@@ -393,27 +514,57 @@ lpfc_config_port_post(struct lpfc_hba *p
+@@ -393,27 +514,57 @@
if ((phba->cfg_poll & ENABLE_FCP_RING_POLLING) &&
(phba->cfg_poll & DISABLE_FCP_RING_INT))
phba->last_completion_time = jiffies;
+ /* Set up error attention (ERATT) polling timer */
+ mod_timer(&phba->eratt_poll, jiffies + HZ * LPFC_ERATT_POLL_INTERVAL);
-+
+
+ /* Use the existing MBOX buffer, it will be freed in mbox compl */
+ lpfc_config_async(phba, pmb, LPFC_ELS_RING);
+ pmb->mbox_cmpl = lpfc_config_async_cmpl;
+ "ASYNCEVT_ENABLE mbox status x%x \n.", rc);
+ mempool_free(pmb, phba->mbox_mem_pool);
+ }
-
++
+ /* Allocate new MBOX buffer, it will be freed in mbox compl */
+ pmb = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
+ lpfc_dump_wakeup_param(phba, pmb);
lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
"0454 Adapter failed to init, mbxCmd x%x "
"INIT_LINK, mbxStatus x%x\n",
-@@ -427,39 +578,23 @@ lpfc_config_port_post(struct lpfc_hba *p
+@@ -427,39 +578,23 @@
readl(phba->HAregaddr); /* flush */
phba->link_state = LPFC_HBA_ERROR;
- if (rc != MBX_BUSY)
- mempool_free(pmb, phba->mbox_mem_pool);
-- return -EIO;
-- }
++ mempool_free(pmb, phba->mbox_mem_pool);
+ return -EIO;
+ }
- /* MBOX buffer will be freed in mbox compl */
- pmb = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
- lpfc_config_async(phba, pmb, LPFC_ELS_RING);
- "0456 Adapter failed to issue "
- "ASYNCEVT_ENABLE mbox status x%x \n.",
- rc);
- mempool_free(pmb, phba->mbox_mem_pool);
-+ return -EIO;
- }
+- mempool_free(pmb, phba->mbox_mem_pool);
+- }
- return (0);
+ return 0;
}
int
lpfc_hba_down_prep(struct lpfc_hba *phba)
{
-@@ -481,15 +616,17 @@ lpfc_hba_down_prep(struct lpfc_hba *phba
+@@ -481,15 +616,17 @@
return 0;
}
int
lpfc_hba_down_post(struct lpfc_hba *phba)
{
-@@ -548,7 +685,18 @@ lpfc_hba_down_post(struct lpfc_hba *phba
+@@ -548,7 +685,18 @@
return 0;
}
static void
lpfc_hb_timeout(unsigned long ptr)
{
-@@ -557,17 +705,36 @@ lpfc_hb_timeout(unsigned long ptr)
+@@ -557,17 +705,36 @@
unsigned long iflag;
phba = (struct lpfc_hba *)ptr;
static void
lpfc_hb_mbox_cmpl(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmboxq)
{
-@@ -577,6 +744,7 @@ lpfc_hb_mbox_cmpl(struct lpfc_hba * phba
+@@ -577,6 +744,7 @@
phba->hb_outstanding = 0;
spin_unlock_irqrestore(&phba->hbalock, drvr_flag);
mempool_free(pmboxq, phba->mbox_mem_pool);
if (!(phba->pport->fc_flag & FC_OFFLINE_MODE) &&
!(phba->link_state == LPFC_HBA_ERROR) &&
-@@ -586,6 +754,22 @@ lpfc_hb_mbox_cmpl(struct lpfc_hba * phba
+@@ -586,6 +754,22 @@
return;
}
void
lpfc_hb_timeout_handler(struct lpfc_hba *phba)
{
-@@ -601,11 +785,6 @@ lpfc_hb_timeout_handler(struct lpfc_hba
+@@ -601,11 +785,6 @@
return;
spin_lock_irq(&phba->pport->work_port_lock);
if (time_after(phba->last_completion_time + LPFC_HB_MBOX_INTERVAL * HZ,
jiffies)) {
-@@ -684,6 +863,13 @@ lpfc_hb_timeout_handler(struct lpfc_hba
+@@ -684,6 +863,13 @@
}
}
static void
lpfc_offline_eratt(struct lpfc_hba *phba)
{
-@@ -704,14 +890,16 @@ lpfc_offline_eratt(struct lpfc_hba *phba
+@@ -704,14 +890,16 @@
return;
}
void
lpfc_handle_eratt(struct lpfc_hba *phba)
{
-@@ -722,6 +910,7 @@ lpfc_handle_eratt(struct lpfc_hba *phba)
+@@ -722,6 +910,7 @@
unsigned long temperature;
struct temp_event temp_event_data;
struct Scsi_Host *shost;
/* If the pci channel is offline, ignore possible errors,
* since we cannot communicate with the pci card anyway. */
-@@ -731,6 +920,15 @@ lpfc_handle_eratt(struct lpfc_hba *phba)
+@@ -730,6 +919,15 @@
+ /* If resets are disabled then leave the HBA alone and return */
if (!phba->cfg_enable_hba_reset)
return;
-
++
+ /* Send an internal error event to mgmt application */
+ board_event.event_type = FC_REG_BOARD_EVENT;
+ board_event.subcategory = LPFC_EVENT_PORTINTERR;
+ sizeof(board_event),
+ (char *) &board_event,
+ LPFC_NL_VENDOR_ID);
-+
+
if (phba->work_hs & HS_FFER6) {
/* Re-establishing Link */
- lpfc_printf_log(phba, KERN_INFO, LOG_LINK_EVENT,
-@@ -771,7 +969,7 @@ lpfc_handle_eratt(struct lpfc_hba *phba)
+@@ -771,7 +969,7 @@
temp_event_data.data = (uint32_t)temperature;
lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
"(%ld), taking this port offline "
"Data: x%x x%x x%x\n",
temperature, phba->work_hs,
-@@ -781,8 +979,7 @@ lpfc_handle_eratt(struct lpfc_hba *phba)
+@@ -781,8 +979,7 @@
fc_host_post_vendor_event(shost, fc_get_event_number(),
sizeof(temp_event_data),
(char *) &temp_event_data,
spin_lock_irq(&phba->hbalock);
phba->over_temp_state = HBA_OVER_TEMP;
-@@ -791,8 +988,8 @@ lpfc_handle_eratt(struct lpfc_hba *phba)
+@@ -791,8 +988,8 @@
} else {
/* The if clause above forces this code path when the status
*/
lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
"0457 Adapter Hardware Error "
-@@ -804,20 +1001,20 @@ lpfc_handle_eratt(struct lpfc_hba *phba)
+@@ -804,20 +1001,20 @@
shost = lpfc_shost_from_vport(vport);
fc_host_post_vendor_event(shost, fc_get_event_number(),
sizeof(event_data), (char *) &event_data,
void
lpfc_handle_latt(struct lpfc_hba *phba)
{
-@@ -898,12 +1095,20 @@ lpfc_handle_latt_err_exit:
+@@ -898,12 +1095,20 @@
return;
}
static int
lpfc_parse_vpd(struct lpfc_hba *phba, uint8_t *vpd, int len)
{
-@@ -1040,12 +1245,25 @@ lpfc_parse_vpd(struct lpfc_hba *phba, ui
+@@ -1040,12 +1245,25 @@
return(1);
}
struct {
char * name;
int max_speed;
-@@ -1137,7 +1355,8 @@ lpfc_get_hba_model_desc(struct lpfc_hba
+@@ -1137,7 +1355,8 @@
m = (typeof(m)){"LPe11000", max_speed, "PCIe"};
break;
case PCI_DEVICE_ID_ZEPHYR_DCSP:
break;
case PCI_DEVICE_ID_ZMID:
m = (typeof(m)){"LPe1150", max_speed, "PCIe"};
-@@ -1177,6 +1396,19 @@ lpfc_get_hba_model_desc(struct lpfc_hba
+@@ -1177,6 +1396,19 @@
case PCI_DEVICE_ID_SAT_S:
m = (typeof(m)){"LPe12000-S", max_speed, "PCIe"};
break;
default:
m = (typeof(m)){ NULL };
break;
-@@ -1186,18 +1418,25 @@ lpfc_get_hba_model_desc(struct lpfc_hba
+@@ -1186,18 +1418,25 @@
snprintf(mdp, 79,"%s", m.name);
if (descp && descp[0] == '\0')
snprintf(descp, 255,
int
lpfc_post_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, int cnt)
{
-@@ -1287,12 +1526,17 @@ lpfc_post_buffer(struct lpfc_hba *phba,
+@@ -1287,12 +1526,17 @@
return 0;
}
static int
lpfc_post_rcv_buf(struct lpfc_hba *phba)
{
-@@ -1307,11 +1551,13 @@ lpfc_post_rcv_buf(struct lpfc_hba *phba)
+@@ -1307,11 +1551,13 @@
#define S(N,V) (((V)<<(N))|((V)>>(32-(N))))
static void
lpfc_sha_init(uint32_t * HashResultPointer)
{
-@@ -1322,11 +1568,16 @@ lpfc_sha_init(uint32_t * HashResultPoint
+@@ -1322,11 +1568,16 @@
HashResultPointer[4] = 0xC3D2E1F0;
}
static void
lpfc_sha_iterate(uint32_t * HashResultPointer, uint32_t * HashWorkingPointer)
{
-@@ -1374,22 +1625,29 @@ lpfc_sha_iterate(uint32_t * HashResultPo
+@@ -1374,22 +1625,29 @@
}
void
lpfc_hba_init(struct lpfc_hba *phba, uint32_t *hbainit)
{
-@@ -1412,6 +1670,15 @@ lpfc_hba_init(struct lpfc_hba *phba, uin
+@@ -1412,6 +1670,15 @@
kfree(HashWorking);
}
void
lpfc_cleanup(struct lpfc_vport *vport)
{
-@@ -1459,14 +1726,6 @@ lpfc_cleanup(struct lpfc_vport *vport)
+@@ -1459,14 +1726,6 @@
lpfc_disc_state_machine(vport, ndlp, NULL,
NLP_EVT_DEVICE_RM);
}
/* At this point, ALL ndlp's should be gone
-@@ -1482,7 +1741,7 @@ lpfc_cleanup(struct lpfc_vport *vport)
+@@ -1482,7 +1741,7 @@
&vport->fc_nodes, nlp_listp) {
lpfc_printf_vlog(ndlp->vport, KERN_ERR,
LOG_NODE,
"usgmap:x%x refcnt:%d\n",
ndlp->nlp_DID, (void *)ndlp,
ndlp->nlp_usg_map,
-@@ -1498,15 +1757,39 @@ lpfc_cleanup(struct lpfc_vport *vport)
+@@ -1498,15 +1757,39 @@
return;
}
static void
lpfc_stop_phba_timers(struct lpfc_hba *phba)
{
-@@ -1516,9 +1799,20 @@ lpfc_stop_phba_timers(struct lpfc_hba *p
+@@ -1516,9 +1799,20 @@
del_timer_sync(&phba->fabric_block_timer);
phba->hb_outstanding = 0;
del_timer_sync(&phba->hb_tmofunc);
static void
lpfc_block_mgmt_io(struct lpfc_hba * phba)
{
-@@ -1529,6 +1823,18 @@ lpfc_block_mgmt_io(struct lpfc_hba * phb
+@@ -1529,6 +1823,18 @@
spin_unlock_irqrestore(&phba->hbalock, iflag);
}
int
lpfc_online(struct lpfc_hba *phba)
{
-@@ -1574,6 +1880,17 @@ lpfc_online(struct lpfc_hba *phba)
+@@ -1574,6 +1880,17 @@
return 0;
}
void
lpfc_unblock_mgmt_io(struct lpfc_hba * phba)
{
-@@ -1584,6 +1901,14 @@ lpfc_unblock_mgmt_io(struct lpfc_hba * p
+@@ -1584,6 +1901,14 @@
spin_unlock_irqrestore(&phba->hbalock, iflag);
}
void
lpfc_offline_prep(struct lpfc_hba * phba)
{
-@@ -1633,6 +1958,14 @@ lpfc_offline_prep(struct lpfc_hba * phba
+@@ -1633,6 +1958,14 @@
lpfc_sli_flush_mbox_queue(phba);
}
void
lpfc_offline(struct lpfc_hba *phba)
{
-@@ -1670,12 +2003,17 @@ lpfc_offline(struct lpfc_hba *phba)
+@@ -1670,12 +2003,17 @@
lpfc_destroy_vport_work_array(phba, vports);
}
static int
lpfc_scsi_free(struct lpfc_hba *phba)
{
-@@ -1704,6 +2042,22 @@ lpfc_scsi_free(struct lpfc_hba *phba)
+@@ -1704,6 +2042,22 @@
return 0;
}
struct lpfc_vport *
lpfc_create_port(struct lpfc_hba *phba, int instance, struct device *dev)
{
-@@ -1765,6 +2119,16 @@ lpfc_create_port(struct lpfc_hba *phba,
+@@ -1765,6 +2119,16 @@
error = scsi_add_host(shost, dev);
if (error)
goto out_put_shost;
spin_lock_irq(&phba->hbalock);
list_add_tail(&vport->listentry, &phba->port_list);
-@@ -1777,14 +2141,19 @@ out:
+@@ -1777,13 +2141,18 @@
return NULL;
}
{
struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
struct lpfc_hba *phba = vport->phba;
-
-- kfree(vport->vname);
-
+- kfree(vport->vname);
+
lpfc_debugfs_terminate(vport);
fc_remove_host(shost);
- scsi_remove_host(shost);
-@@ -1797,6 +2166,16 @@ destroy_port(struct lpfc_vport *vport)
+@@ -1797,6 +2166,16 @@
return;
}
int
lpfc_get_instance(void)
{
-@@ -1810,11 +2189,21 @@ lpfc_get_instance(void)
+@@ -1810,11 +2189,21 @@
return instance;
}
int lpfc_scan_finished(struct Scsi_Host *shost, unsigned long time)
{
struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
-@@ -1858,6 +2247,13 @@ finished:
+@@ -1858,6 +2247,13 @@
return stat;
}
void lpfc_host_attrib_init(struct Scsi_Host *shost)
{
struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
-@@ -1906,42 +2302,390 @@ void lpfc_host_attrib_init(struct Scsi_H
+@@ -1906,42 +2302,390 @@
spin_unlock_irq(shost->host_lock);
}
+ "0421 MSI-X slow-path request_irq failed "
+ "(%d)\n", rc);
+ goto msi_fail_out;
-+ }
-+
+ }
+
+- error = request_irq(phba->msix_entries[0].vector, lpfc_intr_handler, 0,
+- LPFC_DRIVER_NAME, phba);
+- if (error) {
+ /* vector-1 is associated to fast-path handler */
+ rc = request_irq(phba->msix_entries[1].vector, &lpfc_fp_intr_handler,
+ IRQF_SHARED, LPFC_FP_DRIVER_HANDLER_NAME, phba);
+ "0429 MSI-X fast-path request_irq failed "
+ "(%d)\n", rc);
+ goto irq_fail_out;
- }
-
-- error = request_irq(phba->msix_entries[0].vector, lpfc_intr_handler, 0,
-- LPFC_DRIVER_NAME, phba);
-- if (error) {
++ }
++
+ /*
+ * Configure HBA MSI-X attention conditions to messages
+ */
+ "0474 Unable to allocate memory for issuing "
+ "MBOX_CONFIG_MSI command\n");
+ goto mem_fail_out;
-+ }
+ }
+- return error;
+ rc = lpfc_config_msi(phba, pmb);
+ if (rc)
+ goto mbx_fail_out;
+ "mbxCmd x%x, mbxStatus x%x\n",
+ pmb->mb.mbxCommand, pmb->mb.mbxStatus);
+ goto mbx_fail_out;
- }
-- return error;
++ }
+
+ /* Free memory allocated for mailbox command */
+ mempool_free(pmb, phba->mbox_mem_pool);
+ /* Unconfigure MSI-X capability structure */
+ pci_disable_msix(phba->pcidev);
+ return rc;
- }
-
++}
++
+/**
+ * lpfc_disable_msix: Disable MSI-X interrupt mode.
+ * @phba: pointer to lpfc hba data structure.
+ * This routine is invoked to release the MSI-X vectors and then disable the
+ * MSI-X interrupt mode.
+ **/
- static void
- lpfc_disable_msix(struct lpfc_hba *phba)
- {
-- free_irq(phba->msix_entries[0].vector, phba);
++static void
++lpfc_disable_msix(struct lpfc_hba *phba)
++{
+ int i;
+
+ /* Free up MSI-X multi-message vectors */
+ for (i = 0; i < LPFC_MSIX_VECTORS; i++)
+ free_irq(phba->msix_entries[i].vector, phba);
+ /* Disable MSI-X */
- pci_disable_msix(phba->pcidev);
- }
-
++ pci_disable_msix(phba->pcidev);
++}
++
+/**
+ * lpfc_enable_msi: Enable MSI interrupt mode.
+ * @phba: pointer to lpfc hba data structure.
+ break;
+ }
+ return;
-+}
-+
-+static void
+ }
+
+ static void
+-lpfc_disable_msix(struct lpfc_hba *phba)
+lpfc_stop_port(struct lpfc_hba *phba)
-+{
+ {
+- free_irq(phba->msix_entries[0].vector, phba);
+- pci_disable_msix(phba->pcidev);
+ /* Clear all interrupt enable conditions */
+ writel(0, phba->HCregaddr);
+ readl(phba->HCregaddr); /* flush */
+ phba->pport->work_port_events = 0;
+
+ return;
-+}
-+
+ }
+
+/**
+ * lpfc_enable_intr: Enable device interrupt.
+ * @phba: pointer to lpfc hba data structure.
static int __devinit
lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
{
-@@ -1955,7 +2699,9 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -1955,7 +2699,9 @@
int error = -ENODEV, retval;
int i, hbq_count;
uint16_t iotag;
if (pci_enable_device_mem(pdev))
goto out;
-@@ -1966,6 +2712,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -1966,6 +2712,7 @@
if (!phba)
goto out_release_regions;
spin_lock_init(&phba->hbalock);
/* Initialize ndlp management spinlock */
-@@ -1978,12 +2725,16 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -1978,12 +2725,16 @@
goto out_free_phba;
INIT_LIST_HEAD(&phba->port_list);
/* Initialize timers used by driver */
init_timer(&phba->hb_tmofunc);
-@@ -2000,8 +2751,12 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -2000,8 +2751,12 @@
init_timer(&phba->fabric_block_timer);
phba->fabric_block_timer.function = lpfc_fabric_block_timeout;
phba->fabric_block_timer.data = (unsigned long) phba;
pci_try_set_mwi(pdev);
if (pci_set_dma_mask(phba->pcidev, DMA_64BIT_MASK) != 0)
-@@ -2019,7 +2774,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -2019,7 +2774,7 @@
bar2map_len = pci_resource_len(phba->pcidev, 2);
/* Map HBA SLIM to a kernel virtual address. */
if (!phba->slim_memmap_p) {
error = -ENODEV;
dev_printk(KERN_ERR, &pdev->dev,
-@@ -2037,12 +2792,20 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -2037,12 +2792,20 @@
}
/* Allocate memory for SLI-2 structures */
phba->hbqslimp.virt = dma_alloc_coherent(&phba->pcidev->dev,
lpfc_sli_hbq_size(),
-@@ -2111,7 +2874,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -2111,7 +2874,7 @@
phba->fc_arbtov = FF_DEF_ARBTOV;
INIT_LIST_HEAD(&phba->work_list);
phba->work_ha_mask |= (HA_RXMASK << (LPFC_ELS_RING * 4));
/* Initialize the wait queue head for the kernel thread */
-@@ -2135,46 +2898,21 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -2135,46 +2898,21 @@
/* Initialize list to save ELS buffers */
INIT_LIST_HEAD(&phba->elsbuf);
phba->MBslimaddr = phba->slim_memmap_p;
phba->HAregaddr = phba->ctrl_regs_memmap_p + HA_REG_OFFSET;
-@@ -2182,16 +2920,71 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -2182,16 +2920,71 @@
phba->HSregaddr = phba->ctrl_regs_memmap_p + HS_REG_OFFSET;
phba->HCregaddr = phba->ctrl_regs_memmap_p + HC_REG_OFFSET;
+- if (lpfc_alloc_sysfs_attr(vport)) {
+ /* Confiugre sysfs attributes */
+ phba->dfc_host = lpfcdfc_host_add(pdev, shost, phba);
+ if (!phba->dfc_host) {
+ lpfc_printf_log(phba, KERN_ERR, LOG_LIBDFC,
+ "1201 Failed to allocate dfc_host \n");
-+ error = -ENOMEM;
-+ goto out_destroy_port;
-+ }
-+
- if (lpfc_alloc_sysfs_attr(vport)) {
-+ lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
-+ "1476 Failed to allocate sysfs attr\n");
error = -ENOMEM;
- goto out_free_irq;
-+ goto out_del_dfc_host;
++ goto out_destroy_port;
}
- if (lpfc_sli_hba_setup(phba)) {
- error = -ENODEV;
- goto out_remove_device;
++ if (lpfc_alloc_sysfs_attr(vport)) {
++ lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
++ "1476 Failed to allocate sysfs attr\n");
++ error = -ENOMEM;
++ goto out_del_dfc_host;
+ }
+
+ cfg_mode = phba->cfg_use_msi;
+ while (true) {
+ /* Configure and enable interrupt */
+ /* Try next level of interrupt mode */
+ cfg_mode = --intr_mode;
+ }
- }
-
++ }
++
+ if ((lpfc_get_security_enabled)(shost)) {
+ unsigned long flags;
+ spin_lock_irqsave(&fc_security_user_lock, flags);
/*
* hba setup may have changed the hba_queue_depth so we need to adjust
* the value of can_queue.
-@@ -2206,27 +2999,35 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -2206,27 +2999,35 @@
spin_unlock_irq(shost->host_lock);
}
destroy_port(vport);
out_kthread_stop:
kthread_stop(phba->worker_thread);
-@@ -2238,11 +3039,11 @@ out_free_iocbq:
+@@ -2238,11 +3039,11 @@
}
lpfc_mem_free(phba);
out_free_hbqslimp:
out_iounmap:
iounmap(phba->ctrl_regs_memmap_p);
out_iounmap_slim:
-@@ -2262,23 +3063,41 @@ out:
+@@ -2262,23 +3063,41 @@
return error;
}
struct lpfc_hba *phba = vport->phba;
+ int i;
int bars = pci_select_bars(pdev, IORESOURCE_MEM);
-
++
+ lpfcdfc_host_del(phba->dfc_host);
+ phba->dfc_host = NULL;
-+
+
spin_lock_irq(&phba->hbalock);
vport->load_flag |= FC_UNLOADING;
spin_unlock_irq(&phba->hbalock);
fc_remove_host(shost);
scsi_remove_host(shost);
lpfc_cleanup(vport);
-@@ -2288,7 +3107,12 @@ lpfc_pci_remove_one(struct pci_dev *pdev
+@@ -2288,7 +3107,12 @@
* clears the rings, discards all mailbox commands, and resets
* the HBA.
*/
lpfc_sli_brdrestart(phba);
lpfc_stop_phba_timers(phba);
-@@ -2298,13 +3122,8 @@ lpfc_pci_remove_one(struct pci_dev *pdev
+@@ -2298,13 +3122,8 @@
lpfc_debugfs_terminate(vport);
pci_set_drvdata(pdev, NULL);
scsi_host_put(shost);
-@@ -2316,12 +3135,12 @@ lpfc_pci_remove_one(struct pci_dev *pdev
+@@ -2316,12 +3135,12 @@
lpfc_scsi_free(phba);
lpfc_mem_free(phba);
/* unmap adapter SLIM and Control Registers */
iounmap(phba->ctrl_regs_memmap_p);
-@@ -2336,13 +3155,130 @@ lpfc_pci_remove_one(struct pci_dev *pdev
+@@ -2336,13 +3155,130 @@
}
/**
static pci_ers_result_t lpfc_io_error_detected(struct pci_dev *pdev,
pci_channel_state_t state)
{
-@@ -2351,8 +3287,15 @@ static pci_ers_result_t lpfc_io_error_de
+@@ -2351,8 +3287,15 @@
struct lpfc_sli *psli = &phba->sli;
struct lpfc_sli_ring *pring;
pci_disable_device(pdev);
/*
-@@ -2363,30 +3306,36 @@ static pci_ers_result_t lpfc_io_error_de
+@@ -2363,30 +3306,36 @@
pring = &psli->ring[psli->fcp_ring];
lpfc_sli_abort_iocb_ring(phba, pring);
dev_printk(KERN_INFO, &pdev->dev, "recovering from a slot reset.\n");
if (pci_enable_device_mem(pdev)) {
-@@ -2395,56 +3344,42 @@ static pci_ers_result_t lpfc_io_slot_res
+@@ -2395,56 +3344,42 @@
return PCI_ERS_RESULT_DISCONNECT;
}
*/
static void lpfc_io_resume(struct pci_dev *pdev)
{
-@@ -2491,6 +3426,8 @@ static struct pci_device_id lpfc_id_tabl
+@@ -2491,6 +3426,8 @@
PCI_ANY_ID, PCI_ANY_ID, },
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZEPHYR,
PCI_ANY_ID, PCI_ANY_ID, },
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZEPHYR_SCSP,
PCI_ANY_ID, PCI_ANY_ID, },
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZEPHYR_DCSP,
-@@ -2521,6 +3458,12 @@ static struct pci_device_id lpfc_id_tabl
+@@ -2521,6 +3458,12 @@
PCI_ANY_ID, PCI_ANY_ID, },
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_SAT_S,
PCI_ANY_ID, PCI_ANY_ID, },
{ 0 }
};
-@@ -2537,9 +3480,23 @@ static struct pci_driver lpfc_driver = {
+@@ -2537,9 +3480,23 @@
.id_table = lpfc_id_table,
.probe = lpfc_pci_probe_one,
.remove = __devexit_p(lpfc_pci_remove_one),
static int __init
lpfc_init(void)
{
-@@ -2564,22 +3521,57 @@ lpfc_init(void)
+@@ -2564,22 +3521,57 @@
return -ENOMEM;
}
}
}
module_init(lpfc_init);
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ioctl.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_ioctl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_ioctl.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_ioctl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_ioctl.c Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,2518 @@
+/*******************************************************************
+ * This file is part of the Emulex Linux Device Driver for *
+{
+ unregister_chrdev(lpfcdfc_major, LPFC_CHAR_DEV_NAME);
+}
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ioctl.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_ioctl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_ioctl.h 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_ioctl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_ioctl.h Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,184 @@
+/*******************************************************************
+ * This file is part of the Emulex Linux Device Driver for *
+struct lpfcdfc_host *lpfcdfc_host_add(struct pci_dev *, struct Scsi_Host *,
+ struct lpfc_hba *);
+#endif /* __KERNEL__ */
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_logmsg.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_logmsg.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_logmsg.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_logmsg.h 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_logmsg.h
+--- a/drivers/scsi/lpfc/lpfc_logmsg.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_logmsg.h Wed May 06 16:56:34 2009 +0100
@@ -32,6 +32,7 @@
#define LOG_FCP_ERROR 0x1000 /* log errors, not underruns */
#define LOG_LIBDFC 0x2000 /* Libdfc events */
#define LOG_ALL_MSG 0xffff /* LOG all messages */
#define lpfc_printf_vlog(vport, level, mask, fmt, arg...) \
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_mbox.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_mbox.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_mbox.c
+--- a/drivers/scsi/lpfc/lpfc_mbox.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_mbox.c Wed May 06 16:56:34 2009 +0100
@@ -1,7 +1,7 @@
/*******************************************************************
* This file is part of the Emulex Linux Device Driver for *
void
lpfc_dump_mem(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb, uint16_t offset)
{
-@@ -65,10 +76,49 @@ lpfc_dump_mem(struct lpfc_hba * phba, LP
+@@ -65,10 +76,49 @@
return;
}
void
lpfc_read_nv(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
{
-@@ -81,10 +131,19 @@ lpfc_read_nv(struct lpfc_hba * phba, LPF
+@@ -81,10 +131,19 @@
return;
}
void
lpfc_config_async(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb,
uint32_t ring)
-@@ -99,10 +158,19 @@ lpfc_config_async(struct lpfc_hba * phba
+@@ -99,10 +158,19 @@
return;
}
void
lpfc_heart_beat(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
{
-@@ -115,10 +183,26 @@ lpfc_heart_beat(struct lpfc_hba * phba,
+@@ -115,10 +183,26 @@
return;
}
int
lpfc_read_la(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb, struct lpfc_dmabuf *mp)
{
-@@ -143,10 +227,21 @@ lpfc_read_la(struct lpfc_hba * phba, LPF
+@@ -143,10 +227,21 @@
return (0);
}
void
lpfc_clear_la(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
{
-@@ -161,10 +256,20 @@ lpfc_clear_la(struct lpfc_hba * phba, LP
+@@ -161,10 +256,20 @@
return;
}
void
lpfc_config_link(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
{
-@@ -199,10 +304,98 @@ lpfc_config_link(struct lpfc_hba * phba,
+@@ -199,10 +304,98 @@
return;
}
void
lpfc_init_link(struct lpfc_hba * phba,
LPFC_MBOXQ_t * pmb, uint32_t topology, uint32_t linkspeed)
-@@ -269,10 +462,27 @@ lpfc_init_link(struct lpfc_hba * phba,
+@@ -269,10 +462,27 @@
return;
}
int
lpfc_read_sparam(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb, int vpi)
{
-@@ -312,10 +522,21 @@ lpfc_read_sparam(struct lpfc_hba *phba,
+@@ -312,10 +522,21 @@
return (0);
}
void
lpfc_unreg_did(struct lpfc_hba * phba, uint16_t vpi, uint32_t did,
LPFC_MBOXQ_t * pmb)
-@@ -333,10 +554,19 @@ lpfc_unreg_did(struct lpfc_hba * phba, u
+@@ -333,10 +554,19 @@
return;
}
void
lpfc_read_config(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
{
-@@ -350,10 +580,18 @@ lpfc_read_config(struct lpfc_hba * phba,
+@@ -350,10 +580,18 @@
return;
}
void
lpfc_read_lnk_stat(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
{
-@@ -367,10 +605,30 @@ lpfc_read_lnk_stat(struct lpfc_hba * phb
+@@ -367,10 +605,30 @@
return;
}
int
lpfc_reg_login(struct lpfc_hba *phba, uint16_t vpi, uint32_t did,
uint8_t *param, LPFC_MBOXQ_t *pmb, uint32_t flag)
-@@ -418,10 +676,20 @@ lpfc_reg_login(struct lpfc_hba *phba, ui
+@@ -418,10 +676,20 @@
return (0);
}
void
lpfc_unreg_login(struct lpfc_hba *phba, uint16_t vpi, uint32_t rpi,
LPFC_MBOXQ_t * pmb)
-@@ -440,10 +708,21 @@ lpfc_unreg_login(struct lpfc_hba *phba,
+@@ -440,10 +708,21 @@
return;
}
void
lpfc_reg_vpi(struct lpfc_hba *phba, uint16_t vpi, uint32_t sid,
LPFC_MBOXQ_t *pmb)
-@@ -461,10 +740,22 @@ lpfc_reg_vpi(struct lpfc_hba *phba, uint
+@@ -461,10 +740,22 @@
}
void
lpfc_unreg_vpi(struct lpfc_hba *phba, uint16_t vpi, LPFC_MBOXQ_t *pmb)
{
-@@ -479,12 +770,19 @@ lpfc_unreg_vpi(struct lpfc_hba *phba, ui
+@@ -479,12 +770,19 @@
}
dma_addr_t pdma_addr;
uint32_t offset;
uint32_t iocbCnt = 0;
-@@ -513,29 +811,77 @@ lpfc_config_pcb_setup(struct lpfc_hba *
+@@ -513,29 +811,77 @@
continue;
}
/* Command ring setup for ring */
void
lpfc_read_rev(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
{
-@@ -548,6 +894,16 @@ lpfc_read_rev(struct lpfc_hba * phba, LP
+@@ -548,6 +894,16 @@
return;
}
static void
lpfc_build_hbq_profile2(struct config_hbq_var *hbqmb,
struct lpfc_hbq_init *hbq_desc)
-@@ -557,6 +913,16 @@ lpfc_build_hbq_profile2(struct config_hb
+@@ -557,6 +913,16 @@
hbqmb->profiles.profile2.seqlenoff = hbq_desc->seqlenoff;
}
static void
lpfc_build_hbq_profile3(struct config_hbq_var *hbqmb,
struct lpfc_hbq_init *hbq_desc)
-@@ -569,6 +935,17 @@ lpfc_build_hbq_profile3(struct config_hb
+@@ -569,6 +935,17 @@
sizeof(hbqmb->profiles.profile3.cmdmatch));
}
static void
lpfc_build_hbq_profile5(struct config_hbq_var *hbqmb,
struct lpfc_hbq_init *hbq_desc)
-@@ -581,6 +958,20 @@ lpfc_build_hbq_profile5(struct config_hb
+@@ -581,6 +958,20 @@
sizeof(hbqmb->profiles.profile5.cmdmatch));
}
void
lpfc_config_hbq(struct lpfc_hba *phba, uint32_t id,
struct lpfc_hbq_init *hbq_desc,
-@@ -641,8 +1032,23 @@ lpfc_config_hbq(struct lpfc_hba *phba, u
+@@ -641,8 +1032,23 @@
return;
}
void
lpfc_config_ring(struct lpfc_hba * phba, int ring, LPFC_MBOXQ_t * pmb)
{
-@@ -684,6 +1090,20 @@ lpfc_config_ring(struct lpfc_hba * phba,
+@@ -684,6 +1090,20 @@
return;
}
void
lpfc_config_port(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
{
-@@ -702,8 +1122,8 @@ lpfc_config_port(struct lpfc_hba *phba,
+@@ -702,8 +1122,8 @@
mb->un.varCfgPort.pcbLen = sizeof(PCB_t);
mb->un.varCfgPort.pcbLow = putPaddrLow(pdma_addr);
mb->un.varCfgPort.pcbHigh = putPaddrHigh(pdma_addr);
-@@ -711,12 +1131,13 @@ lpfc_config_port(struct lpfc_hba *phba,
+@@ -711,12 +1131,13 @@
if (phba->sli_rev == 3 && phba->vpd.sli3Feat.cerbm) {
mb->un.varCfgPort.cerbm = 1; /* Request HBQs */
} else
mb->un.varCfgPort.max_vpi = phba->max_vpi = 0;
} else
-@@ -724,16 +1145,15 @@ lpfc_config_port(struct lpfc_hba *phba,
+@@ -724,16 +1145,15 @@
mb->un.varCfgPort.sli_mode = phba->sli_rev;
/* Now setup pcb */
/*
* Setup Host Group ring pointer.
-@@ -785,42 +1205,52 @@ lpfc_config_port(struct lpfc_hba *phba,
+@@ -785,42 +1205,52 @@
*
*/
- if (phba->sli_rev == 3) {
- phba->host_gp = &mb_slim->us.s3.host[0];
- phba->hbq_put = &mb_slim->us.s3.hbq_put[0];
-- } else {
-- phba->host_gp = &mb_slim->us.s2.host[0];
+ if (phba->cfg_hostmem_hgp && phba->sli_rev != 3) {
+ phba->host_gp = &phba->mbox->us.s2.host[0];
- phba->hbq_put = NULL;
-- }
++ phba->hbq_put = NULL;
+ offset = (uint8_t *)&phba->mbox->us.s2.host -
+ (uint8_t *)phba->slim2p.virt;
+ pdma_addr = phba->slim2p.phys + offset;
+ phba->pcb->hgpAddrHigh = putPaddrHigh(pdma_addr);
+ phba->pcb->hgpAddrLow = putPaddrLow(pdma_addr);
-+ } else {
+ } else {
+- phba->host_gp = &mb_slim->us.s2.host[0];
+- phba->hbq_put = NULL;
+ /* Always Host Group Pointer is in SLIM */
+ mb->un.varCfgPort.hps = 1;
-
-- /* mask off BAR0's flag bits 0 - 3 */
-- phba->slim2p->pcb.hgpAddrLow = (bar_low & PCI_BASE_ADDRESS_MEM_MASK) +
-- (void __iomem *) phba->host_gp -
-- (void __iomem *)phba->MBslimaddr;
-- if (bar_low & PCI_BASE_ADDRESS_MEM_TYPE_64)
-- phba->slim2p->pcb.hgpAddrHigh = bar_high;
-- else
-- phba->slim2p->pcb.hgpAddrHigh = 0;
-- /* write HGP data to SLIM at the required longword offset */
-- memset(&hgp, 0, sizeof(struct lpfc_hgp));
++
+ if (phba->sli_rev == 3) {
+ phba->host_gp = &mb_slim->us.s3.host[0];
+ phba->hbq_put = &mb_slim->us.s3.hbq_put[0];
+ phba->pcb->hgpAddrHigh = 0;
+ /* write HGP data to SLIM at the required longword offset */
+ memset(&hgp, 0, sizeof(struct lpfc_hgp));
-
-- for (i=0; i < phba->sli.num_rings; i++) {
-- lpfc_memcpy_to_slim(phba->host_gp + i, &hgp,
++
+ for (i = 0; i < phba->sli.num_rings; i++) {
+ lpfc_memcpy_to_slim(phba->host_gp + i, &hgp,
- sizeof(*phba->host_gp));
++ sizeof(*phba->host_gp));
+ }
}
-- /* Setup Port Group ring pointer */
+- /* mask off BAR0's flag bits 0 - 3 */
+- phba->slim2p->pcb.hgpAddrLow = (bar_low & PCI_BASE_ADDRESS_MEM_MASK) +
+- (void __iomem *) phba->host_gp -
+- (void __iomem *)phba->MBslimaddr;
+- if (bar_low & PCI_BASE_ADDRESS_MEM_TYPE_64)
+- phba->slim2p->pcb.hgpAddrHigh = bar_high;
+ /* Setup Port Group offset */
- if (phba->sli_rev == 3)
-- pgp_offset = (uint8_t *)&phba->slim2p->mbx.us.s3_pgp.port -
-- (uint8_t *)phba->slim2p;
++ if (phba->sli_rev == 3)
+ pgp_offset = offsetof(struct lpfc_sli2_slim,
+ mbx.us.s3_pgp.port);
else
+- phba->slim2p->pcb.hgpAddrHigh = 0;
+- /* write HGP data to SLIM at the required longword offset */
+- memset(&hgp, 0, sizeof(struct lpfc_hgp));
+-
+- for (i=0; i < phba->sli.num_rings; i++) {
+- lpfc_memcpy_to_slim(phba->host_gp + i, &hgp,
+- sizeof(*phba->host_gp));
+- }
+-
+- /* Setup Port Group ring pointer */
+- if (phba->sli_rev == 3)
+- pgp_offset = (uint8_t *)&phba->slim2p->mbx.us.s3_pgp.port -
+- (uint8_t *)phba->slim2p;
+- else
- pgp_offset = (uint8_t *)&phba->slim2p->mbx.us.s2.port -
- (uint8_t *)phba->slim2p;
-
/* Use callback routine to setp rings in the pcb */
lpfc_config_pcb_setup(phba);
-@@ -835,10 +1265,24 @@ lpfc_config_port(struct lpfc_hba *phba,
+@@ -835,10 +1265,24 @@
}
/* Swap PCB if needed */
void
lpfc_kill_board(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
{
-@@ -850,6 +1294,16 @@ lpfc_kill_board(struct lpfc_hba * phba,
+@@ -850,6 +1294,16 @@
return;
}
void
lpfc_mbox_put(struct lpfc_hba * phba, LPFC_MBOXQ_t * mbq)
{
-@@ -864,6 +1318,20 @@ lpfc_mbox_put(struct lpfc_hba * phba, LP
+@@ -864,6 +1318,20 @@
return;
}
LPFC_MBOXQ_t *
lpfc_mbox_get(struct lpfc_hba * phba)
{
-@@ -877,16 +1345,40 @@ lpfc_mbox_get(struct lpfc_hba * phba)
+@@ -877,16 +1345,40 @@
return mbq;
}
int
lpfc_mbox_tmo_val(struct lpfc_hba *phba, int cmd)
{
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mem.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_mem.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_mem.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_mem.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_mem.c
+--- a/drivers/scsi/lpfc/lpfc_mem.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_mem.c Wed May 06 16:56:34 2009 +0100
@@ -1,7 +1,7 @@
/*******************************************************************
* This file is part of the Emulex Linux Device Driver for *
int
lpfc_mem_alloc(struct lpfc_hba * phba)
{
-@@ -120,6 +135,16 @@ lpfc_mem_alloc(struct lpfc_hba * phba)
+@@ -120,6 +135,16 @@
return -ENOMEM;
}
void
lpfc_mem_free(struct lpfc_hba * phba)
{
-@@ -181,12 +206,29 @@ lpfc_mem_free(struct lpfc_hba * phba)
+@@ -181,12 +206,29 @@
phba->lpfc_scsi_dma_buf_pool = NULL;
phba->lpfc_mbuf_pool = NULL;
void *
lpfc_mbuf_alloc(struct lpfc_hba *phba, int mem_flags, dma_addr_t *handle)
{
-@@ -206,6 +248,20 @@ lpfc_mbuf_alloc(struct lpfc_hba *phba, i
+@@ -206,6 +248,20 @@
return ret;
}
void
__lpfc_mbuf_free(struct lpfc_hba * phba, void *virt, dma_addr_t dma)
{
-@@ -221,7 +277,21 @@ __lpfc_mbuf_free(struct lpfc_hba * phba,
+@@ -221,7 +277,21 @@
return;
}
lpfc_mbuf_free(struct lpfc_hba * phba, void *virt, dma_addr_t dma)
{
unsigned long iflags;
-@@ -232,6 +302,19 @@ lpfc_mbuf_free(struct lpfc_hba * phba, v
+@@ -232,6 +302,19 @@
return;
}
struct hbq_dmabuf *
lpfc_els_hbq_alloc(struct lpfc_hba *phba)
{
-@@ -251,6 +334,18 @@ lpfc_els_hbq_alloc(struct lpfc_hba *phba
+@@ -251,6 +334,18 @@
return hbqbp;
}
void
lpfc_els_hbq_free(struct lpfc_hba *phba, struct hbq_dmabuf *hbqbp)
{
-@@ -259,7 +354,18 @@ lpfc_els_hbq_free(struct lpfc_hba *phba,
+@@ -259,7 +354,18 @@
return;
}
void
lpfc_in_buf_free(struct lpfc_hba *phba, struct lpfc_dmabuf *mp)
{
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_menlo.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_menlo.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_menlo.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_menlo.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_menlo.c Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,1192 @@
+/*******************************************************************
+ * This file is part of the Emulex Linux Device Driver for *
+ .read = sysfs_menlo_read,
+ .write = sysfs_menlo_write,
+};
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_nl.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_nl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_nl.h 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_nl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_nl.h Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,179 @@
+/*******************************************************************
+ * This file is part of the Emulex Linux Device Driver for *
+ uint32_t data;
+};
+
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_nportdisc.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_nportdisc.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_nportdisc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_nportdisc.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_nportdisc.c
+--- a/drivers/scsi/lpfc/lpfc_nportdisc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_nportdisc.c Wed May 06 16:56:34 2009 +0100
@@ -30,6 +30,7 @@
#include "lpfc_hw.h"
#include "lpfc_disc.h"
#include "lpfc_scsi.h"
#include "lpfc.h"
-@@ -1003,20 +1004,8 @@ lpfc_rcv_plogi_adisc_issue(struct lpfc_v
+@@ -1003,20 +1004,8 @@
spin_lock_irq(shost->host_lock);
ndlp->nlp_flag &= ~NLP_NPR_2B_DISC;
spin_unlock_irq(shost->host_lock);
}
return ndlp->nlp_state;
}
-@@ -1865,8 +1854,13 @@ static uint32_t
+@@ -1865,8 +1854,13 @@
lpfc_cmpl_logo_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
void *arg, uint32_t evt)
{
return ndlp->nlp_state;
}
-@@ -1935,10 +1929,10 @@ lpfc_device_recov_npr_node(struct lpfc_v
+@@ -1935,10 +1929,10 @@
if (vport->fc_flag & FC_RSCN_DEFERRED)
return ndlp->nlp_state;
return ndlp->nlp_state;
}
-@@ -2155,7 +2149,7 @@ lpfc_disc_state_machine(struct lpfc_vpor
+@@ -2155,7 +2149,7 @@
lpfc_nlp_put(ndlp);
} else {
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_DSM,
"DSM out: ste:%d did:x%x flg:x%x",
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_scsi.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_scsi.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_scsi.c
+--- a/drivers/scsi/lpfc/lpfc_scsi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_scsi.c Wed May 06 16:56:34 2009 +0100
@@ -32,6 +32,7 @@
#include "lpfc_version.h"
#include "lpfc_hw.h"
{
unsigned long flags;
uint32_t evt_posted;
-@@ -82,14 +198,14 @@ lpfc_adjust_queue_depth(struct lpfc_hba
+@@ -82,14 +198,14 @@
*/
static inline void
lpfc_rampup_queue_depth(struct lpfc_vport *vport,
return;
spin_lock_irqsave(&phba->hbalock, flags);
if (((phba->last_ramp_up_time + QUEUE_RAMP_UP_INTERVAL) > jiffies) ||
-@@ -117,9 +233,10 @@ lpfc_ramp_down_queue_handler(struct lpfc
+@@ -117,9 +233,10 @@
struct lpfc_vport **vports;
struct Scsi_Host *shost;
struct scsi_device *sdev;
num_rsrc_err = atomic_read(&phba->num_rsrc_err);
num_cmd_success = atomic_read(&phba->num_cmd_success);
-@@ -137,6 +254,7 @@ lpfc_ramp_down_queue_handler(struct lpfc
+@@ -137,6 +254,7 @@
else
new_queue_depth = sdev->queue_depth -
new_queue_depth;
if (sdev->ordered_tags)
scsi_adjust_queue_depth(sdev,
MSG_ORDERED_TAG,
-@@ -145,6 +263,13 @@ lpfc_ramp_down_queue_handler(struct lpfc
+@@ -145,6 +263,13 @@
scsi_adjust_queue_depth(sdev,
MSG_SIMPLE_TAG,
new_queue_depth);
}
}
lpfc_destroy_vport_work_array(phba, vports);
-@@ -159,6 +284,7 @@ lpfc_ramp_up_queue_handler(struct lpfc_h
+@@ -159,6 +284,7 @@
struct Scsi_Host *shost;
struct scsi_device *sdev;
int i;
vports = lpfc_create_vport_work_array(phba);
if (vports != NULL)
-@@ -176,6 +302,14 @@ lpfc_ramp_up_queue_handler(struct lpfc_h
+@@ -176,11 +302,48 @@
scsi_adjust_queue_depth(sdev,
MSG_SIMPLE_TAG,
sdev->queue_depth+1);
}
}
lpfc_destroy_vport_work_array(phba, vports);
-@@ -183,6 +317,35 @@ lpfc_ramp_up_queue_handler(struct lpfc_h
+ atomic_set(&phba->num_rsrc_err, 0);
atomic_set(&phba->num_cmd_success, 0);
- }
-
++}
++
+/**
+ * lpfc_scsi_dev_block: set all scsi hosts to block state.
+ * @phba: Pointer to HBA context object.
+ }
+ }
+ lpfc_destroy_vport_work_array(phba, vports);
-+}
-+
+ }
+
/*
- * This routine allocates a scsi buffer, which contains all the necessary
- * information needed to initiate a SCSI I/O. The non-DMAable buffer region
-@@ -198,7 +361,9 @@ lpfc_new_scsi_buf(struct lpfc_vport *vpo
+@@ -198,7 +361,9 @@
struct lpfc_scsi_buf *psb;
struct ulp_bde64 *bpl;
IOCB_t *iocb;
uint16_t iotag;
psb = kzalloc(sizeof(struct lpfc_scsi_buf), GFP_KERNEL);
-@@ -238,40 +403,60 @@ lpfc_new_scsi_buf(struct lpfc_vport *vpo
+@@ -238,40 +403,60 @@
/* Initialize local short-hand pointers. */
bpl = psb->fcp_bpl;
iocb->ulpClass = CLASS3;
return psb;
-@@ -313,8 +498,9 @@ lpfc_scsi_prep_dma_buf(struct lpfc_hba *
+@@ -313,8 +498,9 @@
struct fcp_cmnd *fcp_cmnd = lpfc_cmd->fcp_cmnd;
struct ulp_bde64 *bpl = lpfc_cmd->fcp_bpl;
IOCB_t *iocb_cmd = &lpfc_cmd->cur_iocbq.iocb;
int nseg, datadir = scsi_cmnd->sc_data_direction;
/*
-@@ -352,37 +538,159 @@ lpfc_scsi_prep_dma_buf(struct lpfc_hba *
+@@ -352,37 +538,159 @@
* during probe that limits the number of sg elements in any
* single scsi command. Just run through the seg_cnt and format
* the bde's.
- * scsi_cmnd request_buffer. Note that the bdeSize is explicitly
- * reinitialized since all iocb memory resources are used many times
- * for transmit, receive, and continuation bpl's.
-- */
++ * scsi_cmnd request_buffer. Note that for SLI-2 the bdeSize is
++ * explicitly reinitialized and for SLI-3 the extended bde count is
++ * explicitly reinitialized since all iocb memory resources are reused.
+ */
- iocb_cmd->un.fcpi64.bdl.bdeSize = (2 * sizeof (struct ulp_bde64));
- iocb_cmd->un.fcpi64.bdl.bdeSize +=
- (num_bde * sizeof (struct ulp_bde64));
- iocb_cmd->ulpBdeCount = 1;
- iocb_cmd->ulpLe = 1;
-+ * scsi_cmnd request_buffer. Note that for SLI-2 the bdeSize is
-+ * explicitly reinitialized and for SLI-3 the extended bde count is
-+ * explicitly reinitialized since all iocb memory resources are reused.
-+ */
+ if (phba->sli_rev == 3) {
+ if (num_bde > LPFC_EXT_DATA_BDE_COUNT) {
+ /*
static void
lpfc_scsi_unprep_dma_buf(struct lpfc_hba * phba, struct lpfc_scsi_buf * psb)
{
-@@ -411,6 +719,7 @@ lpfc_handle_fcp_err(struct lpfc_vport *v
+@@ -410,6 +718,7 @@
+ uint32_t host_status = DID_OK;
uint32_t rsplen = 0;
uint32_t logit = LOG_FCP | LOG_FCP_ERROR;
-
+
+
/*
* If this is a task management command, there is no
- * scsi packet associated with this lpfc_cmd. The driver
-@@ -526,6 +835,7 @@ lpfc_handle_fcp_err(struct lpfc_vport *v
+@@ -526,6 +835,7 @@
out:
cmnd->result = ScsiResult(host_status, scsi_status);
}
static void
-@@ -539,12 +849,17 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba
+@@ -539,12 +849,17 @@
struct lpfc_nodelist *pnode = rdata->pnode;
struct scsi_cmnd *cmd = lpfc_cmd->pCmd;
int result;
if (lpfc_cmd->status) {
if (lpfc_cmd->status == IOSTAT_LOCAL_REJECT &&
-@@ -570,12 +885,36 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba
+@@ -570,12 +885,36 @@
break;
case IOSTAT_NPORT_BSY:
case IOSTAT_FABRIC_BSY:
cmd->result = ScsiResult(DID_REQUEUE, 0);
break;
} /* else: fall through */
-@@ -586,7 +925,8 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba
+@@ -586,7 +925,8 @@
if (!pnode || !NLP_CHK_NODE_ACT(pnode)
|| (pnode->nlp_state != NLP_STE_MAPPED_NODE))
} else {
cmd->result = ScsiResult(DID_OK, 0);
}
-@@ -602,9 +942,44 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba
+@@ -602,9 +942,44 @@
scsi_get_resid(cmd));
}
cmd->scsi_done(cmd);
if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) {
-@@ -612,28 +987,28 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba
+@@ -612,28 +987,28 @@
* If there is a thread waiting for command completion
* wake up the thread.
*/
continue;
if (tmp_sdev->ordered_tags)
scsi_adjust_queue_depth(tmp_sdev,
-@@ -647,6 +1022,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba
+@@ -647,6 +1022,9 @@
pnode->last_ramp_up_time = jiffies;
}
}
}
/*
-@@ -657,8 +1035,8 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba
+@@ -657,8 +1035,8 @@
NLP_CHK_NODE_ACT(pnode)) {
pnode->last_q_full_time = jiffies;
continue;
depth = scsi_track_queue_full(tmp_sdev,
tmp_sdev->queue_depth - 1);
-@@ -670,12 +1048,15 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba
+@@ -670,12 +1048,15 @@
* scsi_track_queue_full.
*/
if (depth == -1)
}
}
-@@ -683,15 +1064,33 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba
+@@ -683,13 +1064,31 @@
* If there is a thread waiting for command completion
* wake up the thread.
*/
+ spin_unlock_irqrestore(shost->host_lock, flags);
lpfc_release_scsi_buf(phba, lpfc_cmd);
- }
-
++}
++
+/**
+ * lpfc_fcpcmd_to_iocb - copy the fcp_cmd data into the IOCB.
+ * @data: A pointer to the immediate command data portion of the IOCB.
+ i += sizeof(uint32_t), j++) {
+ ((uint32_t *)data)[j] = cpu_to_be32(((uint32_t *)fcp_cmnd)[j]);
+ }
-+}
-+
+ }
+
static void
- lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd,
- struct lpfc_nodelist *pnode)
-@@ -758,7 +1157,8 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *v
+@@ -758,7 +1157,8 @@
fcp_cmnd->fcpCntl3 = 0;
phba->fc4ControlRequests++;
}
/*
* Finish initializing those IOCB fields that are independent
* of the scsi_cmnd request_buffer
-@@ -798,11 +1198,13 @@ lpfc_scsi_prep_task_mgmt_cmd(struct lpfc
+@@ -798,11 +1198,13 @@
piocb = &piocbq->iocb;
fcp_cmnd = lpfc_cmd->fcp_cmnd;
piocb->ulpContext = ndlp->nlp_rpi;
if (ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE) {
piocb->ulpFCP2Rcvy = 1;
-@@ -967,12 +1369,16 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd
+@@ -967,12 +1369,16 @@
* transport is still transitioning.
*/
if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) {
lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP,
"0707 driver's buffer pool is empty, "
-@@ -987,6 +1393,7 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd
+@@ -987,6 +1393,7 @@
lpfc_cmd->pCmd = cmnd;
lpfc_cmd->rdata = rdata;
lpfc_cmd->timeout = 0;
cmnd->host_scribble = (unsigned char *)lpfc_cmd;
cmnd->scsi_done = done;
-@@ -996,11 +1403,13 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd
+@@ -996,11 +1403,13 @@
lpfc_scsi_prep_cmnd(vport, lpfc_cmd, ndlp);
if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) {
lpfc_sli_poll_fcp_ring(phba);
if (phba->cfg_poll & DISABLE_FCP_RING_INT)
-@@ -1145,6 +1554,7 @@ lpfc_device_reset_handler(struct scsi_cm
+@@ -1145,6 +1554,7 @@
int ret = SUCCESS;
int status;
int cnt;
lpfc_block_error_handler(cmnd);
/*
-@@ -1163,6 +1573,19 @@ lpfc_device_reset_handler(struct scsi_cm
+@@ -1163,6 +1573,19 @@
break;
pnode = rdata->pnode;
}
if (!rdata || pnode->nlp_state != NLP_STE_MAPPED_NODE) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
"0721 LUN Reset rport "
-@@ -1242,10 +1665,23 @@ lpfc_bus_reset_handler(struct scsi_cmnd
+@@ -1242,10 +1665,23 @@
struct lpfc_hba *phba = vport->phba;
struct lpfc_nodelist *ndlp = NULL;
int match;
lpfc_block_error_handler(cmnd);
/*
-@@ -1415,7 +1851,7 @@ struct scsi_host_template lpfc_template
+@@ -1415,7 +1851,7 @@
.info = lpfc_info,
.queuecommand = lpfc_queuecommand,
.eh_abort_handler = lpfc_abort_handler,
.eh_bus_reset_handler = lpfc_bus_reset_handler,
.slave_alloc = lpfc_slave_alloc,
.slave_configure = lpfc_slave_configure,
-@@ -1435,7 +1871,7 @@ struct scsi_host_template lpfc_vport_tem
+@@ -1435,7 +1871,7 @@
.info = lpfc_info,
.queuecommand = lpfc_queuecommand,
.eh_abort_handler = lpfc_abort_handler,
.eh_bus_reset_handler = lpfc_bus_reset_handler,
.slave_alloc = lpfc_slave_alloc,
.slave_configure = lpfc_slave_configure,
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_scsi.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_scsi.h 2009-03-25 16:11:16.000000000 +0000
-@@ -107,6 +107,10 @@ struct fcp_cmnd {
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_scsi.h
+--- a/drivers/scsi/lpfc/lpfc_scsi.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_scsi.h Wed May 06 16:56:34 2009 +0100
+@@ -107,6 +107,10 @@
};
struct lpfc_scsi_buf {
struct list_head list;
struct scsi_cmnd *pCmd;
-@@ -139,6 +143,7 @@ struct lpfc_scsi_buf {
+@@ -139,6 +143,7 @@
*/
struct lpfc_iocbq cur_iocbq;
wait_queue_head_t *waitq;
};
#define LPFC_SCSI_DMA_EXT_SIZE 264
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_security.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_security.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_security.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_security.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_security.c Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,338 @@
+/*******************************************************************
+ * This file is part of the Emulex Linux Device Driver for *
+ }
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_security.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_security.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_security.h 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_security.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_security.h Wed May 06 16:56:34 2009 +0100
@@ -0,0 +1,24 @@
+/*******************************************************************
+ * This file is part of the Emulex Linux Device Driver for *
+#define SECURITY_ONLINE 0x1
+
+#define SECURITY_WAIT_TMO 30 /* seconds to wait for the auth service */
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_sli.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_sli.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_sli.c
+--- a/drivers/scsi/lpfc/lpfc_sli.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_sli.c Wed May 06 16:56:34 2009 +0100
@@ -32,6 +32,7 @@
#include "lpfc_hw.h"
#include "lpfc_disc.h"
#include "lpfc_scsi.h"
#include "lpfc.h"
-@@ -66,10 +67,16 @@ typedef enum _lpfc_iocb_type {
+@@ -66,10 +67,16 @@
LPFC_ABORT_IOCB
} lpfc_iocb_type;
static inline IOCB_t *
lpfc_cmd_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
{
-@@ -77,6 +84,16 @@ lpfc_cmd_iocb(struct lpfc_hba *phba, str
+@@ -77,6 +84,16 @@
pring->cmdidx * phba->iocb_cmd_size);
}
static inline IOCB_t *
lpfc_resp_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
{
-@@ -84,6 +101,15 @@ lpfc_resp_iocb(struct lpfc_hba *phba, st
+@@ -84,6 +101,15 @@
pring->rspidx * phba->iocb_rsp_size);
}
static struct lpfc_iocbq *
__lpfc_sli_get_iocbq(struct lpfc_hba *phba)
{
-@@ -94,6 +120,15 @@ __lpfc_sli_get_iocbq(struct lpfc_hba *ph
+@@ -94,6 +120,15 @@
return iocbq;
}
struct lpfc_iocbq *
lpfc_sli_get_iocbq(struct lpfc_hba *phba)
{
-@@ -106,6 +141,16 @@ lpfc_sli_get_iocbq(struct lpfc_hba *phba
+@@ -106,6 +141,16 @@
return iocbq;
}
static void
__lpfc_sli_release_iocbq(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
{
-@@ -118,6 +163,14 @@ __lpfc_sli_release_iocbq(struct lpfc_hba
+@@ -118,6 +163,14 @@
list_add_tail(&iocbq->list, &phba->lpfc_iocb_list);
}
void
lpfc_sli_release_iocbq(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
{
-@@ -131,10 +184,21 @@ lpfc_sli_release_iocbq(struct lpfc_hba *
+@@ -131,10 +184,21 @@
spin_unlock_irqrestore(&phba->hbalock, iflags);
}
static lpfc_iocb_type
lpfc_sli_iocb_cmd_type(uint8_t iocb_cmnd)
{
-@@ -230,6 +294,17 @@ lpfc_sli_iocb_cmd_type(uint8_t iocb_cmnd
+@@ -230,6 +294,17 @@
return type;
}
static int
lpfc_sli_ring_map(struct lpfc_hba *phba)
{
-@@ -262,6 +337,18 @@ lpfc_sli_ring_map(struct lpfc_hba *phba)
+@@ -262,6 +337,18 @@
return ret;
}
static int
lpfc_sli_ringtxcmpl_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
struct lpfc_iocbq *piocb)
-@@ -282,6 +369,16 @@ lpfc_sli_ringtxcmpl_put(struct lpfc_hba
+@@ -282,6 +369,16 @@
return 0;
}
static struct lpfc_iocbq *
lpfc_sli_ringtx_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
{
-@@ -293,14 +390,25 @@ lpfc_sli_ringtx_get(struct lpfc_hba *phb
+@@ -293,14 +390,25 @@
return cmd_iocb;
}
if ((pring->next_cmdidx == pring->cmdidx) &&
(++pring->next_cmdidx >= max_cmd_idx))
pring->next_cmdidx = 0;
-@@ -336,6 +444,18 @@ lpfc_sli_next_iocb_slot (struct lpfc_hba
+@@ -336,6 +444,18 @@
return lpfc_cmd_iocb(phba, pring);
}
uint16_t
lpfc_sli_next_iotag(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
{
-@@ -399,6 +519,20 @@ lpfc_sli_next_iotag(struct lpfc_hba *phb
+@@ -399,6 +519,20 @@
return 0;
}
static void
lpfc_sli_submit_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
IOCB_t *iocb, struct lpfc_iocbq *nextiocb)
-@@ -441,6 +575,18 @@ lpfc_sli_submit_iocb(struct lpfc_hba *ph
+@@ -441,6 +575,18 @@
writel(pring->cmdidx, &phba->host_gp[pring->ringno].cmdPutInx);
}
static void
lpfc_sli_update_full_ring(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
{
-@@ -460,6 +606,15 @@ lpfc_sli_update_full_ring(struct lpfc_hb
+@@ -460,6 +606,15 @@
pring->stats.iocb_cmd_full++;
}
static void
lpfc_sli_update_ring(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
{
-@@ -468,11 +623,22 @@ lpfc_sli_update_ring(struct lpfc_hba *ph
+@@ -468,11 +623,22 @@
/*
* Tell the HBA that there is work to do in this ring.
*/
- wmb();
- writel(CA_R0ATT << (ringno * 4), phba->CAregaddr);
- readl(phba->CAregaddr); /* flush */
+-}
+-
+ if (!(phba->sli3_options & LPFC_SLI3_CRP_ENABLED)) {
+ wmb();
+ writel(CA_R0ATT << (ringno * 4), phba->CAregaddr);
+ readl(phba->CAregaddr); /* flush */
+ }
- }
-
++}
++
+/**
+ * lpfc_sli_resume_iocb: Process iocbs in the txq.
+ * @phba: Pointer to HBA context object.
static void
lpfc_sli_resume_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
{
-@@ -504,6 +670,16 @@ lpfc_sli_resume_iocb(struct lpfc_hba *ph
+@@ -504,6 +670,16 @@
return;
}
static struct lpfc_hbq_entry *
lpfc_sli_next_hbq_slot(struct lpfc_hba *phba, uint32_t hbqno)
{
-@@ -539,6 +715,15 @@ lpfc_sli_next_hbq_slot(struct lpfc_hba *
+@@ -539,6 +715,15 @@
hbqp->hbqPutIdx;
}
void
lpfc_sli_hbqbuf_free_all(struct lpfc_hba *phba)
{
-@@ -584,6 +769,18 @@ lpfc_sli_hbqbuf_free_all(struct lpfc_hba
+@@ -584,6 +769,18 @@
spin_unlock_irqrestore(&phba->hbalock, flags);
}
static struct lpfc_hbq_entry *
lpfc_sli_hbq_to_firmware(struct lpfc_hba *phba, uint32_t hbqno,
struct hbq_dmabuf *hbq_buf)
-@@ -599,7 +796,7 @@ lpfc_sli_hbq_to_firmware(struct lpfc_hba
+@@ -599,7 +796,7 @@
hbqe->bde.addrHigh = le32_to_cpu(putPaddrHigh(physaddr));
hbqe->bde.addrLow = le32_to_cpu(putPaddrLow(physaddr));
hbqe->bde.tus.f.bdeSize = hbq_buf->size;
hbqe->bde.tus.w = le32_to_cpu(hbqe->bde.tus.w);
hbqe->buffer_tag = le32_to_cpu(hbq_buf->tag);
/* Sync SLIM */
-@@ -612,6 +809,7 @@ lpfc_sli_hbq_to_firmware(struct lpfc_hba
+@@ -612,6 +809,7 @@
return hbqe;
}
static struct lpfc_hbq_init lpfc_els_hbq = {
.rn = 1,
.entry_count = 200,
-@@ -619,10 +817,11 @@ static struct lpfc_hbq_init lpfc_els_hbq
+@@ -619,10 +817,11 @@
.profile = 0,
.ring_mask = (1 << LPFC_ELS_RING),
.buffer_count = 0,
static struct lpfc_hbq_init lpfc_extra_hbq = {
.rn = 1,
.entry_count = 200,
-@@ -634,51 +833,81 @@ static struct lpfc_hbq_init lpfc_extra_h
+@@ -634,51 +833,81 @@
.add_count = 5,
};
- if (end > lpfc_hbq_defs[hbqno]->entry_count)
- end = lpfc_hbq_defs[hbqno]->entry_count;
-
+- /* Check whether HBQ is still in use */
+- spin_lock_irqsave(&phba->hbalock, flags);
+- if (!phba->hbq_in_use)
+- goto out;
+-
+- /* Populate HBQ entries */
+- for (i = start; i < end; i++) {
+ if ((phba->hbqs[hbqno].buffer_count + count) >
+ lpfc_hbq_defs[hbqno]->entry_count)
+ count = lpfc_hbq_defs[hbqno]->entry_count -
+ return 0;
+ /* Allocate HBQ entries */
+ for (i = 0; i < count; i++) {
-+ hbq_buffer = (phba->hbqs[hbqno].hbq_alloc_buffer)(phba);
-+ if (!hbq_buffer)
-+ break;
-+ list_add_tail(&hbq_buffer->dbuf.list, &hbq_buf_list);
-+ }
- /* Check whether HBQ is still in use */
- spin_lock_irqsave(&phba->hbalock, flags);
- if (!phba->hbq_in_use)
-- goto out;
--
-- /* Populate HBQ entries */
-- for (i = start; i < end; i++) {
-- hbq_buffer = (phba->hbqs[hbqno].hbq_alloc_buffer)(phba);
-- if (!hbq_buffer)
+ hbq_buffer = (phba->hbqs[hbqno].hbq_alloc_buffer)(phba);
+ if (!hbq_buffer)
- goto err;
- hbq_buffer->tag = (i | (hbqno << 16));
- if (lpfc_sli_hbq_to_firmware(phba, hbqno, hbq_buffer))
++ break;
++ list_add_tail(&hbq_buffer->dbuf.list, &hbq_buf_list);
++ }
++ /* Check whether HBQ is still in use */
++ spin_lock_irqsave(&phba->hbalock, flags);
++ if (!phba->hbq_in_use)
+ goto err;
+ while (!list_empty(&hbq_buf_list)) {
+ list_remove_head(&hbq_buf_list, hbq_buffer, struct hbq_dmabuf,
}
-
- out:
- spin_unlock_irqrestore(&phba->hbalock, flags);
+- spin_unlock_irqrestore(&phba->hbalock, flags);
- return 0;
- err:
+- spin_unlock_irqrestore(&phba->hbalock, flags);
+- return 1;
+-}
+-
++ spin_unlock_irqrestore(&phba->hbalock, flags);
+ return posted;
+err:
- spin_unlock_irqrestore(&phba->hbalock, flags);
-- return 1;
++ spin_unlock_irqrestore(&phba->hbalock, flags);
+ while (!list_empty(&hbq_buf_list)) {
+ list_remove_head(&hbq_buf_list, hbq_buffer, struct hbq_dmabuf,
+ dbuf.list);
+ (phba->hbqs[hbqno].hbq_free_buffer)(phba, hbq_buffer);
+ }
+ return 0;
- }
-
++}
++
+/**
+ * lpfc_sli_hbqbuf_add_hbqs: Post more HBQ buffers to firmware.
+ * @phba: Pointer to HBA context object.
int
lpfc_sli_hbqbuf_add_hbqs(struct lpfc_hba *phba, uint32_t qno)
{
-@@ -686,6 +915,15 @@ lpfc_sli_hbqbuf_add_hbqs(struct lpfc_hba
+@@ -686,6 +915,15 @@
lpfc_hbq_defs[qno]->add_count));
}
static int
lpfc_sli_hbqbuf_init_hbqs(struct lpfc_hba *phba, uint32_t qno)
{
-@@ -693,6 +931,16 @@ lpfc_sli_hbqbuf_init_hbqs(struct lpfc_hb
+@@ -693,6 +931,16 @@
lpfc_hbq_defs[qno]->init_count));
}
static struct hbq_dmabuf *
lpfc_sli_hbqbuf_find(struct lpfc_hba *phba, uint32_t tag)
{
-@@ -716,6 +964,15 @@ lpfc_sli_hbqbuf_find(struct lpfc_hba *ph
+@@ -716,6 +964,15 @@
return NULL;
}
void
lpfc_sli_free_hbq(struct lpfc_hba *phba, struct hbq_dmabuf *hbq_buffer)
{
-@@ -729,6 +986,15 @@ lpfc_sli_free_hbq(struct lpfc_hba *phba,
+@@ -729,6 +986,15 @@
}
}
static int
lpfc_sli_chk_mbx_command(uint8_t mbxCommand)
{
-@@ -785,6 +1051,11 @@ lpfc_sli_chk_mbx_command(uint8_t mbxComm
+@@ -785,6 +1051,11 @@
case MBX_REG_VPI:
case MBX_UNREG_VPI:
case MBX_HEARTBEAT:
ret = mbxCommand;
break;
default:
-@@ -793,6 +1064,19 @@ lpfc_sli_chk_mbx_command(uint8_t mbxComm
+@@ -793,6 +1064,19 @@
}
return ret;
}
static void
lpfc_sli_wake_mbox_wait(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq)
{
-@@ -812,6 +1096,17 @@ lpfc_sli_wake_mbox_wait(struct lpfc_hba
+@@ -812,6 +1096,17 @@
return;
}
void
lpfc_sli_def_mbox_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
{
-@@ -846,6 +1141,19 @@ lpfc_sli_def_mbox_cmpl(struct lpfc_hba *
+@@ -846,6 +1141,19 @@
return;
}
int
lpfc_sli_handle_mb_event(struct lpfc_hba *phba)
{
-@@ -953,61 +1261,48 @@ lpfc_sli_handle_mb_event(struct lpfc_hba
+@@ -953,61 +1261,48 @@
return 0;
}
-+/**
-+ * lpfc_sli_get_buff: Get the buffer associated with the buffer tag.
-+ * @phba: Pointer to HBA context object.
-+ * @pring: Pointer to driver SLI ring object.
-+ * @tag: buffer tag.
-+ *
-+ * This function is called with no lock held. When QUE_BUFTAG_BIT bit
-+ * is set in the tag the buffer is posted for a particular exchange,
-+ * the function will return the buffer without replacing the buffer.
-+ * If the buffer is for unsolicited ELS or CT traffic, this function
-+ * returns the buffer and also posts another buffer to the firmware.
-+ **/
- static struct lpfc_dmabuf *
+-static struct lpfc_dmabuf *
-lpfc_sli_replace_hbqbuff(struct lpfc_hba *phba, uint32_t tag)
-+lpfc_sli_get_buff(struct lpfc_hba *phba,
-+ struct lpfc_sli_ring *pring,
-+ uint32_t tag)
- {
+-{
- struct hbq_dmabuf *hbq_entry, *new_hbq_entry;
- uint32_t hbqno;
- void *virt; /* virtual address ptr */
- spin_unlock_irqrestore(&phba->hbalock, flags);
- return NULL;
- }
-+ struct hbq_dmabuf *hbq_entry;
-
-+ if (tag & QUE_BUFTAG_BIT)
-+ return lpfc_sli_ring_taggedbuf_get(phba, pring, tag);
- hbq_entry = lpfc_sli_hbqbuf_find(phba, tag);
+-
+- hbq_entry = lpfc_sli_hbqbuf_find(phba, tag);
- if (hbq_entry == NULL) {
- spin_unlock_irqrestore(&phba->hbalock, flags);
-+ if (!hbq_entry)
- return NULL;
+- return NULL;
- }
- list_del(&hbq_entry->dbuf.list);
-
- spin_unlock_irqrestore(&phba->hbalock, flags);
-
- return &new_hbq_entry->dbuf;
-+ return &hbq_entry->dbuf;
- }
-
--static struct lpfc_dmabuf *
--lpfc_sli_get_buff(struct lpfc_hba *phba,
+-}
+-
++/**
++ * lpfc_sli_get_buff: Get the buffer associated with the buffer tag.
++ * @phba: Pointer to HBA context object.
++ * @pring: Pointer to driver SLI ring object.
++ * @tag: buffer tag.
++ *
++ * This function is called with no lock held. When QUE_BUFTAG_BIT bit
++ * is set in the tag the buffer is posted for a particular exchange,
++ * the function will return the buffer without replacing the buffer.
++ * If the buffer is for unsolicited ELS or CT traffic, this function
++ * returns the buffer and also posts another buffer to the firmware.
++ **/
+ static struct lpfc_dmabuf *
+ lpfc_sli_get_buff(struct lpfc_hba *phba,
- struct lpfc_sli_ring *pring,
- uint32_t tag)
-{
-- if (tag & QUE_BUFTAG_BIT)
-- return lpfc_sli_ring_taggedbuf_get(phba, pring, tag);
++ struct lpfc_sli_ring *pring,
++ uint32_t tag)
++{
++ struct hbq_dmabuf *hbq_entry;
++
+ if (tag & QUE_BUFTAG_BIT)
+ return lpfc_sli_ring_taggedbuf_get(phba, pring, tag);
- else
- return lpfc_sli_replace_hbqbuff(phba, tag);
-}
-
+-
++ hbq_entry = lpfc_sli_hbqbuf_find(phba, tag);
++ if (!hbq_entry)
++ return NULL;
++ return &hbq_entry->dbuf;
++}
++
++
+/**
+ * lpfc_sli_process_unsol_iocb: Unsolicited iocb handler.
+ * @phba: Pointer to HBA context object.
static int
lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
struct lpfc_iocbq *saveq)
-@@ -1022,8 +1317,6 @@ lpfc_sli_process_unsol_iocb(struct lpfc_
+@@ -1022,8 +1317,6 @@
match = 0;
irsp = &(saveq->iocb);
if (irsp->ulpCommand == CMD_ASYNC_STATUS) {
if (pring->lpfc_sli_rcv_async_status)
pring->lpfc_sli_rcv_async_status(phba, pring, saveq);
-@@ -1192,6 +1485,18 @@ lpfc_sli_process_unsol_iocb(struct lpfc_
+@@ -1192,6 +1485,18 @@
return 1;
}
static struct lpfc_iocbq *
lpfc_sli_iocbq_lookup(struct lpfc_hba *phba,
struct lpfc_sli_ring *pring,
-@@ -1217,6 +1522,23 @@ lpfc_sli_iocbq_lookup(struct lpfc_hba *p
+@@ -1217,6 +1522,23 @@
return NULL;
}
static int
lpfc_sli_process_sol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
struct lpfc_iocbq *saveq)
-@@ -1233,6 +1555,17 @@ lpfc_sli_process_sol_iocb(struct lpfc_hb
+@@ -1232,6 +1554,17 @@
+
if (cmdiocbp) {
if (cmdiocbp->iocb_cmpl) {
- /*
++ /*
+ * If an ELS command failed send an event to mgmt
+ * application.
+ */
+ lpfc_send_els_failure_event(phba,
+ cmdiocbp, saveq);
+
-+ /*
+ /*
* Post all ELS completions to the worker thread.
* All other are passed to the completion callback.
- */
-@@ -1282,12 +1615,20 @@ lpfc_sli_process_sol_iocb(struct lpfc_hb
+@@ -1282,12 +1615,20 @@
return rc;
}
/*
* Ring <ringno> handler: portRspPut <portRspPut> is bigger then
* rsp ring <portRspMax>
-@@ -1312,6 +1653,51 @@ lpfc_sli_rsp_pointers_error(struct lpfc_
+@@ -1312,6 +1653,51 @@
return;
}
void lpfc_sli_poll_fcp_ring(struct lpfc_hba *phba)
{
struct lpfc_sli *psli = &phba->sli;
-@@ -1320,7 +1706,7 @@ void lpfc_sli_poll_fcp_ring(struct lpfc_
+@@ -1320,7 +1706,7 @@
IOCB_t *entry = NULL;
struct lpfc_iocbq *cmdiocbq = NULL;
struct lpfc_iocbq rspiocbq;
uint32_t status;
uint32_t portRspPut, portRspMax;
int type;
-@@ -1330,11 +1716,6 @@ void lpfc_sli_poll_fcp_ring(struct lpfc_
+@@ -1329,11 +1715,6 @@
+ unsigned long iflags;
pring->stats.iocb_event++;
-
+-
- pgp = (phba->sli_rev == 3) ?
- &phba->slim2p->mbx.us.s3_pgp.port[pring->ringno] :
- &phba->slim2p->mbx.us.s2.port[pring->ringno];
-
--
+
/*
* The next available response entry should never exceed the maximum
- * entries. If it does, treat it as an adapter hardware error.
-@@ -1372,8 +1753,8 @@ void lpfc_sli_poll_fcp_ring(struct lpfc_
+@@ -1372,8 +1753,8 @@
irsp->un.ulpWord[3],
irsp->un.ulpWord[4],
irsp->un.ulpWord[5],
}
switch (type) {
-@@ -1465,17 +1846,28 @@ void lpfc_sli_poll_fcp_ring(struct lpfc_
+@@ -1465,17 +1846,28 @@
return;
}
IOCB_t *irsp = NULL;
IOCB_t *entry = NULL;
struct lpfc_iocbq *cmdiocbq = NULL;
-@@ -1533,7 +1925,7 @@ lpfc_sli_handle_fast_ring_event(struct l
+@@ -1533,7 +1925,7 @@
if ((irsp->ulpStatus == IOSTAT_LOCAL_REJECT) &&
(irsp->un.ulpWord[4] == IOERR_NO_RESOURCES)) {
spin_unlock_irqrestore(&phba->hbalock, iflag);
spin_lock_irqsave(&phba->hbalock, iflag);
}
-@@ -1548,8 +1940,8 @@ lpfc_sli_handle_fast_ring_event(struct l
+@@ -1548,8 +1940,8 @@
irsp->un.ulpWord[3],
irsp->un.ulpWord[4],
irsp->un.ulpWord[5],
}
switch (type) {
-@@ -1646,13 +2038,28 @@ lpfc_sli_handle_fast_ring_event(struct l
+@@ -1646,13 +2038,28 @@
return rc;
}
IOCB_t *entry;
IOCB_t *irsp = NULL;
struct lpfc_iocbq *rspiocbp = NULL;
-@@ -1666,6 +2073,7 @@ lpfc_sli_handle_slow_ring_event(struct l
+@@ -1666,6 +2073,7 @@
int rc = 1;
unsigned long iflag;
spin_lock_irqsave(&phba->hbalock, iflag);
pring->stats.iocb_event++;
-@@ -1760,7 +2168,7 @@ lpfc_sli_handle_slow_ring_event(struct l
+@@ -1760,7 +2168,7 @@
if ((irsp->ulpStatus == IOSTAT_LOCAL_REJECT) &&
(irsp->un.ulpWord[4] == IOERR_NO_RESOURCES)) {
spin_unlock_irqrestore(&phba->hbalock, iflag);
spin_lock_irqsave(&phba->hbalock, iflag);
}
-@@ -1904,6 +2312,16 @@ lpfc_sli_handle_slow_ring_event(struct l
+@@ -1904,6 +2312,16 @@
return rc;
}
void
lpfc_sli_abort_iocb_ring(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
{
-@@ -1943,6 +2361,83 @@ lpfc_sli_abort_iocb_ring(struct lpfc_hba
+@@ -1943,6 +2361,83 @@
}
}
int
lpfc_sli_brdready(struct lpfc_hba *phba, uint32_t mask)
{
-@@ -1990,6 +2485,13 @@ lpfc_sli_brdready(struct lpfc_hba *phba,
+@@ -1990,6 +2485,13 @@
#define BARRIER_TEST_PATTERN (0xdeadbeef)
void lpfc_reset_barrier(struct lpfc_hba *phba)
{
uint32_t __iomem *resp_buf;
-@@ -2063,6 +2565,17 @@ restore_hc:
+@@ -2063,6 +2565,17 @@
readl(phba->HCregaddr); /* flush */
}
int
lpfc_sli_brdkill(struct lpfc_hba *phba)
{
-@@ -2139,6 +2652,17 @@ lpfc_sli_brdkill(struct lpfc_hba *phba)
+@@ -2139,6 +2652,17 @@
return ha_copy & HA_ERATT ? 0 : 1;
}
int
lpfc_sli_brdreset(struct lpfc_hba *phba)
{
-@@ -2191,12 +2715,104 @@ lpfc_sli_brdreset(struct lpfc_hba *phba)
+@@ -2191,12 +2715,104 @@
return 0;
}
volatile uint32_t word0;
void __iomem *to_slim;
-@@ -2221,13 +2837,10 @@ lpfc_sli_brdrestart(struct lpfc_hba *phb
+@@ -2221,13 +2837,10 @@
readl(to_slim); /* flush */
/* Only skip post after fc_ffinit is completed */
to_slim = phba->MBslimaddr + sizeof (uint32_t);
writel(*(uint32_t *) mb, to_slim);
readl(to_slim); /* flush */
-@@ -2241,16 +2854,24 @@ lpfc_sli_brdrestart(struct lpfc_hba *phb
+@@ -2241,16 +2854,24 @@
memset(&psli->lnk_stat_offsets, 0, sizeof(psli->lnk_stat_offsets));
psli->stats_start = get_seconds();
static int
lpfc_sli_chipset_init(struct lpfc_hba *phba)
{
-@@ -2336,12 +2957,25 @@ lpfc_sli_chipset_init(struct lpfc_hba *p
+@@ -2336,12 +2957,25 @@
return 0;
}
static int
lpfc_sli_hbq_entry_count(void)
{
-@@ -2354,12 +2988,27 @@ lpfc_sli_hbq_entry_count(void)
+@@ -2354,12 +2988,27 @@
return count;
}
static int
lpfc_sli_hbq_setup(struct lpfc_hba *phba)
{
-@@ -2415,15 +3064,26 @@ lpfc_sli_hbq_setup(struct lpfc_hba *phba
+@@ -2415,15 +3064,26 @@
mempool_free(pmb, phba->mbox_mem_pool);
/* Initially populate or replenish the HBQs */
- if (lpfc_sli_hbqbuf_init_hbqs(phba, hbqno))
- return -ENOMEM;
- }
-+ for (hbqno = 0; hbqno < hbq_count; ++hbqno)
-+ lpfc_sli_hbqbuf_init_hbqs(phba, hbqno);
- return 0;
- }
-
+- return 0;
+-}
+-
-static int
-lpfc_do_config_port(struct lpfc_hba *phba, int sli_mode)
++ for (hbqno = 0; hbqno < hbq_count; ++hbqno)
++ lpfc_sli_hbqbuf_init_hbqs(phba, hbqno);
++ return 0;
++}
++
+/**
+ * lpfc_sli_config_port: Issue config port mailbox command.
+ * @phba: Pointer to HBA context object.
{
LPFC_MBOXQ_t *pmb;
uint32_t resetcount = 0, rc = 0, done = 0;
-@@ -2441,7 +3101,6 @@ lpfc_do_config_port(struct lpfc_hba *phb
+@@ -2441,7 +3101,6 @@
spin_unlock_irq(&phba->hbalock);
phba->pport->port_state = LPFC_VPORT_UNKNOWN;
lpfc_sli_brdrestart(phba);
rc = lpfc_sli_chipset_init(phba);
if (rc)
break;
-@@ -2460,13 +3119,15 @@ lpfc_do_config_port(struct lpfc_hba *phb
+@@ -2460,13 +3119,15 @@
if (rc == -ERESTART) {
phba->link_state = LPFC_LINK_UNKNOWN;
continue;
- } else if (rc) {
-+ } else if (rc)
- break;
+- break;
- }
-
++ } else if (rc)
++ break;
phba->link_state = LPFC_INIT_MBX_CMDS;
lpfc_config_port(phba, pmb);
rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL);
if (rc != MBX_SUCCESS) {
lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
"0442 Adapter failed to init, mbxCmd x%x "
-@@ -2476,30 +3137,67 @@ lpfc_do_config_port(struct lpfc_hba *phb
+@@ -2476,30 +3137,67 @@
phba->sli.sli_flag &= ~LPFC_SLI2_ACTIVE;
spin_unlock_irq(&phba->hbalock);
rc = -ENXIO;
- ? pmb->mb.un.varCfgPort.max_vpi
- : 0;
- }
- }
+- }
-
++ }
if (!done) {
rc = -EINVAL;
goto do_prep_failed;
- if ((pmb->mb.un.varCfgPort.sli_mode == 3) &&
- (!pmb->mb.un.varCfgPort.cMA)) {
- rc = -ENXIO;
+- }
+-
+ if (pmb->mb.un.varCfgPort.sli_mode == 3) {
+ if (!pmb->mb.un.varCfgPort.cMA) {
+ rc = -ENXIO;
+ phba->inb_ha_copy = NULL;
+ phba->inb_counter = NULL;
+ phba->max_vpi = 0;
- }
--
++ }
do_prep_failed:
mempool_free(pmb, phba->mbox_mem_pool);
return rc;
int
lpfc_sli_hba_setup(struct lpfc_hba *phba)
{
-@@ -2528,22 +3226,20 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba
+@@ -2528,22 +3226,20 @@
break;
}
} else {
phba->iocb_cmd_size = SLI2_IOCB_CMD_SIZE;
phba->iocb_rsp_size = SLI2_IOCB_RSP_SIZE;
-@@ -2553,13 +3249,15 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba
+@@ -2553,13 +3249,15 @@
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
"0444 Firmware in SLI %x mode. Max_vpi %d\n",
phba->sli_rev, phba->max_vpi);
if (phba->sli3_options & LPFC_SLI3_HBQ_ENABLED) {
rc = lpfc_sli_hbq_setup(phba);
if (rc)
-@@ -2581,19 +3279,19 @@ lpfc_sli_hba_setup_error:
+@@ -2581,19 +3279,19 @@
return rc;
}
- * void
- *
- * \b Description:
+- *
+- * This routine handles mailbox timeout events at timer interrupt context.
+- */
+
+/**
+ * lpfc_mbox_timeout: Timeout call back function for mbox timer.
+ * @ptr: context object - pointer to hba structure.
- *
-- * This routine handles mailbox timeout events at timer interrupt context.
-- */
++ *
+ * This is the callback function for mailbox timer. The mailbox
+ * timer is armed when a new mailbox command is issued and the timer
+ * is deleted when the mailbox complete. The function is called by
void
lpfc_mbox_timeout(unsigned long ptr)
{
-@@ -2612,6 +3310,15 @@ lpfc_mbox_timeout(unsigned long ptr)
+@@ -2612,6 +3310,15 @@
return;
}
void
lpfc_mbox_timeout_handler(struct lpfc_hba *phba)
{
-@@ -2620,7 +3327,18 @@ lpfc_mbox_timeout_handler(struct lpfc_hb
+@@ -2620,7 +3327,18 @@
struct lpfc_sli *psli = &phba->sli;
struct lpfc_sli_ring *pring;
return;
}
-@@ -2631,6 +3349,7 @@ lpfc_mbox_timeout_handler(struct lpfc_hb
+@@ -2631,6 +3349,7 @@
phba->pport->port_state,
phba->sli.sli_flag,
phba->sli.mbox_active);
/* Setting state unknown so lpfc_sli_abort_iocb_ring
* would get IOCB_ERROR from lpfc_sli_issue_iocb, allowing
-@@ -2666,6 +3385,32 @@ lpfc_mbox_timeout_handler(struct lpfc_hb
+@@ -2666,6 +3385,32 @@
return;
}
int
lpfc_sli_issue_mbox(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, uint32_t flag)
{
-@@ -2676,7 +3421,7 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phb
+@@ -2676,7 +3421,7 @@
int i;
unsigned long timeout;
unsigned long drvr_flag = 0;
void __iomem *to_slim;
int processing_queue = 0;
-@@ -2835,13 +3580,38 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phb
+@@ -2835,13 +3580,38 @@
mb->mbxOwner = OWN_CHIP;
if (psli->sli_flag & LPFC_SLI2_ACTIVE) {
- /* First copy command data to host SLIM area */
- lpfc_sli_pcimem_bcopy(mb, &phba->slim2p->mbx, MAILBOX_CMD_SIZE);
+- } else {
+ /* Populate mbox extension offset word. */
+ if (pmbox->in_ext_byte_len || pmbox->out_ext_byte_len) {
+ *(((uint32_t *)mb) + pmbox->mbox_offset_word)
+ /* Copy command data to host SLIM area */
+ lpfc_sli_pcimem_bcopy(mb, phba->mbox, MAILBOX_CMD_SIZE);
+
- } else {
++ } else {
+ /* Populate mbox extension offset word. */
+ if (pmbox->in_ext_byte_len || pmbox->out_ext_byte_len)
+ *(((uint32_t *)mb) + pmbox->mbox_offset_word)
}
/* First copy mbox command data to HBA SLIM, skip past first
-@@ -2851,7 +3621,7 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phb
+@@ -2851,7 +3621,7 @@
MAILBOX_CMD_SIZE - sizeof (uint32_t));
/* Next copy over first word, with mbxOwner set */
to_slim = phba->MBslimaddr;
writel(ldata, to_slim);
readl(to_slim); /* flush */
-@@ -2883,7 +3653,7 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phb
+@@ -2883,7 +3653,7 @@
if (psli->sli_flag & LPFC_SLI2_ACTIVE) {
/* First read mbox status word */
word0 = le32_to_cpu(word0);
} else {
/* First read mbox status word */
-@@ -2922,12 +3692,11 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phb
+@@ -2922,12 +3692,11 @@
if (psli->sli_flag & LPFC_SLI2_ACTIVE) {
/* First copy command data */
/* Check real SLIM for any errors */
slimword0 = readl(phba->MBslimaddr);
slimmb = (MAILBOX_t *) & slimword0;
-@@ -2948,17 +3717,23 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phb
+@@ -2948,17 +3717,23 @@
if (psli->sli_flag & LPFC_SLI2_ACTIVE) {
/* copy results back to user */
}
}
-@@ -2980,9 +3755,16 @@ out_not_finished:
+@@ -2980,9 +3755,16 @@
return MBX_NOT_FINISHED;
}
static void
__lpfc_sli_ringtx_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
struct lpfc_iocbq *piocb)
-@@ -2992,6 +3774,23 @@ __lpfc_sli_ringtx_put(struct lpfc_hba *p
+@@ -2992,6 +3774,23 @@
pring->txq_cnt++;
}
static struct lpfc_iocbq *
lpfc_sli_next_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
struct lpfc_iocbq **piocb)
-@@ -3007,9 +3806,30 @@ lpfc_sli_next_iocb(struct lpfc_hba *phba
+@@ -3007,9 +3806,30 @@
return nextiocb;
}
static int
__lpfc_sli_issue_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
struct lpfc_iocbq *piocb, uint32_t flag)
-@@ -3052,6 +3872,16 @@ __lpfc_sli_issue_iocb(struct lpfc_hba *p
+@@ -3052,6 +3872,16 @@
* can be issued if the link is not up.
*/
switch (piocb->iocb.ulpCommand) {
case CMD_QUE_RING_BUF_CN:
case CMD_QUE_RING_BUF64_CN:
/*
-@@ -3106,6 +3936,19 @@ __lpfc_sli_issue_iocb(struct lpfc_hba *p
+@@ -3106,6 +3936,19 @@
}
int
lpfc_sli_issue_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
struct lpfc_iocbq *piocb, uint32_t flag)
-@@ -3120,6 +3963,17 @@ lpfc_sli_issue_iocb(struct lpfc_hba *phb
+@@ -3120,6 +3963,17 @@
return rc;
}
static int
lpfc_extra_ring_setup( struct lpfc_hba *phba)
{
-@@ -3155,6 +4009,19 @@ lpfc_extra_ring_setup( struct lpfc_hba *
+@@ -3155,6 +4009,19 @@
return 0;
}
static void
lpfc_sli_async_event_handler(struct lpfc_hba * phba,
struct lpfc_sli_ring * pring, struct lpfc_iocbq * iocbq)
-@@ -3164,6 +4031,7 @@ lpfc_sli_async_event_handler(struct lpfc
+@@ -3164,6 +4031,7 @@
uint16_t temp;
struct temp_event temp_event_data;
struct Scsi_Host *shost;
icmd = &iocbq->iocb;
evt_code = icmd->un.asyncstat.evt_code;
-@@ -3171,13 +4039,23 @@ lpfc_sli_async_event_handler(struct lpfc
+@@ -3171,13 +4039,23 @@
if ((evt_code != ASYNC_TEMP_WARN) &&
(evt_code != ASYNC_TEMP_SAFE)) {
return;
}
temp_event_data.data = (uint32_t)temp;
-@@ -3205,11 +4083,22 @@ lpfc_sli_async_event_handler(struct lpfc
+@@ -3205,11 +4083,22 @@
shost = lpfc_shost_from_vport(phba->pport);
fc_host_post_vendor_event(shost, fc_get_event_number(),
sizeof(temp_event_data), (char *) &temp_event_data,
- SCSI_NL_VID_TYPE_PCI | PCI_VENDOR_ID_EMULEX);
+-
+-}
+-
+-
+ LPFC_NL_VENDOR_ID);
-
- }
-
-
++
++}
++
++
+/**
+ * lpfc_sli_setup: SLI ring setup function.
+ * @phba: Pointer to HBA context object.
int
lpfc_sli_setup(struct lpfc_hba *phba)
{
-@@ -3321,6 +4210,17 @@ lpfc_sli_setup(struct lpfc_hba *phba)
+@@ -3321,6 +4210,17 @@
return 0;
}
int
lpfc_sli_queue_setup(struct lpfc_hba *phba)
{
-@@ -3349,6 +4249,23 @@ lpfc_sli_queue_setup(struct lpfc_hba *ph
+@@ -3349,6 +4249,23 @@
return 1;
}
int
lpfc_sli_host_down(struct lpfc_vport *vport)
{
-@@ -3411,6 +4328,21 @@ lpfc_sli_host_down(struct lpfc_vport *vp
+@@ -3411,6 +4328,21 @@
return 1;
}
int
lpfc_sli_hba_down(struct lpfc_hba *phba)
{
-@@ -3501,6 +4433,18 @@ lpfc_sli_hba_down(struct lpfc_hba *phba)
+@@ -3501,6 +4433,18 @@
return 1;
}
void
lpfc_sli_pcimem_bcopy(void *srcp, void *destp, uint32_t cnt)
{
-@@ -3518,6 +4462,17 @@ lpfc_sli_pcimem_bcopy(void *srcp, void *
+@@ -3518,6 +4462,17 @@
}
}
int
lpfc_sli_ringpostbuf_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
struct lpfc_dmabuf *mp)
-@@ -3531,6 +4486,18 @@ lpfc_sli_ringpostbuf_put(struct lpfc_hba
+@@ -3531,6 +4486,18 @@
return 0;
}
uint32_t
lpfc_sli_get_buffer_tag(struct lpfc_hba *phba)
{
-@@ -3545,6 +4512,22 @@ lpfc_sli_get_buffer_tag(struct lpfc_hba
+@@ -3545,6 +4512,22 @@
return phba->buffer_tag_count;
}
struct lpfc_dmabuf *
lpfc_sli_ring_taggedbuf_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
uint32_t tag)
-@@ -3565,7 +4548,7 @@ lpfc_sli_ring_taggedbuf_get(struct lpfc_
+@@ -3565,7 +4548,7 @@
spin_unlock_irq(&phba->hbalock);
lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
"ring %d Data x%lx x%p x%p x%x\n",
pring->ringno, (unsigned long) tag,
slp->next, slp->prev, pring->postbufq_cnt);
-@@ -3573,6 +4556,23 @@ lpfc_sli_ring_taggedbuf_get(struct lpfc_
+@@ -3573,6 +4556,23 @@
return NULL;
}
struct lpfc_dmabuf *
lpfc_sli_ringpostbuf_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
dma_addr_t phys)
-@@ -3600,6 +4600,17 @@ lpfc_sli_ringpostbuf_get(struct lpfc_hba
+@@ -3600,6 +4600,17 @@
return NULL;
}
static void
lpfc_sli_abort_els_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
-@@ -3665,6 +4676,17 @@ lpfc_sli_abort_els_cmpl(struct lpfc_hba
+@@ -3665,6 +4676,17 @@
return;
}
static void
lpfc_ignore_els_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
-@@ -3673,7 +4695,7 @@ lpfc_ignore_els_cmpl(struct lpfc_hba *ph
+@@ -3673,7 +4695,7 @@
/* ELS cmd tag <ulpIoTag> completes */
lpfc_printf_log(phba, KERN_INFO, LOG_ELS,
"x%x x%x x%x\n",
irsp->ulpIoTag, irsp->ulpStatus,
irsp->un.ulpWord[4], irsp->ulpTimeout);
-@@ -3684,6 +4706,17 @@ lpfc_ignore_els_cmpl(struct lpfc_hba *ph
+@@ -3684,6 +4706,17 @@
return;
}
int
lpfc_sli_issue_abort_iotag(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
struct lpfc_iocbq *cmdiocb)
-@@ -3748,6 +4781,8 @@ lpfc_sli_issue_abort_iotag(struct lpfc_h
+@@ -3748,6 +4781,8 @@
iabt->un.acxri.abortIoTag, abtsiocbp->iotag);
retval = __lpfc_sli_issue_iocb(phba, pring, abtsiocbp, 0);
abort_iotag_exit:
/*
* Caller to this routine should check for IOCB_ERROR
-@@ -3757,6 +4792,29 @@ abort_iotag_exit:
+@@ -3757,6 +4792,29 @@
return retval;
}
static int
lpfc_sli_validate_fcp_iocb(struct lpfc_iocbq *iocbq, struct lpfc_vport *vport,
uint16_t tgt_id, uint64_t lun_id,
-@@ -3800,6 +4858,25 @@ lpfc_sli_validate_fcp_iocb(struct lpfc_i
+@@ -3800,6 +4858,25 @@
return rc;
}
int
lpfc_sli_sum_iocb(struct lpfc_vport *vport, uint16_t tgt_id, uint64_t lun_id,
lpfc_ctx_cmd ctx_cmd)
-@@ -3819,6 +4896,17 @@ lpfc_sli_sum_iocb(struct lpfc_vport *vpo
+@@ -3819,6 +4896,17 @@
return sum;
}
void
lpfc_sli_abort_fcp_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb)
-@@ -3827,6 +4915,28 @@ lpfc_sli_abort_fcp_cmpl(struct lpfc_hba
+@@ -3827,6 +4915,28 @@
return;
}
int
lpfc_sli_abort_iocb(struct lpfc_vport *vport, struct lpfc_sli_ring *pring,
uint16_t tgt_id, uint64_t lun_id, lpfc_ctx_cmd abort_cmd)
-@@ -3878,6 +4988,24 @@ lpfc_sli_abort_iocb(struct lpfc_vport *v
+@@ -3878,6 +4988,24 @@
return errcnt;
}
static void
lpfc_sli_wake_iocb_wait(struct lpfc_hba *phba,
struct lpfc_iocbq *cmdiocbq,
-@@ -3899,13 +5027,36 @@ lpfc_sli_wake_iocb_wait(struct lpfc_hba
+@@ -3899,13 +5027,36 @@
return;
}
int
lpfc_sli_issue_iocb_wait(struct lpfc_hba *phba,
struct lpfc_sli_ring *pring,
-@@ -3963,7 +5114,7 @@ lpfc_sli_issue_iocb_wait(struct lpfc_hba
+@@ -3963,7 +5114,7 @@
}
} else {
lpfc_printf_log(phba, KERN_INFO, LOG_SLI,
retval);
retval = IOCB_ERROR;
}
-@@ -3983,6 +5134,32 @@ lpfc_sli_issue_iocb_wait(struct lpfc_hba
+@@ -3983,6 +5134,32 @@
return retval;
}
int
lpfc_sli_issue_mbox_wait(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq,
uint32_t timeout)
-@@ -4027,6 +5204,18 @@ lpfc_sli_issue_mbox_wait(struct lpfc_hba
+@@ -4027,6 +5204,18 @@
return retval;
}
int
lpfc_sli_flush_mbox_queue(struct lpfc_hba * phba)
{
-@@ -4058,13 +5247,84 @@ lpfc_sli_flush_mbox_queue(struct lpfc_hb
+@@ -4058,13 +5247,84 @@
return (phba->sli.sli_flag & LPFC_SLI_MBOX_ACTIVE) ? 1 : 0;
}
uint32_t control;
MAILBOX_t *mbox, *pmbox;
-@@ -4078,67 +5338,71 @@ lpfc_intr_handler(int irq, void *dev_id)
+@@ -4078,67 +5338,71 @@
* Get the driver's phba structure from the dev_id and
* assume the HBA is not interrupting.
*/
-
- phba->sli.slistat.sli_intr++;
-
- /*
+- /*
- * Call the HBA to see if it is interrupting. If not, don't claim
- * the interrupt
-+ * Stuff needs to be attented to when this function is invoked as an
-+ * individual interrupt handler in MSI-X multi-message interrupt mode
- */
+- */
-
- /* Ignore all interrupts during initialization. */
- if (unlikely(phba->link_state < LPFC_LINK_DOWN))
-
- if (unlikely(!ha_copy))
- return IRQ_NONE;
++ /*
++ * Stuff needs to be attented to when this function is invoked as an
++ * individual interrupt handler in MSI-X multi-message interrupt mode
++ */
+ if (phba->intr_type == MSIX) {
+ /* If the pci channel is offline, ignore all the interrupts */
+ if (unlikely(pci_channel_offline(phba->pcidev)))
/*
* Turn off Slow Rings interrupts, LPFC_ELS_RING is
* the only slow ring.
-@@ -4147,7 +5411,7 @@ lpfc_intr_handler(int irq, void *dev_id)
+@@ -4147,7 +5411,7 @@
(HA_RXMASK << (4*LPFC_ELS_RING)));
status >>= (4*LPFC_ELS_RING);
if (status & HA_RXMASK) {
control = readl(phba->HCregaddr);
lpfc_debugfs_slow_ring_trc(phba,
-@@ -4176,40 +5440,22 @@ lpfc_intr_handler(int irq, void *dev_id)
+@@ -4176,40 +5440,22 @@
(uint32_t)((unsigned long)
&phba->work_waitq));
}
- spin_unlock(&phba->hbalock);
-+ spin_unlock_irqrestore(&phba->hbalock, iflag);
- }
- }
+- }
+- }
-
- if (work_ha_copy & HA_ERATT) {
- /*
- spin_lock(&phba->hbalock);
- if ((work_ha_copy & HA_MBATT) &&
- (phba->sli.mbox_active)) {
++ spin_unlock_irqrestore(&phba->hbalock, iflag);
++ }
++ }
+ spin_lock_irqsave(&phba->hbalock, iflag);
+ if (work_ha_copy & HA_ERATT)
+ lpfc_sli_read_hs(phba);
/*
* Stray Mailbox Interrupt, mbxCommand <cmd>
* mbxStatus <status>
-@@ -4226,12 +5472,21 @@ lpfc_intr_handler(int irq, void *dev_id)
+@@ -4226,12 +5472,21 @@
work_ha_copy &= ~HA_MBATT;
} else {
phba->sli.mbox_active = NULL;
}
if (pmb->mbox_flag & LPFC_MBX_IMED_UNREG) {
pmb->mbox_flag &= ~LPFC_MBX_IMED_UNREG;
-@@ -4270,19 +5525,24 @@ lpfc_intr_handler(int irq, void *dev_id)
+@@ -4270,19 +5525,24 @@
lpfc_printf_log(phba,
KERN_ERR,
LOG_MBOX | LOG_SLI,
if ((work_ha_copy & HA_MBATT) &&
(phba->sli.mbox_active == NULL)) {
send_current_mbox:
-@@ -4297,20 +5557,80 @@ send_current_mbox:
+@@ -4297,20 +5557,80 @@
"MBX_SUCCESS");
}
+ spin_unlock_irqrestore(&phba->hbalock, iflag);
lpfc_worker_wake_up(phba);
}
+-
+ return IRQ_HANDLED;
-
-- ha_copy &= ~(phba->work_ha_mask);
++
+} /* lpfc_sp_intr_handler */
+
+/**
+ spin_unlock_irqrestore(&phba->hbalock, iflag);
+ } else
+ ha_copy = phba->ha_copy;
++
++ /*
++ * Process all events on FCP ring. Take the optimized path for FCP IO.
++ */
+ ha_copy &= ~(phba->work_ha_mask);
- /*
+- /*
- * Process all events on FCP ring. Take the optimized path for
- * FCP IO. Any other IO is slow path and is handled by
- * the worker thread.
-+ * Process all events on FCP ring. Take the optimized path for FCP IO.
- */
+- */
- status = (ha_copy & (HA_RXMASK << (4*LPFC_FCP_RING)));
-+ ha_copy &= ~(phba->work_ha_mask);
-+
+ status = (ha_copy & (HA_RXMASK << (4*LPFC_FCP_RING)));
status >>= (4*LPFC_FCP_RING);
if (status & HA_RXMASK)
lpfc_sli_handle_fast_ring_event(phba,
-@@ -4319,11 +5639,10 @@ send_current_mbox:
+@@ -4319,11 +5639,10 @@
if (phba->cfg_multi_ring_support == 2) {
/*
- * Process all events on extra ring. Take the optimized path
- * for extra ring IO. Any other IO is slow path and is handled
- * by the worker thread.
+- */
+- status = (ha_copy & (HA_RXMASK << (4*LPFC_EXTRA_RING)));
+ * Process all events on extra ring. Take the optimized path
+ * for extra ring IO.
- */
-- status = (ha_copy & (HA_RXMASK << (4*LPFC_EXTRA_RING)));
++ */
+ status = (ha_copy & (HA_RXMASK << (4*LPFC_EXTRA_RING)));
status >>= (4*LPFC_EXTRA_RING);
if (status & HA_RXMASK) {
lpfc_sli_handle_fast_ring_event(phba,
-@@ -4332,5 +5651,106 @@ send_current_mbox:
+@@ -4332,5 +5651,106 @@
}
}
return IRQ_HANDLED;
+-
+-} /* lpfc_intr_handler */
+} /* lpfc_fp_intr_handler */
+
+/**
+ fp_irq_rc = lpfc_fp_intr_handler(irq, dev_id);
+ else
+ fp_irq_rc = IRQ_NONE;
-
--} /* lpfc_intr_handler */
++
+ /* Return device-level interrupt handling status */
+ return (sp_irq_rc == IRQ_HANDLED) ? sp_irq_rc : fp_irq_rc;
+} /* lpfc_intr_handler */
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_sli.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_sli.h 2009-03-25 16:11:16.000000000 +0000
-@@ -88,6 +88,9 @@ typedef struct lpfcMboxq {
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_sli.h
+--- a/drivers/scsi/lpfc/lpfc_sli.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_sli.h Wed May 06 16:56:34 2009 +0100
+@@ -88,6 +88,9 @@
void (*mbox_cmpl) (struct lpfc_hba *, struct lpfcMboxq *);
uint8_t mbox_flag;
} LPFC_MBOXQ_t;
-@@ -233,6 +236,7 @@ struct lpfc_sli {
+@@ -233,6 +236,7 @@
#define LPFC_SLI2_ACTIVE 0x200 /* SLI2 overlay in firmware is active */
#define LPFC_PROCESS_LA 0x400 /* Able to process link attention */
#define LPFC_BLOCK_MGMT_IO 0x800 /* Don't allow mgmt mbx or iocb cmds */
struct lpfc_sli_ring ring[LPFC_MAX_RING];
int fcp_ring; /* ring used for FCP initiator commands */
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_version.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_version.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_version.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_version.h 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_version.h
+--- a/drivers/scsi/lpfc/lpfc_version.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_version.h Wed May 06 16:56:34 2009 +0100
@@ -1,7 +1,7 @@
/*******************************************************************
* This file is part of the Emulex Linux Device Driver for *
LPFC_DRIVER_VERSION
-#define LPFC_COPYRIGHT "Copyright(c) 2004-2008 Emulex. All rights reserved."
+#define LPFC_COPYRIGHT "Copyright(c) 2004-2009 Emulex. All rights reserved."
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_vport.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_vport.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_vport.c
+--- a/drivers/scsi/lpfc/lpfc_vport.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_vport.c Wed May 06 16:56:34 2009 +0100
@@ -34,6 +34,7 @@
#include <scsi/scsi_transport_fc.h>
#include "lpfc_hw.h"
inline void lpfc_vport_set_state(struct lpfc_vport *vport,
enum fc_vport_state new_state)
-@@ -204,6 +206,77 @@ lpfc_unique_wwpn(struct lpfc_hba *phba,
+@@ -204,6 +206,77 @@
return 1;
}
int
lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
{
-@@ -216,10 +289,8 @@ lpfc_vport_create(struct fc_vport *fc_vp
+@@ -216,10 +289,8 @@
int vpi;
int rc = VPORT_ERROR;
int status;
lpfc_printf_log(phba, KERN_ERR, LOG_VPORT,
"1808 Create VPORT failed: "
"NPIV is not enabled: SLImode:%d\n",
-@@ -279,20 +350,6 @@ lpfc_vport_create(struct fc_vport *fc_vp
+@@ -279,20 +350,6 @@
memcpy(vport->fc_portname.u.wwn, vport->fc_sparam.portName.u.wwn, 8);
memcpy(vport->fc_nodename.u.wwn, vport->fc_sparam.nodeName.u.wwn, 8);
if (fc_vport->node_name != 0)
u64_to_wwn(fc_vport->node_name, vport->fc_nodename.u.wwn);
if (fc_vport->port_name != 0)
-@@ -322,6 +379,24 @@ lpfc_vport_create(struct fc_vport *fc_vp
+@@ -322,6 +379,24 @@
goto error_out;
}
*(struct lpfc_vport **)fc_vport->dd_data = vport;
vport->fc_vport = fc_vport;
-@@ -333,6 +408,7 @@ lpfc_vport_create(struct fc_vport *fc_vp
+@@ -333,6 +408,7 @@
}
if (disable) {
rc = VPORT_OK;
goto out;
}
-@@ -506,13 +582,21 @@ lpfc_vport_delete(struct fc_vport *fc_vp
+@@ -506,13 +582,21 @@
* initiated after we've disposed of all other resources associated
* with the port.
*/
fc_remove_host(lpfc_shost_from_vport(vport));
scsi_remove_host(lpfc_shost_from_vport(vport));
-@@ -602,6 +686,9 @@ lpfc_vport_delete(struct fc_vport *fc_vp
+@@ -602,6 +686,9 @@
timeout = schedule_timeout(timeout);
}
skip_logo:
lpfc_cleanup(vport);
lpfc_sli_host_down(vport);
-@@ -615,8 +702,10 @@ skip_logo:
+@@ -615,8 +702,10 @@
* Completion of unreg_vpi (lpfc_mbx_cmpl_unreg_vpi)
* does the scsi_host_put() to release the vport.
*/
lpfc_free_vpi(phba, vport->vpi);
vport->work_port_events = 0;
-@@ -663,3 +752,82 @@ lpfc_destroy_vport_work_array(struct lpf
+@@ -663,3 +752,82 @@
scsi_host_put(lpfc_shost_from_vport(vports[i]));
kfree(vports);
}
+ ndlp->lat_data = NULL;
+ }
+}
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_vport.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_vport.h 2009-03-25 16:11:16.000000000 +0000
-@@ -112,4 +112,8 @@ struct vport_cmd_tag {
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_vport.h
+--- a/drivers/scsi/lpfc/lpfc_vport.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_vport.h Wed May 06 16:56:34 2009 +0100
+@@ -112,4 +112,8 @@
void lpfc_vport_set_state(struct lpfc_vport *vport,
enum fc_vport_state new_state);
+void lpfc_free_bucket(struct lpfc_vport *);
+
#endif /* H_LPFC_VPORT */
-diff -purN linux-2.6.27/drivers/scsi/megaraid/megaraid_mbox.c linux-2.6.27.19-5.1/drivers/scsi/megaraid/megaraid_mbox.c
---- linux-2.6.27/drivers/scsi/megaraid/megaraid_mbox.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/megaraid/megaraid_mbox.c 2009-03-25 16:11:15.000000000 +0000
-@@ -1580,13 +1580,20 @@ megaraid_mbox_build_cmd(adapter_t *adapt
+diff -r 9608d5473017 drivers/scsi/megaraid/megaraid_mbox.c
+--- a/drivers/scsi/megaraid/megaraid_mbox.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/megaraid/megaraid_mbox.c Wed May 06 16:56:34 2009 +0100
+@@ -1580,13 +1580,20 @@
case MODE_SENSE:
{
struct scatterlist *sgl;
}
else {
con_log(CL_ANN, (KERN_WARNING
-@@ -2324,9 +2331,20 @@ megaraid_mbox_dpc(unsigned long devp)
+@@ -2324,9 +2331,20 @@
if (scp->cmnd[0] == INQUIRY && status == 0 && islogical == 0
&& IS_RAID_CH(raid_dev, scb->dev_channel)) {
} else {
con_log(CL_ANN, (KERN_WARNING
"megaraid mailbox: invalid sg:%d\n",
-diff -purN linux-2.6.27/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.27.19-5.1/drivers/scsi/megaraid/megaraid_sas.c
---- linux-2.6.27/drivers/scsi/megaraid/megaraid_sas.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/megaraid/megaraid_sas.c 2009-03-25 16:11:15.000000000 +0000
-@@ -1016,7 +1016,8 @@ static int megasas_slave_configure(struc
+diff -r 9608d5473017 drivers/scsi/megaraid/megaraid_sas.c
+--- a/drivers/scsi/megaraid/megaraid_sas.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/megaraid/megaraid_sas.c Wed May 06 16:56:34 2009 +0100
+@@ -1016,7 +1016,8 @@
* The RAID firmware may require extended timeouts.
*/
if (sdev->channel >= MEGASAS_MAX_PD_CHANNELS)
return 0;
}
-@@ -1167,7 +1168,7 @@ static int megasas_generic_reset(struct
+@@ -1167,7 +1168,7 @@
* cmd has not been completed within the timeout period.
*/
static enum
{
struct megasas_cmd *cmd = (struct megasas_cmd *)scmd->SCp.ptr;
struct megasas_instance *instance;
-@@ -1175,7 +1176,7 @@ scsi_eh_timer_return megasas_reset_timer
+@@ -1175,7 +1176,7 @@
if (time_after(jiffies, scmd->jiffies_at_alloc +
(MEGASAS_DEFAULT_CMD_TIMEOUT * 2) * HZ)) {
}
instance = cmd->instance;
-@@ -1189,7 +1190,7 @@ scsi_eh_timer_return megasas_reset_timer
+@@ -1189,7 +1190,7 @@
spin_unlock_irqrestore(instance->host->host_lock, flags);
}
}
/**
-diff -purN linux-2.6.27/drivers/scsi/mvsas.c linux-2.6.27.19-5.1/drivers/scsi/mvsas.c
---- linux-2.6.27/drivers/scsi/mvsas.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/mvsas.c 2009-03-25 16:11:15.000000000 +0000
-@@ -2959,7 +2959,7 @@ static int __devinit mvs_hw_init(struct
+diff -r 9608d5473017 drivers/scsi/mvsas.c
+--- a/drivers/scsi/mvsas.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/mvsas.c Wed May 06 16:56:34 2009 +0100
+@@ -2959,7 +2959,7 @@
/* enable auto port detection */
mw32(GBL_PORT_TYPE, MODE_AUTO_DET_EN);
/* init and reset phys */
for (i = 0; i < mvi->chip->n_phy; i++) {
u32 lo = be32_to_cpu(*(u32 *)&mvi->sas_addr[4]);
-diff -purN linux-2.6.27/drivers/scsi/ncr53c8xx.c linux-2.6.27.19-5.1/drivers/scsi/ncr53c8xx.c
---- linux-2.6.27/drivers/scsi/ncr53c8xx.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ncr53c8xx.c 2009-03-25 16:11:14.000000000 +0000
-@@ -4170,8 +4170,8 @@ static int ncr_queue_command (struct ncb
+diff -r 9608d5473017 drivers/scsi/ncr53c8xx.c
+--- a/drivers/scsi/ncr53c8xx.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ncr53c8xx.c Wed May 06 16:56:34 2009 +0100
+@@ -4170,8 +4170,8 @@
**
**----------------------------------------------------
*/
if (time_after(np->settle_time, tlimit))
np->settle_time = tlimit;
}
-diff -purN linux-2.6.27/drivers/scsi/pcmcia/aha152x_stub.c linux-2.6.27.19-5.1/drivers/scsi/pcmcia/aha152x_stub.c
---- linux-2.6.27/drivers/scsi/pcmcia/aha152x_stub.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/pcmcia/aha152x_stub.c 2009-03-25 16:11:16.000000000 +0000
-@@ -114,7 +114,7 @@ static int aha152x_probe(struct pcmcia_d
+diff -r 9608d5473017 drivers/scsi/pcmcia/aha152x_stub.c
+--- a/drivers/scsi/pcmcia/aha152x_stub.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/pcmcia/aha152x_stub.c Wed May 06 16:56:34 2009 +0100
+@@ -114,7 +114,7 @@
link->io.NumPorts1 = 0x20;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 10;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
-diff -purN linux-2.6.27/drivers/scsi/qla1280.c linux-2.6.27.19-5.1/drivers/scsi/qla1280.c
---- linux-2.6.27/drivers/scsi/qla1280.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla1280.c 2009-03-25 16:11:17.000000000 +0000
-@@ -2845,7 +2845,7 @@ qla1280_64bit_start_scsi(struct scsi_qla
+diff -r 9608d5473017 drivers/scsi/qla1280.c
+--- a/drivers/scsi/qla1280.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla1280.c Wed May 06 16:56:34 2009 +0100
+@@ -2845,7 +2845,7 @@
memset(((char *)pkt + 8), 0, (REQUEST_ENTRY_SIZE - 8));
/* Set ISP command timeout. */
/* Set device target ID and LUN */
pkt->lun = SCSI_LUN_32(cmd);
-@@ -3114,7 +3114,7 @@ qla1280_32bit_start_scsi(struct scsi_qla
+@@ -3114,7 +3114,7 @@
memset(((char *)pkt + 8), 0, (REQUEST_ENTRY_SIZE - 8));
/* Set ISP command timeout. */
/* Set device target ID and LUN */
pkt->lun = SCSI_LUN_32(cmd);
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/Makefile linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/Makefile
---- linux-2.6.27/drivers/scsi/qla2xxx/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/Makefile 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla2xxx/Makefile
+--- a/drivers/scsi/qla2xxx/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/Makefile Wed May 06 16:56:34 2009 +0100
@@ -1,4 +1,5 @@
qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
- qla_dbg.o qla_sup.o qla_attr.o qla_mid.o qla_dfs.o
+ qla_nlnk.o
obj-$(CONFIG_SCSI_QLA_FC) += qla2xxx.o
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_attr.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_attr.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_attr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_attr.c 2009-03-25 16:11:17.000000000 +0000
-@@ -292,10 +292,11 @@ qla2x00_sysfs_write_optrom_ctl(struct ko
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_attr.c
+--- a/drivers/scsi/qla2xxx/qla_attr.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_attr.c Wed May 06 16:56:35 2009 +0100
+@@ -292,10 +292,11 @@
valid = 0;
if (ha->optrom_size == OPTROM_SIZE_2300 && start == 0)
valid = 1;
valid = 1;
if (!valid) {
qla_printk(KERN_WARNING, ha,
-@@ -453,6 +454,287 @@ static struct bin_attribute sysfs_sfp_at
+@@ -453,6 +454,287 @@
.read = qla2x00_sysfs_read_sfp,
};
static struct sysfs_entry {
char *name;
struct bin_attribute *attr;
-@@ -464,6 +746,8 @@ static struct sysfs_entry {
+@@ -464,6 +746,8 @@
{ "optrom_ctl", &sysfs_optrom_ctl_attr, },
{ "vpd", &sysfs_vpd_attr, 1 },
{ "sfp", &sysfs_sfp_attr, 1 },
{ NULL },
};
-@@ -796,6 +1080,27 @@ qla2x00_total_isp_aborts_show(struct dev
+@@ -796,6 +1080,27 @@
ha->qla_stats.total_isp_aborts);
}
static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL);
static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL);
static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL);
-@@ -820,6 +1125,8 @@ static DEVICE_ATTR(optrom_fw_version, S_
+@@ -820,6 +1125,8 @@
NULL);
static DEVICE_ATTR(total_isp_aborts, S_IRUGO, qla2x00_total_isp_aborts_show,
NULL);
struct device_attribute *qla2x00_host_attrs[] = {
&dev_attr_driver_version,
-@@ -839,6 +1146,7 @@ struct device_attribute *qla2x00_host_at
+@@ -839,6 +1146,7 @@
&dev_attr_optrom_fcode_version,
&dev_attr_optrom_fw_version,
&dev_attr_total_isp_aborts,
NULL,
};
-@@ -976,7 +1284,13 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rp
+@@ -976,7 +1284,13 @@
struct Scsi_Host *host = rport_to_shost(rport);
fc_port_t *fcport = *(fc_port_t **)rport->dd_data;
/*
* Transport has effectively 'deleted' the rport, clear
-@@ -993,6 +1307,13 @@ qla2x00_terminate_rport_io(struct fc_rpo
+@@ -993,6 +1307,13 @@
{
fc_port_t *fcport = *(fc_port_t **)rport->dd_data;
/*
* At this point all fcport's software-states are cleared. Perform any
* final cleanup of firmware resources (PCBs and XCBs).
-@@ -1005,7 +1326,6 @@ qla2x00_terminate_rport_io(struct fc_rpo
+@@ -1005,7 +1326,6 @@
}
qla2x00_abort_fcport_cmds(fcport);
}
static int
-@@ -1065,6 +1385,8 @@ qla2x00_get_fc_host_stats(struct Scsi_Ho
+@@ -1065,6 +1385,8 @@
pfc_host_stat->dumped_frames = stats->dumped_frames;
pfc_host_stat->nos_count = stats->nos_rcvd;
}
done_free:
dma_pool_free(ha->s_dma_pool, stats, stats_dma);
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_def.h linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_def.h
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_def.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_def.h 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_def.h
+--- a/drivers/scsi/qla2xxx/qla_def.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_def.h Wed May 06 16:56:35 2009 +0100
@@ -94,6 +94,89 @@
#define LSD(x) ((uint32_t)((uint64_t)(x)))
#define MSD(x) ((uint32_t)((((uint64_t)(x)) >> 16) >> 16))
/*
* I/O register
-@@ -2157,6 +2240,16 @@ struct qla_chip_state_84xx {
+@@ -2157,6 +2240,16 @@
struct qla_statistics {
uint32_t total_isp_aborts;
};
/*
-@@ -2238,6 +2331,7 @@ typedef struct scsi_qla_host {
+@@ -2238,6 +2331,7 @@
#define FCPORT_UPDATE_NEEDED 27
#define VP_DPC_NEEDED 28 /* wake up for VP dpc handling */
#define UNLOADING 29
uint32_t device_flags;
#define DFLG_LOCAL_DEVICES BIT_0
-@@ -2423,6 +2517,8 @@ typedef struct scsi_qla_host {
+@@ -2423,6 +2517,8 @@
/* SNS command interfaces for 2200. */
struct sns_cmd_pkt *sns_cmd;
dma_addr_t sns_cmd_dma;
#define SFP_DEV_SIZE 256
#define SFP_BLOCK_SIZE 64
-@@ -2464,6 +2560,7 @@ typedef struct scsi_qla_host {
+@@ -2464,6 +2560,7 @@
struct mutex vport_lock; /* Virtual port synchronization */
struct completion mbx_cmd_comp; /* Serialize mbx access */
struct completion mbx_intr_comp; /* Used for completion notification */
uint32_t mbx_flags;
#define MBX_IN_PROGRESS BIT_0
-@@ -2507,7 +2604,6 @@ typedef struct scsi_qla_host {
+@@ -2507,7 +2604,6 @@
uint64_t fce_wr, fce_rd;
struct mutex fce_mutex;
uint32_t hw_event_ptr;
uint32_t hw_event_pause_errors;
-@@ -2546,13 +2642,20 @@ typedef struct scsi_qla_host {
+@@ -2546,12 +2642,19 @@
uint8_t fcode_revision[16];
uint32_t fw_revision[4];
uint32_t fdt_block_size;
uint32_t fdt_unprotect_sec_cmd;
uint32_t fdt_protect_sec_cmd;
-
++
+ uint32_t flt_region_flt;
+ uint32_t flt_region_fdt;
+ uint32_t flt_region_boot;
+ uint32_t flt_region_vpd_nvram;
+ uint32_t flt_region_hw_event;
+ uint32_t flt_region_npiv_conf;
-+
+
/* Needed for BEACON */
uint16_t beacon_blink_led;
- uint8_t beacon_color_state;
-@@ -2599,8 +2702,13 @@ typedef struct scsi_qla_host {
+@@ -2599,8 +2702,13 @@
uint16_t max_npiv_vports; /* 63 or 125 per topoloty */
int cur_vport_count;
} scsi_qla_host_t;
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_devtbl.h linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_devtbl.h
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_devtbl.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_devtbl.h 2009-03-25 16:11:16.000000000 +0000
-@@ -72,7 +72,7 @@ static char *qla2x00_model_name[QLA_MODE
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_devtbl.h
+--- a/drivers/scsi/qla2xxx/qla_devtbl.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_devtbl.h Wed May 06 16:56:35 2009 +0100
+@@ -72,7 +72,7 @@
"QLA2462", "Sun PCI-X 2.0 to 4Gb FC, Dual Channel", /* 0x141 */
"QLE2460", "Sun PCI-Express to 2Gb FC, Single Channel", /* 0x142 */
"QLE2462", "Sun PCI-Express to 4Gb FC, Single Channel", /* 0x143 */
"QLE2440", "PCI-Express to 4Gb FC, Single Channel", /* 0x145 */
"QLE2464", "PCI-Express to 4Gb FC, Quad Channel", /* 0x146 */
"QLA2440", "PCI-X 2.0 to 4Gb FC, Single Channel", /* 0x147 */
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_fw.h linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_fw.h
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_fw.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_fw.h 2009-03-25 16:11:16.000000000 +0000
-@@ -789,14 +789,23 @@ struct device_reg_24xx {
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_fw.h
+--- a/drivers/scsi/qla2xxx/qla_fw.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_fw.h Wed May 06 16:56:35 2009 +0100
+@@ -789,14 +789,23 @@
#define FA_RISC_CODE_ADDR 0x20000
#define FA_RISC_CODE_SEGMENTS 2
/*
* Flash Error Log Event Codes.
*/
-@@ -806,10 +815,6 @@ struct device_reg_24xx {
+@@ -805,10 +814,6 @@
+ #define HW_EVENT_PARITY_ERR 0xF022
#define HW_EVENT_NVRAM_CHKSUM_ERR 0xF023
#define HW_EVENT_FLASH_FW_ERR 0xF024
-
+-
-#define FA_BOOT_LOG_ADDR 0x58000
-#define FA_FW_DUMP0_ADDR 0x60000
-#define FA_FW_DUMP1_ADDR 0x70000
--
+
uint32_t flash_data; /* Flash/NVRAM BIOS data. */
- uint32_t ctrl_status; /* Control/Status. */
-@@ -1203,6 +1208,63 @@ struct qla_fdt_layout {
+@@ -1203,6 +1208,63 @@
uint8_t unused2[65];
};
/* 84XX Support **************************************************************/
#define MBA_ISP84XX_ALERT 0x800f /* Alert Notification. */
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_gbl.h linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_gbl.h
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_gbl.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_gbl.h 2009-03-25 16:11:16.000000000 +0000
-@@ -63,6 +63,7 @@ extern int ql2xallocfwdump;
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_gbl.h
+--- a/drivers/scsi/qla2xxx/qla_gbl.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_gbl.h Wed May 06 16:56:35 2009 +0100
+@@ -63,6 +63,7 @@
extern int ql2xextended_error_logging;
extern int ql2xqfullrampup;
extern int ql2xiidmaenable;
extern int qla2x00_loop_reset(scsi_qla_host_t *);
extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int);
-@@ -121,6 +122,8 @@ extern int qla2x00_start_scsi(srb_t *sp)
+@@ -121,6 +122,8 @@
extern int qla24xx_start_scsi(srb_t *sp);
int qla2x00_marker(scsi_qla_host_t *, uint16_t, uint16_t, uint8_t);
int __qla2x00_marker(scsi_qla_host_t *, uint16_t, uint16_t, uint8_t);
/*
* Global Function Prototypes in qla_mbx.c source file.
-@@ -154,6 +157,10 @@ extern int
- qla2x00_issue_iocb(scsi_qla_host_t *, void *, dma_addr_t, size_t);
+@@ -152,6 +155,10 @@
extern int
-+qla2x00_issue_iocb_timeout(scsi_qla_host_t *, void *, dma_addr_t, size_t,
-+ uint32_t);
+ qla2x00_issue_iocb(scsi_qla_host_t *, void *, dma_addr_t, size_t);
+
+extern int
- qla2x00_abort_command(scsi_qla_host_t *, srb_t *);
++qla2x00_issue_iocb_timeout(scsi_qla_host_t *, void *, dma_addr_t, size_t,
++ uint32_t);
extern int
-@@ -258,6 +265,8 @@ qla2x00_set_idma_speed(scsi_qla_host_t *
+ qla2x00_abort_command(scsi_qla_host_t *, srb_t *);
+@@ -258,6 +265,8 @@
extern int qla84xx_verify_chip(struct scsi_qla_host *, uint16_t *);
/*
* Global Function Prototypes in qla_isr.c source file.
*/
-@@ -313,9 +322,11 @@ extern int qla24xx_get_flash_version(scs
+@@ -313,8 +322,10 @@
extern int qla2xxx_hw_event_log(scsi_qla_host_t *, uint16_t , uint16_t,
uint16_t, uint16_t);
-extern void qla2xxx_get_flash_info(scsi_qla_host_t *);
+extern int qla2xxx_get_flash_info(scsi_qla_host_t *);
extern int qla2xxx_get_vpd_field(scsi_qla_host_t *, char *, char *, size_t);
-
-+extern void qla2xxx_flash_npiv_conf(scsi_qla_host_t *);
+
++extern void qla2xxx_flash_npiv_conf(scsi_qla_host_t *);
+
/*
* Global Function Prototypes in qla_dbg.c source file.
- */
-@@ -325,6 +336,8 @@ extern void qla24xx_fw_dump(scsi_qla_hos
+@@ -325,6 +336,8 @@
extern void qla25xx_fw_dump(scsi_qla_host_t *, int);
extern void qla2x00_dump_regs(scsi_qla_host_t *);
extern void qla2x00_dump_buffer(uint8_t *, uint32_t);
/*
* Global Function Prototypes in qla_gs.c source file.
-@@ -345,6 +358,7 @@ extern int qla2x00_fdmi_register(scsi_ql
+@@ -345,6 +358,7 @@
extern int qla2x00_gfpn_id(scsi_qla_host_t *, sw_info_t *);
extern int qla2x00_gpsc(scsi_qla_host_t *, sw_info_t *);
extern void qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *);
/*
* Global Function Prototypes in qla_attr.c source file.
-@@ -361,6 +375,13 @@ extern void qla2x00_alloc_sysfs_attr(scs
+@@ -361,6 +375,13 @@
extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *);
/*
* Global Function Prototypes in qla_dfs.c source file.
*/
extern int qla2x00_dfs_setup(scsi_qla_host_t *);
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_gs.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_gs.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_gs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_gs.c 2009-03-25 16:11:17.000000000 +0000
-@@ -1093,7 +1093,7 @@ qla2x00_sns_rnn_id(scsi_qla_host_t *ha)
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_gs.c
+--- a/drivers/scsi/qla2xxx/qla_gs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_gs.c Wed May 06 16:56:35 2009 +0100
+@@ -1093,7 +1093,7 @@
*
* Returns 0 on success.
*/
qla2x00_mgmt_svr_login(scsi_qla_host_t *ha)
{
int ret;
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_init.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_init.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_init.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_init.c 2009-03-25 16:11:17.000000000 +0000
-@@ -83,6 +83,13 @@ qla2x00_initialize_adapter(scsi_qla_host
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_init.c
+--- a/drivers/scsi/qla2xxx/qla_init.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_init.c Wed May 06 16:56:35 2009 +0100
+@@ -83,6 +83,13 @@
ha->isp_ops->reset_chip(ha);
ha->isp_ops->get_flash_version(ha, ha->request_ring);
qla_printk(KERN_INFO, ha, "Configure NVRAM parameters...\n");
-@@ -109,7 +116,6 @@ qla2x00_initialize_adapter(scsi_qla_host
+@@ -109,7 +116,6 @@
rval = qla2x00_setup_chip(ha);
if (rval)
return (rval);
}
if (IS_QLA84XX(ha)) {
ha->cs84xx = qla84xx_get_chip(ha);
-@@ -974,7 +980,6 @@ qla2x00_setup_chip(scsi_qla_host_t *ha)
+@@ -974,7 +980,6 @@
&ha->fw_minor_version,
&ha->fw_subminor_version,
&ha->fw_attributes, &ha->fw_memory_size);
ha->flags.npiv_supported = 0;
if ((IS_QLA24XX(ha) || IS_QLA25XX(ha) ||
IS_QLA84XX(ha)) &&
-@@ -986,6 +991,7 @@ qla2x00_setup_chip(scsi_qla_host_t *ha)
+@@ -986,6 +991,7 @@
ha->max_npiv_vports =
MIN_MULTI_ID_FABRIC - 1;
}
if (ql2xallocfwdump)
qla2x00_alloc_fw_dump(ha);
-@@ -1235,8 +1241,11 @@ qla2x00_init_rings(scsi_qla_host_t *ha)
+@@ -1235,8 +1241,11 @@
DEBUG(printk("scsi(%ld): Issue init firmware.\n", ha->host_no));
mid_init_cb->options = __constant_cpu_to_le16(BIT_1);
-@@ -2016,7 +2025,7 @@ qla2x00_configure_loop(scsi_qla_host_t *
+@@ -2016,7 +2025,7 @@
DEBUG3(printk("%s: exiting normally\n", __func__));
}
if (test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) {
if (test_bit(LOCAL_LOOP_UPDATE, &save_flags))
set_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags);
-@@ -2561,7 +2570,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_ho
+@@ -2561,7 +2570,7 @@
rval = QLA_SUCCESS;
/* Try GID_PT to get device list, else GAN. */
if (!swl) {
/*EMPTY*/
DEBUG2(printk("scsi(%ld): GID_PT allocations failed, fallback "
-@@ -3751,7 +3760,7 @@ qla24xx_load_risc_flash(scsi_qla_host_t
+@@ -3751,7 +3760,7 @@
rval = QLA_SUCCESS;
segments = FA_RISC_CODE_SEGMENTS;
dcode = (uint32_t *)ha->request_ring;
*srisc_addr = 0;
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_inline.h linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_inline.h
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_inline.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_inline.h 2009-03-25 16:11:17.000000000 +0000
-@@ -52,7 +52,7 @@ to_qla_parent(scsi_qla_host_t *ha)
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_inline.h
+--- a/drivers/scsi/qla2xxx/qla_inline.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_inline.h Wed May 06 16:56:35 2009 +0100
+@@ -52,7 +52,7 @@
* @ha: HA context
* @ha_locked: is function called with the hardware lock
*
*/
static inline int
qla2x00_issue_marker(scsi_qla_host_t *ha, int ha_locked)
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_iocb.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_iocb.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_iocb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_iocb.c 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_iocb.c
+--- a/drivers/scsi/qla2xxx/qla_iocb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_iocb.c Wed May 06 16:56:35 2009 +0100
@@ -11,8 +11,6 @@
#include <scsi/scsi_tcq.h>
/**
* qla2x00_get_cmd_direction() - Determine control_flag data direction.
-@@ -21,17 +19,22 @@ static void qla2x00_isp_cmd(scsi_qla_hos
+@@ -21,17 +19,22 @@
* Returns the proper CF_* direction based on CDB.
*/
static inline uint16_t
return (cflags);
}
-@@ -169,7 +172,7 @@ void qla2x00_build_scsi_iocbs_32(srb_t *
+@@ -169,7 +172,7 @@
ha = sp->ha;
/* Three DSDs are available in the Command Type 2 IOCB */
avail_dsds = 3;
-@@ -228,7 +231,7 @@ void qla2x00_build_scsi_iocbs_64(srb_t *
+@@ -228,7 +231,7 @@
ha = sp->ha;
/* Two DSDs are available in the Command Type 3 IOCB */
avail_dsds = 2;
-@@ -262,7 +265,7 @@ void qla2x00_build_scsi_iocbs_64(srb_t *
+@@ -262,7 +265,7 @@
* qla2x00_start_scsi() - Send a SCSI command to the ISP
* @sp: command to send to the ISP
*
*/
int
qla2x00_start_scsi(srb_t *sp)
-@@ -407,7 +410,7 @@ queuing_error:
+@@ -407,7 +410,7 @@
*
* Can be called from both normal and interrupt context.
*
*/
int
__qla2x00_marker(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun,
-@@ -471,7 +474,7 @@ qla2x00_marker(scsi_qla_host_t *ha, uint
+@@ -471,7 +474,7 @@
*
* Returns NULL if function failed, else, a pointer to the request packet.
*/
qla2x00_req_pkt(scsi_qla_host_t *ha)
{
device_reg_t __iomem *reg = ha->iobase;
-@@ -541,7 +544,7 @@ qla2x00_req_pkt(scsi_qla_host_t *ha)
+@@ -541,7 +544,7 @@
*
* Note: The caller must hold the hardware lock before calling this routine.
*/
qla2x00_isp_cmd(scsi_qla_host_t *ha)
{
device_reg_t __iomem *reg = ha->iobase;
-@@ -625,12 +628,17 @@ qla24xx_build_scsi_iocbs(srb_t *sp, stru
+@@ -625,12 +628,17 @@
ha = sp->ha;
/* Set transfer direction */
/* One DSD is available in the Command Type 3 IOCB */
avail_dsds = 1;
-@@ -666,7 +674,7 @@ qla24xx_build_scsi_iocbs(srb_t *sp, stru
+@@ -666,7 +674,7 @@
* qla24xx_start_scsi() - Send a SCSI command to the ISP
* @sp: command to send to the ISP
*
*/
int
qla24xx_start_scsi(srb_t *sp)
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_isr.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_isr.c 2009-03-25 16:11:17.000000000 +0000
-@@ -391,9 +391,9 @@ qla2x00_async_event(scsi_qla_host_t *ha,
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_isr.c
+--- a/drivers/scsi/qla2xxx/qla_isr.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_isr.c Wed May 06 16:56:35 2009 +0100
+@@ -391,9 +391,9 @@
break;
case MBA_LIP_OCCURRED: /* Loop Initialization Procedure */
if (atomic_read(&ha->loop_state) != LOOP_DOWN) {
atomic_set(&ha->loop_state, LOOP_DOWN);
-@@ -460,7 +460,7 @@ qla2x00_async_event(scsi_qla_host_t *ha,
+@@ -460,7 +460,7 @@
DEBUG2(printk("scsi(%ld): Asynchronous LIP RESET (%x).\n",
ha->host_no, mb[1]));
qla_printk(KERN_INFO, ha,
if (atomic_read(&ha->loop_state) != LOOP_DOWN) {
atomic_set(&ha->loop_state, LOOP_DOWN);
-@@ -543,7 +543,7 @@ qla2x00_async_event(scsi_qla_host_t *ha,
+@@ -543,7 +543,7 @@
case MBA_PORT_UPDATE: /* Port database update */
/*
* event etc. earlier indicating loop is down) then process
* it. Otherwise ignore it and Wait for RSCN to come in.
*/
-@@ -589,7 +589,7 @@ qla2x00_async_event(scsi_qla_host_t *ha,
+@@ -589,7 +589,7 @@
"scsi(%ld): RSCN database changed -- %04x %04x %04x.\n",
ha->host_no, mb[1], mb[2], mb[3]));
host_pid = (ha->d_id.b.domain << 16) | (ha->d_id.b.area << 8) |
ha->d_id.b.al_pa;
if (rscn_entry == host_pid) {
-@@ -600,6 +600,8 @@ qla2x00_async_event(scsi_qla_host_t *ha,
+@@ -600,6 +600,8 @@
break;
}
rscn_queue_index = ha->rscn_in_ptr + 1;
if (rscn_queue_index == MAX_RSCN_COUNT)
rscn_queue_index = 0;
-@@ -689,6 +691,9 @@ qla2x00_adjust_sdev_qdepth_up(struct scs
+@@ -689,6 +691,9 @@
{
fc_port_t *fcport = data;
if (fcport->ha->max_q_depth <= sdev->queue_depth)
return;
-@@ -727,6 +732,9 @@ qla2x00_ramp_up_queue_depth(scsi_qla_hos
+@@ -726,6 +731,9 @@
+ {
fc_port_t *fcport;
struct scsi_device *sdev;
-
++
+ if (!ql2xqfulltracking)
+ return;
-+
+
sdev = sp->cmd->device;
if (sdev->queue_depth >= ha->max_q_depth)
- return;
-@@ -1041,6 +1049,8 @@ qla2x00_status_entry(scsi_qla_host_t *ha
+@@ -1041,6 +1049,8 @@
scsi_status));
/* Adjust queue depth for all luns on the port. */
fcport->last_queue_full = jiffies;
starget_for_each_device(cp->device->sdev_target,
fcport, qla2x00_adjust_sdev_qdepth_down);
-@@ -1060,8 +1070,9 @@ qla2x00_status_entry(scsi_qla_host_t *ha
+@@ -1060,8 +1070,9 @@
resid = resid_len;
/* Use F/W calculated residual length. */
if (IS_FWI2_CAPABLE(ha)) {
scsi_status &= ~SS_RESIDUAL_UNDER;
lscsi_status = 0;
}
-@@ -1099,6 +1110,8 @@ qla2x00_status_entry(scsi_qla_host_t *ha
+@@ -1099,6 +1110,8 @@
* Adjust queue depth for all luns on the
* port.
*/
fcport->last_queue_full = jiffies;
starget_for_each_device(
cp->device->sdev_target, fcport,
-@@ -1184,7 +1197,12 @@ qla2x00_status_entry(scsi_qla_host_t *ha
+@@ -1184,7 +1197,12 @@
cp->serial_number, comp_status,
atomic_read(&fcport->state)));
if (atomic_read(&fcport->state) == FCS_ONLINE)
qla2x00_mark_device_lost(fcport->ha, fcport, 1, 1);
break;
-@@ -1211,7 +1229,12 @@ qla2x00_status_entry(scsi_qla_host_t *ha
+@@ -1211,7 +1229,12 @@
break;
case CS_TIMEOUT:
if (IS_FWI2_CAPABLE(ha)) {
DEBUG2(printk(KERN_INFO
-@@ -1430,6 +1453,27 @@ qla24xx_process_response_queue(struct sc
+@@ -1430,6 +1453,27 @@
case STATUS_CONT_TYPE:
qla2x00_status_cont_entry(ha, (sts_cont_entry_t *)pkt);
break;
case VP_RPT_ID_IOCB_TYPE:
qla24xx_report_id_acquisition(ha,
(struct vp_rpt_id_entry_24xx *)pkt);
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_mbx.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_mbx.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_mbx.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_mbx.c 2009-03-25 16:11:17.000000000 +0000
-@@ -44,6 +44,9 @@ qla2x00_mailbox_command(scsi_qla_host_t
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_mbx.c
+--- a/drivers/scsi/qla2xxx/qla_mbx.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_mbx.c Wed May 06 16:56:35 2009 +0100
+@@ -43,6 +43,9 @@
+ uint32_t mboxes;
unsigned long wait_time;
scsi_qla_host_t *ha = to_qla_parent(pvha);
-
++
+ if (ha->pdev->error_state == pci_channel_io_perm_failure)
+ return QLA_FUNCTION_TIMEOUT;
-+
+
reg = ha->iobase;
io_lock_on = ha->flags.init_done;
-
-@@ -233,7 +236,7 @@ qla2x00_mailbox_command(scsi_qla_host_t
+@@ -233,7 +236,7 @@
DEBUG2_3_11(printk("%s(%ld): timeout schedule "
"isp_abort_needed.\n", __func__, ha->host_no));
qla_printk(KERN_WARNING, ha,
"abort.\n");
set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
qla2xxx_wake_dpc(ha);
-@@ -244,7 +247,7 @@ qla2x00_mailbox_command(scsi_qla_host_t
+@@ -244,7 +247,7 @@
DEBUG2_3_11(printk("%s(%ld): timeout calling "
"abort_isp\n", __func__, ha->host_no));
qla_printk(KERN_WARNING, ha,
"abort.\n");
set_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags);
-@@ -681,7 +684,7 @@ qla2x00_verify_checksum(scsi_qla_host_t
+@@ -681,7 +684,7 @@
* Context:
* Kernel context.
*/
qla2x00_issue_iocb_timeout(scsi_qla_host_t *ha, void *buffer,
dma_addr_t phys_addr, size_t size, uint32_t tov)
{
-@@ -1964,7 +1967,7 @@ qla2x00_get_resource_cnts(scsi_qla_host_
+@@ -1964,7 +1967,7 @@
*cur_iocb_cnt = mcp->mb[7];
if (orig_iocb_cnt)
*orig_iocb_cnt = mcp->mb[10];
*max_npiv_vports = mcp->mb[11];
}
-@@ -1995,7 +1998,7 @@ qla2x00_get_fcal_position_map(scsi_qla_h
+@@ -1995,7 +1998,7 @@
char *pmap;
dma_addr_t pmap_dma;
if (pmap == NULL) {
DEBUG2_3_11(printk("%s(%ld): **** Mem Alloc Failed ****",
__func__, ha->host_no));
-@@ -2946,6 +2949,33 @@ qla2x00_dump_ram(scsi_qla_host_t *ha, dm
+@@ -2946,6 +2949,33 @@
/* 84XX Support **************************************************************/
struct cs84xx_mgmt_cmd {
union {
struct verify_chip_entry_84xx req;
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_nlnk.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_nlnk.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_nlnk.c 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_nlnk.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/qla2xxx/qla_nlnk.c Wed May 06 16:56:35 2009 +0100
@@ -0,0 +1,434 @@
+/*
+ * QLogic Fibre Channel HBA Driver
+ netlink_unregister_notifier(&ql_fc_nl_notifier);
+ }
+}
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_nlnk.h linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_nlnk.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_nlnk.h 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_nlnk.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/qla2xxx/qla_nlnk.h Wed May 06 16:56:35 2009 +0100
@@ -0,0 +1,168 @@
+/*
+ * QLogic Fibre Channel HBA Driver
+} __attribute__ ((aligned (sizeof(uint64_t))));
+
+#endif /* _QLA_NLNK_H_ */
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_os.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_os.c 2009-03-25 16:11:17.000000000 +0000
-@@ -79,6 +79,14 @@ module_param(ql2xmaxqdepth, int, S_IRUGO
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_os.c
+--- a/drivers/scsi/qla2xxx/qla_os.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_os.c Wed May 06 16:56:35 2009 +0100
+@@ -78,6 +78,14 @@
+ module_param(ql2xmaxqdepth, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(ql2xmaxqdepth,
"Maximum queue depth to report for target devices.");
-
++
+int ql2xqfulltracking = 1;
+module_param(ql2xqfulltracking, int, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(ql2xqfulltracking,
+ "returns and dynamically adjusts a scsi device's queue "
+ "depth. Default is 1, perform tracking. Set to 0 to "
+ "disable dynamic tracking and adjustment of queue depth.");
-+
+
int ql2xqfullrampup = 120;
module_param(ql2xqfullrampup, int, S_IRUGO|S_IWUSR);
- MODULE_PARM_DESC(ql2xqfullrampup,
-@@ -383,7 +391,10 @@ qla2x00_queuecommand(struct scsi_cmnd *c
+@@ -383,7 +391,10 @@
int rval;
if (unlikely(pci_channel_offline(ha->pdev))) {
goto qc_fail_command;
}
-@@ -394,10 +405,8 @@ qla2x00_queuecommand(struct scsi_cmnd *c
+@@ -394,10 +405,8 @@
}
/* Close window on fcport/rport state-transitioning. */
if (atomic_read(&fcport->state) != FCS_ONLINE) {
if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
-@@ -405,7 +414,7 @@ qla2x00_queuecommand(struct scsi_cmnd *c
+@@ -405,7 +414,7 @@
cmd->result = DID_NO_CONNECT << 16;
goto qc_fail_command;
}
}
spin_unlock_irq(ha->host->host_lock);
-@@ -428,10 +437,11 @@ qc_host_busy_free_sp:
+@@ -428,9 +437,10 @@
qc_host_busy_lock:
spin_lock_irq(ha->host->host_lock);
--
--qc_host_busy:
- return SCSI_MLQUEUE_HOST_BUSY;
++ return SCSI_MLQUEUE_HOST_BUSY;
+-qc_host_busy:
+- return SCSI_MLQUEUE_HOST_BUSY;
+qc_target_busy:
+ return SCSI_MLQUEUE_TARGET_BUSY;
-+
+
qc_fail_command:
done(cmd);
-
-@@ -450,7 +460,10 @@ qla24xx_queuecommand(struct scsi_cmnd *c
+@@ -450,7 +460,10 @@
scsi_qla_host_t *pha = to_qla_parent(ha);
if (unlikely(pci_channel_offline(pha->pdev))) {
goto qc24_fail_command;
}
-@@ -461,10 +474,8 @@ qla24xx_queuecommand(struct scsi_cmnd *c
+@@ -461,10 +474,8 @@
}
/* Close window on fcport/rport state-transitioning. */
if (atomic_read(&fcport->state) != FCS_ONLINE) {
if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
-@@ -472,7 +483,7 @@ qla24xx_queuecommand(struct scsi_cmnd *c
+@@ -472,7 +483,7 @@
cmd->result = DID_NO_CONNECT << 16;
goto qc24_fail_command;
}
}
spin_unlock_irq(ha->host->host_lock);
-@@ -495,10 +506,11 @@ qc24_host_busy_free_sp:
+@@ -495,9 +506,10 @@
qc24_host_busy_lock:
spin_lock_irq(ha->host->host_lock);
--
--qc24_host_busy:
- return SCSI_MLQUEUE_HOST_BUSY;
++ return SCSI_MLQUEUE_HOST_BUSY;
+-qc24_host_busy:
+- return SCSI_MLQUEUE_HOST_BUSY;
+qc24_target_busy:
+ return SCSI_MLQUEUE_TARGET_BUSY;
-+
+
qc24_fail_command:
done(cmd);
-
-@@ -730,6 +742,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
+@@ -730,6 +742,7 @@
if (ha->isp_ops->abort_command(ha, sp)) {
DEBUG2(printk("%s(%ld): abort_command "
"mbx failed.\n", __func__, ha->host_no));
} else {
DEBUG3(printk("%s(%ld): abort_command "
"mbx success.\n", __func__, ha->host_no));
-@@ -1517,6 +1530,7 @@ qla2xxx_scan_start(struct Scsi_Host *sho
+@@ -1517,6 +1530,7 @@
set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags);
set_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags);
set_bit(RSCN_UPDATE, &ha->dpc_flags);
}
static int
-@@ -1663,8 +1677,6 @@ qla2x00_probe_one(struct pci_dev *pdev,
+@@ -1663,8 +1677,6 @@
ha->gid_list_info_size = 8;
ha->optrom_size = OPTROM_SIZE_25XX;
ha->isp_ops = &qla25xx_isp_ops;
}
host->can_queue = ha->request_q_length + 128;
-@@ -1672,6 +1684,7 @@ qla2x00_probe_one(struct pci_dev *pdev,
+@@ -1672,6 +1684,7 @@
init_completion(&ha->mbx_cmd_comp);
complete(&ha->mbx_cmd_comp);
init_completion(&ha->mbx_intr_comp);
INIT_LIST_HEAD(&ha->list);
INIT_LIST_HEAD(&ha->fcports);
-@@ -1792,6 +1805,8 @@ qla2x00_remove_one(struct pci_dev *pdev)
+@@ -1791,6 +1804,8 @@
+ qla84xx_put_chip(ha);
qla2x00_free_sysfs_attr(ha);
-
-+ qla_free_nlnk_dmabuf(ha);
+
++ qla_free_nlnk_dmabuf(ha);
+
fc_remove_host(ha->host);
- scsi_remove_host(ha->host);
-@@ -2022,10 +2037,19 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
+@@ -2022,10 +2037,19 @@
sizeof(struct ct_sns_pkt), &ha->ct_sns_dma, GFP_KERNEL);
if (!ha->ct_sns)
goto fail_free_ms_iocb;
fail_free_ms_iocb:
dma_pool_free(ha->s_dma_pool, ha->ms_iocb, ha->ms_iocb_dma);
ha->ms_iocb = NULL;
-@@ -2094,6 +2118,10 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
+@@ -2094,6 +2118,10 @@
dma_free_coherent(&ha->pdev->dev, sizeof(struct sns_cmd_pkt),
ha->sns_cmd, ha->sns_cmd_dma);
if (ha->ct_sns)
dma_free_coherent(&ha->pdev->dev, sizeof(struct ct_sns_pkt),
ha->ct_sns, ha->ct_sns_dma);
-@@ -2132,6 +2160,8 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
+@@ -2132,6 +2160,8 @@
ha->sns_cmd_dma = 0;
ha->ct_sns = NULL;
ha->ct_sns_dma = 0;
ha->ms_iocb = NULL;
ha->ms_iocb_dma = 0;
ha->init_cb = NULL;
-@@ -2433,6 +2463,12 @@ qla2x00_do_dpc(void *data)
- ha->host_no));
- }
+@@ -2431,6 +2461,12 @@
+ DEBUG(printk("scsi(%ld): qla2x00_loop_resync - end\n",
+ ha->host_no));
++ }
++
+ if (test_bit(NPIV_CONFIG_NEEDED, &ha->dpc_flags) &&
+ atomic_read(&ha->loop_state) == LOOP_READY) {
+ clear_bit(NPIV_CONFIG_NEEDED, &ha->dpc_flags);
+ qla2xxx_flash_npiv_conf(ha);
-+ }
-+
- if (!ha->interrupts_on)
- ha->isp_ops->enable_intrs(ha);
+ }
-@@ -2732,6 +2768,8 @@ qla2x00_release_firmware(void)
+ if (!ha->interrupts_on)
+@@ -2732,6 +2768,8 @@
static pci_ers_result_t
qla2xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
{
switch (state) {
case pci_channel_io_normal:
return PCI_ERS_RESULT_CAN_RECOVER;
-@@ -2739,7 +2777,7 @@ qla2xxx_pci_error_detected(struct pci_de
+@@ -2739,7 +2777,7 @@
pci_disable_device(pdev);
return PCI_ERS_RESULT_NEED_RESET;
case pci_channel_io_perm_failure:
return PCI_ERS_RESULT_DISCONNECT;
}
return PCI_ERS_RESULT_NEED_RESET;
-@@ -2899,10 +2937,18 @@ qla2x00_module_init(void)
+@@ -2899,10 +2937,18 @@
return -ENODEV;
}
kmem_cache_destroy(srb_cachep);
fc_release_transport(qla2xxx_transport_template);
fc_release_transport(qla2xxx_transport_vport_template);
-@@ -2918,6 +2964,7 @@ qla2x00_module_exit(void)
+@@ -2918,6 +2964,7 @@
{
pci_unregister_driver(&qla2xxx_pci_driver);
qla2x00_release_firmware();
kmem_cache_destroy(srb_cachep);
fc_release_transport(qla2xxx_transport_template);
fc_release_transport(qla2xxx_transport_vport_template);
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_sup.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_sup.c 2009-03-25 16:11:16.000000000 +0000
-@@ -543,23 +543,199 @@ qla24xx_get_flash_manufacturer(scsi_qla_
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_sup.c
+--- a/drivers/scsi/qla2xxx/qla_sup.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_sup.c Wed May 06 16:56:35 2009 +0100
+@@ -543,23 +543,199 @@
}
}
-qla2xxx_get_flash_info(scsi_qla_host_t *ha)
+static int
+qla2xxx_find_flt_start(scsi_qla_host_t *ha, uint32_t *start)
-+{
+ {
+ const char *loc, *locations[] = { "DEF", "PCI" };
+ uint32_t pcihdr, pcids;
+ uint32_t *dcode;
+
+static void
+qla2xxx_get_fdt_info(scsi_qla_host_t *ha)
- {
++{
+#define FLASH_BLK_SIZE_4K 0x1000
#define FLASH_BLK_SIZE_32K 0x8000
#define FLASH_BLK_SIZE_64K 0x10000
if (*wptr == __constant_cpu_to_le16(0xffff))
goto no_flash_data;
if (fdt->sig[0] != 'Q' || fdt->sig[1] != 'L' || fdt->sig[2] != 'I' ||
-@@ -577,7 +753,9 @@ qla2xxx_get_flash_info(scsi_qla_host_t *
+@@ -577,7 +753,9 @@
goto no_flash_data;
}
ha->fdt_wrt_disable = fdt->wrt_disable_bits;
ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0300 | fdt->erase_cmd);
ha->fdt_block_size = le32_to_cpu(fdt->block_size);
-@@ -588,16 +766,12 @@ qla2xxx_get_flash_info(scsi_qla_host_t *
+@@ -588,16 +766,12 @@
flash_conf_to_access_addr(0x0300 | fdt->protect_sec_cmd):
flash_conf_to_access_addr(0x0336);
}
ha->fdt_wrt_disable = 0x9c;
ha->fdt_erase_cmd = flash_conf_to_access_addr(0x03d8);
switch (man_id) {
-@@ -614,8 +788,7 @@ no_flash_data:
+@@ -614,8 +788,7 @@
ha->fdt_block_size = FLASH_BLK_SIZE_64K;
break;
case 0x1f: /* Atmel 26DF081A. */
ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0320);
ha->fdt_unprotect_sec_cmd = flash_conf_to_access_addr(0x0339);
ha->fdt_protect_sec_cmd = flash_conf_to_access_addr(0x0336);
-@@ -625,14 +798,115 @@ no_flash_data:
+@@ -625,12 +798,113 @@
ha->fdt_block_size = FLASH_BLK_SIZE_64K;
break;
}
--
-- DEBUG2(qla_printk(KERN_DEBUG, ha, "Flash[MID]: (0x%x/0x%x) erase=0x%x "
-- "pro=%x upro=%x idx=%d wrtd=0x%x blk=0x%x.\n", man_id, flash_id,
+done:
+ DEBUG2(qla_printk(KERN_DEBUG, ha, "FDT[%s]: (0x%x/0x%x) erase=0x%x "
+ "pro=%x upro=%x wrtd=0x%x blk=0x%x.\n", loc, mid, fid,
- ha->fdt_erase_cmd, ha->fdt_protect_sec_cmd,
-- ha->fdt_unprotect_sec_cmd, ha->fdt_odd_index, ha->fdt_wrt_disable,
++ ha->fdt_erase_cmd, ha->fdt_protect_sec_cmd,
+ ha->fdt_unprotect_sec_cmd, ha->fdt_wrt_disable,
- ha->fdt_block_size));
- }
++ ha->fdt_block_size));
++}
+- DEBUG2(qla_printk(KERN_DEBUG, ha, "Flash[MID]: (0x%x/0x%x) erase=0x%x "
+- "pro=%x upro=%x idx=%d wrtd=0x%x blk=0x%x.\n", man_id, flash_id,
+- ha->fdt_erase_cmd, ha->fdt_protect_sec_cmd,
+- ha->fdt_unprotect_sec_cmd, ha->fdt_odd_index, ha->fdt_wrt_disable,
+- ha->fdt_block_size));
+int
+qla2xxx_get_flash_info(scsi_qla_host_t *ha)
+{
+ }
+done:
+ kfree(data);
-+}
-+
+ }
+
static void
- qla24xx_unprotect_flash(scsi_qla_host_t *ha)
- {
-@@ -683,12 +957,11 @@ qla24xx_write_flash_data(scsi_qla_host_t
+@@ -683,12 +957,11 @@
uint32_t dwords)
{
int ret;
ret = QLA_SUCCESS;
-@@ -710,13 +983,9 @@ qla24xx_write_flash_data(scsi_qla_host_t
+@@ -710,13 +983,9 @@
qla24xx_unprotect_flash(ha);
for (liter = 0; liter < dwords; liter++, faddr++, dwptr++) {
/* Are we at the beginning of a sector? */
if ((findex & rest_addr) == 0) {
-@@ -740,9 +1009,7 @@ qla24xx_write_flash_data(scsi_qla_host_t
+@@ -740,9 +1009,7 @@
/* Go with burst-write. */
if (optrom && (liter + OPTROM_BURST_DWORDS) <= dwords) {
/* Copy data to DMA'ble buffer. */
ret = qla2x00_load_ram(ha, optrom_dma,
flash_data_to_access_addr(faddr),
-@@ -920,7 +1187,8 @@ qla25xx_read_nvram_data(scsi_qla_host_t
+@@ -920,7 +1187,8 @@
dwptr = (uint32_t *)buf;
for (i = 0; i < bytes >> 2; i++, naddr++)
dwptr[i] = cpu_to_le32(qla24xx_read_flash_dword(ha,
return buf;
}
-@@ -935,10 +1203,10 @@ qla25xx_write_nvram_data(scsi_qla_host_t
+@@ -935,10 +1203,10 @@
dbuf = vmalloc(RMW_BUFFER_SIZE);
if (!dbuf)
return QLA_MEMORY_ALLOC_FAILED;
RMW_BUFFER_SIZE);
vfree(dbuf);
-@@ -2166,7 +2434,7 @@ qla2x00_get_flash_version(scsi_qla_host_
+@@ -2166,7 +2434,7 @@
memset(dbyte, 0, 8);
dcode = (uint16_t *)dbyte;
8);
DEBUG3(printk("%s(%ld): dumping fw ver from flash:\n",
__func__, ha->host_no));
-@@ -2177,7 +2445,7 @@ qla2x00_get_flash_version(scsi_qla_host_
+@@ -2177,7 +2445,7 @@
(dcode[0] == 0 && dcode[1] == 0 && dcode[2] == 0 &&
dcode[3] == 0)) {
DEBUG2(printk("%s(): Unrecognized fw revision at "
} else {
/* values are in big endian */
ha->fw_revision[0] = dbyte[0] << 16 | dbyte[1];
-@@ -2212,7 +2480,7 @@ qla24xx_get_flash_version(scsi_qla_host_
+@@ -2212,7 +2480,7 @@
dcode = mbuf;
/* Begin with first PCI expansion ROM header. */
last_image = 1;
do {
/* Verify PCI expansion ROM header. */
-@@ -2282,7 +2550,7 @@ qla24xx_get_flash_version(scsi_qla_host_
+@@ -2282,7 +2550,7 @@
memset(ha->fw_revision, 0, sizeof(ha->fw_revision));
dcode = mbuf;
for (i = 0; i < 4; i++)
dcode[i] = be32_to_cpu(dcode[i]);
-@@ -2291,7 +2559,7 @@ qla24xx_get_flash_version(scsi_qla_host_
+@@ -2291,7 +2559,7 @@
(dcode[0] == 0 && dcode[1] == 0 && dcode[2] == 0 &&
dcode[3] == 0)) {
DEBUG2(printk("%s(): Unrecognized fw version at %x.\n",
} else {
ha->fw_revision[0] = dcode[0];
ha->fw_revision[1] = dcode[1];
-@@ -2355,7 +2623,7 @@ qla2xxx_hw_event_store(scsi_qla_host_t *
+@@ -2355,7 +2623,7 @@
/* Locate first empty entry. */
for (;;) {
if (ha->hw_event_ptr >=
DEBUG2(qla_printk(KERN_WARNING, ha,
"HW event -- Log Full!\n"));
return QLA_MEMORY_ALLOC_FAILED;
-@@ -2391,7 +2659,7 @@ qla2xxx_hw_event_log(scsi_qla_host_t *ha
+@@ -2391,7 +2659,7 @@
int rval;
uint32_t marker[2], fdata[4];
return QLA_FUNCTION_FAILED;
DEBUG2(qla_printk(KERN_WARNING, ha,
-@@ -2406,7 +2674,7 @@ qla2xxx_hw_event_log(scsi_qla_host_t *ha
+@@ -2406,7 +2674,7 @@
QLA_DRIVER_PATCH_VER, QLA_DRIVER_BETA_VER);
/* Locate marker. */
for (;;) {
qla24xx_read_flash_data(ha, fdata, ha->hw_event_ptr,
4);
-@@ -2415,7 +2683,7 @@ qla2xxx_hw_event_log(scsi_qla_host_t *ha
+@@ -2415,7 +2683,7 @@
break;
ha->hw_event_ptr += FA_HW_EVENT_ENTRY_SIZE;
if (ha->hw_event_ptr >=
DEBUG2(qla_printk(KERN_WARNING, ha,
"HW event -- Log Full!\n"));
return QLA_MEMORY_ALLOC_FAILED;
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_version.h linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_version.h
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_version.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_version.h 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_version.h
+--- a/drivers/scsi/qla2xxx/qla_version.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_version.h Wed May 06 16:56:35 2009 +0100
@@ -7,7 +7,7 @@
/*
* Driver version
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 2
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/Kconfig linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/Kconfig
---- linux-2.6.27/drivers/scsi/qla4xxx/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/Kconfig 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/Kconfig
+--- a/drivers/scsi/qla4xxx/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/Kconfig Wed May 06 16:56:35 2009 +0100
@@ -1,7 +1,7 @@
config SCSI_QLA_ISCSI
tristate "QLogic ISP4XXX host adapter family support"
- This driver supports the QLogic 40xx (ISP4XXX) iSCSI host
+ This driver supports the QLogic 40xx (ISP4XXX) iSCSI host
adapter family.
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_dbg.c linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_dbg.c
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_dbg.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_dbg.c 2009-03-25 16:11:15.000000000 +0000
-@@ -6,10 +6,129 @@
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_dbg.c
+--- a/drivers/scsi/qla4xxx/ql4_dbg.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_dbg.c Wed May 06 16:56:35 2009 +0100
+@@ -6,9 +6,128 @@
*/
#include "ql4_def.h"
#include "ql4_glbl.h"
#include "ql4_dbg.h"
#include "ql4_inline.h"
-
++
+#include <scsi/scsi_dbg.h>
+
+void __dump_registers(struct scsi_qla_host *ha)
+ __dump_registers(ha);
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+}
-+
+
void qla4xxx_dump_buffer(void *b, uint32_t size)
{
- uint32_t cnt;
-@@ -27,7 +146,5 @@ void qla4xxx_dump_buffer(void *b, uint32
+@@ -27,7 +146,5 @@
else
printk(KERN_DEBUG " ");
}
+ printk(KERN_DEBUG "\n");
}
-
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_dbg.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_dbg.h
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_dbg.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_dbg.h 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_dbg.h
+--- a/drivers/scsi/qla4xxx/ql4_dbg.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_dbg.h Wed May 06 16:56:35 2009 +0100
@@ -12,44 +12,46 @@
/* #define QL_DEBUG_LEVEL_3 */ /* Output function tracing */
/* #define QL_DEBUG_LEVEL_4 */
-#else /* */
-#define DEBUG5(x) do {} while (0);
-#endif /* */
--
++#define DEBUG5(x) do {if(extended_error_logging & 0x10) x;} while (0);
++#else
++#define DEBUG5(x)
++#endif
+
-#if defined(QL_DEBUG_LEVEL_9)
-#define DEBUG9(x) do {x;} while (0);
-#else /* */
-#define DEBUG9(x) do {} while (0);
-#endif /* */
-+#define DEBUG5(x) do {if(extended_error_logging & 0x10) x;} while (0);
-+#else
-+#define DEBUG5(x)
-+#endif
-+
+#if defined(QL_DEBUG_LEVEL_6)
+#define DEBUG6(x) do {if(extended_error_logging & 0x20) x;} while (0);
+#else
+#endif
+
+#endif /*_QL4_DBG_*/
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_def.h
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_def.h 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_def.h
+--- a/drivers/scsi/qla4xxx/ql4_def.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_def.h Wed May 06 16:56:35 2009 +0100
@@ -90,10 +90,10 @@
***********************************/
#define MAX_HBAS 16
#define MAX_RESET_HA_RETRIES 2
-@@ -158,6 +157,7 @@ struct srb {
+@@ -158,6 +157,7 @@
struct ddb_entry *ddb;
uint16_t flags; /* (1) Status flags. */
#define SRB_DMA_VALID BIT_3 /* DMA Buffer mapped. */
#define SRB_GOT_SENSE BIT_4 /* sense data recieved. */
uint8_t state; /* (1) Status flags. */
-@@ -182,25 +182,12 @@ struct srb {
+@@ -182,25 +182,12 @@
uint16_t iocb_tov;
uint16_t iocb_cnt; /* Number of used iocbs */
uint16_t cc_stat;
struct ddb_entry {
struct list_head list; /* ddb list */
struct scsi_qla_host *ha;
-@@ -244,6 +231,8 @@ struct ddb_entry {
+@@ -244,6 +231,8 @@
uint8_t ip_addr[ISCSI_IPADDR_SIZE];
uint8_t iscsi_name[ISCSI_NAME_SIZE]; /* 72 x48 */
uint8_t iscsi_alias[0x20];
};
/*
-@@ -255,6 +244,8 @@ struct ddb_entry {
+@@ -255,6 +244,8 @@
* commands */
#define DDB_STATE_MISSING 2 /* Device logged off, trying
* to re-login */
/*
* DDB flags.
-@@ -262,9 +253,21 @@ struct ddb_entry {
+@@ -262,9 +253,21 @@
#define DF_RELOGIN 0 /* Relogin to device */
#define DF_NO_RELOGIN 1 /* Do not relogin if IOCTL
* logged it out */
+#define DF_SCAN_ISSUED 2
+#define DF_OFFLINE 3 /* Offline Device */
+#define DF_REMOVE 4 /* FW DDB is destroyed */
-+
+
+/*
+ * Asynchronous Event Queue structure
+ */
+struct aen {
+ uint32_t mbox_sts[MBOX_AEN_REG_COUNT];
+};
-
++
+struct ql4_aen_log {
+ int count;
+ struct aen entry[MAX_AEN_ENTRIES];
#include "ql4_fw.h"
#include "ql4_nvram.h"
-@@ -273,18 +276,30 @@ struct ddb_entry {
+@@ -273,18 +276,30 @@
* Linux Host Adapter structure
*/
struct scsi_qla_host {
unsigned long dpc_flags;
-@@ -293,12 +308,10 @@ struct scsi_qla_host {
+@@ -293,12 +308,10 @@
#define DPC_RELOGIN_DEVICE 3 /* 0x00000008 */
#define DPC_RESET_HA_DESTROY_DDB_LIST 4 /* 0x00000010 */
#define DPC_RESET_HA_INTR 5 /* 0x00000020 */
uint16_t iocb_cnt;
uint16_t iocb_hiwat;
-@@ -324,6 +337,7 @@ struct scsi_qla_host {
+@@ -324,6 +337,7 @@
/* NVRAM registers */
struct eeprom_data *nvram;
spinlock_t hardware_lock ____cacheline_aligned;
uint32_t eeprom_cmd_data;
/* Counters for general statistics */
-@@ -348,7 +362,6 @@ struct scsi_qla_host {
+@@ -348,7 +362,6 @@
uint32_t firmware_version[2];
uint32_t patch_number;
uint32_t build_number;
/* --- From Init_FW --- */
/* init_cb_t *init_cb; */
-@@ -368,6 +381,7 @@ struct scsi_qla_host {
+@@ -368,6 +381,7 @@
/* --- From GetFwState --- */
uint32_t firmware_state;
uint32_t addl_fw_state;
/* Linux kernel thread */
-@@ -390,6 +404,10 @@ struct scsi_qla_host {
+@@ -389,6 +403,10 @@
+ struct list_head free_srb_q;
uint16_t free_srb_q_count;
uint16_t num_srbs_allocated;
-
++
+ /* Active array */
+ struct srb *active_srb_array[MAX_SRBS];
+ uint16_t current_active_index;
-+
+
/* DMA Memory Block */
void *queues;
- dma_addr_t queues_dma;
-@@ -418,12 +436,20 @@ struct scsi_qla_host {
+@@ -418,12 +436,20 @@
uint16_t aen_out;
struct aen aen_q[MAX_AEN_ENTRIES];
/* temporary mailbox status registers */
volatile uint8_t mbox_status_count;
-@@ -434,7 +460,11 @@ struct scsi_qla_host {
+@@ -434,13 +460,18 @@
/* Map ddb_list entry by FW ddb index */
struct ddb_entry *fw_ddb_index_map[MAX_DDB_ENTRIES];
};
static inline int is_qla4010(struct scsi_qla_host *ha)
-@@ -442,6 +472,7 @@ static inline int is_qla4010(struct scsi
+ {
return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4010;
}
-
+
+
static inline int is_qla4022(struct scsi_qla_host *ha)
{
- return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4022;
-@@ -512,6 +543,20 @@ static inline void __iomem * isp_gp_out(
+@@ -510,6 +541,20 @@
+ return (is_qla4010(ha) ?
+ &ha->reg->u2.isp4010.gp_out :
&ha->reg->u2.isp4022.p0.gp_out);
- }
-
++}
++
+static inline void __iomem * isp_probe_mux_addr(struct scsi_qla_host *ha)
+{
+ return (is_qla4010(ha) ?
+ return (is_qla4010(ha) ?
+ &ha->reg->u2.isp4010.probe_mux_data :
+ &ha->reg->u2.isp4022.p0.probe_mux_data);
-+}
-+
+ }
+
static inline int eeprom_ext_hw_conf_offset(struct scsi_qla_host *ha)
- {
- return (is_qla4010(ha) ?
-@@ -590,5 +635,6 @@ static inline void ql4xxx_unlock_drvr(st
+@@ -590,5 +635,6 @@
#define PROCESS_ALL_AENS 0
#define FLUSH_DDB_CHANGED_AENS 1
#define RELOGIN_DDB_CHANGED_AENS 2
+#define PROCESS_FOR_PROBE 3
#endif /*_QLA4XXX_H */
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_fw.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_fw.h
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_fw.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_fw.h 2009-03-25 16:11:15.000000000 +0000
-@@ -27,7 +27,11 @@ struct port_ctrl_stat_regs {
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_fw.h
+--- a/drivers/scsi/qla4xxx/ql4_fw.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_fw.h Wed May 06 16:56:35 2009 +0100
+@@ -27,7 +27,11 @@
__le32 rsrvd1[32]; /* 0x60-0xdf */
__le32 gp_out; /* 0xe0 */
__le32 gp_in; /* 0xe4 */
__le32 port_err_status; /* 0xfc */
};
-@@ -61,7 +65,9 @@ struct isp_reg {
+@@ -61,7 +65,9 @@
__le32 req_q_in; /* SCSI Request Queue Producer Index */
__le32 rsp_q_out; /* SCSI Completion Queue Consumer Index */
union {
struct {
-@@ -79,7 +85,10 @@ struct isp_reg {
+@@ -79,7 +85,10 @@
__le32 gp_out; /* 0xe0 */
__le32 gp_in;
__le32 port_err_status; /* 0xfc */
} __attribute__ ((packed)) isp4010;
-@@ -216,7 +225,6 @@ union external_hw_config_reg {
+@@ -216,7 +225,6 @@
#define MBOX_CMD_ABOUT_FW 0x0009
#define MBOX_CMD_PING 0x000B
#define MBOX_CMD_LUN_RESET 0x0016
#define MBOX_CMD_GET_MANAGEMENT_DATA 0x001E
#define MBOX_CMD_GET_FW_STATUS 0x001F
#define MBOX_CMD_SET_ISNS_SERVICE 0x0021
-@@ -431,8 +439,9 @@ struct init_fw_ctrl_blk {
+@@ -431,8 +439,9 @@
struct dev_db_entry {
uint16_t options; /* 00-01 */
uint16_t exec_throttle; /* 02-03 */
uint16_t exec_count; /* 04-05 */
-@@ -672,14 +681,13 @@ struct continuation_t1_entry {
+@@ -672,14 +681,13 @@
#define ET_CONTINUE ET_CONT_T1
/* Marker entry structure*/
uint16_t flags; /* 0C-0D */
uint16_t reserved1; /* 0E-0F */
-@@ -733,6 +741,15 @@ struct status_entry {
+@@ -733,6 +741,15 @@
};
struct passthru0 {
struct qla4_header hdr; /* 00-03 */
uint32_t handle; /* 04-07 */
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_glbl.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_glbl.h
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_glbl.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_glbl.h 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_glbl.h
+--- a/drivers/scsi/qla4xxx/ql4_glbl.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_glbl.h Wed May 06 16:56:35 2009 +0100
@@ -10,16 +10,17 @@
struct iscsi_cls_conn;
void qla4xxx_process_aen(struct scsi_qla_host * ha, uint8_t process_aen);
int qla4xxx_get_dhcp_ip_address(struct scsi_qla_host * ha);
-@@ -27,8 +28,6 @@ int qla4xxx_relogin_device(struct scsi_q
+@@ -27,8 +28,6 @@
struct ddb_entry * ddb_entry);
int qla4xxx_reset_lun(struct scsi_qla_host * ha, struct ddb_entry * ddb_entry,
int lun);
int qla4xxx_get_flash(struct scsi_qla_host * ha, dma_addr_t dma_addr,
uint32_t offset, uint32_t len);
int qla4xxx_get_firmware_status(struct scsi_qla_host * ha);
-@@ -48,6 +47,8 @@ int qla4xxx_get_fwddb_entry(struct scsi_
+@@ -48,6 +47,8 @@
uint16_t *tcp_source_port_num,
uint16_t *connection_id);
int qla4xxx_set_ddb_entry(struct scsi_qla_host * ha, uint16_t fw_ddb_index,
dma_addr_t fw_ddb_entry_dma);
-@@ -56,25 +57,31 @@ void qla4xxx_mark_device_missing(struct
+@@ -56,25 +57,31 @@
u16 rd_nvram_word(struct scsi_qla_host * ha, int offset);
void qla4xxx_get_crash_record(struct scsi_qla_host * ha);
struct ddb_entry *qla4xxx_alloc_sess(struct scsi_qla_host *ha);
-int qla4xxx_send_marker_iocb(struct scsi_qla_host *ha,
- struct ddb_entry *ddb_entry, int lun, uint16_t mrkr_mod);
+ uint32_t fw_ddb_index, uint32_t state, uint32_t probe);
-+
-+int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount,
-+ uint8_t outCount, uint32_t *mbx_cmd, uint32_t *mbx_sts);
-extern int ql4xextended_error_logging;
++int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount,
++ uint8_t outCount, uint32_t *mbx_cmd, uint32_t *mbx_sts);
++
+extern int extended_error_logging;
extern int ql4xdiscoverywait;
extern int ql4xdontresethba;
extern int ql4_mod_unload;
-#endif /* _QLA4x_GBL_H */
+#endif /* _QLA4x_GBL_H */
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_init.c
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_init.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_init.c
+--- a/drivers/scsi/qla4xxx/ql4_init.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_init.c Wed May 06 16:56:35 2009 +0100
@@ -5,14 +5,20 @@
* See LICENSE.qla4xxx for copyright and licensing details.
*/
static void ql4xxx_set_mac_number(struct scsi_qla_host *ha)
{
-@@ -51,16 +57,16 @@ static void ql4xxx_set_mac_number(struct
+@@ -51,16 +57,16 @@
* This routine deallocates and unlinks the specified ddb_entry from the
* adapter's
**/
/* Free memory and scsi-ml struct for device entry */
qla4xxx_destroy_sess(ddb_entry);
-@@ -95,6 +101,7 @@ void qla4xxx_free_ddb_list(struct scsi_q
+@@ -95,6 +101,7 @@
**/
int qla4xxx_init_rings(struct scsi_qla_host *ha)
{
unsigned long flags = 0;
/* Initialize request queue. */
-@@ -123,6 +130,10 @@ int qla4xxx_init_rings(struct scsi_qla_h
+@@ -122,6 +129,10 @@
+ writel(0, &ha->reg->req_q_in);
writel(0, &ha->reg->rsp_q_out);
readl(&ha->reg->rsp_q_out);
-
++
+ /* Initialize active array */
+ for (i = 0; i < MAX_SRBS; i++)
+ ha->active_srb_array[i] = NULL;
-+
+
spin_unlock_irqrestore(&ha->hardware_lock, flags);
- return QLA_SUCCESS;
-@@ -183,6 +194,16 @@ static int qla4xxx_validate_mac_address(
+@@ -183,6 +194,16 @@
**/
static int qla4xxx_init_local_data(struct scsi_qla_host *ha)
{
/* Initilize aen queue */
ha->aen_q_count = MAX_AEN_ENTRIES;
-@@ -248,14 +269,6 @@ static int qla4xxx_fw_ready(struct scsi_
+@@ -248,14 +269,6 @@
(ha->addl_fw_state &
FW_ADDSTATE_LINK_UP) != 0 ?
"UP" : "DOWN"));
ready = 1;
break;
}
-@@ -263,12 +276,10 @@ static int qla4xxx_fw_ready(struct scsi_
+@@ -263,12 +276,10 @@
"seconds expired= %d\n", ha->host_no, __func__,
ha->firmware_state, ha->addl_fw_state,
timeout_count));
msleep(1000);
} /* end of for */
-@@ -276,7 +287,8 @@ static int qla4xxx_fw_ready(struct scsi_
+@@ -276,7 +287,8 @@
DEBUG2(printk("scsi%ld: %s: FW Initialization timed out!\n",
ha->host_no, __func__));
DEBUG2(printk("scsi%ld: %s: FW is reporting its waiting to"
" grab an IP address from DHCP server\n",
ha->host_no, __func__));
-@@ -307,145 +319,28 @@ static int qla4xxx_init_firmware(struct
+@@ -307,145 +319,28 @@
return qla4xxx_get_firmware_status(ha);
}
-static struct ddb_entry* qla4xxx_get_ddb_entry(struct scsi_qla_host *ha,
- uint32_t fw_ddb_index,
- uint32_t *new_tgt)
--{
++static void qla4xxx_fill_ddb(struct ddb_entry *ddb_entry,
++ struct dev_db_entry *fw_ddb_entry)
+ {
- struct dev_db_entry *fw_ddb_entry = NULL;
- dma_addr_t fw_ddb_entry_dma;
- struct ddb_entry *ddb_entry = NULL;
-static int qla4xxx_update_ddb_entry(struct scsi_qla_host *ha,
- struct ddb_entry *ddb_entry,
- uint32_t fw_ddb_index)
-+static void qla4xxx_fill_ddb(struct ddb_entry *ddb_entry,
-+ struct dev_db_entry *fw_ddb_entry)
- {
+-{
- struct dev_db_entry *fw_ddb_entry = NULL;
- dma_addr_t fw_ddb_entry_dma;
- int status = QLA_ERROR;
}
/**
-@@ -456,8 +351,8 @@ static int qla4xxx_update_ddb_entry(stru
+@@ -456,8 +351,8 @@
* This routine allocates a ddb_entry, ititializes some values, and
* inserts it into the ddb list.
**/
{
struct ddb_entry *ddb_entry;
-@@ -478,6 +373,12 @@ static struct ddb_entry * qla4xxx_alloc_
+@@ -478,6 +373,12 @@
atomic_set(&ddb_entry->relogin_timer, 0);
atomic_set(&ddb_entry->relogin_retry_count, 0);
atomic_set(&ddb_entry->state, DDB_STATE_ONLINE);
list_add_tail(&ddb_entry->list, &ha->ddb_list);
ha->fw_ddb_index_map[fw_ddb_index] = ddb_entry;
ha->tot_ddbs++;
-@@ -501,90 +402,103 @@ static int qla4xxx_build_ddb_list(struct
+@@ -501,90 +402,103 @@
uint32_t ddb_state;
uint32_t conn_err, err_code;
struct ddb_entry *ddb_entry;
- */
- DEBUG2(printk("scsi%ld: %s: DDB[%d] added to list\n",
- ha->host_no, __func__, fw_ddb_index));
--
++ if (!(le16_to_cpu(fw_ddb_entry->options) & DDB_OPT_DISC_SESSION) &&
++ (ddb_state != DDB_DS_UNASSIGNED) &&
++ (strlen(fw_ddb_entry->iscsi_name) != 0)){
++ ddb_entry = qla4xxx_alloc_ddb(ha, fw_ddb_index);
++ if (ddb_entry == NULL) {
++ DEBUG2(dev_info(&ha->pdev->dev,"%s alloc_ddb %d"
++ "failed\n", __func__, fw_ddb_index));
++ goto exit_ddb_list;
++ }
++ ddb_entry->fw_ddb_index = fw_ddb_index;
++ ha->fw_ddb_index_map[fw_ddb_index] = ddb_entry;
++ ddb_entry->tcp_source_port_num = src_port;
++ ddb_entry->connection_id = conn_id;
++ qla4xxx_fill_ddb(ddb_entry, fw_ddb_entry);
++ ddb_entry->fw_ddb_device_state = ddb_state;
+
- /* Add DDB to internal our ddb list. */
- ddb_entry = qla4xxx_get_ddb_entry(ha, fw_ddb_index, &new_tgt);
- if (ddb_entry == NULL) {
- "for fw_ddb_index %d.\n",
- ha->host_no, __func__, fw_ddb_index));
- return QLA_ERROR;
-+ if (!(le16_to_cpu(fw_ddb_entry->options) & DDB_OPT_DISC_SESSION) &&
-+ (ddb_state != DDB_DS_UNASSIGNED) &&
-+ (strlen(fw_ddb_entry->iscsi_name) != 0)){
-+ ddb_entry = qla4xxx_alloc_ddb(ha, fw_ddb_index);
-+ if (ddb_entry == NULL) {
-+ DEBUG2(dev_info(&ha->pdev->dev,"%s alloc_ddb %d"
-+ "failed\n", __func__, fw_ddb_index));
-+ goto exit_ddb_list;
-+ }
-+ ddb_entry->fw_ddb_index = fw_ddb_index;
-+ ha->fw_ddb_index_map[fw_ddb_index] = ddb_entry;
-+ ddb_entry->tcp_source_port_num = src_port;
-+ ddb_entry->connection_id = conn_id;
-+ qla4xxx_fill_ddb(ddb_entry, fw_ddb_entry);
-+ ddb_entry->fw_ddb_device_state = ddb_state;
-+
+ DEBUG6(dev_info(&ha->pdev->dev, "%s: DDB[%d] osIdx = %d State %04x"
+ " ConnErr %08x %d.%d.%d.%d:%04d \"%s\"\n", __func__,
+ fw_ddb_index, ddb_entry->os_target_id, ddb_state, conn_err,
dev_info(&ha->pdev->dev, "DDB list done..\n");
return status;
-@@ -682,15 +596,18 @@ static int qla4_scan_for_relogin(struct
+@@ -682,15 +596,18 @@
static int qla4xxx_devices_ready(struct scsi_qla_host *ha)
{
int error;
- unsigned long discovery_wtime;
+ unsigned long discovery_wtime = 0;
struct qla4_relog_scan rs;
-
-- discovery_wtime = jiffies + (ql4xdiscoverywait * HZ);
-
+- discovery_wtime = jiffies + (ql4xdiscoverywait * HZ);
+
DEBUG(printk("Waiting (%d) for devices ...\n", ql4xdiscoverywait));
do {
/* poll for AEN. */
if (test_and_clear_bit(DPC_AEN, &ha->dpc_flags)) {
/* Set time-between-relogin timer */
qla4xxx_process_aen(ha, RELOGIN_DDB_CHANGED_AENS);
-@@ -708,7 +625,8 @@ static int qla4xxx_devices_ready(struct
+@@ -708,7 +625,8 @@
}
msleep(2000);
DEBUG3(qla4xxx_get_conn_event_log(ha));
-@@ -750,13 +668,15 @@ static int qla4xxx_initialize_ddb_list(s
+@@ -750,12 +668,14 @@
qla4xxx_free_ddb_list(ha);
for (fw_ddb_index = 0; fw_ddb_index < MAX_DDB_ENTRIES; fw_ddb_index++)
ha->tot_ddbs = 0;
qla4xxx_flush_AENS(ha);
-
++
+ /* Wait for an AEN */
+ qla4xxx_devices_ready(ha);
-+
+
/*
* First perform device discovery for active
- * fw ddb indexes and build
-@@ -765,21 +685,18 @@ static int qla4xxx_initialize_ddb_list(s
+@@ -765,21 +685,18 @@
if ((status = qla4xxx_build_ddb_list(ha)) == QLA_ERROR)
return status;
* @ha: pointer to host adapter structure.
*
* This routine obtains device information from the F/W database after
-@@ -789,19 +706,40 @@ int qla4xxx_reinitialize_ddb_list(struct
+@@ -789,19 +706,40 @@
{
int status = QLA_SUCCESS;
struct ddb_entry *ddb_entry, *detemp;
return status;
}
-@@ -884,12 +822,11 @@ static int qla4xxx_config_nvram(struct s
+@@ -884,12 +822,11 @@
static void qla4x00_pci_config(struct scsi_qla_host *ha)
{
uint16_t w;
/*
* We want to respect framework's setting of PCI configuration space
* command register and also want to make sure that all bits of
-@@ -928,8 +865,8 @@ static int qla4xxx_start_firmware_from_f
+@@ -928,8 +865,8 @@
writel(set_rmask(NVR_WRITE_ENABLE),
&ha->reg->u1.isp4022.nvram);
writel(set_rmask(CSR_BOOT_ENABLE), &ha->reg->ctrl_status);
readl(&ha->reg->ctrl_status);
-@@ -1007,7 +944,7 @@ int ql4xxx_lock_drvr_wait(struct scsi_ql
+@@ -1007,7 +944,7 @@
* qla4xxx_start_firmware - starts qla4xxx firmware
* @ha: Pointer to host adapter structure.
*
* the QLA4010 adapter.
**/
static int qla4xxx_start_firmware(struct scsi_qla_host *ha)
-@@ -1098,7 +1035,7 @@ static int qla4xxx_start_firmware(struct
+@@ -1098,7 +1035,7 @@
}
config_chip = 1;
if (ql4xxx_lock_drvr_wait(ha) != QLA_SUCCESS)
return QLA_ERROR;
}
-@@ -1163,12 +1100,12 @@ int qla4xxx_initialize_adapter(struct sc
+@@ -1163,12 +1100,12 @@
* followed by 0x8014 aen" to trigger the tgt discovery process.
*/
if (ha->firmware_state & FW_STATE_DHCP_IN_PROGRESS)
if (renew_ddb_list == PRESERVE_DDB_LIST) {
/*
-@@ -1197,8 +1134,10 @@ int qla4xxx_initialize_adapter(struct sc
+@@ -1197,8 +1134,10 @@
ha->host_no));
}
exit_init_hba:
return status;
}
-@@ -1211,51 +1150,109 @@ exit_init_hba:
+@@ -1211,51 +1150,109 @@
* This routine processes adds a device as a result of an 8014h AEN.
**/
static void qla4xxx_add_device_dynamically(struct scsi_qla_host *ha,
- if (!new_tgt && (ddb_entry->fw_ddb_index != fw_ddb_index)) {
- /* Target has been bound to a new fw_ddb_index */
- qla4xxx_free_ddb(ha, ddb_entry);
+- ddb_entry = qla4xxx_alloc_ddb(ha, fw_ddb_index);
+- if (ddb_entry == NULL) {
+- DEBUG2(printk(KERN_WARNING
+- "scsi%ld: Unable to allocate memory"
+- " to add fw_ddb_index %d\n",
+- ha->host_no, fw_ddb_index));
+- return;
+- }
+- }
+- if (qla4xxx_update_ddb_entry(ha, ddb_entry, fw_ddb_index) ==
+- QLA_ERROR) {
+- ha->fw_ddb_index_map[fw_ddb_index] =
+- (struct ddb_entry *)INVALID_ENTRY;
+- DEBUG2(printk(KERN_WARNING
+- "scsi%ld: failed to add new device at index "
+- "[%d]\n Unable to retrieve fw ddb entry\n",
+- ha->host_no, fw_ddb_index));
+- qla4xxx_free_ddb(ha, ddb_entry);
+ if (qla4xxx_get_fwddb_entry(ha, fw_ddb_index, fw_ddb_entry,
+ fw_ddb_entry_dma, NULL, NULL, &ddb_state, NULL, &src_port,
+ &conn_id) == QLA_ERROR) {
+ DEBUG2(dev_info(&ha->pdev->dev, "%s getddb %d failed\n",
+ __func__, fw_ddb_index));
-+ return;
-+ }
-+
+ return;
+ }
+
+- if (qla4xxx_add_sess(ddb_entry)) {
+- DEBUG2(printk(KERN_WARNING
+- "scsi%ld: failed to add new device at index "
+- "[%d]\n Unable to add connection and session\n",
+- ha->host_no, fw_ddb_index));
+- qla4xxx_free_ddb(ha, ddb_entry);
+ list_for_each_entry(ddb_entry, &ha->ddb_list, list) {
+ if ((memcmp(ddb_entry->iscsi_name, fw_ddb_entry->iscsi_name,
+ ISCSI_NAME_SIZE) == 0) &&
+ ddb_entry->state, fw_ddb_index, ddb_entry->fw_ddb_index));
+ break;
+ }
-+ }
+ }
+
+ if (!found) {
- ddb_entry = qla4xxx_alloc_ddb(ha, fw_ddb_index);
++ ddb_entry = qla4xxx_alloc_ddb(ha, fw_ddb_index);
+
- if (ddb_entry == NULL) {
-- DEBUG2(printk(KERN_WARNING
-- "scsi%ld: Unable to allocate memory"
-- " to add fw_ddb_index %d\n",
-- ha->host_no, fw_ddb_index));
-- return;
++ if (ddb_entry == NULL) {
+ DEBUG2(dev_info(&ha->pdev->dev, "%s NULL DDB %d\n",
+ __func__, fw_ddb_index));
+ goto exit_dyn_add;
- }
-- }
-- if (qla4xxx_update_ddb_entry(ha, ddb_entry, fw_ddb_index) ==
-- QLA_ERROR) {
-- ha->fw_ddb_index_map[fw_ddb_index] =
-- (struct ddb_entry *)INVALID_ENTRY;
-- DEBUG2(printk(KERN_WARNING
-- "scsi%ld: failed to add new device at index "
-- "[%d]\n Unable to retrieve fw ddb entry\n",
-- ha->host_no, fw_ddb_index));
-- qla4xxx_free_ddb(ha, ddb_entry);
-- return;
-- }
-
-- if (qla4xxx_add_sess(ddb_entry)) {
-- DEBUG2(printk(KERN_WARNING
-- "scsi%ld: failed to add new device at index "
-- "[%d]\n Unable to add connection and session\n",
-- ha->host_no, fw_ddb_index));
-- qla4xxx_free_ddb(ha, ddb_entry);
++ }
++
+ ddb_entry->fw_ddb_index = fw_ddb_index;
+ ha->fw_ddb_index_map[fw_ddb_index] = ddb_entry;
+ ddb_entry->tcp_source_port_num = src_port;
+ DEBUG6(dev_info(&ha->pdev->dev, "%s calling conn_start ddb 0x%p sess 0x%p"
+ " conn 0x%p state 0x%x\n", __func__, ddb_entry, ddb_entry->sess,
+ ddb_entry->conn, ddb_entry->state));
- }
++ }
+exit_dyn_add:
+ dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), fw_ddb_entry,
+ fw_ddb_entry_dma);
}
/**
-@@ -1267,11 +1264,13 @@ static void qla4xxx_add_device_dynamical
+@@ -1267,11 +1264,13 @@
* This routine processes a Decive Database Changed AEN Event.
**/
int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha,
/* check for out of range index */
if (fw_ddb_index >= MAX_DDB_ENTRIES)
return QLA_ERROR;
-@@ -1281,15 +1280,18 @@ int qla4xxx_process_ddb_changed(struct s
+@@ -1281,15 +1280,18 @@
/* Device does not currently exist in our database. */
if (ddb_entry == NULL) {
if (state == DDB_DS_SESSION_ACTIVE)
if (old_fw_ddb_device_state == state &&
state == DDB_DS_SESSION_ACTIVE) {
/* Do nothing, state not changed. */
-@@ -1297,25 +1299,50 @@ int qla4xxx_process_ddb_changed(struct s
+@@ -1297,25 +1299,50 @@
}
ddb_entry->fw_ddb_device_state = state;
if (atomic_read(&ddb_entry->state) == DDB_STATE_ONLINE)
qla4xxx_mark_device_missing(ha, ddb_entry);
/*
-@@ -1325,8 +1352,7 @@ int qla4xxx_process_ddb_changed(struct s
+@@ -1325,8 +1352,7 @@
*/
if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_FAILED &&
!test_bit(DF_RELOGIN, &ddb_entry->flags) &&
/*
* This triggers a relogin. After the relogin_timer
* expires, the relogin gets scheduled. We must wait a
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_inline.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_inline.h
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_inline.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_inline.h 2009-03-25 16:11:15.000000000 +0000
-@@ -24,8 +24,7 @@ qla4xxx_lookup_ddb_by_fw_index(struct sc
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_inline.h
+--- a/drivers/scsi/qla4xxx/ql4_inline.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_inline.h Wed May 06 16:56:35 2009 +0100
+@@ -24,8 +24,7 @@
struct ddb_entry *ddb_entry = NULL;
if ((fw_ddb_index < MAX_DDB_ENTRIES) &&
ddb_entry = ha->fw_ddb_index_map[fw_ddb_index];
}
-@@ -35,6 +34,34 @@ qla4xxx_lookup_ddb_by_fw_index(struct sc
- return ddb_entry;
- }
+@@ -33,6 +32,34 @@
+ ha->host_no, __func__, fw_ddb_index, ddb_entry));
+ return ddb_entry;
++}
++
+/*
+ * The MBOX_CMD_CLEAR_DATABASE_ENTRY (0x31) mailbox command does not
+ * result in an AEN, so we need to process it seperately.
+ queue_work(ha->dpc_thread, &ha->dpc_work);
+ }
+ }
-+}
-+
+ }
+
static inline void
- __qla4xxx_enable_intrs(struct scsi_qla_host *ha)
- {
-@@ -82,3 +109,118 @@ qla4xxx_disable_intrs(struct scsi_qla_ho
+@@ -82,3 +109,118 @@
__qla4xxx_disable_intrs(ha);
spin_unlock_irqrestore(&ha->hardware_lock, flags);
}
+ return iocbs;
+}
+
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_iocb.c linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_iocb.c
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_iocb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_iocb.c 2009-03-25 16:11:15.000000000 +0000
-@@ -6,137 +6,13 @@
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_iocb.c
+--- a/drivers/scsi/qla4xxx/ql4_iocb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_iocb.c Wed May 06 16:56:35 2009 +0100
+@@ -6,136 +6,12 @@
*/
#include "ql4_def.h"
-
#include <scsi/scsi_tcq.h>
-
+-
-/**
- * qla4xxx_get_req_pkt - returns a valid entry in request queue.
- * @ha: Pointer to host adapter structure.
- }
- return iocbs;
-}
--
+
static void qla4xxx_build_scsi_iocbs(struct srb *srb,
struct command_t3_entry *cmd_entry,
- uint16_t tot_dsds)
-@@ -151,15 +27,22 @@ static void qla4xxx_build_scsi_iocbs(str
+@@ -151,14 +27,21 @@
cmd = srb->cmd;
ha = srb->ha;
cmd_entry->ttlByteCnt = __constant_cpu_to_le32(0);
return;
}
-
+-
- avail_dsds = COMMAND_SEG;
- cur_dsd = (struct data_seg_a64 *) & (cmd_entry->dataseg[0]);
--
+
scsi_for_each_sg(cmd, sg, tot_dsds, i) {
dma_addr_t sle_dma;
-
-@@ -204,6 +87,7 @@ int qla4xxx_send_command_to_isp(struct s
+@@ -204,6 +87,7 @@
unsigned long flags;
uint16_t cnt;
uint32_t index;
char tag[2];
-@@ -215,13 +99,33 @@ int qla4xxx_send_command_to_isp(struct s
+@@ -215,13 +99,33 @@
/* Acquire hardware specific lock */
spin_lock_irqsave(&ha->hardware_lock, flags);
req_cnt = qla4xxx_calc_request_entries(tot_dsds);
-@@ -251,16 +155,19 @@ int qla4xxx_send_command_to_isp(struct s
+@@ -251,16 +155,19 @@
int_to_scsilun(cmd->device->lun, &cmd_entry->lun);
cmd_entry->cmdSeqNum = cpu_to_le32(ddb_entry->CmdSn);
if (scsi_bufflen(cmd)) {
if (cmd->sc_data_direction == DMA_TO_DEVICE)
cmd_entry->control_flags = CF_WRITE;
-@@ -286,7 +193,6 @@ int qla4xxx_send_command_to_isp(struct s
+@@ -286,7 +193,6 @@
break;
}
/* Advance request queue pointer */
ha->request_in++;
if (ha->request_in == REQUEST_QUEUE_DEPTH) {
-@@ -300,11 +206,11 @@ int qla4xxx_send_command_to_isp(struct s
+@@ -300,11 +206,11 @@
wmb();
/*
if (!test_bit(AF_ONLINE, &ha->flags)) {
DEBUG2(printk("scsi%ld: %s: Adapter OFFLINE! "
"Do not issue command.\n",
-@@ -313,6 +219,7 @@ int qla4xxx_send_command_to_isp(struct s
+@@ -313,6 +219,7 @@
}
srb->cmd->host_scribble = (unsigned char *)srb;
/* update counters */
srb->state = SRB_ACTIVE_STATE;
-@@ -331,11 +238,11 @@ int qla4xxx_send_command_to_isp(struct s
+@@ -331,11 +238,11 @@
return QLA_SUCCESS;
queuing_error:
return QLA_ERROR;
}
-
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_isr.c
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_isr.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_isr.c
+--- a/drivers/scsi/qla4xxx/ql4_isr.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_isr.c Wed May 06 16:56:35 2009 +0100
@@ -6,9 +6,11 @@
*/
/**
* qla4xxx_status_entry - processes status IOCBs
-@@ -27,11 +29,6 @@ static void qla4xxx_status_entry(struct
+@@ -27,11 +29,6 @@
srb = qla4xxx_del_from_active_array(ha, le32_to_cpu(sts_entry->handle));
if (!srb) {
dev_warn(&ha->pdev->dev, "%s invalid status entry:"
" handle=0x%0x\n", __func__, sts_entry->handle);
set_bit(DPC_RESET_HA, &ha->dpc_flags);
-@@ -40,12 +37,9 @@ static void qla4xxx_status_entry(struct
+@@ -40,12 +37,9 @@
cmd = srb->cmd;
if (cmd == NULL) {
return;
}
-@@ -61,27 +55,15 @@ static void qla4xxx_status_entry(struct
+@@ -61,27 +55,15 @@
scsi_status = sts_entry->scsiStatus;
switch (sts_entry->completionStatus) {
case SCS_COMPLETE:
break;
}
}
-@@ -92,14 +74,15 @@ static void qla4xxx_status_entry(struct
+@@ -92,14 +74,15 @@
break;
/* Copy Sense Data into sense buffer. */
DEBUG2(printk("scsi%ld:%d:%d:%d: %s: sense key = %x, "
"ASC/ASCQ = %02x/%02x\n", ha->host_no,
-@@ -139,7 +122,7 @@ static void qla4xxx_status_entry(struct
+@@ -139,7 +122,7 @@
ha->host_no, cmd->device->channel,
cmd->device->id, cmd->device->lun));
/*
* Mark device missing so that we won't continue to send
-@@ -163,7 +146,7 @@ static void qla4xxx_status_entry(struct
+@@ -163,7 +146,7 @@
break;
}
/*
* If there is scsi_status, it takes precedense over
-@@ -176,7 +159,8 @@ static void qla4xxx_status_entry(struct
+@@ -176,7 +159,8 @@
break;
/* Copy Sense Data into sense buffer. */
sensebytecnt =
le16_to_cpu(sts_entry->senseDataByteCnt);
-@@ -184,7 +168,8 @@ static void qla4xxx_status_entry(struct
+@@ -184,7 +168,8 @@
break;
memcpy(cmd->sense_buffer, sts_entry->senseData,
DEBUG2(printk("scsi%ld:%d:%d:%d: %s: sense key = %x, "
"ASC/ASCQ = %02x/%02x\n", ha->host_no,
-@@ -203,7 +188,7 @@ static void qla4xxx_status_entry(struct
+@@ -203,7 +188,7 @@
if ((sts_entry->iscsiFlags &
ISCSI_FLAG_RESIDUAL_UNDER) == 0) {
cmd->result = DID_BUS_BUSY << 16;
cmd->underflow) {
/*
* Handle mid-layer underflow???
-@@ -218,13 +203,13 @@ static void qla4xxx_status_entry(struct
+@@ -218,13 +203,13 @@
* will return DID_ERROR.
*/
DEBUG2(printk("scsi%ld:%d:%d:%d: %s: "
cmd->result = DID_ERROR << 16;
} else {
-@@ -243,7 +228,7 @@ static void qla4xxx_status_entry(struct
+@@ -243,7 +228,7 @@
if (atomic_read(&ddb_entry->state) == DDB_STATE_ONLINE)
qla4xxx_mark_device_missing(ha, ddb_entry);
break;
case SCS_QUEUE_FULL:
-@@ -414,6 +399,15 @@ static void qla4xxx_isr_decode_mailbox(s
+@@ -414,6 +399,15 @@
} else if (mbox_status >> 12 == MBOX_ASYNC_EVENT_STATUS) {
/* Immediately process the AENs that don't require much work.
* Only queue the database_changed AENs */
if (ha->aen_log.count < MAX_AEN_ENTRIES) {
for (i = 0; i < MBOX_AEN_REG_COUNT; i++)
ha->aen_log.entry[ha->aen_log.count].mbox_sts[i] =
-@@ -422,11 +416,13 @@ static void qla4xxx_isr_decode_mailbox(s
+@@ -422,11 +416,13 @@
}
switch (mbox_status) {
case MBOX_ASTS_SYSTEM_ERROR:
set_bit(AF_GET_CRASH_RECORD, &ha->flags);
set_bit(DPC_RESET_HA, &ha->dpc_flags);
}
-@@ -443,15 +439,13 @@ static void qla4xxx_isr_decode_mailbox(s
+@@ -443,15 +439,13 @@
break;
case MBOX_ASTS_LINK_UP:
break;
case MBOX_ASTS_HEARTBEAT:
-@@ -601,8 +595,9 @@ void qla4xxx_interrupt_service_routine(s
+@@ -601,8 +595,9 @@
* qla4xxx_intr_handler - hardware interrupt handler.
* @irq: Unused
* @dev_id: Pointer to host adapter structure
{
struct scsi_qla_host *ha;
uint32_t intr_status;
-@@ -634,8 +629,7 @@ irqreturn_t qla4xxx_intr_handler(int irq
+@@ -634,8 +629,7 @@
intr_status = readl(&ha->reg->ctrl_status);
if ((intr_status &
if (reqs_count == 0)
ha->spurious_int_count++;
break;
-@@ -671,6 +665,8 @@ irqreturn_t qla4xxx_intr_handler(int irq
+@@ -671,6 +665,8 @@
break;
} else if (intr_status & CSR_SCSI_RESET_INTR) {
clear_bit(AF_ONLINE, &ha->flags);
__qla4xxx_disable_intrs(ha);
writel(set_rmask(CSR_SCSI_RESET_INTR),
-@@ -714,7 +710,17 @@ void qla4xxx_process_aen(struct scsi_qla
+@@ -714,7 +710,17 @@
int i;
unsigned long flags;
while (ha->aen_out != ha->aen_in) {
aen = &ha->aen_q[ha->aen_out];
/* copy aen information to local structure */
-@@ -727,60 +733,46 @@ void qla4xxx_process_aen(struct scsi_qla
+@@ -727,60 +733,46 @@
if (ha->aen_out == MAX_AEN_ENTRIES)
ha->aen_out = 0;
- spin_unlock_irqrestore(&ha->hardware_lock, flags);
--
++ DEBUG6(dev_info(&ha->pdev->dev, "%s mbx0 0x%x mbx1 0x%x mbx2 "
++ "0x%x mbx3 0x%x ddb 0x%p\n", __func__, mbox_sts[0],
++ mbox_sts[1], mbox_sts[2], mbox_sts[3],
++ qla4xxx_lookup_ddb_by_fw_index(ha, mbox_sts[2])));
+
- DEBUG2(printk("qla4xxx(%ld): AEN[%d]=0x%08x, mbx1=0x%08x mbx2=0x%08x"
- " mbx3=0x%08x mbx4=0x%08x\n", ha->host_no,
- (ha->aen_out ? (ha->aen_out-1): (MAX_AEN_ENTRIES-1)),
- mbox_sts[0], mbox_sts[1], mbox_sts[2],
- mbox_sts[3], mbox_sts[4]));
-+ DEBUG6(dev_info(&ha->pdev->dev, "%s mbx0 0x%x mbx1 0x%x mbx2 "
-+ "0x%x mbx3 0x%x ddb 0x%p\n", __func__, mbox_sts[0],
-+ mbox_sts[1], mbox_sts[2], mbox_sts[3],
-+ qla4xxx_lookup_ddb_by_fw_index(ha, mbox_sts[2])));
-+
+ if (process_aen == RELOGIN_DDB_CHANGED_AENS) {
+ /* for use during init time, we only want to
+ * relogin non-active ddbs */
+ struct ddb_entry *ddb_entry;
-+
-+ ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, mbox_sts[2]);
-+
-+ if (ddb_entry) {
-+
-+ DEBUG6(dev_info(&ha->pdev->dev, "%s ddb 0x%p "
-+ "sess 0x%p conn 0x%p state 0x%x\n",
-+ __func__, ddb_entry, ddb_entry->sess,
-+ ddb_entry->conn, ddb_entry->state));
- switch (mbox_sts[0]) {
- case MBOX_ASTS_DATABASE_CHANGED:
- /* for use during init time, we only want to
- * relogin non-active ddbs */
- struct ddb_entry *ddb_entry;
--
++ ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, mbox_sts[2]);
+
- ddb_entry =
- /* FIXME: name length? */
- qla4xxx_lookup_ddb_by_fw_index(ha,
- mbox_sts[2]);
- if (!ddb_entry)
- break;
--
++ if (ddb_entry) {
+
- ddb_entry->dev_scan_wait_to_complete_relogin =
- 0;
++ DEBUG6(dev_info(&ha->pdev->dev, "%s ddb 0x%p "
++ "sess 0x%p conn 0x%p state 0x%x\n",
++ __func__, ddb_entry, ddb_entry->sess,
++ ddb_entry->conn, ddb_entry->state));
++
+ ddb_entry->dev_scan_wait_to_complete_relogin = 0;
ddb_entry->dev_scan_wait_to_start_relogin =
jiffies +
}
spin_unlock_irqrestore(&ha->hardware_lock, flags);
}
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_mbx.c
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_mbx.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_mbx.c
+--- a/drivers/scsi/qla4xxx/ql4_mbx.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_mbx.c Wed May 06 16:56:35 2009 +0100
@@ -6,9 +6,11 @@
*/
{
int status = QLA_ERROR;
uint8_t i;
-@@ -39,6 +41,7 @@ static int qla4xxx_mailbox_command(struc
+@@ -39,6 +41,7 @@
"pointer\n", ha->host_no, __func__));
return status;
}
/* Mailbox code active */
wait_count = MBOX_TOV * 100;
-@@ -87,8 +90,6 @@ static int qla4xxx_mailbox_command(struc
+@@ -87,8 +90,6 @@
readl(&ha->reg->ctrl_status);
spin_unlock_irqrestore(&ha->hardware_lock, flags);
/*
* If we don't want status, don't wait for the mailbox command to
* complete. For example, MBOX_CMD_RESET_FW doesn't return status,
-@@ -98,6 +99,8 @@ static int qla4xxx_mailbox_command(struc
+@@ -98,6 +99,8 @@
status = QLA_SUCCESS;
goto mbox_exit;
}
/* Wait for command to complete */
wait_count = jiffies + MBOX_TOV * HZ;
while (test_bit(AF_MBOX_COMMAND_DONE, &ha->flags) == 0) {
-@@ -119,6 +122,7 @@ static int qla4xxx_mailbox_command(struc
+@@ -119,6 +122,7 @@
spin_unlock_irqrestore(&ha->hardware_lock, flags);
msleep(10);
}
/* Check for mailbox timeout. */
if (!test_bit(AF_MBOX_COMMAND_DONE, &ha->flags)) {
-@@ -164,6 +168,8 @@ static int qla4xxx_mailbox_command(struc
+@@ -164,12 +168,94 @@
spin_unlock_irqrestore(&ha->hardware_lock, flags);
mbox_exit:
mutex_lock(&ha->mbox_sem);
clear_bit(AF_MBOX_COMMAND, &ha->flags);
mutex_unlock(&ha->mbox_sem);
-@@ -172,6 +178,86 @@ mbox_exit:
- return status;
- }
+ clear_bit(AF_MBOX_COMMAND_DONE, &ha->flags);
+ return status;
++}
++
+
+/**
+ * qla4xxx_issue_iocb - issue mailbox iocb command
+ return QLA_ERROR;
+
+ return QLA_SUCCESS;
-+}
-+
+ }
+
/**
- * qla4xxx_initialize_fw_cb - initializes firmware control block.
- * @ha: Pointer to host adapter structure.
-@@ -450,15 +536,16 @@ int qla4xxx_get_fwddb_entry(struct scsi_
+@@ -450,15 +536,16 @@
mbox_sts[1]));
goto exit_get_fwddb;
}
}
if (num_valid_ddb_entries)
*num_valid_ddb_entries = mbox_sts[2];
-@@ -518,6 +605,31 @@ int qla4xxx_set_ddb_entry(struct scsi_ql
- return qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 1, &mbox_cmd[0], &mbox_sts[0]);
- }
+@@ -516,6 +603,31 @@
+ mbox_cmd[4] = sizeof(struct dev_db_entry);
+ return qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 1, &mbox_cmd[0], &mbox_sts[0]);
++}
++
+int qla4xxx_conn_open_session_login(struct scsi_qla_host * ha,
+ uint16_t fw_ddb_index)
+{
+ mbox_sts[1]);)
+
+ return status;
-+}
-+
+ }
+
/**
- * qla4xxx_get_crash_record - retrieves crash record.
- * @ha: Pointer to host adapter structure.
-@@ -642,7 +754,7 @@ void qla4xxx_get_conn_event_log(struct s
+@@ -642,7 +754,7 @@
DEBUG3(printk("scsi%ld: Connection Event Log Dump (%d entries):\n",
ha->host_no, num_valid_entries));
if (oldest_entry == 0) {
/* Circular Buffer has not wrapped around */
for (i=0; i < num_valid_entries; i++) {
-@@ -713,45 +825,6 @@ int qla4xxx_reset_lun(struct scsi_qla_ho
+@@ -713,45 +825,6 @@
return status;
}
int qla4xxx_get_flash(struct scsi_qla_host * ha, dma_addr_t dma_addr,
uint32_t offset, uint32_t len)
-@@ -813,8 +886,7 @@ int qla4xxx_get_fw_version(struct scsi_q
+@@ -813,8 +886,7 @@
return QLA_SUCCESS;
}
{
uint32_t mbox_cmd[MBOX_REG_COUNT];
uint32_t mbox_sts[MBOX_REG_COUNT];
-@@ -835,7 +907,7 @@ static int qla4xxx_get_default_ddb(struc
+@@ -835,7 +907,7 @@
return QLA_SUCCESS;
}
{
uint32_t mbox_cmd[MBOX_REG_COUNT];
uint32_t mbox_sts[MBOX_REG_COUNT];
-@@ -889,14 +961,14 @@ int qla4xxx_send_tgts(struct scsi_qla_ho
+@@ -889,14 +961,14 @@
if (ret_val != QLA_SUCCESS)
goto qla4xxx_send_tgts_exit;
sizeof(fw_ddb_entry->tgt_addr));
fw_ddb_entry->options = (DDB_OPT_DISC_SESSION | DDB_OPT_TARGET);
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_nvram.c linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_nvram.c
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_nvram.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_nvram.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_nvram.c
+--- a/drivers/scsi/qla4xxx/ql4_nvram.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_nvram.c Wed May 06 16:56:35 2009 +0100
@@ -6,6 +6,7 @@
*/
#include "ql4_glbl.h"
#include "ql4_dbg.h"
#include "ql4_inline.h"
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_nvram.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_nvram.h
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_nvram.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_nvram.h 2009-03-25 16:11:15.000000000 +0000
-@@ -134,7 +134,9 @@ struct eeprom_data {
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_nvram.h
+--- a/drivers/scsi/qla4xxx/ql4_nvram.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_nvram.h Wed May 06 16:56:35 2009 +0100
+@@ -134,7 +134,9 @@
u16 phyConfig; /* x36 */
#define PHY_CONFIG_PHY_ADDR_MASK 0x1f
#define PHY_CONFIG_ENABLE_FW_MANAGEMENT_MASK 0x20
#define EEPROM_UNUSED_1_SIZE 2
u8 unused_1[EEPROM_UNUSED_1_SIZE]; /* x3A */
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_os.c
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_os.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_os.c
+--- a/drivers/scsi/qla4xxx/ql4_os.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_os.c Wed May 06 16:56:35 2009 +0100
@@ -1,6 +1,6 @@
/*
* QLogic iSCSI HBA Driver
/*
* SRB allocation cache
-@@ -38,33 +52,38 @@ MODULE_PARM_DESC(ql4xdontresethba,
+@@ -38,33 +52,38 @@
" default it will reset hba :0"
" set to 1 to avoid resetting HBA");
"Option to enable extended error logging, "
"Default is 0 - no logging, 1 - debug logging");
--int ql4_mod_unload = 0;
--
--#define QL4_DEF_QDEPTH 32
+/* Command Timeout before ddb state goes to MISSING */
+int cmd_timeout = IOCB_CMD_TIMEOUT;
+module_param(cmd_timeout, int, S_IRUGO | S_IRUSR);
+int recovery_tmo = RECOVERY_TIMEOUT;
+module_param(recovery_tmo, int, S_IRUGO | S_IRUSR);
+MODULE_PARM_DESC(recovery_tmo, "Recovery Timeout");
-
-+int ql4_mod_unload = 0;
++
+ int ql4_mod_unload = 0;
+-
+-#define QL4_DEF_QDEPTH 32
+-
/*
* SCSI host template entry points
*/
static void qla4xxx_recovery_timedout(struct iscsi_cls_session *session);
/*
-@@ -73,29 +92,26 @@ static void qla4xxx_recovery_timedout(st
+@@ -73,29 +92,26 @@
static int qla4xxx_queuecommand(struct scsi_cmnd *cmd,
void (*done) (struct scsi_cmnd *));
static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd);
.this_id = -1,
.cmd_per_lun = 3,
-@@ -108,17 +124,17 @@ static struct scsi_host_template qla4xxx
+@@ -108,17 +124,17 @@
static struct iscsi_transport qla4xxx_iscsi_transport = {
.owner = THIS_MODULE,
.name = DRIVER_NAME,
.session_recovery_timedout = qla4xxx_recovery_timedout,
};
-@@ -129,44 +145,50 @@ static void qla4xxx_recovery_timedout(st
+@@ -129,44 +145,50 @@
struct ddb_entry *ddb_entry = session->dd_data;
struct scsi_qla_host *ha = ddb_entry->ha;
- "of (%d) secs exhausted, marking device DEAD.\n",
- ha->host_no, __func__, ddb_entry->fw_ddb_index,
- ha->port_down_retry_count));
--
++ dev_info(&ha->pdev->dev, "%s: ddb[%d] os[%d] marked DEAD"
++ " - retry count of (%d)\n", __func__,
++ ddb_entry->fw_ddb_index, ddb_entry->os_target_id,
++ ha->port_down_retry_count);
+
- DEBUG2(printk("scsi%ld: %s: scheduling dpc routine - dpc "
- "flags = 0x%lx\n",
- ha->host_no, __func__, ha->dpc_flags));
- queue_work(ha->dpc_thread, &ha->dpc_work);
- }
-+ dev_info(&ha->pdev->dev, "%s: ddb[%d] os[%d] marked DEAD"
-+ " - retry count of (%d)\n", __func__,
-+ ddb_entry->fw_ddb_index, ddb_entry->os_target_id,
-+ ha->port_down_retry_count);
-+
+ QL_SET_DDB_OFFLINE(ha, ddb_entry);
+
+ queue_work(ha->dpc_thread, &ha->dpc_work);
}
static int qla4xxx_sess_get_param(struct iscsi_cls_session *sess,
-@@ -177,12 +199,18 @@ static int qla4xxx_sess_get_param(struct
+@@ -177,12 +199,18 @@
switch (param) {
case ISCSI_PARAM_TARGET_NAME:
default:
return -ENOSYS;
}
-@@ -197,17 +225,18 @@ static int qla4xxx_conn_get_param(struct
+@@ -197,17 +225,18 @@
struct ddb_entry *ddb_entry;
int len;
break;
default:
return -ENOSYS;
-@@ -216,73 +245,84 @@ static int qla4xxx_conn_get_param(struct
+@@ -216,73 +245,84 @@
return len;
}
- struct sockaddr_in *addr;
- struct sockaddr_in6 *addr6;
- int ret = 0;
--
++ struct scsi_qla_host *ha = to_qla_host(shost);
++ int len;
+
- ha = (struct scsi_qla_host *) shost->hostdata;
-
- switch (type) {
- ret = -EIO;
- } else
- ret = -ENOSYS;
-+ struct scsi_qla_host *ha = to_qla_host(shost);
-+ int len;
-+
+ switch (param) {
+ case ISCSI_HOST_PARAM_IPADDRESS:
+ len = sprintf(buf, "%d.%d.%d.%d", ha->ip_address[0],
+
+ return len;
}
-
++
+static int ql_alloc_osindex(struct scsi_qla_host *ha)
+{
+ unsigned int idx;
+ clear_bit((idx & 0x1F), &ha->os_map[idx >> 5]);
+}
+
-+
+
void qla4xxx_destroy_sess(struct ddb_entry *ddb_entry)
{
if (!ddb_entry->sess)
return 0;
}
-@@ -291,30 +331,25 @@ struct ddb_entry *qla4xxx_alloc_sess(str
+@@ -291,28 +331,23 @@
struct ddb_entry *ddb_entry;
struct iscsi_cls_session *sess;
+
+ if ((os_idx = ql_alloc_osindex(ha)) >= MAX_DDB_ENTRIES)
return NULL;
-
++
+ sess = QL_ISCSI_ALLOC_SESSION(ha, &qla4xxx_iscsi_transport);
+ if (!sess) {
+ free_osindex(ha, os_idx);
+ return NULL;
+ }
-+
+
ddb_entry = sess->dd_data;
memset(ddb_entry, 0, sizeof(*ddb_entry));
+ ddb_entry->os_target_id = os_idx;
ddb_entry->ha = ha;
ddb_entry->sess = sess;
return ddb_entry;
- }
-
+-}
+-
-static void qla4xxx_scan_start(struct Scsi_Host *shost)
-{
- struct scsi_qla_host *ha = shost_priv(shost);
- if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_ACTIVE)
- qla4xxx_add_sess(ddb_entry);
- }
--}
--
+ }
+
/*
- * Timer routines
- */
-@@ -323,7 +358,7 @@ static void qla4xxx_start_timer(struct s
+@@ -323,7 +358,7 @@
unsigned long interval)
{
DEBUG(printk("scsi: %s: Starting timer thread for adapter %d\n",
init_timer(&ha->timer);
ha->timer.expires = jiffies + interval * HZ;
ha->timer.data = (unsigned long)ha;
-@@ -349,17 +384,18 @@ void qla4xxx_mark_device_missing(struct
+@@ -349,17 +384,18 @@
struct ddb_entry *ddb_entry)
{
atomic_set(&ddb_entry->state, DDB_STATE_MISSING);
{
struct srb *srb;
-@@ -378,25 +414,14 @@ static struct srb* qla4xxx_get_new_srb(s
+@@ -378,25 +414,14 @@
return srb;
}
cmd->scsi_done(cmd);
}
-@@ -404,14 +429,14 @@ void qla4xxx_srb_compl(struct scsi_qla_h
+@@ -404,14 +429,14 @@
* qla4xxx_queuecommand - scsi layer issues scsi command to driver.
* @cmd: Pointer to Linux's SCSI command structure
* @done_fn: Function that the driver calls to notify the SCSI mid-layer
* in interrupt context which is a big NO! NO!.
**/
static int qla4xxx_queuecommand(struct scsi_cmnd *cmd,
-@@ -419,30 +444,21 @@ static int qla4xxx_queuecommand(struct s
+@@ -419,30 +444,21 @@
{
struct scsi_qla_host *ha = to_qla_host(cmd->device->host);
struct ddb_entry *ddb_entry = cmd->device->hostdata;
goto qc_host_busy;
spin_unlock_irq(ha->host->host_lock);
-@@ -542,7 +558,7 @@ static int qla4xxx_mem_alloc(struct scsi
+@@ -542,7 +558,7 @@
align = 0;
if ((unsigned long)ha->queues_dma & (MEM_ALIGN_VALUE - 1))
align = MEM_ALIGN_VALUE - ((unsigned long)ha->queues_dma &
/* Update request and response queue pointers. */
ha->request_dma = ha->queues_dma + align;
-@@ -550,16 +566,16 @@ static int qla4xxx_mem_alloc(struct scsi
+@@ -550,16 +566,16 @@
ha->response_dma = ha->queues_dma + align +
(REQUEST_QUEUE_DEPTH * QUEUE_SIZE);
ha->response_ring = (struct queue_entry *) (ha->queues + align +
/* Allocate memory for srb pool. */
ha->srb_mempool = mempool_create(SRB_MIN_REQ, mempool_alloc_slab,
-@@ -591,12 +607,13 @@ static void qla4xxx_timer(struct scsi_ql
+@@ -591,12 +607,13 @@
list_for_each_entry_safe(ddb_entry, dtemp, &ha->ddb_list, list) {
/* Count down time between sending relogins */
if (adapter_up(ha) &&
atomic_set(&ddb_entry->
retry_relogin_timer,
INVALID_ENTRY);
-@@ -604,9 +621,9 @@ static void qla4xxx_timer(struct scsi_ql
+@@ -604,9 +621,9 @@
&ha->dpc_flags);
set_bit(DF_RELOGIN, &ddb_entry->flags);
DEBUG2(printk("scsi%ld: %s: index [%d]"
} else
atomic_dec(&ddb_entry->
retry_relogin_timer);
-@@ -615,64 +632,66 @@ static void qla4xxx_timer(struct scsi_ql
+@@ -615,64 +632,66 @@
/* Wait for relogin to timeout */
if (atomic_read(&ddb_entry->relogin_timer) &&
queue_work(ha->dpc_thread, &ha->dpc_work);
}
-@@ -694,7 +713,6 @@ static int qla4xxx_cmd_wait(struct scsi_
+@@ -694,7 +713,6 @@
uint32_t index = 0;
int stat = QLA_SUCCESS;
unsigned long flags;
int wait_cnt = WAIT_CMD_TOV; /*
* Initialized for 30 seconds as we
* expect all commands to retuned
-@@ -704,15 +722,14 @@ static int qla4xxx_cmd_wait(struct scsi_
+@@ -704,15 +722,14 @@
while (wait_cnt) {
spin_lock_irqsave(&ha->hardware_lock, flags);
/* Find a command that hasn't completed. */
break;
}
-@@ -730,15 +747,15 @@ static int qla4xxx_cmd_wait(struct scsi_
+@@ -730,15 +747,15 @@
return stat;
}
/*
* If the SCSI Reset Interrupt bit is set, clear it.
* Otherwise, the Soft Reset won't work.
-@@ -751,7 +768,8 @@ void qla4xxx_hw_reset(struct scsi_qla_ho
+@@ -751,7 +768,8 @@
writel(set_rmask(CSR_SOFT_RESET), &ha->reg->ctrl_status);
readl(&ha->reg->ctrl_status);
}
/**
-@@ -765,7 +783,7 @@ int qla4xxx_soft_reset(struct scsi_qla_h
+@@ -765,7 +783,7 @@
int status = QLA_ERROR;
uint32_t ctrl_status;
/* Wait until the Network Reset Intr bit is cleared */
max_wait_time = RESET_INTR_TOV;
-@@ -782,9 +800,9 @@ int qla4xxx_soft_reset(struct scsi_qla_h
+@@ -782,9 +800,9 @@
if ((ctrl_status & CSR_NET_RESET_INTR) != 0) {
DEBUG2(printk(KERN_WARNING
spin_lock_irqsave(&ha->hardware_lock, flags);
writel(set_rmask(CSR_NET_RESET_INTR), &ha->reg->ctrl_status);
readl(&ha->reg->ctrl_status);
-@@ -865,9 +883,9 @@ static void qla4xxx_flush_active_srbs(st
+@@ -865,9 +883,9 @@
unsigned long flags;
spin_lock_irqsave(&ha->hardware_lock, flags);
srb->cmd->result = DID_RESET << 16;
qla4xxx_srb_compl(ha, srb);
}
-@@ -879,21 +897,14 @@ static void qla4xxx_flush_active_srbs(st
+@@ -879,21 +897,14 @@
/**
* qla4xxx_recover_adapter - recovers adapter after a fatal error
* @ha: Pointer to host adapter structure.
/* Wait for outstanding commands to complete.
* Stalls the driver for max 30 secs
-@@ -909,8 +920,8 @@ static int qla4xxx_recover_adapter(struc
+@@ -909,8 +920,8 @@
* returns with ISP interrupts enabled.
*/
if (status == QLA_SUCCESS) {
qla4xxx_flush_active_srbs(ha);
if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS)
status = qla4xxx_soft_reset(ha);
-@@ -925,24 +936,26 @@ static int qla4xxx_recover_adapter(struc
+@@ -925,24 +936,26 @@
* with ISP interrupts enabled */
if (status == QLA_SUCCESS) {
DEBUG2(printk("scsi%ld: %s - Initializing adapter..\n",
set_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags);
status = QLA_ERROR;
} else {
-@@ -950,9 +963,9 @@ static int qla4xxx_recover_adapter(struc
+@@ -950,9 +963,9 @@
/* Schedule another Reset HA--DPC will retry */
ha->retry_reset_ha_cnt--;
DEBUG2(printk("scsi%ld: recover adapter - "
status = QLA_ERROR;
}
-@@ -960,8 +973,8 @@ static int qla4xxx_recover_adapter(struc
+@@ -960,8 +973,8 @@
/* Recover adapter retries have been exhausted.
* Adapter DEAD */
DEBUG2(printk("scsi%ld: recover adapter "
qla4xxx_flush_active_srbs(ha);
clear_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags);
clear_bit(DPC_RESET_HA, &ha->dpc_flags);
-@@ -990,21 +1003,21 @@ static int qla4xxx_recover_adapter(struc
+@@ -990,21 +1003,21 @@
* @data: in our case pointer to adapter structure
*
* This routine is a task that is schedule by the interrupt handler
ha->host_no, __func__, ha->flags, ha->dpc_flags,
readw(&ha->reg->ctrl_status)));
-@@ -1013,12 +1026,12 @@ static void qla4xxx_do_dpc(struct work_s
+@@ -1013,12 +1026,12 @@
return;
if (adapter_up(ha) ||
if (test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags)) {
uint8_t wait_time = RESET_INTR_TOV;
-@@ -1029,10 +1042,11 @@ static void qla4xxx_do_dpc(struct work_s
+@@ -1029,10 +1042,11 @@
break;
msleep(1000);
}
qla4xxx_flush_active_srbs(ha);
if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS) {
qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS);
-@@ -1053,13 +1067,19 @@ static void qla4xxx_do_dpc(struct work_s
+@@ -1053,13 +1067,19 @@
if (test_and_clear_bit(DPC_GET_DHCP_IP_ADDR, &ha->dpc_flags))
qla4xxx_get_dhcp_ip_address(ha);
qla4xxx_relogin_device(ha, ddb_entry);
/*
-@@ -1070,8 +1090,8 @@ static void qla4xxx_do_dpc(struct work_s
+@@ -1070,8 +1090,8 @@
*/
if (test_bit(DPC_RESET_HA, &ha->dpc_flags)) {
printk(KERN_WARNING "scsi%ld: %s: "
break;
}
}
-@@ -1096,7 +1116,7 @@ static void qla4xxx_free_adapter(struct
+@@ -1096,7 +1116,7 @@
/* Issue Soft Reset to put firmware in unknown state */
if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS)
/* Remove timer thread, if present */
if (ha->timer_active)
-@@ -1110,7 +1130,6 @@ static void qla4xxx_free_adapter(struct
+@@ -1110,7 +1130,6 @@
qla4xxx_mem_free(ha);
pci_disable_device(ha->pdev);
}
/***
-@@ -1147,7 +1166,6 @@ static int qla4xxx_iospace_config(struct
+@@ -1147,7 +1166,6 @@
if (!(mmio_flags & IORESOURCE_MEM)) {
dev_err(&ha->pdev->dev,
"region #0 not an MMIO resource, aborting\n");
goto iospace_error_exit;
}
if (mmio_len < MIN_IOBASE_LEN) {
-@@ -1189,11 +1207,12 @@ iospace_error_exit:
+@@ -1189,11 +1207,12 @@
* the driver.
**/
static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
uint8_t init_retry_count = 0;
char buf[34];
-@@ -1203,7 +1222,7 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1203,7 +1222,7 @@
host = scsi_host_alloc(&qla4xxx_driver_template, sizeof(*ha));
if (host == NULL) {
printk(KERN_WARNING
goto probe_disable_device;
}
-@@ -1211,10 +1230,11 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1211,10 +1230,11 @@
ha = (struct scsi_qla_host *) host->hostdata;
memset(ha, 0, sizeof(*ha));
/* Configure PCI I/O space. */
ret = qla4xxx_iospace_config(ha);
-@@ -1222,7 +1242,7 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1222,7 +1242,7 @@
goto probe_failed;
dev_info(&ha->pdev->dev, "Found an ISP%04x, irq %d, iobase 0x%p\n",
qla4xxx_config_dma_addressing(ha);
-@@ -1233,11 +1253,12 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1233,11 +1253,12 @@
mutex_init(&ha->mbox_sem);
spin_lock_init(&ha->hardware_lock);
ret = -ENOMEM;
goto probe_failed;
-@@ -1250,8 +1271,8 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1250,8 +1271,8 @@
*/
status = qla4xxx_initialize_adapter(ha, REBUILD_DDB_LIST);
while (status == QLA_ERROR && init_retry_count++ < MAX_INIT_RETRIES) {
qla4xxx_soft_reset(ha);
status = qla4xxx_initialize_adapter(ha, REBUILD_DDB_LIST);
}
-@@ -1267,18 +1288,12 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1267,18 +1288,12 @@
host->max_lun = MAX_LUNS - 1;
host->max_id = MAX_TARGETS;
host->max_cmd_len = IOCB_MAX_CDB_LEN;
- host->can_queue = MAX_SRBS ;
+ host->can_queue = REQUEST_QUEUE_DEPTH + 128;
host->transportt = qla4xxx_scsi_transport;
-
+-
- ret = scsi_init_shared_tag_map(host, MAX_SRBS);
- if (ret) {
- dev_warn(&ha->pdev->dev, "scsi_init_shared_tag_map failed\n");
- goto probe_failed;
- }
--
+
/* Startup the kernel thread for this host adapter. */
DEBUG2(printk("scsi: %s: Starting kernel thread for "
- "qla4xxx_dpc\n", __func__));
sprintf(buf, "qla4xxx_%lu_dpc", ha->host_no);
ha->dpc_thread = create_singlethread_workqueue(buf);
if (!ha->dpc_thread) {
-@@ -1286,10 +1301,11 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1286,10 +1301,11 @@
ret = -ENODEV;
goto probe_failed;
}
if (ret) {
dev_warn(&ha->pdev->dev, "Failed to reserve interrupt %d"
" already in use.\n", pdev->irq);
-@@ -1297,14 +1313,14 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1297,14 +1313,14 @@
}
set_bit(AF_IRQ_ATTACHED, &ha->flags);
host->irq = pdev->irq;
pci_set_drvdata(pdev, ha);
-@@ -1312,15 +1328,53 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1312,14 +1328,52 @@
if (ret)
goto probe_failed;
+ dev_info(&ha->pdev->dev, "%s: AF_INIT_DONE\n", __func__);
+
return 0;
-
++
+remove_host:
+ qla4xxx_free_ddb_list(ha);
+ scsi_remove_host(host);
-+
+
probe_failed:
qla4xxx_free_adapter(ha);
- scsi_host_put(ha->host);
-@@ -1346,11 +1400,18 @@ static void __devexit qla4xxx_remove_ada
+@@ -1346,10 +1400,17 @@
while (test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags))
ssleep(1);
+ QL_ISCSI_UNREGISTER_HOST(ha->host, qla4xxx_scsi_transport);
+
scsi_remove_host(ha->host);
-
-+ qla4xxx_ioctl_exit(ha);
+
++ qla4xxx_ioctl_exit(ha);
+
qla4xxx_free_adapter(ha);
- scsi_host_put(ha->host);
-@@ -1365,7 +1426,7 @@ static void __devexit qla4xxx_remove_ada
+@@ -1365,7 +1426,7 @@
* At exit, the @ha's flags.enable_64bit_addressing set to indicated
* supported addressing method.
*/
{
int retval;
-@@ -1374,9 +1435,9 @@ static void qla4xxx_config_dma_addressin
+@@ -1374,9 +1435,9 @@
if (pci_set_consistent_dma_mask(ha->pdev, DMA_64BIT_MASK)) {
dev_dbg(&ha->pdev->dev,
"Failed to set 64 bit PCI consistent mask; "
}
} else
retval = pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK);
-@@ -1384,24 +1445,29 @@ static void qla4xxx_config_dma_addressin
+@@ -1384,24 +1445,29 @@
static int qla4xxx_slave_alloc(struct scsi_device *sdev)
{
}
/**
-@@ -1414,12 +1480,14 @@ static void qla4xxx_slave_destroy(struct
+@@ -1414,12 +1480,14 @@
struct srb * qla4xxx_del_from_active_array(struct scsi_qla_host *ha, uint32_t index)
{
struct srb *srb = NULL;
return srb;
/* update counters */
-@@ -1441,7 +1509,7 @@ struct srb * qla4xxx_del_from_active_arr
+@@ -1441,7 +1509,7 @@
* for some max time.
**/
static int qla4xxx_eh_wait_on_command(struct scsi_qla_host *ha,
{
int done = 0;
struct srb *rp;
-@@ -1467,24 +1535,18 @@ static int qla4xxx_eh_wait_on_command(st
+@@ -1467,24 +1535,18 @@
**/
static int qla4xxx_wait_for_hba_online(struct scsi_qla_host *ha)
{
- unsigned long wait_online;
--
-- wait_online = jiffies + (30 * HZ);
-- while (time_before(jiffies, wait_online)) {
+ unsigned long wait_online = 60;
+- wait_online = jiffies + (30 * HZ);
+- while (time_before(jiffies, wait_online)) {
+-
+ while (wait_online--) {
if (adapter_up(ha))
return QLA_SUCCESS;
* @ha: pointer to to HBA
* @t: target id
* @l: lun id
-@@ -1492,26 +1554,33 @@ static int qla4xxx_wait_for_hba_online(s
+@@ -1492,26 +1554,33 @@
* This function waits for all outstanding commands to a lun to complete. It
* returns 0 if all pending commands are returned and 1 otherwise.
**/
}
}
return status;
-@@ -1528,47 +1597,49 @@ static int qla4xxx_eh_device_reset(struc
+@@ -1528,106 +1597,55 @@
{
struct scsi_qla_host *ha = to_qla_host(cmd->device->host);
struct ddb_entry *ddb_entry = cmd->device->hostdata;
ret = SUCCESS;
-@@ -1578,59 +1649,6 @@ eh_dev_reset_done:
- }
+ eh_dev_reset_done:
- /**
+ return ret;
+-}
+-
+-/**
- * qla4xxx_eh_target_reset - callback for target reset.
- * @cmd: Pointer to Linux's SCSI command structure
- *
- starget_printk(KERN_INFO, scsi_target(cmd->device),
- "WARM TARGET RESET SUCCEEDED.\n");
- return SUCCESS;
--}
--
--/**
- * qla4xxx_eh_host_reset - kernel callback
- * @cmd: Pointer to Linux's SCSI command structure
- *
-@@ -1644,27 +1662,19 @@ static int qla4xxx_eh_host_reset(struct
+ }
+
+ /**
+@@ -1644,27 +1662,19 @@
ha = (struct scsi_qla_host *) cmd->device->host->hostdata;
return return_status;
}
-@@ -1693,7 +1703,7 @@ static struct pci_device_id qla4xxx_pci_
+@@ -1693,7 +1703,7 @@
};
MODULE_DEVICE_TABLE(pci, qla4xxx_pci_tbl);
.name = DRIVER_NAME,
.id_table = qla4xxx_pci_tbl,
.probe = qla4xxx_probe_adapter,
-@@ -1704,20 +1714,21 @@ static int __init qla4xxx_module_init(vo
+@@ -1704,20 +1714,21 @@
{
int ret;
strcat(qla4xxx_version_str, "-debug");
qla4xxx_scsi_transport =
-@@ -1727,13 +1738,20 @@ static int __init qla4xxx_module_init(vo
+@@ -1727,13 +1738,20 @@
goto release_srb_cache;
}
unregister_transport:
iscsi_unregister_transport(&qla4xxx_iscsi_transport);
release_srb_cache:
-@@ -1745,6 +1763,9 @@ no_srp_cache:
+@@ -1745,6 +1763,9 @@
static void __exit qla4xxx_module_exit(void)
{
ql4_mod_unload = 1;
pci_unregister_driver(&qla4xxx_pci_driver);
iscsi_unregister_transport(&qla4xxx_iscsi_transport);
kmem_cache_destroy(srb_cachep);
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_os.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_os.h 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_os.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/qla4xxx/ql4_os.h Wed May 06 16:56:35 2009 +0100
@@ -0,0 +1,144 @@
+/*
+ * QLogic iSCSI HBA Driver
+}
+
+#endif /* _QLA4x_OS_H */
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_version.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_version.h
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_version.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_version.h 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_version.h
+--- a/drivers/scsi/qla4xxx/ql4_version.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_version.h Wed May 06 16:56:35 2009 +0100
@@ -5,5 +5,5 @@
* See LICENSE.qla4xxx for copyright and licensing details.
*/
-#define QLA4XXX_DRIVER_VERSION "5.01.00-k8"
+#define QLA4XXX_DRIVER_VERSION "5.01.00-k8_sles11-04"
-diff -purN linux-2.6.27/drivers/scsi/qlogicpti.c linux-2.6.27.19-5.1/drivers/scsi/qlogicpti.c
---- linux-2.6.27/drivers/scsi/qlogicpti.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qlogicpti.c 2009-03-25 16:11:17.000000000 +0000
-@@ -1434,6 +1434,7 @@ static struct of_device_id qpti_match[]
+diff -r 9608d5473017 drivers/scsi/qlogicpti.c
+--- a/drivers/scsi/qlogicpti.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qlogicpti.c Wed May 06 16:56:35 2009 +0100
+@@ -1434,6 +1434,7 @@
MODULE_DEVICE_TABLE(of, qpti_match);
static struct of_platform_driver qpti_sbus_driver = {
.name = "qpti",
.match_table = qpti_match,
.probe = qpti_sbus_probe,
-diff -purN linux-2.6.27/drivers/scsi/scsi.c linux-2.6.27.19-5.1/drivers/scsi/scsi.c
---- linux-2.6.27/drivers/scsi/scsi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi.c 2009-03-25 16:11:17.000000000 +0000
-@@ -291,7 +291,6 @@ struct scsi_cmnd *scsi_get_command(struc
+diff -r 9608d5473017 drivers/scsi/scsi.c
+--- a/drivers/scsi/scsi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi.c Wed May 06 16:56:35 2009 +0100
+@@ -291,7 +291,6 @@
unsigned long flags;
cmd->device = dev;
INIT_LIST_HEAD(&cmd->list);
spin_lock_irqsave(&dev->list_lock, flags);
list_add_tail(&cmd->list, &dev->cmd_list);
-@@ -652,26 +651,33 @@ int scsi_dispatch_cmd(struct scsi_cmnd *
+@@ -652,26 +651,33 @@
unsigned long timeout;
int rtn = 0;
scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY);
SCSI_LOG_MLQUEUE(3, printk("queuecommand : device blocked \n"));
-@@ -714,21 +720,9 @@ int scsi_dispatch_cmd(struct scsi_cmnd *
+@@ -714,19 +720,7 @@
host->resetting = 0;
}
- scsi_add_timer(cmd, cmd->timeout_per_command, scsi_times_out);
-
scsi_log_send(cmd);
-
- /*
+-
+- /*
- * We will use a queued command if possible, otherwise we will
- * emulate the queuing and calling of completion function ourselves.
- */
- atomic_inc(&cmd->device->iorequest_cnt);
--
-- /*
+
+ /*
* Before we queue this command, check if the command
- * length exceeds what the host adapter can handle.
- */
-@@ -744,6 +738,12 @@ int scsi_dispatch_cmd(struct scsi_cmnd *
+@@ -744,6 +738,12 @@
}
spin_lock_irqsave(host->host_lock, flags);
scsi_cmd_get_serial(host, cmd);
if (unlikely(host->shost_state == SHOST_DEL)) {
-@@ -754,12 +754,12 @@ int scsi_dispatch_cmd(struct scsi_cmnd *
+@@ -754,12 +754,12 @@
}
spin_unlock_irqrestore(host->host_lock, flags);
if (rtn) {
SCSI_LOG_MLQUEUE(3,
printk("queuecommand : request rejected\n"));
}
-@@ -770,24 +770,6 @@ int scsi_dispatch_cmd(struct scsi_cmnd *
+@@ -768,24 +768,6 @@
+ SCSI_LOG_MLQUEUE(3, printk("leaving scsi_dispatch_cmnd()\n"));
+ return rtn;
}
-
- /**
+-
+-/**
- * scsi_req_abort_cmd -- Request command recovery for the specified command
- * @cmd: pointer to the SCSI command of interest
- *
- scsi_times_out(cmd);
-}
-EXPORT_SYMBOL(scsi_req_abort_cmd);
--
--/**
+
+ /**
* scsi_done - Enqueue the finished SCSI command into the done queue.
- * @cmd: The SCSI Command for which a low-level device driver (LLDD) gives
- * ownership back to SCSI Core -- i.e. the LLDD has finished with it.
-@@ -802,42 +784,7 @@ EXPORT_SYMBOL(scsi_req_abort_cmd);
+@@ -802,42 +784,7 @@
*/
static void scsi_done(struct scsi_cmnd *cmd)
{
}
/* Move this to a header if it becomes more generally useful */
-@@ -857,6 +804,7 @@ static struct scsi_driver *scsi_cmd_to_d
+@@ -857,6 +804,7 @@
void scsi_finish_command(struct scsi_cmnd *cmd)
{
struct scsi_device *sdev = cmd->device;
struct Scsi_Host *shost = sdev->host;
struct scsi_driver *drv;
unsigned int good_bytes;
-@@ -872,6 +820,7 @@ void scsi_finish_command(struct scsi_cmn
+@@ -872,6 +820,7 @@
* XXX(hch): What about locking?
*/
shost->host_blocked = 0;
sdev->device_blocked = 0;
/*
-@@ -1150,7 +1099,8 @@ EXPORT_SYMBOL(__starget_for_each_device)
+@@ -1150,7 +1099,8 @@
* Description: Looks up the scsi_device with the specified @lun for a given
* @starget. The returned scsi_device does not have an additional
* reference. You must hold the host's host_lock over this call and
*
* Note: The only reason why drivers should use this is because
* they need to access the device list in irq context. Otherwise you
-@@ -1162,6 +1112,8 @@ struct scsi_device *__scsi_device_lookup
+@@ -1162,6 +1112,8 @@
struct scsi_device *sdev;
list_for_each_entry(sdev, &starget->devices, same_target_siblings) {
if (sdev->lun ==lun)
return sdev;
}
-diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/scsi/scsi_error.c
---- linux-2.6.27/drivers/scsi/scsi_error.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_error.c 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/scsi_error.c
+--- a/drivers/scsi/scsi_error.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_error.c Wed May 06 16:56:35 2009 +0100
@@ -24,6 +24,8 @@
#include <linux/interrupt.h>
#include <linux/blkdev.h>
/*
* These should *probably* be handled by the host itself.
-@@ -112,69 +116,8 @@ int scsi_eh_scmd_add(struct scsi_cmnd *s
+@@ -112,69 +116,8 @@
}
/**
*
* Notes:
* We do not need to lock this. There is the potential for a race
-@@ -182,9 +125,11 @@ int scsi_delete_timer(struct scsi_cmnd *
+@@ -182,9 +125,11 @@
* normal completion function determines that the timer has already
* fired, then it mustn't do anything.
*/
scsi_log_completion(scmd, TIMEOUT_ERROR);
-@@ -195,23 +140,22 @@ void scsi_times_out(struct scsi_cmnd *sc
+@@ -195,23 +140,22 @@
else
eh_timed_out = NULL;
}
/**
-@@ -285,6 +229,80 @@ static inline void scsi_eh_prt_fail_stat
+@@ -285,6 +229,80 @@
}
#endif
/**
* scsi_check_sense - Examine scsi cmd sense
* @scmd: Cmd to have sense checked.
-@@ -307,6 +325,8 @@ static int scsi_check_sense(struct scsi_
+@@ -306,6 +324,8 @@
+
if (scsi_sense_is_deferred(&sshdr))
return NEEDS_RETRY;
-
-+ scsi_post_sense_event(sdev, &sshdr);
+
++ scsi_post_sense_event(sdev, &sshdr);
+
if (sdev->scsi_dh_data && sdev->scsi_dh_data->scsi_dh &&
sdev->scsi_dh_data->scsi_dh->check_sense) {
- int rc;
-@@ -918,7 +938,7 @@ static int scsi_eh_tur(struct scsi_cmnd
+@@ -918,7 +938,7 @@
int retry_cnt = 1, rtn;
retry_tur:
SCSI_LOG_ERROR_RECOVERY(3, printk("%s: scmd %p rtn %x\n",
__func__, scmd, rtn));
-@@ -994,7 +1014,7 @@ static int scsi_eh_try_stu(struct scsi_c
+@@ -994,7 +1014,7 @@
for (i = 0; rtn == NEEDS_RETRY && i < 2; i++)
rtn = scsi_send_eh_cmnd(scmd, stu_command, 6,
if (rtn == SUCCESS)
return 0;
-@@ -1126,10 +1146,10 @@ static int scsi_eh_target_reset(struct S
+@@ -1126,10 +1146,10 @@
struct list_head *done_q)
{
struct scsi_cmnd *scmd, *tgtr_scmd, *next;
tgtr_scmd = NULL;
list_for_each_entry(scmd, work_q, eh_entry) {
if (id == scmd_id(scmd)) {
-@@ -1137,8 +1157,18 @@ static int scsi_eh_target_reset(struct S
+@@ -1137,8 +1157,18 @@
break;
}
}
SCSI_LOG_ERROR_RECOVERY(3, printk("%s: Sending target reset "
"to target %d\n",
-@@ -1157,7 +1187,8 @@ static int scsi_eh_target_reset(struct S
+@@ -1157,7 +1187,8 @@
" failed target: "
"%d\n",
current->comm, id));
return list_empty(work_q);
}
-@@ -1280,6 +1311,40 @@ static void scsi_eh_offline_sdevs(struct
+@@ -1280,6 +1311,40 @@
}
/**
* scsi_decide_disposition - Disposition a cmd on return from LLD.
* @scmd: SCSI cmd to examine.
*
-@@ -1351,7 +1416,21 @@ int scsi_decide_disposition(struct scsi_
+@@ -1351,7 +1416,21 @@
case DID_REQUEUE:
return ADD_TO_MLQUEUE;
case DID_ERROR:
if (msg_byte(scmd->result) == COMMAND_COMPLETE &&
status_byte(scmd->result) == RESERVATION_CONFLICT)
-@@ -1408,8 +1487,9 @@ int scsi_decide_disposition(struct scsi_
+@@ -1408,8 +1487,9 @@
return ADD_TO_MLQUEUE;
case GOOD:
case COMMAND_TERMINATED:
-- case TASK_ABORTED:
- return SUCCESS;
-+ case TASK_ABORTED:
++ return SUCCESS;
+ case TASK_ABORTED:
+- return SUCCESS;
+ goto maybe_retry;
case CHECK_CONDITION:
rtn = scsi_check_sense(scmd);
if (rtn == NEEDS_RETRY)
-@@ -1444,7 +1524,7 @@ int scsi_decide_disposition(struct scsi_
+@@ -1444,7 +1524,7 @@
* even if the request is marked fast fail, we still requeue
* for queue congestion conditions (QUEUE_FULL or BUSY) */
if ((++scmd->retries) <= scmd->allowed
return NEEDS_RETRY;
} else {
/*
-@@ -1569,7 +1649,7 @@ void scsi_eh_flush_done_q(struct list_he
+@@ -1569,7 +1649,7 @@
list_for_each_entry_safe(scmd, next, done_q, eh_entry) {
list_del_init(&scmd->eh_entry);
if (scsi_device_online(scmd->device) &&
(++scmd->retries <= scmd->allowed)) {
SCSI_LOG_ERROR_RECOVERY(3, printk("%s: flush"
" retry cmd: %p\n",
-@@ -1793,7 +1873,6 @@ scsi_reset_provider(struct scsi_device *
+@@ -1793,7 +1873,6 @@
blk_rq_init(NULL, &req);
scmd->request = &req;
scmd->cmnd = req.cmd;
-@@ -1804,8 +1883,6 @@ scsi_reset_provider(struct scsi_device *
+@@ -1803,8 +1882,6 @@
+ scmd->cmd_len = 0;
scmd->sc_data_direction = DMA_BIDIRECTIONAL;
-
-- init_timer(&scmd->eh_timeout);
-
+- init_timer(&scmd->eh_timeout);
+
spin_lock_irqsave(shost->host_lock, flags);
shost->tmf_in_progress = 1;
- spin_unlock_irqrestore(shost->host_lock, flags);
-diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi/scsi_lib.c
---- linux-2.6.27/drivers/scsi/scsi_lib.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_lib.c 2009-03-25 16:11:14.000000000 +0000
-@@ -114,6 +114,7 @@ int scsi_queue_insert(struct scsi_cmnd *
+diff -r 9608d5473017 drivers/scsi/scsi_lib.c
+--- a/drivers/scsi/scsi_lib.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_lib.c Wed May 06 16:56:35 2009 +0100
+@@ -114,6 +114,7 @@
{
struct Scsi_Host *host = cmd->device->host;
struct scsi_device *device = cmd->device;
struct request_queue *q = device->request_queue;
unsigned long flags;
-@@ -133,10 +134,17 @@ int scsi_queue_insert(struct scsi_cmnd *
+@@ -133,10 +134,17 @@
* if a command is requeued with no other commands outstanding
* either for the device or for the host.
*/
/*
* Decrement the counters, since these commands are no longer
-@@ -460,10 +468,12 @@ static void scsi_init_cmd_errh(struct sc
+@@ -460,10 +468,12 @@
void scsi_device_unbusy(struct scsi_device *sdev)
{
struct Scsi_Host *shost = sdev->host;
if (unlikely(scsi_host_in_recovery(shost) &&
(shost->host_failed || shost->host_eh_scheduled)))
scsi_eh_wakeup(shost);
-@@ -519,6 +529,30 @@ static void scsi_single_lun_run(struct s
+@@ -519,6 +529,30 @@
spin_unlock_irqrestore(shost->host_lock, flags);
}
/*
* Function: scsi_run_queue()
*
-@@ -535,17 +569,16 @@ static void scsi_run_queue(struct reques
+@@ -535,17 +569,16 @@
{
struct scsi_device *sdev = q->queuedata;
struct Scsi_Host *shost = sdev->host;
int flagset;
/*
-@@ -558,9 +591,18 @@ static void scsi_run_queue(struct reques
+@@ -558,9 +591,18 @@
* scsi_request_fn must get the host_lock before checking
* or modifying starved_list or starved_entry.
*/
spin_unlock(shost->host_lock);
spin_lock(sdev->request_queue->queue_lock);
-@@ -575,14 +617,9 @@ static void scsi_run_queue(struct reques
+@@ -575,14 +617,9 @@
spin_unlock(sdev->request_queue->queue_lock);
spin_lock(shost->host_lock);
spin_unlock_irqrestore(shost->host_lock, flags);
blk_run_queue(q);
-@@ -611,8 +648,8 @@ static void scsi_requeue_command(struct
+@@ -611,8 +648,8 @@
struct request *req = cmd->request;
unsigned long flags;
-- scsi_unprep_request(req);
- spin_lock_irqsave(q->queue_lock, flags);
-+ scsi_unprep_request(req);
++ spin_lock_irqsave(q->queue_lock, flags);
+ scsi_unprep_request(req);
+- spin_lock_irqsave(q->queue_lock, flags);
blk_requeue_request(q, req);
spin_unlock_irqrestore(q->queue_lock, flags);
-@@ -681,7 +718,7 @@ static struct scsi_cmnd *scsi_end_reques
+@@ -681,7 +718,7 @@
leftover = req->data_len;
/* kill remainder if no retrys */
blk_end_request(req, error, leftover);
else {
if (requeue) {
-@@ -1181,7 +1218,6 @@ int scsi_setup_blk_pc_cmnd(struct scsi_d
+@@ -1181,7 +1218,6 @@
cmd->transfersize = req->data_len;
cmd->allowed = req->retries;
return BLKPREP_OK;
}
EXPORT_SYMBOL(scsi_setup_blk_pc_cmnd);
-@@ -1251,6 +1287,7 @@ int scsi_prep_state_check(struct scsi_de
+@@ -1251,6 +1287,7 @@
break;
case SDEV_QUIESCE:
case SDEV_BLOCK:
/*
* If the devices is blocked we defer normal commands.
*/
-@@ -1313,6 +1350,7 @@ int scsi_prep_fn(struct request_queue *q
+@@ -1313,6 +1350,7 @@
ret = scsi_setup_blk_pc_cmnd(sdev, req);
return scsi_prep_return(q, req, ret);
}
/*
* scsi_dev_queue_ready: if we can send requests to sdev, return 1 else
-@@ -1323,8 +1361,6 @@ int scsi_prep_fn(struct request_queue *q
+@@ -1323,8 +1361,6 @@
static inline int scsi_dev_queue_ready(struct request_queue *q,
struct scsi_device *sdev)
{
if (sdev->device_busy == 0 && sdev->device_blocked) {
/*
* unblock after device_blocked iterates to zero
-@@ -1338,12 +1374,58 @@ static inline int scsi_dev_queue_ready(s
+@@ -1338,9 +1374,55 @@
return 0;
}
}
+ if (scsi_device_is_busy(sdev))
return 0;
- return 1;
- }
-
++ return 1;
++}
++
+
+/*
+ * scsi_target_queue_ready: checks if there we can send commands to target
+ /* We're OK to process the command, so we can't be starved */
+ if (!list_empty(&sdev->starved_entry))
+ list_del_init(&sdev->starved_entry);
-+ return 1;
-+}
-+
- /*
- * scsi_host_queue_ready: if we can send requests to shost, return 1 else
- * return 0. We must end up running the queue again whenever 0 is
-@@ -1369,8 +1451,7 @@ static inline int scsi_host_queue_ready(
+ return 1;
+ }
+
+@@ -1369,8 +1451,7 @@
return 0;
}
}
if (list_empty(&sdev->starved_entry))
list_add_tail(&sdev->starved_entry, &shost->starved_list);
return 0;
-@@ -1384,12 +1465,44 @@ static inline int scsi_host_queue_ready(
+@@ -1384,12 +1465,44 @@
}
/*
struct Scsi_Host *shost = sdev->host;
blkdev_dequeue_request(req);
-@@ -1413,20 +1526,30 @@ static void scsi_kill_request(struct req
+@@ -1413,19 +1526,29 @@
spin_unlock(sdev->request_queue->queue_lock);
spin_lock(shost->host_lock);
shost->host_busy++;
int disposition;
INIT_LIST_HEAD(&cmd->eh_entry);
-
++
+ /*
+ * Set the serial numbers back to zero
+ */
+ atomic_inc(&cmd->device->iodone_cnt);
+ if (cmd->result)
+ atomic_inc(&cmd->device->ioerr_cnt);
-+
+
disposition = scsi_decide_disposition(cmd);
if (disposition != SUCCESS &&
- time_before(cmd->jiffies_at_alloc + wait_for, jiffies)) {
-@@ -1541,14 +1664,13 @@ static void scsi_request_fn(struct reque
+@@ -1541,14 +1664,13 @@
goto not_ready;
}
shost->host_busy++;
/*
-@@ -1631,7 +1753,7 @@ struct request_queue *__scsi_alloc_queue
+@@ -1631,7 +1753,7 @@
request_fn_proc *request_fn)
{
struct request_queue *q;
q = blk_init_queue(request_fn, NULL);
if (!q)
-@@ -1675,6 +1797,8 @@ struct request_queue *scsi_alloc_queue(s
+@@ -1675,6 +1797,8 @@
blk_queue_prep_rq(q, scsi_prep_fn);
blk_queue_softirq_done(q, scsi_softirq_done);
return q;
}
-@@ -2064,10 +2188,13 @@ scsi_device_set_state(struct scsi_device
+@@ -2064,10 +2188,13 @@
switch (state) {
case SDEV_CREATED:
case SDEV_RUNNING:
switch (oldstate) {
-@@ -2105,8 +2232,17 @@ scsi_device_set_state(struct scsi_device
+@@ -2105,8 +2232,17 @@
case SDEV_BLOCK:
switch (oldstate) {
-- case SDEV_CREATED:
- case SDEV_RUNNING:
++ case SDEV_RUNNING:
+ case SDEV_CREATED_BLOCK:
+ break;
+ default:
+
+ case SDEV_CREATED_BLOCK:
+ switch (oldstate) {
-+ case SDEV_CREATED:
+ case SDEV_CREATED:
+- case SDEV_RUNNING:
break;
default:
goto illegal;
-@@ -2394,8 +2530,12 @@ scsi_internal_device_block(struct scsi_d
+@@ -2394,8 +2530,12 @@
int err = 0;
err = scsi_device_set_state(sdev, SDEV_BLOCK);
/*
* The device has transitioned to SDEV_BLOCK. Stop the
-@@ -2438,8 +2578,12 @@ scsi_internal_device_unblock(struct scsi
+@@ -2438,8 +2578,12 @@
* and goose the device queue if successful.
*/
err = scsi_device_set_state(sdev, SDEV_RUNNING);
spin_lock_irqsave(q->queue_lock, flags);
blk_start_queue(q);
-diff -purN linux-2.6.27/drivers/scsi/scsi_lib_dma.c linux-2.6.27.19-5.1/drivers/scsi/scsi_lib_dma.c
---- linux-2.6.27/drivers/scsi/scsi_lib_dma.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_lib_dma.c 2009-03-25 16:11:15.000000000 +0000
-@@ -23,7 +23,8 @@ int scsi_dma_map(struct scsi_cmnd *cmd)
+diff -r 9608d5473017 drivers/scsi/scsi_lib_dma.c
+--- a/drivers/scsi/scsi_lib_dma.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_lib_dma.c Wed May 06 16:56:35 2009 +0100
+@@ -23,7 +23,8 @@
int nseg = 0;
if (scsi_sg_count(cmd)) {
nseg = dma_map_sg(dev, scsi_sglist(cmd), scsi_sg_count(cmd),
cmd->sc_data_direction);
-@@ -41,10 +42,12 @@ EXPORT_SYMBOL(scsi_dma_map);
+@@ -41,10 +42,12 @@
void scsi_dma_unmap(struct scsi_cmnd *cmd)
{
if (scsi_sg_count(cmd)) {
}
EXPORT_SYMBOL(scsi_dma_unmap);
+
-diff -purN linux-2.6.27/drivers/scsi/scsi_netlink.c linux-2.6.27.19-5.1/drivers/scsi/scsi_netlink.c
---- linux-2.6.27/drivers/scsi/scsi_netlink.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_netlink.c 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/scsi_netlink.c
+--- a/drivers/scsi/scsi_netlink.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_netlink.c Wed May 06 16:56:35 2009 +0100
@@ -21,6 +21,7 @@
#include <linux/time.h>
#include <linux/jiffies.h>
/**
* scsi_nl_rcv_msg - Receive message handler.
-@@ -45,8 +79,9 @@ scsi_nl_rcv_msg(struct sk_buff *skb)
+@@ -45,8 +79,9 @@
{
struct nlmsghdr *nlh;
struct scsi_nl_hdr *hdr;
while (skb->len >= NLMSG_SPACE(0)) {
err = 0;
-@@ -65,7 +100,7 @@ scsi_nl_rcv_msg(struct sk_buff *skb)
+@@ -65,7 +100,7 @@
if (nlh->nlmsg_type != SCSI_TRANSPORT_MSG) {
err = -EBADMSG;
}
hdr = NLMSG_DATA(nlh);
-@@ -83,12 +118,27 @@ scsi_nl_rcv_msg(struct sk_buff *skb)
+@@ -83,12 +118,27 @@
if (nlh->nlmsg_len < (sizeof(*nlh) + hdr->msglen)) {
printk(KERN_WARNING "%s: discarding partial message\n",
__func__);
next_msg:
if ((err) || (nlh->nlmsg_flags & NLM_F_ACK))
-@@ -110,14 +160,42 @@ static int
+@@ -110,14 +160,42 @@
scsi_nl_rcv_event(struct notifier_block *this, unsigned long event, void *ptr)
{
struct netlink_notify *n = ptr;
+ spin_lock_irqsave(&scsi_nl_lock, flags);
+ scsi_nl_state |= STATE_EHANDLER_BSY;
+
-+ /*
+ /*
+- * Currently, we are not tracking PID's, etc. There is nothing
+- * to handle.
+ * Pass event on to any transports that may be listening
-+ */
+ */
+ for (tport = 0; tport < SCSI_NL_MAX_TRANSPORTS; tport++) {
+ if (!(transports[tport].flags & HANDLER_DELETING) &&
+ (transports[tport].event_handler)) {
+ }
+ }
+
- /*
-- * Currently, we are not tracking PID's, etc. There is nothing
-- * to handle.
++ /*
+ * Pass event on to any drivers that may be listening
- */
++ */
+ list_for_each_entry(driver, &scsi_nl_drivers, next) {
+ if (!(driver->flags & HANDLER_DELETING) &&
+ (driver->devt_handler)) {
return NOTIFY_DONE;
}
-@@ -128,7 +206,281 @@ static struct notifier_block scsi_netlin
+@@ -128,13 +206,289 @@
/**
*
**/
void
-@@ -136,6 +488,8 @@ scsi_netlink_init(void)
+ scsi_netlink_init(void)
{
int error;
-
-+ INIT_LIST_HEAD(&scsi_nl_drivers);
+
++ INIT_LIST_HEAD(&scsi_nl_drivers);
+
error = netlink_register_notifier(&scsi_netlink_notifier);
if (error) {
- printk(KERN_ERR "%s: register of event handler failed - %d\n",
-@@ -150,8 +504,15 @@ scsi_netlink_init(void)
+@@ -150,8 +504,15 @@
printk(KERN_ERR "%s: register of recieve handler failed\n",
__func__);
netlink_unregister_notifier(&scsi_netlink_notifier);
return;
}
-@@ -163,6 +524,8 @@ scsi_netlink_init(void)
+@@ -163,6 +524,8 @@
void
scsi_netlink_exit(void)
{
if (scsi_nl_sock) {
netlink_kernel_release(scsi_nl_sock);
netlink_unregister_notifier(&scsi_netlink_notifier);
-@@ -172,3 +535,147 @@ scsi_netlink_exit(void)
+@@ -172,3 +535,147 @@
}
+EXPORT_SYMBOL(scsi_nl_send_vendor_msg);
+
+
-diff -purN linux-2.6.27/drivers/scsi/scsi_priv.h linux-2.6.27.19-5.1/drivers/scsi/scsi_priv.h
---- linux-2.6.27/drivers/scsi/scsi_priv.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_priv.h 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/scsi_priv.h
+--- a/drivers/scsi/scsi_priv.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_priv.h Wed May 06 16:56:35 2009 +0100
@@ -4,6 +4,7 @@
#include <linux/device.h>
struct scsi_cmnd;
struct scsi_device;
struct scsi_host_template;
-@@ -27,7 +28,6 @@ extern void scsi_exit_hosts(void);
+@@ -27,7 +28,6 @@
extern int scsi_dispatch_cmd(struct scsi_cmnd *cmd);
extern int scsi_setup_command_freelist(struct Scsi_Host *shost);
extern void scsi_destroy_command_freelist(struct Scsi_Host *shost);
#ifdef CONFIG_SCSI_LOGGING
void scsi_log_send(struct scsi_cmnd *cmd);
void scsi_log_completion(struct scsi_cmnd *cmd, int disposition);
-@@ -49,10 +49,7 @@ extern int __init scsi_init_devinfo(void
+@@ -49,10 +49,7 @@
extern void scsi_exit_devinfo(void);
/* scsi_error.c */
extern int scsi_error_handler(void *host);
extern int scsi_decide_disposition(struct scsi_cmnd *cmd);
extern void scsi_eh_wakeup(struct Scsi_Host *shost);
-@@ -62,6 +59,7 @@ void scsi_eh_ready_devs(struct Scsi_Host
+@@ -62,6 +59,7 @@
struct list_head *done_q);
int scsi_eh_get_sense(struct list_head *work_q,
struct list_head *done_q);
/* scsi_lib.c */
extern int scsi_maybe_unblock_host(struct scsi_device *sdev);
-@@ -76,7 +74,6 @@ extern int scsi_init_queue(void);
+@@ -76,7 +74,6 @@
extern void scsi_exit_queue(void);
struct request_queue;
struct request;
extern struct kmem_cache *scsi_sdb_cache;
/* scsi_proc.c */
-diff -purN linux-2.6.27/drivers/scsi/scsi_proc.c linux-2.6.27.19-5.1/drivers/scsi/scsi_proc.c
---- linux-2.6.27/drivers/scsi/scsi_proc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_proc.c 2009-03-25 16:11:17.000000000 +0000
-@@ -389,13 +389,59 @@ static ssize_t proc_scsi_write(struct fi
+diff -r 9608d5473017 drivers/scsi/scsi_proc.c
+--- a/drivers/scsi/scsi_proc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_proc.c Wed May 06 16:56:35 2009 +0100
+@@ -389,12 +389,58 @@
* @s: output goes here
* @p: not used
*/
- bus_for_each_dev(&scsi_bus_type, NULL, s, proc_print_scsidevice);
- return 0;
+ return 1;
-+}
+ }
+
+static inline struct device *next_scsi_device(struct device *start)
+{
+ seq_puts(sfile, "Attached devices:\n");
+
+ return proc_print_scsidevice(dev, sfile);
- }
-
++}
++
+static struct seq_operations scsi_seq_ops = {
+ .start = scsi_seq_start,
+ .next = scsi_seq_next,
+ .stop = scsi_seq_stop,
+ .show = scsi_seq_show
+};
-+
+
/**
* proc_scsi_open - glue function
- * @inode: not used
-@@ -409,7 +455,7 @@ static int proc_scsi_open(struct inode *
+@@ -409,7 +455,7 @@
* We don't really need this for the write case but it doesn't
* harm either.
*/
}
static const struct file_operations proc_scsi_operations = {
-@@ -418,7 +464,7 @@ static const struct file_operations proc
+@@ -418,7 +464,7 @@
.read = seq_read,
.write = proc_scsi_write,
.llseek = seq_lseek,
};
/**
-diff -purN linux-2.6.27/drivers/scsi/scsi_scan.c linux-2.6.27.19-5.1/drivers/scsi/scsi_scan.c
---- linux-2.6.27/drivers/scsi/scsi_scan.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_scan.c 2009-03-25 16:11:15.000000000 +0000
-@@ -314,6 +314,7 @@ static struct scsi_device *scsi_alloc_sd
+diff -r 9608d5473017 drivers/scsi/scsi_scan.c
+--- a/drivers/scsi/scsi_scan.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_scan.c Wed May 06 16:56:35 2009 +0100
+@@ -314,6 +314,7 @@
return sdev;
out_device_destroy:
transport_destroy_device(&sdev->sdev_gendev);
put_device(&sdev->sdev_gendev);
out:
-@@ -419,6 +420,7 @@ static struct scsi_target *scsi_alloc_ta
+@@ -419,6 +420,7 @@
dev->type = &scsi_target_type;
starget->id = id;
starget->channel = channel;
INIT_LIST_HEAD(&starget->siblings);
INIT_LIST_HEAD(&starget->devices);
starget->state = STARGET_CREATED;
-@@ -679,7 +681,7 @@ static int scsi_probe_lun(struct scsi_de
+@@ -679,7 +681,7 @@
* and displaying garbage for the Vendor, Product, or Revision
* strings.
*/
printk(KERN_INFO "scsi scan: INQUIRY result too short (%d),"
" using 36\n", sdev->inquiry_len);
sdev->inquiry_len = 36;
-@@ -730,6 +732,8 @@ static int scsi_probe_lun(struct scsi_de
+@@ -730,6 +732,8 @@
static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
int *bflags, int async)
{
/*
* XXX do not save the inquiry, since it can change underneath us,
* save just vendor/model/rev.
-@@ -818,6 +822,7 @@ static int scsi_add_lun(struct scsi_devi
+@@ -818,6 +822,7 @@
sdev->inq_periph_qual = (inq_result[0] >> 5) & 7;
sdev->lockable = sdev->removable;
sdev->soft_reset = (inq_result[7] & 1) && ((inq_result[3] & 7) == 2);
if (sdev->scsi_level >= SCSI_3 ||
(sdev->inquiry_len > 56 && inq_result[56] & 0x04))
-@@ -885,7 +890,17 @@ static int scsi_add_lun(struct scsi_devi
+@@ -885,7 +890,17 @@
/* set the device running here so that slave configure
* may do I/O */
if (*bflags & BLIST_MS_192_BYTES_FOR_3F)
sdev->use_192_bytes_for_3f = 1;
-@@ -899,7 +914,7 @@ static int scsi_add_lun(struct scsi_devi
+@@ -899,7 +914,7 @@
transport_configure_device(&sdev->sdev_gendev);
if (sdev->host->hostt->slave_configure) {
if (ret) {
/*
* if LLDD reports slave not present, don't clutter
-@@ -994,7 +1009,7 @@ static int scsi_probe_and_add_lun(struct
+@@ -994,7 +1009,7 @@
*/
sdev = scsi_device_lookup_by_target(starget, lun);
if (sdev) {
SCSI_LOG_SCAN_BUS(3, printk(KERN_INFO
"scsi scan: device exists on %s\n",
sdev->sdev_gendev.bus_id));
-@@ -1467,7 +1482,7 @@ static int scsi_report_lun_scan(struct s
+@@ -1467,7 +1482,7 @@
kfree(lun_data);
out:
scsi_device_put(sdev);
/*
* the sdev we used didn't appear in the report luns scan
*/
-diff -purN linux-2.6.27/drivers/scsi/scsi_sysfs.c linux-2.6.27.19-5.1/drivers/scsi/scsi_sysfs.c
---- linux-2.6.27/drivers/scsi/scsi_sysfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_sysfs.c 2009-03-25 16:11:15.000000000 +0000
-@@ -34,6 +34,7 @@ static const struct {
+diff -r 9608d5473017 drivers/scsi/scsi_sysfs.c
+--- a/drivers/scsi/scsi_sysfs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_sysfs.c Wed May 06 16:56:35 2009 +0100
+@@ -34,6 +34,7 @@
{ SDEV_QUIESCE, "quiesce" },
{ SDEV_OFFLINE, "offline" },
{ SDEV_BLOCK, "blocked" },
};
const char *scsi_device_state_name(enum scsi_device_state state)
-@@ -419,29 +420,12 @@ static int scsi_bus_resume(struct device
+@@ -419,29 +420,12 @@
return err;
}
};
EXPORT_SYMBOL_GPL(scsi_bus_type);
-@@ -559,13 +543,17 @@ sdev_rd_attr (scsi_level, "%d\n");
+@@ -559,13 +543,17 @@
sdev_rd_attr (vendor, "%.8s\n");
sdev_rd_attr (model, "%.16s\n");
sdev_rd_attr (rev, "%.4s\n");
}
static ssize_t
-@@ -576,7 +564,7 @@ sdev_store_timeout (struct device *dev,
+@@ -576,7 +564,7 @@
int timeout;
sdev = to_scsi_device(dev);
sscanf (buf, "%d\n", &timeout);
return count;
}
static DEVICE_ATTR(timeout, S_IRUGO | S_IWUSR, sdev_show_timeout, sdev_store_timeout);
-@@ -741,6 +729,7 @@ static struct attribute *scsi_sdev_attrs
+@@ -741,6 +729,7 @@
&dev_attr_vendor.attr,
&dev_attr_model.attr,
&dev_attr_rev.attr,
&dev_attr_rescan.attr,
&dev_attr_delete.attr,
&dev_attr_state.attr,
-diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/drivers/scsi/scsi_transport_fc.c
---- linux-2.6.27/drivers/scsi/scsi_transport_fc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_transport_fc.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/scsi_transport_fc.c
+--- a/drivers/scsi/scsi_transport_fc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_transport_fc.c Wed May 06 16:56:35 2009 +0100
@@ -40,31 +40,7 @@
static int fc_queue_work(struct Scsi_Host *, struct work_struct *);
struct device *pdev, struct fc_vport_identifiers *ids,
struct fc_vport **vport);
-@@ -1760,7 +1736,7 @@ store_fc_host_vport_create(struct device
+@@ -1760,7 +1736,7 @@
vid.disable = false; /* always enabled */
/* we only allow support on Channel 0 !!! */
return stat ? stat : count;
}
static FC_DEVICE_ATTR(host, vport_create, S_IWUSR, NULL,
-@@ -1950,15 +1926,15 @@ static int fc_vport_match(struct attribu
+@@ -1950,15 +1926,15 @@
* Notes:
* This routine assumes no locks are held on entry.
*/
}
/*
-@@ -2157,8 +2133,7 @@ fc_attach_transport(struct fc_function_t
+@@ -2157,8 +2133,7 @@
SETUP_PRIVATE_RPORT_ATTRIBUTE_RD(roles);
SETUP_PRIVATE_RPORT_ATTRIBUTE_RD(port_state);
SETUP_PRIVATE_RPORT_ATTRIBUTE_RD(scsi_target_id);
BUG_ON(count > FC_RPORT_NUM_ATTRS);
-@@ -2352,6 +2327,22 @@ fc_remove_host(struct Scsi_Host *shost)
+@@ -2352,6 +2327,22 @@
}
EXPORT_SYMBOL(fc_remove_host);
/**
* fc_starget_delete - called to delete the scsi decendents of an rport
-@@ -2364,13 +2355,8 @@ fc_starget_delete(struct work_struct *wo
+@@ -2364,13 +2355,8 @@
{
struct fc_rport *rport =
container_of(work, struct fc_rport, stgt_delete_work);
- struct Scsi_Host *shost = rport_to_shost(rport);
- struct fc_internal *i = to_fc_internal(shost->transportt);
--
+
- /* Involve the LLDD if possible to terminate all io on the rport. */
- if (i->f->terminate_rport_io)
- i->f->terminate_rport_io(rport);
-
+-
+ fc_terminate_rport_io(rport);
scsi_remove_target(&rport->dev);
}
-@@ -2396,10 +2382,7 @@ fc_rport_final_delete(struct work_struct
+@@ -2396,10 +2382,7 @@
if (rport->flags & FC_RPORT_SCAN_PENDING)
scsi_flush_work(shost);
/*
* Cancel any outstanding timers. These should really exist
* only when rmmod'ing the LLDD and we're asking for
-@@ -2424,8 +2407,12 @@ fc_rport_final_delete(struct work_struct
+@@ -2424,8 +2407,12 @@
/*
* Notify the driver that the rport is now dead. The LLDD will
* also guarantee that any communication to the rport is terminated
i->f->dev_loss_tmo_callbk(rport);
transport_remove_device(dev);
-@@ -2663,7 +2650,9 @@ fc_remote_port_add(struct Scsi_Host *sho
+@@ -2663,7 +2650,9 @@
spin_lock_irqsave(shost->host_lock, flags);
/* if target, initiate a scan */
if (rport->scsi_target_id != -1) {
-@@ -2726,6 +2715,7 @@ fc_remote_port_add(struct Scsi_Host *sho
+@@ -2726,6 +2715,7 @@
rport->port_id = ids->port_id;
rport->roles = ids->roles;
rport->port_state = FC_PORTSTATE_ONLINE;
if (fci->f->dd_fcrport_size)
memset(rport->dd_data, 0,
-@@ -2808,7 +2798,6 @@ void
+@@ -2808,7 +2798,6 @@
fc_remote_port_delete(struct fc_rport *rport)
{
struct Scsi_Host *shost = rport_to_shost(rport);
int timeout = rport->dev_loss_tmo;
unsigned long flags;
-@@ -2854,7 +2843,7 @@ fc_remote_port_delete(struct fc_rport *
+@@ -2854,7 +2843,7 @@
/* see if we need to kill io faster than waiting for device loss */
if ((rport->fast_io_fail_tmo != -1) &&
fc_queue_devloss_work(shost, &rport->fail_io_work,
rport->fast_io_fail_tmo * HZ);
-@@ -2930,7 +2919,8 @@ fc_remote_port_rolechg(struct fc_rport
+@@ -2930,7 +2919,8 @@
fc_flush_devloss(shost);
spin_lock_irqsave(shost->host_lock, flags);
spin_unlock_irqrestore(shost->host_lock, flags);
/* ensure any stgt delete functions are done */
-@@ -2959,6 +2949,7 @@ fc_timeout_deleted_rport(struct work_str
+@@ -2959,6 +2949,7 @@
struct fc_rport *rport =
container_of(work, struct fc_rport, dev_loss_work.work);
struct Scsi_Host *shost = rport_to_shost(rport);
struct fc_host_attrs *fc_host = shost_to_fc_host(shost);
unsigned long flags;
-@@ -3025,6 +3016,7 @@ fc_timeout_deleted_rport(struct work_str
+@@ -3025,6 +3016,7 @@
rport->supported_classes = FC_COS_UNSPECIFIED;
rport->roles = FC_PORT_ROLE_UNKNOWN;
rport->port_state = FC_PORTSTATE_NOTPRESENT;
/* remove the identifiers that aren't used in the consisting binding */
switch (fc_host->tgtid_bind_type) {
-@@ -3044,6 +3036,8 @@ fc_timeout_deleted_rport(struct work_str
+@@ -3044,6 +3036,8 @@
break;
}
/*
* As this only occurs if the remote port (scsi target)
* went away and didn't come back - we'll remove
-@@ -3053,8 +3047,18 @@ fc_timeout_deleted_rport(struct work_str
+@@ -3053,7 +3047,17 @@
scsi_target_unblock(&rport->dev);
fc_queue_work(shost, &rport->stgt_delete_work);
+ if (i->f->dev_loss_tmo_callbk)
+ i->f->dev_loss_tmo_callbk(rport);
}
-
+
+
/**
* fc_timeout_fail_rport_io - Timeout handler for a fast io failing on a disconnected SCSI target.
- * @work: rport to terminate io on.
-@@ -3067,13 +3071,12 @@ fc_timeout_fail_rport_io(struct work_str
+@@ -3067,13 +3071,12 @@
{
struct fc_rport *rport =
container_of(work, struct fc_rport, fail_io_work.work);
}
/**
-@@ -3103,7 +3106,7 @@ fc_scsi_scan_rport(struct work_struct *w
+@@ -3103,7 +3106,7 @@
/**
* @shost: scsi host the virtual port is connected to.
* @channel: Channel on shost port connected to.
* @pdev: parent device for vport
-@@ -3118,7 +3121,7 @@ fc_scsi_scan_rport(struct work_struct *w
+@@ -3118,7 +3121,7 @@
* This routine assumes no locks are held on entry.
*/
static int
struct fc_vport_identifiers *ids, struct fc_vport **ret_vport)
{
struct fc_host_attrs *fc_host = shost_to_fc_host(shost);
-@@ -3231,6 +3234,28 @@ delete_vport:
+@@ -3231,6 +3234,28 @@
return error;
}
/**
* fc_vport_terminate - Admin App or LLDD requests termination of a vport
-diff -purN linux-2.6.27/drivers/scsi/scsi_transport_iscsi.c linux-2.6.27.19-5.1/drivers/scsi/scsi_transport_iscsi.c
---- linux-2.6.27/drivers/scsi/scsi_transport_iscsi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_transport_iscsi.c 2009-03-25 16:11:15.000000000 +0000
-@@ -138,7 +138,7 @@ static ssize_t
+diff -r 9608d5473017 drivers/scsi/scsi_transport_iscsi.c
+--- a/drivers/scsi/scsi_transport_iscsi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_transport_iscsi.c Wed May 06 16:56:35 2009 +0100
+@@ -138,7 +138,7 @@
show_ep_handle(struct device *dev, struct device_attribute *attr, char *buf)
{
struct iscsi_endpoint *ep = iscsi_dev_to_endpoint(dev);
}
static ISCSI_ATTR(ep, handle, S_IRUGO, show_ep_handle, NULL);
-@@ -156,7 +156,7 @@ static struct attribute_group iscsi_endp
+@@ -156,7 +156,7 @@
static int iscsi_match_epid(struct device *dev, void *data)
{
struct iscsi_endpoint *ep = iscsi_dev_to_endpoint(dev);
return *epid == ep->id;
}
-@@ -166,7 +166,7 @@ iscsi_create_endpoint(int dd_size)
+@@ -166,7 +166,7 @@
{
struct device *dev;
struct iscsi_endpoint *ep;
int err;
for (id = 1; id < ISCSI_MAX_EPID; id++) {
-@@ -187,7 +187,7 @@ iscsi_create_endpoint(int dd_size)
+@@ -187,7 +187,7 @@
ep->id = id;
ep->dev.class = &iscsi_endpoint_class;
err = device_register(&ep->dev);
if (err)
goto free_ep;
-@@ -374,10 +374,10 @@ int iscsi_session_chkready(struct iscsi_
+@@ -374,10 +374,10 @@
err = 0;
break;
case ISCSI_SESSION_FAILED:
break;
default:
err = DID_NO_CONNECT << 16;
-diff -purN linux-2.6.27/drivers/scsi/scsi_transport_spi.c linux-2.6.27.19-5.1/drivers/scsi/scsi_transport_spi.c
---- linux-2.6.27/drivers/scsi/scsi_transport_spi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_transport_spi.c 2009-03-25 16:11:17.000000000 +0000
-@@ -109,7 +109,9 @@ static int spi_execute(struct scsi_devic
+diff -r 9608d5473017 drivers/scsi/scsi_transport_spi.c
+--- a/drivers/scsi/scsi_transport_spi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_transport_spi.c Wed May 06 16:56:35 2009 +0100
+@@ -109,7 +109,9 @@
for(i = 0; i < DV_RETRIES; i++) {
result = scsi_execute(sdev, cmd, dir, buffer, bufflen,
sense, DV_TIMEOUT, /* retries */ 1,
if (result & DRIVER_SENSE) {
struct scsi_sense_hdr sshdr_tmp;
if (!sshdr)
-diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
---- linux-2.6.27/drivers/scsi/sd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/sd.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/sd.c
+--- a/drivers/scsi/sd.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/sd.c Wed May 06 16:56:35 2009 +0100
@@ -47,6 +47,7 @@
#include <linux/blkpg.h>
#include <linux/delay.h>
#include <asm/uaccess.h>
#include <scsi/scsi.h>
-@@ -99,6 +100,7 @@ static void scsi_disk_release(struct dev
+@@ -99,6 +100,7 @@
static void sd_print_sense_hdr(struct scsi_disk *, struct scsi_sense_hdr *);
static void sd_print_result(struct scsi_disk *, int);
static DEFINE_IDA(sd_index_ida);
/* This semaphore is used to mediate the 0->1 reference get in the
-@@ -159,7 +161,7 @@ sd_store_cache_type(struct device *dev,
+@@ -159,7 +161,7 @@
sd_print_sense_hdr(sdkp, &sshdr);
return -EINVAL;
}
return count;
}
-@@ -377,7 +379,6 @@ static int sd_prep_fn(struct request_que
+@@ -377,7 +379,6 @@
sector_t block = rq->sector;
sector_t threshold;
unsigned int this_count = rq->nr_sectors;
int ret;
if (rq->cmd_type == REQ_TYPE_BLOCK_PC) {
-@@ -578,7 +579,6 @@ static int sd_prep_fn(struct request_que
+@@ -578,7 +579,6 @@
SCpnt->transfersize = sdp->sector_size;
SCpnt->underflow = this_count << 9;
SCpnt->allowed = SD_MAX_RETRIES;
/*
* This indicates that the command is ready from our end to be
-@@ -910,7 +910,7 @@ static void sd_rescan(struct device *dev
+@@ -910,7 +910,7 @@
struct scsi_disk *sdkp = scsi_disk_get_from_dev(dev);
if (sdkp) {
scsi_disk_put(sdkp);
}
}
-@@ -1047,7 +1047,6 @@ static int sd_done(struct scsi_cmnd *SCp
+@@ -1047,7 +1047,6 @@
good_bytes = sd_completed_bytes(SCpnt);
break;
case RECOVERED_ERROR:
/* Inform the user, but make sure that it's not treated
* as a hard error.
*/
-@@ -1056,6 +1055,15 @@ static int sd_done(struct scsi_cmnd *SCp
+@@ -1055,6 +1054,15 @@
+ SCpnt->result = 0;
memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
good_bytes = scsi_bufflen(SCpnt);
- break;
++ break;
+ case NO_SENSE:
+ /* This indicates a false check condition, so ignore it. An
+ * unknown amount of data was transferred so treat it as an
+ scsi_print_sense("sd", SCpnt);
+ SCpnt->result = 0;
+ memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
-+ break;
+ break;
case ABORTED_COMMAND:
if (sshdr.asc == 0x10) { /* DIF: Disk detected corruption */
- scsi_print_result(SCpnt);
-@@ -1204,8 +1212,7 @@ sd_spinup_disk(struct scsi_disk *sdkp)
+@@ -1204,8 +1212,7 @@
* Yes, this sense key/ASC combination shouldn't
* occur here. It's characteristic of these devices.
*/
sshdr.asc == 0x28) {
if (!spintime) {
spintime_expire = jiffies + 5 * HZ;
-@@ -1429,27 +1436,21 @@ got_data:
+@@ -1429,27 +1436,21 @@
*/
sector_size = 512;
}
- sector_t sz = (sdkp->capacity/2) * (hard_sector/256);
- struct request_queue *queue = sdp->request_queue;
- sector_t mb = sz;
--
++ char cap_str_2[10], cap_str_10[10];
++ u64 sz = sdkp->capacity << ffz(~sector_size);
+
- blk_queue_hardsect_size(queue, hard_sector);
- /* avoid 64-bit division on 32-bit platforms */
- sector_div(sz, 625);
- mb -= sz - 974;
- sector_div(mb, 1950);
-+ char cap_str_2[10], cap_str_10[10];
-+ u64 sz = sdkp->capacity << ffz(~sector_size);
-+
+ string_get_size(sz, STRING_UNITS_2, cap_str_2,
+ sizeof(cap_str_2));
+ string_get_size(sz, STRING_UNITS_10, cap_str_10,
}
/* Rescale capacity to 512-byte units */
-@@ -1809,7 +1810,9 @@ static int sd_probe(struct device *dev)
+@@ -1809,7 +1810,9 @@
if (!ida_pre_get(&sd_index_ida, GFP_KERNEL))
goto out_put;
} while (error == -EAGAIN);
if (error)
-@@ -1826,11 +1829,12 @@ static int sd_probe(struct device *dev)
+@@ -1826,11 +1829,12 @@
sdkp->openers = 0;
sdkp->previous_state = 1;
}
device_initialize(&sdkp->dev);
-@@ -1883,7 +1887,9 @@ static int sd_probe(struct device *dev)
+@@ -1883,7 +1887,9 @@
return 0;
out_free_index:
out_put:
put_disk(gd);
out_free:
-@@ -1907,6 +1913,8 @@ static int sd_remove(struct device *dev)
+@@ -1906,6 +1912,8 @@
+ static int sd_remove(struct device *dev)
{
struct scsi_disk *sdkp = dev_get_drvdata(dev);
-
-+ blk_queue_prep_rq(sdkp->device->request_queue, scsi_prep_fn);
+
++ blk_queue_prep_rq(sdkp->device->request_queue, scsi_prep_fn);
+
device_del(&sdkp->dev);
del_gendisk(sdkp->disk);
- sd_shutdown(dev);
-@@ -1933,7 +1941,9 @@ static void scsi_disk_release(struct dev
+@@ -1933,7 +1941,9 @@
struct scsi_disk *sdkp = to_scsi_disk(dev);
struct gendisk *disk = sdkp->disk;
disk->private_data = NULL;
put_disk(disk);
-diff -purN linux-2.6.27/drivers/scsi/sg.c linux-2.6.27.19-5.1/drivers/scsi/sg.c
---- linux-2.6.27/drivers/scsi/sg.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/sg.c 2009-03-25 16:11:14.000000000 +0000
-@@ -1097,7 +1097,7 @@ sg_ioctl(struct inode *inode, struct fil
+diff -r 9608d5473017 drivers/scsi/sg.c
+--- a/drivers/scsi/sg.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/sg.c Wed May 06 16:56:35 2009 +0100
+@@ -1097,7 +1097,7 @@
case BLKTRACESETUP:
return blk_trace_setup(sdp->device->request_queue,
sdp->disk->disk_name,
(char *)arg);
case BLKTRACESTART:
return blk_trace_startstop(sdp->device->request_queue, 1);
-diff -purN linux-2.6.27/drivers/scsi/sr.c linux-2.6.27.19-5.1/drivers/scsi/sr.c
---- linux-2.6.27/drivers/scsi/sr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/sr.c 2009-03-25 16:11:17.000000000 +0000
-@@ -331,7 +331,7 @@ static int sr_done(struct scsi_cmnd *SCp
+diff -r 9608d5473017 drivers/scsi/sr.c
+--- a/drivers/scsi/sr.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/sr.c Wed May 06 16:56:35 2009 +0100
+@@ -331,7 +331,7 @@
static int sr_prep_fn(struct request_queue *q, struct request *rq)
{
struct scsi_cd *cd;
struct scsi_cmnd *SCpnt;
struct scsi_device *sdp = q->queuedata;
-@@ -461,7 +461,6 @@ static int sr_prep_fn(struct request_que
+@@ -461,7 +461,6 @@
SCpnt->transfersize = cd->device->sector_size;
SCpnt->underflow = this_count << 9;
SCpnt->allowed = MAX_RETRIES;
/*
* This indicates that the command is ready from our end to be
-@@ -620,6 +619,8 @@ static int sr_probe(struct device *dev)
+@@ -620,6 +619,8 @@
disk->fops = &sr_bdops;
disk->flags = GENHD_FL_CD;
cd->device = sdev;
cd->disk = disk;
cd->driver = &sr_template;
-@@ -894,6 +895,7 @@ static int sr_remove(struct device *dev)
+@@ -894,6 +895,7 @@
{
struct scsi_cd *cd = dev_get_drvdata(dev);
del_gendisk(cd->disk);
mutex_lock(&sr_ref_mutex);
-diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
---- linux-2.6.27/drivers/scsi/st.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/st.c 2009-03-25 16:11:15.000000000 +0000
-@@ -613,7 +613,8 @@ static int cross_eof(struct scsi_tape *
+diff -r 9608d5473017 drivers/scsi/st.c
+--- a/drivers/scsi/st.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/st.c Wed May 06 16:56:36 2009 +0100
+@@ -613,7 +613,8 @@
tape_name(STp), forward ? "forward" : "backward"));
SRpnt = st_do_scsi(NULL, STp, cmd, 0, DMA_NONE,
if (!SRpnt)
return (STp->buffer)->syscall_result;
-@@ -657,7 +658,8 @@ static int st_flush_write_buffer(struct
+@@ -657,7 +658,8 @@
cmd[4] = blks;
SRpnt = st_do_scsi(NULL, STp, cmd, transfer, DMA_TO_DEVICE,
if (!SRpnt)
return (STp->buffer)->syscall_result;
-@@ -987,7 +989,8 @@ static int check_tape(struct scsi_tape *
+@@ -987,7 +989,8 @@
cmd[0] = READ_BLOCK_LIMITS;
SRpnt = st_do_scsi(SRpnt, STp, cmd, 6, DMA_FROM_DEVICE,
if (!SRpnt) {
retval = (STp->buffer)->syscall_result;
goto err_out;
-@@ -1014,7 +1017,8 @@ static int check_tape(struct scsi_tape *
+@@ -1014,7 +1017,8 @@
cmd[4] = 12;
SRpnt = st_do_scsi(SRpnt, STp, cmd, 12, DMA_FROM_DEVICE,
if (!SRpnt) {
retval = (STp->buffer)->syscall_result;
goto err_out;
-@@ -1247,7 +1251,8 @@ static int st_flush(struct file *filp, f
+@@ -1247,7 +1251,8 @@
cmd[4] = 1 + STp->two_fm;
SRpnt = st_do_scsi(NULL, STp, cmd, 0, DMA_NONE,
if (!SRpnt) {
result = (STp->buffer)->syscall_result;
goto out;
-@@ -1634,7 +1639,8 @@ st_write(struct file *filp, const char _
+@@ -1634,7 +1639,8 @@
cmd[4] = blks;
SRpnt = st_do_scsi(SRpnt, STp, cmd, transfer, DMA_TO_DEVICE,
if (!SRpnt) {
retval = STbp->syscall_result;
goto out;
-@@ -1804,7 +1810,8 @@ static long read_tape(struct scsi_tape *
+@@ -1804,7 +1810,8 @@
SRpnt = *aSRpnt;
SRpnt = st_do_scsi(SRpnt, STp, cmd, bytes, DMA_FROM_DEVICE,
release_buffering(STp, 1);
*aSRpnt = SRpnt;
if (!SRpnt)
-@@ -2213,7 +2220,8 @@ static int st_set_options(struct scsi_ta
+@@ -2213,7 +2220,8 @@
DEBC( printk(KERN_INFO "%s: Long timeout set to %d seconds.\n", name,
(value & ~MT_ST_SET_LONG_TIMEOUT)));
} else {
DEBC( printk(KERN_INFO "%s: Normal timeout set to %d seconds.\n",
name, value) );
}
-@@ -2321,7 +2329,7 @@ static int read_mode_page(struct scsi_ta
+@@ -2321,7 +2329,7 @@
cmd[4] = 255;
SRpnt = st_do_scsi(SRpnt, STp, cmd, cmd[4], DMA_FROM_DEVICE,
if (SRpnt == NULL)
return (STp->buffer)->syscall_result;
-@@ -2352,7 +2360,7 @@ static int write_mode_page(struct scsi_t
+@@ -2352,7 +2360,7 @@
(STp->buffer)->b_data[pgo + MP_OFF_PAGE_NBR] &= MP_MSK_PAGE_NBR;
SRpnt = st_do_scsi(SRpnt, STp, cmd, cmd[4], DMA_TO_DEVICE,
if (SRpnt == NULL)
return (STp->buffer)->syscall_result;
-@@ -2464,7 +2472,7 @@ static int do_load_unload(struct scsi_ta
+@@ -2464,7 +2472,7 @@
}
if (STp->immediate) {
cmd[1] = 1; /* Don't wait for completion */
}
else
timeout = STp->long_timeout;
-@@ -2638,7 +2646,7 @@ static int st_int_ioctl(struct scsi_tape
+@@ -2638,7 +2646,7 @@
cmd[2] = (arg >> 16);
cmd[3] = (arg >> 8);
cmd[4] = arg;
DEBC(
if (cmd_in == MTWEOF)
printk(ST_DEB_MSG "%s: Writing %d filemarks.\n", name,
-@@ -2656,7 +2664,7 @@ static int st_int_ioctl(struct scsi_tape
+@@ -2656,7 +2664,7 @@
cmd[0] = REZERO_UNIT;
if (STp->immediate) {
cmd[1] = 1; /* Don't wait for completion */
}
DEBC(printk(ST_DEB_MSG "%s: Rewinding tape.\n", name));
fileno = blkno = at_sm = 0;
-@@ -2669,7 +2677,7 @@ static int st_int_ioctl(struct scsi_tape
+@@ -2669,7 +2677,7 @@
cmd[0] = START_STOP;
if (STp->immediate) {
cmd[1] = 1; /* Don't wait for completion */
}
cmd[4] = 3;
DEBC(printk(ST_DEB_MSG "%s: Retensioning tape.\n", name));
-@@ -2702,7 +2710,7 @@ static int st_int_ioctl(struct scsi_tape
+@@ -2702,7 +2710,7 @@
cmd[1] = (arg ? 1 : 0); /* Long erase with non-zero argument */
if (STp->immediate) {
cmd[1] |= 2; /* Don't wait for completion */
}
else
timeout = STp->long_timeout * 8;
-@@ -2754,7 +2762,7 @@ static int st_int_ioctl(struct scsi_tape
+@@ -2754,7 +2762,7 @@
(STp->buffer)->b_data[9] = (ltmp >> 16);
(STp->buffer)->b_data[10] = (ltmp >> 8);
(STp->buffer)->b_data[11] = ltmp;
DEBC(
if (cmd_in == MTSETBLK || cmd_in == SET_DENS_AND_BLK)
printk(ST_DEB_MSG
-@@ -2944,7 +2952,8 @@ static int get_location(struct scsi_tape
+@@ -2944,7 +2952,8 @@
scmd[1] = 1;
}
SRpnt = st_do_scsi(NULL, STp, scmd, 20, DMA_FROM_DEVICE,
if (!SRpnt)
return (STp->buffer)->syscall_result;
-@@ -3045,7 +3054,7 @@ static int set_location(struct scsi_tape
+@@ -3045,7 +3054,7 @@
}
if (STp->immediate) {
scmd[1] |= 1; /* Don't wait for completion */
}
SRpnt = st_do_scsi(NULL, STp, scmd, 0, DMA_NONE,
-@@ -4028,7 +4037,7 @@ static int st_probe(struct device *dev)
+@@ -4028,7 +4037,7 @@
tpnt->partition = 0;
tpnt->new_partition = 0;
tpnt->nbr_partitions = 0;
tpnt->long_timeout = ST_LONG_TIMEOUT;
tpnt->try_dio = try_direct_io && !SDp->host->unchecked_isa_dma;
-diff -purN linux-2.6.27/drivers/scsi/stex.c linux-2.6.27.19-5.1/drivers/scsi/stex.c
---- linux-2.6.27/drivers/scsi/stex.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/stex.c 2009-03-25 16:11:15.000000000 +0000
-@@ -477,7 +477,7 @@ stex_slave_config(struct scsi_device *sd
+diff -r 9608d5473017 drivers/scsi/stex.c
+--- a/drivers/scsi/stex.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/stex.c Wed May 06 16:56:36 2009 +0100
+@@ -477,7 +477,7 @@
{
sdev->use_10_for_rw = 1;
sdev->use_10_for_ms = 1;
sdev->tagged_supported = 1;
return 0;
-diff -purN linux-2.6.27/drivers/scsi/sun_esp.c linux-2.6.27.19-5.1/drivers/scsi/sun_esp.c
---- linux-2.6.27/drivers/scsi/sun_esp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/sun_esp.c 2009-03-25 16:11:14.000000000 +0000
-@@ -611,6 +611,7 @@ static struct of_device_id esp_match[] =
+diff -r 9608d5473017 drivers/scsi/sun_esp.c
+--- a/drivers/scsi/sun_esp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/sun_esp.c Wed May 06 16:56:36 2009 +0100
+@@ -611,6 +611,7 @@
MODULE_DEVICE_TABLE(of, esp_match);
static struct of_platform_driver esp_sbus_driver = {
.name = "esp",
.match_table = esp_match,
.probe = esp_sbus_probe,
-diff -purN linux-2.6.27/drivers/scsi/sym53c8xx_2/sym_glue.c linux-2.6.27.19-5.1/drivers/scsi/sym53c8xx_2/sym_glue.c
---- linux-2.6.27/drivers/scsi/sym53c8xx_2/sym_glue.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/sym53c8xx_2/sym_glue.c 2009-03-25 16:11:15.000000000 +0000
-@@ -519,8 +519,8 @@ static int sym53c8xx_queue_command(struc
+diff -r 9608d5473017 drivers/scsi/sym53c8xx_2/sym_glue.c
+--- a/drivers/scsi/sym53c8xx_2/sym_glue.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/sym53c8xx_2/sym_glue.c Wed May 06 16:56:36 2009 +0100
+@@ -519,8 +519,8 @@
* Shorten our settle_time if needed for
* this command not to time out.
*/
tlimit -= SYM_CONF_TIMER_INTERVAL*2;
if (time_after(np->s.settle_time, tlimit)) {
np->s.settle_time = tlimit;
-diff -purN linux-2.6.27/drivers/serial/8250.c linux-2.6.27.19-5.1/drivers/serial/8250.c
---- linux-2.6.27/drivers/serial/8250.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/8250.c 2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/serial/8250.c
+--- a/drivers/serial/8250.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/8250.c Wed May 06 16:56:36 2009 +0100
@@ -43,6 +43,21 @@
#include <asm/irq.h>
/*
* Configuration:
-@@ -84,6 +99,8 @@ static unsigned int nr_uarts = CONFIG_SE
+@@ -83,6 +98,8 @@
+ #ifdef CONFIG_SERIAL_8250_MANY_PORTS
#define CONFIG_SERIAL_MANY_PORTS 1
#endif
-
-+#define arch_8250_sysrq_via_ctrl_o(a,b) 0
+
++#define arch_8250_sysrq_via_ctrl_o(a,b) 0
+
/*
* HUB6 is always on. This will be removed once the header
- * files have been cleaned.
-@@ -1294,7 +1311,11 @@ receive_chars(struct uart_8250_port *up,
+@@ -1294,7 +1311,11 @@
do {
if (likely(lsr & UART_LSR_DR))
else
/*
* Intel 82571 has a Serial Over Lan device that will
-@@ -1304,6 +1325,20 @@ receive_chars(struct uart_8250_port *up,
+@@ -1304,6 +1325,20 @@
* just force the read character to be 0
*/
ch = 0;
flag = TTY_NORMAL;
up->port.icount.rx++;
-@@ -2561,7 +2596,7 @@ serial8250_console_write(struct console
+@@ -2561,7 +2596,7 @@
if (up->port.sysrq) {
/* serial8250_handle_port() already took the lock */
locked = 0;
locked = spin_trylock(&up->port.lock);
} else
spin_lock(&up->port.lock);
-@@ -2619,6 +2654,30 @@ static int __init serial8250_console_set
+@@ -2618,6 +2653,30 @@
+ port = &serial8250_ports[co->index].port;
if (!port->iobase && !port->membase)
return -ENODEV;
-
++
+#ifdef CONFIG_KDB
+ /*
+ * Remember the line number of the first serial
+ }
+ }
+#endif /* CONFIG_KDB */
-+
+
if (options)
uart_parse_options(options, &baud, &parity, &bits, &flow);
-
-diff -purN linux-2.6.27/drivers/serial/8250_early.c linux-2.6.27.19-5.1/drivers/serial/8250_early.c
---- linux-2.6.27/drivers/serial/8250_early.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/8250_early.c 2009-03-25 16:11:13.000000000 +0000
-@@ -38,6 +38,11 @@
+diff -r 9608d5473017 drivers/serial/8250_early.c
+--- a/drivers/serial/8250_early.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/8250_early.c Wed May 06 16:56:36 2009 +0100
+@@ -37,6 +37,11 @@
+ #include <asm/pgtable.h>
#include <asm/fixmap.h>
#endif
-
++
+#ifdef CONFIG_KDB
+#include <linux/kdb.h>
+static int kdb_serial_line = -1;
+#endif /* CONFIG_KDB */
-+
+
struct early_serial8250_device {
struct uart_port port;
- char options[16]; /* e.g., 115200n8 */
-@@ -231,6 +236,30 @@ int __init setup_early_serial8250_consol
+@@ -231,6 +236,30 @@
register_console(&early_serial8250_console);
return 0;
}
-diff -purN linux-2.6.27/drivers/serial/8250_pci.c linux-2.6.27.19-5.1/drivers/serial/8250_pci.c
---- linux-2.6.27/drivers/serial/8250_pci.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/8250_pci.c 2009-03-25 16:11:13.000000000 +0000
-@@ -599,6 +599,10 @@ static int pci_netmos_init(struct pci_de
+diff -r 9608d5473017 drivers/serial/8250_pci.c
+--- a/drivers/serial/8250_pci.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/8250_pci.c Wed May 06 16:56:36 2009 +0100
+@@ -599,6 +599,10 @@
/* subdevice 0x00PS means <P> parallel, <S> serial */
unsigned int num_serial = dev->subsystem_device & 0xf;
if (num_serial == 0)
return -ENODEV;
return num_serial;
-@@ -766,6 +770,8 @@ pci_default_setup(struct serial_private
+@@ -766,6 +770,8 @@
#define PCI_SUBDEVICE_ID_OCTPRO422 0x0208
#define PCI_SUBDEVICE_ID_POCTAL232 0x0308
#define PCI_SUBDEVICE_ID_POCTAL422 0x0408
/* Unknown vendors/cards - this should not be in linux/pci_ids.h */
#define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584
-@@ -2051,6 +2057,10 @@ static int pciserial_resume_one(struct p
+@@ -2051,6 +2057,10 @@
#endif
static struct pci_device_id serial_pci_tbl[] = {
{ PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
PCI_SUBVENDOR_ID_CONNECT_TECH,
PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0,
-@@ -2190,6 +2200,9 @@ static struct pci_device_id serial_pci_t
+@@ -2190,6 +2200,9 @@
{ PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM8,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
pbn_b2_8_115200 },
{ PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM8,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
pbn_b2_8_115200 },
-@@ -2291,6 +2304,9 @@ static struct pci_device_id serial_pci_t
+@@ -2290,6 +2303,9 @@
+ * www.ussg.iu.edu/hypermail/linux/kernel/0303.1/0516.html).
* For now just used the hex ID 0x950a.
*/
- { PCI_VENDOR_ID_OXSEMI, 0x950a,
++ { PCI_VENDOR_ID_OXSEMI, 0x950a,
+ PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_DUAL_SERIAL, 0, 0,
+ pbn_b0_2_115200 },
-+ { PCI_VENDOR_ID_OXSEMI, 0x950a,
+ { PCI_VENDOR_ID_OXSEMI, 0x950a,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
pbn_b0_2_1130000 },
- { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
-@@ -2843,6 +2859,10 @@ static struct pci_device_id serial_pci_t
+@@ -2843,6 +2859,10 @@
0,
pbn_b0_8_115200 },
/*
* These entries match devices with class COMMUNICATION_SERIAL,
* COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
-diff -purN linux-2.6.27/drivers/serial/Kconfig linux-2.6.27.19-5.1/drivers/serial/Kconfig
---- linux-2.6.27/drivers/serial/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/Kconfig 2009-03-25 16:11:13.000000000 +0000
-@@ -10,6 +10,7 @@ menu "Serial drivers"
+diff -r 9608d5473017 drivers/serial/Kconfig
+--- a/drivers/serial/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/Kconfig Wed May 06 16:56:36 2009 +0100
+@@ -10,6 +10,7 @@
config SERIAL_8250
tristate "8250/16550 and compatible serial support"
depends on (BROKEN || !SPARC)
select SERIAL_CORE
---help---
This selects whether you want to include the driver for the standard
-diff -purN linux-2.6.27/drivers/serial/cpm_uart/cpm_uart_core.c linux-2.6.27.19-5.1/drivers/serial/cpm_uart/cpm_uart_core.c
---- linux-2.6.27/drivers/serial/cpm_uart/cpm_uart_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/cpm_uart/cpm_uart_core.c 2009-03-25 16:11:13.000000000 +0000
-@@ -1359,6 +1359,7 @@ static struct of_device_id cpm_uart_matc
+diff -r 9608d5473017 drivers/serial/cpm_uart/cpm_uart_core.c
+--- a/drivers/serial/cpm_uart/cpm_uart_core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/cpm_uart/cpm_uart_core.c Wed May 06 16:56:36 2009 +0100
+@@ -1359,6 +1359,7 @@
};
static struct of_platform_driver cpm_uart_driver = {
.name = "cpm_uart",
.match_table = cpm_uart_match,
.probe = cpm_uart_probe,
-diff -purN linux-2.6.27/drivers/serial/jsm/jsm_tty.c linux-2.6.27.19-5.1/drivers/serial/jsm/jsm_tty.c
---- linux-2.6.27/drivers/serial/jsm/jsm_tty.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/jsm/jsm_tty.c 2009-03-25 16:11:13.000000000 +0000
-@@ -161,6 +161,11 @@ static void jsm_tty_stop_rx(struct uart_
- channel->ch_bd->bd_ops->disable_receiver(channel);
- }
+diff -r 9608d5473017 drivers/serial/jsm/jsm_tty.c
+--- a/drivers/serial/jsm/jsm_tty.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/jsm/jsm_tty.c Wed May 06 16:56:36 2009 +0100
+@@ -159,6 +159,11 @@
+ struct jsm_channel *channel = (struct jsm_channel *)port;
+ channel->ch_bd->bd_ops->disable_receiver(channel);
++}
++
+static void jsm_tty_enable_ms(struct uart_port *port)
+{
+ /* Nothing needed */
-+}
-+
+ }
+
static void jsm_tty_break(struct uart_port *port, int break_state)
- {
- unsigned long lock_flags;
-@@ -345,6 +350,7 @@ static struct uart_ops jsm_ops = {
+@@ -345,6 +350,7 @@
.start_tx = jsm_tty_start_tx,
.send_xchar = jsm_tty_send_xchar,
.stop_rx = jsm_tty_stop_rx,
.break_ctl = jsm_tty_break,
.startup = jsm_tty_open,
.shutdown = jsm_tty_close,
-diff -purN linux-2.6.27/drivers/serial/mpc52xx_uart.c linux-2.6.27.19-5.1/drivers/serial/mpc52xx_uart.c
---- linux-2.6.27/drivers/serial/mpc52xx_uart.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/mpc52xx_uart.c 2009-03-25 16:11:13.000000000 +0000
-@@ -1391,6 +1391,7 @@ mpc52xx_uart_of_enumerate(void)
+diff -r 9608d5473017 drivers/serial/mpc52xx_uart.c
+--- a/drivers/serial/mpc52xx_uart.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/mpc52xx_uart.c Wed May 06 16:56:36 2009 +0100
+@@ -1391,6 +1391,7 @@
MODULE_DEVICE_TABLE(of, mpc52xx_uart_of_match);
static struct of_platform_driver mpc52xx_uart_of_driver = {
.match_table = mpc52xx_uart_of_match,
.probe = mpc52xx_uart_of_probe,
.remove = mpc52xx_uart_of_remove,
-diff -purN linux-2.6.27/drivers/serial/sn_console.c linux-2.6.27.19-5.1/drivers/serial/sn_console.c
---- linux-2.6.27/drivers/serial/sn_console.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/sn_console.c 2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/serial/sn_console.c
+--- a/drivers/serial/sn_console.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/sn_console.c Wed May 06 16:56:36 2009 +0100
@@ -48,6 +48,22 @@
#include <linux/delay.h> /* for mdelay */
#include <linux/miscdevice.h>
#include <asm/io.h>
#include <asm/sn/simulator.h>
-@@ -485,6 +501,26 @@ sn_receive_chars(struct sn_cons_port *po
+@@ -485,6 +501,26 @@
"obtaining data from the console (0x%0x)\n", ch);
break;
}
#ifdef CONFIG_MAGIC_SYSRQ
if (sysrq_requested) {
unsigned long sysrq_timeout = sysrq_requested + HZ*5;
-@@ -1008,6 +1044,15 @@ sn_sal_console_write(struct console *co,
+@@ -1008,6 +1044,15 @@
*/
static int sn_sal_console_setup(struct console *co, char *options)
{
return 0;
}
-@@ -1083,3 +1128,31 @@ static int __init sn_sal_serial_console_
+@@ -1083,3 +1128,31 @@
}
console_initcall(sn_sal_serial_console_init);
+ return 0;
+}
+#endif /* CONFIG_KDB */
-diff -purN linux-2.6.27/drivers/serial/sunhv.c linux-2.6.27.19-5.1/drivers/serial/sunhv.c
---- linux-2.6.27/drivers/serial/sunhv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/sunhv.c 2009-03-25 16:11:13.000000000 +0000
-@@ -630,6 +630,7 @@ static struct of_device_id hv_match[] =
+diff -r 9608d5473017 drivers/serial/sunhv.c
+--- a/drivers/serial/sunhv.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/sunhv.c Wed May 06 16:56:36 2009 +0100
+@@ -630,6 +630,7 @@
MODULE_DEVICE_TABLE(of, hv_match);
static struct of_platform_driver hv_driver = {
.name = "hv",
.match_table = hv_match,
.probe = hv_probe,
-diff -purN linux-2.6.27/drivers/serial/sunsab.c linux-2.6.27.19-5.1/drivers/serial/sunsab.c
---- linux-2.6.27/drivers/serial/sunsab.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/sunsab.c 2009-03-25 16:11:13.000000000 +0000
-@@ -1091,6 +1091,7 @@ static struct of_device_id sab_match[] =
+diff -r 9608d5473017 drivers/serial/sunsab.c
+--- a/drivers/serial/sunsab.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/sunsab.c Wed May 06 16:56:36 2009 +0100
+@@ -1091,6 +1091,7 @@
MODULE_DEVICE_TABLE(of, sab_match);
static struct of_platform_driver sab_driver = {
.name = "sab",
.match_table = sab_match,
.probe = sab_probe,
-diff -purN linux-2.6.27/drivers/serial/sunsu.c linux-2.6.27.19-5.1/drivers/serial/sunsu.c
---- linux-2.6.27/drivers/serial/sunsu.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/sunsu.c 2009-03-25 16:11:13.000000000 +0000
-@@ -1522,6 +1522,7 @@ static struct of_device_id su_match[] =
+diff -r 9608d5473017 drivers/serial/sunsu.c
+--- a/drivers/serial/sunsu.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/sunsu.c Wed May 06 16:56:36 2009 +0100
+@@ -1522,6 +1522,7 @@
MODULE_DEVICE_TABLE(of, su_match);
static struct of_platform_driver su_driver = {
.name = "su",
.match_table = su_match,
.probe = su_probe,
-diff -purN linux-2.6.27/drivers/serial/sunzilog.c linux-2.6.27.19-5.1/drivers/serial/sunzilog.c
---- linux-2.6.27/drivers/serial/sunzilog.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/sunzilog.c 2009-03-25 16:11:13.000000000 +0000
-@@ -1489,6 +1489,7 @@ static struct of_device_id zs_match[] =
+diff -r 9608d5473017 drivers/serial/sunzilog.c
+--- a/drivers/serial/sunzilog.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/sunzilog.c Wed May 06 16:56:36 2009 +0100
+@@ -1489,6 +1489,7 @@
MODULE_DEVICE_TABLE(of, zs_match);
static struct of_platform_driver zs_driver = {
.name = "zs",
.match_table = zs_match,
.probe = zs_probe,
-diff -purN linux-2.6.27/drivers/spi/pxa2xx_spi.c linux-2.6.27.19-5.1/drivers/spi/pxa2xx_spi.c
---- linux-2.6.27/drivers/spi/pxa2xx_spi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/spi/pxa2xx_spi.c 2009-03-25 16:11:23.000000000 +0000
-@@ -348,21 +348,21 @@ static int map_dma_buffers(struct driver
+diff -r 9608d5473017 drivers/spi/pxa2xx_spi.c
+--- a/drivers/spi/pxa2xx_spi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/spi/pxa2xx_spi.c Wed May 06 16:56:36 2009 +0100
+@@ -348,21 +348,21 @@
} else
drv_data->tx_map_len = drv_data->len;
-- /* Stream map the rx buffer */
-- drv_data->rx_dma = dma_map_single(dev, drv_data->rx,
++ /* Stream map the tx buffer. Always do DMA_TO_DEVICE first
++ * so we flush the cache *before* invalidating it, in case
++ * the tx and rx buffers overlap.
++ */
++ drv_data->tx_dma = dma_map_single(dev, drv_data->tx,
++ drv_data->tx_map_len, DMA_TO_DEVICE);
++ if (dma_mapping_error(dev, drv_data->tx_dma))
++ return 0;
++
+ /* Stream map the rx buffer */
+ drv_data->rx_dma = dma_map_single(dev, drv_data->rx,
- drv_data->rx_map_len,
- DMA_FROM_DEVICE);
- if (dma_mapping_error(dev, drv_data->rx_dma))
- return 0;
-
- /* Stream map the tx buffer */
-+ /* Stream map the tx buffer. Always do DMA_TO_DEVICE first
-+ * so we flush the cache *before* invalidating it, in case
-+ * the tx and rx buffers overlap.
-+ */
- drv_data->tx_dma = dma_map_single(dev, drv_data->tx,
+- drv_data->tx_dma = dma_map_single(dev, drv_data->tx,
- drv_data->tx_map_len,
- DMA_TO_DEVICE);
-+ drv_data->tx_map_len, DMA_TO_DEVICE);
-+ if (dma_mapping_error(dev, drv_data->tx_dma))
-+ return 0;
-
+-
- if (dma_mapping_error(dev, drv_data->tx_dma)) {
- dma_unmap_single(dev, drv_data->rx_dma,
-+ /* Stream map the rx buffer */
-+ drv_data->rx_dma = dma_map_single(dev, drv_data->rx,
drv_data->rx_map_len, DMA_FROM_DEVICE);
+ if (dma_mapping_error(dev, drv_data->rx_dma)) {
+ dma_unmap_single(dev, drv_data->tx_dma,
return 0;
}
-diff -purN linux-2.6.27/drivers/spi/spidev.c linux-2.6.27.19-5.1/drivers/spi/spidev.c
---- linux-2.6.27/drivers/spi/spidev.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/spi/spidev.c 2009-03-25 16:11:23.000000000 +0000
-@@ -598,7 +598,9 @@ static int spidev_probe(struct spi_devic
+diff -r 9608d5473017 drivers/spi/spidev.c
+--- a/drivers/spi/spidev.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/spi/spidev.c Wed May 06 16:56:36 2009 +0100
+@@ -598,7 +598,9 @@
}
mutex_unlock(&device_list_lock);
kfree(spidev);
return status;
-diff -purN linux-2.6.27/drivers/staging/Kconfig linux-2.6.27.19-5.1/drivers/staging/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/Kconfig 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/Kconfig Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,60 @@
+menuconfig STAGING
+ bool "Staging drivers"
+source "drivers/staging/rtl8187se/Kconfig"
+
+endif # STAGING
-diff -purN linux-2.6.27/drivers/staging/Makefile linux-2.6.27.19-5.1/drivers/staging/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/Makefile 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/Makefile Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,22 @@
+# Makefile for staging directory
+
+obj-$(CONFIG_RT3070) += rt3070/
+obj-$(CONFIG_BENET) += benet/
+obj-$(CONFIG_RTL8187SE) += rtl8187se/
-diff -purN linux-2.6.27/drivers/staging/agnx/Kconfig linux-2.6.27.19-5.1/drivers/staging/agnx/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/Kconfig 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/Kconfig Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,5 @@
+config AGNX
+ tristate "Wireless Airgo AGNX support"
+ depends on WLAN_80211 && MAC80211
+ ---help---
+ This is an experimental driver for Airgo AGNX00 wireless chip.
-diff -purN linux-2.6.27/drivers/staging/agnx/Makefile linux-2.6.27.19-5.1/drivers/staging/agnx/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/Makefile 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/Makefile Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,8 @@
+obj-$(CONFIG_AGNX) += agnx.o
+
+ table.o \
+ sta.o \
+ phy.o
-diff -purN linux-2.6.27/drivers/staging/agnx/TODO linux-2.6.27.19-5.1/drivers/staging/agnx/TODO
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/TODO 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/TODO
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/TODO Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,22 @@
+2008 7/18
+
+11: Guess the card support HW_MULTICAST_FILTER
+12: The tx process should be implment atomic?
+13: Using mac80211 function to control the TX&RX LED.
-diff -purN linux-2.6.27/drivers/staging/agnx/agnx.h linux-2.6.27.19-5.1/drivers/staging/agnx/agnx.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/agnx.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/agnx.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/agnx.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,156 @@
+#ifndef AGNX_H_
+#define AGNX_H_
+
+
+#endif /* AGNX_H_ */
-diff -purN linux-2.6.27/drivers/staging/agnx/debug.h linux-2.6.27.19-5.1/drivers/staging/agnx/debug.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/debug.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/debug.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/debug.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,418 @@
+#ifndef AGNX_DEBUG_H_
+#define AGNX_DEBUG_H_
+}
+
+#endif /* AGNX_DEBUG_H_ */
-diff -purN linux-2.6.27/drivers/staging/agnx/pci.c linux-2.6.27.19-5.1/drivers/staging/agnx/pci.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/pci.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/pci.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/pci.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,650 @@
+/**
+ * Airgo MIMO wireless driver
+
+module_init(agnx_pci_init);
+module_exit(agnx_pci_exit);
-diff -purN linux-2.6.27/drivers/staging/agnx/phy.c linux-2.6.27.19-5.1/drivers/staging/agnx/phy.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/phy.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/phy.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/phy.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,958 @@
+/**
+ * Airgo MIMO wireless driver
+{
+ receiver_bssid_set(priv, bssid);
+}
-diff -purN linux-2.6.27/drivers/staging/agnx/phy.h linux-2.6.27.19-5.1/drivers/staging/agnx/phy.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/phy.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/phy.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/phy.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,409 @@
+#ifndef AGNX_PHY_H_
+#define AGNX_PHY_H_
+void calibrate_antenna_period(unsigned long data);
+
+#endif /* AGNX_PHY_H_ */
-diff -purN linux-2.6.27/drivers/staging/agnx/rf.c linux-2.6.27.19-5.1/drivers/staging/agnx/rf.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/rf.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/rf.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/rf.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,894 @@
+/**
+ * Airgo MIMO wireless driver
+ radio_channel_set(priv, channel);
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/staging/agnx/sta.c linux-2.6.27.19-5.1/drivers/staging/agnx/sta.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/sta.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/sta.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/sta.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,219 @@
+#include <linux/delay.h>
+#include <linux/etherdevice.h>
+} /* sta_descriptor_init */
+
+
-diff -purN linux-2.6.27/drivers/staging/agnx/sta.h linux-2.6.27.19-5.1/drivers/staging/agnx/sta.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/sta.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/sta.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/sta.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,222 @@
+#ifndef AGNX_STA_H_
+#define AGNX_STA_H_
+void sta_init(struct agnx_priv *priv, unsigned int num);
+
+#endif /* AGNX_STA_H_ */
-diff -purN linux-2.6.27/drivers/staging/agnx/table.c linux-2.6.27.19-5.1/drivers/staging/agnx/table.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/table.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/table.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/table.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,168 @@
+#include <linux/pci.h>
+#include <linux/delay.h>
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/agnx/table.h linux-2.6.27.19-5.1/drivers/staging/agnx/table.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/table.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/table.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/table.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,10 @@
+#ifndef AGNX_TABLE_H_
+#define AGNX_TABLE_H_
+void tx_engine_lookup_tbl_init(struct agnx_priv *priv);
+
+#endif /* AGNX_TABLE_H_ */
-diff -purN linux-2.6.27/drivers/staging/agnx/xmit.c linux-2.6.27.19-5.1/drivers/staging/agnx/xmit.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/xmit.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/xmit.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/xmit.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,819 @@
+/**
+ * Airgo MIMO wireless driver
+ else
+ return __agnx_tx(priv, skb, &priv->txm);
+}
-diff -purN linux-2.6.27/drivers/staging/agnx/xmit.h linux-2.6.27.19-5.1/drivers/staging/agnx/xmit.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/xmit.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/xmit.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/xmit.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,250 @@
+#ifndef AGNX_XMIT_H_
+#define AGNX_XMIT_H_
+void handle_other_irq(struct agnx_priv *priv);
+int _agnx_tx(struct agnx_priv *priv, struct sk_buff *skb);
+#endif /* AGNX_XMIT_H_ */
-diff -purN linux-2.6.27/drivers/staging/at76_usb/Kconfig linux-2.6.27.19-5.1/drivers/staging/at76_usb/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/at76_usb/Kconfig 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/at76_usb/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/at76_usb/Kconfig Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,8 @@
+config USB_ATMEL
+ tristate "Atmel at76c503/at76c505/at76c505a USB cards"
+ ---help---
+ Enable support for USB Wireless devices using Atmel at76c503,
+ at76c505 or at76c505a chips.
-diff -purN linux-2.6.27/drivers/staging/at76_usb/Makefile linux-2.6.27.19-5.1/drivers/staging/at76_usb/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/at76_usb/Makefile 2009-03-25 16:11:11.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/staging/at76_usb/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/at76_usb/Makefile Wed May 06 16:56:36 2009 +0100
+@@ -0,0 +1,1 @@
+obj-$(CONFIG_USB_ATMEL) += at76_usb.o
-diff -purN linux-2.6.27/drivers/staging/at76_usb/TODO linux-2.6.27.19-5.1/drivers/staging/at76_usb/TODO
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/at76_usb/TODO 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/at76_usb/TODO
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/at76_usb/TODO Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,2 @@
+rewrite the driver to use the proper in-kernel wireless stack
+instead of using its own.
-diff -purN linux-2.6.27/drivers/staging/at76_usb/at76_usb.c linux-2.6.27.19-5.1/drivers/staging/at76_usb/at76_usb.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/at76_usb/at76_usb.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/at76_usb/at76_usb.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/at76_usb/at76_usb.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,5559 @@
+/*
+ * at76c503/at76c505 USB driver
+MODULE_AUTHOR("Pavel Roskin <proski@gnu.org>");
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/staging/at76_usb/at76_usb.h linux-2.6.27.19-5.1/drivers/staging/at76_usb/at76_usb.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/at76_usb/at76_usb.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/at76_usb/at76_usb.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/at76_usb/at76_usb.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,619 @@
+/*
+ * Copyright (c) 2002,2003 Oliver Kurth
+#define MAX_PADDING_SIZE 53
+
+#endif /* _AT76_USB_H */
-diff -purN linux-2.6.27/drivers/staging/benet/Kconfig linux-2.6.27.19-5.1/drivers/staging/benet/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/Kconfig 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/Kconfig Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,7 @@
+config BENET
+ tristate "ServerEngines 10Gb NIC - BladeEngine"
+ help
+ This driver implements the NIC functionality for ServerEngines
+ 10Gb network adapter BladeEngine (EC 3210).
-diff -purN linux-2.6.27/drivers/staging/benet/MAINTAINERS linux-2.6.27.19-5.1/drivers/staging/benet/MAINTAINERS
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/MAINTAINERS 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/MAINTAINERS
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/MAINTAINERS Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,6 @@
+SERVER ENGINES 10Gbe NIC - BLADE-ENGINE
+P: Subbu Seetharaman
+L: netdev@vger.kernel.org
+W: http://www.serverengines.com
+S: Supported
-diff -purN linux-2.6.27/drivers/staging/benet/Makefile linux-2.6.27.19-5.1/drivers/staging/benet/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/Makefile 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/Makefile Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,14 @@
+#
+# Makefile to build the network driver for ServerEngine's BladeEngine
+ eq.o \
+ mpu.o \
+ eth.o
-diff -purN linux-2.6.27/drivers/staging/benet/TODO linux-2.6.27.19-5.1/drivers/staging/benet/TODO
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/TODO 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/TODO
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/TODO Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,7 @@
+TODO:
+ - fix minor checkpatch.pl issues
+
+Please send all patches and questions to Subbu Seetharaman
+<subbus@serverengines.com> and Greg Kroah-Hartman <greg@kroah.com>
-diff -purN linux-2.6.27/drivers/staging/benet/asyncmesg.h linux-2.6.27.19-5.1/drivers/staging/benet/asyncmesg.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/asyncmesg.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/asyncmesg.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/asyncmesg.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ u32 dw[4];
+};
+#endif /* __asyncmesg_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/be_cm.h linux-2.6.27.19-5.1/drivers/staging/benet/be_cm.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/be_cm.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/be_cm.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/be_cm.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+};
+
+#endif /* __be_cm_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/be_common.h linux-2.6.27.19-5.1/drivers/staging/benet/be_common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/be_common.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/be_common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/be_common.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+};
+
+#endif /* __be_common_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/be_ethtool.c linux-2.6.27.19-5.1/drivers/staging/benet/be_ethtool.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/be_ethtool.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/be_ethtool.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/be_ethtool.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,348 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ .get_stats_count = be_get_stats_count,
+ .get_ethtool_stats = be_get_ethtool_stats,
+};
-diff -purN linux-2.6.27/drivers/staging/benet/be_init.c linux-2.6.27.19-5.1/drivers/staging/benet/be_init.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/be_init.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/be_init.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/be_init.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,1381 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+}
+
+module_exit(be_exit_module);
-diff -purN linux-2.6.27/drivers/staging/benet/be_int.c linux-2.6.27.19-5.1/drivers/staging/benet/be_int.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/be_int.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/be_int.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/be_int.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,872 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ update_eqd(adapter, pnob);
+ return;
+}
-diff -purN linux-2.6.27/drivers/staging/benet/be_netif.c linux-2.6.27.19-5.1/drivers/staging/benet/be_netif.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/be_netif.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/be_netif.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/be_netif.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,706 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ SET_ETHTOOL_OPS(netdev, &be_ethtool_ops);
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/staging/benet/benet.h linux-2.6.27.19-5.1/drivers/staging/benet/benet.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/benet.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/benet.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/benet.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,429 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+void process_one_tx_compl(struct be_net_object *pnob, u32 end_idx);
+
+#endif /* _BENET_H_ */
-diff -purN linux-2.6.27/drivers/staging/benet/bestatus.h linux-2.6.27.19-5.1/drivers/staging/benet/bestatus.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/bestatus.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/bestatus.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/bestatus.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+#define BE_STATUS_NO_MCC_WRB (0xE0070414L)
+
+#endif /* _BESTATUS_ */
-diff -purN linux-2.6.27/drivers/staging/benet/cev.h linux-2.6.27.19-5.1/drivers/staging/benet/cev.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/cev.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/cev.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/cev.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,243 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+};
+
+#endif /* __cev_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/cq.c linux-2.6.27.19-5.1/drivers/staging/benet/cq.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/cq.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/cq.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/cq.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,211 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ return BE_SUCCESS;
+}
+
-diff -purN linux-2.6.27/drivers/staging/benet/descriptors.h linux-2.6.27.19-5.1/drivers/staging/benet/descriptors.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/descriptors.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/descriptors.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/descriptors.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+#define BCAST_MATCH (63) /* Broadcast match. */
+
+#endif /* __descriptors_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/doorbells.h linux-2.6.27.19-5.1/drivers/staging/benet/doorbells.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/doorbells.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/doorbells.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/doorbells.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,179 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+};
+
+#endif /* __doorbells_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/ep.h linux-2.6.27.19-5.1/drivers/staging/benet/ep.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/ep.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/ep.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/ep.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+};
+
+#endif /* __ep_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/eq.c linux-2.6.27.19-5.1/drivers/staging/benet/eq.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/eq.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/eq.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/eq.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,299 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ return status;
+}
+
-diff -purN linux-2.6.27/drivers/staging/benet/eth.c linux-2.6.27.19-5.1/drivers/staging/benet/eth.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/eth.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/eth.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/eth.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,1273 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ }
+ return status;
+}
-diff -purN linux-2.6.27/drivers/staging/benet/etx_context.h linux-2.6.27.19-5.1/drivers/staging/benet/etx_context.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/etx_context.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/etx_context.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/etx_context.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+};
+
+#endif /* __etx_context_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/funcobj.c linux-2.6.27.19-5.1/drivers/staging/benet/funcobj.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/funcobj.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/funcobj.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/funcobj.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,565 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ return status;
+}
+
-diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_common.h linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_common.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/fwcmd_common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/fwcmd_common.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,222 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+#define BE_ASIC_REV_A1 (2)
+
+#endif /* __fwcmd_common_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_common_bmap.h linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_common_bmap.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_common_bmap.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/fwcmd_common_bmap.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/fwcmd_common_bmap.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,717 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+} __packed;
+
+#endif /* __fwcmd_common_bmap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_eth_bmap.h linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_eth_bmap.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_eth_bmap.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/fwcmd_eth_bmap.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/fwcmd_eth_bmap.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,280 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+} __packed;
+
+#endif /* __fwcmd_eth_bmap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_hdr_bmap.h linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_hdr_bmap.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_hdr_bmap.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/fwcmd_hdr_bmap.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/fwcmd_hdr_bmap.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+} __packed;
+
+#endif /* __fwcmd_hdr_bmap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_mcc.h linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_mcc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_mcc.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/fwcmd_mcc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/fwcmd_mcc.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+};
+
+#endif /* __fwcmd_mcc_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_opcodes.h linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_opcodes.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_opcodes.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/fwcmd_opcodes.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/fwcmd_opcodes.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,244 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ the FWCMD payload */
+
+#endif /* __fwcmd_opcodes_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_types_bmap.h linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_types_bmap.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_types_bmap.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/fwcmd_types_bmap.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/fwcmd_types_bmap.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+} __packed;
+
+#endif /* __fwcmd_types_bmap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/host_struct.h linux-2.6.27.19-5.1/drivers/staging/benet/host_struct.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/host_struct.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/host_struct.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/host_struct.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,182 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+};
+
+#endif /* __host_struct_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/hwlib.h linux-2.6.27.19-5.1/drivers/staging/benet/hwlib.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/hwlib.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/hwlib.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/hwlib.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,829 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+void be_rd_to_pa_list(struct ring_desc *rd, struct PHYS_ADDR *pa_list,
+ u32 max_num);
+#endif /* __hwlib_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/mpu.c linux-2.6.27.19-5.1/drivers/staging/benet/mpu.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/mpu.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/mpu.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/mpu.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,1364 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+
+ return status;
+}
-diff -purN linux-2.6.27/drivers/staging/benet/mpu.h linux-2.6.27.19-5.1/drivers/staging/benet/mpu.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/mpu.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/mpu.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/mpu.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+};
+
+#endif /* __mpu_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/mpu_context.h linux-2.6.27.19-5.1/drivers/staging/benet/mpu_context.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/mpu_context.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/mpu_context.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/mpu_context.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+};
+
+#endif /* __mpu_context_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/pcicfg.h linux-2.6.27.19-5.1/drivers/staging/benet/pcicfg.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/pcicfg.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/pcicfg.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/pcicfg.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,825 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+};
+
+#endif /* __pcicfg_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/post_codes.h linux-2.6.27.19-5.1/drivers/staging/benet/post_codes.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/post_codes.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/post_codes.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/post_codes.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+#define POST_FATAL_ERROR (2147483648)
+
+#endif /* __post_codes_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/regmap.h linux-2.6.27.19-5.1/drivers/staging/benet/regmap.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/regmap.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/regmap.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/regmap.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+};
+
+#endif /* __regmap_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/echo/Kconfig linux-2.6.27.19-5.1/drivers/staging/echo/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/Kconfig 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/echo/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/Kconfig Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,9 @@
+config ECHO
+ tristate "Line Echo Canceller support"
+
+ To compile this driver as a module, choose M here. The module
+ will be called echo.
-diff -purN linux-2.6.27/drivers/staging/echo/Makefile linux-2.6.27.19-5.1/drivers/staging/echo/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/Makefile 2009-03-25 16:11:10.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/staging/echo/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/Makefile Wed May 06 16:56:36 2009 +0100
+@@ -0,0 +1,1 @@
+obj-$(CONFIG_ECHO) += echo.o
-diff -purN linux-2.6.27/drivers/staging/echo/TODO linux-2.6.27.19-5.1/drivers/staging/echo/TODO
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/TODO 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/echo/TODO
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/TODO Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,10 @@
+TODO:
+ - checkpatch.pl cleanups
+
+Please send patches to Greg Kroah-Hartman <greg@kroah.com> and Cc: Steve
+Underwood <steveu@coppice.org> and David Rowe <david@rowetel.com>
-diff -purN linux-2.6.27/drivers/staging/echo/bit_operations.h linux-2.6.27.19-5.1/drivers/staging/echo/bit_operations.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/bit_operations.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/echo/bit_operations.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/bit_operations.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,253 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+
+#endif
+/*- End of file ------------------------------------------------------------*/
-diff -purN linux-2.6.27/drivers/staging/echo/echo.c linux-2.6.27.19-5.1/drivers/staging/echo/echo.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/echo.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/echo/echo.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/echo.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,632 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+
+ return tx;
+}
-diff -purN linux-2.6.27/drivers/staging/echo/echo.h linux-2.6.27.19-5.1/drivers/staging/echo/echo.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/echo.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/echo/echo.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/echo.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,220 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+int16_t echo_can_hpf_tx(echo_can_state_t *ec, int16_t tx);
+
+#endif /* __ECHO_H */
-diff -purN linux-2.6.27/drivers/staging/echo/fir.h linux-2.6.27.19-5.1/drivers/staging/echo/fir.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/fir.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/echo/fir.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/fir.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,369 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+
+#endif
+/*- End of file ------------------------------------------------------------*/
-diff -purN linux-2.6.27/drivers/staging/echo/mmx.h linux-2.6.27.19-5.1/drivers/staging/echo/mmx.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/mmx.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/echo/mmx.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/mmx.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,288 @@
+/*
+ * mmx.h
+
+
+#endif /* AVCODEC_I386MMX_H */
-diff -purN linux-2.6.27/drivers/staging/et131x/Kconfig linux-2.6.27.19-5.1/drivers/staging/et131x/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/Kconfig 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/Kconfig Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,18 @@
+config ET131X
+ tristate "Agere ET-1310 Gigabit Ethernet support"
+ Say Y for detailed debug information.
+
+ If in doubt, say N.
-diff -purN linux-2.6.27/drivers/staging/et131x/Makefile linux-2.6.27.19-5.1/drivers/staging/et131x/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/Makefile 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/Makefile Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,18 @@
+#
+# Makefile for the Agere ET-131x ethernet driver
+ et131x_initpci.o \
+ et131x_isr.o \
+ et131x_netdev.o
-diff -purN linux-2.6.27/drivers/staging/et131x/README linux-2.6.27.19-5.1/drivers/staging/et131x/README
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/README 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/README
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/README Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,25 @@
+This is a driver for the ET1310 network device.
+
+And Cc: Olaf Hartmann <o.hartmann@telovital.com> as he has this device and can
+test any changes.
+
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_address_map.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_address_map.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_address_map.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_address_map.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_address_map.h Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,2399 @@
+/*
+ * Agere Systems Inc.
+} ADDRESS_MAP_t, *PADDRESS_MAP_t;
+
+#endif /* _ET1310_ADDRESS_MAP_H_ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_eeprom.c linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_eeprom.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_eeprom.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_eeprom.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_eeprom.c Wed May 06 16:56:36 2009 +0100
@@ -0,0 +1,480 @@
+/*
+ * Agere Systems Inc.
+
+ return (bStatus & LBCIF_STATUS_ACK_ERROR) ? FAILURE : SUCCESS;
+}
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_eeprom.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_eeprom.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_eeprom.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_eeprom.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_eeprom.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,89 @@
+/*
+ * Agere Systems Inc.
+ u32 unAddressingMode);
+
+#endif /* _ET1310_EEPROM_H_ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_jagcore.c linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_jagcore.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_jagcore.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_jagcore.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_jagcore.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,220 @@
+/*
+ * Agere Systems Inc.
+ adapter->CachedMaskValue.value = INT_MASK_DISABLE;
+ writel(INT_MASK_DISABLE, &adapter->CSRAddress->global.int_mask.value);
+}
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_jagcore.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_jagcore.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_jagcore.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_jagcore.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_jagcore.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,112 @@
+/*
+ * Agere Systems Inc.
+void et131x_disable_interrupts(struct et131x_adapter *adapter);
+
+#endif /* __ET1310_JAGCORE_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_mac.c linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_mac.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_mac.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_mac.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_mac.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,792 @@
+/*
+ * Agere Systems Inc.
+
+ DBG_LEAVE(et131x_dbginfo);
+}
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_mac.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_mac.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_mac.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_mac.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_mac.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,93 @@
+/*
+ * Agere Systems Inc.
+void SetupDeviceForUnicast(struct et131x_adapter *adapter);
+
+#endif /* _ET1310_MAC_H_ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_phy.c linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_phy.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_phy.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_phy.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_phy.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,1281 @@
+/*
+ * Agere Systems Inc.
+ break;
+ }
+}
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_phy.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_phy.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_phy.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_phy.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_phy.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,910 @@
+/*
+ * Agere Systems Inc.
+ u16 regnum, u16 bitnum, u8 *value);
+
+#endif /* _ET1310_PHY_H_ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_pm.c linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_pm.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_pm.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_pm.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_pm.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,207 @@
+/*
+ * Agere Systems Inc.
+ DBG_LEAVE(et131x_dbginfo);
+}
+
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_pm.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_pm.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_pm.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_pm.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_pm.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,125 @@
+/*
+ * Agere Systems Inc.
+void DisablePhyComa(struct et131x_adapter *adapter);
+
+#endif /* _ET1310_PM_H_ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_rx.c linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_rx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_rx.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_rx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_rx.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,1391 @@
+/*
+ * Agere Systems Inc.
+ DBG_ASSERT(pRxLocal->nReadyRecv <= pRxLocal->NumRfd);
+ DBG_RX_LEAVE(et131x_dbginfo);
+}
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_rx.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_rx.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_rx.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_rx.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_rx.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,373 @@
+/*
+ * Agere Systems Inc.
+void et131x_handle_recv_interrupt(struct et131x_adapter *adapter);
+
+#endif /* __ET1310_RX_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_tx.c linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_tx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_tx.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_tx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_tx.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,1525 @@
+/*
+ * Agere Systems Inc.
+
+ spin_unlock_irqrestore(&pAdapter->SendWaitLock, lockflags);
+}
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_tx.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_tx.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_tx.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_tx.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_tx.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,242 @@
+/*
+ * Agere Systems Inc.
+int et131x_send_packets(struct sk_buff *skb, struct net_device *netdev);
+
+#endif /* __ET1310_TX_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_adapter.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_adapter.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_adapter.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_adapter.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_adapter.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,347 @@
+/*
+ * Agere Systems Inc.
+#define MpSendPacketFun(Adapter, Packet) MpSendPacket(Adapter, Packet)
+
+#endif /* __ET131X_ADAPTER_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_config.c linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_config.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_config.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_config.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_config.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,325 @@
+/*
+ * Agere Systems Inc.
+
+ DBG_LEAVE(et131x_dbginfo);
+}
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_config.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_config.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_config.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_config.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_config.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,67 @@
+/*
+ * Agere Systems Inc.
+void et131x_config_parse(struct et131x_adapter *adapter);
+
+#endif /* __ET131X_CONFIG_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_debug.c linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_debug.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_debug.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_debug.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_debug.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,218 @@
+/*
+ * Agere Systems Inc.
+}
+
+#endif // CONFIG_ET131X_DEBUG
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_debug.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_debug.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_debug.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_debug.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_debug.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,201 @@
+/*
+ * Agere Systems Inc.
+void DumpDeviceReg(int dbgLvl, struct et131x_adapter *adapter);
+
+#endif /* __ET131X_DBG_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_defs.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_defs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_defs.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_defs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_defs.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,128 @@
+/*
+ * Agere Systems Inc.
+#define NANO_IN_A_MICRO 1000
+
+#endif /* __ET131X_DEFS_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_initpci.c linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_initpci.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_initpci.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_initpci.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_initpci.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,1046 @@
+/*
+ * Agere Systems Inc.
+ pci_disable_device(pdev);
+ goto out;
+}
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_initpci.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_initpci.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_initpci.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_initpci.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_initpci.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,73 @@
+/*
+ * Agere Systems Inc.
+void et131x_soft_reset(struct et131x_adapter *adapter);
+
+#endif /* __ET131X_INITPCI_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_isr.c linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_isr.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_isr.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_isr.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_isr.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,488 @@
+/*
+ * Agere Systems Inc.
+ et131x_enable_interrupts(pAdapter);
+ }
+}
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_isr.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_isr.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_isr.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_isr.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_isr.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,65 @@
+/*
+ * Agere Systems Inc.
+void et131x_isr_handler(struct work_struct *work);
+
+#endif /* __ET131X_ISR_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_netdev.c linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_netdev.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_netdev.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_netdev.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_netdev.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,856 @@
+/*
+ * Agere Systems Inc.
+ DBG_LEAVE(et131x_dbginfo);
+ return result;
+}
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_netdev.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_netdev.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_netdev.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_netdev.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_netdev.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,64 @@
+/*
+ * Agere Systems Inc.
+struct net_device *et131x_device_alloc(void);
+
+#endif /* __ET131X_NETDEV_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_version.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_version.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_version.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_version.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_version.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,81 @@
+/*
+ * Agere Systems Inc.
+#define DRIVER_NAME_EXT "et131x.ko"
+
+#endif /* __ET131X_VERSION_H__ */
-diff -purN linux-2.6.27/drivers/staging/go7007/Kconfig linux-2.6.27.19-5.1/drivers/staging/go7007/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/Kconfig 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/Kconfig Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,25 @@
+config VIDEO_GO7007
+ tristate "Go 7007 support"
+ To compile this driver as a module, choose M here: the
+ module will be called go7007-usb
+
-diff -purN linux-2.6.27/drivers/staging/go7007/Makefile linux-2.6.27.19-5.1/drivers/staging/go7007/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/Makefile 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/Makefile Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,18 @@
+#obj-m += go7007.o go7007-usb.o snd-go7007.o wis-saa7115.o wis-tw9903.o \
+ wis-uda1342.o wis-sony-tuner.o wis-saa7113.o wis-ov7640.o \
+EXTRA_CFLAGS += -Idrivers/staging/saa7134
+EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
+EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-diff -purN linux-2.6.27/drivers/staging/go7007/README linux-2.6.27.19-5.1/drivers/staging/go7007/README
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/README 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/README
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/README Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,11 @@
+Todo:
+ - checkpatch.pl cleanups
+Please send patchs to Greg Kroah-Hartman <greg@kroah.com> and Cc: Ross
+Cohen <rcohen@snurgle.org> as well.
+
-diff -purN linux-2.6.27/drivers/staging/go7007/go7007-driver.c linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-driver.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-driver.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/go7007-driver.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/go7007-driver.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,688 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+EXPORT_SYMBOL(go7007_remove);
+
+MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/go7007-fw.c linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-fw.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-fw.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/go7007-fw.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/go7007-fw.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,1639 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+ release_firmware(fw_entry);
+ return -1;
+}
-diff -purN linux-2.6.27/drivers/staging/go7007/go7007-i2c.c linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-i2c.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-i2c.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/go7007-i2c.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/go7007-i2c.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,309 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+ }
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/staging/go7007/go7007-priv.h linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-priv.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-priv.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/go7007-priv.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/go7007-priv.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,279 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+/* snd-go7007.c */
+int go7007_snd_init(struct go7007 *go);
+int go7007_snd_remove(struct go7007 *go);
-diff -purN linux-2.6.27/drivers/staging/go7007/go7007-usb.c linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-usb.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-usb.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/go7007-usb.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/go7007-usb.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,1229 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+module_exit(go7007_usb_cleanup);
+
+MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/go7007-v4l2.c linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-v4l2.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-v4l2.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/go7007-v4l2.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/go7007-v4l2.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,1499 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+ if (go->video_dev)
+ video_unregister_device(go->video_dev);
+}
-diff -purN linux-2.6.27/drivers/staging/go7007/go7007.h linux-2.6.27.19-5.1/drivers/staging/go7007/go7007.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/go7007.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/go7007.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/go7007.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+ struct go7007_md_params)
+#define GO7007IOC_S_MD_REGION _IOW('V', BASE_VIDIOC_PRIVATE + 8, \
+ struct go7007_md_region)
-diff -purN linux-2.6.27/drivers/staging/go7007/saa7134-go7007.c linux-2.6.27.19-5.1/drivers/staging/go7007/saa7134-go7007.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/saa7134-go7007.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/saa7134-go7007.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/saa7134-go7007.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,484 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+module_exit(saa7134_go7007_mod_cleanup);
+
+MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/snd-go7007.c linux-2.6.27.19-5.1/drivers/staging/go7007/snd-go7007.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/snd-go7007.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/snd-go7007.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/snd-go7007.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,305 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+EXPORT_SYMBOL(go7007_snd_remove);
+
+MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-i2c.h linux-2.6.27.19-5.1/drivers/staging/go7007/wis-i2c.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-i2c.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-i2c.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-i2c.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+#define TUNER_SONY_BTF_PG472Z 200
+#define TUNER_SONY_BTF_PK467Z 201
+#define TUNER_SONY_BTF_PB463Z 202
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-ov7640.c linux-2.6.27.19-5.1/drivers/staging/go7007/wis-ov7640.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-ov7640.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-ov7640.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-ov7640.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+module_exit(wis_ov7640_cleanup);
+
+MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-saa7113.c linux-2.6.27.19-5.1/drivers/staging/go7007/wis-saa7113.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-saa7113.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-saa7113.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-saa7113.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,358 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+module_exit(wis_saa7113_cleanup);
+
+MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-saa7115.c linux-2.6.27.19-5.1/drivers/staging/go7007/wis-saa7115.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-saa7115.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-saa7115.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-saa7115.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,491 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+module_exit(wis_saa7115_cleanup);
+
+MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-sony-tuner.c linux-2.6.27.19-5.1/drivers/staging/go7007/wis-sony-tuner.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-sony-tuner.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-sony-tuner.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-sony-tuner.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,742 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+module_exit(wis_sony_tuner_cleanup);
+
+MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-tw2804.c linux-2.6.27.19-5.1/drivers/staging/go7007/wis-tw2804.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-tw2804.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-tw2804.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-tw2804.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,380 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+module_exit(wis_tw2804_cleanup);
+
+MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-tw9903.c linux-2.6.27.19-5.1/drivers/staging/go7007/wis-tw9903.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-tw9903.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-tw9903.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-tw9903.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,362 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+module_exit(wis_tw9903_cleanup);
+
+MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-uda1342.c linux-2.6.27.19-5.1/drivers/staging/go7007/wis-uda1342.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-uda1342.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-uda1342.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-uda1342.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+module_exit(wis_uda1342_cleanup);
+
+MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/me4000/Kconfig linux-2.6.27.19-5.1/drivers/staging/me4000/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/me4000/Kconfig 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/me4000/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/me4000/Kconfig Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,10 @@
+config ME4000
+ tristate "Meilhaus ME-4000 support"
+
+ To compile this driver as a module, choose M here: the module
+ will be called me4000.
-diff -purN linux-2.6.27/drivers/staging/me4000/Makefile linux-2.6.27.19-5.1/drivers/staging/me4000/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/me4000/Makefile 2009-03-25 16:11:09.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/staging/me4000/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/me4000/Makefile Wed May 06 16:56:37 2009 +0100
+@@ -0,0 +1,1 @@
+obj-$(CONFIG_ME4000) += me4000.o
-diff -purN linux-2.6.27/drivers/staging/me4000/README linux-2.6.27.19-5.1/drivers/staging/me4000/README
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/me4000/README 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/me4000/README
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/me4000/README Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,13 @@
+
+TODO:
+and Cc: Wolfgang Beiter <w.beiter@aon.at> and
+Guenter Gebhardt <g.gebhardt@meilhaus.de>
+
-diff -purN linux-2.6.27/drivers/staging/me4000/me4000.c linux-2.6.27.19-5.1/drivers/staging/me4000/me4000.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/me4000/me4000.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/me4000/me4000.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/me4000/me4000.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,6133 @@
+/* Device driver for Meilhaus ME-4000 board family.
+ * ================================================
+ *eof = 1;
+ return len;
+}
-diff -purN linux-2.6.27/drivers/staging/me4000/me4000.h linux-2.6.27.19-5.1/drivers/staging/me4000/me4000.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/me4000/me4000.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/me4000/me4000.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/me4000/me4000.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,954 @@
+/*
+ * Copyright (C) 2003 Meilhaus Electronic GmbH (support@meilhaus.de)
+#define ME4000_AI_GET_COUNT_BUFFER _IOR (ME4000_MAGIC, 50, unsigned long)
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/me4000/me4000_firmware.h linux-2.6.27.19-5.1/drivers/staging/me4000/me4000_firmware.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/me4000/me4000_firmware.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/me4000/me4000_firmware.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/me4000/me4000_firmware.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,10033 @@
+/*
+ This file is copyright by Meilhaus Electronic GmbH 2003.
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00
+};
-diff -purN linux-2.6.27/drivers/staging/me4000/me4610_firmware.h linux-2.6.27.19-5.1/drivers/staging/me4000/me4610_firmware.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/me4000/me4610_firmware.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/me4000/me4610_firmware.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/me4000/me4610_firmware.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,5409 @@
+/*
+ This file is copyright by Meilhaus Electronic GmbH 2003.
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00
+};
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/amsdu.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/amsdu.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/amsdu.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/amsdu.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/amsdu.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+ return;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cagg.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cagg.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cagg.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cagg.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cagg.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,3611 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+ return hlen;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cagg.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cagg.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cagg.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cagg.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cagg.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,435 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+#endif /* #ifndef _CAGG_H */
+
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/ccmd.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ccmd.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ccmd.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/ccmd.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/ccmd.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,1861 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+ wd->seq_debug = value;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cfunc.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cfunc.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cfunc.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cfunc.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cfunc.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,1227 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+ return 0;
+ }
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cfunc.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cfunc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cfunc.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cfunc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cfunc.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,449 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+
+#endif /* #ifndef _CFUNC_H */
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/chb.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/chb.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/chb.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/chb.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/chb.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+ zm_debug_msg0("***************************");
+}
+
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cic.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cic.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cic.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cic.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cic.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,496 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+ }
+#endif
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cinit.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cinit.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cinit.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cinit.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cinit.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,1911 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+ return ch;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cmm.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cmm.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cmm.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cmm.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cmm.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,2141 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+ return 0xffff;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cmmap.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cmmap.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cmmap.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cmmap.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cmmap.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,2402 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+ return;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cmmsta.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cmmsta.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cmmsta.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cmmsta.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cmmsta.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,5782 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+ return offset;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/coid.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/coid.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/coid.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/coid.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/coid.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,2695 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+ else
+ wd->sta.ibssAdditionalIESize = 0;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cprecomp.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cprecomp.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cprecomp.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cprecomp.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cprecomp.h Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+#include "performance.h"
+#endif
+
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cpsmgr.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cpsmgr.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cpsmgr.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cpsmgr.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cpsmgr.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,731 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+/* Leave an empty line below to remove warning message on some compiler */
+
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cscanmgr.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cscanmgr.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cscanmgr.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cscanmgr.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cscanmgr.c Wed May 06 16:56:37 2009 +0100
@@ -0,0 +1,535 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+ zmw_leave_critical_section(dev);
+ return;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/ctkip.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ctkip.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ctkip.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/ctkip.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/ctkip.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,598 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+ return ret;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/ctxrx.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ctxrx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ctxrx.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/ctxrx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/ctxrx.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,4096 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+ }
+ }
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cwep.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cwep.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cwep.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cwep.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cwep.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,299 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+ return ZM_ICV_SUCCESS;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cwm.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cwm.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cwm.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cwm.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cwm.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+ return FALSE;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cwm.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cwm.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cwm.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cwm.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cwm.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+
+#endif /* #ifndef _CWM_H */
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/freqctrl.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/freqctrl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/freqctrl.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/freqctrl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/freqctrl.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,259 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+ zfCoreSetFrequencyExV2(dev, wd->frequency, 0, 0, NULL, 1);
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/ledmgr.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ledmgr.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ledmgr.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/ledmgr.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/ledmgr.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,557 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/performance.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/performance.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/performance.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/performance.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/performance.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,431 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+ zm_summary.rx_reorder++;
+}
+#endif /* end of ZM_ENABLE_PERFORMANCE_EVALUATION */
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/performance.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/performance.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/performance.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/performance.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/performance.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+void zfiRxPerformanceReorder(zdev_t* dev);
+#endif /* end of ZM_ENABLE_PERFORMANCE_EVALUATION */
+#endif /* end of _PERFORMANCE_H */
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/pub_usb.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/pub_usb.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/pub_usb.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/pub_usb.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/pub_usb.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+extern u32_t zfwUsbSetConfiguration(zdev_t *dev, u16_t value);
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/pub_zfi.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/pub_zfi.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/pub_zfi.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/pub_zfi.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/pub_zfi.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,821 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+#endif
+/***** End of section 3 *****/
+#endif
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/pub_zfw.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/pub_zfw.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/pub_zfw.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/pub_zfw.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/pub_zfw.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+#endif
+
+#endif //_PUB_ZFW_H
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/queue.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/queue.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/queue.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/queue.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/queue.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,303 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+ return;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/queue.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/queue.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/queue.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/queue.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/queue.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+};
+
+#endif //#ifndef _QUEUE_H
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/ratectrl.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ratectrl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ratectrl.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/ratectrl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/ratectrl.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,874 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+ wd->sta.oppositeInfo[0].rcCell.currentRateIndex = RateMapToRateIndex(Rate, &wd->sta.oppositeInfo[0].rcCell);
+}
+#endif
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/ratectrl.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ratectrl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ratectrl.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/ratectrl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/ratectrl.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+extern void zfRateCtrlTxSuccessEvent(zdev_t* dev, struct zsRcCell* rcCell, u8_t successRate);
+extern void zfRateCtrlAggrSta(zdev_t* dev);
+#endif
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/struct.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/struct.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/struct.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/struct.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/struct.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1315 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+#define zmw_rx_buf_writeh(dev, buf, offset, value) zmw_buf_writeh(dev, buf, offset, value)
+
+#endif /* #ifndef _STRUCT_H */
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/wlan.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/wlan.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/wlan.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/wlan.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/wlan.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,595 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+#define ZM_HP_CAP_5G 0x8
+
+#endif /* #ifndef _WLAN_H */
-diff -purN linux-2.6.27/drivers/staging/otus/Kconfig linux-2.6.27.19-5.1/drivers/staging/otus/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/Kconfig 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/Kconfig Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,32 @@
+config OTUS
+ tristate "Atheros OTUS 802.11n USB wireless support"
+ shown in the example:
+ $ wpa_supplicant -Dotus -i <atheros device from ifconfig> -c /path/to/wpa_supplicant.conf -d
+
-diff -purN linux-2.6.27/drivers/staging/otus/Makefile linux-2.6.27.19-5.1/drivers/staging/otus/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/Makefile 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/Makefile Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,67 @@
+obj-$(CONFIG_OTUS) += arusb_lnx.o
+
+ hal/hpDKfwu.o \
+ hal/hpfwspiu.o \
+ hal/hpani.o
-diff -purN linux-2.6.27/drivers/staging/otus/TODO linux-2.6.27.19-5.1/drivers/staging/otus/TODO
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/TODO 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/TODO
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/TODO Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,9 @@
+TODO:
+ - checkpatch.pl cleanups
+Please send any patches to Greg Kroah-Hartman <greg@kroah.com> and
+Luis Rodriguez <Luis.Rodriguez@Atheros.com> and the
+otus-devel@lists.madwifi-project.org mailing list.
-diff -purN linux-2.6.27/drivers/staging/otus/apdbg.c linux-2.6.27.19-5.1/drivers/staging/otus/apdbg.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/apdbg.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/apdbg.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/apdbg.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,457 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+ return 0;
+}
+
-diff -purN linux-2.6.27/drivers/staging/otus/athr_common.h linux-2.6.27.19-5.1/drivers/staging/otus/athr_common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/athr_common.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/athr_common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/athr_common.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+};
+#endif //ZM_ENALBE_WAPI
+#endif
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpDKfwu.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpDKfwu.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpDKfwu.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpDKfwu.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpDKfwu.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,832 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+0x00000000, 0x00000000, 0x00000000, };
+
+const u32_t zcDKFwImageSize=12988;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpani.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpani.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpani.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpani.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpani.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,732 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+ }
+ }
+}
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpani.h linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpani.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpani.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpani.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpani.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,420 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+#define AR_PHY_POWER_TX_RATE7 0x1C63CC
+#define AR_PHY_POWER_TX_RATE8 0x1C63D0
+#define AR_PHY_POWER_TX_RATE9 0x1C63D4
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfw2.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfw2.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfw2.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfw2.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfw2.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1018 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+0x00000000, 0x00000000, 0x00000000, };
+
+const u32_t zcP2FwImageSize=15964;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwbu.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwbu.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwbu.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwbu.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwbu.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,5269 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+};
+
+const u32_t zcFwBufImageSize=83968;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwspiu.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwspiu.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwspiu.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwspiu.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwspiu.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,655 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+0x00000000, 0x00000000, 0x00000000, };
+
+const u32_t zcFwImageSPISize=10156;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwu.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwu.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1017 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+};
+
+const u32_t zcFwImageSize=15936;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu.c.drv_ba_resend linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu.c.drv_ba_resend
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu.c.drv_ba_resend 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwu.c.drv_ba_resend
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwu.c.drv_ba_resend Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,742 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+0x00000000, };
+
+const u32_t zcFwImageSize=11540;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu_2k.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_2k.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_2k.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwu_2k.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwu_2k.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1016 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+0x00000000, 0x00000000, };
+
+const u32_t zcFwImageSize=15928;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu_BA.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_BA.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_BA.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwu_BA.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwu_BA.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,874 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+0x00000000, 0x00000000, };
+
+const u32_t zcFwImageSize=13656;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu_FB50_mdk.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_FB50_mdk.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_FB50_mdk.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwu_FB50_mdk.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwu_FB50_mdk.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,721 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+0x00000000, };
+
+const u32_t zcFwImageSize=11204;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu_OTUS_RC.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_OTUS_RC.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_OTUS_RC.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwu_OTUS_RC.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwu_OTUS_RC.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,715 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+};
+
+const u32_t zcFwImageSize=11104;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu_txstream.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_txstream.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_txstream.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwu_txstream.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwu_txstream.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1017 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+};
+
+const u32_t zcFwImageSize=15936;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwuinit.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwuinit.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwuinit.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwuinit.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwuinit.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,240 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+0xEE000D0A, };
+
+const u32_t zcFwImageSize=3508;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpmain.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpmain.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpmain.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpmain.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpmain.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,4643 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+ return;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpreg.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpreg.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpreg.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpreg.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpreg.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,2481 @@
+/*
+ * Copyright (c) 2000-2005 ZyDAS Technology Corporation
+ hpPriv->disableDfsCh = disableFlag;
+ return;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpreg.h linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpreg.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpreg.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpreg.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpreg.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,524 @@
+/*
+ * Copyright (c) 2000-2005 ZyDAS Technology Corporation
+};
+
+#endif /* #ifndef _HPREG_H */
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hprw.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hprw.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hprw.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hprw.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hprw.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1557 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+ return ret;
+}
+//Paul--
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpusb.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpusb.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpusb.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpusb.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpusb.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1584 @@
+/*
+ * Copyright (c) 2000-2005 ZyDAS Technology Corporation
+
+}
+
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpusb.h linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpusb.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpusb.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpusb.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpusb.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,437 @@
+/*
+ * Copyright (c) 2000-2005 ZyDAS Technology Corporation
+} ATH_CTLS;
+
+#endif /* #ifndef _HPUSB_H */
-diff -purN linux-2.6.27/drivers/staging/otus/hal/otus.ini linux-2.6.27.19-5.1/drivers/staging/otus/hal/otus.ini
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/otus.ini 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/otus.ini
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/otus.ini Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,414 @@
+/* 8602 : update mismatch register between NDIS and ART */
+static const u32_t ar5416Modes[][6] = {
+ {0x98b0, 0x00000040, 0x00000040},
+ {0x98f0, 0x0000001c, 0x0000001c}
+};
-diff -purN linux-2.6.27/drivers/staging/otus/ioctl.c linux-2.6.27.19-5.1/drivers/staging/otus/ioctl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/ioctl.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/ioctl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/ioctl.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,2936 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+ return err;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/oal_dt.h linux-2.6.27.19-5.1/drivers/staging/otus/oal_dt.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/oal_dt.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/oal_dt.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/oal_dt.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+typedef struct net_device zdev_t;
+
+#endif /* #ifndef _OAL_DT_H */
-diff -purN linux-2.6.27/drivers/staging/otus/oal_marc.h linux-2.6.27.19-5.1/drivers/staging/otus/oal_marc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/oal_marc.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/oal_marc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/oal_marc.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+#define DbgPrint printk
+
+#endif /* #ifndef _OAL_MARC_H */
-diff -purN linux-2.6.27/drivers/staging/otus/usbdrv.c linux-2.6.27.19-5.1/drivers/staging/otus/usbdrv.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/usbdrv.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/usbdrv.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/usbdrv.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1210 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/staging/otus/usbdrv.h linux-2.6.27.19-5.1/drivers/staging/otus/usbdrv.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/usbdrv.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/usbdrv.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/usbdrv.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,257 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+#endif /* _USBDRV_H */
+
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_buf.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_buf.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_buf.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_buf.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_buf.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+void zfwCopyBufContext(zdev_t* dev, zbuf_t* source, zbuf_t* dst)
+{
+}
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_dbg.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_dbg.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_dbg.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_dbg.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_dbg.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+//For Evl --
+
+/* Leave an empty line below to remove warning message on some compiler */
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_ev.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_ev.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_ev.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_ev.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_ev.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,283 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+}
+/* Leave an empty line below to remove warning message on some compiler */
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_mem.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_mem.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_mem.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_mem.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_mem.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+}
+
+/* Leave an empty line below to remove warning message on some compiler */
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_mis.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_mis.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_mis.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_mis.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_mis.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+#endif
+
+/* Leave an empty line below to remove warning message on some compiler */
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_pkt.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_pkt.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_pkt.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_pkt.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_pkt.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,178 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+}
+
+/* Leave an empty line below to remove warning message on some compiler */
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_sec.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_sec.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_sec.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_sec.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_sec.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+}
+
+/* Leave an empty line below to remove warning message on some compiler */
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_usb.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_usb.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_usb.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_usb.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_usb.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,195 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+}
+
+/* Leave an empty line below to remove warning message on some compiler */
-diff -purN linux-2.6.27/drivers/staging/otus/wwrap.c linux-2.6.27.19-5.1/drivers/staging/otus/wwrap.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wwrap.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wwrap.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wwrap.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1207 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+ *Dur = 0;
+}
+
-diff -purN linux-2.6.27/drivers/staging/otus/zdcompat.h linux-2.6.27.19-5.1/drivers/staging/otus/zdcompat.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/zdcompat.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/zdcompat.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/zdcompat.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/otus/zdusb.c linux-2.6.27.19-5.1/drivers/staging/otus/zdusb.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/zdusb.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/zdusb.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/zdusb.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,295 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+
+module_init(zfLnxIinit);
+module_exit(zfLnxExit);
-diff -purN linux-2.6.27/drivers/staging/otus/zdusb.h linux-2.6.27.19-5.1/drivers/staging/otus/zdusb.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/zdusb.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/zdusb.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/zdusb.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2007-2008 Atheros Communications Inc.
+#define PRODUCT_DWA160A 0x3C10
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/rt2860/2860_main_dev.c linux-2.6.27.19-5.1/drivers/staging/rt2860/2860_main_dev.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/2860_main_dev.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/2860_main_dev.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/2860_main_dev.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1377 @@
+/*
+ *************************************************************************
+
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/Kconfig linux-2.6.27.19-5.1/drivers/staging/rt2860/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/Kconfig 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/Kconfig Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,5 @@
+config RT2860
+ tristate "Ralink 2860 wireless support"
+ depends on PCI && X86 && WLAN_80211
+ ---help---
+ This is an experimental driver for the Ralink 2860 wireless chip.
-diff -purN linux-2.6.27/drivers/staging/rt2860/Makefile linux-2.6.27.19-5.1/drivers/staging/rt2860/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/Makefile 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/Makefile Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,43 @@
+obj-$(CONFIG_RT2860) += rt2860sta.o
+
+ common/2860_rtmp_init.o \
+ 2860_main_dev.o \
+ common/cmm_data_2860.o
-diff -purN linux-2.6.27/drivers/staging/rt2860/TODO linux-2.6.27.19-5.1/drivers/staging/rt2860/TODO
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/TODO 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/TODO
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/TODO Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,17 @@
+I'm hesitant to add a TODO file here, as the wireless developers would
+really have people help them out on the "clean" rt2860 driver that can
+Please send any patches or complaints about this driver to Greg
+Kroah-Hartman <greg@kroah.com> and don't bother the upstream wireless
+kernel developers about it, they want nothing to do with it.
-diff -purN linux-2.6.27/drivers/staging/rt2860/aironet.h linux-2.6.27.19-5.1/drivers/staging/rt2860/aironet.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/aironet.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/aironet.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/aironet.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,210 @@
+/*
+ *************************************************************************
+} CCX_CONTROL, *PCCX_CONTROL;
+
+#endif // __AIRONET_H__
-diff -purN linux-2.6.27/drivers/staging/rt2860/ap.h linux-2.6.27.19-5.1/drivers/staging/rt2860/ap.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/ap.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/ap.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/ap.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,557 @@
+/*
+ *************************************************************************
+
+#endif // __AP_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/chlist.h linux-2.6.27.19-5.1/drivers/staging/rt2860/chlist.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/chlist.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/chlist.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/chlist.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1296 @@
+/*
+ *************************************************************************
+}
+#endif // __CHLIST_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/2860_rtmp_init.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/2860_rtmp_init.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/2860_rtmp_init.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/2860_rtmp_init.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/2860_rtmp_init.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,922 @@
+/*
+ *************************************************************************
+}
+/* End of 2860_rtmp_init.c */
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/action.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/action.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/action.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/action.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/action.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1031 @@
+/*
+ *************************************************************************
+
+ return;
+}
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/action.h linux-2.6.27.19-5.1/drivers/staging/rt2860/common/action.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/action.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/action.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/action.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,68 @@
+/*
+ *************************************************************************
+#endif /* __ACTION_H__ */
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/ba_action.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/ba_action.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/ba_action.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/ba_action.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/ba_action.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1802 @@
+/*
+ *************************************************************************
+
+#endif // DOT11_N_SUPPORT //
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_data.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_data.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_data.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/cmm_data.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/cmm_data.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,3469 @@
+/*
+ *************************************************************************
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_data_2860.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_data_2860.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_data_2860.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/cmm_data_2860.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/cmm_data_2860.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1240 @@
+/*
+ *************************************************************************
+ RTMPusecDelay(1000);
+ }while (i++ < 100);
+}
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_info.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_info.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_info.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/cmm_info.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/cmm_info.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,3417 @@
+/*
+ *************************************************************************
+ return 0;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_sanity.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_sanity.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_sanity.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/cmm_sanity.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/cmm_sanity.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1633 @@
+/*
+ *************************************************************************
+}
+#endif // QOS_DLS_SUPPORT //
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_sync.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_sync.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_sync.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/cmm_sync.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/cmm_sync.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,702 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_wpa.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_wpa.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_wpa.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/cmm_wpa.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/cmm_wpa.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1606 @@
+/*
+ *************************************************************************
+
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/dfs.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/dfs.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/dfs.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/dfs.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/dfs.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,453 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/eeprom.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/eeprom.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/eeprom.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/eeprom.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/eeprom.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,244 @@
+/*
+ *************************************************************************
+ EEpromCleanup(pAd);
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/firmware.h linux-2.6.27.19-5.1/drivers/staging/rt2860/common/firmware.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/firmware.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/firmware.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/firmware.h Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,558 @@
+/*
+ Copyright (c) 2007, Ralink Technology Corporation
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x94, 0xeb, } ;
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/md5.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/md5.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/md5.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/md5.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/md5.c Wed May 06 16:56:38 2009 +0100
@@ -0,0 +1,1427 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/mlme.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/mlme.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/mlme.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/mlme.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/mlme.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,8667 @@
+/*
+ *************************************************************************
+ R2));
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/netif_block.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/netif_block.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/netif_block.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/netif_block.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/netif_block.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,144 @@
+/*
+ *************************************************************************
+ return;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/netif_block.h linux-2.6.27.19-5.1/drivers/staging/rt2860/common/netif_block.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/netif_block.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/netif_block.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/netif_block.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,58 @@
+/*
+ *************************************************************************
+ IN PNDIS_PACKET pPacket);
+#endif // __NET_IF_BLOCK_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/rtmp_init.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/rtmp_init.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/rtmp_init.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/rtmp_init.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/rtmp_init.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,3757 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/rtmp_tkip.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/rtmp_tkip.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/rtmp_tkip.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/rtmp_tkip.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/rtmp_tkip.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1607 @@
+/*
+ *************************************************************************
+ xor_32(temp, tempb, out);
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/rtmp_wep.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/rtmp_wep.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/rtmp_wep.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/rtmp_wep.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/rtmp_wep.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,499 @@
+/*
+ *************************************************************************
+ ARCFOUR_ENCRYPT(&pAd->PrivateInfo.WEPCONTEXT, pDest, (PUCHAR) &pAd->PrivateInfo.FCSCRC32, 4);
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/spectrum.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/spectrum.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/spectrum.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/spectrum.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/spectrum.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1877 @@
+/*
+ *************************************************************************
+ return TRUE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/config.mk linux-2.6.27.19-5.1/drivers/staging/rt2860/config.mk
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/config.mk 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/config.mk
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/config.mk Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,245 @@
+# Support ATE function
+HAS_ATE=n
+export CFLAGS
+endif
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/dfs.h linux-2.6.27.19-5.1/drivers/staging/rt2860/dfs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/dfs.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/dfs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/dfs.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,100 @@
+/*
+ *************************************************************************
+ IN PUCHAR arg);
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/leap.h linux-2.6.27.19-5.1/drivers/staging/rt2860/leap.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/leap.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/leap.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/leap.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,215 @@
+/*
+ *************************************************************************
+ IN ULONG MsgLen);
+
+#endif // __LEAP_H__
-diff -purN linux-2.6.27/drivers/staging/rt2860/link_list.h linux-2.6.27.19-5.1/drivers/staging/rt2860/link_list.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/link_list.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/link_list.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/link_list.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,134 @@
+/*
+ *************************************************************************
+
+#endif // ___LINK_LIST_H__ //
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/md4.h linux-2.6.27.19-5.1/drivers/staging/rt2860/md4.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/md4.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/md4.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/md4.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,42 @@
+/*
+ *************************************************************************
+
+#endif //__MD4_H__
\ No newline at end of file
-diff -purN linux-2.6.27/drivers/staging/rt2860/md5.h linux-2.6.27.19-5.1/drivers/staging/rt2860/md5.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/md5.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/md5.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/md5.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,107 @@
+/*
+ *************************************************************************
+
+#endif /* aes.h */
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/mlme.h linux-2.6.27.19-5.1/drivers/staging/rt2860/mlme.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/mlme.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/mlme.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/mlme.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1447 @@
+/*
+ *************************************************************************
+
+
+#endif // MLME_H__
-diff -purN linux-2.6.27/drivers/staging/rt2860/oid.h linux-2.6.27.19-5.1/drivers/staging/rt2860/oid.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/oid.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/oid.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/oid.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,995 @@
+/*
+ *************************************************************************
+
+#endif // _OID_H_
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt2860.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rt2860.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt2860.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt2860.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt2860.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,349 @@
+/*
+ *************************************************************************
+
+#endif //__RT2860_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt28xx.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rt28xx.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt28xx.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt28xx.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt28xx.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,2714 @@
+/*
+ *************************************************************************
+#endif
+
+#endif // __RT28XX_H__
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt_ate.c linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_ate.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_ate.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt_ate.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt_ate.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,6025 @@
+/*
+ *************************************************************************
+
+#endif // RALINK_ATE //
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt_ate.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_ate.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_ate.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt_ate.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt_ate.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,353 @@
+/*
+ *************************************************************************
+ IN PRTMP_ADAPTER pAd);
+#endif // CONFIG_STA_SUPPORT //
+#endif // __ATE_H__ //
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt_config.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_config.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_config.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt_config.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt_config.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,101 @@
+/*
+ *************************************************************************
+
+#endif // __RT_CONFIG_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt_linux.c linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_linux.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_linux.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt_linux.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt_linux.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1054 @@
+/*
+ *************************************************************************
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt_linux.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_linux.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_linux.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt_linux.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt_linux.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,926 @@
+/*
+ *************************************************************************
+#endif // RT2860 //
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt_main_dev.c linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_main_dev.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_main_dev.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt_main_dev.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt_main_dev.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1686 @@
+/*
+ *************************************************************************
+ return NULL;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt_profile.c linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_profile.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_profile.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt_profile.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt_profile.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1976 @@
+/*
+ *************************************************************************
+}
+#endif // DOT11_N_SUPPORT //
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/rtmp.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rtmp.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rtmp.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,7177 @@
+/*
+ *************************************************************************
+
+#endif // __RTMP_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/rtmp_ckipmic.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp_ckipmic.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp_ckipmic.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rtmp_ckipmic.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rtmp_ckipmic.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,113 @@
+/*
+ *************************************************************************
+ IN PUCHAR mic_snap);
+
+#endif //__RTMP_CKIPMIC_H__
-diff -purN linux-2.6.27/drivers/staging/rt2860/rtmp_def.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp_def.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp_def.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rtmp_def.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rtmp_def.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1588 @@
+/*
+ *************************************************************************
+#endif // __RTMP_DEF_H__
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/rtmp_type.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp_type.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp_type.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rtmp_type.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rtmp_type.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,94 @@
+/*
+ *************************************************************************
+
+#endif // __RTMP_TYPE_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/spectrum.h linux-2.6.27.19-5.1/drivers/staging/rt2860/spectrum.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/spectrum.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/spectrum.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/spectrum.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,322 @@
+/*
+ *************************************************************************
+ IN UINT8 Channel);
+#endif // __SPECTRUM_H__ //
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/spectrum_def.h linux-2.6.27.19-5.1/drivers/staging/rt2860/spectrum_def.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/spectrum_def.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/spectrum_def.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/spectrum_def.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,95 @@
+/*
+ *************************************************************************
+
+#endif // __SPECTRUM_DEF_H__ //
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/aironet.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/aironet.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/aironet.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/aironet.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/aironet.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1312 @@
+/*
+ *************************************************************************
+ pAd->StaCfg.FrameReportLen += Length;
+ }
+}
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/assoc.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/assoc.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/assoc.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/assoc.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/assoc.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1826 @@
+/*
+ *************************************************************************
+}
+#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/auth.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/auth.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/auth.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/auth.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/auth.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,474 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/auth_rsp.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/auth_rsp.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/auth_rsp.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/auth_rsp.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/auth_rsp.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,167 @@
+/*
+ *************************************************************************
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/connect.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/connect.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/connect.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/connect.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/connect.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,2751 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/dls.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/dls.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/dls.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/dls.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/dls.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,2201 @@
+/*
+ *************************************************************************
+ return TRUE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/rtmp_data.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/rtmp_data.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/rtmp_data.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/rtmp_data.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/rtmp_data.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,2614 @@
+/*
+ *************************************************************************
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/sanity.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/sanity.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/sanity.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/sanity.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/sanity.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,420 @@
+/*
+ *************************************************************************
+ return TRUE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/sync.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/sync.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/sync.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/sync.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/sync.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1961 @@
+/*
+ *************************************************************************
+ return (pAd->Mlme.SyncMachine.CurrState == SCAN_LISTEN) ? TRUE : FALSE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/wpa.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/wpa.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/wpa.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/wpa.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/wpa.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,2086 @@
+/*
+ *************************************************************************
+ pAd->StaCfg.bBlockAssoc = TRUE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta_ioctl.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta_ioctl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta_ioctl.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta_ioctl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta_ioctl.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,6944 @@
+/*
+ *************************************************************************
+}
+#endif // CARRIER_DETECTION_SUPPORT //
+
-diff -purN linux-2.6.27/drivers/staging/rt2860/wpa.h linux-2.6.27.19-5.1/drivers/staging/rt2860/wpa.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/wpa.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/wpa.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/wpa.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,356 @@
+/*
+ *************************************************************************
+} RSN_CAPABILITY, *PRSN_CAPABILITY;
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/rt2870/2870_main_dev.c linux-2.6.27.19-5.1/drivers/staging/rt2870/2870_main_dev.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/2870_main_dev.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/2870_main_dev.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/2870_main_dev.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1612 @@
+/*
+ *************************************************************************
+
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/Kconfig linux-2.6.27.19-5.1/drivers/staging/rt2870/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/Kconfig 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/Kconfig Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,6 @@
+config RT2870
+ tristate "Ralink 2870 wireless support"
+ ---help---
+ This is an experimental driver for the Ralink 2870 wireless chip.
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/Makefile linux-2.6.27.19-5.1/drivers/staging/rt2870/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/Makefile 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/Makefile Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,47 @@
+obj-$(CONFIG_RT2870) += rt2870sta.o
+
+ common/rtusb_data.o \
+ common/cmm_data_2870.o
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/TODO linux-2.6.27.19-5.1/drivers/staging/rt2870/TODO
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/TODO 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/TODO
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/TODO Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,10 @@
+TODO:
+ - checkpatch.pl clean
+Please send any patches or complaints about this driver to Greg
+Kroah-Hartman <greg@kroah.com> and don't bother the upstream wireless
+kernel developers about it, they want nothing to do with it.
-diff -purN linux-2.6.27/drivers/staging/rt2870/aironet.h linux-2.6.27.19-5.1/drivers/staging/rt2870/aironet.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/aironet.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/aironet.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/aironet.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,210 @@
+/*
+ *************************************************************************
+} CCX_CONTROL, *PCCX_CONTROL;
+
+#endif // __AIRONET_H__
-diff -purN linux-2.6.27/drivers/staging/rt2870/ap.h linux-2.6.27.19-5.1/drivers/staging/rt2870/ap.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/ap.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/ap.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/ap.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,562 @@
+/*
+ *************************************************************************
+
+#endif // __AP_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/chlist.h linux-2.6.27.19-5.1/drivers/staging/rt2870/chlist.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/chlist.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/chlist.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/chlist.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1296 @@
+/*
+ *************************************************************************
+}
+#endif // __CHLIST_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/2870_rtmp_init.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/2870_rtmp_init.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/2870_rtmp_init.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/2870_rtmp_init.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/2870_rtmp_init.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1778 @@
+/*
+ *************************************************************************
+}
+
+/* End of 2870_rtmp_init.c */
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/action.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/action.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/action.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/action.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/action.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1046 @@
+/*
+ *************************************************************************
+
+ return;
+}
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/action.h linux-2.6.27.19-5.1/drivers/staging/rt2870/common/action.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/action.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/action.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/action.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,68 @@
+/*
+ *************************************************************************
+#endif /* __ACTION_H__ */
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/ba_action.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/ba_action.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/ba_action.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/ba_action.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/ba_action.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1798 @@
+/*
+ *************************************************************************
+
+#endif // DOT11_N_SUPPORT //
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_data.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_data.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_data.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/cmm_data.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/cmm_data.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,2734 @@
+/*
+ *************************************************************************
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_data_2870.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_data_2870.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_data_2870.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/cmm_data_2870.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/cmm_data_2870.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,963 @@
+/*
+ *************************************************************************
+#endif // CONFIG_STA_SUPPORT //
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_info.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_info.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_info.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/cmm_info.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/cmm_info.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,3712 @@
+/*
+ *************************************************************************
+ return 0;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_sanity.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_sanity.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_sanity.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/cmm_sanity.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/cmm_sanity.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1663 @@
+/*
+ *************************************************************************
+}
+#endif // QOS_DLS_SUPPORT //
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_sync.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_sync.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_sync.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/cmm_sync.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/cmm_sync.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,711 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_wpa.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_wpa.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_wpa.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/cmm_wpa.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/cmm_wpa.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1654 @@
+/*
+ *************************************************************************
+
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/dfs.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/dfs.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/dfs.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/dfs.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/dfs.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,453 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/eeprom.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/eeprom.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/eeprom.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/eeprom.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/eeprom.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,254 @@
+/*
+ *************************************************************************
+ EEpromCleanup(pAd);
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/firmware.h linux-2.6.27.19-5.1/drivers/staging/rt2870/common/firmware.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/firmware.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/firmware.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/firmware.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,558 @@
+/*
+ Copyright (c) 2007, Ralink Technology Corporation
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe9, 0x00, } ;
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/md5.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/md5.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/md5.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/md5.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/md5.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1427 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/mlme.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/mlme.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/mlme.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/mlme.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/mlme.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,8609 @@
+/*
+ *************************************************************************
+ R2));
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/netif_block.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/netif_block.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/netif_block.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/netif_block.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/netif_block.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,144 @@
+/*
+ *************************************************************************
+ return;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtmp_init.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtmp_init.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtmp_init.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/rtmp_init.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/rtmp_init.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,4132 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtmp_tkip.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtmp_tkip.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtmp_tkip.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/rtmp_tkip.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/rtmp_tkip.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1613 @@
+/*
+ *************************************************************************
+ xor_32(temp, tempb, out);
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtmp_wep.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtmp_wep.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtmp_wep.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/rtmp_wep.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/rtmp_wep.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,508 @@
+/*
+ *************************************************************************
+ ARCFOUR_ENCRYPT(&pAd->PrivateInfo.WEPCONTEXT, pDest, (PUCHAR) &pAd->PrivateInfo.FCSCRC32, 4);
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtusb_bulk.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtusb_bulk.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtusb_bulk.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/rtusb_bulk.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/rtusb_bulk.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1981 @@
+ /*
+ *************************************************************************
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtusb_data.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtusb_data.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtusb_data.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/rtusb_data.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/rtusb_data.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,229 @@
+/*
+ *************************************************************************
+ pTxInfo->rsv2 = 0;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtusb_io.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtusb_io.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtusb_io.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/rtusb_io.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/rtusb_io.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,2006 @@
+/*
+ *************************************************************************
+ } /* end of while */
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/spectrum.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/spectrum.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/spectrum.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/spectrum.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/spectrum.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1876 @@
+/*
+ *************************************************************************
+ return TRUE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/dfs.h linux-2.6.27.19-5.1/drivers/staging/rt2870/dfs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/dfs.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/dfs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/dfs.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,100 @@
+/*
+ *************************************************************************
+ IN PUCHAR arg);
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/leap.h linux-2.6.27.19-5.1/drivers/staging/rt2870/leap.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/leap.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/leap.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/leap.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,215 @@
+/*
+ *************************************************************************
+ IN ULONG MsgLen);
+
+#endif // __LEAP_H__
-diff -purN linux-2.6.27/drivers/staging/rt2870/link_list.h linux-2.6.27.19-5.1/drivers/staging/rt2870/link_list.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/link_list.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/link_list.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/link_list.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,134 @@
+/*
+ *************************************************************************
+
+#endif // ___LINK_LIST_H__ //
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/md4.h linux-2.6.27.19-5.1/drivers/staging/rt2870/md4.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/md4.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/md4.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/md4.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,42 @@
+/*
+ *************************************************************************
+
+#endif //__MD4_H__
\ No newline at end of file
-diff -purN linux-2.6.27/drivers/staging/rt2870/md5.h linux-2.6.27.19-5.1/drivers/staging/rt2870/md5.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/md5.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/md5.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/md5.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,107 @@
+/*
+ *************************************************************************
+
+#endif /* aes.h */
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/mlme.h linux-2.6.27.19-5.1/drivers/staging/rt2870/mlme.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/mlme.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/mlme.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/mlme.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1471 @@
+/*
+ *************************************************************************
+
+
+#endif // MLME_H__
-diff -purN linux-2.6.27/drivers/staging/rt2870/netif_block.h linux-2.6.27.19-5.1/drivers/staging/rt2870/netif_block.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/netif_block.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/netif_block.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/netif_block.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,58 @@
+/*
+ *************************************************************************
+ IN PNDIS_PACKET pPacket);
+#endif // __NET_IF_BLOCK_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/oid.h linux-2.6.27.19-5.1/drivers/staging/rt2870/oid.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/oid.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/oid.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/oid.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1091 @@
+/*
+ *************************************************************************
+
+#endif // _OID_H_
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt2870.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rt2870.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt2870.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt2870.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt2870.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,761 @@
+/*
+ *************************************************************************
+ RT28xxUsbMlmeRadioOFF(pAd);
+
+#endif //__RT2870_H__
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt28xx.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rt28xx.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt28xx.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt28xx.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt28xx.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,2689 @@
+/*
+ *************************************************************************
+#endif
+
+#endif // __RT28XX_H__
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt_ate.c linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_ate.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_ate.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt_ate.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt_ate.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,6452 @@
+/*
+ *************************************************************************
+
+#endif // RALINK_ATE //
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt_ate.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_ate.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_ate.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt_ate.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt_ate.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,315 @@
+/*
+ *************************************************************************
+ IN PRTMP_ADAPTER pAd);
+#endif // CONFIG_STA_SUPPORT //
+#endif // __ATE_H__ //
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt_config.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_config.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_config.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt_config.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt_config.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,104 @@
+/*
+ *************************************************************************
+
+#endif // __RT_CONFIG_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt_linux.c linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_linux.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_linux.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt_linux.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt_linux.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1095 @@
+/*
+ *************************************************************************
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt_linux.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_linux.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_linux.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt_linux.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt_linux.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,908 @@
+/*
+ *************************************************************************
+void rtmp_os_thread_init(PUCHAR pThreadName, PVOID pNotify);
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt_main_dev.c linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_main_dev.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_main_dev.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt_main_dev.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt_main_dev.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,1863 @@
+/*
+ *************************************************************************
+ return NULL;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt_profile.c linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_profile.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_profile.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt_profile.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt_profile.c Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,2016 @@
+/*
+ *************************************************************************
+}
+#endif // DOT11_N_SUPPORT //
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/rtmp.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rtmp.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rtmp.h Wed May 06 16:56:39 2009 +0100
@@ -0,0 +1,7586 @@
+/*
+ *************************************************************************
+
+#endif // __RTMP_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/rtmp_ckipmic.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp_ckipmic.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp_ckipmic.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rtmp_ckipmic.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rtmp_ckipmic.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,113 @@
+/*
+ *************************************************************************
+ IN PUCHAR mic_snap);
+
+#endif //__RTMP_CKIPMIC_H__
-diff -purN linux-2.6.27/drivers/staging/rt2870/rtmp_def.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp_def.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp_def.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rtmp_def.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rtmp_def.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1622 @@
+/*
+ *************************************************************************
+#endif // __RTMP_DEF_H__
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/rtmp_type.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp_type.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp_type.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rtmp_type.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rtmp_type.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,94 @@
+/*
+ *************************************************************************
+
+#endif // __RTMP_TYPE_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/spectrum.h linux-2.6.27.19-5.1/drivers/staging/rt2870/spectrum.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/spectrum.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/spectrum.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/spectrum.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,322 @@
+/*
+ *************************************************************************
+ IN UINT8 Channel);
+#endif // __SPECTRUM_H__ //
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/spectrum_def.h linux-2.6.27.19-5.1/drivers/staging/rt2870/spectrum_def.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/spectrum_def.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/spectrum_def.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/spectrum_def.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,95 @@
+/*
+ *************************************************************************
+
+#endif // __SPECTRUM_DEF_H__ //
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/aironet.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/aironet.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/aironet.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/aironet.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/aironet.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1312 @@
+/*
+ *************************************************************************
+ pAd->StaCfg.FrameReportLen += Length;
+ }
+}
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/assoc.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/assoc.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/assoc.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/assoc.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/assoc.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,2039 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/auth.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/auth.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/auth.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/auth.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/auth.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,474 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/auth_rsp.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/auth_rsp.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/auth_rsp.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/auth_rsp.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/auth_rsp.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,166 @@
+/*
+ *************************************************************************
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/connect.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/connect.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/connect.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/connect.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/connect.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,2822 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/dls.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/dls.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/dls.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/dls.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/dls.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,2210 @@
+/*
+ *************************************************************************
+ return TRUE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/rtmp_data.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/rtmp_data.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/rtmp_data.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/rtmp_data.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/rtmp_data.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,2619 @@
+/*
+ *************************************************************************
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/sanity.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/sanity.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/sanity.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/sanity.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/sanity.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,420 @@
+/*
+ *************************************************************************
+ return TRUE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/sync.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/sync.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/sync.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/sync.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/sync.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1753 @@
+/*
+ *************************************************************************
+ return (pAd->Mlme.SyncMachine.CurrState == SCAN_LISTEN) ? TRUE : FALSE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/wpa.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/wpa.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/wpa.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/wpa.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/wpa.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,2107 @@
+/*
+ *************************************************************************
+ pAd->StaCfg.bBlockAssoc = TRUE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta_ioctl.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta_ioctl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta_ioctl.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta_ioctl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta_ioctl.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,7068 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta_ioctl.c.patch linux-2.6.27.19-5.1/drivers/staging/rt2870/sta_ioctl.c.patch
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta_ioctl.c.patch 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta_ioctl.c.patch
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta_ioctl.c.patch Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,18 @@
+--- sta_ioctl.c 2008-09-19 14:37:52.000000000 +0800
++++ sta_ioctl.c.fc9 2008-09-19 14:38:20.000000000 +0800
+
+ extern UCHAR CipherWpa2Template[];
+ extern UCHAR CipherWpaPskTkip[];
-diff -purN linux-2.6.27/drivers/staging/rt2870/tmp60 linux-2.6.27.19-5.1/drivers/staging/rt2870/tmp60
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/tmp60 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/tmp60
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/tmp60 Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,7037 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/tmp61 linux-2.6.27.19-5.1/drivers/staging/rt2870/tmp61
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/tmp61 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/tmp61
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/tmp61 Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,7037 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt2870/wpa.h linux-2.6.27.19-5.1/drivers/staging/rt2870/wpa.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/wpa.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/wpa.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/wpa.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,357 @@
+/*
+ *************************************************************************
+} RSN_CAPABILITY, *PRSN_CAPABILITY;
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/rt3070/2870_main_dev.c linux-2.6.27.19-5.1/drivers/staging/rt3070/2870_main_dev.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/2870_main_dev.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/2870_main_dev.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/2870_main_dev.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1627 @@
+/*
+ *************************************************************************
+
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/Kconfig linux-2.6.27.19-5.1/drivers/staging/rt3070/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/Kconfig 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/Kconfig Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,6 @@
+config RT3070
+ tristate "Ralink 3070 wireless support"
+ ---help---
+ This is an experimental driver for the Ralink 3070 wireless chip.
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/Makefile linux-2.6.27.19-5.1/drivers/staging/rt3070/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/Makefile 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/Makefile Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,47 @@
+obj-$(CONFIG_RT3070) += rt3070sta.o
+
+ common/rtusb_data.o \
+ common/cmm_data_2870.o
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/action.h linux-2.6.27.19-5.1/drivers/staging/rt3070/action.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/action.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/action.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/action.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,68 @@
+/*
+ *************************************************************************
+#endif /* __ACTION_H__ */
+
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/aironet.h linux-2.6.27.19-5.1/drivers/staging/rt3070/aironet.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/aironet.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/aironet.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/aironet.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,210 @@
+/*
+ *************************************************************************
+} CCX_CONTROL, *PCCX_CONTROL;
+
+#endif // __AIRONET_H__
-diff -purN linux-2.6.27/drivers/staging/rt3070/ap.h linux-2.6.27.19-5.1/drivers/staging/rt3070/ap.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/ap.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/ap.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/ap.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,557 @@
+/*
+ *************************************************************************
+
+#endif // __AP_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/chlist.h linux-2.6.27.19-5.1/drivers/staging/rt3070/chlist.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/chlist.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/chlist.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/chlist.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1253 @@
+/*
+ *************************************************************************
+}
+#endif // __CHLIST_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/2870_rtmp_init.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/2870_rtmp_init.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/2870_rtmp_init.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/2870_rtmp_init.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/2870_rtmp_init.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1762 @@
+/*
+ *************************************************************************
+}
+
+/* End of 2870_rtmp_init.c */
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/action.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/action.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/action.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/action.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/action.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1038 @@
+/*
+ *************************************************************************
+
+ return;
+}
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/ba_action.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/ba_action.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/ba_action.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/ba_action.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/ba_action.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1810 @@
+/*
+ *************************************************************************
+
+#endif // DOT11_N_SUPPORT //
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_data.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_data.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_data.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/cmm_data.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/cmm_data.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,2827 @@
+/*
+ *************************************************************************
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_data_2870.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_data_2870.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_data_2870.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/cmm_data_2870.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/cmm_data_2870.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,980 @@
+/*
+ *************************************************************************
+#endif // CONFIG_STA_SUPPORT //
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_info.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_info.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_info.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/cmm_info.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/cmm_info.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,3395 @@
+/*
+ *************************************************************************
+ return 0;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_sanity.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_sanity.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_sanity.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/cmm_sanity.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/cmm_sanity.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1669 @@
+/*
+ *************************************************************************
+}
+#endif // QOS_DLS_SUPPORT //
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_sync.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_sync.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_sync.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/cmm_sync.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/cmm_sync.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,711 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_wpa.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_wpa.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_wpa.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/cmm_wpa.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/cmm_wpa.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1606 @@
+/*
+ *************************************************************************
+
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/dfs.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/dfs.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/dfs.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/dfs.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/dfs.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,441 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/eeprom.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/eeprom.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/eeprom.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/eeprom.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/eeprom.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1498 @@
+/*
+ *************************************************************************
+#endif // RT30xx //
+//2008/09/11:KH add to support efuse-->
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/md5.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/md5.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/md5.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/md5.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/md5.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1427 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/mlme.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/mlme.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/mlme.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/mlme.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/mlme.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,9136 @@
+/*
+ *************************************************************************
+
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/netif_block.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/netif_block.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/netif_block.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/netif_block.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/netif_block.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,136 @@
+/*
+ *************************************************************************
+ return;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtmp_init.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtmp_init.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtmp_init.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/rtmp_init.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/rtmp_init.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,4197 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtmp_tkip.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtmp_tkip.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtmp_tkip.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/rtmp_tkip.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/rtmp_tkip.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1613 @@
+/*
+ *************************************************************************
+ xor_32(temp, tempb, out);
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtmp_wep.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtmp_wep.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtmp_wep.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/rtmp_wep.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/rtmp_wep.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,508 @@
+/*
+ *************************************************************************
+ ARCFOUR_ENCRYPT(&pAd->PrivateInfo.WEPCONTEXT, pDest, (PUCHAR) &pAd->PrivateInfo.FCSCRC32, 4);
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtusb_bulk.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtusb_bulk.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtusb_bulk.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/rtusb_bulk.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/rtusb_bulk.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1382 @@
+/*
+ *************************************************************************
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtusb_data.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtusb_data.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtusb_data.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/rtusb_data.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/rtusb_data.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,218 @@
+/*
+ *************************************************************************
+ pTxInfo->rsv2 = 0;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtusb_io.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtusb_io.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtusb_io.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/rtusb_io.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/rtusb_io.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1908 @@
+/*
+ *************************************************************************
+ } /* end of while */
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/spectrum.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/spectrum.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/spectrum.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/spectrum.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/spectrum.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1876 @@
+/*
+ *************************************************************************
+ return TRUE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/dfs.h linux-2.6.27.19-5.1/drivers/staging/rt3070/dfs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/dfs.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/dfs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/dfs.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,100 @@
+/*
+ *************************************************************************
+ IN PUCHAR arg);
+
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/firmware.h linux-2.6.27.19-5.1/drivers/staging/rt3070/firmware.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/firmware.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/firmware.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/firmware.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,558 @@
+/*
+ Copyright (c) 2007, Ralink Technology Corporation
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9b, 0xc0, } ;
-diff -purN linux-2.6.27/drivers/staging/rt3070/leap.h linux-2.6.27.19-5.1/drivers/staging/rt3070/leap.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/leap.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/leap.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/leap.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,215 @@
+/*
+ *************************************************************************
+ IN ULONG MsgLen);
+
+#endif // __LEAP_H__
-diff -purN linux-2.6.27/drivers/staging/rt3070/link_list.h linux-2.6.27.19-5.1/drivers/staging/rt3070/link_list.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/link_list.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/link_list.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/link_list.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,134 @@
+/*
+ *************************************************************************
+
+#endif // ___LINK_LIST_H__ //
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/md4.h linux-2.6.27.19-5.1/drivers/staging/rt3070/md4.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/md4.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/md4.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/md4.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,42 @@
+/*
+ *************************************************************************
+
+#endif //__MD4_H__
\ No newline at end of file
-diff -purN linux-2.6.27/drivers/staging/rt3070/md5.h linux-2.6.27.19-5.1/drivers/staging/rt3070/md5.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/md5.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/md5.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/md5.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,107 @@
+/*
+ *************************************************************************
+
+#endif /* aes.h */
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/mlme.h linux-2.6.27.19-5.1/drivers/staging/rt3070/mlme.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/mlme.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/mlme.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/mlme.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1468 @@
+/*
+ *************************************************************************
+
+
+#endif // MLME_H__
-diff -purN linux-2.6.27/drivers/staging/rt3070/netif_block.h linux-2.6.27.19-5.1/drivers/staging/rt3070/netif_block.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/netif_block.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/netif_block.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/netif_block.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,58 @@
+/*
+ *************************************************************************
+ IN PNDIS_PACKET pPacket);
+#endif // __NET_IF_BLOCK_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/oid.h linux-2.6.27.19-5.1/drivers/staging/rt3070/oid.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/oid.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/oid.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/oid.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1142 @@
+/*
+ *************************************************************************
+
+#endif // _OID_H_
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt2870.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rt2870.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt2870.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt2870.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt2870.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,756 @@
+/*
+ *************************************************************************
+ RT28xxUsbMlmeRadioOFF(pAd);
+
+#endif //__RT2870_H__
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt28xx.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rt28xx.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt28xx.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt28xx.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt28xx.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,2725 @@
+/*
+ *************************************************************************
+#endif
+
+#endif // __RT28XX_H__
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt_ate.c linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_ate.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_ate.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt_ate.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt_ate.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,6506 @@
+/*
+ *************************************************************************
+#endif // RALINK_28xx_QA //
+#endif // RALINK_ATE //
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt_ate.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_ate.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_ate.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt_ate.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt_ate.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,294 @@
+/*
+ *************************************************************************
+ IN PRTMP_ADAPTER pAd);
+#endif // CONFIG_STA_SUPPORT //
+#endif // __ATE_H__ //
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt_config.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_config.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_config.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt_config.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt_config.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,121 @@
+/*
+ *************************************************************************
+
+#endif // __RT_CONFIG_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt_linux.c linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_linux.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_linux.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt_linux.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt_linux.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1063 @@
+/*
+ *************************************************************************
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt_linux.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_linux.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_linux.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt_linux.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt_linux.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,887 @@
+/*
+ *************************************************************************
+
+
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt_main_dev.c linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_main_dev.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_main_dev.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt_main_dev.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt_main_dev.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1800 @@
+/*
+ *************************************************************************
+ return NULL;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt_profile.c linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_profile.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_profile.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt_profile.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt_profile.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,2041 @@
+/*
+ *************************************************************************
+}
+#endif // DOT11_N_SUPPORT //
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/rtmp.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rtmp.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rtmp.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,7728 @@
+/*
+ *************************************************************************
+
+#endif // __RTMP_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/rtmp_ckipmic.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp_ckipmic.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp_ckipmic.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rtmp_ckipmic.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rtmp_ckipmic.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,113 @@
+/*
+ *************************************************************************
+ IN PUCHAR mic_snap);
+
+#endif //__RTMP_CKIPMIC_H__
-diff -purN linux-2.6.27/drivers/staging/rt3070/rtmp_def.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp_def.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp_def.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rtmp_def.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rtmp_def.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1559 @@
+/*
+ *************************************************************************
+#endif // __RTMP_DEF_H__
+
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/rtmp_type.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp_type.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp_type.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rtmp_type.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rtmp_type.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,95 @@
+/*
+ *************************************************************************
+
+#endif // __RTMP_TYPE_H__
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/spectrum.h linux-2.6.27.19-5.1/drivers/staging/rt3070/spectrum.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/spectrum.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/spectrum.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/spectrum.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,322 @@
+/*
+ *************************************************************************
+ IN UINT8 Channel);
+#endif // __SPECTRUM_H__ //
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/spectrum_def.h linux-2.6.27.19-5.1/drivers/staging/rt3070/spectrum_def.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/spectrum_def.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/spectrum_def.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/spectrum_def.h Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,95 @@
+/*
+ *************************************************************************
+
+#endif // __SPECTRUM_DEF_H__ //
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/aironet.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/aironet.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/aironet.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/aironet.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/aironet.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1312 @@
+/*
+ *************************************************************************
+ pAd->StaCfg.FrameReportLen += Length;
+ }
+}
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/assoc.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/assoc.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/assoc.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/assoc.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/assoc.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,2060 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/auth.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/auth.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/auth.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/auth.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/auth.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,475 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/auth_rsp.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/auth_rsp.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/auth_rsp.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/auth_rsp.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/auth_rsp.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,167 @@
+/*
+ *************************************************************************
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/connect.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/connect.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/connect.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/connect.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/connect.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,2857 @@
+/*
+ *************************************************************************
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/dls.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/dls.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/dls.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/dls.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/dls.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,2170 @@
+/*
+ *************************************************************************
+ return TRUE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/rtmp_data.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/rtmp_data.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/rtmp_data.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/rtmp_data.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/rtmp_data.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,2637 @@
+/*
+ *************************************************************************
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/sanity.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/sanity.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/sanity.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/sanity.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/sanity.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,420 @@
+/*
+ *************************************************************************
+ return TRUE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/sync.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/sync.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/sync.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/sync.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/sync.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,1755 @@
+/*
+ *************************************************************************
+ return (pAd->Mlme.SyncMachine.CurrState == SCAN_LISTEN) ? TRUE : FALSE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/wpa.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/wpa.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/wpa.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/wpa.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/wpa.c Wed May 06 16:56:40 2009 +0100
@@ -0,0 +1,2099 @@
+/*
+ *************************************************************************
+ pAd->StaCfg.bBlockAssoc = TRUE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta_ioctl.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta_ioctl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta_ioctl.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta_ioctl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta_ioctl.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,7203 @@
+/*
+ *************************************************************************
+}
+#endif // CARRIER_DETECTION_SUPPORT //
+
-diff -purN linux-2.6.27/drivers/staging/rt3070/wpa.h linux-2.6.27.19-5.1/drivers/staging/rt3070/wpa.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/wpa.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/wpa.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/wpa.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,356 @@
+/*
+ *************************************************************************
+} RSN_CAPABILITY, *PRSN_CAPABILITY;
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/Kconfig linux-2.6.27.19-5.1/drivers/staging/rtl8187se/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/Kconfig 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/Kconfig Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,5 @@
+config RTL8187SE
+ tristate "RealTek RTL8187SE Wireless LAN NIC driver"
+ depends on PCI
+ default N
+ ---help---
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/Makefile linux-2.6.27.19-5.1/drivers/staging/rtl8187se/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/Makefile 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/Makefile Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,55 @@
+
+#EXTRA_CFLAGS += -DCONFIG_IEEE80211_NOWEP=y
+
+obj-$(CONFIG_RTL8187SE) += rtl8187se.o
+
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/dot11d.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/dot11d.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/dot11d.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/dot11d.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/dot11d.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,101 @@
+#ifndef __INC_DOT11D_H\r
+#define __INC_DOT11D_H\r
+);\r
+\r
+#endif // #ifndef __INC_DOT11D_H\r
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/dot11d.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/dot11d.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/dot11d.c 2009-03-25 16:11:12.000000000 +0000
-@@ -0,0 +1,246 @@
-+#ifdef ENABLE_DOT11D\r
-+//-----------------------------------------------------------------------------\r
-+// File:\r
-+// Dot11d.c\r
-+//\r
-+// Description:\r
-+// Implement 802.11d. \r
-+//\r
-+//-----------------------------------------------------------------------------\r
-+\r
-+#include "dot11d.h"\r
-+\r
-+void\r
-+Dot11d_Init(struct ieee80211_device *ieee)\r
-+{\r
-+ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);\r
-+\r
-+ pDot11dInfo->bEnabled = 0;\r
-+\r
-+ pDot11dInfo->State = DOT11D_STATE_NONE;\r
-+ pDot11dInfo->CountryIeLen = 0;\r
-+ memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1); \r
-+ memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);\r
-+ RESET_CIE_WATCHDOG(ieee);\r
-+\r
-+ printk("Dot11d_Init()\n");\r
-+}\r
-+\r
-+//\r
-+// Description:\r
-+// Reset to the state as we are just entering a regulatory domain.\r
-+//\r
-+void\r
-+Dot11d_Reset(struct ieee80211_device *ieee)\r
-+{\r
-+ u32 i;\r
-+ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);\r
-+\r
-+ // Clear old channel map\r
-+ memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);\r
-+ memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);\r
-+ // Set new channel map\r
-+ for (i=1; i<=11; i++) {\r
-+ (pDot11dInfo->channel_map)[i] = 1;\r
-+ }\r
-+ for (i=12; i<=14; i++) {\r
-+ (pDot11dInfo->channel_map)[i] = 2;\r
-+ }\r
-+\r
-+ pDot11dInfo->State = DOT11D_STATE_NONE;\r
-+ pDot11dInfo->CountryIeLen = 0;\r
-+ RESET_CIE_WATCHDOG(ieee);\r
-+\r
-+ //printk("Dot11d_Reset()\n");\r
-+}\r
-+\r
-+//\r
-+// Description:\r
-+// Update country IE from Beacon or Probe Resopnse \r
-+// and configure PHY for operation in the regulatory domain.\r
-+//\r
-+// TODO: \r
-+// Configure Tx power.\r
-+//\r
-+// Assumption:\r
-+// 1. IS_DOT11D_ENABLE() is TRUE.\r
-+// 2. Input IE is an valid one.\r
-+//\r
-+void\r
-+Dot11d_UpdateCountryIe(\r
-+ struct ieee80211_device *dev,\r
-+ u8 * pTaddr,\r
-+ u16 CoutryIeLen,\r
-+ u8 * pCoutryIe \r
-+ )\r
-+{\r
-+ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
-+ u8 i, j, NumTriples, MaxChnlNum;\r
-+ PCHNL_TXPOWER_TRIPLE pTriple;\r
-+\r
-+ if((CoutryIeLen - 3)%3 != 0)\r
-+ {\r
-+ printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");\r
-+ Dot11d_Reset(dev);\r
-+ return;\r
-+ }\r
-+\r
-+ memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);\r
-+ memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);\r
-+ MaxChnlNum = 0;\r
-+ NumTriples = (CoutryIeLen - 3) / 3; // skip 3-byte country string.\r
-+ pTriple = (PCHNL_TXPOWER_TRIPLE)(pCoutryIe + 3);\r
-+ for(i = 0; i < NumTriples; i++)\r
-+ {\r
-+ if(MaxChnlNum >= pTriple->FirstChnl)\r
-+ { // It is not in a monotonically increasing order, so stop processing.\r
-+ printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");\r
-+ Dot11d_Reset(dev);\r
-+ return; \r
-+ }\r
-+ if(MAX_CHANNEL_NUMBER < (pTriple->FirstChnl + pTriple->NumChnls))\r
-+ { // It is not a valid set of channel id, so stop processing.\r
-+ printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n");\r
-+ Dot11d_Reset(dev);\r
-+ return; \r
-+ }\r
-+\r
-+ for(j = 0 ; j < pTriple->NumChnls; j++)\r
-+ {\r
-+ pDot11dInfo->channel_map[pTriple->FirstChnl + j] = 1;\r
-+ pDot11dInfo->MaxTxPwrDbmList[pTriple->FirstChnl + j] = pTriple->MaxTxPowerInDbm;\r
-+ MaxChnlNum = pTriple->FirstChnl + j;\r
-+ } \r
-+\r
-+ pTriple = (PCHNL_TXPOWER_TRIPLE)((u8*)pTriple + 3);\r
-+ }\r
-+#if 1\r
-+ //printk("Dot11d_UpdateCountryIe(): Channel List:\n");\r
-+ printk("Channel List:");\r
-+ for(i=1; i<= MAX_CHANNEL_NUMBER; i++)\r
-+ if(pDot11dInfo->channel_map[i] > 0)\r
-+ printk(" %d", i);\r
-+ printk("\n");\r
-+#endif\r
-+\r
-+ UPDATE_CIE_SRC(dev, pTaddr);\r
-+\r
-+ pDot11dInfo->CountryIeLen = CoutryIeLen;\r
-+ memcpy(pDot11dInfo->CountryIeBuf, pCoutryIe,CoutryIeLen);\r
-+ pDot11dInfo->State = DOT11D_STATE_LEARNED;\r
-+}\r
-+\r
-+void dump_chnl_map(u8 * channel_map)\r
-+{\r
-+ int i;\r
-+ printk("Channel List:");\r
-+ for(i=1; i<= MAX_CHANNEL_NUMBER; i++)\r
-+ if(channel_map[i] > 0)\r
-+ printk(" %d(%d)", i, channel_map[i]);\r
-+ printk("\n");\r
-+}\r
-+\r
-+u8\r
-+DOT11D_GetMaxTxPwrInDbm(\r
-+ struct ieee80211_device *dev,\r
-+ u8 Channel\r
-+ )\r
-+{\r
-+ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
-+ u8 MaxTxPwrInDbm = 255;\r
-+\r
-+ if(MAX_CHANNEL_NUMBER < Channel)\r
-+ { \r
-+ printk("DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n");\r
-+ return MaxTxPwrInDbm; \r
-+ }\r
-+ if(pDot11dInfo->channel_map[Channel])\r
-+ {\r
-+ MaxTxPwrInDbm = pDot11dInfo->MaxTxPwrDbmList[Channel]; \r
-+ }\r
-+\r
-+ return MaxTxPwrInDbm;\r
-+}\r
-+\r
-+\r
-+void\r
-+DOT11D_ScanComplete(\r
-+ struct ieee80211_device * dev\r
-+ )\r
-+{\r
-+ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
-+\r
-+ switch(pDot11dInfo->State)\r
-+ {\r
-+ case DOT11D_STATE_LEARNED:\r
-+ pDot11dInfo->State = DOT11D_STATE_DONE;\r
-+ break;\r
-+\r
-+ case DOT11D_STATE_DONE:\r
-+ if( GET_CIE_WATCHDOG(dev) == 0 )\r
-+ { // Reset country IE if previous one is gone. \r
-+ Dot11d_Reset(dev); \r
-+ }\r
-+ break;\r
-+ case DOT11D_STATE_NONE:\r
-+ break;\r
-+ }\r
-+}\r
-+\r
-+int IsLegalChannel(\r
-+ struct ieee80211_device * dev,\r
-+ u8 channel\r
-+)\r
-+{\r
-+ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
-+\r
-+ if(MAX_CHANNEL_NUMBER < channel)\r
-+ { \r
-+ printk("IsLegalChannel(): Invalid Channel\n");\r
-+ return 0; \r
-+ }\r
-+ if(pDot11dInfo->channel_map[channel] > 0)\r
-+ return 1;\r
-+ return 0;\r
-+}\r
-+\r
-+int ToLegalChannel(\r
-+ struct ieee80211_device * dev,\r
-+ u8 channel\r
-+)\r
-+{\r
-+ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
-+ u8 default_chn = 0;\r
-+ u32 i = 0;\r
-+\r
-+ for (i=1; i<= MAX_CHANNEL_NUMBER; i++)\r
-+ {\r
-+ if(pDot11dInfo->channel_map[i] > 0)\r
-+ {\r
-+ default_chn = i;\r
-+ break;\r
-+ }\r
-+ }\r
-+\r
-+ if(MAX_CHANNEL_NUMBER < channel)\r
-+ { \r
-+ printk("IsLegalChannel(): Invalid Channel\n");\r
-+ return default_chn; \r
-+ }\r
-+ \r
-+ if(pDot11dInfo->channel_map[channel] > 0)\r
-+ return channel;\r
-+ \r
-+ return default_chn;\r
-+}\r
-+\r
-+#if 0\r
-+EXPORT_SYMBOL(Dot11d_Init);\r
-+EXPORT_SYMBOL(Dot11d_Reset);\r
-+EXPORT_SYMBOL(Dot11d_UpdateCountryIe);\r
-+EXPORT_SYMBOL(DOT11D_GetMaxTxPwrInDbm);\r
-+EXPORT_SYMBOL(DOT11D_ScanComplete);\r
-+EXPORT_SYMBOL(IsLegalChannel);\r
-+EXPORT_SYMBOL(ToLegalChannel);\r
-+#endif\r
-+#endif\r
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/dot11d.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/dot11d.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/dot11d.h 2009-03-25 16:11:12.000000000 +0000
-@@ -0,0 +1,102 @@
-+#ifndef __INC_DOT11D_H\r
-+#define __INC_DOT11D_H\r
-+\r
-+#include "ieee80211.h"\r
-+\r
-+//#define ENABLE_DOT11D\r
-+\r
-+//#define DOT11D_MAX_CHNL_NUM 83\r
-+\r
-+typedef struct _CHNL_TXPOWER_TRIPLE {\r
-+ u8 FirstChnl;\r
-+ u8 NumChnls;\r
-+ u8 MaxTxPowerInDbm;\r
-+}CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE;\r
-+\r
-+typedef enum _DOT11D_STATE {\r
-+ DOT11D_STATE_NONE = 0,\r
-+ DOT11D_STATE_LEARNED,\r
-+ DOT11D_STATE_DONE,\r
-+}DOT11D_STATE;\r
-+\r
-+typedef struct _RT_DOT11D_INFO {\r
-+ //DECLARE_RT_OBJECT(RT_DOT11D_INFO);\r
-+\r
-+ bool bEnabled; // dot11MultiDomainCapabilityEnabled\r
-+\r
-+ u16 CountryIeLen; // > 0 if CountryIeBuf[] contains valid country information element.\r
-+ u8 CountryIeBuf[MAX_IE_LEN];\r
-+ u8 CountryIeSrcAddr[6]; // Source AP of the country IE.\r
-+ u8 CountryIeWatchdog; \r
-+\r
-+ u8 channel_map[MAX_CHANNEL_NUMBER+1]; //!!!Value 0: Invalid, 1: Valid (active scan), 2: Valid (passive scan)\r
-+ //u8 ChnlListLen; // #Bytes valid in ChnlList[].\r
-+ //u8 ChnlList[DOT11D_MAX_CHNL_NUM];\r
-+ u8 MaxTxPwrDbmList[MAX_CHANNEL_NUMBER+1];\r
-+\r
-+ DOT11D_STATE State;\r
-+}RT_DOT11D_INFO, *PRT_DOT11D_INFO;\r
-+#define eqMacAddr(a,b) ( ((a)[0]==(b)[0] && (a)[1]==(b)[1] && (a)[2]==(b)[2] && (a)[3]==(b)[3] && (a)[4]==(b)[4] && (a)[5]==(b)[5]) ? 1:0 )\r
-+#define cpMacAddr(des,src) ((des)[0]=(src)[0],(des)[1]=(src)[1],(des)[2]=(src)[2],(des)[3]=(src)[3],(des)[4]=(src)[4],(des)[5]=(src)[5])\r
-+#define GET_DOT11D_INFO(__pIeeeDev) ((PRT_DOT11D_INFO)((__pIeeeDev)->pDot11dInfo))\r
-+\r
-+#define IS_DOT11D_ENABLE(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->bEnabled\r
-+#define IS_COUNTRY_IE_VALID(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen > 0)\r
-+\r
-+#define IS_EQUAL_CIE_SRC(__pIeeeDev, __pTa) eqMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa) \r
-+#define UPDATE_CIE_SRC(__pIeeeDev, __pTa) cpMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa)\r
-+\r
-+#define IS_COUNTRY_IE_CHANGED(__pIeeeDev, __Ie) \\r
-+ (((__Ie).Length == 0 || (__Ie).Length != GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen) ? \\r
-+ FALSE : \\r
-+ (!memcmp(GET_DOT11D_INFO(__pIeeeDev)->CountryIeBuf, (__Ie).Octet, (__Ie).Length)))\r
-+\r
-+#define CIE_WATCHDOG_TH 1\r
-+#define GET_CIE_WATCHDOG(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog\r
-+#define RESET_CIE_WATCHDOG(__pIeeeDev) GET_CIE_WATCHDOG(__pIeeeDev) = 0 \r
-+#define UPDATE_CIE_WATCHDOG(__pIeeeDev) ++GET_CIE_WATCHDOG(__pIeeeDev)\r
-+\r
-+#define IS_DOT11D_STATE_DONE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->State == DOT11D_STATE_DONE)\r
-+\r
-+\r
-+void\r
-+Dot11d_Init(\r
-+ struct ieee80211_device *dev\r
-+ );\r
-+\r
-+void\r
-+Dot11d_Reset(\r
-+ struct ieee80211_device *dev\r
-+ );\r
-+\r
-+void\r
-+Dot11d_UpdateCountryIe(\r
-+ struct ieee80211_device *dev,\r
-+ u8 * pTaddr,\r
-+ u16 CoutryIeLen,\r
-+ u8 * pCoutryIe \r
-+ );\r
-+\r
-+u8\r
-+DOT11D_GetMaxTxPwrInDbm(\r
-+ struct ieee80211_device *dev,\r
-+ u8 Channel\r
-+ );\r
-+\r
-+void\r
-+DOT11D_ScanComplete(\r
-+ struct ieee80211_device * dev\r
-+ );\r
-+\r
-+int IsLegalChannel(\r
-+ struct ieee80211_device * dev,\r
-+ u8 channel\r
-+);\r
-+\r
-+int ToLegalChannel(\r
-+ struct ieee80211_device * dev,\r
-+ u8 channel\r
-+);\r
-+\r
-+void dump_chnl_map(u8 * channel_map);\r
-+#endif // #ifndef __INC_DOT11D_H\r
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,1755 @@
+/*
+ * Merged with mainline ieee80211.h in Aug 2004. Original ieee802_11
+ return escaped;
+}
+#endif /* IEEE80211_H */
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/dot11d.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/dot11d.c Wed May 06 16:56:41 2009 +0100
+@@ -0,0 +1,246 @@
++#ifdef ENABLE_DOT11D\r
++//-----------------------------------------------------------------------------\r
++// File:\r
++// Dot11d.c\r
++//\r
++// Description:\r
++// Implement 802.11d. \r
++//\r
++//-----------------------------------------------------------------------------\r
++\r
++#include "dot11d.h"\r
++\r
++void\r
++Dot11d_Init(struct ieee80211_device *ieee)\r
++{\r
++ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);\r
++\r
++ pDot11dInfo->bEnabled = 0;\r
++\r
++ pDot11dInfo->State = DOT11D_STATE_NONE;\r
++ pDot11dInfo->CountryIeLen = 0;\r
++ memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1); \r
++ memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);\r
++ RESET_CIE_WATCHDOG(ieee);\r
++\r
++ printk("Dot11d_Init()\n");\r
++}\r
++\r
++//\r
++// Description:\r
++// Reset to the state as we are just entering a regulatory domain.\r
++//\r
++void\r
++Dot11d_Reset(struct ieee80211_device *ieee)\r
++{\r
++ u32 i;\r
++ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);\r
++\r
++ // Clear old channel map\r
++ memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);\r
++ memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);\r
++ // Set new channel map\r
++ for (i=1; i<=11; i++) {\r
++ (pDot11dInfo->channel_map)[i] = 1;\r
++ }\r
++ for (i=12; i<=14; i++) {\r
++ (pDot11dInfo->channel_map)[i] = 2;\r
++ }\r
++\r
++ pDot11dInfo->State = DOT11D_STATE_NONE;\r
++ pDot11dInfo->CountryIeLen = 0;\r
++ RESET_CIE_WATCHDOG(ieee);\r
++\r
++ //printk("Dot11d_Reset()\n");\r
++}\r
++\r
++//\r
++// Description:\r
++// Update country IE from Beacon or Probe Resopnse \r
++// and configure PHY for operation in the regulatory domain.\r
++//\r
++// TODO: \r
++// Configure Tx power.\r
++//\r
++// Assumption:\r
++// 1. IS_DOT11D_ENABLE() is TRUE.\r
++// 2. Input IE is an valid one.\r
++//\r
++void\r
++Dot11d_UpdateCountryIe(\r
++ struct ieee80211_device *dev,\r
++ u8 * pTaddr,\r
++ u16 CoutryIeLen,\r
++ u8 * pCoutryIe \r
++ )\r
++{\r
++ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
++ u8 i, j, NumTriples, MaxChnlNum;\r
++ PCHNL_TXPOWER_TRIPLE pTriple;\r
++\r
++ if((CoutryIeLen - 3)%3 != 0)\r
++ {\r
++ printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");\r
++ Dot11d_Reset(dev);\r
++ return;\r
++ }\r
++\r
++ memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);\r
++ memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);\r
++ MaxChnlNum = 0;\r
++ NumTriples = (CoutryIeLen - 3) / 3; // skip 3-byte country string.\r
++ pTriple = (PCHNL_TXPOWER_TRIPLE)(pCoutryIe + 3);\r
++ for(i = 0; i < NumTriples; i++)\r
++ {\r
++ if(MaxChnlNum >= pTriple->FirstChnl)\r
++ { // It is not in a monotonically increasing order, so stop processing.\r
++ printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");\r
++ Dot11d_Reset(dev);\r
++ return; \r
++ }\r
++ if(MAX_CHANNEL_NUMBER < (pTriple->FirstChnl + pTriple->NumChnls))\r
++ { // It is not a valid set of channel id, so stop processing.\r
++ printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n");\r
++ Dot11d_Reset(dev);\r
++ return; \r
++ }\r
++\r
++ for(j = 0 ; j < pTriple->NumChnls; j++)\r
++ {\r
++ pDot11dInfo->channel_map[pTriple->FirstChnl + j] = 1;\r
++ pDot11dInfo->MaxTxPwrDbmList[pTriple->FirstChnl + j] = pTriple->MaxTxPowerInDbm;\r
++ MaxChnlNum = pTriple->FirstChnl + j;\r
++ } \r
++\r
++ pTriple = (PCHNL_TXPOWER_TRIPLE)((u8*)pTriple + 3);\r
++ }\r
++#if 1\r
++ //printk("Dot11d_UpdateCountryIe(): Channel List:\n");\r
++ printk("Channel List:");\r
++ for(i=1; i<= MAX_CHANNEL_NUMBER; i++)\r
++ if(pDot11dInfo->channel_map[i] > 0)\r
++ printk(" %d", i);\r
++ printk("\n");\r
++#endif\r
++\r
++ UPDATE_CIE_SRC(dev, pTaddr);\r
++\r
++ pDot11dInfo->CountryIeLen = CoutryIeLen;\r
++ memcpy(pDot11dInfo->CountryIeBuf, pCoutryIe,CoutryIeLen);\r
++ pDot11dInfo->State = DOT11D_STATE_LEARNED;\r
++}\r
++\r
++void dump_chnl_map(u8 * channel_map)\r
++{\r
++ int i;\r
++ printk("Channel List:");\r
++ for(i=1; i<= MAX_CHANNEL_NUMBER; i++)\r
++ if(channel_map[i] > 0)\r
++ printk(" %d(%d)", i, channel_map[i]);\r
++ printk("\n");\r
++}\r
++\r
++u8\r
++DOT11D_GetMaxTxPwrInDbm(\r
++ struct ieee80211_device *dev,\r
++ u8 Channel\r
++ )\r
++{\r
++ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
++ u8 MaxTxPwrInDbm = 255;\r
++\r
++ if(MAX_CHANNEL_NUMBER < Channel)\r
++ { \r
++ printk("DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n");\r
++ return MaxTxPwrInDbm; \r
++ }\r
++ if(pDot11dInfo->channel_map[Channel])\r
++ {\r
++ MaxTxPwrInDbm = pDot11dInfo->MaxTxPwrDbmList[Channel]; \r
++ }\r
++\r
++ return MaxTxPwrInDbm;\r
++}\r
++\r
++\r
++void\r
++DOT11D_ScanComplete(\r
++ struct ieee80211_device * dev\r
++ )\r
++{\r
++ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
++\r
++ switch(pDot11dInfo->State)\r
++ {\r
++ case DOT11D_STATE_LEARNED:\r
++ pDot11dInfo->State = DOT11D_STATE_DONE;\r
++ break;\r
++\r
++ case DOT11D_STATE_DONE:\r
++ if( GET_CIE_WATCHDOG(dev) == 0 )\r
++ { // Reset country IE if previous one is gone. \r
++ Dot11d_Reset(dev); \r
++ }\r
++ break;\r
++ case DOT11D_STATE_NONE:\r
++ break;\r
++ }\r
++}\r
++\r
++int IsLegalChannel(\r
++ struct ieee80211_device * dev,\r
++ u8 channel\r
++)\r
++{\r
++ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
++\r
++ if(MAX_CHANNEL_NUMBER < channel)\r
++ { \r
++ printk("IsLegalChannel(): Invalid Channel\n");\r
++ return 0; \r
++ }\r
++ if(pDot11dInfo->channel_map[channel] > 0)\r
++ return 1;\r
++ return 0;\r
++}\r
++\r
++int ToLegalChannel(\r
++ struct ieee80211_device * dev,\r
++ u8 channel\r
++)\r
++{\r
++ PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
++ u8 default_chn = 0;\r
++ u32 i = 0;\r
++\r
++ for (i=1; i<= MAX_CHANNEL_NUMBER; i++)\r
++ {\r
++ if(pDot11dInfo->channel_map[i] > 0)\r
++ {\r
++ default_chn = i;\r
++ break;\r
++ }\r
++ }\r
++\r
++ if(MAX_CHANNEL_NUMBER < channel)\r
++ { \r
++ printk("IsLegalChannel(): Invalid Channel\n");\r
++ return default_chn; \r
++ }\r
++ \r
++ if(pDot11dInfo->channel_map[channel] > 0)\r
++ return channel;\r
++ \r
++ return default_chn;\r
++}\r
++\r
++#if 0\r
++EXPORT_SYMBOL(Dot11d_Init);\r
++EXPORT_SYMBOL(Dot11d_Reset);\r
++EXPORT_SYMBOL(Dot11d_UpdateCountryIe);\r
++EXPORT_SYMBOL(DOT11D_GetMaxTxPwrInDbm);\r
++EXPORT_SYMBOL(DOT11D_ScanComplete);\r
++EXPORT_SYMBOL(IsLegalChannel);\r
++EXPORT_SYMBOL(ToLegalChannel);\r
++#endif\r
++#endif\r
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/dot11d.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/dot11d.h Wed May 06 16:56:41 2009 +0100
+@@ -0,0 +1,102 @@
++#ifndef __INC_DOT11D_H\r
++#define __INC_DOT11D_H\r
++\r
++#include "ieee80211.h"\r
++\r
++//#define ENABLE_DOT11D\r
++\r
++//#define DOT11D_MAX_CHNL_NUM 83\r
++\r
++typedef struct _CHNL_TXPOWER_TRIPLE {\r
++ u8 FirstChnl;\r
++ u8 NumChnls;\r
++ u8 MaxTxPowerInDbm;\r
++}CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE;\r
++\r
++typedef enum _DOT11D_STATE {\r
++ DOT11D_STATE_NONE = 0,\r
++ DOT11D_STATE_LEARNED,\r
++ DOT11D_STATE_DONE,\r
++}DOT11D_STATE;\r
++\r
++typedef struct _RT_DOT11D_INFO {\r
++ //DECLARE_RT_OBJECT(RT_DOT11D_INFO);\r
++\r
++ bool bEnabled; // dot11MultiDomainCapabilityEnabled\r
++\r
++ u16 CountryIeLen; // > 0 if CountryIeBuf[] contains valid country information element.\r
++ u8 CountryIeBuf[MAX_IE_LEN];\r
++ u8 CountryIeSrcAddr[6]; // Source AP of the country IE.\r
++ u8 CountryIeWatchdog; \r
++\r
++ u8 channel_map[MAX_CHANNEL_NUMBER+1]; //!!!Value 0: Invalid, 1: Valid (active scan), 2: Valid (passive scan)\r
++ //u8 ChnlListLen; // #Bytes valid in ChnlList[].\r
++ //u8 ChnlList[DOT11D_MAX_CHNL_NUM];\r
++ u8 MaxTxPwrDbmList[MAX_CHANNEL_NUMBER+1];\r
++\r
++ DOT11D_STATE State;\r
++}RT_DOT11D_INFO, *PRT_DOT11D_INFO;\r
++#define eqMacAddr(a,b) ( ((a)[0]==(b)[0] && (a)[1]==(b)[1] && (a)[2]==(b)[2] && (a)[3]==(b)[3] && (a)[4]==(b)[4] && (a)[5]==(b)[5]) ? 1:0 )\r
++#define cpMacAddr(des,src) ((des)[0]=(src)[0],(des)[1]=(src)[1],(des)[2]=(src)[2],(des)[3]=(src)[3],(des)[4]=(src)[4],(des)[5]=(src)[5])\r
++#define GET_DOT11D_INFO(__pIeeeDev) ((PRT_DOT11D_INFO)((__pIeeeDev)->pDot11dInfo))\r
++\r
++#define IS_DOT11D_ENABLE(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->bEnabled\r
++#define IS_COUNTRY_IE_VALID(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen > 0)\r
++\r
++#define IS_EQUAL_CIE_SRC(__pIeeeDev, __pTa) eqMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa) \r
++#define UPDATE_CIE_SRC(__pIeeeDev, __pTa) cpMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa)\r
++\r
++#define IS_COUNTRY_IE_CHANGED(__pIeeeDev, __Ie) \\r
++ (((__Ie).Length == 0 || (__Ie).Length != GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen) ? \\r
++ FALSE : \\r
++ (!memcmp(GET_DOT11D_INFO(__pIeeeDev)->CountryIeBuf, (__Ie).Octet, (__Ie).Length)))\r
++\r
++#define CIE_WATCHDOG_TH 1\r
++#define GET_CIE_WATCHDOG(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog\r
++#define RESET_CIE_WATCHDOG(__pIeeeDev) GET_CIE_WATCHDOG(__pIeeeDev) = 0 \r
++#define UPDATE_CIE_WATCHDOG(__pIeeeDev) ++GET_CIE_WATCHDOG(__pIeeeDev)\r
++\r
++#define IS_DOT11D_STATE_DONE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->State == DOT11D_STATE_DONE)\r
++\r
++\r
++void\r
++Dot11d_Init(\r
++ struct ieee80211_device *dev\r
++ );\r
++\r
++void\r
++Dot11d_Reset(\r
++ struct ieee80211_device *dev\r
++ );\r
++\r
++void\r
++Dot11d_UpdateCountryIe(\r
++ struct ieee80211_device *dev,\r
++ u8 * pTaddr,\r
++ u16 CoutryIeLen,\r
++ u8 * pCoutryIe \r
++ );\r
++\r
++u8\r
++DOT11D_GetMaxTxPwrInDbm(\r
++ struct ieee80211_device *dev,\r
++ u8 Channel\r
++ );\r
++\r
++void\r
++DOT11D_ScanComplete(\r
++ struct ieee80211_device * dev\r
++ );\r
++\r
++int IsLegalChannel(\r
++ struct ieee80211_device * dev,\r
++ u8 channel\r
++);\r
++\r
++int ToLegalChannel(\r
++ struct ieee80211_device * dev,\r
++ u8 channel\r
++);\r
++\r
++void dump_chnl_map(u8 * channel_map);\r
++#endif // #ifndef __INC_DOT11D_H\r
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h Wed May 06 16:56:41 2009 +0100
+@@ -0,0 +1,1755 @@
++/*
++ * Merged with mainline ieee80211.h in Aug 2004. Original ieee802_11
++ * remains copyright by the original authors
++ *
++ * Portions of the merged code are based on Host AP (software wireless
++ * LAN access point) driver for Intersil Prism2/2.5/3.
++ *
++ * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen
++ * <jkmaline@cc.hut.fi>
++ * Copyright (c) 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi>
++ *
++ * Adaption to a generic IEEE 802.11 stack by James Ketrenos
++ * <jketreno@linux.intel.com>
++ * Copyright (c) 2004, Intel Corporation
++ *
++ * Modified for Realtek's wi-fi cards by Andrea Merello
++ * <andreamrl@tiscali.it>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation. See README and COPYING for
++ * more details.
++ */
++#ifndef IEEE80211_H
++#define IEEE80211_H
++#include <linux/if_ether.h> /* ETH_ALEN */
++#include <linux/kernel.h> /* ARRAY_SIZE */
++#include <linux/version.h>
++#include <linux/jiffies.h>
++#include <linux/timer.h>
++#include <linux/sched.h>
++
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13))
++#include <linux/wireless.h>
++#endif
++
++/*
++#ifndef bool
++#define bool int
++#endif
++
++#ifndef true
++#define true 1
++#endif
++
++#ifndef false
++#define false 0
++#endif
++*/
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20))
++#ifndef bool
++typedef enum{false = 0, true} bool;
++#endif
++#endif
++//#ifdef JOHN_HWSEC
++#define KEY_TYPE_NA 0x0
++#define KEY_TYPE_WEP40 0x1
++#define KEY_TYPE_TKIP 0x2
++#define KEY_TYPE_CCMP 0x4
++#define KEY_TYPE_WEP104 0x5
++//#endif
++
++
++#define aSifsTime 10
++
++#define MGMT_QUEUE_NUM 5
++
++
++#define IEEE_CMD_SET_WPA_PARAM 1
++#define IEEE_CMD_SET_WPA_IE 2
++#define IEEE_CMD_SET_ENCRYPTION 3
++#define IEEE_CMD_MLME 4
++
++#define IEEE_PARAM_WPA_ENABLED 1
++#define IEEE_PARAM_TKIP_COUNTERMEASURES 2
++#define IEEE_PARAM_DROP_UNENCRYPTED 3
++#define IEEE_PARAM_PRIVACY_INVOKED 4
++#define IEEE_PARAM_AUTH_ALGS 5
++#define IEEE_PARAM_IEEE_802_1X 6
++//It should consistent with the driver_XXX.c
++// David, 2006.9.26
++#define IEEE_PARAM_WPAX_SELECT 7
++//Added for notify the encryption type selection
++// David, 2006.9.26
++#define IEEE_PROTO_WPA 1
++#define IEEE_PROTO_RSN 2
++//Added for notify the encryption type selection
++// David, 2006.9.26
++#define IEEE_WPAX_USEGROUP 0
++#define IEEE_WPAX_WEP40 1
++#define IEEE_WPAX_TKIP 2
++#define IEEE_WPAX_WRAP 3
++#define IEEE_WPAX_CCMP 4
++#define IEEE_WPAX_WEP104 5
++
++#define IEEE_KEY_MGMT_IEEE8021X 1
++#define IEEE_KEY_MGMT_PSK 2
++
++
++
++#define IEEE_MLME_STA_DEAUTH 1
++#define IEEE_MLME_STA_DISASSOC 2
++
++
++#define IEEE_CRYPT_ERR_UNKNOWN_ALG 2
++#define IEEE_CRYPT_ERR_UNKNOWN_ADDR 3
++#define IEEE_CRYPT_ERR_CRYPT_INIT_FAILED 4
++#define IEEE_CRYPT_ERR_KEY_SET_FAILED 5
++#define IEEE_CRYPT_ERR_TX_KEY_SET_FAILED 6
++#define IEEE_CRYPT_ERR_CARD_CONF_FAILED 7
++
++
++#define IEEE_CRYPT_ALG_NAME_LEN 16
++
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,10))
++#define ieee80211_wx_get_scan ieee80211_wx_get_scan_rtl
++#define ieee80211_wx_set_encode ieee80211_wx_set_encode_rtl
++#define ieee80211_wx_get_encode ieee80211_wx_get_encode_rtl
++////////////////////////////////
++// added for kernel conflict under FC5
++#define ieee80211_wx_get_name ieee80211_wx_get_name_rtl
++#define free_ieee80211 free_ieee80211_rtl
++#define alloc_ieee80211 alloc_ieee80211_rtl
++///////////////////////////////
++#endif
++//error in ubuntu2.6.22,so add these
++#define ieee80211_wake_queue ieee80211_wake_queue_rtl
++#define ieee80211_stop_queue ieee80211_stop_queue_rtl
++
++#define ieee80211_rx ieee80211_rx_rtl
++
++#define ieee80211_register_crypto_ops ieee80211_register_crypto_ops_rtl
++#define ieee80211_unregister_crypto_ops ieee80211_unregister_crypto_ops_rtl
++#define ieee80211_get_crypto_ops ieee80211_get_crypto_ops_rtl
++#define ieee80211_crypt_deinit_entries ieee80211_crypt_deinit_entries_rtl
++#define ieee80211_crypt_deinit_handler ieee80211_crypt_deinit_handler_rtl
++#define ieee80211_crypt_delayed_deinit ieee80211_crypt_delayed_deinit_rtl
++
++#define ieee80211_txb_free ieee80211_txb_free_rtl
++#define ieee80211_wx_get_essid ieee80211_wx_get_essid_rtl
++#define ieee80211_wx_set_essid ieee80211_wx_set_essid_rtl
++#define ieee80211_wx_set_rate ieee80211_wx_set_rate_rtl
++#define ieee80211_wx_get_rate ieee80211_wx_get_rate_rtl
++#define ieee80211_wx_set_wap ieee80211_wx_set_wap_rtl
++#define ieee80211_wx_get_wap ieee80211_wx_get_wap_rtl
++#define ieee80211_wx_set_mode ieee80211_wx_set_mode_rtl
++#define ieee80211_wx_get_mode ieee80211_wx_get_mode_rtl
++#define ieee80211_wx_set_scan ieee80211_wx_set_scan_rtl
++#define ieee80211_wx_get_freq ieee80211_wx_get_freq_rtl
++#define ieee80211_wx_set_freq ieee80211_wx_set_freq_rtl
++#define ieee80211_wx_set_rawtx ieee80211_wx_set_rawtx_rtl
++#define ieee80211_wx_set_power ieee80211_wx_set_power_rtl
++#define ieee80211_wx_get_power ieee80211_wx_get_power_rtl
++#define ieee80211_wlan_frequencies ieee80211_wlan_frequencies_rtl
++#define ieee80211_softmac_stop_protocol ieee80211_softmac_stop_protocol_rtl
++#define ieee80211_softmac_start_protocol ieee80211_softmac_start_protocol_rtl
++#define ieee80211_start_protocol ieee80211_start_protocol_rtl
++#define ieee80211_stop_protocol ieee80211_stop_protocol_rtl
++#define ieee80211_rx_mgt ieee80211_rx_mgt_rtl
++
++#define ieee80211_wx_set_auth ieee80211_wx_set_auth_rtl
++//by amy for ps
++#define notify_wx_assoc_event notify_wx_assoc_event_rtl
++#define ieee80211_stop_send_beacons ieee80211_stop_send_beacons_rtl
++#define ieee80211_disassociate ieee80211_disassociate_rtl
++#define ieee80211_start_scan ieee80211_start_scan_rtl
++//by amy for ps
++typedef struct ieee_param {
++ u32 cmd;
++ u8 sta_addr[ETH_ALEN];
++ union {
++ struct {
++ u8 name;
++ u32 value;
++ } wpa_param;
++ struct {
++ u32 len;
++ u8 reserved[32];
++ u8 data[0];
++ } wpa_ie;
++ struct{
++ int command;
++ int reason_code;
++ } mlme;
++ struct {
++ u8 alg[IEEE_CRYPT_ALG_NAME_LEN];
++ u8 set_tx;
++ u32 err;
++ u8 idx;
++ u8 seq[8]; /* sequence counter (set: RX, get: TX) */
++ u16 key_len;
++ u8 key[0];
++ } crypt;
++
++ } u;
++}ieee_param;
++
++
++#if WIRELESS_EXT < 17
++#define IW_QUAL_QUAL_INVALID 0x10
++#define IW_QUAL_LEVEL_INVALID 0x20
++#define IW_QUAL_NOISE_INVALID 0x40
++#define IW_QUAL_QUAL_UPDATED 0x1
++#define IW_QUAL_LEVEL_UPDATED 0x2
++#define IW_QUAL_NOISE_UPDATED 0x4
++#endif
++
++// linux under 2.6.9 release may not support it, so modify it for common use
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
++#define MSECS(t) (1000 * ((t) / HZ) + 1000 * ((t) % HZ) / HZ)
++static inline unsigned long msleep_interruptible_rtl(unsigned int msecs)
++{
++ unsigned long timeout = MSECS(msecs) + 1;
++
++ while (timeout) {
++ set_current_state(TASK_UNINTERRUPTIBLE);
++ timeout = schedule_timeout(timeout);
++ }
++ return timeout;
++}
++#else
++#define MSECS(t) msecs_to_jiffies(t)
++#define msleep_interruptible_rtl msleep_interruptible
++#endif
++
++#define IEEE80211_DATA_LEN 2304
++/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
++ 6.2.1.1.2.
++
++ The figure in section 7.1.2 suggests a body size of up to 2312
++ bytes is allowed, which is a bit confusing, I suspect this
++ represents the 2304 bytes of real data, plus a possible 8 bytes of
++ WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */
++
++
++#define IEEE80211_HLEN 30
++#define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN)
++
++/* this is stolen and modified from the madwifi driver*/
++#define IEEE80211_FC0_TYPE_MASK 0x0c
++#define IEEE80211_FC0_TYPE_DATA 0x08
++#define IEEE80211_FC0_SUBTYPE_MASK 0xB0
++#define IEEE80211_FC0_SUBTYPE_QOS 0x80
++
++#define IEEE80211_QOS_HAS_SEQ(fc) \
++ (((fc) & (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == \
++ (IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_QOS))
++
++/* this is stolen from ipw2200 driver */
++#define IEEE_IBSS_MAC_HASH_SIZE 31
++struct ieee_ibss_seq {
++ u8 mac[ETH_ALEN];
++ u16 seq_num[17];
++ u16 frag_num[17];
++ unsigned long packet_time[17];
++ struct list_head list;
++};
++
++struct ieee80211_hdr {
++ u16 frame_ctl;
++ u16 duration_id;
++ u8 addr1[ETH_ALEN];
++ u8 addr2[ETH_ALEN];
++ u8 addr3[ETH_ALEN];
++ u16 seq_ctl;
++ u8 addr4[ETH_ALEN];
++} __attribute__ ((packed));
++
++struct ieee80211_hdr_QOS {
++ u16 frame_ctl;
++ u16 duration_id;
++ u8 addr1[ETH_ALEN];
++ u8 addr2[ETH_ALEN];
++ u8 addr3[ETH_ALEN];
++ u16 seq_ctl;
++ u8 addr4[ETH_ALEN];
++ u16 QOS_ctl;
++} __attribute__ ((packed));
++
++struct ieee80211_hdr_3addr {
++ u16 frame_ctl;
++ u16 duration_id;
++ u8 addr1[ETH_ALEN];
++ u8 addr2[ETH_ALEN];
++ u8 addr3[ETH_ALEN];
++ u16 seq_ctl;
++} __attribute__ ((packed));
++
++struct ieee80211_hdr_3addr_QOS {
++ u16 frame_ctl;
++ u16 duration_id;
++ u8 addr1[ETH_ALEN];
++ u8 addr2[ETH_ALEN];
++ u8 addr3[ETH_ALEN];
++ u16 seq_ctl;
++ u16 QOS_ctl;
++} __attribute__ ((packed));
++
++enum eap_type {
++ EAP_PACKET = 0,
++ EAPOL_START,
++ EAPOL_LOGOFF,
++ EAPOL_KEY,
++ EAPOL_ENCAP_ASF_ALERT
++};
++
++static const char *eap_types[] = {
++ [EAP_PACKET] = "EAP-Packet",
++ [EAPOL_START] = "EAPOL-Start",
++ [EAPOL_LOGOFF] = "EAPOL-Logoff",
++ [EAPOL_KEY] = "EAPOL-Key",
++ [EAPOL_ENCAP_ASF_ALERT] = "EAPOL-Encap-ASF-Alert"
++};
++
++static inline const char *eap_get_type(int type)
++{
++ return (type >= ARRAY_SIZE(eap_types)) ? "Unknown" : eap_types[type];
++}
++
++struct eapol {
++ u8 snap[6];
++ u16 ethertype;
++ u8 version;
++ u8 type;
++ u16 length;
++} __attribute__ ((packed));
++
++#define IEEE80211_3ADDR_LEN 24
++#define IEEE80211_4ADDR_LEN 30
++#define IEEE80211_FCS_LEN 4
++
++#define MIN_FRAG_THRESHOLD 256U
++#define MAX_FRAG_THRESHOLD 2346U
++
++/* Frame control field constants */
++#define IEEE80211_FCTL_VERS 0x0002
++#define IEEE80211_FCTL_FTYPE 0x000c
++#define IEEE80211_FCTL_STYPE 0x00f0
++#define IEEE80211_FCTL_TODS 0x0100
++#define IEEE80211_FCTL_FROMDS 0x0200
++#define IEEE80211_FCTL_DSTODS 0x0300 //added by david
++#define IEEE80211_FCTL_MOREFRAGS 0x0400
++#define IEEE80211_FCTL_RETRY 0x0800
++#define IEEE80211_FCTL_PM 0x1000
++#define IEEE80211_FCTL_MOREDATA 0x2000
++#define IEEE80211_FCTL_WEP 0x4000
++#define IEEE80211_FCTL_ORDER 0x8000
++
++#define IEEE80211_FTYPE_MGMT 0x0000
++#define IEEE80211_FTYPE_CTL 0x0004
++#define IEEE80211_FTYPE_DATA 0x0008
++
++/* management */
++#define IEEE80211_STYPE_ASSOC_REQ 0x0000
++#define IEEE80211_STYPE_ASSOC_RESP 0x0010
++#define IEEE80211_STYPE_REASSOC_REQ 0x0020
++#define IEEE80211_STYPE_REASSOC_RESP 0x0030
++#define IEEE80211_STYPE_PROBE_REQ 0x0040
++#define IEEE80211_STYPE_PROBE_RESP 0x0050
++#define IEEE80211_STYPE_BEACON 0x0080
++#define IEEE80211_STYPE_ATIM 0x0090
++#define IEEE80211_STYPE_DISASSOC 0x00A0
++#define IEEE80211_STYPE_AUTH 0x00B0
++#define IEEE80211_STYPE_DEAUTH 0x00C0
++#define IEEE80211_STYPE_MANAGE_ACT 0x00D0
++
++/* control */
++#define IEEE80211_STYPE_PSPOLL 0x00A0
++#define IEEE80211_STYPE_RTS 0x00B0
++#define IEEE80211_STYPE_CTS 0x00C0
++#define IEEE80211_STYPE_ACK 0x00D0
++#define IEEE80211_STYPE_CFEND 0x00E0
++#define IEEE80211_STYPE_CFENDACK 0x00F0
++
++/* data */
++#define IEEE80211_STYPE_DATA 0x0000
++#define IEEE80211_STYPE_DATA_CFACK 0x0010
++#define IEEE80211_STYPE_DATA_CFPOLL 0x0020
++#define IEEE80211_STYPE_DATA_CFACKPOLL 0x0030
++#define IEEE80211_STYPE_NULLFUNC 0x0040
++#define IEEE80211_STYPE_CFACK 0x0050
++#define IEEE80211_STYPE_CFPOLL 0x0060
++#define IEEE80211_STYPE_CFACKPOLL 0x0070
++#define IEEE80211_STYPE_QOS_DATA 0x0080 //added for WMM 2006/8/2
++#define IEEE80211_STYPE_QOS_NULL 0x00C0
++
++
++#define IEEE80211_SCTL_FRAG 0x000F
++#define IEEE80211_SCTL_SEQ 0xFFF0
++
++
++/* debug macros */
++
++#ifdef CONFIG_IEEE80211_DEBUG
++extern u32 ieee80211_debug_level;
++#define IEEE80211_DEBUG(level, fmt, args...) \
++do { if (ieee80211_debug_level & (level)) \
++ printk(KERN_DEBUG "ieee80211: %c %s " fmt, \
++ in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
++#else
++#define IEEE80211_DEBUG(level, fmt, args...) do {} while (0)
++#endif /* CONFIG_IEEE80211_DEBUG */
++
++/*
++ * To use the debug system;
++ *
++ * If you are defining a new debug classification, simply add it to the #define
++ * list here in the form of:
++ *
++ * #define IEEE80211_DL_xxxx VALUE
++ *
++ * shifting value to the left one bit from the previous entry. xxxx should be
++ * the name of the classification (for example, WEP)
++ *
++ * You then need to either add a IEEE80211_xxxx_DEBUG() macro definition for your
++ * classification, or use IEEE80211_DEBUG(IEEE80211_DL_xxxx, ...) whenever you want
++ * to send output to that classification.
++ *
++ * To add your debug level to the list of levels seen when you perform
++ *
++ * % cat /proc/net/ipw/debug_level
++ *
++ * you simply need to add your entry to the ipw_debug_levels array.
++ *
++ * If you do not see debug_level in /proc/net/ipw then you do not have
++ * CONFIG_IEEE80211_DEBUG defined in your kernel configuration
++ *
++ */
++
++#define IEEE80211_DL_INFO (1<<0)
++#define IEEE80211_DL_WX (1<<1)
++#define IEEE80211_DL_SCAN (1<<2)
++#define IEEE80211_DL_STATE (1<<3)
++#define IEEE80211_DL_MGMT (1<<4)
++#define IEEE80211_DL_FRAG (1<<5)
++#define IEEE80211_DL_EAP (1<<6)
++#define IEEE80211_DL_DROP (1<<7)
++
++#define IEEE80211_DL_TX (1<<8)
++#define IEEE80211_DL_RX (1<<9)
++
++#define IEEE80211_ERROR(f, a...) printk(KERN_ERR "ieee80211: " f, ## a)
++#define IEEE80211_WARNING(f, a...) printk(KERN_WARNING "ieee80211: " f, ## a)
++#define IEEE80211_DEBUG_INFO(f, a...) IEEE80211_DEBUG(IEEE80211_DL_INFO, f, ## a)
++
++#define IEEE80211_DEBUG_WX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_WX, f, ## a)
++#define IEEE80211_DEBUG_SCAN(f, a...) IEEE80211_DEBUG(IEEE80211_DL_SCAN, f, ## a)
++//#define IEEE_DEBUG_SCAN IEEE80211_WARNING
++#define IEEE80211_DEBUG_STATE(f, a...) IEEE80211_DEBUG(IEEE80211_DL_STATE, f, ## a)
++#define IEEE80211_DEBUG_MGMT(f, a...) IEEE80211_DEBUG(IEEE80211_DL_MGMT, f, ## a)
++#define IEEE80211_DEBUG_FRAG(f, a...) IEEE80211_DEBUG(IEEE80211_DL_FRAG, f, ## a)
++#define IEEE80211_DEBUG_EAP(f, a...) IEEE80211_DEBUG(IEEE80211_DL_EAP, f, ## a)
++#define IEEE80211_DEBUG_DROP(f, a...) IEEE80211_DEBUG(IEEE80211_DL_DROP, f, ## a)
++#define IEEE80211_DEBUG_TX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_TX, f, ## a)
++#define IEEE80211_DEBUG_RX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_RX, f, ## a)
++#include <linux/netdevice.h>
++#include <linux/wireless.h>
++#include <linux/if_arp.h> /* ARPHRD_ETHER */
++
++#ifndef WIRELESS_SPY
++#define WIRELESS_SPY // enable iwspy support
++#endif
++#include <net/iw_handler.h> // new driver API
++
++#ifndef ETH_P_PAE
++#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
++#endif /* ETH_P_PAE */
++
++#define ETH_P_PREAUTH 0x88C7 /* IEEE 802.11i pre-authentication */
++
++#ifndef ETH_P_80211_RAW
++#define ETH_P_80211_RAW (ETH_P_ECONET + 1)
++#endif
++
++/* IEEE 802.11 defines */
++
++#define P80211_OUI_LEN 3
++
++struct ieee80211_snap_hdr {
++
++ u8 dsap; /* always 0xAA */
++ u8 ssap; /* always 0xAA */
++ u8 ctrl; /* always 0x03 */
++ u8 oui[P80211_OUI_LEN]; /* organizational universal id */
++
++} __attribute__ ((packed));
++
++#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
++
++#define WLAN_FC_GET_TYPE(fc) ((fc) & IEEE80211_FCTL_FTYPE)
++#define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE)
++
++#define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG)
++#define WLAN_GET_SEQ_SEQ(seq) ((seq) & IEEE80211_SCTL_SEQ)
++
++/* Authentication algorithms */
++#define WLAN_AUTH_OPEN 0
++#define WLAN_AUTH_SHARED_KEY 1
++
++#define WLAN_AUTH_CHALLENGE_LEN 128
++
++#define WLAN_CAPABILITY_BSS (1<<0)
++#define WLAN_CAPABILITY_IBSS (1<<1)
++#define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
++#define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
++#define WLAN_CAPABILITY_PRIVACY (1<<4)
++#define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
++#define WLAN_CAPABILITY_PBCC (1<<6)
++#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
++#define WLAN_CAPABILITY_SHORT_SLOT (1<<10)
++
++/* Status codes */
++#define WLAN_STATUS_SUCCESS 0
++#define WLAN_STATUS_UNSPECIFIED_FAILURE 1
++#define WLAN_STATUS_CAPS_UNSUPPORTED 10
++#define WLAN_STATUS_REASSOC_NO_ASSOC 11
++#define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12
++#define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13
++#define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14
++#define WLAN_STATUS_CHALLENGE_FAIL 15
++#define WLAN_STATUS_AUTH_TIMEOUT 16
++#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17
++#define WLAN_STATUS_ASSOC_DENIED_RATES 18
++/* 802.11b */
++#define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19
++#define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20
++#define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21
++
++/* Reason codes */
++#define WLAN_REASON_UNSPECIFIED 1
++#define WLAN_REASON_PREV_AUTH_NOT_VALID 2
++#define WLAN_REASON_DEAUTH_LEAVING 3
++#define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4
++#define WLAN_REASON_DISASSOC_AP_BUSY 5
++#define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6
++#define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7
++#define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8
++#define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
++
++
++/* Information Element IDs */
++#define WLAN_EID_SSID 0
++#define WLAN_EID_SUPP_RATES 1
++#define WLAN_EID_FH_PARAMS 2
++#define WLAN_EID_DS_PARAMS 3
++#define WLAN_EID_CF_PARAMS 4
++#define WLAN_EID_TIM 5
++#define WLAN_EID_IBSS_PARAMS 6
++#define WLAN_EID_CHALLENGE 16
++#define WLAN_EID_RSN 48
++#define WLAN_EID_GENERIC 221
++
++#define IEEE80211_MGMT_HDR_LEN 24
++#define IEEE80211_DATA_HDR3_LEN 24
++#define IEEE80211_DATA_HDR4_LEN 30
++
++
++#define IEEE80211_STATMASK_SIGNAL (1<<0)
++#define IEEE80211_STATMASK_RSSI (1<<1)
++#define IEEE80211_STATMASK_NOISE (1<<2)
++#define IEEE80211_STATMASK_RATE (1<<3)
++#define IEEE80211_STATMASK_WEMASK 0x7
++
++
++#define IEEE80211_CCK_MODULATION (1<<0)
++#define IEEE80211_OFDM_MODULATION (1<<1)
++
++#define IEEE80211_24GHZ_BAND (1<<0)
++#define IEEE80211_52GHZ_BAND (1<<1)
++
++#define IEEE80211_CCK_RATE_LEN 4
++#define IEEE80211_CCK_RATE_1MB 0x02
++#define IEEE80211_CCK_RATE_2MB 0x04
++#define IEEE80211_CCK_RATE_5MB 0x0B
++#define IEEE80211_CCK_RATE_11MB 0x16
++#define IEEE80211_OFDM_RATE_LEN 8
++#define IEEE80211_OFDM_RATE_6MB 0x0C
++#define IEEE80211_OFDM_RATE_9MB 0x12
++#define IEEE80211_OFDM_RATE_12MB 0x18
++#define IEEE80211_OFDM_RATE_18MB 0x24
++#define IEEE80211_OFDM_RATE_24MB 0x30
++#define IEEE80211_OFDM_RATE_36MB 0x48
++#define IEEE80211_OFDM_RATE_48MB 0x60
++#define IEEE80211_OFDM_RATE_54MB 0x6C
++#define IEEE80211_BASIC_RATE_MASK 0x80
++
++#define IEEE80211_CCK_RATE_1MB_MASK (1<<0)
++#define IEEE80211_CCK_RATE_2MB_MASK (1<<1)
++#define IEEE80211_CCK_RATE_5MB_MASK (1<<2)
++#define IEEE80211_CCK_RATE_11MB_MASK (1<<3)
++#define IEEE80211_OFDM_RATE_6MB_MASK (1<<4)
++#define IEEE80211_OFDM_RATE_9MB_MASK (1<<5)
++#define IEEE80211_OFDM_RATE_12MB_MASK (1<<6)
++#define IEEE80211_OFDM_RATE_18MB_MASK (1<<7)
++#define IEEE80211_OFDM_RATE_24MB_MASK (1<<8)
++#define IEEE80211_OFDM_RATE_36MB_MASK (1<<9)
++#define IEEE80211_OFDM_RATE_48MB_MASK (1<<10)
++#define IEEE80211_OFDM_RATE_54MB_MASK (1<<11)
++
++#define IEEE80211_CCK_RATES_MASK 0x0000000F
++#define IEEE80211_CCK_BASIC_RATES_MASK (IEEE80211_CCK_RATE_1MB_MASK | \
++ IEEE80211_CCK_RATE_2MB_MASK)
++#define IEEE80211_CCK_DEFAULT_RATES_MASK (IEEE80211_CCK_BASIC_RATES_MASK | \
++ IEEE80211_CCK_RATE_5MB_MASK | \
++ IEEE80211_CCK_RATE_11MB_MASK)
++
++#define IEEE80211_OFDM_RATES_MASK 0x00000FF0
++#define IEEE80211_OFDM_BASIC_RATES_MASK (IEEE80211_OFDM_RATE_6MB_MASK | \
++ IEEE80211_OFDM_RATE_12MB_MASK | \
++ IEEE80211_OFDM_RATE_24MB_MASK)
++#define IEEE80211_OFDM_DEFAULT_RATES_MASK (IEEE80211_OFDM_BASIC_RATES_MASK | \
++ IEEE80211_OFDM_RATE_9MB_MASK | \
++ IEEE80211_OFDM_RATE_18MB_MASK | \
++ IEEE80211_OFDM_RATE_36MB_MASK | \
++ IEEE80211_OFDM_RATE_48MB_MASK | \
++ IEEE80211_OFDM_RATE_54MB_MASK)
++#define IEEE80211_DEFAULT_RATES_MASK (IEEE80211_OFDM_DEFAULT_RATES_MASK | \
++ IEEE80211_CCK_DEFAULT_RATES_MASK)
++
++#define IEEE80211_NUM_OFDM_RATES 8
++#define IEEE80211_NUM_CCK_RATES 4
++#define IEEE80211_OFDM_SHIFT_MASK_A 4
++
++
++
++
++/* NOTE: This data is for statistical purposes; not all hardware provides this
++ * information for frames received. Not setting these will not cause
++ * any adverse affects. */
++struct ieee80211_rx_stats {
++ u32 mac_time[2];
++ u8 signalstrength;
++ s8 rssi;
++ u8 signal;
++ u8 noise;
++ u16 rate; /* in 100 kbps */
++ u8 received_channel;
++ u8 control;
++ u8 mask;
++ u8 freq;
++ u16 len;
++ u8 nic_type;
++};
++
++/* IEEE 802.11 requires that STA supports concurrent reception of at least
++ * three fragmented frames. This define can be increased to support more
++ * concurrent frames, but it should be noted that each entry can consume about
++ * 2 kB of RAM and increasing cache size will slow down frame reassembly. */
++#define IEEE80211_FRAG_CACHE_LEN 4
++
++struct ieee80211_frag_entry {
++ unsigned long first_frag_time;
++ unsigned int seq;
++ unsigned int last_frag;
++ struct sk_buff *skb;
++ u8 src_addr[ETH_ALEN];
++ u8 dst_addr[ETH_ALEN];
++};
++
++struct ieee80211_stats {
++ unsigned int tx_unicast_frames;
++ unsigned int tx_multicast_frames;
++ unsigned int tx_fragments;
++ unsigned int tx_unicast_octets;
++ unsigned int tx_multicast_octets;
++ unsigned int tx_deferred_transmissions;
++ unsigned int tx_single_retry_frames;
++ unsigned int tx_multiple_retry_frames;
++ unsigned int tx_retry_limit_exceeded;
++ unsigned int tx_discards;
++ unsigned int rx_unicast_frames;
++ unsigned int rx_multicast_frames;
++ unsigned int rx_fragments;
++ unsigned int rx_unicast_octets;
++ unsigned int rx_multicast_octets;
++ unsigned int rx_fcs_errors;
++ unsigned int rx_discards_no_buffer;
++ unsigned int tx_discards_wrong_sa;
++ unsigned int rx_discards_undecryptable;
++ unsigned int rx_message_in_msg_fragments;
++ unsigned int rx_message_in_bad_msg_fragments;
++};
++
++struct ieee80211_softmac_stats{
++ unsigned int rx_ass_ok;
++ unsigned int rx_ass_err;
++ unsigned int rx_probe_rq;
++ unsigned int tx_probe_rs;
++ unsigned int tx_beacons;
++ unsigned int rx_auth_rq;
++ unsigned int rx_auth_rs_ok;
++ unsigned int rx_auth_rs_err;
++ unsigned int tx_auth_rq;
++ unsigned int no_auth_rs;
++ unsigned int no_ass_rs;
++ unsigned int tx_ass_rq;
++ unsigned int rx_ass_rq;
++ unsigned int tx_probe_rq;
++ unsigned int reassoc;
++ unsigned int swtxstop;
++ unsigned int swtxawake;
++};
++
++struct ieee80211_device;
++
++#include "ieee80211_crypt.h"
++
++#define SEC_KEY_1 (1<<0)
++#define SEC_KEY_2 (1<<1)
++#define SEC_KEY_3 (1<<2)
++#define SEC_KEY_4 (1<<3)
++#define SEC_ACTIVE_KEY (1<<4)
++#define SEC_AUTH_MODE (1<<5)
++#define SEC_UNICAST_GROUP (1<<6)
++#define SEC_LEVEL (1<<7)
++#define SEC_ENABLED (1<<8)
++
++#define SEC_LEVEL_0 0 /* None */
++#define SEC_LEVEL_1 1 /* WEP 40 and 104 bit */
++#define SEC_LEVEL_2 2 /* Level 1 + TKIP */
++#define SEC_LEVEL_2_CKIP 3 /* Level 1 + CKIP */
++#define SEC_LEVEL_3 4 /* Level 2 + CCMP */
++
++#define WEP_KEYS 4
++#define WEP_KEY_LEN 13
++
++#define WEP_KEY_LEN_MODIF 32
++
++struct ieee80211_security {
++ u16 active_key:2,
++ enabled:1,
++ auth_mode:2,
++ auth_algo:4,
++ unicast_uses_group:1;
++ u8 key_sizes[WEP_KEYS];
++ u8 keys[WEP_KEYS][WEP_KEY_LEN_MODIF];
++ u8 level;
++ u16 flags;
++} __attribute__ ((packed));
++
++
++/*
++
++ 802.11 data frame from AP
++
++ ,-------------------------------------------------------------------.
++Bytes | 2 | 2 | 6 | 6 | 6 | 2 | 0..2312 | 4 |
++ |------|------|---------|---------|---------|------|---------|------|
++Desc. | ctrl | dura | DA/RA | TA | SA | Sequ | frame | fcs |
++ | | tion | (BSSID) | | | ence | data | |
++ `-------------------------------------------------------------------'
++
++Total: 28-2340 bytes
++
++*/
++
++struct ieee80211_header_data {
++ u16 frame_ctl;
++ u16 duration_id;
++ u8 addr1[6];
++ u8 addr2[6];
++ u8 addr3[6];
++ u16 seq_ctrl;
++};
++
++#define BEACON_PROBE_SSID_ID_POSITION 12
++
++/* Management Frame Information Element Types */
++#define MFIE_TYPE_SSID 0
++#define MFIE_TYPE_RATES 1
++#define MFIE_TYPE_FH_SET 2
++#define MFIE_TYPE_DS_SET 3
++#define MFIE_TYPE_CF_SET 4
++#define MFIE_TYPE_TIM 5
++#define MFIE_TYPE_IBSS_SET 6
++#define MFIE_TYPE_COUNTRY 7 //+YJ,080625
++#define MFIE_TYPE_CHALLENGE 16
++#define MFIE_TYPE_ERP 42
++#define MFIE_TYPE_RSN 48
++#define MFIE_TYPE_RATES_EX 50
++#define MFIE_TYPE_GENERIC 221
++
++#ifdef ENABLE_DOT11D
++typedef enum
++{
++ COUNTRY_CODE_FCC = 0,
++ COUNTRY_CODE_IC = 1,
++ COUNTRY_CODE_ETSI = 2,
++ COUNTRY_CODE_SPAIN = 3,
++ COUNTRY_CODE_FRANCE = 4,
++ COUNTRY_CODE_MKK = 5,
++ COUNTRY_CODE_MKK1 = 6,
++ COUNTRY_CODE_ISRAEL = 7,
++ COUNTRY_CODE_TELEC = 8,
++ COUNTRY_CODE_GLOBAL_DOMAIN = 9,
++ COUNTRY_CODE_WORLD_WIDE_13_INDEX = 10
++}country_code_type_t;
++#endif
++
++struct ieee80211_info_element_hdr {
++ u8 id;
++ u8 len;
++} __attribute__ ((packed));
++
++struct ieee80211_info_element {
++ u8 id;
++ u8 len;
++ u8 data[0];
++} __attribute__ ((packed));
++
++/*
++ * These are the data types that can make up management packets
++ *
++ u16 auth_algorithm;
++ u16 auth_sequence;
++ u16 beacon_interval;
++ u16 capability;
++ u8 current_ap[ETH_ALEN];
++ u16 listen_interval;
++ struct {
++ u16 association_id:14, reserved:2;
++ } __attribute__ ((packed));
++ u32 time_stamp[2];
++ u16 reason;
++ u16 status;
++*/
++
++#define IEEE80211_DEFAULT_TX_ESSID "Penguin"
++#define IEEE80211_DEFAULT_BASIC_RATE 10
++
++struct ieee80211_authentication {
++ struct ieee80211_header_data header;
++ u16 algorithm;
++ u16 transaction;
++ u16 status;
++ //struct ieee80211_info_element_hdr info_element;
++} __attribute__ ((packed));
++
++
++struct ieee80211_probe_response {
++ struct ieee80211_header_data header;
++ u32 time_stamp[2];
++ u16 beacon_interval;
++ u16 capability;
++ struct ieee80211_info_element info_element;
++} __attribute__ ((packed));
++
++struct ieee80211_probe_request {
++ struct ieee80211_header_data header;
++ /*struct ieee80211_info_element info_element;*/
++} __attribute__ ((packed));
++
++struct ieee80211_assoc_request_frame {
++ struct ieee80211_hdr_3addr header;
++ u16 capability;
++ u16 listen_interval;
++ //u8 current_ap[ETH_ALEN];
++ struct ieee80211_info_element_hdr info_element;
++} __attribute__ ((packed));
++
++struct ieee80211_assoc_response_frame {
++ struct ieee80211_hdr_3addr header;
++ u16 capability;
++ u16 status;
++ u16 aid;
++ struct ieee80211_info_element info_element; /* supported rates */
++} __attribute__ ((packed));
++
++struct ieee80211_disassoc_frame{
++ struct ieee80211_hdr_3addr header;
++ u16 reasoncode;
++}__attribute__ ((packed));
++
++struct ieee80211_txb {
++ u8 nr_frags;
++ u8 encrypted;
++ u16 reserved;
++ u16 frag_size;
++ u16 payload_size;
++ struct sk_buff *fragments[0];
++};
++
++struct ieee80211_wmm_ac_param {
++ u8 ac_aci_acm_aifsn;
++ u8 ac_ecwmin_ecwmax;
++ u16 ac_txop_limit;
++};
++
++struct ieee80211_wmm_ts_info {
++ u8 ac_dir_tid;
++ u8 ac_up_psb;
++ u8 reserved;
++} __attribute__ ((packed));
++
++struct ieee80211_wmm_tspec_elem {
++ struct ieee80211_wmm_ts_info ts_info;
++ u16 norm_msdu_size;
++ u16 max_msdu_size;
++ u32 min_serv_inter;
++ u32 max_serv_inter;
++ u32 inact_inter;
++ u32 suspen_inter;
++ u32 serv_start_time;
++ u32 min_data_rate;
++ u32 mean_data_rate;
++ u32 peak_data_rate;
++ u32 max_burst_size;
++ u32 delay_bound;
++ u32 min_phy_rate;
++ u16 surp_band_allow;
++ u16 medium_time;
++}__attribute__((packed));
++
++enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};
++#define MAX_SP_Len (WMM_all_frame << 4)
++#define IEEE80211_QOS_TID 0x0f
++#define QOS_CTL_NOTCONTAIN_ACK (0x01 << 5)
++
++/* SWEEP TABLE ENTRIES NUMBER*/
++#define MAX_SWEEP_TAB_ENTRIES 42
++#define MAX_SWEEP_TAB_ENTRIES_PER_PACKET 7
++/* MAX_RATES_LENGTH needs to be 12. The spec says 8, and many APs
++ * only use 8, and then use extended rates for the remaining supported
++ * rates. Other APs, however, stick all of their supported rates on the
++ * main rates information element... */
++#define MAX_RATES_LENGTH ((u8)12)
++#define MAX_RATES_EX_LENGTH ((u8)16)
++#define MAX_NETWORK_COUNT 128
++//#define MAX_CHANNEL_NUMBER 161
++#define MAX_CHANNEL_NUMBER 165 //YJ,modified,080625
++#define MAX_IE_LEN 0xFF //+YJ,080625
++
++typedef struct _CHANNEL_LIST{
++ u8 Channel[MAX_CHANNEL_NUMBER + 1];
++ u8 Len;
++}CHANNEL_LIST, *PCHANNEL_LIST;
++
++#define IEEE80211_SOFTMAC_SCAN_TIME 100//400
++//(HZ / 2)
++//by amy for ps
++#define IEEE80211_WATCH_DOG_TIME 2000
++//by amy for ps
++//by amy for antenna
++#define ANTENNA_DIVERSITY_TIMER_PERIOD 1000 // 1000 m
++//by amy for antenna
++#define IEEE80211_SOFTMAC_ASSOC_RETRY_TIME (HZ * 2)
++
++#define CRC_LENGTH 4U
++
++#define MAX_WPA_IE_LEN 64
++
++#define NETWORK_EMPTY_ESSID (1<<0)
++#define NETWORK_HAS_OFDM (1<<1)
++#define NETWORK_HAS_CCK (1<<2)
++
++#define IEEE80211_DTIM_MBCAST 4
++#define IEEE80211_DTIM_UCAST 2
++#define IEEE80211_DTIM_VALID 1
++#define IEEE80211_DTIM_INVALID 0
++
++#define IEEE80211_PS_DISABLED 0
++#define IEEE80211_PS_UNICAST IEEE80211_DTIM_UCAST
++#define IEEE80211_PS_MBCAST IEEE80211_DTIM_MBCAST
++#define IEEE80211_PS_ENABLE IEEE80211_DTIM_VALID
++//added by David for QoS 2006/6/30
++//#define WMM_Hang_8187
++#ifdef WMM_Hang_8187
++#undef WMM_Hang_8187
++#endif
++
++#define WME_AC_BE 0x00
++#define WME_AC_BK 0x01
++#define WME_AC_VI 0x02
++#define WME_AC_VO 0x03
++#define WME_ACI_MASK 0x03
++#define WME_AIFSN_MASK 0x03
++#define WME_AC_PRAM_LEN 16
++
++//UP Mapping to AC, using in MgntQuery_SequenceNumber() and maybe for DSCP
++//#define UP2AC(up) ((up<3) ? ((up==0)?1:0) : (up>>1))
++#define UP2AC(up) ( \
++ ((up) < 1) ? WME_AC_BE : \
++ ((up) < 3) ? WME_AC_BK : \
++ ((up) < 4) ? WME_AC_BE : \
++ ((up) < 6) ? WME_AC_VI : \
++ WME_AC_VO)
++//AC Mapping to UP, using in Tx part for selecting the corresponding TX queue
++#define AC2UP(_ac) ( \
++ ((_ac) == WME_AC_VO) ? 6 : \
++ ((_ac) == WME_AC_VI) ? 5 : \
++ ((_ac) == WME_AC_BK) ? 1 : \
++ 0)
++
++#define ETHER_ADDR_LEN 6 /* length of an Ethernet address */
++struct ether_header {
++ u8 ether_dhost[ETHER_ADDR_LEN];
++ u8 ether_shost[ETHER_ADDR_LEN];
++ u16 ether_type;
++} __attribute__((packed));
++
++#ifndef ETHERTYPE_PAE
++#define ETHERTYPE_PAE 0x888e /* EAPOL PAE/802.1x */
++#endif
++#ifndef ETHERTYPE_IP
++#define ETHERTYPE_IP 0x0800 /* IP protocol */
++#endif
++
++struct ieee80211_network {
++ /* These entries are used to identify a unique network */
++ u8 bssid[ETH_ALEN];
++ u8 channel;
++ /* Ensure null-terminated for any debug msgs */
++ u8 ssid[IW_ESSID_MAX_SIZE + 1];
++ u8 ssid_len;
++
++ /* These are network statistics */
++ struct ieee80211_rx_stats stats;
++ u16 capability;
++ u8 rates[MAX_RATES_LENGTH];
++ u8 rates_len;
++ u8 rates_ex[MAX_RATES_EX_LENGTH];
++ u8 rates_ex_len;
++ unsigned long last_scanned;
++ u8 mode;
++ u8 flags;
++ u32 last_associate;
++ u32 time_stamp[2];
++ u16 beacon_interval;
++ u16 listen_interval;
++ u16 atim_window;
++ u8 wpa_ie[MAX_WPA_IE_LEN];
++ size_t wpa_ie_len;
++ u8 rsn_ie[MAX_WPA_IE_LEN];
++ size_t rsn_ie_len;
++ u8 dtim_period;
++ u8 dtim_data;
++ u32 last_dtim_sta_time[2];
++ struct list_head list;
++ //appeded for QoS
++ u8 wmm_info;
++ struct ieee80211_wmm_ac_param wmm_param[4];
++ u8 QoS_Enable;
++ u8 SignalStrength;
++//by amy 080312
++ u8 HighestOperaRate;
++//by amy 080312
++#ifdef THOMAS_TURBO
++ u8 Turbo_Enable;//enable turbo mode, added by thomas
++#endif
++#ifdef ENABLE_DOT11D
++ u16 CountryIeLen;
++ u8 CountryIeBuf[MAX_IE_LEN];
++#endif
++};
++
++enum ieee80211_state {
++
++ /* the card is not linked at all */
++ IEEE80211_NOLINK = 0,
++
++ /* IEEE80211_ASSOCIATING* are for BSS client mode
++ * the driver shall not perform RX filtering unless
++ * the state is LINKED.
++ * The driver shall just check for the state LINKED and
++ * defaults to NOLINK for ALL the other states (including
++ * LINKED_SCANNING)
++ */
++
++ /* the association procedure will start (wq scheduling)*/
++ IEEE80211_ASSOCIATING,
++ IEEE80211_ASSOCIATING_RETRY,
++
++ /* the association procedure is sending AUTH request*/
++ IEEE80211_ASSOCIATING_AUTHENTICATING,
++
++ /* the association procedure has successfully authentcated
++ * and is sending association request
++ */
++ IEEE80211_ASSOCIATING_AUTHENTICATED,
++
++ /* the link is ok. the card associated to a BSS or linked
++ * to a ibss cell or acting as an AP and creating the bss
++ */
++ IEEE80211_LINKED,
++
++ /* same as LINKED, but the driver shall apply RX filter
++ * rules as we are in NO_LINK mode. As the card is still
++ * logically linked, but it is doing a syncro site survey
++ * then it will be back to LINKED state.
++ */
++ IEEE80211_LINKED_SCANNING,
++
++};
++
++#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
++#define DEFAULT_FTS 2346
++#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
++#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
++
++
++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,11))
++extern inline int is_multicast_ether_addr(const u8 *addr)
++{
++ return ((addr[0] != 0xff) && (0x01 & addr[0]));
++}
++#endif
++
++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,13))
++extern inline int is_broadcast_ether_addr(const u8 *addr)
++{
++ return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
++ (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
++}
++#endif
++
++#define CFG_IEEE80211_RESERVE_FCS (1<<0)
++#define CFG_IEEE80211_COMPUTE_FCS (1<<1)
++
++typedef struct tx_pending_t{
++ int frag;
++ struct ieee80211_txb *txb;
++}tx_pending_t;
++
++
++struct ieee80211_device {
++ struct net_device *dev;
++
++ /* Bookkeeping structures */
++ struct net_device_stats stats;
++ struct ieee80211_stats ieee_stats;
++ struct ieee80211_softmac_stats softmac_stats;
++
++ /* Probe / Beacon management */
++ struct list_head network_free_list;
++ struct list_head network_list;
++ struct ieee80211_network *networks;
++ int scans;
++ int scan_age;
++
++ int iw_mode; /* operating mode (IW_MODE_*) */
++
++ spinlock_t lock;
++ spinlock_t wpax_suitlist_lock;
++
++ int tx_headroom; /* Set to size of any additional room needed at front
++ * of allocated Tx SKBs */
++ u32 config;
++
++ /* WEP and other encryption related settings at the device level */
++ int open_wep; /* Set to 1 to allow unencrypted frames */
++
++ int reset_on_keychange; /* Set to 1 if the HW needs to be reset on
++ * WEP key changes */
++
++ /* If the host performs {en,de}cryption, then set to 1 */
++ int host_encrypt;
++ int host_decrypt;
++ int ieee802_1x; /* is IEEE 802.1X used */
++
++ /* WPA data */
++ int wpa_enabled;
++ int drop_unencrypted;
++ int tkip_countermeasures;
++ int privacy_invoked;
++ size_t wpa_ie_len;
++ u8 *wpa_ie;
++
++ u8 ap_mac_addr[6];
++ u16 pairwise_key_type;
++ u16 broadcast_key_type;
++
++ struct list_head crypt_deinit_list;
++ struct ieee80211_crypt_data *crypt[WEP_KEYS];
++ int tx_keyidx; /* default TX key index (crypt[tx_keyidx]) */
++ struct timer_list crypt_deinit_timer;
++
++ int bcrx_sta_key; /* use individual keys to override default keys even
++ * with RX of broad/multicast frames */
++
++ /* Fragmentation structures */
++ // each streaming contain a entry
++ struct ieee80211_frag_entry frag_cache[17][IEEE80211_FRAG_CACHE_LEN];
++ unsigned int frag_next_idx[17];
++ u16 fts; /* Fragmentation Threshold */
++
++ /* This stores infos for the current network.
++ * Either the network we are associated in INFRASTRUCTURE
++ * or the network that we are creating in MASTER mode.
++ * ad-hoc is a mixture ;-).
++ * Note that in infrastructure mode, even when not associated,
++ * fields bssid and essid may be valid (if wpa_set and essid_set
++ * are true) as thy carry the value set by the user via iwconfig
++ */
++ struct ieee80211_network current_network;
++
++
++ enum ieee80211_state state;
++
++ int short_slot;
++ int mode; /* A, B, G */
++ int modulation; /* CCK, OFDM */
++ int freq_band; /* 2.4Ghz, 5.2Ghz, Mixed */
++ int abg_true; /* ABG flag */
++
++ /* used for forcing the ibss workqueue to terminate
++ * without wait for the syncro scan to terminate
++ */
++ short sync_scan_hurryup;
++
++#ifdef ENABLE_DOT11D
++ void * pDot11dInfo;
++ bool bGlobalDomain;
++
++ // For Liteon Ch12~13 passive scan
++ u8 MinPassiveChnlNum;
++ u8 IbssStartChnl;
++#else
++ /* map of allowed channels. 0 is dummy */
++ // FIXME: remeber to default to a basic channel plan depending of the PHY type
++ int channel_map[MAX_CHANNEL_NUMBER+1];
++#endif
++
++ int rate; /* current rate */
++ int basic_rate;
++ //FIXME: pleace callback, see if redundant with softmac_features
++ short active_scan;
++
++ /* this contains flags for selectively enable softmac support */
++ u16 softmac_features;
++
++ /* if the sequence control field is not filled by HW */
++ u16 seq_ctrl[5];
++
++ /* association procedure transaction sequence number */
++ u16 associate_seq;
++
++ /* AID for RTXed association responses */
++ u16 assoc_id;
++
++ /* power save mode related*/
++ short ps;
++ short sta_sleep;
++ int ps_timeout;
++ struct tasklet_struct ps_task;
++ u32 ps_th;
++ u32 ps_tl;
++
++ short raw_tx;
++ /* used if IEEE_SOFTMAC_TX_QUEUE is set */
++ short queue_stop;
++ short scanning;
++ short proto_started;
++
++ struct semaphore wx_sem;
++ struct semaphore scan_sem;
++
++ spinlock_t mgmt_tx_lock;
++ spinlock_t beacon_lock;
++
++ short beacon_txing;
++
++ short wap_set;
++ short ssid_set;
++
++ u8 wpax_type_set; //{added by David, 2006.9.28}
++ u32 wpax_type_notify; //{added by David, 2006.9.26}
++
++ /* QoS related flag */
++ char init_wmmparam_flag;
++
++ /* for discarding duplicated packets in IBSS */
++ struct list_head ibss_mac_hash[IEEE_IBSS_MAC_HASH_SIZE];
++
++ /* for discarding duplicated packets in BSS */
++ u16 last_rxseq_num[17]; /* rx seq previous per-tid */
++ u16 last_rxfrag_num[17];/* tx frag previous per-tid */
++ unsigned long last_packet_time[17];
++
++ /* for PS mode */
++ unsigned long last_rx_ps_time;
++
++ /* used if IEEE_SOFTMAC_SINGLE_QUEUE is set */
++ struct sk_buff *mgmt_queue_ring[MGMT_QUEUE_NUM];
++ int mgmt_queue_head;
++ int mgmt_queue_tail;
++
++
++ /* used if IEEE_SOFTMAC_TX_QUEUE is set */
++ struct tx_pending_t tx_pending;
++
++ /* used if IEEE_SOFTMAC_ASSOCIATE is set */
++ struct timer_list associate_timer;
++
++ /* used if IEEE_SOFTMAC_BEACONS is set */
++ struct timer_list beacon_timer;
++
++ struct work_struct associate_complete_wq;
++// struct work_struct associate_retry_wq;
++ struct work_struct associate_procedure_wq;
++// struct work_struct softmac_scan_wq;
++ struct work_struct wx_sync_scan_wq;
++ struct work_struct wmm_param_update_wq;
++ struct work_struct ps_request_tx_ack_wq;//for ps
++// struct work_struct hw_wakeup_wq;
++// struct work_struct hw_sleep_wq;
++// struct work_struct watch_dog_wq;
++ bool bInactivePs;
++ bool actscanning;
++ bool beinretry;
++ u16 ListenInterval;
++ unsigned long NumRxDataInPeriod; //YJ,add,080828
++ unsigned long NumRxBcnInPeriod; //YJ,add,080828
++ unsigned long NumRxOkTotal;
++ unsigned long NumRxUnicast;//YJ,add,080828,for keep alive
++ bool bHwRadioOff;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
++ struct delayed_work softmac_scan_wq;
++ struct delayed_work associate_retry_wq;
++ struct delayed_work hw_wakeup_wq;
++ struct delayed_work hw_sleep_wq;//+by amy 080324
++ struct delayed_work watch_dog_wq;
++ struct delayed_work sw_antenna_wq;
++ struct delayed_work start_ibss_wq;
++//by amy for rate adaptive 080312
++ struct delayed_work rate_adapter_wq;
++//by amy for rate adaptive
++ struct delayed_work hw_dig_wq;
++ struct delayed_work tx_pw_wq;
++
++//Added for RF power on power off by lizhaoming 080512
++ struct delayed_work GPIOChangeRFWorkItem;
++#else
++
++ struct work_struct start_ibss_wq;
++ struct work_struct softmac_scan_wq;
++ struct work_struct associate_retry_wq;
++ struct work_struct hw_wakeup_wq;
++ struct work_struct hw_sleep_wq;
++ struct work_struct watch_dog_wq;
++ struct work_struct sw_antenna_wq;
++//by amy for rate adaptive 080312
++ struct work_struct rate_adapter_wq;
++//by amy for rate adaptive
++ struct work_struct hw_dig_wq;
++ struct work_struct tx_pw_wq;
++
++//Added for RF power on power off by lizhaoming 080512
++ struct work_struct GPIOChangeRFWorkItem;
++#endif
++ struct workqueue_struct *wq;
++
++ /* Callback functions */
++ void (*set_security)(struct net_device *dev,
++ struct ieee80211_security *sec);
++
++ /* Used to TX data frame by using txb structs.
++ * this is not used if in the softmac_features
++ * is set the flag IEEE_SOFTMAC_TX_QUEUE
++ */
++ int (*hard_start_xmit)(struct ieee80211_txb *txb,
++ struct net_device *dev);
++
++ int (*reset_port)(struct net_device *dev);
++
++ /* Softmac-generated frames (mamagement) are TXed via this
++ * callback if the flag IEEE_SOFTMAC_SINGLE_QUEUE is
++ * not set. As some cards may have different HW queues that
++ * one might want to use for data and management frames
++ * the option to have two callbacks might be useful.
++ * This fucntion can't sleep.
++ */
++ int (*softmac_hard_start_xmit)(struct sk_buff *skb,
++ struct net_device *dev);
++
++ /* used instead of hard_start_xmit (not softmac_hard_start_xmit)
++ * if the IEEE_SOFTMAC_TX_QUEUE feature is used to TX data
++ * frames. I the option IEEE_SOFTMAC_SINGLE_QUEUE is also set
++ * then also management frames are sent via this callback.
++ * This function can't sleep.
++ */
++ void (*softmac_data_hard_start_xmit)(struct sk_buff *skb,
++ struct net_device *dev,int rate);
++
++ /* stops the HW queue for DATA frames. Useful to avoid
++ * waste time to TX data frame when we are reassociating
++ * This function can sleep.
++ */
++ void (*data_hard_stop)(struct net_device *dev);
++
++ /* OK this is complementar to data_poll_hard_stop */
++ void (*data_hard_resume)(struct net_device *dev);
++
++ /* ask to the driver to retune the radio .
++ * This function can sleep. the driver should ensure
++ * the radio has been swithced before return.
++ */
++ void (*set_chan)(struct net_device *dev,short ch);
++
++ /* These are not used if the ieee stack takes care of
++ * scanning (IEEE_SOFTMAC_SCAN feature set).
++ * In this case only the set_chan is used.
++ *
++ * The syncro version is similar to the start_scan but
++ * does not return until all channels has been scanned.
++ * this is called in user context and should sleep,
++ * it is called in a work_queue when swithcing to ad-hoc mode
++ * or in behalf of iwlist scan when the card is associated
++ * and root user ask for a scan.
++ * the fucntion stop_scan should stop both the syncro and
++ * background scanning and can sleep.
++ * The fucntion start_scan should initiate the background
++ * scanning and can't sleep.
++ */
++ void (*scan_syncro)(struct net_device *dev);
++ void (*start_scan)(struct net_device *dev);
++ void (*stop_scan)(struct net_device *dev);
++
++ /* indicate the driver that the link state is changed
++ * for example it may indicate the card is associated now.
++ * Driver might be interested in this to apply RX filter
++ * rules or simply light the LINK led
++ */
++ void (*link_change)(struct net_device *dev);
++
++ /* these two function indicates to the HW when to start
++ * and stop to send beacons. This is used when the
++ * IEEE_SOFTMAC_BEACONS is not set. For now the
++ * stop_send_bacons is NOT guaranteed to be called only
++ * after start_send_beacons.
++ */
++ void (*start_send_beacons) (struct net_device *dev);
++ void (*stop_send_beacons) (struct net_device *dev);
++
++ /* power save mode related */
++ void (*sta_wake_up) (struct net_device *dev);
++ void (*ps_request_tx_ack) (struct net_device *dev);
++ void (*enter_sleep_state) (struct net_device *dev, u32 th, u32 tl);
++ short (*ps_is_queue_empty) (struct net_device *dev);
++
++ /* QoS related */
++ //void (*wmm_param_update) (struct net_device *dev, u8 *ac_param);
++ //void (*wmm_param_update) (struct ieee80211_device *ieee);
++
++ /* This must be the last item so that it points to the data
++ * allocated beyond this structure by alloc_ieee80211 */
++ u8 priv[0];
++};
++
++#define IEEE_A (1<<0)
++#define IEEE_B (1<<1)
++#define IEEE_G (1<<2)
++#define IEEE_MODE_MASK (IEEE_A|IEEE_B|IEEE_G)
++
++/* Generate a 802.11 header */
++
++/* Uses the channel change callback directly
++ * instead of [start/stop] scan callbacks
++ */
++#define IEEE_SOFTMAC_SCAN (1<<2)
++
++/* Perform authentication and association handshake */
++#define IEEE_SOFTMAC_ASSOCIATE (1<<3)
++
++/* Generate probe requests */
++#define IEEE_SOFTMAC_PROBERQ (1<<4)
++
++/* Generate respones to probe requests */
++#define IEEE_SOFTMAC_PROBERS (1<<5)
++
++/* The ieee802.11 stack will manages the netif queue
++ * wake/stop for the driver, taking care of 802.11
++ * fragmentation. See softmac.c for details. */
++#define IEEE_SOFTMAC_TX_QUEUE (1<<7)
++
++/* Uses only the softmac_data_hard_start_xmit
++ * even for TX management frames.
++ */
++#define IEEE_SOFTMAC_SINGLE_QUEUE (1<<8)
++
++/* Generate beacons. The stack will enqueue beacons
++ * to the card
++ */
++#define IEEE_SOFTMAC_BEACONS (1<<6)
++
++
++
++static inline void *ieee80211_priv(struct net_device *dev)
++{
++ return ((struct ieee80211_device *)netdev_priv(dev))->priv;
++}
++
++extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
++{
++ /* Single white space is for Linksys APs */
++ if (essid_len == 1 && essid[0] == ' ')
++ return 1;
++
++ /* Otherwise, if the entire essid is 0, we assume it is hidden */
++ while (essid_len) {
++ essid_len--;
++ if (essid[essid_len] != '\0')
++ return 0;
++ }
++
++ return 1;
++}
++
++extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode)
++{
++ /*
++ * It is possible for both access points and our device to support
++ * combinations of modes, so as long as there is one valid combination
++ * of ap/device supported modes, then return success
++ *
++ */
++ if ((mode & IEEE_A) &&
++ (ieee->modulation & IEEE80211_OFDM_MODULATION) &&
++ (ieee->freq_band & IEEE80211_52GHZ_BAND))
++ return 1;
++
++ if ((mode & IEEE_G) &&
++ (ieee->modulation & IEEE80211_OFDM_MODULATION) &&
++ (ieee->freq_band & IEEE80211_24GHZ_BAND))
++ return 1;
++
++ if ((mode & IEEE_B) &&
++ (ieee->modulation & IEEE80211_CCK_MODULATION) &&
++ (ieee->freq_band & IEEE80211_24GHZ_BAND))
++ return 1;
++
++ return 0;
++}
++
++extern inline int ieee80211_get_hdrlen(u16 fc)
++{
++ int hdrlen = 24;
++
++ switch (WLAN_FC_GET_TYPE(fc)) {
++ case IEEE80211_FTYPE_DATA:
++ if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS))
++ hdrlen = 30; /* Addr4 */
++ if(IEEE80211_QOS_HAS_SEQ(fc))
++ hdrlen += 2; /* QOS ctrl*/
++ break;
++ case IEEE80211_FTYPE_CTL:
++ switch (WLAN_FC_GET_STYPE(fc)) {
++ case IEEE80211_STYPE_CTS:
++ case IEEE80211_STYPE_ACK:
++ hdrlen = 10;
++ break;
++ default:
++ hdrlen = 16;
++ break;
++ }
++ break;
++ }
++
++ return hdrlen;
++}
++
++
++
++/* ieee80211.c */
++extern void free_ieee80211(struct net_device *dev);
++extern struct net_device *alloc_ieee80211(int sizeof_priv);
++
++extern int ieee80211_set_encryption(struct ieee80211_device *ieee);
++
++/* ieee80211_tx.c */
++
++extern int ieee80211_encrypt_fragment(
++ struct ieee80211_device *ieee,
++ struct sk_buff *frag,
++ int hdr_len);
++
++extern int ieee80211_xmit(struct sk_buff *skb,
++ struct net_device *dev);
++extern void ieee80211_txb_free(struct ieee80211_txb *);
++
++
++/* ieee80211_rx.c */
++extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
++ struct ieee80211_rx_stats *rx_stats);
++extern void ieee80211_rx_mgt(struct ieee80211_device *ieee,
++ struct ieee80211_hdr *header,
++ struct ieee80211_rx_stats *stats);
++
++/* ieee80211_wx.c */
++extern int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu, char *key);
++extern int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu, char *key);
++extern int ieee80211_wx_get_encode(struct ieee80211_device *ieee,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu, char *key);
++extern int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
++ struct iw_request_info *info,
++ union iwreq_data* wrqu, char *extra);
++int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
++ struct iw_request_info *info,
++ struct iw_param *data, char *extra);
++int ieee80211_wx_set_mlme(struct ieee80211_device *ieee,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu, char *extra);
++
++int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len);
++/* ieee80211_softmac.c */
++extern short ieee80211_is_54g(struct ieee80211_network net);
++extern short ieee80211_is_shortslot(struct ieee80211_network net);
++extern int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
++ struct ieee80211_rx_stats *rx_stats, u16 type,
++ u16 stype);
++extern void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee80211_network *net);
++
++extern void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *ieee);
++extern void ieee80211_softmac_check_all_nets(struct ieee80211_device *ieee);
++extern void ieee80211_start_bss(struct ieee80211_device *ieee);
++extern void ieee80211_start_master_bss(struct ieee80211_device *ieee);
++extern void ieee80211_start_ibss(struct ieee80211_device *ieee);
++extern void ieee80211_softmac_init(struct ieee80211_device *ieee);
++extern void ieee80211_softmac_free(struct ieee80211_device *ieee);
++extern void ieee80211_associate_abort(struct ieee80211_device *ieee);
++extern void ieee80211_disassociate(struct ieee80211_device *ieee);
++extern void ieee80211_stop_scan(struct ieee80211_device *ieee);
++extern void ieee80211_start_scan_syncro(struct ieee80211_device *ieee);
++extern void ieee80211_check_all_nets(struct ieee80211_device *ieee);
++extern void ieee80211_start_protocol(struct ieee80211_device *ieee);
++extern void ieee80211_stop_protocol(struct ieee80211_device *ieee);
++extern void ieee80211_softmac_start_protocol(struct ieee80211_device *ieee);
++extern void ieee80211_softmac_stop_protocol(struct ieee80211_device *ieee);
++extern void ieee80211_reset_queue(struct ieee80211_device *ieee);
++extern void ieee80211_wake_queue(struct ieee80211_device *ieee);
++extern void ieee80211_stop_queue(struct ieee80211_device *ieee);
++extern struct sk_buff *ieee80211_get_beacon(struct ieee80211_device *ieee);
++extern void ieee80211_start_send_beacons(struct ieee80211_device *ieee);
++extern void ieee80211_stop_send_beacons(struct ieee80211_device *ieee);
++extern int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, struct iw_point *p);
++extern void notify_wx_assoc_event(struct ieee80211_device *ieee);
++extern void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success);
++extern void SendDisassociation(struct ieee80211_device *ieee,u8* asSta,u8 asRsn);
++extern void ieee80211_start_scan(struct ieee80211_device *ieee);
++
++//Add for RF power on power off by lizhaoming 080512
++extern void SendDisassociation(struct ieee80211_device *ieee,
++ u8* asSta,
++ u8 asRsn);
++
++/* ieee80211_crypt_ccmp&tkip&wep.c */
++extern void ieee80211_tkip_null(void);
++extern void ieee80211_wep_null(void);
++extern void ieee80211_ccmp_null(void);
++/* ieee80211_softmac_wx.c */
++
++extern int ieee80211_wx_get_wap(struct ieee80211_device *ieee,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu, char *ext);
++
++extern int ieee80211_wx_set_wap(struct ieee80211_device *ieee,
++ struct iw_request_info *info,
++ union iwreq_data *awrq,
++ char *extra);
++
++extern int ieee80211_wx_get_essid(struct ieee80211_device *ieee, struct iw_request_info *a,union iwreq_data *wrqu,char *b);
++
++extern int ieee80211_wx_set_rate(struct ieee80211_device *ieee,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu, char *extra);
++
++extern int ieee80211_wx_get_rate(struct ieee80211_device *ieee,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu, char *extra);
++
++extern int ieee80211_wx_set_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
++ union iwreq_data *wrqu, char *b);
++
++extern int ieee80211_wx_set_scan(struct ieee80211_device *ieee, struct iw_request_info *a,
++ union iwreq_data *wrqu, char *b);
++
++extern int ieee80211_wx_set_essid(struct ieee80211_device *ieee,
++ struct iw_request_info *a,
++ union iwreq_data *wrqu, char *extra);
++
++extern int ieee80211_wx_get_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
++ union iwreq_data *wrqu, char *b);
++
++extern int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
++ union iwreq_data *wrqu, char *b);
++
++extern int ieee80211_wx_get_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
++ union iwreq_data *wrqu, char *b);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
++extern void ieee80211_wx_sync_scan_wq(struct work_struct *work);
++#else
++ extern void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee);
++#endif
++//extern void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee);
++
++extern int ieee80211_wx_set_rawtx(struct ieee80211_device *ieee,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu, char *extra);
++
++extern int ieee80211_wx_get_name(struct ieee80211_device *ieee,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu, char *extra);
++
++extern int ieee80211_wx_set_power(struct ieee80211_device *ieee,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu, char *extra);
++
++extern int ieee80211_wx_get_power(struct ieee80211_device *ieee,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu, char *extra);
++
++extern void ieee80211_softmac_ips_scan_syncro(struct ieee80211_device *ieee);
++
++extern void ieee80211_sta_ps_send_null_frame(struct ieee80211_device *ieee, short pwr);
++
++extern const long ieee80211_wlan_frequencies[];
++
++extern inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
++{
++ ieee->scans++;
++}
++
++extern inline int ieee80211_get_scans(struct ieee80211_device *ieee)
++{
++ return ieee->scans;
++}
++
++static inline const char *escape_essid(const char *essid, u8 essid_len) {
++ static char escaped[IW_ESSID_MAX_SIZE * 2 + 1];
++ const char *s = essid;
++ char *d = escaped;
++
++ if (ieee80211_is_empty_essid(essid, essid_len)) {
++ memcpy(escaped, "<hidden>", sizeof("<hidden>"));
++ return escaped;
++ }
++
++ essid_len = min(essid_len, (u8)IW_ESSID_MAX_SIZE);
++ while (essid_len--) {
++ if (*s == '\0') {
++ *d++ = '\\';
++ *d++ = '0';
++ s++;
++ } else {
++ *d++ = *s++;
++ }
++ }
++ *d = '\0';
++ return escaped;
++}
++#endif /* IEEE80211_H */
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,265 @@
+/*
+ * Host AP crypto routines
+
+//module_init(ieee80211_crypto_init);
+//module_exit(ieee80211_crypto_deinit);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,86 @@
+/*
+ * Original code based on Host AP (software wireless LAN access point) driver
+ struct ieee80211_crypt_data **crypt);
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,533 @@
+/*
+ * Host AP crypt: host-based CCMP encryption implementation for Host AP driver
+
+//module_init(ieee80211_crypto_ccmp_init);
+//module_exit(ieee80211_crypto_ccmp_exit);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,1001 @@
+/*
+ * Host AP crypt: host-based TKIP encryption implementation for Host AP driver
+
+//module_init(ieee80211_crypto_tkip_init);
+//module_exit(ieee80211_crypto_tkip_exit);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,394 @@
+/*
+ * Host AP crypt: host-based WEP encryption implementation for Host AP driver
+#endif
+//module_init(ieee80211_crypto_wep_init);
+//module_exit(ieee80211_crypto_wep_exit);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_module.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_module.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_module.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_module.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_module.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,299 @@
+/*******************************************************************************
+
+EXPORT_SYMBOL(alloc_ieee80211);
+EXPORT_SYMBOL(free_ieee80211);
+#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,1971 @@
+/*
+ * Original code based Host AP (software wireless LAN access point) driver
+EXPORT_SYMBOL(ieee_ext_skb_p80211_to_ether);
+#endif
+#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,4029 @@
+/* IEEE 802.11 SoftMAC layer
+ * Copyright (c) 2005 Andrea Merello <andreamrl@tiscali.it>
+#endif // _RTL8187_EXT_PATCH_
+EXPORT_SYMBOL(ieee80211_sta_ps_send_null_frame);
+#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,602 @@
+/* IEEE 802.11 SoftMAC layer
+ * Copyright (c) 2005 Andrea Merello <andreamrl@tiscali.it>
+EXPORT_SYMBOL(ieee80211_wx_get_power);
+EXPORT_SYMBOL(ieee80211_wlan_frequencies);
+#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,828 @@
+/******************************************************************************
+
+EXPORT_SYMBOL(ieee80211_ext_reuse_txb);
+#endif // _RTL8187_EXT_PATCH_
+#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,884 @@
+/******************************************************************************
+
+EXPORT_SYMBOL(ieee80211_wx_set_encode);
+EXPORT_SYMBOL(ieee80211_wx_get_encode);
+#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/internal.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/internal.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/internal.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/internal.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/internal.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,115 @@
+/*
+ * Cryptographic API.
+
+#endif /* _CRYPTO_INTERNAL_H */
+
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/rtl_crypto.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/rtl_crypto.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/rtl_crypto.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/rtl_crypto.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/rtl_crypto.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,399 @@
+/*
+ * Scatterlist Cryptographic API.
+
+#endif /* _LINUX_CRYPTO_H */
+
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211.h 2009-03-25 16:11:12.000000000 +0000
-@@ -0,0 +1,1755 @@
-+/*
-+ * Merged with mainline ieee80211.h in Aug 2004. Original ieee802_11
-+ * remains copyright by the original authors
-+ *
-+ * Portions of the merged code are based on Host AP (software wireless
-+ * LAN access point) driver for Intersil Prism2/2.5/3.
-+ *
-+ * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen
-+ * <jkmaline@cc.hut.fi>
-+ * Copyright (c) 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi>
-+ *
-+ * Adaption to a generic IEEE 802.11 stack by James Ketrenos
-+ * <jketreno@linux.intel.com>
-+ * Copyright (c) 2004, Intel Corporation
-+ *
-+ * Modified for Realtek's wi-fi cards by Andrea Merello
-+ * <andreamrl@tiscali.it>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation. See README and COPYING for
-+ * more details.
-+ */
-+#ifndef IEEE80211_H
-+#define IEEE80211_H
-+#include <linux/if_ether.h> /* ETH_ALEN */
-+#include <linux/kernel.h> /* ARRAY_SIZE */
-+#include <linux/version.h>
-+#include <linux/jiffies.h>
-+#include <linux/timer.h>
-+#include <linux/sched.h>
-+
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13))
-+#include <linux/wireless.h>
-+#endif
-+
-+/*
-+#ifndef bool
-+#define bool int
-+#endif
-+
-+#ifndef true
-+#define true 1
-+#endif
-+
-+#ifndef false
-+#define false 0
-+#endif
-+*/
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20))
-+#ifndef bool
-+typedef enum{false = 0, true} bool;
-+#endif
-+#endif
-+//#ifdef JOHN_HWSEC
-+#define KEY_TYPE_NA 0x0
-+#define KEY_TYPE_WEP40 0x1
-+#define KEY_TYPE_TKIP 0x2
-+#define KEY_TYPE_CCMP 0x4
-+#define KEY_TYPE_WEP104 0x5
-+//#endif
-+
-+
-+#define aSifsTime 10
-+
-+#define MGMT_QUEUE_NUM 5
-+
-+
-+#define IEEE_CMD_SET_WPA_PARAM 1
-+#define IEEE_CMD_SET_WPA_IE 2
-+#define IEEE_CMD_SET_ENCRYPTION 3
-+#define IEEE_CMD_MLME 4
-+
-+#define IEEE_PARAM_WPA_ENABLED 1
-+#define IEEE_PARAM_TKIP_COUNTERMEASURES 2
-+#define IEEE_PARAM_DROP_UNENCRYPTED 3
-+#define IEEE_PARAM_PRIVACY_INVOKED 4
-+#define IEEE_PARAM_AUTH_ALGS 5
-+#define IEEE_PARAM_IEEE_802_1X 6
-+//It should consistent with the driver_XXX.c
-+// David, 2006.9.26
-+#define IEEE_PARAM_WPAX_SELECT 7
-+//Added for notify the encryption type selection
-+// David, 2006.9.26
-+#define IEEE_PROTO_WPA 1
-+#define IEEE_PROTO_RSN 2
-+//Added for notify the encryption type selection
-+// David, 2006.9.26
-+#define IEEE_WPAX_USEGROUP 0
-+#define IEEE_WPAX_WEP40 1
-+#define IEEE_WPAX_TKIP 2
-+#define IEEE_WPAX_WRAP 3
-+#define IEEE_WPAX_CCMP 4
-+#define IEEE_WPAX_WEP104 5
-+
-+#define IEEE_KEY_MGMT_IEEE8021X 1
-+#define IEEE_KEY_MGMT_PSK 2
-+
-+
-+
-+#define IEEE_MLME_STA_DEAUTH 1
-+#define IEEE_MLME_STA_DISASSOC 2
-+
-+
-+#define IEEE_CRYPT_ERR_UNKNOWN_ALG 2
-+#define IEEE_CRYPT_ERR_UNKNOWN_ADDR 3
-+#define IEEE_CRYPT_ERR_CRYPT_INIT_FAILED 4
-+#define IEEE_CRYPT_ERR_KEY_SET_FAILED 5
-+#define IEEE_CRYPT_ERR_TX_KEY_SET_FAILED 6
-+#define IEEE_CRYPT_ERR_CARD_CONF_FAILED 7
-+
-+
-+#define IEEE_CRYPT_ALG_NAME_LEN 16
-+
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,10))
-+#define ieee80211_wx_get_scan ieee80211_wx_get_scan_rtl
-+#define ieee80211_wx_set_encode ieee80211_wx_set_encode_rtl
-+#define ieee80211_wx_get_encode ieee80211_wx_get_encode_rtl
-+////////////////////////////////
-+// added for kernel conflict under FC5
-+#define ieee80211_wx_get_name ieee80211_wx_get_name_rtl
-+#define free_ieee80211 free_ieee80211_rtl
-+#define alloc_ieee80211 alloc_ieee80211_rtl
-+///////////////////////////////
-+#endif
-+//error in ubuntu2.6.22,so add these
-+#define ieee80211_wake_queue ieee80211_wake_queue_rtl
-+#define ieee80211_stop_queue ieee80211_stop_queue_rtl
-+
-+#define ieee80211_rx ieee80211_rx_rtl
-+
-+#define ieee80211_register_crypto_ops ieee80211_register_crypto_ops_rtl
-+#define ieee80211_unregister_crypto_ops ieee80211_unregister_crypto_ops_rtl
-+#define ieee80211_get_crypto_ops ieee80211_get_crypto_ops_rtl
-+#define ieee80211_crypt_deinit_entries ieee80211_crypt_deinit_entries_rtl
-+#define ieee80211_crypt_deinit_handler ieee80211_crypt_deinit_handler_rtl
-+#define ieee80211_crypt_delayed_deinit ieee80211_crypt_delayed_deinit_rtl
-+
-+#define ieee80211_txb_free ieee80211_txb_free_rtl
-+#define ieee80211_wx_get_essid ieee80211_wx_get_essid_rtl
-+#define ieee80211_wx_set_essid ieee80211_wx_set_essid_rtl
-+#define ieee80211_wx_set_rate ieee80211_wx_set_rate_rtl
-+#define ieee80211_wx_get_rate ieee80211_wx_get_rate_rtl
-+#define ieee80211_wx_set_wap ieee80211_wx_set_wap_rtl
-+#define ieee80211_wx_get_wap ieee80211_wx_get_wap_rtl
-+#define ieee80211_wx_set_mode ieee80211_wx_set_mode_rtl
-+#define ieee80211_wx_get_mode ieee80211_wx_get_mode_rtl
-+#define ieee80211_wx_set_scan ieee80211_wx_set_scan_rtl
-+#define ieee80211_wx_get_freq ieee80211_wx_get_freq_rtl
-+#define ieee80211_wx_set_freq ieee80211_wx_set_freq_rtl
-+#define ieee80211_wx_set_rawtx ieee80211_wx_set_rawtx_rtl
-+#define ieee80211_wx_set_power ieee80211_wx_set_power_rtl
-+#define ieee80211_wx_get_power ieee80211_wx_get_power_rtl
-+#define ieee80211_wlan_frequencies ieee80211_wlan_frequencies_rtl
-+#define ieee80211_softmac_stop_protocol ieee80211_softmac_stop_protocol_rtl
-+#define ieee80211_softmac_start_protocol ieee80211_softmac_start_protocol_rtl
-+#define ieee80211_start_protocol ieee80211_start_protocol_rtl
-+#define ieee80211_stop_protocol ieee80211_stop_protocol_rtl
-+#define ieee80211_rx_mgt ieee80211_rx_mgt_rtl
-+
-+#define ieee80211_wx_set_auth ieee80211_wx_set_auth_rtl
-+//by amy for ps
-+#define notify_wx_assoc_event notify_wx_assoc_event_rtl
-+#define ieee80211_stop_send_beacons ieee80211_stop_send_beacons_rtl
-+#define ieee80211_disassociate ieee80211_disassociate_rtl
-+#define ieee80211_start_scan ieee80211_start_scan_rtl
-+//by amy for ps
-+typedef struct ieee_param {
-+ u32 cmd;
-+ u8 sta_addr[ETH_ALEN];
-+ union {
-+ struct {
-+ u8 name;
-+ u32 value;
-+ } wpa_param;
-+ struct {
-+ u32 len;
-+ u8 reserved[32];
-+ u8 data[0];
-+ } wpa_ie;
-+ struct{
-+ int command;
-+ int reason_code;
-+ } mlme;
-+ struct {
-+ u8 alg[IEEE_CRYPT_ALG_NAME_LEN];
-+ u8 set_tx;
-+ u32 err;
-+ u8 idx;
-+ u8 seq[8]; /* sequence counter (set: RX, get: TX) */
-+ u16 key_len;
-+ u8 key[0];
-+ } crypt;
-+
-+ } u;
-+}ieee_param;
-+
-+
-+#if WIRELESS_EXT < 17
-+#define IW_QUAL_QUAL_INVALID 0x10
-+#define IW_QUAL_LEVEL_INVALID 0x20
-+#define IW_QUAL_NOISE_INVALID 0x40
-+#define IW_QUAL_QUAL_UPDATED 0x1
-+#define IW_QUAL_LEVEL_UPDATED 0x2
-+#define IW_QUAL_NOISE_UPDATED 0x4
-+#endif
-+
-+// linux under 2.6.9 release may not support it, so modify it for common use
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
-+#define MSECS(t) (1000 * ((t) / HZ) + 1000 * ((t) % HZ) / HZ)
-+static inline unsigned long msleep_interruptible_rtl(unsigned int msecs)
-+{
-+ unsigned long timeout = MSECS(msecs) + 1;
-+
-+ while (timeout) {
-+ set_current_state(TASK_UNINTERRUPTIBLE);
-+ timeout = schedule_timeout(timeout);
-+ }
-+ return timeout;
-+}
-+#else
-+#define MSECS(t) msecs_to_jiffies(t)
-+#define msleep_interruptible_rtl msleep_interruptible
-+#endif
-+
-+#define IEEE80211_DATA_LEN 2304
-+/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
-+ 6.2.1.1.2.
-+
-+ The figure in section 7.1.2 suggests a body size of up to 2312
-+ bytes is allowed, which is a bit confusing, I suspect this
-+ represents the 2304 bytes of real data, plus a possible 8 bytes of
-+ WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */
-+
-+
-+#define IEEE80211_HLEN 30
-+#define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN)
-+
-+/* this is stolen and modified from the madwifi driver*/
-+#define IEEE80211_FC0_TYPE_MASK 0x0c
-+#define IEEE80211_FC0_TYPE_DATA 0x08
-+#define IEEE80211_FC0_SUBTYPE_MASK 0xB0
-+#define IEEE80211_FC0_SUBTYPE_QOS 0x80
-+
-+#define IEEE80211_QOS_HAS_SEQ(fc) \
-+ (((fc) & (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == \
-+ (IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_QOS))
-+
-+/* this is stolen from ipw2200 driver */
-+#define IEEE_IBSS_MAC_HASH_SIZE 31
-+struct ieee_ibss_seq {
-+ u8 mac[ETH_ALEN];
-+ u16 seq_num[17];
-+ u16 frag_num[17];
-+ unsigned long packet_time[17];
-+ struct list_head list;
-+};
-+
-+struct ieee80211_hdr {
-+ u16 frame_ctl;
-+ u16 duration_id;
-+ u8 addr1[ETH_ALEN];
-+ u8 addr2[ETH_ALEN];
-+ u8 addr3[ETH_ALEN];
-+ u16 seq_ctl;
-+ u8 addr4[ETH_ALEN];
-+} __attribute__ ((packed));
-+
-+struct ieee80211_hdr_QOS {
-+ u16 frame_ctl;
-+ u16 duration_id;
-+ u8 addr1[ETH_ALEN];
-+ u8 addr2[ETH_ALEN];
-+ u8 addr3[ETH_ALEN];
-+ u16 seq_ctl;
-+ u8 addr4[ETH_ALEN];
-+ u16 QOS_ctl;
-+} __attribute__ ((packed));
-+
-+struct ieee80211_hdr_3addr {
-+ u16 frame_ctl;
-+ u16 duration_id;
-+ u8 addr1[ETH_ALEN];
-+ u8 addr2[ETH_ALEN];
-+ u8 addr3[ETH_ALEN];
-+ u16 seq_ctl;
-+} __attribute__ ((packed));
-+
-+struct ieee80211_hdr_3addr_QOS {
-+ u16 frame_ctl;
-+ u16 duration_id;
-+ u8 addr1[ETH_ALEN];
-+ u8 addr2[ETH_ALEN];
-+ u8 addr3[ETH_ALEN];
-+ u16 seq_ctl;
-+ u16 QOS_ctl;
-+} __attribute__ ((packed));
-+
-+enum eap_type {
-+ EAP_PACKET = 0,
-+ EAPOL_START,
-+ EAPOL_LOGOFF,
-+ EAPOL_KEY,
-+ EAPOL_ENCAP_ASF_ALERT
-+};
-+
-+static const char *eap_types[] = {
-+ [EAP_PACKET] = "EAP-Packet",
-+ [EAPOL_START] = "EAPOL-Start",
-+ [EAPOL_LOGOFF] = "EAPOL-Logoff",
-+ [EAPOL_KEY] = "EAPOL-Key",
-+ [EAPOL_ENCAP_ASF_ALERT] = "EAPOL-Encap-ASF-Alert"
-+};
-+
-+static inline const char *eap_get_type(int type)
-+{
-+ return (type >= ARRAY_SIZE(eap_types)) ? "Unknown" : eap_types[type];
-+}
-+
-+struct eapol {
-+ u8 snap[6];
-+ u16 ethertype;
-+ u8 version;
-+ u8 type;
-+ u16 length;
-+} __attribute__ ((packed));
-+
-+#define IEEE80211_3ADDR_LEN 24
-+#define IEEE80211_4ADDR_LEN 30
-+#define IEEE80211_FCS_LEN 4
-+
-+#define MIN_FRAG_THRESHOLD 256U
-+#define MAX_FRAG_THRESHOLD 2346U
-+
-+/* Frame control field constants */
-+#define IEEE80211_FCTL_VERS 0x0002
-+#define IEEE80211_FCTL_FTYPE 0x000c
-+#define IEEE80211_FCTL_STYPE 0x00f0
-+#define IEEE80211_FCTL_TODS 0x0100
-+#define IEEE80211_FCTL_FROMDS 0x0200
-+#define IEEE80211_FCTL_DSTODS 0x0300 //added by david
-+#define IEEE80211_FCTL_MOREFRAGS 0x0400
-+#define IEEE80211_FCTL_RETRY 0x0800
-+#define IEEE80211_FCTL_PM 0x1000
-+#define IEEE80211_FCTL_MOREDATA 0x2000
-+#define IEEE80211_FCTL_WEP 0x4000
-+#define IEEE80211_FCTL_ORDER 0x8000
-+
-+#define IEEE80211_FTYPE_MGMT 0x0000
-+#define IEEE80211_FTYPE_CTL 0x0004
-+#define IEEE80211_FTYPE_DATA 0x0008
-+
-+/* management */
-+#define IEEE80211_STYPE_ASSOC_REQ 0x0000
-+#define IEEE80211_STYPE_ASSOC_RESP 0x0010
-+#define IEEE80211_STYPE_REASSOC_REQ 0x0020
-+#define IEEE80211_STYPE_REASSOC_RESP 0x0030
-+#define IEEE80211_STYPE_PROBE_REQ 0x0040
-+#define IEEE80211_STYPE_PROBE_RESP 0x0050
-+#define IEEE80211_STYPE_BEACON 0x0080
-+#define IEEE80211_STYPE_ATIM 0x0090
-+#define IEEE80211_STYPE_DISASSOC 0x00A0
-+#define IEEE80211_STYPE_AUTH 0x00B0
-+#define IEEE80211_STYPE_DEAUTH 0x00C0
-+#define IEEE80211_STYPE_MANAGE_ACT 0x00D0
-+
-+/* control */
-+#define IEEE80211_STYPE_PSPOLL 0x00A0
-+#define IEEE80211_STYPE_RTS 0x00B0
-+#define IEEE80211_STYPE_CTS 0x00C0
-+#define IEEE80211_STYPE_ACK 0x00D0
-+#define IEEE80211_STYPE_CFEND 0x00E0
-+#define IEEE80211_STYPE_CFENDACK 0x00F0
-+
-+/* data */
-+#define IEEE80211_STYPE_DATA 0x0000
-+#define IEEE80211_STYPE_DATA_CFACK 0x0010
-+#define IEEE80211_STYPE_DATA_CFPOLL 0x0020
-+#define IEEE80211_STYPE_DATA_CFACKPOLL 0x0030
-+#define IEEE80211_STYPE_NULLFUNC 0x0040
-+#define IEEE80211_STYPE_CFACK 0x0050
-+#define IEEE80211_STYPE_CFPOLL 0x0060
-+#define IEEE80211_STYPE_CFACKPOLL 0x0070
-+#define IEEE80211_STYPE_QOS_DATA 0x0080 //added for WMM 2006/8/2
-+#define IEEE80211_STYPE_QOS_NULL 0x00C0
-+
-+
-+#define IEEE80211_SCTL_FRAG 0x000F
-+#define IEEE80211_SCTL_SEQ 0xFFF0
-+
-+
-+/* debug macros */
-+
-+#ifdef CONFIG_IEEE80211_DEBUG
-+extern u32 ieee80211_debug_level;
-+#define IEEE80211_DEBUG(level, fmt, args...) \
-+do { if (ieee80211_debug_level & (level)) \
-+ printk(KERN_DEBUG "ieee80211: %c %s " fmt, \
-+ in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
-+#else
-+#define IEEE80211_DEBUG(level, fmt, args...) do {} while (0)
-+#endif /* CONFIG_IEEE80211_DEBUG */
-+
-+/*
-+ * To use the debug system;
-+ *
-+ * If you are defining a new debug classification, simply add it to the #define
-+ * list here in the form of:
-+ *
-+ * #define IEEE80211_DL_xxxx VALUE
-+ *
-+ * shifting value to the left one bit from the previous entry. xxxx should be
-+ * the name of the classification (for example, WEP)
-+ *
-+ * You then need to either add a IEEE80211_xxxx_DEBUG() macro definition for your
-+ * classification, or use IEEE80211_DEBUG(IEEE80211_DL_xxxx, ...) whenever you want
-+ * to send output to that classification.
-+ *
-+ * To add your debug level to the list of levels seen when you perform
-+ *
-+ * % cat /proc/net/ipw/debug_level
-+ *
-+ * you simply need to add your entry to the ipw_debug_levels array.
-+ *
-+ * If you do not see debug_level in /proc/net/ipw then you do not have
-+ * CONFIG_IEEE80211_DEBUG defined in your kernel configuration
-+ *
-+ */
-+
-+#define IEEE80211_DL_INFO (1<<0)
-+#define IEEE80211_DL_WX (1<<1)
-+#define IEEE80211_DL_SCAN (1<<2)
-+#define IEEE80211_DL_STATE (1<<3)
-+#define IEEE80211_DL_MGMT (1<<4)
-+#define IEEE80211_DL_FRAG (1<<5)
-+#define IEEE80211_DL_EAP (1<<6)
-+#define IEEE80211_DL_DROP (1<<7)
-+
-+#define IEEE80211_DL_TX (1<<8)
-+#define IEEE80211_DL_RX (1<<9)
-+
-+#define IEEE80211_ERROR(f, a...) printk(KERN_ERR "ieee80211: " f, ## a)
-+#define IEEE80211_WARNING(f, a...) printk(KERN_WARNING "ieee80211: " f, ## a)
-+#define IEEE80211_DEBUG_INFO(f, a...) IEEE80211_DEBUG(IEEE80211_DL_INFO, f, ## a)
-+
-+#define IEEE80211_DEBUG_WX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_WX, f, ## a)
-+#define IEEE80211_DEBUG_SCAN(f, a...) IEEE80211_DEBUG(IEEE80211_DL_SCAN, f, ## a)
-+//#define IEEE_DEBUG_SCAN IEEE80211_WARNING
-+#define IEEE80211_DEBUG_STATE(f, a...) IEEE80211_DEBUG(IEEE80211_DL_STATE, f, ## a)
-+#define IEEE80211_DEBUG_MGMT(f, a...) IEEE80211_DEBUG(IEEE80211_DL_MGMT, f, ## a)
-+#define IEEE80211_DEBUG_FRAG(f, a...) IEEE80211_DEBUG(IEEE80211_DL_FRAG, f, ## a)
-+#define IEEE80211_DEBUG_EAP(f, a...) IEEE80211_DEBUG(IEEE80211_DL_EAP, f, ## a)
-+#define IEEE80211_DEBUG_DROP(f, a...) IEEE80211_DEBUG(IEEE80211_DL_DROP, f, ## a)
-+#define IEEE80211_DEBUG_TX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_TX, f, ## a)
-+#define IEEE80211_DEBUG_RX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_RX, f, ## a)
-+#include <linux/netdevice.h>
-+#include <linux/wireless.h>
-+#include <linux/if_arp.h> /* ARPHRD_ETHER */
-+
-+#ifndef WIRELESS_SPY
-+#define WIRELESS_SPY // enable iwspy support
-+#endif
-+#include <net/iw_handler.h> // new driver API
-+
-+#ifndef ETH_P_PAE
-+#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
-+#endif /* ETH_P_PAE */
-+
-+#define ETH_P_PREAUTH 0x88C7 /* IEEE 802.11i pre-authentication */
-+
-+#ifndef ETH_P_80211_RAW
-+#define ETH_P_80211_RAW (ETH_P_ECONET + 1)
-+#endif
-+
-+/* IEEE 802.11 defines */
-+
-+#define P80211_OUI_LEN 3
-+
-+struct ieee80211_snap_hdr {
-+
-+ u8 dsap; /* always 0xAA */
-+ u8 ssap; /* always 0xAA */
-+ u8 ctrl; /* always 0x03 */
-+ u8 oui[P80211_OUI_LEN]; /* organizational universal id */
-+
-+} __attribute__ ((packed));
-+
-+#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
-+
-+#define WLAN_FC_GET_TYPE(fc) ((fc) & IEEE80211_FCTL_FTYPE)
-+#define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE)
-+
-+#define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG)
-+#define WLAN_GET_SEQ_SEQ(seq) ((seq) & IEEE80211_SCTL_SEQ)
-+
-+/* Authentication algorithms */
-+#define WLAN_AUTH_OPEN 0
-+#define WLAN_AUTH_SHARED_KEY 1
-+
-+#define WLAN_AUTH_CHALLENGE_LEN 128
-+
-+#define WLAN_CAPABILITY_BSS (1<<0)
-+#define WLAN_CAPABILITY_IBSS (1<<1)
-+#define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
-+#define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
-+#define WLAN_CAPABILITY_PRIVACY (1<<4)
-+#define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
-+#define WLAN_CAPABILITY_PBCC (1<<6)
-+#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
-+#define WLAN_CAPABILITY_SHORT_SLOT (1<<10)
-+
-+/* Status codes */
-+#define WLAN_STATUS_SUCCESS 0
-+#define WLAN_STATUS_UNSPECIFIED_FAILURE 1
-+#define WLAN_STATUS_CAPS_UNSUPPORTED 10
-+#define WLAN_STATUS_REASSOC_NO_ASSOC 11
-+#define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12
-+#define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13
-+#define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14
-+#define WLAN_STATUS_CHALLENGE_FAIL 15
-+#define WLAN_STATUS_AUTH_TIMEOUT 16
-+#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17
-+#define WLAN_STATUS_ASSOC_DENIED_RATES 18
-+/* 802.11b */
-+#define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19
-+#define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20
-+#define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21
-+
-+/* Reason codes */
-+#define WLAN_REASON_UNSPECIFIED 1
-+#define WLAN_REASON_PREV_AUTH_NOT_VALID 2
-+#define WLAN_REASON_DEAUTH_LEAVING 3
-+#define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4
-+#define WLAN_REASON_DISASSOC_AP_BUSY 5
-+#define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6
-+#define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7
-+#define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8
-+#define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
-+
-+
-+/* Information Element IDs */
-+#define WLAN_EID_SSID 0
-+#define WLAN_EID_SUPP_RATES 1
-+#define WLAN_EID_FH_PARAMS 2
-+#define WLAN_EID_DS_PARAMS 3
-+#define WLAN_EID_CF_PARAMS 4
-+#define WLAN_EID_TIM 5
-+#define WLAN_EID_IBSS_PARAMS 6
-+#define WLAN_EID_CHALLENGE 16
-+#define WLAN_EID_RSN 48
-+#define WLAN_EID_GENERIC 221
-+
-+#define IEEE80211_MGMT_HDR_LEN 24
-+#define IEEE80211_DATA_HDR3_LEN 24
-+#define IEEE80211_DATA_HDR4_LEN 30
-+
-+
-+#define IEEE80211_STATMASK_SIGNAL (1<<0)
-+#define IEEE80211_STATMASK_RSSI (1<<1)
-+#define IEEE80211_STATMASK_NOISE (1<<2)
-+#define IEEE80211_STATMASK_RATE (1<<3)
-+#define IEEE80211_STATMASK_WEMASK 0x7
-+
-+
-+#define IEEE80211_CCK_MODULATION (1<<0)
-+#define IEEE80211_OFDM_MODULATION (1<<1)
-+
-+#define IEEE80211_24GHZ_BAND (1<<0)
-+#define IEEE80211_52GHZ_BAND (1<<1)
-+
-+#define IEEE80211_CCK_RATE_LEN 4
-+#define IEEE80211_CCK_RATE_1MB 0x02
-+#define IEEE80211_CCK_RATE_2MB 0x04
-+#define IEEE80211_CCK_RATE_5MB 0x0B
-+#define IEEE80211_CCK_RATE_11MB 0x16
-+#define IEEE80211_OFDM_RATE_LEN 8
-+#define IEEE80211_OFDM_RATE_6MB 0x0C
-+#define IEEE80211_OFDM_RATE_9MB 0x12
-+#define IEEE80211_OFDM_RATE_12MB 0x18
-+#define IEEE80211_OFDM_RATE_18MB 0x24
-+#define IEEE80211_OFDM_RATE_24MB 0x30
-+#define IEEE80211_OFDM_RATE_36MB 0x48
-+#define IEEE80211_OFDM_RATE_48MB 0x60
-+#define IEEE80211_OFDM_RATE_54MB 0x6C
-+#define IEEE80211_BASIC_RATE_MASK 0x80
-+
-+#define IEEE80211_CCK_RATE_1MB_MASK (1<<0)
-+#define IEEE80211_CCK_RATE_2MB_MASK (1<<1)
-+#define IEEE80211_CCK_RATE_5MB_MASK (1<<2)
-+#define IEEE80211_CCK_RATE_11MB_MASK (1<<3)
-+#define IEEE80211_OFDM_RATE_6MB_MASK (1<<4)
-+#define IEEE80211_OFDM_RATE_9MB_MASK (1<<5)
-+#define IEEE80211_OFDM_RATE_12MB_MASK (1<<6)
-+#define IEEE80211_OFDM_RATE_18MB_MASK (1<<7)
-+#define IEEE80211_OFDM_RATE_24MB_MASK (1<<8)
-+#define IEEE80211_OFDM_RATE_36MB_MASK (1<<9)
-+#define IEEE80211_OFDM_RATE_48MB_MASK (1<<10)
-+#define IEEE80211_OFDM_RATE_54MB_MASK (1<<11)
-+
-+#define IEEE80211_CCK_RATES_MASK 0x0000000F
-+#define IEEE80211_CCK_BASIC_RATES_MASK (IEEE80211_CCK_RATE_1MB_MASK | \
-+ IEEE80211_CCK_RATE_2MB_MASK)
-+#define IEEE80211_CCK_DEFAULT_RATES_MASK (IEEE80211_CCK_BASIC_RATES_MASK | \
-+ IEEE80211_CCK_RATE_5MB_MASK | \
-+ IEEE80211_CCK_RATE_11MB_MASK)
-+
-+#define IEEE80211_OFDM_RATES_MASK 0x00000FF0
-+#define IEEE80211_OFDM_BASIC_RATES_MASK (IEEE80211_OFDM_RATE_6MB_MASK | \
-+ IEEE80211_OFDM_RATE_12MB_MASK | \
-+ IEEE80211_OFDM_RATE_24MB_MASK)
-+#define IEEE80211_OFDM_DEFAULT_RATES_MASK (IEEE80211_OFDM_BASIC_RATES_MASK | \
-+ IEEE80211_OFDM_RATE_9MB_MASK | \
-+ IEEE80211_OFDM_RATE_18MB_MASK | \
-+ IEEE80211_OFDM_RATE_36MB_MASK | \
-+ IEEE80211_OFDM_RATE_48MB_MASK | \
-+ IEEE80211_OFDM_RATE_54MB_MASK)
-+#define IEEE80211_DEFAULT_RATES_MASK (IEEE80211_OFDM_DEFAULT_RATES_MASK | \
-+ IEEE80211_CCK_DEFAULT_RATES_MASK)
-+
-+#define IEEE80211_NUM_OFDM_RATES 8
-+#define IEEE80211_NUM_CCK_RATES 4
-+#define IEEE80211_OFDM_SHIFT_MASK_A 4
-+
-+
-+
-+
-+/* NOTE: This data is for statistical purposes; not all hardware provides this
-+ * information for frames received. Not setting these will not cause
-+ * any adverse affects. */
-+struct ieee80211_rx_stats {
-+ u32 mac_time[2];
-+ u8 signalstrength;
-+ s8 rssi;
-+ u8 signal;
-+ u8 noise;
-+ u16 rate; /* in 100 kbps */
-+ u8 received_channel;
-+ u8 control;
-+ u8 mask;
-+ u8 freq;
-+ u16 len;
-+ u8 nic_type;
-+};
-+
-+/* IEEE 802.11 requires that STA supports concurrent reception of at least
-+ * three fragmented frames. This define can be increased to support more
-+ * concurrent frames, but it should be noted that each entry can consume about
-+ * 2 kB of RAM and increasing cache size will slow down frame reassembly. */
-+#define IEEE80211_FRAG_CACHE_LEN 4
-+
-+struct ieee80211_frag_entry {
-+ unsigned long first_frag_time;
-+ unsigned int seq;
-+ unsigned int last_frag;
-+ struct sk_buff *skb;
-+ u8 src_addr[ETH_ALEN];
-+ u8 dst_addr[ETH_ALEN];
-+};
-+
-+struct ieee80211_stats {
-+ unsigned int tx_unicast_frames;
-+ unsigned int tx_multicast_frames;
-+ unsigned int tx_fragments;
-+ unsigned int tx_unicast_octets;
-+ unsigned int tx_multicast_octets;
-+ unsigned int tx_deferred_transmissions;
-+ unsigned int tx_single_retry_frames;
-+ unsigned int tx_multiple_retry_frames;
-+ unsigned int tx_retry_limit_exceeded;
-+ unsigned int tx_discards;
-+ unsigned int rx_unicast_frames;
-+ unsigned int rx_multicast_frames;
-+ unsigned int rx_fragments;
-+ unsigned int rx_unicast_octets;
-+ unsigned int rx_multicast_octets;
-+ unsigned int rx_fcs_errors;
-+ unsigned int rx_discards_no_buffer;
-+ unsigned int tx_discards_wrong_sa;
-+ unsigned int rx_discards_undecryptable;
-+ unsigned int rx_message_in_msg_fragments;
-+ unsigned int rx_message_in_bad_msg_fragments;
-+};
-+
-+struct ieee80211_softmac_stats{
-+ unsigned int rx_ass_ok;
-+ unsigned int rx_ass_err;
-+ unsigned int rx_probe_rq;
-+ unsigned int tx_probe_rs;
-+ unsigned int tx_beacons;
-+ unsigned int rx_auth_rq;
-+ unsigned int rx_auth_rs_ok;
-+ unsigned int rx_auth_rs_err;
-+ unsigned int tx_auth_rq;
-+ unsigned int no_auth_rs;
-+ unsigned int no_ass_rs;
-+ unsigned int tx_ass_rq;
-+ unsigned int rx_ass_rq;
-+ unsigned int tx_probe_rq;
-+ unsigned int reassoc;
-+ unsigned int swtxstop;
-+ unsigned int swtxawake;
-+};
-+
-+struct ieee80211_device;
-+
-+#include "ieee80211_crypt.h"
-+
-+#define SEC_KEY_1 (1<<0)
-+#define SEC_KEY_2 (1<<1)
-+#define SEC_KEY_3 (1<<2)
-+#define SEC_KEY_4 (1<<3)
-+#define SEC_ACTIVE_KEY (1<<4)
-+#define SEC_AUTH_MODE (1<<5)
-+#define SEC_UNICAST_GROUP (1<<6)
-+#define SEC_LEVEL (1<<7)
-+#define SEC_ENABLED (1<<8)
-+
-+#define SEC_LEVEL_0 0 /* None */
-+#define SEC_LEVEL_1 1 /* WEP 40 and 104 bit */
-+#define SEC_LEVEL_2 2 /* Level 1 + TKIP */
-+#define SEC_LEVEL_2_CKIP 3 /* Level 1 + CKIP */
-+#define SEC_LEVEL_3 4 /* Level 2 + CCMP */
-+
-+#define WEP_KEYS 4
-+#define WEP_KEY_LEN 13
-+
-+#define WEP_KEY_LEN_MODIF 32
-+
-+struct ieee80211_security {
-+ u16 active_key:2,
-+ enabled:1,
-+ auth_mode:2,
-+ auth_algo:4,
-+ unicast_uses_group:1;
-+ u8 key_sizes[WEP_KEYS];
-+ u8 keys[WEP_KEYS][WEP_KEY_LEN_MODIF];
-+ u8 level;
-+ u16 flags;
-+} __attribute__ ((packed));
-+
-+
-+/*
-+
-+ 802.11 data frame from AP
-+
-+ ,-------------------------------------------------------------------.
-+Bytes | 2 | 2 | 6 | 6 | 6 | 2 | 0..2312 | 4 |
-+ |------|------|---------|---------|---------|------|---------|------|
-+Desc. | ctrl | dura | DA/RA | TA | SA | Sequ | frame | fcs |
-+ | | tion | (BSSID) | | | ence | data | |
-+ `-------------------------------------------------------------------'
-+
-+Total: 28-2340 bytes
-+
-+*/
-+
-+struct ieee80211_header_data {
-+ u16 frame_ctl;
-+ u16 duration_id;
-+ u8 addr1[6];
-+ u8 addr2[6];
-+ u8 addr3[6];
-+ u16 seq_ctrl;
-+};
-+
-+#define BEACON_PROBE_SSID_ID_POSITION 12
-+
-+/* Management Frame Information Element Types */
-+#define MFIE_TYPE_SSID 0
-+#define MFIE_TYPE_RATES 1
-+#define MFIE_TYPE_FH_SET 2
-+#define MFIE_TYPE_DS_SET 3
-+#define MFIE_TYPE_CF_SET 4
-+#define MFIE_TYPE_TIM 5
-+#define MFIE_TYPE_IBSS_SET 6
-+#define MFIE_TYPE_COUNTRY 7 //+YJ,080625
-+#define MFIE_TYPE_CHALLENGE 16
-+#define MFIE_TYPE_ERP 42
-+#define MFIE_TYPE_RSN 48
-+#define MFIE_TYPE_RATES_EX 50
-+#define MFIE_TYPE_GENERIC 221
-+
-+#ifdef ENABLE_DOT11D
-+typedef enum
-+{
-+ COUNTRY_CODE_FCC = 0,
-+ COUNTRY_CODE_IC = 1,
-+ COUNTRY_CODE_ETSI = 2,
-+ COUNTRY_CODE_SPAIN = 3,
-+ COUNTRY_CODE_FRANCE = 4,
-+ COUNTRY_CODE_MKK = 5,
-+ COUNTRY_CODE_MKK1 = 6,
-+ COUNTRY_CODE_ISRAEL = 7,
-+ COUNTRY_CODE_TELEC = 8,
-+ COUNTRY_CODE_GLOBAL_DOMAIN = 9,
-+ COUNTRY_CODE_WORLD_WIDE_13_INDEX = 10
-+}country_code_type_t;
-+#endif
-+
-+struct ieee80211_info_element_hdr {
-+ u8 id;
-+ u8 len;
-+} __attribute__ ((packed));
-+
-+struct ieee80211_info_element {
-+ u8 id;
-+ u8 len;
-+ u8 data[0];
-+} __attribute__ ((packed));
-+
-+/*
-+ * These are the data types that can make up management packets
-+ *
-+ u16 auth_algorithm;
-+ u16 auth_sequence;
-+ u16 beacon_interval;
-+ u16 capability;
-+ u8 current_ap[ETH_ALEN];
-+ u16 listen_interval;
-+ struct {
-+ u16 association_id:14, reserved:2;
-+ } __attribute__ ((packed));
-+ u32 time_stamp[2];
-+ u16 reason;
-+ u16 status;
-+*/
-+
-+#define IEEE80211_DEFAULT_TX_ESSID "Penguin"
-+#define IEEE80211_DEFAULT_BASIC_RATE 10
-+
-+struct ieee80211_authentication {
-+ struct ieee80211_header_data header;
-+ u16 algorithm;
-+ u16 transaction;
-+ u16 status;
-+ //struct ieee80211_info_element_hdr info_element;
-+} __attribute__ ((packed));
-+
-+
-+struct ieee80211_probe_response {
-+ struct ieee80211_header_data header;
-+ u32 time_stamp[2];
-+ u16 beacon_interval;
-+ u16 capability;
-+ struct ieee80211_info_element info_element;
-+} __attribute__ ((packed));
-+
-+struct ieee80211_probe_request {
-+ struct ieee80211_header_data header;
-+ /*struct ieee80211_info_element info_element;*/
-+} __attribute__ ((packed));
-+
-+struct ieee80211_assoc_request_frame {
-+ struct ieee80211_hdr_3addr header;
-+ u16 capability;
-+ u16 listen_interval;
-+ //u8 current_ap[ETH_ALEN];
-+ struct ieee80211_info_element_hdr info_element;
-+} __attribute__ ((packed));
-+
-+struct ieee80211_assoc_response_frame {
-+ struct ieee80211_hdr_3addr header;
-+ u16 capability;
-+ u16 status;
-+ u16 aid;
-+ struct ieee80211_info_element info_element; /* supported rates */
-+} __attribute__ ((packed));
-+
-+struct ieee80211_disassoc_frame{
-+ struct ieee80211_hdr_3addr header;
-+ u16 reasoncode;
-+}__attribute__ ((packed));
-+
-+struct ieee80211_txb {
-+ u8 nr_frags;
-+ u8 encrypted;
-+ u16 reserved;
-+ u16 frag_size;
-+ u16 payload_size;
-+ struct sk_buff *fragments[0];
-+};
-+
-+struct ieee80211_wmm_ac_param {
-+ u8 ac_aci_acm_aifsn;
-+ u8 ac_ecwmin_ecwmax;
-+ u16 ac_txop_limit;
-+};
-+
-+struct ieee80211_wmm_ts_info {
-+ u8 ac_dir_tid;
-+ u8 ac_up_psb;
-+ u8 reserved;
-+} __attribute__ ((packed));
-+
-+struct ieee80211_wmm_tspec_elem {
-+ struct ieee80211_wmm_ts_info ts_info;
-+ u16 norm_msdu_size;
-+ u16 max_msdu_size;
-+ u32 min_serv_inter;
-+ u32 max_serv_inter;
-+ u32 inact_inter;
-+ u32 suspen_inter;
-+ u32 serv_start_time;
-+ u32 min_data_rate;
-+ u32 mean_data_rate;
-+ u32 peak_data_rate;
-+ u32 max_burst_size;
-+ u32 delay_bound;
-+ u32 min_phy_rate;
-+ u16 surp_band_allow;
-+ u16 medium_time;
-+}__attribute__((packed));
-+
-+enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};
-+#define MAX_SP_Len (WMM_all_frame << 4)
-+#define IEEE80211_QOS_TID 0x0f
-+#define QOS_CTL_NOTCONTAIN_ACK (0x01 << 5)
-+
-+/* SWEEP TABLE ENTRIES NUMBER*/
-+#define MAX_SWEEP_TAB_ENTRIES 42
-+#define MAX_SWEEP_TAB_ENTRIES_PER_PACKET 7
-+/* MAX_RATES_LENGTH needs to be 12. The spec says 8, and many APs
-+ * only use 8, and then use extended rates for the remaining supported
-+ * rates. Other APs, however, stick all of their supported rates on the
-+ * main rates information element... */
-+#define MAX_RATES_LENGTH ((u8)12)
-+#define MAX_RATES_EX_LENGTH ((u8)16)
-+#define MAX_NETWORK_COUNT 128
-+//#define MAX_CHANNEL_NUMBER 161
-+#define MAX_CHANNEL_NUMBER 165 //YJ,modified,080625
-+#define MAX_IE_LEN 0xFF //+YJ,080625
-+
-+typedef struct _CHANNEL_LIST{
-+ u8 Channel[MAX_CHANNEL_NUMBER + 1];
-+ u8 Len;
-+}CHANNEL_LIST, *PCHANNEL_LIST;
-+
-+#define IEEE80211_SOFTMAC_SCAN_TIME 100//400
-+//(HZ / 2)
-+//by amy for ps
-+#define IEEE80211_WATCH_DOG_TIME 2000
-+//by amy for ps
-+//by amy for antenna
-+#define ANTENNA_DIVERSITY_TIMER_PERIOD 1000 // 1000 m
-+//by amy for antenna
-+#define IEEE80211_SOFTMAC_ASSOC_RETRY_TIME (HZ * 2)
-+
-+#define CRC_LENGTH 4U
-+
-+#define MAX_WPA_IE_LEN 64
-+
-+#define NETWORK_EMPTY_ESSID (1<<0)
-+#define NETWORK_HAS_OFDM (1<<1)
-+#define NETWORK_HAS_CCK (1<<2)
-+
-+#define IEEE80211_DTIM_MBCAST 4
-+#define IEEE80211_DTIM_UCAST 2
-+#define IEEE80211_DTIM_VALID 1
-+#define IEEE80211_DTIM_INVALID 0
-+
-+#define IEEE80211_PS_DISABLED 0
-+#define IEEE80211_PS_UNICAST IEEE80211_DTIM_UCAST
-+#define IEEE80211_PS_MBCAST IEEE80211_DTIM_MBCAST
-+#define IEEE80211_PS_ENABLE IEEE80211_DTIM_VALID
-+//added by David for QoS 2006/6/30
-+//#define WMM_Hang_8187
-+#ifdef WMM_Hang_8187
-+#undef WMM_Hang_8187
-+#endif
-+
-+#define WME_AC_BE 0x00
-+#define WME_AC_BK 0x01
-+#define WME_AC_VI 0x02
-+#define WME_AC_VO 0x03
-+#define WME_ACI_MASK 0x03
-+#define WME_AIFSN_MASK 0x03
-+#define WME_AC_PRAM_LEN 16
-+
-+//UP Mapping to AC, using in MgntQuery_SequenceNumber() and maybe for DSCP
-+//#define UP2AC(up) ((up<3) ? ((up==0)?1:0) : (up>>1))
-+#define UP2AC(up) ( \
-+ ((up) < 1) ? WME_AC_BE : \
-+ ((up) < 3) ? WME_AC_BK : \
-+ ((up) < 4) ? WME_AC_BE : \
-+ ((up) < 6) ? WME_AC_VI : \
-+ WME_AC_VO)
-+//AC Mapping to UP, using in Tx part for selecting the corresponding TX queue
-+#define AC2UP(_ac) ( \
-+ ((_ac) == WME_AC_VO) ? 6 : \
-+ ((_ac) == WME_AC_VI) ? 5 : \
-+ ((_ac) == WME_AC_BK) ? 1 : \
-+ 0)
-+
-+#define ETHER_ADDR_LEN 6 /* length of an Ethernet address */
-+struct ether_header {
-+ u8 ether_dhost[ETHER_ADDR_LEN];
-+ u8 ether_shost[ETHER_ADDR_LEN];
-+ u16 ether_type;
-+} __attribute__((packed));
-+
-+#ifndef ETHERTYPE_PAE
-+#define ETHERTYPE_PAE 0x888e /* EAPOL PAE/802.1x */
-+#endif
-+#ifndef ETHERTYPE_IP
-+#define ETHERTYPE_IP 0x0800 /* IP protocol */
-+#endif
-+
-+struct ieee80211_network {
-+ /* These entries are used to identify a unique network */
-+ u8 bssid[ETH_ALEN];
-+ u8 channel;
-+ /* Ensure null-terminated for any debug msgs */
-+ u8 ssid[IW_ESSID_MAX_SIZE + 1];
-+ u8 ssid_len;
-+
-+ /* These are network statistics */
-+ struct ieee80211_rx_stats stats;
-+ u16 capability;
-+ u8 rates[MAX_RATES_LENGTH];
-+ u8 rates_len;
-+ u8 rates_ex[MAX_RATES_EX_LENGTH];
-+ u8 rates_ex_len;
-+ unsigned long last_scanned;
-+ u8 mode;
-+ u8 flags;
-+ u32 last_associate;
-+ u32 time_stamp[2];
-+ u16 beacon_interval;
-+ u16 listen_interval;
-+ u16 atim_window;
-+ u8 wpa_ie[MAX_WPA_IE_LEN];
-+ size_t wpa_ie_len;
-+ u8 rsn_ie[MAX_WPA_IE_LEN];
-+ size_t rsn_ie_len;
-+ u8 dtim_period;
-+ u8 dtim_data;
-+ u32 last_dtim_sta_time[2];
-+ struct list_head list;
-+ //appeded for QoS
-+ u8 wmm_info;
-+ struct ieee80211_wmm_ac_param wmm_param[4];
-+ u8 QoS_Enable;
-+ u8 SignalStrength;
-+//by amy 080312
-+ u8 HighestOperaRate;
-+//by amy 080312
-+#ifdef THOMAS_TURBO
-+ u8 Turbo_Enable;//enable turbo mode, added by thomas
-+#endif
-+#ifdef ENABLE_DOT11D
-+ u16 CountryIeLen;
-+ u8 CountryIeBuf[MAX_IE_LEN];
-+#endif
-+};
-+
-+enum ieee80211_state {
-+
-+ /* the card is not linked at all */
-+ IEEE80211_NOLINK = 0,
-+
-+ /* IEEE80211_ASSOCIATING* are for BSS client mode
-+ * the driver shall not perform RX filtering unless
-+ * the state is LINKED.
-+ * The driver shall just check for the state LINKED and
-+ * defaults to NOLINK for ALL the other states (including
-+ * LINKED_SCANNING)
-+ */
-+
-+ /* the association procedure will start (wq scheduling)*/
-+ IEEE80211_ASSOCIATING,
-+ IEEE80211_ASSOCIATING_RETRY,
-+
-+ /* the association procedure is sending AUTH request*/
-+ IEEE80211_ASSOCIATING_AUTHENTICATING,
-+
-+ /* the association procedure has successfully authentcated
-+ * and is sending association request
-+ */
-+ IEEE80211_ASSOCIATING_AUTHENTICATED,
-+
-+ /* the link is ok. the card associated to a BSS or linked
-+ * to a ibss cell or acting as an AP and creating the bss
-+ */
-+ IEEE80211_LINKED,
-+
-+ /* same as LINKED, but the driver shall apply RX filter
-+ * rules as we are in NO_LINK mode. As the card is still
-+ * logically linked, but it is doing a syncro site survey
-+ * then it will be back to LINKED state.
-+ */
-+ IEEE80211_LINKED_SCANNING,
-+
-+};
-+
-+#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
-+#define DEFAULT_FTS 2346
-+#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
-+#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
-+
-+
-+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,11))
-+extern inline int is_multicast_ether_addr(const u8 *addr)
-+{
-+ return ((addr[0] != 0xff) && (0x01 & addr[0]));
-+}
-+#endif
-+
-+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,13))
-+extern inline int is_broadcast_ether_addr(const u8 *addr)
-+{
-+ return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
-+ (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
-+}
-+#endif
-+
-+#define CFG_IEEE80211_RESERVE_FCS (1<<0)
-+#define CFG_IEEE80211_COMPUTE_FCS (1<<1)
-+
-+typedef struct tx_pending_t{
-+ int frag;
-+ struct ieee80211_txb *txb;
-+}tx_pending_t;
-+
-+
-+struct ieee80211_device {
-+ struct net_device *dev;
-+
-+ /* Bookkeeping structures */
-+ struct net_device_stats stats;
-+ struct ieee80211_stats ieee_stats;
-+ struct ieee80211_softmac_stats softmac_stats;
-+
-+ /* Probe / Beacon management */
-+ struct list_head network_free_list;
-+ struct list_head network_list;
-+ struct ieee80211_network *networks;
-+ int scans;
-+ int scan_age;
-+
-+ int iw_mode; /* operating mode (IW_MODE_*) */
-+
-+ spinlock_t lock;
-+ spinlock_t wpax_suitlist_lock;
-+
-+ int tx_headroom; /* Set to size of any additional room needed at front
-+ * of allocated Tx SKBs */
-+ u32 config;
-+
-+ /* WEP and other encryption related settings at the device level */
-+ int open_wep; /* Set to 1 to allow unencrypted frames */
-+
-+ int reset_on_keychange; /* Set to 1 if the HW needs to be reset on
-+ * WEP key changes */
-+
-+ /* If the host performs {en,de}cryption, then set to 1 */
-+ int host_encrypt;
-+ int host_decrypt;
-+ int ieee802_1x; /* is IEEE 802.1X used */
-+
-+ /* WPA data */
-+ int wpa_enabled;
-+ int drop_unencrypted;
-+ int tkip_countermeasures;
-+ int privacy_invoked;
-+ size_t wpa_ie_len;
-+ u8 *wpa_ie;
-+
-+ u8 ap_mac_addr[6];
-+ u16 pairwise_key_type;
-+ u16 broadcast_key_type;
-+
-+ struct list_head crypt_deinit_list;
-+ struct ieee80211_crypt_data *crypt[WEP_KEYS];
-+ int tx_keyidx; /* default TX key index (crypt[tx_keyidx]) */
-+ struct timer_list crypt_deinit_timer;
-+
-+ int bcrx_sta_key; /* use individual keys to override default keys even
-+ * with RX of broad/multicast frames */
-+
-+ /* Fragmentation structures */
-+ // each streaming contain a entry
-+ struct ieee80211_frag_entry frag_cache[17][IEEE80211_FRAG_CACHE_LEN];
-+ unsigned int frag_next_idx[17];
-+ u16 fts; /* Fragmentation Threshold */
-+
-+ /* This stores infos for the current network.
-+ * Either the network we are associated in INFRASTRUCTURE
-+ * or the network that we are creating in MASTER mode.
-+ * ad-hoc is a mixture ;-).
-+ * Note that in infrastructure mode, even when not associated,
-+ * fields bssid and essid may be valid (if wpa_set and essid_set
-+ * are true) as thy carry the value set by the user via iwconfig
-+ */
-+ struct ieee80211_network current_network;
-+
-+
-+ enum ieee80211_state state;
-+
-+ int short_slot;
-+ int mode; /* A, B, G */
-+ int modulation; /* CCK, OFDM */
-+ int freq_band; /* 2.4Ghz, 5.2Ghz, Mixed */
-+ int abg_true; /* ABG flag */
-+
-+ /* used for forcing the ibss workqueue to terminate
-+ * without wait for the syncro scan to terminate
-+ */
-+ short sync_scan_hurryup;
-+
-+#ifdef ENABLE_DOT11D
-+ void * pDot11dInfo;
-+ bool bGlobalDomain;
-+
-+ // For Liteon Ch12~13 passive scan
-+ u8 MinPassiveChnlNum;
-+ u8 IbssStartChnl;
-+#else
-+ /* map of allowed channels. 0 is dummy */
-+ // FIXME: remeber to default to a basic channel plan depending of the PHY type
-+ int channel_map[MAX_CHANNEL_NUMBER+1];
-+#endif
-+
-+ int rate; /* current rate */
-+ int basic_rate;
-+ //FIXME: pleace callback, see if redundant with softmac_features
-+ short active_scan;
-+
-+ /* this contains flags for selectively enable softmac support */
-+ u16 softmac_features;
-+
-+ /* if the sequence control field is not filled by HW */
-+ u16 seq_ctrl[5];
-+
-+ /* association procedure transaction sequence number */
-+ u16 associate_seq;
-+
-+ /* AID for RTXed association responses */
-+ u16 assoc_id;
-+
-+ /* power save mode related*/
-+ short ps;
-+ short sta_sleep;
-+ int ps_timeout;
-+ struct tasklet_struct ps_task;
-+ u32 ps_th;
-+ u32 ps_tl;
-+
-+ short raw_tx;
-+ /* used if IEEE_SOFTMAC_TX_QUEUE is set */
-+ short queue_stop;
-+ short scanning;
-+ short proto_started;
-+
-+ struct semaphore wx_sem;
-+ struct semaphore scan_sem;
-+
-+ spinlock_t mgmt_tx_lock;
-+ spinlock_t beacon_lock;
-+
-+ short beacon_txing;
-+
-+ short wap_set;
-+ short ssid_set;
-+
-+ u8 wpax_type_set; //{added by David, 2006.9.28}
-+ u32 wpax_type_notify; //{added by David, 2006.9.26}
-+
-+ /* QoS related flag */
-+ char init_wmmparam_flag;
-+
-+ /* for discarding duplicated packets in IBSS */
-+ struct list_head ibss_mac_hash[IEEE_IBSS_MAC_HASH_SIZE];
-+
-+ /* for discarding duplicated packets in BSS */
-+ u16 last_rxseq_num[17]; /* rx seq previous per-tid */
-+ u16 last_rxfrag_num[17];/* tx frag previous per-tid */
-+ unsigned long last_packet_time[17];
-+
-+ /* for PS mode */
-+ unsigned long last_rx_ps_time;
-+
-+ /* used if IEEE_SOFTMAC_SINGLE_QUEUE is set */
-+ struct sk_buff *mgmt_queue_ring[MGMT_QUEUE_NUM];
-+ int mgmt_queue_head;
-+ int mgmt_queue_tail;
-+
-+
-+ /* used if IEEE_SOFTMAC_TX_QUEUE is set */
-+ struct tx_pending_t tx_pending;
-+
-+ /* used if IEEE_SOFTMAC_ASSOCIATE is set */
-+ struct timer_list associate_timer;
-+
-+ /* used if IEEE_SOFTMAC_BEACONS is set */
-+ struct timer_list beacon_timer;
-+
-+ struct work_struct associate_complete_wq;
-+// struct work_struct associate_retry_wq;
-+ struct work_struct associate_procedure_wq;
-+// struct work_struct softmac_scan_wq;
-+ struct work_struct wx_sync_scan_wq;
-+ struct work_struct wmm_param_update_wq;
-+ struct work_struct ps_request_tx_ack_wq;//for ps
-+// struct work_struct hw_wakeup_wq;
-+// struct work_struct hw_sleep_wq;
-+// struct work_struct watch_dog_wq;
-+ bool bInactivePs;
-+ bool actscanning;
-+ bool beinretry;
-+ u16 ListenInterval;
-+ unsigned long NumRxDataInPeriod; //YJ,add,080828
-+ unsigned long NumRxBcnInPeriod; //YJ,add,080828
-+ unsigned long NumRxOkTotal;
-+ unsigned long NumRxUnicast;//YJ,add,080828,for keep alive
-+ bool bHwRadioOff;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
-+ struct delayed_work softmac_scan_wq;
-+ struct delayed_work associate_retry_wq;
-+ struct delayed_work hw_wakeup_wq;
-+ struct delayed_work hw_sleep_wq;//+by amy 080324
-+ struct delayed_work watch_dog_wq;
-+ struct delayed_work sw_antenna_wq;
-+ struct delayed_work start_ibss_wq;
-+//by amy for rate adaptive 080312
-+ struct delayed_work rate_adapter_wq;
-+//by amy for rate adaptive
-+ struct delayed_work hw_dig_wq;
-+ struct delayed_work tx_pw_wq;
-+
-+//Added for RF power on power off by lizhaoming 080512
-+ struct delayed_work GPIOChangeRFWorkItem;
-+#else
-+
-+ struct work_struct start_ibss_wq;
-+ struct work_struct softmac_scan_wq;
-+ struct work_struct associate_retry_wq;
-+ struct work_struct hw_wakeup_wq;
-+ struct work_struct hw_sleep_wq;
-+ struct work_struct watch_dog_wq;
-+ struct work_struct sw_antenna_wq;
-+//by amy for rate adaptive 080312
-+ struct work_struct rate_adapter_wq;
-+//by amy for rate adaptive
-+ struct work_struct hw_dig_wq;
-+ struct work_struct tx_pw_wq;
-+
-+//Added for RF power on power off by lizhaoming 080512
-+ struct work_struct GPIOChangeRFWorkItem;
-+#endif
-+ struct workqueue_struct *wq;
-+
-+ /* Callback functions */
-+ void (*set_security)(struct net_device *dev,
-+ struct ieee80211_security *sec);
-+
-+ /* Used to TX data frame by using txb structs.
-+ * this is not used if in the softmac_features
-+ * is set the flag IEEE_SOFTMAC_TX_QUEUE
-+ */
-+ int (*hard_start_xmit)(struct ieee80211_txb *txb,
-+ struct net_device *dev);
-+
-+ int (*reset_port)(struct net_device *dev);
-+
-+ /* Softmac-generated frames (mamagement) are TXed via this
-+ * callback if the flag IEEE_SOFTMAC_SINGLE_QUEUE is
-+ * not set. As some cards may have different HW queues that
-+ * one might want to use for data and management frames
-+ * the option to have two callbacks might be useful.
-+ * This fucntion can't sleep.
-+ */
-+ int (*softmac_hard_start_xmit)(struct sk_buff *skb,
-+ struct net_device *dev);
-+
-+ /* used instead of hard_start_xmit (not softmac_hard_start_xmit)
-+ * if the IEEE_SOFTMAC_TX_QUEUE feature is used to TX data
-+ * frames. I the option IEEE_SOFTMAC_SINGLE_QUEUE is also set
-+ * then also management frames are sent via this callback.
-+ * This function can't sleep.
-+ */
-+ void (*softmac_data_hard_start_xmit)(struct sk_buff *skb,
-+ struct net_device *dev,int rate);
-+
-+ /* stops the HW queue for DATA frames. Useful to avoid
-+ * waste time to TX data frame when we are reassociating
-+ * This function can sleep.
-+ */
-+ void (*data_hard_stop)(struct net_device *dev);
-+
-+ /* OK this is complementar to data_poll_hard_stop */
-+ void (*data_hard_resume)(struct net_device *dev);
-+
-+ /* ask to the driver to retune the radio .
-+ * This function can sleep. the driver should ensure
-+ * the radio has been swithced before return.
-+ */
-+ void (*set_chan)(struct net_device *dev,short ch);
-+
-+ /* These are not used if the ieee stack takes care of
-+ * scanning (IEEE_SOFTMAC_SCAN feature set).
-+ * In this case only the set_chan is used.
-+ *
-+ * The syncro version is similar to the start_scan but
-+ * does not return until all channels has been scanned.
-+ * this is called in user context and should sleep,
-+ * it is called in a work_queue when swithcing to ad-hoc mode
-+ * or in behalf of iwlist scan when the card is associated
-+ * and root user ask for a scan.
-+ * the fucntion stop_scan should stop both the syncro and
-+ * background scanning and can sleep.
-+ * The fucntion start_scan should initiate the background
-+ * scanning and can't sleep.
-+ */
-+ void (*scan_syncro)(struct net_device *dev);
-+ void (*start_scan)(struct net_device *dev);
-+ void (*stop_scan)(struct net_device *dev);
-+
-+ /* indicate the driver that the link state is changed
-+ * for example it may indicate the card is associated now.
-+ * Driver might be interested in this to apply RX filter
-+ * rules or simply light the LINK led
-+ */
-+ void (*link_change)(struct net_device *dev);
-+
-+ /* these two function indicates to the HW when to start
-+ * and stop to send beacons. This is used when the
-+ * IEEE_SOFTMAC_BEACONS is not set. For now the
-+ * stop_send_bacons is NOT guaranteed to be called only
-+ * after start_send_beacons.
-+ */
-+ void (*start_send_beacons) (struct net_device *dev);
-+ void (*stop_send_beacons) (struct net_device *dev);
-+
-+ /* power save mode related */
-+ void (*sta_wake_up) (struct net_device *dev);
-+ void (*ps_request_tx_ack) (struct net_device *dev);
-+ void (*enter_sleep_state) (struct net_device *dev, u32 th, u32 tl);
-+ short (*ps_is_queue_empty) (struct net_device *dev);
-+
-+ /* QoS related */
-+ //void (*wmm_param_update) (struct net_device *dev, u8 *ac_param);
-+ //void (*wmm_param_update) (struct ieee80211_device *ieee);
-+
-+ /* This must be the last item so that it points to the data
-+ * allocated beyond this structure by alloc_ieee80211 */
-+ u8 priv[0];
-+};
-+
-+#define IEEE_A (1<<0)
-+#define IEEE_B (1<<1)
-+#define IEEE_G (1<<2)
-+#define IEEE_MODE_MASK (IEEE_A|IEEE_B|IEEE_G)
-+
-+/* Generate a 802.11 header */
-+
-+/* Uses the channel change callback directly
-+ * instead of [start/stop] scan callbacks
-+ */
-+#define IEEE_SOFTMAC_SCAN (1<<2)
-+
-+/* Perform authentication and association handshake */
-+#define IEEE_SOFTMAC_ASSOCIATE (1<<3)
-+
-+/* Generate probe requests */
-+#define IEEE_SOFTMAC_PROBERQ (1<<4)
-+
-+/* Generate respones to probe requests */
-+#define IEEE_SOFTMAC_PROBERS (1<<5)
-+
-+/* The ieee802.11 stack will manages the netif queue
-+ * wake/stop for the driver, taking care of 802.11
-+ * fragmentation. See softmac.c for details. */
-+#define IEEE_SOFTMAC_TX_QUEUE (1<<7)
-+
-+/* Uses only the softmac_data_hard_start_xmit
-+ * even for TX management frames.
-+ */
-+#define IEEE_SOFTMAC_SINGLE_QUEUE (1<<8)
-+
-+/* Generate beacons. The stack will enqueue beacons
-+ * to the card
-+ */
-+#define IEEE_SOFTMAC_BEACONS (1<<6)
-+
-+
-+
-+static inline void *ieee80211_priv(struct net_device *dev)
-+{
-+ return ((struct ieee80211_device *)netdev_priv(dev))->priv;
-+}
-+
-+extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
-+{
-+ /* Single white space is for Linksys APs */
-+ if (essid_len == 1 && essid[0] == ' ')
-+ return 1;
-+
-+ /* Otherwise, if the entire essid is 0, we assume it is hidden */
-+ while (essid_len) {
-+ essid_len--;
-+ if (essid[essid_len] != '\0')
-+ return 0;
-+ }
-+
-+ return 1;
-+}
-+
-+extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode)
-+{
-+ /*
-+ * It is possible for both access points and our device to support
-+ * combinations of modes, so as long as there is one valid combination
-+ * of ap/device supported modes, then return success
-+ *
-+ */
-+ if ((mode & IEEE_A) &&
-+ (ieee->modulation & IEEE80211_OFDM_MODULATION) &&
-+ (ieee->freq_band & IEEE80211_52GHZ_BAND))
-+ return 1;
-+
-+ if ((mode & IEEE_G) &&
-+ (ieee->modulation & IEEE80211_OFDM_MODULATION) &&
-+ (ieee->freq_band & IEEE80211_24GHZ_BAND))
-+ return 1;
-+
-+ if ((mode & IEEE_B) &&
-+ (ieee->modulation & IEEE80211_CCK_MODULATION) &&
-+ (ieee->freq_band & IEEE80211_24GHZ_BAND))
-+ return 1;
-+
-+ return 0;
-+}
-+
-+extern inline int ieee80211_get_hdrlen(u16 fc)
-+{
-+ int hdrlen = 24;
-+
-+ switch (WLAN_FC_GET_TYPE(fc)) {
-+ case IEEE80211_FTYPE_DATA:
-+ if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS))
-+ hdrlen = 30; /* Addr4 */
-+ if(IEEE80211_QOS_HAS_SEQ(fc))
-+ hdrlen += 2; /* QOS ctrl*/
-+ break;
-+ case IEEE80211_FTYPE_CTL:
-+ switch (WLAN_FC_GET_STYPE(fc)) {
-+ case IEEE80211_STYPE_CTS:
-+ case IEEE80211_STYPE_ACK:
-+ hdrlen = 10;
-+ break;
-+ default:
-+ hdrlen = 16;
-+ break;
-+ }
-+ break;
-+ }
-+
-+ return hdrlen;
-+}
-+
-+
-+
-+/* ieee80211.c */
-+extern void free_ieee80211(struct net_device *dev);
-+extern struct net_device *alloc_ieee80211(int sizeof_priv);
-+
-+extern int ieee80211_set_encryption(struct ieee80211_device *ieee);
-+
-+/* ieee80211_tx.c */
-+
-+extern int ieee80211_encrypt_fragment(
-+ struct ieee80211_device *ieee,
-+ struct sk_buff *frag,
-+ int hdr_len);
-+
-+extern int ieee80211_xmit(struct sk_buff *skb,
-+ struct net_device *dev);
-+extern void ieee80211_txb_free(struct ieee80211_txb *);
-+
-+
-+/* ieee80211_rx.c */
-+extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
-+ struct ieee80211_rx_stats *rx_stats);
-+extern void ieee80211_rx_mgt(struct ieee80211_device *ieee,
-+ struct ieee80211_hdr *header,
-+ struct ieee80211_rx_stats *stats);
-+
-+/* ieee80211_wx.c */
-+extern int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
-+ struct iw_request_info *info,
-+ union iwreq_data *wrqu, char *key);
-+extern int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
-+ struct iw_request_info *info,
-+ union iwreq_data *wrqu, char *key);
-+extern int ieee80211_wx_get_encode(struct ieee80211_device *ieee,
-+ struct iw_request_info *info,
-+ union iwreq_data *wrqu, char *key);
-+extern int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
-+ struct iw_request_info *info,
-+ union iwreq_data* wrqu, char *extra);
-+int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
-+ struct iw_request_info *info,
-+ struct iw_param *data, char *extra);
-+int ieee80211_wx_set_mlme(struct ieee80211_device *ieee,
-+ struct iw_request_info *info,
-+ union iwreq_data *wrqu, char *extra);
-+
-+int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len);
-+/* ieee80211_softmac.c */
-+extern short ieee80211_is_54g(struct ieee80211_network net);
-+extern short ieee80211_is_shortslot(struct ieee80211_network net);
-+extern int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
-+ struct ieee80211_rx_stats *rx_stats, u16 type,
-+ u16 stype);
-+extern void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee80211_network *net);
-+
-+extern void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *ieee);
-+extern void ieee80211_softmac_check_all_nets(struct ieee80211_device *ieee);
-+extern void ieee80211_start_bss(struct ieee80211_device *ieee);
-+extern void ieee80211_start_master_bss(struct ieee80211_device *ieee);
-+extern void ieee80211_start_ibss(struct ieee80211_device *ieee);
-+extern void ieee80211_softmac_init(struct ieee80211_device *ieee);
-+extern void ieee80211_softmac_free(struct ieee80211_device *ieee);
-+extern void ieee80211_associate_abort(struct ieee80211_device *ieee);
-+extern void ieee80211_disassociate(struct ieee80211_device *ieee);
-+extern void ieee80211_stop_scan(struct ieee80211_device *ieee);
-+extern void ieee80211_start_scan_syncro(struct ieee80211_device *ieee);
-+extern void ieee80211_check_all_nets(struct ieee80211_device *ieee);
-+extern void ieee80211_start_protocol(struct ieee80211_device *ieee);
-+extern void ieee80211_stop_protocol(struct ieee80211_device *ieee);
-+extern void ieee80211_softmac_start_protocol(struct ieee80211_device *ieee);
-+extern void ieee80211_softmac_stop_protocol(struct ieee80211_device *ieee);
-+extern void ieee80211_reset_queue(struct ieee80211_device *ieee);
-+extern void ieee80211_wake_queue(struct ieee80211_device *ieee);
-+extern void ieee80211_stop_queue(struct ieee80211_device *ieee);
-+extern struct sk_buff *ieee80211_get_beacon(struct ieee80211_device *ieee);
-+extern void ieee80211_start_send_beacons(struct ieee80211_device *ieee);
-+extern void ieee80211_stop_send_beacons(struct ieee80211_device *ieee);
-+extern int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, struct iw_point *p);
-+extern void notify_wx_assoc_event(struct ieee80211_device *ieee);
-+extern void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success);
-+extern void SendDisassociation(struct ieee80211_device *ieee,u8* asSta,u8 asRsn);
-+extern void ieee80211_start_scan(struct ieee80211_device *ieee);
-+
-+//Add for RF power on power off by lizhaoming 080512
-+extern void SendDisassociation(struct ieee80211_device *ieee,
-+ u8* asSta,
-+ u8 asRsn);
-+
-+/* ieee80211_crypt_ccmp&tkip&wep.c */
-+extern void ieee80211_tkip_null(void);
-+extern void ieee80211_wep_null(void);
-+extern void ieee80211_ccmp_null(void);
-+/* ieee80211_softmac_wx.c */
-+
-+extern int ieee80211_wx_get_wap(struct ieee80211_device *ieee,
-+ struct iw_request_info *info,
-+ union iwreq_data *wrqu, char *ext);
-+
-+extern int ieee80211_wx_set_wap(struct ieee80211_device *ieee,
-+ struct iw_request_info *info,
-+ union iwreq_data *awrq,
-+ char *extra);
-+
-+extern int ieee80211_wx_get_essid(struct ieee80211_device *ieee, struct iw_request_info *a,union iwreq_data *wrqu,char *b);
-+
-+extern int ieee80211_wx_set_rate(struct ieee80211_device *ieee,
-+ struct iw_request_info *info,
-+ union iwreq_data *wrqu, char *extra);
-+
-+extern int ieee80211_wx_get_rate(struct ieee80211_device *ieee,
-+ struct iw_request_info *info,
-+ union iwreq_data *wrqu, char *extra);
-+
-+extern int ieee80211_wx_set_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
-+ union iwreq_data *wrqu, char *b);
-+
-+extern int ieee80211_wx_set_scan(struct ieee80211_device *ieee, struct iw_request_info *a,
-+ union iwreq_data *wrqu, char *b);
-+
-+extern int ieee80211_wx_set_essid(struct ieee80211_device *ieee,
-+ struct iw_request_info *a,
-+ union iwreq_data *wrqu, char *extra);
-+
-+extern int ieee80211_wx_get_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
-+ union iwreq_data *wrqu, char *b);
-+
-+extern int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
-+ union iwreq_data *wrqu, char *b);
-+
-+extern int ieee80211_wx_get_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
-+ union iwreq_data *wrqu, char *b);
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
-+extern void ieee80211_wx_sync_scan_wq(struct work_struct *work);
-+#else
-+ extern void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee);
-+#endif
-+//extern void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee);
-+
-+extern int ieee80211_wx_set_rawtx(struct ieee80211_device *ieee,
-+ struct iw_request_info *info,
-+ union iwreq_data *wrqu, char *extra);
-+
-+extern int ieee80211_wx_get_name(struct ieee80211_device *ieee,
-+ struct iw_request_info *info,
-+ union iwreq_data *wrqu, char *extra);
-+
-+extern int ieee80211_wx_set_power(struct ieee80211_device *ieee,
-+ struct iw_request_info *info,
-+ union iwreq_data *wrqu, char *extra);
-+
-+extern int ieee80211_wx_get_power(struct ieee80211_device *ieee,
-+ struct iw_request_info *info,
-+ union iwreq_data *wrqu, char *extra);
-+
-+extern void ieee80211_softmac_ips_scan_syncro(struct ieee80211_device *ieee);
-+
-+extern void ieee80211_sta_ps_send_null_frame(struct ieee80211_device *ieee, short pwr);
-+
-+extern const long ieee80211_wlan_frequencies[];
-+
-+extern inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
-+{
-+ ieee->scans++;
-+}
-+
-+extern inline int ieee80211_get_scans(struct ieee80211_device *ieee)
-+{
-+ return ieee->scans;
-+}
-+
-+static inline const char *escape_essid(const char *essid, u8 essid_len) {
-+ static char escaped[IW_ESSID_MAX_SIZE * 2 + 1];
-+ const char *s = essid;
-+ char *d = escaped;
-+
-+ if (ieee80211_is_empty_essid(essid, essid_len)) {
-+ memcpy(escaped, "<hidden>", sizeof("<hidden>"));
-+ return escaped;
-+ }
-+
-+ essid_len = min(essid_len, (u8)IW_ESSID_MAX_SIZE);
-+ while (essid_len--) {
-+ if (*s == '\0') {
-+ *d++ = '\\';
-+ *d++ = '0';
-+ s++;
-+ } else {
-+ *d++ = *s++;
-+ }
-+ }
-+ *d = '\0';
-+ return escaped;
-+}
-+#endif /* IEEE80211_H */
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211_crypt.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211_crypt.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211_crypt.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211_crypt.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211_crypt.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,86 @@
+/*
+ * Original code based on Host AP (software wireless LAN access point) driver
+ struct ieee80211_crypt_data **crypt);
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,761 @@
+/*
+ This is part of rtl8180 OpenSource driver.
+bool MgntActSet_RF_State(struct net_device *dev, RT_RF_POWER_STATE StateToSet, u32 ChangeSource);
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_93cx6.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_93cx6.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_93cx6.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_93cx6.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_93cx6.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,146 @@
+/*
+ This files contains card eeprom (93c46 or 93c56) programming routines,
+ (EPROM_CMD_NORMAL<<EPROM_CMD_OPERATING_MODE_SHIFT));
+ return ret;
+}
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_93cx6.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_93cx6.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_93cx6.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_93cx6.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_93cx6.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,59 @@
+/*
+ This is part of rtl8180 OpenSource driver
+#define EPROM_TXPW_CH13_14 0x16
+
+u32 eprom_read(struct net_device *dev,u32 addr); //reads a 16 bits word
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_core.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_core.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_core.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_core.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_core.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,6828 @@
+/*
+ This is part of rtl818x pci OpenSource driver - v 0.1
+module_init(rtl8180_pci_module_init);
+module_exit(rtl8180_pci_module_exit);
+
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_dm.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_dm.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_dm.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_dm.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_dm.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,1725 @@
+//#include "r8180.h"\r
+#include "r8180_dm.h"\r
+ //printk("-SwAntennaDiversityTimerCallback()\n");\r
+}\r
+\r
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_dm.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_dm.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_dm.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_dm.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_dm.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,41 @@
+#ifndef R8180_DM_H \r
+#define R8180_DM_H\r
+\r
+\r
+#endif\r
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_gct.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_gct.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_gct.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_gct.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_gct.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,296 @@
+/*
+ This files contains GCT radio frontend programming routines.
+
+ gct_rf_set_chan(dev,priv->chan);
+}
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_gct.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_gct.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_gct.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_gct.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_gct.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,25 @@
+/*
+ This is part of rtl8180 OpenSource driver - v 0.20
+void gct_rf_set_chan(struct net_device *dev,short ch);
+
+void gct_rf_close(struct net_device *dev);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_hw.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_hw.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_hw.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_hw.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_hw.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,956 @@
+/*
+ This is part of rtl8180 OpenSource driver.
+#endif
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_max2820.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_max2820.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_max2820.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_max2820.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_max2820.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,240 @@
+/*
+ This files contains MAXIM MAX2820 radio frontend programming routines.
+
+ maxim_rf_set_chan(dev,priv->chan);
+}
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_max2820.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_max2820.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_max2820.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_max2820.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_max2820.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,21 @@
+/*
+ This is part of rtl8180 OpenSource driver
+void maxim_rf_set_chan(struct net_device *dev,short ch);
+
+void maxim_rf_close(struct net_device *dev);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_pm.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_pm.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_pm.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_pm.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_pm.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,90 @@
+/*
+ Power management interface routines.
+
+
+#endif //CONFIG_RTL8180_PM
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_pm.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_pm.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_pm.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_pm.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_pm.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,28 @@
+/*
+ Power management interface routines.
+#endif //R8180_PM_H
+
+#endif // CONFIG_RTL8180_PM
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_rtl8225.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8225.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8225.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_rtl8225.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_rtl8225.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,933 @@
+/*
+ This is part of the rtl8180-sa2400 driver
+ write_nic_word(dev,BRSR,brsr);
+
+}
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_rtl8225.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8225.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8225.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_rtl8225.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_rtl8225.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,44 @@
+/*
+ This is part of the rtl8180-sa2400 driver
+void rtl8225z4_rf_sleep(struct net_device *dev);
+void rtl8225z4_rf_wakeup(struct net_device *dev);
+
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_rtl8225z2.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8225z2.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8225z2.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_rtl8225z2.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_rtl8225z2.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,1587 @@
+/*
+ This is part of the rtl8180-sa2400 driver
+}
+#endif
+
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_rtl8255.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8255.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8255.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_rtl8255.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_rtl8255.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,1838 @@
+/*
+ This is part of the rtl8180-sa2400 driver
+ write_nic_word(dev, BRSR, brsr);
+}
+
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_rtl8255.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8255.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8255.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_rtl8255.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_rtl8255.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,19 @@
+/*
+ This is part of the rtl8180-sa2400 driver
+void rtl8255_rf_init(struct net_device *dev);
+void rtl8255_rf_set_chan(struct net_device *dev,short ch);
+void rtl8255_rf_close(struct net_device *dev);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_sa2400.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_sa2400.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_sa2400.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_sa2400.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_sa2400.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,233 @@
+/*
+ This files contains PHILIPS SA2400 radio frontend programming routines.
+
+ sa2400_rf_set_chan(dev,priv->chan);
+}
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_sa2400.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_sa2400.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_sa2400.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_sa2400.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_sa2400.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,26 @@
+/*
+ This is part of rtl8180 OpenSource driver - v 0.7
+void sa2400_rf_set_chan(struct net_device *dev,short ch);
+short sa2400_rf_set_sens(struct net_device *dev,short sens);
+void sa2400_rf_close(struct net_device *dev);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_wx.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_wx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_wx.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_wx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_wx.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,1644 @@
+/*
+ This file contains wireless extension handlers.
+};
+
+
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_wx.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_wx.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_wx.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_wx.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_wx.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,21 @@
+/*
+ This is part of rtl8180 OpenSource driver - v 0.3
+extern struct iw_handler_def r8180_wx_handlers_def;
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8185b_init.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8185b_init.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8185b_init.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8185b_init.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8185b_init.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,3342 @@
+/*++
+Copyright (c) Realtek Semiconductor Corp. All rights reserved.
+
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/slicoss/Kconfig linux-2.6.27.19-5.1/drivers/staging/slicoss/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/Kconfig 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/Kconfig Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,14 @@
+config SLICOSS
+ tristate "Alacritech Gigabit IS-NIC support"
+
+ To compile this driver as a module, choose M here: the module
+ will be called slicoss.
-diff -purN linux-2.6.27/drivers/staging/slicoss/Makefile linux-2.6.27.19-5.1/drivers/staging/slicoss/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/Makefile 2009-03-25 16:11:09.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/staging/slicoss/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/Makefile Wed May 06 16:56:41 2009 +0100
+@@ -0,0 +1,1 @@
+obj-$(CONFIG_SLICOSS) += slicoss.o
-diff -purN linux-2.6.27/drivers/staging/slicoss/README linux-2.6.27.19-5.1/drivers/staging/slicoss/README
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/README 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/README
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/README Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,19 @@
+This driver is supposed to support:
+
+and Cc: Lior Dotan <liodot@gmail.com> and Christopher Harrer
+<charrer@alacritech.com> as well as they are also able to test out any
+changes.
-diff -purN linux-2.6.27/drivers/staging/slicoss/gbdownload.h linux-2.6.27.19-5.1/drivers/staging/slicoss/gbdownload.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/gbdownload.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/gbdownload.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/gbdownload.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,8215 @@
+#define MOJAVE_UCODE_VERS_STRING "1.2"
+#define MOJAVE_UCODE_VERS_DATE "2006/03/27 15:12:22"
+ 0x81, 0xb2, 0x00, 0x00,
+ },
+};
-diff -purN linux-2.6.27/drivers/staging/slicoss/gbrcvucode.h linux-2.6.27.19-5.1/drivers/staging/slicoss/gbrcvucode.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/gbrcvucode.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/gbrcvucode.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/gbrcvucode.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,238 @@
+/*
+ * Copyright (c) 1997-2002 Alacritech, Inc. All rights reserved
+0x00, 0x00, 0x3c, 0xc6, 0x04, 0x00, 0x00, 0x3c, 0xc6, 0x04, 0x00, 0x00, 0x3c,
+0xc6, 0x04, 0x00, 0x00, 0x3c, 0xc6, 0x04, 0x00, 0x00, 0x3c, 0xc6, 0x04,
+};
-diff -purN linux-2.6.27/drivers/staging/slicoss/oasisdbgdownload.h linux-2.6.27.19-5.1/drivers/staging/slicoss/oasisdbgdownload.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/oasisdbgdownload.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/oasisdbgdownload.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/oasisdbgdownload.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,6850 @@
+#define OASIS_UCODE_VERS_STRING "1.2"
+#define OASIS_UCODE_VERS_DATE "2006/03/27 15:11:22"
+ 0x81, 0xb2, 0x00, 0x00,
+ },
+};
-diff -purN linux-2.6.27/drivers/staging/slicoss/oasisdownload.h linux-2.6.27.19-5.1/drivers/staging/slicoss/oasisdownload.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/oasisdownload.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/oasisdownload.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/oasisdownload.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,6848 @@
+#define OASIS_UCODE_VERS_STRING "1.2"
+#define OASIS_UCODE_VERS_DATE "2006/03/27 15:10:37"
+ 0x81, 0xb2, 0x00, 0x00,
+ },
+};
-diff -purN linux-2.6.27/drivers/staging/slicoss/oasisrcvucode.h linux-2.6.27.19-5.1/drivers/staging/slicoss/oasisrcvucode.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/oasisrcvucode.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/oasisrcvucode.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/oasisrcvucode.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,205 @@
+#define OASIS_RCVUCODE_VERS_STRING "1.2"
+#define OASIS_RCVUCODE_VERS_DATE "2006/03/27 15:10:28"
+0x00, 0x00, 0x2c, 0xc6, 0x04, 0x00, 0x00, 0x2c, 0xc6, 0x04, 0x00, 0x00, 0x2c,
+0xc6, 0x04, 0x00, 0x00, 0x2c, 0xc6, 0x04, 0x00, 0x00, 0x2c, 0xc6, 0x04,
+};
-diff -purN linux-2.6.27/drivers/staging/slicoss/slic.h linux-2.6.27.19-5.1/drivers/staging/slicoss/slic.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slic.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slic.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slic.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,598 @@
+/**************************************************************************
+ *
+#define SIOCSLICTRACEDUMP (SIOCDEVPRIVATE+11)
+
+#endif /* __SLIC_DRIVER_H__ */
-diff -purN linux-2.6.27/drivers/staging/slicoss/slic_os.h linux-2.6.27.19-5.1/drivers/staging/slicoss/slic_os.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slic_os.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slic_os.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slic_os.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,84 @@
+/**************************************************************************
+ *
+
+#endif /* _SLIC_OS_SPECIFIC_H_ */
+
-diff -purN linux-2.6.27/drivers/staging/slicoss/slicbuild.h linux-2.6.27.19-5.1/drivers/staging/slicoss/slicbuild.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slicbuild.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slicbuild.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slicbuild.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,96 @@
+/**************************************************************************
+ *
+#endif
+
+#endif /* _SLIC_BUILD_H_ */
-diff -purN linux-2.6.27/drivers/staging/slicoss/slicdbg.h linux-2.6.27.19-5.1/drivers/staging/slicoss/slicdbg.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slicdbg.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slicdbg.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slicdbg.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,100 @@
+/**************************************************************************
+ *
+#endif /* SLIC_ASSERT_ENABLED */
+
+#endif /* _SLIC_DEBUG_H_ */
-diff -purN linux-2.6.27/drivers/staging/slicoss/slicdump.h linux-2.6.27.19-5.1/drivers/staging/slicoss/slicdump.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slicdump.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slicdump.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slicdump.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,278 @@
+/*
+ *
+#define THREADBOTH 3 /* bit 0 and 1.. */
+
+#endif /* _SLIC_DUMP_H */
-diff -purN linux-2.6.27/drivers/staging/slicoss/slichw.h linux-2.6.27.19-5.1/drivers/staging/slicoss/slichw.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slichw.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slichw.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slichw.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,845 @@
+/**************************************************************************
+ *
+#pragma pack()
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/slicoss/slicinc.h linux-2.6.27.19-5.1/drivers/staging/slicoss/slicinc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slicinc.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slicinc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slicinc.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,185 @@
+/**************************************************************************
+ *
+#endif
+
+#endif /* _SLIC_INCLUDE_H_ */
-diff -purN linux-2.6.27/drivers/staging/slicoss/slicoss.c linux-2.6.27.19-5.1/drivers/staging/slicoss/slicoss.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slicoss.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slicoss.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slicoss.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,5936 @@
+/**************************************************************************
+ *
+
+module_init(slic_module_init);
+module_exit(slic_module_cleanup);
-diff -purN linux-2.6.27/drivers/staging/staging.c linux-2.6.27.19-5.1/drivers/staging/staging.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/staging.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/staging.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/staging.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,19 @@
+#include <linux/kernel.h>
+#include <linux/init.h>
+MODULE_AUTHOR("Greg Kroah-Hartman");
+MODULE_DESCRIPTION("Staging Core");
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/staging/sxg/Kconfig linux-2.6.27.19-5.1/drivers/staging/sxg/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/Kconfig 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/Kconfig Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,10 @@
+config SXG
+ tristate "Alacritech SLIC Technology Non-Accelerated 10Gbe support"
+
+ To compile this driver as a module, choose
+ M here: the module will be called sxg.
-diff -purN linux-2.6.27/drivers/staging/sxg/Makefile linux-2.6.27.19-5.1/drivers/staging/sxg/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/Makefile 2009-03-25 16:11:10.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/staging/sxg/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/Makefile Wed May 06 16:56:41 2009 +0100
+@@ -0,0 +1,1 @@
+obj-$(CONFIG_SXG) += sxg.o
-diff -purN linux-2.6.27/drivers/staging/sxg/README linux-2.6.27.19-5.1/drivers/staging/sxg/README
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/README 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/README
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/README Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,13 @@
+This is the rough cut at a driver for the Alacritech SLIC Technology
+Non-Accelerated 10Gbe network driver.
+Please send patches to:
+ Greg Kroah-Hartman <gregkh@suse.de>
+for any cleanups that you do to this driver.
-diff -purN linux-2.6.27/drivers/staging/sxg/saharadbgdownload.h linux-2.6.27.19-5.1/drivers/staging/sxg/saharadbgdownload.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/saharadbgdownload.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/saharadbgdownload.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/saharadbgdownload.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,4854 @@
+#define SAHARA_UCODE_VERS_STRING "$Revision: 1.1 $"
+#define SAHARA_UCODE_VERS_DATE "$Date: 2008/06/27 12:58:27 $"
+ 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x90,
+},
+};
-diff -purN linux-2.6.27/drivers/staging/sxg/sxg.c linux-2.6.27.19-5.1/drivers/staging/sxg/sxg.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/sxg.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/sxg.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/sxg.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,3624 @@
+/**************************************************************************
+ *
+
+module_init(sxg_module_init);
+module_exit(sxg_module_cleanup);
-diff -purN linux-2.6.27/drivers/staging/sxg/sxg.h linux-2.6.27.19-5.1/drivers/staging/sxg/sxg.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/sxg.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/sxg.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/sxg.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,773 @@
+/**************************************************************************
+ *
+#define SIOCSLICTRACEDUMP SIOCDEVPRIVATE+11
+
+#endif /* __SXG_DRIVER_H__ */
-diff -purN linux-2.6.27/drivers/staging/sxg/sxg_os.h linux-2.6.27.19-5.1/drivers/staging/sxg/sxg_os.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/sxg_os.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/sxg_os.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/sxg_os.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,154 @@
+/**************************************************************************
+ *
+
+#endif /* _SLIC_OS_SPECIFIC_H_ */
+
-diff -purN linux-2.6.27/drivers/staging/sxg/sxgdbg.h linux-2.6.27.19-5.1/drivers/staging/sxg/sxgdbg.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/sxgdbg.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/sxgdbg.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/sxgdbg.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,190 @@
+/**************************************************************************
+ *
+#endif
+
+#endif /* _SXG_DEBUG_H_ */
-diff -purN linux-2.6.27/drivers/staging/sxg/sxghif.h linux-2.6.27.19-5.1/drivers/staging/sxg/sxghif.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/sxghif.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/sxghif.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/sxghif.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,861 @@
+/*
+ * Copyright © 1997-2007 Alacritech, Inc. All rights reserved
+ Stop Compilation;
+#endif
+
-diff -purN linux-2.6.27/drivers/staging/sxg/sxghw.h linux-2.6.27.19-5.1/drivers/staging/sxg/sxghw.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/sxghw.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/sxghw.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/sxghw.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,734 @@
+/*
+ * Copyright © 1997-2007 Alacritech, Inc. All rights reserved
+#define FLASH_SIZE 0x080000 // 512 KB (4 Mb)
+#define EEPROM_SIZE_XFMR 512 // true EEPROM size (bytes), including xfmr area
+#define EEPROM_SIZE_NO_XFMR 256 // EEPROM size excluding xfmr area
-diff -purN linux-2.6.27/drivers/staging/sxg/sxgphycode.h linux-2.6.27.19-5.1/drivers/staging/sxg/sxgphycode.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/sxgphycode.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/sxgphycode.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/sxgphycode.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,349 @@
+/*
+ * Copyright (C) 1997-2008 Alacritech, Inc. All rights reserved
+ {0x0000, 0x000A}, /* wait 10ms just to be safe */
+ {0xffff, 0xffff} /* table terminator */
+};
-diff -purN linux-2.6.27/drivers/staging/usbip/Kconfig linux-2.6.27.19-5.1/drivers/staging/usbip/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/Kconfig 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/Kconfig Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,36 @@
+config USB_IP_COMMON
+ tristate "USB IP support (EXPERIMENTAL)"
+
+ To compile this driver as a module, choose M here: the
+ module will be called usbip.
-diff -purN linux-2.6.27/drivers/staging/usbip/Makefile linux-2.6.27.19-5.1/drivers/staging/usbip/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/Makefile 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/Makefile Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,12 @@
+obj-$(CONFIG_USB_IP_COMMON) += usbip_common_mod.o
+usbip_common_mod-objs := usbip_common.o usbip_event.o
+ifeq ($(CONFIG_USB_DEBUG),y)
+ EXTRA_CFLAGS += -DDEBUG
+endif
-diff -purN linux-2.6.27/drivers/staging/usbip/README linux-2.6.27.19-5.1/drivers/staging/usbip/README
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/README 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/README
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/README Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,6 @@
+TODO:
+ - more discussion about the protocol
+ - review of the userspace interface
+
+Please send patches for this code to Greg Kroah-Hartman <greg@kroah.com>
-diff -purN linux-2.6.27/drivers/staging/usbip/stub.h linux-2.6.27.19-5.1/drivers/staging/usbip/stub.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/stub.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/stub.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/stub.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2003-2008 Takahiro Hirofuchi
+/* stub_main.c */
+int match_busid(char *busid);
+void stub_device_cleanup_urbs(struct stub_device *sdev);
-diff -purN linux-2.6.27/drivers/staging/usbip/stub_dev.c linux-2.6.27.19-5.1/drivers/staging/usbip/stub_dev.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/stub_dev.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/stub_dev.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/stub_dev.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,483 @@
+/*
+ * Copyright (C) 2003-2008 Takahiro Hirofuchi
+
+ udbg("bye\n");
+}
-diff -purN linux-2.6.27/drivers/staging/usbip/stub_main.c linux-2.6.27.19-5.1/drivers/staging/usbip/stub_main.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/stub_main.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/stub_main.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/stub_main.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,300 @@
+/*
+ * Copyright (C) 2003-2008 Takahiro Hirofuchi
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/staging/usbip/stub_rx.c linux-2.6.27.19-5.1/drivers/staging/usbip/stub_rx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/stub_rx.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/stub_rx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/stub_rx.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,615 @@
+/*
+ * Copyright (C) 2003-2008 Takahiro Hirofuchi
+ stub_rx_pdu(ud);
+ }
+}
-diff -purN linux-2.6.27/drivers/staging/usbip/stub_tx.c linux-2.6.27.19-5.1/drivers/staging/usbip/stub_tx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/stub_tx.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/stub_tx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/stub_tx.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,371 @@
+/*
+ * Copyright (C) 2003-2008 Takahiro Hirofuchi
+ !list_empty(&sdev->unlink_tx)));
+ }
+}
-diff -purN linux-2.6.27/drivers/staging/usbip/usbip_common.c linux-2.6.27.19-5.1/drivers/staging/usbip/usbip_common.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/usbip_common.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/usbip_common.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/usbip_common.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,997 @@
+/*
+ * Copyright (C) 2003-2008 Takahiro Hirofuchi
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/staging/usbip/usbip_common.h linux-2.6.27.19-5.1/drivers/staging/usbip/usbip_common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/usbip_common.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/usbip_common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/usbip_common.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,406 @@
+/*
+ * Copyright (C) 2003-2008 Takahiro Hirofuchi
+
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/usbip/usbip_event.c linux-2.6.27.19-5.1/drivers/staging/usbip/usbip_event.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/usbip_event.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/usbip_event.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/usbip_event.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2003-2008 Takahiro Hirofuchi
+ return happend;
+}
+EXPORT_SYMBOL_GPL(usbip_event_happend);
-diff -purN linux-2.6.27/drivers/staging/usbip/vhci.h linux-2.6.27.19-5.1/drivers/staging/usbip/vhci.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/vhci.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/vhci.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/vhci.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,142 @@
+/*
+ * Copyright (C) 2003-2008 Takahiro Hirofuchi
+{
+ return vhci_to_hcd(vhci)->self.controller;
+}
-diff -purN linux-2.6.27/drivers/staging/usbip/vhci_hcd.c linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_hcd.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_hcd.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/vhci_hcd.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/vhci_hcd.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,1275 @@
+/*
+ * Copyright (C) 2003-2008 Takahiro Hirofuchi
+ dbg_vhci_hc("bye\n");
+}
+module_exit(vhci_cleanup);
-diff -purN linux-2.6.27/drivers/staging/usbip/vhci_rx.c linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_rx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_rx.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/vhci_rx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/vhci_rx.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,251 @@
+/*
+ * Copyright (C) 2003-2008 Takahiro Hirofuchi
+ }
+}
+
-diff -purN linux-2.6.27/drivers/staging/usbip/vhci_sysfs.c linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_sysfs.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_sysfs.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/vhci_sysfs.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/vhci_sysfs.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,250 @@
+/*
+ * Copyright (C) 2003-2008 Takahiro Hirofuchi
+struct attribute_group dev_attr_group = {
+ .attrs = dev_attrs,
+};
-diff -purN linux-2.6.27/drivers/staging/usbip/vhci_tx.c linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_tx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_tx.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/vhci_tx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/vhci_tx.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,239 @@
+/*
+ * Copyright (C) 2003-2008 Takahiro Hirofuchi
+ dbg_vhci_tx("pending urbs ?, now wake up\n");
+ }
+}
-diff -purN linux-2.6.27/drivers/staging/winbond/Kconfig linux-2.6.27.19-5.1/drivers/staging/winbond/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/Kconfig 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/Kconfig Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,7 @@
+config W35UND
+ tristate "Winbond driver"
+ ---help---
+ This is highly experimental driver for winbond wifi card on some Kohjinsha notebooks
+ Check http://code.google.com/p/winbondport/ for new version
-diff -purN linux-2.6.27/drivers/staging/winbond/Makefile linux-2.6.27.19-5.1/drivers/staging/winbond/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/Makefile 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/Makefile Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,18 @@
+ DRIVER_DIR=./linux
+
+
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/README linux-2.6.27.19-5.1/drivers/staging/winbond/README
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/README 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/README
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/README Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,10 @@
+TODO:
+ - sparse cleanups
+
+Please send patches to Greg Kroah-Hartman <greg@kroah.com> and
+Pavel Machek <pavel@suse.cz>
-diff -purN linux-2.6.27/drivers/staging/winbond/adapter.h linux-2.6.27.19-5.1/drivers/staging/winbond/adapter.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/adapter.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/adapter.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/adapter.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,23 @@
+//
+// ADAPTER.H -
+
+ u8 LinkName[MAX_ANSI_STRING];
+} WB32_ADAPTER, ADAPTER, *PWB32_ADAPTER, *PADAPTER;
-diff -purN linux-2.6.27/drivers/staging/winbond/bss_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/bss_f.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/bss_f.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/bss_f.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/bss_f.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,59 @@
+//
+// BSS descriptor DataBase management global function
+
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/bssdscpt.h linux-2.6.27.19-5.1/drivers/staging/winbond/bssdscpt.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/bssdscpt.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/bssdscpt.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/bssdscpt.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,156 @@
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// bssdscpt.c
+#define psBSS(i) (&(Adapter->asBSSDescriptElement[(i)]))
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/ds_tkip.h linux-2.6.27.19-5.1/drivers/staging/winbond/ds_tkip.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/ds_tkip.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/ds_tkip.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/ds_tkip.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,33 @@
+// Rotation functions on 32 bit values
+#define ROL32( A, n ) \
+
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/gl_80211.h linux-2.6.27.19-5.1/drivers/staging/winbond/gl_80211.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/gl_80211.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/gl_80211.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/gl_80211.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,125 @@
+
+#ifndef __GL_80211_H__
+/*** end of file ***/
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/ioctls.h linux-2.6.27.19-5.1/drivers/staging/winbond/ioctls.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/ioctls.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/ioctls.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/ioctls.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,678 @@
+//============================================================================
+// IOCTLS.H -
+#endif // #ifndef _IOCTLS_H
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/common.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/common.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/common.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,143 @@
+//
+// common.h
+
+#endif // COMMON_DEF
+
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/sysdef.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/sysdef.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/sysdef.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/sysdef.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/sysdef.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,73 @@
+
+
+
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35reg.c linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35reg.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35reg.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35reg.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35reg.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,747 @@
+#include "sysdef.h"
+
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35reg_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35reg_f.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35reg_f.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35reg_f.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35reg_f.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,56 @@
+//====================================
+// Interface function declare
+unsigned char adjust_TXVGA_for_iq_mag( phw_data_t pHwData );
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35reg_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35reg_s.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35reg_s.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35reg_s.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35reg_s.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,170 @@
+//=======================================================================================
+/*
+} WB35REG, *PWB35REG;
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35rx.c linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35rx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35rx.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35rx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35rx.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,337 @@
+//============================================================================
+// Copyright (c) 1996-2002 Winbond Electronic Corporation
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35rx_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35rx_f.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35rx_f.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35rx_f.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35rx_f.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,17 @@
+//====================================
+// Interface function declare
+
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35rx_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35rx_s.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35rx_s.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35rx_s.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35rx_s.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,48 @@
+//============================================================================
+// wb35rx.h --
+} WB35RX, *PWB35RX;
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35tx.c linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35tx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35tx.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35tx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35tx.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,313 @@
+//============================================================================
+// Copyright (c) 1996-2002 Winbond Electronic Corporation
+ pWb35Tx->EP2vm_state = VM_STOP;
+}
+
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35tx_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35tx_f.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35tx_f.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35tx_f.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35tx_f.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,20 @@
+//====================================
+// Interface function declare
+void Wb35Tx_CurrentTime( phw_data_t pHwData, u32 TimeCount );
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35tx_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35tx_s.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35tx_s.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35tx_s.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35tx_s.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,47 @@
+//====================================
+// IS89C35 Tx related definition
+
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wbusb.c linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wbusb.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wbusb.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wbusb.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wbusb.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,404 @@
+/*
+ * Copyright 2008 Pavel Machek <pavel@suse.cz>
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wbusb_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wbusb_f.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wbusb_f.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wbusb_f.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wbusb_f.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,34 @@
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// Copyright (c) 1996-2004 Winbond Electronic Corporation
+
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wbusb_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wbusb_s.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wbusb_s.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wbusb_s.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wbusb_s.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,42 @@
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// Copyright (c) 1996-2004 Winbond Electronic Corporation
+ struct usb_device *udev;
+ u32 DetectCount;
+} WBUSB, *PWBUSB;
-diff -purN linux-2.6.27/drivers/staging/winbond/localpara.h linux-2.6.27.19-5.1/drivers/staging/winbond/localpara.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/localpara.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/localpara.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/localpara.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,275 @@
+//=============================================================
+// LocalPara.h -
+} WB_LOCALDESCRIPT, *PWB_LOCALDESCRIPT;
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/mac_structures.h linux-2.6.27.19-5.1/drivers/staging/winbond/mac_structures.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mac_structures.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mac_structures.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mac_structures.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,670 @@
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// MAC_Structures.h
+#endif // _MAC_Structure_H_
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/mds.c linux-2.6.27.19-5.1/drivers/staging/winbond/mds.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mds.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mds.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mds.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,630 @@
+#include "os_common.h"
+
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/mds_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/mds_f.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mds_f.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mds_f.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mds_f.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,33 @@
+unsigned char Mds_initial( PADAPTER Adapter );
+void Mds_Destroy( PADAPTER Adapter );
+void MDS_EthernetPacketReceive( PADAPTER Adapter, PRXLAYER1 pRxLayer1 );
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/mds_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/mds_s.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mds_s.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mds_s.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mds_s.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,183 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+#define MAX_USB_TX_DESCRIPTOR 15 // IS89C35 ability
+}RXLAYER1, * PRXLAYER1;
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/mlme_mib.h linux-2.6.27.19-5.1/drivers/staging/winbond/mlme_mib.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mlme_mib.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mlme_mib.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mlme_mib.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,84 @@
+//============================================================================
+// MLMEMIB.H -
+#endif
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/mlme_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/mlme_s.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mlme_s.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mlme_s.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mlme_s.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,195 @@
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// Mlme.h
+}__attribute__ ((packed)) RXDATA, *psRXDATA;
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/mlmetxrx.c linux-2.6.27.19-5.1/drivers/staging/winbond/mlmetxrx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mlmetxrx.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mlmetxrx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mlmetxrx.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,150 @@
+//============================================================================
+// Module Name:
+
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/mlmetxrx_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/mlmetxrx_f.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mlmetxrx_f.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mlmetxrx_f.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mlmetxrx_f.h Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,52 @@
+//================================================================
+// MLMETxRx.H --
+
+#endif
+
-diff -purN linux-2.6.27/drivers/staging/winbond/mto.c linux-2.6.27.19-5.1/drivers/staging/winbond/mto.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mto.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mto.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mto.c Wed May 06 16:56:41 2009 +0100
@@ -0,0 +1,1229 @@
+//============================================================================
+// MTO.C -
+}
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/mto.h linux-2.6.27.19-5.1/drivers/staging/winbond/mto.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mto.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mto.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mto.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,265 @@
+//==================================================================
+// MTO.H
+#endif //__MTO_H__
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/mto_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/mto_f.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mto_f.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mto_f.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mto_f.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,7 @@
+extern void MTO_Init(PWB32_ADAPTER);
+extern void MTO_PeriodicTimerExpired(PWB32_ADAPTER);
+extern u8 MTO_GetTxFallbackRate(MTO_FUNC_INPUT);
+extern void MTO_SetTxCount(MTO_FUNC_INPUT, u8 t0, u8 index);
+
-diff -purN linux-2.6.27/drivers/staging/winbond/os_common.h linux-2.6.27.19-5.1/drivers/staging/winbond/os_common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/os_common.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/os_common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/os_common.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,2 @@
+#include "linux/sysdef.h"
+
-diff -purN linux-2.6.27/drivers/staging/winbond/phy_calibration.c linux-2.6.27.19-5.1/drivers/staging/winbond/phy_calibration.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/phy_calibration.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/phy_calibration.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/phy_calibration.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,1759 @@
+/*
+ * phy_302_calibration.c
+
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/phy_calibration.h linux-2.6.27.19-5.1/drivers/staging/winbond/phy_calibration.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/phy_calibration.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/phy_calibration.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/phy_calibration.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,101 @@
+// 20031229 Turbo add
+#define REG_AGC_CTRL1 0x1000
+void phy_set_rf_data( phw_data_t pHwData, u32 index, u32 value );
+#define phy_init_rf( _A ) //RFSynthesizer_initial( _A )
+
-diff -purN linux-2.6.27/drivers/staging/winbond/reg.c linux-2.6.27.19-5.1/drivers/staging/winbond/reg.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/reg.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/reg.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/reg.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,2683 @@
+#include "os_common.h"
+
+
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/rxisr.c linux-2.6.27.19-5.1/drivers/staging/winbond/rxisr.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/rxisr.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/rxisr.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/rxisr.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,30 @@
+#include "os_common.h"
+
+{
+ WARN_ON(1);
+}
-diff -purN linux-2.6.27/drivers/staging/winbond/scan_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/scan_s.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/scan_s.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/scan_s.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/scan_s.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,115 @@
+//
+// SCAN task global CONSTANTS, STRUCTURES, variables
+//static void vScanTimerStart(PWB32_ADAPTER Adapter, int timeout_value);
+//static void vScanTimerStop(PWB32_ADAPTER Adapter);
+
-diff -purN linux-2.6.27/drivers/staging/winbond/sme_api.c linux-2.6.27.19-5.1/drivers/staging/winbond/sme_api.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/sme_api.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/sme_api.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/sme_api.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,13 @@
+//------------------------------------------------------------------------------------
+// sme_api.c
+{
+ BUG();
+}
-diff -purN linux-2.6.27/drivers/staging/winbond/sme_api.h linux-2.6.27.19-5.1/drivers/staging/winbond/sme_api.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/sme_api.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/sme_api.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/sme_api.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,265 @@
+/*
+ * sme_api.h
+#endif /* __SME_API_H__ */
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/sme_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/sme_s.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/sme_s.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/sme_s.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/sme_s.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,228 @@
+//
+// SME_S.H -
+
+// Static function
+
-diff -purN linux-2.6.27/drivers/staging/winbond/wb35_ver.h linux-2.6.27.19-5.1/drivers/staging/winbond/wb35_ver.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/wb35_ver.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/wb35_ver.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/wb35_ver.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,30 @@
+//
+// Only define one of follow
+
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/wbhal.c linux-2.6.27.19-5.1/drivers/staging/winbond/wbhal.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/wbhal.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/wbhal.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/wbhal.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,878 @@
+#include "os_common.h"
+
+ return TRUE;
+}
+
-diff -purN linux-2.6.27/drivers/staging/winbond/wbhal_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/wbhal_f.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/wbhal_f.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/wbhal_f.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/wbhal_f.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,122 @@
+//=====================================================================
+// Device related include
+#define hw_set_dxx_reg( _A, _B, _C ) hal_set_dxx_reg( _A, _B, (u32)_C )
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/wbhal_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/wbhal_s.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/wbhal_s.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/wbhal_s.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/wbhal_s.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,615 @@
+//[20040722 WK]
+#define HAL_LED_SET_MASK 0x001c //20060901 Extend
+} HAL_RATE, *PHAL_RATE;
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/wblinux.c linux-2.6.27.19-5.1/drivers/staging/winbond/wblinux.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/wblinux.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/wblinux.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/wblinux.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,277 @@
+//============================================================================
+// Copyright (c) 1996-2005 Winbond Electronic Corporation
+ pWbLinux->LinkStatus = flag; // OS_DISCONNECTED or OS_CONNECTED
+}
+
-diff -purN linux-2.6.27/drivers/staging/winbond/wblinux_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/wblinux_f.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/wblinux_f.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/wblinux_f.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/wblinux_f.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,23 @@
+//=========================================================================
+// Copyright (c) 1996-2004 Winbond Electronic Corporation
+
+
+
-diff -purN linux-2.6.27/drivers/staging/winbond/wblinux_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/wblinux_s.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/wblinux_s.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/wblinux_s.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/wblinux_s.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,45 @@
+//============================================================
+// wblinux_s.h
+} WBLINUX, *PWBLINUX;
+
+
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/Kconfig linux-2.6.27.19-5.1/drivers/staging/wlan-ng/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/Kconfig 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/Kconfig Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,10 @@
+config PRISM2_USB
+ tristate "Prism2.5/3 USB driver"
+
+ To compile this driver as a module, choose M here: the module
+ will be called prism2_usb.
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/Makefile linux-2.6.27.19-5.1/drivers/staging/wlan-ng/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/Makefile 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/Makefile Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,8 @@
+obj-$(CONFIG_PRISM2_USB) += prism2_usb.o
+
+ p80211wep.o \
+ p80211wext.o \
+ p80211netdev.o
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/README linux-2.6.27.19-5.1/drivers/staging/wlan-ng/README
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/README 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/README
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/README Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,7 @@
+TODO:
+ - checkpatch.pl cleanups
+ - move to use the in-kernel wireless stack
+
+Please send all patches to Greg Kroah-Hartman <greg@kroah.com>
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/hfa384x.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/hfa384x.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/hfa384x.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/hfa384x.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/hfa384x.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,2792 @@
+/* hfa384x.h
+*
+#endif /* __KERNEL__ */
+
+#endif /* _HFA384x_H */
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/hfa384x_usb.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/hfa384x_usb.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/hfa384x_usb.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/hfa384x_usb.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/hfa384x_usb.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,4690 @@
+/* src/prism2/driver/hfa384x_usb.c
+*
+ return 0; /* avoid compiler warnings */
+}
+
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211conv.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211conv.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211conv.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211conv.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211conv.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,686 @@
+/* src/p80211/p80211conv.c
+*
+ DBFEXIT;
+ return;
+}
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211conv.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211conv.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211conv.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211conv.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211conv.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,186 @@
+/* p80211conv.h
+*
+int p80211_stt_addproto(u16 proto);
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211hdr.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211hdr.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211hdr.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211hdr.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211hdr.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,299 @@
+/* p80211hdr.h
+*
+}
+
+#endif /* _P80211HDR_H */
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211ioctl.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211ioctl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211ioctl.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211ioctl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211ioctl.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,123 @@
+/* p80211ioctl.h
+*
+
+
+#endif /* _P80211IOCTL_H */
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211meta.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211meta.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211meta.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211meta.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211meta.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,169 @@
+/* p80211meta.h
+*
+int p80211item_gettype(p80211meta_t *meta);
+
+#endif /* _P80211META_H */
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211metadef.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metadef.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metadef.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211metadef.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211metadef.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,757 @@
+/* This file is GENERATED AUTOMATICALLY. DO NOT EDIT OR MODIFY.
+* --------------------------------------------------------------------
+ P80211DID_MKGROUP(6) | \
+ P80211DID_MKITEM(12) | 0x10000000)
+#endif
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211metamib.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metamib.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metamib.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211metamib.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211metamib.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,105 @@
+/* p80211metamib.h
+*
+/* */
+
+#endif /* _P80211METAMIB_H */
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211metamsg.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metamsg.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metamsg.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211metamsg.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211metamsg.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,105 @@
+/* p80211metamsg.h
+*
+/* */
+
+#endif /* _P80211METAMSG_H */
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211metastruct.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metastruct.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metastruct.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211metastruct.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211metastruct.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,285 @@
+/* This file is GENERATED AUTOMATICALLY. DO NOT EDIT OR MODIFY.
+* --------------------------------------------------------------------
+} __WLAN_ATTRIB_PACK__ p80211msg_p2req_flashdl_write_t;
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211mgmt.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211mgmt.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211mgmt.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211mgmt.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211mgmt.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,575 @@
+/* p80211mgmt.h
+*
+
+
+#endif /* _P80211MGMT_H */
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211msg.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211msg.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211msg.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211msg.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211msg.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,102 @@
+/* p80211msg.h
+*
+
+#endif /* _P80211MSG_H */
+
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211netdev.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211netdev.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211netdev.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211netdev.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211netdev.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,1209 @@
+/* src/p80211/p80211knetdev.c
+*
+
+ DBFEXIT;
+}
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211netdev.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211netdev.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211netdev.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211netdev.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211netdev.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,254 @@
+/* p80211netdev.h
+*
+void p80211netdev_hwremoved(wlandevice_t *wlandev);
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211req.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211req.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211req.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211req.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211req.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,300 @@
+/* src/p80211/p80211req.c
+*
+ return 0;
+}
+
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211req.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211req.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211req.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211req.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211req.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,68 @@
+/* p80211req.h
+*
+int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf);
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211types.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211types.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211types.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211types.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211types.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,675 @@
+/* p80211types.h
+*
+
+#endif /* _P80211TYPES_H */
+
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211wep.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211wep.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211wep.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211wep.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211wep.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,315 @@
+/* src/p80211/p80211wep.c
+*
+
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211wext.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211wext.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211wext.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211wext.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211wext.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,1826 @@
+/* src/p80211/p80211wext.c
+*
+
+
+
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/prism2mgmt.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2mgmt.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2mgmt.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/prism2mgmt.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/prism2mgmt.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,1363 @@
+/* src/prism2/driver/prism2mgmt.c
+*
+ DBFEXIT;
+ return result;
+}
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/prism2mgmt.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2mgmt.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2mgmt.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/prism2mgmt.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/prism2mgmt.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,155 @@
+/* prism2mgmt.h
+*
+
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/prism2mib.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2mib.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2mib.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/prism2mib.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/prism2mib.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,1135 @@
+/* src/prism2/driver/prism2mib.c
+*
+ DBFEXIT;
+ return;
+}
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/prism2sta.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2sta.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2sta.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/prism2sta.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/prism2sta.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,2212 @@
+/* src/prism2/driver/prism2sta.c
+*
+
+ DBFEXIT;
+}
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/prism2usb.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2usb.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2usb.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/prism2usb.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/prism2usb.c Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,302 @@
+#include "hfa384x_usb.c"
+#include "prism2mgmt.c"
+
+module_init(prism2usb_init);
+module_exit(prism2usb_cleanup);
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/version.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/version.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/version.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/version.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/version.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,56 @@
+/* src/include/wlan/version.h
+*
+#define WLAN_BUILD_DATE "Thu Oct 2 11:04:42 PDT 2008"
+
+#endif
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/wlan_compat.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/wlan_compat.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/wlan_compat.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/wlan_compat.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/wlan_compat.h Wed May 06 16:56:42 2009 +0100
@@ -0,0 +1,193 @@
+/* wlan_compat.h
+*
+/*=============================================================*/
+#endif /* _WLAN_COMPAT_H */
+
-diff -purN linux-2.6.27/drivers/usb/atm/speedtch.c linux-2.6.27.19-5.1/drivers/usb/atm/speedtch.c
---- linux-2.6.27/drivers/usb/atm/speedtch.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/atm/speedtch.c 2009-03-25 16:11:19.000000000 +0000
-@@ -722,6 +722,16 @@ static void speedtch_atm_stop(struct usb
+diff -r 9608d5473017 drivers/usb/atm/speedtch.c
+--- a/drivers/usb/atm/speedtch.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/atm/speedtch.c Wed May 06 16:56:42 2009 +0100
+@@ -722,6 +722,16 @@
flush_scheduled_work();
}
/**********
** USB **
-@@ -740,6 +750,8 @@ static struct usb_driver speedtch_usb_dr
+@@ -740,6 +750,8 @@
.name = speedtch_driver_name,
.probe = speedtch_usb_probe,
.disconnect = usbatm_usb_disconnect,
.id_table = speedtch_usb_ids
};
-diff -purN linux-2.6.27/drivers/usb/class/cdc-acm.c linux-2.6.27.19-5.1/drivers/usb/class/cdc-acm.c
---- linux-2.6.27/drivers/usb/class/cdc-acm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/class/cdc-acm.c 2009-03-25 16:11:19.000000000 +0000
-@@ -158,16 +158,12 @@ static int acm_wb_is_avail(struct acm *a
+diff -r 9608d5473017 drivers/usb/class/cdc-acm.c
+--- a/drivers/usb/class/cdc-acm.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/class/cdc-acm.c Wed May 06 16:56:42 2009 +0100
+@@ -158,16 +158,12 @@
}
/*
}
/*
-@@ -482,6 +478,7 @@ static void acm_write_bulk(struct urb *u
+@@ -482,6 +478,7 @@
{
struct acm_wb *wb = urb->context;
struct acm *acm = wb->instance;
if (verbose || urb->status
|| (urb->actual_length != urb->transfer_buffer_length))
-@@ -490,7 +487,9 @@ static void acm_write_bulk(struct urb *u
+@@ -490,7 +487,9 @@
urb->transfer_buffer_length,
urb->status);
if (ACM_READY(acm))
schedule_work(&acm->work);
else
-@@ -849,9 +848,10 @@ static void acm_write_buffers_free(struc
+@@ -849,9 +848,10 @@
{
int i;
struct acm_wb *wb;
}
}
-diff -purN linux-2.6.27/drivers/usb/class/cdc-wdm.c linux-2.6.27.19-5.1/drivers/usb/class/cdc-wdm.c
---- linux-2.6.27/drivers/usb/class/cdc-wdm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/class/cdc-wdm.c 2009-03-25 16:11:19.000000000 +0000
-@@ -42,6 +42,8 @@ static struct usb_device_id wdm_ids[] =
+diff -r 9608d5473017 drivers/usb/class/cdc-wdm.c
+--- a/drivers/usb/class/cdc-wdm.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/class/cdc-wdm.c Wed May 06 16:56:42 2009 +0100
+@@ -41,6 +41,8 @@
+ },
{ }
};
-
-+MODULE_DEVICE_TABLE (usb, wdm_ids);
+
- #define WDM_MINOR_BASE 176
++MODULE_DEVICE_TABLE (usb, wdm_ids);
+ #define WDM_MINOR_BASE 176
-diff -purN linux-2.6.27/drivers/usb/core/devio.c linux-2.6.27.19-5.1/drivers/usb/core/devio.c
---- linux-2.6.27/drivers/usb/core/devio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/devio.c 2009-03-25 16:11:19.000000000 +0000
-@@ -1700,7 +1700,7 @@ const struct file_operations usbdev_file
+diff -r 9608d5473017 drivers/usb/core/devio.c
+--- a/drivers/usb/core/devio.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/devio.c Wed May 06 16:56:42 2009 +0100
+@@ -1700,7 +1700,7 @@
.release = usbdev_release,
};
{
struct dev_state *ps;
struct siginfo sinfo;
-@@ -1742,10 +1742,15 @@ static void usb_classdev_remove(struct u
+@@ -1742,10 +1742,15 @@
{
if (dev->usb_classdev)
device_unregister(dev->usb_classdev);
unsigned long action, void *dev)
{
switch (action) {
-@@ -1755,15 +1760,15 @@ static int usb_classdev_notify(struct no
+@@ -1755,15 +1760,15 @@
break;
case USB_DEVICE_REMOVE:
usb_classdev_remove(dev);
static struct cdev usb_device_cdev;
-@@ -1797,9 +1802,8 @@ int __init usb_devio_init(void)
+@@ -1797,9 +1802,8 @@
* to /sys/dev
*/
usb_classdev_class->dev_kobj = NULL;
-
-- usb_register_notify(&usbdev_nb);
- #endif
-+ usb_register_notify(&usbdev_nb);
++#endif
+ usb_register_notify(&usbdev_nb);
+-#endif
out:
return retval;
-@@ -1810,8 +1814,8 @@ error_cdev:
+@@ -1810,8 +1814,8 @@
void usb_devio_cleanup(void)
{
--#ifdef CONFIG_USB_DEVICE_CLASS
- usb_unregister_notify(&usbdev_nb);
-+#ifdef CONFIG_USB_DEVICE_CLASS
++ usb_unregister_notify(&usbdev_nb);
+ #ifdef CONFIG_USB_DEVICE_CLASS
+- usb_unregister_notify(&usbdev_nb);
class_destroy(usb_classdev_class);
#endif
cdev_del(&usb_device_cdev);
-diff -purN linux-2.6.27/drivers/usb/core/driver.c linux-2.6.27.19-5.1/drivers/usb/core/driver.c
---- linux-2.6.27/drivers/usb/core/driver.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/driver.c 2009-03-25 16:11:19.000000000 +0000
-@@ -1609,7 +1609,8 @@ int usb_external_resume_device(struct us
+diff -r 9608d5473017 drivers/usb/core/driver.c
+--- a/drivers/usb/core/driver.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/driver.c Wed May 06 16:56:42 2009 +0100
+@@ -1609,7 +1609,8 @@
status = usb_resume_both(udev);
udev->last_busy = jiffies;
usb_pm_unlock(udev);
/* Now that the device is awake, we can start trying to autosuspend
* it again. */
-diff -purN linux-2.6.27/drivers/usb/core/hcd.c linux-2.6.27.19-5.1/drivers/usb/core/hcd.c
---- linux-2.6.27/drivers/usb/core/hcd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/hcd.c 2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/usb/core/hcd.c
+--- a/drivers/usb/core/hcd.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/hcd.c Wed May 06 16:56:42 2009 +0100
@@ -81,6 +81,10 @@
/*-------------------------------------------------------------------------*/
/* host controllers we manage */
LIST_HEAD (usb_bus_list);
EXPORT_SYMBOL_GPL (usb_bus_list);
-@@ -102,6 +106,9 @@ static DEFINE_SPINLOCK(hcd_root_hub_lock
+@@ -101,6 +105,9 @@
+
/* used when updating an endpoint's URB list */
static DEFINE_SPINLOCK(hcd_urb_list_lock);
-
++
+/* used to protect against unlinking URBs after the device is gone */
+static DEFINE_SPINLOCK(hcd_urb_unlink_lock);
-+
+
/* wait queue for synchronous unlinks */
DECLARE_WAIT_QUEUE_HEAD(usb_kill_urb_queue);
-
-@@ -1373,10 +1380,25 @@ static int unlink1(struct usb_hcd *hcd,
+@@ -1373,10 +1380,25 @@
int usb_hcd_unlink_urb (struct urb *urb, int status)
{
struct usb_hcd *hcd;
if (retval == 0)
retval = -EINPROGRESS;
-@@ -1525,6 +1547,17 @@ void usb_hcd_disable_endpoint(struct usb
+@@ -1523,6 +1545,17 @@
+ hcd = bus_to_hcd(udev->bus);
+ if (hcd->driver->endpoint_disable)
hcd->driver->endpoint_disable(hcd, ep);
- }
-
++}
++
+/* Protect against drivers that try to unlink URBs after the device
+ * is gone, by waiting until all unlinks for @udev are finished.
+ * Since we don't currently track URBs by device, simply wait until
+{
+ spin_lock_irq(&hcd_urb_unlink_lock);
+ spin_unlock_irq(&hcd_urb_unlink_lock);
-+}
-+
- /*-------------------------------------------------------------------------*/
+ }
- /* called in any context */
-@@ -1994,6 +2027,20 @@ usb_hcd_platform_shutdown(struct platfor
+ /*-------------------------------------------------------------------------*/
+@@ -1994,6 +2027,20 @@
}
EXPORT_SYMBOL_GPL(usb_hcd_platform_shutdown);
/*-------------------------------------------------------------------------*/
#if defined(CONFIG_USB_MON)
-diff -purN linux-2.6.27/drivers/usb/core/hcd.h linux-2.6.27.19-5.1/drivers/usb/core/hcd.h
---- linux-2.6.27/drivers/usb/core/hcd.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/hcd.h 2009-03-25 16:11:19.000000000 +0000
-@@ -217,6 +217,10 @@ struct hc_driver {
+diff -r 9608d5473017 drivers/usb/core/hcd.h
+--- a/drivers/usb/core/hcd.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/hcd.h Wed May 06 16:56:42 2009 +0100
+@@ -217,6 +217,10 @@
void (*relinquish_port)(struct usb_hcd *, int);
/* has a port been handed over to a companion? */
int (*port_handed_over)(struct usb_hcd *, int);
};
extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb);
-@@ -232,6 +236,7 @@ extern void usb_hcd_flush_endpoint(struc
+@@ -232,6 +236,7 @@
struct usb_host_endpoint *ep);
extern void usb_hcd_disable_endpoint(struct usb_device *udev,
struct usb_host_endpoint *ep);
extern int usb_hcd_get_frame_number(struct usb_device *udev);
extern struct usb_hcd *usb_create_hcd(const struct hc_driver *driver,
-@@ -482,4 +487,10 @@ static inline void usbmon_urb_complete(s
+@@ -482,4 +487,10 @@
*/
extern struct rw_semaphore ehci_cf_port_reset_rwsem;
+extern unsigned long usb_hcds_loaded;
+
#endif /* __KERNEL__ */
-diff -purN linux-2.6.27/drivers/usb/core/hub.c linux-2.6.27.19-5.1/drivers/usb/core/hub.c
---- linux-2.6.27/drivers/usb/core/hub.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/hub.c 2009-03-25 16:11:19.000000000 +0000
-@@ -1349,6 +1349,7 @@ void usb_disconnect(struct usb_device **
+diff -r 9608d5473017 drivers/usb/core/hub.c
+--- a/drivers/usb/core/hub.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/hub.c Wed May 06 16:56:42 2009 +0100
+@@ -1349,6 +1349,7 @@
*/
dev_dbg (&udev->dev, "unregistering device\n");
usb_disable_device(udev, 0);
usb_unlock_device(udev);
-@@ -3424,7 +3425,7 @@ int usb_reset_device(struct usb_device *
+@@ -3424,7 +3425,7 @@
USB_INTERFACE_BOUND)
rebind = 1;
}
usb_rebind_intf(cintf);
}
}
-diff -purN linux-2.6.27/drivers/usb/core/inode.c linux-2.6.27.19-5.1/drivers/usb/core/inode.c
---- linux-2.6.27/drivers/usb/core/inode.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/inode.c 2009-03-25 16:11:19.000000000 +0000
-@@ -716,7 +716,6 @@ static void usbfs_remove_device(struct u
+diff -r 9608d5473017 drivers/usb/core/inode.c
+--- a/drivers/usb/core/inode.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/inode.c Wed May 06 16:56:42 2009 +0100
+@@ -716,7 +716,6 @@
fs_remove_file (dev->usbfs_dentry);
dev->usbfs_dentry = NULL;
}
}
static int usbfs_notify(struct notifier_block *self, unsigned long action, void *dev)
-diff -purN linux-2.6.27/drivers/usb/core/message.c linux-2.6.27.19-5.1/drivers/usb/core/message.c
---- linux-2.6.27/drivers/usb/core/message.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/message.c 2009-03-25 16:11:19.000000000 +0000
-@@ -1091,6 +1091,7 @@ void usb_disable_device(struct usb_devic
+diff -r 9608d5473017 drivers/usb/core/message.c
+--- a/drivers/usb/core/message.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/message.c Wed May 06 16:56:42 2009 +0100
+@@ -1091,6 +1091,7 @@
continue;
dev_dbg(&dev->dev, "unregistering interface %s\n",
dev_name(&interface->dev));
usb_remove_sysfs_intf_files(interface);
device_del(&interface->dev);
}
-diff -purN linux-2.6.27/drivers/usb/core/sysfs.c linux-2.6.27.19-5.1/drivers/usb/core/sysfs.c
---- linux-2.6.27/drivers/usb/core/sysfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/sysfs.c 2009-03-25 16:11:19.000000000 +0000
-@@ -816,7 +816,7 @@ int usb_create_sysfs_intf_files(struct u
+diff -r 9608d5473017 drivers/usb/core/sysfs.c
+--- a/drivers/usb/core/sysfs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/sysfs.c Wed May 06 16:56:43 2009 +0100
+@@ -816,7 +816,7 @@
struct usb_host_interface *alt = intf->cur_altsetting;
int retval;
return 0;
/* The interface string may be present in some altsettings
-diff -purN linux-2.6.27/drivers/usb/core/urb.c linux-2.6.27.19-5.1/drivers/usb/core/urb.c
---- linux-2.6.27/drivers/usb/core/urb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/urb.c 2009-03-25 16:11:19.000000000 +0000
-@@ -465,6 +465,12 @@ EXPORT_SYMBOL_GPL(usb_submit_urb);
+diff -r 9608d5473017 drivers/usb/core/urb.c
+--- a/drivers/usb/core/urb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/urb.c Wed May 06 16:56:43 2009 +0100
+@@ -465,6 +465,12 @@
* indicating that the request has been canceled (rather than any other
* code).
*
* This request is always asynchronous. Success is indicated by
* returning -EINPROGRESS, at which time the URB will probably not yet
* have been given back to the device driver. When it is eventually
-@@ -541,6 +547,9 @@ EXPORT_SYMBOL_GPL(usb_unlink_urb);
+@@ -541,6 +547,9 @@
* This routine may not be used in an interrupt context (such as a bottom
* half or a completion handler), or when holding a spinlock, or in other
* situations where the caller can't schedule().
*/
void usb_kill_urb(struct urb *urb)
{
-@@ -568,6 +577,9 @@ EXPORT_SYMBOL_GPL(usb_kill_urb);
+@@ -568,6 +577,9 @@
*
* this allows all outstanding URBs to be killed starting
* from the back of the queue
*/
void usb_kill_anchored_urbs(struct usb_anchor *anchor)
{
-@@ -597,6 +609,9 @@ EXPORT_SYMBOL_GPL(usb_kill_anchored_urbs
+@@ -597,6 +609,9 @@
* from the back of the queue. This function is asynchronous.
* The unlinking is just tiggered. It may happen after this
* function has returned.
*/
void usb_unlink_anchored_urbs(struct usb_anchor *anchor)
{
-diff -purN linux-2.6.27/drivers/usb/core/usb.h linux-2.6.27.19-5.1/drivers/usb/core/usb.h
---- linux-2.6.27/drivers/usb/core/usb.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/usb.h 2009-03-25 16:11:19.000000000 +0000
-@@ -145,7 +145,6 @@ extern struct usb_driver usbfs_driver;
+diff -r 9608d5473017 drivers/usb/core/usb.h
+--- a/drivers/usb/core/usb.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/usb.h Wed May 06 16:56:43 2009 +0100
+@@ -145,7 +145,6 @@
extern const struct file_operations usbfs_devices_fops;
extern const struct file_operations usbdev_file_operations;
extern void usbfs_conn_disc_event(void);
extern int usb_devio_init(void);
extern void usb_devio_cleanup(void);
-diff -purN linux-2.6.27/drivers/usb/gadget/f_acm.c linux-2.6.27.19-5.1/drivers/usb/gadget/f_acm.c
---- linux-2.6.27/drivers/usb/gadget/f_acm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/gadget/f_acm.c 2009-03-25 16:11:18.000000000 +0000
-@@ -463,7 +463,11 @@ static int acm_cdc_notify(struct f_acm *
+diff -r 9608d5473017 drivers/usb/gadget/f_acm.c
+--- a/drivers/usb/gadget/f_acm.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/gadget/f_acm.c Wed May 06 16:56:43 2009 +0100
+@@ -463,7 +463,11 @@
notify->wLength = cpu_to_le16(length);
memcpy(buf, data, length);
if (status < 0) {
ERROR(acm->port.func.config->cdev,
"acm ttyGS%d can't notify serial state, %d\n",
-diff -purN linux-2.6.27/drivers/usb/gadget/f_rndis.c linux-2.6.27.19-5.1/drivers/usb/gadget/f_rndis.c
---- linux-2.6.27/drivers/usb/gadget/f_rndis.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/gadget/f_rndis.c 2009-03-25 16:11:18.000000000 +0000
-@@ -172,7 +172,6 @@ static struct usb_interface_descriptor r
+diff -r 9608d5473017 drivers/usb/gadget/f_rndis.c
+--- a/drivers/usb/gadget/f_rndis.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/gadget/f_rndis.c Wed May 06 16:56:43 2009 +0100
+@@ -172,7 +172,6 @@
.bDescriptorType = USB_DT_INTERFACE,
/* .bInterfaceNumber = DYNAMIC */
.bNumEndpoints = 2,
.bInterfaceClass = USB_CLASS_CDC_DATA,
.bInterfaceSubClass = 0,
-@@ -303,7 +302,7 @@ static void rndis_response_available(voi
+@@ -303,7 +302,7 @@
__le32 *data = req->buf;
int status;
return;
/* Send RNDIS RESPONSE_AVAILABLE notification; a
-@@ -652,6 +651,8 @@ rndis_bind(struct usb_configuration *c,
+@@ -652,6 +651,8 @@
fs_in_desc.bEndpointAddress;
hs_out_desc.bEndpointAddress =
fs_out_desc.bEndpointAddress;
/* copy descriptors, and track endpoint copies */
f->hs_descriptors = usb_copy_descriptors(eth_hs_function);
-@@ -663,6 +664,8 @@ rndis_bind(struct usb_configuration *c,
+@@ -663,6 +664,8 @@
f->hs_descriptors, &hs_in_desc);
rndis->hs.out = usb_find_endpoint(eth_hs_function,
f->hs_descriptors, &hs_out_desc);
}
rndis->port.open = rndis_open;
-diff -purN linux-2.6.27/drivers/usb/gadget/s3c2410_udc.c linux-2.6.27.19-5.1/drivers/usb/gadget/s3c2410_udc.c
---- linux-2.6.27/drivers/usb/gadget/s3c2410_udc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/gadget/s3c2410_udc.c 2009-03-25 16:11:18.000000000 +0000
-@@ -1651,7 +1651,7 @@ int usb_gadget_register_driver(struct us
+diff -r 9608d5473017 drivers/usb/gadget/s3c2410_udc.c
+--- a/drivers/usb/gadget/s3c2410_udc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/gadget/s3c2410_udc.c Wed May 06 16:56:43 2009 +0100
+@@ -1651,7 +1651,7 @@
return -EBUSY;
if (!driver->bind || !driver->setup
printk(KERN_ERR "Invalid driver: bind %p setup %p speed %d\n",
driver->bind, driver->setup, driver->speed);
return -EINVAL;
-diff -purN linux-2.6.27/drivers/usb/gadget/u_ether.c linux-2.6.27.19-5.1/drivers/usb/gadget/u_ether.c
---- linux-2.6.27/drivers/usb/gadget/u_ether.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/gadget/u_ether.c 2009-03-25 16:11:18.000000000 +0000
-@@ -873,6 +873,13 @@ struct net_device *gether_connect(struct
+diff -r 9608d5473017 drivers/usb/gadget/u_ether.c
+--- a/drivers/usb/gadget/u_ether.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/gadget/u_ether.c Wed May 06 16:56:43 2009 +0100
+@@ -873,6 +873,13 @@
spin_lock(&dev->lock);
dev->port_usb = link;
link->ioport = dev;
spin_unlock(&dev->lock);
netif_carrier_on(dev->net);
-diff -purN linux-2.6.27/drivers/usb/host/Kconfig linux-2.6.27.19-5.1/drivers/usb/host/Kconfig
---- linux-2.6.27/drivers/usb/host/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/Kconfig 2009-03-25 16:11:19.000000000 +0000
-@@ -110,29 +110,18 @@ config USB_ISP116X_HCD
+diff -r 9608d5473017 drivers/usb/host/Kconfig
+--- a/drivers/usb/host/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/Kconfig Wed May 06 16:56:43 2009 +0100
+@@ -110,29 +110,18 @@
config USB_ISP1760_HCD
tristate "ISP 1760 HCD support"
config USB_OHCI_HCD
tristate "OHCI HCD support"
-diff -purN linux-2.6.27/drivers/usb/host/ehci-hcd.c linux-2.6.27.19-5.1/drivers/usb/host/ehci-hcd.c
---- linux-2.6.27/drivers/usb/host/ehci-hcd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ehci-hcd.c 2009-03-25 16:11:19.000000000 +0000
-@@ -643,7 +643,7 @@ static int ehci_run (struct usb_hcd *hcd
+diff -r 9608d5473017 drivers/usb/host/ehci-hcd.c
+--- a/drivers/usb/host/ehci-hcd.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ehci-hcd.c Wed May 06 16:56:43 2009 +0100
+@@ -643,7 +643,7 @@
static irqreturn_t ehci_irq (struct usb_hcd *hcd)
{
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
int bh;
spin_lock (&ehci->lock);
-@@ -656,14 +656,14 @@ static irqreturn_t ehci_irq (struct usb_
+@@ -656,14 +656,14 @@
goto dead;
}
cmd = ehci_readl(ehci, &ehci->regs->command);
bh = 0;
-@@ -731,19 +731,18 @@ static irqreturn_t ehci_irq (struct usb_
+@@ -731,19 +731,18 @@
/* PCI errors [4.15.2.4] */
if (unlikely ((status & STS_FATAL) != 0)) {
}
if (bh)
-@@ -992,6 +991,48 @@ static int ehci_get_frame (struct usb_hc
+@@ -992,6 +991,48 @@
ehci->periodic_size;
}
/*-------------------------------------------------------------------------*/
#define DRIVER_INFO DRIVER_VERSION " " DRIVER_DESC
-@@ -1049,6 +1090,12 @@ static int __init ehci_hcd_init(void)
+@@ -1049,6 +1090,12 @@
{
int retval = 0;
pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",
hcd_name,
sizeof(struct ehci_qh), sizeof(struct ehci_qtd),
-@@ -1056,8 +1103,10 @@ static int __init ehci_hcd_init(void)
+@@ -1056,8 +1103,10 @@
#ifdef DEBUG
ehci_debug_root = debugfs_create_dir("ehci", NULL);
#endif
#ifdef PLATFORM_DRIVER
-@@ -1104,7 +1153,9 @@ clean0:
+@@ -1104,7 +1153,9 @@
#ifdef DEBUG
debugfs_remove(ehci_debug_root);
ehci_debug_root = NULL;
return retval;
}
module_init(ehci_hcd_init);
-@@ -1126,6 +1177,7 @@ static void __exit ehci_hcd_cleanup(void
+@@ -1126,6 +1177,7 @@
#ifdef DEBUG
debugfs_remove(ehci_debug_root);
#endif
}
module_exit(ehci_hcd_cleanup);
-diff -purN linux-2.6.27/drivers/usb/host/ehci-pci.c linux-2.6.27.19-5.1/drivers/usb/host/ehci-pci.c
---- linux-2.6.27/drivers/usb/host/ehci-pci.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ehci-pci.c 2009-03-25 16:11:19.000000000 +0000
-@@ -22,6 +22,10 @@
- #error "This file is PCI bus glue. CONFIG_PCI must be defined."
- #endif
+diff -r 9608d5473017 drivers/usb/host/ehci-pci.c
+--- a/drivers/usb/host/ehci-pci.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ehci-pci.c Wed May 06 16:56:43 2009 +0100
+@@ -20,6 +20,10 @@
-+#ifdef CONFIG_KDB_USB
-+#include <linux/kdb.h>
+ #ifndef CONFIG_PCI
+ #error "This file is PCI bus glue. CONFIG_PCI must be defined."
+#endif
+
- /*-------------------------------------------------------------------------*/
++#ifdef CONFIG_KDB_USB
++#include <linux/kdb.h>
+ #endif
- /* called after powerup, by probe or system-pm "wakeup" */
-@@ -66,6 +70,8 @@ static int ehci_pci_setup(struct usb_hcd
+ /*-------------------------------------------------------------------------*/
+@@ -66,6 +70,8 @@
{
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
u32 temp;
int retval;
-@@ -166,6 +172,28 @@ static int ehci_pci_setup(struct usb_hcd
+@@ -164,6 +170,28 @@
+ if (tmp & 0x20)
+ break;
pci_write_config_byte(pdev, 0x4b, tmp | 0x20);
- }
- break;
++ }
++ break;
+ case PCI_VENDOR_ID_ATI:
+ /* SB600 and old version of SB700 have a bug in EHCI controller,
+ * which causes usb devices lose response in some cases.
+ pci_write_config_byte(pdev, 0x53, tmp | (1<<3));
+ }
+ pci_dev_put(p_smbus);
-+ }
-+ break;
+ }
+ break;
}
-
- ehci_reset(ehci);
-@@ -380,6 +408,10 @@ static const struct hc_driver ehci_pci_h
+@@ -380,6 +408,10 @@
.bus_resume = ehci_bus_resume,
.relinquish_port = ehci_relinquish_port,
.port_handed_over = ehci_port_handed_over,
};
/*-------------------------------------------------------------------------*/
-diff -purN linux-2.6.27/drivers/usb/host/ehci-ps3.c linux-2.6.27.19-5.1/drivers/usb/host/ehci-ps3.c
---- linux-2.6.27/drivers/usb/host/ehci-ps3.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ehci-ps3.c 2009-03-25 16:11:19.000000000 +0000
-@@ -205,6 +205,7 @@ static int ps3_ehci_remove(struct ps3_sy
+diff -r 9608d5473017 drivers/usb/host/ehci-ps3.c
+--- a/drivers/usb/host/ehci-ps3.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ehci-ps3.c Wed May 06 16:56:43 2009 +0100
+@@ -205,6 +205,7 @@
tmp = hcd->irq;
usb_remove_hcd(hcd);
ps3_system_bus_set_driver_data(dev, NULL);
-diff -purN linux-2.6.27/drivers/usb/host/ehci-q.c linux-2.6.27.19-5.1/drivers/usb/host/ehci-q.c
---- linux-2.6.27/drivers/usb/host/ehci-q.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ehci-q.c 2009-03-25 16:11:19.000000000 +0000
-@@ -468,6 +468,228 @@ halt:
+diff -r 9608d5473017 drivers/usb/host/ehci-q.c
+--- a/drivers/usb/host/ehci-q.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ehci-q.c Wed May 06 16:56:43 2009 +0100
+@@ -467,6 +467,228 @@
+
return count;
}
-
++
+#ifdef CONFIG_KDB_USB
+/*
+ * This routine is basically a copy of qh_completions() for use by KDB.
+}
+
+#endif /* CONFIG_KDB_USB */
-+
+
/*-------------------------------------------------------------------------*/
- // high bandwidth multiplier, as encoded in highspeed endpoint descriptors
-diff -purN linux-2.6.27/drivers/usb/host/ehci-sched.c linux-2.6.27.19-5.1/drivers/usb/host/ehci-sched.c
---- linux-2.6.27/drivers/usb/host/ehci-sched.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ehci-sched.c 2009-03-25 16:11:19.000000000 +0000
-@@ -918,7 +918,7 @@ iso_stream_init (
+diff -r 9608d5473017 drivers/usb/host/ehci-sched.c
+--- a/drivers/usb/host/ehci-sched.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ehci-sched.c Wed May 06 16:56:43 2009 +0100
+@@ -918,7 +918,7 @@
*/
stream->usecs = HS_USECS_ISO (maxp);
bandwidth = stream->usecs * 8;
} else {
u32 addr;
-@@ -951,7 +951,7 @@ iso_stream_init (
+@@ -951,7 +951,7 @@
} else
stream->raw_mask = smask_out [hs_transfers - 1];
bandwidth = stream->usecs + stream->c_usecs;
/* stream->splits gets created from raw_mask later */
stream->address = cpu_to_hc32(ehci, addr);
-diff -purN linux-2.6.27/drivers/usb/host/ehci.h linux-2.6.27.19-5.1/drivers/usb/host/ehci.h
---- linux-2.6.27/drivers/usb/host/ehci.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ehci.h 2009-03-25 16:11:19.000000000 +0000
-@@ -210,143 +210,7 @@ timer_action (struct ehci_hcd *ehci, enu
+diff -r 9608d5473017 drivers/usb/host/ehci.h
+--- a/drivers/usb/host/ehci.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ehci.h Wed May 06 16:56:43 2009 +0100
+@@ -210,143 +210,7 @@
/*-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------*/
-diff -purN linux-2.6.27/drivers/usb/host/isp1760-if.c linux-2.6.27.19-5.1/drivers/usb/host/isp1760-if.c
---- linux-2.6.27/drivers/usb/host/isp1760-if.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/isp1760-if.c 2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/usb/host/isp1760-if.c
+--- a/drivers/usb/host/isp1760-if.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/isp1760-if.c Wed May 06 16:56:43 2009 +0100
@@ -14,16 +14,16 @@
#include "../core/hcd.h"
#include "isp1760-hcd.h"
static int of_isp1760_probe(struct of_device *dev,
const struct of_device_id *match)
{
-@@ -121,6 +121,7 @@ static struct of_device_id of_isp1760_ma
+@@ -121,6 +121,7 @@
MODULE_DEVICE_TABLE(of, of_isp1760_match);
static struct of_platform_driver isp1760_of_driver = {
.name = "nxp-isp1760",
.match_table = of_isp1760_match,
.probe = of_isp1760_probe,
-@@ -128,24 +129,24 @@ static struct of_platform_driver isp1760
+@@ -128,24 +129,24 @@
};
#endif
if (usb_disabled())
return -ENODEV;
-@@ -168,26 +169,30 @@ static int __devinit isp1761_pci_probe(s
+@@ -168,26 +169,30 @@
iobase = ioremap_nocache(nxp_pci_io_base, iolength);
if (!iobase) {
printk(KERN_ERR "ioremap #1\n");
}
/* bad pci latencies can contribute to overruns */
-@@ -210,38 +215,54 @@ static int __devinit isp1761_pci_probe(s
+@@ -210,38 +215,54 @@
* */
writel(0xface, chip_addr + HC_SCRATCH_REG);
udelay(100);
+ reg_data = readl(chip_addr + HC_SCRATCH_REG) & 0x0000ffff;
retry_count--;
}
-
-+ iounmap(chip_addr);
+
++ iounmap(chip_addr);
+
/* Host Controller presence is detected by writing to scratch register
* and reading back and checking the contents are same or not
*/
static void isp1761_pci_remove(struct pci_dev *dev)
{
struct usb_hcd *hcd;
-@@ -254,12 +275,6 @@ static void isp1761_pci_remove(struct pc
+@@ -254,12 +275,6 @@
usb_put_hcd(hcd);
pci_disable_device(dev);
}
static void isp1761_pci_shutdown(struct pci_dev *dev)
-@@ -267,12 +282,16 @@ static void isp1761_pci_shutdown(struct
+@@ -267,12 +282,16 @@
printk(KERN_ERR "ips1761_pci_shutdown\n");
}
};
MODULE_DEVICE_TABLE(pci, isp1760_plx);
-@@ -287,28 +306,28 @@ static struct pci_driver isp1761_pci_dri
+@@ -287,28 +306,28 @@
static int __init isp1760_init(void)
{
of_unregister_platform_driver(&isp1760_of_driver);
#endif
deinit_kmem_cache();
-@@ -318,10 +337,10 @@ module_init(isp1760_init);
+@@ -318,10 +337,10 @@
static void __exit isp1760_exit(void)
{
pci_unregister_driver(&isp1761_pci_driver);
#endif
deinit_kmem_cache();
-diff -purN linux-2.6.27/drivers/usb/host/ohci-hcd.c linux-2.6.27.19-5.1/drivers/usb/host/ohci-hcd.c
---- linux-2.6.27/drivers/usb/host/ohci-hcd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ohci-hcd.c 2009-03-25 16:11:19.000000000 +0000
-@@ -984,6 +984,73 @@ static int ohci_restart (struct ohci_hcd
+diff -r 9608d5473017 drivers/usb/host/ohci-hcd.c
+--- a/drivers/usb/host/ohci-hcd.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ohci-hcd.c Wed May 06 16:56:43 2009 +0100
+@@ -984,6 +984,73 @@
/*-------------------------------------------------------------------------*/
#define DRIVER_INFO DRIVER_VERSION " " DRIVER_DESC
MODULE_AUTHOR (DRIVER_AUTHOR);
-@@ -1098,6 +1165,7 @@ static int __init ohci_hcd_mod_init(void
+@@ -1098,6 +1165,7 @@
printk (KERN_DEBUG "%s: " DRIVER_INFO "\n", hcd_name);
pr_debug ("%s: block sizes: ed %Zd td %Zd\n", hcd_name,
sizeof (struct ed), sizeof (struct td));
#ifdef DEBUG
ohci_debug_root = debugfs_create_dir("ohci", NULL);
-@@ -1184,6 +1252,7 @@ static int __init ohci_hcd_mod_init(void
+@@ -1184,6 +1252,7 @@
error_debug:
#endif
return retval;
}
module_init(ohci_hcd_mod_init);
-@@ -1214,6 +1283,7 @@ static void __exit ohci_hcd_mod_exit(voi
+@@ -1214,6 +1283,7 @@
#ifdef DEBUG
debugfs_remove(ohci_debug_root);
#endif
}
module_exit(ohci_hcd_mod_exit);
-diff -purN linux-2.6.27/drivers/usb/host/ohci-hub.c linux-2.6.27.19-5.1/drivers/usb/host/ohci-hub.c
---- linux-2.6.27/drivers/usb/host/ohci-hub.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ohci-hub.c 2009-03-25 16:11:19.000000000 +0000
-@@ -359,21 +359,24 @@ static void ohci_finish_controller_resum
+diff -r 9608d5473017 drivers/usb/host/ohci-hub.c
+--- a/drivers/usb/host/ohci-hub.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ohci-hub.c Wed May 06 16:56:44 2009 +0100
+@@ -359,21 +359,24 @@
/* Carry out polling-, autostop-, and autoresume-related state changes */
static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
+ int rhsc_enable;
- rhsc = ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC;
-- switch (ohci->hc_control & OHCI_CTRL_HCFS) {
+ /* Some broken controllers never turn off RHCS in the interrupt
+ * status register. For their sake we won't re-enable RHSC
+ * interrupts if the interrupt bit is already active.
+ */
+ rhsc_enable = ohci_readl(ohci, &ohci->regs->intrenable) &
+ OHCI_INTR_RHSC;
-
-+ switch (ohci->hc_control & OHCI_CTRL_HCFS) {
++
+ switch (ohci->hc_control & OHCI_CTRL_HCFS) {
+-
case OHCI_USB_OPER:
- /* If no status changes are pending, enable status-change
- * interrupts.
}
/* Keep on polling until we know a device is connected
-@@ -383,7 +386,7 @@ static int ohci_root_hub_state_changes(s
+@@ -383,7 +386,7 @@
if (any_connected ||
!device_may_wakeup(&ohci_to_hcd(ohci)
->self.root_hub->dev)) {
poll_rh = 0;
} else {
ohci->autostop = 1;
-@@ -396,34 +399,45 @@ static int ohci_root_hub_state_changes(s
+@@ -396,34 +399,45 @@
ohci->autostop = 0;
ohci->next_statechange = jiffies +
STATECHANGE_DELAY;
ohci_rh_resume(ohci);
else
usb_hcd_resume_root_hub(ohci_to_hcd(ohci));
-- } else {
-- if (!rhsc && (ohci->autostop ||
-- ohci_to_hcd(ohci)->self.root_hub->
-- do_remote_wakeup))
-- ohci_writel(ohci, OHCI_INTR_RHSC,
-- &ohci->regs->intrenable);
-
-- /* everything is idle, no need for polling */
++
+ /* If remote wakeup is disabled, stop polling */
+ } else if (!ohci->autostop &&
+ !ohci_to_hcd(ohci)->self.root_hub->
+ do_remote_wakeup) {
- poll_rh = 0;
++ poll_rh = 0;
+
-+ } else {
+ } else {
+- if (!rhsc && (ohci->autostop ||
+- ohci_to_hcd(ohci)->self.root_hub->
+- do_remote_wakeup))
+- ohci_writel(ohci, OHCI_INTR_RHSC,
+ /* If no status changes are pending,
+ * enable RHSC interrupts
+ */
+ if (!rhsc_enable && !rhsc_status) {
+ rhsc_enable = OHCI_INTR_RHSC;
+ ohci_writel(ohci, rhsc_enable,
-+ &ohci->regs->intrenable);
+ &ohci->regs->intrenable);
+-
+- /* everything is idle, no need for polling */
+- poll_rh = 0;
+ }
+ /* Keep polling until RHSC is enabled */
+ if (rhsc_enable)
}
break;
}
-@@ -441,18 +455,22 @@ static inline int ohci_rh_resume(struct
+@@ -441,18 +455,22 @@
* autostop isn't used when CONFIG_PM is turned off.
*/
static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
}
#endif /* CONFIG_PM */
-@@ -467,6 +485,7 @@ ohci_hub_status_data (struct usb_hcd *hc
+@@ -467,6 +485,7 @@
struct ohci_hcd *ohci = hcd_to_ohci (hcd);
int i, changed = 0, length = 1;
int any_connected = 0;
unsigned long flags;
spin_lock_irqsave (&ohci->lock, flags);
-@@ -492,12 +511,10 @@ ohci_hub_status_data (struct usb_hcd *hc
+@@ -492,12 +511,10 @@
length++;
}
/* look at each port */
for (i = 0; i < ohci->num_ports; i++) {
-@@ -517,7 +534,7 @@ ohci_hub_status_data (struct usb_hcd *hc
+@@ -517,7 +534,7 @@
}
hcd->poll_rh = ohci_root_hub_state_changes(ohci, changed,
done:
spin_unlock_irqrestore (&ohci->lock, flags);
-diff -purN linux-2.6.27/drivers/usb/host/ohci-pci.c linux-2.6.27.19-5.1/drivers/usb/host/ohci-pci.c
---- linux-2.6.27/drivers/usb/host/ohci-pci.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ohci-pci.c 2009-03-25 16:11:19.000000000 +0000
-@@ -21,6 +21,10 @@
+diff -r 9608d5473017 drivers/usb/host/ohci-pci.c
+--- a/drivers/usb/host/ohci-pci.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ohci-pci.c Wed May 06 16:56:44 2009 +0100
+@@ -20,6 +20,10 @@
+
#include <linux/pci.h>
#include <linux/io.h>
-
++
+#ifdef CONFIG_KDB_USB
+#include <linux/kdb.h>
+#endif
-+
+
/* constants used to work around PM-related transfer
- * glitches in some AMD 700 series southbridges
-@@ -367,6 +371,7 @@ static int __devinit ohci_pci_start (str
+@@ -367,6 +371,7 @@
ohci_err (ohci, "can't start\n");
ohci_stop (hcd);
}
return ret;
}
-@@ -464,6 +469,9 @@ static const struct hc_driver ohci_pci_h
+@@ -464,6 +469,9 @@
.bus_resume = ohci_bus_resume,
#endif
.start_port_reset = ohci_start_port_reset,
};
/*-------------------------------------------------------------------------*/
-diff -purN linux-2.6.27/drivers/usb/host/ohci-ps3.c linux-2.6.27.19-5.1/drivers/usb/host/ohci-ps3.c
---- linux-2.6.27/drivers/usb/host/ohci-ps3.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ohci-ps3.c 2009-03-25 16:11:19.000000000 +0000
-@@ -192,7 +192,7 @@ fail_start:
+diff -r 9608d5473017 drivers/usb/host/ohci-ps3.c
+--- a/drivers/usb/host/ohci-ps3.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ohci-ps3.c Wed May 06 16:56:44 2009 +0100
+@@ -192,7 +192,7 @@
return result;
}
{
unsigned int tmp;
struct usb_hcd *hcd =
-@@ -205,6 +205,7 @@ static int ps3_ohci_remove (struct ps3_s
+@@ -205,6 +205,7 @@
tmp = hcd->irq;
usb_remove_hcd(hcd);
ps3_system_bus_set_driver_data(dev, NULL);
-diff -purN linux-2.6.27/drivers/usb/host/ohci-q.c linux-2.6.27.19-5.1/drivers/usb/host/ohci-q.c
---- linux-2.6.27/drivers/usb/host/ohci-q.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ohci-q.c 2009-03-25 16:11:19.000000000 +0000
-@@ -1127,3 +1127,65 @@ dl_done_list (struct ohci_hcd *ohci)
+diff -r 9608d5473017 drivers/usb/host/ohci-q.c
+--- a/drivers/usb/host/ohci-q.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ohci-q.c Wed May 06 16:56:44 2009 +0100
+@@ -1127,3 +1127,65 @@
td = td_next;
}
}
+}
+
+#endif /* CONFIG_KDB_USB */
-diff -purN linux-2.6.27/drivers/usb/host/uhci-hcd.c linux-2.6.27.19-5.1/drivers/usb/host/uhci-hcd.c
---- linux-2.6.27/drivers/usb/host/uhci-hcd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/uhci-hcd.c 2009-03-25 16:11:19.000000000 +0000
-@@ -953,6 +953,7 @@ static int __init uhci_hcd_init(void)
+diff -r 9608d5473017 drivers/usb/host/uhci-hcd.c
+--- a/drivers/usb/host/uhci-hcd.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/uhci-hcd.c Wed May 06 16:56:44 2009 +0100
+@@ -953,6 +953,7 @@
printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION "%s\n",
ignore_oc ? ", overcurrent ignored" : "");
if (usb_disabled())
return -ENODEV;
-@@ -988,6 +989,7 @@ debug_failed:
+@@ -988,6 +989,7 @@
errbuf_failed:
return retval;
}
-@@ -997,6 +999,7 @@ static void __exit uhci_hcd_cleanup(void
+@@ -997,6 +999,7 @@
kmem_cache_destroy(uhci_up_cachep);
debugfs_remove(uhci_debugfs_root);
kfree(errbuf);
}
module_init(uhci_hcd_init);
-diff -purN linux-2.6.27/drivers/usb/misc/emi26.c linux-2.6.27.19-5.1/drivers/usb/misc/emi26.c
---- linux-2.6.27/drivers/usb/misc/emi26.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/misc/emi26.c 2009-03-25 16:11:19.000000000 +0000
-@@ -157,7 +157,7 @@ static int emi26_load_firmware (struct u
+diff -r 9608d5473017 drivers/usb/misc/emi26.c
+--- a/drivers/usb/misc/emi26.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/misc/emi26.c Wed May 06 16:56:44 2009 +0100
+@@ -157,7 +157,7 @@
err("%s - error loading firmware: error = %d", __func__, err);
goto wraperr;
}
/* Assert reset (stop the CPU in the EMI) */
err = emi26_set_reset(dev,1);
-diff -purN linux-2.6.27/drivers/usb/mon/mon_bin.c linux-2.6.27.19-5.1/drivers/usb/mon/mon_bin.c
---- linux-2.6.27/drivers/usb/mon/mon_bin.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/mon/mon_bin.c 2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/usb/mon/mon_bin.c
+--- a/drivers/usb/mon/mon_bin.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/mon/mon_bin.c Wed May 06 16:56:44 2009 +0100
@@ -37,6 +37,7 @@
#define MON_IOCX_GET _IOW(MON_IOC_MAGIC, 6, struct mon_bin_get)
#define MON_IOCX_MFETCH _IOWR(MON_IOC_MAGIC, 7, struct mon_bin_mfetch)
#ifdef CONFIG_COMPAT
#define MON_IOCX_GET32 _IOW(MON_IOC_MAGIC, 6, struct mon_bin_get32)
#define MON_IOCX_MFETCH32 _IOWR(MON_IOC_MAGIC, 7, struct mon_bin_mfetch32)
-@@ -687,7 +688,10 @@ static ssize_t mon_bin_read(struct file
+@@ -687,7 +688,10 @@
}
if (rp->b_read >= sizeof(struct mon_bin_hdr)) {
offset = rp->b_out + PKT_SIZE;
offset += rp->b_read - sizeof(struct mon_bin_hdr);
if (offset >= rp->b_size)
-@@ -918,21 +922,6 @@ static int mon_bin_ioctl(struct inode *i
+@@ -918,21 +922,6 @@
}
break;
case MON_IOCX_MFETCH:
{
struct mon_bin_mfetch mfetch;
-@@ -959,7 +948,57 @@ static int mon_bin_ioctl(struct inode *i
+@@ -958,35 +947,6 @@
+ ret = 0;
}
break;
+-
+-#ifdef CONFIG_COMPAT
+- case MON_IOCX_MFETCH32:
+- {
+- struct mon_bin_mfetch32 mfetch;
+- struct mon_bin_mfetch32 __user *uptr;
+-
+- uptr = (struct mon_bin_mfetch32 __user *) compat_ptr(arg);
+-
+- if (copy_from_user(&mfetch, uptr, sizeof(mfetch)))
+- return -EFAULT;
+-
+- if (mfetch.nflush32) {
+- ret = mon_bin_flush(rp, mfetch.nflush32);
+- if (ret < 0)
+- return ret;
+- if (put_user(ret, &uptr->nflush32))
+- return -EFAULT;
+- }
+- ret = mon_bin_fetch(file, rp, compat_ptr(mfetch.offvec32),
+- mfetch.nfetch32);
+- if (ret < 0)
+- return ret;
+- if (put_user(ret, &uptr->nfetch32))
+- return -EFAULT;
+- ret = 0;
+- }
+- break;
+-#endif
-+ case MON_IOCG_STATS: {
-+ struct mon_bin_stats __user *sp;
-+ unsigned int nevents;
-+ unsigned int ndropped;
-+
-+ spin_lock_irqsave(&rp->b_lock, flags);
-+ ndropped = rp->cnt_lost;
-+ rp->cnt_lost = 0;
-+ spin_unlock_irqrestore(&rp->b_lock, flags);
-+ nevents = mon_bin_queued(rp);
-+
-+ sp = (struct mon_bin_stats __user *)arg;
-+ if (put_user(rp->cnt_lost, &sp->dropped))
-+ return -EFAULT;
-+ if (put_user(nevents, &sp->queued))
-+ return -EFAULT;
-+
-+ }
-+ break;
-+
-+ default:
-+ return -ENOTTY;
-+ }
-+
-+ return ret;
-+}
+ case MON_IOCG_STATS: {
+ struct mon_bin_stats __user *sp;
+@@ -1014,6 +974,73 @@
+
+ return ret;
+ }
+
- #ifdef CONFIG_COMPAT
++#ifdef CONFIG_COMPAT
+static long mon_bin_compat_ioctl(struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ }
+ return 0;
+
- case MON_IOCX_MFETCH32:
- {
- struct mon_bin_mfetch32 mfetch;
-@@ -983,37 +1022,25 @@ static int mon_bin_ioctl(struct inode *i
- return ret;
- if (put_user(ret, &uptr->nfetch32))
- return -EFAULT;
-- ret = 0;
- }
-- break;
--#endif
--
-- case MON_IOCG_STATS: {
-- struct mon_bin_stats __user *sp;
-- unsigned int nevents;
-- unsigned int ndropped;
--
-- spin_lock_irqsave(&rp->b_lock, flags);
-- ndropped = rp->cnt_lost;
-- rp->cnt_lost = 0;
-- spin_unlock_irqrestore(&rp->b_lock, flags);
-- nevents = mon_bin_queued(rp);
++ case MON_IOCX_MFETCH32:
++ {
++ struct mon_bin_mfetch32 mfetch;
++ struct mon_bin_mfetch32 __user *uptr;
++
++ uptr = (struct mon_bin_mfetch32 __user *) compat_ptr(arg);
++
++ if (copy_from_user(&mfetch, uptr, sizeof(mfetch)))
++ return -EFAULT;
++
++ if (mfetch.nflush32) {
++ ret = mon_bin_flush(rp, mfetch.nflush32);
++ if (ret < 0)
++ return ret;
++ if (put_user(ret, &uptr->nflush32))
++ return -EFAULT;
++ }
++ ret = mon_bin_fetch(file, rp, compat_ptr(mfetch.offvec32),
++ mfetch.nfetch32);
++ if (ret < 0)
++ return ret;
++ if (put_user(ret, &uptr->nfetch32))
++ return -EFAULT;
++ }
+ return 0;
-
-- sp = (struct mon_bin_stats __user *)arg;
-- if (put_user(rp->cnt_lost, &sp->dropped))
-- return -EFAULT;
-- if (put_user(nevents, &sp->queued))
-- return -EFAULT;
++
+ case MON_IOCG_STATS:
+ return mon_bin_ioctl(NULL, file, cmd,
+ (unsigned long) compat_ptr(arg));
-
-- }
-- break;
++
+ case MON_IOCQ_URB_LEN:
+ case MON_IOCQ_RING_SIZE:
+ case MON_IOCT_RING_SIZE:
+ case MON_IOCH_MFLUSH:
+ return mon_bin_ioctl(NULL, file, cmd, arg);
-
- default:
-- return -ENOTTY;
++
++ default:
+ ;
- }
--
-- return ret;
++ }
+ return -ENOTTY;
- }
++}
+#endif /* CONFIG_COMPAT */
static unsigned int
mon_bin_poll(struct file *file, struct poll_table_struct *wait)
-@@ -1091,6 +1118,9 @@ static const struct file_operations mon_
+@@ -1091,6 +1118,9 @@
/* .write = mon_text_write, */
.poll = mon_bin_poll,
.ioctl = mon_bin_ioctl,
.release = mon_bin_release,
.mmap = mon_bin_mmap,
};
-diff -purN linux-2.6.27/drivers/usb/musb/Kconfig linux-2.6.27.19-5.1/drivers/usb/musb/Kconfig
---- linux-2.6.27/drivers/usb/musb/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/musb/Kconfig 2009-03-25 16:11:19.000000000 +0000
-@@ -33,10 +33,6 @@ config USB_MUSB_SOC
+diff -r 9608d5473017 drivers/usb/musb/Kconfig
+--- a/drivers/usb/musb/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/musb/Kconfig Wed May 06 16:56:44 2009 +0100
+@@ -33,10 +33,6 @@
default y if ARCH_DAVINCI
default y if ARCH_OMAP2430
default y if ARCH_OMAP34XX
comment "DaVinci 644x USB support"
depends on USB_MUSB_HDRC && ARCH_DAVINCI
-diff -purN linux-2.6.27/drivers/usb/musb/cppi_dma.h linux-2.6.27.19-5.1/drivers/usb/musb/cppi_dma.h
---- linux-2.6.27/drivers/usb/musb/cppi_dma.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/musb/cppi_dma.h 2009-03-25 16:11:19.000000000 +0000
-@@ -119,8 +119,8 @@ struct cppi {
+diff -r 9608d5473017 drivers/usb/musb/cppi_dma.h
+--- a/drivers/usb/musb/cppi_dma.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/musb/cppi_dma.h Wed May 06 16:56:44 2009 +0100
+@@ -119,8 +119,8 @@
void __iomem *mregs; /* Mentor regs */
void __iomem *tibase; /* TI/CPPI regs */
struct dma_pool *pool;
-diff -purN linux-2.6.27/drivers/usb/musb/davinci.c linux-2.6.27.19-5.1/drivers/usb/musb/davinci.c
---- linux-2.6.27/drivers/usb/musb/davinci.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/musb/davinci.c 2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/usb/musb/davinci.c
+--- a/drivers/usb/musb/davinci.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/musb/davinci.c Wed May 06 16:56:44 2009 +0100
@@ -30,6 +30,7 @@
#include <linux/delay.h>
#include <linux/clk.h>
#endif
#include "davinci.h"
-@@ -138,7 +139,6 @@ static int vbus_state = -1;
+@@ -138,7 +139,6 @@
/* VBUS SWITCHING IS BOARD-SPECIFIC */
#ifdef CONFIG_MACH_DAVINCI_EVM
/* I2C operations are always synchronous, and require a task context.
* With unloaded systems, using the shared workqueue seems to suffice
-@@ -146,12 +146,11 @@ static int vbus_state = -1;
+@@ -146,12 +146,11 @@
*/
static void evm_deferred_drvvbus(struct work_struct *ignored)
{
#endif /* EVM */
static void davinci_source_power(struct musb *musb, int is_on, int immediate)
-@@ -165,21 +164,10 @@ static void davinci_source_power(struct
+@@ -165,21 +164,10 @@
#ifdef CONFIG_MACH_DAVINCI_EVM
if (machine_is_davinci_evm()) {
}
#endif
if (immediate)
-diff -purN linux-2.6.27/drivers/usb/musb/musb_core.c linux-2.6.27.19-5.1/drivers/usb/musb/musb_core.c
---- linux-2.6.27/drivers/usb/musb/musb_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/musb/musb_core.c 2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/usb/musb/musb_core.c
+--- a/drivers/usb/musb/musb_core.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/musb/musb_core.c Wed May 06 16:56:44 2009 +0100
@@ -82,9 +82,9 @@
/*
* This gets many kinds of configuration information:
*
* Most of the conditional compilation will (someday) vanish.
*/
-@@ -974,9 +974,9 @@ static void musb_shutdown(struct platfor
+@@ -974,9 +974,9 @@
/*
* The silicon either has hard-wired endpoint configurations, or else
* "dynamic fifo" sizing. The driver has support for both, though at this
*
* We don't currently use dynamic fifo setup capability to do anything
* more than selecting one of a bunch of predefined configurations.
-diff -purN linux-2.6.27/drivers/usb/musb/musb_host.c linux-2.6.27.19-5.1/drivers/usb/musb/musb_host.c
---- linux-2.6.27/drivers/usb/musb/musb_host.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/musb/musb_host.c 2009-03-25 16:11:19.000000000 +0000
-@@ -108,7 +108,7 @@ static void musb_ep_program(struct musb
+diff -r 9608d5473017 drivers/usb/musb/musb_host.c
+--- a/drivers/usb/musb/musb_host.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/musb/musb_host.c Wed May 06 16:56:44 2009 +0100
+@@ -108,7 +108,7 @@
/*
* Clear TX fifo. Needed to avoid BABBLE errors.
*/
{
void __iomem *epio = ep->regs;
u16 csr;
-@@ -436,7 +436,7 @@ musb_advance_schedule(struct musb *musb,
+@@ -436,7 +436,7 @@
}
}
{
/* we don't want fifo to fill itself again;
* ignore dma (various models),
-@@ -1005,7 +1005,7 @@ static bool musb_h_ep0_continue(struct m
+@@ -1005,7 +1005,7 @@
/*
* Handle default endpoint interrupt as host. Only called in IRQ time
*
* called with controller irqlocked
*/
-diff -purN linux-2.6.27/drivers/usb/serial/Kconfig linux-2.6.27.19-5.1/drivers/usb/serial/Kconfig
---- linux-2.6.27/drivers/usb/serial/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/serial/Kconfig 2009-03-25 16:11:18.000000000 +0000
-@@ -472,6 +472,15 @@ config USB_SERIAL_OTI6858
+diff -r 9608d5473017 drivers/usb/serial/Kconfig
+--- a/drivers/usb/serial/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/serial/Kconfig Wed May 06 16:56:44 2009 +0100
+@@ -472,6 +472,15 @@
To compile this driver as a module, choose M here: the
module will be called oti6858.
config USB_SERIAL_SPCP8X5
tristate "USB SPCP8x5 USB To Serial Driver"
help
-diff -purN linux-2.6.27/drivers/usb/serial/Makefile linux-2.6.27.19-5.1/drivers/usb/serial/Makefile
---- linux-2.6.27/drivers/usb/serial/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/serial/Makefile 2009-03-25 16:11:18.000000000 +0000
-@@ -44,6 +44,7 @@ obj-$(CONFIG_USB_SERIAL_OMNINET) += omn
+diff -r 9608d5473017 drivers/usb/serial/Makefile
+--- a/drivers/usb/serial/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/serial/Makefile Wed May 06 16:56:44 2009 +0100
+@@ -44,6 +44,7 @@
obj-$(CONFIG_USB_SERIAL_OPTION) += option.o
obj-$(CONFIG_USB_SERIAL_OTI6858) += oti6858.o
obj-$(CONFIG_USB_SERIAL_PL2303) += pl2303.o
obj-$(CONFIG_USB_SERIAL_SAFE) += safe_serial.o
obj-$(CONFIG_USB_SERIAL_SIERRAWIRELESS) += sierra.o
obj-$(CONFIG_USB_SERIAL_SPCP8X5) += spcp8x5.o
-diff -purN linux-2.6.27/drivers/usb/serial/option.c linux-2.6.27.19-5.1/drivers/usb/serial/option.c
---- linux-2.6.27/drivers/usb/serial/option.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/serial/option.c 2009-03-25 16:11:18.000000000 +0000
-@@ -79,38 +79,36 @@ static int option_send_setup(struct tty
+diff -r 9608d5473017 drivers/usb/serial/option.c
+--- a/drivers/usb/serial/option.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/serial/option.c Wed May 06 16:56:44 2009 +0100
+@@ -79,38 +79,36 @@
#define OPTION_PRODUCT_VIPER 0x6600
#define OPTION_PRODUCT_VIPER_BUS 0x6601
#define OPTION_PRODUCT_GT_MAX_READY 0x6701
#define HUAWEI_PRODUCT_E1410 0x1410
#define HUAWEI_PRODUCT_E1411 0x1411
#define HUAWEI_PRODUCT_E1412 0x1412
-@@ -121,9 +119,52 @@ static int option_send_setup(struct tty
+@@ -121,8 +119,51 @@
#define HUAWEI_PRODUCT_E1417 0x1417
#define HUAWEI_PRODUCT_E1418 0x1418
#define HUAWEI_PRODUCT_E1419 0x1419
+#define HUAWEI_PRODUCT_E143F 0x143F
#define NOVATELWIRELESS_VENDOR_ID 0x1410
-
++
+/* YISO PRODUCTS */
+
+#define YISO_VENDOR_ID 0x0EAB
+#define YISO_PRODUCT_U893 0xC893
-+
+
/* MERLIN EVDO PRODUCTS */
#define NOVATELWIRELESS_PRODUCT_V640 0x1100
- #define NOVATELWIRELESS_PRODUCT_V620 0x1110
-@@ -151,14 +192,15 @@ static int option_send_setup(struct tty
+@@ -151,14 +192,15 @@
#define NOVATELWIRELESS_PRODUCT_MC950D 0x4400
/* FUTURE NOVATEL PRODUCTS */
/* AMOI PRODUCTS */
#define AMOI_VENDOR_ID 0x1614
-@@ -168,6 +210,27 @@ static int option_send_setup(struct tty
+@@ -167,6 +209,27 @@
+ #define AMOI_PRODUCT_H02 0x0802
#define DELL_VENDOR_ID 0x413C
-
++
+/* Dell modems */
+#define DELL_PRODUCT_5700_MINICARD 0x8114
+#define DELL_PRODUCT_5500_MINICARD 0x8115
+#define DELL_PRODUCT_5730_MINICARD_SPRINT 0x8180
+#define DELL_PRODUCT_5730_MINICARD_TELUS 0x8181
+#define DELL_PRODUCT_5730_MINICARD_VZW 0x8182
-+
+
#define KYOCERA_VENDOR_ID 0x0c88
#define KYOCERA_PRODUCT_KPC650 0x17da
- #define KYOCERA_PRODUCT_KPC680 0x180a
-@@ -183,6 +246,7 @@ static int option_send_setup(struct tty
+@@ -183,6 +246,7 @@
#define ONDA_VENDOR_ID 0x19d2
#define ONDA_PRODUCT_MSA501HS 0x0001
#define ONDA_PRODUCT_ET502HS 0x0002
#define BANDRICH_VENDOR_ID 0x1A8D
#define BANDRICH_PRODUCT_C100_1 0x1002
-@@ -218,8 +282,16 @@ static int option_send_setup(struct tty
+@@ -218,7 +282,15 @@
/* ZTE PRODUCTS */
#define ZTE_VENDOR_ID 0x19d2
#define ZTE_PRODUCT_MF628 0x0015
+#define ZTE_PRODUCT_MF626 0x0031
#define ZTE_PRODUCT_CDMA_TECH 0xfffe
-
++
+/* Ericsson products */
+#define ERICSSON_VENDOR_ID 0x0bdb
+#define ERICSSON_PRODUCT_F3507G 0x1900
+
+#define BENQ_VENDOR_ID 0x04a5
+#define BENQ_PRODUCT_H10 0x4068
-+
+
static struct usb_device_id option_ids[] = {
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
- { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
-@@ -235,36 +307,34 @@ static struct usb_device_id option_ids[]
+@@ -235,36 +307,34 @@
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_VIPER) },
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_VIPER_BUS) },
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GT_MAX_READY) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1410, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1411, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1412, 0xff, 0xff, 0xff) },
-@@ -275,6 +345,44 @@ static struct usb_device_id option_ids[]
+@@ -275,6 +345,44 @@
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1417, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1418, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1419, 0xff, 0xff, 0xff) },
{ USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_9508) },
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */
-@@ -294,36 +402,78 @@ static struct usb_device_id option_ids[]
+@@ -294,36 +402,78 @@
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */
{ USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) },
{ USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) },
{ USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1004) },
-@@ -347,8 +497,12 @@ static struct usb_device_id option_ids[]
+@@ -347,8 +497,12 @@
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
{ USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, option_ids);
-diff -purN linux-2.6.27/drivers/usb/serial/qcserial.c linux-2.6.27.19-5.1/drivers/usb/serial/qcserial.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/serial/qcserial.c 2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/usb/serial/qcserial.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/usb/serial/qcserial.c Wed May 06 16:56:44 2009 +0100
@@ -0,0 +1,152 @@
+/*
+ * Qualcomm Serial USB driver
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
-diff -purN linux-2.6.27/drivers/usb/serial/ti_usb_3410_5052.c linux-2.6.27.19-5.1/drivers/usb/serial/ti_usb_3410_5052.c
---- linux-2.6.27/drivers/usb/serial/ti_usb_3410_5052.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/serial/ti_usb_3410_5052.c 2009-03-25 16:11:18.000000000 +0000
-@@ -227,25 +227,32 @@ static unsigned int product_5052_count;
+diff -r 9608d5473017 drivers/usb/serial/ti_usb_3410_5052.c
+--- a/drivers/usb/serial/ti_usb_3410_5052.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/serial/ti_usb_3410_5052.c Wed May 06 16:56:44 2009 +0100
+@@ -227,25 +227,32 @@
/* the array dimension is the number of default entries plus */
/* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */
/* null entry */
{ }
};
-@@ -457,9 +464,11 @@ static int ti_startup(struct usb_serial
+@@ -457,9 +464,11 @@
goto free_tdev;
}
goto free_tdev;
}
-diff -purN linux-2.6.27/drivers/usb/serial/ti_usb_3410_5052.h linux-2.6.27.19-5.1/drivers/usb/serial/ti_usb_3410_5052.h
---- linux-2.6.27/drivers/usb/serial/ti_usb_3410_5052.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/serial/ti_usb_3410_5052.h 2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/usb/serial/ti_usb_3410_5052.h
+--- a/drivers/usb/serial/ti_usb_3410_5052.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/serial/ti_usb_3410_5052.h Wed May 06 16:56:44 2009 +0100
@@ -27,7 +27,11 @@
/* Vendor and product ids */
#define TI_3410_EZ430_ID 0xF430 /* TI ez430 development tool */
#define TI_5052_BOOT_PRODUCT_ID 0x5052 /* no EEPROM, no firmware */
#define TI_5152_BOOT_PRODUCT_ID 0x5152 /* no EEPROM, no firmware */
-diff -purN linux-2.6.27/drivers/usb/storage/libusual.c linux-2.6.27.19-5.1/drivers/usb/storage/libusual.c
---- linux-2.6.27/drivers/usb/storage/libusual.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/storage/libusual.c 2009-03-25 16:11:19.000000000 +0000
-@@ -46,6 +46,12 @@ static int usu_probe_thread(void *arg);
+diff -r 9608d5473017 drivers/usb/storage/libusual.c
+--- a/drivers/usb/storage/libusual.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/storage/libusual.c Wed May 06 16:56:44 2009 +0100
+@@ -46,6 +46,12 @@
{ USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin,bcdDeviceMax), \
.driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
#define USUAL_DEV(useProto, useTrans, useType) \
{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, useProto, useTrans), \
.driver_info = ((useType)<<24) }
-@@ -57,6 +63,7 @@ struct usb_device_id storage_usb_ids []
+@@ -57,6 +63,7 @@
#undef USUAL_DEV
#undef UNUSUAL_DEV
MODULE_DEVICE_TABLE(usb, storage_usb_ids);
EXPORT_SYMBOL_GPL(storage_usb_ids);
-diff -purN linux-2.6.27/drivers/usb/storage/scsiglue.c linux-2.6.27.19-5.1/drivers/usb/storage/scsiglue.c
---- linux-2.6.27/drivers/usb/storage/scsiglue.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/storage/scsiglue.c 2009-03-25 16:11:19.000000000 +0000
-@@ -59,6 +59,14 @@
+diff -r 9608d5473017 drivers/usb/storage/scsiglue.c
+--- a/drivers/usb/storage/scsiglue.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/storage/scsiglue.c Wed May 06 16:56:44 2009 +0100
+@@ -58,6 +58,14 @@
+ #include "debug.h"
#include "transport.h"
#include "protocol.h"
-
++
+/* Vendor IDs for companies that seem to include the READ CAPACITY bug
+ * in all their devices
+ */
+#define VENDOR_ID_NIKON 0x04b0
+#define VENDOR_ID_PENTAX 0x0a17
+#define VENDOR_ID_MOTOROLA 0x22b8
-+
+
/***********************************************************************
* Host functions
- ***********************************************************************/
-@@ -134,6 +142,23 @@ static int slave_configure(struct scsi_d
+@@ -134,6 +142,23 @@
* settings can't be overridden via the scsi devinfo mechanism. */
if (sdev->type == TYPE_DISK) {
/* Disk-type devices use MODE SENSE(6) if the protocol
* (SubClass) is Transparent SCSI, otherwise they use
* MODE SENSE(10). */
-@@ -196,6 +221,14 @@ static int slave_configure(struct scsi_d
+@@ -196,6 +221,14 @@
* sector in a larger then 1 sector read, since the performance
* impact is negible we set this flag for all USB disks */
sdev->last_sector_bug = 1;
} else {
/* Non-disk-type devices don't need to blacklist any pages
-diff -purN linux-2.6.27/drivers/usb/storage/transport.c linux-2.6.27.19-5.1/drivers/usb/storage/transport.c
---- linux-2.6.27/drivers/usb/storage/transport.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/storage/transport.c 2009-03-25 16:11:19.000000000 +0000
-@@ -57,6 +57,9 @@
+diff -r 9608d5473017 drivers/usb/storage/transport.c
+--- a/drivers/usb/storage/transport.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/storage/transport.c Wed May 06 16:56:44 2009 +0100
+@@ -56,6 +56,9 @@
+ #include "protocol.h"
#include "scsiglue.h"
#include "debug.h"
-
++
+#include <linux/blkdev.h>
+#include "../../scsi/sd.h"
-+
+
/***********************************************************************
- * Data transfer routines
-@@ -511,6 +514,80 @@ int usb_stor_bulk_transfer_sg(struct us_
+@@ -511,6 +514,80 @@
* Transport routines
***********************************************************************/
/* Invoke the transport and basic error-handling/recovery methods
*
* This is used by the protocol layers to actually send the message to
-@@ -544,6 +621,7 @@ void usb_stor_invoke_transport(struct sc
+@@ -544,6 +621,7 @@
/* if the transport provided its own sense data, don't auto-sense */
if (result == USB_STOR_TRANSPORT_NO_SENSE) {
srb->result = SAM_STAT_CHECK_CONDITION;
return;
}
-@@ -667,6 +745,7 @@ void usb_stor_invoke_transport(struct sc
+@@ -667,6 +745,7 @@
scsi_bufflen(srb) - scsi_get_resid(srb) < srb->underflow)
srb->result = (DID_ERROR << 16) | (SUGGEST_RETRY << 24);
return;
/* Error and abort processing: try to resynchronize with the device
-@@ -694,6 +773,7 @@ void usb_stor_invoke_transport(struct sc
+@@ -694,6 +773,7 @@
us->transport_reset(us);
}
clear_bit(US_FLIDX_RESETTING, &us->dflags);
}
/* Stop the current URB transfer */
-diff -purN linux-2.6.27/drivers/usb/storage/unusual_devs.h linux-2.6.27.19-5.1/drivers/usb/storage/unusual_devs.h
---- linux-2.6.27/drivers/usb/storage/unusual_devs.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/storage/unusual_devs.h 2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/usb/storage/unusual_devs.h
+--- a/drivers/usb/storage/unusual_devs.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/storage/unusual_devs.h Wed May 06 16:56:44 2009 +0100
@@ -27,7 +27,8 @@
/* IMPORTANT NOTE: This file must be included in another file which does
*/
/* If you edit this file, please try to keep it sorted first by VendorID,
-@@ -46,6 +47,12 @@
+@@ -44,6 +45,12 @@
+ * Alan Stern <stern@rowland.harvard.edu>, and don't forget to CC: the
+ * USB development list <linux-usb@vger.kernel.org> and the USB storage list
* <usb-storage@lists.one-eyed-alien.net>
- */
-
++ */
++
+/* Note: If you add an entry only in order to set the CAPACITY_OK flag,
+ * use the COMPLIANT_DEV macro instead of UNUSUAL_DEV. This is
+ * because such entries mark devices which actually work correctly,
+ * as opposed to devices that do something strangely or wrongly.
-+ */
-+
- /* patch submitted by Vivian Bregier <Vivian.Bregier@imag.fr>
*/
- UNUSUAL_DEV( 0x03eb, 0x2002, 0x0100, 0x0100,
-@@ -160,13 +167,6 @@ UNUSUAL_DEV( 0x0421, 0x0019, 0x0592, 0x
+
+ /* patch submitted by Vivian Bregier <Vivian.Bregier@imag.fr>
+@@ -160,13 +167,6 @@
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_MAX_SECTORS_64 ),
/* Reported by Mario Rettig <mariorettig@web.de> */
UNUSUAL_DEV( 0x0421, 0x042e, 0x0100, 0x0100,
"Nokia",
-@@ -232,27 +232,6 @@ UNUSUAL_DEV( 0x0421, 0x0495, 0x0370, 0x
+@@ -232,27 +232,6 @@
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_MAX_SECTORS_64 ),
/* Reported by Olaf Hering <olh@suse.de> from novell bug #105878 */
UNUSUAL_DEV( 0x0424, 0x0fdc, 0x0210, 0x0210,
"SMSC",
-@@ -303,6 +282,18 @@ UNUSUAL_DEV( 0x045a, 0x5210, 0x0101, 0x
+@@ -303,6 +282,18 @@
US_SC_SCSI, US_PR_KARMA, rio_karma_init, 0),
#endif
/*
* This virtual floppy is found in Sun equipment (x4600, x4200m2, etc.)
* Reported by Pete Zaitcev <zaitcev@redhat.com>
-@@ -333,6 +324,13 @@ UNUSUAL_DEV( 0x0482, 0x0103, 0x0100, 0x
+@@ -333,6 +324,13 @@
"Finecam S5",
US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY),
/* Reported by Paul Stewart <stewart@wetlogic.net>
* This entry is needed because the device reports Sub=ff */
UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x0001,
-@@ -355,6 +353,13 @@ UNUSUAL_DEV( 0x04b0, 0x0401, 0x0200, 0x
- US_SC_DEVICE, US_PR_DEVICE, NULL,
- US_FL_FIX_CAPACITY),
-
+@@ -352,6 +350,13 @@
+ UNUSUAL_DEV( 0x04b0, 0x0401, 0x0200, 0x0200,
+ "NIKON",
+ "NIKON DSC D100",
++ US_SC_DEVICE, US_PR_DEVICE, NULL,
++ US_FL_FIX_CAPACITY),
++
+/* Reported by Tobias Kunze Briseno <t-linux@fictive.com> */
+UNUSUAL_DEV( 0x04b0, 0x0403, 0x0200, 0x0200,
+ "NIKON",
+ "NIKON DSC D2H",
-+ US_SC_DEVICE, US_PR_DEVICE, NULL,
-+ US_FL_FIX_CAPACITY),
-+
- /* Reported by Milinevsky Dmitry <niam.niam@gmail.com> */
- UNUSUAL_DEV( 0x04b0, 0x0409, 0x0100, 0x0100,
- "NIKON",
-@@ -411,6 +416,13 @@ UNUSUAL_DEV( 0x04b0, 0x0417, 0x0100, 0x
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),
+@@ -408,6 +413,13 @@
+ UNUSUAL_DEV( 0x04b0, 0x0417, 0x0100, 0x0100,
+ "NIKON",
+ "NIKON DSC D40X",
++ US_SC_DEVICE, US_PR_DEVICE, NULL,
++ US_FL_FIX_CAPACITY),
++
+/* Reported by paul ready <lxtwin@homecall.co.uk> */
+UNUSUAL_DEV( 0x04b0, 0x0419, 0x0100, 0x0200,
+ "NIKON",
+ "NIKON DSC D300",
-+ US_SC_DEVICE, US_PR_DEVICE, NULL,
-+ US_FL_FIX_CAPACITY),
-+
- /* Reported by Doug Maxey (dwm@austin.ibm.com) */
- UNUSUAL_DEV( 0x04b3, 0x4001, 0x0110, 0x0110,
- "IBM",
-@@ -623,6 +635,13 @@ UNUSUAL_DEV( 0x0525, 0xa140, 0x0100, 0x
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY),
+
+@@ -622,6 +634,13 @@
+ "USB Clik! 40",
US_SC_8070, US_PR_DEVICE, NULL,
US_FL_FIX_INQUIRY ),
-
++
+/* Added by Alan Stern <stern@rowland.harvard.edu> */
+COMPLIANT_DEV(0x0525, 0xa4a5, 0x0000, 0x9999,
+ "Linux",
+ "File-backed Storage Gadget",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_CAPACITY_OK ),
-+
+
/* Yakumo Mega Image 37
* Submitted by Stephan Fuhrmann <atomenergie@t-online.de> */
- UNUSUAL_DEV( 0x052b, 0x1801, 0x0100, 0x0100,
-@@ -978,7 +997,7 @@ UNUSUAL_DEV( 0x067b, 0x2507, 0x0100, 0x0
+@@ -978,7 +997,7 @@
US_FL_FIX_CAPACITY | US_FL_GO_SLOW ),
/* Reported by Alex Butcher <alex.butcher@assursys.co.uk> */
"Prolific Technology Inc.",
"ATAPI-6 Bridge Controller",
US_SC_DEVICE, US_PR_DEVICE, NULL,
-@@ -1251,6 +1270,20 @@ UNUSUAL_DEV( 0x0839, 0x000a, 0x0001, 0x0
+@@ -1251,6 +1270,20 @@
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_INQUIRY),
/* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>.
* Flag will support Bulk devices which use a standards-violating 32-byte
* Command Block Wrapper. Here, the "DC2MEGA" cameras (several brands) with
-@@ -1348,14 +1381,6 @@ UNUSUAL_DEV( 0x0a17, 0x0004, 0x1000, 0x1
- US_SC_DEVICE, US_PR_DEVICE, NULL,
- US_FL_FIX_INQUIRY ),
-
+@@ -1345,14 +1378,6 @@
+ UNUSUAL_DEV( 0x0a17, 0x0004, 0x1000, 0x1000,
+ "Pentax",
+ "Optio 2/3/400",
+- US_SC_DEVICE, US_PR_DEVICE, NULL,
+- US_FL_FIX_INQUIRY ),
+-
-
-/* Submitted by Per Winkvist <per.winkvist@uk.com> */
-UNUSUAL_DEV( 0x0a17, 0x006, 0x0000, 0xffff,
- "Pentax",
- "Optio S/S4",
-- US_SC_DEVICE, US_PR_DEVICE, NULL,
-- US_FL_FIX_INQUIRY ),
--
- /* These are virtual windows driver CDs, which the zd1211rw driver
- * automatically converts into WLAN devices. */
- UNUSUAL_DEV( 0x0ace, 0x2011, 0x0101, 0x0101,
-@@ -1628,97 +1653,332 @@ UNUSUAL_DEV( 0x1210, 0x0003, 0x0100, 0x
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_INQUIRY ),
+
+@@ -1628,97 +1653,332 @@
/* Reported by fangxiaozhi <huananhu@huawei.com>
* This brings the HUAWEI data card devices into multi-port mode
*/
-UNUSUAL_DEV( 0x12d1, 0x1001, 0x0000, 0x0000,
+UNUSUAL_DEV( 0x12d1, 0x1001, 0x0000, 0x0000,
-+ "HUAWEI MOBILE",
-+ "Mass Storage",
-+ US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
-+ 0),
-+UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0x0000,
-+ "HUAWEI MOBILE",
-+ "Mass Storage",
-+ US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
-+ 0),
-+UNUSUAL_DEV( 0x12d1, 0x1004, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x1401, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1004, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x1402, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x1004, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1401, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x1403, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x1401, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1403, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x1404, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x1402, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1405, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x1405, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x1403, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1406, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x1406, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x1404, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1408, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x1407, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x1405, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1409, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x1408, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x1406, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1410, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x1409, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x1407, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1411, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x140A, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x1408, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1412, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x140B, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x1409, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1413, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x140C, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x140A, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1414, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x140D, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x140B, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1415, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x140E, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x140C, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1416, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x140F, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x140D, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1417, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x1410, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x140E, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1418, 0x0000, 0x0000,
-+UNUSUAL_DEV( 0x12d1, 0x1411, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x140F, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
-UNUSUAL_DEV( 0x12d1, 0x1419, 0x0000, 0x0000,
++UNUSUAL_DEV( 0x12d1, 0x1410, 0x0000, 0x0000,
++ "HUAWEI MOBILE",
++ "Mass Storage",
++ US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
++ 0),
++UNUSUAL_DEV( 0x12d1, 0x1411, 0x0000, 0x0000,
++ "HUAWEI MOBILE",
++ "Mass Storage",
++ US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
++ 0),
+UNUSUAL_DEV( 0x12d1, 0x1412, 0x0000, 0x0000,
+ "HUAWEI MOBILE",
+ "Mass Storage",
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
-@@ -1745,6 +2005,15 @@ UNUSUAL_DEV( 0x14cd, 0x6600, 0x0201, 0x
+@@ -1745,6 +2005,15 @@
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_IGNORE_RESIDUE ),
/* Reported by Robert Schedel <r.schedel@yahoo.de>
* Note: this is a 'super top' device like the above 14cd/6600 device */
UNUSUAL_DEV( 0x1652, 0x6600, 0x0201, 0x0201,
-@@ -1763,6 +2032,12 @@ UNUSUAL_DEV( 0x19d2, 0x2000, 0x0000, 0x
+@@ -1762,6 +2031,12 @@
+ "USB MMC Storage",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_IGNORE_DEVICE),
-
++
+UNUSUAL_DEV( 0x2116, 0x0320, 0x0001, 0x0001,
+ "ST",
+ "2A",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY),
-+
+
/* patch submitted by Davide Perini <perini.davide@dpsoftware.org>
* and Renato Perini <rperini@email.it>
- */
-@@ -1818,6 +2093,15 @@ UNUSUAL_DEV( 0x2770, 0x915d, 0x0010, 0x
+@@ -1818,6 +2093,15 @@
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY ),
/* Reported by Andrey Rahmatullin <wrar@altlinux.org> */
UNUSUAL_DEV( 0x4102, 0x1020, 0x0100, 0x0100,
"iRiver",
-diff -purN linux-2.6.27/drivers/usb/storage/usb.c linux-2.6.27.19-5.1/drivers/usb/storage/usb.c
---- linux-2.6.27/drivers/usb/storage/usb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/storage/usb.c 2009-03-25 16:11:19.000000000 +0000
-@@ -109,7 +109,7 @@ MODULE_AUTHOR("Matthew Dharm <mdharm-usb
+diff -r 9608d5473017 drivers/usb/storage/usb.c
+--- a/drivers/usb/storage/usb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/storage/usb.c Wed May 06 16:56:44 2009 +0100
+@@ -109,7 +109,7 @@
MODULE_DESCRIPTION("USB Mass Storage driver for Linux");
MODULE_LICENSE("GPL");
module_param(delay_use, uint, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(delay_use, "seconds to delay before using a new device");
-@@ -126,6 +126,8 @@ MODULE_PARM_DESC(delay_use, "seconds to
+@@ -126,6 +126,8 @@
{ USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin,bcdDeviceMax), \
.driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
#define USUAL_DEV(useProto, useTrans, useType) \
{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, useProto, useTrans), \
.driver_info = (USB_US_TYPE_STOR<<24) }
-@@ -134,6 +136,7 @@ static struct usb_device_id storage_usb_
+@@ -134,6 +136,7 @@
# include "unusual_devs.h"
#undef UNUSUAL_DEV
#undef USUAL_DEV
/* Terminating entry */
{ }
-@@ -164,6 +167,8 @@ MODULE_DEVICE_TABLE (usb, storage_usb_id
+@@ -164,6 +167,8 @@
.initFunction = init_function, \
}
#define USUAL_DEV(use_protocol, use_transport, use_type) \
{ \
.useProtocol = use_protocol, \
-@@ -173,6 +178,7 @@ MODULE_DEVICE_TABLE (usb, storage_usb_id
+@@ -173,6 +178,7 @@
static struct us_unusual_dev us_unusual_dev_list[] = {
# include "unusual_devs.h"
# undef UNUSUAL_DEV
# undef USUAL_DEV
/* Terminating entry */
-diff -purN linux-2.6.27/drivers/usb/storage/usb.h linux-2.6.27.19-5.1/drivers/usb/storage/usb.h
---- linux-2.6.27/drivers/usb/storage/usb.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/storage/usb.h 2009-03-25 16:11:19.000000000 +0000
-@@ -155,6 +155,10 @@ struct us_data {
+diff -r 9608d5473017 drivers/usb/storage/usb.h
+--- a/drivers/usb/storage/usb.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/storage/usb.h Wed May 06 16:56:44 2009 +0100
+@@ -155,6 +155,10 @@
#ifdef CONFIG_PM
pm_hook suspend_resume_hook;
#endif
};
/* Convert between us_data and the corresponding Scsi_Host */
-diff -purN linux-2.6.27/drivers/video/Kconfig linux-2.6.27.19-5.1/drivers/video/Kconfig
---- linux-2.6.27/drivers/video/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/Kconfig 2009-03-25 16:11:28.000000000 +0000
-@@ -1583,7 +1583,7 @@ config FB_CYBLA
+diff -r 9608d5473017 drivers/video/Kconfig
+--- a/drivers/video/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/Kconfig Wed May 06 16:56:44 2009 +0100
+@@ -1583,7 +1583,7 @@
tristate "Cyberblade/i1 support"
depends on FB && PCI && X86_32 && !64BIT
select FB_CFB_IMAGEBLIT
---help---
This driver is supposed to support the Trident Cyberblade/i1
graphics core integrated in the VIA VT8601A North Bridge,
-@@ -2029,7 +2029,7 @@ config FB_VIRTUAL
+@@ -2029,7 +2029,7 @@
config XEN_FBDEV_FRONTEND
tristate "Xen virtual frame buffer support"
select FB_SYS_FILLRECT
select FB_SYS_COPYAREA
select FB_SYS_IMAGEBLIT
-@@ -2054,4 +2054,8 @@ if FB || SGI_NEWPORT_CONSOLE
+@@ -2054,4 +2054,8 @@
source "drivers/video/logo/Kconfig"
endif
+endif
+
endmenu
-diff -purN linux-2.6.27/drivers/video/Makefile linux-2.6.27.19-5.1/drivers/video/Makefile
---- linux-2.6.27/drivers/video/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/Makefile 2009-03-25 16:11:28.000000000 +0000
-@@ -14,6 +14,7 @@ fb-objs := $(f
+diff -r 9608d5473017 drivers/video/Makefile
+--- a/drivers/video/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/Makefile Wed May 06 16:56:44 2009 +0100
+@@ -14,6 +14,7 @@
obj-$(CONFIG_VT) += console/
obj-$(CONFIG_LOGO) += logo/
obj-y += backlight/ display/
obj-$(CONFIG_FB_CFB_FILLRECT) += cfbfillrect.o
obj-$(CONFIG_FB_CFB_COPYAREA) += cfbcopyarea.o
-diff -purN linux-2.6.27/drivers/video/aty/mach64_ct.c linux-2.6.27.19-5.1/drivers/video/aty/mach64_ct.c
---- linux-2.6.27/drivers/video/aty/mach64_ct.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/aty/mach64_ct.c 2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/aty/mach64_ct.c
+--- a/drivers/video/aty/mach64_ct.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/aty/mach64_ct.c Wed May 06 16:56:44 2009 +0100
@@ -8,6 +8,9 @@
#include <asm/io.h>
#include <video/mach64.h>
#undef DEBUG
-@@ -536,6 +539,14 @@ static int __devinit aty_init_pll_ct(con
+@@ -536,6 +539,14 @@
pll->ct.xclk_post_div_real = postdividers[xpost_div];
pll->ct.mclk_fb_div = q * pll->ct.xclk_post_div_real / 8;
#ifdef DEBUG
pllmclk = (1000000 * pll->ct.mclk_fb_mult * pll->ct.mclk_fb_div) /
(par->ref_clk_per * pll->ct.pll_ref_div);
-diff -purN linux-2.6.27/drivers/video/aty/radeon_monitor.c linux-2.6.27.19-5.1/drivers/video/aty/radeon_monitor.c
---- linux-2.6.27/drivers/video/aty/radeon_monitor.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/aty/radeon_monitor.c 2009-03-25 16:11:28.000000000 +0000
-@@ -727,6 +727,25 @@ static void radeon_videomode_to_var(stru
+diff -r 9608d5473017 drivers/video/aty/radeon_monitor.c
+--- a/drivers/video/aty/radeon_monitor.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/aty/radeon_monitor.c Wed May 06 16:56:44 2009 +0100
+@@ -727,6 +727,25 @@
var->vmode = mode->vmode;
}
/*
* Build the modedb for head 1 (head 2 will come later), check panel infos
* from either BIOS or EDID, and pick up the default mode
-@@ -862,6 +881,22 @@ void __devinit radeon_check_modes(struct
+@@ -861,6 +880,22 @@
+ info->monspecs.modedb_len, NULL, 8) != 0)
has_default_mode = 1;
}
-
++
+#ifdef CONFIG_PPC_PSERIES
+ if (!has_default_mode && (
+ is_powerblade("IBM,8842") || /* JS20 */
+ has_default_mode = 1;
+ }
+#endif
-+
+
/*
* Still no mode, let's pick up a default from the db
- */
-diff -purN linux-2.6.27/drivers/video/bootsplash/Kconfig linux-2.6.27.19-5.1/drivers/video/bootsplash/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bootsplash/Kconfig 2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/bootsplash/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/video/bootsplash/Kconfig Wed May 06 16:56:44 2009 +0100
@@ -0,0 +1,17 @@
+#
+# Bootsplash configuration
+ If you are unsure, say N
+endmenu
+
-diff -purN linux-2.6.27/drivers/video/bootsplash/Makefile linux-2.6.27.19-5.1/drivers/video/bootsplash/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bootsplash/Makefile 2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/bootsplash/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/video/bootsplash/Makefile Wed May 06 16:56:44 2009 +0100
@@ -0,0 +1,5 @@
+# Makefile for the Linux bootsplash
+
+obj-$(CONFIG_BOOTSPLASH) += bootsplash.o
+obj-$(CONFIG_BOOTSPLASH) += decode-jpg.o
+obj-$(CONFIG_BOOTSPLASH) += render.o
-diff -purN linux-2.6.27/drivers/video/bootsplash/bootsplash.c linux-2.6.27.19-5.1/drivers/video/bootsplash/bootsplash.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bootsplash/bootsplash.c 2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/bootsplash/bootsplash.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/video/bootsplash/bootsplash.c Wed May 06 16:56:44 2009 +0100
@@ -0,0 +1,1017 @@
+/*
+ * linux/drivers/video/bootsplash/bootsplash.c -
+ return;
+}
+
-diff -purN linux-2.6.27/drivers/video/bootsplash/bootsplash.h linux-2.6.27.19-5.1/drivers/video/bootsplash/bootsplash.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bootsplash/bootsplash.h 2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/bootsplash/bootsplash.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/video/bootsplash/bootsplash.h Wed May 06 16:56:44 2009 +0100
@@ -0,0 +1,44 @@
+/*
+ * linux/drivers/video/bootsplash/bootsplash.h - splash screen definition.
+extern void release_console_sem(void);
+
+#endif
-diff -purN linux-2.6.27/drivers/video/bootsplash/decode-jpg.c linux-2.6.27.19-5.1/drivers/video/bootsplash/decode-jpg.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bootsplash/decode-jpg.c 2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/bootsplash/decode-jpg.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/video/bootsplash/decode-jpg.c Wed May 06 16:56:44 2009 +0100
@@ -0,0 +1,957 @@
+/*
+ * linux/drivers/video/bootsplash/decode-jpg.c - a tiny jpeg decoder.
+ outy += 64 * 2 - 16 * 4;
+ }
+}
-diff -purN linux-2.6.27/drivers/video/bootsplash/decode-jpg.h linux-2.6.27.19-5.1/drivers/video/bootsplash/decode-jpg.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bootsplash/decode-jpg.h 2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/bootsplash/decode-jpg.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/video/bootsplash/decode-jpg.h Wed May 06 16:56:44 2009 +0100
@@ -0,0 +1,35 @@
+/*
+ * linux/drivers/video/bootsplash/decode-jpg.h - a tiny jpeg decoder.
+extern int jpeg_check_size(unsigned char *, int, int);
+
+#endif
-diff -purN linux-2.6.27/drivers/video/bootsplash/render.c linux-2.6.27.19-5.1/drivers/video/bootsplash/render.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bootsplash/render.c 2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/bootsplash/render.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/video/bootsplash/render.c Wed May 06 16:56:44 2009 +0100
@@ -0,0 +1,328 @@
+/*
+ * linux/drivers/video/bootsplash/render.c - splash screen render functions.
+ }
+}
+
-diff -purN linux-2.6.27/drivers/video/bw2.c linux-2.6.27.19-5.1/drivers/video/bw2.c
---- linux-2.6.27/drivers/video/bw2.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bw2.c 2009-03-25 16:11:28.000000000 +0000
-@@ -381,6 +381,7 @@ static struct of_device_id bw2_match[] =
+diff -r 9608d5473017 drivers/video/bw2.c
+--- a/drivers/video/bw2.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/bw2.c Wed May 06 16:56:44 2009 +0100
+@@ -381,6 +381,7 @@
MODULE_DEVICE_TABLE(of, bw2_match);
static struct of_platform_driver bw2_driver = {
.name = "bw2",
.match_table = bw2_match,
.probe = bw2_probe,
-diff -purN linux-2.6.27/drivers/video/carminefb.c linux-2.6.27.19-5.1/drivers/video/carminefb.c
---- linux-2.6.27/drivers/video/carminefb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/carminefb.c 2009-03-25 16:11:28.000000000 +0000
-@@ -535,8 +535,9 @@ static struct fb_ops carminefb_ops = {
+diff -r 9608d5473017 drivers/video/carminefb.c
+--- a/drivers/video/carminefb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/carminefb.c Wed May 06 16:56:44 2009 +0100
+@@ -535,8 +535,9 @@
.fb_setcolreg = carmine_setcolreg,
};
{
int ret;
struct fb_info *info;
-diff -purN linux-2.6.27/drivers/video/cg14.c linux-2.6.27.19-5.1/drivers/video/cg14.c
---- linux-2.6.27/drivers/video/cg14.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/cg14.c 2009-03-25 16:11:28.000000000 +0000
-@@ -598,6 +598,7 @@ static struct of_device_id cg14_match[]
+diff -r 9608d5473017 drivers/video/cg14.c
+--- a/drivers/video/cg14.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/cg14.c Wed May 06 16:56:45 2009 +0100
+@@ -598,6 +598,7 @@
MODULE_DEVICE_TABLE(of, cg14_match);
static struct of_platform_driver cg14_driver = {
.name = "cg14",
.match_table = cg14_match,
.probe = cg14_probe,
-diff -purN linux-2.6.27/drivers/video/cg3.c linux-2.6.27.19-5.1/drivers/video/cg3.c
---- linux-2.6.27/drivers/video/cg3.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/cg3.c 2009-03-25 16:11:28.000000000 +0000
-@@ -468,6 +468,7 @@ static struct of_device_id cg3_match[] =
+diff -r 9608d5473017 drivers/video/cg3.c
+--- a/drivers/video/cg3.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/cg3.c Wed May 06 16:56:45 2009 +0100
+@@ -468,6 +468,7 @@
MODULE_DEVICE_TABLE(of, cg3_match);
static struct of_platform_driver cg3_driver = {
.name = "cg3",
.match_table = cg3_match,
.probe = cg3_probe,
-diff -purN linux-2.6.27/drivers/video/cg6.c linux-2.6.27.19-5.1/drivers/video/cg6.c
---- linux-2.6.27/drivers/video/cg6.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/cg6.c 2009-03-25 16:11:28.000000000 +0000
-@@ -826,6 +826,7 @@ static struct of_device_id cg6_match[] =
+diff -r 9608d5473017 drivers/video/cg6.c
+--- a/drivers/video/cg6.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/cg6.c Wed May 06 16:56:45 2009 +0100
+@@ -826,6 +826,7 @@
MODULE_DEVICE_TABLE(of, cg6_match);
static struct of_platform_driver cg6_driver = {
.name = "cg6",
.match_table = cg6_match,
.probe = cg6_probe,
-diff -purN linux-2.6.27/drivers/video/console/Kconfig linux-2.6.27.19-5.1/drivers/video/console/Kconfig
---- linux-2.6.27/drivers/video/console/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/console/Kconfig 2009-03-25 16:11:28.000000000 +0000
-@@ -46,6 +46,7 @@ config VGACON_SOFT_SCROLLBACK_SIZE
+diff -r 9608d5473017 drivers/video/console/Kconfig
+--- a/drivers/video/console/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/console/Kconfig Wed May 06 16:56:45 2009 +0100
+@@ -46,6 +46,7 @@
config VIDEO_SELECT
bool "Video mode selection support"
depends on X86 && VGA_CONSOLE
---help---
This enables support for text mode selection on kernel startup. If
you want to take advantage of some high-resolution text mode your
-diff -purN linux-2.6.27/drivers/video/console/bitblit.c linux-2.6.27.19-5.1/drivers/video/console/bitblit.c
---- linux-2.6.27/drivers/video/console/bitblit.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/console/bitblit.c 2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/console/bitblit.c
+--- a/drivers/video/console/bitblit.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/console/bitblit.c Wed May 06 16:56:45 2009 +0100
@@ -17,6 +17,9 @@
#include <linux/console.h>
#include <asm/types.h>
/*
* Accelerated handlers.
-@@ -47,6 +50,13 @@ static void bit_bmove(struct vc_data *vc
+@@ -47,6 +50,13 @@
{
struct fb_copyarea area;
area.sx = sx * vc->vc_font.width;
area.sy = sy * vc->vc_font.height;
area.dx = dx * vc->vc_font.width;
-@@ -63,6 +73,13 @@ static void bit_clear(struct vc_data *vc
+@@ -63,6 +73,13 @@
int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
struct fb_fillrect region;
region.color = attr_bgcol_ec(bgshift, vc, info);
region.dx = sx * vc->vc_font.width;
region.dy = sy * vc->vc_font.height;
-@@ -160,6 +177,13 @@ static void bit_putcs(struct vc_data *vc
+@@ -160,6 +177,13 @@
image.height = vc->vc_font.height;
image.depth = 1;
if (attribute) {
buf = kmalloc(cellsize, GFP_KERNEL);
if (!buf)
-@@ -213,6 +237,13 @@ static void bit_clear_margins(struct vc_
+@@ -212,6 +236,13 @@
+ unsigned int rs = info->var.xres - rw;
unsigned int bs = info->var.yres - bh;
struct fb_fillrect region;
-
++
+#ifdef CONFIG_BOOTSPLASH
+ if (info->splash_data) {
+ splash_clear_margins(info->splash_data, vc, info, bottom_only);
+ return;
+ }
+#endif
-+
+
region.color = attr_bgcol_ec(bgshift, vc, info);
region.rop = ROP_COPY;
-
-@@ -379,6 +410,14 @@ static void bit_cursor(struct vc_data *v
+@@ -379,6 +410,14 @@
cursor.image.depth = 1;
cursor.rop = ROP_XOR;
if (info->fbops->fb_cursor)
err = info->fbops->fb_cursor(info, &cursor);
-diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/drivers/video/console/fbcon.c
---- linux-2.6.27/drivers/video/console/fbcon.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/console/fbcon.c 2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/console/fbcon.c
+--- a/drivers/video/console/fbcon.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/console/fbcon.c Wed May 06 16:56:45 2009 +0100
@@ -90,6 +90,9 @@
#endif
#ifdef FBCONDEBUG
# define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __func__ , ## args)
-@@ -105,7 +108,11 @@ enum {
+@@ -105,7 +108,11 @@
static struct display fb_display[MAX_NR_CONSOLES];
static signed char con2fb_map_boot[MAX_NR_CONSOLES];
static int logo_lines;
-@@ -578,6 +585,10 @@ static int fbcon_takeover(int show_logo)
+@@ -577,6 +584,10 @@
+
for (i = first_fb_vc; i <= last_fb_vc; i++)
con2fb_map[i] = info_idx;
-
++
+#ifdef CONFIG_BOOTSPLASH
+ splash_init();
+#endif
-+
+
err = take_over_console(&fb_con, first_fb_vc, last_fb_vc,
fbcon_is_default);
-
-@@ -1180,6 +1191,16 @@ static void fbcon_init(struct vc_data *v
+@@ -1180,6 +1191,16 @@
new_rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
new_cols /= vc->vc_font.width;
new_rows /= vc->vc_font.height;
vc_resize(vc, new_cols, new_rows);
/*
-@@ -1855,8 +1876,6 @@ static int fbcon_scroll(struct vc_data *
+@@ -1855,8 +1876,6 @@
struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
struct display *p = &fb_display[vc->vc_num];
int scroll_partial = info->flags & FBINFO_PARTIAL_PAN_OK;
if (fbcon_is_inactive(vc, info))
return -EINVAL;
-@@ -1869,11 +1888,6 @@ static int fbcon_scroll(struct vc_data *
+@@ -1869,11 +1888,6 @@
* whole screen (prevents flicker).
*/
switch (dir) {
case SM_UP:
if (count > vc->vc_rows) /* Maximum realistic size */
-@@ -1882,6 +1896,10 @@ static int fbcon_scroll(struct vc_data *
+@@ -1882,6 +1896,10 @@
fbcon_softback_note(vc, t, count);
if (logo_shown >= 0)
goto redraw_up;
switch (p->scrollmode) {
case SCROLL_MOVE:
fbcon_redraw_blit(vc, info, p, t, b - t - count,
-@@ -1890,9 +1908,9 @@ static int fbcon_scroll(struct vc_data *
+@@ -1890,9 +1908,9 @@
scr_memsetw((unsigned short *) (vc->vc_origin +
vc->vc_size_row *
(b - count)),
break;
case SCROLL_WRAP_MOVE:
-@@ -1962,10 +1980,9 @@ static int fbcon_scroll(struct vc_data *
+@@ -1962,10 +1980,9 @@
scr_memsetw((unsigned short *) (vc->vc_origin +
vc->vc_size_row *
(b - count)),
}
break;
-@@ -1974,6 +1991,10 @@ static int fbcon_scroll(struct vc_data *
+@@ -1974,6 +1991,10 @@
count = vc->vc_rows;
if (logo_shown >= 0)
goto redraw_down;
switch (p->scrollmode) {
case SCROLL_MOVE:
fbcon_redraw_blit(vc, info, p, b - 1, b - t - count,
-@@ -1982,9 +2003,9 @@ static int fbcon_scroll(struct vc_data *
+@@ -1982,9 +2003,9 @@
scr_memsetw((unsigned short *) (vc->vc_origin +
vc->vc_size_row *
t),
break;
case SCROLL_WRAP_MOVE:
-@@ -2052,15 +2073,12 @@ static int fbcon_scroll(struct vc_data *
+@@ -2052,15 +2073,12 @@
scr_memsetw((unsigned short *) (vc->vc_origin +
vc->vc_size_row *
t),
}
-@@ -2125,6 +2143,14 @@ static void fbcon_bmove_rec(struct vc_da
+@@ -2125,6 +2143,14 @@
}
return;
}
ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx,
height, width);
}
-@@ -2233,6 +2259,10 @@ static int fbcon_switch(struct vc_data *
+@@ -2232,6 +2258,10 @@
+
info = registered_fb[con2fb_map[vc->vc_num]];
ops = info->fbcon_par;
-
++
+#ifdef CONFIG_BOOTSPLASH
+ splash_prepare(vc, info);
+#endif
-+
+
if (softback_top) {
if (softback_lines)
- fbcon_set_origin(vc);
-@@ -2360,6 +2390,12 @@ static void fbcon_generic_blank(struct v
+@@ -2360,6 +2390,12 @@
{
struct fb_event event;
if (blank) {
unsigned short charmask = vc->vc_hi_font_mask ?
0x1ff : 0xff;
-@@ -2522,9 +2558,6 @@ static int fbcon_do_set_font(struct vc_d
+@@ -2522,9 +2558,6 @@
c = vc->vc_video_erase_char;
vc->vc_video_erase_char =
((c & 0xfe00) >> 1) | (c & 0xff);
vc->vc_attr >>= 1;
}
} else if (!vc->vc_hi_font_mask && cnt == 512) {
-@@ -2555,14 +2588,9 @@ static int fbcon_do_set_font(struct vc_d
+@@ -2555,14 +2588,9 @@
if (vc->vc_can_do_color) {
vc->vc_video_erase_char =
((c & 0xff00) << 1) | (c & 0xff);
}
}
-@@ -2572,6 +2600,12 @@ static int fbcon_do_set_font(struct vc_d
+@@ -2572,6 +2600,12 @@
cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres);
rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
cols /= w;
rows /= h;
vc_resize(vc, cols, rows);
-@@ -2996,8 +3030,8 @@ static void fbcon_set_all_vcs(struct fb_
+@@ -2996,8 +3030,8 @@
p = &fb_display[vc->vc_num];
set_blitting_type(vc, info);
var_to_display(p, &info->var, info);
cols /= vc->vc_font.width;
rows /= vc->vc_font.height;
vc_resize(vc, cols, rows);
-diff -purN linux-2.6.27/drivers/video/console/fbcon.h linux-2.6.27.19-5.1/drivers/video/console/fbcon.h
---- linux-2.6.27/drivers/video/console/fbcon.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/console/fbcon.h 2009-03-25 16:11:28.000000000 +0000
-@@ -25,6 +25,34 @@
+diff -r 9608d5473017 drivers/video/console/fbcon.h
+--- a/drivers/video/console/fbcon.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/console/fbcon.h Wed May 06 16:56:45 2009 +0100
+@@ -24,6 +24,34 @@
+ * This is the interface between the low-level console driver and the
* low-level frame buffer device
*/
-
++
+#ifdef CONFIG_BOOTSPLASH
+struct splash_data {
+ int splash_state; /* show splash? */
+ int splash_sboxcount;
+};
+#endif
-+
+
struct display {
/* Filled in by the low-level console driver */
- const u_char *fontdata;
-diff -purN linux-2.6.27/drivers/video/console/mdacon.c linux-2.6.27.19-5.1/drivers/video/console/mdacon.c
---- linux-2.6.27/drivers/video/console/mdacon.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/console/mdacon.c 2009-03-25 16:11:28.000000000 +0000
-@@ -533,7 +533,7 @@ static void mdacon_cursor(struct vc_data
+diff -r 9608d5473017 drivers/video/console/mdacon.c
+--- a/drivers/video/console/mdacon.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/console/mdacon.c Wed May 06 16:56:45 2009 +0100
+@@ -533,7 +533,7 @@
static int mdacon_scroll(struct vc_data *c, int t, int b, int dir, int lines)
{
if (!lines)
return 0;
-diff -purN linux-2.6.27/drivers/video/console/sticon.c linux-2.6.27.19-5.1/drivers/video/console/sticon.c
---- linux-2.6.27/drivers/video/console/sticon.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/console/sticon.c 2009-03-25 16:11:28.000000000 +0000
-@@ -170,12 +170,12 @@ static int sticon_scroll(struct vc_data
+diff -r 9608d5473017 drivers/video/console/sticon.c
+--- a/drivers/video/console/sticon.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/console/sticon.c Wed May 06 16:56:45 2009 +0100
+@@ -170,12 +170,12 @@
switch (dir) {
case SM_UP:
sti_bmove(sti, t + count, 0, t, 0, b - t - count, conp->vc_cols);
break;
}
-diff -purN linux-2.6.27/drivers/video/console/vgacon.c linux-2.6.27.19-5.1/drivers/video/console/vgacon.c
---- linux-2.6.27/drivers/video/console/vgacon.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/console/vgacon.c 2009-03-25 16:11:28.000000000 +0000
-@@ -1240,7 +1240,7 @@ static int vgacon_font_set(struct vc_dat
+diff -r 9608d5473017 drivers/video/console/vgacon.c
+--- a/drivers/video/console/vgacon.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/console/vgacon.c Wed May 06 16:56:45 2009 +0100
+@@ -1240,7 +1240,7 @@
unsigned charcount = font->charcount;
int rc;
return -EINVAL;
if (font->width != VGA_FONTWIDTH ||
-@@ -1258,7 +1258,7 @@ static int vgacon_font_set(struct vc_dat
+@@ -1258,7 +1258,7 @@
static int vgacon_font_get(struct vc_data *c, struct console_font *font)
{
return -EINVAL;
font->width = VGA_FONTWIDTH;
-@@ -1350,7 +1350,7 @@ static int vgacon_scroll(struct vc_data
+@@ -1350,7 +1350,7 @@
} else
c->vc_origin += delta;
scr_memsetw((u16 *) (c->vc_origin + c->vc_screenbuf_size -
delta);
} else {
if (oldo - delta < vga_vram_base) {
-@@ -1363,7 +1363,7 @@ static int vgacon_scroll(struct vc_data
+@@ -1363,7 +1363,7 @@
} else
c->vc_origin -= delta;
c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size;
delta);
}
c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size;
-diff -purN linux-2.6.27/drivers/video/fbmem.c linux-2.6.27.19-5.1/drivers/video/fbmem.c
---- linux-2.6.27/drivers/video/fbmem.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/fbmem.c 2009-03-25 16:11:28.000000000 +0000
-@@ -232,7 +232,7 @@ static void fb_set_logo_directpalette(st
+diff -r 9608d5473017 drivers/video/fbmem.c
+--- a/drivers/video/fbmem.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/fbmem.c Wed May 06 16:56:45 2009 +0100
+@@ -232,7 +232,7 @@
greenshift = info->var.green.offset;
blueshift = info->var.blue.offset;
palette[i] = i << redshift | i << greenshift | i << blueshift;
}
-diff -purN linux-2.6.27/drivers/video/ffb.c linux-2.6.27.19-5.1/drivers/video/ffb.c
---- linux-2.6.27/drivers/video/ffb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/ffb.c 2009-03-25 16:11:28.000000000 +0000
-@@ -1054,6 +1054,7 @@ static struct of_device_id ffb_match[] =
+diff -r 9608d5473017 drivers/video/ffb.c
+--- a/drivers/video/ffb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/ffb.c Wed May 06 16:56:45 2009 +0100
+@@ -1054,6 +1054,7 @@
MODULE_DEVICE_TABLE(of, ffb_match);
static struct of_platform_driver ffb_driver = {
.name = "ffb",
.match_table = ffb_match,
.probe = ffb_probe,
-diff -purN linux-2.6.27/drivers/video/leo.c linux-2.6.27.19-5.1/drivers/video/leo.c
---- linux-2.6.27/drivers/video/leo.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/leo.c 2009-03-25 16:11:28.000000000 +0000
-@@ -650,6 +650,7 @@ static struct of_device_id leo_match[] =
+diff -r 9608d5473017 drivers/video/leo.c
+--- a/drivers/video/leo.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/leo.c Wed May 06 16:56:45 2009 +0100
+@@ -650,6 +650,7 @@
MODULE_DEVICE_TABLE(of, leo_match);
static struct of_platform_driver leo_driver = {
.name = "leo",
.match_table = leo_match,
.probe = leo_probe,
-diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/macfb.c
---- linux-2.6.27/drivers/video/macfb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/macfb.c 2009-03-25 16:11:28.000000000 +0000
-@@ -164,7 +164,6 @@ static struct fb_var_screeninfo macfb_de
+diff -r 9608d5473017 drivers/video/macfb.c
+--- a/drivers/video/macfb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/macfb.c Wed May 06 16:56:45 2009 +0100
+@@ -164,7 +164,6 @@
};
static struct fb_fix_screeninfo macfb_fix = {
.type = FB_TYPE_PACKED_PIXELS,
.accel = FB_ACCEL_NONE,
};
-@@ -760,22 +759,22 @@ static int __init macfb_init(void)
+@@ -760,22 +759,22 @@
switch(ndev->dr_hw) {
case NUBUS_DRHW_APPLE_MDC:
break;
}
}
-@@ -786,21 +785,11 @@ static int __init macfb_init(void)
+@@ -786,21 +785,11 @@
if (!video_is_nubus)
switch( mac_bi_data.id )
{
macfb_setpalette = valkyrie_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
valkyrie_cmap_regs = ioremap(DAC_BASE, 0x1000);
-@@ -823,7 +812,7 @@ static int __init macfb_init(void)
+@@ -823,7 +812,7 @@
case MAC_MODEL_Q700:
case MAC_MODEL_Q900:
case MAC_MODEL_Q950:
macfb_setpalette = dafb_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
dafb_cmap_regs = ioremap(DAFB_BASE, 0x1000);
-@@ -831,7 +820,7 @@ static int __init macfb_init(void)
+@@ -831,7 +820,7 @@
/* LC II uses the V8 framebuffer */
case MAC_MODEL_LCII:
macfb_setpalette = v8_brazil_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
-@@ -843,7 +832,7 @@ static int __init macfb_init(void)
+@@ -843,7 +832,7 @@
case MAC_MODEL_IIVI:
case MAC_MODEL_IIVX:
case MAC_MODEL_P600:
macfb_setpalette = v8_brazil_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
-@@ -860,7 +849,7 @@ static int __init macfb_init(void)
+@@ -860,7 +849,7 @@
case MAC_MODEL_P460:
macfb_setpalette = v8_brazil_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
break;
-@@ -871,7 +860,7 @@ static int __init macfb_init(void)
+@@ -871,7 +860,7 @@
case MAC_MODEL_IISI:
macfb_setpalette = rbv_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
rbv_cmap_regs = ioremap(DAC_BASE, 0x1000);
break;
-@@ -880,7 +869,7 @@ static int __init macfb_init(void)
+@@ -880,7 +869,7 @@
case MAC_MODEL_C660:
macfb_setpalette = civic_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
civic_cmap_regs = ioremap(CIVIC_BASE, 0x1000);
break;
-@@ -901,7 +890,7 @@ static int __init macfb_init(void)
+@@ -901,7 +890,7 @@
v8_brazil_cmap_regs =
ioremap(DAC_BASE, 0x1000);
}
break;
/* We think this may be like the LC II */
case MAC_MODEL_CCL:
-@@ -911,18 +900,18 @@ static int __init macfb_init(void)
+@@ -911,18 +900,18 @@
v8_brazil_cmap_regs =
ioremap(DAC_BASE, 0x1000);
}
break;
/* Powerbooks are particularly difficult. Many of
-@@ -935,7 +924,7 @@ static int __init macfb_init(void)
+@@ -935,7 +924,7 @@
case MAC_MODEL_PB140:
case MAC_MODEL_PB145:
case MAC_MODEL_PB170:
break;
/* Internal is GSC, External (if present) is ViSC */
-@@ -945,13 +934,13 @@ static int __init macfb_init(void)
+@@ -945,13 +934,13 @@
case MAC_MODEL_PB180:
case MAC_MODEL_PB210:
case MAC_MODEL_PB230:
break;
/* Internal is CSC, External is Keystone+Ariel. */
-@@ -963,12 +952,12 @@ static int __init macfb_init(void)
+@@ -963,12 +952,12 @@
case MAC_MODEL_PB280C:
macfb_setpalette = csc_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
break;
}
-@@ -978,16 +967,23 @@ static int __init macfb_init(void)
+@@ -978,16 +967,23 @@
fb_info.pseudo_palette = pseudo_palette;
fb_info.flags = FBINFO_DEFAULT;
return err;
}
-diff -purN linux-2.6.27/drivers/video/p9100.c linux-2.6.27.19-5.1/drivers/video/p9100.c
---- linux-2.6.27/drivers/video/p9100.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/p9100.c 2009-03-25 16:11:28.000000000 +0000
-@@ -358,6 +358,7 @@ static struct of_device_id p9100_match[]
+diff -r 9608d5473017 drivers/video/p9100.c
+--- a/drivers/video/p9100.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/p9100.c Wed May 06 16:56:45 2009 +0100
+@@ -358,6 +358,7 @@
MODULE_DEVICE_TABLE(of, p9100_match);
static struct of_platform_driver p9100_driver = {
.name = "p9100",
.match_table = p9100_match,
.probe = p9100_probe,
-diff -purN linux-2.6.27/drivers/video/platinumfb.c linux-2.6.27.19-5.1/drivers/video/platinumfb.c
---- linux-2.6.27/drivers/video/platinumfb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/platinumfb.c 2009-03-25 16:11:28.000000000 +0000
-@@ -674,6 +674,7 @@ static struct of_device_id platinumfb_ma
+diff -r 9608d5473017 drivers/video/platinumfb.c
+--- a/drivers/video/platinumfb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/platinumfb.c Wed May 06 16:56:45 2009 +0100
+@@ -674,6 +674,7 @@
static struct of_platform_driver platinum_driver =
{
.name = "platinumfb",
.match_table = platinumfb_match,
.probe = platinumfb_probe,
-diff -purN linux-2.6.27/drivers/video/ps3fb.c linux-2.6.27.19-5.1/drivers/video/ps3fb.c
---- linux-2.6.27/drivers/video/ps3fb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/ps3fb.c 2009-03-25 16:11:28.000000000 +0000
-@@ -460,12 +460,16 @@ static void ps3fb_sync_image(struct devi
+diff -r 9608d5473017 drivers/video/ps3fb.c
+--- a/drivers/video/ps3fb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/ps3fb.c Wed May 06 16:56:45 2009 +0100
+@@ -460,12 +460,16 @@
line_length |= (u64)src_line_length << 32;
src_offset += GPU_FB_START;
if (status)
dev_err(dev,
"%s: lv1_gpu_context_attribute FB_BLIT failed: %d\n",
-@@ -784,15 +788,6 @@ static int ps3fb_wait_for_vsync(u32 crtc
+@@ -784,15 +788,6 @@
return 0;
}
/*
* ioctl
-@@ -1228,7 +1223,6 @@ static int __devinit ps3fb_probe(struct
+@@ -1228,7 +1223,6 @@
}
ps3fb.task = task;
return 0;
-@@ -1258,10 +1252,9 @@ static int ps3fb_shutdown(struct ps3_sys
+@@ -1258,10 +1252,9 @@
dev_dbg(&dev->core, " -> %s:%d\n", __func__, __LINE__);
if (ps3fb.task) {
struct task_struct *task = ps3fb.task;
ps3fb.task = NULL;
-diff -purN linux-2.6.27/drivers/video/tcx.c linux-2.6.27.19-5.1/drivers/video/tcx.c
---- linux-2.6.27/drivers/video/tcx.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/tcx.c 2009-03-25 16:11:28.000000000 +0000
-@@ -514,6 +514,7 @@ static struct of_device_id tcx_match[] =
+diff -r 9608d5473017 drivers/video/tcx.c
+--- a/drivers/video/tcx.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/tcx.c Wed May 06 16:56:45 2009 +0100
+@@ -514,6 +514,7 @@
MODULE_DEVICE_TABLE(of, tcx_match);
static struct of_platform_driver tcx_driver = {
.name = "tcx",
.match_table = tcx_match,
.probe = tcx_probe,
-diff -purN linux-2.6.27/drivers/video/vesafb.c linux-2.6.27.19-5.1/drivers/video/vesafb.c
---- linux-2.6.27/drivers/video/vesafb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/vesafb.c 2009-03-25 16:11:28.000000000 +0000
-@@ -174,7 +174,10 @@ static int vesafb_setcolreg(unsigned reg
+diff -r 9608d5473017 drivers/video/vesafb.c
+--- a/drivers/video/vesafb.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/vesafb.c Wed May 06 16:56:45 2009 +0100
+@@ -174,7 +174,10 @@
return err;
}
.owner = THIS_MODULE,
.fb_setcolreg = vesafb_setcolreg,
.fb_pan_display = vesafb_pan_display,
-@@ -258,6 +261,9 @@ static int __init vesafb_probe(struct pl
+@@ -258,6 +261,9 @@
* option to simply use size_total as that
* wastes plenty of kernel address space. */
size_remap = size_vmode * 2;
if (vram_remap)
size_remap = vram_remap * 1024 * 1024;
if (size_remap < size_vmode)
-diff -purN linux-2.6.27/drivers/video/xen-fbfront.c linux-2.6.27.19-5.1/drivers/video/xen-fbfront.c
---- linux-2.6.27/drivers/video/xen-fbfront.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/xen-fbfront.c 2009-03-25 16:11:28.000000000 +0000
-@@ -670,7 +670,6 @@ static struct xenbus_device_id xenfb_ids
+diff -r 9608d5473017 drivers/video/xen-fbfront.c
+--- a/drivers/video/xen-fbfront.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/xen-fbfront.c Wed May 06 16:56:45 2009 +0100
+@@ -670,7 +670,6 @@
static struct xenbus_driver xenfb = {
.name = "vfb",
.ids = xenfb_ids,
.probe = xenfb_probe,
.remove = xenfb_remove,
-diff -purN linux-2.6.27/drivers/w1/slaves/w1_therm.c linux-2.6.27.19-5.1/drivers/w1/slaves/w1_therm.c
---- linux-2.6.27/drivers/w1/slaves/w1_therm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/w1/slaves/w1_therm.c 2009-03-25 16:11:29.000000000 +0000
-@@ -113,7 +113,7 @@ static struct w1_therm_family_converter
+diff -r 9608d5473017 drivers/w1/slaves/w1_therm.c
+--- a/drivers/w1/slaves/w1_therm.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/w1/slaves/w1_therm.c Wed May 06 16:56:45 2009 +0100
+@@ -113,7 +113,7 @@
static inline int w1_DS18B20_convert_temp(u8 rom[9])
{
t = t*1000/16;
return t;
}
-diff -purN linux-2.6.27/drivers/watchdog/hpwdt.c linux-2.6.27.19-5.1/drivers/watchdog/hpwdt.c
---- linux-2.6.27/drivers/watchdog/hpwdt.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/watchdog/hpwdt.c 2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/watchdog/hpwdt.c
+--- a/drivers/watchdog/hpwdt.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/watchdog/hpwdt.c Wed May 06 16:56:45 2009 +0100
@@ -40,6 +40,7 @@
#include <linux/bootmem.h>
#include <linux/slab.h>
#define PCI_BIOS32_SD_VALUE 0x5F32335F /* "_32_" */
#define CRU_BIOS_SIGNATURE_VALUE 0x55524324
-@@ -394,6 +395,8 @@ static void __devinit dmi_find_cru(const
+@@ -394,6 +395,8 @@
smbios_cru64_ptr->double_offset;
cru_rom_addr = ioremap(cru_physical_address,
smbios_cru64_ptr->double_length);
}
}
}
-@@ -482,7 +485,7 @@ static int hpwdt_pretimeout(struct notif
+@@ -482,7 +485,7 @@
"Management Log for details.\n");
}
}
/*
-diff -purN linux-2.6.27/drivers/watchdog/ib700wdt.c linux-2.6.27.19-5.1/drivers/watchdog/ib700wdt.c
---- linux-2.6.27/drivers/watchdog/ib700wdt.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/watchdog/ib700wdt.c 2009-03-25 16:11:28.000000000 +0000
-@@ -154,7 +154,7 @@ static int ibwdt_set_heartbeat(int t)
+diff -r 9608d5473017 drivers/watchdog/ib700wdt.c
+--- a/drivers/watchdog/ib700wdt.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/watchdog/ib700wdt.c Wed May 06 16:56:45 2009 +0100
+@@ -154,7 +154,7 @@
return -EINVAL;
for (i = 0x0F; i > -1; i--)
break;
wd_margin = i;
return 0;
-diff -purN linux-2.6.27/drivers/xen/Kconfig linux-2.6.27.19-5.1/drivers/xen/Kconfig
---- linux-2.6.27/drivers/xen/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/Kconfig 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/Kconfig
+--- a/drivers/xen/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/Kconfig Wed May 06 16:56:45 2009 +0100
@@ -1,6 +1,338 @@
+#
+# This Kconfig describe xen options
default y
help
The balloon driver allows the Xen domain to request more memory from
-@@ -8,12 +340,14 @@ config XEN_BALLOON
+@@ -8,12 +340,14 @@
return unneeded memory to the system.
config XEN_SCRUB_PAGES
+ If security is not a concern then you may increase performance by
+ saying N.
If in doubt, say yes.
-diff -purN linux-2.6.27/drivers/xen/Makefile linux-2.6.27.19-5.1/drivers/xen/Makefile
---- linux-2.6.27/drivers/xen/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/Makefile
+--- a/drivers/xen/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/Makefile Wed May 06 16:56:45 2009 +0100
@@ -1,4 +1,31 @@
-obj-y += grant-table.o features.o events.o manage.o
-obj-y += xenbus/
+obj-$(CONFIG_XEN_NETDEV_ACCEL_SFC_UTIL) += sfc_netutil/
+obj-$(CONFIG_XEN_NETDEV_ACCEL_SFC_FRONTEND) += sfc_netfront/
+obj-$(CONFIG_XEN_NETDEV_ACCEL_SFC_BACKEND) += sfc_netback/
-diff -purN linux-2.6.27/drivers/xen/balloon/Makefile linux-2.6.27.19-5.1/drivers/xen/balloon/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/balloon/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/balloon/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/balloon/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,2 @@
+
+obj-y := balloon.o sysfs.o
-diff -purN linux-2.6.27/drivers/xen/balloon/balloon.c linux-2.6.27.19-5.1/drivers/xen/balloon/balloon.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/balloon/balloon.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/balloon/balloon.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/balloon/balloon.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,740 @@
+/******************************************************************************
+ * balloon.c
+EXPORT_SYMBOL_GPL(balloon_release_driver_page);
+
+MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/balloon/common.h linux-2.6.27.19-5.1/drivers/xen/balloon/common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/balloon/common.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/balloon/common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/balloon/common.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * balloon/common.h
+unsigned long balloon_minimum_target(void);
+
+#endif /* __XEN_BALLOON_COMMON_H__ */
-diff -purN linux-2.6.27/drivers/xen/balloon/sysfs.c linux-2.6.27.19-5.1/drivers/xen/balloon/sysfs.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/balloon/sysfs.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/balloon/sysfs.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/balloon/sysfs.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,178 @@
+/******************************************************************************
+ * balloon/sysfs.c
+{
+ unregister_balloon(&balloon_sysdev);
+}
-diff -purN linux-2.6.27/drivers/xen/blkback/Makefile linux-2.6.27.19-5.1/drivers/xen/blkback/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkback/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkback/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkback/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,3 @@
+obj-$(CONFIG_XEN_BLKDEV_BACKEND) := blkbk.o
+
+blkbk-y := blkback.o xenbus.o interface.o vbd.o cdrom.o
-diff -purN linux-2.6.27/drivers/xen/blkback/blkback.c linux-2.6.27.19-5.1/drivers/xen/blkback/blkback.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkback/blkback.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkback/blkback.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkback/blkback.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,664 @@
+/******************************************************************************
+ * arch/xen/drivers/blkif/backend/main.c
+module_init(blkif_init);
+
+MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/blkback/cdrom.c linux-2.6.27.19-5.1/drivers/xen/blkback/cdrom.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkback/cdrom.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkback/cdrom.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkback/cdrom.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,162 @@
+/******************************************************************************
+ * blkback/cdrom.c
+ }
+ }
+}
-diff -purN linux-2.6.27/drivers/xen/blkback/common.h linux-2.6.27.19-5.1/drivers/xen/blkback/common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkback/common.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkback/common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkback/common.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,154 @@
+/*
+ * This program is free software; you can redistribute it and/or
+void cdrom_add_media_watch(struct backend_info *be);
+
+#endif /* __BLKIF__BACKEND__COMMON_H__ */
-diff -purN linux-2.6.27/drivers/xen/blkback/interface.c linux-2.6.27.19-5.1/drivers/xen/blkback/interface.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkback/interface.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkback/interface.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkback/interface.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,181 @@
+/******************************************************************************
+ * arch/xen/drivers/blkif/backend/interface.c
+ blkif_cachep = kmem_cache_create("blkif_cache", sizeof(blkif_t),
+ 0, 0, NULL);
+}
-diff -purN linux-2.6.27/drivers/xen/blkback/vbd.c linux-2.6.27.19-5.1/drivers/xen/blkback/vbd.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkback/vbd.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkback/vbd.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkback/vbd.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,121 @@
+/******************************************************************************
+ * blkback/vbd.c
+ out:
+ return rc;
+}
-diff -purN linux-2.6.27/drivers/xen/blkback/xenbus.c linux-2.6.27.19-5.1/drivers/xen/blkback/xenbus.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkback/xenbus.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkback/xenbus.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkback/xenbus.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,549 @@
+/* Xenbus code for blkif backend
+ Copyright (C) 2005 Rusty Russell <rusty@rustcorp.com.au>
+ if (xenbus_register_backend(&blkback))
+ BUG();
+}
-diff -purN linux-2.6.27/drivers/xen/blkfront/Makefile linux-2.6.27.19-5.1/drivers/xen/blkfront/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkfront/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkfront/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkfront/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,5 @@
+
+obj-$(CONFIG_XEN_BLKDEV_FRONTEND) := xenblk.o
+
+xenblk-objs := blkfront.o vbd.o vcd.o
+
-diff -purN linux-2.6.27/drivers/xen/blkfront/blkfront.c linux-2.6.27.19-5.1/drivers/xen/blkfront/blkfront.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkfront/blkfront.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkfront/blkfront.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkfront/blkfront.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,936 @@
+/******************************************************************************
+ * blkfront.c
+module_exit(xlblk_exit);
+
+MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/blkfront/block.h linux-2.6.27.19-5.1/drivers/xen/blkfront/block.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkfront/block.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkfront/block.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkfront/block.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,162 @@
+/******************************************************************************
+ * block.h
+extern void unregister_vcd(struct blkfront_info *info);
+
+#endif /* __XEN_DRIVERS_BLOCK_H__ */
-diff -purN linux-2.6.27/drivers/xen/blkfront/vbd.c linux-2.6.27.19-5.1/drivers/xen/blkfront/vbd.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkfront/vbd.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkfront/vbd.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkfront/vbd.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,441 @@
+/******************************************************************************
+ * vbd.c
+}
+
+#endif /* CONFIG_SYSFS */
-diff -purN linux-2.6.27/drivers/xen/blkfront/vcd.c linux-2.6.27.19-5.1/drivers/xen/blkfront/vcd.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkfront/vcd.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkfront/vcd.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkfront/vcd.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,476 @@
+/*******************************************************************************
+* vcd.c
+ spin_unlock(&vcd_disks_lock);
+}
+
-diff -purN linux-2.6.27/drivers/xen/blktap/Makefile linux-2.6.27.19-5.1/drivers/xen/blktap/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blktap/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blktap/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blktap/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,5 @@
+LINUXINCLUDE += -I../xen/include/public/io
+
+obj-$(CONFIG_XEN_BLKDEV_TAP) := blktap.o
+
+blktap-y := xenbus.o interface.o blocktap.o
-diff -purN linux-2.6.27/drivers/xen/blktap/blktap.c linux-2.6.27.19-5.1/drivers/xen/blktap/blktap.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blktap/blktap.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blktap/blktap.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blktap/blktap.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,1730 @@
+/******************************************************************************
+ * drivers/xen/blktap/blktap.c
+module_init(blkif_init);
+
+MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/blktap/blocktap.c linux-2.6.27.19-5.1/drivers/xen/blktap/blocktap.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blktap/blocktap.c 2009-03-25 16:11:22.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/xen/blktap/blocktap.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blktap/blocktap.c Wed May 06 16:56:45 2009 +0100
+@@ -0,0 +1,1 @@
+#include "blktap.c"
-diff -purN linux-2.6.27/drivers/xen/blktap/common.h linux-2.6.27.19-5.1/drivers/xen/blktap/common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blktap/common.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blktap/common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blktap/common.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,123 @@
+/*
+ * This program is free software; you can redistribute it and/or
+void signal_tapdisk(int idx);
+
+#endif /* __BLKIF__BACKEND__COMMON_H__ */
-diff -purN linux-2.6.27/drivers/xen/blktap/interface.c linux-2.6.27.19-5.1/drivers/xen/blktap/interface.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blktap/interface.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blktap/interface.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blktap/interface.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,181 @@
+/******************************************************************************
+ * drivers/xen/blktap/interface.c
+ blkif_cachep = kmem_cache_create("blktapif_cache", sizeof(blkif_t),
+ 0, 0, NULL);
+}
-diff -purN linux-2.6.27/drivers/xen/blktap/xenbus.c linux-2.6.27.19-5.1/drivers/xen/blktap/xenbus.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blktap/xenbus.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blktap/xenbus.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blktap/xenbus.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,509 @@
+/* drivers/xen/blktap/xenbus.c
+ *
+ if (xenbus_register_backend(&blktap))
+ BUG();
+}
-diff -purN linux-2.6.27/drivers/xen/char/Makefile linux-2.6.27.19-5.1/drivers/xen/char/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/char/Makefile 2009-03-25 16:11:22.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/xen/char/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/char/Makefile Wed May 06 16:56:45 2009 +0100
+@@ -0,0 +1,1 @@
+obj-$(CONFIG_XEN_DEVMEM) := mem.o
-diff -purN linux-2.6.27/drivers/xen/char/mem.c linux-2.6.27.19-5.1/drivers/xen/char/mem.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/char/mem.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/char/mem.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/char/mem.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,245 @@
+/*
+ * Originally from linux/drivers/char/mem.c
+ .mmap = xen_mmap_mem,
+ .open = open_mem,
+};
-diff -purN linux-2.6.27/drivers/xen/console/Makefile linux-2.6.27.19-5.1/drivers/xen/console/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/console/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/console/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/console/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,2 @@
+
+obj-y := console.o xencons_ring.o
-diff -purN linux-2.6.27/drivers/xen/console/console.c linux-2.6.27.19-5.1/drivers/xen/console/console.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/console/console.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/console/console.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/console/console.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,747 @@
+/******************************************************************************
+ * console.c
+module_init(xencons_init);
+
+MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/console/xencons_ring.c linux-2.6.27.19-5.1/drivers/xen/console/xencons_ring.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/console/xencons_ring.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/console/xencons_ring.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/console/xencons_ring.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,143 @@
+/*
+ * This program is free software; you can redistribute it and/or
+{
+ (void)xencons_ring_init();
+}
-diff -purN linux-2.6.27/drivers/xen/core/Makefile linux-2.6.27.19-5.1/drivers/xen/core/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,15 @@
+#
+# Makefile for the linux kernel.
+obj-$(CONFIG_X86_SMP) += spinlock.o
+obj-$(CONFIG_KEXEC) += machine_kexec.o
+obj-$(CONFIG_XEN_XENCOMM) += xencomm.o
-diff -purN linux-2.6.27/drivers/xen/core/cpu_hotplug.c linux-2.6.27.19-5.1/drivers/xen/core/cpu_hotplug.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/cpu_hotplug.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/cpu_hotplug.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/cpu_hotplug.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,173 @@
+#include <linux/init.h>
+#include <linux/kernel.h>
+{
+ xenbus_allowed_cpumask = cpu_present_map;
+}
-diff -purN linux-2.6.27/drivers/xen/core/domctl.c linux-2.6.27.19-5.1/drivers/xen/core/domctl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/domctl.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/domctl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/domctl.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,113 @@
+/*
+ * !!! dirty hack alert !!!
+ return BLKIF_PROTOCOL_NATIVE;
+}
+EXPORT_SYMBOL_GPL(xen_guest_blkif_protocol);
-diff -purN linux-2.6.27/drivers/xen/core/domctl.h linux-2.6.27.19-5.1/drivers/xen/core/domctl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/domctl.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/domctl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/domctl.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,2 @@
+int xen_guest_address_size(int domid);
+int xen_guest_blkif_protocol(int domid);
-diff -purN linux-2.6.27/drivers/xen/core/evtchn.c linux-2.6.27.19-5.1/drivers/xen/core/evtchn.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/evtchn.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/evtchn.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/evtchn.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,1678 @@
+/******************************************************************************
+ * evtchn.c
+ handle_level_irq, "level");
+ }
+}
-diff -purN linux-2.6.27/drivers/xen/core/features.c linux-2.6.27.19-5.1/drivers/xen/core/features.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/features.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/features.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/features.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,34 @@
+/******************************************************************************
+ * features.c
+ xen_features[i*32+j] = !!(fi.submap & 1<<j);
+ }
+}
-diff -purN linux-2.6.27/drivers/xen/core/firmware.c linux-2.6.27.19-5.1/drivers/xen/core/firmware.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/firmware.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/firmware.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/firmware.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,74 @@
+#include <linux/kernel.h>
+#include <linux/errno.h>
+ memset(edid_info.dummy, 0x13, sizeof(edid_info.dummy));
+#endif
+}
-diff -purN linux-2.6.27/drivers/xen/core/gnttab.c linux-2.6.27.19-5.1/drivers/xen/core/gnttab.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/gnttab.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/gnttab.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/gnttab.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,884 @@
+/******************************************************************************
+ * gnttab.c
+#ifdef CONFIG_XEN
+core_initcall(gnttab_init);
+#endif
-diff -purN linux-2.6.27/drivers/xen/core/hypervisor_sysfs.c linux-2.6.27.19-5.1/drivers/xen/core/hypervisor_sysfs.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/hypervisor_sysfs.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/hypervisor_sysfs.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/hypervisor_sysfs.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,57 @@
+/*
+ * copyright (c) 2006 IBM Corporation
+}
+
+device_initcall(hypervisor_subsys_init);
-diff -purN linux-2.6.27/drivers/xen/core/machine_kexec.c linux-2.6.27.19-5.1/drivers/xen/core/machine_kexec.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/machine_kexec.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/machine_kexec.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/machine_kexec.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,234 @@
+/*
+ * drivers/xen/core/machine_kexec.c
+ * tab-width: 8
+ * End:
+ */
-diff -purN linux-2.6.27/drivers/xen/core/machine_reboot.c linux-2.6.27.19-5.1/drivers/xen/core/machine_reboot.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/machine_reboot.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/machine_reboot.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/machine_reboot.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,261 @@
+#include <linux/version.h>
+#include <linux/kernel.h>
+ return 0;
+}
+#endif
-diff -purN linux-2.6.27/drivers/xen/core/pci.c linux-2.6.27.19-5.1/drivers/xen/core/pci.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/pci.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/pci.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/pci.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,59 @@
+/*
+ * vim:shiftwidth=8:noexpandtab
+}
+
+core_initcall(hook_pci_bus);
-diff -purN linux-2.6.27/drivers/xen/core/reboot.c linux-2.6.27.19-5.1/drivers/xen/core/reboot.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/reboot.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/reboot.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/reboot.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,349 @@
+#define __KERNEL_SYSCALLS__
+#include <linux/version.h>
+}
+
+#endif /* !defined(CONFIG_XEN) */
-diff -purN linux-2.6.27/drivers/xen/core/smpboot.c linux-2.6.27.19-5.1/drivers/xen/core/smpboot.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/smpboot.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/smpboot.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/smpboot.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,457 @@
+/*
+ * Xen SMP booting functions
+ return -EINVAL;
+}
+#endif
-diff -purN linux-2.6.27/drivers/xen/core/spinlock.c linux-2.6.27.19-5.1/drivers/xen/core/spinlock.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/spinlock.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/spinlock.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/spinlock.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,163 @@
+/*
+ * Xen spinlock functions
+ }
+}
+EXPORT_SYMBOL(xen_spin_kick);
-diff -purN linux-2.6.27/drivers/xen/core/xen_proc.c linux-2.6.27.19-5.1/drivers/xen/core/xen_proc.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/xen_proc.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/xen_proc.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/xen_proc.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,23 @@
+
+#include <linux/module.h>
+}
+
+EXPORT_SYMBOL_GPL(remove_xen_proc_entry);
-diff -purN linux-2.6.27/drivers/xen/core/xen_sysfs.c linux-2.6.27.19-5.1/drivers/xen/core/xen_sysfs.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/xen_sysfs.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/xen_sysfs.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/xen_sysfs.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,421 @@
+/*
+ * copyright (c) 2006 IBM Corporation
+
+module_init(hyper_sysfs_init);
+module_exit(hyper_sysfs_exit);
-diff -purN linux-2.6.27/drivers/xen/core/xencomm.c linux-2.6.27.19-5.1/drivers/xen/core/xencomm.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/xencomm.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/xencomm.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/xencomm.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,229 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+
+ return xencomm_pa(desc);
+}
-diff -purN linux-2.6.27/drivers/xen/evtchn/Makefile linux-2.6.27.19-5.1/drivers/xen/evtchn/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/evtchn/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/evtchn/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/evtchn/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,2 @@
+
+obj-y := evtchn.o
-diff -purN linux-2.6.27/drivers/xen/evtchn/evtchn.c linux-2.6.27.19-5.1/drivers/xen/evtchn/evtchn.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/evtchn/evtchn.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/evtchn/evtchn.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/evtchn/evtchn.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,562 @@
+/******************************************************************************
+ * evtchn.c
+module_exit(evtchn_cleanup);
+
+MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/fbfront/Makefile linux-2.6.27.19-5.1/drivers/xen/fbfront/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/fbfront/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/fbfront/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/fbfront/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,2 @@
+obj-$(CONFIG_XEN_FRAMEBUFFER) := xenfb.o
+obj-$(CONFIG_XEN_KEYBOARD) += xenkbd.o
-diff -purN linux-2.6.27/drivers/xen/fbfront/xenfb.c linux-2.6.27.19-5.1/drivers/xen/fbfront/xenfb.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/fbfront/xenfb.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/fbfront/xenfb.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/fbfront/xenfb.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,909 @@
+/*
+ * linux/drivers/video/xenfb.c -- Xen para-virtual frame buffer device
+
+MODULE_DESCRIPTION("Xen virtual framebuffer device frontend");
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/xen/fbfront/xenkbd.c linux-2.6.27.19-5.1/drivers/xen/fbfront/xenkbd.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/fbfront/xenkbd.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/fbfront/xenkbd.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/fbfront/xenkbd.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,354 @@
+/*
+ * linux/drivers/input/keyboard/xenkbd.c -- Xen para-virtual input device
+
+MODULE_DESCRIPTION("Xen virtual keyboard/pointer device frontend");
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/xen/gntdev/Makefile linux-2.6.27.19-5.1/drivers/xen/gntdev/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/gntdev/Makefile 2009-03-25 16:11:22.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/xen/gntdev/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/gntdev/Makefile Wed May 06 16:56:45 2009 +0100
+@@ -0,0 +1,1 @@
+obj-$(CONFIG_XEN_GRANT_DEV) := gntdev.o
-diff -purN linux-2.6.27/drivers/xen/gntdev/gntdev.c linux-2.6.27.19-5.1/drivers/xen/gntdev/gntdev.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/gntdev/gntdev.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/gntdev/gntdev.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/gntdev/gntdev.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,1075 @@
+/******************************************************************************
+ * gntdev.c
+
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/xen/netback/Makefile linux-2.6.27.19-5.1/drivers/xen/netback/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netback/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netback/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netback/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,5 @@
+obj-$(CONFIG_XEN_NETDEV_BACKEND) := netbk.o
+obj-$(CONFIG_XEN_NETDEV_LOOPBACK) += netloop.o
+
+netbk-y := netback.o xenbus.o interface.o accel.o
+netloop-y := loopback.o
-diff -purN linux-2.6.27/drivers/xen/netback/accel.c linux-2.6.27.19-5.1/drivers/xen/netback/accel.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netback/accel.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netback/accel.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netback/accel.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,269 @@
+/******************************************************************************
+ * drivers/xen/netback/accel.c
+{
+ INIT_LIST_HEAD(&accelerators_list);
+}
-diff -purN linux-2.6.27/drivers/xen/netback/common.h linux-2.6.27.19-5.1/drivers/xen/netback/common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netback/common.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netback/common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netback/common.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,217 @@
+/******************************************************************************
+ * arch/xen/drivers/netif/backend/common.h
+}
+
+#endif /* __NETIF__BACKEND__COMMON_H__ */
-diff -purN linux-2.6.27/drivers/xen/netback/interface.c linux-2.6.27.19-5.1/drivers/xen/netback/interface.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netback/interface.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netback/interface.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netback/interface.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,344 @@
+/******************************************************************************
+ * arch/xen/drivers/netif/backend/interface.c
+
+ free_netdev(netif->dev);
+}
-diff -purN linux-2.6.27/drivers/xen/netback/loopback.c linux-2.6.27.19-5.1/drivers/xen/netback/loopback.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netback/loopback.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netback/loopback.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netback/loopback.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,325 @@
+/******************************************************************************
+ * netback/loopback.c
+module_exit(loopback_exit);
+
+MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/netback/netback.c linux-2.6.27.19-5.1/drivers/xen/netback/netback.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netback/netback.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netback/netback.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netback/netback.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,1652 @@
+/******************************************************************************
+ * drivers/xen/netback/netback.c
+module_init(netback_init);
+
+MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/netback/xenbus.c linux-2.6.27.19-5.1/drivers/xen/netback/xenbus.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netback/xenbus.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netback/xenbus.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netback/xenbus.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,448 @@
+/* Xenbus code for netif backend
+ Copyright (C) 2005 Rusty Russell <rusty@rustcorp.com.au>
+ if (xenbus_register_backend(&netback))
+ BUG();
+}
-diff -purN linux-2.6.27/drivers/xen/netfront/Makefile linux-2.6.27.19-5.1/drivers/xen/netfront/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netfront/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netfront/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netfront/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,4 @@
+
+obj-$(CONFIG_XEN_NETDEV_FRONTEND) := xennet.o
+
+xennet-objs := netfront.o accel.o
-diff -purN linux-2.6.27/drivers/xen/netfront/accel.c linux-2.6.27.19-5.1/drivers/xen/netfront/accel.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netfront/accel.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netfront/accel.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netfront/accel.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,825 @@
+/******************************************************************************
+ * Virtual network driver for conversing with remote driver backends.
+ return rc;
+}
+
-diff -purN linux-2.6.27/drivers/xen/netfront/netfront.c linux-2.6.27.19-5.1/drivers/xen/netfront/netfront.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netfront/netfront.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netfront/netfront.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netfront/netfront.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,2227 @@
+/******************************************************************************
+ * Virtual network driver for conversing with remote driver backends.
+module_exit(netif_exit);
+
+MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/netfront/netfront.h linux-2.6.27.19-5.1/drivers/xen/netfront/netfront.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netfront/netfront.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netfront/netfront.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netfront/netfront.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,276 @@
+/******************************************************************************
+ * Virtual network driver for conversing with remote driver backends.
+void init_accelerator_vif(struct netfront_info *np,
+ struct xenbus_device *dev);
+#endif /* NETFRONT_H */
-diff -purN linux-2.6.27/drivers/xen/pciback/Makefile linux-2.6.27.19-5.1/drivers/xen/pciback/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,15 @@
+obj-$(CONFIG_XEN_PCIDEV_BACKEND) += pciback.o
+
+pciback-$(CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER) += controller.o
+
+ccflags-$(CONFIG_XEN_PCIDEV_BE_DEBUG) += -DDEBUG
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space.c linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,426 @@
+/*
+ * PCI Backend - Functions for creating a virtual configuration space for
+{
+ return pciback_config_capability_init();
+}
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space.h linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,126 @@
+/*
+ * PCI Backend - Common data structures for overriding the configuration space
+int pciback_config_capability_add_fields(struct pci_dev *dev);
+
+#endif /* __XEN_PCIBACK_CONF_SPACE_H__ */
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_capability.c linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_capability.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_capability.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,69 @@
+/*
+ * PCI Backend - Handles the virtual fields found on the capability lists
+
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_capability.h linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_capability.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_capability.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,23 @@
+/*
+ * PCI Backend - Data structures for special overlays for structures on
+};
+
+#endif
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_capability_msi.c linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability_msi.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability_msi.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_capability_msi.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_capability_msi.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,79 @@
+/*
+ * PCI Backend -- Configuration overlay for MSI capability
+ return 0;
+}
+
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_capability_pm.c linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability_pm.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability_pm.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_capability_pm.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_capability_pm.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,126 @@
+/*
+ * PCI Backend - Configuration space overlay for power management
+ .capability = PCI_CAP_ID_PM,
+ .fields = caplist_pm,
+};
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_capability_vpd.c linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability_vpd.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability_vpd.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_capability_vpd.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_capability_vpd.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,40 @@
+/*
+ * PCI Backend - Configuration space overlay for Vital Product Data
+ .capability = PCI_CAP_ID_VPD,
+ .fields = caplist_vpd,
+};
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_header.c linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_header.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_header.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_header.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_header.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,317 @@
+/*
+ * PCI Backend - Handles the virtual fields in the configuration space headers.
+ out:
+ return err;
+}
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_quirks.c linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_quirks.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_quirks.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_quirks.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_quirks.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,126 @@
+/*
+ * PCI Backend - Handle special overlays for broken devices.
+ out:
+ return ret;
+}
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_quirks.h linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_quirks.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_quirks.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_quirks.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_quirks.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,35 @@
+/*
+ * PCI Backend - Data structures for special overlays for broken devices.
+int pciback_field_is_dup(struct pci_dev *dev, unsigned int reg);
+
+#endif
-diff -purN linux-2.6.27/drivers/xen/pciback/controller.c linux-2.6.27.19-5.1/drivers/xen/pciback/controller.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/controller.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/controller.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/controller.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,408 @@
+/*
+ * Copyright (C) 2007 Hewlett-Packard Development Company, L.P.
+ kfree(dev_data);
+ pdev->pci_dev_data = NULL;
+}
-diff -purN linux-2.6.27/drivers/xen/pciback/passthrough.c linux-2.6.27.19-5.1/drivers/xen/pciback/passthrough.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/passthrough.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/passthrough.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/passthrough.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,166 @@
+/*
+ * PCI Backend - Provides restricted access to the real PCI bus topology
+ kfree(dev_data);
+ pdev->pci_dev_data = NULL;
+}
-diff -purN linux-2.6.27/drivers/xen/pciback/pci_stub.c linux-2.6.27.19-5.1/drivers/xen/pciback/pci_stub.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/pci_stub.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/pci_stub.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/pci_stub.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,948 @@
+/*
+ * PCI Stub Driver - Grabs devices in backend to be exported later
+module_exit(pciback_cleanup);
+
+MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/pciback/pciback.h linux-2.6.27.19-5.1/drivers/xen/pciback/pciback.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/pciback.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/pciback.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/pciback.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,111 @@
+/*
+ * PCI Backend Common Data Structures & Function Declarations
+#endif
+extern int verbose_request;
+#endif
-diff -purN linux-2.6.27/drivers/xen/pciback/pciback_ops.c linux-2.6.27.19-5.1/drivers/xen/pciback/pciback_ops.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/pciback_ops.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/pciback_ops.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/pciback_ops.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,117 @@
+/*
+ * PCI Backend Operations - respond to PCI requests from Frontend
+
+ return IRQ_HANDLED;
+}
-diff -purN linux-2.6.27/drivers/xen/pciback/slot.c linux-2.6.27.19-5.1/drivers/xen/pciback/slot.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/slot.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/slot.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/slot.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,157 @@
+/*
+ * PCI Backend - Provides a Virtual PCI bus (with real devices)
+ kfree(slot_dev);
+ pdev->pci_dev_data = NULL;
+}
-diff -purN linux-2.6.27/drivers/xen/pciback/vpci.c linux-2.6.27.19-5.1/drivers/xen/pciback/vpci.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/vpci.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/vpci.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/vpci.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,212 @@
+/*
+ * PCI Backend - Provides a Virtual PCI bus (with real devices)
+ kfree(vpci_dev);
+ pdev->pci_dev_data = NULL;
+}
-diff -purN linux-2.6.27/drivers/xen/pciback/xenbus.c linux-2.6.27.19-5.1/drivers/xen/pciback/xenbus.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/xenbus.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/xenbus.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/xenbus.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,702 @@
+/*
+ * PCI Backend Xenbus Setup - handles setup with frontend and xend
+{
+ xenbus_unregister_driver(&xenbus_pciback_driver);
+}
-diff -purN linux-2.6.27/drivers/xen/pcifront/Makefile linux-2.6.27.19-5.1/drivers/xen/pcifront/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pcifront/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pcifront/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pcifront/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,5 @@
+obj-y += pcifront.o
+
+pcifront-y := pci_op.o xenbus.o pci.o
+
+ccflags-$(CONFIG_XEN_PCIDEV_FE_DEBUG) += -DDEBUG
-diff -purN linux-2.6.27/drivers/xen/pcifront/pci.c linux-2.6.27.19-5.1/drivers/xen/pcifront/pci.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pcifront/pci.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pcifront/pci.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pcifront/pci.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,46 @@
+/*
+ * PCI Frontend Operations - ensure only one PCI frontend runs at a time
+
+ spin_unlock(&pcifront_dev_lock);
+}
-diff -purN linux-2.6.27/drivers/xen/pcifront/pci_op.c linux-2.6.27.19-5.1/drivers/xen/pcifront/pci_op.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pcifront/pci_op.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pcifront/pci_op.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pcifront/pci_op.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,557 @@
+/*
+ * PCI Frontend Operations - Communicates with frontend
+ kfree(bus_entry);
+ }
+}
-diff -purN linux-2.6.27/drivers/xen/pcifront/pcifront.h linux-2.6.27.19-5.1/drivers/xen/pcifront/pcifront.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pcifront/pcifront.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pcifront/pcifront.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pcifront/pcifront.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,42 @@
+/*
+ * PCI Frontend - Common data structures & function declarations
+void pcifront_free_roots(struct pcifront_device *pdev);
+
+#endif /* __XEN_PCIFRONT_H__ */
-diff -purN linux-2.6.27/drivers/xen/pcifront/xenbus.c linux-2.6.27.19-5.1/drivers/xen/pcifront/xenbus.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pcifront/xenbus.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pcifront/xenbus.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pcifront/xenbus.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,450 @@
+/*
+ * PCI Frontend Xenbus Setup - handles setup with backend (imports page/evtchn)
+
+/* Initialize after the Xen PCI Frontend Stub is initialized */
+subsys_initcall(pcifront_init);
-diff -purN linux-2.6.27/drivers/xen/privcmd/Makefile linux-2.6.27.19-5.1/drivers/xen/privcmd/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/privcmd/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/privcmd/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/privcmd/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,3 @@
+
+obj-y += privcmd.o
+obj-$(CONFIG_COMPAT) += compat_privcmd.o
-diff -purN linux-2.6.27/drivers/xen/privcmd/compat_privcmd.c linux-2.6.27.19-5.1/drivers/xen/privcmd/compat_privcmd.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/privcmd/compat_privcmd.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/privcmd/compat_privcmd.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/privcmd/compat_privcmd.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,72 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ }
+ return ret;
+}
-diff -purN linux-2.6.27/drivers/xen/privcmd/privcmd.c linux-2.6.27.19-5.1/drivers/xen/privcmd/privcmd.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/privcmd/privcmd.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/privcmd/privcmd.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/privcmd/privcmd.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,327 @@
+/******************************************************************************
+ * privcmd.c
+}
+
+__initcall(privcmd_init);
-diff -purN linux-2.6.27/drivers/xen/scsiback/Makefile linux-2.6.27.19-5.1/drivers/xen/scsiback/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsiback/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsiback/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsiback/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,4 @@
+obj-$(CONFIG_XEN_SCSI_BACKEND) := xen-scsibk.o
+
+xen-scsibk-y := interface.o scsiback.o xenbus.o translate.o emulate.o
+
-diff -purN linux-2.6.27/drivers/xen/scsiback/common.h linux-2.6.27.19-5.1/drivers/xen/scsiback/common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsiback/common.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsiback/common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsiback/common.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2008, FUJITSU Limited
+
+
+#endif /* __SCSIIF__BACKEND__COMMON_H__ */
-diff -purN linux-2.6.27/drivers/xen/scsiback/emulate.c linux-2.6.27.19-5.1/drivers/xen/scsiback/emulate.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsiback/emulate.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsiback/emulate.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsiback/emulate.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,453 @@
+/*
+ * Xen SCSI backend driver
+
+ return;
+}
-diff -purN linux-2.6.27/drivers/xen/scsiback/interface.c linux-2.6.27.19-5.1/drivers/xen/scsiback/interface.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsiback/interface.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsiback/interface.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsiback/interface.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,182 @@
+/*
+ * interface management.
+{
+ kmem_cache_destroy(scsiback_cachep);
+}
-diff -purN linux-2.6.27/drivers/xen/scsiback/scsiback.c linux-2.6.27.19-5.1/drivers/xen/scsiback/scsiback.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsiback/scsiback.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsiback/scsiback.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsiback/scsiback.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,706 @@
+/*
+ * Xen SCSI backend driver
+
+MODULE_DESCRIPTION("Xen SCSI backend driver");
+MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/scsiback/translate.c linux-2.6.27.19-5.1/drivers/xen/scsiback/translate.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsiback/translate.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsiback/translate.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsiback/translate.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,168 @@
+/*
+ * Xen SCSI backend driver
+ return;
+
+}
-diff -purN linux-2.6.27/drivers/xen/scsiback/xenbus.c linux-2.6.27.19-5.1/drivers/xen/scsiback/xenbus.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsiback/xenbus.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsiback/xenbus.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsiback/xenbus.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,367 @@
+/*
+ * Xen SCSI backend driver
+{
+ xenbus_unregister_driver(&scsiback);
+}
-diff -purN linux-2.6.27/drivers/xen/scsifront/Makefile linux-2.6.27.19-5.1/drivers/xen/scsifront/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsifront/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsifront/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsifront/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,3 @@
+
+obj-$(CONFIG_XEN_SCSI_FRONTEND) := xenscsi.o
+xenscsi-objs := scsifront.o xenbus.o
-diff -purN linux-2.6.27/drivers/xen/scsifront/common.h linux-2.6.27.19-5.1/drivers/xen/scsifront/common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsifront/common.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsifront/common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsifront/common.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,129 @@
+/*
+ * Xen SCSI frontend driver
+
+
+#endif /* __XEN_DRIVERS_SCSIFRONT_H__ */
-diff -purN linux-2.6.27/drivers/xen/scsifront/scsifront.c linux-2.6.27.19-5.1/drivers/xen/scsifront/scsifront.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsifront/scsifront.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsifront/scsifront.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsifront/scsifront.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,478 @@
+/*
+ * Xen SCSI frontend driver
+
+MODULE_DESCRIPTION("Xen SCSI frontend driver");
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/xen/scsifront/xenbus.c linux-2.6.27.19-5.1/drivers/xen/scsifront/xenbus.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsifront/xenbus.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsifront/xenbus.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsifront/xenbus.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,420 @@
+/*
+ * Xen SCSI frontend driver
+ xenbus_unregister_driver(&scsifront_driver);
+}
+
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/Makefile linux-2.6.27.19-5.1/drivers/xen/sfc_netback/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/Makefile Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,12 @@
+EXTRA_CFLAGS += -Idrivers/xen/sfc_netback -Idrivers/xen/sfc_netutil -Idrivers/xen/netback -Idrivers/net/sfc
+EXTRA_CFLAGS += -D__ci_driver__
+obj-$(CONFIG_XEN_NETDEV_ACCEL_SFC_BACKEND) := sfc_netback.o
+
+sfc_netback-objs := accel.o accel_fwd.o accel_msg.o accel_solarflare.o accel_xenbus.o accel_debugfs.o
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel.c linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,129 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+module_exit(netback_accel_exit);
+
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,394 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+#endif /* NETBACK_ACCEL_H */
+
+
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_debugfs.c linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_debugfs.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_debugfs.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel_debugfs.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel_debugfs.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,148 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+}
+
+
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_fwd.c linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_fwd.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_fwd.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel_fwd.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel_fwd.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,425 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+ }
+ return;
+}
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_msg.c linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_msg.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_msg.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel_msg.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel_msg.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,392 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+
+ return;
+}
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_solarflare.c linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_solarflare.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_solarflare.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel_solarflare.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel_solarflare.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,1253 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+ out:
+ spin_unlock_irqrestore(&accel_hw_priv->filter_lock, flags);
+}
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_solarflare.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_solarflare.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_solarflare.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel_solarflare.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel_solarflare.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,88 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+extern void netback_accel_tx_packet(struct sk_buff *skb, void *fwd_priv);
+
+#endif /* NETBACK_ACCEL_SOLARFLARE_H */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_xenbus.c linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_xenbus.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_xenbus.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel_xenbus.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel_xenbus.c Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,829 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+ net_accel_update_state((struct xenbus_device *)bend->hdev_data,
+ XenbusStateClosing);
+}
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/gcc.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/gcc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/gcc.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat.h Wed May 06 16:56:45 2009 +0100
+@@ -0,0 +1,53 @@
++/****************************************************************************
++ * Copyright 2002-2005: Level 5 Networks Inc.
++ * Copyright 2005-2008: Solarflare Communications Inc,
++ * 9501 Jeronimo Road, Suite 250,
++ * Irvine, CA 92618, USA
++ *
++ * Maintained by Solarflare Communications
++ * <linux-xen-drivers@solarflare.com>
++ * <onload-dev@solarflare.com>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published
++ * by the Free Software Foundation, incorporated herein by reference.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
++ ****************************************************************************
++ */
++
++/*
++ * \author djr
++ * \brief Compatability layer. Provides definitions of fundamental
++ * types and definitions that are used throughout CI source
++ * code. It does not introduce any link time dependencies,
++ * or include any unnecessary system headers.
++ */
++/*! \cidoxg_include_ci */
++
++#ifndef __CI_COMPAT_H__
++#define __CI_COMPAT_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <ci/compat/primitive.h>
++#include <ci/compat/sysdep.h>
++#include <ci/compat/utils.h>
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* __CI_COMPAT_H__ */
++
++/*! \cidoxg_end */
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat/gcc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat/gcc.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,158 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+#endif /* __CI_COMPAT_GCC_H__ */
+
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/gcc_x86.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/gcc_x86.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/gcc_x86.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat/gcc_x86.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat/gcc_x86.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,115 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+#endif /* __CI_COMPAT_GCC_X86_H__ */
+
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/primitive.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/primitive.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/primitive.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat/primitive.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat/primitive.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,77 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+#endif /* __CI_COMPAT_PRIMITIVE_H__ */
+
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/sysdep.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/sysdep.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/sysdep.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat/sysdep.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat/sysdep.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,166 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+#endif /* __CI_COMPAT_SYSDEP_H__ */
+
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/utils.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/utils.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/utils.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat/utils.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat/utils.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,269 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+
+#endif /* __CI_COMPAT_UTILS_H__ */
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/x86.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/x86.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/x86.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat/x86.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat/x86.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,48 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+#endif /* __CI_COMPAT_X86_H__ */
+
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/x86_64.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/x86_64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/x86_64.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat/x86_64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat/x86_64.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,54 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+
+#endif /* __CI_COMPAT_X86_64_H__ */
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat.h 2009-03-25 16:11:22.000000000 +0000
-@@ -0,0 +1,53 @@
-+/****************************************************************************
-+ * Copyright 2002-2005: Level 5 Networks Inc.
-+ * Copyright 2005-2008: Solarflare Communications Inc,
-+ * 9501 Jeronimo Road, Suite 250,
-+ * Irvine, CA 92618, USA
-+ *
-+ * Maintained by Solarflare Communications
-+ * <linux-xen-drivers@solarflare.com>
-+ * <onload-dev@solarflare.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published
-+ * by the Free Software Foundation, incorporated herein by reference.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-+ ****************************************************************************
-+ */
-+
-+/*
-+ * \author djr
-+ * \brief Compatability layer. Provides definitions of fundamental
-+ * types and definitions that are used throughout CI source
-+ * code. It does not introduce any link time dependencies,
-+ * or include any unnecessary system headers.
-+ */
-+/*! \cidoxg_include_ci */
-+
-+#ifndef __CI_COMPAT_H__
-+#define __CI_COMPAT_H__
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+#include <ci/compat/primitive.h>
-+#include <ci/compat/sysdep.h>
-+#include <ci/compat/utils.h>
-+
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* __CI_COMPAT_H__ */
-+
-+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/driver/resource/efx_vi.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/driver/resource/efx_vi.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/driver/resource/efx_vi.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/driver/resource/efx_vi.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/driver/resource/efx_vi.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,276 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ int *length);
+
+#endif /* __CI_DRIVER_RESOURCE_EFX_VI_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/common.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/common.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/common.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,102 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ support */
+
+#endif /* __CI_EFHW_COMMON_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/common_sysdep.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/common_sysdep.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/common_sysdep.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/common_sysdep.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/common_sysdep.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,67 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+#endif /* LINUX_VERSION_CODE < 2.6.19 */
+
+#endif /* __CI_EFHW_COMMON_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/debug.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/debug.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/debug.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/debug.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/debug.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,84 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+#endif
+
+#endif /* __CI_EFHW_DEBUG_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/efhw_config.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/efhw_config.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/efhw_config.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/efhw_config.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/efhw_config.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,43 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+#define EFHW_MAX_NR_DEVS 5 /* max number of efhw devices supported */
+
+#endif /* __CI_EFHW_EFAB_CONFIG_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/efhw_types.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/efhw_types.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/efhw_types.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/efhw_types.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/efhw_types.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,342 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+
+
+#endif /* __CI_EFHW_EFHW_TYPES_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/hardware_sysdep.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/hardware_sysdep.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/hardware_sysdep.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/hardware_sysdep.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/hardware_sysdep.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,84 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+#endif
+
+#endif /* __CI_EFHW_HARDWARE_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/iopage_types.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/iopage_types.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/iopage_types.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/iopage_types.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/iopage_types.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,188 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+}
+
+#endif /* __CI_EFHW_IOPAGE_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/public.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/public.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/public.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/public.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/public.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,83 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ uint32_t *udp_full, uint32_t *udp_wild);
+
+#endif /* __CI_EFHW_PUBLIC_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/sysdep.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/sysdep.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/sysdep.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/sysdep.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/sysdep.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,72 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+#endif
+
+#endif /* __CI_EFHW_SYSDEP_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efrm/nic_table.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efrm/nic_table.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efrm/nic_table.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efrm/nic_table.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efrm/nic_table.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,98 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+ efrm_nic_set_read((_set), (_i)))
+
+#endif /* __CI_EFRM_NIC_TABLE_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efrm/sysdep.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efrm/sysdep.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efrm/sysdep.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efrm/sysdep.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efrm/sysdep.h Wed May 06 16:56:45 2009 +0100
@@ -0,0 +1,54 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+#endif
+
+#endif /* __CI_EFRM_SYSDEP_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efrm/sysdep_linux.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efrm/sysdep_linux.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efrm/sysdep_linux.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efrm/sysdep_linux.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efrm/sysdep_linux.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,248 @@
+/****************************************************************************
+ * Driver for Solarflare network controllers -
+}
+
+#endif /* __CI_EFRM_SYSDEP_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/config.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/config.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/config.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/tools/config.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/tools/config.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,49 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+
+#endif /* __CI_TOOLS_CONFIG_H__ */
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/debug.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/debug.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/debug.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/tools/debug.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/tools/debug.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,336 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+#endif /* __CI_TOOLS_DEBUG_H__ */
+
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/log.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/log.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/log.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/tools/log.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/tools/log.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,262 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+
+#endif /* __CI_TOOLS_LOG_H__ */
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/platform/gcc_x86.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/platform/gcc_x86.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/platform/gcc_x86.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/tools/platform/gcc_x86.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/tools/platform/gcc_x86.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,361 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+#endif /* __CI_TOOLS_GCC_X86_H__ */
+
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/platform/linux_kernel.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/platform/linux_kernel.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/platform/linux_kernel.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/tools/platform/linux_kernel.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/tools/platform/linux_kernel.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,362 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+
+#endif /* __CI_TOOLS_LINUX_KERNEL_H__ */
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/sysdep.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/sysdep.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/sysdep.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/tools/sysdep.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/tools/sysdep.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,132 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+#endif /* __CI_TOOLS_SYSDEP_H__ */
+
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/Makefile linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/Makefile Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,11 @@
+EXTRA_CFLAGS += -Idrivers/xen/sfc_netfront -Idrivers/xen/sfc_netutil -Idrivers/xen/netfront
+EXTRA_CFLAGS += -D__ci_driver__
+obj-$(CONFIG_XEN_NETDEV_ACCEL_SFC_FRONTEND) := sfc_netfront.o
+
+sfc_netfront-objs := accel_msg.o accel_bufs.o accel_netfront.o accel_vi.o accel_xenbus.o accel_tso.o accel_ssr.o accel_debugfs.o falcon_event.o falcon_vi.o pt_tx.o vi_init.o
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,476 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+extern int netfront_accel_debugfs_remove(netfront_accel_vnic *vnic);
+
+#endif /* NETFRONT_ACCEL_H */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_bufs.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_bufs.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_bufs.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_bufs.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_bufs.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,393 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+
+ return was_empty;
+}
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_bufs.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_bufs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_bufs.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_bufs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_bufs.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,181 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+
+#endif /* NETFRONT_ACCEL_BUFS_H */
+
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_debugfs.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_debugfs.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_debugfs.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_debugfs.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_debugfs.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,211 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+#endif
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_msg.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_msg.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_msg.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_msg.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_msg.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,571 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+ net_accel_msg_complete_send_notify(vnic->shared_page, &vnic->to_dom0,
+ &lock_state, vnic->msg_channel_irq);
+}
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_netfront.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_netfront.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_netfront.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_netfront.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_netfront.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,319 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+
+MODULE_LICENSE("GPL");
+
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_ssr.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_ssr.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_ssr.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_ssr.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_ssr.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,308 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+ NETFRONT_ACCEL_STATS_OP(++vnic->stats.ssr_new_stream);
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_ssr.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_ssr.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_ssr.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_ssr.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_ssr.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,88 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+}
+
+#endif /* NETFRONT_ACCEL_SSR_H */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_tso.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_tso.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_tso.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_tso.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_tso.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,509 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+
+
+
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_tso.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_tso.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_tso.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_tso.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_tso.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,57 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+ struct sk_buff *skb);
+
+#endif /* NETFRONT_ACCEL_TSO_H */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_vi.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_vi.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_vi.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_vi.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_vi.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,1197 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+
+ return 1;
+}
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_xenbus.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_xenbus.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_xenbus.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_xenbus.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_xenbus.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,776 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/ef_vi_falcon.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/ef_vi_falcon.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/ef_vi_falcon.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,172 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+
+
+#endif /* __EF_VI_FALCON_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/ef_vi_falcon_core.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon_core.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon_core.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/ef_vi_falcon_core.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/ef_vi_falcon_core.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,1075 @@
+
+#define EFVI_FALCON_EXTENDED_P_BAR 1
+#define EE_VPD_SW_DATA_REG_OFST 0x160 // VPD access SW data register
+ #define EE_VPD_CYC_DAT_LBN 0
+ #define EE_VPD_CYC_DAT_WIDTH 32
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/ef_vi_falcon_desc.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon_desc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon_desc.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/ef_vi_falcon_desc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/ef_vi_falcon_desc.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,43 @@
+//////////////---- Descriptors C Headers ----//////////////
+// Receive Kernel IP Descriptor
+ #define TX_USR_BUF_ID_WIDTH 20
+ #define TX_USR_BYTE_OFS_LBN 0
+ #define TX_USR_BYTE_OFS_WIDTH 13
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/ef_vi_falcon_event.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon_event.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon_event.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/ef_vi_falcon_event.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/ef_vi_falcon_event.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,123 @@
+//////////////---- Events Format C Header ----//////////////
+//////////////---- Event entry ----//////////////
+ #define DRV_GEN_EV_CODE_WIDTH 4
+ #define DRV_GEN_EV_DATA_LBN 0
+ #define DRV_GEN_EV_DATA_WIDTH 60
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/ef_vi_internal.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_internal.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_internal.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/ef_vi_internal.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/ef_vi_internal.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,256 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+
+#endif /* __CI_EF_VI_INTERNAL_H__ */
+
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/etherfabric/ef_vi.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/etherfabric/ef_vi.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/etherfabric/ef_vi.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/etherfabric/ef_vi.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/etherfabric/ef_vi.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,665 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+
+
+#endif /* __EFAB_EF_VI_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/falcon_event.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/falcon_event.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/falcon_event.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/falcon_event.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/falcon_event.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,346 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+}
+
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/falcon_vi.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/falcon_vi.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/falcon_vi.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/falcon_vi.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/falcon_vi.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,465 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+}
+
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/pt_tx.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/pt_tx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/pt_tx.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/pt_tx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/pt_tx.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,91 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+}
+
+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/sysdep.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/sysdep.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/sysdep.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/sysdep.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/sysdep.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,184 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+#endif
+
+#endif /* __CI_CIUL_SYSDEP_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/vi_init.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/vi_init.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/vi_init.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/vi_init.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/vi_init.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,183 @@
+/****************************************************************************
+ * Copyright 2002-2005: Level 5 Networks Inc.
+ vm->tx_dma_falcon = iobuf_mmap_tx;
+ vm->tx_bell = (char*) io_mmap + (TX_DESC_UPD_REG_KER_OFST & 4095);
+}
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/Makefile linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/Makefile Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,11 @@
+EXTRA_CFLAGS += -Idrivers/xen/sfc_netutil
+EXTRA_CFLAGS += -Werror
+
+sfc_netutil-objs := accel_cuckoo_hash.o accel_msg_iface.o accel_util.o
+
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_cuckoo_hash.c linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_cuckoo_hash.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_cuckoo_hash.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/accel_cuckoo_hash.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/accel_cuckoo_hash.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,651 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+}
+EXPORT_SYMBOL_GPL(cuckoo_hash_dump);
+#endif
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_cuckoo_hash.h linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_cuckoo_hash.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_cuckoo_hash.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/accel_cuckoo_hash.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/accel_cuckoo_hash.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,227 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+void cuckoo_hash_dump(cuckoo_hash_table *hashtab);
+
+#endif /* NET_ACCEL_CUCKOO_HASH_H */
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_msg_iface.c linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_msg_iface.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_msg_iface.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/accel_msg_iface.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/accel_msg_iface.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,301 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+ notify_remote_via_irq(irq);
+}
+EXPORT_SYMBOL_GPL(net_accel_msg_complete_send_notify);
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_msg_iface.h linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_msg_iface.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_msg_iface.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/accel_msg_iface.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/accel_msg_iface.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,414 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+}
+
+#endif /* NET_ACCEL_MSG_IFACE_H */
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_shared_fifo.h linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_shared_fifo.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_shared_fifo.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/accel_shared_fifo.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/accel_shared_fifo.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,127 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+
+
+#endif /* NET_ACCEL_SHARED_FIFO_H */
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_util.c linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_util.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_util.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/accel_util.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/accel_util.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,333 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+EXPORT_SYMBOL_GPL(net_accel_update_state);
+
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_util.h linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_util.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_util.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/accel_util.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/accel_util.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,124 @@
+/****************************************************************************
+ * Solarflare driver for Xen network acceleration
+
+
+#endif
-diff -purN linux-2.6.27/drivers/xen/tpmback/Makefile linux-2.6.27.19-5.1/drivers/xen/tpmback/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/tpmback/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/tpmback/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/tpmback/Makefile Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,4 @@
+
+obj-$(CONFIG_XEN_TPMDEV_BACKEND) += tpmbk.o
+
+tpmbk-y += tpmback.o interface.o xenbus.o
-diff -purN linux-2.6.27/drivers/xen/tpmback/common.h linux-2.6.27.19-5.1/drivers/xen/tpmback/common.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/tpmback/common.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/tpmback/common.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/tpmback/common.h Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,85 @@
+/******************************************************************************
+ * drivers/xen/tpmback/common.h
+}
+
+#endif /* __TPMIF__BACKEND__COMMON_H__ */
-diff -purN linux-2.6.27/drivers/xen/tpmback/interface.c linux-2.6.27.19-5.1/drivers/xen/tpmback/interface.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/tpmback/interface.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/tpmback/interface.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/tpmback/interface.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,170 @@
+ /*****************************************************************************
+ * drivers/xen/tpmback/interface.c
+{
+ kmem_cache_destroy(tpmif_cachep);
+}
-diff -purN linux-2.6.27/drivers/xen/tpmback/tpmback.c linux-2.6.27.19-5.1/drivers/xen/tpmback/tpmback.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/tpmback/tpmback.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/tpmback/tpmback.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/tpmback/tpmback.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,952 @@
+/******************************************************************************
+ * drivers/xen/tpmback/tpmback.c
+module_exit(tpmback_exit)
+
+MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/tpmback/xenbus.c linux-2.6.27.19-5.1/drivers/xen/tpmback/xenbus.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/tpmback/xenbus.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/tpmback/xenbus.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/tpmback/xenbus.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,288 @@
+/* Xenbus code for tpmif backend
+ Copyright (C) 2005 IBM Corporation
+{
+ xenbus_unregister_driver(&tpmback);
+}
-diff -purN linux-2.6.27/drivers/xen/util.c linux-2.6.27.19-5.1/drivers/xen/util.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/util.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/util.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/util.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,20 @@
+#include <linux/err.h>
+#include <linux/module.h>
+ return xen_class;
+}
+EXPORT_SYMBOL_GPL(get_xen_class);
-diff -purN linux-2.6.27/drivers/xen/xenbus/Makefile linux-2.6.27.19-5.1/drivers/xen/xenbus/Makefile
---- linux-2.6.27/drivers/xen/xenbus/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/Makefile
+--- a/drivers/xen/xenbus/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/xenbus/Makefile Wed May 06 16:56:46 2009 +0100
@@ -1,7 +1,9 @@
-obj-y += xenbus.o
+obj-y += xenbus_client.o xenbus_comms.o xenbus_xs.o xenbus_probe.o
+xenbus-$(CONFIG_XEN_BACKEND) += xenbus_probe_backend.o
+obj-y += $(xenbus-y) $(xenbus-m)
+obj-$(CONFIG_XEN_XENBUS_DEV) += xenbus_dev.o
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_backend_client.c linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_backend_client.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_backend_client.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_backend_client.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/xenbus/xenbus_backend_client.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,147 @@
+/******************************************************************************
+ * Backend-client-facing interface for the Xenbus driver. In other words, the
+EXPORT_SYMBOL_GPL(xenbus_dev_is_online);
+
+MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_client.c linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_client.c
---- linux-2.6.27/drivers/xen/xenbus/xenbus_client.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_client.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_client.c
+--- a/drivers/xen/xenbus/xenbus_client.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/xenbus/xenbus_client.c Wed May 06 16:56:46 2009 +0100
@@ -30,6 +30,12 @@
* IN THE SOFTWARE.
*/
#include <linux/types.h>
#include <linux/vmalloc.h>
#include <asm/xen/hypervisor.h>
-@@ -37,8 +43,13 @@
+@@ -37,7 +43,12 @@
#include <xen/interface/event_channel.h>
#include <xen/events.h>
#include <xen/grant_table.h>
+#endif
#include <xen/xenbus.h>
-
++
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
+#include <xen/platform-compat.h>
+#endif
-+
+
const char *xenbus_strstate(enum xenbus_state state)
{
- static const char *const name[] = {
-@@ -91,6 +102,26 @@ int xenbus_watch_path(struct xenbus_devi
+@@ -91,6 +102,26 @@
EXPORT_SYMBOL_GPL(xenbus_watch_path);
/**
* xenbus_watch_pathfmt - register a watch on a sprintf-formatted path
* @dev: xenbus device
-@@ -117,7 +148,7 @@ int xenbus_watch_pathfmt(struct xenbus_d
+@@ -117,7 +148,7 @@
char *path;
va_start(ap, pathfmt);
va_end(ap);
if (!path) {
-@@ -131,6 +162,7 @@ int xenbus_watch_pathfmt(struct xenbus_d
+@@ -131,6 +162,7 @@
return err;
}
EXPORT_SYMBOL_GPL(xenbus_watch_pathfmt);
/**
-@@ -201,13 +233,12 @@ static char *error_path(struct xenbus_de
+@@ -201,13 +233,12 @@
}
#define PRINTF_BUFFER_SIZE 4096
printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_KERNEL);
-@@ -224,20 +255,24 @@ static void xenbus_va_dev_error(struct x
+@@ -224,20 +255,24 @@
path_buffer = error_path(dev);
if (path_buffer == NULL) {
}
-@@ -250,16 +285,18 @@ fail:
+@@ -250,15 +285,17 @@
* Report the given negative errno into the store, along with the given
* formatted message.
*/
va_end(ap);
}
EXPORT_SYMBOL_GPL(xenbus_dev_error);
-
+
+
/**
* xenbus_dev_fatal
- * @dev: xenbus device
-@@ -270,24 +307,25 @@ EXPORT_SYMBOL_GPL(xenbus_dev_error);
+@@ -270,24 +307,25 @@
* xenbus_switch_state(dev, NULL, XenbusStateClosing) to schedule an orderly
* closedown of this driver and its peer.
*/
* Grant access to the given @ring_mfn to the peer of the given device. Return
* 0 on success, or -errno on error. On error, the device will switch to
* XenbusStateClosing, and the error will be saved in the store.
-@@ -313,7 +351,7 @@ int xenbus_alloc_evtchn(struct xenbus_de
+@@ -313,7 +351,7 @@
struct evtchn_alloc_unbound alloc_unbound;
int err;
alloc_unbound.remote_dom = dev->otherend_id;
err = HYPERVISOR_event_channel_op(EVTCHNOP_alloc_unbound,
-@@ -328,6 +366,7 @@ int xenbus_alloc_evtchn(struct xenbus_de
+@@ -328,6 +366,7 @@
EXPORT_SYMBOL_GPL(xenbus_alloc_evtchn);
/**
* Bind to an existing interdomain event channel in another domain. Returns 0
* on success and stores the local port in *port. On error, returns -errno,
-@@ -353,6 +392,7 @@ int xenbus_bind_evtchn(struct xenbus_dev
+@@ -353,6 +392,7 @@
return err;
}
EXPORT_SYMBOL_GPL(xenbus_bind_evtchn);
/**
-@@ -374,6 +414,7 @@ int xenbus_free_evtchn(struct xenbus_dev
+@@ -374,6 +414,7 @@
EXPORT_SYMBOL_GPL(xenbus_free_evtchn);
/**
* xenbus_map_ring_valloc
* @dev: xenbus device
-@@ -548,6 +589,7 @@ int xenbus_unmap_ring(struct xenbus_devi
+@@ -548,6 +589,7 @@
return op.status;
}
EXPORT_SYMBOL_GPL(xenbus_unmap_ring);
/**
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_comms.c linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_comms.c
---- linux-2.6.27/drivers/xen/xenbus/xenbus_comms.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_comms.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_comms.c
+--- a/drivers/xen/xenbus/xenbus_comms.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/xenbus/xenbus_comms.c Wed May 06 16:56:46 2009 +0100
@@ -35,13 +35,25 @@
#include <linux/sched.h>
#include <linux/err.h>
+#endif
+
#include "xenbus_comms.h"
-
++
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
+#include <xen/platform-compat.h>
+#endif
-+
+
static int xenbus_irq;
+extern void xenbus_probe(struct work_struct *);
static DECLARE_WORK(probe_work, xenbus_probe);
static DECLARE_WAIT_QUEUE_HEAD(xb_waitq);
-@@ -203,6 +215,7 @@ int xb_read(void *data, unsigned len)
+@@ -203,6 +215,7 @@
int xb_init_comms(void)
{
struct xenstore_domain_interface *intf = xen_store_interface;
if (intf->req_prod != intf->req_cons)
printk(KERN_ERR "XENBUS request ring is not quiescent "
-@@ -215,20 +228,33 @@ int xb_init_comms(void)
+@@ -215,20 +228,33 @@
intf->rsp_cons = intf->rsp_prod;
}
return 0;
}
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_dev.c linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_dev.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_dev.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_dev.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/xenbus/xenbus_dev.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,408 @@
+/*
+ * xenbus_dev.c
+
+ return 0;
+}
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_probe.c
---- linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_probe.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_probe.c
+--- a/drivers/xen/xenbus/xenbus_probe.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/xenbus/xenbus_probe.c Wed May 06 16:56:46 2009 +0100
@@ -4,6 +4,7 @@
* Copyright (C) 2005 Rusty Russell, IBM Corporation
* Copyright (C) 2005 Mike Wray, Hewlett-Packard
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2
-@@ -32,33 +33,50 @@
+@@ -32,32 +33,49 @@
#define DPRINTK(fmt, args...) \
pr_debug("xenbus_probe (%s:%d) " fmt ".\n", \
int xen_store_evtchn;
struct xenstore_domain_interface *xen_store_interface;
static unsigned long xen_store_mfn;
-
-+extern struct mutex xenwatch_mutex;
+
++extern struct mutex xenwatch_mutex;
+
static BLOCKING_NOTIFIER_HEAD(xenstore_chain);
- static void wait_for_devices(struct xenbus_driver *xendrv);
-@@ -88,16 +106,6 @@ int xenbus_match(struct device *_dev, st
+@@ -88,16 +106,6 @@
return match_device(drv->ids, to_xenbus_device(_dev)) != NULL;
}
/* device/<type>/<id> => <type>-<id> */
static int frontend_bus_id(char bus_id[BUS_ID_SIZE], const char *nodename)
{
-@@ -166,6 +174,27 @@ static int read_backend_details(struct x
+@@ -166,6 +174,27 @@
return read_otherend_details(xendev, "backend-id", "backend");
}
/* Bus type for frontend drivers. */
static struct xen_bus_type xenbus_frontend = {
-@@ -173,14 +202,22 @@ static struct xen_bus_type xenbus_fronte
+@@ -173,14 +202,22 @@
.levels = 2, /* device/type/<id> */
.get_bus_id = frontend_bus_id,
.probe = xenbus_probe_frontend,
.shutdown = xenbus_dev_shutdown,
+ .uevent = xenbus_uevent_frontend,
+#endif
-+ },
+ },
+#if defined(CONFIG_XEN) || defined(MODULE)
+ .dev = {
+ .bus_id = "xen",
- },
++ },
+#endif
};
static void otherend_changed(struct xenbus_watch *watch,
-@@ -196,17 +233,17 @@ static void otherend_changed(struct xenb
+@@ -196,17 +233,17 @@
if (!dev->otherend ||
strncmp(dev->otherend, vec[XS_WATCH_PATH],
strlen(dev->otherend))) {
/*
* Ignore xenbus transitions during shutdown. This prevents us doing
* work that can fail e.g., when the rootfs is gone.
-@@ -220,6 +257,7 @@ static void otherend_changed(struct xenb
+@@ -220,6 +257,7 @@
xenbus_frontend_closed(dev);
return;
}
if (drv->otherend_changed)
drv->otherend_changed(dev, state);
-@@ -239,8 +277,13 @@ static int talk_to_otherend(struct xenbu
+@@ -239,8 +277,13 @@
static int watch_otherend(struct xenbus_device *dev)
{
}
-@@ -266,8 +309,9 @@ int xenbus_dev_probe(struct device *_dev
+@@ -266,8 +309,9 @@
err = talk_to_otherend(dev);
if (err) {
return err;
}
-@@ -277,8 +321,9 @@ int xenbus_dev_probe(struct device *_dev
+@@ -277,8 +321,9 @@
err = watch_otherend(dev);
if (err) {
return err;
}
-@@ -313,17 +358,20 @@ static void xenbus_dev_shutdown(struct d
+@@ -313,17 +358,20 @@
DPRINTK("%s", dev->nodename);
out:
put_device(&dev->dev);
}
-@@ -333,12 +381,29 @@ int xenbus_register_driver_common(struct
+@@ -333,12 +381,29 @@
struct module *owner,
const char *mod_name)
{
}
int __xenbus_register_frontend(struct xenbus_driver *drv,
-@@ -436,21 +501,30 @@ static void xenbus_dev_release(struct de
+@@ -436,21 +501,30 @@
}
static ssize_t xendev_show_nodename(struct device *dev,
{
return sprintf(buf, "xen:%s\n", to_xenbus_device(dev)->devicetype);
}
-@@ -467,6 +541,9 @@ int xenbus_probe_node(struct xen_bus_typ
+@@ -466,6 +540,9 @@
+ char *tmpstring;
enum xenbus_state state = xenbus_read_driver_state(nodename);
-
++
+ if (bus->error)
+ return bus->error;
-+
+
if (state != XenbusStateInitialising) {
/* Device is not new, so ignore it. This can happen if a
- device is going away after switching to Closed. */
-@@ -491,6 +568,9 @@ int xenbus_probe_node(struct xen_bus_typ
+@@ -491,6 +568,9 @@
xendev->devicetype = tmpstring;
init_completion(&xendev->down);
xendev->dev.bus = &bus->bus;
xendev->dev.release = xenbus_dev_release;
-@@ -571,6 +651,9 @@ int xenbus_probe_devices(struct xen_bus_
+@@ -571,6 +651,9 @@
char **dir;
unsigned int i, dir_n;
dir = xenbus_directory(XBT_NIL, bus->root, "", &dir_n);
if (IS_ERR(dir))
return PTR_ERR(dir);
-@@ -614,7 +697,7 @@ void xenbus_dev_changed(const char *node
+@@ -614,7 +697,7 @@
char type[BUS_ID_SIZE];
const char *p, *root;
return;
exists = xenbus_exists(XBT_NIL, node, "");
-@@ -748,7 +831,8 @@ void xenbus_suspend(void)
+@@ -748,7 +831,8 @@
{
DPRINTK("");
xenbus_backend_suspend(suspend_dev);
xs_suspend();
}
-@@ -758,7 +842,8 @@ void xenbus_resume(void)
+@@ -758,7 +842,8 @@
{
xb_init_comms();
xs_resume();
xenbus_backend_resume(resume_dev);
}
EXPORT_SYMBOL_GPL(xenbus_resume);
-@@ -766,7 +851,8 @@ EXPORT_SYMBOL_GPL(xenbus_resume);
+@@ -766,7 +851,8 @@
void xenbus_suspend_cancel(void)
{
xs_suspend_cancel();
xenbus_backend_resume(suspend_cancel_dev);
}
EXPORT_SYMBOL_GPL(xenbus_suspend_cancel);
-@@ -794,6 +880,7 @@ void unregister_xenstore_notifier(struct
+@@ -794,6 +880,7 @@
}
EXPORT_SYMBOL_GPL(unregister_xenstore_notifier);
void xenbus_probe(struct work_struct *unused)
{
BUG_ON((xenstored_ready <= 0));
-@@ -807,63 +894,191 @@ void xenbus_probe(struct work_struct *un
+@@ -807,63 +894,191 @@
blocking_notifier_call_chain(&xenstore_chain, 0, NULL);
}
- goto out_unreg_back;
+ goto err;
}
-
++
+#if defined(CONFIG_XEN) || defined(MODULE)
+ /* Register ourselves with the kernel device subsystem */
+ if (!xenbus_frontend.error) {
+ }
+#endif
+ xenbus_backend_device_register();
-+
+
if (!is_initial_xendomain())
xenbus_probe(NULL);
static int is_disconnected_device(struct device *dev, void *data)
{
-@@ -883,12 +1098,14 @@ static int is_disconnected_device(struct
+@@ -883,12 +1098,14 @@
return 0;
xendrv = to_xenbus_driver(dev->driver);
return bus_for_each_dev(&xenbus_frontend.bus, NULL, drv,
is_disconnected_device);
}
-@@ -897,6 +1114,7 @@ static int print_device_status(struct de
+@@ -897,6 +1114,7 @@
{
struct xenbus_device *xendev = to_xenbus_device(dev);
struct device_driver *drv = data;
/* Is this operation limited to a particular driver? */
if (drv && (dev->driver != drv))
-@@ -906,12 +1124,23 @@ static int print_device_status(struct de
+@@ -906,11 +1124,22 @@
/* Information only: is this too noisy? */
printk(KERN_INFO "XENBUS: Device with no driver: %s\n",
xendev->nodename);
+ "to device: %s (local state %d, remote state %d)\n",
+ xendev->nodename, xendev->state, rstate);
}
-
++
+ xendrv = to_xenbus_driver(dev->driver);
+ if (xendrv->is_ready && !xendrv->is_ready(xendev))
+ printk(KERN_WARNING "XENBUS: Device not ready: %s\n",
+ xendev->nodename);
-+
+
return 0;
}
-
-@@ -919,7 +1148,7 @@ static int print_device_status(struct de
+@@ -919,7 +1148,7 @@
static int ready_to_wait_for_devices;
/*
* to do this to guarantee that the filesystems and / or network devices
* needed for boot are available, before we can allow the boot to proceed.
*
-@@ -934,18 +1163,30 @@ static int ready_to_wait_for_devices;
+@@ -934,17 +1163,29 @@
*/
static void wait_for_devices(struct xenbus_driver *xendrv)
{
+
schedule_timeout_interruptible(HZ/10);
}
-
++
+ if (seconds_waited)
+ printk("\n");
-+
+
bus_for_each_dev(&xenbus_frontend.bus, NULL, drv,
print_device_status);
- }
-@@ -953,10 +1194,18 @@ static void wait_for_devices(struct xenb
+@@ -953,10 +1194,18 @@
#ifndef MODULE
static int __init boot_wait_for_devices(void)
{
+ return bus_for_each_dev(&xenbus_frontend.bus, NULL, arg, fn);
+}
+EXPORT_SYMBOL_GPL(xenbus_for_each_frontend);
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.h linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_probe.h
---- linux-2.6.27/drivers/xen/xenbus/xenbus_probe.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_probe.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_probe.h
+--- a/drivers/xen/xenbus/xenbus_probe.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/xenbus/xenbus_probe.h Wed May 06 16:56:46 2009 +0100
@@ -34,27 +34,31 @@
#ifndef _XENBUS_PROBE_H
#define _XENBUS_PROBE_H
};
extern int xenbus_match(struct device *_dev, struct device_driver *_drv);
-@@ -72,3 +76,4 @@ extern int xenbus_probe_devices(struct x
+@@ -72,3 +76,4 @@
extern void xenbus_dev_changed(const char *node, struct xen_bus_type *bus);
#endif
+
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe_backend.c linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_probe_backend.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_probe_backend.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_probe_backend.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/xenbus/xenbus_probe_backend.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,279 @@
+/******************************************************************************
+ * Talks to Xen Store to figure out what devices we have (backend half).
+ return bus_for_each_dev(&xenbus_backend.bus, NULL, arg, fn);
+}
+EXPORT_SYMBOL_GPL(xenbus_for_each_backend);
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_xs.c linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_xs.c
---- linux-2.6.27/drivers/xen/xenbus/xenbus_xs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_xs.c 2009-03-25 16:11:22.000000000 +0000
-@@ -47,6 +47,14 @@
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_xs.c
+--- a/drivers/xen/xenbus/xenbus_xs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/xenbus/xenbus_xs.c Wed May 06 16:56:46 2009 +0100
+@@ -46,6 +46,14 @@
+ #include <linux/mutex.h>
#include <xen/xenbus.h>
#include "xenbus_comms.h"
-
++
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
+#include <xen/platform-compat.h>
+#endif
+#ifndef PF_NOFREEZE /* Old kernel (pre-2.6.6). */
+#define PF_NOFREEZE 0
+#endif
-+
+
struct xs_stored_msg {
struct list_head list;
-
-@@ -108,7 +116,7 @@ static DEFINE_SPINLOCK(watch_events_lock
+@@ -108,7 +116,7 @@
* carrying out work.
*/
static pid_t xenwatch_pid;
static DECLARE_WAIT_QUEUE_HEAD(watch_events_waitq);
static int get_error(const char *errorstring)
-@@ -177,7 +185,7 @@ void *xenbus_dev_request_and_reply(struc
+@@ -177,7 +185,7 @@
mutex_unlock(&xs_state.request_mutex);
((req_msg.type == XS_TRANSACTION_START) &&
(msg->type == XS_ERROR)))
up_read(&xs_state.transaction_mutex);
-@@ -294,7 +302,7 @@ static char **split(char *strings, unsig
+@@ -294,7 +302,7 @@
char *p, **ret;
/* Count the strings. */
/* Transfer to one big alloc for easy freeing. */
ret = kmalloc(*num * sizeof(char *) + len, GFP_NOIO | __GFP_HIGH);
-@@ -308,6 +316,7 @@ static char **split(char *strings, unsig
+@@ -308,6 +316,7 @@
strings = (char *)&ret[*num];
for (p = strings, *num = 0; p < strings + len; p += strlen(p) + 1)
ret[(*num)++] = p;
return ret;
}
-@@ -498,7 +507,7 @@ int xenbus_printf(struct xenbus_transact
+@@ -498,7 +507,7 @@
#define PRINTF_BUFFER_SIZE 4096
char *printf_buffer;
if (printf_buffer == NULL)
return -ENOMEM;
-@@ -621,6 +630,10 @@ void unregister_xenbus_watch(struct xenb
+@@ -621,6 +630,10 @@
char token[sizeof(watch) * 2 + 1];
int err;
sprintf(token, "%lX", (long)watch);
down_read(&xs_state.watch_mutex);
-@@ -693,11 +706,32 @@ void xs_suspend_cancel(void)
+@@ -693,11 +706,32 @@
up_write(&xs_state.transaction_mutex);
}
for (;;) {
wait_event_interruptible(watch_events_waitq,
!list_empty(&watch_events));
-@@ -713,17 +747,39 @@ static int xenwatch_thread(void *unused)
+@@ -713,17 +747,39 @@
list_del(ent);
spin_unlock(&watch_events_lock);
}
return 0;
-@@ -817,6 +873,7 @@ static int xenbus_thread(void *unused)
+@@ -817,6 +873,7 @@
{
int err;
for (;;) {
err = process_msg();
if (err)
-diff -purN linux-2.6.27/drivers/xen/xenoprof/xenoprofile.c linux-2.6.27.19-5.1/drivers/xen/xenoprof/xenoprofile.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenoprof/xenoprofile.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenoprof/xenoprofile.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/xenoprof/xenoprofile.c Wed May 06 16:56:46 2009 +0100
@@ -0,0 +1,544 @@
+/**
+ * @file xenoprofile.c
+ WARN_ON(HYPERVISOR_xenoprof_op(XENOPROF_shutdown, NULL));
+ }
+}
-diff -purN linux-2.6.27/fs/Kconfig linux-2.6.27.19-5.1/fs/Kconfig
---- linux-2.6.27/fs/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/Kconfig 2009-03-25 16:11:36.000000000 +0000
-@@ -124,6 +124,13 @@ config EXT3_FS_POSIX_ACL
+diff -r 9608d5473017 fs/Kconfig
+--- a/fs/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/fs/Kconfig Wed May 06 16:56:46 2009 +0100
+@@ -124,6 +124,13 @@
If you don't know what Access Control Lists are, say N
config EXT3_FS_SECURITY
bool "Ext3 Security Labels"
depends on EXT3_FS_XATTR
-@@ -206,17 +213,16 @@ config JBD
+@@ -206,17 +213,16 @@
tristate
help
This is a generic journalling layer for block devices. It is
config JBD_DEBUG
bool "JBD (ext3) debugging support"
-@@ -240,16 +246,17 @@ config JBD2
+@@ -240,16 +246,17 @@
help
This is a generic journaling layer for block devices that support
both 32-bit and 64-bit block numbers. It is currently used by
config JBD2_DEBUG
bool "JBD2 (ext4dev/ext4) debugging support"
-@@ -419,6 +426,10 @@ config FS_POSIX_ACL
+@@ -419,6 +426,10 @@
bool
default n
source "fs/xfs/Kconfig"
source "fs/gfs2/Kconfig"
-@@ -426,7 +437,7 @@ config OCFS2_FS
+@@ -426,7 +437,7 @@
tristate "OCFS2 file system support"
depends on NET && SYSFS
select CONFIGFS_FS
select CRC32
help
OCFS2 is a general purpose extent based shared disk cluster file
-@@ -497,6 +508,16 @@ config OCFS2_DEBUG_FS
+@@ -497,6 +508,16 @@
this option for debugging only as it is likely to decrease
performance of the filesystem.
endif # BLOCK
config DNOTIFY
-@@ -538,6 +559,25 @@ config INOTIFY_USER
+@@ -538,6 +559,25 @@
If unsure, say Y.
config QUOTA
bool "Quota support"
help
-@@ -569,6 +609,10 @@ config PRINT_QUOTA_WARNING
+@@ -569,6 +609,10 @@
Note that this behavior is currently deprecated and may go away in
future. Please use notification via netlink socket instead.
config QFMT_V1
tristate "Old quota format support"
depends on QUOTA
-@@ -580,6 +624,7 @@ config QFMT_V1
+@@ -580,6 +624,7 @@
config QFMT_V2
tristate "Quota format v2 support"
depends on QUOTA
help
This quota format allows using quotas with 32-bit UIDs/GIDs. If you
need this functionality say Y here.
-@@ -957,6 +1002,7 @@ config HUGETLBFS
+@@ -957,6 +1002,7 @@
bool "HugeTLB file system support"
depends on X86 || IA64 || PPC64 || SPARC64 || (SUPERH && MMU) || \
(S390 && 64BIT) || BROKEN
help
hugetlbfs is a filesystem backing for HugeTLB pages, based on
ramfs. For architectures that support it, say Y here and read
-@@ -1348,6 +1394,56 @@ config CRAMFS
+@@ -1348,6 +1394,56 @@
If unsure, say N.
config VXFS_FS
tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)"
depends on BLOCK
-@@ -1644,6 +1740,18 @@ config ROOT_NFS
+@@ -1644,6 +1740,18 @@
Most people say N here.
config NFSD
tristate "NFS server support"
depends on INET
-@@ -1765,6 +1873,11 @@ config SUNRPC_XPRT_RDMA
+@@ -1764,6 +1872,11 @@
+ choose M here: the module will be called xprtrdma.
If unsure, say N.
-
++
+config SUNRPC_SWAP
+ def_bool n
+ depends on SUNRPC
+ select NETVM
-+
+
config RPCSEC_GSS_KRB5
tristate "Secure RPC: Kerberos V mechanism (EXPERIMENTAL)"
- depends on SUNRPC && EXPERIMENTAL
-@@ -2080,6 +2193,15 @@ config 9P_FS
+@@ -2080,6 +2193,15 @@
If unsure, say N.
endif # NETWORK_FILESYSTEMS
if BLOCK
-diff -purN linux-2.6.27/fs/Makefile linux-2.6.27.19-5.1/fs/Makefile
---- linux-2.6.27/fs/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/Makefile 2009-03-25 16:11:38.000000000 +0000
-@@ -50,11 +50,18 @@ obj-$(CONFIG_FS_POSIX_ACL) += posix_acl.
+diff -r 9608d5473017 fs/Makefile
+--- a/fs/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/fs/Makefile Wed May 06 16:56:46 2009 +0100
+@@ -50,10 +50,17 @@
obj-$(CONFIG_NFS_COMMON) += nfs_common/
obj-$(CONFIG_GENERIC_ACL) += generic_acl.o
obj-$(CONFIG_QFMT_V2) += quota_v2.o
+obj-$(CONFIG_QUOTA_TREE) += quota_tree.o
obj-$(CONFIG_QUOTACTL) += quota.o
-
-+obj-$(CONFIG_DMAPI) += dmapi/
+
++obj-$(CONFIG_DMAPI) += dmapi/
+
obj-$(CONFIG_DNOTIFY) += dnotify.o
- obj-$(CONFIG_PROC_FS) += proc/
-@@ -74,6 +81,7 @@ obj-$(CONFIG_JBD) += jbd/
+@@ -74,6 +81,7 @@
obj-$(CONFIG_JBD2) += jbd2/
obj-$(CONFIG_EXT2_FS) += ext2/
obj-$(CONFIG_CRAMFS) += cramfs/
obj-y += ramfs/
obj-$(CONFIG_HUGETLBFS) += hugetlbfs/
obj-$(CONFIG_CODA_FS) += coda/
-@@ -122,3 +130,4 @@ obj-$(CONFIG_HPPFS) += hppfs/
+@@ -122,3 +130,4 @@
obj-$(CONFIG_DEBUG_FS) += debugfs/
obj-$(CONFIG_OCFS2_FS) += ocfs2/
obj-$(CONFIG_GFS2_FS) += gfs2/
+obj-$(CONFIG_NOVFS) += novfs/
-diff -purN linux-2.6.27/fs/affs/file.c linux-2.6.27.19-5.1/fs/affs/file.c
---- linux-2.6.27/fs/affs/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/affs/file.c 2009-03-25 16:11:36.000000000 +0000
-@@ -628,7 +628,7 @@ static int affs_write_begin_ofs(struct f
+diff -r 9608d5473017 fs/affs/file.c
+--- a/fs/affs/file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/affs/file.c Wed May 06 16:56:46 2009 +0100
+@@ -628,7 +628,7 @@
}
index = pos >> PAGE_CACHE_SHIFT;
if (!page)
return -ENOMEM;
*pagep = page;
-diff -purN linux-2.6.27/fs/afs/dir.c linux-2.6.27.19-5.1/fs/afs/dir.c
---- linux-2.6.27/fs/afs/dir.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/afs/dir.c 2009-03-25 16:11:39.000000000 +0000
-@@ -45,6 +45,7 @@ const struct file_operations afs_dir_fil
+diff -r 9608d5473017 fs/afs/dir.c
+--- a/fs/afs/dir.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/afs/dir.c Wed May 06 16:56:46 2009 +0100
+@@ -45,6 +45,7 @@
.release = afs_release,
.readdir = afs_readdir,
.lock = afs_lock,
};
const struct inode_operations afs_dir_inode_operations = {
-diff -purN linux-2.6.27/fs/afs/file.c linux-2.6.27.19-5.1/fs/afs/file.c
---- linux-2.6.27/fs/afs/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/afs/file.c 2009-03-25 16:11:39.000000000 +0000
-@@ -36,6 +36,7 @@ const struct file_operations afs_file_op
+diff -r 9608d5473017 fs/afs/file.c
+--- a/fs/afs/file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/afs/file.c Wed May 06 16:56:46 2009 +0100
+@@ -36,6 +36,7 @@
.fsync = afs_fsync,
.lock = afs_lock,
.flock = afs_flock,
};
const struct inode_operations afs_file_inode_operations = {
-diff -purN linux-2.6.27/fs/afs/inode.c linux-2.6.27.19-5.1/fs/afs/inode.c
---- linux-2.6.27/fs/afs/inode.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/afs/inode.c 2009-03-25 16:11:39.000000000 +0000
-@@ -358,7 +358,8 @@ void afs_clear_inode(struct inode *inode
+diff -r 9608d5473017 fs/afs/inode.c
+--- a/fs/afs/inode.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/afs/inode.c Wed May 06 16:56:46 2009 +0100
+@@ -358,7 +358,8 @@
/*
* set the attributes of an inode
*/
{
struct afs_vnode *vnode = AFS_FS_I(dentry->d_inode);
struct key *key;
-@@ -380,8 +381,8 @@ int afs_setattr(struct dentry *dentry, s
+@@ -380,8 +381,8 @@
afs_writeback_all(vnode);
}
} else {
key = afs_request_key(vnode->volume->cell);
if (IS_ERR(key)) {
-@@ -391,10 +392,20 @@ int afs_setattr(struct dentry *dentry, s
+@@ -391,10 +392,20 @@
}
ret = afs_vnode_setattr(vnode, key, attr);
+{
+ return afs_do_setattr(file->f_path.dentry, attr, file);
+}
-diff -purN linux-2.6.27/fs/afs/internal.h linux-2.6.27.19-5.1/fs/afs/internal.h
---- linux-2.6.27/fs/afs/internal.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/afs/internal.h 2009-03-25 16:11:39.000000000 +0000
-@@ -548,6 +548,7 @@ extern void afs_zap_data(struct afs_vnod
+diff -r 9608d5473017 fs/afs/internal.h
+--- a/fs/afs/internal.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/afs/internal.h Wed May 06 16:56:46 2009 +0100
+@@ -548,6 +548,7 @@
extern int afs_validate(struct afs_vnode *, struct key *);
extern int afs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
extern int afs_setattr(struct dentry *, struct iattr *);
extern void afs_clear_inode(struct inode *);
/*
-diff -purN linux-2.6.27/fs/aio.c linux-2.6.27.19-5.1/fs/aio.c
---- linux-2.6.27/fs/aio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/aio.c 2009-03-25 16:11:39.000000000 +0000
-@@ -36,6 +36,11 @@
+diff -r 9608d5473017 fs/aio.c
+--- a/fs/aio.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/aio.c Wed May 06 16:56:46 2009 +0100
+@@ -35,6 +35,11 @@
+ #include <asm/kmap_types.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
-
++
+#ifdef CONFIG_EPOLL
+#include <linux/poll.h>
+#include <linux/anon_inodes.h>
+#endif
-+
+
#if DEBUG > 1
#define dprintk printk
- #else
-@@ -1010,6 +1015,11 @@ put_rq:
+@@ -1010,6 +1015,11 @@
if (waitqueue_active(&ctx->wait))
wake_up(&ctx->wait);
spin_unlock_irqrestore(&ctx->ctx_lock, flags);
return ret;
}
-@@ -1017,6 +1027,8 @@ put_rq:
+@@ -1017,6 +1027,8 @@
/* aio_read_evt
* Pull an event off of the ioctx's event ring. Returns the number of
* events fetched (0 or 1 ;-)
* FIXME: make this use cmpxchg.
* TODO: make the ringbuffer user mmap()able (requires FIXME).
*/
-@@ -1039,13 +1051,18 @@ static int aio_read_evt(struct kioctx *i
+@@ -1039,13 +1051,18 @@
head = ring->head % info->nr;
if (head != ring->tail) {
}
spin_unlock(&info->ring_lock);
-@@ -1235,6 +1252,14 @@ static void io_destroy(struct kioctx *io
+@@ -1235,6 +1252,14 @@
aio_cancel_all(ioctx);
wait_for_all_aios(ioctx);
/*
* Wake up any waiters. The setting of ctx->dead must be seen
-@@ -1245,6 +1270,70 @@ static void io_destroy(struct kioctx *io
+@@ -1244,6 +1269,70 @@
+ wake_up(&ioctx->wait);
put_ioctx(ioctx); /* once for the lookup */
}
-
++
+#ifdef CONFIG_EPOLL
+
+static int aio_queue_fd_close(struct inode *inode, struct file *file)
+ return fd;
+}
+#endif
-+
+
/* sys_io_setup:
* Create an aio_context capable of receiving at least nr_events.
- * ctxp must not point to an aio_context that already exists, and
-@@ -1257,18 +1346,30 @@ static void io_destroy(struct kioctx *io
+@@ -1257,18 +1346,30 @@
* resources are available. May fail with -EFAULT if an invalid
* pointer is passed for ctxp. Will fail with -ENOSYS if not
* implemented.
if (unlikely(ctx || nr_events == 0)) {
pr_debug("EINVAL: io_setup: ctx %lu nr_events %u\n",
ctx, nr_events);
-@@ -1279,8 +1380,12 @@ asmlinkage long sys_io_setup(unsigned nr
+@@ -1279,8 +1380,12 @@
ret = PTR_ERR(ioctx);
if (!IS_ERR(ioctx)) {
ret = put_user(ioctx->user_id, ctxp);
get_ioctx(ioctx); /* io_destroy() expects us to hold a ref */
io_destroy(ioctx);
-@@ -1296,7 +1401,7 @@ out:
+@@ -1296,7 +1401,7 @@
* implemented. May fail with -EFAULT if the context pointed to
* is invalid.
*/
{
struct kioctx *ioctx = lookup_ioctx(ctx);
if (likely(NULL != ioctx)) {
-@@ -1650,8 +1755,8 @@ out_put_req:
+@@ -1650,8 +1755,8 @@
* are available to queue any iocbs. Will return 0 if nr is 0. Will
* fail with -ENOSYS if not implemented.
*/
{
struct kioctx *ctx;
long ret = 0;
-@@ -1725,8 +1830,8 @@ static struct kiocb *lookup_kiocb(struct
+@@ -1725,8 +1830,8 @@
* invalid. May fail with -EAGAIN if the iocb specified was not
* cancelled. Will fail with -ENOSYS if not implemented.
*/
{
int (*cancel)(struct kiocb *iocb, struct io_event *res);
struct kioctx *ctx;
-@@ -1787,11 +1892,11 @@ asmlinkage long sys_io_cancel(aio_contex
+@@ -1787,11 +1892,11 @@
* will be updated if not NULL and the operation blocks. Will fail
* with -ENOSYS if not implemented.
*/
{
struct kioctx *ioctx = lookup_ioctx(ctx_id);
long ret = -EINVAL;
-diff -purN linux-2.6.27/fs/attr.c linux-2.6.27.19-5.1/fs/attr.c
---- linux-2.6.27/fs/attr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/attr.c 2009-03-25 16:11:36.000000000 +0000
-@@ -100,7 +100,8 @@ int inode_setattr(struct inode * inode,
+diff -r 9608d5473017 fs/attr.c
+--- a/fs/attr.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/attr.c Wed May 06 16:56:46 2009 +0100
+@@ -100,7 +100,8 @@
}
EXPORT_SYMBOL(inode_setattr);
{
struct inode *inode = dentry->d_inode;
mode_t mode = inode->i_mode;
-@@ -163,13 +164,28 @@ int notify_change(struct dentry * dentry
+@@ -163,13 +164,28 @@
down_write(&dentry->d_inode->i_alloc_sem);
if (inode->i_op && inode->i_op->setattr) {
if (!error) {
if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) ||
(ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid))
-@@ -187,5 +203,12 @@ int notify_change(struct dentry * dentry
+@@ -187,5 +203,12 @@
return error;
}
+}
EXPORT_SYMBOL(notify_change);
-diff -purN linux-2.6.27/fs/binfmt_elf.c linux-2.6.27.19-5.1/fs/binfmt_elf.c
---- linux-2.6.27/fs/binfmt_elf.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/binfmt_elf.c 2009-03-25 16:11:37.000000000 +0000
-@@ -1188,9 +1188,11 @@ static unsigned long vma_dump_size(struc
+diff -r 9608d5473017 fs/binfmt_elf.c
+--- a/fs/binfmt_elf.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/binfmt_elf.c Wed May 06 16:56:46 2009 +0100
+@@ -1188,9 +1188,11 @@
* check for an ELF header. If we find one, dump the first page to
* aid in determining what was mapped here.
*/
/*
* Doing it this way gets the constant folded by GCC.
*/
-@@ -1203,7 +1205,15 @@ static unsigned long vma_dump_size(struc
+@@ -1203,7 +1205,15 @@
magic.elfmag[EI_MAG1] = ELFMAG1;
magic.elfmag[EI_MAG2] = ELFMAG2;
magic.elfmag[EI_MAG3] = ELFMAG3;
return PAGE_SIZE;
}
-diff -purN linux-2.6.27/fs/binfmt_em86.c linux-2.6.27.19-5.1/fs/binfmt_em86.c
---- linux-2.6.27/fs/binfmt_em86.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/binfmt_em86.c 2009-03-25 16:11:35.000000000 +0000
-@@ -43,7 +43,7 @@ static int load_em86(struct linux_binprm
+diff -r 9608d5473017 fs/binfmt_em86.c
+--- a/fs/binfmt_em86.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/binfmt_em86.c Wed May 06 16:56:46 2009 +0100
+@@ -43,7 +43,7 @@
return -ENOEXEC;
}
allow_write_access(bprm->file);
fput(bprm->file);
bprm->file = NULL;
-diff -purN linux-2.6.27/fs/binfmt_misc.c linux-2.6.27.19-5.1/fs/binfmt_misc.c
---- linux-2.6.27/fs/binfmt_misc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/binfmt_misc.c 2009-03-25 16:11:36.000000000 +0000
-@@ -117,7 +117,7 @@ static int load_misc_binary(struct linux
+diff -r 9608d5473017 fs/binfmt_misc.c
+--- a/fs/binfmt_misc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/binfmt_misc.c Wed May 06 16:56:46 2009 +0100
+@@ -117,7 +117,7 @@
goto _ret;
retval = -ENOEXEC;
goto _ret;
/* to keep locking time low, we copy the interpreter string */
-@@ -197,7 +197,7 @@ static int load_misc_binary(struct linux
+@@ -197,7 +197,7 @@
if (retval < 0)
goto _error;
retval = search_binary_handler (bprm, regs);
if (retval < 0)
-diff -purN linux-2.6.27/fs/binfmt_script.c linux-2.6.27.19-5.1/fs/binfmt_script.c
---- linux-2.6.27/fs/binfmt_script.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/binfmt_script.c 2009-03-25 16:11:36.000000000 +0000
-@@ -22,14 +22,15 @@ static int load_script(struct linux_binp
+diff -r 9608d5473017 fs/binfmt_script.c
+--- a/fs/binfmt_script.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/binfmt_script.c Wed May 06 16:56:46 2009 +0100
+@@ -22,14 +22,15 @@
char interp[BINPRM_BUF_SIZE];
int retval;
allow_write_access(bprm->file);
fput(bprm->file);
bprm->file = NULL;
-diff -purN linux-2.6.27/fs/bio-integrity.c linux-2.6.27.19-5.1/fs/bio-integrity.c
---- linux-2.6.27/fs/bio-integrity.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/bio-integrity.c 2009-03-25 16:11:36.000000000 +0000
-@@ -107,7 +107,8 @@ void bio_integrity_free(struct bio *bio,
+diff -r 9608d5473017 fs/bio-integrity.c
+--- a/fs/bio-integrity.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/bio-integrity.c Wed May 06 16:56:46 2009 +0100
+@@ -107,7 +107,8 @@
BUG_ON(bip == NULL);
/* A cloned bio doesn't own the integrity metadata */
kfree(bip->bip_buf);
mempool_free(bip->bip_vec, bs->bvec_pools[bip->bip_pool]);
-@@ -654,19 +655,20 @@ EXPORT_SYMBOL(bio_integrity_split);
+@@ -654,19 +655,20 @@
* bio_integrity_clone - Callback for cloning bios with integrity metadata
* @bio: New bio
* @bio_src: Original bio
if (bip == NULL)
return -EIO;
-diff -purN linux-2.6.27/fs/bio.c linux-2.6.27.19-5.1/fs/bio.c
---- linux-2.6.27/fs/bio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/bio.c 2009-03-25 16:11:35.000000000 +0000
-@@ -111,6 +111,7 @@ void bio_init(struct bio *bio)
+diff -r 9608d5473017 fs/bio.c
+--- a/fs/bio.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/bio.c Wed May 06 16:56:46 2009 +0100
+@@ -111,6 +111,7 @@
{
memset(bio, 0, sizeof(*bio));
bio->bi_flags = 1 << BIO_UPTODATE;
atomic_set(&bio->bi_cnt, 1);
}
-@@ -208,14 +209,6 @@ inline int bio_phys_segments(struct requ
+@@ -208,14 +209,6 @@
return bio->bi_phys_segments;
}
/**
* __bio_clone - clone a bio
* @bio: destination bio
-@@ -263,7 +256,7 @@ struct bio *bio_clone(struct bio *bio, g
+@@ -263,7 +256,7 @@
if (bio_integrity(bio)) {
int ret;
if (ret < 0)
return NULL;
-@@ -350,8 +343,7 @@ static int __bio_add_page(struct request
+@@ -350,8 +343,7 @@
*/
while (bio->bi_phys_segments >= q->max_phys_segments
if (retried_segments)
return 0;
-@@ -395,13 +387,11 @@ static int __bio_add_page(struct request
+@@ -395,13 +387,11 @@
}
/* If we may be able to merge these biovecs, force a recount */
done:
bio->bi_size += len;
return len;
-@@ -1192,6 +1182,16 @@ void bio_endio(struct bio *bio, int erro
+@@ -1192,6 +1182,16 @@
else if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
error = -EIO;
if (bio->bi_end_io)
bio->bi_end_io(bio, error);
}
-@@ -1274,6 +1274,42 @@ struct bio_pair *bio_split(struct bio *b
+@@ -1274,6 +1274,42 @@
return bp;
}
/*
* create memory pools for biovec's in a bio_set.
-@@ -1383,7 +1419,6 @@ EXPORT_SYMBOL(bio_init);
+@@ -1383,7 +1419,6 @@
EXPORT_SYMBOL(__bio_clone);
EXPORT_SYMBOL(bio_clone);
EXPORT_SYMBOL(bio_phys_segments);
EXPORT_SYMBOL(bio_add_page);
EXPORT_SYMBOL(bio_add_pc_page);
EXPORT_SYMBOL(bio_get_nr_vecs);
-diff -purN linux-2.6.27/fs/block_dev.c linux-2.6.27.19-5.1/fs/block_dev.c
---- linux-2.6.27/fs/block_dev.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/block_dev.c 2009-03-25 16:11:35.000000000 +0000
-@@ -868,6 +868,91 @@ struct block_device *open_by_devnum(dev_
+diff -r 9608d5473017 fs/block_dev.c
+--- a/fs/block_dev.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/block_dev.c Wed May 06 16:56:46 2009 +0100
+@@ -868,6 +868,91 @@
EXPORT_SYMBOL(open_by_devnum);
/*
* This routine checks whether a removable media has been changed,
* and invalidates all buffer-cache-entries in that case. This
-@@ -887,13 +972,9 @@ int check_disk_change(struct block_devic
+@@ -887,13 +972,9 @@
if (!bdops->media_changed(bdev->bd_disk))
return 0;
return 1;
}
-diff -purN linux-2.6.27/fs/buffer.c linux-2.6.27.19-5.1/fs/buffer.c
---- linux-2.6.27/fs/buffer.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/buffer.c 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/buffer.c
+--- a/fs/buffer.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/buffer.c Wed May 06 16:56:46 2009 +0100
@@ -41,6 +41,7 @@
#include <linux/bitops.h>
#include <linux/mpage.h>
static int fsync_buffers_list(spinlock_t *lock, struct list_head *list);
-@@ -89,7 +90,9 @@ void unlock_buffer(struct buffer_head *b
+@@ -89,7 +90,9 @@
*/
void __wait_on_buffer(struct buffer_head * bh)
{
}
static void
-@@ -100,10 +103,18 @@ __clear_page_buffers(struct page *page)
+@@ -100,10 +103,18 @@
page_cache_release(page);
}
printk(KERN_ERR "Buffer I/O error on device %s, logical block %Lu\n",
bdevname(bh->b_bdev, b),
(unsigned long long)bh->b_blocknr);
-@@ -145,7 +156,7 @@ void end_buffer_write_sync(struct buffer
+@@ -145,7 +156,7 @@
if (uptodate) {
set_buffer_uptodate(bh);
} else {
buffer_io_error(bh);
printk(KERN_WARNING "lost page write due to "
"I/O error on %s\n",
-@@ -395,7 +406,7 @@ static void end_buffer_async_read(struct
+@@ -395,7 +406,7 @@
set_buffer_uptodate(bh);
} else {
clear_buffer_uptodate(bh);
buffer_io_error(bh);
SetPageError(page);
}
-@@ -456,7 +467,7 @@ static void end_buffer_async_write(struc
+@@ -456,7 +467,7 @@
if (uptodate) {
set_buffer_uptodate(bh);
} else {
buffer_io_error(bh);
printk(KERN_WARNING "lost page write due to "
"I/O error on %s\n",
-@@ -1988,7 +1999,7 @@ int block_write_begin(struct file *file,
+@@ -1988,7 +1999,7 @@
page = *pagep;
if (page == NULL) {
ownpage = 1;
if (!page) {
status = -ENOMEM;
goto out;
-@@ -2494,7 +2505,7 @@ int nobh_write_begin(struct file *file,
+@@ -2494,7 +2505,7 @@
from = pos & (PAGE_CACHE_SIZE - 1);
to = from + len;
if (!page)
return -ENOMEM;
*pagep = page;
-@@ -2913,6 +2924,9 @@ static void end_bio_bh_io_sync(struct bi
+@@ -2913,6 +2924,9 @@
set_bit(BH_Eopnotsupp, &bh->b_state);
}
bh->b_end_io(bh, test_bit(BIO_UPTODATE, &bio->bi_flags));
bio_put(bio);
}
-@@ -3177,7 +3191,7 @@ void block_sync_page(struct page *page)
+@@ -3177,7 +3191,7 @@
* Use of bdflush() is deprecated and will be removed in a future kernel.
* The `pdflush' kernel threads fully replace bdflush daemons and this call.
*/
{
static int msg_count;
-diff -purN linux-2.6.27/fs/cifs/CHANGES linux-2.6.27.19-5.1/fs/cifs/CHANGES
---- linux-2.6.27/fs/cifs/CHANGES 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/CHANGES 2009-03-25 16:11:39.000000000 +0000
-@@ -12,7 +12,7 @@ create. Update cifs.upcall version to ha
+diff -r 9608d5473017 fs/cifs/CHANGES
+--- a/fs/cifs/CHANGES Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/CHANGES Wed May 06 16:56:46 2009 +0100
+@@ -12,7 +12,7 @@
on dns_upcall (resolving DFS referralls). Fix plain text password
authentication (requires setting SecurityFlags to 0x30030 to enable
lanman and plain text though). Fix writes to be at correct offset when
Version 1.53
------------
-diff -purN linux-2.6.27/fs/cifs/cifs_debug.c linux-2.6.27.19-5.1/fs/cifs/cifs_debug.c
---- linux-2.6.27/fs/cifs/cifs_debug.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/cifs_debug.c 2009-03-25 16:11:39.000000000 +0000
-@@ -107,12 +107,13 @@ void cifs_dump_mids(struct TCP_Server_In
+diff -r 9608d5473017 fs/cifs/cifs_debug.c
+--- a/fs/cifs/cifs_debug.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/cifs_debug.c Wed May 06 16:56:46 2009 +0100
+@@ -107,12 +107,13 @@
#ifdef CONFIG_PROC_FS
static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
{
seq_puts(m,
"Display Internal CIFS Data Structures for Debugging\n"
-@@ -122,46 +123,78 @@ static int cifs_debug_data_proc_show(str
+@@ -122,46 +123,78 @@
seq_printf(m, "Servers:");
i = 0;
" %d tsk: %p mid %d\n",
mid_entry->midState,
(int)mid_entry->command,
-@@ -171,44 +204,8 @@ static int cifs_debug_data_proc_show(str
+@@ -171,44 +204,8 @@
}
spin_unlock(&GlobalMid_Lock);
}
seq_putc(m, '\n');
/* BB add code to dump additional info such as TCP session info now */
-@@ -234,7 +231,9 @@ static ssize_t cifs_stats_proc_write(str
+@@ -234,7 +231,9 @@
{
char c;
int rc;
struct cifsTconInfo *tcon;
rc = get_user(c, buffer);
-@@ -242,33 +241,42 @@ static ssize_t cifs_stats_proc_write(str
+@@ -242,33 +241,42 @@
return rc;
if (c == '1' || c == 'y' || c == 'Y' || c == '0') {
}
return count;
-@@ -277,7 +285,9 @@ static ssize_t cifs_stats_proc_write(str
+@@ -277,7 +285,9 @@
static int cifs_stats_proc_show(struct seq_file *m, void *v)
{
int i;
struct cifsTconInfo *tcon;
seq_printf(m,
-@@ -306,44 +316,55 @@ static int cifs_stats_proc_show(struct s
+@@ -306,44 +316,55 @@
GlobalCurrentXid, GlobalMaxActiveXid);
i = 0;
seq_putc(m, '\n');
return 0;
-diff -purN linux-2.6.27/fs/cifs/cifs_spnego.c linux-2.6.27.19-5.1/fs/cifs/cifs_spnego.c
---- linux-2.6.27/fs/cifs/cifs_spnego.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/cifs_spnego.c 2009-03-25 16:11:39.000000000 +0000
-@@ -70,7 +70,8 @@ struct key_type cifs_spnego_key_type = {
+diff -r 9608d5473017 fs/cifs/cifs_spnego.c
+--- a/fs/cifs/cifs_spnego.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/cifs_spnego.c Wed May 06 16:56:46 2009 +0100
+@@ -70,7 +70,8 @@
strlen("ver=0xFF") */
#define MAX_MECH_STR_LEN 13 /* length of longest security mechanism name, eg
in future could have strlen(";sec=ntlmsspi") */
/* get a key struct with a SPNEGO security blob, suitable for session setup */
struct key *
cifs_get_spnego_key(struct cifsSesInfo *sesInfo)
-diff -purN linux-2.6.27/fs/cifs/cifsfs.c linux-2.6.27.19-5.1/fs/cifs/cifsfs.c
---- linux-2.6.27/fs/cifs/cifsfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/cifsfs.c 2009-03-25 16:11:39.000000000 +0000
-@@ -510,10 +510,11 @@ static void cifs_umount_begin(struct sup
+diff -r 9608d5473017 fs/cifs/cifsfs.c
+--- a/fs/cifs/cifsfs.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/cifsfs.c Wed May 06 16:56:46 2009 +0100
+@@ -510,10 +510,11 @@
tcon = cifs_sb->tcon;
if (tcon == NULL)
return;
/* cancel_brl_requests(tcon); */ /* BB mark all brl mids as exiting */
/* cancel_notify_requests(tcon); */
-@@ -967,7 +968,7 @@ static int cifs_oplock_thread(void *dumm
+@@ -967,7 +968,7 @@
not bother sending an oplock release if session
to server still is disconnected since oplock
already released by the server in that case */
rc = CIFSSMBLock(0, pTcon, netfid,
0 /* len */ , 0 /* offset */, 0,
0, LOCKING_ANDX_OPLOCK_RELEASE,
-@@ -985,24 +986,24 @@ static int cifs_oplock_thread(void *dumm
+@@ -985,24 +986,24 @@
static int cifs_dnotify_thread(void *dummyarg)
{
struct list_head *tmp;
} while (!kthread_should_stop());
return 0;
-@@ -1013,9 +1014,7 @@ init_cifs(void)
+@@ -1013,9 +1014,7 @@
{
int rc = 0;
cifs_proc_init();
INIT_LIST_HEAD(&GlobalOplock_Q);
#ifdef CONFIG_CIFS_EXPERIMENTAL
INIT_LIST_HEAD(&GlobalDnotifyReqList);
-@@ -1043,6 +1042,7 @@ init_cifs(void)
+@@ -1043,6 +1042,7 @@
GlobalMaxActiveXid = 0;
memset(Local_System_Name, 0, 15);
rwlock_init(&GlobalSMBSeslock);
spin_lock_init(&GlobalMid_Lock);
if (cifs_max_pending < 2) {
-diff -purN linux-2.6.27/fs/cifs/cifsglob.h linux-2.6.27.19-5.1/fs/cifs/cifsglob.h
---- linux-2.6.27/fs/cifs/cifsglob.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/cifsglob.h 2009-03-25 16:11:39.000000000 +0000
-@@ -85,8 +85,7 @@ enum securityEnum {
+diff -r 9608d5473017 fs/cifs/cifsglob.h
+--- a/fs/cifs/cifsglob.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/cifsglob.h Wed May 06 16:56:46 2009 +0100
+@@ -85,8 +85,7 @@
};
enum protocolEnum {
SCTP
/* Netbios frames protocol not supported at this time */
};
-@@ -122,6 +121,9 @@ struct cifs_cred {
+@@ -122,6 +121,9 @@
*/
struct TCP_Server_Info {
/* 15 character server name + 0x20 16th byte indicating type = srv */
char server_RFC1001_name[SERVER_NAME_LEN_WITH_NULL];
char unicode_server_Name[SERVER_NAME_LEN_WITH_NULL * 2];
-@@ -141,7 +143,8 @@ struct TCP_Server_Info {
+@@ -141,7 +143,8 @@
char versionMajor;
char versionMinor;
bool svlocal:1; /* local server or remote */
atomic_t inFlight; /* number of requests on the wire to server */
#ifdef CONFIG_CIFS_STATS2
atomic_t inSend; /* requests trying to send */
-@@ -192,13 +195,14 @@ struct cifsUidInfo {
+@@ -192,13 +195,14 @@
* Session structure. One of these for each uid session with a particular host
*/
struct cifsSesInfo {
enum statusEnum status;
unsigned overrideSecFlg; /* if non-zero override global sec flags */
__u16 ipc_tid; /* special tid for connection to IPC share */
-@@ -214,6 +218,7 @@ struct cifsSesInfo {
+@@ -214,6 +218,7 @@
char userName[MAX_USERNAME_SIZE + 1];
char *domainName;
char *password;
};
/* no more than one of the following three session flags may be set */
#define CIFS_SES_NT4 1
-@@ -228,16 +233,15 @@ struct cifsSesInfo {
+@@ -228,16 +233,15 @@
* session
*/
struct cifsTconInfo {
#ifdef CONFIG_CIFS_STATS
atomic_t num_smbs_sent;
atomic_t num_writes;
-@@ -285,6 +289,7 @@ struct cifsTconInfo {
+@@ -285,6 +289,7 @@
bool seal:1; /* transport encryption for this mounted share */
bool unix_ext:1; /* if false disable Linux extensions to CIFS protocol
for this mount even if server would support */
/* BB add field for back pointer to sb struct(s)? */
};
-@@ -309,6 +314,7 @@ struct cifs_search_info {
+@@ -309,6 +314,7 @@
__u32 resume_key;
char *ntwrk_buf_start;
char *srch_entries_start;
char *presume_name;
unsigned int resume_name_len;
bool endOfSearch:1;
-@@ -583,21 +589,21 @@ require use of the stronger protocol */
+@@ -583,21 +589,21 @@
#endif
/*
GLOBAL_EXTERN rwlock_t GlobalSMBSeslock; /* protects list inserts on 3 above */
GLOBAL_EXTERN struct list_head GlobalOplock_Q;
-diff -purN linux-2.6.27/fs/cifs/cifsproto.h linux-2.6.27.19-5.1/fs/cifs/cifsproto.h
---- linux-2.6.27/fs/cifs/cifsproto.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/cifsproto.h 2009-03-25 16:11:39.000000000 +0000
-@@ -36,7 +36,7 @@ extern void cifs_buf_release(void *);
+diff -r 9608d5473017 fs/cifs/cifsproto.h
+--- a/fs/cifs/cifsproto.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/cifsproto.h Wed May 06 16:56:46 2009 +0100
+@@ -36,7 +36,7 @@
extern struct smb_hdr *cifs_small_buf_get(void);
extern void cifs_small_buf_release(void *);
extern int smb_send(struct socket *, struct smb_hdr *,
extern unsigned int _GetXid(void);
extern void _FreeXid(unsigned int);
#define GetXid() (int)_GetXid(); cFYI(1,("CIFS VFS: in %s as Xid: %d with uid: %d",__func__, xid,current->fsuid));
-diff -purN linux-2.6.27/fs/cifs/cifssmb.c linux-2.6.27.19-5.1/fs/cifs/cifssmb.c
---- linux-2.6.27/fs/cifs/cifssmb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/cifssmb.c 2009-03-25 16:11:39.000000000 +0000
-@@ -190,10 +190,10 @@ small_smb_init(int smb_command, int wct,
+diff -r 9608d5473017 fs/cifs/cifssmb.c
+--- a/fs/cifs/cifssmb.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/cifssmb.c Wed May 06 16:56:46 2009 +0100
+@@ -190,10 +190,10 @@
/* need to prevent multiple threads trying to
simultaneously reconnect the same SMB session */
down(&tcon->ses->sesSem);
mark_open_files_invalid(tcon);
rc = CIFSTCon(0, tcon->ses, tcon->treeName,
tcon, nls_codepage);
-@@ -337,10 +337,10 @@ smb_init(int smb_command, int wct, struc
+@@ -337,10 +337,10 @@
/* need to prevent multiple threads trying to
simultaneously reconnect the same SMB session */
down(&tcon->ses->sesSem);
mark_open_files_invalid(tcon);
rc = CIFSTCon(0, tcon->ses, tcon->treeName,
tcon, nls_codepage);
-@@ -664,8 +664,9 @@ CIFSSMBNegotiate(unsigned int xid, struc
+@@ -664,8 +664,9 @@
rc = -EIO;
goto neg_err_exit;
}
if (memcmp(server->server_GUID,
pSMBr->u.extended_response.
GUID, 16) != 0) {
-@@ -674,9 +675,11 @@ CIFSSMBNegotiate(unsigned int xid, struc
+@@ -674,9 +675,11 @@
pSMBr->u.extended_response.GUID,
16);
}
if (count == 16) {
server->secType = RawNTLMSSP;
-@@ -739,50 +742,31 @@ CIFSSMBTDis(const int xid, struct cifsTc
+@@ -739,50 +742,31 @@
int rc = 0;
cFYI(1, ("In tree disconnect"));
-- /*
++
++ /* BB: do we need to check this? These should never be NULL. */
++ if ((tcon->ses == NULL) || (tcon->ses->server == NULL))
++ return -EIO;
++
+ /*
- * If last user of the connection and
- * connection alive - disconnect it
- * If this is the last connection on the server session disconnect it
- * (and inside session disconnect we should check if tcp socket needs
- * to be freed and kernel thread woken up).
-- */
++ * No need to return error on this operation if tid invalidated and
++ * closed on server already e.g. due to tcp session crashing. Also,
++ * the tcon is no longer on the list, so no need to take lock before
++ * checking this.
+ */
- if (tcon)
- down(&tcon->tconSem);
- else
- return -EIO;
-
+-
- atomic_dec(&tcon->useCount);
- if (atomic_read(&tcon->useCount) > 0) {
- up(&tcon->tconSem);
- return -EBUSY;
- }
-+ /* BB: do we need to check this? These should never be NULL. */
-+ if ((tcon->ses == NULL) || (tcon->ses->server == NULL))
-+ return -EIO;
-
+-
- /* No need to return error on this operation if tid invalidated and
- closed on server already e.g. due to tcp session crashing */
- if (tcon->tidStatus == CifsNeedReconnect) {
- up(&tcon->tconSem);
-+ /*
-+ * No need to return error on this operation if tid invalidated and
-+ * closed on server already e.g. due to tcp session crashing. Also,
-+ * the tcon is no longer on the list, so no need to take lock before
-+ * checking this.
-+ */
-+ if (tcon->need_reconnect)
- return 0;
+- return 0;
- }
-
+-
- if ((tcon->ses == NULL) || (tcon->ses->server == NULL)) {
- up(&tcon->tconSem);
- return -EIO;
- }
++ if (tcon->need_reconnect)
++ return 0;
++
rc = small_smb_init(SMB_COM_TREE_DISCONNECT, 0, tcon,
(void **)&smb_buffer);
- if (rc) {
- up(&tcon->tconSem);
-+ if (rc)
- return rc;
+- return rc;
- }
++ if (rc)
++ return rc;
rc = SendReceiveNoRsp(xid, tcon->ses, smb_buffer, 0);
if (rc)
if (rc == -EAGAIN)
rc = 0;
-@@ -796,43 +780,36 @@ CIFSSMBLogoff(const int xid, struct cifs
+@@ -796,43 +780,36 @@
int rc = 0;
cFYI(1, ("In SMBLogoff for session disconnect"));
- atomic_dec(&ses->inUse);
- if (atomic_read(&ses->inUse) > 0) {
-- up(&ses->sesSem);
-- return -EBUSY;
-- }
+ down(&ses->sesSem);
+ if (ses->need_reconnect)
+ goto session_already_dead; /* no need to send SMBlogoff if uid
+ already closed due to reconnect */
- rc = small_smb_init(SMB_COM_LOGOFF_ANDX, 2, NULL, (void **)&pSMB);
- if (rc) {
++ rc = small_smb_init(SMB_COM_LOGOFF_ANDX, 2, NULL, (void **)&pSMB);
++ if (rc) {
up(&ses->sesSem);
- return rc;
- }
-
+- return -EBUSY;
+- }
+- rc = small_smb_init(SMB_COM_LOGOFF_ANDX, 2, NULL, (void **)&pSMB);
+- if (rc) {
+- up(&ses->sesSem);
+- return rc;
+- }
+-
- if (ses->server) {
- pSMB->hdr.Mid = GetNextMid(ses->server);
-+ pSMB->hdr.Mid = GetNextMid(ses->server);
-
+-
- if (ses->server->secMode &
++ return rc;
++ }
++
++ pSMB->hdr.Mid = GetNextMid(ses->server);
++
+ if (ses->server->secMode &
(SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
up(&ses->sesSem);
/* if session dead then we do not need to do ulogoff,
-@@ -1534,7 +1511,7 @@ CIFSSMBWrite(const int xid, struct cifsT
+@@ -1534,7 +1511,7 @@
__u32 bytes_sent;
__u16 byte_count;
if (tcon->ses == NULL)
return -ECONNABORTED;
-@@ -3636,6 +3613,8 @@ findFirstRetry:
+@@ -3636,6 +3613,8 @@
le16_to_cpu(parms->SearchCount);
psrch_inf->index_of_last_entry = 2 /* skip . and .. */ +
psrch_inf->entries_in_buffer;
*pnetfid = parms->SearchHandle;
} else {
cifs_buf_release(pSMB);
-@@ -3751,6 +3730,8 @@ int CIFSFindNext(const int xid, struct c
+@@ -3751,6 +3730,8 @@
le16_to_cpu(parms->SearchCount);
psrch_inf->index_of_last_entry +=
psrch_inf->entries_in_buffer;
/* cFYI(1,("fnxt2 entries in buf %d index_of_last %d",
psrch_inf->entries_in_buffer, psrch_inf->index_of_last_entry)); */
-diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
---- linux-2.6.27/fs/cifs/connect.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/connect.c 2009-03-25 16:11:39.000000000 +0000
-@@ -90,6 +90,8 @@ struct smb_vol {
+diff -r 9608d5473017 fs/cifs/connect.c
+--- a/fs/cifs/connect.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/connect.c Wed May 06 16:56:46 2009 +0100
+@@ -90,6 +90,8 @@
bool nocase:1; /* request case insensitive filenames */
bool nobrl:1; /* disable sending byte range locks to srv */
bool seal:1; /* request transport encryption on share */
unsigned int rsize;
unsigned int wsize;
unsigned int sockopt;
-@@ -100,9 +102,11 @@ struct smb_vol {
+@@ -100,9 +102,11 @@
static int ipv4_connect(struct sockaddr_in *psin_server,
struct socket **csocket,
char *netb_name,
/*
-@@ -118,13 +122,13 @@ static int
+@@ -118,13 +122,13 @@
cifs_reconnect(struct TCP_Server_Info *server)
{
int rc = 0;
/* the demux thread will exit normally
next time through the loop */
spin_unlock(&GlobalMid_Lock);
-@@ -138,23 +142,17 @@ cifs_reconnect(struct TCP_Server_Info *s
+@@ -138,23 +142,17 @@
/* before reconnecting the tcp session, mark the smb session (uid)
and the tid bad so they are not used until reconnected */
- ses->status = CifsNeedReconnect;
- ses->ipc_tid = 0;
- }
-- }
-- /* else tcp and smb sessions need reconnection */
-- }
-- list_for_each(tmp, &GlobalTreeConnectionList) {
-- tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
-- if ((tcon->ses) && (tcon->ses->server == server))
-- tcon->tidStatus = CifsNeedReconnect;
+ read_lock(&cifs_tcp_ses_lock);
+ list_for_each(tmp, &server->smb_ses_list) {
+ ses = list_entry(tmp, struct cifsSesInfo, smb_ses_list);
+ list_for_each(tmp2, &ses->tcon_list) {
+ tcon = list_entry(tmp2, struct cifsTconInfo, tcon_list);
+ tcon->need_reconnect = true;
-+ }
+ }
+- /* else tcp and smb sessions need reconnection */
}
+- list_for_each(tmp, &GlobalTreeConnectionList) {
+- tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
+- if ((tcon->ses) && (tcon->ses->server == server))
+- tcon->tidStatus = CifsNeedReconnect;
+- }
- read_unlock(&GlobalSMBSeslock);
+ read_unlock(&cifs_tcp_ses_lock);
/* do not want to be sending data on a socket we are freeing */
down(&server->tcpSem);
if (server->ssocket) {
-@@ -184,16 +182,18 @@ cifs_reconnect(struct TCP_Server_Info *s
+@@ -184,16 +182,18 @@
spin_unlock(&GlobalMid_Lock);
up(&server->tcpSem);
}
if (rc) {
cFYI(1, ("reconnect error %d", rc));
-@@ -201,7 +201,7 @@ cifs_reconnect(struct TCP_Server_Info *s
+@@ -201,7 +201,7 @@
} else {
atomic_inc(&tcpSesReconnectCount);
spin_lock(&GlobalMid_Lock);
server->tcpStatus = CifsGood;
server->sequence_number = 0;
spin_unlock(&GlobalMid_Lock);
-@@ -356,7 +356,7 @@ cifs_demultiplex_thread(struct TCP_Serve
+@@ -356,7 +356,7 @@
GFP_KERNEL);
set_freezable();
if (try_to_freeze())
continue;
if (bigbuf == NULL) {
-@@ -397,7 +397,7 @@ incomplete_rcv:
+@@ -397,7 +397,7 @@
kernel_recvmsg(csocket, &smb_msg,
&iov, 1, pdu_length, 0 /* BB other flags? */);
break;
} else if (server->tcpStatus == CifsNeedReconnect) {
cFYI(1, ("Reconnect after server stopped responding"));
-@@ -409,8 +409,14 @@ incomplete_rcv:
+@@ -409,8 +409,14 @@
msleep(1); /* minimum sleep to prevent looping
allowing socket to clear and app threads to set
tcpStatus CifsNeedReconnect if server hung */
else
continue;
} else if (length <= 0) {
-@@ -522,7 +528,7 @@ incomplete_rcv:
+@@ -522,7 +528,7 @@
total_read += length) {
length = kernel_recvmsg(csocket, &smb_msg, &iov, 1,
pdu_length - total_read, 0);
(length == -EINTR)) {
/* then will exit */
reconnect = 2;
-@@ -646,19 +652,16 @@ multi_t2_fnd:
+@@ -646,18 +652,15 @@
}
} /* end while !EXITING */
server->tcpStatus = CifsExiting;
spin_unlock(&GlobalMid_Lock);
wake_up_all(&server->response_q);
-
+-
- /* don't exit until kthread_stop is called */
- set_current_state(TASK_UNINTERRUPTIBLE);
- while (!kthread_should_stop()) {
- set_current_state(TASK_UNINTERRUPTIBLE);
- }
- set_current_state(TASK_RUNNING);
--
+
/* check if we have blocked requests that need to free */
/* Note that cifs_max_pending is normally 50, but
- can be set at module install time to as little as two */
-@@ -686,29 +689,29 @@ multi_t2_fnd:
+@@ -686,29 +689,29 @@
if (smallbuf) /* no sense logging a debug message if NULL */
cifs_small_buf_release(smallbuf);
}
spin_lock(&GlobalMid_Lock);
-@@ -723,7 +726,7 @@ multi_t2_fnd:
+@@ -723,7 +726,7 @@
}
}
spin_unlock(&GlobalMid_Lock);
/* 1/8th of sec is more than enough time for them to exit */
msleep(125);
}
-@@ -745,16 +748,16 @@ multi_t2_fnd:
+@@ -745,22 +748,32 @@
if there are any pointing to this (e.g
if a crazy root user tried to kill cifsd
kernel thread explicitly this might happen) */
kfree(server);
length = atomic_dec_return(&tcpSesAllocCount);
-@@ -762,6 +765,16 @@ multi_t2_fnd:
+ if (length > 0)
mempool_resize(cifs_req_poolp, length + cifs_min_rcv,
GFP_KERNEL);
-
++
+ /* if server->tsk was NULL then wait for a signal before exiting */
+ if (!task_to_wake) {
+ set_current_state(TASK_INTERRUPTIBLE);
+ }
+ set_current_state(TASK_RUNNING);
+ }
-+
+
return 0;
}
-
-@@ -1186,6 +1199,10 @@ cifs_parse_mount_options(char *options,
+@@ -1186,6 +1199,10 @@
/* ignore */
} else if (strnicmp(data, "rw", 2) == 0) {
vol->rw = true;
} else if ((strnicmp(data, "suid", 4) == 0) ||
(strnicmp(data, "nosuid", 6) == 0) ||
(strnicmp(data, "exec", 4) == 0) ||
-@@ -1331,94 +1348,158 @@ cifs_parse_mount_options(char *options,
+@@ -1331,92 +1348,156 @@
return 0;
}
--static struct cifsSesInfo *
--cifs_find_tcp_session(struct in_addr *target_ip_addr,
-- struct in6_addr *target_ip6_addr,
-- char *userName, struct TCP_Server_Info **psrvTcp)
+static struct TCP_Server_Info *
+cifs_find_tcp_session(struct sockaddr_storage *addr)
- {
- struct list_head *tmp;
-- struct cifsSesInfo *ses;
--
-- *psrvTcp = NULL;
++{
++ struct list_head *tmp;
+ struct TCP_Server_Info *server;
+ struct sockaddr_in *addr4 = (struct sockaddr_in *) addr;
+ struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *) addr;
+ */
+ if (server->tcpStatus == CifsNew)
+ continue;
-
-- read_lock(&GlobalSMBSeslock);
-- list_for_each(tmp, &GlobalSMBSessionList) {
-- ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList);
-- if (!ses->server)
++
+ if (addr->ss_family == AF_INET &&
+ (addr4->sin_addr.s_addr !=
+ server->addr.sockAddr.sin_addr.s_addr))
+ else if (addr->ss_family == AF_INET6 &&
+ memcmp(&server->addr.sockAddr6.sin6_addr,
+ &addr6->sin6_addr, sizeof(addr6->sin6_addr)))
- continue;
-
-- if (target_ip_addr &&
-- ses->server->addr.sockAddr.sin_addr.s_addr != target_ip_addr->s_addr)
-- continue;
-- else if (target_ip6_addr &&
-- memcmp(&ses->server->addr.sockAddr6.sin6_addr,
-- target_ip6_addr, sizeof(*target_ip6_addr)))
-- continue;
-- /* BB lock server and tcp session; increment use count here?? */
++ continue;
++
+ ++server->srv_count;
+ write_unlock(&cifs_tcp_ses_lock);
+ cFYI(1, ("Existing tcp session with server found"));
+ write_unlock(&cifs_tcp_ses_lock);
+ return NULL;
+}
-
-- /* found a match on the TCP session */
-- *psrvTcp = ses->server;
++
+static void
+cifs_put_tcp_session(struct TCP_Server_Info *server)
+{
+ struct task_struct *task;
-
-- /* BB check if reconnection needed */
-- if (strncmp(ses->userName, userName, MAX_USERNAME_SIZE) == 0) {
-- read_unlock(&GlobalSMBSeslock);
-- /* Found exact match on both TCP and
-- SMB sessions */
-- return ses;
-- }
-- /* else tcp and smb sessions need reconnection */
++
+ write_lock(&cifs_tcp_ses_lock);
+ if (--server->srv_count > 0) {
+ write_unlock(&cifs_tcp_ses_lock);
+ return;
- }
-- read_unlock(&GlobalSMBSeslock);
-
-- return NULL;
++ }
++
+ list_del_init(&server->tcp_ses_list);
+ write_unlock(&cifs_tcp_ses_lock);
+
+ task = xchg(&server->tsk, NULL);
+ if (task)
+ force_sig(SIGKILL, task);
- }
-
--static struct cifsTconInfo *
--find_unc(__be32 new_target_ip_addr, char *uncName, char *userName)
-+static struct cifsSesInfo *
++}
++
+ static struct cifsSesInfo *
+-cifs_find_tcp_session(struct in_addr *target_ip_addr,
+- struct in6_addr *target_ip6_addr,
+- char *userName, struct TCP_Server_Info **psrvTcp)
+cifs_find_smb_ses(struct TCP_Server_Info *server, char *username)
{
struct list_head *tmp;
-- struct cifsTconInfo *tcon;
-- __be32 old_ip;
+ struct cifsSesInfo *ses;
+
+- *psrvTcp = NULL;
-
- read_lock(&GlobalSMBSeslock);
-+ struct cifsSesInfo *ses;
-
-- list_for_each(tmp, &GlobalTreeConnectionList) {
-- cFYI(1, ("Next tcon"));
-- tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
-- if (!tcon->ses || !tcon->ses->server)
+- list_for_each(tmp, &GlobalSMBSessionList) {
+- ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList);
+- if (!ses->server)
+ write_lock(&cifs_tcp_ses_lock);
+ list_for_each(tmp, &server->smb_ses_list) {
+ ses = list_entry(tmp, struct cifsSesInfo, smb_ses_list);
+ if (strncmp(ses->userName, username, MAX_USERNAME_SIZE))
continue;
-- old_ip = tcon->ses->server->addr.sockAddr.sin_addr.s_addr;
-- cFYI(1, ("old ip addr: %x == new ip %x ?",
-- old_ip, new_target_ip_addr));
+- if (target_ip_addr &&
+- ses->server->addr.sockAddr.sin_addr.s_addr != target_ip_addr->s_addr)
+- continue;
+- else if (target_ip6_addr &&
+- memcmp(&ses->server->addr.sockAddr6.sin6_addr,
+- target_ip6_addr, sizeof(*target_ip6_addr)))
+- continue;
+- /* BB lock server and tcp session; increment use count here?? */
+-
+- /* found a match on the TCP session */
+- *psrvTcp = ses->server;
+-
+- /* BB check if reconnection needed */
+- if (strncmp(ses->userName, userName, MAX_USERNAME_SIZE) == 0) {
+- read_unlock(&GlobalSMBSeslock);
+- /* Found exact match on both TCP and
+- SMB sessions */
+- return ses;
+- }
+- /* else tcp and smb sessions need reconnection */
+ ++ses->ses_count;
+ write_unlock(&cifs_tcp_ses_lock);
+ return ses;
-+ }
+ }
+- read_unlock(&GlobalSMBSeslock);
+-
+ write_unlock(&cifs_tcp_ses_lock);
-+ return NULL;
-+}
+ return NULL;
+ }
-- if (old_ip != new_target_ip_addr)
-- continue;
+static void
+cifs_put_smb_ses(struct cifsSesInfo *ses)
+{
+ int xid;
+ struct TCP_Server_Info *server = ses->server;
-
-- /* BB lock tcon, server, tcp session and increment use count? */
-- /* found a match on the TCP session */
-- /* BB check if reconnection needed */
-- cFYI(1, ("IP match, old UNC: %s new: %s",
-- tcon->treeName, uncName));
++
+ write_lock(&cifs_tcp_ses_lock);
+ if (--ses->ses_count > 0) {
+ write_unlock(&cifs_tcp_ses_lock);
+ return;
+ }
-
-- if (strncmp(tcon->treeName, uncName, MAX_TREE_SIZE))
-- continue;
++
+ list_del_init(&ses->smb_ses_list);
+ write_unlock(&cifs_tcp_ses_lock);
+
+ sesInfoFree(ses);
+ cifs_put_tcp_session(server);
+}
-
-- cFYI(1, ("and old usr: %s new: %s",
-- tcon->treeName, uncName));
-+static struct cifsTconInfo *
++
+ static struct cifsTconInfo *
+-find_unc(__be32 new_target_ip_addr, char *uncName, char *userName)
+cifs_find_tcon(struct cifsSesInfo *ses, const char *unc)
-+{
-+ struct list_head *tmp;
-+ struct cifsTconInfo *tcon;
+ {
+ struct list_head *tmp;
+ struct cifsTconInfo *tcon;
+- __be32 old_ip;
-- if (strncmp(tcon->ses->userName, userName, MAX_USERNAME_SIZE))
+- read_lock(&GlobalSMBSeslock);
+-
+- list_for_each(tmp, &GlobalTreeConnectionList) {
+- cFYI(1, ("Next tcon"));
+- tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
+- if (!tcon->ses || !tcon->ses->server)
+ write_lock(&cifs_tcp_ses_lock);
+ list_for_each(tmp, &ses->tcon_list) {
+ tcon = list_entry(tmp, struct cifsTconInfo, tcon_list);
+ if (strncmp(tcon->treeName, unc, MAX_TREE_SIZE))
continue;
+- old_ip = tcon->ses->server->addr.sockAddr.sin_addr.s_addr;
+- cFYI(1, ("old ip addr: %x == new ip %x ?",
+- old_ip, new_target_ip_addr));
+-
+- if (old_ip != new_target_ip_addr)
+- continue;
+-
+- /* BB lock tcon, server, tcp session and increment use count? */
+- /* found a match on the TCP session */
+- /* BB check if reconnection needed */
+- cFYI(1, ("IP match, old UNC: %s new: %s",
+- tcon->treeName, uncName));
+-
+- if (strncmp(tcon->treeName, uncName, MAX_TREE_SIZE))
+- continue;
+-
+- cFYI(1, ("and old usr: %s new: %s",
+- tcon->treeName, uncName));
+-
+- if (strncmp(tcon->ses->userName, userName, MAX_USERNAME_SIZE))
+- continue;
+-
- /* matched smb session (user name) */
- read_unlock(&GlobalSMBSeslock);
+ ++tcon->tc_count;
+ write_unlock(&cifs_tcp_ses_lock);
return tcon;
}
--
-- read_unlock(&GlobalSMBSeslock);
+ write_unlock(&cifs_tcp_ses_lock);
- return NULL;
- }
++ return NULL;
++}
+- read_unlock(&GlobalSMBSeslock);
+- return NULL;
+static void
+cifs_put_tcon(struct cifsTconInfo *tcon)
+{
+ DeleteTconOplockQEntries(tcon);
+ tconInfoFree(tcon);
+ cifs_put_smb_ses(ses);
-+}
-+
+ }
+
int
- get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path,
- const struct nls_table *nls_codepage, unsigned int *pnum_referrals,
-@@ -1506,7 +1587,8 @@ static void rfc1002mangle(char *target,
+@@ -1506,7 +1587,8 @@
static int
ipv4_connect(struct sockaddr_in *psin_server, struct socket **csocket,
{
int rc = 0;
int connected = 0;
-@@ -1578,11 +1660,15 @@ ipv4_connect(struct sockaddr_in *psin_se
+@@ -1578,11 +1660,15 @@
(*csocket)->sk->sk_sndbuf,
(*csocket)->sk->sk_rcvbuf, (*csocket)->sk->sk_rcvtimeo));
(*csocket)->sk->sk_rcvtimeo = 7 * HZ;
/* send RFC1001 sessinit */
if (psin_server->sin_port == htons(RFC1001_PORT)) {
-@@ -1619,7 +1705,7 @@ ipv4_connect(struct sockaddr_in *psin_se
+@@ -1619,7 +1705,7 @@
/* sizeof RFC1002_SESSION_REQUEST with no scope */
smb_buf->smb_buf_length = 0x81000044;
rc = smb_send(*csocket, smb_buf, 0x44,
kfree(ses_init_buf);
msleep(1); /* RFC1001 layer in at least one server
requires very short break before negprot
-@@ -1639,7 +1725,8 @@ ipv4_connect(struct sockaddr_in *psin_se
+@@ -1639,7 +1725,8 @@
}
static int
{
int rc = 0;
int connected = 0;
-@@ -1708,6 +1795,8 @@ ipv6_connect(struct sockaddr_in6 *psin_s
+@@ -1708,6 +1795,8 @@
the default. sock_setsockopt not used because it expects
user space buffer */
(*csocket)->sk->sk_rcvtimeo = 7 * HZ;
return rc;
}
-@@ -1845,19 +1934,104 @@ convert_delimiter(char *path, char delim
+@@ -1845,19 +1934,104 @@
}
}
struct cifsTconInfo *tcon = NULL;
struct TCP_Server_Info *srvTcp = NULL;
-@@ -1865,6 +2039,7 @@ cifs_mount(struct super_block *sb, struc
+@@ -1865,6 +2039,7 @@
/* cFYI(1, ("Entering cifs_mount. Xid: %d with: %s", xid, mount_data)); */
memset(&volume_info, 0, sizeof(struct smb_vol));
if (cifs_parse_mount_options(mount_data, devname, &volume_info)) {
rc = -EINVAL;
-@@ -1887,16 +2062,16 @@ cifs_mount(struct super_block *sb, struc
+@@ -1887,16 +2062,16 @@
if (volume_info.UNCip && volume_info.UNC) {
rc = cifs_inet_pton(AF_INET, volume_info.UNCip,
}
if (rc <= 0) {
-@@ -1936,38 +2111,25 @@ cifs_mount(struct super_block *sb, struc
+@@ -1936,38 +2111,25 @@
}
}
"Aborting operation"));
if (csocket != NULL)
sock_release(csocket);
-@@ -1980,12 +2142,17 @@ cifs_mount(struct super_block *sb, struc
+@@ -1980,12 +2142,17 @@
sock_release(csocket);
goto out;
} else {
srvTcp->hostname = extract_hostname(volume_info.UNC);
if (IS_ERR(srvTcp->hostname)) {
rc = PTR_ERR(srvTcp->hostname);
-@@ -2015,15 +2182,28 @@ cifs_mount(struct super_block *sb, struc
+@@ -2015,15 +2182,28 @@
memcpy(srvTcp->server_RFC1001_name,
volume_info.target_rfc1001_name, 16);
srvTcp->sequence_number = 0;
cFYI(1, ("Session needs reconnect"));
rc = cifs_setup_session(xid, pSesInfo,
cifs_sb->local_nls);
-@@ -2032,180 +2212,94 @@ cifs_mount(struct super_block *sb, struc
+@@ -2032,180 +2212,94 @@
} else if (!rc) {
cFYI(1, ("Existing smb sess not found"));
pSesInfo = sesInfoAlloc();
+ pSesInfo->password = volume_info.password;
+ /* set to NULL to prevent freeing on exit */
+ volume_info.password = NULL;
-+ }
+ }
+ if (volume_info.username)
+ strncpy(pSesInfo->userName, volume_info.username,
+ MAX_USERNAME_SIZE);
+ if (pSesInfo->domainName)
+ strcpy(pSesInfo->domainName,
+ volume_info.domainname);
- }
++ }
+ pSesInfo->linux_uid = volume_info.linux_uid;
+ pSesInfo->overrideSecFlg = volume_info.secFlg;
+ down(&pSesInfo->sesSem);
- else {
- /* check for null share name ie connecting to
- * dfs root */
--
++ goto mount_fail_check;
++ }
++ tcon->ses = pSesInfo;
+
- /* BB check if this works for exactly length
- * three strings */
- if ((strchr(volume_info.UNC + 3, '\\') == NULL)
- tcon->nocase = volume_info.nocase;
- tcon->seal = volume_info.seal;
- }
-+ goto mount_fail_check;
- }
-- }
-+ tcon->ses = pSesInfo;
-+
+ /* check for null share name ie connect to dfs root */
+ if ((strchr(volume_info.UNC + 3, '\\') == NULL)
+ && (strchr(volume_info.UNC + 3, '/') == NULL)) {
+ rc = CIFSTCon(xid, pSesInfo, volume_info.UNC,
+ tcon, cifs_sb->local_nls);
+ cFYI(1, ("CIFS Tcon rc = %d", rc));
-+ }
+ }
+ if (rc)
+ goto mount_fail_check;
+ tcon->seal = volume_info.seal;
+ write_lock(&cifs_tcp_ses_lock);
+ list_add(&tcon->tcon_list, &pSesInfo->tcon_list);
+ write_unlock(&cifs_tcp_ses_lock);
-+ }
+ }
+
+ /* we can have only one retry value for a connection
+ to a share so for resources mounted more than once
}
if (pSesInfo) {
if (pSesInfo->capabilities & CAP_LARGE_FILES) {
-@@ -2217,92 +2311,50 @@ cifs_mount(struct super_block *sb, struc
+@@ -2217,91 +2311,49 @@
/* BB FIXME fix time_gran to be larger for LANMAN sessions */
sb->s_time_gran = 100;
- atomic_inc(&tcon->useCount);
- cifs_sb->tcon = tcon;
- tcon->ses = pSesInfo;
--
++ /* If find_unc succeeded then rc == 0 so we can not end */
++ /* up accidently freeing someone elses tcon struct */
++ if (tcon)
++ cifs_put_tcon(tcon);
++ else if (pSesInfo)
++ cifs_put_smb_ses(pSesInfo);
++ else
++ cifs_put_tcp_session(srvTcp);
++ goto out;
++ }
++ cifs_sb->tcon = tcon;
+
- /* do not care if following two calls succeed - informational */
- if (!tcon->ipc) {
- CIFSSMBQFSDeviceInfo(xid, tcon);
- CIFSSMBQFSAttributeInfo(xid, tcon);
- }
--
++ /* do not care if following two calls succeed - informational */
++ if (!tcon->ipc) {
++ CIFSSMBQFSDeviceInfo(xid, tcon);
++ CIFSSMBQFSAttributeInfo(xid, tcon);
++ }
+
- /* tell server which Unix caps we support */
- if (tcon->ses->capabilities & CAP_UNIX)
- /* reset of caps checks mount to see if unix extensions
- disabled for just this mount */
- reset_cifs_unix_caps(xid, tcon, sb, &volume_info);
-+ /* If find_unc succeeded then rc == 0 so we can not end */
-+ /* up accidently freeing someone elses tcon struct */
-+ if (tcon)
-+ cifs_put_tcon(tcon);
-+ else if (pSesInfo)
-+ cifs_put_smb_ses(pSesInfo);
- else
+- else
- tcon->unix_ext = 0; /* server does not support them */
-+ cifs_put_tcp_session(srvTcp);
-+ goto out;
-+ }
-+ cifs_sb->tcon = tcon;
++ /* tell server which Unix caps we support */
++ if (tcon->ses->capabilities & CAP_UNIX)
++ /* reset of caps checks mount to see if unix extensions
++ disabled for just this mount */
++ reset_cifs_unix_caps(xid, tcon, sb, &volume_info);
++ else
++ tcon->unix_ext = 0; /* server does not support them */
- /* convert forward to back slashes in prepath here if needed */
- if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) == 0)
- convert_delimiter(cifs_sb->prepath,
- CIFS_DIR_SEP(cifs_sb));
--
++ /* convert forward to back slashes in prepath here if needed */
++ if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) == 0)
++ convert_delimiter(cifs_sb->prepath, CIFS_DIR_SEP(cifs_sb));
+
- if ((tcon->unix_ext == 0) && (cifs_sb->rsize > (1024 * 127))) {
- cifs_sb->rsize = 1024 * 127;
- cFYI(DBG2,
- cifs_sb->rsize = min(cifs_sb->rsize,
- (tcon->ses->server->maxBuf -
- MAX_CIFS_HDR_SIZE));
-+ /* do not care if following two calls succeed - informational */
-+ if (!tcon->ipc) {
-+ CIFSSMBQFSDeviceInfo(xid, tcon);
-+ CIFSSMBQFSAttributeInfo(xid, tcon);
- }
-
-+ /* tell server which Unix caps we support */
-+ if (tcon->ses->capabilities & CAP_UNIX)
-+ /* reset of caps checks mount to see if unix extensions
-+ disabled for just this mount */
-+ reset_cifs_unix_caps(xid, tcon, sb, &volume_info);
-+ else
-+ tcon->unix_ext = 0; /* server does not support them */
-+
-+ /* convert forward to back slashes in prepath here if needed */
-+ if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) == 0)
-+ convert_delimiter(cifs_sb->prepath, CIFS_DIR_SEP(cifs_sb));
-+
+ if ((tcon->unix_ext == 0) && (cifs_sb->rsize > (1024 * 127))) {
+ cifs_sb->rsize = 1024 * 127;
+ cFYI(DBG2, ("no very large read support, rsize now 127K"));
-+ }
+ }
+ if (!(tcon->ses->capabilities & CAP_LARGE_WRITE_X))
+ cifs_sb->wsize = min(cifs_sb->wsize,
+ (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE));
+ if (!(tcon->ses->capabilities & CAP_LARGE_READ_X))
+ cifs_sb->rsize = min(cifs_sb->rsize,
+ (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE));
-+
+
/* volume_info.password is freed above when existing session found
(in which case it is not needed anymore) but when new sesion is created
- the password ptr is put in the new session structure (in which case the
-@@ -3471,6 +3523,7 @@ CIFSTCon(unsigned int xid, struct cifsSe
+@@ -3471,6 +3523,7 @@
/* above now done in SendReceive */
if ((rc == 0) && (tcon != NULL)) {
tcon->tidStatus = CifsGood;
tcon->tid = smb_buffer_response->Tid;
bcc_ptr = pByteArea(smb_buffer_response);
length = strnlen(bcc_ptr, BCC(smb_buffer_response) - 2);
-@@ -3542,52 +3595,17 @@ int
+@@ -3542,52 +3595,17 @@
cifs_umount(struct super_block *sb, struct cifs_sb_info *cifs_sb)
{
int rc = 0;
return rc;
}
-@@ -3701,7 +3719,10 @@ int cifs_setup_session(unsigned int xid,
+@@ -3701,7 +3719,10 @@
cERROR(1, ("Send error in SessSetup = %d", rc));
} else {
cFYI(1, ("CIFS Session Established successfully"));
}
ss_err_exit:
-diff -purN linux-2.6.27/fs/cifs/file.c linux-2.6.27.19-5.1/fs/cifs/file.c
---- linux-2.6.27/fs/cifs/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/file.c 2009-03-25 16:11:39.000000000 +0000
-@@ -493,7 +493,7 @@ int cifs_close(struct inode *inode, stru
+diff -r 9608d5473017 fs/cifs/file.c
+--- a/fs/cifs/file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/file.c Wed May 06 16:56:46 2009 +0100
+@@ -493,7 +493,7 @@
if (pTcon) {
/* no sense reconnecting to close a file that is
already closed */
timeout = 2;
while ((atomic_read(&pSMBFile->wrtPending) != 0)
&& (timeout <= 2048)) {
-@@ -1396,7 +1396,10 @@ retry:
+@@ -1396,7 +1396,10 @@
if ((wbc->nr_to_write -= n_iov) <= 0)
done = 1;
index = next;
pagevec_release(&pvec);
}
if (!scanned && !done) {
-@@ -1813,7 +1816,7 @@ static int cifs_readpages(struct file *f
+@@ -1813,7 +1816,7 @@
pTcon = cifs_sb->tcon;
pagevec_init(&lru_pvec, 0);
for (i = 0; i < num_pages; ) {
unsigned contig_pages;
struct page *tmp_page;
-diff -purN linux-2.6.27/fs/cifs/misc.c linux-2.6.27.19-5.1/fs/cifs/misc.c
---- linux-2.6.27/fs/cifs/misc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/misc.c 2009-03-25 16:11:39.000000000 +0000
-@@ -75,12 +75,12 @@ sesInfoAlloc(void)
+diff -r 9608d5473017 fs/cifs/misc.c
+--- a/fs/cifs/misc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/misc.c Wed May 06 16:56:46 2009 +0100
+@@ -75,12 +75,12 @@
ret_buf = kzalloc(sizeof(struct cifsSesInfo), GFP_KERNEL);
if (ret_buf) {
}
return ret_buf;
}
-@@ -93,10 +93,7 @@ sesInfoFree(struct cifsSesInfo *buf_to_f
+@@ -93,10 +93,7 @@
return;
}
kfree(buf_to_free->serverOS);
kfree(buf_to_free->serverDomain);
kfree(buf_to_free->serverNOS);
-@@ -111,17 +108,14 @@ tconInfoAlloc(void)
+@@ -111,17 +108,14 @@
struct cifsTconInfo *ret_buf;
ret_buf = kzalloc(sizeof(struct cifsTconInfo), GFP_KERNEL);
if (ret_buf) {
}
return ret_buf;
}
-@@ -133,10 +127,7 @@ tconInfoFree(struct cifsTconInfo *buf_to
+@@ -133,10 +127,7 @@
cFYI(1, ("Null buffer passed to tconInfoFree"));
return;
}
kfree(buf_to_free->nativeFileSystem);
kfree(buf_to_free);
}
-@@ -354,9 +345,9 @@ header_assemble(struct smb_hdr *buffer,
+@@ -354,9 +345,9 @@
if (current->fsuid != treeCon->ses->linux_uid) {
cFYI(1, ("Multiuser mode and UID "
"did not match tcon uid"));
if (ses->linux_uid == current->fsuid) {
if (ses->server == treeCon->ses->server) {
cFYI(1, ("found matching uid substitute right smb_uid"));
-@@ -368,7 +359,7 @@ header_assemble(struct smb_hdr *buffer,
+@@ -368,7 +359,7 @@
}
}
}
}
}
}
-@@ -501,9 +492,10 @@ bool
+@@ -501,9 +492,10 @@
is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
{
struct smb_com_lock_req *pSMB = (struct smb_com_lock_req *)buf;
struct cifsFileInfo *netfile;
cFYI(1, ("Checking for oplock break or dnotify response"));
-@@ -558,42 +550,42 @@ is_valid_oplock_break(struct smb_hdr *bu
+@@ -558,42 +550,42 @@
return false;
/* look up tcon based on tid & uid */
cFYI(1, ("Can not process oplock break for non-existent connection"));
return true;
}
-diff -purN linux-2.6.27/fs/cifs/readdir.c linux-2.6.27.19-5.1/fs/cifs/readdir.c
---- linux-2.6.27/fs/cifs/readdir.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/readdir.c 2009-03-25 16:11:39.000000000 +0000
-@@ -640,6 +640,70 @@ static int is_dir_changed(struct file *f
+diff -r 9608d5473017 fs/cifs/readdir.c
+--- a/fs/cifs/readdir.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/readdir.c Wed May 06 16:56:46 2009 +0100
+@@ -640,6 +640,70 @@
}
/* find the corresponding entry in the search */
/* Note that the SMB server returns search entries for . and .. which
complicates logic here if we choose to parse for them and we do not
-@@ -698,6 +762,7 @@ static int find_cifs_entry(const int xid
+@@ -698,6 +762,7 @@
rc));
return rc;
}
}
while ((index_to_find >= cifsFile->srch_inf.index_of_last_entry) &&
-@@ -705,6 +770,7 @@ static int find_cifs_entry(const int xid
+@@ -705,6 +770,7 @@
cFYI(1, ("calling findnext2"));
rc = CIFSFindNext(xid, pTcon, cifsFile->netfid,
&cifsFile->srch_inf);
if (rc)
return -ENOENT;
}
-@@ -919,69 +985,6 @@ static int cifs_filldir(char *pfindEntry
+@@ -919,69 +985,6 @@
return rc;
}
int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
{
-diff -purN linux-2.6.27/fs/cifs/sess.c linux-2.6.27.19-5.1/fs/cifs/sess.c
---- linux-2.6.27/fs/cifs/sess.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/sess.c 2009-03-25 16:11:39.000000000 +0000
-@@ -228,7 +228,7 @@ static int decode_unicode_ssetup(char **
+diff -r 9608d5473017 fs/cifs/sess.c
+--- a/fs/cifs/sess.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/sess.c Wed May 06 16:56:46 2009 +0100
+@@ -228,7 +228,7 @@
kfree(ses->serverOS);
/* UTF-8 string will not grow more than four times as big as UCS-16 */
if (ses->serverOS != NULL)
cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp);
data += 2 * (len + 1);
-@@ -241,7 +241,7 @@ static int decode_unicode_ssetup(char **
+@@ -241,7 +241,7 @@
return rc;
kfree(ses->serverNOS);
if (ses->serverNOS != NULL) {
cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len,
nls_cp);
-diff -purN linux-2.6.27/fs/cifs/transport.c linux-2.6.27.19-5.1/fs/cifs/transport.c
---- linux-2.6.27/fs/cifs/transport.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/transport.c 2009-03-25 16:11:39.000000000 +0000
-@@ -162,7 +162,7 @@ void DeleteTconOplockQEntries(struct cif
+diff -r 9608d5473017 fs/cifs/transport.c
+--- a/fs/cifs/transport.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/transport.c Wed May 06 16:56:47 2009 +0100
+@@ -162,7 +162,7 @@
int
smb_send(struct socket *ssocket, struct smb_hdr *smb_buffer,
{
int rc = 0;
int i = 0;
-@@ -179,7 +179,10 @@ smb_send(struct socket *ssocket, struct
+@@ -179,7 +179,10 @@
smb_msg.msg_namelen = sizeof(struct sockaddr);
smb_msg.msg_control = NULL;
smb_msg.msg_controllen = 0;
/* smb header is converted in header_assemble. bcc and rest of SMB word
area, and byte area if necessary, is converted to littleendian in
-@@ -230,8 +233,8 @@ smb_send(struct socket *ssocket, struct
+@@ -230,8 +233,8 @@
}
static int
{
int rc = 0;
int i = 0;
-@@ -241,6 +244,7 @@ smb_send2(struct socket *ssocket, struct
+@@ -241,6 +244,7 @@
unsigned int total_len;
int first_vec = 0;
unsigned int smb_buf_length = smb_buffer->smb_buf_length;
if (ssocket == NULL)
return -ENOTSOCK; /* BB eventually add reconnect code here */
-@@ -249,7 +253,10 @@ smb_send2(struct socket *ssocket, struct
+@@ -249,7 +253,10 @@
smb_msg.msg_namelen = sizeof(struct sockaddr);
smb_msg.msg_control = NULL;
smb_msg.msg_controllen = 0;
/* smb header is converted in header_assemble. bcc and rest of SMB word
area, and byte area if necessary, is converted to littleendian in
-@@ -284,8 +291,11 @@ smb_send2(struct socket *ssocket, struct
+@@ -284,8 +291,11 @@
if (rc < 0)
break;
break;
}
if (rc == 0) {
-@@ -313,6 +323,16 @@ smb_send2(struct socket *ssocket, struct
+@@ -311,6 +321,16 @@
+ }
+ }
i = 0; /* in case we get ENOSPC on the next send */
- }
-
++ }
++
+ if ((total_len > 0) && (total_len != smb_buf_length + 4)) {
+ cFYI(1, ("partial send (%d remaining), terminating session",
+ total_len));
+ to kill the socket so the server throws away the partial
+ SMB */
+ server->tcpStatus = CifsNeedReconnect;
-+ }
-+
+ }
+
if (rc < 0) {
- cERROR(1, ("Error %d sending data on socket to server", rc));
- } else
-@@ -519,8 +539,9 @@ SendReceive2(const unsigned int xid, str
+@@ -519,8 +539,9 @@
#ifdef CONFIG_CIFS_STATS2
atomic_inc(&ses->server->inSend);
#endif
#ifdef CONFIG_CIFS_STATS2
atomic_dec(&ses->server->inSend);
midQ->when_sent = jiffies;
-@@ -712,7 +733,8 @@ SendReceive(const unsigned int xid, stru
+@@ -712,7 +733,8 @@
atomic_inc(&ses->server->inSend);
#endif
rc = smb_send(ses->server->ssocket, in_buf, in_buf->smb_buf_length,
#ifdef CONFIG_CIFS_STATS2
atomic_dec(&ses->server->inSend);
midQ->when_sent = jiffies;
-@@ -852,7 +874,8 @@ send_nt_cancel(struct cifsTconInfo *tcon
+@@ -852,7 +874,8 @@
return rc;
}
rc = smb_send(ses->server->ssocket, in_buf, in_buf->smb_buf_length,
up(&ses->server->tcpSem);
return rc;
}
-@@ -942,7 +965,8 @@ SendReceiveBlockingLock(const unsigned i
+@@ -942,7 +965,8 @@
atomic_inc(&ses->server->inSend);
#endif
rc = smb_send(ses->server->ssocket, in_buf, in_buf->smb_buf_length,
#ifdef CONFIG_CIFS_STATS2
atomic_dec(&ses->server->inSend);
midQ->when_sent = jiffies;
-diff -purN linux-2.6.27/fs/compat.c linux-2.6.27.19-5.1/fs/compat.c
---- linux-2.6.27/fs/compat.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/compat.c 2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/compat.c
+--- a/fs/compat.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/compat.c Wed May 06 16:56:47 2009 +0100
@@ -51,6 +51,7 @@
#include <linux/poll.h>
#include <linux/mm.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
-@@ -1406,6 +1407,7 @@ int compat_do_execve(char * filename,
+@@ -1406,6 +1407,7 @@
retval = search_binary_handler(bprm, regs);
if (retval >= 0) {
/* execve success */
security_bprm_free(bprm);
acct_update_integrals(current);
-@@ -1640,7 +1642,7 @@ sticky:
+@@ -1640,7 +1642,7 @@
}
#ifdef HAVE_SET_RESTORE_SIGMASK
compat_ulong_t __user *outp, compat_ulong_t __user *exp,
struct compat_timespec __user *tsp, compat_sigset_t __user *sigmask,
compat_size_t sigsetsize)
-@@ -1748,8 +1750,8 @@ asmlinkage long compat_sys_pselect6(int
+@@ -1748,8 +1750,8 @@
(compat_size_t __user *)(sig+sizeof(up))))
return -EFAULT;
}
}
asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds,
-diff -purN linux-2.6.27/fs/compat_ioctl.c linux-2.6.27.19-5.1/fs/compat_ioctl.c
---- linux-2.6.27/fs/compat_ioctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/compat_ioctl.c 2009-03-25 16:11:35.000000000 +0000
-@@ -114,6 +114,13 @@
- #include <asm/fbio.h>
- #endif
+diff -r 9608d5473017 fs/compat_ioctl.c
+--- a/fs/compat_ioctl.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/compat_ioctl.c Wed May 06 16:56:47 2009 +0100
+@@ -112,6 +112,13 @@
+ #ifdef CONFIG_SPARC
+ #include <asm/fbio.h>
++#endif
++
+#ifdef CONFIG_XEN
+#include <xen/interface/xen.h>
+#include <xen/public/evtchn.h>
+#include <xen/public/privcmd.h>
+#include <xen/compat_ioctl.h>
-+#endif
-+
+ #endif
+
static int do_ioctl32_pointer(unsigned int fd, unsigned int cmd,
- unsigned long arg, struct file *f)
- {
-@@ -538,6 +545,7 @@ static int dev_ifsioc(unsigned int fd, u
+@@ -538,6 +545,7 @@
* cannot be fixed without breaking all existing apps.
*/
case TUNSETIFF:
case SIOCGIFFLAGS:
case SIOCGIFMETRIC:
case SIOCGIFMTU:
-@@ -1870,6 +1878,7 @@ COMPATIBLE_IOCTL(TCSETSW)
+@@ -1870,6 +1878,7 @@
COMPATIBLE_IOCTL(TCSETSF)
COMPATIBLE_IOCTL(TIOCLINUX)
COMPATIBLE_IOCTL(TIOCSBRK)
COMPATIBLE_IOCTL(TIOCCBRK)
ULONG_IOCTL(TIOCMIWAIT)
COMPATIBLE_IOCTL(TIOCGICOUNT)
-@@ -1982,6 +1991,11 @@ COMPATIBLE_IOCTL(TUNSETNOCSUM)
+@@ -1982,6 +1991,11 @@
COMPATIBLE_IOCTL(TUNSETDEBUG)
COMPATIBLE_IOCTL(TUNSETPERSIST)
COMPATIBLE_IOCTL(TUNSETOWNER)
/* Big V */
COMPATIBLE_IOCTL(VT_SETMODE)
COMPATIBLE_IOCTL(VT_GETMODE)
-@@ -2573,6 +2587,7 @@ HANDLE_IOCTL(SIOCGIFPFLAGS, dev_ifsioc)
+@@ -2573,6 +2587,7 @@
HANDLE_IOCTL(SIOCGIFTXQLEN, dev_ifsioc)
HANDLE_IOCTL(SIOCSIFTXQLEN, dev_ifsioc)
HANDLE_IOCTL(TUNSETIFF, dev_ifsioc)
HANDLE_IOCTL(SIOCETHTOOL, ethtool_ioctl)
HANDLE_IOCTL(SIOCBONDENSLAVE, bond_ioctl)
HANDLE_IOCTL(SIOCBONDRELEASE, bond_ioctl)
-@@ -2726,6 +2741,18 @@ IGNORE_IOCTL(FBIOGETCMAP32)
+@@ -2725,6 +2740,18 @@
+ IGNORE_IOCTL(FBIOGETCMAP32)
IGNORE_IOCTL(FBIOSCURSOR32)
IGNORE_IOCTL(FBIOGCURSOR32)
- #endif
++#endif
+
+#ifdef CONFIG_XEN
+HANDLE_IOCTL(IOCTL_PRIVCMD_MMAP_32, privcmd_ioctl_32)
+COMPATIBLE_IOCTL(IOCTL_EVTCHN_UNBIND)
+COMPATIBLE_IOCTL(IOCTL_EVTCHN_NOTIFY)
+COMPATIBLE_IOCTL(IOCTL_EVTCHN_RESET)
-+#endif
+ #endif
};
- #define IOCTL_HASHSIZE 256
-diff -purN linux-2.6.27/fs/dcache.c linux-2.6.27.19-5.1/fs/dcache.c
---- linux-2.6.27/fs/dcache.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dcache.c 2009-03-25 16:11:36.000000000 +0000
-@@ -1615,8 +1615,11 @@ static void switch_names(struct dentry *
+diff -r 9608d5473017 fs/dcache.c
+--- a/fs/dcache.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/dcache.c Wed May 06 16:56:47 2009 +0100
+@@ -1615,8 +1615,11 @@
*/
memcpy(dentry->d_iname, target->d_name.name,
target->d_name.len + 1);
}
/*
-@@ -1676,7 +1679,6 @@ already_unhashed:
+@@ -1676,7 +1679,6 @@
/* Switch the names.. */
switch_names(dentry, target);
do_switch(dentry->d_name.hash, target->d_name.hash);
/* ... and switch the parents */
-@@ -1781,7 +1783,6 @@ static void __d_materialise_dentry(struc
+@@ -1781,7 +1783,6 @@
struct dentry *dparent, *aparent;
switch_names(dentry, anon);
do_switch(dentry->d_name.hash, anon->d_name.hash);
dparent = dentry->d_parent;
-@@ -1897,44 +1898,46 @@ static int prepend_name(char **buffer, i
+@@ -1897,44 +1898,46 @@
* @root: root vfsmnt/dentry (may be modified by this function)
* @buffer: buffer to return value in
* @buflen: buffer length
*
- * Convert a dentry into an ASCII path name. If the entry has been deleted
- * the string " (deleted)" is appended. Note that this is ambiguous.
-- *
-- * Returns the buffer or an error code if the path was too long.
-- *
-- * "buflen" should be positive. Caller holds the dcache_lock.
+ * Convert a dentry into an ASCII path name. If the entry has been deleted,
+ * then if @flags has D_PATH_FAIL_DELETED set, ERR_PTR(-ENOENT) is returned.
+ * Otherwise, the string " (deleted)" is appended. Note that this is ambiguous.
- *
- * If path is not reachable from the supplied root, then the value of
-- * root is changed (without modifying refcounts).
++ *
++ * If path is not reachable from the supplied root, then the value of
+ * root is changed (without modifying refcounts). The path returned in this
+ * case will be relative (i.e., it will not start with a slash).
-+ *
-+ * Returns the buffer or an error code if the path was too long.
+ *
+ * Returns the buffer or an error code if the path was too long.
+- *
+- * "buflen" should be positive. Caller holds the dcache_lock.
+- *
+- * If path is not reachable from the supplied root, then the value of
+- * root is changed (without modifying refcounts).
*/
char *__d_path(const struct path *path, struct path *root,
- char *buffer, int buflen)
if (vfsmnt->mnt_parent == vfsmnt) {
goto global_root;
}
-@@ -1944,27 +1947,51 @@ char *__d_path(const struct path *path,
+@@ -1944,27 +1947,51 @@
}
parent = dentry->d_parent;
prefetch(parent);
goto out;
}
-@@ -2001,10 +2028,8 @@ char *d_path(const struct path *path, ch
+@@ -2001,10 +2028,8 @@
root = current->fs->root;
path_get(&root);
read_unlock(¤t->fs->lock);
path_put(&root);
return res;
}
-@@ -2085,11 +2110,11 @@ Elong:
+@@ -2085,11 +2110,11 @@
* return NULL;
* }
*/
if (!page)
return -ENOMEM;
-@@ -2101,30 +2126,20 @@ asmlinkage long sys_getcwd(char __user *
+@@ -2101,30 +2126,20 @@
path_get(&root);
read_unlock(¤t->fs->lock);
- unsigned long len;
- struct path tmp = root;
- char * cwd;
--
-- cwd = __d_path(&pwd, &tmp, page, PAGE_SIZE);
-- spin_unlock(&dcache_lock);
--
+ tmp = root;
+ cwd = __d_path(&pwd, &tmp, page, PAGE_SIZE, D_PATH_FAIL_DELETED);
+ if (IS_ERR(cwd)) {
- error = PTR_ERR(cwd);
-- if (IS_ERR(cwd))
-- goto out;
++ error = PTR_ERR(cwd);
+ goto out;
+ }
+- cwd = __d_path(&pwd, &tmp, page, PAGE_SIZE);
+- spin_unlock(&dcache_lock);
+-
+- error = PTR_ERR(cwd);
+- if (IS_ERR(cwd))
+- goto out;
+-
- error = -ERANGE;
- len = PAGE_SIZE + page - cwd;
- if (len <= size) {
out:
path_put(&pwd);
-diff -purN linux-2.6.27/fs/dcookies.c linux-2.6.27.19-5.1/fs/dcookies.c
---- linux-2.6.27/fs/dcookies.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dcookies.c 2009-03-25 16:11:32.000000000 +0000
-@@ -140,7 +140,7 @@ out:
+diff -r 9608d5473017 fs/dcookies.c
+--- a/fs/dcookies.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/dcookies.c Wed May 06 16:56:47 2009 +0100
+@@ -140,7 +140,7 @@
/* And here is where the userspace process can look up the cookie value
* to retrieve the path.
*/
{
unsigned long cookie = (unsigned long)cookie64;
int err = -EINVAL;
-@@ -193,7 +193,13 @@ out:
+@@ -193,7 +193,13 @@
mutex_unlock(&dcookie_mutex);
return err;
}
static int dcookie_init(void)
{
-diff -purN linux-2.6.27/fs/dlm/dlm_internal.h linux-2.6.27.19-5.1/fs/dlm/dlm_internal.h
---- linux-2.6.27/fs/dlm/dlm_internal.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dlm/dlm_internal.h 2009-03-25 16:11:32.000000000 +0000
+diff -r 9608d5473017 fs/dlm/dlm_internal.h
+--- a/fs/dlm/dlm_internal.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/dlm/dlm_internal.h Wed May 06 16:56:47 2009 +0100
@@ -2,7 +2,7 @@
*******************************************************************************
**
**
** This copyrighted material is made available to anyone wishing to use,
** modify, copy, or redistribute it subject to the terms and conditions
-@@ -441,7 +441,9 @@ struct dlm_ls {
+@@ -441,7 +441,9 @@
uint32_t ls_global_id; /* global unique lockspace ID */
uint32_t ls_exflags;
int ls_lvblen;
unsigned long ls_flags; /* LSFL_ */
struct kobject ls_kobj;
-diff -purN linux-2.6.27/fs/dlm/lockspace.c linux-2.6.27.19-5.1/fs/dlm/lockspace.c
---- linux-2.6.27/fs/dlm/lockspace.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dlm/lockspace.c 2009-03-25 16:11:32.000000000 +0000
+diff -r 9608d5473017 fs/dlm/lockspace.c
+--- a/fs/dlm/lockspace.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/dlm/lockspace.c Wed May 06 16:56:47 2009 +0100
@@ -2,7 +2,7 @@
*******************************************************************************
**
static int ls_count;
static struct mutex ls_lock;
-@@ -246,23 +247,6 @@ static void dlm_scand_stop(void)
+@@ -246,23 +247,6 @@
kthread_stop(scand_task);
}
struct dlm_ls *dlm_find_lockspace_global(uint32_t id)
{
struct dlm_ls *ls;
-@@ -327,6 +311,7 @@ static void remove_lockspace(struct dlm_
+@@ -327,6 +311,7 @@
for (;;) {
spin_lock(&lslist_lock);
if (ls->ls_count == 0) {
list_del(&ls->ls_list);
spin_unlock(&lslist_lock);
return;
-@@ -381,7 +366,7 @@ static int new_lockspace(char *name, int
+@@ -381,7 +366,7 @@
uint32_t flags, int lvblen)
{
struct dlm_ls *ls;
int do_unreg = 0;
if (namelen > DLM_LOCKSPACE_LEN)
-@@ -393,12 +378,32 @@ static int new_lockspace(char *name, int
+@@ -393,12 +378,32 @@
if (!try_module_get(THIS_MODULE))
return -EINVAL;
ls = kzalloc(sizeof(struct dlm_ls) + namelen, GFP_KERNEL);
if (!ls)
-@@ -418,8 +423,9 @@ static int new_lockspace(char *name, int
+@@ -418,8 +423,9 @@
ls->ls_allocation = GFP_KERNEL;
/* ls_exflags are forced to match among nodes, and we don't
size = dlm_config.ci_rsbtbl_size;
ls->ls_rsbtbl_size = size;
-@@ -510,6 +516,7 @@ static int new_lockspace(char *name, int
+@@ -510,6 +516,7 @@
down_write(&ls->ls_in_recovery);
spin_lock(&lslist_lock);
list_add(&ls->ls_list, &lslist);
spin_unlock(&lslist_lock);
-@@ -548,7 +555,7 @@ static int new_lockspace(char *name, int
+@@ -548,7 +555,7 @@
dlm_create_debug_file(ls);
log_debug(ls, "join complete");
*lockspace = ls;
return 0;
-@@ -635,11 +642,32 @@ static int release_lockspace(struct dlm_
+@@ -635,11 +642,32 @@
struct dlm_lkb *lkb;
struct dlm_rsb *rsb;
struct list_head *head;
- int i;
- int busy = lockspace_busy(ls);
+ int i, busy, rv;
-+
+
+- if (busy > force)
+- return -EBUSY;
+ busy = lockspace_busy(ls);
+
+ spin_lock(&lslist_lock);
+ log_debug(ls, "release_lockspace no remove %d", rv);
+ return rv;
+ }
-
-- if (busy > force)
-- return -EBUSY;
++
+ dlm_device_deregister(ls);
if (force < 3)
do_uevent(ls, 0);
-@@ -720,15 +748,10 @@ static int release_lockspace(struct dlm_
+@@ -720,14 +748,9 @@
dlm_clear_members(ls);
dlm_clear_members_gone(ls);
kfree(ls->ls_node_array);
+ log_debug(ls, "release_lockspace final free");
kobject_put(&ls->ls_kobj);
/* The ls structure will be freed when the kobject is done with */
-
+-
- mutex_lock(&ls_lock);
- ls_count--;
- if (!ls_count)
- threads_stop();
- mutex_unlock(&ls_lock);
--
+
module_put(THIS_MODULE);
return 0;
- }
-@@ -750,11 +773,21 @@ static int release_lockspace(struct dlm_
+@@ -750,11 +773,21 @@
int dlm_release_lockspace(void *lockspace, int force)
{
struct dlm_ls *ls;
+ return error;
}
-diff -purN linux-2.6.27/fs/dlm/plock.c linux-2.6.27.19-5.1/fs/dlm/plock.c
---- linux-2.6.27/fs/dlm/plock.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dlm/plock.c 2009-03-25 16:11:32.000000000 +0000
-@@ -304,7 +304,9 @@ int dlm_posix_get(dlm_lockspace_t *locks
+diff -r 9608d5473017 fs/dlm/plock.c
+--- a/fs/dlm/plock.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/dlm/plock.c Wed May 06 16:56:47 2009 +0100
+@@ -304,7 +304,9 @@
if (rv == -ENOENT)
rv = 0;
else if (rv > 0) {
fl->fl_pid = op->info.pid;
fl->fl_start = op->info.start;
fl->fl_end = op->info.end;
-diff -purN linux-2.6.27/fs/dlm/user.c linux-2.6.27.19-5.1/fs/dlm/user.c
---- linux-2.6.27/fs/dlm/user.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dlm/user.c 2009-03-25 16:11:32.000000000 +0000
+diff -r 9608d5473017 fs/dlm/user.c
+--- a/fs/dlm/user.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/dlm/user.c Wed May 06 16:56:47 2009 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2007 Red Hat, Inc. All rights reserved.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
-@@ -340,10 +340,15 @@ static int device_user_deadlock(struct d
+@@ -340,9 +340,14 @@
return error;
}
+static int dlm_device_register(struct dlm_ls *ls, char *name)
{
int error, len;
-
++
+ /* The device is already registered. This happens when the
+ lockspace is created multiple times from userspace. */
+ if (ls->ls_device.name)
+ return 0;
-+
+
error = -ENOMEM;
len = strlen(name) + strlen(name_prefix) + 2;
- ls->ls_device.name = kzalloc(len, GFP_KERNEL);
-@@ -363,6 +368,22 @@ fail:
- return error;
- }
-
+@@ -360,6 +365,22 @@
+ kfree(ls->ls_device.name);
+ }
+ fail:
++ return error;
++}
++
+int dlm_device_deregister(struct dlm_ls *ls)
+{
+ int error;
+ error = misc_deregister(&ls->ls_device);
+ if (!error)
+ kfree(ls->ls_device.name);
-+ return error;
-+}
-+
- static int device_user_purge(struct dlm_user_proc *proc,
- struct dlm_purge_params *params)
- {
-@@ -397,7 +418,7 @@ static int device_create_lockspace(struc
+ return error;
+ }
+
+@@ -397,7 +418,7 @@
if (!ls)
return -ENOENT;
dlm_put_lockspace(ls);
if (error)
-@@ -421,31 +442,22 @@ static int device_remove_lockspace(struc
+@@ -421,31 +442,22 @@
if (!ls)
return -ENOENT;
return error;
}
-diff -purN linux-2.6.27/fs/dlm/user.h linux-2.6.27.19-5.1/fs/dlm/user.h
---- linux-2.6.27/fs/dlm/user.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dlm/user.h 2009-03-25 16:11:32.000000000 +0000
+diff -r 9608d5473017 fs/dlm/user.h
+--- a/fs/dlm/user.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/dlm/user.h Wed May 06 16:56:47 2009 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Red Hat, Inc. All rights reserved.
+int dlm_device_deregister(struct dlm_ls *ls);
#endif
-diff -purN linux-2.6.27/fs/dmapi/Makefile linux-2.6.27.19-5.1/fs/dmapi/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/Makefile 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/Makefile Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,53 @@
+#
+# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
+ dmapi_register.o \
+ dmapi_right.o \
+ dmapi_session.o
-diff -purN linux-2.6.27/fs/dmapi/Status linux-2.6.27.19-5.1/fs/dmapi/Status
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/Status 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/Status
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/Status Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,128 @@
+Jan21,04 - dm_get_bulkall is now implemented. roehrich
+
+
+- read/write events for memory-mapped I/O?
+
-diff -purN linux-2.6.27/fs/dmapi/dmapi.h linux-2.6.27.19-5.1/fs/dmapi/dmapi.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi.h 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi.h Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,1086 @@
+/*
+ * Copyright (c) 1995-2003 Silicon Graphics, Inc. All Rights Reserved.
+#endif
+
+#endif /* __DMAPI_H__ */
-diff -purN linux-2.6.27/fs/dmapi/dmapi_attr.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_attr.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_attr.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_attr.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_attr.c Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
+ dm_app_put_tdp(tdp);
+ return(error);
+}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_bulkattr.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_bulkattr.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_bulkattr.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_bulkattr.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_bulkattr.c Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
+ dm_app_put_tdp(tdp);
+ return(error);
+}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_config.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_config.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_config.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_config.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_config.c Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
+ dm_app_put_tdp(tdp);
+ return(error);
+}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_dmattr.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_dmattr.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_dmattr.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_dmattr.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_dmattr.c Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,228 @@
+/*
+ * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
+ dm_app_put_tdp(tdp);
+ return(error);
+}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_event.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_event.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_event.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_event.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_event.c Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,860 @@
+/*
+ * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
+
+ return(error);
+}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_handle.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_handle.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_handle.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_handle.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_handle.c Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
+ dm_app_put_tdp(tdp);
+ return(error);
+}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_hole.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_hole.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_hole.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_hole.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_hole.c Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
+ dm_app_put_tdp(tdp);
+ return(error);
+}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_io.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_io.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_io.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_io.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_io.c Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
+ dm_app_put_tdp(tdp);
+ return(error);
+}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_kern.h linux-2.6.27.19-5.1/fs/dmapi/dmapi_kern.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_kern.h 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_kern.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_kern.h Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,599 @@
+/*
+ * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
+#define DM_OPEN_BY_HANDLE 57
+
+#endif /* __DMAPI_KERN_H__ */
-diff -purN linux-2.6.27/fs/dmapi/dmapi_mountinfo.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_mountinfo.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_mountinfo.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_mountinfo.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_mountinfo.c Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,527 @@
+/*
+ * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
+{
+ return 0;
+}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_port.h linux-2.6.27.19-5.1/fs/dmapi/dmapi_port.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_port.h 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_port.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_port.h Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
+#define do_mod(a, b) dmapi_do_mod(&(a), (b), sizeof(a))
+
+#endif /* _DMAPI_PORT_H */
-diff -purN linux-2.6.27/fs/dmapi/dmapi_private.h linux-2.6.27.19-5.1/fs/dmapi/dmapi_private.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_private.h 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_private.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_private.h Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,619 @@
+/*
+ * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
+ int errno);
+
+#endif /* _DMAPI_PRIVATE_H */
-diff -purN linux-2.6.27/fs/dmapi/dmapi_region.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_region.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_region.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_region.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_region.c Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
+ dm_app_put_tdp(tdp);
+ return(error);
+}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_register.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_register.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_register.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_register.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_register.c Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,1644 @@
+/*
+ * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
+ return 0;
+}
+#endif /* HAVE_DM_QUEUE_FLUSH */
-diff -purN linux-2.6.27/fs/dmapi/dmapi_right.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_right.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_right.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_right.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_right.c Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,1256 @@
+/*
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
+ dm_app_put_tdp(tdp);
+ return(error);
+}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_session.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_session.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_session.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_session.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_session.c Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,1825 @@
+/*
+ * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
+ return 0;
+}
+#endif /* HAVE_DM_QUEUE_FLUSH */
-diff -purN linux-2.6.27/fs/dmapi/dmapi_sysent.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_sysent.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_sysent.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_sysent.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_sysent.c Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,805 @@
+/*
+ * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
+EXPORT_SYMBOL(dmapi_unregister);
+EXPORT_SYMBOL(dmapi_registered);
+EXPORT_SYMBOL(dm_release_threads);
-diff -purN linux-2.6.27/fs/dmapi/sv.h linux-2.6.27.19-5.1/fs/dmapi/sv.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/sv.h 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/sv.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/sv.h Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
+ wake_up_all(&(sv)->waiters)
+
+#endif /* __DMAPI_SV_H__ */
-diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
---- linux-2.6.27/fs/dquot.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dquot.c 2009-03-25 16:11:39.000000000 +0000
-@@ -213,8 +213,6 @@ static struct hlist_head *dquot_hash;
+diff -r 9608d5473017 fs/dquot.c
+--- a/fs/dquot.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/dquot.c Wed May 06 16:56:47 2009 +0100
+@@ -213,8 +213,6 @@
struct dqstats dqstats;
static inline unsigned int
hashfn(const struct super_block *sb, unsigned int id, int type)
{
-@@ -417,6 +415,14 @@ out_dqlock:
+@@ -417,6 +415,14 @@
return ret;
}
/* Invalidate all dquots on the list. Note that this function is called after
* quota is disabled and pointers from inodes removed so there cannot be new
* quota users. There can still be some users of quotas due to inodes being
-@@ -465,9 +471,44 @@ restart:
+@@ -465,9 +471,44 @@
remove_dquot_hash(dquot);
remove_free_dquot(dquot);
remove_inuse(dquot);
- kmem_cache_free(dquot_cachep, dquot);
+ destroy_dquot(dquot);
-+ }
-+ spin_unlock(&dq_list_lock);
+ }
+ spin_unlock(&dq_list_lock);
+}
+
+/* Call callback for every active dquot on given filesystem */
+ spin_lock(&dq_list_lock);
+ /* We are safe to continue now because our dquot could not
+ * be moved out of the inuse list while we hold the reference */
- }
- spin_unlock(&dq_list_lock);
++ }
++ spin_unlock(&dq_list_lock);
+out:
+ dqput(old_dquot);
+ mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
}
int vfs_quota_sync(struct super_block *sb, int type)
-@@ -481,7 +522,7 @@ int vfs_quota_sync(struct super_block *s
+@@ -481,7 +522,7 @@
for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
if (type != -1 && cnt != type)
continue;
continue;
spin_lock(&dq_list_lock);
dirty = &dqopt->info[cnt].dqi_dirty_list;
-@@ -506,8 +547,8 @@ int vfs_quota_sync(struct super_block *s
+@@ -506,8 +547,8 @@
}
for (cnt = 0; cnt < MAXQUOTAS; cnt++)
sb->dq_op->write_info(sb, cnt);
spin_lock(&dq_list_lock);
dqstats.syncs++;
-@@ -529,7 +570,7 @@ static void prune_dqcache(int count)
+@@ -529,7 +570,7 @@
remove_dquot_hash(dquot);
remove_free_dquot(dquot);
remove_inuse(dquot);
count--;
head = free_dquots.prev;
}
-@@ -560,7 +601,7 @@ static struct shrinker dqcache_shrinker
+@@ -560,7 +601,7 @@
* NOTE: If you change this function please check whether dqput_blocks() works right...
* MUST be called with either dqptr_sem or dqonoff_mutex held
*/
{
int ret;
-@@ -586,7 +627,7 @@ we_slept:
+@@ -586,7 +627,7 @@
/* We have more than one user... nothing to do */
atomic_dec(&dquot->dq_count);
/* Releasing dquot during quotaoff phase? */
atomic_read(&dquot->dq_count) == 1)
wake_up(&dquot->dq_wait_unused);
spin_unlock(&dq_list_lock);
-@@ -631,7 +672,10 @@ static struct dquot *get_empty_dquot(str
+@@ -631,7 +672,10 @@
{
struct dquot *dquot;
if(!dquot)
return NODQUOT;
-@@ -649,15 +693,33 @@ static struct dquot *get_empty_dquot(str
+@@ -649,15 +693,33 @@
}
/*
return NODQUOT;
we_slept:
spin_lock(&dq_list_lock);
-@@ -684,7 +746,7 @@ we_slept:
+@@ -684,7 +746,7 @@
dqstats.lookups++;
spin_unlock(&dq_list_lock);
if (empty)
}
/* Wait for dq_lock - after this we know that either dquot_release() is already
* finished or it will be canceled due to dq_count > 1 test */
-@@ -822,7 +884,7 @@ static void drop_dquot_ref(struct super_
+@@ -822,7 +884,7 @@
}
}
{
dquot->dq_dqb.dqb_curinodes += number;
}
-@@ -832,9 +894,10 @@ static inline void dquot_incr_space(stru
+@@ -832,9 +894,10 @@
dquot->dq_dqb.dqb_curspace += number;
}
dquot->dq_dqb.dqb_curinodes -= number;
else
dquot->dq_dqb.dqb_curinodes = 0;
-@@ -845,11 +908,12 @@ static inline void dquot_decr_inodes(str
+@@ -845,11 +908,12 @@
static inline void dquot_decr_space(struct dquot *dquot, qsize_t number)
{
dquot->dq_dqb.dqb_btime = (time_t) 0;
clear_bit(DQ_BLKS_B, &dquot->dq_flags);
}
-@@ -1027,10 +1091,11 @@ static inline char ignore_hardlimit(stru
+@@ -1027,10 +1091,11 @@
}
/* needs dq_data_lock */
return QUOTA_OK;
if (dquot->dq_dqb.dqb_ihardlimit &&
-@@ -1062,11 +1127,12 @@ static int check_idq(struct dquot *dquot
+@@ -1062,11 +1127,12 @@
static int check_bdq(struct dquot *dquot, qsize_t space, int prealloc, char *warntype)
{
*warntype = QUOTA_NL_NOWARN;
!ignore_hardlimit(dquot)) {
if (!prealloc)
*warntype = QUOTA_NL_BHARDWARN;
-@@ -1074,7 +1140,7 @@ static int check_bdq(struct dquot *dquot
+@@ -1074,7 +1140,7 @@
}
if (dquot->dq_dqb.dqb_bsoftlimit &&
dquot->dq_dqb.dqb_btime && get_seconds() >= dquot->dq_dqb.dqb_btime &&
!ignore_hardlimit(dquot)) {
if (!prealloc)
-@@ -1083,7 +1149,7 @@ static int check_bdq(struct dquot *dquot
+@@ -1083,7 +1149,7 @@
}
if (dquot->dq_dqb.dqb_bsoftlimit &&
dquot->dq_dqb.dqb_btime == 0) {
if (!prealloc) {
*warntype = QUOTA_NL_BSOFTWARN;
-@@ -1100,10 +1166,11 @@ static int check_bdq(struct dquot *dquot
+@@ -1100,10 +1166,11 @@
return QUOTA_OK;
}
return QUOTA_NL_NOWARN;
if (dquot->dq_dqb.dqb_curinodes - inodes <= dquot->dq_dqb.dqb_isoftlimit)
-@@ -1117,15 +1184,13 @@ static int info_idq_free(struct dquot *d
+@@ -1117,15 +1184,13 @@
static int info_bdq_free(struct dquot *dquot, qsize_t space)
{
if (test_bit(DQ_FAKE_B, &dquot->dq_flags) ||
return QUOTA_NL_BHARDBELOW;
return QUOTA_NL_NOWARN;
}
-@@ -1170,17 +1235,23 @@ out_err:
+@@ -1170,17 +1235,23 @@
* Release all quotas referenced by inode
* Transaction must be started at an entry
*/
up_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
return 0;
}
-@@ -1268,7 +1339,7 @@ warn_put_all:
+@@ -1268,7 +1339,7 @@
/*
* This operation can block, but only after everything is updated
*/
{
int cnt, ret = NO_QUOTA;
char warntype[MAXQUOTAS];
-@@ -1353,7 +1424,7 @@ out_sub:
+@@ -1353,7 +1424,7 @@
/*
* This operation can block, but only after everything is updated
*/
{
unsigned int cnt;
char warntype[MAXQUOTAS];
-@@ -1499,7 +1570,7 @@ warn_put_all:
+@@ -1499,7 +1570,7 @@
/* Wrapper for transferring ownership of an inode */
int vfs_dq_transfer(struct inode *inode, struct iattr *iattr)
{
vfs_dq_init(inode);
if (inode->i_sb->dq_op->transfer(inode, iattr) == NO_QUOTA)
return 1;
-@@ -1540,51 +1611,22 @@ struct dquot_operations dquot_operations
+@@ -1540,50 +1611,21 @@
.write_info = dquot_commit_info
};
int cnt, ret = 0;
struct quota_info *dqopt = sb_dqopt(sb);
struct inode *toputinode[MAXQUOTAS];
-
++
+ /* Cannot turn off usage accounting without turning off limits, or
+ * suspend quotas and simultaneously turn quotas off. */
+ if ((flags & DQUOT_USAGE_ENABLED && !(flags & DQUOT_LIMITS_ENABLED))
+ || (flags & DQUOT_SUSPENDED && flags & (DQUOT_LIMITS_ENABLED |
+ DQUOT_USAGE_ENABLED)))
+ return -EINVAL;
-+
+
/* We need to serialize quota_off() for device */
mutex_lock(&dqopt->dqonoff_mutex);
-
-@@ -1593,7 +1635,7 @@ int vfs_quota_off(struct super_block *sb
+@@ -1593,7 +1635,7 @@
* sometimes we are called when fill_super() failed and calling
* sync_fs() in such cases does no good.
*/
mutex_unlock(&dqopt->dqonoff_mutex);
return 0;
}
-@@ -1601,17 +1643,28 @@ int vfs_quota_off(struct super_block *sb
+@@ -1601,17 +1643,28 @@
toputinode[cnt] = NULL;
if (type != -1 && cnt != type)
continue;
/* Note: these are blocking operations */
drop_dquot_ref(sb, cnt);
-@@ -1627,7 +1680,7 @@ int vfs_quota_off(struct super_block *sb
+@@ -1627,7 +1680,7 @@
put_quota_format(dqopt->info[cnt].dqi_format);
toputinode[cnt] = dqopt->files[cnt];
dqopt->files[cnt] = NULL;
dqopt->info[cnt].dqi_flags = 0;
dqopt->info[cnt].dqi_igrace = 0;
-@@ -1635,6 +1688,11 @@ int vfs_quota_off(struct super_block *sb
+@@ -1635,6 +1688,11 @@
dqopt->ops[cnt] = NULL;
}
mutex_unlock(&dqopt->dqonoff_mutex);
/* Sync the superblock so that buffers with quota data are written to
* disk (and so userspace sees correct data afterwards). */
if (sb->s_op->sync_fs)
-@@ -1650,7 +1708,7 @@ int vfs_quota_off(struct super_block *sb
+@@ -1650,7 +1708,7 @@
mutex_lock(&dqopt->dqonoff_mutex);
/* If quota was reenabled in the meantime, we have
* nothing to do */
mutex_lock_nested(&toputinode[cnt]->i_mutex, I_MUTEX_QUOTA);
toputinode[cnt]->i_flags &= ~(S_IMMUTABLE |
S_NOATIME | S_NOQUOTA);
-@@ -1659,26 +1717,43 @@ int vfs_quota_off(struct super_block *sb
+@@ -1659,26 +1717,43 @@
mark_inode_dirty(toputinode[cnt]);
}
mutex_unlock(&dqopt->dqonoff_mutex);
- if (sb->s_bdev)
- invalidate_bdev(sb->s_bdev);
return ret;
- }
-
++}
++
+int vfs_quota_off(struct super_block *sb, int type, int remount)
+{
+ return vfs_quota_disable(sb, type, remount ? DQUOT_SUSPENDED :
+ (DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED));
-+}
-+
+ }
+
/*
* Turn quotas on on a device
*/
{
struct quota_format_type *fmt = find_quota_format(format_id);
struct super_block *sb = inode->i_sb;
-@@ -1700,27 +1775,37 @@ static int vfs_quota_on_inode(struct ino
+@@ -1700,27 +1775,37 @@
error = -EINVAL;
goto out_fmt;
}
error = -EIO;
dqopt->files[type] = igrab(inode);
-@@ -1741,7 +1826,7 @@ static int vfs_quota_on_inode(struct ino
+@@ -1741,7 +1826,7 @@
}
mutex_unlock(&dqopt->dqio_mutex);
mutex_unlock(&inode->i_mutex);
add_dquot_ref(sb, type);
mutex_unlock(&dqopt->dqonoff_mutex);
-@@ -1774,20 +1859,23 @@ static int vfs_quota_on_remount(struct s
+@@ -1774,20 +1859,23 @@
struct quota_info *dqopt = sb_dqopt(sb);
struct inode *inode;
int ret;
iput(inode);
return ret;
-@@ -1803,12 +1891,12 @@ int vfs_quota_on_path(struct super_block
+@@ -1803,12 +1891,12 @@
if (path->mnt->mnt_sb != sb)
error = -EXDEV;
else
int vfs_quota_on(struct super_block *sb, int type, int format_id, char *path,
int remount)
{
-@@ -1827,6 +1915,50 @@ int vfs_quota_on(struct super_block *sb,
- }
-
- /*
+@@ -1824,6 +1912,50 @@
+ path_put(&nd.path);
+ }
+ return error;
++}
++
++/*
+ * More powerful function for turning on quotas allowing setting
+ * of individual quota flags
+ */
+
+load_quota:
+ return vfs_load_quota_inode(inode, type, format_id, flags);
-+}
-+
-+/*
- * This function is used when filesystem needs to initialize quotas
- * during mount time.
- */
-@@ -1847,7 +1979,8 @@ int vfs_quota_on_mount(struct super_bloc
+ }
+
+ /*
+@@ -1847,7 +1979,8 @@
error = security_quota_on(dentry);
if (!error)
out:
dput(dentry);
-@@ -1870,14 +2003,24 @@ int vfs_dq_quota_on_remount(struct super
+@@ -1870,14 +2003,24 @@
return ret;
}
di->dqb_curspace = dm->dqb_curspace;
di->dqb_ihardlimit = dm->dqb_ihardlimit;
di->dqb_isoftlimit = dm->dqb_isoftlimit;
-@@ -1922,28 +2065,36 @@ static int do_set_dqblk(struct dquot *dq
+@@ -1922,28 +2065,36 @@
if (di->dqb_valid & QIF_SPACE) {
dm->dqb_curspace = di->dqb_curspace;
check_blim = 1;
dm->dqb_btime = 0;
clear_bit(DQ_BLKS_B, &dquot->dq_flags);
}
-@@ -1974,12 +2125,14 @@ int vfs_set_dqblk(struct super_block *sb
+@@ -1974,12 +2125,14 @@
int rc;
mutex_lock(&sb_dqopt(sb)->dqonoff_mutex);
mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
return rc;
}
-@@ -1990,7 +2143,7 @@ int vfs_get_dqinfo(struct super_block *s
+@@ -1990,7 +2143,7 @@
struct mem_dqinfo *mi;
mutex_lock(&sb_dqopt(sb)->dqonoff_mutex);
mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
return -ESRCH;
}
-@@ -2009,11 +2162,12 @@ int vfs_get_dqinfo(struct super_block *s
+@@ -2009,11 +2162,12 @@
int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii)
{
struct mem_dqinfo *mi;
}
mi = sb_dqopt(sb)->info + type;
spin_lock(&dq_data_lock);
-@@ -2027,8 +2181,9 @@ int vfs_set_dqinfo(struct super_block *s
+@@ -2027,8 +2181,9 @@
mark_info_dirty(sb, type);
/* Force write to disk */
sb->dq_op->write_info(sb, type);
}
struct quotactl_ops vfs_quotactl_ops = {
-@@ -2190,10 +2345,13 @@ EXPORT_SYMBOL(register_quota_format);
+@@ -2190,10 +2345,13 @@
EXPORT_SYMBOL(unregister_quota_format);
EXPORT_SYMBOL(dqstats);
EXPORT_SYMBOL(dq_data_lock);
EXPORT_SYMBOL(vfs_quota_sync);
EXPORT_SYMBOL(vfs_get_dqinfo);
EXPORT_SYMBOL(vfs_set_dqinfo);
-@@ -2206,7 +2364,11 @@ EXPORT_SYMBOL(dquot_release);
+@@ -2206,7 +2364,11 @@
EXPORT_SYMBOL(dquot_mark_dquot_dirty);
EXPORT_SYMBOL(dquot_initialize);
EXPORT_SYMBOL(dquot_drop);
EXPORT_SYMBOL(dquot_alloc_space);
EXPORT_SYMBOL(dquot_alloc_inode);
EXPORT_SYMBOL(dquot_free_space);
-diff -purN linux-2.6.27/fs/ecryptfs/inode.c linux-2.6.27.19-5.1/fs/ecryptfs/inode.c
---- linux-2.6.27/fs/ecryptfs/inode.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ecryptfs/inode.c 2009-03-25 16:11:37.000000000 +0000
-@@ -403,19 +403,24 @@ static int ecryptfs_link(struct dentry *
+diff -r 9608d5473017 fs/ecryptfs/inode.c
+--- a/fs/ecryptfs/inode.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ecryptfs/inode.c Wed May 06 16:56:47 2009 +0100
+@@ -403,19 +403,24 @@
struct dentry *new_dentry)
{
struct dentry *lower_old_dentry;
if (rc || !lower_new_dentry->d_inode)
goto out_lock;
rc = ecryptfs_interpose(lower_new_dentry, new_dentry, dir->i_sb, 0);
-@@ -440,11 +445,12 @@ static int ecryptfs_unlink(struct inode
+@@ -440,11 +445,12 @@
{
int rc = 0;
struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);
if (rc) {
printk(KERN_ERR "Error in vfs_unlink; rc = [%d]\n", rc);
goto out_unlock;
-@@ -464,6 +470,7 @@ static int ecryptfs_symlink(struct inode
+@@ -464,6 +470,7 @@
{
int rc;
struct dentry *lower_dentry;
struct dentry *lower_dir_dentry;
char *encoded_symname;
int encoded_symlen;
-@@ -471,6 +478,7 @@ static int ecryptfs_symlink(struct inode
+@@ -471,6 +478,7 @@
lower_dentry = ecryptfs_dentry_to_lower(dentry);
dget(lower_dentry);
lower_dir_dentry = lock_parent(lower_dentry);
encoded_symlen = ecryptfs_encode_filename(crypt_stat, symname,
strlen(symname),
-@@ -479,7 +487,7 @@ static int ecryptfs_symlink(struct inode
+@@ -479,7 +487,7 @@
rc = encoded_symlen;
goto out_lock;
}
encoded_symname);
kfree(encoded_symname);
if (rc || !lower_dentry->d_inode)
-@@ -501,11 +509,14 @@ static int ecryptfs_mkdir(struct inode *
+@@ -501,11 +509,14 @@
{
int rc;
struct dentry *lower_dentry;
if (rc || !lower_dentry->d_inode)
goto out;
rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 0);
-@@ -524,14 +535,16 @@ out:
+@@ -524,14 +535,16 @@
static int ecryptfs_rmdir(struct inode *dir, struct dentry *dentry)
{
struct dentry *lower_dentry;
dput(lower_dentry);
if (!rc)
d_delete(lower_dentry);
-@@ -549,11 +562,14 @@ ecryptfs_mknod(struct inode *dir, struct
+@@ -549,11 +562,14 @@
{
int rc;
struct dentry *lower_dentry;
if (rc || !lower_dentry->d_inode)
goto out;
rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 0);
-@@ -574,19 +590,24 @@ ecryptfs_rename(struct inode *old_dir, s
+@@ -574,19 +590,24 @@
{
int rc;
struct dentry *lower_old_dentry;
if (rc)
goto out_lock;
fsstack_copy_attr_all(new_dir, lower_new_dir_dentry->d_inode, NULL);
-@@ -673,10 +694,11 @@ static void *ecryptfs_follow_link(struct
+@@ -673,10 +694,11 @@
ecryptfs_printk(KERN_DEBUG, "Calling readlink w/ "
"dentry->d_name.name = [%s]\n", dentry->d_name.name);
rc = dentry->d_inode->i_op->readlink(dentry, (char __user *)buf, len);
rc = 0;
nd_set_link(nd, buf);
goto out;
-@@ -849,6 +871,7 @@ static int ecryptfs_setattr(struct dentr
+@@ -849,6 +871,7 @@
{
int rc = 0;
struct dentry *lower_dentry;
struct inode *inode;
struct inode *lower_inode;
struct ecryptfs_crypt_stat *crypt_stat;
-@@ -859,6 +882,7 @@ static int ecryptfs_setattr(struct dentr
+@@ -859,6 +882,7 @@
inode = dentry->d_inode;
lower_inode = ecryptfs_inode_to_lower(inode);
lower_dentry = ecryptfs_dentry_to_lower(dentry);
mutex_lock(&crypt_stat->cs_mutex);
if (S_ISDIR(dentry->d_inode->i_mode))
crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED);
-@@ -910,7 +934,7 @@ static int ecryptfs_setattr(struct dentr
+@@ -910,7 +934,7 @@
ia->ia_valid &= ~ATTR_MODE;
mutex_lock(&lower_dentry->d_inode->i_mutex);
mutex_unlock(&lower_dentry->d_inode->i_mutex);
out:
fsstack_copy_attr_all(inode, lower_inode, NULL);
-diff -purN linux-2.6.27/fs/ecryptfs/keystore.c linux-2.6.27.19-5.1/fs/ecryptfs/keystore.c
---- linux-2.6.27/fs/ecryptfs/keystore.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ecryptfs/keystore.c 2009-03-25 16:11:37.000000000 +0000
-@@ -1037,17 +1037,14 @@ static int
+diff -r 9608d5473017 fs/ecryptfs/keystore.c
+--- a/fs/ecryptfs/keystore.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ecryptfs/keystore.c Wed May 06 16:56:47 2009 +0100
+@@ -1037,16 +1037,13 @@
decrypt_passphrase_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
struct ecryptfs_crypt_stat *crypt_stat)
{
.flags = CRYPTO_TFM_REQ_MAY_SLEEP
};
int rc = 0;
-
+-
- sg_init_table(&dst_sg, 1);
- sg_init_table(&src_sg, 1);
--
+
if (unlikely(ecryptfs_verbosity > 0)) {
ecryptfs_printk(
- KERN_DEBUG, "Session key encryption key (size [%d]):\n",
-@@ -1066,8 +1063,8 @@ decrypt_passphrase_encrypted_session_key
+@@ -1066,8 +1063,8 @@
}
rc = virt_to_scatterlist(auth_tok->session_key.encrypted_key,
auth_tok->session_key.encrypted_key_size,
printk(KERN_ERR "Internal error whilst attempting to convert "
"auth_tok->session_key.encrypted_key to scatterlist; "
"expected rc = 1; got rc = [%d]. "
-@@ -1079,8 +1076,8 @@ decrypt_passphrase_encrypted_session_key
+@@ -1079,8 +1076,8 @@
auth_tok->session_key.encrypted_key_size;
rc = virt_to_scatterlist(auth_tok->session_key.decrypted_key,
auth_tok->session_key.decrypted_key_size,
printk(KERN_ERR "Internal error whilst attempting to convert "
"auth_tok->session_key.decrypted_key to scatterlist; "
"expected rc = 1; got rc = [%d]\n", rc);
-@@ -1096,7 +1093,7 @@ decrypt_passphrase_encrypted_session_key
+@@ -1096,7 +1093,7 @@
rc = -EINVAL;
goto out;
}
auth_tok->session_key.encrypted_key_size);
mutex_unlock(tfm_mutex);
if (unlikely(rc)) {
-@@ -1541,8 +1538,8 @@ write_tag_3_packet(char *dest, size_t *r
+@@ -1541,8 +1538,8 @@
size_t i;
size_t encrypted_session_key_valid = 0;
char session_key_encryption_key[ECRYPTFS_MAX_KEY_BYTES];
struct mutex *tfm_mutex = NULL;
u8 cipher_code;
size_t packet_size_length;
-@@ -1621,8 +1618,8 @@ write_tag_3_packet(char *dest, size_t *r
+@@ -1621,8 +1618,8 @@
ecryptfs_dump_hex(session_key_encryption_key, 16);
}
rc = virt_to_scatterlist(crypt_stat->key, key_rec->enc_key_size,
ecryptfs_printk(KERN_ERR, "Error generating scatterlist "
"for crypt_stat session key; expected rc = 1; "
"got rc = [%d]. key_rec->enc_key_size = [%d]\n",
-@@ -1631,8 +1628,8 @@ write_tag_3_packet(char *dest, size_t *r
+@@ -1631,8 +1628,8 @@
goto out;
}
rc = virt_to_scatterlist(key_rec->enc_key, key_rec->enc_key_size,
ecryptfs_printk(KERN_ERR, "Error generating scatterlist "
"for crypt_stat encrypted session key; "
"expected rc = 1; got rc = [%d]. "
-@@ -1653,7 +1650,7 @@ write_tag_3_packet(char *dest, size_t *r
+@@ -1653,7 +1650,7 @@
rc = 0;
ecryptfs_printk(KERN_DEBUG, "Encrypting [%d] bytes of the key\n",
crypt_stat->key_size);
(*key_rec).enc_key_size);
mutex_unlock(tfm_mutex);
if (rc) {
-diff -purN linux-2.6.27/fs/eventfd.c linux-2.6.27.19-5.1/fs/eventfd.c
---- linux-2.6.27/fs/eventfd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/eventfd.c 2009-03-25 16:11:39.000000000 +0000
-@@ -198,7 +198,7 @@ struct file *eventfd_fget(int fd)
+diff -r 9608d5473017 fs/eventfd.c
+--- a/fs/eventfd.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/eventfd.c Wed May 06 16:56:47 2009 +0100
+@@ -198,7 +198,7 @@
return file;
}
{
int fd;
struct eventfd_ctx *ctx;
-@@ -228,8 +228,7 @@ asmlinkage long sys_eventfd2(unsigned in
+@@ -228,8 +228,7 @@
return fd;
}
return sys_eventfd2(count, 0);
}
-
-diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
---- linux-2.6.27/fs/eventpoll.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/eventpoll.c 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/eventpoll.c
+--- a/fs/eventpoll.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/eventpoll.c Wed May 06 16:56:47 2009 +0100
@@ -102,6 +102,8 @@
#define EP_UNACTIVE_PTR ((void *) -1L)
struct epoll_filefd {
struct file *file;
int fd;
-@@ -200,6 +202,9 @@ struct eventpoll {
+@@ -200,6 +202,9 @@
* holding ->lock.
*/
struct epitem *ovflist;
};
/* Wait structure used by the poll hooks */
-@@ -227,9 +232,15 @@ struct ep_pqueue {
+@@ -227,9 +232,15 @@
};
/*
/* Safe wake up implementation */
static struct poll_safewake psw;
-@@ -240,6 +251,25 @@ static struct kmem_cache *epi_cache __re
+@@ -239,6 +250,25 @@
+
/* Slab cache used to allocate "struct eppoll_entry" */
static struct kmem_cache *pwq_cache __read_mostly;
-
++
+#ifdef CONFIG_SYSCTL
+
+#include <linux/sysctl.h>
+ { .ctl_name = 0 }
+};
+#endif /* CONFIG_SYSCTL */
-+
+
/* Setup the structure that is used as key for the RB tree */
- static inline void ep_set_ffd(struct epoll_filefd *ffd,
-@@ -402,6 +432,8 @@ static int ep_remove(struct eventpoll *e
+@@ -402,6 +432,8 @@
/* At this point it is safe to free the eventpoll item */
kmem_cache_free(epi_cache, epi);
DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ep_remove(%p, %p)\n",
current, ep, file));
-@@ -449,6 +481,7 @@ static void ep_free(struct eventpoll *ep
+@@ -449,6 +481,7 @@
mutex_unlock(&epmutex);
mutex_destroy(&ep->mtx);
kfree(ep);
}
-@@ -532,10 +565,15 @@ void eventpoll_release_file(struct file
+@@ -532,10 +565,15 @@
static int ep_alloc(struct eventpoll **pep)
{
spin_lock_init(&ep->lock);
mutex_init(&ep->mtx);
-@@ -544,12 +582,17 @@ static int ep_alloc(struct eventpoll **p
+@@ -544,12 +582,17 @@
INIT_LIST_HEAD(&ep->rdllist);
ep->rbr = RB_ROOT;
ep->ovflist = EP_UNACTIVE_PTR;
}
/*
-@@ -703,9 +746,11 @@ static int ep_insert(struct eventpoll *e
+@@ -703,9 +746,11 @@
struct epitem *epi;
struct ep_pqueue epq;
/* Item initialization follow here ... */
INIT_LIST_HEAD(&epi->rdllink);
-@@ -735,6 +780,7 @@ static int ep_insert(struct eventpoll *e
+@@ -735,6 +780,7 @@
* install process. Namely an allocation for a wait queue failed due
* high memory pressure.
*/
if (epi->nwait < 0)
goto error_unregister;
-@@ -765,6 +811,8 @@ static int ep_insert(struct eventpoll *e
+@@ -765,6 +811,8 @@
spin_unlock_irqrestore(&ep->lock, flags);
/* We have to call this outside the lock */
if (pwake)
ep_poll_safewake(&psw, &ep->poll_wait);
-@@ -789,7 +837,7 @@ error_unregister:
+@@ -789,7 +837,7 @@
spin_unlock_irqrestore(&ep->lock, flags);
kmem_cache_free(epi_cache, epi);
return error;
}
-@@ -1043,7 +1091,7 @@ retry:
+@@ -1043,7 +1091,7 @@
/*
* Open an eventpoll file descriptor.
*/
{
int error, fd = -1;
struct eventpoll *ep;
-@@ -1082,7 +1130,7 @@ error_return:
+@@ -1082,7 +1130,7 @@
return fd;
}
{
if (size < 0)
return -EINVAL;
-@@ -1095,8 +1143,8 @@ asmlinkage long sys_epoll_create(int siz
+@@ -1095,8 +1143,8 @@
* the eventpoll file that enables the insertion/removal/change of
* file descriptors inside the interest set.
*/
{
int error;
struct file *file, *tfile;
-@@ -1193,8 +1241,8 @@ error_return:
+@@ -1193,8 +1241,8 @@
* Implement the event wait interface for the eventpoll file. It is the kernel
* part of the user space epoll_wait(2).
*/
{
int error;
struct file *file;
-@@ -1251,9 +1299,9 @@ error_return:
+@@ -1251,9 +1299,9 @@
* Implement the event wait interface for the eventpoll file. It is the kernel
* part of the user space epoll_pwait(2).
*/
{
int error;
sigset_t ksigmask, sigsaved;
-@@ -1295,7 +1343,14 @@ asmlinkage long sys_epoll_pwait(int epfd
+@@ -1295,7 +1343,14 @@
static int __init eventpoll_init(void)
{
/* Initialize the structure used to perform safe poll wait head wake ups */
ep_poll_safewake_init(&psw);
-diff -purN linux-2.6.27/fs/exec.c linux-2.6.27.19-5.1/fs/exec.c
---- linux-2.6.27/fs/exec.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/exec.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/exec.c
+--- a/fs/exec.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/exec.c Wed May 06 16:56:47 2009 +0100
@@ -50,6 +50,7 @@
#include <linux/cn_proc.h>
#include <linux/audit.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
-@@ -105,7 +106,7 @@ static inline void put_binfmt(struct lin
+@@ -105,7 +106,7 @@
*
* Also note that we take the address to load from from the file itself.
*/
{
struct file *file;
struct nameidata nd;
-@@ -690,6 +691,14 @@ struct file *open_exec(const char *name)
+@@ -690,6 +691,14 @@
if (IS_ERR(file))
return file;
err = deny_write_access(file);
if (err) {
fput(file);
-@@ -1164,6 +1173,7 @@ EXPORT_SYMBOL(remove_arg_zero);
+@@ -1164,6 +1173,7 @@
*/
int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
{
int try,retval;
struct linux_binfmt *fmt;
#ifdef __alpha__
-@@ -1224,8 +1234,15 @@ int search_binary_handler(struct linux_b
+@@ -1224,8 +1234,15 @@
continue;
read_unlock(&binfmt_lock);
retval = fn(bprm, regs);
put_binfmt(fmt);
allow_write_access(bprm->file);
if (bprm->file)
-@@ -1339,6 +1356,7 @@ int do_execve(char * filename,
+@@ -1339,6 +1356,7 @@
current->flags &= ~PF_KTHREAD;
retval = search_binary_handler(bprm,regs);
if (retval >= 0) {
/* execve success */
security_bprm_free(bprm);
acct_update_integrals(current);
-@@ -1827,7 +1845,8 @@ int do_coredump(long signr, int exit_cod
+@@ -1827,7 +1845,8 @@
goto close_fail;
if (!file->f_op->write)
goto close_fail;
goto close_fail;
retval = binfmt->core_dump(signr, regs, file, core_limit);
-diff -purN linux-2.6.27/fs/ext2/balloc.c linux-2.6.27.19-5.1/fs/ext2/balloc.c
---- linux-2.6.27/fs/ext2/balloc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext2/balloc.c 2009-03-25 16:11:39.000000000 +0000
-@@ -1295,6 +1295,7 @@ retry_alloc:
+diff -r 9608d5473017 fs/ext2/balloc.c
+--- a/fs/ext2/balloc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext2/balloc.c Wed May 06 16:56:47 2009 +0100
+@@ -1295,6 +1295,7 @@
* turn off reservation for this allocation
*/
if (my_rsv && (free_blocks < windowsz)
&& (rsv_is_empty(&my_rsv->rsv_window)))
my_rsv = NULL;
-@@ -1332,7 +1333,7 @@ retry_alloc:
+@@ -1332,7 +1333,7 @@
* free blocks is less than half of the reservation
* window size.
*/
continue;
brelse(bitmap_bh);
-diff -purN linux-2.6.27/fs/ext2/dir.c linux-2.6.27.19-5.1/fs/ext2/dir.c
---- linux-2.6.27/fs/ext2/dir.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext2/dir.c 2009-03-25 16:11:39.000000000 +0000
-@@ -103,7 +103,7 @@ static int ext2_commit_chunk(struct page
+diff -r 9608d5473017 fs/ext2/dir.c
+--- a/fs/ext2/dir.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext2/dir.c Wed May 06 16:56:47 2009 +0100
+@@ -103,7 +103,7 @@
return err;
}
{
struct inode *dir = page->mapping->host;
struct super_block *sb = dir->i_sb;
-@@ -146,10 +146,10 @@ out:
+@@ -146,10 +146,10 @@
/* Too bad, we had an error */
Ebadsize:
goto fail;
Eshort:
error = "rec_len is smaller than minimal";
-@@ -166,32 +166,36 @@ Espan:
+@@ -166,32 +166,36 @@
Einumber:
error = "inode out of bounds";
bad_entry:
if (PageError(page))
goto fail;
}
-@@ -292,7 +296,7 @@ ext2_readdir (struct file * filp, void *
+@@ -292,7 +296,7 @@
for ( ; n < npages; n++, offset = 0) {
char *kaddr, *limit;
ext2_dirent *de;
if (IS_ERR(page)) {
ext2_error(sb, __func__,
-@@ -361,6 +365,7 @@ struct ext2_dir_entry_2 * ext2_find_entr
+@@ -361,6 +365,7 @@
struct page *page = NULL;
struct ext2_inode_info *ei = EXT2_I(dir);
ext2_dirent * de;
if (npages == 0)
goto out;
-@@ -374,7 +379,7 @@ struct ext2_dir_entry_2 * ext2_find_entr
+@@ -374,7 +379,7 @@
n = start;
do {
char *kaddr;
if (!IS_ERR(page)) {
kaddr = page_address(page);
de = (ext2_dirent *) kaddr;
-@@ -391,7 +396,9 @@ struct ext2_dir_entry_2 * ext2_find_entr
+@@ -391,7 +396,9 @@
de = ext2_next_entry(de);
}
ext2_put_page(page);
if (++n >= npages)
n = 0;
/* next page is past the blocks we've got */
-@@ -414,7 +421,7 @@ found:
+@@ -414,7 +421,7 @@
struct ext2_dir_entry_2 * ext2_dotdot (struct inode *dir, struct page **p)
{
ext2_dirent *de = NULL;
if (!IS_ERR(page)) {
-@@ -487,7 +494,7 @@ int ext2_add_link (struct dentry *dentry
+@@ -487,7 +494,7 @@
for (n = 0; n <= npages; n++) {
char *dir_end;
err = PTR_ERR(page);
if (IS_ERR(page))
goto out;
-@@ -655,14 +662,17 @@ int ext2_empty_dir (struct inode * inode
+@@ -655,14 +662,17 @@
{
struct page *page = NULL;
unsigned long i, npages = dir_pages(inode);
kaddr = page_address(page);
de = (ext2_dirent *)kaddr;
-diff -purN linux-2.6.27/fs/ext2/fsync.c linux-2.6.27.19-5.1/fs/ext2/fsync.c
---- linux-2.6.27/fs/ext2/fsync.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext2/fsync.c 2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/ext2/fsync.c
+--- a/fs/ext2/fsync.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext2/fsync.c Wed May 06 16:56:47 2009 +0100
@@ -24,6 +24,7 @@
#include "ext2.h"
if (!(inode->i_state & I_DIRTY))
return ret;
if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
-diff -purN linux-2.6.27/fs/ext2/super.c linux-2.6.27.19-5.1/fs/ext2/super.c
---- linux-2.6.27/fs/ext2/super.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext2/super.c 2009-03-25 16:11:39.000000000 +0000
-@@ -1177,9 +1177,12 @@ static int ext2_remount (struct super_bl
+diff -r 9608d5473017 fs/ext2/super.c
+--- a/fs/ext2/super.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext2/super.c Wed May 06 16:56:47 2009 +0100
+@@ -1177,9 +1177,12 @@
es = sbi->s_es;
if (((sbi->s_mount_opt & EXT2_MOUNT_XIP) !=
(old_mount_opt & EXT2_MOUNT_XIP)) &&
if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
return 0;
if (*flags & MS_RDONLY) {
-diff -purN linux-2.6.27/fs/ext3/Makefile linux-2.6.27.19-5.1/fs/ext3/Makefile
---- linux-2.6.27/fs/ext3/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/Makefile 2009-03-25 16:11:35.000000000 +0000
-@@ -10,3 +10,4 @@ ext3-y := balloc.o bitmap.o dir.o file.o
+diff -r 9608d5473017 fs/ext3/Makefile
+--- a/fs/ext3/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/Makefile Wed May 06 16:56:47 2009 +0100
+@@ -10,3 +10,4 @@
ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o
ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
ext3-$(CONFIG_EXT3_FS_SECURITY) += xattr_security.o
+ext3-$(CONFIG_EXT3_FS_NFS4ACL) += nfs4acl.o
-diff -purN linux-2.6.27/fs/ext3/acl.c linux-2.6.27.19-5.1/fs/ext3/acl.c
---- linux-2.6.27/fs/ext3/acl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/acl.c 2009-03-25 16:11:35.000000000 +0000
-@@ -282,7 +282,7 @@ ext3_set_acl(handle_t *handle, struct in
+diff -r 9608d5473017 fs/ext3/acl.c
+--- a/fs/ext3/acl.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/acl.c Wed May 06 16:56:47 2009 +0100
+@@ -282,7 +282,7 @@
return error;
}
ext3_check_acl(struct inode *inode, int mask)
{
struct posix_acl *acl = ext3_get_acl(inode, ACL_TYPE_ACCESS);
-@@ -298,12 +298,6 @@ ext3_check_acl(struct inode *inode, int
- return -EAGAIN;
- }
+@@ -296,12 +296,6 @@
+ }
+ return -EAGAIN;
+-}
+-
-int
-ext3_permission(struct inode *inode, int mask)
-{
- return generic_permission(inode, mask, ext3_check_acl);
--}
--
+ }
+
/*
- * Initialize the ACLs of a new inode. Called from ext3_new_inode.
- *
-diff -purN linux-2.6.27/fs/ext3/acl.h linux-2.6.27.19-5.1/fs/ext3/acl.h
---- linux-2.6.27/fs/ext3/acl.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/acl.h 2009-03-25 16:11:35.000000000 +0000
-@@ -58,13 +58,13 @@ static inline int ext3_acl_count(size_t
+diff -r 9608d5473017 fs/ext3/acl.h
+--- a/fs/ext3/acl.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/acl.h Wed May 06 16:56:47 2009 +0100
+@@ -58,13 +58,13 @@
#define EXT3_ACL_NOT_CACHED ((void *)-1)
/* acl.c */
static inline int
ext3_acl_chmod(struct inode *inode)
-diff -purN linux-2.6.27/fs/ext3/balloc.c linux-2.6.27.19-5.1/fs/ext3/balloc.c
---- linux-2.6.27/fs/ext3/balloc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/balloc.c 2009-03-25 16:11:35.000000000 +0000
-@@ -1547,6 +1547,7 @@ retry_alloc:
+diff -r 9608d5473017 fs/ext3/balloc.c
+--- a/fs/ext3/balloc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/balloc.c Wed May 06 16:56:47 2009 +0100
+@@ -1547,6 +1547,7 @@
* turn off reservation for this allocation
*/
if (my_rsv && (free_blocks < windowsz)
&& (rsv_is_empty(&my_rsv->rsv_window)))
my_rsv = NULL;
-@@ -1585,7 +1586,7 @@ retry_alloc:
+@@ -1585,7 +1586,7 @@
* free blocks is less than half of the reservation
* window size.
*/
continue;
brelse(bitmap_bh);
-diff -purN linux-2.6.27/fs/ext3/dir.c linux-2.6.27.19-5.1/fs/ext3/dir.c
---- linux-2.6.27/fs/ext3/dir.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/dir.c 2009-03-25 16:11:32.000000000 +0000
-@@ -102,6 +102,7 @@ static int ext3_readdir(struct file * fi
+diff -r 9608d5473017 fs/ext3/dir.c
+--- a/fs/ext3/dir.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/dir.c Wed May 06 16:56:47 2009 +0100
+@@ -102,6 +102,7 @@
int err;
struct inode *inode = filp->f_path.dentry->d_inode;
int ret = 0;
sb = inode->i_sb;
-@@ -148,9 +149,12 @@ static int ext3_readdir(struct file * fi
+@@ -148,9 +149,12 @@
* of recovering data when there's a bad sector
*/
if (!bh) {
/* corrupt size? Maybe no more blocks to read */
if (filp->f_pos > inode->i_blocks << 9)
break;
-@@ -410,7 +414,7 @@ static int call_filldir(struct file * fi
+@@ -410,7 +414,7 @@
get_dtype(sb, fname->file_type));
if (error) {
filp->f_pos = curr_pos;
return error;
}
fname = fname->next;
-@@ -449,11 +453,12 @@ static int ext3_dx_readdir(struct file *
+@@ -449,11 +453,12 @@
* If there are any leftover names on the hash collision
* chain, return them first.
*/
info->curr_node = rb_first(&info->root);
while (1) {
-@@ -484,9 +489,14 @@ static int ext3_dx_readdir(struct file *
+@@ -484,9 +489,14 @@
info->curr_minor_hash = fname->minor_hash;
if (call_filldir(filp, dirent, filldir, fname))
break;
if (info->next_hash == ~0) {
filp->f_pos = EXT3_HTREE_EOF;
break;
-diff -purN linux-2.6.27/fs/ext3/file.c linux-2.6.27.19-5.1/fs/ext3/file.c
---- linux-2.6.27/fs/ext3/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/file.c 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/ext3/file.c
+--- a/fs/ext3/file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/file.c Wed May 06 16:56:47 2009 +0100
@@ -23,8 +23,10 @@
#include <linux/jbd.h>
#include <linux/ext3_fs.h>
/*
* Called when an inode is released. Note that this is different
-@@ -134,5 +136,7 @@ const struct inode_operations ext3_file_
+@@ -134,5 +136,7 @@
.removexattr = generic_removexattr,
#endif
.permission = ext3_permission,
+ .may_delete = ext3_may_delete,
};
-diff -purN linux-2.6.27/fs/ext3/fsync.c linux-2.6.27.19-5.1/fs/ext3/fsync.c
---- linux-2.6.27/fs/ext3/fsync.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/fsync.c 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/ext3/fsync.c
+--- a/fs/ext3/fsync.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/fsync.c Wed May 06 16:56:47 2009 +0100
@@ -27,6 +27,7 @@
#include <linux/sched.h>
#include <linux/writeback.h>
#include <linux/ext3_fs.h>
#include <linux/ext3_jbd.h>
-@@ -84,7 +85,10 @@ int ext3_sync_file(struct file * file, s
+@@ -84,7 +85,10 @@
.sync_mode = WB_SYNC_ALL,
.nr_to_write = 0, /* sys_fsync did this */
};
}
out:
return ret;
-diff -purN linux-2.6.27/fs/ext3/ialloc.c linux-2.6.27.19-5.1/fs/ext3/ialloc.c
---- linux-2.6.27/fs/ext3/ialloc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/ialloc.c 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/ext3/ialloc.c
+--- a/fs/ext3/ialloc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/ialloc.c Wed May 06 16:56:47 2009 +0100
@@ -28,6 +28,7 @@
#include "xattr.h"
/*
* ialloc.c contains the inodes allocation and deallocation routines
-@@ -595,7 +596,10 @@ got:
+@@ -595,7 +596,10 @@
goto fail_drop;
}
if (err)
goto fail_free_drop;
-diff -purN linux-2.6.27/fs/ext3/inode.c linux-2.6.27.19-5.1/fs/ext3/inode.c
---- linux-2.6.27/fs/ext3/inode.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/inode.c 2009-03-25 16:11:33.000000000 +0000
+diff -r 9608d5473017 fs/ext3/inode.c
+--- a/fs/ext3/inode.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/inode.c Wed May 06 16:56:47 2009 +0100
@@ -38,6 +38,7 @@
#include <linux/bio.h>
#include "xattr.h"
static int ext3_writepage_trans_blocks(struct inode *inode);
-@@ -1152,7 +1153,7 @@ static int ext3_write_begin(struct file
+@@ -1152,7 +1153,7 @@
to = from + len;
retry:
if (!page)
return -ENOMEM;
*pagep = page;
-@@ -2699,6 +2700,9 @@ struct inode *ext3_iget(struct super_blo
+@@ -2699,6 +2700,9 @@
ei->i_acl = EXT3_ACL_NOT_CACHED;
ei->i_default_acl = EXT3_ACL_NOT_CACHED;
#endif
ei->i_block_alloc_info = NULL;
ret = __ext3_get_inode_loc(inode, &iloc, 0);
-@@ -2998,6 +3002,65 @@ int ext3_write_inode(struct inode *inode
+@@ -2998,6 +3002,65 @@
return ext3_force_commit(inode->i_sb);
}
/*
* ext3_setattr()
*
-@@ -3021,7 +3084,7 @@ int ext3_setattr(struct dentry *dentry,
+@@ -3021,7 +3084,7 @@
int error, rc = 0;
const unsigned int ia_valid = attr->ia_valid;
if (error)
return error;
-@@ -3078,8 +3141,12 @@ int ext3_setattr(struct dentry *dentry,
+@@ -3078,8 +3141,12 @@
if (inode->i_nlink)
ext3_orphan_del(NULL, inode);
err_out:
ext3_std_error(inode->i_sb, error);
-diff -purN linux-2.6.27/fs/ext3/namei.c linux-2.6.27.19-5.1/fs/ext3/namei.c
---- linux-2.6.27/fs/ext3/namei.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/namei.c 2009-03-25 16:11:34.000000000 +0000
+diff -r 9608d5473017 fs/ext3/namei.c
+--- a/fs/ext3/namei.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/namei.c Wed May 06 16:56:47 2009 +0100
@@ -40,6 +40,7 @@
#include "namei.h"
#include "xattr.h"
/*
* define how far ahead to read directories while searching them.
-@@ -1374,7 +1375,7 @@ static int make_indexed_dir(handle_t *ha
+@@ -1374,7 +1375,7 @@
struct fake_dirent *fde;
blocksize = dir->i_sb->s_blocksize;
retval = ext3_journal_get_write_access(handle, bh);
if (retval) {
ext3_std_error(dir->i_sb, retval);
-@@ -1383,6 +1384,19 @@ static int make_indexed_dir(handle_t *ha
+@@ -1382,6 +1383,19 @@
+ return retval;
}
root = (struct dx_root *) bh->b_data;
-
++
+ /* The 0th block becomes the root, move the dirents out */
+ fde = &root->dotdot;
+ de = (struct ext3_dir_entry_2 *)((char *)fde +
+ return -EIO;
+ }
+ len = ((char *) root) + blocksize - (char *) de;
-+
+
bh2 = ext3_append (handle, dir, &block, &retval);
if (!(bh2)) {
- brelse(bh);
-@@ -1391,11 +1405,6 @@ static int make_indexed_dir(handle_t *ha
+@@ -1391,11 +1405,6 @@
EXT3_I(dir)->i_flags |= EXT3_INDEX_FL;
data1 = bh2->b_data;
memcpy (data1, de, len);
de = (struct ext3_dir_entry_2 *) data1;
top = data1 + len;
-@@ -2187,8 +2196,7 @@ retry:
+@@ -2187,8 +2196,7 @@
* We have a transaction open. All is sweetness. It also sets
* i_size in generic_commit_write().
*/
if (err) {
drop_nlink(inode);
ext3_mark_inode_dirty(handle, inode);
-@@ -2405,6 +2413,16 @@ end_rename:
+@@ -2405,6 +2413,16 @@
return retval;
}
/*
* directories can handle most operations...
*/
-@@ -2426,6 +2444,8 @@ const struct inode_operations ext3_dir_i
+@@ -2426,6 +2444,8 @@
.removexattr = generic_removexattr,
#endif
.permission = ext3_permission,
};
const struct inode_operations ext3_special_inode_operations = {
-@@ -2437,4 +2457,6 @@ const struct inode_operations ext3_speci
+@@ -2437,4 +2457,6 @@
.removexattr = generic_removexattr,
#endif
.permission = ext3_permission,
+ .may_create = ext3_may_create,
+ .may_delete = ext3_may_delete,
};
-diff -purN linux-2.6.27/fs/ext3/namei.h linux-2.6.27.19-5.1/fs/ext3/namei.h
---- linux-2.6.27/fs/ext3/namei.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/namei.h 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/ext3/namei.h
+--- a/fs/ext3/namei.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/namei.h Wed May 06 16:56:47 2009 +0100
@@ -5,4 +5,5 @@
*
*/
+extern int ext3_permission (struct inode *, int);
extern struct dentry *ext3_get_parent(struct dentry *child);
-diff -purN linux-2.6.27/fs/ext3/nfs4acl.c linux-2.6.27.19-5.1/fs/ext3/nfs4acl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/nfs4acl.c 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/ext3/nfs4acl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ext3/nfs4acl.c Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,370 @@
+/*
+ * Copyright (C) 2006 Andreas Gruenbacher <a.gruenbacher@computer.org>
+ .set = ext3_xattr_set_nfs4acl,
+};
+#endif
-diff -purN linux-2.6.27/fs/ext3/nfs4acl.h linux-2.6.27.19-5.1/fs/ext3/nfs4acl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/nfs4acl.h 2009-03-25 16:11:32.000000000 +0000
+diff -r 9608d5473017 fs/ext3/nfs4acl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ext3/nfs4acl.h Wed May 06 16:56:47 2009 +0100
@@ -0,0 +1,36 @@
+#ifndef __FS_EXT3_NFS4ACL_H
+#define __FS_EXT3_NFS4ACL_H
+#endif /* CONFIG_FS_EXT3_NFS4ACL */
+
+#endif /* __FS_EXT3_NFS4ACL_H */
-diff -purN linux-2.6.27/fs/ext3/resize.c linux-2.6.27.19-5.1/fs/ext3/resize.c
---- linux-2.6.27/fs/ext3/resize.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/resize.c 2009-03-25 16:11:32.000000000 +0000
-@@ -790,7 +790,8 @@ int ext3_group_add(struct super_block *s
+diff -r 9608d5473017 fs/ext3/resize.c
+--- a/fs/ext3/resize.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/resize.c Wed May 06 16:56:47 2009 +0100
+@@ -790,7 +790,8 @@
if (reserved_gdb || gdb_off == 0) {
if (!EXT3_HAS_COMPAT_FEATURE(sb,
ext3_warning(sb, __func__,
"No reserved GDT blocks, can't resize");
return -EPERM;
-diff -purN linux-2.6.27/fs/ext3/super.c linux-2.6.27.19-5.1/fs/ext3/super.c
---- linux-2.6.27/fs/ext3/super.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/super.c 2009-03-25 16:11:34.000000000 +0000
+diff -r 9608d5473017 fs/ext3/super.c
+--- a/fs/ext3/super.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/super.c Wed May 06 16:56:47 2009 +0100
@@ -36,12 +36,14 @@
#include <linux/namei.h>
#include <linux/quotaops.h>
#include "namei.h"
static int ext3_load_journal(struct super_block *, struct ext3_super_block *,
-@@ -454,6 +456,9 @@ static struct inode *ext3_alloc_inode(st
+@@ -454,6 +456,9 @@
ei->i_acl = EXT3_ACL_NOT_CACHED;
ei->i_default_acl = EXT3_ACL_NOT_CACHED;
#endif
ei->i_block_alloc_info = NULL;
ei->vfs_inode.i_version = 1;
return &ei->vfs_inode;
-@@ -516,6 +521,13 @@ static void ext3_clear_inode(struct inod
+@@ -514,6 +519,13 @@
+ EXT3_I(inode)->i_default_acl != EXT3_ACL_NOT_CACHED) {
+ posix_acl_release(EXT3_I(inode)->i_default_acl);
EXT3_I(inode)->i_default_acl = EXT3_ACL_NOT_CACHED;
- }
- #endif
++ }
++#endif
+#ifdef CONFIG_EXT3_FS_NFS4ACL
+ if (EXT3_I(inode)->i_nfs4acl &&
+ EXT3_I(inode)->i_nfs4acl != EXT3_NFS4ACL_NOT_CACHED) {
+ nfs4acl_put(EXT3_I(inode)->i_nfs4acl);
+ EXT3_I(inode)->i_nfs4acl = EXT3_NFS4ACL_NOT_CACHED;
-+ }
-+#endif
+ }
+ #endif
ext3_discard_reservation(inode);
- EXT3_I(inode)->i_block_alloc_info = NULL;
- if (unlikely(rsv))
-@@ -750,7 +762,7 @@ enum {
+@@ -750,7 +762,7 @@
Opt_bsd_df, Opt_minix_df, Opt_grpid, Opt_nogrpid,
Opt_resgid, Opt_resuid, Opt_sb, Opt_err_cont, Opt_err_panic, Opt_err_ro,
Opt_nouid32, Opt_nocheck, Opt_debug, Opt_oldalloc, Opt_orlov,
Opt_reservation, Opt_noreservation, Opt_noload, Opt_nobh, Opt_bh,
Opt_commit, Opt_journal_update, Opt_journal_inum, Opt_journal_dev,
Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,
-@@ -782,6 +794,7 @@ static match_table_t tokens = {
+@@ -782,6 +794,7 @@
{Opt_user_xattr, "user_xattr"},
{Opt_nouser_xattr, "nouser_xattr"},
{Opt_acl, "acl"},
{Opt_noacl, "noacl"},
{Opt_reservation, "reservation"},
{Opt_noreservation, "noreservation"},
-@@ -925,19 +938,33 @@ static int parse_options (char *options,
+@@ -925,19 +938,33 @@
printk("EXT3 (no)user_xattr options not supported\n");
break;
#endif
--#ifdef CONFIG_EXT3_FS_POSIX_ACL
- case Opt_acl:
-- set_opt(sbi->s_mount_opt, POSIX_ACL);
++ case Opt_acl:
+ args[0].to = args[0].from;
+ /* fall through */
+ case Opt_acl_flavor:
-+#ifdef CONFIG_EXT3_FS_POSIX_ACL
+ #ifdef CONFIG_EXT3_FS_POSIX_ACL
+- case Opt_acl:
+- set_opt(sbi->s_mount_opt, POSIX_ACL);
+ if (match_string(&args[0], "") ||
+ match_string(&args[0], "posix")) {
+ set_opt(sbi->s_mount_opt, POSIX_ACL);
case Opt_reservation:
set_opt(sbi->s_mount_opt, RESERVATION);
break;
-@@ -1018,8 +1045,7 @@ static int parse_options (char *options,
+@@ -1018,8 +1045,7 @@
case Opt_grpjquota:
qtype = GRPQUOTA;
set_qf_name:
!sbi->s_qf_names[qtype]) {
printk(KERN_ERR
"EXT3-fs: Cannot change journaled "
-@@ -1058,8 +1084,7 @@ set_qf_name:
+@@ -1058,8 +1084,7 @@
case Opt_offgrpjquota:
qtype = GRPQUOTA;
clear_qf_name:
sbi->s_qf_names[qtype]) {
printk(KERN_ERR "EXT3-fs: Cannot change "
"journaled quota options when "
-@@ -1078,8 +1103,7 @@ clear_qf_name:
+@@ -1078,8 +1103,7 @@
case Opt_jqfmt_vfsv0:
qfmt = QFMT_VFS_V0;
set_qf_format:
sbi->s_jquota_fmt != qfmt) {
printk(KERN_ERR "EXT3-fs: Cannot change "
"journaled quota options when "
-@@ -1098,8 +1122,7 @@ set_qf_format:
+@@ -1098,8 +1122,7 @@
set_opt(sbi->s_mount_opt, GRPQUOTA);
break;
case Opt_noquota:
printk(KERN_ERR "EXT3-fs: Cannot change quota "
"options when quota turned on.\n");
return 0;
-@@ -1603,14 +1626,19 @@ static int ext3_fill_super (struct super
+@@ -1603,14 +1626,19 @@
sbi->s_resuid = le16_to_cpu(es->s_def_resuid);
sbi->s_resgid = le16_to_cpu(es->s_def_resgid);
if (le32_to_cpu(es->s_rev_level) == EXT3_GOOD_OLD_REV &&
(EXT3_HAS_COMPAT_FEATURE(sb, ~0U) ||
-@@ -2263,6 +2291,13 @@ static void ext3_commit_super (struct su
+@@ -2263,6 +2291,13 @@
es->s_free_blocks_count = cpu_to_le32(ext3_count_free_blocks(sb));
es->s_free_inodes_count = cpu_to_le32(ext3_count_free_inodes(sb));
BUFFER_TRACE(sbh, "marking dirty");
mark_buffer_dirty(sbh);
if (sync)
sync_dirty_buffer(sbh);
-@@ -2365,13 +2400,12 @@ static void ext3_write_super (struct sup
+@@ -2365,13 +2400,12 @@
static int ext3_sync_fs(struct super_block *sb, int wait)
{
- tid_t target;
--
- sb->s_dirt = 0;
-- if (journal_start_commit(EXT3_SB(sb)->s_journal, &target)) {
-- if (wait)
-- log_wait_commit(EXT3_SB(sb)->s_journal, target);
-- }
++ sb->s_dirt = 0;
+ if (wait)
+ ext3_force_commit(sb);
+ else
+ journal_start_commit(EXT3_SB(sb)->s_journal, NULL);
-+
+
+- sb->s_dirt = 0;
+- if (journal_start_commit(EXT3_SB(sb)->s_journal, &target)) {
+- if (wait)
+- log_wait_commit(EXT3_SB(sb)->s_journal, target);
+- }
return 0;
}
-@@ -2447,8 +2481,12 @@ static int ext3_remount (struct super_bl
+@@ -2447,8 +2481,12 @@
if (sbi->s_mount_opt & EXT3_MOUNT_ABORT)
ext3_abort(sb, __func__, "Abort forced by user");
es = sbi->s_es;
-diff -purN linux-2.6.27/fs/ext3/xattr.c linux-2.6.27.19-5.1/fs/ext3/xattr.c
---- linux-2.6.27/fs/ext3/xattr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/xattr.c 2009-03-25 16:11:34.000000000 +0000
-@@ -114,6 +114,9 @@ static struct xattr_handler *ext3_xattr_
+diff -r 9608d5473017 fs/ext3/xattr.c
+--- a/fs/ext3/xattr.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/xattr.c Wed May 06 16:56:47 2009 +0100
+@@ -114,6 +114,9 @@
#ifdef CONFIG_EXT3_FS_SECURITY
[EXT3_XATTR_INDEX_SECURITY] = &ext3_xattr_security_handler,
#endif
};
struct xattr_handler *ext3_xattr_handlers[] = {
-@@ -126,6 +129,12 @@ struct xattr_handler *ext3_xattr_handler
+@@ -125,6 +128,12 @@
+ #endif
#ifdef CONFIG_EXT3_FS_SECURITY
&ext3_xattr_security_handler,
- #endif
++#endif
+#ifdef CONFIG_EXT3_FS_NFS4ACL
+ &ext3_nfs4acl_xattr_handler,
+#ifdef NFS4ACL_DEBUG
+ &ext3_masked_nfs4acl_xattr_handler,
+#endif
-+#endif
+ #endif
NULL
};
-
-diff -purN linux-2.6.27/fs/ext3/xattr.h linux-2.6.27.19-5.1/fs/ext3/xattr.h
---- linux-2.6.27/fs/ext3/xattr.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/xattr.h 2009-03-25 16:11:33.000000000 +0000
+diff -r 9608d5473017 fs/ext3/xattr.h
+--- a/fs/ext3/xattr.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/xattr.h Wed May 06 16:56:47 2009 +0100
@@ -21,6 +21,7 @@
#define EXT3_XATTR_INDEX_TRUSTED 4
#define EXT3_XATTR_INDEX_LUSTRE 5
struct ext3_xattr_header {
__le32 h_magic; /* magic number for identification */
-@@ -63,6 +64,10 @@ extern struct xattr_handler ext3_xattr_t
+@@ -63,6 +64,10 @@
extern struct xattr_handler ext3_xattr_acl_access_handler;
extern struct xattr_handler ext3_xattr_acl_default_handler;
extern struct xattr_handler ext3_xattr_security_handler;
extern ssize_t ext3_listxattr(struct dentry *, char *, size_t);
-diff -purN linux-2.6.27/fs/ext4/acl.h linux-2.6.27.19-5.1/fs/ext4/acl.h
---- linux-2.6.27/fs/ext4/acl.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/acl.h 2009-03-25 16:11:36.000000000 +0000
-@@ -51,18 +51,18 @@ static inline int ext4_acl_count(size_t
+diff -r 9608d5473017 fs/ext4/acl.h
+--- a/fs/ext4/acl.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/acl.h Wed May 06 16:56:47 2009 +0100
+@@ -51,18 +51,18 @@
}
}
#include <linux/sched.h>
#define ext4_permission NULL
-@@ -77,5 +77,5 @@ ext4_init_acl(handle_t *handle, struct i
+@@ -77,5 +77,5 @@
{
return 0;
}
-#endif /* CONFIG_EXT4DEV_FS_POSIX_ACL */
+#endif /* CONFIG_EXT4_FS_POSIX_ACL */
-diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
---- linux-2.6.27/fs/ext4/balloc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/balloc.c 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/balloc.c
+--- a/fs/ext4/balloc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/balloc.c Wed May 06 16:56:47 2009 +0100
@@ -20,6 +20,7 @@
#include "ext4.h"
#include "ext4_jbd2.h"
/*
* balloc.c contains the blocks allocation and deallocation routines
-@@ -83,6 +84,7 @@ static int ext4_group_used_meta_blocks(s
+@@ -83,6 +84,7 @@
}
return used_blocks;
}
/* Initializes an uninitialized block bitmap if given, and returns the
* number of blocks free in the group. */
unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
-@@ -99,10 +101,10 @@ unsigned ext4_init_block_bitmap(struct s
+@@ -99,10 +101,10 @@
* essentially implementing a per-group read-only flag. */
if (!ext4_group_desc_csum_verify(sbi, block_group, gdp)) {
ext4_error(sb, __func__,
memset(bh->b_data, 0xff, sb->s_blocksize);
return 0;
}
-@@ -132,7 +134,7 @@ unsigned ext4_init_block_bitmap(struct s
+@@ -132,7 +134,7 @@
*/
group_blocks = ext4_blocks_count(sbi->s_es) -
le32_to_cpu(sbi->s_es->s_first_data_block) -
} else {
group_blocks = EXT4_BLOCKS_PER_GROUP(sb);
}
-@@ -200,20 +202,20 @@ unsigned ext4_init_block_bitmap(struct s
+@@ -200,20 +202,20 @@
* @bh: pointer to the buffer head to store the block
* group descriptor
*/
return NULL;
}
-@@ -222,10 +224,10 @@ struct ext4_group_desc * ext4_get_group_
+@@ -222,10 +224,10 @@
group_desc = block_group >> EXT4_DESC_PER_BLOCK_BITS(sb);
offset = block_group & (EXT4_DESC_PER_BLOCK(sb) - 1);
if (!sbi->s_group_desc[group_desc]) {
return NULL;
}
-@@ -302,8 +304,8 @@ err_out:
+@@ -302,8 +304,8 @@
struct buffer_head *
ext4_read_block_bitmap(struct super_block *sb, ext4_group_t block_group)
{
ext4_fsblk_t bitmap_blk;
desc = ext4_get_group_desc(sb, block_group, NULL);
-@@ -314,27 +316,50 @@ ext4_read_block_bitmap(struct super_bloc
+@@ -314,27 +316,50 @@
if (unlikely(!bh)) {
ext4_error(sb, __func__,
"Cannot read block bitmap - "
ext4_init_block_bitmap(sb, bh, block_group, desc);
+ set_bitmap_uptodate(bh);
set_buffer_uptodate(bh);
-- unlock_buffer(bh);
- spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
-+ unlock_buffer(bh);
++ spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
+ unlock_buffer(bh);
+- spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
return bh;
}
spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
block_group, bitmap_blk);
return NULL;
}
-@@ -345,356 +370,50 @@ ext4_read_block_bitmap(struct super_bloc
+@@ -345,356 +370,50 @@
*/
return bh;
}
- * windows.
- *
- */
--
--/**
+
+ /**
- * __rsv_window_dump() -- Dump the filesystem block allocation reservation map
- * @rb_root: root of per-filesystem reservation rb tree
- * @verbose: verbose mode
- return 0;
- return 1;
-}
-
- /**
+-
+-/**
- * search_reserve_window()
- * @rb_root: root of reservation tree
- * @goal: target allocation block
- "block = %llu, count = %lu", block, count);
- goto error_return;
- }
--
-- ext4_debug ("freeing block(s) %llu-%llu\n", block, block + count - 1);
+ ext4_debug("Adding block(s) %llu-%llu\n", block, block + count - 1);
+- ext4_debug ("freeing block(s) %llu-%llu\n", block, block + count - 1);
+-
-do_more:
- overflow = 0;
ext4_get_group_no_and_offset(sb, block, &block_group, &bit);
if (!desc)
goto error_return;
-@@ -703,18 +422,17 @@ do_more:
+@@ -703,18 +422,17 @@
in_range(block, ext4_inode_table(sb, desc), sbi->s_itb_per_group) ||
in_range(block + count - 1, ext4_inode_table(sb, desc),
sbi->s_itb_per_group)) {
BUFFER_TRACE(bitmap_bh, "getting undo access");
err = ext4_journal_get_undo_access(handle, bitmap_bh);
if (err)
-@@ -729,90 +447,43 @@ do_more:
+@@ -729,90 +447,43 @@
err = ext4_journal_get_write_access(handle, gd_bh);
if (err)
goto error_return;
/* We dirtied the bitmap block */
BUFFER_TRACE(bitmap_bh, "dirtied bitmap block");
-@@ -821,15 +492,10 @@ do_more:
+@@ -821,15 +492,10 @@
/* And the group descriptor block */
BUFFER_TRACE(gd_bh, "dirtied group descriptor block");
ret = ext4_journal_dirty_metadata(handle, gd_bh);
- if (!err) err = ret;
- *pdquot_freed_blocks += group_freed;
--
++ if (!err)
++ err = ret;
++ sb->s_dirt = 1;
+
- if (overflow && !err) {
- block += count;
- count = overflow;
- goto do_more;
- }
-+ if (!err)
-+ err = ret;
- sb->s_dirt = 1;
-+
+- sb->s_dirt = 1;
error_return:
brelse(bitmap_bh);
ext4_std_error(sb, err);
-@@ -848,792 +514,86 @@ void ext4_free_blocks(handle_t *handle,
+@@ -848,792 +514,86 @@
ext4_fsblk_t block, unsigned long count,
int metadata)
{
- * ext4_test_allocatable()
- * @nr: given allocation block group
- * @bh: bufferhead contains the bitmap of the given block group
-- *
++ * ext4_has_free_blocks()
++ * @sbi: in-core super block structure.
++ * @nblocks: number of needed blocks
+ *
- * For ext4 allocations, we must not reuse any blocks which are
- * allocated in the bitmap buffer's "last committed data" copy. This
- * prevents deletes from freeing up the page for reuse until we have
- * @@@ We may want to make this allocation behaviour conditional on
- * data-writes at some point, and disable it for metadata allocations or
- * sync-data inodes.
-- */
++ * Check if filesystem has nblocks free & available for allocation.
++ * On success return 1, return 0 on failure.
+ */
-static int ext4_test_allocatable(ext4_grpblk_t nr, struct buffer_head *bh)
--{
++int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks)
+ {
- int ret;
- struct journal_head *jh = bh2jh(bh);
--
++ s64 free_blocks, dirty_blocks, root_blocks;
++ struct percpu_counter *fbc = &sbi->s_freeblocks_counter;
++ struct percpu_counter *dbc = &sbi->s_dirtyblocks_counter;
+
- if (ext4_test_bit(nr, bh->b_data))
- return 0;
--
++ free_blocks = percpu_counter_read_positive(fbc);
++ dirty_blocks = percpu_counter_read_positive(dbc);
++ root_blocks = ext4_r_blocks_count(sbi->s_es);
+
- jbd_lock_bh_state(bh);
- if (!jh->b_committed_data)
- ret = 1;
- bitmap_bh);
- i++, grp_goal--)
- ;
-- }
-- }
++ if (free_blocks - (nblocks + root_blocks + dirty_blocks) <
++ EXT4_FREEBLOCKS_WATERMARK) {
++ free_blocks = percpu_counter_sum_positive(fbc);
++ dirty_blocks = percpu_counter_sum_positive(dbc);
++ if (dirty_blocks < 0) {
++ printk(KERN_CRIT "Dirty block accounting "
++ "went wrong %lld\n",
++ (long long)dirty_blocks);
+ }
+ }
- start = grp_goal;
--
++ /* Check whether we have space after
++ * accounting for current dirty blocks & root reserved blocks.
++ */
++ if (free_blocks >= ((root_blocks + nblocks) + dirty_blocks))
++ return 1;
+
- if (!claim_block(sb_bgl_lock(EXT4_SB(sb), group),
- grp_goal, bitmap_bh)) {
- /*
- if (start >= end)
- goto fail_access;
- goto repeat;
-- }
++ /* Hm, nope. Are (enough) root reserved blocks available? */
++ if (sbi->s_resuid == current_fsuid() ||
++ ((sbi->s_resgid != 0) && in_group_p(sbi->s_resgid)) ||
++ capable(CAP_SYS_RESOURCE)) {
++ if (free_blocks >= (nblocks + dirty_blocks))
++ return 1;
+ }
- num++;
- grp_goal++;
- while (num < *count && grp_goal < end
-
- if (prev != my_rsv)
- ext4_rsv_window_add(sb, my_rsv);
--
-- return 0;
--}
--
+
+ return 0;
+ }
+
-/**
- * alloc_new_reservation()--allocate a new reservation window
- *
- * @sb: the super block
- * @group: the group we are trying to allocate in
- * @bitmap_bh: the block group block bitmap
-+ * ext4_has_free_blocks()
-+ * @sbi: in-core super block structure.
-+ * @nblocks: number of needed blocks
- *
-+ * Check if filesystem has nblocks free & available for allocation.
-+ * On success return 1, return 0 on failure.
- */
+- *
+- */
-static int alloc_new_reservation(struct ext4_reserve_window_node *my_rsv,
- ext4_grpblk_t grp_goal, struct super_block *sb,
- ext4_group_t group, struct buffer_head *bitmap_bh)
-+int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks)
++int ext4_claim_free_blocks(struct ext4_sb_info *sbi,
++ s64 nblocks)
{
- struct ext4_reserve_window_node *search_head;
- ext4_fsblk_t group_first_block, group_end_block, start_block;
- start_block = group_first_block;
- else
- start_block = grp_goal + group_first_block;
-+ s64 free_blocks, dirty_blocks, root_blocks;
-+ struct percpu_counter *fbc = &sbi->s_freeblocks_counter;
-+ struct percpu_counter *dbc = &sbi->s_dirtyblocks_counter;
-
+-
- size = my_rsv->rsv_goal_size;
-+ free_blocks = percpu_counter_read_positive(fbc);
-+ dirty_blocks = percpu_counter_read_positive(dbc);
-+ root_blocks = ext4_r_blocks_count(sbi->s_es);
-
+-
- if (!rsv_is_empty(&my_rsv->rsv_window)) {
- /*
- * if the old reservation is cross group boundary
- if (size > EXT4_MAX_RESERVE_BLOCKS)
- size = EXT4_MAX_RESERVE_BLOCKS;
- my_rsv->rsv_goal_size= size;
-+ if (free_blocks - (nblocks + root_blocks + dirty_blocks) <
-+ EXT4_FREEBLOCKS_WATERMARK) {
-+ free_blocks = percpu_counter_sum_positive(fbc);
-+ dirty_blocks = percpu_counter_sum_positive(dbc);
-+ if (dirty_blocks < 0) {
-+ printk(KERN_CRIT "Dirty block accounting "
-+ "went wrong %lld\n",
-+ (long long)dirty_blocks);
- }
- }
+- }
+- }
-
- spin_lock(rsv_lock);
- /*
- search_head = my_rsv;
- spin_lock(rsv_lock);
- goto retry;
--}
++ if (ext4_has_free_blocks(sbi, nblocks)) {
++ percpu_counter_add(&sbi->s_dirtyblocks_counter, nblocks);
++ return 0;
++ } else
++ return -ENOSPC;
+ }
-
-/**
- * try_to_extend_reservation()
- * Make sure we use undo access for the bitmap, because it is critical
- * that we do the frozen_data COW on bitmap buffers in all cases even
- * if the buffer is in BJ_Forget state in the committing transaction.
-+ /* Check whether we have space after
-+ * accounting for current dirty blocks & root reserved blocks.
- */
+- */
- BUFFER_TRACE(bitmap_bh, "get undo access for new block");
- fatal = ext4_journal_get_undo_access(handle, bitmap_bh);
- if (fatal) {
- try_to_extend_reservation(my_rsv, sb,
- *count - curr);
- }
-+ if (free_blocks >= ((root_blocks + nblocks) + dirty_blocks))
-+ return 1;
-
+-
- if ((my_rsv->rsv_start > group_last_block) ||
- (my_rsv->rsv_end < group_first_block)) {
- rsv_window_dump(&EXT4_SB(sb)->s_rsv_window_root, 1);
- return -1;
- }
- return ret;
-+ /* Hm, nope. Are (enough) root reserved blocks available? */
-+ if (sbi->s_resuid == current_fsuid() ||
-+ ((sbi->s_resgid != 0) && in_group_p(sbi->s_resgid)) ||
-+ capable(CAP_SYS_RESOURCE)) {
-+ if (free_blocks >= (nblocks + dirty_blocks))
-+ return 1;
- }
-
+- }
+-
- BUFFER_TRACE(bitmap_bh, "journal_release_buffer");
- ext4_journal_release_buffer(handle, bitmap_bh);
- return ret;
-+ return 0;
- }
-
+-}
+-
-/**
- * ext4_has_free_blocks()
- * @sbi: in-core super block structure.
- */
-ext4_fsblk_t ext4_has_free_blocks(struct ext4_sb_info *sbi,
- ext4_fsblk_t nblocks)
-+int ext4_claim_free_blocks(struct ext4_sb_info *sbi,
-+ s64 nblocks)
- {
+-{
- ext4_fsblk_t free_blocks;
- ext4_fsblk_t root_blocks = 0;
-
-#endif
- if (free_blocks <= root_blocks)
- /* we don't have free space */
-+ if (ext4_has_free_blocks(sbi, nblocks)) {
-+ percpu_counter_add(&sbi->s_dirtyblocks_counter, nblocks);
- return 0;
+- return 0;
- if (free_blocks - root_blocks < nblocks)
- return free_blocks - root_blocks;
- return nblocks;
- }
-
-+ } else
-+ return -ENOSPC;
-+}
/**
* ext4_should_retry_alloc()
-@@ -1657,402 +617,45 @@ int ext4_should_retry_alloc(struct super
+@@ -1657,400 +617,43 @@
return jbd2_journal_force_commit_nested(EXT4_SB(sb)->s_journal);
}
spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);
}
return ret;
- }
-
+-}
+-
-/*
- * ext4_new_meta_block() -- allocate block for meta data (indexing) blocks
- *
- unsigned long *count, int *errp)
-{
- return do_blk_alloc(handle, inode, iblock, goal, count, errp, 0);
--}
--
+ }
+
/**
- * ext4_count_free_blocks() -- count filesystem free blocks
- * @sb: superblock
-@@ -2068,7 +671,7 @@ ext4_fsblk_t ext4_count_free_blocks(stru
+@@ -2068,7 +671,7 @@
#ifdef EXT4FS_DEBUG
struct ext4_super_block *es;
ext4_fsblk_t bitmap_count;
struct buffer_head *bitmap_bh = NULL;
es = EXT4_SB(sb)->s_es;
-@@ -2088,15 +691,14 @@ ext4_fsblk_t ext4_count_free_blocks(stru
+@@ -2088,15 +691,14 @@
continue;
x = ext4_count_free(bitmap_bh, sb->s_blocksize);
return bitmap_count;
#else
desc_count = 0;
-@@ -2105,7 +707,7 @@ ext4_fsblk_t ext4_count_free_blocks(stru
+@@ -2105,7 +707,7 @@
gdp = ext4_get_group_desc(sb, i, NULL);
if (!gdp)
continue;
}
return desc_count;
-@@ -2183,8 +785,9 @@ unsigned long ext4_bg_num_gdb(struct sup
+@@ -2183,8 +785,9 @@
if (!EXT4_HAS_INCOMPAT_FEATURE(sb,EXT4_FEATURE_INCOMPAT_META_BG) ||
metagroup < first_meta_bg)
}
+
-diff -purN linux-2.6.27/fs/ext4/bitmap.c linux-2.6.27.19-5.1/fs/ext4/bitmap.c
---- linux-2.6.27/fs/ext4/bitmap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/bitmap.c 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/bitmap.c
+--- a/fs/ext4/bitmap.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/bitmap.c Wed May 06 16:56:47 2009 +0100
@@ -15,17 +15,16 @@
static const int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0};
}
#endif /* EXT4FS_DEBUG */
-diff -purN linux-2.6.27/fs/ext4/dir.c linux-2.6.27.19-5.1/fs/ext4/dir.c
---- linux-2.6.27/fs/ext4/dir.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/dir.c 2009-03-25 16:11:36.000000000 +0000
-@@ -33,10 +33,10 @@ static unsigned char ext4_filetype_table
+diff -r 9608d5473017 fs/ext4/dir.c
+--- a/fs/ext4/dir.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/dir.c Wed May 06 16:56:47 2009 +0100
+@@ -33,10 +33,10 @@
};
static int ext4_readdir(struct file *, void *, filldir_t);
const struct file_operations ext4_dir_operations = {
.llseek = generic_file_llseek,
-@@ -61,12 +61,12 @@ static unsigned char get_dtype(struct su
+@@ -61,12 +61,12 @@
}
const int rlen = ext4_rec_len_from_disk(de->rec_len);
if (rlen < EXT4_DIR_REC_LEN(1))
-@@ -82,26 +82,27 @@ int ext4_check_dir_entry (const char * f
+@@ -82,26 +82,27 @@
error_msg = "inode out of bounds";
if (error_msg != NULL)
sb = inode->i_sb;
-@@ -148,9 +149,13 @@ static int ext4_readdir(struct file * fi
+@@ -148,9 +149,13 @@
* of recovering data when there's a bad sector
*/
if (!bh) {
/* corrupt size? Maybe no more blocks to read */
if (filp->f_pos > inode->i_blocks << 9)
break;
-@@ -187,14 +192,14 @@ revalidate:
+@@ -187,14 +192,14 @@
while (!error && filp->f_pos < inode->i_size
&& offset < sb->s_blocksize) {
de = (struct ext4_dir_entry_2 *) (bh->b_data + offset);
ret = stored;
goto out;
}
-@@ -218,12 +223,12 @@ revalidate:
+@@ -218,12 +223,12 @@
break;
if (version != filp->f_version)
goto revalidate;
}
out:
return ret;
-@@ -290,9 +295,9 @@ static void free_rb_tree_fname(struct rb
+@@ -290,9 +295,9 @@
parent = rb_parent(n);
fname = rb_entry(n, struct fname, rb_hash);
while (fname) {
}
if (!parent)
root->rb_node = NULL;
-@@ -331,7 +336,7 @@ int ext4_htree_store_dirent(struct file
+@@ -331,7 +336,7 @@
struct ext4_dir_entry_2 *dirent)
{
struct rb_node **p, *parent = NULL;
struct dir_private_info *info;
int len;
-@@ -388,19 +393,20 @@ int ext4_htree_store_dirent(struct file
+@@ -388,19 +393,20 @@
* for all entres on the fname linked list. (Normally there is only
* one entry on the linked list, unless there are 62 bit hash collisions.)
*/
return 0;
}
curr_pos = hash2pos(fname->hash, fname->minor_hash);
-@@ -419,8 +425,8 @@ static int call_filldir(struct file * fi
+@@ -419,8 +425,8 @@
return 0;
}
{
struct dir_private_info *info = filp->private_data;
struct inode *inode = filp->f_path.dentry->d_inode;
-@@ -453,17 +459,8 @@ static int ext4_dx_readdir(struct file *
+@@ -453,17 +459,8 @@
if (info->extra_fname) {
if (call_filldir(filp, dirent, filldir, info->extra_fname))
goto finished;
} else if (!info->curr_node)
info->curr_node = rb_first(&info->root);
-@@ -495,9 +492,14 @@ static int ext4_dx_readdir(struct file *
+@@ -495,9 +492,14 @@
info->curr_minor_hash = fname->minor_hash;
if (call_filldir(filp, dirent, filldir, fname))
break;
if (info->next_hash == ~0) {
filp->f_pos = EXT4_HTREE_EOF;
break;
-@@ -511,7 +513,7 @@ finished:
+@@ -511,7 +513,7 @@
return 0;
}
{
if (filp->private_data)
ext4_htree_free_dir_info(filp->private_data);
-diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
---- linux-2.6.27/fs/ext4/ext4.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/ext4.h 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/ext4.h
+--- a/fs/ext4/ext4.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/ext4.h Wed May 06 16:56:47 2009 +0100
@@ -19,6 +19,7 @@
#include <linux/types.h>
#include <linux/blkdev.h>
} while (0)
#else
#define ext4_debug(f, a...) do {} while (0)
-@@ -94,9 +95,9 @@ struct ext4_allocation_request {
+@@ -94,9 +95,9 @@
/* phys. block for ^^^ */
ext4_fsblk_t pright;
/* how many blocks we want to allocate */
};
/*
-@@ -128,7 +129,7 @@ struct ext4_allocation_request {
+@@ -128,7 +129,7 @@
#else
# define EXT4_BLOCK_SIZE(s) (EXT4_MIN_BLOCK_SIZE << (s)->s_log_block_size)
#endif
#ifdef __KERNEL__
# define EXT4_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits)
#else
-@@ -156,12 +157,12 @@ struct ext4_group_desc
+@@ -156,12 +157,12 @@
__le32 bg_block_bitmap_lo; /* Blocks bitmap block */
__le32 bg_inode_bitmap_lo; /* Inodes bitmap block */
__le32 bg_inode_table_lo; /* Inodes table block */
__le16 bg_checksum; /* crc16(sb_uuid+group+desc) */
__le32 bg_block_bitmap_hi; /* Blocks bitmap block MSB */
__le32 bg_inode_bitmap_hi; /* Inodes bitmap block MSB */
-@@ -169,7 +170,7 @@ struct ext4_group_desc
+@@ -169,7 +170,7 @@
__le16 bg_free_blocks_count_hi;/* Free blocks count MSB */
__le16 bg_free_inodes_count_hi;/* Free inodes count MSB */
__le16 bg_used_dirs_count_hi; /* Directories count MSB */
__u32 bg_reserved2[3];
};
-@@ -245,7 +246,7 @@ struct flex_groups {
+@@ -245,7 +246,7 @@
#define EXT4_RESERVED_FL 0x80000000 /* reserved for ext4 lib */
#define EXT4_FL_USER_VISIBLE 0x000BDFFF /* User visible flags */
/*
* Inode dynamic state flags
-@@ -291,8 +292,6 @@ struct ext4_new_group_data {
+@@ -291,8 +292,6 @@
#define EXT4_IOC_SETFLAGS FS_IOC_SETFLAGS
#define EXT4_IOC_GETVERSION _IOR('f', 3, long)
#define EXT4_IOC_SETVERSION _IOW('f', 4, long)
#define EXT4_IOC_GETVERSION_OLD FS_IOC_GETVERSION
#define EXT4_IOC_SETVERSION_OLD FS_IOC_SETVERSION
#ifdef CONFIG_JBD2_DEBUG
-@@ -300,7 +299,10 @@ struct ext4_new_group_data {
+@@ -300,7 +299,10 @@
#endif
#define EXT4_IOC_GETRSVSZ _IOR('f', 5, long)
#define EXT4_IOC_SETRSVSZ _IOW('f', 6, long)
/*
* ioctl commands in 32 bit emulation
-@@ -510,7 +512,6 @@ do { \
+@@ -510,7 +512,6 @@
/*
* Mount flags
*/
#define EXT4_MOUNT_OLDALLOC 0x00002 /* Don't use the new Orlov allocator */
#define EXT4_MOUNT_GRPID 0x00004 /* Create files with directory's group */
#define EXT4_MOUNT_DEBUG 0x00008 /* Some debugging messages */
-@@ -538,7 +539,6 @@ do { \
+@@ -538,7 +539,6 @@
#define EXT4_MOUNT_JOURNAL_CHECKSUM 0x800000 /* Journal checksums */
#define EXT4_MOUNT_JOURNAL_ASYNC_COMMIT 0x1000000 /* Journal Async Commit */
#define EXT4_MOUNT_I_VERSION 0x2000000 /* i_version support */
#define EXT4_MOUNT_DELALLOC 0x8000000 /* Delalloc support */
/* Compatibility, for having both ext2_fs.h and ext4_fs.h included at once */
#ifndef _LINUX_EXT2_FS_H
-@@ -667,7 +667,7 @@ struct ext4_super_block {
+@@ -667,7 +667,7 @@
};
#ifdef __KERNEL__
{
return sb->s_fs_info;
}
-@@ -725,11 +725,11 @@ static inline int ext4_valid_inum(struct
+@@ -725,11 +725,11 @@
*/
#define EXT4_HAS_COMPAT_FEATURE(sb,mask) \
#define EXT4_SET_COMPAT_FEATURE(sb,mask) \
EXT4_SB(sb)->s_es->s_feature_compat |= cpu_to_le32(mask)
#define EXT4_SET_RO_COMPAT_FEATURE(sb,mask) \
-@@ -789,6 +789,8 @@ static inline int ext4_valid_inum(struct
+@@ -788,6 +788,8 @@
+ */
#define EXT4_DEF_RESUID 0
#define EXT4_DEF_RESGID 0
-
-+#define EXT4_DEF_INODE_READAHEAD_BLKS 32
+
++#define EXT4_DEF_INODE_READAHEAD_BLKS 32
+
/*
* Default mount options
- */
-@@ -888,6 +890,9 @@ static inline __le16 ext4_rec_len_to_dis
+@@ -888,6 +890,9 @@
#define DX_HASH_LEGACY 0
#define DX_HASH_HALF_MD4 1
#define DX_HASH_TEA 2
#ifdef __KERNEL__
-@@ -952,7 +957,25 @@ ext4_group_first_block_no(struct super_b
+@@ -952,7 +957,25 @@
#define ERR_BAD_DX_DIR -75000
void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr,
/*
* Function prototypes
-@@ -966,6 +989,9 @@ void ext4_get_group_no_and_offset(struct
+@@ -966,6 +989,9 @@
# define ATTRIB_NORET __attribute__((noreturn))
# define NORET_AND noreturn,
/* balloc.c */
extern unsigned int ext4_block_group(struct super_block *sb,
ext4_fsblk_t blocknr);
-@@ -974,55 +1000,44 @@ extern ext4_grpblk_t ext4_block_group_of
+@@ -974,55 +1000,44 @@
extern int ext4_bg_has_super(struct super_block *sb, ext4_group_t group);
extern unsigned long ext4_bg_num_gdb(struct super_block *sb,
ext4_group_t group);
/* mballoc.c */
extern long ext4_mb_stats;
-@@ -1032,17 +1047,18 @@ extern int ext4_mb_release(struct super_
+@@ -1032,17 +1047,18 @@
extern ext4_fsblk_t ext4_mb_new_blocks(handle_t *,
struct ext4_allocation_request *, int *);
extern int ext4_mb_reserve_blocks(struct super_block *, int);
/* inode.c */
int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode,
struct buffer_head *bh, ext4_fsblk_t blocknr);
-@@ -1050,24 +1066,19 @@ struct buffer_head *ext4_getblk(handle_t
+@@ -1050,24 +1066,19 @@
ext4_lblk_t, int, int *);
struct buffer_head *ext4_bread(handle_t *, struct inode *,
ext4_lblk_t, int, int *);
extern void ext4_set_inode_flags(struct inode *);
extern void ext4_get_inode_flags(struct ext4_inode_info *);
extern void ext4_set_aops(struct inode *inode);
-@@ -1080,11 +1091,10 @@ extern int ext4_page_mkwrite(struct vm_a
+@@ -1080,11 +1091,10 @@
/* ioctl.c */
extern long ext4_ioctl(struct file *, unsigned int, unsigned long);
/* namei.c */
extern int ext4_orphan_add(handle_t *, struct inode *);
extern int ext4_orphan_del(handle_t *, struct inode *);
-@@ -1099,14 +1109,17 @@ extern int ext4_group_extend(struct supe
+@@ -1099,14 +1109,17 @@
ext4_fsblk_t n_blocks_count);
/* super.c */
extern int ext4_update_compat_feature(handle_t *handle, struct super_block *sb,
__u32 compat);
extern int ext4_update_rocompat_feature(handle_t *handle,
-@@ -1119,12 +1132,28 @@ extern ext4_fsblk_t ext4_inode_bitmap(st
+@@ -1119,12 +1132,28 @@
struct ext4_group_desc *bg);
extern ext4_fsblk_t ext4_inode_table(struct super_block *sb,
struct ext4_group_desc *bg);
static inline ext4_fsblk_t ext4_blocks_count(struct ext4_super_block *es)
{
-@@ -1179,7 +1208,7 @@ static inline void ext4_isize_set(struct
+@@ -1179,7 +1208,7 @@
static inline
struct ext4_group_info *ext4_get_group_info(struct super_block *sb,
{
struct ext4_group_info ***grp_info;
long indexv, indexh;
-@@ -1207,6 +1236,72 @@ do { \
+@@ -1206,6 +1235,72 @@
+ if ((errno)) \
__ext4_std_error((sb), __func__, (errno)); \
} while (0)
-
++
+#ifdef CONFIG_SMP
+/* Each CPU can accumulate FBC_BATCH blocks in their local
+ * counters. So we need to make sure we have free blocks more
+ return bit_spin_is_locked(EXT4_GROUP_INFO_LOCKED_BIT,
+ &(grinfo->bb_state));
+}
-+
+
/*
* Inodes and files operations
- */
-@@ -1232,18 +1327,37 @@ extern int ext4_ext_writepage_trans_bloc
+@@ -1232,18 +1327,37 @@
extern int ext4_ext_index_trans_blocks(struct inode *inode, int nrblocks,
int chunk);
extern int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
#endif /* __KERNEL__ */
#endif /* _EXT4_H */
-diff -purN linux-2.6.27/fs/ext4/ext4_extents.h linux-2.6.27.19-5.1/fs/ext4/ext4_extents.h
---- linux-2.6.27/fs/ext4/ext4_extents.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/ext4_extents.h 2009-03-25 16:11:36.000000000 +0000
-@@ -181,11 +181,6 @@ static inline unsigned short ext_depth(s
+diff -r 9608d5473017 fs/ext4/ext4_extents.h
+--- a/fs/ext4/ext4_extents.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/ext4_extents.h Wed May 06 16:56:47 2009 +0100
+@@ -181,11 +181,6 @@
return le16_to_cpu(ext_inode_hdr(inode)->eh_depth);
}
static inline void
ext4_ext_invalidate_cache(struct inode *inode)
{
-diff -purN linux-2.6.27/fs/ext4/ext4_i.h linux-2.6.27.19-5.1/fs/ext4/ext4_i.h
---- linux-2.6.27/fs/ext4/ext4_i.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/ext4_i.h 2009-03-25 16:11:36.000000000 +0000
-@@ -31,39 +31,7 @@ typedef unsigned long long ext4_fsblk_t;
+diff -r 9608d5473017 fs/ext4/ext4_i.h
+--- a/fs/ext4/ext4_i.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/ext4_i.h Wed May 06 16:56:47 2009 +0100
+@@ -31,39 +31,7 @@
typedef __u32 ext4_lblk_t;
/* data type for block group number */
#define rsv_start rsv_window._rsv_start
#define rsv_end rsv_window._rsv_end
-@@ -97,11 +65,8 @@ struct ext4_inode_info {
+@@ -97,11 +65,8 @@
ext4_group_t i_block_group;
__u32 i_state; /* Dynamic state flags for ext4 */
/*
* Extended attributes can be read independently of the main file
* data. Taking i_mutex even when reading would cause contention
-@@ -111,7 +76,7 @@ struct ext4_inode_info {
+@@ -111,7 +76,7 @@
*/
struct rw_semaphore xattr_sem;
#endif
struct posix_acl *i_acl;
struct posix_acl *i_default_acl;
#endif
-@@ -135,9 +100,6 @@ struct ext4_inode_info {
+@@ -135,9 +100,6 @@
*/
loff_t i_disksize;
/*
* i_data_sem is for serialising ext4_truncate() against
* ext4_getblock(). In the 2.4 ext2 design, great chunks of inode's
-@@ -152,7 +114,6 @@ struct ext4_inode_info {
+@@ -152,7 +114,6 @@
struct inode vfs_inode;
struct jbd2_inode jinode;
struct ext4_ext_cache i_cached_extent;
/*
* File creation time. Its function is same as that of
-@@ -165,10 +126,14 @@ struct ext4_inode_info {
+@@ -165,10 +126,14 @@
spinlock_t i_prealloc_lock;
/* allocation reservation info for delalloc */
spinlock_t i_block_reservation_lock;
};
-diff -purN linux-2.6.27/fs/ext4/ext4_sb.h linux-2.6.27.19-5.1/fs/ext4/ext4_sb.h
---- linux-2.6.27/fs/ext4/ext4_sb.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/ext4_sb.h 2009-03-25 16:11:36.000000000 +0000
-@@ -40,8 +40,8 @@ struct ext4_sb_info {
+diff -r 9608d5473017 fs/ext4/ext4_sb.h
+--- a/fs/ext4/ext4_sb.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/ext4_sb.h Wed May 06 16:56:47 2009 +0100
+@@ -40,8 +40,8 @@
unsigned long s_blocks_last; /* Last seen block count */
loff_t s_bitmap_maxbytes; /* max bytes for bitmap files */
struct buffer_head * s_sbh; /* Buffer containing the super block */
unsigned long s_mount_opt;
ext4_fsblk_t s_sb_block;
uid_t s_resuid;
-@@ -52,23 +52,26 @@ struct ext4_sb_info {
+@@ -52,23 +52,26 @@
int s_desc_per_block_bits;
int s_inode_size;
int s_first_ino;
struct list_head s_orphan;
unsigned long s_commit_interval;
struct block_device *journal_bdev;
-@@ -106,12 +109,12 @@ struct ext4_sb_info {
+@@ -106,12 +109,12 @@
/* tunables */
unsigned long s_stripe;
/* where last allocation was done - for stream allocation */
unsigned long s_mb_last_group;
unsigned long s_mb_last_start;
-@@ -121,7 +124,6 @@ struct ext4_sb_info {
+@@ -121,7 +124,6 @@
int s_mb_history_cur;
int s_mb_history_max;
int s_mb_history_num;
spinlock_t s_mb_history_lock;
int s_mb_history_filter;
-diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
---- linux-2.6.27/fs/ext4/extents.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/extents.c 2009-03-25 16:11:36.000000000 +0000
-@@ -190,7 +190,7 @@ ext4_ext_new_meta_block(handle_t *handle
+diff -r 9608d5473017 fs/ext4/extents.c
+--- a/fs/ext4/extents.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/extents.c Wed May 06 16:56:47 2009 +0100
+@@ -190,7 +190,7 @@
ext4_fsblk_t goal, newblock;
goal = ext4_ext_find_goal(inode, path, le32_to_cpu(ex->ee_block));
return newblock;
}
-@@ -383,8 +383,8 @@ static void ext4_ext_show_leaf(struct in
+@@ -383,8 +383,8 @@
ext_debug("\n");
}
#else
#endif
void ext4_ext_drop_refs(struct ext4_ext_path *path)
-@@ -440,9 +440,10 @@ ext4_ext_binsearch_idx(struct inode *ino
+@@ -440,9 +440,10 @@
for (k = 0; k < le16_to_cpu(eh->eh_entries); k++, ix++) {
if (k != 0 &&
le32_to_cpu(ix->ei_block) <= le32_to_cpu(ix[-1].ei_block)) {
le32_to_cpu(ix->ei_block),
le32_to_cpu(ix[-1].ei_block));
}
-@@ -1158,15 +1159,13 @@ ext4_ext_search_right(struct inode *inod
+@@ -1158,15 +1159,13 @@
while (--depth >= 0) {
ix = path[depth].p_idx;
if (ix != EXT_LAST_INDEX(path[depth].p_hdr))
/* we've found index to the right, let's
* follow it and find the closest allocated
* block to the right */
-@@ -1199,7 +1198,6 @@ ext4_ext_search_right(struct inode *inod
+@@ -1199,7 +1198,6 @@
*phys = ext_pblock(ex);
put_bh(bh);
return 0;
}
/*
-@@ -1475,7 +1473,7 @@ int ext4_ext_insert_extent(handle_t *han
+@@ -1475,7 +1473,7 @@
struct ext4_ext_path *path,
struct ext4_extent *newext)
{
struct ext4_extent *ex, *fex;
struct ext4_extent *nearex; /* nearest extent */
struct ext4_ext_path *npath = NULL;
-@@ -1620,7 +1618,6 @@ cleanup:
+@@ -1620,7 +1618,6 @@
ext4_ext_drop_refs(npath);
kfree(npath);
}
ext4_ext_invalidate_cache(inode);
return err;
}
-@@ -2124,7 +2121,6 @@ static int ext4_ext_remove_space(struct
+@@ -2124,7 +2121,6 @@
}
}
out:
ext4_ext_drop_refs(path);
kfree(path);
ext4_journal_stop(handle);
-@@ -2142,7 +2138,7 @@ void ext4_ext_init(struct super_block *s
+@@ -2142,7 +2138,7 @@
*/
if (test_opt(sb, EXTENTS)) {
#ifdef AGGRESSIVE_TEST
printk(", aggressive tests");
#endif
-@@ -2271,7 +2267,7 @@ static int ext4_ext_convert_to_initializ
+@@ -2271,7 +2267,7 @@
struct inode *inode,
struct ext4_ext_path *path,
ext4_lblk_t iblock,
{
struct ext4_extent *ex, newex, orig_ex;
struct ext4_extent *ex1 = NULL;
-@@ -2569,26 +2565,26 @@ fix_extent_len:
+@@ -2569,26 +2565,26 @@
*/
int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
ext4_lblk_t iblock,
if (!create) {
/*
* block isn't allocated yet and
-@@ -2597,7 +2593,7 @@ int ext4_ext_get_blocks(handle_t *handle
+@@ -2597,7 +2593,7 @@
goto out2;
}
/* we should allocate requested block */
/* block is already allocated */
newblock = iblock
- le32_to_cpu(newex.ee_block)
-@@ -2696,11 +2692,8 @@ int ext4_ext_get_blocks(handle_t *handle
+@@ -2696,11 +2692,8 @@
goto out2;
}
/*
/* find neighbour allocated blocks */
ar.lleft = iblock;
-@@ -2748,7 +2741,7 @@ int ext4_ext_get_blocks(handle_t *handle
+@@ -2748,7 +2741,7 @@
if (!newblock)
goto out2;
ext_debug("allocate new block: goal %llu, found %llu/%lu\n",
/* try to insert new extent into found leaf and return */
ext4_ext_store_pblock(&newex, newblock);
-@@ -2760,7 +2753,7 @@ int ext4_ext_get_blocks(handle_t *handle
+@@ -2760,7 +2753,7 @@
/* free data blocks we just allocated */
/* not a good idea to call discard here directly,
* but otherwise we'd need to call it every free() */
ext4_free_blocks(handle, inode, ext_pblock(&newex),
ext4_ext_get_actual_len(&newex), 0);
goto out2;
-@@ -2824,7 +2817,7 @@ void ext4_ext_truncate(struct inode *ino
+@@ -2824,7 +2817,7 @@
down_write(&EXT4_I(inode)->i_data_sem);
ext4_ext_invalidate_cache(inode);
/*
* TODO: optimization is possible here.
-@@ -2877,10 +2870,11 @@ static void ext4_falloc_update_inode(str
+@@ -2877,10 +2870,11 @@
* Update only when preallocation was requested beyond
* the file size.
*/
}
}
-@@ -2897,7 +2891,7 @@ long ext4_fallocate(struct inode *inode,
+@@ -2897,7 +2891,7 @@
handle_t *handle;
ext4_lblk_t block;
loff_t new_size;
int ret = 0;
int ret2 = 0;
int retries = 0;
-diff -purN linux-2.6.27/fs/ext4/file.c linux-2.6.27.19-5.1/fs/ext4/file.c
---- linux-2.6.27/fs/ext4/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/file.c 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/file.c
+--- a/fs/ext4/file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/file.c Wed May 06 16:56:48 2009 +0100
@@ -31,14 +31,14 @@
* from ext4_file_open: open gets called at every open, but release
* gets called only when /all/ the files are closed.
up_write(&EXT4_I(inode)->i_data_sem);
}
if (is_dx(inode) && filp->private_data)
-@@ -162,7 +162,7 @@ const struct inode_operations ext4_file_
+@@ -162,7 +162,7 @@
.truncate = ext4_truncate,
.setattr = ext4_setattr,
.getattr = ext4_getattr,
.setxattr = generic_setxattr,
.getxattr = generic_getxattr,
.listxattr = ext4_listxattr,
-diff -purN linux-2.6.27/fs/ext4/fsync.c linux-2.6.27.19-5.1/fs/ext4/fsync.c
---- linux-2.6.27/fs/ext4/fsync.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/fsync.c 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/fsync.c
+--- a/fs/ext4/fsync.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/fsync.c Wed May 06 16:56:48 2009 +0100
@@ -28,6 +28,7 @@
#include <linux/writeback.h>
#include <linux/jbd2.h>
#include "ext4.h"
#include "ext4_jbd2.h"
-@@ -43,7 +44,7 @@
+@@ -43,13 +44,17 @@
* inode to disk.
*/
{
struct inode *inode = dentry->d_inode;
journal_t *journal = EXT4_SB(inode->i_sb)->s_journal;
-@@ -51,6 +52,10 @@ int ext4_sync_file(struct file * file, s
+ int ret = 0;
J_ASSERT(ext4_journal_current_handle() == NULL);
-
++
+ trace_mark(ext4_sync_file, "dev %s datasync %d ino %ld parent %ld",
+ inode->i_sb->s_id, datasync, inode->i_ino,
+ dentry->d_parent->d_inode->i_ino);
-+
+
/*
* data=writeback:
- * The caller's filemap_fdatawrite()/wait will sync the data.
-diff -purN linux-2.6.27/fs/ext4/hash.c linux-2.6.27.19-5.1/fs/ext4/hash.c
---- linux-2.6.27/fs/ext4/hash.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/hash.c 2009-03-25 16:11:36.000000000 +0000
-@@ -27,7 +27,7 @@ static void TEA_transform(__u32 buf[4],
+diff -r 9608d5473017 fs/ext4/hash.c
+--- a/fs/ext4/hash.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/hash.c Wed May 06 16:56:48 2009 +0100
+@@ -27,7 +27,7 @@
sum += DELTA;
b0 += ((b1 << 4)+a) ^ (b1+sum) ^ ((b1 >> 5)+b);
b1 += ((b0 << 4)+c) ^ (b0+sum) ^ ((b0 >> 5)+d);
buf[0] += b0;
buf[1] += b1;
-@@ -35,23 +35,43 @@ static void TEA_transform(__u32 buf[4],
+@@ -35,23 +35,43 @@
/* The old legacy hash */
- __u32 hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9;
+ __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9;
+ const unsigned char *ucp = (const unsigned char *) name;
-+
-+ while (len--) {
-+ hash = hash1 + (hash0 ^ (((int) *ucp++) * 7152373));
-+
-+ if (hash & 0x80000000)
-+ hash -= 0x7fffffff;
-+ hash1 = hash0;
-+ hash0 = hash;
-+ }
-+ return hash0 << 1;
-+}
-+
-+static __u32 dx_hack_hash_signed(const char *name, int len)
-+{
-+ __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9;
-+ const signed char *scp = (const signed char *) name;
+
while (len--) {
- __u32 hash = hash1 + (hash0 ^ (*name++ * 7152373));
-+ hash = hash1 + (hash0 ^ (((int) *scp++) * 7152373));
++ hash = hash1 + (hash0 ^ (((int) *ucp++) * 7152373));
- if (hash & 0x80000000) hash -= 0x7fffffff;
+ if (hash & 0x80000000)
}
-static void str2hashbuf(const char *msg, int len, __u32 *buf, int num)
++static __u32 dx_hack_hash_signed(const char *name, int len)
++{
++ __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9;
++ const signed char *scp = (const signed char *) name;
++
++ while (len--) {
++ hash = hash1 + (hash0 ^ (((int) *scp++) * 7152373));
++
++ if (hash & 0x80000000)
++ hash -= 0x7fffffff;
++ hash1 = hash0;
++ hash0 = hash;
++ }
++ return hash0 << 1;
++}
++
+static void str2hashbuf_signed(const char *msg, int len, __u32 *buf, int num)
{
__u32 pad, val;
pad = (__u32)len | ((__u32)len << 8);
pad |= pad << 16;
-@@ -59,10 +79,38 @@ static void str2hashbuf(const char *msg,
+@@ -59,10 +79,38 @@
val = pad;
if (len > num*4)
len = num * 4;
if ((i % 4) == 3) {
*buf++ = val;
val = pad;
-@@ -95,6 +143,8 @@ int ext4fs_dirhash(const char *name, int
+@@ -95,6 +143,8 @@
const char *p;
int i;
__u32 in[8], buf[4];
/* Initialize the default seed for the hash checksum functions */
buf[0] = 0x67452301;
-@@ -104,7 +154,7 @@ int ext4fs_dirhash(const char *name, int
+@@ -104,7 +154,7 @@
/* Check to see if the seed is all zero's */
if (hinfo->seed) {
if (hinfo->seed[i])
break;
}
-@@ -113,13 +163,18 @@ int ext4fs_dirhash(const char *name, int
+@@ -113,13 +163,18 @@
}
switch (hinfo->hash_version) {
half_md4_transform(buf, in);
len -= 32;
p += 32;
-@@ -127,10 +182,12 @@ int ext4fs_dirhash(const char *name, int
+@@ -127,10 +182,12 @@
minor_hash = buf[2];
hash = buf[1];
break;
TEA_transform(buf, in);
len -= 16;
p += 16;
-diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
---- linux-2.6.27/fs/ext4/ialloc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/ialloc.c 2009-03-25 16:11:36.000000000 +0000
-@@ -74,17 +74,17 @@ unsigned ext4_init_inode_bitmap(struct s
+diff -r 9608d5473017 fs/ext4/ialloc.c
+--- a/fs/ext4/ialloc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/ialloc.c Wed May 06 16:56:48 2009 +0100
+@@ -74,17 +74,17 @@
/* If checksum is bad mark all blocks and inodes use to prevent
* allocation, essentially implementing a per-group read-only flag. */
if (!ext4_group_desc_csum_verify(sbi, block_group, gdp)) {
bh->b_data);
return EXT4_INODES_PER_GROUP(sb);
-@@ -111,27 +111,49 @@ ext4_read_inode_bitmap(struct super_bloc
+@@ -111,27 +111,49 @@
if (unlikely(!bh)) {
ext4_error(sb, __func__,
"Cannot read inode bitmap - "
ext4_init_inode_bitmap(sb, bh, block_group, desc);
+ set_bitmap_uptodate(bh);
set_buffer_uptodate(bh);
-- unlock_buffer(bh);
- spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
-+ unlock_buffer(bh);
++ spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
+ unlock_buffer(bh);
+- spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
return bh;
}
spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
block_group, bitmap_blk);
return NULL;
}
-@@ -154,39 +176,40 @@ ext4_read_inode_bitmap(struct super_bloc
+@@ -154,39 +176,40 @@
* though), and then we'd have two inodes sharing the
* same inode number and space on the harddisk.
*/
/*
* Note: we must free any quota before locking the superblock,
-@@ -200,12 +223,12 @@ void ext4_free_inode (handle_t *handle,
+@@ -200,12 +223,12 @@
is_directory = S_ISDIR(inode->i_mode);
/* Do this BEFORE marking the inode not in use or returning an error */
goto error_return;
}
block_group = (ino - 1) / EXT4_INODES_PER_GROUP(sb);
-@@ -222,10 +245,10 @@ void ext4_free_inode (handle_t *handle,
+@@ -222,10 +245,10 @@
/* Ok, now we can actually update the inode bitmaps.. */
if (!ext4_clear_bit_atomic(sb_bgl_lock(sbi, block_group),
bit, bitmap_bh->b_data))
BUFFER_TRACE(bh2, "get_write_access");
fatal = ext4_journal_get_write_access(handle, bh2);
-@@ -233,9 +256,12 @@ void ext4_free_inode (handle_t *handle,
+@@ -233,9 +256,12 @@
if (gdp) {
spin_lock(sb_bgl_lock(sbi, block_group));
gdp->bg_checksum = ext4_group_desc_csum(sbi,
block_group, gdp);
spin_unlock(sb_bgl_lock(sbi, block_group));
-@@ -287,14 +313,14 @@ static int find_group_dir(struct super_b
+@@ -287,14 +313,14 @@
avefreei = freei / ngroups;
for (group = 0; group < ngroups; group++) {
*best_group = group;
best_desc = desc;
ret = 0;
-@@ -366,7 +392,7 @@ found_flexbg:
+@@ -366,7 +392,7 @@
for (i = best_flex * flex_size; i < ngroups &&
i < (best_flex + 1) * flex_size; i++) {
desc = ext4_get_group_desc(sb, i, &bh);
*best_group = i;
goto out;
}
-@@ -440,17 +466,17 @@ static int find_group_orlov(struct super
+@@ -440,17 +466,17 @@
for (i = 0; i < ngroups; i++) {
grp = (parent_group + i) % ngroups;
desc = ext4_get_group_desc(sb, grp, NULL);
}
if (ret == 0)
return ret;
-@@ -476,13 +502,13 @@ static int find_group_orlov(struct super
+@@ -476,13 +502,13 @@
for (i = 0; i < ngroups; i++) {
*group = (parent_group + i) % ngroups;
desc = ext4_get_group_desc(sb, *group, NULL);
continue;
return 0;
}
-@@ -491,8 +517,8 @@ fallback:
+@@ -491,8 +517,8 @@
for (i = 0; i < ngroups; i++) {
*group = (parent_group + i) % ngroups;
desc = ext4_get_group_desc(sb, *group, NULL);
return 0;
}
-@@ -521,8 +547,8 @@ static int find_group_other(struct super
+@@ -521,8 +547,8 @@
*/
*group = parent_group;
desc = ext4_get_group_desc(sb, *group, NULL);
return 0;
/*
-@@ -545,8 +571,8 @@ static int find_group_other(struct super
+@@ -545,8 +571,8 @@
if (*group >= ngroups)
*group -= ngroups;
desc = ext4_get_group_desc(sb, *group, NULL);
return 0;
}
-@@ -559,7 +585,7 @@ static int find_group_other(struct super
+@@ -559,11 +585,84 @@
if (++*group >= ngroups)
*group = 0;
desc = ext4_get_group_desc(sb, *group, NULL);
return 0;
}
-@@ -567,6 +593,79 @@ static int find_group_other(struct super
- }
-
- /*
+ return -1;
++}
++
++/*
+ * claim the inode from the inode bitmap. If the group
+ * is uninit we need to take the groups's sb_bgl_lock
+ * and clear the uninit flag. The inode bitmap update
+err_ret:
+ spin_unlock(sb_bgl_lock(sbi, group));
+ return retval;
-+}
-+
-+/*
- * There are two policies for allocating an inode. If the new inode is
- * a directory, then a forward search is made for a block group with both
- * free space and a low directory-to-inode ratio; if that fails, then of
-@@ -576,16 +675,16 @@ static int find_group_other(struct super
+ }
+
+ /*
+@@ -576,16 +675,16 @@
* For other inodes, search forward from the parent directory's block
* group to find a free inode.
*/
struct ext4_inode_info *ei;
struct ext4_sb_info *sbi;
int ret2, err = 0;
-@@ -613,7 +712,7 @@ struct inode *ext4_new_inode(handle_t *h
+@@ -613,7 +712,7 @@
}
if (S_ISDIR(mode)) {
ret2 = find_group_dir(sb, dir, &group);
else
ret2 = find_group_orlov(sb, dir, &group);
-@@ -628,40 +727,50 @@ got_group:
+@@ -628,40 +727,50 @@
for (i = 0; i < sbi->s_groups_count; i++) {
err = -EIO;
if (++ino < EXT4_INODES_PER_GROUP(sb))
goto repeat_in_this_group;
-@@ -681,30 +790,16 @@ repeat_in_this_group:
+@@ -681,30 +790,16 @@
goto out;
got:
goto fail;
}
-@@ -712,63 +807,29 @@ got:
+@@ -712,63 +807,29 @@
spin_lock(sb_bgl_lock(sbi, group));
/* recheck and clear flag under lock if we still need to */
if (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
-- gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);
- free = ext4_free_blocks_after_init(sb, group, gdp);
++ free = ext4_free_blocks_after_init(sb, group, gdp);
+ gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);
+- free = ext4_free_blocks_after_init(sb, group, gdp);
- gdp->bg_free_blocks_count = cpu_to_le16(free);
-+ gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);
+ ext4_free_blks_set(sb, gdp, free);
+ gdp->bg_checksum = ext4_group_desc_csum(sbi, group,
+ gdp);
percpu_counter_dec(&sbi->s_freeinodes_counter);
if (S_ISDIR(mode))
-@@ -782,15 +843,15 @@ got:
+@@ -782,15 +843,15 @@
spin_unlock(sb_bgl_lock(sbi, flex_group));
}
inode->i_mode = mode;
inode->i_ino = ino + group * EXT4_INODES_PER_GROUP(sb);
-@@ -816,7 +877,6 @@ got:
+@@ -816,7 +877,6 @@
ei->i_flags &= ~EXT4_DIRSYNC_FL;
ei->i_file_acl = 0;
ei->i_dtime = 0;
ei->i_block_group = group;
ext4_set_inode_flags(inode);
-@@ -832,7 +892,7 @@ got:
+@@ -832,7 +892,7 @@
ei->i_extra_isize = EXT4_SB(sb)->s_want_extra_isize;
ret = inode;
err = -EDQUOT;
goto fail_drop;
}
-@@ -841,7 +901,7 @@ got:
+@@ -841,7 +901,7 @@
if (err)
goto fail_free_drop;
if (err)
goto fail_free_drop;
-@@ -867,7 +927,7 @@ out:
+@@ -867,7 +927,7 @@
iput(inode);
ret = ERR_PTR(err);
really_out:
return ret;
fail_free_drop:
-@@ -878,7 +938,7 @@ fail_drop:
+@@ -878,7 +938,7 @@
inode->i_flags |= S_NOQUOTA;
inode->i_nlink = 0;
iput(inode);
return ERR_PTR(err);
}
-@@ -959,7 +1019,7 @@ error:
+@@ -959,7 +1019,7 @@
return ERR_PTR(err);
}
{
unsigned long desc_count;
struct ext4_group_desc *gdp;
-@@ -974,10 +1034,10 @@ unsigned long ext4_count_free_inodes (st
+@@ -974,10 +1034,10 @@
bitmap_count = 0;
gdp = NULL;
for (i = 0; i < EXT4_SB(sb)->s_groups_count; i++) {
brelse(bitmap_bh);
bitmap_bh = ext4_read_inode_bitmap(sb, i);
if (!bitmap_bh)
-@@ -985,20 +1045,21 @@ unsigned long ext4_count_free_inodes (st
+@@ -985,20 +1045,21 @@
x = ext4_count_free(bitmap_bh, EXT4_INODES_PER_GROUP(sb) / 8);
printk(KERN_DEBUG "group %lu: stored = %d, counted = %lu\n",
cond_resched();
}
return desc_count;
-@@ -1006,16 +1067,16 @@ unsigned long ext4_count_free_inodes (st
+@@ -1006,16 +1067,16 @@
}
/* Called at mount-time, super-block is locked */
}
return count;
}
-diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
---- linux-2.6.27/fs/ext4/inode.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/inode.c 2009-03-25 16:11:36.000000000 +0000
-@@ -190,7 +190,7 @@ static int ext4_journal_test_restart(han
+diff -r 9608d5473017 fs/ext4/inode.c
+--- a/fs/ext4/inode.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/inode.c Wed May 06 16:56:48 2009 +0100
+@@ -190,7 +190,7 @@
/*
* Called at the last iput() if i_nlink is zero.
*/
{
handle_t *handle;
int err;
-@@ -330,11 +330,11 @@ static int ext4_block_to_path(struct ino
+@@ -330,11 +330,11 @@
int final = 0;
if (i_block < 0) {
offsets[n++] = EXT4_IND_BLOCK;
offsets[n++] = i_block;
final = ptrs;
-@@ -400,14 +400,14 @@ static Indirect *ext4_get_branch(struct
+@@ -400,14 +400,14 @@
*err = 0;
/* i_data is not going away, no lock needed */
/* Reader: end */
if (!p->key)
goto no_block;
-@@ -443,7 +443,7 @@ no_block:
+@@ -443,7 +443,7 @@
static ext4_fsblk_t ext4_find_near(struct inode *inode, Indirect *ind)
{
struct ext4_inode_info *ei = EXT4_I(inode);
__le32 *p;
ext4_fsblk_t bg_start;
ext4_fsblk_t last_block;
-@@ -486,18 +486,9 @@ static ext4_fsblk_t ext4_find_near(struc
+@@ -486,18 +486,9 @@
static ext4_fsblk_t ext4_find_goal(struct inode *inode, ext4_lblk_t block,
Indirect *partial)
{
-
- block_i = EXT4_I(inode)->i_block_alloc_info;
-
- /*
+- /*
- * try the heuristic for sequential allocation,
- * failing that at least try to get decent locality.
-+ * XXX need to get goal block from mballoc's data structures
- */
+- */
- if (block_i && (block == block_i->last_alloc_logical_block + 1)
- && (block_i->last_alloc_physical_block != 0)) {
- return block_i->last_alloc_physical_block + 1;
- }
++ /*
++ * XXX need to get goal block from mballoc's data structures
++ */
return ext4_find_near(inode, partial);
}
-@@ -514,10 +505,10 @@ static ext4_fsblk_t ext4_find_goal(struc
+@@ -514,10 +505,10 @@
* return the total number of blocks to be allocate, including the
* direct and indirect blocks.
*/
/*
* Simple case, [t,d]Indirect block(s) has not allocated yet
-@@ -555,6 +546,7 @@ static int ext4_alloc_blocks(handle_t *h
+@@ -555,6 +546,7 @@
int indirect_blks, int blks,
ext4_fsblk_t new_blocks[4], int *err)
{
int target, i;
unsigned long count = 0, blk_allocated = 0;
int index = 0;
-@@ -603,10 +595,15 @@ static int ext4_alloc_blocks(handle_t *h
+@@ -603,10 +595,15 @@
if (!target)
goto allocated;
/* Now allocate data blocks */
if (*err && (target == blks)) {
/*
* if the allocation failed and we didn't allocate
-@@ -622,7 +619,7 @@ static int ext4_alloc_blocks(handle_t *h
+@@ -622,7 +619,7 @@
*/
new_blocks[index] = current_block;
}
}
allocated:
/* total number of blocks allocated for direct blocks */
-@@ -630,7 +627,7 @@ allocated:
+@@ -630,7 +627,7 @@
*err = 0;
return ret;
failed_out:
ext4_free_blocks(handle, inode, new_blocks[i], 1, 0);
return ret;
}
-@@ -703,7 +700,7 @@ static int ext4_alloc_branch(handle_t *h
+@@ -703,7 +700,7 @@
branch[n].p = (__le32 *) bh->b_data + offsets[n];
branch[n].key = cpu_to_le32(new_blocks[n]);
*branch[n].p = branch[n].key;
current_block = new_blocks[n];
/*
* End of chain, update the last new metablock of
-@@ -730,7 +727,7 @@ failed:
+@@ -730,7 +727,7 @@
BUFFER_TRACE(branch[i].bh, "call jbd2_journal_forget");
ext4_journal_forget(handle, branch[i].bh);
}
ext4_free_blocks(handle, inode, new_blocks[i], 1, 0);
ext4_free_blocks(handle, inode, new_blocks[i], num, 0);
-@@ -757,10 +754,8 @@ static int ext4_splice_branch(handle_t *
+@@ -757,10 +754,8 @@
{
int i;
int err = 0;
/*
* If we're splicing into a [td]indirect block (as opposed to the
* inode) then we need to get write access to the [td]indirect block
-@@ -783,18 +778,7 @@ static int ext4_splice_branch(handle_t *
+@@ -783,18 +778,7 @@
if (num == 0 && blks > 1) {
current_block = le32_to_cpu(where->key) + 1;
for (i = 1; i < blks; i++)
}
/* We are done with atomic stuff, now do the rest of housekeeping */
-@@ -861,10 +845,10 @@ err_out:
+@@ -861,10 +845,10 @@
* down_read(&EXT4_I(inode)->i_data_sem) if not allocating file system block
* (ie, create is zero). Otherwise down_write(&EXT4_I(inode)->i_data_sem)
*/
{
int err = -EIO;
ext4_lblk_t offsets[4];
-@@ -914,12 +898,8 @@ int ext4_get_blocks_handle(handle_t *han
+@@ -914,12 +898,8 @@
goto cleanup;
/*
goal = ext4_find_goal(inode, iblock, partial);
/* the number of blocks need to allocate for [d,t]indirect blocks */
-@@ -1030,19 +1010,20 @@ static void ext4_da_update_reserve_space
+@@ -1030,19 +1010,20 @@
BUG_ON(mdb > EXT4_I(inode)->i_reserved_meta_blocks);
mdb_free = EXT4_I(inode)->i_reserved_meta_blocks - mdb;
spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);
}
-@@ -1069,7 +1050,7 @@ static void ext4_da_update_reserve_space
+@@ -1069,7 +1050,7 @@
* It returns the error in case of allocation failure.
*/
int ext4_get_blocks_wrap(handle_t *handle, struct inode *inode, sector_t block,
int create, int extend_disksize, int flag)
{
int retval;
-@@ -1241,7 +1222,7 @@ struct buffer_head *ext4_getblk(handle_t
+@@ -1241,7 +1222,7 @@
BUFFER_TRACE(bh, "call get_create_access");
fatal = ext4_journal_get_create_access(handle, bh);
if (!fatal && !buffer_uptodate(bh)) {
set_buffer_uptodate(bh);
}
unlock_buffer(bh);
-@@ -1266,7 +1247,7 @@ err:
+@@ -1266,7 +1247,7 @@
struct buffer_head *ext4_bread(handle_t *handle, struct inode *inode,
ext4_lblk_t block, int create, int *err)
{
bh = ext4_getblk(handle, inode, block, create, err);
if (!bh)
-@@ -1282,13 +1263,13 @@ struct buffer_head *ext4_bread(handle_t
+@@ -1282,13 +1263,13 @@
return NULL;
}
{
struct buffer_head *bh;
unsigned block_start, block_end;
-@@ -1296,9 +1277,9 @@ static int walk_page_buffers( handle_t *
+@@ -1296,9 +1277,9 @@
int err, ret = 0;
struct buffer_head *next;
{
next = bh->b_this_page;
block_end = block_start + blocksize;
-@@ -1351,26 +1332,26 @@ static int ext4_write_begin(struct file
+@@ -1351,26 +1332,26 @@
loff_t pos, unsigned len, unsigned flags,
struct page **pagep, void **fsdata)
{
- if (IS_ERR(handle)) {
- ret = PTR_ERR(handle);
- goto out;
+- }
+-
+- page = __grab_cache_page(mapping, index);
+ handle = ext4_journal_start(inode, needed_blocks);
+ if (IS_ERR(handle)) {
+ ret = PTR_ERR(handle);
+ goto out;
- }
-
-- page = __grab_cache_page(mapping, index);
++ }
++
+ page = grab_cache_page_write_begin(mapping, index, flags);
if (!page) {
ext4_journal_stop(handle);
ret = -ENOMEM;
-@@ -1387,9 +1368,16 @@ retry:
+@@ -1387,9 +1368,16 @@
}
if (ret) {
- unlock_page(page);
-+ unlock_page(page);
- ext4_journal_stop(handle);
+- ext4_journal_stop(handle);
- page_cache_release(page);
++ unlock_page(page);
++ ext4_journal_stop(handle);
+ page_cache_release(page);
+ /*
+ * block_write_begin may have instantiated a few blocks
}
if (ret == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries))
-@@ -1426,16 +1414,18 @@ static int ext4_ordered_write_end(struct
+@@ -1426,16 +1414,18 @@
ret = ext4_jbd2_file_inode(handle, inode);
if (ret == 0) {
ret2 = generic_write_end(file, mapping, pos, len, copied,
page, fsdata);
copied = ret2;
-@@ -1460,8 +1450,14 @@ static int ext4_writeback_write_end(stru
+@@ -1460,8 +1450,14 @@
loff_t new_i_size;
new_i_size = pos + copied;
ret2 = generic_write_end(file, mapping, pos, len, copied,
page, fsdata);
-@@ -1486,6 +1482,7 @@ static int ext4_journalled_write_end(str
+@@ -1486,6 +1482,7 @@
int ret = 0, ret2;
int partial = 0;
unsigned from, to;
from = pos & (PAGE_CACHE_SIZE - 1);
to = from + len;
-@@ -1500,11 +1497,12 @@ static int ext4_journalled_write_end(str
+@@ -1500,11 +1497,12 @@
to, &partial, write_end_fn);
if (!partial)
SetPageUptodate(page);
ret2 = ext4_mark_inode_dirty(handle, inode);
if (!ret)
ret = ret2;
-@@ -1521,6 +1519,7 @@ static int ext4_journalled_write_end(str
+@@ -1521,6 +1519,7 @@
static int ext4_da_reserve_space(struct inode *inode, int nrblocks)
{
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
unsigned long md_needed, mdblocks, total = 0;
-@@ -1529,6 +1528,7 @@ static int ext4_da_reserve_space(struct
+@@ -1529,6 +1528,7 @@
* in order to allocate nrblocks
* worse case is one extent per block
*/
spin_lock(&EXT4_I(inode)->i_block_reservation_lock);
total = EXT4_I(inode)->i_reserved_data_blocks + nrblocks;
mdblocks = ext4_calc_metadata_amount(inode, total);
-@@ -1537,13 +1537,14 @@ static int ext4_da_reserve_space(struct
+@@ -1537,13 +1537,14 @@
md_needed = mdblocks - EXT4_I(inode)->i_reserved_meta_blocks;
total = md_needed + nrblocks;
EXT4_I(inode)->i_reserved_data_blocks += nrblocks;
EXT4_I(inode)->i_reserved_meta_blocks = mdblocks;
-@@ -1585,8 +1586,8 @@ static void ext4_da_release_space(struct
+@@ -1585,8 +1586,8 @@
release = to_free + mdb_free;
/* update per-inode reservations */
BUG_ON(to_free > EXT4_I(inode)->i_reserved_data_blocks);
-@@ -1629,7 +1630,8 @@ struct mpage_da_data {
+@@ -1629,7 +1630,8 @@
get_block_t *get_block;
struct writeback_control *wbc;
int io_done;
};
/*
-@@ -1648,18 +1650,25 @@ struct mpage_da_data {
+@@ -1648,18 +1650,25 @@
*/
static int mpage_da_submit_io(struct mpage_da_data *mpd)
{
- struct address_space *mapping = mpd->inode->i_mapping;
-- int ret = 0, err, nr_pages, i;
-- unsigned long index, end;
+ long pages_skipped;
- struct pagevec pvec;
++ struct pagevec pvec;
+ unsigned long index, end;
-+ int ret = 0, err, nr_pages, i;
+ int ret = 0, err, nr_pages, i;
+- unsigned long index, end;
+- struct pagevec pvec;
+ struct inode *inode = mpd->inode;
+ struct address_space *mapping = inode->i_mapping;
nr_pages = pagevec_lookup(&pvec, mapping, index, PAGEVEC_SIZE);
if (nr_pages == 0)
break;
-@@ -1671,8 +1680,16 @@ static int mpage_da_submit_io(struct mpa
+@@ -1671,8 +1680,16 @@
break;
index++;
mpd->pages_written++;
/*
* In error case, we have to continue because
-@@ -1783,6 +1800,57 @@ static inline void __unmap_underlying_bl
+@@ -1783,6 +1800,57 @@
unmap_underlying_metadata(bdev, bh->b_blocknr + i);
}
/*
* mpage_da_map_blocks - go through given space
*
-@@ -1792,32 +1860,69 @@ static inline void __unmap_underlying_bl
+@@ -1792,32 +1860,69 @@
* The function skips space we know is already mapped to disk blocks.
*
*/
-static void mpage_da_map_blocks(struct mpage_da_data *mpd)
+-{
+- int err = 0;
+static int mpage_da_map_blocks(struct mpage_da_data *mpd)
- {
- int err = 0;
-- struct buffer_head *lbh = &mpd->lbh;
++{
++ int err = 0;
++ struct buffer_head new;
+ struct buffer_head *lbh = &mpd->lbh;
- sector_t next = lbh->b_blocknr;
- struct buffer_head new;
-+ struct buffer_head *lbh = &mpd->lbh;
+- struct buffer_head new;
+ sector_t next;
/*
BUG_ON(new.b_size == 0);
if (buffer_new(&new))
-@@ -1830,7 +1935,7 @@ static void mpage_da_map_blocks(struct m
+@@ -1830,7 +1935,7 @@
if (buffer_delay(lbh) || buffer_unwritten(lbh))
mpage_put_bnr_to_bhs(mpd, next, &new);
}
#define BH_FLAGS ((1 << BH_Uptodate) | (1 << BH_Mapped) | \
-@@ -1899,8 +2004,8 @@ flush_it:
+@@ -1899,8 +2004,8 @@
* We couldn't merge the block to our extent, so we
* need to flush current extent and start new one
*/
mpd->io_done = 1;
return;
}
-@@ -1942,8 +2047,8 @@ static int __mpage_da_writepage(struct p
+@@ -1942,8 +2047,8 @@
* and start IO on them using writepage()
*/
if (mpd->next_page != mpd->first_page) {
/*
* skip rest of the page in the page_vec
*/
-@@ -1991,11 +2096,29 @@ static int __mpage_da_writepage(struct p
+@@ -1991,11 +2096,29 @@
bh = head;
do {
BUG_ON(buffer_locked(bh));
}
logical++;
} while ((bh = bh->b_this_page) != head);
-@@ -2018,39 +2141,42 @@ static int __mpage_da_writepage(struct p
+@@ -2018,39 +2141,42 @@
*/
static int mpage_da_writepages(struct address_space *mapping,
struct writeback_control *wbc,
- get_block_t get_block)
-+ struct mpage_da_data *mpd)
- {
+-{
- struct mpage_da_data mpd;
- long to_write;
++ struct mpage_da_data *mpd)
++{
int ret;
+-
+- if (!get_block)
+ long nr_to_write;
+ pgoff_t index;
++
++
++
++ if (!mpd->get_block)
+ return generic_writepages(mapping, wbc);
-- if (!get_block)
-- return generic_writepages(mapping, wbc);
--
- mpd.wbc = wbc;
- mpd.inode = mapping->host;
- mpd.lbh.b_size = 0;
- mpd.get_block = get_block;
- mpd.io_done = 0;
- mpd.pages_written = 0;
-
+-
- to_write = wbc->nr_to_write;
-
+-
- ret = write_cache_pages(mapping, wbc, __mpage_da_writepage, &mpd);
-+ if (!mpd->get_block)
-+ return generic_writepages(mapping, wbc);
-
+-
+ mpd->lbh.b_size = 0;
+ mpd->lbh.b_state = 0;
+ mpd->lbh.b_blocknr = 0;
- mpage_da_map_blocks(&mpd);
- mpage_da_submit_io(&mpd);
- }
+-
+- wbc->nr_to_write = to_write - mpd.pages_written;
+ if (!mpd->io_done && mpd->next_page != mpd->first_page) {
+ if (mpage_da_map_blocks(mpd) == 0)
+ mpage_da_submit_io(mpd);
-
-- wbc->nr_to_write = to_write - mpd.pages_written;
++
+ mpd->io_done = 1;
+ ret = MPAGE_DA_EXTENT_TAIL;
+ }
return ret;
}
-@@ -2103,18 +2229,24 @@ static int ext4_da_get_block_write(struc
+@@ -2103,17 +2229,23 @@
handle_t *handle = NULL;
handle = ext4_journal_current_handle();
if (ret > 0) {
+
bh_result->b_size = (ret << inode->i_blkbits);
-
++
+ if (ext4_should_order_data(inode)) {
+ int retval;
+ retval = ext4_jbd2_file_inode(handle, inode);
+ */
+ return retval;
+ }
-+
+
/*
* Update on-disk size along with block allocation
- * we don't use 'extend_disksize' as size may change
-@@ -2124,18 +2256,9 @@ static int ext4_da_get_block_write(struc
+@@ -2124,18 +2256,9 @@
if (disksize > i_size_read(inode))
disksize = i_size_read(inode);
if (disksize > EXT4_I(inode)->i_disksize) {
}
ret = 0;
}
-@@ -2181,7 +2304,7 @@ static int ext4_da_writepage(struct page
+@@ -2181,7 +2304,7 @@
{
int ret = 0;
loff_t size;
struct buffer_head *page_bufs;
struct inode *inode = page->mapping->host;
-@@ -2242,6 +2365,8 @@ static int ext4_da_writepage(struct page
+@@ -2242,6 +2365,8 @@
unlock_page(page);
return 0;
}
}
if (test_opt(inode->i_sb, NOBH) && ext4_should_writeback_data(inode))
-@@ -2282,11 +2407,14 @@ static int ext4_da_writepages_trans_bloc
+@@ -2282,11 +2407,14 @@
static int ext4_da_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{
+ int range_whole = 0;
handle_t *handle = NULL;
- loff_t range_start = 0;
+- struct inode *inode = mapping->host;
+ struct mpage_da_data mpd;
- struct inode *inode = mapping->host;
++ struct inode *inode = mapping->host;
+ int pages_written = 0;
+ long pages_skipped;
int needed_blocks, ret = 0, nr_to_writebump = 0;
struct ext4_sb_info *sbi = EXT4_SB(mapping->host->i_sb);
/*
-@@ -2296,6 +2424,20 @@ static int ext4_da_writepages(struct add
+@@ -2296,6 +2424,20 @@
*/
if (!mapping->nrpages || !mapping_tagged(mapping, PAGECACHE_TAG_DIRTY))
return 0;
/*
* Make sure nr_to_write is >= sbi->s_mb_stream_request
* This make sure small files blocks are allocated in
-@@ -2306,20 +2448,24 @@ static int ext4_da_writepages(struct add
+@@ -2306,20 +2448,24 @@
nr_to_writebump = sbi->s_mb_stream_request - wbc->nr_to_write;
wbc->nr_to_write = sbi->s_mb_stream_request;
}
-+ if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
-+ range_whole = 1;
-
+-
- if (!wbc->range_cyclic)
- /*
- * If range_cyclic is not set force range_cont
- * and save the old writeback_index
- */
- wbc->range_cont = 1;
+-
+- range_start = wbc->range_start;
++ if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
++ range_whole = 1;
++
+ if (wbc->range_cyclic)
+ index = mapping->writeback_index;
+ else
+ index = wbc->range_start >> PAGE_CACHE_SHIFT;
-
-- range_start = wbc->range_start;
++
+ mpd.wbc = wbc;
+ mpd.inode = mapping->host;
+
/*
* we insert one extent at a time. So we need
-@@ -2334,63 +2480,87 @@ restart_loop:
+@@ -2334,61 +2480,85 @@
handle = ext4_journal_start(inode, needed_blocks);
if (IS_ERR(handle)) {
ret = PTR_ERR(handle);
- goto out_writepages;
- }
- }
-+ mpd.get_block = ext4_da_get_block_write;
-+ ret = mpage_da_writepages(mapping, wbc, &mpd);
-
+-
- to_write -= wbc->nr_to_write;
- ret = mpage_da_writepages(mapping, wbc,
- ext4_da_get_block_write);
- ext4_journal_stop(handle);
+- ext4_journal_stop(handle);
- if (ret == MPAGE_DA_EXTENT_TAIL) {
++ mpd.get_block = ext4_da_get_block_write;
++ ret = mpage_da_writepages(mapping, wbc, &mpd);
++
++ ext4_journal_stop(handle);
+
+ if (mpd.retval == -ENOSPC) {
+ /* commit the transaction which would
- wbc->pages_skipped - pages_skipped;
- wbc->pages_skipped = pages_skipped;
- goto restart_loop;
- }
+- }
++ }
+ if (pages_skipped != wbc->pages_skipped)
+ printk(KERN_EMERG "This should not happen leaving %s "
+ "with nr_to_write = %ld ret = %d\n",
out_writepages:
- wbc->nr_to_write = to_write - nr_to_writebump;
- wbc->range_start = range_start;
+- return ret;
+ wbc->nr_to_write -= nr_to_writebump;
- return ret;
- }
-
++ return ret;
++}
++
+#define FALL_BACK_TO_NONDELALLOC 1
+static int ext4_nonda_switch(struct super_block *sb)
+{
+ return 1;
+ }
+ return 0;
-+}
-+
+ }
+
static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
- loff_t pos, unsigned len, unsigned flags,
- struct page **pagep, void **fsdata)
-@@ -2406,6 +2576,12 @@ static int ext4_da_write_begin(struct fi
+@@ -2406,6 +2576,12 @@
from = pos & (PAGE_CACHE_SIZE - 1);
to = from + len;
retry:
/*
* With delayed allocation, we don't log the i_disksize update
-@@ -2419,7 +2595,7 @@ retry:
+@@ -2419,7 +2595,7 @@
goto out;
}
if (!page) {
ext4_journal_stop(handle);
ret = -ENOMEM;
-@@ -2433,6 +2609,13 @@ retry:
+@@ -2433,6 +2609,13 @@
unlock_page(page);
ext4_journal_stop(handle);
page_cache_release(page);
}
if (ret == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries))
-@@ -2456,7 +2639,7 @@ static int ext4_da_should_update_i_disks
+@@ -2456,7 +2639,7 @@
bh = page_buffers(page);
idx = offset >> inode->i_blkbits;
bh = bh->b_this_page;
if (!buffer_mapped(bh) || (buffer_delay(bh)))
-@@ -2474,9 +2657,22 @@ static int ext4_da_write_end(struct file
+@@ -2474,9 +2657,22 @@
handle_t *handle = ext4_journal_current_handle();
loff_t new_i_size;
unsigned long start, end;
/*
* generic_write_end() will run mark_inode_dirty() if i_size
-@@ -2500,6 +2696,11 @@ static int ext4_da_write_end(struct file
+@@ -2500,6 +2696,11 @@
EXT4_I(inode)->i_disksize = new_i_size;
}
up_write(&EXT4_I(inode)->i_data_sem);
}
}
ret2 = generic_write_end(file, mapping, pos, len, copied,
-@@ -2591,7 +2792,7 @@ static sector_t ext4_bmap(struct address
+@@ -2591,7 +2792,7 @@
return 0;
}
}
static int bget_one(handle_t *handle, struct buffer_head *bh)
-@@ -3197,7 +3398,7 @@ static Indirect *ext4_find_shared(struct
+@@ -3197,7 +3398,7 @@
if (!partial->key && *partial->p)
/* Writer: end */
goto no_top;
;
/*
* OK, we've found the last block that must survive. The rest of our
-@@ -3216,7 +3417,7 @@ static Indirect *ext4_find_shared(struct
+@@ -3216,7 +3417,7 @@
}
/* Writer: end */
brelse(partial->bh);
partial--;
}
-@@ -3408,9 +3609,9 @@ static void ext4_free_branches(handle_t
+@@ -3408,9 +3609,9 @@
/* This zaps the entire block. Bottom up. */
BUFFER_TRACE(bh, "free child branches");
ext4_free_branches(handle, inode, bh,
/*
* We've probably journalled the indirect block several
-@@ -3578,7 +3779,7 @@ void ext4_truncate(struct inode *inode)
+@@ -3578,7 +3779,7 @@
*/
down_write(&ei->i_data_sem);
/*
* The orphan list entry will now protect us from any crash which
-@@ -3673,41 +3874,6 @@ out_stop:
+@@ -3673,41 +3874,6 @@
ext4_journal_stop(handle);
}
/*
* ext4_get_inode_loc returns with an extra refcount against the inode's
* underlying buffer_head on success. If 'in_mem' is true, we have all
-@@ -3717,19 +3883,35 @@ static ext4_fsblk_t ext4_get_inode_block
+@@ -3717,19 +3883,35 @@
static int __ext4_get_inode_loc(struct inode *inode,
struct ext4_iloc *iloc, int in_mem)
{
- ext4_fsblk_t block;
- struct buffer_head *bh;
+-
+- block = ext4_get_inode_block(inode->i_sb, inode->i_ino, iloc);
+- if (!block)
+ struct ext4_group_desc *gdp;
+ struct buffer_head *bh;
+ struct super_block *sb = inode->i_sb;
+
+ iloc->bh = NULL;
+ if (!ext4_valid_inum(sb, inode->i_ino))
-+ return -EIO;
+ return -EIO;
-- block = ext4_get_inode_block(inode->i_sb, inode->i_ino, iloc);
-- if (!block)
+- bh = sb_getblk(inode->i_sb, block);
+ iloc->block_group = (inode->i_ino - 1) / EXT4_INODES_PER_GROUP(sb);
+ gdp = ext4_get_group_desc(sb, iloc->block_group, NULL);
+ if (!gdp)
- return -EIO;
-
-- bh = sb_getblk(inode->i_sb, block);
++ return -EIO;
++
+ /*
+ * Figure out the offset within the block group inode table
+ */
return -EIO;
}
if (!buffer_uptodate(bh)) {
-@@ -3757,28 +3939,12 @@ static int __ext4_get_inode_loc(struct i
+@@ -3757,28 +3939,12 @@
*/
if (in_mem) {
struct buffer_head *bitmap_bh;
- EXT4_INODES_PER_GROUP(inode->i_sb));
- start = inode_offset & ~(inodes_per_buffer - 1);
+ int i, start;
++
++ start = inode_offset & ~(inodes_per_block - 1);
-- /* Is the inode bitmap in cache? */
+ /* Is the inode bitmap in cache? */
- desc = ext4_get_group_desc(inode->i_sb,
- block_group, NULL);
- if (!desc)
- goto make_io;
-+ start = inode_offset & ~(inodes_per_block - 1);
-
+-
- bitmap_bh = sb_getblk(inode->i_sb,
- ext4_inode_bitmap(inode->i_sb, desc));
-+ /* Is the inode bitmap in cache? */
+ bitmap_bh = sb_getblk(sb, ext4_inode_bitmap(sb, gdp));
if (!bitmap_bh)
goto make_io;
-@@ -3791,14 +3957,14 @@ static int __ext4_get_inode_loc(struct i
+@@ -3791,14 +3957,14 @@
brelse(bitmap_bh);
goto make_io;
}
/* all other inodes are free, so skip I/O */
memset(bh->b_data, 0, bh->b_size);
set_buffer_uptodate(bh);
-@@ -3809,6 +3975,36 @@ static int __ext4_get_inode_loc(struct i
+@@ -3809,6 +3975,36 @@
make_io:
/*
* There are other valid inodes in the buffer, this inode
* has in-inode xattrs, or we don't have this inode in memory.
* Read the block from disk.
-@@ -3818,10 +4014,9 @@ make_io:
+@@ -3818,10 +4014,9 @@
submit_bh(READ_META, bh);
wait_on_buffer(bh);
if (!buffer_uptodate(bh)) {
brelse(bh);
return -EIO;
}
-@@ -3913,11 +4108,10 @@ struct inode *ext4_iget(struct super_blo
+@@ -3913,11 +4108,10 @@
return inode;
ei = EXT4_I(inode);
ret = __ext4_get_inode_loc(inode, &iloc, 0);
if (ret < 0)
-@@ -3927,7 +4121,7 @@ struct inode *ext4_iget(struct super_blo
+@@ -3927,7 +4121,7 @@
inode->i_mode = le16_to_cpu(raw_inode->i_mode);
inode->i_uid = (uid_t)le16_to_cpu(raw_inode->i_uid_low);
inode->i_gid = (gid_t)le16_to_cpu(raw_inode->i_gid_low);
inode->i_uid |= le16_to_cpu(raw_inode->i_uid_high) << 16;
inode->i_gid |= le16_to_cpu(raw_inode->i_gid_high) << 16;
}
-@@ -3945,7 +4139,7 @@ struct inode *ext4_iget(struct super_blo
+@@ -3945,7 +4139,7 @@
if (inode->i_mode == 0 ||
!(EXT4_SB(inode->i_sb)->s_mount_state & EXT4_ORPHAN_FS)) {
/* this inode is deleted */
ret = -ESTALE;
goto bad_inode;
}
-@@ -3978,7 +4172,7 @@ struct inode *ext4_iget(struct super_blo
+@@ -3978,7 +4172,7 @@
ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize);
if (EXT4_GOOD_OLD_INODE_SIZE + ei->i_extra_isize >
EXT4_INODE_SIZE(inode->i_sb)) {
ret = -EIO;
goto bad_inode;
}
-@@ -4031,7 +4225,7 @@ struct inode *ext4_iget(struct super_blo
+@@ -4031,7 +4225,7 @@
init_special_inode(inode, inode->i_mode,
new_decode_dev(le32_to_cpu(raw_inode->i_block[1])));
}
ext4_set_inode_flags(inode);
unlock_new_inode(inode);
return inode;
-@@ -4048,7 +4242,6 @@ static int ext4_inode_blocks_set(handle_
+@@ -4048,7 +4242,6 @@
struct inode *inode = &(ei->vfs_inode);
u64 i_blocks = inode->i_blocks;
struct super_block *sb = inode->i_sb;
if (i_blocks <= ~0U) {
/*
-@@ -4058,36 +4251,27 @@ static int ext4_inode_blocks_set(handle_
+@@ -4058,36 +4251,27 @@
raw_inode->i_blocks_lo = cpu_to_le32(i_blocks);
raw_inode->i_blocks_high = 0;
ei->i_flags &= ~EXT4_HUGE_FILE_FL;
}
/*
-@@ -4113,14 +4297,14 @@ static int ext4_do_update_inode(handle_t
+@@ -4113,14 +4297,14 @@
ext4_get_inode_flags(ei);
raw_inode->i_mode = cpu_to_le16(inode->i_mode);
raw_inode->i_uid_high =
cpu_to_le16(high_16_bits(inode->i_uid));
raw_inode->i_gid_high =
-@@ -4208,7 +4392,7 @@ static int ext4_do_update_inode(handle_t
+@@ -4208,7 +4392,7 @@
ei->i_state &= ~EXT4_STATE_NEW;
out_brelse:
ext4_std_error(inode->i_sb, err);
return err;
}
-@@ -4444,9 +4628,10 @@ static int ext4_indirect_trans_blocks(st
+@@ -4444,9 +4628,10 @@
static int ext4_index_trans_blocks(struct inode *inode, int nrblocks, int chunk)
{
if (!(EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL))
- return ext4_indirect_trans_blocks(inode, nrblocks, 0);
- return ext4_ext_index_trans_blocks(inode, nrblocks, 0);
+-}
+ return ext4_indirect_trans_blocks(inode, nrblocks, chunk);
+ return ext4_ext_index_trans_blocks(inode, nrblocks, chunk);
- }
++}
+
/*
* Account for index blocks, block groups bitmaps and block group
* descriptor blocks if modify datablocks and index blocks
-@@ -4811,6 +4996,7 @@ int ext4_page_mkwrite(struct vm_area_str
+@@ -4811,6 +4996,7 @@
loff_t size;
unsigned long len;
int ret = -EINVAL;
struct file *file = vma->vm_file;
struct inode *inode = file->f_path.dentry->d_inode;
struct address_space *mapping = inode->i_mapping;
-@@ -4849,11 +5035,11 @@ int ext4_page_mkwrite(struct vm_area_str
+@@ -4849,11 +5035,11 @@
* on the same page though
*/
ret = mapping->a_ops->write_begin(file, mapping, page_offset(page),
if (ret < 0)
goto out_unlock;
ret = 0;
-diff -purN linux-2.6.27/fs/ext4/ioctl.c linux-2.6.27.19-5.1/fs/ext4/ioctl.c
---- linux-2.6.27/fs/ext4/ioctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/ioctl.c 2009-03-25 16:11:36.000000000 +0000
-@@ -23,9 +23,8 @@ long ext4_ioctl(struct file *filp, unsig
+diff -r 9608d5473017 fs/ext4/ioctl.c
+--- a/fs/ext4/ioctl.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/ioctl.c Wed May 06 16:56:48 2009 +0100
+@@ -23,9 +23,8 @@
struct inode *inode = filp->f_dentry->d_inode;
struct ext4_inode_info *ei = EXT4_I(inode);
unsigned int flags;
switch (cmd) {
case EXT4_IOC_GETFLAGS:
-@@ -34,7 +33,7 @@ long ext4_ioctl(struct file *filp, unsig
+@@ -34,7 +33,7 @@
return put_user(flags, (int __user *) arg);
case EXT4_IOC_SETFLAGS: {
handle_t *handle = NULL;
struct ext4_iloc iloc;
unsigned int oldflags;
unsigned int jflag;
-@@ -82,6 +81,17 @@ long ext4_ioctl(struct file *filp, unsig
+@@ -82,6 +81,17 @@
if (!capable(CAP_SYS_RESOURCE))
goto flags_out;
}
handle = ext4_journal_start(inode, 1);
if (IS_ERR(handle)) {
-@@ -109,6 +119,10 @@ flags_err:
+@@ -109,6 +119,10 @@
if ((jflag ^ oldflags) & (EXT4_JOURNAL_DATA_FL))
err = ext4_change_inode_journal_flag(inode, jflag);
flags_out:
mutex_unlock(&inode->i_mutex);
mnt_drop_write(filp->f_path.mnt);
-@@ -175,53 +189,10 @@ setversion_out:
+@@ -175,53 +189,10 @@
return ret;
}
#endif
if (!capable(CAP_SYS_RESOURCE))
return -EPERM;
-@@ -235,8 +206,10 @@ setversion_out:
+@@ -235,8 +206,10 @@
err = ext4_group_extend(sb, EXT4_SB(sb)->s_es, n_blocks_count);
jbd2_journal_lock_updates(EXT4_SB(sb)->s_journal);
mnt_drop_write(filp->f_path.mnt);
return err;
-@@ -244,7 +217,7 @@ setversion_out:
+@@ -244,7 +217,7 @@
case EXT4_IOC_GROUP_ADD: {
struct ext4_new_group_data input;
struct super_block *sb = inode->i_sb;
if (!capable(CAP_SYS_RESOURCE))
return -EPERM;
-@@ -259,15 +232,36 @@ setversion_out:
+@@ -259,15 +232,36 @@
err = ext4_group_add(sb, &input);
jbd2_journal_lock_updates(EXT4_SB(sb)->s_journal);
default:
return -ENOTTY;
-diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
---- linux-2.6.27/fs/ext4/mballoc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/mballoc.c 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/mballoc.c
+--- a/fs/ext4/mballoc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/mballoc.c Wed May 06 16:56:49 2009 +0100
@@ -100,7 +100,7 @@
* inode as:
*
static inline void *mb_correct_addr_and_bit(int *bit, void *addr)
{
-@@ -445,9 +459,9 @@ static void mb_free_blocks_double(struct
+@@ -445,9 +459,9 @@
blocknr += first + i;
blocknr +=
le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block);
inode ? inode->i_ino : 0, blocknr,
first + i, e4b->bd_group);
}
-@@ -477,9 +491,10 @@ static void mb_cmp_bitmaps(struct ext4_b
+@@ -477,9 +491,10 @@
b2 = (unsigned char *) bitmap;
for (i = 0; i < e4b->bd_sb->s_blocksize; i++) {
if (b1[i] != b2[i]) {
BUG();
}
}
-@@ -533,9 +548,6 @@ static int __mb_check_buddy(struct ext4_
+@@ -532,9 +547,6 @@
+ struct list_head *cur;
void *buddy;
void *buddy2;
-
+-
- if (!test_opt(sb, MBALLOC))
- return 0;
--
+
{
static int mb_check_counter;
- if (mb_check_counter++ % 100 != 0)
-@@ -692,8 +704,8 @@ static void ext4_mb_generate_buddy(struc
+@@ -692,8 +704,8 @@
grp->bb_fragments = fragments;
if (free != grp->bb_free) {
group, free, grp->bb_free);
/*
* If we intent to continue, we consider group descritor
-@@ -718,7 +730,7 @@ static void ext4_mb_generate_buddy(struc
+@@ -718,7 +730,7 @@
* stored in the inode as
*
* { page }
*
*
* one block each for bitmap and buddy information.
-@@ -784,23 +796,45 @@ static int ext4_mb_init_cache(struct pag
+@@ -784,23 +796,45 @@
if (bh[i] == NULL)
goto out;
- if (bh_uptodate_or_lock(bh[i]))
+- continue;
+-
+ if (bitmap_uptodate(bh[i]))
- continue;
-
++ continue;
++
+ lock_buffer(bh[i]);
+ if (bitmap_uptodate(bh[i])) {
+ unlock_buffer(bh[i]);
first_group + i, desc);
+ set_bitmap_uptodate(bh[i]);
set_buffer_uptodate(bh[i]);
-- unlock_buffer(bh[i]);
- spin_unlock(sb_bgl_lock(EXT4_SB(sb), first_group + i));
-+ unlock_buffer(bh[i]);
++ spin_unlock(sb_bgl_lock(EXT4_SB(sb), first_group + i));
+ unlock_buffer(bh[i]);
+- spin_unlock(sb_bgl_lock(EXT4_SB(sb), first_group + i));
continue;
}
spin_unlock(sb_bgl_lock(EXT4_SB(sb), first_group + i));
}
/* wait for I/O completion */
-@@ -814,6 +848,8 @@ static int ext4_mb_init_cache(struct pag
+@@ -814,6 +848,8 @@
err = 0;
first_block = page->index * blocks_per_page;
for (i = 0; i < blocks_per_page; i++) {
int group;
struct ext4_group_info *grinfo;
-@@ -840,7 +876,6 @@ static int ext4_mb_init_cache(struct pag
+@@ -840,7 +876,6 @@
BUG_ON(incore == NULL);
mb_debug("put buddy for group %u in page %lu/%x\n",
group, page->index, i * blocksize);
grinfo = ext4_get_group_info(sb, group);
grinfo->bb_fragments = 0;
memset(grinfo->bb_counters, 0,
-@@ -848,7 +883,9 @@ static int ext4_mb_init_cache(struct pag
+@@ -848,7 +883,9 @@
/*
* incore got set to the group block bitmap below
*/
incore = NULL;
} else {
/* this is block of bitmap */
-@@ -862,6 +899,7 @@ static int ext4_mb_init_cache(struct pag
+@@ -862,6 +899,7 @@
/* mark all preallocated blks used in in-core bitmap */
ext4_mb_generate_from_pa(sb, data, group);
ext4_unlock_group(sb, group);
/* set incore so that the buddy information can be
-@@ -885,19 +923,22 @@ out:
+@@ -885,19 +923,22 @@
static noinline_for_stack int
ext4_mb_load_buddy(struct super_block *sb, ext4_group_t group,
struct ext4_buddy *e4b)
-+__acquires(e4b->alloc_semp)
- {
+-{
- struct ext4_sb_info *sbi = EXT4_SB(sb);
- struct inode *inode = sbi->s_buddy_cache;
++__acquires(e4b->alloc_semp)
++{
int blocks_per_page;
int block;
int pnum;
int poff;
struct page *page;
int ret;
+-
+- mb_debug("load group %lu\n", group);
+ struct ext4_group_info *grp;
+ struct ext4_sb_info *sbi = EXT4_SB(sb);
+ struct inode *inode = sbi->s_buddy_cache;
-
-- mb_debug("load group %lu\n", group);
++
+ mb_debug("load group %u\n", group);
blocks_per_page = PAGE_CACHE_SIZE / sb->s_blocksize;
e4b->bd_blkbits = sb->s_blocksize_bits;
e4b->bd_info = ext4_get_group_info(sb, group);
-@@ -905,6 +946,16 @@ ext4_mb_load_buddy(struct super_block *s
+@@ -905,6 +946,16 @@
e4b->bd_group = group;
e4b->bd_buddy_page = NULL;
e4b->bd_bitmap_page = NULL;
/*
* the buddy cache inode stores the block bitmap
-@@ -920,6 +971,14 @@ ext4_mb_load_buddy(struct super_block *s
+@@ -920,6 +971,14 @@
page = find_get_page(inode->i_mapping, pnum);
if (page == NULL || !PageUptodate(page)) {
if (page)
page_cache_release(page);
page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS);
if (page) {
-@@ -985,15 +1044,23 @@ err:
+@@ -985,15 +1044,23 @@
page_cache_release(e4b->bd_buddy_page);
e4b->bd_buddy = NULL;
e4b->bd_bitmap = NULL;
}
-@@ -1031,7 +1098,10 @@ static void mb_clear_bits(spinlock_t *lo
+@@ -1031,7 +1098,10 @@
cur += 32;
continue;
}
cur++;
}
}
-@@ -1049,7 +1119,10 @@ static void mb_set_bits(spinlock_t *lock
+@@ -1049,7 +1119,10 @@
cur += 32;
continue;
}
cur++;
}
}
-@@ -1094,12 +1167,11 @@ static void mb_free_blocks(struct inode
+@@ -1094,12 +1167,11 @@
blocknr += block;
blocknr +=
le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block);
}
mb_clear_bit(block, EXT4_MB_BITMAP(e4b));
e4b->bd_info->bb_counters[order]++;
-@@ -1296,13 +1368,20 @@ static void ext4_mb_use_best_found(struc
+@@ -1296,13 +1368,20 @@
ac->ac_tail = ret & 0xffff;
ac->ac_buddy = ret >> 16;
/* store last allocated for subsequent stream allocation */
if ((ac->ac_flags & EXT4_MB_HINT_DATA)) {
spin_lock(&sbi->s_md_lock);
-@@ -1433,8 +1512,10 @@ static int ext4_mb_try_best_found(struct
+@@ -1433,8 +1512,10 @@
BUG_ON(ex.fe_len <= 0);
err = ext4_mb_load_buddy(ac->ac_sb, group, e4b);
ext4_lock_group(ac->ac_sb, group);
max = mb_find_extent(e4b, 0, ex.fe_start, ex.fe_len, &ex);
-@@ -1464,8 +1545,10 @@ static int ext4_mb_find_by_goal(struct e
+@@ -1464,8 +1545,10 @@
return 0;
err = ext4_mb_load_buddy(ac->ac_sb, group, e4b);
ext4_lock_group(ac->ac_sb, group);
max = mb_find_extent(e4b, 0, ac->ac_g_ex.fe_start,
-@@ -1575,7 +1658,8 @@ static void ext4_mb_complex_scan_group(s
+@@ -1575,7 +1658,8 @@
* free blocks even though group info says we
* we have free blocks
*/
"group info. But bitmap says 0\n",
free);
break;
-@@ -1584,7 +1668,8 @@ static void ext4_mb_complex_scan_group(s
+@@ -1584,7 +1668,8 @@
mb_find_extent(e4b, 0, i, ac->ac_g_ex.fe_len, &ex);
BUG_ON(ex.fe_len <= 0);
if (free < ex.fe_len) {
"group info. But got %d blocks\n",
free, ex.fe_len);
/*
-@@ -1692,6 +1777,173 @@ static int ext4_mb_good_group(struct ext
+@@ -1692,6 +1777,173 @@
return 0;
}
static noinline_for_stack int
ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
{
-@@ -1775,7 +2027,7 @@ repeat:
+@@ -1775,7 +2027,7 @@
group = 0;
/* quick check to skip empty groups */
if (grp->bb_free == 0)
continue;
-@@ -1788,10 +2040,9 @@ repeat:
+@@ -1788,10 +2040,9 @@
* we need full data about the group
* to make a good selection
*/
}
/*
-@@ -1802,8 +2053,10 @@ repeat:
+@@ -1802,8 +2053,10 @@
continue;
err = ext4_mb_load_buddy(sb, group, &e4b);
ext4_lock_group(sb, group);
if (!ext4_mb_good_group(ac, group, cr)) {
-@@ -1932,13 +2185,13 @@ static int ext4_mb_seq_history_show(stru
+@@ -1932,13 +2185,13 @@
if (hs->op == EXT4_MB_HISTORY_ALLOC) {
fmt = "%-5u %-8u %-23s %-23s %-23s %-5u %-5u %-2u "
"%-5u %-5s %-5u %-6u\n";
hs->goal.fe_start, hs->goal.fe_len,
hs->goal.fe_logical);
seq_printf(seq, fmt, hs->pid, hs->ino, buf, buf3, buf2,
-@@ -1947,20 +2200,20 @@ static int ext4_mb_seq_history_show(stru
+@@ -1947,20 +2200,20 @@
hs->buddy ? 1 << hs->buddy : 0);
} else if (hs->op == EXT4_MB_HISTORY_PREALLOC) {
fmt = "%-5u %-8u %-23s %-23s %-23s\n";
hs->result.fe_start, hs->result.fe_len);
seq_printf(seq, "%-5u %-8u %-23s free\n",
hs->pid, hs->ino, buf2);
-@@ -2073,7 +2326,7 @@ static void *ext4_mb_seq_groups_start(st
+@@ -2073,7 +2326,7 @@
return NULL;
group = *pos + 1;
}
static void *ext4_mb_seq_groups_next(struct seq_file *seq, void *v, loff_t *pos)
-@@ -2086,13 +2339,13 @@ static void *ext4_mb_seq_groups_next(str
+@@ -2086,13 +2339,13 @@
if (*pos < 0 || *pos >= sbi->s_groups_count)
return NULL;
group = *pos + 1;
int i;
int err;
struct ext4_buddy e4b;
-@@ -2114,7 +2367,8 @@ static int ext4_mb_seq_groups_show(struc
+@@ -2114,7 +2367,8 @@
sizeof(struct ext4_group_info);
err = ext4_mb_load_buddy(sb, group, &e4b);
if (err) {
return 0;
}
ext4_lock_group(sb, group);
-@@ -2122,7 +2376,7 @@ static int ext4_mb_seq_groups_show(struc
+@@ -2122,7 +2376,7 @@
ext4_unlock_group(sb, group);
ext4_mb_release_desc(&e4b);
sg.info.bb_fragments, sg.info.bb_first_free);
for (i = 0; i <= 13; i++)
seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ?
-@@ -2169,9 +2423,10 @@ static void ext4_mb_history_release(stru
+@@ -2169,9 +2423,10 @@
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
kfree(sbi->s_mb_history);
}
-@@ -2180,10 +2435,10 @@ static void ext4_mb_history_init(struct
+@@ -2180,10 +2435,10 @@
struct ext4_sb_info *sbi = EXT4_SB(sb);
int i;
&ext4_mb_seq_groups_fops, sb);
}
-@@ -2295,10 +2550,12 @@ int ext4_mb_add_groupinfo(struct super_b
+@@ -2295,10 +2550,12 @@
ext4_free_blocks_after_init(sb, group, desc);
} else {
meta_group_info[i]->bb_free =
#ifdef DOUBLE_CHECK
{
-@@ -2325,54 +2582,6 @@ exit_meta_group_info:
+@@ -2325,54 +2582,6 @@
} /* ext4_mb_add_groupinfo */
/*
* Update an existing group.
* This function is used for online resize
*/
-@@ -2455,7 +2664,7 @@ static int ext4_mb_init_backend(struct s
+@@ -2455,7 +2664,7 @@
desc = ext4_get_group_desc(sb, i, NULL);
if (desc == NULL) {
printk(KERN_ERR
goto err_freebuddy;
}
if (ext4_mb_add_groupinfo(sb, i, desc) != 0)
-@@ -2485,19 +2694,14 @@ int ext4_mb_init(struct super_block *sb,
+@@ -2485,19 +2694,14 @@
unsigned max;
int ret;
kfree(sbi->s_mb_maxs);
return -ENOMEM;
}
-@@ -2520,7 +2724,6 @@ int ext4_mb_init(struct super_block *sb,
+@@ -2520,7 +2724,6 @@
/* init file for buddy data */
ret = ext4_mb_init_backend(sb);
if (ret != 0) {
kfree(sbi->s_mb_offsets);
kfree(sbi->s_mb_maxs);
return ret;
-@@ -2540,17 +2743,15 @@ int ext4_mb_init(struct super_block *sb,
+@@ -2540,17 +2743,15 @@
sbi->s_mb_history_filter = EXT4_MB_HISTORY_DEFAULT;
sbi->s_mb_group_prealloc = MB_DEFAULT_GROUP_PREALLOC;
mutex_init(&lg->lg_mutex);
for (j = 0; j < PREALLOC_TB_SIZE; j++)
INIT_LIST_HEAD(&lg->lg_prealloc_list[j]);
-@@ -2560,7 +2761,7 @@ int ext4_mb_init(struct super_block *sb,
+@@ -2560,7 +2761,7 @@
ext4_mb_init_per_dev_proc(sb);
ext4_mb_history_init(sb);
return 0;
}
-@@ -2575,7 +2776,7 @@ static void ext4_mb_cleanup_pa(struct ex
+@@ -2575,7 +2776,7 @@
pa = list_entry(cur, struct ext4_prealloc_space, pa_group_list);
list_del(&pa->pa_group_list);
count++;
}
if (count)
mb_debug("mballoc: %u PAs left\n", count);
-@@ -2589,9 +2790,6 @@ int ext4_mb_release(struct super_block *
+@@ -2588,9 +2789,6 @@
+ int num_meta_group_infos;
struct ext4_group_info *grinfo;
struct ext4_sb_info *sbi = EXT4_SB(sb);
-
+-
- if (!test_opt(sb, MBALLOC))
- return 0;
--
+
/* release freed, non-committed blocks */
spin_lock(&sbi->s_md_lock);
- list_splice_init(&sbi->s_closed_transaction,
-@@ -2647,8 +2845,7 @@ int ext4_mb_release(struct super_block *
+@@ -2647,8 +2845,7 @@
atomic_read(&sbi->s_mb_discarded));
}
ext4_mb_history_release(sb);
ext4_mb_destroy_per_dev_proc(sb);
-@@ -2658,13 +2855,11 @@ int ext4_mb_release(struct super_block *
+@@ -2658,13 +2855,11 @@
static noinline_for_stack void
ext4_mb_free_committed_blocks(struct super_block *sb)
{
- int count = 0;
- int count2 = 0;
- struct ext4_free_metadata *md;
- struct ext4_buddy e4b;
+- struct ext4_buddy e4b;
++ struct ext4_buddy e4b;
+ struct ext4_group_info *db;
+ struct ext4_sb_info *sbi = EXT4_SB(sb);
+ int err, count = 0, count2 = 0;
if (list_empty(&sbi->s_committed_transaction))
return;
-@@ -2672,44 +2867,46 @@ ext4_mb_free_committed_blocks(struct sup
+@@ -2672,44 +2867,46 @@
/* there is committed blocks to be freed yet */
do {
/* get next array of blocks */
spin_unlock(&sbi->s_md_lock);
- if (md == NULL)
-+ if (entry == NULL)
- break;
-
+- break;
+-
- mb_debug("gonna free %u blocks in group %lu (0x%p):",
- md->num, md->group, md);
+-
+- err = ext4_mb_load_buddy(sb, md->group, &e4b);
++ if (entry == NULL)
++ break;
++
+ mb_debug("gonna free %u blocks in group %u (0x%p):",
+ entry->count, entry->group, entry);
-
-- err = ext4_mb_load_buddy(sb, md->group, &e4b);
++
+ err = ext4_mb_load_buddy(sb, entry->group, &e4b);
/* we expect to find existing buddy because it's pinned */
BUG_ON(err != 0);
- /* balance refcounts from ext4_mb_free_metadata() */
- page_cache_release(e4b.bd_buddy_page);
- page_cache_release(e4b.bd_bitmap_page);
+-
+- kfree(md);
+ ext4_lock_group(sb, entry->group);
+ /* Take it out of per group rb tree */
+ rb_erase(&entry->node, &(db->bb_free_root));
+ page_cache_release(e4b.bd_bitmap_page);
+ }
+ ext4_unlock_group(sb, entry->group);
-
-- kfree(md);
++
+ kmem_cache_free(ext4_free_ext_cachep, entry);
ext4_mb_release_desc(&e4b);
-
mb_debug("freed %u blocks in %u structures\n", count, count2);
}
-@@ -2721,119 +2918,52 @@ ext4_mb_free_committed_blocks(struct sup
+@@ -2721,119 +2918,52 @@
#define EXT4_MB_STREAM_REQ "stream_req"
#define EXT4_MB_GROUP_PREALLOC "group_prealloc"
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct proc_dir_entry *proc;
- char devname[64];
-
+-
- if (proc_root_ext4 == NULL) {
- sbi->s_mb_proc = NULL;
++
+ if (sbi->s_proc == NULL)
return -EINVAL;
- }
- MB_PROC_HANDLER(EXT4_MB_ORDER2_REQ, order2_reqs);
- MB_PROC_HANDLER(EXT4_MB_STREAM_REQ, stream_request);
- MB_PROC_HANDLER(EXT4_MB_GROUP_PREALLOC, group_prealloc);
-
+-
++
+ EXT4_PROC_HANDLER(EXT4_MB_STATS_NAME, mb_stats);
+ EXT4_PROC_HANDLER(EXT4_MB_MAX_TO_SCAN_NAME, mb_max_to_scan);
+ EXT4_PROC_HANDLER(EXT4_MB_MIN_TO_SCAN_NAME, mb_min_to_scan);
static int ext4_mb_destroy_per_dev_proc(struct super_block *sb)
{
-+#ifdef CONFIG_PROC_FS
- struct ext4_sb_info *sbi = EXT4_SB(sb);
+- struct ext4_sb_info *sbi = EXT4_SB(sb);
- char devname[64];
-
+-
- if (sbi->s_mb_proc == NULL)
++#ifdef CONFIG_PROC_FS
++ struct ext4_sb_info *sbi = EXT4_SB(sb);
++
+ if (sbi->s_proc == NULL)
return -EINVAL;
return 0;
}
-@@ -2854,11 +2984,16 @@ int __init init_ext4_mballoc(void)
+@@ -2854,11 +2984,16 @@
kmem_cache_destroy(ext4_pspace_cachep);
return -ENOMEM;
}
return 0;
}
-@@ -2867,9 +3002,7 @@ void exit_ext4_mballoc(void)
+@@ -2867,9 +3002,7 @@
/* XXX: synchronize_rcu(); */
kmem_cache_destroy(ext4_pspace_cachep);
kmem_cache_destroy(ext4_ac_cachep);
}
-@@ -2879,7 +3012,7 @@ void exit_ext4_mballoc(void)
+@@ -2879,7 +3012,7 @@
*/
static noinline_for_stack int
ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
{
struct buffer_head *bitmap_bh = NULL;
struct ext4_super_block *es;
-@@ -2912,7 +3045,7 @@ ext4_mb_mark_diskspace_used(struct ext4_
+@@ -2912,7 +3045,7 @@
if (!gdp)
goto out_err;
gdp->bg_free_blocks_count);
err = ext4_journal_get_write_access(handle, gdp_bh);
-@@ -2931,8 +3064,8 @@ ext4_mb_mark_diskspace_used(struct ext4_
+@@ -2931,8 +3064,8 @@
in_range(block + len - 1, ext4_inode_table(sb, gdp),
EXT4_SB(sb)->s_itb_per_group)) {
ext4_error(sb, __func__,
/* File system mounted not to panic on error
* Fix the bitmap and repeat the block allocation
* We leak some of the blocks here.
-@@ -2954,29 +3087,29 @@ ext4_mb_mark_diskspace_used(struct ext4_
+@@ -2954,29 +3087,29 @@
}
}
#endif
- mb_set_bits(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group), bitmap_bh->b_data,
-- ac->ac_b_ex.fe_start, ac->ac_b_ex.fe_len);
--
- spin_lock(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group));
++ spin_lock(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group));
+ mb_set_bits(NULL, bitmap_bh->b_data,
-+ ac->ac_b_ex.fe_start, ac->ac_b_ex.fe_len);
+ ac->ac_b_ex.fe_start, ac->ac_b_ex.fe_len);
+-
+- spin_lock(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group));
if (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);
- gdp->bg_free_blocks_count =
- cpu_to_le16(ext4_free_blocks_after_init(sb,
- ac->ac_b_ex.fe_group,
- gdp));
+- }
+- le16_add_cpu(&gdp->bg_free_blocks_count, -ac->ac_b_ex.fe_len);
+ ext4_free_blks_set(sb, gdp,
+ ext4_free_blocks_after_init(sb,
+ ac->ac_b_ex.fe_group, gdp));
- }
-- le16_add_cpu(&gdp->bg_free_blocks_count, -ac->ac_b_ex.fe_len);
++ }
+ len = ext4_free_blks_count(sb, gdp) - ac->ac_b_ex.fe_len;
+ ext4_free_blks_set(sb, gdp, len);
gdp->bg_checksum = ext4_group_desc_csum(sbi, ac->ac_b_ex.fe_group, gdp);
spin_unlock(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group));
-
-+ percpu_counter_sub(&sbi->s_freeblocks_counter, ac->ac_b_ex.fe_len);
- /*
+- /*
- * free blocks account has already be reduced/reserved
- * at write_begin() time for delayed allocation
- * do not double accounting
++ percpu_counter_sub(&sbi->s_freeblocks_counter, ac->ac_b_ex.fe_len);
++ /*
+ * Now reduce the dirty block count also. Should not go negative
*/
if (!(ac->ac_flags & EXT4_MB_DELALLOC_RESERVED))
if (sbi->s_log_groups_per_flex) {
ext4_group_t flex_group = ext4_flex_group(sbi,
-@@ -3118,7 +3251,7 @@ ext4_mb_normalize_request(struct ext4_al
+@@ -3118,7 +3251,7 @@
/* check we don't cross already preallocated blocks */
rcu_read_lock();
list_for_each_entry_rcu(pa, &ei->i_prealloc_list, pa_inode_list) {
if (pa->pa_deleted)
continue;
-@@ -3162,7 +3295,7 @@ ext4_mb_normalize_request(struct ext4_al
+@@ -3162,7 +3295,7 @@
/* XXX: extra loop to check we really don't overlap preallocations */
rcu_read_lock();
list_for_each_entry_rcu(pa, &ei->i_prealloc_list, pa_inode_list) {
spin_lock(&pa->pa_lock);
if (pa->pa_deleted == 0) {
pa_end = pa->pa_lstart + pa->pa_len;
-@@ -3394,6 +3527,32 @@ ext4_mb_use_preallocated(struct ext4_all
+@@ -3394,6 +3527,32 @@
}
/*
* the function goes through all preallocation in this group and marks them
* used in in-core bitmap. buddy must be generated from this bitmap
* Need to be called with ext4 group lock (ext4_lock_group)
-@@ -3433,7 +3592,7 @@ static void ext4_mb_generate_from_pa(str
+@@ -3433,7 +3592,7 @@
preallocated += len;
count++;
}
}
static void ext4_mb_pa_callback(struct rcu_head *head)
-@@ -3450,7 +3609,7 @@ static void ext4_mb_pa_callback(struct r
+@@ -3450,7 +3609,7 @@
static void ext4_mb_put_pa(struct ext4_allocation_context *ac,
struct super_block *sb, struct ext4_prealloc_space *pa)
{
if (!atomic_dec_and_test(&pa->pa_count) || pa->pa_free != 0)
return;
-@@ -3666,8 +3825,8 @@ ext4_mb_release_inode_pa(struct ext4_bud
+@@ -3666,8 +3825,8 @@
{
struct super_block *sb = e4b->bd_sb;
struct ext4_sb_info *sbi = EXT4_SB(sb);
ext4_group_t group;
ext4_grpblk_t bit;
sector_t start;
-@@ -3713,8 +3872,9 @@ ext4_mb_release_inode_pa(struct ext4_bud
+@@ -3713,8 +3872,9 @@
pa, (unsigned long) pa->pa_lstart,
(unsigned long) pa->pa_pstart,
(unsigned long) pa->pa_len);
/*
* pa is already deleted so we use the value obtained
* from the bitmap and continue.
-@@ -3779,7 +3939,7 @@ ext4_mb_discard_group_preallocations(str
+@@ -3779,7 +3939,7 @@
int busy = 0;
int free = 0;
if (list_empty(&grp->bb_prealloc_list))
return 0;
-@@ -3787,14 +3947,15 @@ ext4_mb_discard_group_preallocations(str
+@@ -3787,14 +3947,15 @@
bitmap_bh = ext4_read_block_bitmap(sb, group);
if (bitmap_bh == NULL) {
ext4_error(sb, __func__, "Error in reading block "
put_bh(bitmap_bh);
return 0;
}
-@@ -3884,7 +4045,7 @@ out:
+@@ -3884,7 +4045,7 @@
*
* FIXME!! Make sure it is valid at all the call sites
*/
{
struct ext4_inode_info *ei = EXT4_I(inode);
struct super_block *sb = inode->i_sb;
-@@ -3896,7 +4057,7 @@ void ext4_mb_discard_inode_preallocation
+@@ -3896,7 +4057,7 @@
struct ext4_buddy e4b;
int err;
/*BUG_ON(!list_empty(&ei->i_prealloc_list));*/
return;
}
-@@ -3960,15 +4121,16 @@ repeat:
+@@ -3960,15 +4121,16 @@
err = ext4_mb_load_buddy(sb, group, &e4b);
if (err) {
ext4_mb_release_desc(&e4b);
continue;
}
-@@ -4094,8 +4256,7 @@ static void ext4_mb_group_or_file(struct
+@@ -4094,8 +4256,7 @@
* per cpu locality group is to reduce the contention between block
* request from multiple CPUs.
*/
/* we're going to use group allocation */
ac->ac_flags |= EXT4_MB_HINT_GROUP_ALLOC;
-@@ -4112,8 +4273,8 @@ ext4_mb_initialize_context(struct ext4_a
+@@ -4112,8 +4273,8 @@
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_super_block *es = sbi->s_es;
ext4_group_t group;
ext4_grpblk_t block;
/* we can't allocate > group size */
-@@ -4156,6 +4317,7 @@ ext4_mb_initialize_context(struct ext4_a
+@@ -4156,6 +4317,7 @@
ac->ac_pa = NULL;
ac->ac_bitmap_page = NULL;
ac->ac_buddy_page = NULL;
ac->ac_lg = NULL;
/* we have to define context: we'll we work with a file or
-@@ -4233,8 +4395,9 @@ ext4_mb_discard_lg_preallocations(struct
+@@ -4233,8 +4395,9 @@
ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, NULL);
if (ext4_mb_load_buddy(sb, group, &e4b)) {
continue;
}
ext4_lock_group(sb, group);
-@@ -4336,6 +4499,8 @@ static int ext4_mb_release_context(struc
+@@ -4336,6 +4499,8 @@
}
ext4_mb_put_pa(ac, ac->ac_sb, pa);
}
if (ac->ac_bitmap_page)
page_cache_release(ac->ac_bitmap_page);
if (ac->ac_buddy_page)
-@@ -4369,40 +4534,39 @@ static int ext4_mb_discard_preallocation
+@@ -4369,40 +4534,39 @@
ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle,
struct ext4_allocation_request *ar, int *errp)
{
- if (ar->len == 0) {
- *errp = -ENOSPC;
- return 0;
+- }
+-
+ while (ar->len && ext4_claim_free_blocks(sbi, ar->len)) {
+ /* let others to free the space */
+ yield();
+ return 0;
+ }
+ reserv_blks = ar->len;
- }
--
++ }
while (ar->len && DQUOT_ALLOC_BLOCK(ar->inode, ar->len)) {
ar->flags |= EXT4_MB_HINT_NOPREALLOC;
ar->len--;
}
inquota = ar->len;
-@@ -4439,10 +4603,14 @@ repeat:
+@@ -4439,10 +4603,14 @@
ac->ac_o_ex.fe_len < ac->ac_b_ex.fe_len)
ext4_mb_new_preallocation(ac);
}
ac->ac_b_ex.fe_group = 0;
ac->ac_b_ex.fe_start = 0;
ac->ac_b_ex.fe_len = 0;
-@@ -4473,6 +4641,13 @@ out2:
+@@ -4473,6 +4641,13 @@
out1:
if (ar->len < inquota)
DQUOT_FREE_BLOCK(ar->inode, inquota - ar->len);
return block;
}
-@@ -4507,65 +4682,97 @@ static void ext4_mb_poll_new_transaction
+@@ -4507,65 +4682,97 @@
ext4_mb_free_committed_blocks(sb);
}
static noinline_for_stack int
ext4_mb_free_metadata(handle_t *handle, struct ext4_buddy *e4b,
- ext4_group_t group, ext4_grpblk_t block, int count)
+-{
+ struct ext4_free_data *new_entry)
- {
++{
+ ext4_grpblk_t block;
+ struct ext4_free_data *entry;
struct ext4_group_info *db = e4b->bd_info;
- if (md && db->bb_tid != handle->h_transaction->t_tid) {
- db->bb_md_cur = NULL;
- md = NULL;
+- }
+-
+- if (md == NULL) {
+- ext4_unlock_group(sb, group);
+- md = kmalloc(sizeof(*md), GFP_NOFS);
+- if (md == NULL)
+- return -ENOMEM;
+- md->num = 0;
+- md->group = group;
+-
+- ext4_lock_group(sb, group);
+- if (db->bb_md_cur == NULL) {
+- spin_lock(&sbi->s_md_lock);
+- list_add(&md->list, &sbi->s_active_transaction);
+- spin_unlock(&sbi->s_md_lock);
+- /* protect buddy cache from being freed,
+- * otherwise we'll refresh it from
+- * on-disk bitmap and lose not-yet-available
+- * blocks */
+- page_cache_get(e4b->bd_buddy_page);
+- page_cache_get(e4b->bd_bitmap_page);
+- db->bb_md_cur = md;
+- db->bb_tid = handle->h_transaction->t_tid;
+- mb_debug("new md 0x%p for group %lu\n",
+- md, md->group);
+- } else {
+- kfree(md);
+- md = db->bb_md_cur;
+- }
+- }
+-
+- BUG_ON(md->num >= EXT4_BB_MAX_BLOCKS);
+- md->blocks[md->num] = block + i;
+- md->num++;
+- if (md->num == EXT4_BB_MAX_BLOCKS) {
+- /* no more space, put full container on a sb's list */
+- db->bb_md_cur = NULL;
+- }
+- }
+- ext4_unlock_group(sb, group);
+ new_node = &new_entry->node;
+ block = new_entry->start_blk;
+
+ "Double free of blocks %d (%d %d)\n",
+ block, entry->start_blk, entry->count);
+ return 0;
- }
++ }
+ }
-
-- if (md == NULL) {
-- ext4_unlock_group(sb, group);
-- md = kmalloc(sizeof(*md), GFP_NOFS);
-- if (md == NULL)
-- return -ENOMEM;
-- md->num = 0;
-- md->group = group;
++
+ rb_link_node(new_node, parent, n);
+ rb_insert_color(new_node, &db->bb_free_root);
-
-- ext4_lock_group(sb, group);
-- if (db->bb_md_cur == NULL) {
-- spin_lock(&sbi->s_md_lock);
-- list_add(&md->list, &sbi->s_active_transaction);
-- spin_unlock(&sbi->s_md_lock);
-- /* protect buddy cache from being freed,
-- * otherwise we'll refresh it from
-- * on-disk bitmap and lose not-yet-available
-- * blocks */
-- page_cache_get(e4b->bd_buddy_page);
-- page_cache_get(e4b->bd_bitmap_page);
-- db->bb_md_cur = md;
-- db->bb_tid = handle->h_transaction->t_tid;
-- mb_debug("new md 0x%p for group %lu\n",
-- md, md->group);
-- } else {
-- kfree(md);
-- md = db->bb_md_cur;
-- }
++
+ /* Now try to see the extent can be merged to left and right */
+ node = rb_prev(new_node);
+ if (node) {
+ list_del(&entry->list);
+ spin_unlock(&sbi->s_md_lock);
+ kmem_cache_free(ext4_free_ext_cachep, entry);
- }
++ }
+ }
-
-- BUG_ON(md->num >= EXT4_BB_MAX_BLOCKS);
-- md->blocks[md->num] = block + i;
-- md->num++;
-- if (md->num == EXT4_BB_MAX_BLOCKS) {
-- /* no more space, put full container on a sb's list */
-- db->bb_md_cur = NULL;
++
+ node = rb_next(new_node);
+ if (node) {
+ entry = rb_entry(node, struct ext4_free_data, node);
+ list_del(&entry->list);
+ spin_unlock(&sbi->s_md_lock);
+ kmem_cache_free(ext4_free_ext_cachep, entry);
- }
- }
-- ext4_unlock_group(sb, group);
++ }
++ }
+ /* Add the extent to active_transaction list */
+ spin_lock(&sbi->s_md_lock);
+ list_add(&new_entry->list, &sbi->s_active_transaction);
return 0;
}
-@@ -4581,7 +4788,7 @@ void ext4_mb_free_blocks(handle_t *handl
+@@ -4581,7 +4788,7 @@
struct ext4_allocation_context *ac = NULL;
struct ext4_group_desc *gdp;
struct ext4_super_block *es;
ext4_grpblk_t bit;
struct buffer_head *gd_bh;
ext4_group_t block_group;
-@@ -4665,11 +4872,6 @@ do_more:
+@@ -4665,11 +4872,6 @@
err = ext4_journal_get_write_access(handle, gd_bh);
if (err)
goto error_return;
#ifdef AGGRESSIVE_CHECK
{
int i;
-@@ -4677,13 +4879,6 @@ do_more:
+@@ -4677,13 +4879,6 @@
BUG_ON(!mb_test_bit(bit + i, bitmap_bh->b_data));
}
#endif
if (ac) {
ac->ac_b_ex.fe_group = block_group;
ac->ac_b_ex.fe_start = bit;
-@@ -4691,19 +4886,43 @@ do_more:
+@@ -4691,19 +4886,43 @@
ext4_mb_store_history(ac);
}
- /* blocks being freed are metadata. these blocks shouldn't
- * be used until this transaction is committed */
- ext4_mb_free_metadata(handle, &e4b, block_group, bit, count);
+- } else {
+ struct ext4_free_data *new_entry;
+ /*
+ * blocks being freed are metadata. these blocks shouldn't
+ new_entry->group = block_group;
+ new_entry->count = count;
+ new_entry->t_tid = handle->h_transaction->t_tid;
-+ ext4_lock_group(sb, block_group);
+ ext4_lock_group(sb, block_group);
+ mb_clear_bits(sb_bgl_lock(sbi, block_group), bitmap_bh->b_data,
+ bit, count);
+ ext4_mb_free_metadata(handle, &e4b, new_entry);
+ ext4_unlock_group(sb, block_group);
- } else {
- ext4_lock_group(sb, block_group);
++ } else {
++ ext4_lock_group(sb, block_group);
+ /* need to update group_info->bb_free and bitmap
+ * with group lock held. generate_buddy look at
+ * them with group lock_held
gdp->bg_checksum = ext4_group_desc_csum(sbi, block_group, gdp);
spin_unlock(sb_bgl_lock(sbi, block_group));
percpu_counter_add(&sbi->s_freeblocks_counter, count);
-@@ -4719,6 +4938,10 @@ do_more:
+@@ -4719,6 +4938,10 @@
*freed += count;
/* And the group descriptor block */
BUFFER_TRACE(gd_bh, "dirtied group descriptor block");
ret = ext4_journal_dirty_metadata(handle, gd_bh);
-diff -purN linux-2.6.27/fs/ext4/mballoc.h linux-2.6.27.19-5.1/fs/ext4/mballoc.h
---- linux-2.6.27/fs/ext4/mballoc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/mballoc.h 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/mballoc.h
+--- a/fs/ext4/mballoc.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/mballoc.h Wed May 06 16:56:49 2009 +0100
@@ -18,6 +18,9 @@
#include <linux/pagemap.h>
#include <linux/seq_file.h>
+ struct rb_node node;
-struct ext4_free_metadata {
-- ext4_group_t group;
++ /* this links the free block information from ext4_sb_info */
++ struct list_head list;
++
++ /* group which free block extent belongs */
+ ext4_group_t group;
- unsigned short num;
- ext4_grpblk_t blocks[EXT4_BB_MAX_BLOCKS];
-+ /* this links the free block information from ext4_sb_info */
- struct list_head list;
--};
+- struct list_head list;
++
++ /* free block extent */
++ ext4_grpblk_t start_blk;
++ ext4_grpblk_t count;
++
++ /* transaction which freed this extent */
++ tid_t t_tid;
+ };
-
-struct ext4_group_info {
- unsigned long bb_state;
-#endif
- unsigned short bb_counters[];
-};
-
+-
-#define EXT4_GROUP_INFO_NEED_INIT_BIT 0
-#define EXT4_GROUP_INFO_LOCKED_BIT 1
-+ /* group which free block extent belongs */
-+ ext4_group_t group;
-
+-
-#define EXT4_MB_GRP_NEED_INIT(grp) \
- (test_bit(EXT4_GROUP_INFO_NEED_INIT_BIT, &((grp)->bb_state)))
-+ /* free block extent */
-+ ext4_grpblk_t start_blk;
-+ ext4_grpblk_t count;
-
-+ /* transaction which freed this extent */
-+ tid_t t_tid;
-+};
+-
struct ext4_prealloc_space {
struct list_head pa_inode_list;
-@@ -209,6 +195,11 @@ struct ext4_allocation_context {
+@@ -209,6 +195,11 @@
__u8 ac_op; /* operation, for history only */
struct page *ac_bitmap_page;
struct page *ac_buddy_page;
struct ext4_prealloc_space *ac_pa;
struct ext4_locality_group *ac_lg;
};
-@@ -242,6 +233,7 @@ struct ext4_buddy {
+@@ -242,6 +233,7 @@
struct super_block *bd_sb;
__u16 bd_blkbits;
ext4_group_t bd_group;
};
#define EXT4_MB_BITMAP(e4b) ((e4b)->bd_bitmap)
#define EXT4_MB_BUDDY(e4b) ((e4b)->bd_buddy)
-@@ -251,53 +243,12 @@ static inline void ext4_mb_store_history
+@@ -251,53 +243,12 @@
{
return;
}
struct ext4_free_extent *fex)
{
ext4_fsblk_t block;
-diff -purN linux-2.6.27/fs/ext4/migrate.c linux-2.6.27.19-5.1/fs/ext4/migrate.c
---- linux-2.6.27/fs/ext4/migrate.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/migrate.c 2009-03-25 16:11:36.000000000 +0000
-@@ -447,8 +447,7 @@ static int free_ext_block(handle_t *hand
+diff -r 9608d5473017 fs/ext4/migrate.c
+--- a/fs/ext4/migrate.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/migrate.c Wed May 06 16:56:49 2009 +0100
+@@ -447,8 +447,7 @@
}
{
handle_t *handle;
int retval = 0, i;
-@@ -516,12 +515,6 @@ int ext4_ext_migrate(struct inode *inode
+@@ -515,12 +514,6 @@
+ * trascation that created the inode. Later as and
* when we add extents we extent the journal
*/
- /*
+- /*
- * inode_mutex prevent write and truncate on the file. Read still goes
- * through. We take i_data_sem in ext4_ext_swap_inode_data before we
- * switch the inode format to prevent read.
- */
- mutex_lock(&(inode->i_mutex));
-- /*
+ /*
* Even though we take i_mutex we can still cause block allocation
* via mmap write to holes. If we have allocated new blocks we fail
- * migrate. New block allocation will clear EXT4_EXT_MIGRATE flag.
-@@ -623,7 +616,6 @@ err_out:
+@@ -623,7 +616,6 @@
tmp_inode->i_nlink = 0;
ext4_journal_stop(handle);
if (tmp_inode)
iput(tmp_inode);
-diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
---- linux-2.6.27/fs/ext4/namei.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/namei.c 2009-03-25 16:11:36.000000000 +0000
-@@ -151,34 +151,36 @@ struct dx_map_entry
+diff -r 9608d5473017 fs/ext4/namei.c
+--- a/fs/ext4/namei.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/namei.c Wed May 06 16:56:49 2009 +0100
+@@ -151,34 +151,36 @@
static inline ext4_lblk_t dx_get_block(struct dx_entry *entry);
static void dx_set_block(struct dx_entry *entry, ext4_lblk_t value);
static int ext4_dx_add_entry(handle_t *handle, struct dentry *dentry,
struct inode *inode);
-@@ -207,44 +209,44 @@ static inline void dx_set_block(struct d
+@@ -207,44 +209,44 @@
entry->block = cpu_to_le32(value);
}
{
unsigned entry_space = dir->i_sb->s_blocksize - EXT4_DIR_REC_LEN(0);
return entry_space / sizeof(struct dx_entry);
-@@ -254,12 +256,12 @@ static inline unsigned dx_node_limit (st
+@@ -254,12 +256,12 @@
* Debug
*/
#ifdef DX_DEBUG
0, (unsigned long)dx_get_block(entries + i));
}
printk("\n");
-@@ -306,7 +308,7 @@ struct stats dx_show_entries(struct dx_h
+@@ -306,7 +308,7 @@
struct dx_entry *entries, int levels)
{
unsigned blocksize = dir->i_sb->s_blocksize;
unsigned bcount = 0;
struct buffer_head *bh;
int err;
-@@ -325,11 +327,12 @@ struct stats dx_show_entries(struct dx_h
+@@ -325,11 +327,12 @@
names += stats.names;
space += stats.space;
bcount += stats.bcount;
return (struct stats) { names, space, bcount};
}
#endif /* DX_DEBUG */
-@@ -344,7 +347,7 @@ struct stats dx_show_entries(struct dx_h
+@@ -344,7 +347,7 @@
* back to userspace.
*/
static struct dx_frame *
struct dx_hash_info *hinfo, struct dx_frame *frame_in, int *err)
{
unsigned count, indirect;
-@@ -355,8 +358,6 @@ dx_probe(struct dentry *dentry, struct i
+@@ -355,8 +358,6 @@
u32 hash;
frame->bh = NULL;
if (!(bh = ext4_bread (NULL,dir, 0, 0, err)))
goto fail;
root = (struct dx_root *) bh->b_data;
-@@ -371,9 +372,11 @@ dx_probe(struct dentry *dentry, struct i
+@@ -371,9 +372,11 @@
goto fail;
}
hinfo->hash_version = root->info.hash_version;
hash = hinfo->hash;
if (root->info.unused_flags & 1) {
-@@ -406,7 +409,7 @@ dx_probe(struct dentry *dentry, struct i
+@@ -406,7 +409,7 @@
goto fail;
}
while (1)
{
count = dx_get_count(entries);
-@@ -555,7 +558,7 @@ static int ext4_htree_next_block(struct
+@@ -555,7 +558,7 @@
0, &err)))
return err; /* Failure */
p++;
p->bh = bh;
p->at = p->entries = ((struct dx_node *) bh->b_data)->entries;
}
-@@ -593,7 +596,7 @@ static int htree_dirblock_to_tree(struct
+@@ -593,7 +596,7 @@
/* On error, skip the f_pos to the next block. */
dir_file->f_pos = (dir_file->f_pos |
(dir->i_sb->s_blocksize - 1)) + 1;
return count;
}
ext4fs_dirhash(de->name, de->name_len, hinfo);
-@@ -635,11 +638,14 @@ int ext4_htree_fill_tree(struct file *di
+@@ -635,11 +638,14 @@
int ret, err;
__u32 hashval;
hinfo.seed = EXT4_SB(dir->i_sb)->s_hash_seed;
count = htree_dirblock_to_tree(dir_file, dir, 0, &hinfo,
start_hash, start_minor_hash);
-@@ -648,7 +654,7 @@ int ext4_htree_fill_tree(struct file *di
+@@ -648,7 +654,7 @@
}
hinfo.hash = start_hash;
hinfo.minor_hash = 0;
if (!frame)
return err;
-@@ -694,8 +700,8 @@ int ext4_htree_fill_tree(struct file *di
+@@ -694,8 +700,8 @@
break;
}
dx_release(frames);
return count;
errout:
dx_release(frames);
-@@ -802,17 +808,17 @@ static inline int ext4_match (int len, c
+@@ -802,17 +808,17 @@
/*
* Returns 0 if not found, -1 on failure, and 1 on success
*/
de = (struct ext4_dir_entry_2 *) bh->b_data;
dlimit = bh->b_data + dir->i_sb->s_blocksize;
-@@ -851,12 +857,13 @@ static inline int search_dirblock(struct
+@@ -851,12 +857,13 @@
* The returned buffer_head has ->b_count elevated. The caller is expected
* to brelse() it when appropriate.
*/
ext4_lblk_t start, block, b;
int ra_max = 0; /* Number of bh's in the readahead
buffer, bh_use[] */
-@@ -865,16 +872,15 @@ static struct buffer_head * ext4_find_en
+@@ -865,16 +872,15 @@
int num = 0;
ext4_lblk_t nblocks;
int i, err;
/*
* On success, or if the error was file not found,
* return. Otherwise, fall back to doing a search the
-@@ -882,7 +888,8 @@ static struct buffer_head * ext4_find_en
+@@ -882,7 +888,8 @@
*/
if (bh || (err != ERR_BAD_DX_DIR))
return bh;
}
nblocks = dir->i_size >> EXT4_BLOCK_SIZE_BITS(sb);
start = EXT4_I(dir)->i_dir_start_lookup;
-@@ -926,7 +933,7 @@ restart:
+@@ -926,7 +933,7 @@
brelse(bh);
goto next;
}
block << EXT4_BLOCK_SIZE_BITS(sb), res_dir);
if (i == 1) {
EXT4_I(dir)->i_dir_start_lookup = block;
-@@ -956,11 +963,11 @@ restart:
+@@ -956,11 +963,11 @@
cleanup_and_exit:
/* Clean up the read-ahead blocks */
for (; ra_ptr < ra_max; ra_ptr++)
struct ext4_dir_entry_2 **res_dir, int *err)
{
struct super_block * sb;
-@@ -971,14 +978,13 @@ static struct buffer_head * ext4_dx_find
+@@ -971,14 +978,13 @@
struct buffer_head *bh;
ext4_lblk_t block;
int retval;
return NULL;
} else {
frame = frames;
-@@ -1010,7 +1016,7 @@ static struct buffer_head * ext4_dx_find
+@@ -1010,7 +1016,7 @@
return bh;
}
}
/* Check to see if we should continue to search */
retval = ext4_htree_next_block(dir, hash, frame,
frames, NULL);
-@@ -1025,28 +1031,28 @@ static struct buffer_head * ext4_dx_find
+@@ -1025,28 +1031,28 @@
*err = -ENOENT;
errout:
return ERR_PTR(-EIO);
}
inode = ext4_iget(dir->i_sb, ino);
-@@ -1059,18 +1065,17 @@ static struct dentry *ext4_lookup(struct
+@@ -1059,18 +1065,17 @@
struct dentry *ext4_get_parent(struct dentry *child)
{
inode = NULL;
if (!bh)
return ERR_PTR(-ENOENT);
-@@ -1079,7 +1084,7 @@ struct dentry *ext4_get_parent(struct de
+@@ -1079,7 +1084,7 @@
if (!ext4_valid_inum(child->d_inode->i_sb, ino)) {
ext4_error(child->d_inode->i_sb, "ext4_get_parent",
return ERR_PTR(-EIO);
}
-@@ -1176,9 +1181,9 @@ static struct ext4_dir_entry_2 *do_split
+@@ -1176,9 +1181,9 @@
u32 hash2;
struct dx_map_entry *map;
char *data1 = (*bh)->b_data, *data2;
bh2 = ext4_append (handle, dir, &newblock, &err);
if (!(bh2)) {
-@@ -1201,10 +1206,10 @@ static struct ext4_dir_entry_2 *do_split
+@@ -1201,10 +1206,10 @@
/* create map in the end of data2 block */
map = (struct dx_map_entry *) (data2 + blocksize);
/* Split the existing block in the middle, size-wise */
size = 0;
move = 0;
-@@ -1225,7 +1230,7 @@ static struct ext4_dir_entry_2 *do_split
+@@ -1225,7 +1230,7 @@
/* Fancy dance to stay within two buffers */
de2 = dx_move_dirents(data1, data2, map + split, count - split);
de->rec_len = ext4_rec_len_to_disk(data1 + blocksize - (char *) de);
de2->rec_len = ext4_rec_len_to_disk(data2 + blocksize - (char *) de2);
dxtrace(dx_show_leaf (hinfo, (struct ext4_dir_entry_2 *) data1, blocksize, 1));
-@@ -1237,15 +1242,15 @@ static struct ext4_dir_entry_2 *do_split
+@@ -1237,15 +1242,15 @@
swap(*bh, bh2);
de = de2;
}
return de;
journal_error:
-@@ -1271,12 +1276,12 @@ errout:
+@@ -1271,12 +1276,12 @@
*/
static int add_dirent_to_buf(handle_t *handle, struct dentry *dentry,
struct inode *inode, struct ext4_dir_entry_2 *de,
unsigned short reclen;
int nlen, rlen, err;
char *top;
-@@ -1288,11 +1293,11 @@ static int add_dirent_to_buf(handle_t *h
+@@ -1288,11 +1293,11 @@
while ((char *) de <= top) {
if (!ext4_check_dir_entry("ext4_add_entry", dir, de,
bh, offset)) {
return -EEXIST;
}
nlen = EXT4_DIR_REC_LEN(de->name_len);
-@@ -1329,7 +1334,7 @@ static int add_dirent_to_buf(handle_t *h
+@@ -1329,7 +1334,7 @@
} else
de->inode = 0;
de->name_len = namelen;
/*
* XXX shouldn't update any times until successful
* completion of syscall, but too many callers depend
-@@ -1377,7 +1382,7 @@ static int make_indexed_dir(handle_t *ha
+@@ -1377,7 +1382,7 @@
struct fake_dirent *fde;
blocksize = dir->i_sb->s_blocksize;
retval = ext4_journal_get_write_access(handle, bh);
if (retval) {
ext4_std_error(dir->i_sb, retval);
-@@ -1386,7 +1391,7 @@ static int make_indexed_dir(handle_t *ha
+@@ -1386,7 +1391,7 @@
}
root = (struct dx_root *) bh->b_data;
if (!(bh2)) {
brelse(bh);
return retval;
-@@ -1412,12 +1417,14 @@ static int make_indexed_dir(handle_t *ha
+@@ -1412,12 +1417,14 @@
root->info.info_length = sizeof(root->info);
root->info.hash_version = EXT4_SB(dir->i_sb)->s_def_hash_version;
entries = root->entries;
hinfo.seed = EXT4_SB(dir->i_sb)->s_hash_seed;
ext4fs_dirhash(name, namelen, &hinfo);
frame = frames;
-@@ -1443,14 +1450,13 @@ static int make_indexed_dir(handle_t *ha
+@@ -1443,14 +1450,13 @@
* may not sleep between calling this and putting something into
* the entry, as someone else might have used it while you slept.
*/
int retval;
int dx_fallback=0;
unsigned blocksize;
-@@ -1469,7 +1475,7 @@ static int ext4_add_entry (handle_t *han
+@@ -1469,7 +1475,7 @@
ext4_mark_inode_dirty(handle, dir);
}
blocks = dir->i_size >> sb->s_blocksize_bits;
bh = ext4_bread(handle, dir, block, 0, &retval);
if(!bh)
return retval;
-@@ -1500,13 +1506,13 @@ static int ext4_dx_add_entry(handle_t *h
+@@ -1500,13 +1506,13 @@
struct dx_frame frames[2], *frame;
struct dx_entry *entries, *at;
struct dx_hash_info hinfo;
if (!frame)
return err;
entries = frame->entries;
-@@ -1527,7 +1533,7 @@ static int ext4_dx_add_entry(handle_t *h
+@@ -1527,7 +1533,7 @@
}
/* Block full, should compress but for now just split */
dx_get_count(entries), dx_get_limit(entries)));
/* Need to split index? */
if (dx_get_count(entries) == dx_get_limit(entries)) {
-@@ -1559,7 +1565,8 @@ static int ext4_dx_add_entry(handle_t *h
+@@ -1559,7 +1565,8 @@
if (levels) {
unsigned icount1 = icount/2, icount2 = icount - icount1;
unsigned hash2 = dx_get_hash(entries + icount1);
BUFFER_TRACE(frame->bh, "get_write_access"); /* index root */
err = ext4_journal_get_write_access(handle,
-@@ -1567,11 +1574,11 @@ static int ext4_dx_add_entry(handle_t *h
+@@ -1567,11 +1574,11 @@
if (err)
goto journal_error;
/* Which index block gets the new entry? */
if (at - entries >= icount1) {
-@@ -1579,16 +1586,17 @@ static int ext4_dx_add_entry(handle_t *h
+@@ -1579,16 +1586,17 @@
frame->entries = entries = entries2;
swap(frame->bh, bh2);
}
memcpy((char *) entries2, (char *) entries,
icount * sizeof(struct dx_entry));
dx_set_limit(entries2, dx_node_limit(dir));
-@@ -1630,12 +1638,12 @@ cleanup:
+@@ -1630,12 +1638,12 @@
* ext4_delete_entry deletes a directory entry by merging it with the
* previous entry
*/
int i;
i = 0;
-@@ -1716,11 +1724,11 @@ static int ext4_add_nondir(handle_t *han
+@@ -1716,11 +1724,11 @@
* If the create succeeds, we fill in the inode information
* with d_instantiate().
*/
int err, retries = 0;
retry:
-@@ -1747,8 +1755,8 @@ retry:
+@@ -1747,8 +1755,8 @@
return err;
}
{
handle_t *handle;
struct inode *inode;
-@@ -1767,11 +1775,11 @@ retry:
+@@ -1767,11 +1775,11 @@
if (IS_DIRSYNC(dir))
handle->h_sync = 1;
inode->i_op = &ext4_special_inode_operations;
#endif
err = ext4_add_nondir(handle, dentry, inode);
-@@ -1782,12 +1790,12 @@ retry:
+@@ -1782,12 +1790,12 @@
return err;
}
int err, retries = 0;
if (EXT4_DIR_LINK_MAX(dir))
-@@ -1803,7 +1811,7 @@ retry:
+@@ -1803,7 +1811,7 @@
if (IS_DIRSYNC(dir))
handle->h_sync = 1;
err = PTR_ERR(inode);
if (IS_ERR(inode))
goto out_stop;
-@@ -1811,7 +1819,7 @@ retry:
+@@ -1811,7 +1819,7 @@
inode->i_op = &ext4_dir_inode_operations;
inode->i_fop = &ext4_dir_operations;
inode->i_size = EXT4_I(inode)->i_disksize = inode->i_sb->s_blocksize;
if (!dir_block)
goto out_clear_inode;
BUFFER_TRACE(dir_block, "get_write_access");
-@@ -1820,26 +1828,26 @@ retry:
+@@ -1820,26 +1828,26 @@
de->inode = cpu_to_le32(inode->i_ino);
de->name_len = 1;
de->rec_len = ext4_rec_len_to_disk(EXT4_DIR_REC_LEN(de->name_len));
goto out_stop;
}
ext4_inc_count(handle, dir);
-@@ -1856,17 +1864,17 @@ out_stop:
+@@ -1856,17 +1864,17 @@
/*
* routine to check that the specified directory is empty (for rmdir)
*/
if (err)
ext4_error(inode->i_sb, __func__,
"error %d reading directory #%lu offset 0",
-@@ -1881,29 +1889,29 @@ static int empty_dir (struct inode * ino
+@@ -1881,29 +1889,29 @@
de1 = ext4_next_entry(de);
if (le32_to_cpu(de->inode) != inode->i_ino ||
!le32_to_cpu(de1->inode) ||
err, inode->i_ino, offset);
offset += sb->s_blocksize;
continue;
-@@ -1917,13 +1925,13 @@ static int empty_dir (struct inode * ino
+@@ -1917,13 +1925,13 @@
continue;
}
if (le32_to_cpu(de->inode)) {
return 1;
}
-@@ -1954,8 +1962,8 @@ int ext4_orphan_add(handle_t *handle, st
+@@ -1954,8 +1962,8 @@
* ->i_nlink. For, say it, character device. Not a regular file,
* not a directory, not a symlink and ->i_nlink > 0.
*/
BUFFER_TRACE(EXT4_SB(sb)->s_sbh, "get_write_access");
err = ext4_journal_get_write_access(handle, EXT4_SB(sb)->s_sbh);
-@@ -2003,7 +2011,7 @@ int ext4_orphan_del(handle_t *handle, st
+@@ -2003,7 +2011,7 @@
struct list_head *prev;
struct ext4_inode_info *ei = EXT4_I(inode);
struct ext4_sb_info *sbi;
struct ext4_iloc iloc;
int err = 0;
-@@ -2033,7 +2041,7 @@ int ext4_orphan_del(handle_t *handle, st
+@@ -2033,7 +2041,7 @@
goto out_err;
if (prev == &sbi->s_orphan) {
BUFFER_TRACE(sbi->s_sbh, "get_write_access");
err = ext4_journal_get_write_access(handle, sbi->s_sbh);
if (err)
-@@ -2045,7 +2053,7 @@ int ext4_orphan_del(handle_t *handle, st
+@@ -2045,7 +2053,7 @@
struct inode *i_prev =
&list_entry(prev, struct ext4_inode_info, i_orphan)->vfs_inode;
i_prev->i_ino, ino_next);
err = ext4_reserve_inode_write(handle, i_prev, &iloc2);
if (err)
-@@ -2069,12 +2077,12 @@ out_brelse:
+@@ -2069,12 +2077,12 @@
goto out_err;
}
handle_t *handle;
/* Initialize quotas before so that eventual writes go in
-@@ -2085,7 +2093,7 @@ static int ext4_rmdir (struct inode * di
+@@ -2085,7 +2093,7 @@
return PTR_ERR(handle);
retval = -ENOENT;
if (!bh)
goto end_rmdir;
-@@ -2099,16 +2107,16 @@ static int ext4_rmdir (struct inode * di
+@@ -2099,16 +2107,16 @@
goto end_rmdir;
retval = -ENOTEMPTY;
inode->i_version++;
clear_nlink(inode);
/* There's no need to set i_disksize: the fact that i_nlink is
-@@ -2124,16 +2132,16 @@ static int ext4_rmdir (struct inode * di
+@@ -2124,16 +2132,16 @@
end_rmdir:
ext4_journal_stop(handle);
handle_t *handle;
/* Initialize quotas before so that eventual writes go
-@@ -2147,7 +2155,7 @@ static int ext4_unlink(struct inode * di
+@@ -2147,7 +2155,7 @@
handle->h_sync = 1;
retval = -ENOENT;
if (!bh)
goto end_unlink;
-@@ -2158,9 +2166,9 @@ static int ext4_unlink(struct inode * di
+@@ -2158,9 +2166,9 @@
goto end_unlink;
if (!inode->i_nlink) {
inode->i_nlink = 1;
}
retval = ext4_delete_entry(handle, dir, de, bh);
-@@ -2178,15 +2186,15 @@ static int ext4_unlink(struct inode * di
+@@ -2178,15 +2186,15 @@
end_unlink:
ext4_journal_stop(handle);
int l, err, retries = 0;
l = strlen(symname)+1;
-@@ -2203,12 +2211,12 @@ retry:
+@@ -2203,12 +2211,12 @@
if (IS_DIRSYNC(dir))
handle->h_sync = 1;
inode->i_op = &ext4_symlink_inode_operations;
ext4_set_aops(inode);
/*
-@@ -2221,14 +2229,14 @@ retry:
+@@ -2221,14 +2229,14 @@
if (err) {
clear_nlink(inode);
ext4_mark_inode_dirty(handle, inode);
inode->i_size = l-1;
}
EXT4_I(inode)->i_disksize = inode->i_size;
-@@ -2240,8 +2248,8 @@ out_stop:
+@@ -2240,8 +2248,8 @@
return err;
}
{
handle_t *handle;
struct inode *inode = old_dentry->d_inode;
-@@ -2284,13 +2292,13 @@ retry:
+@@ -2284,13 +2292,13 @@
* Anybody can rename anything with this: the permission checks are left to the
* higher-level routines.
*/
int retval;
old_bh = new_bh = dir_bh = NULL;
-@@ -2308,7 +2316,7 @@ static int ext4_rename (struct inode * o
+@@ -2308,7 +2316,7 @@
if (IS_DIRSYNC(old_dir) || IS_DIRSYNC(new_dir))
handle->h_sync = 1;
/*
* Check for inode number is _not_ due to possible IO errors.
* We might rmdir the source, keep it as pwd of some process
-@@ -2321,32 +2329,32 @@ static int ext4_rename (struct inode * o
+@@ -2321,32 +2329,32 @@
goto end_rename;
new_inode = new_dentry->d_inode;
if (retval)
goto end_rename;
} else {
-@@ -2388,7 +2396,7 @@ static int ext4_rename (struct inode * o
+@@ -2388,7 +2396,7 @@
struct buffer_head *old_bh2;
struct ext4_dir_entry_2 *old_de2;
if (old_bh2) {
retval = ext4_delete_entry(handle, old_dir,
old_de2, old_bh2);
-@@ -2433,9 +2441,9 @@ static int ext4_rename (struct inode * o
+@@ -2433,9 +2441,9 @@
retval = 0;
end_rename:
ext4_journal_stop(handle);
return retval;
}
-@@ -2454,7 +2462,7 @@ const struct inode_operations ext4_dir_i
+@@ -2454,7 +2462,7 @@
.mknod = ext4_mknod,
.rename = ext4_rename,
.setattr = ext4_setattr,
.setxattr = generic_setxattr,
.getxattr = generic_getxattr,
.listxattr = ext4_listxattr,
-@@ -2465,7 +2473,7 @@ const struct inode_operations ext4_dir_i
+@@ -2465,7 +2473,7 @@
const struct inode_operations ext4_special_inode_operations = {
.setattr = ext4_setattr,
.setxattr = generic_setxattr,
.getxattr = generic_getxattr,
.listxattr = ext4_listxattr,
-diff -purN linux-2.6.27/fs/ext4/resize.c linux-2.6.27.19-5.1/fs/ext4/resize.c
---- linux-2.6.27/fs/ext4/resize.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/resize.c 2009-03-25 16:11:36.000000000 +0000
-@@ -50,7 +50,7 @@ static int verify_group_input(struct sup
+diff -r 9608d5473017 fs/ext4/resize.c
+--- a/fs/ext4/resize.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/resize.c Wed May 06 16:56:49 2009 +0100
+@@ -50,7 +50,7 @@
ext4_get_group_no_and_offset(sb, start, NULL, &offset);
if (group != sbi->s_groups_count)
ext4_warning(sb, __func__,
input->group, sbi->s_groups_count);
else if (offset != 0)
ext4_warning(sb, __func__, "Last group not full");
-@@ -284,11 +284,9 @@ static int setup_new_group_blocks(struct
+@@ -284,11 +284,9 @@
if ((err = extend_or_restart_transaction(handle, 2, bh)))
goto exit_bh;
/* Mark unused entries in inode bitmap used */
ext4_debug("clear inode bitmap %#04llx (+%llu)\n",
input->inode_bitmap, input->inode_bitmap - start);
-@@ -297,7 +295,7 @@ static int setup_new_group_blocks(struct
+@@ -297,7 +295,7 @@
goto exit_journal;
}
bh->b_data);
ext4_journal_dirty_metadata(handle, bh);
exit_bh:
-@@ -416,8 +414,8 @@ static int add_new_gdb(handle_t *handle,
+@@ -416,8 +414,8 @@
"EXT4-fs: ext4_add_new_gdb: adding group block %lu\n",
gdb_num);
* because the user tools have no way of handling this. Probably a
* bad time to do it anyways.
*/
-@@ -715,7 +713,7 @@ static void update_backups(struct super_
+@@ -715,7 +713,7 @@
exit_err:
if (err) {
ext4_warning(sb, __func__,
"forcing fsck on next reboot", group, err);
sbi->s_mount_state &= ~EXT4_VALID_FS;
sbi->s_es->s_state &= cpu_to_le16(~EXT4_VALID_FS);
-@@ -747,6 +745,7 @@ int ext4_group_add(struct super_block *s
+@@ -747,6 +745,7 @@
struct inode *inode = NULL;
handle_t *handle;
int gdb_off, gdb_num;
int err, err2;
gdb_num = input->group / EXT4_DESC_PER_BLOCK(sb);
-@@ -787,6 +786,7 @@ int ext4_group_add(struct super_block *s
+@@ -786,6 +785,7 @@
+ return PTR_ERR(inode);
}
}
-
+
+
if ((err = verify_group_input(sb, input)))
goto exit_put;
-
-@@ -855,6 +855,7 @@ int ext4_group_add(struct super_block *s
+@@ -855,6 +855,7 @@
* using the new disk blocks.
*/
/* Update group descriptor block for new group */
gdp = (struct ext4_group_desc *)((char *)primary->b_data +
gdb_off * EXT4_DESC_SIZE(sb));
-@@ -862,19 +863,21 @@ int ext4_group_add(struct super_block *s
+@@ -862,19 +863,21 @@
ext4_block_bitmap_set(sb, gdp, input->block_bitmap); /* LV FIXME */
ext4_inode_bitmap_set(sb, gdp, input->inode_bitmap); /* LV FIXME */
ext4_inode_table_set(sb, gdp, input->inode_table); /* LV FIXME */
/*
* Make the new blocks and inodes valid next. We do this before
* increasing the group count so that once the group is enabled,
-@@ -915,6 +918,7 @@ int ext4_group_add(struct super_block *s
+@@ -915,6 +918,7 @@
/* Update the global fs size fields */
sbi->s_groups_count++;
ext4_journal_dirty_metadata(handle, primary);
-@@ -929,6 +933,15 @@ int ext4_group_add(struct super_block *s
+@@ -928,6 +932,15 @@
+ input->free_blocks_count);
percpu_counter_add(&sbi->s_freeinodes_counter,
EXT4_INODES_PER_GROUP(sb));
-
++
+ if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG)) {
+ ext4_group_t flex_group;
+ flex_group = ext4_flex_group(sbi, input->group);
+ sbi->s_flex_groups[flex_group].free_inodes +=
+ EXT4_INODES_PER_GROUP(sb);
+ }
-+
+
ext4_journal_dirty_metadata(handle, sbi->s_sbh);
sb->s_dirt = 1;
-
-@@ -964,12 +977,10 @@ int ext4_group_extend(struct super_block
+@@ -964,12 +977,10 @@
ext4_group_t o_groups_count;
ext4_grpblk_t last;
ext4_grpblk_t add;
/* We don't need to worry about locking wrt other resizers just
* yet: we're going to revalidate es->s_blocks_count after
-@@ -1068,50 +1079,13 @@ int ext4_group_extend(struct super_block
+@@ -1068,49 +1079,12 @@
unlock_super(sb);
ext4_debug("freeing blocks %llu through %llu\n", o_blocks_count,
o_blocks_count + add);
o_blocks_count + add);
if ((err = ext4_journal_stop(handle)))
goto exit_put;
-
+-
- /*
- * Mark mballoc pages as not up to date so that they will be updated
- * next time they are loaded by ext4_mb_load_buddy.
- /* Update free blocks in group info */
- ext4_mb_update_group_info(grp, add);
- }
--
+
if (test_opt(sb, DEBUG))
printk(KERN_DEBUG "EXT4-fs: extended group to %llu blocks\n",
- ext4_blocks_count(es));
-diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
---- linux-2.6.27/fs/ext4/super.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/super.c 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/super.c
+--- a/fs/ext4/super.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/super.c Wed May 06 16:56:49 2009 +0100
@@ -34,6 +34,8 @@
#include <linux/namei.h>
#include <linux/quotaops.h>
#include <linux/log2.h>
#include <linux/crc16.h>
#include <asm/uaccess.h>
-@@ -45,6 +47,8 @@
+@@ -44,6 +46,8 @@
+ #include "acl.h"
#include "namei.h"
#include "group.h"
-
-+struct proc_dir_entry *ext4_proc_root;
+
++struct proc_dir_entry *ext4_proc_root;
+
static int ext4_load_journal(struct super_block *, struct ext4_super_block *,
unsigned long journal_devnum);
- static int ext4_create_journal(struct super_block *, struct ext4_super_block *,
-@@ -89,6 +93,38 @@ ext4_fsblk_t ext4_inode_table(struct sup
+@@ -89,6 +93,38 @@
(ext4_fsblk_t)le32_to_cpu(bg->bg_inode_table_hi) << 32 : 0);
}
void ext4_block_bitmap_set(struct super_block *sb,
struct ext4_group_desc *bg, ext4_fsblk_t blk)
{
-@@ -113,6 +149,38 @@ void ext4_inode_table_set(struct super_b
+@@ -111,6 +147,38 @@
+ bg->bg_inode_table_lo = cpu_to_le32((u32)blk);
+ if (EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT)
bg->bg_inode_table_hi = cpu_to_le32(blk >> 32);
- }
-
++}
++
+void ext4_free_blks_set(struct super_block *sb,
+ struct ext4_group_desc *bg, __u32 count)
+{
+ bg->bg_itable_unused_lo = cpu_to_le16((__u16)count);
+ if (EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT)
+ bg->bg_itable_unused_hi = cpu_to_le16(count >> 16);
-+}
-+
+ }
+
/*
- * Wrappers for jbd2_journal_start/end.
- *
-@@ -329,7 +397,8 @@ void ext4_abort(struct super_block *sb,
+@@ -329,7 +397,8 @@
EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS;
sb->s_flags |= MS_RDONLY;
EXT4_SB(sb)->s_mount_opt |= EXT4_MOUNT_ABORT;
}
void ext4_warning(struct super_block *sb, const char *function,
-@@ -345,6 +414,44 @@ void ext4_warning(struct super_block *sb
+@@ -344,6 +413,44 @@
+ printk("\n");
va_end(args);
}
-
++
+void ext4_grp_locked_error(struct super_block *sb, ext4_group_t grp,
+ const char *function, const char *fmt, ...)
+__releases(bitlock)
+ return;
+}
+
-+
+
void ext4_update_dynamic_rev(struct super_block *sb)
{
- struct ext4_super_block *es = EXT4_SB(sb)->s_es;
-@@ -370,66 +477,6 @@ void ext4_update_dynamic_rev(struct supe
+@@ -368,66 +475,6 @@
+ * means they are likely already in use, so leave them alone. We
+ * can leave it up to e2fsck to clean up any inconsistencies there.
*/
- }
-
+-}
+-
-int ext4_update_compat_feature(handle_t *handle,
- struct super_block *sb, __u32 compat)
-{
- EXT4_SB(sb)->s_sbh);
- }
- return err;
--}
--
+ }
+
/*
- * Open the external journal device
- */
-@@ -505,13 +552,16 @@ static void ext4_put_super(struct super_
+@@ -505,12 +552,15 @@
ext4_xattr_put_super(sb);
jbd2_journal_destroy(sbi->s_journal);
sbi->s_journal = NULL;
- BUFFER_TRACE(sbi->s_sbh, "marking dirty");
- mark_buffer_dirty(sbi->s_sbh);
ext4_commit_super(sb, es, 1);
- }
++ }
+ if (sbi->s_proc) {
+ remove_proc_entry("inode_readahead_blks", sbi->s_proc);
+ remove_proc_entry(sb->s_id, ext4_proc_root);
-+ }
+ }
for (i = 0; i < sbi->s_gdb_count; i++)
- brelse(sbi->s_group_desc[i]);
-@@ -520,6 +570,7 @@ static void ext4_put_super(struct super_
+@@ -520,6 +570,7 @@
percpu_counter_destroy(&sbi->s_freeblocks_counter);
percpu_counter_destroy(&sbi->s_freeinodes_counter);
percpu_counter_destroy(&sbi->s_dirs_counter);
brelse(sbi->s_sbh);
#ifdef CONFIG_QUOTA
for (i = 0; i < MAXQUOTAS; i++)
-@@ -562,11 +613,10 @@ static struct inode *ext4_alloc_inode(st
+@@ -562,11 +613,10 @@
ei = kmem_cache_alloc(ext4_inode_cachep, GFP_NOFS);
if (!ei)
return NULL;
ei->vfs_inode.i_version = 1;
ei->vfs_inode.i_data.writeback_index = 0;
memset(&ei->i_cached_extent, 0, sizeof(struct ext4_ext_cache));
-@@ -599,7 +649,7 @@ static void init_once(void *foo)
+@@ -599,7 +649,7 @@
struct ext4_inode_info *ei = (struct ext4_inode_info *) foo;
INIT_LIST_HEAD(&ei->i_orphan);
init_rwsem(&ei->xattr_sem);
#endif
init_rwsem(&ei->i_data_sem);
-@@ -625,8 +675,7 @@ static void destroy_inodecache(void)
+@@ -625,8 +675,7 @@
static void ext4_clear_inode(struct inode *inode)
{
if (EXT4_I(inode)->i_acl &&
EXT4_I(inode)->i_acl != EXT4_ACL_NOT_CACHED) {
posix_acl_release(EXT4_I(inode)->i_acl);
-@@ -638,10 +687,7 @@ static void ext4_clear_inode(struct inod
+@@ -638,10 +687,7 @@
EXT4_I(inode)->i_default_acl = EXT4_ACL_NOT_CACHED;
}
#endif
jbd2_journal_release_jbd_inode(EXT4_SB(inode->i_sb)->s_journal,
&EXT4_I(inode)->jinode);
}
-@@ -654,7 +700,7 @@ static inline void ext4_show_quota_optio
+@@ -654,7 +700,7 @@
if (sbi->s_jquota_fmt)
seq_printf(seq, ",jqfmt=%s",
if (sbi->s_qf_names[USRQUOTA])
seq_printf(seq, ",usrjquota=%s", sbi->s_qf_names[USRQUOTA]);
-@@ -718,7 +764,7 @@ static int ext4_show_options(struct seq_
+@@ -718,7 +764,7 @@
seq_puts(seq, ",debug");
if (test_opt(sb, OLDALLOC))
seq_puts(seq, ",oldalloc");
if (test_opt(sb, XATTR_USER) &&
!(def_mount_opts & EXT4_DEFM_XATTR_USER))
seq_puts(seq, ",user_xattr");
-@@ -727,7 +773,7 @@ static int ext4_show_options(struct seq_
+@@ -727,7 +773,7 @@
seq_puts(seq, ",nouser_xattr");
}
#endif
if (test_opt(sb, POSIX_ACL) && !(def_mount_opts & EXT4_DEFM_ACL))
seq_puts(seq, ",acl");
if (!test_opt(sb, POSIX_ACL) && (def_mount_opts & EXT4_DEFM_ACL))
-@@ -752,8 +798,6 @@ static int ext4_show_options(struct seq_
+@@ -752,8 +798,6 @@
seq_puts(seq, ",nobh");
if (!test_opt(sb, EXTENTS))
seq_puts(seq, ",noextents");
if (test_opt(sb, I_VERSION))
seq_puts(seq, ",i_version");
if (!test_opt(sb, DELALLOC))
-@@ -773,6 +817,10 @@ static int ext4_show_options(struct seq_
+@@ -772,6 +816,10 @@
+ seq_puts(seq, ",data=ordered");
else if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_WRITEBACK_DATA)
seq_puts(seq, ",data=writeback");
-
++
+ if (sbi->s_inode_readahead_blks != EXT4_DEF_INODE_READAHEAD_BLKS)
+ seq_printf(seq, ",inode_readahead_blks=%u",
+ sbi->s_inode_readahead_blks);
-+
+
ext4_show_quota_options(seq, sb);
return 0;
- }
-@@ -822,7 +870,7 @@ static struct dentry *ext4_fh_to_parent(
+@@ -822,7 +870,7 @@
}
#ifdef CONFIG_QUOTA
#define QTYPE2MOPT(on, t) ((t) == USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA))
static int ext4_dquot_initialize(struct inode *inode, int type);
-@@ -896,7 +944,7 @@ static const struct export_operations ex
+@@ -896,7 +944,7 @@
enum {
Opt_bsd_df, Opt_minix_df, Opt_grpid, Opt_nogrpid,
Opt_resgid, Opt_resuid, Opt_sb, Opt_err_cont, Opt_err_panic, Opt_err_ro,
Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl,
Opt_reservation, Opt_noreservation, Opt_noload, Opt_nobh, Opt_bh,
Opt_commit, Opt_journal_update, Opt_journal_inum, Opt_journal_dev,
-@@ -906,10 +954,11 @@ enum {
+@@ -906,10 +954,11 @@
Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,
Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota,
Opt_grpquota, Opt_extents, Opt_noextents, Opt_i_version,
{Opt_bsd_df, "bsddf"},
{Opt_minix_df, "minixdf"},
{Opt_grpid, "grpid"},
-@@ -923,8 +972,6 @@ static match_table_t tokens = {
+@@ -923,8 +972,6 @@
{Opt_err_panic, "errors=panic"},
{Opt_err_ro, "errors=remount-ro"},
{Opt_nouid32, "nouid32"},
{Opt_debug, "debug"},
{Opt_oldalloc, "oldalloc"},
{Opt_orlov, "orlov"},
-@@ -961,12 +1008,11 @@ static match_table_t tokens = {
+@@ -961,12 +1008,11 @@
{Opt_extents, "extents"},
{Opt_noextents, "noextents"},
{Opt_i_version, "i_version"},
{Opt_err, NULL},
};
-@@ -981,7 +1027,7 @@ static ext4_fsblk_t get_sb_block(void **
+@@ -981,7 +1027,7 @@
/*todo: use simple_strtoll with >32bit ext4 */
sb_block = simple_strtoul(options, &options, 0);
if (*options && *options != ',') {
(char *) *data);
return 1;
}
-@@ -1060,9 +1106,6 @@ static int parse_options(char *options,
+@@ -1060,9 +1106,6 @@
case Opt_nouid32:
set_opt(sbi->s_mount_opt, NO_UID32);
break;
case Opt_debug:
set_opt(sbi->s_mount_opt, DEBUG);
break;
-@@ -1072,7 +1115,7 @@ static int parse_options(char *options,
+@@ -1072,7 +1115,7 @@
case Opt_orlov:
clear_opt(sbi->s_mount_opt, OLDALLOC);
break;
case Opt_user_xattr:
set_opt(sbi->s_mount_opt, XATTR_USER);
break;
-@@ -1082,10 +1125,11 @@ static int parse_options(char *options,
+@@ -1082,10 +1125,11 @@
#else
case Opt_user_xattr:
case Opt_nouser_xattr:
case Opt_acl:
set_opt(sbi->s_mount_opt, POSIX_ACL);
break;
-@@ -1095,7 +1139,8 @@ static int parse_options(char *options,
+@@ -1095,7 +1139,8 @@
#else
case Opt_acl:
case Opt_noacl:
break;
#endif
case Opt_reservation:
-@@ -1185,12 +1230,11 @@ static int parse_options(char *options,
+@@ -1185,12 +1230,11 @@
case Opt_grpjquota:
qtype = GRPQUOTA;
set_qf_name:
return 0;
}
qname = match_strdup(&args[0]);
-@@ -1225,8 +1269,7 @@ set_qf_name:
+@@ -1225,8 +1269,7 @@
case Opt_offgrpjquota:
qtype = GRPQUOTA;
clear_qf_name:
sbi->s_qf_names[qtype]) {
printk(KERN_ERR "EXT4-fs: Cannot change "
"journaled quota options when "
-@@ -1245,8 +1288,7 @@ clear_qf_name:
+@@ -1245,8 +1288,7 @@
case Opt_jqfmt_vfsv0:
qfmt = QFMT_VFS_V0;
set_qf_format:
sbi->s_jquota_fmt != qfmt) {
printk(KERN_ERR "EXT4-fs: Cannot change "
"journaled quota options when "
-@@ -1265,7 +1307,7 @@ set_qf_format:
+@@ -1265,7 +1307,7 @@
set_opt(sbi->s_mount_opt, GRPQUOTA);
break;
case Opt_noquota:
printk(KERN_ERR "EXT4-fs: Cannot change quota "
"options when quota turned on.\n");
return 0;
-@@ -1357,12 +1399,6 @@ set_qf_format:
+@@ -1357,12 +1399,6 @@
case Opt_nodelalloc:
clear_opt(sbi->s_mount_opt, DELALLOC);
break;
case Opt_stripe:
if (match_int(&args[0], &option))
return 0;
-@@ -1373,6 +1409,13 @@ set_qf_format:
+@@ -1372,6 +1408,13 @@
+ break;
case Opt_delalloc:
set_opt(sbi->s_mount_opt, DELALLOC);
- break;
++ break;
+ case Opt_inode_readahead_blks:
+ if (match_int(&args[0], &option))
+ return 0;
+ if (option < 0 || option > (1 << 30))
+ return 0;
+ sbi->s_inode_readahead_blks = option;
-+ break;
+ break;
default:
printk(KERN_ERR
- "EXT4-fs: Unrecognized mount option \"%s\" "
-@@ -1465,7 +1508,7 @@ static int ext4_setup_super(struct super
+@@ -1465,7 +1508,7 @@
ext4_commit_super(sb, es, 1);
if (test_opt(sb, DEBUG))
"bpg=%lu, ipg=%lu, mo=%04lx]\n",
sb->s_blocksize,
sbi->s_groups_count,
-@@ -1473,14 +1516,14 @@ static int ext4_setup_super(struct super
+@@ -1473,14 +1516,14 @@
EXT4_INODES_PER_GROUP(sb),
sbi->s_mount_opt);
}
return res;
}
-@@ -1493,7 +1536,6 @@ static int ext4_fill_flex_info(struct su
+@@ -1493,7 +1536,6 @@
ext4_group_t flex_group_count;
ext4_group_t flex_group;
int groups_per_flex = 0;
int i;
if (!sbi->s_es->s_log_groups_per_flex) {
-@@ -1504,27 +1546,26 @@ static int ext4_fill_flex_info(struct su
+@@ -1504,27 +1546,26 @@
sbi->s_log_groups_per_flex = sbi->s_es->s_log_groups_per_flex;
groups_per_flex = 1 << sbi->s_log_groups_per_flex;
+ "%u flex groups\n", flex_group_count);
goto failed;
}
-
+-
- gdp = ext4_get_group_desc(sb, 1, &bh);
- block_bitmap = ext4_block_bitmap(sb, gdp) - 1;
--
+
for (i = 0; i < sbi->s_groups_count; i++) {
gdp = ext4_get_group_desc(sb, i, &bh);
}
return 1;
-@@ -1584,7 +1625,7 @@ static int ext4_check_descriptors(struct
+@@ -1584,7 +1625,7 @@
if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG))
flexbg_flag = 1;
for (i = 0; i < sbi->s_groups_count; i++) {
struct ext4_group_desc *gdp = ext4_get_group_desc(sb, i, NULL);
-@@ -1598,33 +1639,35 @@ static int ext4_check_descriptors(struct
+@@ -1598,33 +1639,35 @@
block_bitmap = ext4_block_bitmap(sb, gdp);
if (block_bitmap < first_block || block_bitmap > last_block) {
printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: "
}
spin_unlock(sb_bgl_lock(sbi, i));
if (!flexbg_flag)
-@@ -1714,9 +1757,9 @@ static void ext4_orphan_cleanup(struct s
+@@ -1714,9 +1757,9 @@
DQUOT_INIT(inode);
if (inode->i_nlink) {
printk(KERN_DEBUG
inode->i_ino, inode->i_size);
ext4_truncate(inode);
nr_truncates++;
-@@ -1757,13 +1800,13 @@ static void ext4_orphan_cleanup(struct s
+@@ -1757,13 +1800,13 @@
*
* Note, this does *not* consider any metadata overhead for vfs i_blocks.
*/
/*
* CONFIG_LSF is not enabled implies the inode
* i_block represent total blocks in 512 bytes
-@@ -1793,7 +1836,7 @@ static loff_t ext4_max_size(int blkbits)
+@@ -1793,7 +1836,7 @@
* block limit, and also a limit of (2^48 - 1) 512-byte sectors in i_blocks.
* We need to be 1 filesystem block less than the 2^48 sector limit.
*/
{
loff_t res = EXT4_NDIR_BLOCKS;
int meta_blocks;
-@@ -1806,11 +1849,11 @@ static loff_t ext4_max_bitmap_size(int b
+@@ -1806,11 +1849,11 @@
* total number of 512 bytes blocks of the file
*/
*/
upper_limit = (1LL << 32) - 1;
-@@ -1914,12 +1957,13 @@ static int ext4_fill_super(struct super_
+@@ -1914,12 +1957,13 @@
unsigned long journal_devnum = 0;
unsigned long def_mount_opts;
struct inode *root;
__u64 blocks_count;
int err;
-@@ -1930,10 +1974,15 @@ static int ext4_fill_super(struct super_
+@@ -1930,9 +1974,14 @@
sbi->s_mount_opt = 0;
sbi->s_resuid = EXT4_DEF_RESUID;
sbi->s_resgid = EXT4_DEF_RESGID;
sbi->s_sb_block = sb_block;
unlock_kernel();
-
++
+ /* Cleanup superblock name */
+ for (cp = sb->s_id; (cp = strchr(cp, '/'));)
+ *cp = '!';
-+
+
blocksize = sb_min_blocksize(sb, EXT4_MIN_BLOCK_SIZE);
if (!blocksize) {
- printk(KERN_ERR "EXT4-fs: unable to set blocksize\n");
-@@ -1973,11 +2022,11 @@ static int ext4_fill_super(struct super_
+@@ -1973,11 +2022,11 @@
set_opt(sbi->s_mount_opt, GRPID);
if (def_mount_opts & EXT4_DEFM_UID16)
set_opt(sbi->s_mount_opt, NO_UID32);
if (def_mount_opts & EXT4_DEFM_ACL)
set_opt(sbi->s_mount_opt, POSIX_ACL);
#endif
-@@ -2012,11 +2061,6 @@ static int ext4_fill_super(struct super_
+@@ -2012,11 +2061,6 @@
ext4_warning(sb, __func__,
"extents feature not enabled on this filesystem, "
"use tune2fs.\n");
/*
* enable delayed allocation by default
-@@ -2041,16 +2085,6 @@ static int ext4_fill_super(struct super_
+@@ -2041,16 +2085,6 @@
"running e2fsck is recommended\n");
/*
* Check feature flags regardless of the revision level, since we
* previously didn't change the revision level when setting the flags,
* so there is a chance incompat flags are set on a rev 0 filesystem.
-@@ -2058,18 +2092,22 @@ static int ext4_fill_super(struct super_
+@@ -2058,18 +2092,22 @@
features = EXT4_HAS_INCOMPAT_FEATURE(sb, ~EXT4_FEATURE_INCOMPAT_SUPP);
if (features) {
printk(KERN_ERR "EXT4-fs: %s: couldn't mount because of "
/*
* Large file size enabled file system can only be
* mount if kernel is build with CONFIG_LSF
-@@ -2119,8 +2157,9 @@ static int ext4_fill_super(struct super_
+@@ -2119,8 +2157,9 @@
}
}
if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV) {
sbi->s_inode_size = EXT4_GOOD_OLD_INODE_SIZE;
-@@ -2168,6 +2207,18 @@ static int ext4_fill_super(struct super_
+@@ -2168,6 +2207,18 @@
for (i = 0; i < 4; i++)
sbi->s_hash_seed[i] = le32_to_cpu(es->s_hash_seed[i]);
sbi->s_def_hash_version = es->s_def_hash_version;
if (sbi->s_blocks_per_group > blocksize * 8) {
printk(KERN_ERR
-@@ -2219,6 +2270,16 @@ static int ext4_fill_super(struct super_
+@@ -2219,6 +2270,16 @@
goto failed_mount;
}
bgl_lock_init(&sbi->s_blockgroup_lock);
for (i = 0; i < db_count; i++) {
-@@ -2257,24 +2318,14 @@ static int ext4_fill_super(struct super_
+@@ -2257,23 +2318,13 @@
err = percpu_counter_init(&sbi->s_dirs_counter,
ext4_count_dirs(sb));
}
printk(KERN_ERR "EXT4-fs: insufficient memory\n");
goto failed_mount3;
}
-
+-
- /* per fileystem reservation list head & lock */
- spin_lock_init(&sbi->s_rsv_window_lock);
- sbi->s_rsv_window_root = RB_ROOT;
- sbi->s_rsv_window_head.rsv_alloc_hit = 0;
- sbi->s_rsv_window_head.rsv_goal_size = 0;
- ext4_rsv_window_add(sb, &sbi->s_rsv_window_head);
--
+
sbi->s_stripe = ext4_get_stripe_size(sbi);
- /*
-@@ -2444,6 +2495,21 @@ static int ext4_fill_super(struct super_
+@@ -2444,6 +2495,21 @@
"available.\n");
}
/*
* akpm: core read_super() calls in here with the superblock locked.
* That deadlocks, because orphan cleanup needs to lock the superblock
-@@ -2463,16 +2529,6 @@ static int ext4_fill_super(struct super_
+@@ -2463,16 +2529,6 @@
test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_ORDERED_DATA ? "ordered":
"writeback");
lock_kernel();
return 0;
-@@ -2489,11 +2545,16 @@ failed_mount3:
+@@ -2489,11 +2545,16 @@
percpu_counter_destroy(&sbi->s_freeblocks_counter);
percpu_counter_destroy(&sbi->s_freeinodes_counter);
percpu_counter_destroy(&sbi->s_dirs_counter);
#ifdef CONFIG_QUOTA
for (i = 0; i < MAXQUOTAS; i++)
kfree(sbi->s_qf_names[i]);
-@@ -2552,7 +2613,7 @@ static journal_t *ext4_get_journal(struc
+@@ -2552,7 +2613,7 @@
return NULL;
}
journal_inode, journal_inode->i_size);
if (!S_ISREG(journal_inode->i_mode)) {
printk(KERN_ERR "EXT4-fs: invalid journal inode.\n");
-@@ -2715,6 +2776,11 @@ static int ext4_load_journal(struct supe
+@@ -2715,6 +2776,11 @@
return -EINVAL;
}
if (!really_read_only && test_opt(sb, UPDATE_JOURNAL)) {
err = jbd2_journal_update_format(journal);
if (err) {
-@@ -2799,13 +2865,37 @@ static void ext4_commit_super(struct sup
+@@ -2799,13 +2865,37 @@
if (!sbh)
return;
}
-@@ -2820,7 +2910,9 @@ static void ext4_mark_recovery_complete(
+@@ -2820,7 +2910,9 @@
journal_t *journal = EXT4_SB(sb)->s_journal;
jbd2_journal_lock_updates(journal);
lock_super(sb);
if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER) &&
sb->s_flags & MS_RDONLY) {
-@@ -2829,6 +2921,8 @@ static void ext4_mark_recovery_complete(
+@@ -2829,6 +2921,8 @@
ext4_commit_super(sb, es, 1);
}
unlock_super(sb);
jbd2_journal_unlock_updates(journal);
}
-@@ -2890,12 +2984,9 @@ int ext4_force_commit(struct super_block
+@@ -2890,12 +2984,9 @@
/*
* Ext4 always journals updates to the superblock itself, so we don't
* have to propagate any other updates to the superblock on disk at this
static void ext4_write_super(struct super_block *sb)
{
if (mutex_trylock(&sb->s_lock) != 0)
-@@ -2905,14 +2996,15 @@ static void ext4_write_super(struct supe
+@@ -2905,14 +2996,15 @@
static int ext4_sync_fs(struct super_block *sb, int wait)
{
}
/*
-@@ -2928,7 +3020,13 @@ static void ext4_write_super_lockfs(stru
+@@ -2928,7 +3020,13 @@
/* Now we set up the journal barrier. */
jbd2_journal_lock_updates(journal);
/* Journal blocked and flushed, clear needs_recovery flag. */
EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER);
-@@ -3026,13 +3124,14 @@ static int ext4_remount(struct super_blo
+@@ -3026,13 +3124,14 @@
ext4_mark_recovery_complete(sb, es);
lock_super(sb);
} else {
err = -EROFS;
goto restore_opts;
}
-@@ -3049,7 +3148,7 @@ static int ext4_remount(struct super_blo
+@@ -3049,7 +3148,7 @@
if (!ext4_group_desc_csum_verify(sbi, g, gdp)) {
printk(KERN_ERR
"EXT4-fs: ext4_remount: "
g, le16_to_cpu(ext4_group_desc_csum(sbi, g, gdp)),
le16_to_cpu(gdp->bg_checksum));
err = -EINVAL;
-@@ -3162,7 +3261,8 @@ static int ext4_statfs(struct dentry *de
+@@ -3162,7 +3261,8 @@
buf->f_type = EXT4_SUPER_MAGIC;
buf->f_bsize = sb->s_blocksize;
buf->f_blocks = ext4_blocks_count(es) - sbi->s_overhead_last;
ext4_free_blocks_count_set(es, buf->f_bfree);
buf->f_bavail = buf->f_bfree - ext4_r_blocks_count(es);
if (buf->f_bfree < ext4_r_blocks_count(es))
-@@ -3367,8 +3467,12 @@ static int ext4_quota_on(struct super_bl
+@@ -3367,8 +3467,12 @@
* otherwise be livelocked...
*/
jbd2_journal_lock_updates(EXT4_SB(sb)->s_journal);
}
err = vfs_quota_on_path(sb, type, format_id, &nd.path);
-@@ -3432,7 +3536,7 @@ static ssize_t ext4_quota_write(struct s
+@@ -3432,7 +3536,7 @@
handle_t *handle = journal_current_handle();
if (!handle) {
" cancelled because transaction is not started.\n",
(unsigned long long)off, (unsigned long long)len);
return -EIO;
-@@ -3493,18 +3597,73 @@ static int ext4_get_sb(struct file_syste
+@@ -3493,18 +3597,73 @@
return get_sb_bdev(fs_type, flags, dev_name, data, ext4_fill_super, mnt);
}
+-static struct file_system_type ext4dev_fs_type = {
+#ifdef CONFIG_PROC_FS
+static int ext4_ui_proc_show(struct seq_file *m, void *v)
+{
+}
+
+const struct file_operations ext4_ui_proc_fops = {
-+ .owner = THIS_MODULE,
+ .owner = THIS_MODULE,
+- .name = "ext4dev",
+ .open = ext4_ui_proc_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+static struct file_system_type ext4_fs_type = {
+ .owner = THIS_MODULE,
+ .name = "ext4",
-+ .get_sb = ext4_get_sb,
-+ .kill_sb = kill_block_super,
-+ .fs_flags = FS_REQUIRES_DEV,
-+};
-+
+ .get_sb = ext4_get_sb,
+ .kill_sb = kill_block_super,
+ .fs_flags = FS_REQUIRES_DEV,
+ };
+
+static int ext4dev_get_sb(struct file_system_type *fs_type,
+ int flags, const char *dev_name, void *data, struct vfsmount *mnt)
+{
+ return get_sb_bdev(fs_type, flags, dev_name, data, ext4_fill_super, mnt);
+}
+
- static struct file_system_type ext4dev_fs_type = {
- .owner = THIS_MODULE,
- .name = "ext4dev",
-- .get_sb = ext4_get_sb,
++static struct file_system_type ext4dev_fs_type = {
++ .owner = THIS_MODULE,
++ .name = "ext4dev",
+ .get_sb = ext4dev_get_sb,
- .kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
- };
++ .kill_sb = kill_block_super,
++ .fs_flags = FS_REQUIRES_DEV,
++};
+MODULE_ALIAS("ext4dev");
-
++
static int __init init_ext4_fs(void)
{
int err;
err = init_ext4_mballoc();
if (err)
return err;
-@@ -3515,9 +3674,14 @@ static int __init init_ext4_fs(void)
+@@ -3515,9 +3674,14 @@
err = init_inodecache();
if (err)
goto out1;
return 0;
out:
destroy_inodecache();
-@@ -3530,10 +3694,12 @@ out2:
+@@ -3530,10 +3694,12 @@
static void __exit exit_ext4_fs(void)
{
}
MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
-diff -purN linux-2.6.27/fs/ext4/symlink.c linux-2.6.27.19-5.1/fs/ext4/symlink.c
---- linux-2.6.27/fs/ext4/symlink.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/symlink.c 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/symlink.c
+--- a/fs/ext4/symlink.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/symlink.c Wed May 06 16:56:49 2009 +0100
@@ -23,10 +23,10 @@
#include "ext4.h"
#include "xattr.h"
return NULL;
}
-@@ -34,7 +34,7 @@ const struct inode_operations ext4_symli
+@@ -34,7 +34,7 @@
.readlink = generic_readlink,
.follow_link = page_follow_link_light,
.put_link = page_put_link,
.setxattr = generic_setxattr,
.getxattr = generic_getxattr,
.listxattr = ext4_listxattr,
-@@ -45,7 +45,7 @@ const struct inode_operations ext4_symli
+@@ -45,7 +45,7 @@
const struct inode_operations ext4_fast_symlink_inode_operations = {
.readlink = generic_readlink,
.follow_link = ext4_follow_link,
.setxattr = generic_setxattr,
.getxattr = generic_getxattr,
.listxattr = ext4_listxattr,
-diff -purN linux-2.6.27/fs/ext4/xattr.c linux-2.6.27.19-5.1/fs/ext4/xattr.c
---- linux-2.6.27/fs/ext4/xattr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/xattr.c 2009-03-25 16:11:36.000000000 +0000
-@@ -99,12 +99,12 @@ static struct mb_cache *ext4_xattr_cache
+diff -r 9608d5473017 fs/ext4/xattr.c
+--- a/fs/ext4/xattr.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/xattr.c Wed May 06 16:56:49 2009 +0100
+@@ -99,12 +99,12 @@
static struct xattr_handler *ext4_xattr_handler_map[] = {
[EXT4_XATTR_INDEX_USER] = &ext4_xattr_user_handler,
[EXT4_XATTR_INDEX_SECURITY] = &ext4_xattr_security_handler,
#endif
};
-@@ -112,11 +112,11 @@ static struct xattr_handler *ext4_xattr_
+@@ -112,11 +112,11 @@
struct xattr_handler *ext4_xattr_handlers[] = {
&ext4_xattr_user_handler,
&ext4_xattr_trusted_handler,
&ext4_xattr_security_handler,
#endif
NULL
-@@ -810,8 +810,8 @@ inserted:
+@@ -810,8 +810,8 @@
/* We need to allocate a new block */
ext4_fsblk_t goal = ext4_group_first_block_no(sb,
EXT4_I(inode)->i_block_group);
if (error)
goto cleanup;
ea_idebug(inode, "creating block %d", block);
-@@ -959,6 +959,7 @@ ext4_xattr_set_handle(handle_t *handle,
+@@ -959,6 +959,7 @@
struct ext4_xattr_block_find bs = {
.s = { .not_found = -ENODATA, },
};
int error;
if (!name)
-@@ -966,6 +967,9 @@ ext4_xattr_set_handle(handle_t *handle,
+@@ -966,6 +967,9 @@
if (strlen(name) > 255)
return -ERANGE;
down_write(&EXT4_I(inode)->xattr_sem);
error = ext4_get_inode_loc(inode, &is.iloc);
if (error)
goto cleanup;
-@@ -1042,6 +1046,8 @@ ext4_xattr_set_handle(handle_t *handle,
+@@ -1042,6 +1046,8 @@
cleanup:
brelse(is.iloc.bh);
brelse(bs.bh);
up_write(&EXT4_I(inode)->xattr_sem);
return error;
}
-diff -purN linux-2.6.27/fs/ext4/xattr.h linux-2.6.27.19-5.1/fs/ext4/xattr.h
---- linux-2.6.27/fs/ext4/xattr.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/xattr.h 2009-03-25 16:11:36.000000000 +0000
-@@ -51,8 +51,8 @@ struct ext4_xattr_entry {
+diff -r 9608d5473017 fs/ext4/xattr.h
+--- a/fs/ext4/xattr.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/xattr.h Wed May 06 16:56:49 2009 +0100
+@@ -51,8 +51,8 @@
(((name_len) + EXT4_XATTR_ROUND + \
sizeof(struct ext4_xattr_entry)) & ~EXT4_XATTR_ROUND)
#define EXT4_XATTR_NEXT(entry) \
#define EXT4_XATTR_SIZE(size) \
(((size) + EXT4_XATTR_ROUND) & ~EXT4_XATTR_ROUND)
-@@ -63,7 +63,7 @@ struct ext4_xattr_entry {
+@@ -63,7 +63,7 @@
EXT4_I(inode)->i_extra_isize))
#define IFIRST(hdr) ((struct ext4_xattr_entry *)((hdr)+1))
extern struct xattr_handler ext4_xattr_user_handler;
extern struct xattr_handler ext4_xattr_trusted_handler;
-@@ -88,7 +88,7 @@ extern void exit_ext4_xattr(void);
+@@ -88,7 +88,7 @@
extern struct xattr_handler *ext4_xattr_handlers[];
static inline int
ext4_xattr_get(struct inode *inode, int name_index, const char *name,
-@@ -141,9 +141,9 @@ ext4_expand_extra_isize_ea(struct inode
+@@ -141,9 +141,9 @@
#define ext4_xattr_handlers NULL
extern int ext4_init_security(handle_t *handle, struct inode *inode,
struct inode *dir);
#else
-diff -purN linux-2.6.27/fs/fat/fatent.c linux-2.6.27.19-5.1/fs/fat/fatent.c
---- linux-2.6.27/fs/fat/fatent.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fat/fatent.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/fat/fatent.c
+--- a/fs/fat/fatent.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/fat/fatent.c Wed May 06 16:56:49 2009 +0100
@@ -6,6 +6,7 @@
#include <linux/module.h>
#include <linux/fs.h>
struct fatent_operations {
void (*ent_blocknr)(struct super_block *, int, int *, sector_t *);
-@@ -535,6 +536,7 @@ int fat_free_clusters(struct inode *inod
+@@ -535,6 +536,7 @@
struct fat_entry fatent;
struct buffer_head *bhs[MAX_BUF_PER_PAGE];
int i, err, nr_bhs;
nr_bhs = 0;
fatent_init(&fatent);
-@@ -551,6 +553,18 @@ int fat_free_clusters(struct inode *inod
+@@ -549,6 +551,18 @@
+ __func__);
+ err = -EIO;
goto error;
- }
-
++ }
++
+ /*
+ * Issue discard for the sectors we no longer care about,
+ * batching contiguous clusters into one request
+ sb_issue_discard(sb, fat_clus_to_blknr(sbi, first_cl),
+ nr_clus * sbi->sec_per_clus);
+ first_cl = cluster;
-+ }
-+
+ }
+
ops->ent_put(&fatent, FAT_ENT_FREE);
- if (sbi->free_clusters != -1) {
- sbi->free_clusters++;
-diff -purN linux-2.6.27/fs/fat/file.c linux-2.6.27.19-5.1/fs/fat/file.c
---- linux-2.6.27/fs/fat/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fat/file.c 2009-03-25 16:11:37.000000000 +0000
-@@ -98,7 +98,7 @@ int fat_generic_ioctl(struct inode *inod
+diff -r 9608d5473017 fs/fat/file.c
+--- a/fs/fat/file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/fat/file.c Wed May 06 16:56:49 2009 +0100
+@@ -98,7 +98,7 @@
* out the RO attribute for checking by the security
* module, just because it maps to a file mode.
*/
if (err)
goto up;
-diff -purN linux-2.6.27/fs/fcntl.c linux-2.6.27.19-5.1/fs/fcntl.c
---- linux-2.6.27/fs/fcntl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fcntl.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/fcntl.c
+--- a/fs/fcntl.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/fcntl.c Wed May 06 16:56:49 2009 +0100
@@ -19,6 +19,7 @@
#include <linux/signal.h>
#include <linux/rcupdate.h>
#include <asm/poll.h>
#include <asm/siginfo.h>
-@@ -49,7 +50,7 @@ static int get_close_on_exec(unsigned in
+@@ -49,7 +50,7 @@
return res;
}
{
int err = -EBADF;
struct file * file, *tofree;
-@@ -112,7 +113,7 @@ out_unlock:
+@@ -112,7 +113,7 @@
return err;
}
{
if (unlikely(newfd == oldfd)) { /* corner case */
struct files_struct *files = current->files;
-@@ -125,7 +126,7 @@ asmlinkage long sys_dup2(unsigned int ol
+@@ -125,7 +126,7 @@
return sys_dup3(oldfd, newfd, 0);
}
{
int ret = -EBADF;
struct file *file = fget(fildes);
-@@ -175,6 +176,11 @@ static int setfl(int fd, struct file * f
+@@ -175,6 +176,11 @@
if (error)
return error;
if ((arg ^ filp->f_flags) & FASYNC) {
if (filp->f_op && filp->f_op->fasync) {
error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0);
-@@ -185,6 +191,7 @@ static int setfl(int fd, struct file * f
+@@ -185,6 +191,7 @@
filp->f_flags = (arg & SETFL_MASK) | (filp->f_flags & ~SETFL_MASK);
out:
return error;
}
-@@ -327,7 +334,7 @@ static long do_fcntl(int fd, unsigned in
+@@ -327,7 +334,7 @@
return err;
}
{
struct file *filp;
long err = -EBADF;
-@@ -350,7 +357,8 @@ out:
+@@ -350,7 +357,8 @@
}
#if BITS_PER_LONG == 32
{
struct file * filp;
long err;
-diff -purN linux-2.6.27/fs/file_table.c linux-2.6.27.19-5.1/fs/file_table.c
---- linux-2.6.27/fs/file_table.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/file_table.c 2009-03-25 16:11:35.000000000 +0000
-@@ -210,8 +210,7 @@ int init_file(struct file *file, struct
+diff -r 9608d5473017 fs/file_table.c
+--- a/fs/file_table.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/file_table.c Wed May 06 16:56:49 2009 +0100
+@@ -210,8 +210,7 @@
*/
if ((mode & FMODE_WRITE) && !special_file(dentry->d_inode->i_mode)) {
file_take_write(file);
}
return error;
}
-diff -purN linux-2.6.27/fs/filesystems.c linux-2.6.27.19-5.1/fs/filesystems.c
---- linux-2.6.27/fs/filesystems.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/filesystems.c 2009-03-25 16:11:37.000000000 +0000
-@@ -177,7 +177,7 @@ static int fs_maxindex(void)
+diff -r 9608d5473017 fs/filesystems.c
+--- a/fs/filesystems.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/filesystems.c Wed May 06 16:56:49 2009 +0100
+@@ -177,7 +177,7 @@
/*
* Whee.. Weird sysv syscall.
*/
{
int retval = -EINVAL;
-diff -purN linux-2.6.27/fs/fs-writeback.c linux-2.6.27.19-5.1/fs/fs-writeback.c
---- linux-2.6.27/fs/fs-writeback.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fs-writeback.c 2009-03-25 16:11:35.000000000 +0000
-@@ -421,9 +421,6 @@ __writeback_single_inode(struct inode *i
+diff -r 9608d5473017 fs/fs-writeback.c
+--- a/fs/fs-writeback.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/fs-writeback.c Wed May 06 16:56:49 2009 +0100
+@@ -421,9 +421,6 @@
* If we're a pdlfush thread, then implement pdflush collision avoidance
* against the entire list.
*
* If `bdi' is non-zero then we're being asked to writeback a specific queue.
* This function assumes that the blockdev superblock's inodes are backed by
* a variety of queues, so all inodes are searched. For other superblocks,
-@@ -443,6 +440,7 @@ void generic_sync_sb_inodes(struct super
+@@ -443,6 +440,7 @@
struct writeback_control *wbc)
{
const unsigned long start = jiffies; /* livelock avoidance */
spin_lock(&inode_lock);
if (!wbc->for_kupdate || list_empty(&sb->s_io))
-@@ -499,10 +497,6 @@ void generic_sync_sb_inodes(struct super
+@@ -499,10 +497,6 @@
__iget(inode);
pages_skipped = wbc->pages_skipped;
__writeback_single_inode(inode, wbc);
if (current_is_pdflush())
writeback_release(bdi);
if (wbc->pages_skipped != pages_skipped) {
-@@ -523,7 +517,49 @@ void generic_sync_sb_inodes(struct super
+@@ -523,7 +517,49 @@
if (!list_empty(&sb->s_more_io))
wbc->more_io = 1;
}
return; /* Leave any unwritten inodes on s_io */
}
EXPORT_SYMBOL_GPL(generic_sync_sb_inodes);
-@@ -531,7 +567,10 @@ EXPORT_SYMBOL_GPL(generic_sync_sb_inodes
+@@ -531,7 +567,10 @@
static void sync_sb_inodes(struct super_block *sb,
struct writeback_control *wbc)
{
}
/*
-@@ -588,8 +627,7 @@ restart:
+@@ -588,8 +627,7 @@
/*
* writeback and wait upon the filesystem's dirty inodes. The caller will
*
* A finite limit is set on the number of pages which will be written.
* To prevent infinite livelock of sys_sync().
-@@ -600,30 +638,21 @@ restart:
+@@ -600,30 +638,21 @@
void sync_inodes_sb(struct super_block *sb, int wait)
{
struct writeback_control wbc = {
- (inodes_stat.nr_inodes - inodes_stat.nr_unused) +
- nr_dirty + nr_unstable;
- wbc.nr_to_write += wbc.nr_to_write / 2; /* Bit more for luck */
-- sync_sb_inodes(sb, &wbc);
--}
+ if (!wait) {
+ unsigned long nr_dirty = global_page_state(NR_FILE_DIRTY);
+ unsigned long nr_unstable = global_page_state(NR_UNSTABLE_NFS);
+ (inodes_stat.nr_inodes - inodes_stat.nr_unused);
+ } else
+ wbc.nr_to_write = LONG_MAX; /* doesn't actually matter */
-
++
+ sync_sb_inodes(sb, &wbc);
+-}
+-
-/*
- * Rather lame livelock avoidance.
- */
- list_for_each_entry_reverse(sb, &super_blocks, s_list)
- sb->s_syncing = val;
- spin_unlock(&sb_lock);
-+ sync_sb_inodes(sb, &wbc);
}
/**
-@@ -652,9 +681,6 @@ static void __sync_inodes(int wait)
+@@ -652,9 +681,6 @@
spin_lock(&sb_lock);
restart:
list_for_each_entry(sb, &super_blocks, s_list) {
sb->s_count++;
spin_unlock(&sb_lock);
down_read(&sb->s_umount);
-@@ -672,13 +698,10 @@ restart:
+@@ -672,13 +698,10 @@
void sync_inodes(int wait)
{
}
/**
-diff -purN linux-2.6.27/fs/fuse/dev.c linux-2.6.27.19-5.1/fs/fuse/dev.c
---- linux-2.6.27/fs/fuse/dev.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fuse/dev.c 2009-03-25 16:11:39.000000000 +0000
-@@ -281,7 +281,8 @@ static void request_end(struct fuse_conn
+diff -r 9608d5473017 fs/fuse/dev.c
+--- a/fs/fuse/dev.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/fuse/dev.c Wed May 06 16:56:49 2009 +0100
+@@ -281,7 +281,8 @@
fc->blocked = 0;
wake_up_all(&fc->blocked_waitq);
}
clear_bdi_congested(&fc->bdi, READ);
clear_bdi_congested(&fc->bdi, WRITE);
}
-diff -purN linux-2.6.27/fs/fuse/dir.c linux-2.6.27.19-5.1/fs/fuse/dir.c
---- linux-2.6.27/fs/fuse/dir.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fuse/dir.c 2009-03-25 16:11:39.000000000 +0000
-@@ -1105,21 +1105,22 @@ static int fuse_dir_fsync(struct file *f
+diff -r 9608d5473017 fs/fuse/dir.c
+--- a/fs/fuse/dir.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/fuse/dir.c Wed May 06 16:56:49 2009 +0100
+@@ -1105,21 +1105,22 @@
return file ? fuse_fsync_common(file, de, datasync, 1) : 0;
}
{
unsigned ivalid = iattr->ia_valid;
-@@ -1138,7 +1139,7 @@ static void iattr_to_fattr(struct iattr
+@@ -1138,7 +1139,7 @@
if (!(ivalid & ATTR_ATIME_SET))
arg->valid |= FATTR_ATIME_NOW;
}
arg->valid |= FATTR_MTIME;
arg->mtime = iattr->ia_mtime.tv_sec;
arg->mtimensec = iattr->ia_mtime.tv_nsec;
-@@ -1199,8 +1200,8 @@ void fuse_release_nowrite(struct inode *
+@@ -1199,8 +1200,8 @@
* vmtruncate() doesn't allow for this case, so do the rlimit checking
* and the actual truncation by hand.
*/
{
struct inode *inode = entry->d_inode;
struct fuse_conn *fc = get_fuse_conn(inode);
-@@ -1244,7 +1245,7 @@ static int fuse_do_setattr(struct dentry
+@@ -1244,7 +1245,7 @@
memset(&inarg, 0, sizeof(inarg));
memset(&outarg, 0, sizeof(outarg));
if (file) {
struct fuse_file *ff = file->private_data;
inarg.valid |= FATTR_FH;
-@@ -1314,10 +1315,7 @@ error:
+@@ -1314,10 +1315,7 @@
static int fuse_setattr(struct dentry *entry, struct iattr *attr)
{
}
static int fuse_getattr(struct vfsmount *mnt, struct dentry *entry,
-diff -purN linux-2.6.27/fs/fuse/file.c linux-2.6.27.19-5.1/fs/fuse/file.c
---- linux-2.6.27/fs/fuse/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fuse/file.c 2009-03-25 16:11:39.000000000 +0000
-@@ -54,7 +54,7 @@ struct fuse_file *fuse_file_alloc(void)
+diff -r 9608d5473017 fs/fuse/file.c
+--- a/fs/fuse/file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/fuse/file.c Wed May 06 16:56:49 2009 +0100
+@@ -54,7 +54,7 @@
ff->reserved_req = fuse_request_alloc();
if (!ff->reserved_req) {
kfree(ff);
} else {
INIT_LIST_HEAD(&ff->write_entry);
atomic_set(&ff->count, 0);
-@@ -644,7 +644,7 @@ static int fuse_write_begin(struct file
+@@ -644,7 +644,7 @@
{
pgoff_t index = pos >> PAGE_CACHE_SHIFT;
if (!*pagep)
return -ENOMEM;
return 0;
-@@ -777,7 +777,7 @@ static ssize_t fuse_fill_write_pages(str
+@@ -777,7 +777,7 @@
break;
err = -ENOMEM;
if (!page)
break;
-@@ -1465,6 +1465,11 @@ static loff_t fuse_file_llseek(struct fi
+@@ -1465,6 +1465,11 @@
return retval;
}
static const struct file_operations fuse_file_operations = {
.llseek = fuse_file_llseek,
.read = do_sync_read,
-@@ -1478,6 +1483,7 @@ static const struct file_operations fuse
+@@ -1478,6 +1483,7 @@
.fsync = fuse_fsync,
.lock = fuse_file_lock,
.flock = fuse_file_flock,
.splice_read = generic_file_splice_read,
};
-@@ -1491,6 +1497,7 @@ static const struct file_operations fuse
+@@ -1491,6 +1497,7 @@
.fsync = fuse_fsync,
.lock = fuse_file_lock,
.flock = fuse_file_flock,
/* no mmap and splice_read */
};
-diff -purN linux-2.6.27/fs/fuse/fuse_i.h linux-2.6.27.19-5.1/fs/fuse/fuse_i.h
---- linux-2.6.27/fs/fuse/fuse_i.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fuse/fuse_i.h 2009-03-25 16:11:39.000000000 +0000
-@@ -551,6 +551,10 @@ void fuse_truncate(struct address_space
+diff -r 9608d5473017 fs/fuse/fuse_i.h
+--- a/fs/fuse/fuse_i.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/fuse/fuse_i.h Wed May 06 16:56:49 2009 +0100
+@@ -551,6 +551,10 @@
*/
int fuse_dev_init(void);
/**
* Cleanup the client device
*/
-diff -purN linux-2.6.27/fs/fuse/inode.c linux-2.6.27.19-5.1/fs/fuse/inode.c
---- linux-2.6.27/fs/fuse/inode.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fuse/inode.c 2009-03-25 16:11:39.000000000 +0000
-@@ -292,6 +292,7 @@ static void fuse_put_super(struct super_
+diff -r 9608d5473017 fs/fuse/inode.c
+--- a/fs/fuse/inode.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/fuse/inode.c Wed May 06 16:56:49 2009 +0100
+@@ -292,6 +292,7 @@
list_del(&fc->entry);
fuse_ctl_remove_conn(fc);
mutex_unlock(&fuse_mutex);
fuse_conn_put(fc);
}
-@@ -531,7 +532,6 @@ void fuse_conn_put(struct fuse_conn *fc)
+@@ -531,7 +532,6 @@
if (fc->destroy_req)
fuse_request_free(fc->destroy_req);
mutex_destroy(&fc->inst_mutex);
kfree(fc);
}
}
-@@ -832,12 +832,16 @@ static int fuse_fill_super(struct super_
+@@ -832,12 +832,16 @@
if (!file)
return -EINVAL;
fc->flags = d.flags;
fc->user_id = d.user_id;
-diff -purN linux-2.6.27/fs/gfs2/locking/dlm/mount.c linux-2.6.27.19-5.1/fs/gfs2/locking/dlm/mount.c
---- linux-2.6.27/fs/gfs2/locking/dlm/mount.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/gfs2/locking/dlm/mount.c 2009-03-25 16:11:37.000000000 +0000
-@@ -144,7 +144,8 @@ static int gdlm_mount(char *table_name,
+diff -r 9608d5473017 fs/gfs2/locking/dlm/mount.c
+--- a/fs/gfs2/locking/dlm/mount.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/gfs2/locking/dlm/mount.c Wed May 06 16:56:49 2009 +0100
+@@ -144,7 +144,8 @@
error = dlm_new_lockspace(ls->fsname, strlen(ls->fsname),
&ls->dlm_lockspace,
GDLM_LVB_SIZE);
if (error) {
log_error("dlm_new_lockspace error %d", error);
-diff -purN linux-2.6.27/fs/gfs2/ops_address.c linux-2.6.27.19-5.1/fs/gfs2/ops_address.c
---- linux-2.6.27/fs/gfs2/ops_address.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/gfs2/ops_address.c 2009-03-25 16:11:37.000000000 +0000
-@@ -675,7 +675,7 @@ static int gfs2_write_begin(struct file
+diff -r 9608d5473017 fs/gfs2/ops_address.c
+--- a/fs/gfs2/ops_address.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/gfs2/ops_address.c Wed May 06 16:56:49 2009 +0100
+@@ -675,7 +675,7 @@
goto out_trans_fail;
error = -ENOMEM;
*pagep = page;
if (unlikely(!page))
goto out_endtrans;
-diff -purN linux-2.6.27/fs/hfs/catalog.c linux-2.6.27.19-5.1/fs/hfs/catalog.c
---- linux-2.6.27/fs/hfs/catalog.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/hfs/catalog.c 2009-03-25 16:11:38.000000000 +0000
-@@ -190,6 +190,10 @@ int hfs_cat_find_brec(struct super_block
+diff -r 9608d5473017 fs/hfs/catalog.c
+--- a/fs/hfs/catalog.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/hfs/catalog.c Wed May 06 16:56:49 2009 +0100
+@@ -190,6 +190,10 @@
fd->search_key->cat.ParID = rec.thread.ParID;
len = fd->search_key->cat.CName.len = rec.thread.CName.len;
memcpy(fd->search_key->cat.CName.name, rec.thread.CName.name, len);
return hfs_brec_find(fd);
}
-diff -purN linux-2.6.27/fs/hfsplus/bitmap.c linux-2.6.27.19-5.1/fs/hfsplus/bitmap.c
---- linux-2.6.27/fs/hfsplus/bitmap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/hfsplus/bitmap.c 2009-03-25 16:11:39.000000000 +0000
-@@ -32,6 +32,10 @@ int hfsplus_block_allocate(struct super_
+diff -r 9608d5473017 fs/hfsplus/bitmap.c
+--- a/fs/hfsplus/bitmap.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/hfsplus/bitmap.c Wed May 06 16:56:49 2009 +0100
+@@ -32,6 +32,10 @@
mutex_lock(&HFSPLUS_SB(sb).alloc_file->i_mutex);
mapping = HFSPLUS_SB(sb).alloc_file->i_mapping;
page = read_mapping_page(mapping, offset / PAGE_CACHE_BITS, NULL);
pptr = kmap(page);
curr = pptr + (offset & (PAGE_CACHE_BITS - 1)) / 32;
i = offset % 32;
-@@ -73,6 +77,10 @@ int hfsplus_block_allocate(struct super_
+@@ -73,6 +77,10 @@
break;
page = read_mapping_page(mapping, offset / PAGE_CACHE_BITS,
NULL);
curr = pptr = kmap(page);
if ((size ^ offset) / PAGE_CACHE_BITS)
end = pptr + PAGE_CACHE_BITS / 32;
-@@ -120,6 +128,10 @@ found:
+@@ -120,6 +128,10 @@
offset += PAGE_CACHE_BITS;
page = read_mapping_page(mapping, offset / PAGE_CACHE_BITS,
NULL);
pptr = kmap(page);
curr = pptr;
end = pptr + PAGE_CACHE_BITS / 32;
-diff -purN linux-2.6.27/fs/hfsplus/catalog.c linux-2.6.27.19-5.1/fs/hfsplus/catalog.c
---- linux-2.6.27/fs/hfsplus/catalog.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/hfsplus/catalog.c 2009-03-25 16:11:39.000000000 +0000
-@@ -168,6 +168,11 @@ int hfsplus_find_cat(struct super_block
- return -EIO;
- }
-
-+ if (be16_to_cpu(tmp.thread.nodeName.length) > 255) {
-+ printk(KERN_ERR "hfs: catalog name length corrupted\n");
+diff -r 9608d5473017 fs/hfsplus/catalog.c
+--- a/fs/hfsplus/catalog.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/hfsplus/catalog.c Wed May 06 16:56:49 2009 +0100
+@@ -165,6 +165,11 @@
+ type = be16_to_cpu(tmp.type);
+ if (type != HFSPLUS_FOLDER_THREAD && type != HFSPLUS_FILE_THREAD) {
+ printk(KERN_ERR "hfs: found bad thread record in catalog\n");
+ return -EIO;
+ }
+
- hfsplus_cat_build_key_uni(fd->search_key, be32_to_cpu(tmp.thread.parentID),
- &tmp.thread.nodeName);
- return hfs_brec_find(fd);
-diff -purN linux-2.6.27/fs/hostfs/hostfs_kern.c linux-2.6.27.19-5.1/fs/hostfs/hostfs_kern.c
---- linux-2.6.27/fs/hostfs/hostfs_kern.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/hostfs/hostfs_kern.c 2009-03-25 16:11:35.000000000 +0000
-@@ -500,7 +500,7 @@ int hostfs_write_begin(struct file *file
++ if (be16_to_cpu(tmp.thread.nodeName.length) > 255) {
++ printk(KERN_ERR "hfs: catalog name length corrupted\n");
+ return -EIO;
+ }
+
+diff -r 9608d5473017 fs/hostfs/hostfs_kern.c
+--- a/fs/hostfs/hostfs_kern.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/hostfs/hostfs_kern.c Wed May 06 16:56:49 2009 +0100
+@@ -500,7 +500,7 @@
{
pgoff_t index = pos >> PAGE_CACHE_SHIFT;
if (!*pagep)
return -ENOMEM;
return 0;
-diff -purN linux-2.6.27/fs/hpfs/namei.c linux-2.6.27.19-5.1/fs/hpfs/namei.c
---- linux-2.6.27/fs/hpfs/namei.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/hpfs/namei.c 2009-03-25 16:11:39.000000000 +0000
-@@ -426,7 +426,7 @@ again:
+diff -r 9608d5473017 fs/hpfs/namei.c
+--- a/fs/hpfs/namei.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/hpfs/namei.c Wed May 06 16:56:50 2009 +0100
+@@ -426,7 +426,7 @@
/*printk("HPFS: truncating file before delete.\n");*/
newattrs.ia_size = 0;
newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
put_write_access(inode);
if (!err)
goto again;
-diff -purN linux-2.6.27/fs/inode.c linux-2.6.27.19-5.1/fs/inode.c
---- linux-2.6.27/fs/inode.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/inode.c 2009-03-25 16:11:36.000000000 +0000
-@@ -1249,7 +1249,7 @@ void file_update_time(struct file *file)
+diff -r 9608d5473017 fs/inode.c
+--- a/fs/inode.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/inode.c Wed May 06 16:56:50 2009 +0100
+@@ -1249,7 +1249,7 @@
if (IS_NOCMTIME(inode))
return;
if (err)
return;
-diff -purN linux-2.6.27/fs/inotify.c linux-2.6.27.19-5.1/fs/inotify.c
---- linux-2.6.27/fs/inotify.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/inotify.c 2009-03-25 16:11:37.000000000 +0000
-@@ -106,6 +106,20 @@ void get_inotify_watch(struct inotify_wa
+diff -r 9608d5473017 fs/inotify.c
+--- a/fs/inotify.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/inotify.c Wed May 06 16:56:50 2009 +0100
+@@ -106,6 +106,20 @@
}
EXPORT_SYMBOL_GPL(get_inotify_watch);
/**
* put_inotify_watch - decrements the ref count on a given watch. cleans up
* watch references if the count reaches zero. inotify_watch is freed by
-@@ -124,6 +138,13 @@ void put_inotify_watch(struct inotify_wa
+@@ -123,6 +137,13 @@
+ }
}
EXPORT_SYMBOL_GPL(put_inotify_watch);
-
++
+void unpin_inotify_watch(struct inotify_watch *watch)
+{
+ struct super_block *sb = watch->inode->i_sb;
+ put_inotify_watch(watch);
+ deactivate_super(sb);
+}
-+
+
/*
* inotify_handle_get_wd - returns the next WD for use by the given handle
- *
-@@ -479,6 +500,112 @@ void inotify_init_watch(struct inotify_w
+@@ -479,6 +500,112 @@
}
EXPORT_SYMBOL_GPL(inotify_init_watch);
/**
* inotify_destroy - clean up and destroy an inotify instance
* @ih: inotify handle
-@@ -490,11 +617,15 @@ void inotify_destroy(struct inotify_hand
+@@ -490,11 +617,15 @@
* pretty. We cannot do a simple iteration over the list, because we
* do not know the inode until we iterate to the watch. But we need to
* hold inode->inotify_mutex before ih->mutex. The following works.
mutex_lock(&ih->mutex);
watches = &ih->watches;
-@@ -503,8 +634,10 @@ void inotify_destroy(struct inotify_hand
+@@ -503,8 +634,10 @@
break;
}
watch = list_first_entry(watches, struct inotify_watch, h_list);
inode = watch->inode;
mutex_lock(&inode->inotify_mutex);
-@@ -518,7 +651,7 @@ void inotify_destroy(struct inotify_hand
+@@ -518,7 +651,7 @@
mutex_unlock(&ih->mutex);
mutex_unlock(&inode->inotify_mutex);
}
/* free this handle: the put matching the get in inotify_init() */
-@@ -719,7 +852,9 @@ void inotify_evict_watch(struct inotify_
+@@ -719,7 +852,9 @@
int inotify_rm_wd(struct inotify_handle *ih, u32 wd)
{
struct inotify_watch *watch;
mutex_lock(&ih->mutex);
watch = idr_find(&ih->idr, wd);
-@@ -727,9 +862,12 @@ int inotify_rm_wd(struct inotify_handle
+@@ -727,9 +862,12 @@
mutex_unlock(&ih->mutex);
return -EINVAL;
}
mutex_lock(&inode->inotify_mutex);
mutex_lock(&ih->mutex);
-@@ -740,7 +878,7 @@ int inotify_rm_wd(struct inotify_handle
+@@ -740,7 +878,7 @@
mutex_unlock(&ih->mutex);
mutex_unlock(&inode->inotify_mutex);
return 0;
}
-diff -purN linux-2.6.27/fs/inotify_user.c linux-2.6.27.19-5.1/fs/inotify_user.c
---- linux-2.6.27/fs/inotify_user.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/inotify_user.c 2009-03-25 16:11:38.000000000 +0000
-@@ -372,7 +372,7 @@ static int find_inode(const char __user
+diff -r 9608d5473017 fs/inotify_user.c
+--- a/fs/inotify_user.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/inotify_user.c Wed May 06 16:56:50 2009 +0100
+@@ -372,7 +372,7 @@
if (error)
return error;
/* you can only watch an inode if you have read permissions on it */
if (error)
path_put(path);
return error;
-@@ -427,10 +427,61 @@ static unsigned int inotify_poll(struct
+@@ -427,10 +427,61 @@
return ret;
}
struct inotify_device *dev;
char __user *start;
int ret;
-@@ -440,81 +491,43 @@ static ssize_t inotify_read(struct file
+@@ -440,81 +491,43 @@
dev = file->private_data;
while (1) {
- if (file->f_flags & O_NONBLOCK) {
- ret = -EAGAIN;
- break;
-- }
--
-- if (signal_pending(current)) {
-- ret = -EINTR;
-- break;
+ if (kevent) {
+ ret = PTR_ERR(kevent);
+ if (IS_ERR(kevent))
+ continue;
}
-- schedule();
-- }
--
-- finish_wait(&dev->wq, &wait);
+- if (signal_pending(current)) {
+- ret = -EINTR;
++ ret = -EAGAIN;
++ if (file->f_flags & O_NONBLOCK)
+ break;
+- }
++ ret = -EINTR;
++ if (signal_pending(current))
++ break;
++
++ if (start != buf)
++ break;
+
+ schedule();
+ }
+
+ finish_wait(&dev->wq, &wait);
- if (ret)
- return ret;
-
- while (1) {
- struct inotify_kernel_event *kevent;
-
-- ret = buf - start;
++ if (start != buf && ret != -EFAULT)
+ ret = buf - start;
- if (list_empty(&dev->events))
-+ ret = -EAGAIN;
-+ if (file->f_flags & O_NONBLOCK)
- break;
+- break;
-
- kevent = inotify_dev_get_event(dev);
- if (event_size + kevent->event.len > count) {
- */
- ret = -EINVAL;
- }
-+ ret = -EINTR;
-+ if (signal_pending(current))
- break;
+- break;
- }
- remove_kevent(dev, kevent);
-
+-
- /*
- * Must perform the copy_to_user outside the mutex in order
- * to avoid a lock order reversal with mmap_sem.
-
- if (copy_to_user(buf, &kevent->event, event_size)) {
- ret = -EFAULT;
-+ if (start != buf)
- break;
+- break;
- }
- buf += event_size;
- count -= event_size;
- buf += kevent->event.len;
- count -= kevent->event.len;
- }
-
+-
- free_kevent(kevent);
-
- mutex_lock(&dev->ev_mutex);
-+ schedule();
- }
+- }
- mutex_unlock(&dev->ev_mutex);
-
-+ finish_wait(&dev->wq, &wait);
-+ if (start != buf && ret != -EFAULT)
-+ ret = buf - start;
+-
return ret;
}
-@@ -579,7 +592,7 @@ static const struct inotify_operations i
+@@ -579,7 +592,7 @@
.destroy_watch = free_inotify_user_watch,
};
{
struct inotify_device *dev;
struct inotify_handle *ih;
-@@ -658,12 +671,13 @@ out_put_fd:
+@@ -658,12 +671,13 @@
return ret;
}
{
struct inode *inode;
struct inotify_device *dev;
-@@ -707,7 +721,7 @@ fput_and_out:
+@@ -707,7 +721,7 @@
return ret;
}
{
struct file *filp;
struct inotify_device *dev;
-diff -purN linux-2.6.27/fs/ioctl.c linux-2.6.27.19-5.1/fs/ioctl.c
---- linux-2.6.27/fs/ioctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ioctl.c 2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/ioctl.c
+--- a/fs/ioctl.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ioctl.c Wed May 06 16:56:50 2009 +0100
@@ -13,6 +13,7 @@
#include <linux/security.h>
#include <linux/module.h>
#include <asm/ioctls.h>
-@@ -123,11 +124,9 @@ static int ioctl_fioasync(unsigned int f
+@@ -123,11 +124,9 @@
/* Did FASYNC state change ? */
if ((flag ^ filp->f_flags) & FASYNC) {
error = -ENOTTY;
}
if (error)
-@@ -163,11 +162,17 @@ int do_vfs_ioctl(struct file *filp, unsi
+@@ -163,11 +162,17 @@
break;
case FIONBIO:
break;
case FIOQSIZE:
-@@ -191,7 +196,7 @@ int do_vfs_ioctl(struct file *filp, unsi
+@@ -191,7 +196,7 @@
return error;
}
{
struct file *filp;
int error = -EBADF;
-@@ -201,6 +206,8 @@ asmlinkage long sys_ioctl(unsigned int f
+@@ -200,6 +205,8 @@
+ filp = fget_light(fd, &fput_needed);
if (!filp)
goto out;
-
-+ trace_fs_ioctl(fd, cmd, arg);
+
++ trace_fs_ioctl(fd, cmd, arg);
+
error = security_file_ioctl(filp, cmd, arg);
if (error)
- goto out_fput;
-diff -purN linux-2.6.27/fs/ioprio.c linux-2.6.27.19-5.1/fs/ioprio.c
---- linux-2.6.27/fs/ioprio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ioprio.c 2009-03-25 16:11:38.000000000 +0000
-@@ -65,7 +65,7 @@ static int set_task_ioprio(struct task_s
+diff -r 9608d5473017 fs/ioprio.c
+--- a/fs/ioprio.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ioprio.c Wed May 06 16:56:50 2009 +0100
+@@ -65,7 +65,7 @@
return err;
}
{
int class = IOPRIO_PRIO_CLASS(ioprio);
int data = IOPRIO_PRIO_DATA(ioprio);
-@@ -181,7 +181,7 @@ int ioprio_best(unsigned short aprio, un
+@@ -181,7 +181,7 @@
return aprio;
}
{
struct task_struct *g, *p;
struct user_struct *user;
-@@ -245,4 +245,3 @@ asmlinkage long sys_ioprio_get(int which
+@@ -245,4 +245,3 @@
read_unlock(&tasklist_lock);
return ret;
}
-
-diff -purN linux-2.6.27/fs/jbd/checkpoint.c linux-2.6.27.19-5.1/fs/jbd/checkpoint.c
---- linux-2.6.27/fs/jbd/checkpoint.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jbd/checkpoint.c 2009-03-25 16:11:38.000000000 +0000
-@@ -93,7 +93,8 @@ static int __try_to_free_cp_buf(struct j
+diff -r 9608d5473017 fs/jbd/checkpoint.c
+--- a/fs/jbd/checkpoint.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/jbd/checkpoint.c Wed May 06 16:56:50 2009 +0100
+@@ -93,7 +93,8 @@
int ret = 0;
struct buffer_head *bh = jh2bh(jh);
JBUFFER_TRACE(jh, "remove from checkpoint list");
ret = __journal_remove_checkpoint(jh) + 1;
jbd_unlock_bh_state(bh);
-@@ -160,21 +161,25 @@ static void jbd_sync_bh(journal_t *journ
+@@ -160,21 +161,25 @@
* buffers. Note that we take the buffers in the opposite ordering
* from the one in which they were submitted for IO.
*
while (!released && transaction->t_checkpoint_io_list) {
jh = transaction->t_checkpoint_io_list;
bh = jh2bh(jh);
-@@ -194,6 +199,9 @@ restart:
+@@ -194,6 +199,9 @@
spin_lock(&journal->j_list_lock);
goto restart;
}
/*
* Now in whatever state the buffer currently is, we know that
* it has been written out and so we can drop it from the list
-@@ -203,6 +211,8 @@ restart:
+@@ -203,6 +211,8 @@
journal_remove_journal_head(bh);
__brelse(bh);
}
}
#define NR_BATCH 64
-@@ -226,7 +236,8 @@ __flush_batch(journal_t *journal, struct
+@@ -226,7 +236,8 @@
* Try to flush one buffer from the checkpoint list to disk.
*
* Return 1 if something happened which requires us to abort the current
*
* Called with j_list_lock held and drops it if 1 is returned
* Called under jbd_lock_bh_state(jh2bh(jh)), and drops it
-@@ -256,6 +267,9 @@ static int __process_buffer(journal_t *j
+@@ -256,6 +267,9 @@
log_wait_commit(journal, tid);
ret = 1;
} else if (!buffer_dirty(bh)) {
J_ASSERT_JH(jh, !buffer_jbddirty(bh));
BUFFER_TRACE(bh, "remove from checkpoint");
__journal_remove_checkpoint(jh);
-@@ -263,7 +277,6 @@ static int __process_buffer(journal_t *j
+@@ -263,7 +277,6 @@
jbd_unlock_bh_state(bh);
journal_remove_journal_head(bh);
__brelse(bh);
} else {
/*
* Important: we are about to write the buffer, and
-@@ -295,6 +308,7 @@ static int __process_buffer(journal_t *j
+@@ -295,6 +308,7 @@
* to disk. We submit larger chunks of data at once.
*
* The journal should be locked before calling this function.
*/
int log_do_checkpoint(journal_t *journal)
{
-@@ -318,6 +332,7 @@ int log_do_checkpoint(journal_t *journal
+@@ -318,6 +332,7 @@
* OK, we need to start writing disk blocks. Take one transaction
* and write it.
*/
spin_lock(&journal->j_list_lock);
if (!journal->j_checkpoint_transactions)
goto out;
-@@ -334,7 +349,7 @@ restart:
+@@ -334,7 +349,7 @@
int batch_count = 0;
struct buffer_head *bhs[NR_BATCH];
struct journal_head *jh;
while (!retry && transaction->t_checkpoint_list) {
struct buffer_head *bh;
-@@ -347,6 +362,8 @@ restart:
+@@ -347,6 +362,8 @@
break;
}
retry = __process_buffer(journal, jh, bhs,&batch_count);
if (!retry && (need_resched() ||
spin_needbreak(&journal->j_list_lock))) {
spin_unlock(&journal->j_list_lock);
-@@ -371,14 +388,18 @@ restart:
+@@ -371,14 +388,18 @@
* Now we have cleaned up the first transaction's checkpoint
* list. Let's clean up the second one
*/
}
/*
-@@ -394,8 +415,9 @@ out:
+@@ -394,8 +415,9 @@
* This is the only part of the journaling code which really needs to be
* aware of transaction aborts. Checkpointing involves writing to the
* main filesystem area rather than to the journal, so it can proceed
*/
int cleanup_journal_tail(journal_t *journal)
-@@ -404,6 +426,9 @@ int cleanup_journal_tail(journal_t *jour
+@@ -403,6 +425,9 @@
+ transaction_t * transaction;
tid_t first_tid;
unsigned long blocknr, freed;
-
++
+ if (is_journal_aborted(journal))
+ return 1;
-+
+
/* OK, work out the oldest transaction remaining in the log, and
* the log block it starts at.
- *
-diff -purN linux-2.6.27/fs/jbd/journal.c linux-2.6.27.19-5.1/fs/jbd/journal.c
---- linux-2.6.27/fs/jbd/journal.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jbd/journal.c 2009-03-25 16:11:38.000000000 +0000
-@@ -1121,9 +1121,12 @@ recovery_error:
+diff -r 9608d5473017 fs/jbd/journal.c
+--- a/fs/jbd/journal.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/jbd/journal.c Wed May 06 16:56:50 2009 +0100
+@@ -1121,9 +1121,12 @@
*
* Release a journal_t structure once it is no longer in use by the
* journaled object.
/* Wait for the commit thread to wake up and die. */
journal_kill_thread(journal);
-@@ -1146,11 +1149,16 @@ void journal_destroy(journal_t *journal)
+@@ -1146,11 +1149,16 @@
J_ASSERT(journal->j_checkpoint_transactions == NULL);
spin_unlock(&journal->j_list_lock);
brelse(journal->j_sb_buffer);
}
-@@ -1160,6 +1168,8 @@ void journal_destroy(journal_t *journal)
+@@ -1160,6 +1168,8 @@
journal_destroy_revoke(journal);
kfree(journal->j_wbuf);
kfree(journal);
}
-@@ -1359,10 +1369,16 @@ int journal_flush(journal_t *journal)
+@@ -1359,10 +1369,16 @@
spin_lock(&journal->j_list_lock);
while (!err && journal->j_checkpoint_transactions != NULL) {
spin_unlock(&journal->j_list_lock);
cleanup_journal_tail(journal);
/* Finally, mark the journal as really needing no recovery.
-@@ -1384,7 +1400,7 @@ int journal_flush(journal_t *journal)
+@@ -1384,7 +1400,7 @@
J_ASSERT(journal->j_head == journal->j_tail);
J_ASSERT(journal->j_tail_sequence == journal->j_transaction_sequence);
spin_unlock(&journal->j_state_lock);
}
/**
-diff -purN linux-2.6.27/fs/jbd/recovery.c linux-2.6.27.19-5.1/fs/jbd/recovery.c
---- linux-2.6.27/fs/jbd/recovery.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jbd/recovery.c 2009-03-25 16:11:38.000000000 +0000
-@@ -223,7 +223,7 @@ do { \
+diff -r 9608d5473017 fs/jbd/recovery.c
+--- a/fs/jbd/recovery.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/jbd/recovery.c Wed May 06 16:56:50 2009 +0100
+@@ -223,7 +223,7 @@
*/
int journal_recover(journal_t *journal)
{
journal_superblock_t * sb;
struct recovery_info info;
-@@ -261,7 +261,10 @@ int journal_recover(journal_t *journal)
+@@ -261,7 +261,10 @@
journal->j_transaction_sequence = ++info.end_transaction;
journal_clear_revoke(journal);
return err;
}
-diff -purN linux-2.6.27/fs/jbd/transaction.c linux-2.6.27.19-5.1/fs/jbd/transaction.c
---- linux-2.6.27/fs/jbd/transaction.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jbd/transaction.c 2009-03-25 16:11:38.000000000 +0000
-@@ -954,9 +954,10 @@ int journal_dirty_data(handle_t *handle,
+diff -r 9608d5473017 fs/jbd/transaction.c
+--- a/fs/jbd/transaction.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/jbd/transaction.c Wed May 06 16:56:50 2009 +0100
+@@ -954,9 +954,10 @@
journal_t *journal = handle->h_transaction->t_journal;
int need_brelse = 0;
struct journal_head *jh;
jh = journal_add_journal_head(bh);
JBUFFER_TRACE(jh, "entry");
-@@ -1067,7 +1068,16 @@ int journal_dirty_data(handle_t *handle,
+@@ -1067,7 +1068,16 @@
time if it is redirtied */
}
if (jh->b_transaction != NULL) {
JBUFFER_TRACE(jh, "unfile from commit");
__journal_temp_unlink_buffer(jh);
-@@ -1108,7 +1118,7 @@ no_journal:
+@@ -1108,7 +1118,7 @@
}
JBUFFER_TRACE(jh, "exit");
journal_put_journal_head(jh);
}
/**
-diff -purN linux-2.6.27/fs/jbd2/checkpoint.c linux-2.6.27.19-5.1/fs/jbd2/checkpoint.c
---- linux-2.6.27/fs/jbd2/checkpoint.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jbd2/checkpoint.c 2009-03-25 16:11:32.000000000 +0000
-@@ -114,7 +114,7 @@ static int __try_to_free_cp_buf(struct j
+diff -r 9608d5473017 fs/jbd2/checkpoint.c
+--- a/fs/jbd2/checkpoint.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/jbd2/checkpoint.c Wed May 06 16:56:50 2009 +0100
+@@ -114,7 +114,7 @@
*/
void __jbd2_log_wait_for_space(journal_t *journal)
{
assert_spin_locked(&journal->j_state_lock);
nblocks = jbd_space_needed(journal);
-@@ -126,14 +126,47 @@ void __jbd2_log_wait_for_space(journal_t
+@@ -126,14 +126,47 @@
/*
* Test again, another process may have checkpointed while we
}
mutex_unlock(&journal->j_checkpoint_mutex);
}
-diff -purN linux-2.6.27/fs/jbd2/commit.c linux-2.6.27.19-5.1/fs/jbd2/commit.c
---- linux-2.6.27/fs/jbd2/commit.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jbd2/commit.c 2009-03-25 16:11:32.000000000 +0000
-@@ -126,8 +126,7 @@ static int journal_submit_commit_record(
+diff -r 9608d5473017 fs/jbd2/commit.c
+--- a/fs/jbd2/commit.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/jbd2/commit.c Wed May 06 16:56:50 2009 +0100
+@@ -126,8 +126,7 @@
JBUFFER_TRACE(descriptor, "submit commit block");
lock_buffer(bh);
set_buffer_uptodate(bh);
bh->b_end_io = journal_end_buffer_io_sync;
-@@ -160,7 +159,7 @@ static int journal_submit_commit_record(
+@@ -160,7 +159,7 @@
/* And try again, without the barrier */
lock_buffer(bh);
set_buffer_uptodate(bh);
ret = submit_bh(WRITE, bh);
}
*cbh = bh;
-diff -purN linux-2.6.27/fs/jbd2/journal.c linux-2.6.27.19-5.1/fs/jbd2/journal.c
---- linux-2.6.27/fs/jbd2/journal.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jbd2/journal.c 2009-03-25 16:11:32.000000000 +0000
-@@ -901,10 +901,7 @@ static struct proc_dir_entry *proc_jbd2_
+diff -r 9608d5473017 fs/jbd2/journal.c
+--- a/fs/jbd2/journal.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/jbd2/journal.c Wed May 06 16:56:50 2009 +0100
+@@ -901,10 +901,7 @@
static void jbd2_stats_proc_init(journal_t *journal)
{
if (journal->j_proc_entry) {
proc_create_data("history", S_IRUGO, journal->j_proc_entry,
&jbd2_seq_history_fops, journal);
-@@ -915,12 +912,9 @@ static void jbd2_stats_proc_init(journal
+@@ -915,12 +912,9 @@
static void jbd2_stats_proc_exit(journal_t *journal)
{
}
static void journal_init_stats(journal_t *journal)
-@@ -1018,6 +1012,7 @@ journal_t * jbd2_journal_init_dev(struct
+@@ -1018,6 +1012,7 @@
{
journal_t *journal = journal_init_common();
struct buffer_head *bh;
int n;
if (!journal)
-@@ -1039,6 +1034,10 @@ journal_t * jbd2_journal_init_dev(struct
+@@ -1039,6 +1034,10 @@
journal->j_fs_dev = fs_dev;
journal->j_blk_offset = start;
journal->j_maxlen = len;
jbd2_stats_proc_init(journal);
bh = __getblk(journal->j_dev, start, journal->j_blocksize);
-@@ -1061,6 +1060,7 @@ journal_t * jbd2_journal_init_inode (str
+@@ -1061,6 +1060,7 @@
{
struct buffer_head *bh;
journal_t *journal = journal_init_common();
int err;
int n;
unsigned long long blocknr;
-@@ -1070,6 +1070,12 @@ journal_t * jbd2_journal_init_inode (str
+@@ -1070,6 +1070,12 @@
journal->j_dev = journal->j_fs_dev = inode->i_sb->s_bdev;
journal->j_inode = inode;
jbd_debug(1,
"journal %p: inode %s/%ld, size %Ld, bits %d, blksize %ld\n",
journal, inode->i_sb->s_id, inode->i_ino,
-@@ -1253,6 +1259,22 @@ void jbd2_journal_update_superblock(jour
+@@ -1253,6 +1259,22 @@
goto out;
}
spin_lock(&journal->j_state_lock);
jbd_debug(1,"JBD: updating superblock (start %ld, seq %d, errno %d)\n",
journal->j_tail, journal->j_tail_sequence, journal->j_errno);
-@@ -1264,9 +1286,16 @@ void jbd2_journal_update_superblock(jour
+@@ -1264,9 +1286,16 @@
BUFFER_TRACE(bh, "marking dirty");
mark_buffer_dirty(bh);
ll_rw_block(SWRITE, 1, &bh);
out:
-diff -purN linux-2.6.27/fs/jffs2/background.c linux-2.6.27.19-5.1/fs/jffs2/background.c
---- linux-2.6.27/fs/jffs2/background.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jffs2/background.c 2009-03-25 16:11:35.000000000 +0000
-@@ -85,15 +85,15 @@ static int jffs2_garbage_collect_thread(
+diff -r 9608d5473017 fs/jffs2/background.c
+--- a/fs/jffs2/background.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/jffs2/background.c Wed May 06 16:56:50 2009 +0100
+@@ -85,15 +85,15 @@
for (;;) {
allow_signal(SIGHUP);
again:
/* This thread is purely an optimisation. But if it runs when
other things could be running, it actually makes things a
-diff -purN linux-2.6.27/fs/jffs2/compr_lzo.c linux-2.6.27.19-5.1/fs/jffs2/compr_lzo.c
---- linux-2.6.27/fs/jffs2/compr_lzo.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jffs2/compr_lzo.c 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/jffs2/compr_lzo.c
+--- a/fs/jffs2/compr_lzo.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/jffs2/compr_lzo.c Wed May 06 16:56:50 2009 +0100
@@ -19,7 +19,7 @@
static void *lzo_mem;
static void free_workspace(void)
{
-@@ -49,18 +49,21 @@ static int jffs2_lzo_compress(unsigned c
+@@ -49,18 +49,21 @@
mutex_lock(&deflate_mutex);
ret = lzo1x_1_compress(data_in, *sourcelen, lzo_compress_buf, &compress_size, lzo_mem);
-- mutex_unlock(&deflate_mutex);
--
- if (ret != LZO_E_OK)
-- return -1;
++ if (ret != LZO_E_OK)
++ goto fail;
++
++ if (compress_size > *dstlen)
+ goto fail;
++
++ memcpy(cpage_out, lzo_compress_buf, compress_size);
+ mutex_unlock(&deflate_mutex);
- if (compress_size > *dstlen)
+- if (ret != LZO_E_OK)
- return -1;
-+ goto fail;
++ *dstlen = compress_size;
++ return 0;
- memcpy(cpage_out, lzo_compress_buf, compress_size);
+- if (compress_size > *dstlen)
+- return -1;
+-
+- memcpy(cpage_out, lzo_compress_buf, compress_size);
- *dstlen = compress_size;
-+ mutex_unlock(&deflate_mutex);
-
-+ *dstlen = compress_size;
- return 0;
-+
+-
+- return 0;
+ fail:
+ mutex_unlock(&deflate_mutex);
+ return -1;
}
static int jffs2_lzo_decompress(unsigned char *data_in, unsigned char *cpage_out,
-diff -purN linux-2.6.27/fs/jffs2/file.c linux-2.6.27.19-5.1/fs/jffs2/file.c
---- linux-2.6.27/fs/jffs2/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jffs2/file.c 2009-03-25 16:11:35.000000000 +0000
-@@ -132,7 +132,7 @@ static int jffs2_write_begin(struct file
+diff -r 9608d5473017 fs/jffs2/file.c
+--- a/fs/jffs2/file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/jffs2/file.c Wed May 06 16:56:50 2009 +0100
+@@ -132,7 +132,7 @@
uint32_t pageofs = index << PAGE_CACHE_SHIFT;
int ret = 0;
if (!pg)
return -ENOMEM;
*pagep = pg;
-diff -purN linux-2.6.27/fs/libfs.c linux-2.6.27.19-5.1/fs/libfs.c
---- linux-2.6.27/fs/libfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/libfs.c 2009-03-25 16:11:39.000000000 +0000
-@@ -360,7 +360,7 @@ int simple_write_begin(struct file *file
+diff -r 9608d5473017 fs/libfs.c
+--- a/fs/libfs.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/libfs.c Wed May 06 16:56:50 2009 +0100
+@@ -360,7 +360,7 @@
index = pos >> PAGE_CACHE_SHIFT;
from = pos & (PAGE_CACHE_SIZE - 1);
if (!page)
return -ENOMEM;
-diff -purN linux-2.6.27/fs/lockd/svclock.c linux-2.6.27.19-5.1/fs/lockd/svclock.c
---- linux-2.6.27/fs/lockd/svclock.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/lockd/svclock.c 2009-03-25 16:11:37.000000000 +0000
-@@ -418,7 +418,7 @@ nlmsvc_lock(struct svc_rqst *rqstp, stru
+diff -r 9608d5473017 fs/lockd/svclock.c
+--- a/fs/lockd/svclock.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/lockd/svclock.c Wed May 06 16:56:50 2009 +0100
+@@ -418,7 +418,7 @@
goto out;
case -EAGAIN:
ret = nlm_lck_denied;
case FILE_LOCK_DEFERRED:
if (wait)
break;
-@@ -434,6 +434,10 @@ nlmsvc_lock(struct svc_rqst *rqstp, stru
+@@ -433,6 +433,10 @@
+ ret = nlm_lck_denied_nolocks;
goto out;
}
-
++
+ ret = nlm_lck_denied;
+ if (!wait)
+ goto out;
-+
+
ret = nlm_lck_blocked;
- /* Append to list of blocked */
-diff -purN linux-2.6.27/fs/locks.c linux-2.6.27.19-5.1/fs/locks.c
---- linux-2.6.27/fs/locks.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/locks.c 2009-03-25 16:11:36.000000000 +0000
-@@ -1564,7 +1564,7 @@ EXPORT_SYMBOL(flock_lock_file_wait);
+diff -r 9608d5473017 fs/locks.c
+--- a/fs/locks.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/locks.c Wed May 06 16:56:50 2009 +0100
+@@ -1564,7 +1564,7 @@
* %LOCK_MAND can be combined with %LOCK_READ or %LOCK_WRITE to allow other
* processes read and write access respectively.
*/
{
struct file *filp;
struct file_lock *lock;
-diff -purN linux-2.6.27/fs/minix/dir.c linux-2.6.27.19-5.1/fs/minix/dir.c
---- linux-2.6.27/fs/minix/dir.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/minix/dir.c 2009-03-25 16:11:37.000000000 +0000
-@@ -280,7 +280,7 @@ int minix_add_link(struct dentry *dentry
+diff -r 9608d5473017 fs/minix/dir.c
+--- a/fs/minix/dir.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/minix/dir.c Wed May 06 16:56:50 2009 +0100
+@@ -280,7 +280,7 @@
return -EINVAL;
got_it:
err = __minix_write_begin(NULL, page->mapping, pos, sbi->s_dirsize,
AOP_FLAG_UNINTERRUPTIBLE, &page, NULL);
if (err)
-diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
---- linux-2.6.27/fs/namei.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/namei.c 2009-03-25 16:11:37.000000000 +0000
-@@ -227,9 +227,10 @@ int generic_permission(struct inode *ino
+diff -r 9608d5473017 fs/namei.c
+--- a/fs/namei.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/namei.c Wed May 06 16:56:50 2009 +0100
+@@ -227,9 +227,10 @@
return -EACCES;
}
if (mask & MAY_WRITE) {
umode_t mode = inode->i_mode;
-@@ -248,9 +249,12 @@ int inode_permission(struct inode *inode
+@@ -248,9 +249,12 @@
return -EACCES;
}
if (!retval) {
/*
* Exec permission on a regular file is denied if none
-@@ -269,7 +273,12 @@ int inode_permission(struct inode *inode
+@@ -269,11 +273,25 @@
if (retval)
return retval;
if (retval)
return retval;
-@@ -277,6 +286,15 @@ int inode_permission(struct inode *inode
- mask & (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND));
- }
-
+ return security_inode_permission(inode,
++ mask & (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND));
++}
++
+int path_permission(struct path *path, int mask)
+{
+ int retval = __inode_permission(path->dentry->d_inode, mask);
+ if (retval)
+ return retval;
+ return security_path_permission(path,
-+ mask & (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND));
-+}
-+
- /**
- * vfs_permission - check for access rights to a given path
- * @nd: lookup result that describes the path
-@@ -289,7 +307,7 @@ int inode_permission(struct inode *inode
+ mask & (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND));
+ }
+
+@@ -289,7 +307,7 @@
*/
int vfs_permission(struct nameidata *nd, int mask)
{
}
/**
-@@ -306,7 +324,7 @@ int vfs_permission(struct nameidata *nd,
+@@ -306,7 +324,7 @@
*/
int file_permission(struct file *file, int mask)
{
}
/*
-@@ -392,6 +410,7 @@ void release_open_intent(struct nameidat
+@@ -392,6 +410,7 @@
else
fput(nd->intent.open.file);
}
static inline struct dentry *
do_revalidate(struct dentry *dentry, struct nameidata *nd)
-@@ -447,8 +466,9 @@ static struct dentry * cached_lookup(str
+@@ -447,8 +466,9 @@
* short-cut DAC fails, then call permission() to do more
* complete permission check.
*/
umode_t mode = inode->i_mode;
if (inode->i_op && inode->i_op->permission)
-@@ -473,7 +493,7 @@ static int exec_permission_lite(struct i
+@@ -473,7 +493,7 @@
return -EACCES;
ok:
}
/*
-@@ -870,7 +890,7 @@ static int __link_path_walk(const char *
+@@ -870,7 +890,7 @@
unsigned int c;
nd->flags |= LOOKUP_CONTINUE;
if (err == -EAGAIN)
err = vfs_permission(nd, MAY_EXEC);
if (err)
-@@ -1065,24 +1085,21 @@ static int do_path_lookup(int dfd, const
+@@ -1065,24 +1085,21 @@
path_get(&fs->pwd);
read_unlock(&fs->lock);
} else {
path_get(&file->f_path);
fput_light(file, fput_needed);
-@@ -1245,7 +1262,7 @@ static struct dentry *lookup_hash(struct
+@@ -1245,7 +1262,7 @@
{
int err;
if (err)
return ERR_PTR(err);
return __lookup_hash(&nd->last, nd->path.dentry, nd);
-@@ -1401,13 +1418,24 @@ static int may_delete(struct inode *dir,
+@@ -1401,13 +1418,24 @@
BUG_ON(victim->d_parent->d_inode != dir);
audit_inode_child(victim->d_name.name, victim, dir);
return -EPERM;
if (isdir) {
if (!S_ISDIR(victim->d_inode->i_mode))
-@@ -1431,13 +1459,28 @@ static int may_delete(struct inode *dir,
+@@ -1431,13 +1459,28 @@
* 3. We should have write and exec permissions on dir
* 4. We can't do it if dir is immutable (done in permission())
*/
}
/*
-@@ -1503,7 +1546,7 @@ void unlock_rename(struct dentry *p1, st
+@@ -1503,7 +1546,7 @@
int vfs_create(struct inode *dir, struct dentry *dentry, int mode,
struct nameidata *nd)
{
if (error)
return error;
-@@ -1512,7 +1555,7 @@ int vfs_create(struct inode *dir, struct
+@@ -1512,7 +1555,7 @@
return -EACCES; /* shouldn't it be ENOSYS? */
mode &= S_IALLUGO;
mode |= S_IFREG;
if (error)
return error;
DQUOT_INIT(dir);
-@@ -1588,7 +1631,7 @@ int may_open(struct nameidata *nd, int a
+@@ -1588,7 +1631,7 @@
if (!error) {
DQUOT_INIT(inode);
ATTR_MTIME|ATTR_CTIME|ATTR_OPEN,
NULL);
}
-@@ -1945,9 +1988,10 @@ fail:
+@@ -1945,9 +1988,10 @@
}
EXPORT_SYMBOL_GPL(lookup_create);
if (error)
return error;
-@@ -1962,7 +2006,7 @@ int vfs_mknod(struct inode *dir, struct
+@@ -1962,7 +2006,7 @@
if (error)
return error;
if (error)
return error;
-@@ -1990,8 +2034,8 @@ static int may_mknod(mode_t mode)
+@@ -1990,8 +2034,8 @@
}
}
{
int error;
char *tmp;
-@@ -2023,11 +2067,12 @@ asmlinkage long sys_mknodat(int dfd, con
+@@ -2023,11 +2067,12 @@
error = vfs_create(nd.path.dentry->d_inode,dentry,mode,&nd);
break;
case S_IFCHR: case S_IFBLK:
break;
}
mnt_drop_write(nd.path.mnt);
-@@ -2041,14 +2086,15 @@ out_unlock:
+@@ -2041,14 +2086,15 @@
return error;
}
if (error)
return error;
-@@ -2057,7 +2103,7 @@ int vfs_mkdir(struct inode *dir, struct
+@@ -2057,7 +2103,7 @@
return -EPERM;
mode &= (S_IRWXUGO|S_ISVTX);
if (error)
return error;
-@@ -2068,7 +2114,7 @@ int vfs_mkdir(struct inode *dir, struct
+@@ -2068,7 +2114,7 @@
return error;
}
{
int error = 0;
char * tmp;
-@@ -2089,7 +2135,7 @@ asmlinkage long sys_mkdirat(int dfd, con
+@@ -2089,7 +2135,7 @@
error = mnt_want_write(nd.path.mnt);
if (error)
goto out_dput;
mnt_drop_write(nd.path.mnt);
out_dput:
dput(dentry);
-@@ -2101,7 +2147,7 @@ out_err:
+@@ -2101,7 +2147,7 @@
return error;
}
{
return sys_mkdirat(AT_FDCWD, pathname, mode);
}
-@@ -2133,7 +2179,7 @@ void dentry_unhash(struct dentry *dentry
+@@ -2133,7 +2179,7 @@
spin_unlock(&dcache_lock);
}
{
int error = may_delete(dir, dentry, 1);
-@@ -2143,6 +2189,10 @@ int vfs_rmdir(struct inode *dir, struct
+@@ -2143,6 +2189,10 @@
if (!dir->i_op || !dir->i_op->rmdir)
return -EPERM;
DQUOT_INIT(dir);
mutex_lock(&dentry->d_inode->i_mutex);
-@@ -2150,12 +2200,9 @@ int vfs_rmdir(struct inode *dir, struct
+@@ -2150,12 +2200,9 @@
if (d_mountpoint(dentry))
error = -EBUSY;
else {
}
mutex_unlock(&dentry->d_inode->i_mutex);
if (!error) {
-@@ -2196,7 +2243,7 @@ static long do_rmdir(int dfd, const char
+@@ -2196,7 +2243,7 @@
error = mnt_want_write(nd.path.mnt);
if (error)
goto exit3;
mnt_drop_write(nd.path.mnt);
exit3:
dput(dentry);
-@@ -2208,12 +2255,12 @@ exit1:
+@@ -2208,12 +2255,12 @@
return error;
}
{
int error = may_delete(dir, dentry, 0);
-@@ -2229,7 +2276,7 @@ int vfs_unlink(struct inode *dir, struct
+@@ -2229,7 +2276,7 @@
if (d_mountpoint(dentry))
error = -EBUSY;
else {
if (!error)
error = dir->i_op->unlink(dir, dentry);
}
-@@ -2278,7 +2325,7 @@ static long do_unlinkat(int dfd, const c
+@@ -2278,7 +2325,7 @@
error = mnt_want_write(nd.path.mnt);
if (error)
goto exit2;
mnt_drop_write(nd.path.mnt);
exit2:
dput(dentry);
-@@ -2297,7 +2344,7 @@ slashes:
+@@ -2297,7 +2344,7 @@
goto exit2;
}
{
if ((flag & ~AT_REMOVEDIR) != 0)
return -EINVAL;
-@@ -2308,14 +2355,15 @@ asmlinkage long sys_unlinkat(int dfd, co
+@@ -2308,14 +2355,15 @@
return do_unlinkat(dfd, pathname);
}
if (error)
return error;
-@@ -2323,7 +2371,7 @@ int vfs_symlink(struct inode *dir, struc
+@@ -2323,7 +2371,7 @@
if (!dir->i_op || !dir->i_op->symlink)
return -EPERM;
if (error)
return error;
-@@ -2334,8 +2382,8 @@ int vfs_symlink(struct inode *dir, struc
+@@ -2334,8 +2382,8 @@
return error;
}
{
int error;
char *from;
-@@ -2359,7 +2407,7 @@ asmlinkage long sys_symlinkat(const char
+@@ -2359,7 +2407,7 @@
error = mnt_want_write(nd.path.mnt);
if (error)
goto out_dput;
mnt_drop_write(nd.path.mnt);
out_dput:
dput(dentry);
-@@ -2372,12 +2420,12 @@ out_putname:
+@@ -2372,12 +2420,12 @@
return error;
}
{
struct inode *inode = old_dentry->d_inode;
int error;
-@@ -2385,7 +2433,7 @@ int vfs_link(struct dentry *old_dentry,
+@@ -2385,7 +2433,7 @@
if (!inode)
return -ENOENT;
if (error)
return error;
-@@ -2402,7 +2450,8 @@ int vfs_link(struct dentry *old_dentry,
+@@ -2402,7 +2450,8 @@
if (S_ISDIR(inode->i_mode))
return -EPERM;
if (error)
return error;
-@@ -2424,9 +2473,8 @@ int vfs_link(struct dentry *old_dentry,
+@@ -2424,9 +2473,8 @@
* with linux 2.0, and to avoid hard-linking to directories
* and other special files. --ADM
*/
{
struct dentry *new_dentry;
struct nameidata nd;
-@@ -2456,7 +2504,9 @@ asmlinkage long sys_linkat(int olddfd, c
+@@ -2456,7 +2504,9 @@
error = mnt_want_write(nd.path.mnt);
if (error)
goto out_dput;
mnt_drop_write(nd.path.mnt);
out_dput:
dput(new_dentry);
-@@ -2471,7 +2521,7 @@ out:
+@@ -2471,7 +2521,7 @@
return error;
}
{
return sys_linkat(AT_FDCWD, oldname, AT_FDCWD, newname, 0);
}
-@@ -2509,7 +2559,8 @@ asmlinkage long sys_link(const char __us
+@@ -2509,7 +2559,8 @@
* locking].
*/
static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
{
int error = 0;
struct inode *target;
-@@ -2524,7 +2575,8 @@ static int vfs_rename_dir(struct inode *
+@@ -2524,7 +2575,8 @@
return error;
}
if (error)
return error;
-@@ -2552,12 +2604,14 @@ static int vfs_rename_dir(struct inode *
+@@ -2552,12 +2604,14 @@
}
static int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
if (error)
return error;
-@@ -2580,7 +2634,8 @@ static int vfs_rename_other(struct inode
+@@ -2580,7 +2634,8 @@
}
int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
{
int error;
int is_dir = S_ISDIR(old_dentry->d_inode->i_mode);
-@@ -2594,7 +2649,7 @@ int vfs_rename(struct inode *old_dir, st
+@@ -2594,7 +2649,7 @@
return error;
if (!new_dentry->d_inode)
else
error = may_delete(new_dir, new_dentry, is_dir);
if (error)
-@@ -2609,9 +2664,11 @@ int vfs_rename(struct inode *old_dir, st
+@@ -2609,9 +2664,11 @@
old_name = fsnotify_oldname_init(old_dentry->d_name.name);
if (is_dir)
if (!error) {
const char *new_name = old_dentry->d_name.name;
fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir,
-@@ -2622,8 +2679,8 @@ int vfs_rename(struct inode *old_dir, st
+@@ -2622,8 +2679,8 @@
return error;
}
{
struct dentry *old_dir, *new_dir;
struct dentry *old_dentry, *new_dentry;
-@@ -2688,8 +2745,8 @@ asmlinkage long sys_renameat(int olddfd,
+@@ -2688,8 +2745,8 @@
error = mnt_want_write(oldnd.path.mnt);
if (error)
goto exit5;
mnt_drop_write(oldnd.path.mnt);
exit5:
dput(new_dentry);
-@@ -2707,7 +2764,7 @@ exit:
+@@ -2707,7 +2764,7 @@
return error;
}
{
return sys_renameat(AT_FDCWD, oldname, AT_FDCWD, newname);
}
-@@ -2797,18 +2854,23 @@ void page_put_link(struct dentry *dentry
+@@ -2797,18 +2854,23 @@
}
}
if (err)
goto fail;
-@@ -2832,7 +2894,7 @@ fail:
+@@ -2832,7 +2894,7 @@
int page_symlink(struct inode *inode, const char *symname, int len)
{
return __page_symlink(inode, symname, len,
}
const struct inode_operations page_symlink_inode_operations = {
-@@ -2857,6 +2919,7 @@ EXPORT_SYMBOL(page_symlink_inode_operati
+@@ -2857,6 +2919,7 @@
EXPORT_SYMBOL(path_lookup);
EXPORT_SYMBOL(vfs_path_lookup);
EXPORT_SYMBOL(inode_permission);
EXPORT_SYMBOL(vfs_permission);
EXPORT_SYMBOL(file_permission);
EXPORT_SYMBOL(unlock_rename);
-diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
---- linux-2.6.27/fs/namespace.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/namespace.c 2009-03-25 16:11:35.000000000 +0000
-@@ -130,10 +130,20 @@ struct vfsmount *alloc_vfsmnt(const char
+diff -r 9608d5473017 fs/namespace.c
+--- a/fs/namespace.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/namespace.c Wed May 06 16:56:50 2009 +0100
+@@ -130,10 +130,20 @@
INIT_LIST_HEAD(&mnt->mnt_share);
INIT_LIST_HEAD(&mnt->mnt_slave_list);
INIT_LIST_HEAD(&mnt->mnt_slave);
out_free_id:
mnt_free_id(mnt);
out_free_cache:
-@@ -170,65 +180,38 @@ int __mnt_is_readonly(struct vfsmount *m
+@@ -170,65 +180,38 @@
}
EXPORT_SYMBOL_GPL(__mnt_is_readonly);
-static int __init init_mnt_writers(void)
+static inline void dec_mnt_writers(struct vfsmount *mnt)
{
-- int cpu;
-- for_each_possible_cpu(cpu) {
-- struct mnt_writer *writer = &per_cpu(mnt_writers, cpu);
-- spin_lock_init(&writer->lock);
-- lockdep_set_class(&writer->lock, &writer->lock_class);
-- writer->count = 0;
-- }
-- return 0;
+#ifdef CONFIG_SMP
+ (*per_cpu_ptr(mnt->mnt_writers, smp_processor_id()))--;
+#else
+ mnt->mnt_writers--;
+#endif
- }
--fs_initcall(init_mnt_writers);
-
--static void unlock_mnt_writers(void)
++}
++
+static unsigned int count_mnt_writers(struct vfsmount *mnt)
- {
++{
+#ifdef CONFIG_SMP
+ unsigned int count = 0;
int cpu;
+- for_each_possible_cpu(cpu) {
+- struct mnt_writer *writer = &per_cpu(mnt_writers, cpu);
+- spin_lock_init(&writer->lock);
+- lockdep_set_class(&writer->lock, &writer->lock_class);
+- writer->count = 0;
+- }
+- return 0;
+-}
+-fs_initcall(init_mnt_writers);
+-
+-static void unlock_mnt_writers(void)
+-{
+- int cpu;
- struct mnt_writer *cpu_writer;
for_each_possible_cpu(cpu) {
}
/*
-@@ -252,74 +235,71 @@ static inline void use_cpu_writer_for_mo
+@@ -252,74 +235,71 @@
int mnt_want_write(struct vfsmount *mnt)
{
int ret = 0;
{
- int cpu;
- struct mnt_writer *cpu_writer;
--
++ preempt_disable();
++ inc_mnt_writers(mnt);
++ preempt_enable();
++}
++EXPORT_SYMBOL_GPL(mnt_clone_write);
+
- for_each_possible_cpu(cpu) {
- cpu_writer = &per_cpu(mnt_writers, cpu);
- spin_lock(&cpu_writer->lock);
- __clear_mnt_count(cpu_writer);
- cpu_writer->mnt = NULL;
-- }
-+ preempt_disable();
-+ inc_mnt_writers(mnt);
-+ preempt_enable();
++/**
++ * mnt_want_write_file - get write access to a file's mount
++ * @file: the file who's mount on which to take a write
++ *
++ * This is like mnt_want_write, but it takes a file and can
++ * do some optimisations if the file is open for write already
++ */
++int mnt_want_write_file(struct vfsmount *mnt, struct file *file)
++{
++ if (!(file->f_mode & FMODE_WRITE))
++ return mnt_want_write(mnt);
++ else {
++ mnt_clone_write(mnt);
++ return 0;
+ }
}
-+EXPORT_SYMBOL_GPL(mnt_clone_write);
-
+-
-/*
- * These per-cpu write counts are not guaranteed to have
- * matched increments and decrements on any given cpu.
- * A file open()ed for write on one cpu and close()d on
- * another cpu will imbalance this count. Make sure it
- * does not get too far out of whack.
-+/**
-+ * mnt_want_write_file - get write access to a file's mount
-+ * @file: the file who's mount on which to take a write
-+ *
-+ * This is like mnt_want_write, but it takes a file and can
-+ * do some optimisations if the file is open for write already
- */
+- */
-static void handle_write_count_underflow(struct vfsmount *mnt)
-+int mnt_want_write_file(struct vfsmount *mnt, struct file *file)
- {
+-{
- if (atomic_read(&mnt->__mnt_writers) >=
- MNT_WRITER_UNDERFLOW_LIMIT)
- return;
- mnt, atomic_read(&mnt->__mnt_writers));
- /* use the flag to keep the dmesg spam down */
- mnt->mnt_flags |= MNT_IMBALANCED_WRITE_COUNT;
-+ if (!(file->f_mode & FMODE_WRITE))
-+ return mnt_want_write(mnt);
-+ else {
-+ mnt_clone_write(mnt);
-+ return 0;
- }
+- }
- spin_unlock(&vfsmount_lock);
- unlock_mnt_writers();
- }
+-}
+EXPORT_SYMBOL_GPL(mnt_want_write_file);
/**
* mnt_drop_write - give up write access to a mount
-@@ -331,37 +311,9 @@ static void handle_write_count_underflow
+@@ -331,37 +311,9 @@
*/
void mnt_drop_write(struct vfsmount *mnt)
{
}
EXPORT_SYMBOL_GPL(mnt_drop_write);
-@@ -369,24 +321,34 @@ static int mnt_make_readonly(struct vfsm
+@@ -369,24 +321,34 @@
{
int ret = 0;
- spin_lock(&vfsmount_lock);
if (!ret)
mnt->mnt_flags |= MNT_READONLY;
-- spin_unlock(&vfsmount_lock);
- out:
-- unlock_mnt_writers();
++out:
+ /*
+ * MNT_READONLY must become visible before ~MNT_WRITE_HOLD, so writers
+ * that become unheld will see MNT_READONLY.
+ */
+ smp_wmb();
+ mnt->mnt_flags &= ~MNT_WRITE_HOLD;
-+ spin_unlock(&vfsmount_lock);
+ spin_unlock(&vfsmount_lock);
+-out:
+- unlock_mnt_writers();
return ret;
}
-@@ -410,6 +372,9 @@ void free_vfsmnt(struct vfsmount *mnt)
+@@ -410,6 +372,9 @@
{
kfree(mnt->mnt_devname);
mnt_free_id(mnt);
kmem_cache_free(mnt_cache, mnt);
}
-@@ -604,36 +569,14 @@ static struct vfsmount *clone_mnt(struct
+@@ -604,36 +569,14 @@
static inline void __mntput(struct vfsmount *mnt)
{
- int cpu;
struct super_block *sb = mnt->mnt_sb;
- /*
+- /*
- * We don't have to hold all of the locks at the
- * same time here because we know that we're the
- * last reference to mnt and that no new writers
- cpu_writer->mnt = NULL;
- spin_unlock(&cpu_writer->lock);
- }
-- /*
+ /*
* This probably indicates that somebody messed
* up a mnt_want/drop_write() pair. If this
* happens, the filesystem was probably unable
dput(mnt->mnt_root);
free_vfsmnt(mnt);
deactivate_super(sb);
-@@ -1128,7 +1071,7 @@ static int do_umount(struct vfsmount *mn
+@@ -1128,7 +1071,7 @@
* unixes. Our API is identical to OSF/1 to avoid making a mess of AMD
*/
{
struct path path;
int retval;
-@@ -1160,7 +1103,7 @@ out:
+@@ -1160,7 +1103,7 @@
/*
* The 2.0 compatible umount. No flags.
*/
{
return sys_umount(name, 0);
}
-@@ -1553,8 +1496,13 @@ static noinline int do_remount(struct na
+@@ -1553,8 +1496,13 @@
if (!err)
nd->path.mnt->mnt_flags = mnt_flags;
up_write(&sb->s_umount);
return err;
}
-@@ -2048,9 +1996,8 @@ struct mnt_namespace *copy_mnt_ns(unsign
+@@ -2048,9 +1996,8 @@
return new_ns;
}
{
int retval;
unsigned long data_page;
-@@ -2175,8 +2122,8 @@ static void chroot_fs_refs(struct path *
+@@ -2175,8 +2122,8 @@
* though, so you may need to say mount --bind /nfs/my_root /nfs/my_root
* first.
*/
{
struct vfsmount *tmp;
struct path new, old, parent_path, root_parent, root;
-@@ -2352,3 +2299,33 @@ void __put_mnt_ns(struct mnt_namespace *
+@@ -2352,3 +2299,33 @@
release_mounts(&umount_list);
kfree(ns);
}
+ return res;
+}
+EXPORT_SYMBOL(d_namespace_path);
-diff -purN linux-2.6.27/fs/nfs/file.c linux-2.6.27.19-5.1/fs/nfs/file.c
---- linux-2.6.27/fs/nfs/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs/file.c 2009-03-25 16:11:39.000000000 +0000
-@@ -351,7 +351,7 @@ static int nfs_write_begin(struct file *
+diff -r 9608d5473017 fs/nfs/file.c
+--- a/fs/nfs/file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfs/file.c Wed May 06 16:56:50 2009 +0100
+@@ -351,7 +351,7 @@
file->f_path.dentry->d_name.name,
mapping->host->i_ino, len, (long long) pos);
if (!page)
return -ENOMEM;
*pagep = page;
-@@ -413,7 +413,7 @@ static void nfs_invalidate_page(struct p
+@@ -413,7 +413,7 @@
if (offset != 0)
return;
/* Cancel any unstarted writes on this page */
}
static int nfs_release_page(struct page *page, gfp_t gfp)
-@@ -426,7 +426,7 @@ static int nfs_release_page(struct page
+@@ -426,13 +426,25 @@
static int nfs_launder_page(struct page *page)
{
dfprintk(PAGECACHE, "NFS: launder_page(%ld, %llu)\n",
inode->i_ino, (long long)page_offset(page));
-@@ -434,6 +434,18 @@ static int nfs_launder_page(struct page
+
return nfs_wb_page(inode, page);
}
-
++
+#ifdef CONFIG_NFS_SWAP
+static int nfs_swapon(struct file *file)
+{
+ return xs_swapper(NFS_CLIENT(file->f_mapping->host)->cl_xprt, 0);
+}
+#endif
-+
+
const struct address_space_operations nfs_file_aops = {
.readpage = nfs_readpage,
- .readpages = nfs_readpages,
-@@ -446,6 +458,12 @@ const struct address_space_operations nf
+@@ -446,6 +458,12 @@
.releasepage = nfs_release_page,
.direct_IO = nfs_direct_IO,
.launder_page = nfs_launder_page,
};
static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct page *page)
-@@ -462,7 +480,7 @@ static int nfs_vm_page_mkwrite(struct vm
+@@ -462,7 +480,7 @@
(long long)page_offset(page));
lock_page(page);
if (mapping != dentry->d_inode->i_mapping)
goto out_unlock;
-diff -purN linux-2.6.27/fs/nfs/inode.c linux-2.6.27.19-5.1/fs/nfs/inode.c
---- linux-2.6.27/fs/nfs/inode.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs/inode.c 2009-03-25 16:11:38.000000000 +0000
-@@ -824,6 +824,12 @@ int nfs_revalidate_mapping_nolock(struct
+diff -r 9608d5473017 fs/nfs/inode.c
+--- a/fs/nfs/inode.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfs/inode.c Wed May 06 16:56:50 2009 +0100
+@@ -824,6 +824,12 @@
struct nfs_inode *nfsi = NFS_I(inode);
int ret = 0;
if ((nfsi->cache_validity & NFS_INO_REVAL_PAGECACHE)
|| nfs_attribute_timeout(inode) || NFS_STALE(inode)) {
ret = __nfs_revalidate_inode(NFS_SERVER(inode), inode);
-diff -purN linux-2.6.27/fs/nfs/internal.h linux-2.6.27.19-5.1/fs/nfs/internal.h
---- linux-2.6.27/fs/nfs/internal.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs/internal.h 2009-03-25 16:11:38.000000000 +0000
-@@ -253,13 +253,14 @@ void nfs_super_set_maxbytes(struct super
+diff -r 9608d5473017 fs/nfs/internal.h
+--- a/fs/nfs/internal.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfs/internal.h Wed May 06 16:56:50 2009 +0100
+@@ -253,13 +253,14 @@
static inline
unsigned int nfs_page_length(struct page *page)
{
return ((i_size - 1) & ~PAGE_CACHE_MASK) + 1;
}
return 0;
-diff -purN linux-2.6.27/fs/nfs/pagelist.c linux-2.6.27.19-5.1/fs/nfs/pagelist.c
---- linux-2.6.27/fs/nfs/pagelist.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs/pagelist.c 2009-03-25 16:11:38.000000000 +0000
-@@ -27,7 +27,7 @@ static inline struct nfs_page *
+diff -r 9608d5473017 fs/nfs/pagelist.c
+--- a/fs/nfs/pagelist.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfs/pagelist.c Wed May 06 16:56:50 2009 +0100
+@@ -27,7 +27,7 @@
nfs_page_alloc(void)
{
struct nfs_page *p;
if (p) {
memset(p, 0, sizeof(*p));
INIT_LIST_HEAD(&p->wb_list);
-@@ -76,11 +76,11 @@ nfs_create_request(struct nfs_open_conte
+@@ -76,11 +76,11 @@
* update_nfs_request below if the region is not locked. */
req->wb_page = page;
atomic_set(&req->wb_complete, 0);
req->wb_offset = offset;
req->wb_pgbase = offset;
req->wb_bytes = count;
-@@ -376,7 +376,7 @@ void nfs_pageio_cond_complete(struct nfs
+@@ -376,7 +376,7 @@
* nfs_scan_list - Scan a list for matching requests
* @nfsi: NFS inode
* @dst: Destination list
* @npages: idx_start + npages sets the upper bound to scan.
* @tag: tag to scan for
*
-diff -purN linux-2.6.27/fs/nfs/read.c linux-2.6.27.19-5.1/fs/nfs/read.c
---- linux-2.6.27/fs/nfs/read.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs/read.c 2009-03-25 16:11:38.000000000 +0000
-@@ -477,11 +477,11 @@ static const struct rpc_call_ops nfs_rea
+diff -r 9608d5473017 fs/nfs/read.c
+--- a/fs/nfs/read.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfs/read.c Wed May 06 16:56:50 2009 +0100
+@@ -477,11 +477,11 @@
int nfs_readpage(struct file *file, struct page *page)
{
struct nfs_open_context *ctx;
nfs_inc_stats(inode, NFSIOS_VFSREADPAGE);
nfs_add_stats(inode, NFSIOS_READPAGES, 1);
-@@ -528,17 +528,11 @@ static int
+@@ -528,16 +528,10 @@
readpage_async_filler(void *data, struct page *page)
{
struct nfs_readdesc *desc = (struct nfs_readdesc *)data;
struct nfs_page *new;
unsigned int len;
int error;
-
+-
- error = nfs_wb_page(inode, page);
- if (error)
- goto out_unlock;
- if (PageUptodate(page))
- goto out_unlock;
--
+
len = nfs_page_length(page);
if (len == 0)
- return nfs_return_empty_page(page);
-diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
---- linux-2.6.27/fs/nfs/write.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs/write.c 2009-03-25 16:11:38.000000000 +0000
-@@ -47,7 +47,7 @@ static mempool_t *nfs_commit_mempool;
+diff -r 9608d5473017 fs/nfs/write.c
+--- a/fs/nfs/write.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfs/write.c Wed May 06 16:56:50 2009 +0100
+@@ -47,7 +47,7 @@
struct nfs_write_data *nfs_commitdata_alloc(void)
{
if (p) {
memset(p, 0, sizeof(*p));
-@@ -65,7 +65,7 @@ void nfs_commit_free(struct nfs_write_da
+@@ -65,7 +65,7 @@
struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount)
{
if (p) {
memset(p, 0, sizeof(*p));
-@@ -74,7 +74,7 @@ struct nfs_write_data *nfs_writedata_all
+@@ -74,7 +74,7 @@
if (pagecount <= ARRAY_SIZE(p->page_array))
p->pagevec = p->page_array;
else {
if (!p->pagevec) {
mempool_free(p, nfs_wdata_mempool);
p = NULL;
-@@ -106,25 +106,62 @@ static void nfs_context_set_write_error(
+@@ -106,25 +106,62 @@
set_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags);
}
+ kref_get(&req->wb_kref);
+
return req;
- }
-
++}
++
+static inline struct nfs_page *
+nfs_page_find_request_locked(struct nfs_inode *nfsi, struct page *page)
+{
+ return __nfs_page_has_request(page);
+
+ return 0;
-+}
-+
+ }
+
static struct nfs_page *nfs_page_find_request(struct page *page)
{
- struct inode *inode = page->mapping->host;
spin_unlock(&inode->i_lock);
return req;
}
-@@ -132,16 +169,16 @@ static struct nfs_page *nfs_page_find_re
+@@ -132,16 +169,16 @@
/* Adjust the file length if we're writing beyond the end */
static void nfs_grow_file(struct page *page, unsigned int offset, unsigned int count)
{
if (i_size >= end)
goto out;
i_size_write(inode, end);
-@@ -154,7 +191,7 @@ out:
+@@ -154,7 +191,7 @@
static void nfs_set_pageerror(struct page *page)
{
SetPageError(page);
}
/* We can set the PG_uptodate flag if we see that a write request
-@@ -195,7 +232,7 @@ static int nfs_set_page_writeback(struct
+@@ -195,7 +232,7 @@
int ret = test_set_page_writeback(page);
if (!ret) {
struct nfs_server *nfss = NFS_SERVER(inode);
if (atomic_long_inc_return(&nfss->writeback) >
-@@ -207,7 +244,7 @@ static int nfs_set_page_writeback(struct
+@@ -207,7 +244,7 @@
static void nfs_end_page_writeback(struct page *page)
{
struct nfs_server *nfss = NFS_SERVER(inode);
end_page_writeback(page);
-@@ -222,13 +259,13 @@ static void nfs_end_page_writeback(struc
+@@ -222,13 +259,13 @@
static int nfs_page_async_flush(struct nfs_pageio_descriptor *pgio,
struct page *page)
{
if (req == NULL) {
spin_unlock(&inode->i_lock);
return 0;
-@@ -247,9 +284,12 @@ static int nfs_page_async_flush(struct n
+@@ -247,9 +284,12 @@
return ret;
spin_lock(&inode->i_lock);
}
}
if (nfs_set_page_writeback(page) != 0) {
spin_unlock(&inode->i_lock);
-@@ -265,12 +305,12 @@ static int nfs_page_async_flush(struct n
+@@ -265,12 +305,12 @@
static int nfs_do_writepage(struct page *page, struct writeback_control *wbc, struct nfs_pageio_descriptor *pgio)
{
return nfs_page_async_flush(pgio, page);
}
-@@ -282,7 +322,7 @@ static int nfs_writepage_locked(struct p
+@@ -282,7 +322,7 @@
struct nfs_pageio_descriptor pgio;
int err;
err = nfs_do_writepage(page, wbc, &pgio);
nfs_pageio_complete(&pgio);
if (err < 0)
-@@ -301,6 +341,28 @@ int nfs_writepage(struct page *page, str
+@@ -299,6 +339,28 @@
+ ret = nfs_writepage_locked(page, wbc);
+ unlock_page(page);
return ret;
- }
-
++}
++
+static int nfs_writepage_setup(struct nfs_open_context *ctx, struct page *page,
+ unsigned int offset, unsigned int count);
+
+out:
+ unlock_page(page);
+ return status;
-+}
-+
+ }
+
static int nfs_writepages_callback(struct page *page, struct writeback_control *wbc, void *data)
- {
- int ret;
-@@ -351,8 +413,14 @@ static int nfs_inode_add_request(struct
+@@ -351,8 +413,14 @@
if (nfs_have_delegation(inode, FMODE_WRITE))
nfsi->change_attr++;
}
nfsi->npages++;
kref_get(&req->wb_kref);
radix_tree_tag_set(&nfsi->nfs_page_tree, req->wb_index,
-@@ -374,8 +442,10 @@ static void nfs_inode_remove_request(str
+@@ -374,8 +442,10 @@
BUG_ON (!NFS_WBACK_BUSY(req));
spin_lock(&inode->i_lock);
radix_tree_delete(&nfsi->nfs_page_tree, req->wb_index);
nfsi->npages--;
if (!nfsi->npages) {
-@@ -393,6 +463,19 @@ nfs_mark_request_dirty(struct nfs_page *
+@@ -393,6 +463,19 @@
__set_page_dirty_nobuffers(req->wb_page);
}
#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
/*
* Add a request to the inode's commit list.
-@@ -405,29 +488,17 @@ nfs_mark_request_commit(struct nfs_page
+@@ -405,27 +488,15 @@
spin_lock(&inode->i_lock);
nfsi->ncommit++;
+ inc_bdi_stat(page_file_mapping(req->wb_page)->backing_dev_info,
+ BDI_RECLAIMABLE);
__mark_inode_dirty(inode, I_DIRTY_DATASYNC);
- }
-
+-}
+-
-static int
-nfs_clear_request_commit(struct nfs_page *req)
-{
- return 1;
- }
- return 0;
--}
--
+ }
+
static inline
- int nfs_write_need_commit(struct nfs_write_data *data)
- {
-@@ -437,7 +508,7 @@ int nfs_write_need_commit(struct nfs_wri
+@@ -437,7 +508,7 @@
static inline
int nfs_reschedule_unstable_write(struct nfs_page *req)
{
nfs_mark_request_commit(req);
return 1;
}
-@@ -453,12 +524,6 @@ nfs_mark_request_commit(struct nfs_page
+@@ -451,12 +522,6 @@
+ static inline void
+ nfs_mark_request_commit(struct nfs_page *req)
{
- }
-
+-}
+-
-static inline int
-nfs_clear_request_commit(struct nfs_page *req)
-{
- return 0;
--}
--
+ }
+
static inline
- int nfs_write_need_commit(struct nfs_write_data *data)
- {
-@@ -516,8 +581,11 @@ static void nfs_cancel_commit_list(struc
+@@ -516,8 +581,11 @@
while(!list_empty(head)) {
req = nfs_list_entry(head->next);
nfs_inode_remove_request(req);
nfs_unlock_request(req);
}
-@@ -528,7 +596,7 @@ static void nfs_cancel_commit_list(struc
+@@ -528,7 +596,7 @@
* nfs_scan_commit - Scan an inode for commit requests
* @inode: NFS inode to scan
* @dst: destination list
* @npages: idx_start + npages sets the upper bound to scan.
*
* Moves requests from the inode's 'commit' request list.
-@@ -578,7 +646,7 @@ static struct nfs_page *nfs_try_to_updat
+@@ -578,7 +646,7 @@
spin_lock(&inode->i_lock);
for (;;) {
if (req == NULL)
goto out_unlock;
-@@ -589,7 +657,8 @@ static struct nfs_page *nfs_try_to_updat
+@@ -589,7 +657,8 @@
* Note: nfs_flush_incompatible() will already
* have flushed out requests having wrong owners.
*/
|| end < req->wb_offset)
goto out_flushme;
-@@ -605,10 +674,6 @@ static struct nfs_page *nfs_try_to_updat
+@@ -604,10 +673,6 @@
+ goto out_err;
spin_lock(&inode->i_lock);
}
-
+-
- if (nfs_clear_request_commit(req))
- radix_tree_tag_clear(&NFS_I(inode)->nfs_page_tree,
- req->wb_index, NFS_PAGE_TAG_COMMIT);
--
+
/* Okay, the request matches. Update the region */
if (offset < req->wb_offset) {
- req->wb_offset = offset;
-@@ -639,7 +704,7 @@ out_err:
+@@ -639,7 +704,7 @@
static struct nfs_page * nfs_setup_write_request(struct nfs_open_context* ctx,
struct page *page, unsigned int offset, unsigned int bytes)
{
struct nfs_page *req;
int error;
-@@ -690,11 +755,12 @@ int nfs_flush_incompatible(struct file *
+@@ -690,11 +755,12 @@
req = nfs_page_find_request(page);
if (req == NULL)
return 0;
} while (status == 0);
return status;
}
-@@ -720,7 +786,7 @@ int nfs_updatepage(struct file *file, st
+@@ -720,7 +786,7 @@
unsigned int offset, unsigned int count)
{
struct nfs_open_context *ctx = nfs_file_open_context(file);
int status = 0;
nfs_inc_stats(inode, NFSIOS_VFSUPDATEPAGE);
-@@ -728,7 +794,7 @@ int nfs_updatepage(struct file *file, st
+@@ -728,7 +794,7 @@
dprintk("NFS: nfs_updatepage(%s/%s %d@%lld)\n",
file->f_path.dentry->d_parent->d_name.name,
file->f_path.dentry->d_name.name, count,
/* If we're not using byte range locks, and we know the page
* is up to date, it may be more efficient to extend the write
-@@ -1003,7 +1069,7 @@ static void nfs_writeback_release_partia
+@@ -1003,7 +1069,7 @@
}
if (nfs_write_need_commit(data)) {
spin_lock(&inode->i_lock);
if (test_bit(PG_NEED_RESCHED, &req->wb_flags)) {
-@@ -1264,7 +1330,7 @@ nfs_commit_list(struct inode *inode, str
+@@ -1264,7 +1330,7 @@
nfs_list_remove_request(req);
nfs_mark_request_commit(req);
dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS);
BDI_RECLAIMABLE);
nfs_clear_page_tag_locked(req);
}
-@@ -1295,7 +1361,10 @@ static void nfs_commit_release(void *cal
+@@ -1295,7 +1361,10 @@
while (!list_empty(&data->pages)) {
req = nfs_list_entry(data->pages.next);
nfs_list_remove_request(req);
dprintk("NFS: commit (%s/%lld %d@%lld)",
req->wb_context->path.dentry->d_inode->i_sb->s_id,
-@@ -1455,10 +1524,10 @@ int nfs_wb_nocommit(struct inode *inode)
+@@ -1455,10 +1524,10 @@
int nfs_wb_page_cancel(struct inode *inode, struct page *page)
{
struct nfs_page *req;
.sync_mode = WB_SYNC_ALL,
.nr_to_write = LONG_MAX,
.range_start = range_start,
-@@ -1471,7 +1540,7 @@ int nfs_wb_page_cancel(struct inode *ino
+@@ -1471,7 +1540,7 @@
req = nfs_page_find_request(page);
if (req == NULL)
goto out;
nfs_release_request(req);
break;
}
-@@ -1489,9 +1558,9 @@ int nfs_wb_page_cancel(struct inode *ino
+@@ -1489,9 +1558,9 @@
if (ret < 0)
goto out;
}
out:
return ret;
}
-@@ -1499,10 +1568,10 @@ out:
+@@ -1499,10 +1568,10 @@
static int nfs_wb_page_priority(struct inode *inode, struct page *page,
int how)
{
.sync_mode = WB_SYNC_ALL,
.nr_to_write = LONG_MAX,
.range_start = range_start,
-@@ -1517,7 +1586,7 @@ static int nfs_wb_page_priority(struct i
+@@ -1517,7 +1586,7 @@
goto out_error;
} else if (!PagePrivate(page))
break;
if (ret < 0)
goto out_error;
} while (PagePrivate(page));
-diff -purN linux-2.6.27/fs/nfs4acl_base.c linux-2.6.27.19-5.1/fs/nfs4acl_base.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs4acl_base.c 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/nfs4acl_base.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/nfs4acl_base.c Wed May 06 16:56:50 2009 +0100
@@ -0,0 +1,573 @@
+/*
+ * Copyright (C) 2006 Andreas Gruenbacher <a.gruenbacher@computer.org>
+ return acl;
+}
+EXPORT_SYMBOL_GPL(nfs4acl_inherit);
-diff -purN linux-2.6.27/fs/nfs4acl_compat.c linux-2.6.27.19-5.1/fs/nfs4acl_compat.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs4acl_compat.c 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/nfs4acl_compat.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/nfs4acl_compat.c Wed May 06 16:56:50 2009 +0100
@@ -0,0 +1,757 @@
+/*
+ * Copyright (C) 2006 Andreas Gruenbacher <a.gruenbacher@computer.org>
+out:
+ return retval;
+}
-diff -purN linux-2.6.27/fs/nfs4acl_xattr.c linux-2.6.27.19-5.1/fs/nfs4acl_xattr.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs4acl_xattr.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/nfs4acl_xattr.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/nfs4acl_xattr.c Wed May 06 16:56:50 2009 +0100
@@ -0,0 +1,146 @@
+/*
+ * Copyright (C) 2006 Andreas Gruenbacher <a.gruenbacher@computer.org>
+ }
+}
+EXPORT_SYMBOL_GPL(nfs4acl_to_xattr);
-diff -purN linux-2.6.27/fs/nfsctl.c linux-2.6.27.19-5.1/fs/nfsctl.c
---- linux-2.6.27/fs/nfsctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfsctl.c 2009-03-25 16:11:35.000000000 +0000
-@@ -82,8 +82,8 @@ static struct {
+diff -r 9608d5473017 fs/nfsctl.c
+--- a/fs/nfsctl.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfsctl.c Wed May 06 16:56:50 2009 +0100
+@@ -82,8 +82,8 @@
},
};
{
struct file *file;
void __user *p = &arg->u;
-diff -purN linux-2.6.27/fs/nfsd/nfs4recover.c linux-2.6.27.19-5.1/fs/nfsd/nfs4recover.c
---- linux-2.6.27/fs/nfsd/nfs4recover.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfsd/nfs4recover.c 2009-03-25 16:11:39.000000000 +0000
-@@ -158,7 +158,8 @@ nfsd4_create_clid_dir(struct nfs4_client
+diff -r 9608d5473017 fs/nfsd/nfs4recover.c
+--- a/fs/nfsd/nfs4recover.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfsd/nfs4recover.c Wed May 06 16:56:50 2009 +0100
+@@ -158,7 +158,8 @@
status = mnt_want_write(rec_dir.path.mnt);
if (status)
goto out_put;
mnt_drop_write(rec_dir.path.mnt);
out_put:
dput(dentry);
-@@ -263,7 +264,7 @@ nfsd4_remove_clid_file(struct dentry *di
+@@ -263,7 +264,7 @@
return -EINVAL;
}
mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);
mutex_unlock(&dir->d_inode->i_mutex);
return status;
}
-@@ -278,7 +279,7 @@ nfsd4_clear_clid_dir(struct dentry *dir,
+@@ -278,7 +279,7 @@
* a kernel from the future.... */
nfsd4_list_rec_dir(dentry, nfsd4_remove_clid_file);
mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);
mutex_unlock(&dir->d_inode->i_mutex);
return status;
}
-diff -purN linux-2.6.27/fs/nfsd/nfs4state.c linux-2.6.27.19-5.1/fs/nfsd/nfs4state.c
---- linux-2.6.27/fs/nfsd/nfs4state.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfsd/nfs4state.c 2009-03-25 16:11:39.000000000 +0000
-@@ -2767,6 +2767,25 @@ out:
+diff -r 9608d5473017 fs/nfsd/nfs4state.c
+--- a/fs/nfsd/nfs4state.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfsd/nfs4state.c Wed May 06 16:56:50 2009 +0100
+@@ -2767,6 +2767,25 @@
}
/*
* LOCKT operation
*/
__be32
-@@ -2774,7 +2793,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, stru
+@@ -2774,7 +2793,6 @@
struct nfsd4_lockt *lockt)
{
struct inode *inode;
struct file_lock file_lock;
int error;
__be32 status;
-@@ -2822,7 +2840,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, stru
+@@ -2822,7 +2840,6 @@
file_lock.fl_owner = (fl_owner_t)lockt->lt_stateowner;
file_lock.fl_pid = current->tgid;
file_lock.fl_flags = FL_POSIX;
file_lock.fl_start = lockt->lt_offset;
if ((lockt->lt_length == ~(u64)0) || LOFF_OVERFLOW(lockt->lt_offset, lockt->lt_length))
-@@ -2832,16 +2849,8 @@ nfsd4_lockt(struct svc_rqst *rqstp, stru
+@@ -2832,16 +2849,8 @@
nfs4_transform_lock_offset(&file_lock);
if (error) {
status = nfserrno(error);
goto out;
-diff -purN linux-2.6.27/fs/nfsd/nfs4xdr.c linux-2.6.27.19-5.1/fs/nfsd/nfs4xdr.c
---- linux-2.6.27/fs/nfsd/nfs4xdr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfsd/nfs4xdr.c 2009-03-25 16:11:39.000000000 +0000
-@@ -1446,7 +1446,7 @@ nfsd4_encode_fattr(struct svc_fh *fhp, s
+diff -r 9608d5473017 fs/nfsd/nfs4xdr.c
+--- a/fs/nfsd/nfs4xdr.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfsd/nfs4xdr.c Wed May 06 16:56:50 2009 +0100
+@@ -1446,7 +1446,7 @@
}
if (bmval0 & (FATTR4_WORD0_ACL | FATTR4_WORD0_ACLSUPPORT
| FATTR4_WORD0_SUPPORTED_ATTRS)) {
aclsupport = (err == 0);
if (bmval0 & FATTR4_WORD0_ACL) {
if (err == -EOPNOTSUPP)
-diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
---- linux-2.6.27/fs/nfsd/vfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfsd/vfs.c 2009-03-25 16:11:39.000000000 +0000
-@@ -358,6 +358,15 @@ nfsd_setattr(struct svc_rqst *rqstp, str
+diff -r 9608d5473017 fs/nfsd/vfs.c
+--- a/fs/nfsd/vfs.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfsd/vfs.c Wed May 06 16:56:50 2009 +0100
+@@ -358,6 +358,15 @@
goto out_nfserr;
}
DQUOT_INIT(inode);
}
/* sanitize the mode change */
-@@ -388,7 +397,10 @@ nfsd_setattr(struct svc_rqst *rqstp, str
+@@ -388,7 +397,10 @@
err = nfserr_notsync;
if (!check_guard || guardtime == inode->i_ctime.tv_sec) {
fh_lock(fhp);
err = nfserrno(host_err);
fh_unlock(fhp);
}
-@@ -408,11 +420,12 @@ out_nfserr:
+@@ -408,11 +420,12 @@
#if defined(CONFIG_NFSD_V2_ACL) || \
defined(CONFIG_NFSD_V3_ACL) || \
defined(CONFIG_NFSD_V4)
if (buflen <= 0)
return buflen;
-@@ -420,13 +433,14 @@ static ssize_t nfsd_getxattr(struct dent
+@@ -420,13 +433,14 @@
if (!*buf)
return -ENOMEM;
{
int len;
size_t buflen;
-@@ -445,7 +459,7 @@ set_nfsv4_acl_one(struct dentry *dentry,
+@@ -445,7 +459,7 @@
goto out;
}
out:
kfree(buf);
return error;
-@@ -458,6 +472,7 @@ nfsd4_set_nfs4_acl(struct svc_rqst *rqst
+@@ -458,6 +472,7 @@
__be32 error;
int host_error;
struct dentry *dentry;
struct inode *inode;
struct posix_acl *pacl = NULL, *dpacl = NULL;
unsigned int flags = 0;
-@@ -468,6 +483,7 @@ nfsd4_set_nfs4_acl(struct svc_rqst *rqst
+@@ -468,6 +483,7 @@
return error;
dentry = fhp->fh_dentry;
inode = dentry->d_inode;
if (S_ISDIR(inode->i_mode))
flags = NFS4_ACL_DIR;
-@@ -478,12 +494,14 @@ nfsd4_set_nfs4_acl(struct svc_rqst *rqst
+@@ -478,12 +494,14 @@
} else if (host_error < 0)
goto out_nfserr;
out_release:
posix_acl_release(pacl);
-@@ -496,13 +514,13 @@ out_nfserr:
+@@ -496,13 +514,13 @@
}
static struct posix_acl *
if (!buflen)
buflen = -ENODATA;
if (buflen <= 0)
-@@ -514,14 +532,15 @@ _get_posix_acl(struct dentry *dentry, ch
+@@ -514,14 +532,15 @@
}
int
if (IS_ERR(pacl) && PTR_ERR(pacl) == -ENODATA)
pacl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL);
if (IS_ERR(pacl)) {
-@@ -531,7 +550,7 @@ nfsd4_get_nfs4_acl(struct svc_rqst *rqst
+@@ -531,7 +550,7 @@
}
if (S_ISDIR(inode->i_mode)) {
if (IS_ERR(dpacl) && PTR_ERR(dpacl) == -ENODATA)
dpacl = NULL;
else if (IS_ERR(dpacl)) {
-@@ -906,6 +925,10 @@ nfsd_vfs_read(struct svc_rqst *rqstp, st
+@@ -906,6 +925,10 @@
if (ra && ra->p_set)
file->f_ra = ra->p_ra;
if (file->f_op->splice_read && rqstp->rq_splice_ok) {
struct splice_desc sd = {
.len = 0,
-@@ -938,19 +961,23 @@ nfsd_vfs_read(struct svc_rqst *rqstp, st
+@@ -938,19 +961,23 @@
*count = host_err;
err = 0;
fsnotify_access(file->f_path.dentry);
mutex_unlock(&dentry->d_inode->i_mutex);
}
-@@ -998,6 +1025,10 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s
+@@ -998,6 +1025,10 @@
if (stable && !EX_WGATHER(exp))
file->f_flags |= O_SYNC;
/* Write the data. */
oldfs = get_fs(); set_fs(KERNEL_DS);
host_err = vfs_writev(file, (struct iovec __user *)vec, vlen, &offset);
-@@ -1009,7 +1040,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s
+@@ -1009,7 +1040,7 @@
/* clear setuid/setgid flag after write */
if (host_err >= 0 && (inode->i_mode & (S_ISUID | S_ISGID)))
if (host_err >= 0 && stable) {
static ino_t last_ino;
-@@ -1050,8 +1081,12 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s
+@@ -1050,8 +1081,12 @@
dprintk("nfsd: write complete host_err=%d\n", host_err);
if (host_err >= 0)
err = 0;
out:
return err;
}
-@@ -1187,6 +1222,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
+@@ -1187,6 +1222,7 @@
int type, dev_t rdev, struct svc_fh *resfhp)
{
struct dentry *dentry, *dchild = NULL;
struct inode *dirp;
__be32 err;
__be32 err2;
-@@ -1204,6 +1240,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
+@@ -1204,6 +1240,7 @@
goto out;
dentry = fhp->fh_dentry;
dirp = dentry->d_inode;
err = nfserr_notdir;
-@@ -1220,7 +1257,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
+@@ -1220,7 +1257,7 @@
host_err = PTR_ERR(dchild);
if (IS_ERR(dchild))
goto out_nfserr;
if (err)
goto out;
} else {
-@@ -1270,13 +1307,14 @@ nfsd_create(struct svc_rqst *rqstp, stru
+@@ -1270,13 +1307,14 @@
host_err = vfs_create(dirp, dchild, iap->ia_mode, NULL);
break;
case S_IFDIR:
break;
}
if (host_err < 0) {
-@@ -1284,7 +1322,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
+@@ -1284,7 +1322,7 @@
goto out_nfserr;
}
err = nfserrno(nfsd_sync_dir(dentry));
write_inode_now(dchild->d_inode, 1);
}
-@@ -1514,6 +1552,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
+@@ -1514,6 +1552,7 @@
struct iattr *iap)
{
struct dentry *dentry, *dnew;
__be32 err, cerr;
int host_err;
-@@ -1538,6 +1577,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
+@@ -1538,6 +1577,7 @@
if (host_err)
goto out_nfserr;
if (unlikely(path[plen] != 0)) {
char *path_alloced = kmalloc(plen+1, GFP_KERNEL);
if (path_alloced == NULL)
-@@ -1545,14 +1585,16 @@ nfsd_symlink(struct svc_rqst *rqstp, str
+@@ -1545,14 +1585,16 @@
else {
strncpy(path_alloced, path, plen);
path_alloced[plen] = 0;
host_err = nfsd_sync_dir(dentry);
}
err = nfserrno(host_err);
-@@ -1560,7 +1602,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
+@@ -1560,7 +1602,7 @@
mnt_drop_write(fhp->fh_export->ex_path.mnt);
dput(dnew);
if (err==0) err = cerr;
out:
-@@ -1615,7 +1657,8 @@ nfsd_link(struct svc_rqst *rqstp, struct
+@@ -1615,7 +1657,8 @@
err = nfserrno(host_err);
goto out_dput;
}
if (!host_err) {
if (EX_ISSYNC(ffhp->fh_export)) {
err = nfserrno(nfsd_sync_dir(ddir));
-@@ -1716,7 +1759,8 @@ nfsd_rename(struct svc_rqst *rqstp, stru
+@@ -1716,7 +1759,8 @@
if (host_err)
goto out_dput_new;
if (!host_err && EX_ISSYNC(tfhp->fh_export)) {
host_err = nfsd_sync_dir(tdentry);
if (!host_err)
-@@ -1754,6 +1798,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
+@@ -1754,6 +1798,7 @@
char *fname, int flen)
{
struct dentry *dentry, *rdentry;
struct inode *dirp;
__be32 err;
int host_err;
-@@ -1768,6 +1813,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
+@@ -1768,6 +1813,7 @@
fh_lock_nested(fhp, I_MUTEX_PARENT);
dentry = fhp->fh_dentry;
dirp = dentry->d_inode;
rdentry = lookup_one_len(fname, dentry, flen);
host_err = PTR_ERR(rdentry);
-@@ -1789,21 +1835,21 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
+@@ -1789,21 +1835,21 @@
if (type != S_IFDIR) { /* It's UNLINK */
#ifdef MSNFS
host_err = nfsd_sync_dir(dentry);
out_drop:
-@@ -2036,7 +2082,8 @@ nfsd_get_posix_acl(struct svc_fh *fhp, i
+@@ -2036,7 +2082,8 @@
return ERR_PTR(-EOPNOTSUPP);
}
if (size < 0)
return ERR_PTR(size);
-@@ -2048,6 +2095,7 @@ nfsd_get_posix_acl(struct svc_fh *fhp, i
+@@ -2048,6 +2095,7 @@
int
nfsd_set_posix_acl(struct svc_fh *fhp, int type, struct posix_acl *acl)
{
struct inode *inode = fhp->fh_dentry->d_inode;
char *name;
void *value = NULL;
-@@ -2080,21 +2128,24 @@ nfsd_set_posix_acl(struct svc_fh *fhp, i
+@@ -2080,21 +2128,24 @@
} else
size = 0;
getout:
kfree(value);
-diff -purN linux-2.6.27/fs/novfs/Makefile linux-2.6.27.19-5.1/fs/novfs/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/Makefile 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/Makefile Wed May 06 16:56:50 2009 +0100
@@ -0,0 +1,19 @@
+#
+# Makefile for the Novell NetWare Client for Linux filesystem.
+
+novfs-objs := inode.o proc.o profile.o daemon.o file.o scope.o nwcapi.o
+
-diff -purN linux-2.6.27/fs/novfs/commands.h linux-2.6.27.19-5.1/fs/novfs/commands.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/commands.h 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/commands.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/commands.h Wed May 06 16:56:50 2009 +0100
@@ -0,0 +1,955 @@
+/*
+ * NetWare Redirector for Linux
+#pragma pack(pop)
+
+#endif /* __NOVFS_COMMANDS_H */
-diff -purN linux-2.6.27/fs/novfs/daemon.c linux-2.6.27.19-5.1/fs/novfs/daemon.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/daemon.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/daemon.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/daemon.c Wed May 06 16:56:50 2009 +0100
@@ -0,0 +1,2129 @@
+/*
+ * Novell NCP Redirector for Linux
+ goto exit2;
+}
+
-diff -purN linux-2.6.27/fs/novfs/file.c linux-2.6.27.19-5.1/fs/novfs/file.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/file.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/file.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/file.c Wed May 06 16:56:50 2009 +0100
@@ -0,0 +1,1981 @@
+/*
+ * Novell NCP Redirector for Linux
+
+ return (retCode);
+}
-diff -purN linux-2.6.27/fs/novfs/inode.c linux-2.6.27.19-5.1/fs/novfs/inode.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/inode.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/inode.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/inode.c Wed May 06 16:56:50 2009 +0100
@@ -0,0 +1,4729 @@
+/*
+ * Novell NCP Redirector for Linux
+MODULE_AUTHOR("Novell Inc.");
+MODULE_DESCRIPTION("Novell NetWare Client for Linux");
+MODULE_VERSION(NOVFS_VERSION_STRING);
-diff -purN linux-2.6.27/fs/novfs/nwcapi.c linux-2.6.27.19-5.1/fs/novfs/nwcapi.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/nwcapi.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/nwcapi.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/nwcapi.c Wed May 06 16:56:50 2009 +0100
@@ -0,0 +1,2208 @@
+/*
+ * Novell NCP Redirector for Linux
+ kfree(cmd);
+ return (status);
+}
-diff -purN linux-2.6.27/fs/novfs/nwcapi.h linux-2.6.27.19-5.1/fs/novfs/nwcapi.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/nwcapi.h 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/nwcapi.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/nwcapi.h Wed May 06 16:56:50 2009 +0100
@@ -0,0 +1,1416 @@
+/*
+ * NetWare Redirector for Linux
+};
+
+#endif /* __NWCLNX_H__ */
-diff -purN linux-2.6.27/fs/novfs/nwerror.h linux-2.6.27.19-5.1/fs/novfs/nwerror.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/nwerror.h 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/nwerror.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/nwerror.h Wed May 06 16:56:50 2009 +0100
@@ -0,0 +1,658 @@
+/*
+ * NetWare Redirector for Linux
+#define NWE_FAILURE 0x89FF // 255 Generic Failure
+
+#endif /* __NOVFS_ERROR_H */
-diff -purN linux-2.6.27/fs/novfs/proc.c linux-2.6.27.19-5.1/fs/novfs/proc.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/proc.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/proc.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/proc.c Wed May 06 16:56:50 2009 +0100
@@ -0,0 +1,153 @@
+/*
+ * Novell NCP Redirector for Linux
+
+ DbgPrint("Uninit_Procfs_Interface done\n");
+}
-diff -purN linux-2.6.27/fs/novfs/profile.c linux-2.6.27.19-5.1/fs/novfs/profile.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/profile.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/profile.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/profile.c Wed May 06 16:56:50 2009 +0100
@@ -0,0 +1,710 @@
+/*
+ * Novell NCP Redirector for Linux
+}
+
+
-diff -purN linux-2.6.27/fs/novfs/scope.c linux-2.6.27.19-5.1/fs/novfs/scope.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/scope.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/scope.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/scope.c Wed May 06 16:56:50 2009 +0100
@@ -0,0 +1,659 @@
+/*
+ * Novell NCP Redirector for Linux
+}
+
+
-diff -purN linux-2.6.27/fs/novfs/vfs.h linux-2.6.27.19-5.1/fs/novfs/vfs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/vfs.h 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/vfs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/vfs.h Wed May 06 16:56:50 2009 +0100
@@ -0,0 +1,451 @@
+/*
+ * Novell NCP Redirector for Linux
+
+#endif /* __NOVFS_H */
+
-diff -purN linux-2.6.27/fs/ocfs2/Makefile linux-2.6.27.19-5.1/fs/ocfs2/Makefile
---- linux-2.6.27/fs/ocfs2/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/Makefile 2009-03-25 16:11:38.000000000 +0000
-@@ -34,7 +34,14 @@ ocfs2-objs := \
+diff -r 9608d5473017 fs/ocfs2/Makefile
+--- a/fs/ocfs2/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/Makefile Wed May 06 16:56:51 2009 +0100
+@@ -34,7 +34,14 @@
symlink.o \
sysfile.o \
uptodate.o \
ocfs2_stackglue-objs := stackglue.o
ocfs2_stack_o2cb-objs := stack_o2cb.o
-diff -purN linux-2.6.27/fs/ocfs2/acl.c linux-2.6.27.19-5.1/fs/ocfs2/acl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/acl.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/acl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/acl.c Wed May 06 16:56:51 2009 +0100
@@ -0,0 +1,479 @@
+/* -*- mode: c; c-basic-offset: 8; -*-
+ * vim: noexpandtab sw=8 ts=8 sts=0:
+ .get = ocfs2_xattr_get_acl_default,
+ .set = ocfs2_xattr_set_acl_default,
+};
-diff -purN linux-2.6.27/fs/ocfs2/acl.h linux-2.6.27.19-5.1/fs/ocfs2/acl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/acl.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/acl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/acl.h Wed May 06 16:56:51 2009 +0100
@@ -0,0 +1,58 @@
+/* -*- mode: c; c-basic-offset: 8; -*-
+ * vim: noexpandtab sw=8 ts=8 sts=0:
+#endif /* CONFIG_OCFS2_FS_POSIX_ACL*/
+
+#endif /* OCFS2_ACL_H */
-diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
---- linux-2.6.27/fs/ocfs2/alloc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/alloc.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/alloc.c
+--- a/fs/ocfs2/alloc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/alloc.c Wed May 06 16:56:51 2009 +0100
@@ -28,6 +28,7 @@
#include <linux/slab.h>
#include <linux/highmem.h>
static void ocfs2_free_truncate_context(struct ocfs2_truncate_context *tc);
static int ocfs2_cache_extent_block_free(struct ocfs2_cached_dealloc_ctxt *ctxt,
struct ocfs2_extent_block *eb);
-@@ -205,17 +540,6 @@ static struct ocfs2_path *ocfs2_new_path
+@@ -205,17 +540,6 @@
}
/*
* Convenience function to journal all components in a path.
*/
static int ocfs2_journal_access_path(struct inode *inode, handle_t *handle,
-@@ -368,39 +692,35 @@ struct ocfs2_merge_ctxt {
+@@ -368,39 +692,35 @@
*/
int ocfs2_num_free_extents(struct ocfs2_super *osb,
struct inode *inode,
+ struct ocfs2_extent_list *el = NULL;
struct ocfs2_extent_block *eb;
struct buffer_head *eb_bh = NULL;
-+ u64 last_eb_blk = 0;
-
- mlog_entry_void();
-
+-
+- mlog_entry_void();
+-
- if (!OCFS2_IS_VALID_DINODE(fe)) {
- OCFS2_RO_ON_INVALID_DINODE(inode->i_sb, fe);
- retval = -EIO;
- goto bail;
- }
-+ el = et->et_root_el;
-+ last_eb_blk = ocfs2_et_get_last_eb_blk(et);
-
+-
- if (fe->i_last_eb_blk) {
- retval = ocfs2_read_block(osb, le64_to_cpu(fe->i_last_eb_blk),
- &eb_bh, OCFS2_BH_CACHED, inode);
++ u64 last_eb_blk = 0;
++
++ mlog_entry_void();
++
++ el = et->et_root_el;
++ last_eb_blk = ocfs2_et_get_last_eb_blk(et);
++
+ if (last_eb_blk) {
+ retval = ocfs2_read_block(inode, last_eb_blk,
+ &eb_bh);
mlog_exit(retval);
return retval;
-@@ -486,8 +806,7 @@ static int ocfs2_create_new_meta_bhs(str
+@@ -486,8 +806,7 @@
bail:
if (status < 0) {
for(i = 0; i < wanted; i++) {
bhs[i] = NULL;
}
}
-@@ -531,7 +850,7 @@ static inline u32 ocfs2_sum_rightmost_re
+@@ -531,7 +850,7 @@
static int ocfs2_add_branch(struct ocfs2_super *osb,
handle_t *handle,
struct inode *inode,
struct buffer_head *eb_bh,
struct buffer_head **last_eb_bh,
struct ocfs2_alloc_context *meta_ac)
-@@ -540,7 +859,6 @@ static int ocfs2_add_branch(struct ocfs2
+@@ -540,7 +859,6 @@
u64 next_blkno, new_last_eb_blk;
struct buffer_head *bh;
struct buffer_head **new_eb_bhs = NULL;
struct ocfs2_extent_block *eb;
struct ocfs2_extent_list *eb_el;
struct ocfs2_extent_list *el;
-@@ -550,13 +868,11 @@ static int ocfs2_add_branch(struct ocfs2
+@@ -549,14 +867,12 @@
+ mlog_entry_void();
BUG_ON(!last_eb_bh || !*last_eb_bh);
-
-- fe = (struct ocfs2_dinode *) fe_bh->b_data;
-
+- fe = (struct ocfs2_dinode *) fe_bh->b_data;
+
if (eb_bh) {
eb = (struct ocfs2_extent_block *) eb_bh->b_data;
el = &eb->h_list;
/* we never add a branch to a leaf. */
BUG_ON(!el->l_tree_depth);
-@@ -646,7 +962,7 @@ static int ocfs2_add_branch(struct ocfs2
+@@ -646,7 +962,7 @@
mlog_errno(status);
goto bail;
}
OCFS2_JOURNAL_ACCESS_WRITE);
if (status < 0) {
mlog_errno(status);
-@@ -662,7 +978,7 @@ static int ocfs2_add_branch(struct ocfs2
+@@ -662,7 +978,7 @@
}
/* Link the new branch into the rest of the tree (el will
i = le16_to_cpu(el->l_next_free_rec);
el->l_recs[i].e_blkno = cpu_to_le64(next_blkno);
el->l_recs[i].e_cpos = cpu_to_le32(new_cpos);
-@@ -671,7 +987,7 @@ static int ocfs2_add_branch(struct ocfs2
+@@ -671,7 +987,7 @@
/* fe needs a new last extent block pointer, as does the
* next_leaf on the previously last-extent-block. */
eb = (struct ocfs2_extent_block *) (*last_eb_bh)->b_data;
eb->h_next_leaf_blk = cpu_to_le64(new_last_eb_blk);
-@@ -679,7 +995,7 @@ static int ocfs2_add_branch(struct ocfs2
+@@ -679,7 +995,7 @@
status = ocfs2_journal_dirty(handle, *last_eb_bh);
if (status < 0)
mlog_errno(status);
if (status < 0)
mlog_errno(status);
if (eb_bh) {
-@@ -700,8 +1016,7 @@ static int ocfs2_add_branch(struct ocfs2
+@@ -700,8 +1016,7 @@
bail:
if (new_eb_bhs) {
for (i = 0; i < new_blocks; i++)
kfree(new_eb_bhs);
}
-@@ -717,16 +1032,15 @@ bail:
+@@ -717,16 +1032,15 @@
static int ocfs2_shift_tree_depth(struct ocfs2_super *osb,
handle_t *handle,
struct inode *inode,
u32 new_clusters;
struct buffer_head *new_eb_bh = NULL;
- struct ocfs2_dinode *fe;
- struct ocfs2_extent_block *eb;
+- struct ocfs2_extent_block *eb;
- struct ocfs2_extent_list *fe_el;
++ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_list *root_el;
struct ocfs2_extent_list *eb_el;
mlog_entry_void();
-@@ -746,8 +1060,7 @@ static int ocfs2_shift_tree_depth(struct
+@@ -746,8 +1060,7 @@
}
eb_el = &eb->h_list;
status = ocfs2_journal_access(handle, inode, new_eb_bh,
OCFS2_JOURNAL_ACCESS_CREATE);
-@@ -756,11 +1069,11 @@ static int ocfs2_shift_tree_depth(struct
+@@ -756,11 +1069,11 @@
goto bail;
}
status = ocfs2_journal_dirty(handle, new_eb_bh);
if (status < 0) {
-@@ -768,7 +1081,7 @@ static int ocfs2_shift_tree_depth(struct
+@@ -768,7 +1081,7 @@
goto bail;
}
OCFS2_JOURNAL_ACCESS_WRITE);
if (status < 0) {
mlog_errno(status);
-@@ -777,21 +1090,21 @@ static int ocfs2_shift_tree_depth(struct
+@@ -777,21 +1090,21 @@
new_clusters = ocfs2_sum_rightmost_rec(eb_el);
* becomes the allocated extent block */
- if (fe_el->l_tree_depth == cpu_to_le16(1))
- fe->i_last_eb_blk = eb->h_blkno;
+-
+- status = ocfs2_journal_dirty(handle, fe_bh);
+ if (root_el->l_tree_depth == cpu_to_le16(1))
+ ocfs2_et_set_last_eb_blk(et, le64_to_cpu(eb->h_blkno));
-
-- status = ocfs2_journal_dirty(handle, fe_bh);
++
+ status = ocfs2_journal_dirty(handle, et->et_root_bh);
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -801,8 +1114,7 @@ static int ocfs2_shift_tree_depth(struct
+@@ -801,8 +1114,7 @@
new_eb_bh = NULL;
status = 0;
bail:
mlog_exit(status);
return status;
-@@ -817,22 +1129,21 @@ bail:
+@@ -817,22 +1129,21 @@
* 1) a lowest extent block is found, then we pass it back in
* *lowest_eb_bh and return '0'
*
struct ocfs2_extent_block *eb;
struct ocfs2_extent_list *el;
struct buffer_head *bh = NULL;
-@@ -842,8 +1153,7 @@ static int ocfs2_find_branch_target(stru
+@@ -842,8 +1153,7 @@
*target_bh = NULL;
while(le16_to_cpu(el->l_tree_depth) > 1) {
if (le16_to_cpu(el->l_next_free_rec) == 0) {
-@@ -864,13 +1174,10 @@ static int ocfs2_find_branch_target(stru
+@@ -864,13 +1174,10 @@
goto bail;
}
- brelse(bh);
- bh = NULL;
- }
-+ brelse(bh);
-+ bh = NULL;
-
+-
- status = ocfs2_read_block(osb, blkno, &bh, OCFS2_BH_CACHED,
- inode);
++ brelse(bh);
++ bh = NULL;
++
+ status = ocfs2_read_block(inode, blkno, &bh);
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -886,8 +1193,7 @@ static int ocfs2_find_branch_target(stru
+@@ -886,8 +1193,7 @@
if (le16_to_cpu(el->l_next_free_rec) <
le16_to_cpu(el->l_count)) {
lowest_bh = bh;
get_bh(lowest_bh);
}
-@@ -895,14 +1201,13 @@ static int ocfs2_find_branch_target(stru
+@@ -895,14 +1201,13 @@
/* If we didn't find one and the fe doesn't have any room,
* then return '1' */
mlog_exit(status);
return status;
-@@ -919,19 +1224,19 @@ bail:
+@@ -919,19 +1224,19 @@
* *last_eb_bh will be updated by ocfs2_add_branch().
*/
static int ocfs2_grow_tree(struct inode *inode, handle_t *handle,
if (shift < 0) {
ret = shift;
mlog_errno(ret);
-@@ -948,7 +1253,7 @@ static int ocfs2_grow_tree(struct inode
+@@ -948,7 +1253,7 @@
/* ocfs2_shift_tree_depth will return us a buffer with
* the new extent block (so we can pass that to
* ocfs2_add_branch). */
meta_ac, &bh);
if (ret < 0) {
mlog_errno(ret);
-@@ -975,7 +1280,7 @@ static int ocfs2_grow_tree(struct inode
+@@ -975,7 +1280,7 @@
/* call ocfs2_add_branch to add the final part of the tree with
* the new data. */
mlog(0, "add branch. bh = %p\n", bh);
meta_ac);
if (ret < 0) {
mlog_errno(ret);
-@@ -1245,8 +1550,7 @@ static int __ocfs2_find_path(struct inod
+@@ -1245,8 +1550,7 @@
brelse(bh);
bh = NULL;
if (ret) {
mlog_errno(ret);
goto out;
-@@ -2067,11 +2371,11 @@ static int ocfs2_rotate_subtree_left(str
+@@ -2067,11 +2371,11 @@
struct ocfs2_path *right_path,
int subtree_index,
struct ocfs2_cached_dealloc_ctxt *dealloc,
struct ocfs2_extent_list *right_leaf_el, *left_leaf_el;
struct ocfs2_extent_block *eb;
-@@ -2123,7 +2427,7 @@ static int ocfs2_rotate_subtree_left(str
+@@ -2123,7 +2427,7 @@
* We have to update i_last_eb_blk during the meta
* data delete.
*/
OCFS2_JOURNAL_ACCESS_WRITE);
if (ret) {
mlog_errno(ret);
-@@ -2198,7 +2502,7 @@ static int ocfs2_rotate_subtree_left(str
+@@ -2198,7 +2502,7 @@
ocfs2_update_edge_lengths(inode, handle, left_path);
eb = (struct ocfs2_extent_block *)path_leaf_bh(left_path)->b_data;
/*
* Removal of the extent in the left leaf was skipped
-@@ -2208,7 +2512,7 @@ static int ocfs2_rotate_subtree_left(str
+@@ -2208,7 +2512,7 @@
if (right_has_empty)
ocfs2_remove_empty_extent(left_leaf_el);
if (ret)
mlog_errno(ret);
-@@ -2331,7 +2635,8 @@ static int __ocfs2_rotate_tree_left(stru
+@@ -2331,7 +2635,8 @@
handle_t *handle, int orig_credits,
struct ocfs2_path *path,
struct ocfs2_cached_dealloc_ctxt *dealloc,
{
int ret, subtree_root, deleted;
u32 right_cpos;
-@@ -2404,7 +2709,7 @@ static int __ocfs2_rotate_tree_left(stru
+@@ -2404,7 +2709,7 @@
ret = ocfs2_rotate_subtree_left(inode, handle, left_path,
right_path, subtree_root,
if (ret == -EAGAIN) {
/*
* The rotation has to temporarily stop due to
-@@ -2447,29 +2752,20 @@ out:
+@@ -2447,29 +2752,20 @@
}
static int ocfs2_remove_rightmost_path(struct inode *inode, handle_t *handle,
u32 cpos;
struct ocfs2_path *left_path = NULL;
- struct ocfs2_dinode *di;
- struct ocfs2_extent_block *eb;
- struct ocfs2_extent_list *el;
-
+- struct ocfs2_extent_block *eb;
+- struct ocfs2_extent_list *el;
+-
- /*
- * XXX: This code assumes that the root is an inode, which is
- * true for now but may change as tree code gets generic.
- (unsigned long long)OCFS2_I(inode)->ip_blkno);
- goto out;
- }
-
+-
++ struct ocfs2_extent_block *eb;
++ struct ocfs2_extent_list *el;
++
++
+ ret = ocfs2_et_sanity_check(inode, et);
+ if (ret)
+ goto out;
/*
* There's two ways we handle this depending on
* whether path is the only existing one.
-@@ -2526,7 +2822,7 @@ static int ocfs2_remove_rightmost_path(s
+@@ -2526,7 +2822,7 @@
ocfs2_update_edge_lengths(inode, handle, left_path);
eb = (struct ocfs2_extent_block *)path_leaf_bh(left_path)->b_data;
} else {
/*
* 'path' is also the leftmost path which
-@@ -2537,12 +2833,12 @@ static int ocfs2_remove_rightmost_path(s
+@@ -2537,12 +2833,12 @@
*/
ocfs2_unlink_path(inode, handle, dealloc, path, 1);
}
ocfs2_journal_dirty(handle, path_root_bh(path));
-@@ -2570,7 +2866,8 @@ out:
+@@ -2570,7 +2866,8 @@
*/
static int ocfs2_rotate_tree_left(struct inode *inode, handle_t *handle,
struct ocfs2_path *path,
{
int ret, orig_credits = handle->h_buffer_credits;
struct ocfs2_path *tmp_path = NULL, *restart_path = NULL;
-@@ -2584,7 +2881,7 @@ static int ocfs2_rotate_tree_left(struct
+@@ -2584,7 +2881,7 @@
if (path->p_tree_depth == 0) {
rightmost_no_delete:
/*
* it up front.
*/
ret = ocfs2_rotate_rightmost_leaf_left(inode, handle,
-@@ -2638,7 +2935,7 @@ rightmost_no_delete:
+@@ -2638,7 +2935,7 @@
*/
ret = ocfs2_remove_rightmost_path(inode, handle, path,
if (ret)
mlog_errno(ret);
goto out;
-@@ -2650,7 +2947,7 @@ rightmost_no_delete:
+@@ -2650,7 +2947,7 @@
*/
try_rotate:
ret = __ocfs2_rotate_tree_left(inode, handle, orig_credits, path,
if (ret && ret != -EAGAIN) {
mlog_errno(ret);
goto out;
-@@ -2662,7 +2959,7 @@ try_rotate:
+@@ -2662,7 +2959,7 @@
ret = __ocfs2_rotate_tree_left(inode, handle, orig_credits,
tmp_path, dealloc,
if (ret && ret != -EAGAIN) {
mlog_errno(ret);
goto out;
-@@ -2948,6 +3245,7 @@ static int ocfs2_merge_rec_left(struct i
+@@ -2948,6 +3245,7 @@
handle_t *handle,
struct ocfs2_extent_rec *split_rec,
struct ocfs2_cached_dealloc_ctxt *dealloc,
int index)
{
int ret, i, subtree_index = 0, has_empty_extent = 0;
-@@ -3068,7 +3366,8 @@ static int ocfs2_merge_rec_left(struct i
+@@ -3068,7 +3366,8 @@
le16_to_cpu(el->l_next_free_rec) == 1) {
ret = ocfs2_remove_rightmost_path(inode, handle,
if (ret) {
mlog_errno(ret);
goto out;
-@@ -3095,7 +3394,8 @@ static int ocfs2_try_to_merge_extent(str
+@@ -3095,7 +3394,8 @@
int split_index,
struct ocfs2_extent_rec *split_rec,
struct ocfs2_cached_dealloc_ctxt *dealloc,
{
int ret = 0;
-@@ -3113,7 +3413,7 @@ static int ocfs2_try_to_merge_extent(str
+@@ -3113,7 +3413,7 @@
* illegal.
*/
ret = ocfs2_rotate_tree_left(inode, handle, path,
if (ret) {
mlog_errno(ret);
goto out;
-@@ -3156,7 +3456,8 @@ static int ocfs2_try_to_merge_extent(str
+@@ -3156,7 +3456,8 @@
BUG_ON(!ocfs2_is_empty_extent(&el->l_recs[0]));
/* The merge left us with an empty extent, remove it. */
if (ret) {
mlog_errno(ret);
goto out;
-@@ -3170,7 +3471,7 @@ static int ocfs2_try_to_merge_extent(str
+@@ -3170,7 +3471,7 @@
*/
ret = ocfs2_merge_rec_left(inode, path,
handle, rec,
split_index);
if (ret) {
-@@ -3179,7 +3480,7 @@ static int ocfs2_try_to_merge_extent(str
+@@ -3179,7 +3480,7 @@
}
ret = ocfs2_rotate_tree_left(inode, handle, path,
/*
* Error from this last rotate is not critical, so
* print but don't bubble it up.
-@@ -3199,7 +3500,7 @@ static int ocfs2_try_to_merge_extent(str
+@@ -3199,7 +3500,7 @@
ret = ocfs2_merge_rec_left(inode,
path,
handle, split_rec,
split_index);
if (ret) {
mlog_errno(ret);
-@@ -3222,7 +3523,7 @@ static int ocfs2_try_to_merge_extent(str
+@@ -3222,7 +3523,7 @@
* our leaf. Try to rotate it away.
*/
ret = ocfs2_rotate_tree_left(inode, handle, path,
if (ret)
mlog_errno(ret);
ret = 0;
-@@ -3356,16 +3657,6 @@ rotate:
+@@ -3354,16 +3655,6 @@
+ * extent record, or by virtue of an l_next_rec < l_count.
+ */
ocfs2_rotate_leaf(el, insert_rec);
- }
-
+-}
+-
-static inline void ocfs2_update_dinode_clusters(struct inode *inode,
- struct ocfs2_dinode *di,
- u32 clusters)
- spin_lock(&OCFS2_I(inode)->ip_lock);
- OCFS2_I(inode)->ip_clusters = le32_to_cpu(di->i_clusters);
- spin_unlock(&OCFS2_I(inode)->ip_lock);
--}
--
+ }
+
static void ocfs2_adjust_rightmost_records(struct inode *inode,
- handle_t *handle,
- struct ocfs2_path *path,
-@@ -3567,8 +3858,8 @@ static void ocfs2_split_record(struct in
+@@ -3567,8 +3858,8 @@
}
/*
*
* right_path is the path we want to do the actual insert
* in. left_path should only be passed in if we need to update that
-@@ -3665,7 +3956,7 @@ out:
+@@ -3665,7 +3956,7 @@
static int ocfs2_do_insert_extent(struct inode *inode,
handle_t *handle,
struct ocfs2_extent_rec *insert_rec,
struct ocfs2_insert_type *type)
{
-@@ -3673,13 +3964,11 @@ static int ocfs2_do_insert_extent(struct
+@@ -3673,13 +3964,11 @@
u32 cpos;
struct ocfs2_path *right_path = NULL;
struct ocfs2_path *left_path = NULL;
- struct ocfs2_dinode *di;
- struct ocfs2_extent_list *el;
-
+- struct ocfs2_extent_list *el;
+-
- di = (struct ocfs2_dinode *) di_bh->b_data;
- el = &di->id2.i_list;
-+ el = et->et_root_el;
-
+-
- ret = ocfs2_journal_access(handle, inode, di_bh,
++ struct ocfs2_extent_list *el;
++
++ el = et->et_root_el;
++
+ ret = ocfs2_journal_access(handle, inode, et->et_root_bh,
OCFS2_JOURNAL_ACCESS_WRITE);
if (ret) {
mlog_errno(ret);
-@@ -3691,7 +3980,7 @@ static int ocfs2_do_insert_extent(struct
+@@ -3691,7 +3980,7 @@
goto out_update_clusters;
}
if (!right_path) {
ret = -ENOMEM;
mlog_errno(ret);
-@@ -3741,7 +4030,7 @@ static int ocfs2_do_insert_extent(struct
+@@ -3741,7 +4030,7 @@
* ocfs2_rotate_tree_right() might have extended the
* transaction without re-journaling our tree root.
*/
OCFS2_JOURNAL_ACCESS_WRITE);
if (ret) {
mlog_errno(ret);
-@@ -3766,10 +4055,10 @@ static int ocfs2_do_insert_extent(struct
+@@ -3766,10 +4055,10 @@
out_update_clusters:
if (type->ins_split == SPLIT_NONE)
- ocfs2_update_dinode_clusters(inode, di,
- le16_to_cpu(insert_rec->e_leaf_clusters));
+-
+- ret = ocfs2_journal_dirty(handle, di_bh);
+ ocfs2_et_update_clusters(inode, et,
+ le16_to_cpu(insert_rec->e_leaf_clusters));
-
-- ret = ocfs2_journal_dirty(handle, di_bh);
++
+ ret = ocfs2_journal_dirty(handle, et->et_root_bh);
if (ret)
mlog_errno(ret);
-@@ -3899,7 +4188,8 @@ out:
+@@ -3899,7 +4188,8 @@
static void ocfs2_figure_contig_type(struct inode *inode,
struct ocfs2_insert_type *insert,
struct ocfs2_extent_list *el,
{
int i;
enum ocfs2_contig_type contig_type = CONTIG_NONE;
-@@ -3915,6 +4205,21 @@ static void ocfs2_figure_contig_type(str
+@@ -3915,6 +4205,21 @@
}
}
insert->ins_contig = contig_type;
}
/*
-@@ -3923,8 +4228,8 @@ static void ocfs2_figure_contig_type(str
+@@ -3923,8 +4228,8 @@
* ocfs2_figure_appending_type() will figure out whether we'll have to
* insert at the tail of the rightmost leaf.
*
* then the logic here makes sense.
*/
static void ocfs2_figure_appending_type(struct ocfs2_insert_type *insert,
-@@ -3975,14 +4280,13 @@ set_tail_append:
+@@ -3975,14 +4280,13 @@
* structure.
*/
static int ocfs2_figure_insert_type(struct inode *inode,
struct ocfs2_extent_block *eb;
struct ocfs2_extent_list *el;
struct ocfs2_path *path = NULL;
-@@ -3990,7 +4294,7 @@ static int ocfs2_figure_insert_type(stru
+@@ -3990,7 +4294,7 @@
insert->ins_split = SPLIT_NONE;
insert->ins_tree_depth = le16_to_cpu(el->l_tree_depth);
if (el->l_tree_depth) {
-@@ -4000,9 +4304,7 @@ static int ocfs2_figure_insert_type(stru
+@@ -4000,9 +4304,7 @@
* ocfs2_figure_insert_type() and ocfs2_add_branch()
* may want it later.
*/
if (ret) {
mlog_exit(ret);
goto out;
-@@ -4023,12 +4325,12 @@ static int ocfs2_figure_insert_type(stru
+@@ -4023,12 +4325,12 @@
le16_to_cpu(el->l_next_free_rec);
if (!insert->ins_tree_depth) {
if (!path) {
ret = -ENOMEM;
mlog_errno(ret);
-@@ -4057,7 +4359,7 @@ static int ocfs2_figure_insert_type(stru
+@@ -4057,7 +4359,7 @@
* into two types of appends: simple record append, or a
* rotate inside the tail leaf.
*/
/*
* The insert code isn't quite ready to deal with all cases of
-@@ -4078,7 +4380,8 @@ static int ocfs2_figure_insert_type(stru
+@@ -4078,7 +4380,8 @@
* the case that we're doing a tail append, so maybe we can
* take advantage of that information somehow.
*/
/*
* Ok, ocfs2_find_path() returned us the rightmost
* tree path. This might be an appending insert. There are
-@@ -4108,7 +4411,7 @@ out:
+@@ -4108,7 +4411,7 @@
int ocfs2_insert_extent(struct ocfs2_super *osb,
handle_t *handle,
struct inode *inode,
u32 cpos,
u64 start_blk,
u32 new_clusters,
-@@ -4121,26 +4424,21 @@ int ocfs2_insert_extent(struct ocfs2_sup
+@@ -4121,26 +4424,21 @@
struct ocfs2_insert_type insert = {0, };
struct ocfs2_extent_rec rec;
-
mlog(0, "add %u clusters at position %u to inode %llu\n",
new_clusters, cpos, (unsigned long long)OCFS2_I(inode)->ip_blkno);
-
+-
- mlog_bug_on_msg(!ocfs2_sparse_alloc(osb) &&
- (OCFS2_I(inode)->ip_clusters != cpos),
- "Device %s, asking for sparse allocation: inode %llu, "
- osb->dev_str,
- (unsigned long long)OCFS2_I(inode)->ip_blkno, cpos,
- OCFS2_I(inode)->ip_clusters);
--
+
memset(&rec, 0, sizeof(rec));
rec.e_cpos = cpu_to_le32(cpos);
rec.e_blkno = cpu_to_le64(start_blk);
rec.e_leaf_clusters = cpu_to_le16(new_clusters);
rec.e_flags = flags;
+-
+- status = ocfs2_figure_insert_type(inode, fe_bh, &last_eb_bh, &rec,
+ status = ocfs2_et_insert_check(inode, et, &rec);
+ if (status) {
+ mlog_errno(status);
+ goto bail;
+ }
-
-- status = ocfs2_figure_insert_type(inode, fe_bh, &last_eb_bh, &rec,
++
+ status = ocfs2_figure_insert_type(inode, et, &last_eb_bh, &rec,
&free_records, &insert);
if (status < 0) {
mlog_errno(status);
-@@ -4154,7 +4452,7 @@ int ocfs2_insert_extent(struct ocfs2_sup
+@@ -4154,7 +4452,7 @@
free_records, insert.ins_tree_depth);
if (insert.ins_contig == CONTIG_NONE && free_records == 0) {
&insert.ins_tree_depth, &last_eb_bh,
meta_ac);
if (status) {
-@@ -4164,20 +4462,127 @@ int ocfs2_insert_extent(struct ocfs2_sup
+@@ -4164,17 +4462,124 @@
}
/* Finally, we can add clusters. This might rotate the tree for us. */
bail:
- if (last_eb_bh)
- brelse(last_eb_bh);
+-
+- mlog_exit(status);
+ brelse(last_eb_bh);
-
- mlog_exit(status);
- return status;
- }
-
++
++ mlog_exit(status);
++ return status;
++}
++
+/*
+ * Allcate and add clusters into the extent b-tree.
+ * The new clusters(clusters_to_add) will be inserted at logical_offset.
+ mlog_exit(status);
+ if (reason_ret)
+ *reason_ret = reason;
-+ return status;
-+}
-+
- static void ocfs2_make_right_split_rec(struct super_block *sb,
- struct ocfs2_extent_rec *split_rec,
- u32 cpos,
-@@ -4201,7 +4606,7 @@ static void ocfs2_make_right_split_rec(s
+ return status;
+ }
+
+@@ -4201,7 +4606,7 @@
static int ocfs2_split_and_insert(struct inode *inode,
handle_t *handle,
struct ocfs2_path *path,
struct buffer_head **last_eb_bh,
int split_index,
struct ocfs2_extent_rec *orig_split_rec,
-@@ -4215,7 +4620,6 @@ static int ocfs2_split_and_insert(struct
+@@ -4215,7 +4620,6 @@
struct ocfs2_extent_rec split_rec = *orig_split_rec;
struct ocfs2_insert_type insert;
struct ocfs2_extent_block *eb;
leftright:
/*
-@@ -4224,8 +4628,7 @@ leftright:
+@@ -4224,8 +4628,7 @@
*/
rec = path_leaf_el(path)->l_recs[split_index];
depth = le16_to_cpu(rightmost_el->l_tree_depth);
if (depth) {
-@@ -4236,8 +4639,8 @@ leftright:
+@@ -4236,8 +4639,8 @@
if (le16_to_cpu(rightmost_el->l_next_free_rec) ==
le16_to_cpu(rightmost_el->l_count)) {
if (ret) {
mlog_errno(ret);
goto out;
-@@ -4274,8 +4677,7 @@ leftright:
+@@ -4274,8 +4677,7 @@
do_leftright = 1;
}
if (ret) {
mlog_errno(ret);
goto out;
-@@ -4317,8 +4719,9 @@ out:
+@@ -4317,8 +4719,9 @@
* of the tree is required. All other cases will degrade into a less
* optimal tree layout.
*
*
* This code is optimized for readability - several passes might be
* made over certain portions of the tree. All of those blocks will
-@@ -4326,7 +4729,7 @@ out:
+@@ -4326,7 +4729,7 @@
* extra overhead is not expressed in terms of disk reads.
*/
static int __ocfs2_mark_extent_written(struct inode *inode,
handle_t *handle,
struct ocfs2_path *path,
int split_index,
-@@ -4366,11 +4769,9 @@ static int __ocfs2_mark_extent_written(s
+@@ -4366,11 +4769,9 @@
*/
if (path->p_tree_depth) {
struct ocfs2_extent_block *eb;
- struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data;
-
+-
- ret = ocfs2_read_block(OCFS2_SB(inode->i_sb),
- le64_to_cpu(di->i_last_eb_blk),
- &last_eb_bh, OCFS2_BH_CACHED, inode);
++
+ ret = ocfs2_read_block(inode, ocfs2_et_get_last_eb_blk(et),
+ &last_eb_bh);
if (ret) {
mlog_exit(ret);
goto out;
-@@ -4403,7 +4804,7 @@ static int __ocfs2_mark_extent_written(s
+@@ -4403,7 +4804,7 @@
if (ctxt.c_split_covers_rec)
el->l_recs[split_index] = *split_rec;
else
&last_eb_bh, split_index,
split_rec, meta_ac);
if (ret)
-@@ -4411,7 +4812,7 @@ static int __ocfs2_mark_extent_written(s
+@@ -4411,7 +4812,7 @@
} else {
ret = ocfs2_try_to_merge_extent(inode, handle, path,
split_index, split_rec,
if (ret)
mlog_errno(ret);
}
-@@ -4429,7 +4830,8 @@ out:
+@@ -4429,7 +4830,8 @@
*
* The caller is responsible for passing down meta_ac if we'll need it.
*/
handle_t *handle, u32 cpos, u32 len, u32 phys,
struct ocfs2_alloc_context *meta_ac,
struct ocfs2_cached_dealloc_ctxt *dealloc)
-@@ -4455,10 +4857,14 @@ int ocfs2_mark_extent_written(struct ino
+@@ -4455,10 +4857,14 @@
/*
* XXX: This should be fixed up so that we just re-insert the
* next extent records.
+- */
+- ocfs2_extent_map_trunc(inode, 0);
+-
+- left_path = ocfs2_new_inode_path(di_bh);
+ *
+ * XXX: This is a hack on the extent tree, maybe it should be
+ * an op?
- */
-- ocfs2_extent_map_trunc(inode, 0);
++ */
+ if (et->et_ops == &ocfs2_dinode_et_ops)
+ ocfs2_extent_map_trunc(inode, 0);
-
-- left_path = ocfs2_new_inode_path(di_bh);
++
+ left_path = ocfs2_new_path(et->et_root_bh, et->et_root_el);
if (!left_path) {
ret = -ENOMEM;
mlog_errno(ret);
-@@ -4489,8 +4895,9 @@ int ocfs2_mark_extent_written(struct ino
+@@ -4489,8 +4895,9 @@
split_rec.e_flags = path_leaf_el(left_path)->l_recs[index].e_flags;
split_rec.e_flags &= ~OCFS2_EXT_UNWRITTEN;
if (ret)
mlog_errno(ret);
-@@ -4499,13 +4906,12 @@ out:
+@@ -4499,13 +4906,12 @@
return ret;
}
struct buffer_head *last_eb_bh = NULL;
struct ocfs2_extent_block *eb;
struct ocfs2_extent_list *rightmost_el, *el;
-@@ -4522,9 +4928,8 @@ static int ocfs2_split_tree(struct inode
+@@ -4522,9 +4928,8 @@
depth = path->p_tree_depth;
if (depth > 0) {
if (ret < 0) {
mlog_errno(ret);
goto out;
-@@ -4535,7 +4940,8 @@ static int ocfs2_split_tree(struct inode
+@@ -4535,7 +4940,8 @@
} else
rightmost_el = path_leaf_el(path);
ret = ocfs2_extend_trans(handle, credits);
if (ret) {
mlog_errno(ret);
-@@ -4544,7 +4950,7 @@ static int ocfs2_split_tree(struct inode
+@@ -4544,7 +4950,7 @@
if (le16_to_cpu(rightmost_el->l_next_free_rec) ==
le16_to_cpu(rightmost_el->l_count)) {
meta_ac);
if (ret) {
mlog_errno(ret);
-@@ -4558,7 +4964,7 @@ static int ocfs2_split_tree(struct inode
+@@ -4558,7 +4964,7 @@
insert.ins_split = SPLIT_RIGHT;
insert.ins_tree_depth = depth;
if (ret)
mlog_errno(ret);
-@@ -4570,7 +4976,8 @@ out:
+@@ -4570,7 +4976,8 @@
static int ocfs2_truncate_rec(struct inode *inode, handle_t *handle,
struct ocfs2_path *path, int index,
struct ocfs2_cached_dealloc_ctxt *dealloc,
{
int ret;
u32 left_cpos, rec_range, trunc_range;
-@@ -4582,7 +4989,7 @@ static int ocfs2_truncate_rec(struct ino
+@@ -4582,7 +4989,7 @@
struct ocfs2_extent_block *eb;
if (ocfs2_is_empty_extent(&el->l_recs[0]) && index > 0) {
if (ret) {
mlog_errno(ret);
goto out;
-@@ -4713,7 +5120,7 @@ static int ocfs2_truncate_rec(struct ino
+@@ -4713,7 +5120,7 @@
ocfs2_journal_dirty(handle, path_leaf_bh(path));
if (ret) {
mlog_errno(ret);
goto out;
-@@ -4724,7 +5131,8 @@ out:
+@@ -4724,7 +5131,8 @@
return ret;
}
u32 cpos, u32 len, handle_t *handle,
struct ocfs2_alloc_context *meta_ac,
struct ocfs2_cached_dealloc_ctxt *dealloc)
-@@ -4733,11 +5141,11 @@ int ocfs2_remove_extent(struct inode *in
+@@ -4733,11 +5141,11 @@
u32 rec_range, trunc_range;
struct ocfs2_extent_rec *rec;
struct ocfs2_extent_list *el;
if (!path) {
ret = -ENOMEM;
mlog_errno(ret);
-@@ -4790,13 +5198,13 @@ int ocfs2_remove_extent(struct inode *in
+@@ -4790,13 +5198,13 @@
if (le32_to_cpu(rec->e_cpos) == cpos || rec_range == trunc_range) {
ret = ocfs2_truncate_rec(inode, handle, path, index, dealloc,
- cpos, len);
-+ cpos, len, et);
- if (ret) {
- mlog_errno(ret);
- goto out;
- }
- } else {
+- if (ret) {
+- mlog_errno(ret);
+- goto out;
+- }
+- } else {
- ret = ocfs2_split_tree(inode, di_bh, handle, path, index,
++ cpos, len, et);
++ if (ret) {
++ mlog_errno(ret);
++ goto out;
++ }
++ } else {
+ ret = ocfs2_split_tree(inode, et, handle, path, index,
trunc_range, meta_ac);
if (ret) {
mlog_errno(ret);
-@@ -4845,7 +5253,7 @@ int ocfs2_remove_extent(struct inode *in
+@@ -4845,7 +5253,7 @@
}
ret = ocfs2_truncate_rec(inode, handle, path, index, dealloc,
if (ret) {
mlog_errno(ret);
goto out;
-@@ -4857,6 +5265,78 @@ out:
- return ret;
- }
+@@ -4854,6 +5262,78 @@
+ out:
+ ocfs2_free_path(path);
++ return ret;
++}
++
+int ocfs2_remove_btree_range(struct inode *inode,
+ struct ocfs2_extent_tree *et,
+ u32 cpos, u32 phys_cpos, u32 len,
+ if (meta_ac)
+ ocfs2_free_alloc_context(meta_ac);
+
-+ return ret;
-+}
-+
- int ocfs2_truncate_log_needs_flush(struct ocfs2_super *osb)
- {
- struct buffer_head *tl_bh = osb->osb_tl_bh;
-@@ -5188,8 +5668,7 @@ static int ocfs2_get_truncate_log_info(s
+ return ret;
+ }
+
+@@ -5188,8 +5668,7 @@
goto bail;
}
if (status < 0) {
iput(inode);
mlog_errno(status);
-@@ -5264,8 +5743,7 @@ int ocfs2_begin_truncate_log_recovery(st
+@@ -5264,8 +5743,7 @@
bail:
if (tl_inode)
iput(tl_inode);
if (status < 0 && (*tl_copy)) {
kfree(*tl_copy);
-@@ -5404,7 +5882,10 @@ int ocfs2_truncate_log_init(struct ocfs2
+@@ -5404,7 +5882,10 @@
*/
/*
*/
struct ocfs2_cached_block_free {
struct ocfs2_cached_block_free *free_next;
-@@ -5419,10 +5900,10 @@ struct ocfs2_per_slot_free_list {
+@@ -5419,10 +5900,10 @@
struct ocfs2_cached_block_free *f_first;
};
{
int ret;
u64 bg_blkno;
-@@ -5497,6 +5978,82 @@ out:
+@@ -5497,6 +5978,82 @@
return ret;
}
int ocfs2_run_deallocs(struct ocfs2_super *osb,
struct ocfs2_cached_dealloc_ctxt *ctxt)
{
-@@ -5512,8 +6069,10 @@ int ocfs2_run_deallocs(struct ocfs2_supe
+@@ -5512,8 +6069,10 @@
if (fl->f_first) {
mlog(0, "Free items: (type %u, slot %d)\n",
fl->f_inode_type, fl->f_slot);
if (ret2)
mlog_errno(ret2);
if (!ret)
-@@ -5524,6 +6083,17 @@ int ocfs2_run_deallocs(struct ocfs2_supe
- kfree(fl);
- }
+@@ -5522,6 +6081,17 @@
+ ctxt->c_first_suballocator = fl->f_next_suballocator;
+ kfree(fl);
++ }
++
+ if (ctxt->c_global_allocator) {
+ ret2 = ocfs2_free_cached_clusters(osb,
+ ctxt->c_global_allocator);
+ ret = ret2;
+
+ ctxt->c_global_allocator = NULL;
-+ }
-+
- return ret;
- }
+ }
-@@ -5954,6 +6524,8 @@ static int ocfs2_do_truncate(struct ocfs
+ return ret;
+@@ -5954,6 +6524,8 @@
goto bail;
}
spin_lock(&OCFS2_I(inode)->ip_lock);
OCFS2_I(inode)->ip_clusters = le32_to_cpu(fe->i_clusters) -
clusters_to_del;
-@@ -6008,20 +6580,13 @@ bail:
+@@ -6008,20 +6580,13 @@
return status;
}
static void ocfs2_map_and_dirty_page(struct inode *inode, handle_t *handle,
unsigned int from, unsigned int to,
struct page *page, int zero, u64 *phys)
-@@ -6040,17 +6605,18 @@ static void ocfs2_map_and_dirty_page(str
+@@ -6040,17 +6605,18 @@
* here if they aren't - ocfs2_map_page_blocks()
* might've skipped some
*/
if (ret < 0)
mlog_errno(ret);
}
-@@ -6215,20 +6781,29 @@ out:
+@@ -6215,20 +6781,29 @@
return ret;
}
+ struct ocfs2_dinode *di)
{
unsigned int blocksize = 1 << inode->i_sb->s_blocksize_bits;
-+ unsigned int xattrsize = le16_to_cpu(di->i_xattr_inline_size);
-
+-
- memset(&di->id2, 0, blocksize - offsetof(struct ocfs2_dinode, id2));
++ unsigned int xattrsize = le16_to_cpu(di->i_xattr_inline_size);
++
+ if (le16_to_cpu(di->i_dyn_features) & OCFS2_INLINE_XATTR_FL)
+ memset(&di->id2, 0, blocksize -
+ offsetof(struct ocfs2_dinode, id2) -
}
void ocfs2_set_inode_data_inline(struct inode *inode, struct ocfs2_dinode *di)
-@@ -6245,9 +6820,10 @@ void ocfs2_set_inode_data_inline(struct
+@@ -6245,9 +6820,10 @@
* We clear the entire i_data structure here so that all
* fields can be properly initialized.
*/
- ocfs2_zero_dinode_id2(inode, di);
-+ ocfs2_zero_dinode_id2_with_xattr(inode, di);
-
+-
- idata->id_count = cpu_to_le16(ocfs2_max_inline_data(inode->i_sb));
++ ocfs2_zero_dinode_id2_with_xattr(inode, di);
++
+ idata->id_count = cpu_to_le16(
+ ocfs2_max_inline_data_with_xattr(inode->i_sb, di));
}
int ocfs2_convert_inline_data_to_extents(struct inode *inode,
-@@ -6262,6 +6838,8 @@ int ocfs2_convert_inline_data_to_extents
+@@ -6262,6 +6838,8 @@
struct ocfs2_alloc_context *data_ac = NULL;
struct page **pages = NULL;
loff_t end = osb->s_clustersize;
has_data = i_size_read(inode) ? 1 : 0;
-@@ -6281,7 +6859,8 @@ int ocfs2_convert_inline_data_to_extents
+@@ -6281,7 +6859,8 @@
}
}
if (IS_ERR(handle)) {
ret = PTR_ERR(handle);
mlog_errno(ret);
-@@ -6300,6 +6879,13 @@ int ocfs2_convert_inline_data_to_extents
+@@ -6300,6 +6879,13 @@
unsigned int page_end;
u64 phys;
ret = ocfs2_claim_clusters(osb, handle, data_ac, 1, &bit_off,
&num);
if (ret) {
-@@ -6361,7 +6947,8 @@ int ocfs2_convert_inline_data_to_extents
+@@ -6361,7 +6947,8 @@
* this proves to be false, we could always re-build
* the in-inode data from our pages.
*/
0, block, 1, 0, NULL);
if (ret) {
mlog_errno(ret);
-@@ -6372,6 +6959,10 @@ int ocfs2_convert_inline_data_to_extents
+@@ -6372,6 +6959,10 @@
}
out_commit:
ocfs2_commit_trans(osb, handle);
out_unlock:
-@@ -6404,13 +6995,14 @@ int ocfs2_commit_truncate(struct ocfs2_s
+@@ -6404,13 +6995,14 @@
handle_t *handle = NULL;
struct inode *tl_inode = osb->osb_tl_inode;
struct ocfs2_path *path = NULL;
if (!path) {
status = -ENOMEM;
mlog_errno(status);
-@@ -6581,8 +7173,8 @@ int ocfs2_prepare_truncate(struct ocfs2_
+@@ -6581,8 +7173,8 @@
ocfs2_init_dealloc_ctxt(&(*tc)->tc_dealloc);
if (fe->id2.i_list.l_tree_depth) {
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -6695,8 +7287,7 @@ static void ocfs2_free_truncate_context(
+@@ -6695,8 +7287,7 @@
mlog(ML_NOTICE,
"Truncate completion has non-empty dealloc context\n");
kfree(tc);
}
-diff -purN linux-2.6.27/fs/ocfs2/alloc.h linux-2.6.27.19-5.1/fs/ocfs2/alloc.h
---- linux-2.6.27/fs/ocfs2/alloc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/alloc.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/alloc.h
+--- a/fs/ocfs2/alloc.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/alloc.h Wed May 06 16:56:51 2009 +0100
@@ -26,30 +26,107 @@
#ifndef OCFS2_ALLOC_H
#define OCFS2_ALLOC_H
{
/*
* Rather than do all the work of determining how much we need
-@@ -59,7 +136,7 @@ static inline int ocfs2_extend_meta_need
+@@ -59,7 +136,7 @@
* new tree_depth==0 extent_block, and one block at the new
* top-of-the tree.
*/
}
void ocfs2_dinode_new_extent_list(struct inode *inode, struct ocfs2_dinode *di);
-@@ -95,10 +172,18 @@ int __ocfs2_flush_truncate_log(struct oc
+@@ -95,10 +172,18 @@
*/
struct ocfs2_cached_dealloc_ctxt {
struct ocfs2_per_slot_free_list *c_first_suballocator;
}
int ocfs2_run_deallocs(struct ocfs2_super *osb,
struct ocfs2_cached_dealloc_ctxt *ctxt);
-diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
---- linux-2.6.27/fs/ocfs2/aops.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/aops.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/aops.c
+--- a/fs/ocfs2/aops.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/aops.c Wed May 06 16:56:51 2009 +0100
@@ -27,6 +27,7 @@
#include <linux/swap.h>
#include <linux/pipe_fs_i.h>
#define MLOG_MASK_PREFIX ML_FILE_IO
#include <cluster/masklog.h>
-@@ -68,9 +69,7 @@ static int ocfs2_symlink_get_block(struc
+@@ -68,9 +69,7 @@
goto bail;
}
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -128,8 +127,7 @@ static int ocfs2_symlink_get_block(struc
+@@ -128,8 +127,7 @@
err = 0;
bail:
mlog_exit(err);
return err;
-@@ -261,13 +259,11 @@ static int ocfs2_readpage_inline(struct
+@@ -261,13 +259,11 @@
{
int ret;
struct buffer_head *di_bh = NULL;
if (ret) {
mlog_errno(ret);
goto out;
-@@ -485,11 +481,14 @@ handle_t *ocfs2_start_walk_page_trans(st
+@@ -485,11 +481,14 @@
}
if (ocfs2_should_order_data(inode)) {
mlog_errno(ret);
}
out:
-@@ -669,7 +668,7 @@ static void ocfs2_invalidatepage(struct
+@@ -669,7 +668,7 @@
{
journal_t *journal = OCFS2_SB(page->mapping->host->i_sb)->journal->j_journal;
}
static int ocfs2_releasepage(struct page *page, gfp_t wait)
-@@ -678,7 +677,7 @@ static int ocfs2_releasepage(struct page
+@@ -678,7 +677,7 @@
if (!page_has_buffers(page))
return 0;
}
static ssize_t ocfs2_direct_IO(int rw,
-@@ -1074,11 +1073,15 @@ static void ocfs2_write_failure(struct i
+@@ -1074,11 +1073,15 @@
tmppage = wc->w_pages[i];
if (page_has_buffers(tmppage)) {
block_commit_write(tmppage, from, to);
}
-@@ -1242,6 +1245,7 @@ static int ocfs2_write_cluster(struct ad
+@@ -1242,6 +1245,7 @@
int ret, i, new, should_zero = 0;
u64 v_blkno, p_blkno;
struct inode *inode = mapping->host;
new = phys == 0 ? 1 : 0;
if (new || unwritten)
-@@ -1255,10 +1259,10 @@ static int ocfs2_write_cluster(struct ad
+@@ -1255,10 +1259,10 @@
* any additional semaphores or cluster locks.
*/
tmp_pos = cpos;
/*
* This shouldn't happen because we must have already
* calculated the correct meta data allocation required. The
-@@ -1276,7 +1280,8 @@ static int ocfs2_write_cluster(struct ad
+@@ -1276,7 +1280,8 @@
goto out;
}
} else if (unwritten) {
wc->w_handle, cpos, 1, phys,
meta_ac, &wc->w_dealloc);
if (ret < 0) {
-@@ -1665,6 +1670,7 @@ int ocfs2_write_begin_nolock(struct addr
+@@ -1665,6 +1670,7 @@
struct ocfs2_alloc_context *data_ac = NULL;
struct ocfs2_alloc_context *meta_ac = NULL;
handle_t *handle;
ret = ocfs2_alloc_write_ctxt(&wc, osb, pos, len, di_bh);
if (ret) {
-@@ -1712,14 +1718,23 @@ int ocfs2_write_begin_nolock(struct addr
+@@ -1712,14 +1718,23 @@
* ocfs2_lock_allocators(). It greatly over-estimates
* the work to be done.
*/
clusters_to_alloc);
}
-@@ -1736,6 +1751,11 @@ int ocfs2_write_begin_nolock(struct addr
+@@ -1736,6 +1751,11 @@
wc->w_handle = handle;
/*
* We don't want this to fail in ocfs2_write_end(), so do it
* here.
-@@ -1744,7 +1764,7 @@ int ocfs2_write_begin_nolock(struct addr
+@@ -1744,7 +1764,7 @@
OCFS2_JOURNAL_ACCESS_WRITE);
if (ret) {
mlog_errno(ret);
}
/*
-@@ -1757,14 +1777,14 @@ int ocfs2_write_begin_nolock(struct addr
+@@ -1757,14 +1777,14 @@
mmap_page);
if (ret) {
mlog_errno(ret);
}
if (data_ac)
-@@ -1776,6 +1796,10 @@ success:
+@@ -1776,6 +1796,10 @@
*pagep = wc->w_target_page;
*fsdata = wc;
return 0;
out_commit:
ocfs2_commit_trans(osb, handle);
-@@ -1905,11 +1929,15 @@ int ocfs2_write_end_nolock(struct addres
+@@ -1905,11 +1929,15 @@
}
if (page_has_buffers(tmppage)) {
block_commit_write(tmppage, from, to);
}
}
-diff -purN linux-2.6.27/fs/ocfs2/buffer_head_io.c linux-2.6.27.19-5.1/fs/ocfs2/buffer_head_io.c
---- linux-2.6.27/fs/ocfs2/buffer_head_io.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/buffer_head_io.c 2009-03-25 16:11:38.000000000 +0000
-@@ -66,7 +66,7 @@ int ocfs2_write_block(struct ocfs2_super
+diff -r 9608d5473017 fs/ocfs2/buffer_head_io.c
+--- a/fs/ocfs2/buffer_head_io.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/buffer_head_io.c Wed May 06 16:56:51 2009 +0100
+@@ -66,7 +66,7 @@
/* remove from dirty list before I/O. */
clear_buffer_dirty(bh);
bh->b_end_io = end_buffer_write_sync;
submit_bh(WRITE, bh);
-@@ -88,22 +88,98 @@ out:
+@@ -88,22 +88,98 @@
return ret;
}
- struct inode *inode)
+int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block,
+ unsigned int nr, struct buffer_head *bhs[])
-+{
-+ int status = 0;
+ {
+ int status = 0;
+- struct super_block *sb;
+ unsigned int i;
+ struct buffer_head *bh;
+
+
+int ocfs2_read_blocks(struct inode *inode, u64 block, int nr,
+ struct buffer_head *bhs[], int flags)
- {
- int status = 0;
-- struct super_block *sb;
++{
++ int status = 0;
int i, ignore_cache = 0;
struct buffer_head *bh;
status = -EINVAL;
mlog_errno(status);
goto bail;
-@@ -122,26 +198,19 @@ int ocfs2_read_blocks(struct ocfs2_super
+@@ -122,26 +198,19 @@
goto bail;
}
/* There are three read-ahead cases here which we need to
* be concerned with. All three assume a buffer has
-@@ -167,26 +236,25 @@ int ocfs2_read_blocks(struct ocfs2_super
+@@ -167,26 +236,25 @@
* before our is-it-in-flight check.
*/
if (buffer_dirty(bh)) {
/* This should probably be a BUG, or
* at least return an error. */
-@@ -221,7 +289,7 @@ int ocfs2_read_blocks(struct ocfs2_super
+@@ -221,7 +289,7 @@
* previously read-ahead buffer may have
* completed I/O while we were waiting for the
* buffer lock. */
&& !(flags & OCFS2_BH_READAHEAD)
&& ocfs2_buffer_uptodate(inode, bh)) {
unlock_buffer(bh);
-@@ -265,15 +333,14 @@ int ocfs2_read_blocks(struct ocfs2_super
+@@ -265,15 +333,14 @@
/* Always set the buffer in the cache, even if it was
* a forced read, or read-ahead which hasn't yet
* completed. */
bail:
-diff -purN linux-2.6.27/fs/ocfs2/buffer_head_io.h linux-2.6.27.19-5.1/fs/ocfs2/buffer_head_io.h
---- linux-2.6.27/fs/ocfs2/buffer_head_io.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/buffer_head_io.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/buffer_head_io.h
+--- a/fs/ocfs2/buffer_head_io.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/buffer_head_io.h Wed May 06 16:56:51 2009 +0100
@@ -31,31 +31,29 @@
void ocfs2_end_buffer_io_sync(struct buffer_head *bh,
int uptodate);
{
int status = 0;
-@@ -65,8 +63,7 @@ static inline int ocfs2_read_block(struc
+@@ -65,8 +63,7 @@
goto bail;
}
bail:
return status;
-diff -purN linux-2.6.27/fs/ocfs2/cluster/masklog.c linux-2.6.27.19-5.1/fs/ocfs2/cluster/masklog.c
---- linux-2.6.27/fs/ocfs2/cluster/masklog.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/cluster/masklog.c 2009-03-25 16:11:38.000000000 +0000
-@@ -109,6 +109,7 @@ static struct mlog_attribute mlog_attrs[
+diff -r 9608d5473017 fs/ocfs2/cluster/masklog.c
+--- a/fs/ocfs2/cluster/masklog.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/cluster/masklog.c Wed May 06 16:56:51 2009 +0100
+@@ -109,6 +109,7 @@
define_mask(CONN),
define_mask(QUORUM),
define_mask(EXPORT),
define_mask(ERROR),
define_mask(NOTICE),
define_mask(KTHREAD),
-diff -purN linux-2.6.27/fs/ocfs2/cluster/masklog.h linux-2.6.27.19-5.1/fs/ocfs2/cluster/masklog.h
---- linux-2.6.27/fs/ocfs2/cluster/masklog.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/cluster/masklog.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/cluster/masklog.h
+--- a/fs/ocfs2/cluster/masklog.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/cluster/masklog.h Wed May 06 16:56:51 2009 +0100
@@ -112,6 +112,8 @@
#define ML_CONN 0x0000000004000000ULL /* net connection management */
#define ML_QUORUM 0x0000000008000000ULL /* net connection quorum */
/* bits that are infrequently given and frequently matched in the high word */
#define ML_ERROR 0x0000000100000000ULL /* sent to KERN_ERR */
#define ML_NOTICE 0x0000000200000000ULL /* setn to KERN_NOTICE */
-diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
---- linux-2.6.27/fs/ocfs2/dir.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/dir.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/dir.c
+--- a/fs/ocfs2/dir.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/dir.c Wed May 06 16:56:51 2009 +0100
@@ -40,6 +40,7 @@
#include <linux/types.h>
#include <linux/slab.h>
#define MLOG_MASK_PREFIX ML_NAMEI
#include <cluster/masklog.h>
-@@ -82,6 +83,49 @@ static int ocfs2_do_extend_dir(struct su
+@@ -81,6 +82,49 @@
+ struct ocfs2_alloc_context *data_ac,
struct ocfs2_alloc_context *meta_ac,
struct buffer_head **new_bh);
-
++
+struct buffer_head *ocfs2_bread(struct inode *inode,
+ int block, int *err, int reada)
+{
+ *err = -EIO;
+ return NULL;
+}
-+
+
/*
* bh passed here can be an inode block or a dir data block, depending
- * on the inode inline data flag.
-@@ -188,8 +232,7 @@ static struct buffer_head *ocfs2_find_en
+@@ -188,8 +232,7 @@
struct ocfs2_dinode *di;
struct ocfs2_inline_data *data;
if (ret) {
mlog_errno(ret);
goto out;
-@@ -260,14 +303,13 @@ restart:
+@@ -260,14 +303,13 @@
}
if ((bh = bh_use[ra_ptr++]) == NULL)
goto next;
goto next;
}
i = ocfs2_search_dirblock(bh, dir, name, namelen,
-@@ -417,8 +459,7 @@ static inline int ocfs2_delete_entry_id(
+@@ -417,8 +459,7 @@
struct ocfs2_dinode *di;
struct ocfs2_inline_data *data;
if (ret) {
mlog_errno(ret);
goto out;
-@@ -596,8 +637,7 @@ static int ocfs2_dir_foreach_blk_id(stru
+@@ -596,8 +637,7 @@
struct ocfs2_inline_data *data;
struct ocfs2_dir_entry *de;
if (ret) {
mlog(ML_ERROR, "Unable to read inode block for dir %llu\n",
(unsigned long long)OCFS2_I(inode)->ip_blkno);
-@@ -716,8 +756,7 @@ static int ocfs2_dir_foreach_blk_el(stru
+@@ -716,8 +756,7 @@
for (i = ra_sectors >> (sb->s_blocksize_bits - 9);
i > 0; i--) {
tmp = ocfs2_bread(inode, ++blk, &err, 1);
}
last_ra_blk = blk;
ra_sectors = 8;
-@@ -899,10 +938,8 @@ int ocfs2_find_files_on_disk(const char
+@@ -899,10 +938,8 @@
leave:
if (status < 0) {
*dirent = NULL;
}
mlog_exit(status);
-@@ -951,8 +988,7 @@ int ocfs2_check_dir_for_entry(struct ino
+@@ -951,8 +988,7 @@
ret = 0;
bail:
mlog_exit(ret);
return ret;
-@@ -1127,8 +1163,7 @@ static int ocfs2_fill_new_dir_el(struct
+@@ -1127,8 +1163,7 @@
status = 0;
bail:
mlog_exit(status);
return status;
-@@ -1182,9 +1217,9 @@ static int ocfs2_expand_inline_dir(struc
+@@ -1182,9 +1217,9 @@
unsigned int blocks_wanted,
struct buffer_head **first_block_bh)
{
u64 blkno, bytes = blocks_wanted << sb->s_blocksize_bits;
struct ocfs2_super *osb = OCFS2_SB(dir->i_sb);
struct ocfs2_inode_info *oi = OCFS2_I(dir);
-@@ -1192,6 +1227,10 @@ static int ocfs2_expand_inline_dir(struc
+@@ -1192,6 +1227,10 @@
struct buffer_head *dirdata_bh = NULL;
struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data;
handle_t *handle;
alloc = ocfs2_clusters_for_bytes(sb, bytes);
-@@ -1227,6 +1266,12 @@ static int ocfs2_expand_inline_dir(struc
+@@ -1227,6 +1266,12 @@
goto out_sem;
}
/*
* Try to claim as many clusters as the bitmap can give though
* if we only get one now, that's enough to continue. The rest
-@@ -1305,8 +1350,8 @@ static int ocfs2_expand_inline_dir(struc
+@@ -1305,8 +1350,8 @@
* This should never fail as our extent list is empty and all
* related blocks have been journaled already.
*/
if (ret) {
mlog_errno(ret);
goto out_commit;
-@@ -1337,8 +1382,8 @@ static int ocfs2_expand_inline_dir(struc
+@@ -1337,8 +1382,8 @@
}
blkno = ocfs2_clusters_to_blocks(dir->i_sb, bit_off);
if (ret) {
mlog_errno(ret);
goto out_commit;
-@@ -1349,6 +1394,9 @@ static int ocfs2_expand_inline_dir(struc
+@@ -1349,6 +1394,9 @@
dirdata_bh = NULL;
out_commit:
ocfs2_commit_trans(osb, handle);
out_sem:
-@@ -1373,7 +1421,7 @@ static int ocfs2_do_extend_dir(struct su
+@@ -1373,7 +1421,7 @@
struct buffer_head **new_bh)
{
int status;
u64 p_blkno, v_blkno;
spin_lock(&OCFS2_I(dir)->ip_lock);
-@@ -1383,9 +1431,16 @@ static int ocfs2_do_extend_dir(struct su
+@@ -1383,9 +1431,16 @@
if (extend) {
u32 offset = OCFS2_I(dir)->ip_clusters;
BUG_ON(status == -EAGAIN);
if (status < 0) {
mlog_errno(status);
-@@ -1408,6 +1463,8 @@ static int ocfs2_do_extend_dir(struct su
+@@ -1408,6 +1463,8 @@
}
status = 0;
bail:
mlog_exit(status);
return status;
}
-@@ -1430,12 +1487,14 @@ static int ocfs2_extend_dir(struct ocfs2
+@@ -1430,12 +1487,14 @@
int credits, num_free_extents, drop_alloc_sem = 0;
loff_t dir_i_size;
struct ocfs2_dinode *fe = (struct ocfs2_dinode *) parent_fe_bh->b_data;
mlog_entry_void();
-@@ -1479,7 +1538,8 @@ static int ocfs2_extend_dir(struct ocfs2
+@@ -1479,7 +1538,8 @@
spin_lock(&OCFS2_I(dir)->ip_lock);
if (dir_i_size == ocfs2_clusters_to_bytes(sb, OCFS2_I(dir)->ip_clusters)) {
spin_unlock(&OCFS2_I(dir)->ip_lock);
if (num_free_extents < 0) {
status = num_free_extents;
mlog_errno(status);
-@@ -1487,7 +1547,7 @@ static int ocfs2_extend_dir(struct ocfs2
+@@ -1487,7 +1547,7 @@
}
if (!num_free_extents) {
if (status < 0) {
if (status != -ENOSPC)
mlog_errno(status);
-@@ -1502,7 +1562,7 @@ static int ocfs2_extend_dir(struct ocfs2
+@@ -1502,7 +1562,7 @@
goto bail;
}
} else {
spin_unlock(&OCFS2_I(dir)->ip_lock);
credits = OCFS2_SIMPLE_DIR_EXTEND_CREDITS;
-@@ -1568,8 +1628,7 @@ bail:
+@@ -1568,8 +1628,7 @@
if (meta_ac)
ocfs2_free_alloc_context(meta_ac);
mlog_exit(status);
return status;
-@@ -1696,8 +1755,7 @@ static int ocfs2_find_dir_space_el(struc
+@@ -1696,8 +1755,7 @@
status = 0;
bail:
mlog_exit(status);
return status;
-@@ -1756,7 +1814,6 @@ int ocfs2_prepare_dir_for_insert(struct
+@@ -1756,7 +1814,6 @@
*ret_de_bh = bh;
bh = NULL;
out:
+ brelse(bh);
return ret;
}
-diff -purN linux-2.6.27/fs/ocfs2/dlm/dlmfs.c linux-2.6.27.19-5.1/fs/ocfs2/dlm/dlmfs.c
---- linux-2.6.27/fs/ocfs2/dlm/dlmfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/dlm/dlmfs.c 2009-03-25 16:11:38.000000000 +0000
-@@ -608,8 +608,10 @@ static int __init init_dlmfs_fs(void)
+diff -r 9608d5473017 fs/ocfs2/dlm/dlmfs.c
+--- a/fs/ocfs2/dlm/dlmfs.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/dlm/dlmfs.c Wed May 06 16:56:51 2009 +0100
+@@ -608,8 +608,10 @@
0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
SLAB_MEM_SPREAD),
dlmfs_init_once);
cleanup_inode = 1;
user_dlm_worker = create_singlethread_workqueue("user_dlm");
-diff -purN linux-2.6.27/fs/ocfs2/dlm/dlmthread.c linux-2.6.27.19-5.1/fs/ocfs2/dlm/dlmthread.c
---- linux-2.6.27/fs/ocfs2/dlm/dlmthread.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/dlm/dlmthread.c 2009-03-25 16:11:38.000000000 +0000
-@@ -181,7 +181,8 @@ static int dlm_purge_lockres(struct dlm_
+diff -r 9608d5473017 fs/ocfs2/dlm/dlmthread.c
+--- a/fs/ocfs2/dlm/dlmthread.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/dlm/dlmthread.c Wed May 06 16:56:51 2009 +0100
+@@ -181,7 +181,8 @@
spin_lock(&res->spinlock);
/* This ensures that clear refmap is sent after the set */
spin_unlock(&res->spinlock);
/* clear our bit from the master's refmap, ignore errors */
-diff -purN linux-2.6.27/fs/ocfs2/dlm/userdlm.h linux-2.6.27.19-5.1/fs/ocfs2/dlm/userdlm.h
---- linux-2.6.27/fs/ocfs2/dlm/userdlm.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/dlm/userdlm.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/dlm/userdlm.h
+--- a/fs/ocfs2/dlm/userdlm.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/dlm/userdlm.h Wed May 06 16:56:51 2009 +0100
@@ -33,7 +33,7 @@
#include <linux/workqueue.h>
* the lvb */
#define USER_LOCK_BUSY (0x00000002) /* we are currently in
* dlm_lock */
-diff -purN linux-2.6.27/fs/ocfs2/dlmglue.c linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.c
---- linux-2.6.27/fs/ocfs2/dlmglue.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/dlmglue.c
+--- a/fs/ocfs2/dlmglue.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/dlmglue.c Wed May 06 16:56:51 2009 +0100
@@ -32,6 +32,7 @@
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include "buffer_head_io.h"
-@@ -68,6 +70,7 @@ struct ocfs2_mask_waiter {
+@@ -68,6 +70,7 @@
static struct ocfs2_super *ocfs2_get_dentry_osb(struct ocfs2_lock_res *lockres);
static struct ocfs2_super *ocfs2_get_inode_osb(struct ocfs2_lock_res *lockres);
static struct ocfs2_super *ocfs2_get_file_osb(struct ocfs2_lock_res *lockres);
/*
* Return value from ->downconvert_worker functions.
-@@ -102,6 +105,7 @@ static int ocfs2_dentry_convert_worker(s
+@@ -102,6 +105,7 @@
static void ocfs2_dentry_post_unlock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres);
#define mlog_meta_lvb(__level, __lockres) ocfs2_dump_meta_lvb_info(__level, __PRETTY_FUNCTION__, __LINE__, __lockres)
-@@ -258,6 +262,12 @@ static struct ocfs2_lock_res_ops ocfs2_f
+@@ -258,6 +262,12 @@
.flags = 0,
};
static inline int ocfs2_is_inode_lock(struct ocfs2_lock_res *lockres)
{
return lockres->l_type == OCFS2_LOCK_TYPE_META ||
-@@ -279,6 +289,13 @@ static inline struct ocfs2_dentry_lock *
- return (struct ocfs2_dentry_lock *)lockres->l_priv;
- }
+@@ -277,6 +287,13 @@
+ BUG_ON(lockres->l_type != OCFS2_LOCK_TYPE_DENTRY);
+ return (struct ocfs2_dentry_lock *)lockres->l_priv;
++}
++
+static inline struct ocfs2_mem_dqinfo *ocfs2_lock_res_qinfo(struct ocfs2_lock_res *lockres)
+{
+ BUG_ON(lockres->l_type != OCFS2_LOCK_TYPE_QINFO);
+
+ return (struct ocfs2_mem_dqinfo *)lockres->l_priv;
-+}
-+
+ }
+
static inline struct ocfs2_super *ocfs2_get_lockres_osb(struct ocfs2_lock_res *lockres)
- {
- if (lockres->l_ops->get_osb)
-@@ -507,6 +524,13 @@ static struct ocfs2_super *ocfs2_get_ino
+@@ -507,6 +524,13 @@
return OCFS2_SB(inode->i_sb);
}
static struct ocfs2_super *ocfs2_get_file_osb(struct ocfs2_lock_res *lockres)
{
struct ocfs2_file_private *fp = lockres->l_priv;
-@@ -609,6 +633,17 @@ void ocfs2_file_lock_res_init(struct ocf
+@@ -607,6 +631,17 @@
+ OCFS2_LOCK_TYPE_FLOCK, &ocfs2_flock_lops,
+ fp);
lockres->l_flags |= OCFS2_LOCK_NOCACHE;
- }
-
++}
++
+void ocfs2_qinfo_lock_res_init(struct ocfs2_lock_res *lockres,
+ struct ocfs2_mem_dqinfo *info)
+{
+ ocfs2_lock_res_init_common(OCFS2_SB(info->dqi_gi.dqi_sb), lockres,
+ OCFS2_LOCK_TYPE_QINFO, &ocfs2_qinfo_lops,
+ info);
-+}
-+
+ }
+
void ocfs2_lock_res_free(struct ocfs2_lock_res *res)
- {
- mlog_entry_void();
-@@ -2024,8 +2059,7 @@ static int ocfs2_inode_lock_update(struc
+@@ -2024,8 +2059,7 @@
} else {
/* Boo, we have to go to disk. */
/* read bh, cast, ocfs2_refresh_inode */
if (status < 0) {
mlog_errno(status);
goto bail_refresh;
-@@ -2086,11 +2120,7 @@ static int ocfs2_assign_bh(struct inode
+@@ -2086,11 +2120,7 @@
return 0;
}
if (status < 0)
mlog_errno(status);
-@@ -2846,9 +2876,8 @@ static void ocfs2_unlock_ast(void *opaqu
+@@ -2846,9 +2876,8 @@
lockres_clear_flags(lockres, OCFS2_LOCK_BUSY);
lockres->l_unlock_action = OCFS2_UNLOCK_INVALID;
-- spin_unlock_irqrestore(&lockres->l_lock, flags);
++ wake_up(&lockres->l_event);
+ spin_unlock_irqrestore(&lockres->l_lock, flags);
-
- wake_up(&lockres->l_event);
-+ spin_unlock_irqrestore(&lockres->l_lock, flags);
+- wake_up(&lockres->l_event);
mlog_exit_void();
}
-@@ -3455,6 +3484,108 @@ static int ocfs2_dentry_convert_worker(s
+@@ -3455,6 +3484,108 @@
return UNBLOCK_CONTINUE_POST;
}
/*
* This is the filesystem locking protocol. It provides the lock handling
* hooks for the underlying DLM. It has a maximum version number.
-diff -purN linux-2.6.27/fs/ocfs2/dlmglue.h linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.h
---- linux-2.6.27/fs/ocfs2/dlmglue.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.h 2009-03-25 16:11:38.000000000 +0000
-@@ -49,6 +49,17 @@ struct ocfs2_meta_lvb {
+diff -r 9608d5473017 fs/ocfs2/dlmglue.h
+--- a/fs/ocfs2/dlmglue.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/dlmglue.h Wed May 06 16:56:51 2009 +0100
+@@ -49,6 +49,17 @@
__be32 lvb_reserved2;
};
/* ocfs2_inode_lock_full() 'arg_flags' flags */
/* don't wait on recovery. */
#define OCFS2_META_LOCK_RECOVERY (0x01)
-@@ -69,6 +80,9 @@ void ocfs2_dentry_lock_res_init(struct o
+@@ -69,6 +80,9 @@
struct ocfs2_file_private;
void ocfs2_file_lock_res_init(struct ocfs2_lock_res *lockres,
struct ocfs2_file_private *fp);
void ocfs2_lock_res_free(struct ocfs2_lock_res *res);
int ocfs2_create_new_inode_locks(struct inode *inode);
int ocfs2_drop_inode_locks(struct inode *inode);
-@@ -103,6 +117,9 @@ int ocfs2_dentry_lock(struct dentry *den
+@@ -103,6 +117,9 @@
void ocfs2_dentry_unlock(struct dentry *dentry, int ex);
int ocfs2_file_lock(struct file *file, int ex, int trylock);
void ocfs2_file_unlock(struct file *file);
void ocfs2_mark_lockres_freeing(struct ocfs2_lock_res *lockres);
void ocfs2_simple_drop_lockres(struct ocfs2_super *osb,
-diff -purN linux-2.6.27/fs/ocfs2/extent_map.c linux-2.6.27.19-5.1/fs/ocfs2/extent_map.c
---- linux-2.6.27/fs/ocfs2/extent_map.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/extent_map.c 2009-03-25 16:11:38.000000000 +0000
-@@ -335,9 +335,9 @@ static int ocfs2_figure_hole_clusters(st
+diff -r 9608d5473017 fs/ocfs2/extent_map.c
+--- a/fs/ocfs2/extent_map.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/extent_map.c Wed May 06 16:56:51 2009 +0100
+@@ -335,9 +335,9 @@
if (le64_to_cpu(eb->h_next_leaf_blk) == 0ULL)
goto no_more_extents;
if (ret) {
mlog_errno(ret);
goto out;
-@@ -373,6 +373,66 @@ out:
+@@ -373,6 +373,66 @@
return ret;
}
int ocfs2_get_clusters(struct inode *inode, u32 v_cluster,
u32 *p_cluster, u32 *num_clusters,
unsigned int *extent_flags)
-@@ -398,8 +458,7 @@ int ocfs2_get_clusters(struct inode *ino
+@@ -398,8 +458,7 @@
if (ret == 0)
goto out;
if (ret) {
mlog_errno(ret);
goto out;
-diff -purN linux-2.6.27/fs/ocfs2/extent_map.h linux-2.6.27.19-5.1/fs/ocfs2/extent_map.h
---- linux-2.6.27/fs/ocfs2/extent_map.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/extent_map.h 2009-03-25 16:11:38.000000000 +0000
-@@ -50,4 +50,7 @@ int ocfs2_get_clusters(struct inode *ino
+diff -r 9608d5473017 fs/ocfs2/extent_map.h
+--- a/fs/ocfs2/extent_map.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/extent_map.h Wed May 06 16:56:51 2009 +0100
+@@ -50,4 +50,7 @@
int ocfs2_extent_map_get_blocks(struct inode *inode, u64 v_blkno, u64 *p_blkno,
u64 *ret_count, unsigned int *extent_flags);
+ u32 *p_cluster, u32 *num_clusters,
+ struct ocfs2_extent_list *el);
#endif /* _EXTENT_MAP_H */
-diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
---- linux-2.6.27/fs/ocfs2/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/file.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/file.c
+--- a/fs/ocfs2/file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/file.c Wed May 06 16:56:51 2009 +0100
@@ -35,6 +35,7 @@
#include <linux/mount.h>
#include <linux/writeback.h>
#include "buffer_head_io.h"
-@@ -184,7 +188,7 @@ static int ocfs2_sync_file(struct file *
+@@ -184,7 +188,7 @@
goto bail;
journal = osb->journal->j_journal;
bail:
mlog_exit(err);
-@@ -246,8 +250,8 @@ int ocfs2_update_inode_atime(struct inod
+@@ -246,8 +250,8 @@
mlog_entry_void();
handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
mlog_errno(ret);
goto out;
}
-@@ -302,17 +306,17 @@ bail:
+@@ -302,17 +306,17 @@
return status;
}
mlog_errno(ret);
goto out;
}
-@@ -488,7 +492,7 @@ bail:
+@@ -488,7 +492,7 @@
}
/*
* we'll update all the disk stuff, and oip->alloc_size
*
* expect stuff to be locked, a transaction started and enough data /
-@@ -497,189 +501,25 @@ bail:
+@@ -497,189 +501,25 @@
* Will return -EAGAIN, and a reason if a restart is needed.
* If passed in, *reason will always be set, even in error.
*/
- u32 bit_off, num_bits;
- u64 block;
- u8 flags = 0;
--
++ int ret;
++ struct ocfs2_extent_tree et;
+
- BUG_ON(!clusters_to_add);
-
- if (mark_unwritten)
- mlog_errno(ret);
- goto out;
- }
-+ int ret;
-+ struct ocfs2_extent_tree et;
-
+-
-out:
- if (ret) {
- if (*meta_ac) {
return ret;
}
-@@ -698,6 +538,9 @@ static int __ocfs2_extend_allocation(str
+@@ -698,6 +538,9 @@
struct ocfs2_alloc_context *meta_ac = NULL;
enum ocfs2_alloc_restarted why;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
mlog_entry("(clusters_to_add = %u)\n", clusters_to_add);
-@@ -707,8 +550,7 @@ static int __ocfs2_extend_allocation(str
+@@ -707,8 +550,7 @@
*/
BUG_ON(mark_unwritten && !ocfs2_sparse_alloc(osb));
if (status < 0) {
mlog_errno(status);
goto leave;
-@@ -724,14 +566,21 @@ static int __ocfs2_extend_allocation(str
+@@ -724,14 +566,21 @@
restart_all:
BUG_ON(le32_to_cpu(fe->i_clusters) != OCFS2_I(inode)->ip_clusters);
handle = ocfs2_start_trans(osb, credits);
if (IS_ERR(handle)) {
status = PTR_ERR(handle);
-@@ -740,6 +589,12 @@ restart_all:
+@@ -740,6 +589,12 @@
goto leave;
}
restarted_transaction:
/* reserve a write to the file entry early on - that we if we
* run out of credits in the allocation path, we can still
-@@ -753,16 +608,16 @@ restarted_transaction:
+@@ -753,16 +608,16 @@
prev_clusters = OCFS2_I(inode)->ip_clusters;
if ((status < 0) && (status != -EAGAIN)) {
if (status != -ENOSPC)
mlog_errno(status);
-@@ -789,7 +644,7 @@ restarted_transaction:
+@@ -789,7 +644,7 @@
mlog(0, "restarting transaction.\n");
/* TODO: This can be more intelligent. */
credits = ocfs2_calc_extend_credits(osb->sb,
clusters_to_add);
status = ocfs2_extend_trans(handle, credits);
if (status < 0) {
-@@ -810,6 +665,9 @@ restarted_transaction:
+@@ -810,6 +665,9 @@
OCFS2_I(inode)->ip_clusters, (long long)i_size_read(inode));
leave:
if (handle) {
ocfs2_commit_trans(osb, handle);
handle = NULL;
-@@ -826,10 +684,8 @@ leave:
+@@ -826,10 +684,8 @@
restart_func = 0;
goto restart_all;
}
mlog_exit(status);
return status;
-@@ -837,8 +693,7 @@ leave:
+@@ -837,8 +693,7 @@
/* Some parts of this taken from generic_cont_expand, which turned out
* to be too fragile to do exactly what we need without us having to
static int ocfs2_write_zero_page(struct inode *inode,
u64 size)
{
-@@ -1044,6 +899,9 @@ int ocfs2_setattr(struct dentry *dentry,
+@@ -1044,6 +899,9 @@
struct ocfs2_super *osb = OCFS2_SB(sb);
struct buffer_head *bh = NULL;
handle_t *handle = NULL;
mlog_entry("(0x%p, '%.*s')\n", dentry,
dentry->d_name.len, dentry->d_name.name);
-@@ -1096,9 +954,15 @@ int ocfs2_setattr(struct dentry *dentry,
+@@ -1096,9 +954,15 @@
goto bail_unlock;
}
status = ocfs2_extend_file(inode, bh, attr->ia_size);
if (status < 0) {
if (status != -ENOSPC)
-@@ -1108,11 +972,47 @@ int ocfs2_setattr(struct dentry *dentry,
+@@ -1108,11 +972,47 @@
}
}
}
/*
-@@ -1135,13 +1035,24 @@ int ocfs2_setattr(struct dentry *dentry,
+@@ -1135,13 +1035,24 @@
bail_commit:
ocfs2_commit_trans(osb, handle);
bail_unlock:
mlog_exit(status);
return status;
-@@ -1189,7 +1100,7 @@ int ocfs2_permission(struct inode *inode
+@@ -1189,7 +1100,7 @@
goto out;
}
ocfs2_inode_unlock(inode, 0);
out:
-@@ -1209,8 +1120,8 @@ static int __ocfs2_write_remove_suid(str
+@@ -1209,8 +1120,8 @@
(unsigned long long)OCFS2_I(inode)->ip_blkno, inode->i_mode);
handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
mlog_errno(ret);
goto out;
}
-@@ -1284,8 +1195,7 @@ static int ocfs2_write_remove_suid(struc
+@@ -1284,8 +1195,7 @@
struct buffer_head *bh = NULL;
struct ocfs2_inode_info *oi = OCFS2_I(inode);
if (ret < 0) {
mlog_errno(ret);
goto out;
-@@ -1311,9 +1221,8 @@ static int ocfs2_allocate_unwritten_exte
+@@ -1311,9 +1221,8 @@
struct buffer_head *di_bh = NULL;
if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) {
if (ret) {
mlog_errno(ret);
goto out;
-@@ -1382,80 +1291,6 @@ out:
+@@ -1382,80 +1291,6 @@
return ret;
}
/*
* Truncate a byte range, avoiding pages within partial clusters. This
* preserves those pages for the zeroing code to write to.
-@@ -1505,8 +1340,8 @@ static int ocfs2_zero_partial_clusters(s
+@@ -1505,8 +1340,8 @@
goto out;
handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
mlog_errno(ret);
goto out;
}
-@@ -1555,7 +1390,9 @@ static int ocfs2_remove_inode_range(stru
+@@ -1555,7 +1390,9 @@
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct ocfs2_cached_dealloc_ctxt dealloc;
struct address_space *mapping = inode->i_mapping;
ocfs2_init_dealloc_ctxt(&dealloc);
if (byte_len == 0)
-@@ -1611,9 +1448,9 @@ static int ocfs2_remove_inode_range(stru
+@@ -1611,9 +1448,9 @@
/* Only do work for non-holes */
if (phys_cpos != 0) {
if (ret) {
mlog_errno(ret);
goto out;
-@@ -2019,6 +1856,13 @@ relock:
+@@ -2019,6 +1856,13 @@
written = generic_file_direct_write(iocb, iov, &nr_segs, *ppos,
ppos, count, ocount);
if (written < 0) {
ret = written;
goto out_dio;
}
-@@ -2040,7 +1884,7 @@ out_dio:
+@@ -2040,7 +1884,7 @@
*/
if (old_size != i_size_read(inode) ||
old_clusters != OCFS2_I(inode)->ip_clusters) {
if (ret < 0)
written = ret;
}
-@@ -2227,6 +2071,10 @@ const struct inode_operations ocfs2_file
+@@ -2227,6 +2071,10 @@
.setattr = ocfs2_setattr,
.getattr = ocfs2_getattr,
.permission = ocfs2_permission,
.fallocate = ocfs2_fallocate,
};
-@@ -2236,6 +2084,10 @@ const struct inode_operations ocfs2_spec
+@@ -2236,7 +2084,58 @@
.permission = ocfs2_permission,
};
+ * ocfs2_fops_no_plocks and ocfs2_dops_no_plocks!
+ */
const struct file_operations ocfs2_fops = {
- .llseek = generic_file_llseek,
- .read = do_sync_read,
-@@ -2250,6 +2102,7 @@ const struct file_operations ocfs2_fops
- #ifdef CONFIG_COMPAT
- .compat_ioctl = ocfs2_compat_ioctl,
- #endif
-+ .lock = ocfs2_lock,
- .flock = ocfs2_flock,
- .splice_read = ocfs2_file_splice_read,
- .splice_write = ocfs2_file_splice_write,
-@@ -2266,5 +2119,51 @@ const struct file_operations ocfs2_dops
- #ifdef CONFIG_COMPAT
- .compat_ioctl = ocfs2_compat_ioctl,
- #endif
-+ .lock = ocfs2_lock,
-+ .flock = ocfs2_flock,
-+};
-+
-+/*
-+ * POSIX-lockless variants of our file_operations.
-+ *
-+ * These will be used if the underlying cluster stack does not support
-+ * posix file locking, if the user passes the "localflocks" mount
-+ * option, or if we have a local-only fs.
-+ *
-+ * ocfs2_flock is in here because all stacks handle UNIX file locks,
-+ * so we still want it in the case of no stack support for
-+ * plocks. Internally, it will do the right thing when asked to ignore
-+ * the cluster.
-+ */
-+const struct file_operations ocfs2_fops_no_plocks = {
+ .llseek = generic_file_llseek,
+ .read = do_sync_read,
+ .write = do_sync_write,
+#ifdef CONFIG_COMPAT
+ .compat_ioctl = ocfs2_compat_ioctl,
+#endif
++ .lock = ocfs2_lock,
+ .flock = ocfs2_flock,
+ .splice_read = ocfs2_file_splice_read,
+ .splice_write = ocfs2_file_splice_write,
+};
+
-+const struct file_operations ocfs2_dops_no_plocks = {
++const struct file_operations ocfs2_dops = {
+ .llseek = generic_file_llseek,
+ .read = generic_read_dir,
+ .readdir = ocfs2_readdir,
+#ifdef CONFIG_COMPAT
+ .compat_ioctl = ocfs2_compat_ioctl,
+#endif
- .flock = ocfs2_flock,
++ .lock = ocfs2_lock,
++ .flock = ocfs2_flock,
++};
++
++/*
++ * POSIX-lockless variants of our file_operations.
++ *
++ * These will be used if the underlying cluster stack does not support
++ * posix file locking, if the user passes the "localflocks" mount
++ * option, or if we have a local-only fs.
++ *
++ * ocfs2_flock is in here because all stacks handle UNIX file locks,
++ * so we still want it in the case of no stack support for
++ * plocks. Internally, it will do the right thing when asked to ignore
++ * the cluster.
++ */
++const struct file_operations ocfs2_fops_no_plocks = {
+ .llseek = generic_file_llseek,
+ .read = do_sync_read,
+ .write = do_sync_write,
+@@ -2255,7 +2154,7 @@
+ .splice_write = ocfs2_file_splice_write,
};
-diff -purN linux-2.6.27/fs/ocfs2/file.h linux-2.6.27.19-5.1/fs/ocfs2/file.h
---- linux-2.6.27/fs/ocfs2/file.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/file.h 2009-03-25 16:11:38.000000000 +0000
+
+-const struct file_operations ocfs2_dops = {
++const struct file_operations ocfs2_dops_no_plocks = {
+ .llseek = generic_file_llseek,
+ .read = generic_read_dir,
+ .readdir = ocfs2_readdir,
+diff -r 9608d5473017 fs/ocfs2/file.h
+--- a/fs/ocfs2/file.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/file.h Wed May 06 16:56:51 2009 +0100
@@ -28,9 +28,12 @@
extern const struct file_operations ocfs2_fops;
struct ocfs2_file_private {
struct file *fp_file;
-@@ -38,27 +41,21 @@ struct ocfs2_file_private {
+@@ -38,27 +41,21 @@
struct ocfs2_lock_res fp_flock;
};
int ocfs2_setattr(struct dentry *dentry, struct iattr *attr);
int ocfs2_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kstat *stat);
-diff -purN linux-2.6.27/fs/ocfs2/inode.c linux-2.6.27.19-5.1/fs/ocfs2/inode.c
---- linux-2.6.27/fs/ocfs2/inode.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/inode.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/inode.c
+--- a/fs/ocfs2/inode.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/inode.c Wed May 06 16:56:51 2009 +0100
@@ -28,6 +28,7 @@
#include <linux/slab.h>
#include <linux/highmem.h>
#include "buffer_head_io.h"
-@@ -219,6 +221,7 @@ int ocfs2_populate_inode(struct inode *i
+@@ -219,12 +221,17 @@
struct super_block *sb;
struct ocfs2_super *osb;
int status = -EINVAL;
mlog_entry("(0x%p, size:%llu)\n", inode,
(unsigned long long)le64_to_cpu(fe->i_size));
-@@ -226,6 +229,10 @@ int ocfs2_populate_inode(struct inode *i
+
sb = inode->i_sb;
osb = OCFS2_SB(sb);
-
++
+ if ((osb->s_mount_opt & OCFS2_MOUNT_LOCALFLOCKS) ||
+ ocfs2_mount_local(osb) || !ocfs2_stack_supports_plocks())
+ use_plocks = 0;
-+
+
/* this means that read_inode cannot create a superblock inode
* today. change if needed. */
- if (!OCFS2_IS_VALID_DINODE(fe) ||
-@@ -278,14 +285,18 @@ int ocfs2_populate_inode(struct inode *i
+@@ -278,14 +285,18 @@
inode->i_nlink = le16_to_cpu(fe->i_links_count);
} else if (fe->i_flags & cpu_to_le32(OCFS2_SUPER_BLOCK_FL)) {
mlog(0, "superblock inode: i_ino=%lu\n", inode->i_ino);
/* we can't actually hit this as read_inode can't
-@@ -295,13 +306,19 @@ int ocfs2_populate_inode(struct inode *i
+@@ -295,13 +306,19 @@
switch (inode->i_mode & S_IFMT) {
case S_IFREG:
i_size_write(inode, le64_to_cpu(fe->i_size));
break;
case S_IFLNK:
-@@ -448,8 +465,11 @@ static int ocfs2_read_locked_inode(struc
+@@ -448,8 +465,11 @@
}
}
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -522,6 +542,9 @@ static int ocfs2_truncate_for_delete(str
+@@ -522,6 +542,9 @@
* data and fast symlinks.
*/
if (fe->i_clusters) {
handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
if (IS_ERR(handle)) {
status = PTR_ERR(handle);
-@@ -597,7 +620,8 @@ static int ocfs2_remove_inode(struct ino
+@@ -597,7 +620,8 @@
goto bail;
}
if (IS_ERR(handle)) {
status = PTR_ERR(handle);
mlog_errno(status);
-@@ -629,6 +653,7 @@ static int ocfs2_remove_inode(struct ino
+@@ -629,6 +653,7 @@
}
ocfs2_remove_from_cache(inode, di_bh);
status = ocfs2_free_dinode(handle, inode_alloc_inode,
inode_alloc_bh, di);
-@@ -730,6 +755,13 @@ static int ocfs2_wipe_inode(struct inode
- goto bail_unlock_dir;
- }
-
-+ /*Free extended attribute resources associated with this inode.*/
-+ status = ocfs2_xattr_remove(inode, di_bh);
+@@ -725,6 +750,13 @@
+ * inode delete underneath us -- this will result in two nodes
+ * truncating the same file! */
+ status = ocfs2_truncate_for_delete(osb, inode, di_bh);
+ if (status < 0) {
+ mlog_errno(status);
+ goto bail_unlock_dir;
+ }
+
- status = ocfs2_remove_inode(inode, di_bh, orphan_dir_inode,
- orphan_dir_bh);
- if (status < 0)
-@@ -904,7 +936,10 @@ void ocfs2_delete_inode(struct inode *in
++ /*Free extended attribute resources associated with this inode.*/
++ status = ocfs2_xattr_remove(inode, di_bh);
+ if (status < 0) {
+ mlog_errno(status);
+ goto bail_unlock_dir;
+@@ -904,7 +936,10 @@
mlog_entry("(inode->i_ino = %lu)\n", inode->i_ino);
mlog(0, "Skipping delete of bad inode\n");
goto bail;
}
-@@ -1082,6 +1117,14 @@ void ocfs2_clear_inode(struct inode *ino
+@@ -1082,6 +1117,14 @@
oi->ip_dir_start_lookup = 0;
oi->ip_blkno = 0ULL;
bail:
mlog_exit_void();
}
-@@ -1107,58 +1150,6 @@ void ocfs2_drop_inode(struct inode *inod
- }
+@@ -1104,58 +1147,6 @@
+ generic_drop_inode(inode);
- /*
+ mlog_exit_void();
+-}
+-
+-/*
- * TODO: this should probably be merged into ocfs2_get_block
- *
- * However, you now need to pay attention to the cont_prepare_write()
- }
- *err = -EIO;
- return NULL;
--}
--
--/*
- * This is called from our getattr.
- */
- int ocfs2_inode_revalidate(struct dentry *dentry)
-diff -purN linux-2.6.27/fs/ocfs2/inode.h linux-2.6.27.19-5.1/fs/ocfs2/inode.h
---- linux-2.6.27/fs/ocfs2/inode.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/inode.h 2009-03-25 16:11:38.000000000 +0000
-@@ -40,6 +40,9 @@ struct ocfs2_inode_info
+ }
+
+ /*
+diff -r 9608d5473017 fs/ocfs2/inode.h
+--- a/fs/ocfs2/inode.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/inode.h Wed May 06 16:56:51 2009 +0100
+@@ -40,6 +40,9 @@
/* protects allocation changes on this inode. */
struct rw_semaphore ip_alloc_sem;
/* These fields are protected by ip_lock */
spinlock_t ip_lock;
u32 ip_open_count;
-@@ -68,6 +71,7 @@ struct ocfs2_inode_info
+@@ -68,6 +71,7 @@
struct ocfs2_extent_map ip_extent_map;
struct inode vfs_inode;
};
/*
-@@ -113,8 +117,6 @@ extern struct kmem_cache *ocfs2_inode_ca
+@@ -113,8 +117,6 @@
extern const struct address_space_operations ocfs2_aops;
void ocfs2_clear_inode(struct inode *inode);
void ocfs2_delete_inode(struct inode *inode);
void ocfs2_drop_inode(struct inode *inode);
-@@ -140,6 +142,8 @@ int ocfs2_mark_inode_dirty(handle_t *han
+@@ -140,6 +142,8 @@
struct buffer_head *bh);
int ocfs2_aio_read(struct file *file, struct kiocb *req, struct iocb *iocb);
int ocfs2_aio_write(struct file *file, struct kiocb *req, struct iocb *iocb);
void ocfs2_set_inode_flags(struct inode *inode);
void ocfs2_get_inode_flags(struct ocfs2_inode_info *oi);
-diff -purN linux-2.6.27/fs/ocfs2/ioctl.c linux-2.6.27.19-5.1/fs/ocfs2/ioctl.c
---- linux-2.6.27/fs/ocfs2/ioctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/ioctl.c 2009-03-25 16:11:38.000000000 +0000
-@@ -102,8 +102,7 @@ bail_unlock:
+diff -r 9608d5473017 fs/ocfs2/ioctl.c
+--- a/fs/ocfs2/ioctl.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/ioctl.c Wed May 06 16:56:51 2009 +0100
+@@ -102,8 +102,7 @@
bail:
mutex_unlock(&inode->i_mutex);
mlog_exit(status);
return status;
-diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.c
---- linux-2.6.27/fs/ocfs2/journal.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/journal.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/journal.c
+--- a/fs/ocfs2/journal.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/journal.c Wed May 06 16:56:51 2009 +0100
@@ -45,6 +45,7 @@
#include "slot_map.h"
#include "super.h"
#include "buffer_head_io.h"
-@@ -52,10 +53,10 @@ DEFINE_SPINLOCK(trans_inc_lock);
+@@ -52,10 +53,10 @@
static int ocfs2_force_read_journal(struct inode *inode);
static int ocfs2_recover_node(struct ocfs2_super *osb,
static int ocfs2_journal_toggle_dirty(struct ocfs2_super *osb,
int dirty, int replayed);
static int ocfs2_trylock_journal(struct ocfs2_super *osb,
-@@ -64,6 +65,17 @@ static int ocfs2_recover_orphans(struct
+@@ -63,6 +64,17 @@
+ static int ocfs2_recover_orphans(struct ocfs2_super *osb,
int slot);
static int ocfs2_commit_thread(void *arg);
-
++
+static inline int ocfs2_wait_on_mount(struct ocfs2_super *osb)
+{
+ return __ocfs2_wait_on_mount(osb, 0);
+{
+ return __ocfs2_wait_on_mount(osb, 1);
+}
-+
+
+
/*
- * The recovery_list is a simple linked list of node numbers to recover.
-@@ -215,9 +227,9 @@ static int ocfs2_commit_cache(struct ocf
+@@ -215,9 +227,9 @@
goto finally;
}
if (status < 0) {
up_write(&journal->j_trans_barrier);
mlog_errno(status);
-@@ -256,15 +268,13 @@ handle_t *ocfs2_start_trans(struct ocfs2
+@@ -256,15 +268,13 @@
BUG_ON(osb->journal->j_state == OCFS2_JOURNAL_FREE);
BUG_ON(max_buffs <= 0);
if (IS_ERR(handle)) {
up_read(&osb->journal->j_trans_barrier);
-@@ -285,16 +295,18 @@ handle_t *ocfs2_start_trans(struct ocfs2
+@@ -285,16 +295,18 @@
int ocfs2_commit_trans(struct ocfs2_super *osb,
handle_t *handle)
{
return ret;
}
-@@ -304,7 +316,7 @@ int ocfs2_commit_trans(struct ocfs2_supe
+@@ -304,7 +316,7 @@
* transaction. extend_trans will either extend the current handle by
* nblocks, or commit it and start a new one with nblocks credits.
*
* and then restart the transaction. Before calling
* ocfs2_extend_trans(), any changed blocks should have been
* dirtied. After calling it, all blocks which need to be changed must
-@@ -332,7 +344,7 @@ int ocfs2_extend_trans(handle_t *handle,
+@@ -332,7 +344,7 @@
#ifdef CONFIG_OCFS2_DEBUG_FS
status = 1;
#else
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -340,8 +352,10 @@ int ocfs2_extend_trans(handle_t *handle,
+@@ -340,8 +352,10 @@
#endif
if (status > 0) {
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -393,11 +407,11 @@ int ocfs2_journal_access(handle_t *handl
+@@ -393,11 +407,11 @@
switch (type) {
case OCFS2_JOURNAL_ACCESS_CREATE:
case OCFS2_JOURNAL_ACCESS_WRITE:
break;
default:
-@@ -422,7 +436,7 @@ int ocfs2_journal_dirty(handle_t *handle
+@@ -422,7 +436,7 @@
mlog_entry("(bh->b_blocknr=%llu)\n",
(unsigned long long)bh->b_blocknr);
if (status < 0)
mlog(ML_ERROR, "Could not dirty metadata buffer. "
"(bh->b_blocknr=%llu)\n",
-@@ -432,6 +446,7 @@ int ocfs2_journal_dirty(handle_t *handle
+@@ -432,6 +446,7 @@
return status;
}
int ocfs2_journal_dirty_data(handle_t *handle,
struct buffer_head *bh)
{
-@@ -443,8 +458,9 @@ int ocfs2_journal_dirty_data(handle_t *h
+@@ -443,8 +458,9 @@
return err;
}
void ocfs2_set_journal_params(struct ocfs2_super *osb)
{
-@@ -457,9 +473,9 @@ void ocfs2_set_journal_params(struct ocf
+@@ -457,9 +473,9 @@
spin_lock(&journal->j_state_lock);
journal->j_commit_interval = commit_interval;
if (osb->s_mount_opt & OCFS2_MOUNT_BARRIER)
spin_unlock(&journal->j_state_lock);
}
-@@ -524,14 +540,14 @@ int ocfs2_journal_init(struct ocfs2_jour
+@@ -524,14 +540,14 @@
mlog(0, "inode->ip_clusters = %u\n", OCFS2_I(inode)->ip_clusters);
/* call the kernels journal init function now */
mlog(0, "j_journal->j_maxlen = %u\n", j_journal->j_maxlen);
*dirty = (le32_to_cpu(di->id1.journal1.ij_flags) &
-@@ -550,8 +566,7 @@ done:
+@@ -550,8 +566,7 @@
if (status < 0) {
if (inode_lock)
ocfs2_inode_unlock(inode, 1);
if (inode) {
OCFS2_I(inode)->ip_open_count--;
iput(inode);
-@@ -639,7 +654,7 @@ void ocfs2_journal_shutdown(struct ocfs2
+@@ -639,7 +654,7 @@
if (journal->j_state != OCFS2_JOURNAL_LOADED)
goto done;
if (!igrab(inode))
BUG();
-@@ -668,9 +683,9 @@ void ocfs2_journal_shutdown(struct ocfs2
+@@ -668,9 +683,9 @@
BUG_ON(atomic_read(&(osb->journal->j_num_trans)) != 0);
if (ocfs2_mount_local(osb)) {
if (status < 0)
mlog_errno(status);
}
-@@ -686,7 +701,8 @@ void ocfs2_journal_shutdown(struct ocfs2
+@@ -686,7 +701,8 @@
}
/* Shutdown the kernel journal system */
OCFS2_I(inode)->ip_open_count--;
-@@ -711,15 +727,15 @@ static void ocfs2_clear_journal_error(st
+@@ -711,15 +727,15 @@
{
int olderr;
}
}
-@@ -734,7 +750,7 @@ int ocfs2_journal_load(struct ocfs2_jour
+@@ -734,7 +750,7 @@
osb = journal->j_osb;
if (status < 0) {
mlog(ML_ERROR, "Failed to load journal!\n");
goto done;
-@@ -778,7 +794,7 @@ int ocfs2_journal_wipe(struct ocfs2_jour
+@@ -778,7 +794,7 @@
BUG_ON(!journal);
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -847,9 +863,8 @@ static int ocfs2_force_read_journal(stru
+@@ -847,9 +863,8 @@
/* We are reading journal data which should not
* be put in the uptodate cache */
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -865,8 +880,7 @@ static int ocfs2_force_read_journal(stru
+@@ -865,8 +880,7 @@
bail:
for(i = 0; i < CONCURRENT_JOURNAL_FILL; i++)
mlog_exit(status);
return status;
}
-@@ -876,6 +890,7 @@ struct ocfs2_la_recovery_item {
+@@ -876,6 +890,7 @@
int lri_slot;
struct ocfs2_dinode *lri_la_dinode;
struct ocfs2_dinode *lri_tl_dinode;
};
/* Does the second half of the recovery process. By this point, the
-@@ -896,6 +911,7 @@ void ocfs2_complete_recovery(struct work
+@@ -896,6 +911,7 @@
struct ocfs2_super *osb = journal->j_osb;
struct ocfs2_dinode *la_dinode, *tl_dinode;
struct ocfs2_la_recovery_item *item, *n;
LIST_HEAD(tmp_la_list);
mlog_entry_void();
-@@ -911,6 +927,8 @@ void ocfs2_complete_recovery(struct work
+@@ -910,6 +926,8 @@
+ list_del_init(&item->lri_list);
mlog(0, "Complete recovery for slot %d\n", item->lri_slot);
-
-+ ocfs2_wait_on_quotas(osb);
+
++ ocfs2_wait_on_quotas(osb);
+
la_dinode = item->lri_la_dinode;
if (la_dinode) {
- mlog(0, "Clean up local alloc %llu\n",
-@@ -941,6 +959,16 @@ void ocfs2_complete_recovery(struct work
+@@ -941,6 +959,16 @@
if (ret < 0)
mlog_errno(ret);
kfree(item);
}
-@@ -954,7 +982,8 @@ void ocfs2_complete_recovery(struct work
+@@ -954,7 +982,8 @@
static void ocfs2_queue_recovery_completion(struct ocfs2_journal *journal,
int slot_num,
struct ocfs2_dinode *la_dinode,
{
struct ocfs2_la_recovery_item *item;
-@@ -969,6 +998,9 @@ static void ocfs2_queue_recovery_complet
+@@ -969,6 +998,9 @@
if (tl_dinode)
kfree(tl_dinode);
mlog_errno(-ENOMEM);
return;
}
-@@ -977,6 +1009,7 @@ static void ocfs2_queue_recovery_complet
+@@ -977,6 +1009,7 @@
item->lri_la_dinode = la_dinode;
item->lri_slot = slot_num;
item->lri_tl_dinode = tl_dinode;
spin_lock(&journal->j_lock);
list_add_tail(&item->lri_list, &journal->j_la_cleanups);
-@@ -996,6 +1029,7 @@ void ocfs2_complete_mount_recovery(struc
+@@ -996,6 +1029,7 @@
ocfs2_queue_recovery_completion(journal,
osb->slot_num,
osb->local_alloc_copy,
NULL);
ocfs2_schedule_truncate_log_flush(osb, 0);
-@@ -1004,11 +1038,26 @@ void ocfs2_complete_mount_recovery(struc
+@@ -1004,11 +1038,26 @@
}
}
mlog_entry_void();
-@@ -1017,6 +1066,11 @@ static int __ocfs2_recovery_thread(void
+@@ -1017,6 +1066,11 @@
goto bail;
}
restart:
status = ocfs2_super_lock(osb, 1);
if (status < 0) {
-@@ -1030,8 +1084,28 @@ restart:
+@@ -1030,8 +1084,28 @@
* clear it until ocfs2_recover_node() has succeeded. */
node_num = rm->rm_entries[0];
spin_unlock(&osb->osb_lock);
if (!status) {
ocfs2_recovery_map_clear(osb, node_num);
} else {
-@@ -1053,13 +1127,25 @@ restart:
+@@ -1053,13 +1127,25 @@
if (status < 0)
mlog_errno(status);
bail:
mutex_lock(&osb->recovery_lock);
-@@ -1074,6 +1160,9 @@ bail:
+@@ -1073,6 +1159,9 @@
+ wake_up(&osb->recovery_event);
mutex_unlock(&osb->recovery_lock);
-
++
+ if (rm_quota)
+ kfree(rm_quota);
-+
+
mlog_exit(status);
/* no one is callint kthread_stop() for us so the kthread() api
- * requires that we call do_exit(). And it isn't exported, but
-@@ -1133,7 +1222,8 @@ static int ocfs2_read_journal_inode(stru
+@@ -1133,7 +1222,8 @@
}
SET_INODE_JOURNAL(inode);
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -1229,19 +1319,19 @@ static int ocfs2_replay_journal(struct o
+@@ -1229,19 +1319,19 @@
}
mlog(0, "calling journal_init_inode\n");
goto done;
}
-@@ -1249,9 +1339,9 @@ static int ocfs2_replay_journal(struct o
+@@ -1249,9 +1339,9 @@
/* wipe the journal */
mlog(0, "flushing the journal.\n");
if (status < 0)
mlog_errno(status);
-@@ -1272,7 +1362,7 @@ static int ocfs2_replay_journal(struct o
+@@ -1272,7 +1362,7 @@
if (!igrab(inode))
BUG();
done:
/* drop the lock on this nodes journal */
-@@ -1282,8 +1372,7 @@ done:
+@@ -1282,8 +1372,7 @@
if (inode)
iput(inode);
mlog_exit(status);
return status;
-@@ -1302,31 +1391,19 @@ done:
+@@ -1302,30 +1391,18 @@
* far less concerning.
*/
static int ocfs2_recover_node(struct ocfs2_super *osb,
/* Should not ever be called to recover ourselves -- in that
* case we should've called ocfs2_journal_load instead. */
BUG_ON(osb->node_num == node_num);
-
+-
- slot_num = ocfs2_node_num_to_slot(osb, node_num);
- if (slot_num == -ENOENT) {
- status = 0;
- }
-
- mlog(0, "node %d was using slot %d\n", node_num, slot_num);
--
+
status = ocfs2_replay_journal(osb, node_num, slot_num);
if (status < 0) {
- if (status == -EBUSY) {
-@@ -1362,7 +1439,7 @@ static int ocfs2_recover_node(struct ocf
+@@ -1362,7 +1439,7 @@
/* This will kfree the memory pointed to by la_copy and tl_copy */
ocfs2_queue_recovery_completion(osb->journal, slot_num, la_copy,
status = 0;
done:
-@@ -1657,13 +1734,14 @@ static int ocfs2_recover_orphans(struct
+@@ -1657,13 +1734,14 @@
return ret;
}
atomic_read(&osb->vol_state) == VOLUME_DISABLED);
/* If there's an error on mount, then we may never get to the
-diff -purN linux-2.6.27/fs/ocfs2/journal.h linux-2.6.27.19-5.1/fs/ocfs2/journal.h
---- linux-2.6.27/fs/ocfs2/journal.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/journal.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/journal.h
+--- a/fs/ocfs2/journal.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/journal.h Wed May 06 16:56:51 2009 +0100
@@ -27,7 +27,12 @@
#define OCFS2_JOURNAL_H
enum ocfs2_journal_state {
OCFS2_JOURNAL_FREE = 0,
-@@ -168,6 +173,7 @@ void ocfs2_recovery_thread(struct ocfs
+@@ -168,6 +173,7 @@
int node_num);
int ocfs2_mark_dead_nodes(struct ocfs2_super *osb);
void ocfs2_complete_mount_recovery(struct ocfs2_super *osb);
static inline void ocfs2_start_checkpoint(struct ocfs2_super *osb)
{
-@@ -215,8 +221,8 @@ static inline void ocfs2_checkpoint_inod
+@@ -215,8 +221,8 @@
* buffer. Will have to call ocfs2_journal_dirty once
* we've actually dirtied it. Type is one of . or .
* ocfs2_journal_dirty - Mark a journalled buffer as having dirty data.
*/
/* You must always start_trans with a number of buffs > 0, but it's
-@@ -268,8 +274,10 @@ int ocfs2_journal_acces
+@@ -268,8 +274,10 @@
*/
int ocfs2_journal_dirty(handle_t *handle,
struct buffer_head *bh);
/*
* Credit Macros:
-@@ -283,6 +291,40 @@ int ocfs2_journal_dirty
+@@ -283,6 +291,40 @@
/* simple file updates like chmod, etc. */
#define OCFS2_INODE_UPDATE_CREDITS 1
/* group extend. inode update and last group update. */
#define OCFS2_GROUP_EXTEND_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 1)
-@@ -293,8 +335,11 @@ int ocfs2_journal_dirty
+@@ -293,8 +335,11 @@
* prev. group desc. if we relink. */
#define OCFS2_SUBALLOC_ALLOC (3)
/* dinode + group descriptor update. We don't relink on free yet. */
#define OCFS2_SUBALLOC_FREE (2)
-@@ -303,16 +348,23 @@ int ocfs2_journal_dirty
+@@ -303,16 +348,23 @@
#define OCFS2_TRUNCATE_LOG_FLUSH_ONE_REC (OCFS2_SUBALLOC_FREE \
+ OCFS2_TRUNCATE_LOG_UPDATE)
/* local alloc metadata change + main bitmap updates */
#define OCFS2_WINDOW_MOVE_CREDITS (OCFS2_INODE_UPDATE_CREDITS \
-@@ -322,13 +374,21 @@ int ocfs2_journal_dirty
+@@ -322,13 +374,21 @@
* for the dinode, one for the new block. */
#define OCFS2_SIMPLE_DIR_EXTEND_CREDITS (2)
/* dinode + orphan dir dinode + inode alloc dinode + orphan dir entry +
* inode alloc group descriptor */
-@@ -337,14 +397,28 @@ int ocfs2_journal_dirty
+@@ -337,14 +397,28 @@
/* dinode update, old dir dinode update, new dir dinode update, old
* dir dir entry, new dir dir entry, dir entry update for renaming
* directory + target unlink */
/* bitmap dinode, group desc. + relinked group. */
bitmap_blocks = OCFS2_SUBALLOC_ALLOC;
-@@ -355,27 +429,28 @@ static inline int ocfs2_calc_extend_cred
+@@ -355,27 +429,28 @@
* however many metadata chunks needed * a remaining suballoc
* alloc. */
sysfile_bitmap_blocks = 1 +
}
static inline int ocfs2_calc_group_alloc_credits(struct super_block *sb,
-@@ -412,7 +487,21 @@ static inline int ocfs2_calc_tree_trunc_
+@@ -412,7 +487,21 @@
/* update to the truncate log. */
credits += OCFS2_TRUNCATE_LOG_UPDATE;
+}
+
#endif /* OCFS2_JOURNAL_H */
-diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/localalloc.c
---- linux-2.6.27/fs/ocfs2/localalloc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/localalloc.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/localalloc.c
+--- a/fs/ocfs2/localalloc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/localalloc.c Wed May 06 16:56:51 2009 +0100
@@ -28,6 +28,7 @@
#include <linux/slab.h>
#include <linux/highmem.h>
#define MLOG_MASK_PREFIX ML_DISK_ALLOC
#include <cluster/masklog.h>
-@@ -47,8 +48,6 @@
+@@ -46,8 +47,6 @@
+ #include "buffer_head_io.h"
#define OCFS2_LOCAL_ALLOC(dinode) (&((dinode)->id2.i_lab))
-
--static inline int ocfs2_local_alloc_window_bits(struct ocfs2_super *osb);
-
+-static inline int ocfs2_local_alloc_window_bits(struct ocfs2_super *osb);
+
static u32 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc);
- static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb,
-@@ -75,24 +74,129 @@ static int ocfs2_local_alloc_new_window(
+@@ -75,24 +74,129 @@
static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
struct inode *local_alloc_inode);
+#ifdef CONFIG_OCFS2_FS_STATS
+
+static int ocfs2_la_debug_open(struct inode *inode, struct file *file)
-+{
+ {
+- BUG_ON(osb->s_clustersize_bits > 20);
+ file->private_data = inode->i_private;
+ return 0;
+}
-+
+
+- /* Size local alloc windows by the megabyte */
+- return osb->local_alloc_size << (20 - osb->s_clustersize_bits);
+#define LA_DEBUG_BUF_SZ PAGE_CACHE_SIZE
+#define LA_DEBUG_VER 1
+static ssize_t ocfs2_la_debug_read(struct file *file, char __user *userbuf,
+#endif
+
+static inline int ocfs2_la_state_enabled(struct ocfs2_super *osb)
- {
-- BUG_ON(osb->s_clustersize_bits > 20);
++{
+ return (osb->local_alloc_state == OCFS2_LA_THROTTLED ||
+ osb->local_alloc_state == OCFS2_LA_ENABLED);
+}
-
-- /* Size local alloc windows by the megabyte */
-- return osb->local_alloc_size << (20 - osb->s_clustersize_bits);
++
+void ocfs2_local_alloc_seen_free_bits(struct ocfs2_super *osb,
+ unsigned int num_clusters)
+{
- int la_bits = ocfs2_local_alloc_window_bits(osb);
int ret = 0;
+ int la_bits;
-+
-+ spin_lock(&osb->osb_lock);
-+ la_bits = osb->local_alloc_bits;
- if (osb->local_alloc_state != OCFS2_LA_ENABLED)
++ spin_lock(&osb->osb_lock);
++ la_bits = osb->local_alloc_bits;
++
+ if (!ocfs2_la_state_enabled(osb))
goto bail;
/* la_bits should be at least twice the size (in clusters) of
-@@ -106,6 +210,7 @@ int ocfs2_alloc_should_use_local(struct
+@@ -106,6 +210,7 @@
bail:
mlog(0, "state=%d, bits=%llu, la_bits=%d, ret=%d\n",
osb->local_alloc_state, (unsigned long long)bits, la_bits, ret);
return ret;
}
-@@ -120,14 +225,18 @@ int ocfs2_load_local_alloc(struct ocfs2_
+@@ -120,14 +225,18 @@
mlog_entry_void();
}
/* read the alloc off disk */
-@@ -139,8 +248,8 @@ int ocfs2_load_local_alloc(struct ocfs2_
+@@ -139,8 +248,8 @@
goto bail;
}
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -185,13 +294,14 @@ int ocfs2_load_local_alloc(struct ocfs2_
+@@ -185,13 +294,14 @@
bail:
if (status < 0)
mlog_exit(status);
return status;
-@@ -217,6 +327,11 @@ void ocfs2_shutdown_local_alloc(struct o
+@@ -216,6 +326,11 @@
+ struct ocfs2_dinode *alloc = NULL;
mlog_entry_void();
-
++
+ cancel_delayed_work(&osb->la_enable_wq);
+ flush_workqueue(ocfs2_wq);
+
+ ocfs2_shutdown_la_debug(osb);
-+
+
if (osb->local_alloc_state == OCFS2_LA_UNUSED)
goto out;
-
-@@ -295,8 +410,7 @@ out_commit:
+@@ -295,8 +410,7 @@
ocfs2_commit_trans(osb, handle);
out_unlock:
ocfs2_inode_unlock(main_bm_inode, 1);
-@@ -345,8 +459,8 @@ int ocfs2_begin_local_alloc_recovery(str
+@@ -345,8 +459,8 @@
mutex_lock(&inode->i_mutex);
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -372,8 +486,7 @@ bail:
+@@ -372,8 +486,7 @@
*alloc_copy = NULL;
}
if (inode) {
mutex_unlock(&inode->i_mutex);
-@@ -441,8 +554,7 @@ out_unlock:
+@@ -441,8 +554,7 @@
out_mutex:
mutex_unlock(&main_bm_inode->i_mutex);
iput(main_bm_inode);
-@@ -453,8 +565,48 @@ out:
+@@ -453,8 +565,48 @@
return status;
}
* local alloc. You lose them when you drop i_mutex.
*
* We will add ourselves to the transaction passed in, but may start
-@@ -485,16 +637,18 @@ int ocfs2_reserve_local_alloc_bits(struc
+@@ -485,16 +637,18 @@
mutex_lock(&local_alloc_inode->i_mutex);
- if (osb->local_alloc_state != OCFS2_LA_ENABLED) {
-- status = -ENOSPC;
-- goto bail;
-- }
--
-- if (bits_wanted > ocfs2_local_alloc_window_bits(osb)) {
-- mlog(0, "Asking for more than my max window size!\n");
+ /*
+ * We must double check state and allocator bits because
+ * another process may have changed them while holding i_mutex.
status = -ENOSPC;
goto bail;
}
+-
+- if (bits_wanted > ocfs2_local_alloc_window_bits(osb)) {
+- mlog(0, "Asking for more than my max window size!\n");
+- status = -ENOSPC;
+- goto bail;
+- }
+ spin_unlock(&osb->osb_lock);
alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data;
-@@ -522,6 +676,36 @@ int ocfs2_reserve_local_alloc_bits(struc
+@@ -522,6 +676,36 @@
mlog_errno(status);
goto bail;
}
}
ac->ac_inode = local_alloc_inode;
-@@ -789,6 +973,85 @@ bail:
+@@ -789,6 +973,85 @@
return status;
}
static int ocfs2_local_alloc_reserve_for_window(struct ocfs2_super *osb,
struct ocfs2_alloc_context **ac,
struct inode **bitmap_inode,
-@@ -803,12 +1066,21 @@ static int ocfs2_local_alloc_reserve_for
+@@ -803,12 +1066,21 @@
goto bail;
}
goto bail;
}
-@@ -849,7 +1121,7 @@ static int ocfs2_local_alloc_new_window(
+@@ -849,7 +1121,7 @@
"one\n");
mlog(0, "Allocating %u clusters for a new window.\n",
/* Instruct the allocation code to try the most recently used
* cluster group. We'll re-record the group used this pass
-@@ -859,9 +1131,36 @@ static int ocfs2_local_alloc_new_window(
+@@ -859,9 +1131,36 @@
/* we used the generic suballoc reserve function, but we set
* everything up nicely, so there's no reason why we can't use
* the more specific cluster api to claim bits. */
if (status < 0) {
if (status != -ENOSPC)
mlog_errno(status);
-@@ -905,6 +1204,8 @@ static int ocfs2_local_alloc_slide_windo
+@@ -904,6 +1203,8 @@
+ struct ocfs2_alloc_context *ac = NULL;
mlog_entry_void();
-
-+ ocfs2_recalc_la_window(osb, OCFS2_LA_EVENT_SLIDE);
+
++ ocfs2_recalc_la_window(osb, OCFS2_LA_EVENT_SLIDE);
+
/* This will lock the main bitmap for us. */
status = ocfs2_local_alloc_reserve_for_window(osb,
- &ac,
-@@ -976,8 +1277,7 @@ bail:
+@@ -976,8 +1277,7 @@
if (handle)
ocfs2_commit_trans(osb, handle);
if (main_bm_inode)
iput(main_bm_inode);
-diff -purN linux-2.6.27/fs/ocfs2/localalloc.h linux-2.6.27.19-5.1/fs/ocfs2/localalloc.h
---- linux-2.6.27/fs/ocfs2/localalloc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/localalloc.h 2009-03-25 16:11:38.000000000 +0000
-@@ -52,4 +52,8 @@ int ocfs2_claim_local_alloc_bits(struct
+diff -r 9608d5473017 fs/ocfs2/localalloc.h
+--- a/fs/ocfs2/localalloc.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/localalloc.h Wed May 06 16:56:51 2009 +0100
+@@ -52,4 +52,8 @@
u32 *bit_off,
u32 *num_bits);
+void ocfs2_la_enable_worker(struct work_struct *work);
+
#endif /* OCFS2_LOCALALLOC_H */
-diff -purN linux-2.6.27/fs/ocfs2/locks.c linux-2.6.27.19-5.1/fs/ocfs2/locks.c
---- linux-2.6.27/fs/ocfs2/locks.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/locks.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/locks.c
+--- a/fs/ocfs2/locks.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/locks.c Wed May 06 16:56:51 2009 +0100
@@ -24,6 +24,7 @@
*/
#include "locks.h"
static int ocfs2_do_flock(struct file *file, struct inode *inode,
-@@ -123,3 +125,16 @@ int ocfs2_flock(struct file *file, int c
+@@ -123,3 +125,16 @@
else
return ocfs2_do_flock(file, inode, cmd, fl);
}
+
+ return ocfs2_plock(osb->cconn, OCFS2_I(inode)->ip_blkno, file, cmd, fl);
+}
-diff -purN linux-2.6.27/fs/ocfs2/locks.h linux-2.6.27.19-5.1/fs/ocfs2/locks.h
---- linux-2.6.27/fs/ocfs2/locks.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/locks.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/locks.h
+--- a/fs/ocfs2/locks.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/locks.h Wed May 06 16:56:51 2009 +0100
@@ -27,5 +27,6 @@
#define OCFS2_LOCKS_H
+int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl);
#endif /* OCFS2_LOCKS_H */
-diff -purN linux-2.6.27/fs/ocfs2/mmap.c linux-2.6.27.19-5.1/fs/ocfs2/mmap.c
---- linux-2.6.27/fs/ocfs2/mmap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/mmap.c 2009-03-25 16:11:38.000000000 +0000
-@@ -113,7 +113,11 @@ static int __ocfs2_page_mkwrite(struct i
+diff -r 9608d5473017 fs/ocfs2/mmap.c
+--- a/fs/ocfs2/mmap.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/mmap.c Wed May 06 16:56:51 2009 +0100
+@@ -113,7 +113,11 @@
* ocfs2_write_begin_nolock().
*/
if (!PageUptodate(page) || page->mapping != inode->i_mapping) {
goto out;
}
-diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
---- linux-2.6.27/fs/ocfs2/namei.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/namei.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/namei.c
+--- a/fs/ocfs2/namei.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/namei.c Wed May 06 16:56:51 2009 +0100
@@ -40,6 +40,7 @@
#include <linux/types.h>
#include <linux/slab.h>
struct ocfs2_alloc_context *inode_ac);
static int ocfs2_prepare_orphan_dir(struct ocfs2_super *osb,
-@@ -185,6 +188,35 @@ bail:
+@@ -185,6 +188,35 @@
return ret;
}
static int ocfs2_mknod(struct inode *dir,
struct dentry *dentry,
int mode,
-@@ -200,6 +232,13 @@ static int ocfs2_mknod(struct inode *dir
+@@ -200,6 +232,13 @@
struct inode *inode = NULL;
struct ocfs2_alloc_context *inode_ac = NULL;
struct ocfs2_alloc_context *data_ac = NULL;
mlog_entry("(0x%p, 0x%p, %d, %lu, '%.*s')\n", dir, dentry, mode,
(unsigned long)dev, dentry->d_name.len,
-@@ -249,17 +288,46 @@ static int ocfs2_mknod(struct inode *dir
+@@ -249,17 +288,46 @@
goto leave;
}
if (IS_ERR(handle)) {
status = PTR_ERR(handle);
handle = NULL;
-@@ -267,10 +335,19 @@ static int ocfs2_mknod(struct inode *dir
+@@ -267,10 +335,19 @@
goto leave;
}
if (status < 0) {
mlog_errno(status);
goto leave;
-@@ -299,6 +376,22 @@ static int ocfs2_mknod(struct inode *dir
+@@ -299,6 +376,22 @@
inc_nlink(dir);
}
status = ocfs2_add_entry(handle, dentry, inode,
OCFS2_I(inode)->ip_blkno, parent_fe_bh,
de_bh);
-@@ -319,6 +412,8 @@ static int ocfs2_mknod(struct inode *dir
+@@ -319,6 +412,8 @@
d_instantiate(dentry, inode);
status = 0;
leave:
if (handle)
ocfs2_commit_trans(osb, handle);
-@@ -327,17 +422,16 @@ leave:
+@@ -327,23 +422,25 @@
if (status == -ENOSPC)
mlog(0, "Disk is full\n");
- if (new_fe_bh)
- brelse(new_fe_bh);
--
-- if (de_bh)
-- brelse(de_bh);
--
-- if (parent_fe_bh)
-- brelse(parent_fe_bh);
+ brelse(new_fe_bh);
+ brelse(de_bh);
+ brelse(parent_fe_bh);
+ kfree(si.name);
+ kfree(si.value);
+- if (de_bh)
+- brelse(de_bh);
+-
+- if (parent_fe_bh)
+- brelse(parent_fe_bh);
+-
- if ((status < 0) && inode)
+ if ((status < 0) && inode) {
+ clear_nlink(inode);
if (inode_ac)
ocfs2_free_alloc_context(inode_ac);
-@@ -345,6 +439,9 @@ leave:
+
if (data_ac)
ocfs2_free_alloc_context(data_ac);
-
++
+ if (xattr_ac)
+ ocfs2_free_alloc_context(xattr_ac);
-+
+
mlog_exit(status);
- return status;
-@@ -352,12 +449,12 @@ leave:
+@@ -352,12 +449,12 @@
static int ocfs2_mknod_locked(struct ocfs2_super *osb,
struct inode *dir,
struct ocfs2_alloc_context *inode_ac)
{
int status = 0;
-@@ -365,14 +462,12 @@ static int ocfs2_mknod_locked(struct ocf
+@@ -365,14 +462,12 @@
struct ocfs2_extent_list *fel;
u64 fe_blkno = 0;
u16 suballoc_bit;
status = ocfs2_claim_new_inode(osb, handle, inode_ac, &suballoc_bit,
&fe_blkno);
-@@ -381,23 +476,11 @@ static int ocfs2_mknod_locked(struct ocf
+@@ -381,23 +476,11 @@
goto leave;
}
spin_lock(&osb->osb_lock);
inode->i_generation = osb->s_next_generation++;
spin_unlock(&osb->osb_lock);
-@@ -425,17 +508,11 @@ static int ocfs2_mknod_locked(struct ocf
+@@ -425,17 +508,11 @@
fe->i_blkno = cpu_to_le64(fe_blkno);
fe->i_suballoc_bit = cpu_to_le16(suballoc_bit);
fe->i_suballoc_slot = cpu_to_le16(inode_ac->ac_alloc_slot);
fe->i_links_count = cpu_to_le16(inode->i_nlink);
fe->i_last_eb_blk = 0;
-@@ -450,7 +527,7 @@ static int ocfs2_mknod_locked(struct ocf
+@@ -450,7 +527,7 @@
/*
* If supported, directories start with inline data.
*/
u16 feat = le16_to_cpu(fe->i_dyn_features);
fe->i_dyn_features = cpu_to_le16(feat | OCFS2_INLINE_DATA_FL);
-@@ -488,15 +565,12 @@ static int ocfs2_mknod_locked(struct ocf
+@@ -488,15 +565,12 @@
status = 0; /* error in ocfs2_create_new_inode_locks is not
* critical */
}
mlog_exit(status);
-@@ -590,7 +664,7 @@ static int ocfs2_link(struct dentry *old
+@@ -590,7 +664,7 @@
goto out_unlock_inode;
}
if (IS_ERR(handle)) {
err = PTR_ERR(handle);
handle = NULL;
-@@ -647,12 +721,9 @@ out_unlock_inode:
+@@ -647,12 +721,9 @@
out:
ocfs2_inode_unlock(dir, 1);
mlog_exit(err);
-@@ -780,7 +851,7 @@ static int ocfs2_unlink(struct inode *di
+@@ -780,7 +851,7 @@
}
}
if (IS_ERR(handle)) {
status = PTR_ERR(handle);
handle = NULL;
-@@ -851,17 +922,10 @@ leave:
+@@ -851,17 +922,10 @@
iput(orphan_dir);
}
mlog_exit(status);
-@@ -1193,7 +1257,7 @@ static int ocfs2_rename(struct inode *ol
+@@ -1193,7 +1257,7 @@
}
}
if (IS_ERR(handle)) {
status = PTR_ERR(handle);
handle = NULL;
-@@ -1372,24 +1436,15 @@ bail:
+@@ -1372,24 +1436,15 @@
if (new_inode)
iput(new_inode);
mlog_exit(status);
-@@ -1492,8 +1547,7 @@ bail:
+@@ -1492,8 +1547,7 @@
if (bhs) {
for(i = 0; i < blocks; i++)
kfree(bhs);
}
-@@ -1518,6 +1572,13 @@ static int ocfs2_symlink(struct inode *d
+@@ -1518,6 +1572,13 @@
handle_t *handle = NULL;
struct ocfs2_alloc_context *inode_ac = NULL;
struct ocfs2_alloc_context *data_ac = NULL;
mlog_entry("(0x%p, 0x%p, symname='%s' actual='%.*s')\n", dir,
dentry, symname, dentry->d_name.len, dentry->d_name.name);
-@@ -1564,17 +1625,46 @@ static int ocfs2_symlink(struct inode *d
+@@ -1564,17 +1625,46 @@
goto bail;
}
- /* don't reserve bitmap space for fast symlinks. */
- if (l > ocfs2_fast_symlink_chars(sb)) {
- status = ocfs2_reserve_clusters(osb, 1, &data_ac);
+- if (status < 0) {
+- if (status != -ENOSPC)
+- mlog_errno(status);
+ inode = ocfs2_get_init_inode(dir, S_IFLNK | S_IRWXUGO);
+ if (!inode) {
+ status = -ENOMEM;
+ if (status == -EOPNOTSUPP)
+ si.enable = 0;
+ else {
-+ mlog_errno(status);
-+ goto bail;
-+ }
-+ }
-+
-+ /* calculate meta data/clusters for setting security xattr */
-+ if (si.enable) {
-+ status = ocfs2_calc_security_init(dir, &si, &want_clusters,
-+ &xattr_credits, &xattr_ac);
- if (status < 0) {
-- if (status != -ENOSPC)
-- mlog_errno(status);
+ mlog_errno(status);
goto bail;
}
}
- handle = ocfs2_start_trans(osb, credits);
++ /* calculate meta data/clusters for setting security xattr */
++ if (si.enable) {
++ status = ocfs2_calc_security_init(dir, &si, &want_clusters,
++ &xattr_credits, &xattr_ac);
++ if (status < 0) {
++ mlog_errno(status);
++ goto bail;
++ }
++ }
++
+ /* don't reserve bitmap space for fast symlinks. */
+ if (l > ocfs2_fast_symlink_chars(sb))
+ want_clusters += 1;
if (IS_ERR(handle)) {
status = PTR_ERR(handle);
handle = NULL;
-@@ -1582,10 +1672,18 @@ static int ocfs2_symlink(struct inode *d
+@@ -1582,10 +1672,18 @@
goto bail;
}
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -1598,10 +1696,16 @@ static int ocfs2_symlink(struct inode *d
+@@ -1598,10 +1696,16 @@
u32 offset = 0;
inode->i_op = &ocfs2_symlink_inode_operations;
if (status < 0) {
if (status != -ENOSPC && status != -EINTR) {
mlog(ML_ERROR,
-@@ -1636,6 +1740,15 @@ static int ocfs2_symlink(struct inode *d
+@@ -1636,6 +1740,15 @@
}
}
status = ocfs2_add_entry(handle, dentry, inode,
le64_to_cpu(fe->i_blkno), parent_fe_bh,
de_bh);
-@@ -1654,23 +1767,31 @@ static int ocfs2_symlink(struct inode *d
+@@ -1654,23 +1767,31 @@
dentry->d_op = &ocfs2_dentry_ops;
d_instantiate(dentry, inode);
bail:
mlog_exit(status);
-@@ -1759,8 +1880,7 @@ leave:
+@@ -1759,8 +1880,7 @@
iput(orphan_dir_inode);
}
mlog_exit(status);
return status;
-@@ -1780,10 +1900,9 @@ static int ocfs2_orphan_add(struct ocfs2
+@@ -1780,10 +1900,9 @@
mlog_entry("(inode->i_ino = %lu)\n", inode->i_ino);
if (status < 0) {
mlog_errno(status);
goto leave;
-@@ -1829,8 +1948,7 @@ static int ocfs2_orphan_add(struct ocfs2
+@@ -1829,8 +1948,7 @@
(unsigned long long)OCFS2_I(inode)->ip_blkno, osb->slot_num);
leave:
mlog_exit(status);
return status;
-@@ -1898,8 +2016,7 @@ int ocfs2_orphan_del(struct ocfs2_super
+@@ -1898,8 +2016,7 @@
}
leave:
mlog_exit(status);
return status;
-@@ -1918,4 +2035,8 @@ const struct inode_operations ocfs2_dir_
+@@ -1918,4 +2035,8 @@
.setattr = ocfs2_setattr,
.getattr = ocfs2_getattr,
.permission = ocfs2_permission,
+ .listxattr = ocfs2_listxattr,
+ .removexattr = generic_removexattr,
};
-diff -purN linux-2.6.27/fs/ocfs2/ocfs2.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2.h
---- linux-2.6.27/fs/ocfs2/ocfs2.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/ocfs2.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/ocfs2.h
+--- a/fs/ocfs2/ocfs2.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/ocfs2.h Wed May 06 16:56:51 2009 +0100
@@ -34,7 +34,12 @@
#include <linux/workqueue.h>
#include <linux/kref.h>
/* For union ocfs2_dlm_lksb */
#include "stackglue.h"
-@@ -80,7 +85,7 @@ enum ocfs2_unlock_action {
+@@ -80,7 +85,7 @@
};
/* ocfs2_lock_res->l_flags flags. */
* the lvb */
#define OCFS2_LOCK_BUSY (0x00000002) /* we are currently in
* dlm_lock */
-@@ -156,6 +161,7 @@ enum ocfs2_vol_state
+@@ -156,6 +161,7 @@
{
VOLUME_INIT = 0,
VOLUME_MOUNTED,
VOLUME_DISMOUNTED,
VOLUME_DISABLED
};
-@@ -171,9 +177,13 @@ struct ocfs2_alloc_stats
+@@ -171,9 +177,13 @@
enum ocfs2_local_alloc_state
{
};
enum ocfs2_mount_options
-@@ -184,6 +194,11 @@ enum ocfs2_mount_options
+@@ -184,6 +194,11 @@
OCFS2_MOUNT_ERRORS_PANIC = 1 << 3, /* Panic on errors */
OCFS2_MOUNT_DATA_WRITEBACK = 1 << 4, /* No data ordering */
OCFS2_MOUNT_LOCALFLOCKS = 1 << 5, /* No cluster aware user file locks */
};
#define OCFS2_OSB_SOFT_RO 0x0001
-@@ -194,6 +209,7 @@ enum ocfs2_mount_options
+@@ -194,6 +209,7 @@
struct ocfs2_journal;
struct ocfs2_slot_info;
struct ocfs2_recovery_map;
struct ocfs2_super
{
struct task_struct *commit_task;
-@@ -214,6 +230,7 @@ struct ocfs2_super
+@@ -214,6 +230,7 @@
u32 bitmap_cpg;
u8 *uuid;
char *uuid_str;
u8 *vol_label;
u64 first_cluster_group_blkno;
u32 fs_generation;
-@@ -241,6 +258,7 @@ struct ocfs2_super
+@@ -241,6 +258,7 @@
int s_sectsize_bits;
int s_clustersize;
int s_clustersize_bits;
atomic_t vol_state;
struct mutex recovery_lock;
-@@ -252,15 +270,32 @@ struct ocfs2_super
+@@ -252,15 +270,32 @@
struct ocfs2_journal *journal;
unsigned long osb_commit_interval;
struct ocfs2_alloc_stats alloc_stats;
char dev_str[20]; /* "major,minor" of the device */
-@@ -340,6 +375,13 @@ static inline int ocfs2_supports_inline_
+@@ -340,6 +375,13 @@
return 0;
}
/* set / clear functions because cluster events can make these happen
* in parallel so we want the transitions to be atomic. this also
* means that any future flags osb_flags must be protected by spinlock
-@@ -437,6 +479,9 @@ static inline int ocfs2_uses_extended_sl
+@@ -436,6 +478,9 @@
+ (unsigned long long)le64_to_cpu((____gd)->bg_blkno), 7, \
(____gd)->bg_signature); \
} while (0)
-
++
+#define OCFS2_IS_VALID_XATTR_BLOCK(ptr) \
+ (!strcmp((ptr)->xb_signature, OCFS2_XATTR_BLOCK_SIGNATURE))
-+
+
static inline unsigned long ino_from_blkno(struct super_block *sb,
u64 blkno)
- {
-@@ -554,6 +599,14 @@ static inline unsigned int ocfs2_pages_p
+@@ -554,6 +599,14 @@
return pages_per_cluster;
}
static inline void ocfs2_init_inode_steal_slot(struct ocfs2_super *osb)
{
spin_lock(&osb->osb_lock);
-diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_fs.h
---- linux-2.6.27/fs/ocfs2/ocfs2_fs.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_fs.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/ocfs2_fs.h
+--- a/fs/ocfs2/ocfs2_fs.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/ocfs2_fs.h Wed May 06 16:56:51 2009 +0100
@@ -64,6 +64,7 @@
#define OCFS2_INODE_SIGNATURE "INODE01"
#define OCFS2_EXTENT_BLOCK_SIGNATURE "EXBLK01"
/*
* backup superblock flag is used to indicate that this volume
* has backup superblocks.
-@@ -149,10 +156,21 @@
+@@ -149,9 +156,20 @@
#define OCFS2_FEATURE_COMPAT_BACKUP_SB 0x0001
/*
* Unwritten extents support.
*/
#define OCFS2_FEATURE_RO_COMPAT_UNWRITTEN 0x0001
-
++
+/*
+ * Maintain quota information for this filesystem
+ */
+#define OCFS2_FEATURE_RO_COMPAT_USRQUOTA 0x0002
+#define OCFS2_FEATURE_RO_COMPAT_GRPQUOTA 0x0004
-+
+
/* The byte offset of the first backup block will be 1G.
* The following will be 4G, 16G, 64G, 256G and 1T.
- */
@@ -182,6 +200,7 @@
#define OCFS2_HEARTBEAT_FL (0x00000200) /* Heartbeat area */
#define OCFS2_CHAIN_FL (0x00000400) /* Chain allocator */
/*
* Flags on ocfs2_dinode.i_dyn_features
-@@ -299,6 +318,12 @@ struct ocfs2_new_group_input {
+@@ -299,6 +318,12 @@
*/
#define OCFS2_DEFAULT_LOCAL_ALLOC_SIZE 8
struct ocfs2_system_inode_info {
char *si_name;
int si_iflags;
-@@ -313,13 +338,17 @@ enum {
+@@ -313,13 +338,17 @@
#define OCFS2_FIRST_ONLINE_SYSTEM_INODE SLOT_MAP_SYSTEM_INODE
HEARTBEAT_SYSTEM_INODE,
GLOBAL_BITMAP_SYSTEM_INODE,
NUM_SYSTEM_INODES
};
-@@ -333,6 +362,8 @@ static struct ocfs2_system_inode_info oc
+@@ -333,6 +362,8 @@
[SLOT_MAP_SYSTEM_INODE] = { "slot_map", 0, S_IFREG | 0644 },
[HEARTBEAT_SYSTEM_INODE] = { "heartbeat", OCFS2_HEARTBEAT_FL, S_IFREG | 0644 },
[GLOBAL_BITMAP_SYSTEM_INODE] = { "global_bitmap", 0, S_IFREG | 0644 },
/* Slot-specific system inodes (one copy per slot) */
[ORPHAN_DIR_SYSTEM_INODE] = { "orphan_dir:%04d", 0, S_IFDIR | 0755 },
-@@ -340,7 +371,9 @@ static struct ocfs2_system_inode_info oc
+@@ -340,7 +371,9 @@
[INODE_ALLOC_SYSTEM_INODE] = { "inode_alloc:%04d", OCFS2_BITMAP_FL | OCFS2_CHAIN_FL, S_IFREG | 0644 },
[JOURNAL_SYSTEM_INODE] = { "journal:%04d", OCFS2_JOURNAL_FL, S_IFREG | 0644 },
[LOCAL_ALLOC_SYSTEM_INODE] = { "local_alloc:%04d", OCFS2_BITMAP_FL | OCFS2_LOCAL_ALLOC_FL, S_IFREG | 0644 },
};
/* Parameter passed from mount.ocfs2 to module */
-@@ -563,7 +596,7 @@ struct ocfs2_super_block {
+@@ -563,7 +596,7 @@
/*40*/ __le16 s_max_slots; /* Max number of simultaneous mounts
before tunefs required */
__le16 s_tunefs_flag;
__le64 s_first_cluster_group; /* Block offset of 1st cluster
* group header */
/*50*/ __u8 s_label[OCFS2_MAX_VOL_LABEL_LEN]; /* Label for mounting, etc. */
-@@ -571,7 +604,11 @@ struct ocfs2_super_block {
+@@ -571,7 +604,11 @@
/*A0*/ struct ocfs2_cluster_info s_cluster_info; /* Selected userspace
stack. Only valid
with INCOMPAT flag. */
/*140*/
/*
-@@ -621,7 +658,8 @@ struct ocfs2_dinode {
+@@ -621,7 +658,8 @@
belongs to */
__le16 i_suballoc_bit; /* Bit offset in suballocator
block group */
__le32 i_clusters; /* Cluster count */
__le32 i_uid; /* Owner UID */
__le32 i_gid; /* Owning GID */
-@@ -640,11 +678,12 @@ struct ocfs2_dinode {
+@@ -640,11 +678,12 @@
__le32 i_atime_nsec;
__le32 i_ctime_nsec;
__le32 i_mtime_nsec;
/*B8*/ union {
__le64 i_pad1; /* Generic way to refer to this
64bit union */
-@@ -715,6 +754,232 @@ struct ocfs2_group_desc
+@@ -715,6 +754,232 @@
/*40*/ __u8 bg_bitmap[0];
};
#ifdef __KERNEL__
static inline int ocfs2_fast_symlink_chars(struct super_block *sb)
{
-@@ -728,6 +993,20 @@ static inline int ocfs2_max_inline_data(
+@@ -728,12 +993,44 @@
offsetof(struct ocfs2_dinode, id2.i_data.id_data);
}
static inline int ocfs2_extent_recs_per_inode(struct super_block *sb)
{
int size;
-@@ -738,6 +1017,24 @@ static inline int ocfs2_extent_recs_per_
- return size / sizeof(struct ocfs2_extent_rec);
- }
+ size = sb->s_blocksize -
+ offsetof(struct ocfs2_dinode, id2.i_list.l_recs);
++
++ return size / sizeof(struct ocfs2_extent_rec);
++}
++
+static inline int ocfs2_extent_recs_per_inode_with_xattr(
+ struct super_block *sb,
+ struct ocfs2_dinode *di)
+ else
+ size = sb->s_blocksize -
+ offsetof(struct ocfs2_dinode, id2.i_list.l_recs);
-+
-+ return size / sizeof(struct ocfs2_extent_rec);
-+}
-+
- static inline int ocfs2_chain_recs_per_inode(struct super_block *sb)
- {
- int size;
-@@ -801,6 +1098,17 @@ static inline u64 ocfs2_backup_super_blk
- return 0;
+ return size / sizeof(struct ocfs2_extent_rec);
}
+@@ -800,6 +1097,17 @@
+
+ return 0;
+
++}
+
+static inline u16 ocfs2_xattr_recs_per_xb(struct super_block *sb)
+{
+ xb_attrs.xb_root.xt_list.l_recs);
+
+ return size / sizeof(struct ocfs2_extent_rec);
-+}
+ }
#else
static inline int ocfs2_fast_symlink_chars(int blocksize)
- {
-@@ -884,6 +1192,17 @@ static inline uint64_t ocfs2_backup_supe
+@@ -884,6 +1192,17 @@
return 0;
}
#endif /* __KERNEL__ */
-diff -purN linux-2.6.27/fs/ocfs2/ocfs2_jbd_compat.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_jbd_compat.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_jbd_compat.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/ocfs2_jbd_compat.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/ocfs2_jbd_compat.h Wed May 06 16:56:51 2009 +0100
@@ -0,0 +1,82 @@
+/* -*- mode: c; c-basic-offset: 8; -*-
+ * vim: noexpandtab sw=8 ts=8 sts=0:
+
+
+#endif /* OCFS2_JBD_COMPAT_H */
-diff -purN linux-2.6.27/fs/ocfs2/ocfs2_lockid.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_lockid.h
---- linux-2.6.27/fs/ocfs2/ocfs2_lockid.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_lockid.h 2009-03-25 16:11:38.000000000 +0000
-@@ -46,6 +46,7 @@ enum ocfs2_lock_type {
+diff -r 9608d5473017 fs/ocfs2/ocfs2_lockid.h
+--- a/fs/ocfs2/ocfs2_lockid.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/ocfs2_lockid.h Wed May 06 16:56:51 2009 +0100
+@@ -46,6 +46,7 @@
OCFS2_LOCK_TYPE_DENTRY,
OCFS2_LOCK_TYPE_OPEN,
OCFS2_LOCK_TYPE_FLOCK,
OCFS2_NUM_LOCK_TYPES
};
-@@ -77,6 +78,9 @@ static inline char ocfs2_lock_type_char(
+@@ -77,6 +78,9 @@
case OCFS2_LOCK_TYPE_FLOCK:
c = 'F';
break;
default:
c = '\0';
}
-@@ -95,6 +99,7 @@ static char *ocfs2_lock_type_strings[] =
+@@ -95,6 +99,7 @@
[OCFS2_LOCK_TYPE_DENTRY] = "Dentry",
[OCFS2_LOCK_TYPE_OPEN] = "Open",
[OCFS2_LOCK_TYPE_FLOCK] = "Flock",
};
static inline const char *ocfs2_lock_type_string(enum ocfs2_lock_type type)
-diff -purN linux-2.6.27/fs/ocfs2/quota.h linux-2.6.27.19-5.1/fs/ocfs2/quota.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/quota.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/quota.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/quota.h Wed May 06 16:56:51 2009 +0100
@@ -0,0 +1,121 @@
+/*
+ * quota.h for OCFS2
+extern struct dquot_operations ocfs2_quota_operations;
+
+#endif /* _OCFS2_QUOTA_H */
-diff -purN linux-2.6.27/fs/ocfs2/quota_global.c linux-2.6.27.19-5.1/fs/ocfs2/quota_global.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/quota_global.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/quota_global.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/quota_global.c Wed May 06 16:56:51 2009 +0100
@@ -0,0 +1,946 @@
+/*
+ * Implementation of operations over global quota file
+ .alloc_dquot = ocfs2_alloc_dquot,
+ .destroy_dquot = ocfs2_destroy_dquot,
+};
-diff -purN linux-2.6.27/fs/ocfs2/quota_local.c linux-2.6.27.19-5.1/fs/ocfs2/quota_local.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/quota_local.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/quota_local.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/quota_local.c Wed May 06 16:56:51 2009 +0100
@@ -0,0 +1,1252 @@
+/*
+ * Implementation of operations over local quota file
+{
+ unregister_quota_format(&ocfs2_quota_format);
+}
-diff -purN linux-2.6.27/fs/ocfs2/resize.c linux-2.6.27.19-5.1/fs/ocfs2/resize.c
---- linux-2.6.27/fs/ocfs2/resize.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/resize.c 2009-03-25 16:11:38.000000000 +0000
-@@ -200,7 +200,7 @@ static int update_backups(struct inode *
+diff -r 9608d5473017 fs/ocfs2/resize.c
+--- a/fs/ocfs2/resize.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/resize.c Wed May 06 16:56:51 2009 +0100
+@@ -200,7 +200,7 @@
if (cluster > clusters)
break;
if (ret < 0) {
mlog_errno(ret);
break;
-@@ -236,8 +236,8 @@ static void ocfs2_update_super_and_backu
+@@ -236,8 +236,8 @@
* update the superblock last.
* It doesn't matter if the write failed.
*/
if (ret < 0) {
mlog_errno(ret);
goto out;
-@@ -332,8 +332,7 @@ int ocfs2_group_extend(struct inode * in
+@@ -332,8 +332,7 @@
lgd_blkno = ocfs2_which_cluster_group(main_bm_inode,
first_new_cluster - 1);
if (ret < 0) {
mlog_errno(ret);
goto out_unlock;
-@@ -540,7 +539,7 @@ int ocfs2_group_add(struct inode *inode,
+@@ -540,7 +539,7 @@
goto out_unlock;
}
if (ret < 0) {
mlog(ML_ERROR, "Can't read the group descriptor # %llu "
"from the device.", (unsigned long long)input->group);
-diff -purN linux-2.6.27/fs/ocfs2/slot_map.c linux-2.6.27.19-5.1/fs/ocfs2/slot_map.c
---- linux-2.6.27/fs/ocfs2/slot_map.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/slot_map.c 2009-03-25 16:11:38.000000000 +0000
-@@ -150,8 +150,8 @@ int ocfs2_refresh_slot_info(struct ocfs2
+diff -r 9608d5473017 fs/ocfs2/slot_map.c
+--- a/fs/ocfs2/slot_map.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/slot_map.c Wed May 06 16:56:51 2009 +0100
+@@ -150,8 +150,8 @@
* be !NULL. Thus, ocfs2_read_blocks() will ignore blocknr. If
* this is not true, the read of -1 (UINT64_MAX) will fail.
*/
if (ret == 0) {
spin_lock(&osb->osb_lock);
ocfs2_update_slot_info(si);
-@@ -404,7 +404,8 @@ static int ocfs2_map_slot_buffers(struct
+@@ -404,7 +404,8 @@
(unsigned long long)blkno);
bh = NULL; /* Acquire a fresh bh */
if (status < 0) {
mlog_errno(status);
goto bail;
-diff -purN linux-2.6.27/fs/ocfs2/stack_user.c linux-2.6.27.19-5.1/fs/ocfs2/stack_user.c
---- linux-2.6.27/fs/ocfs2/stack_user.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/stack_user.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/stack_user.c
+--- a/fs/ocfs2/stack_user.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/stack_user.c Wed May 06 16:56:51 2009 +0100
@@ -28,6 +28,7 @@
#include "ocfs2.h" /* For struct ocfs2_lock_res */
#include "stackglue.h"
/*
* The control protocol starts with a handshake. Until the handshake
-@@ -739,6 +740,9 @@ static int user_dlm_lock_status(union oc
+@@ -739,11 +740,45 @@
static void *user_dlm_lvb(union ocfs2_dlm_lksb *lksb)
{
return (void *)(lksb->lksb_fsdlm.sb_lvbptr);
}
-@@ -746,6 +750,37 @@ static void user_dlm_dump_lksb(union ocf
+ static void user_dlm_dump_lksb(union ocfs2_dlm_lksb *lksb)
{
- }
-
++}
++
+static int user_plock(struct ocfs2_cluster_connection *conn,
+ u64 ino,
+ struct file *file,
+ return dlm_posix_unlock(conn->cc_lockspace, ino, file, fl);
+ else
+ return dlm_posix_lock(conn->cc_lockspace, ino, file, cmd, fl);
-+}
-+
+ }
+
/*
- * Compare a requested locking protocol version against the current one.
- *
-@@ -839,6 +874,7 @@ static struct ocfs2_stack_operations ocf
+@@ -839,6 +874,7 @@
.dlm_unlock = user_dlm_unlock,
.lock_status = user_dlm_lock_status,
.lock_lvb = user_dlm_lvb,
.dump_lksb = user_dlm_dump_lksb,
};
-diff -purN linux-2.6.27/fs/ocfs2/stackglue.c linux-2.6.27.19-5.1/fs/ocfs2/stackglue.c
---- linux-2.6.27/fs/ocfs2/stackglue.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/stackglue.c 2009-03-25 16:11:38.000000000 +0000
-@@ -288,6 +288,26 @@ void ocfs2_dlm_dump_lksb(union ocfs2_dlm
+diff -r 9608d5473017 fs/ocfs2/stackglue.c
+--- a/fs/ocfs2/stackglue.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/stackglue.c Wed May 06 16:56:51 2009 +0100
+@@ -288,6 +288,26 @@
}
EXPORT_SYMBOL_GPL(ocfs2_dlm_dump_lksb);
int ocfs2_cluster_connect(const char *stack_name,
const char *group,
int grouplen,
-diff -purN linux-2.6.27/fs/ocfs2/stackglue.h linux-2.6.27.19-5.1/fs/ocfs2/stackglue.h
---- linux-2.6.27/fs/ocfs2/stackglue.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/stackglue.h 2009-03-25 16:11:38.000000000 +0000
-@@ -28,6 +28,10 @@
+diff -r 9608d5473017 fs/ocfs2/stackglue.h
+--- a/fs/ocfs2/stackglue.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/stackglue.h Wed May 06 16:56:51 2009 +0100
+@@ -27,6 +27,10 @@
+
#include "dlm/dlmapi.h"
#include <linux/dlm.h>
-
++
+/* Needed for plock-related prototypes */
+struct file;
+struct file_lock;
-+
+
/*
* dlmconstants.h does not have a LOCAL flag. We hope to remove it
- * some day, but right now we need it. Let's fake it. This value is larger
-@@ -187,6 +191,17 @@ struct ocfs2_stack_operations {
+@@ -187,6 +191,17 @@
void *(*lock_lvb)(union ocfs2_dlm_lksb *lksb);
/*
* This is an optoinal debugging hook. If provided, the
* stack can dump debugging information about this lock.
*/
-@@ -240,6 +255,10 @@ int ocfs2_dlm_lock_status(union ocfs2_dl
+@@ -240,6 +255,10 @@
void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb);
void ocfs2_dlm_dump_lksb(union ocfs2_dlm_lksb *lksb);
void ocfs2_stack_glue_set_locking_protocol(struct ocfs2_locking_protocol *proto);
-diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballoc.c
---- linux-2.6.27/fs/ocfs2/suballoc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/suballoc.c 2009-03-25 16:11:38.000000000 +0000
-@@ -62,15 +62,18 @@ static int ocfs2_block_group_fill(handle
+diff -r 9608d5473017 fs/ocfs2/suballoc.c
+--- a/fs/ocfs2/suballoc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/suballoc.c Wed May 06 16:56:51 2009 +0100
+@@ -62,15 +62,18 @@
struct ocfs2_chain_list *cl);
static int ocfs2_block_group_alloc(struct ocfs2_super *osb,
struct inode *alloc_inode,
u16 *bit_off, u16 *bits_found);
static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb,
struct ocfs2_alloc_context *ac,
-@@ -110,8 +113,11 @@ static inline void ocfs2_block_to_cluste
+@@ -110,8 +113,11 @@
u64 data_blkno,
u64 *bg_blkno,
u16 *bg_bit_off);
{
struct inode *inode = ac->ac_inode;
-@@ -124,10 +130,8 @@ static void ocfs2_free_ac_resource(struc
+@@ -124,10 +130,8 @@
iput(inode);
ac->ac_inode = NULL;
}
}
void ocfs2_free_alloc_context(struct ocfs2_alloc_context *ac)
-@@ -276,7 +280,8 @@ static inline u16 ocfs2_find_smallest_ch
+@@ -276,7 +280,8 @@
*/
static int ocfs2_block_group_alloc(struct ocfs2_super *osb,
struct inode *alloc_inode,
{
int status, credits;
struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bh->b_data;
-@@ -294,9 +299,9 @@ static int ocfs2_block_group_alloc(struc
+@@ -294,9 +299,9 @@
mlog_entry_void();
cl = &fe->id2.i_chain;
if (status < 0) {
if (status != -ENOSPC)
mlog_errno(status);
-@@ -394,8 +399,7 @@ bail:
+@@ -394,8 +399,7 @@
if (ac)
ocfs2_free_alloc_context(ac);
mlog_exit(status);
return status;
-@@ -469,7 +473,8 @@ static int ocfs2_reserve_suballoc_bits(s
+@@ -469,7 +473,8 @@
goto bail;
}
if (status < 0) {
if (status != -ENOSPC)
mlog_errno(status);
-@@ -486,16 +491,15 @@ static int ocfs2_reserve_suballoc_bits(s
+@@ -486,16 +491,15 @@
get_bh(bh);
ac->ac_bh = bh;
bail:
{
int status;
u32 slot;
-@@ -507,7 +511,7 @@ int ocfs2_reserve_new_metadata(struct oc
+@@ -507,7 +511,7 @@
goto bail;
}
(*ac)->ac_which = OCFS2_AC_USE_META;
slot = osb->slot_num;
(*ac)->ac_group_search = ocfs2_block_group_search;
-@@ -532,6 +536,15 @@ bail:
- return status;
- }
+@@ -530,6 +534,15 @@
+ mlog_exit(status);
+ return status;
++}
++
+int ocfs2_reserve_new_metadata(struct ocfs2_super *osb,
+ struct ocfs2_extent_list *root_el,
+ struct ocfs2_alloc_context **ac)
+ return ocfs2_reserve_new_metadata_blocks(osb,
+ ocfs2_extend_meta_needed(root_el),
+ ac);
-+}
-+
+ }
+
static int ocfs2_steal_inode_from_other_nodes(struct ocfs2_super *osb,
- struct ocfs2_alloc_context *ac)
- {
-@@ -582,6 +595,14 @@ int ocfs2_reserve_new_inode(struct ocfs2
- (*ac)->ac_group_search = ocfs2_block_group_search;
+@@ -580,6 +593,14 @@
+ (*ac)->ac_which = OCFS2_AC_USE_INODE;
- /*
+ (*ac)->ac_group_search = ocfs2_block_group_search;
++
++ /*
+ * stat(2) can't handle i_ino > 32bits, so we tell the
+ * lower levels not to allocate us a block group past that
+ * limit. The 'inode64' mount option avoids this behavior.
+ */
+ if (!(osb->s_mount_opt & OCFS2_MOUNT_INODE64))
+ (*ac)->ac_max_block = (u32)~0U;
-+
-+ /*
+
+ /*
* slot is set when we successfully steal inode from other nodes.
- * It is reset in 3 places:
- * 1. when we flush the truncate log
-@@ -661,9 +682,9 @@ bail:
+@@ -661,9 +682,9 @@
/* Callers don't need to care which bitmap (local alloc or main) to
* use so we figure it out for them, but unfortunately this clutters
* things a bit. */
{
int status;
-@@ -677,24 +698,20 @@ int ocfs2_reserve_clusters(struct ocfs2_
+@@ -677,24 +698,20 @@
}
(*ac)->ac_bits_wanted = bits_wanted;
}
}
-@@ -718,6 +735,13 @@ bail:
- return status;
- }
+@@ -716,6 +733,13 @@
+ mlog_exit(status);
+ return status;
++}
++
+int ocfs2_reserve_clusters(struct ocfs2_super *osb,
+ u32 bits_wanted,
+ struct ocfs2_alloc_context **ac)
+{
+ return ocfs2_reserve_clusters_with_limit(osb, bits_wanted, 0, ac);
-+}
-+
+ }
+
/*
- * More or less lifted from ext3. I'll leave their description below:
- *
-@@ -1000,11 +1024,14 @@ static inline int ocfs2_block_group_reas
+@@ -1000,11 +1024,14 @@
static int ocfs2_cluster_group_search(struct inode *inode,
struct buffer_head *group_bh,
u32 bits_wanted, u32 min_bits,
u16 tmp_off, tmp_found;
unsigned int max_bits, gd_cluster_off;
-@@ -1037,6 +1064,17 @@ static int ocfs2_cluster_group_search(st
+@@ -1037,6 +1064,17 @@
if (ret)
return ret;
/* ocfs2_block_group_find_clear_bits() might
* return success, but we still want to return
* -ENOSPC unless it found the minimum number
-@@ -1045,6 +1083,12 @@ static int ocfs2_cluster_group_search(st
+@@ -1045,6 +1083,12 @@
*bit_off = tmp_off;
*bits_found = tmp_found;
search = 0; /* success */
}
}
-@@ -1054,19 +1098,31 @@ static int ocfs2_cluster_group_search(st
+@@ -1054,19 +1098,31 @@
static int ocfs2_block_group_search(struct inode *inode,
struct buffer_head *group_bh,
u32 bits_wanted, u32 min_bits,
return ret;
}
-@@ -1116,8 +1172,7 @@ static int ocfs2_search_one_group(struct
+@@ -1116,8 +1172,7 @@
struct ocfs2_group_desc *gd;
struct inode *alloc_inode = ac->ac_inode;
if (ret < 0) {
mlog_errno(ret);
return ret;
-@@ -1131,7 +1186,7 @@ static int ocfs2_search_one_group(struct
+@@ -1131,7 +1186,7 @@
}
ret = ac->ac_group_search(alloc_inode, group_bh, bits_wanted, min_bits,
if (ret < 0) {
if (ret != -ENOSPC)
mlog_errno(ret);
-@@ -1186,9 +1241,9 @@ static int ocfs2_search_chain(struct ocf
+@@ -1186,9 +1241,9 @@
bits_wanted, chain,
(unsigned long long)OCFS2_I(alloc_inode)->ip_blkno);
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -1204,21 +1259,20 @@ static int ocfs2_search_chain(struct ocf
+@@ -1204,21 +1259,20 @@
/* for now, the chain search is a bit simplistic. We just use
* the 1st group with any empty bits. */
while ((status = ac->ac_group_search(alloc_inode, group_bh,
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -1307,10 +1361,8 @@ static int ocfs2_search_chain(struct ocf
+@@ -1307,10 +1361,8 @@
*bg_blkno = le64_to_cpu(bg->bg_blkno);
*bits_left = le16_to_cpu(bg->bg_free_bits_count);
bail:
mlog_exit(status);
return status;
-@@ -1723,7 +1775,6 @@ int ocfs2_free_suballoc_bits(handle_t *h
+@@ -1723,7 +1775,6 @@
{
int status = 0;
u32 tmp_used;
struct ocfs2_dinode *fe = (struct ocfs2_dinode *) alloc_bh->b_data;
struct ocfs2_chain_list *cl = &fe->id2.i_chain;
struct buffer_head *group_bh = NULL;
-@@ -1742,8 +1793,7 @@ int ocfs2_free_suballoc_bits(handle_t *h
+@@ -1742,8 +1793,7 @@
(unsigned long long)OCFS2_I(alloc_inode)->ip_blkno, count,
(unsigned long long)bg_blkno, start_bit);
if (status < 0) {
mlog_errno(status);
goto bail;
-@@ -1784,8 +1834,7 @@ int ocfs2_free_suballoc_bits(handle_t *h
+@@ -1784,8 +1834,7 @@
}
bail:
mlog_exit(status);
return status;
-@@ -1838,9 +1887,15 @@ int ocfs2_free_clusters(handle_t *handle
+@@ -1838,9 +1887,15 @@
status = ocfs2_free_suballoc_bits(handle, bitmap_inode, bitmap_bh,
bg_start_bit, bg_blkno,
num_clusters);
mlog_errno(status);
+ goto out;
+ }
-+
+
+ ocfs2_local_alloc_seen_free_bits(OCFS2_SB(bitmap_inode->i_sb),
+ num_clusters);
-
++
+out:
mlog_exit(status);
return status;
}
-@@ -1891,3 +1946,84 @@ static inline void ocfs2_debug_suballoc_
+@@ -1891,3 +1946,84 @@
(unsigned long long)fe->id2.i_chain.cl_recs[i].c_blkno);
}
}
+
+ return ret;
+}
-diff -purN linux-2.6.27/fs/ocfs2/suballoc.h linux-2.6.27.19-5.1/fs/ocfs2/suballoc.h
---- linux-2.6.27/fs/ocfs2/suballoc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/suballoc.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/suballoc.h
+--- a/fs/ocfs2/suballoc.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/suballoc.h Wed May 06 16:56:51 2009 +0100
@@ -28,10 +28,11 @@
typedef int (group_search_t)(struct inode *,
struct ocfs2_alloc_context {
struct inode *ac_inode; /* which bitmap are we allocating from? */
-@@ -51,6 +52,8 @@ struct ocfs2_alloc_context {
+@@ -51,6 +52,8 @@
group_search_t *ac_group_search;
u64 ac_last_group;
};
void ocfs2_free_alloc_context(struct ocfs2_alloc_context *ac);
-@@ -59,9 +62,17 @@ static inline int ocfs2_alloc_context_bi
+@@ -59,9 +62,17 @@
return ac->ac_bits_wanted - ac->ac_bits_given;
}
int ocfs2_reserve_new_inode(struct ocfs2_super *osb,
struct ocfs2_alloc_context **ac);
int ocfs2_reserve_clusters(struct ocfs2_super *osb,
-@@ -147,6 +158,7 @@ static inline int ocfs2_is_cluster_bitma
+@@ -147,6 +158,7 @@
* apis above. */
int ocfs2_reserve_cluster_bitmap_bits(struct ocfs2_super *osb,
struct ocfs2_alloc_context *ac);
/* given a cluster offset, calculate which block group it belongs to
* and return that block offset. */
-@@ -156,4 +168,8 @@ u64 ocfs2_which_cluster_group(struct ino
+@@ -156,4 +168,8 @@
int ocfs2_check_group_descriptor(struct super_block *sb,
struct ocfs2_dinode *di,
struct ocfs2_group_desc *gd);
+ struct ocfs2_alloc_context **data_ac,
+ struct ocfs2_alloc_context **meta_ac);
#endif /* _CHAINALLOC_H_ */
-diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
---- linux-2.6.27/fs/ocfs2/super.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/super.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/super.c
+--- a/fs/ocfs2/super.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/super.c Wed May 06 16:56:51 2009 +0100
@@ -41,6 +41,7 @@
#include <linux/debugfs.h>
#include <linux/mount.h>
/* OCFS2 needs to schedule several differnt types of work which
* require cluster locking, disk I/O, recovery waits, etc. Since these
-@@ -123,6 +128,9 @@ static int ocfs2_get_sector(struct super
+@@ -123,6 +128,9 @@
static void ocfs2_write_super(struct super_block *sb);
static struct inode *ocfs2_alloc_inode(struct super_block *sb);
static void ocfs2_destroy_inode(struct inode *inode);
static const struct super_operations ocfs2_sops = {
.statfs = ocfs2_statfs,
-@@ -136,6 +144,8 @@ static const struct super_operations ocf
+@@ -136,6 +144,8 @@
.put_super = ocfs2_put_super,
.remount_fs = ocfs2_remount,
.show_options = ocfs2_show_options,
};
enum {
-@@ -154,6 +164,13 @@ enum {
+@@ -154,6 +164,13 @@
Opt_localalloc,
Opt_localflocks,
Opt_stack,
Opt_err,
};
-@@ -173,6 +190,13 @@ static match_table_t tokens = {
+@@ -173,6 +190,13 @@
{Opt_localalloc, "localalloc=%d"},
{Opt_localflocks, "localflocks"},
{Opt_stack, "cluster_stack=%s"},
{Opt_err, NULL}
};
-@@ -205,14 +229,28 @@ static int ocfs2_sync_fs(struct super_bl
+@@ -205,12 +229,26 @@
ocfs2_schedule_truncate_log_flush(osb, 0);
}
+ target);
}
return 0;
- }
-
++}
++
+static int ocfs2_need_system_inode(struct ocfs2_super *osb, int ino)
+{
+ if (!OCFS2_HAS_RO_COMPAT_FEATURE(osb->sb, OCFS2_FEATURE_RO_COMPAT_USRQUOTA)
+ || ino == LOCAL_GROUP_QUOTA_SYSTEM_INODE))
+ return 0;
+ return 1;
-+}
-+
+ }
+
static int ocfs2_init_global_system_inodes(struct ocfs2_super *osb)
- {
- struct inode *new = NULL;
-@@ -239,6 +277,8 @@ static int ocfs2_init_global_system_inod
+@@ -239,6 +277,8 @@
for (i = OCFS2_FIRST_ONLINE_SYSTEM_INODE;
i <= OCFS2_LAST_GLOBAL_SYSTEM_INODE; i++) {
new = ocfs2_get_system_file_inode(osb, i, osb->slot_num);
if (!new) {
ocfs2_release_system_inodes(osb);
-@@ -269,6 +309,8 @@ static int ocfs2_init_local_system_inode
+@@ -269,6 +309,8 @@
for (i = OCFS2_LAST_GLOBAL_SYSTEM_INODE + 1;
i < NUM_SYSTEM_INODES;
i++) {
new = ocfs2_get_system_file_inode(osb, i, osb->slot_num);
if (!new) {
ocfs2_release_system_inodes(osb);
-@@ -325,6 +367,7 @@ static struct inode *ocfs2_alloc_inode(s
+@@ -325,6 +367,7 @@
if (!oi)
return NULL;
return &oi->vfs_inode;
}
-@@ -406,8 +449,23 @@ static int ocfs2_remount(struct super_bl
+@@ -406,8 +449,23 @@
goto out;
}
/* Lock here so the check of HARD_RO and the potential
* setting of SOFT_RO is atomic. */
spin_lock(&osb->osb_lock);
-@@ -443,11 +501,28 @@ static int ocfs2_remount(struct super_bl
+@@ -443,11 +501,28 @@
}
unlock_osb:
spin_unlock(&osb->osb_lock);
osb->s_mount_opt = parsed_options.mount_opt;
osb->s_atime_quantum = parsed_options.atime_quantum;
osb->preferred_slot = parsed_options.slot;
-@@ -601,6 +676,131 @@ static int ocfs2_verify_userspace_stack(
+@@ -601,6 +676,131 @@
return 0;
}
static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
{
struct dentry *root;
-@@ -633,11 +833,32 @@ static int ocfs2_fill_super(struct super
+@@ -633,17 +833,41 @@
}
brelse(bh);
bh = NULL;
status = ocfs2_verify_userspace_stack(osb, &parsed_options);
if (status)
-@@ -645,6 +866,9 @@ static int ocfs2_fill_super(struct super
+ goto read_super_error;
sb->s_magic = OCFS2_SUPER_MAGIC;
-
++
+ sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
+ ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0);
-+
+
/* Hard readonly mode only if: bdev_read_only, MS_RDONLY,
* heartbeat=none */
- if (bdev_read_only(sb->s_bdev)) {
-@@ -739,12 +963,33 @@ static int ocfs2_fill_super(struct super
+@@ -739,12 +963,33 @@
atomic_set(&osb->vol_state, VOLUME_MOUNTED);
wake_up(&osb->osb_mount_event);
if (inode)
iput(inode);
-@@ -847,6 +1092,12 @@ static int ocfs2_parse_options(struct su
+@@ -847,6 +1092,12 @@
case Opt_data_writeback:
mopt->mount_opt |= OCFS2_MOUNT_DATA_WRITEBACK;
break;
case Opt_atime_quantum:
if (match_int(&args[0], &option)) {
status = 0;
-@@ -873,7 +1124,7 @@ static int ocfs2_parse_options(struct su
+@@ -873,7 +1124,7 @@
if (option < 0)
return 0;
if (option == 0)
mopt->commit_interval = HZ * option;
break;
case Opt_localalloc:
-@@ -918,6 +1169,44 @@ static int ocfs2_parse_options(struct su
+@@ -918,6 +1169,44 @@
OCFS2_STACK_LABEL_LEN);
mopt->cluster_stack[OCFS2_STACK_LABEL_LEN] = '\0';
break;
default:
mlog(ML_ERROR,
"Unrecognized mount option \"%s\" "
-@@ -938,6 +1227,7 @@ static int ocfs2_show_options(struct seq
+@@ -938,6 +1227,7 @@
{
struct ocfs2_super *osb = OCFS2_SB(mnt->mnt_sb);
unsigned long opts = osb->s_mount_opt;
if (opts & OCFS2_MOUNT_HB_LOCAL)
seq_printf(s, ",_netdev,heartbeat=local");
-@@ -970,8 +1260,9 @@ static int ocfs2_show_options(struct seq
+@@ -970,8 +1260,9 @@
seq_printf(s, ",commit=%u",
(unsigned) (osb->osb_commit_interval / HZ));
if (opts & OCFS2_MOUNT_LOCALFLOCKS)
seq_printf(s, ",localflocks,");
-@@ -980,12 +1271,32 @@ static int ocfs2_show_options(struct seq
+@@ -980,12 +1271,32 @@
seq_printf(s, ",cluster_stack=%.*s", OCFS2_STACK_LABEL_LEN,
osb->osb_cluster_stack);
mlog_entry_void();
-@@ -1003,6 +1314,13 @@ static int __init ocfs2_init(void)
+@@ -1002,6 +1313,13 @@
+ mlog_errno(status);
goto leave;
}
-
++
+ status = init_ocfs2_quota_format();
+ if (status < 0) {
+ mlog_errno(status);
+ goto leave;
+ }
+ added_format = 1;
-+
+
ocfs2_wq = create_singlethread_workqueue("ocfs2_wq");
if (!ocfs2_wq) {
- status = -ENOMEM;
-@@ -1021,6 +1339,8 @@ leave:
+@@ -1021,6 +1339,8 @@
if (status < 0) {
ocfs2_free_mem_caches();
exit_ocfs2_uptodate_cache();
}
mlog_exit(status);
-@@ -1040,6 +1360,8 @@ static void __exit ocfs2_exit(void)
+@@ -1039,6 +1359,8 @@
+ flush_workqueue(ocfs2_wq);
destroy_workqueue(ocfs2_wq);
}
-
-+ exit_ocfs2_quota_format();
+
++ exit_ocfs2_quota_format();
+
debugfs_remove(ocfs2_debugfs_root);
- ocfs2_free_mem_caches();
-@@ -1132,6 +1454,7 @@ static void ocfs2_inode_init_once(void *
+@@ -1132,6 +1454,7 @@
oi->ip_dir_start_lookup = 0;
init_rwsem(&oi->ip_alloc_sem);
mutex_init(&oi->ip_io_mutex);
oi->ip_blkno = 0ULL;
-@@ -1154,8 +1477,27 @@ static int ocfs2_initialize_mem_caches(v
+@@ -1154,8 +1477,27 @@
(SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
SLAB_MEM_SPREAD),
ocfs2_inode_init_once);
return 0;
}
-@@ -1164,8 +1506,15 @@ static void ocfs2_free_mem_caches(void)
+@@ -1164,8 +1506,15 @@
{
if (ocfs2_inode_cachep)
kmem_cache_destroy(ocfs2_inode_cachep);
--
- ocfs2_inode_cachep = NULL;
-+
++ ocfs2_inode_cachep = NULL;
+
+- ocfs2_inode_cachep = NULL;
+ if (ocfs2_dquot_cachep)
+ kmem_cache_destroy(ocfs2_dquot_cachep);
+ ocfs2_dquot_cachep = NULL;
}
static int ocfs2_get_sector(struct super_block *sb,
-@@ -1265,6 +1614,8 @@ static void ocfs2_dismount_volume(struct
+@@ -1264,6 +1613,8 @@
+ BUG_ON(!sb);
osb = OCFS2_SB(sb);
BUG_ON(!osb);
-
-+ ocfs2_disable_quotas(osb);
+
++ ocfs2_disable_quotas(osb);
+
ocfs2_shutdown_local_alloc(osb);
- ocfs2_truncate_log_shutdown(osb);
-@@ -1375,6 +1726,9 @@ static int ocfs2_initialize_super(struct
+@@ -1375,6 +1726,9 @@
sb->s_fs_info = osb;
sb->s_op = &ocfs2_sops;
sb->s_export_op = &ocfs2_export_ops;
sb->s_time_gran = 1;
sb->s_flags |= MS_NOATIME;
/* this is needed to support O_LARGEFILE */
-@@ -1421,8 +1775,12 @@ static int ocfs2_initialize_super(struct
+@@ -1421,8 +1775,12 @@
osb->slot_num = OCFS2_INVALID_SLOT;
init_waitqueue_head(&osb->osb_mount_event);
-@@ -1568,6 +1926,7 @@ static int ocfs2_initialize_super(struct
+@@ -1568,6 +1926,7 @@
osb->first_cluster_group_blkno =
le64_to_cpu(di->id2.i_super.s_first_cluster_group);
osb->fs_generation = le32_to_cpu(di->i_fs_generation);
mlog(0, "vol_label: %s\n", osb->vol_label);
mlog(0, "uuid: %s\n", osb->uuid_str);
mlog(0, "root_blkno=%llu, system_dir_blkno=%llu\n",
-diff -purN linux-2.6.27/fs/ocfs2/symlink.c linux-2.6.27.19-5.1/fs/ocfs2/symlink.c
---- linux-2.6.27/fs/ocfs2/symlink.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/symlink.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/symlink.c
+--- a/fs/ocfs2/symlink.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/symlink.c Wed May 06 16:56:51 2009 +0100
@@ -50,6 +50,7 @@
#include "inode.h"
#include "journal.h"
#include "buffer_head_io.h"
-@@ -83,11 +84,7 @@ static char *ocfs2_fast_symlink_getlink(
+@@ -83,11 +84,7 @@
mlog_entry_void();
if (status < 0) {
mlog_errno(status);
link = ERR_PTR(status);
-@@ -157,8 +154,7 @@ bail:
+@@ -157,8 +154,7 @@
kunmap(page);
page_cache_release(page);
}
return ERR_PTR(status);
}
-@@ -168,10 +164,18 @@ const struct inode_operations ocfs2_syml
+@@ -168,10 +164,18 @@
.follow_link = ocfs2_follow_link,
.getattr = ocfs2_getattr,
.setattr = ocfs2_setattr,
+ .listxattr = ocfs2_listxattr,
+ .removexattr = generic_removexattr,
};
-diff -purN linux-2.6.27/fs/ocfs2/uptodate.c linux-2.6.27.19-5.1/fs/ocfs2/uptodate.c
---- linux-2.6.27/fs/ocfs2/uptodate.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/uptodate.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/uptodate.c
+--- a/fs/ocfs2/uptodate.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/uptodate.c Wed May 06 16:56:51 2009 +0100
@@ -53,7 +53,11 @@
#include <linux/highmem.h>
#include <linux/buffer_head.h>
#define MLOG_MASK_PREFIX ML_UPTODATE
-@@ -511,14 +515,10 @@ static void ocfs2_remove_metadata_tree(s
+@@ -511,14 +515,10 @@
ci->ci_num_cached--;
}
struct ocfs2_meta_cache_item *item = NULL;
struct ocfs2_inode_info *oi = OCFS2_I(inode);
struct ocfs2_caching_info *ci = &oi->ip_metadata_cache;
-@@ -544,6 +544,30 @@ void ocfs2_remove_from_cache(struct inod
+@@ -544,6 +544,30 @@
kmem_cache_free(ocfs2_uptodate_cachep, item);
}
int __init init_ocfs2_uptodate_cache(void)
{
ocfs2_uptodate_cachep = kmem_cache_create("ocfs2_uptodate",
-diff -purN linux-2.6.27/fs/ocfs2/uptodate.h linux-2.6.27.19-5.1/fs/ocfs2/uptodate.h
---- linux-2.6.27/fs/ocfs2/uptodate.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/uptodate.h 2009-03-25 16:11:38.000000000 +0000
-@@ -40,6 +40,9 @@ void ocfs2_set_new_buffer_uptodate(struc
+diff -r 9608d5473017 fs/ocfs2/uptodate.h
+--- a/fs/ocfs2/uptodate.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/uptodate.h Wed May 06 16:56:51 2009 +0100
+@@ -40,6 +40,9 @@
struct buffer_head *bh);
void ocfs2_remove_from_cache(struct inode *inode,
struct buffer_head *bh);
int ocfs2_buffer_read_ahead(struct inode *inode,
struct buffer_head *bh);
-diff -purN linux-2.6.27/fs/ocfs2/xattr.c linux-2.6.27.19-5.1/fs/ocfs2/xattr.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/xattr.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/xattr.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/xattr.c Wed May 06 16:56:51 2009 +0100
@@ -0,0 +1,5299 @@
+/* -*- mode: c; c-basic-offset: 8; -*-
+ * vim: noexpandtab sw=8 ts=8 sts=0:
+ .get = ocfs2_xattr_user_get,
+ .set = ocfs2_xattr_user_set,
+};
-diff -purN linux-2.6.27/fs/ocfs2/xattr.h linux-2.6.27.19-5.1/fs/ocfs2/xattr.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/xattr.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/xattr.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/xattr.h Wed May 06 16:56:51 2009 +0100
@@ -0,0 +1,73 @@
+/* -*- mode: c; c-basic-offset: 8; -*-
+ * vim: noexpandtab sw=8 ts=8 sts=0:
+ int *, int *, struct ocfs2_alloc_context **);
+
+#endif /* OCFS2_XATTR_H */
-diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
---- linux-2.6.27/fs/open.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/open.c 2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/open.c
+--- a/fs/open.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/open.c Wed May 06 16:56:51 2009 +0100
@@ -29,6 +29,7 @@
#include <linux/rcupdate.h>
#include <linux/audit.h>
int vfs_statfs(struct dentry *dentry, struct kstatfs *buf)
{
-@@ -122,7 +123,7 @@ static int vfs_statfs64(struct dentry *d
+@@ -122,7 +123,7 @@
return 0;
}
{
struct path path;
int error;
-@@ -138,8 +139,7 @@ asmlinkage long sys_statfs(const char __
+@@ -138,8 +139,7 @@
return error;
}
{
struct path path;
long error;
-@@ -157,8 +157,7 @@ asmlinkage long sys_statfs64(const char
+@@ -157,8 +157,7 @@
return error;
}
{
struct file * file;
struct statfs tmp;
-@@ -176,7 +175,7 @@ out:
+@@ -176,7 +175,7 @@
return error;
}
{
struct file * file;
struct statfs64 tmp;
-@@ -197,8 +196,8 @@ out:
+@@ -197,8 +196,8 @@
return error;
}
{
int err;
struct iattr newattrs;
-@@ -209,16 +208,15 @@ int do_truncate(struct dentry *dentry, l
+@@ -209,16 +208,15 @@
newattrs.ia_size = length;
newattrs.ia_valid = ATTR_SIZE | time_attrs;
mutex_unlock(&dentry->d_inode->i_mutex);
return err;
}
-@@ -251,7 +249,7 @@ static long do_sys_truncate(const char _
+@@ -251,7 +249,7 @@
if (error)
goto dput_and_out;
if (error)
goto mnt_drop_write_and_out;
-@@ -274,7 +272,7 @@ static long do_sys_truncate(const char _
+@@ -274,7 +272,7 @@
error = locks_verify_truncate(inode, NULL, length);
if (!error) {
DQUOT_INIT(inode);
}
put_write_and_out:
-@@ -287,7 +285,7 @@ out:
+@@ -287,7 +285,7 @@
return error;
}
{
/* on 32-bit boxen it will cut the range 2^31--2^32-1 off */
return do_sys_truncate(path, (long)length);
-@@ -329,14 +327,15 @@ static long do_sys_ftruncate(unsigned in
+@@ -329,14 +327,15 @@
error = locks_verify_truncate(inode, file, length);
if (!error)
{
long ret = do_sys_ftruncate(fd, length, 1);
/* avoid REGPARM breakage on x86: */
-@@ -346,21 +345,35 @@ asmlinkage long sys_ftruncate(unsigned i
+@@ -346,21 +345,35 @@
/* LFS versions of truncate are only needed on 32 bit machines */
#if BITS_PER_LONG == 32
{
struct file *file;
struct inode *inode;
-@@ -417,13 +430,20 @@ out_fput:
+@@ -417,13 +430,20 @@
out:
return ret;
}
{
struct path path;
struct inode *inode;
-@@ -474,7 +494,7 @@ asmlinkage long sys_faccessat(int dfd, c
+@@ -474,7 +494,7 @@
goto out_path_release;
}
/* SuS v2 requires we report a read only fs too */
if (res || !(mode & S_IWOTH) || special_file(inode->i_mode))
goto out_path_release;
-@@ -503,12 +523,12 @@ out:
+@@ -503,12 +523,12 @@
return res;
}
{
struct path path;
int error;
-@@ -517,7 +537,7 @@ asmlinkage long sys_chdir(const char __u
+@@ -517,7 +537,7 @@
if (error)
goto out;
if (error)
goto dput_and_out;
-@@ -529,7 +549,7 @@ out:
+@@ -529,7 +549,7 @@
return error;
}
{
struct file *file;
struct inode *inode;
-@@ -546,7 +566,7 @@ asmlinkage long sys_fchdir(unsigned int
+@@ -546,7 +566,7 @@
if (!S_ISDIR(inode->i_mode))
goto out_putf;
if (!error)
set_fs_pwd(current->fs, &file->f_path);
out_putf:
-@@ -555,7 +575,7 @@ out:
+@@ -555,7 +575,7 @@
return error;
}
{
struct path path;
int error;
-@@ -564,7 +584,7 @@ asmlinkage long sys_chroot(const char __
+@@ -564,7 +584,7 @@
if (error)
goto out;
if (error)
goto dput_and_out;
-@@ -580,7 +600,7 @@ out:
+@@ -580,7 +600,7 @@
return error;
}
{
struct inode * inode;
struct dentry * dentry;
-@@ -597,15 +617,15 @@ asmlinkage long sys_fchmod(unsigned int
+@@ -597,15 +617,15 @@
audit_inode(NULL, dentry);
mutex_unlock(&inode->i_mutex);
mnt_drop_write(file->f_path.mnt);
out_putf:
-@@ -614,8 +634,7 @@ out:
+@@ -614,8 +634,7 @@
return err;
}
{
struct path path;
struct inode *inode;
-@@ -635,7 +654,7 @@ asmlinkage long sys_fchmodat(int dfd, co
+@@ -635,7 +654,7 @@
mode = inode->i_mode;
newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
mutex_unlock(&inode->i_mutex);
mnt_drop_write(path.mnt);
dput_and_out:
-@@ -644,12 +663,13 @@ out:
+@@ -644,12 +663,13 @@
return error;
}
{
struct inode *inode = dentry->d_inode;
int error;
-@@ -667,14 +687,17 @@ static int chown_common(struct dentry *
+@@ -667,14 +687,17 @@
if (!S_ISDIR(inode->i_mode))
newattrs.ia_valid |=
ATTR_KILL_SUID | ATTR_KILL_SGID | ATTR_KILL_PRIV;
{
struct path path;
int error;
-@@ -685,7 +708,7 @@ asmlinkage long sys_chown(const char __u
+@@ -685,7 +708,7 @@
error = mnt_want_write(path.mnt);
if (error)
goto out_release;
mnt_drop_write(path.mnt);
out_release:
path_put(&path);
-@@ -693,8 +716,8 @@ out:
+@@ -693,8 +716,8 @@
return error;
}
{
struct path path;
int error = -EINVAL;
-@@ -710,7 +733,7 @@ asmlinkage long sys_fchownat(int dfd, co
+@@ -710,7 +733,7 @@
error = mnt_want_write(path.mnt);
if (error)
goto out_release;
mnt_drop_write(path.mnt);
out_release:
path_put(&path);
-@@ -718,7 +741,7 @@ out:
+@@ -718,7 +741,7 @@
return error;
}
{
struct path path;
int error;
-@@ -729,7 +752,7 @@ asmlinkage long sys_lchown(const char __
+@@ -729,7 +752,7 @@
error = mnt_want_write(path.mnt);
if (error)
goto out_release;
mnt_drop_write(path.mnt);
out_release:
path_put(&path);
-@@ -737,8 +760,7 @@ out:
+@@ -737,8 +760,7 @@
return error;
}
{
struct file * file;
int error = -EBADF;
-@@ -748,12 +770,12 @@ asmlinkage long sys_fchown(unsigned int
+@@ -748,12 +770,12 @@
if (!file)
goto out;
mnt_drop_write(file->f_path.mnt);
out_fput:
fput(file);
-@@ -1023,13 +1045,14 @@ long do_sys_open(int dfd, const char __u
+@@ -1023,13 +1045,14 @@
fsnotify_open(f->f_path.dentry);
fd_install(fd, f);
}
{
long ret;
-@@ -1042,8 +1065,8 @@ asmlinkage long sys_open(const char __us
+@@ -1042,8 +1065,8 @@
return ret;
}
{
long ret;
-@@ -1062,7 +1085,7 @@ asmlinkage long sys_openat(int dfd, cons
+@@ -1062,7 +1085,7 @@
* For backward compatibility? Maybe this should be moved
* into arch/i386 instead?
*/
{
return sys_open(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode);
}
-@@ -1098,7 +1121,7 @@ EXPORT_SYMBOL(filp_close);
+@@ -1098,7 +1121,7 @@
* releasing the fd. This ensures that one clone task can't release
* an fd while another clone is opening it.
*/
{
struct file * filp;
struct files_struct *files = current->files;
-@@ -1112,6 +1135,7 @@ asmlinkage long sys_close(unsigned int f
+@@ -1112,6 +1135,7 @@
filp = fdt->fd[fd];
if (!filp)
goto out_unlock;
rcu_assign_pointer(fdt->fd[fd], NULL);
FD_CLR(fd, fdt->close_on_exec);
__put_unused_fd(files, fd);
-@@ -1131,14 +1155,13 @@ out_unlock:
+@@ -1131,14 +1155,13 @@
spin_unlock(&files->file_lock);
return -EBADF;
}
{
if (capable(CAP_SYS_TTY_CONFIG)) {
/* XXX: this needs locking */
-diff -purN linux-2.6.27/fs/partitions/check.c linux-2.6.27.19-5.1/fs/partitions/check.c
---- linux-2.6.27/fs/partitions/check.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/partitions/check.c 2009-03-25 16:11:35.000000000 +0000
-@@ -480,11 +480,14 @@ int rescan_partitions(struct gendisk *di
+diff -r 9608d5473017 fs/partitions/check.c
+--- a/fs/partitions/check.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/partitions/check.c Wed May 06 16:56:51 2009 +0100
+@@ -480,11 +480,14 @@
res = invalidate_partition(disk, 0);
if (res)
return res;
if (!get_capacity(disk) || !(state = check_partition(disk, bdev)))
return 0;
if (IS_ERR(state)) /* I/O error reading the partition table */
-@@ -498,10 +501,23 @@ int rescan_partitions(struct gendisk *di
+@@ -498,10 +501,23 @@
sector_t from = state->parts[p].from;
if (!size)
continue;
}
res = add_partition(disk, p, from, size, state->parts[p].flags);
if (res) {
-diff -purN linux-2.6.27/fs/pipe.c linux-2.6.27.19-5.1/fs/pipe.c
---- linux-2.6.27/fs/pipe.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/pipe.c 2009-03-25 16:11:32.000000000 +0000
-@@ -1051,7 +1051,7 @@ int do_pipe(int *fd)
+diff -r 9608d5473017 fs/pipe.c
+--- a/fs/pipe.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/pipe.c Wed May 06 16:56:51 2009 +0100
+@@ -1051,7 +1051,7 @@
* sys_pipe() is the normal C calling standard for creating
* a pipe. It's not the way Unix traditionally does this, though.
*/
{
int fd[2];
int error;
-@@ -1067,7 +1067,7 @@ asmlinkage long __weak sys_pipe2(int __u
+@@ -1067,7 +1067,7 @@
return error;
}
{
return sys_pipe2(fildes, 0);
}
-diff -purN linux-2.6.27/fs/proc/array.c linux-2.6.27.19-5.1/fs/proc/array.c
---- linux-2.6.27/fs/proc/array.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/proc/array.c 2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/proc/array.c
+--- a/fs/proc/array.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/proc/array.c Wed May 06 16:56:51 2009 +0100
@@ -81,6 +81,7 @@
#include <linux/seq_file.h>
#include <linux/pid_namespace.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
-@@ -190,6 +191,8 @@ static inline void task_state(struct seq
+@@ -189,6 +190,8 @@
+ ppid, tpid,
p->uid, p->euid, p->suid, p->fsuid,
p->gid, p->egid, p->sgid, p->fsgid);
-
-+ task_utrace_proc_status(m, p);
+
++ task_utrace_proc_status(m, p);
+
task_lock(p);
if (p->files)
- fdt = files_fdtable(p->files);
-diff -purN linux-2.6.27/fs/proc/mmu.c linux-2.6.27.19-5.1/fs/proc/mmu.c
---- linux-2.6.27/fs/proc/mmu.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/proc/mmu.c 2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/proc/mmu.c
+--- a/fs/proc/mmu.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/proc/mmu.c Wed May 06 16:56:51 2009 +0100
@@ -14,11 +14,21 @@
#include <asm/pgtable.h>
#include "internal.h"
vmi->used = 0;
-@@ -30,7 +40,8 @@ void get_vmalloc_info(struct vmalloc_inf
+@@ -30,7 +40,8 @@
prev_end = VMALLOC_START;
for (vma = vmlist; vma; vma = vma->next) {
unsigned long addr = (unsigned long) vma->addr;
-@@ -55,6 +66,7 @@ void get_vmalloc_info(struct vmalloc_inf
+@@ -55,6 +66,7 @@
if (VMALLOC_END - prev_end > vmi->largest_chunk)
vmi->largest_chunk = VMALLOC_END - prev_end;
+ read_unlock(&vmlist_lock);
}
}
-diff -purN linux-2.6.27/fs/proc/proc_misc.c linux-2.6.27.19-5.1/fs/proc/proc_misc.c
---- linux-2.6.27/fs/proc/proc_misc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/proc/proc_misc.c 2009-03-25 16:11:39.000000000 +0000
-@@ -239,6 +239,120 @@ static int meminfo_read_proc(char *page,
+diff -r 9608d5473017 fs/proc/proc_misc.c
+--- a/fs/proc/proc_misc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/proc/proc_misc.c Wed May 06 16:56:51 2009 +0100
+@@ -238,6 +238,120 @@
+ return proc_calc_metrics(page, start, off, count, eof, len);
#undef K
}
-
++
+#ifdef CONFIG_KDB
+#include <linux/kdb.h>
+#include <linux/kdbprivate.h>
+#endif
+}
+#endif /* CONFIG_KDB */
-+
+
static int fragmentation_open(struct inode *inode, struct file *file)
{
- (void)inode;
-diff -purN linux-2.6.27/fs/proc/proc_sysctl.c linux-2.6.27.19-5.1/fs/proc/proc_sysctl.c
---- linux-2.6.27/fs/proc/proc_sysctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/proc/proc_sysctl.c 2009-03-25 16:11:39.000000000 +0000
-@@ -31,6 +31,7 @@ static struct inode *proc_sys_make_inode
+diff -r 9608d5473017 fs/proc/proc_sysctl.c
+--- a/fs/proc/proc_sysctl.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/proc/proc_sysctl.c Wed May 06 16:56:51 2009 +0100
+@@ -31,6 +31,7 @@
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
inode->i_flags |= S_PRIVATE; /* tell selinux to ignore this inode */
inode->i_mode = table->mode;
if (!table->child) {
inode->i_mode |= S_IFREG;
inode->i_op = &proc_sys_inode_operations;
-diff -purN linux-2.6.27/fs/proc/task_mmu.c linux-2.6.27.19-5.1/fs/proc/task_mmu.c
---- linux-2.6.27/fs/proc/task_mmu.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/proc/task_mmu.c 2009-03-25 16:11:39.000000000 +0000
-@@ -198,11 +198,8 @@ static int do_maps_open(struct inode *in
+diff -r 9608d5473017 fs/proc/task_mmu.c
+--- a/fs/proc/task_mmu.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/proc/task_mmu.c Wed May 06 16:56:52 2009 +0100
+@@ -198,20 +198,14 @@
return ret;
}
struct mm_struct *mm = vma->vm_mm;
struct file *file = vma->vm_file;
int flags = vma->vm_flags;
-@@ -210,9 +207,6 @@ static int show_map(struct seq_file *m,
+ unsigned long ino = 0;
dev_t dev = 0;
int len;
-
+-
- if (maps_protect && !ptrace_may_access(task, PTRACE_MODE_READ))
- return -EACCES;
--
+
if (file) {
struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
- dev = inode->i_sb->s_dev;
-@@ -257,6 +251,18 @@ static int show_map(struct seq_file *m,
+@@ -257,6 +251,18 @@
}
}
seq_putc(m, '\n');
if (m->count < m->size) /* vma is copied successfully */
m->version = (vma != get_gate_vma(task))? vma->vm_start: 0;
-@@ -367,23 +373,25 @@ static int smaps_pte_range(pmd_t *pmd, u
+@@ -367,23 +373,25 @@
static int show_smap(struct seq_file *m, void *v)
{
seq_printf(m,
"Size: %8lu kB\n"
-@@ -405,7 +413,9 @@ static int show_smap(struct seq_file *m,
+@@ -405,7 +413,9 @@
mss.referenced >> 10,
mss.swap >> 10);
}
static const struct seq_operations proc_pid_smaps_op = {
-@@ -553,9 +563,9 @@ static u64 swap_pte_to_pagemap_entry(pte
+@@ -553,9 +563,9 @@
return swp_type(e) | (swp_offset(e) << MAX_SWAPFILES_SHIFT);
}
if (is_swap_pte(pte))
pme = PM_PFRAME(swap_pte_to_pagemap_entry(pte))
| PM_PSHIFT(PAGE_SHIFT) | PM_SWAP;
-diff -purN linux-2.6.27/fs/quota.c linux-2.6.27.19-5.1/fs/quota.c
---- linux-2.6.27/fs/quota.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/quota.c 2009-03-25 16:11:37.000000000 +0000
-@@ -73,7 +73,7 @@ static int generic_quotactl_valid(struct
+diff -r 9608d5473017 fs/quota.c
+--- a/fs/quota.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/quota.c Wed May 06 16:56:52 2009 +0100
+@@ -73,7 +73,7 @@
case Q_SETQUOTA:
case Q_GETQUOTA:
/* This is just informative test so we are satisfied without a lock */
return -ESRCH;
}
-@@ -160,6 +160,9 @@ static void quota_sync_sb(struct super_b
+@@ -160,6 +160,9 @@
int cnt;
sb->s_qcop->quota_sync(sb, type);
/* This is not very clever (and fast) but currently I don't know about
* any other simple way of getting quota data to disk and we must get
* them there for userspace to be visible... */
-@@ -175,7 +178,7 @@ static void quota_sync_sb(struct super_b
+@@ -175,7 +178,7 @@
for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
if (type != -1 && cnt != type)
continue;
continue;
mutex_lock_nested(&sb_dqopt(sb)->files[cnt]->i_mutex, I_MUTEX_QUOTA);
truncate_inode_pages(&sb_dqopt(sb)->files[cnt]->i_data, 0);
-@@ -201,7 +204,7 @@ restart:
+@@ -201,7 +204,7 @@
for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
if (type != -1 && type != cnt)
continue;
continue;
if (!info_dirty(&sb_dqopt(sb)->info[cnt]) &&
list_empty(&sb_dqopt(sb)->info[cnt].dqi_dirty_list))
-@@ -245,7 +248,7 @@ static int do_quotactl(struct super_bloc
+@@ -245,7 +248,7 @@
__u32 fmt;
down_read(&sb_dqopt(sb)->dqptr_sem);
up_read(&sb_dqopt(sb)->dqptr_sem);
return -ESRCH;
}
-@@ -368,7 +371,8 @@ static inline struct super_block *quotac
+@@ -368,7 +371,8 @@
* calls. Maybe we need to add the process quotas etc. in the future,
* but we probably should use rlimits for that.
*/
{
uint cmds, type;
struct super_block *sb = NULL;
-diff -purN linux-2.6.27/fs/quota_tree.c linux-2.6.27.19-5.1/fs/quota_tree.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/quota_tree.c 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/quota_tree.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/quota_tree.c Wed May 06 16:56:52 2009 +0100
@@ -0,0 +1,645 @@
+/*
+ * vfsv0 quota IO operations on file
+ return 0;
+}
+EXPORT_SYMBOL(qtree_release_dquot);
-diff -purN linux-2.6.27/fs/quota_tree.h linux-2.6.27.19-5.1/fs/quota_tree.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/quota_tree.h 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/quota_tree.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/quota_tree.h Wed May 06 16:56:52 2009 +0100
@@ -0,0 +1,25 @@
+/*
+ * Definitions of structures for vfsv0 quota format
+#define QT_TREEOFF 1 /* Offset of tree in file in blocks */
+
+#endif /* _LINUX_QUOTAIO_TREE_H */
-diff -purN linux-2.6.27/fs/quota_v1.c linux-2.6.27.19-5.1/fs/quota_v1.c
---- linux-2.6.27/fs/quota_v1.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/quota_v1.c 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/quota_v1.c
+--- a/fs/quota_v1.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/quota_v1.c Wed May 06 16:56:52 2009 +0100
@@ -3,25 +3,39 @@
#include <linux/quota.h>
#include <linux/quotaops.h>
MODULE_AUTHOR("Jan Kara");
MODULE_DESCRIPTION("Old quota format support");
MODULE_LICENSE("GPL");
-
++
+#define QUOTABLOCK_BITS 10
+#define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS)
+
+{
+ return blocks << QUOTABLOCK_BITS;
+}
-+
+
static void v1_disk2mem_dqblk(struct mem_dqblk *m, struct v1_disk_dqblk *d)
{
m->dqb_ihardlimit = d->dqb_ihardlimit;
m->dqb_itime = d->dqb_itime;
m->dqb_btime = d->dqb_btime;
}
-@@ -31,9 +45,9 @@ static void v1_mem2disk_dqblk(struct v1_
+@@ -31,9 +45,9 @@
d->dqb_ihardlimit = m->dqb_ihardlimit;
d->dqb_isoftlimit = m->dqb_isoftlimit;
d->dqb_curinodes = m->dqb_curinodes;
d->dqb_itime = m->dqb_itime;
d->dqb_btime = m->dqb_btime;
}
-diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
---- linux-2.6.27/fs/quota_v2.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/quota_v2.c 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/quota_v2.c
+--- a/fs/quota_v2.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/quota_v2.c Wed May 06 16:56:52 2009 +0100
@@ -6,7 +6,6 @@
#include <linux/fs.h>
#include <linux/mount.h>
+static void v2_mem2diskdqb(void *dp, struct dquot *dquot);
+static void v2_disk2memdqb(struct dquot *dquot, void *dp);
+static int v2_is_id(void *dp, struct dquot *dquot);
-+
+
+-#define GETIDINDEX(id, depth) (((id) >> ((V2_DQTREEDEPTH-(depth)-1)*8)) & 0xff)
+-#define GETENTRIES(buf) ((struct v2_disk_dqblk *)(((char *)buf)+sizeof(struct v2_disk_dqdbheader)))
+static struct qtree_fmt_operations v2_qtree_ops = {
+ .mem2disk_dqblk = v2_mem2diskdqb,
+ .disk2mem_dqblk = v2_disk2memdqb,
+ .is_id = v2_is_id,
+};
-
--#define GETIDINDEX(id, depth) (((id) >> ((V2_DQTREEDEPTH-(depth)-1)*8)) & 0xff)
--#define GETENTRIES(buf) ((struct v2_disk_dqblk *)(((char *)buf)+sizeof(struct v2_disk_dqdbheader)))
++
+#define QUOTABLOCK_BITS 10
+#define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS)
+
/* Check whether given file is really vfsv0 quotafile */
static int v2_check_quota_file(struct super_block *sb, int type)
-@@ -50,7 +70,8 @@ static int v2_check_quota_file(struct su
+@@ -50,7 +70,8 @@
static int v2_read_file_info(struct super_block *sb, int type)
{
struct v2_disk_dqinfo dinfo;
ssize_t size;
size = sb->s_op->quota_read(sb, type, (char *)&dinfo,
-@@ -60,15 +81,29 @@ static int v2_read_file_info(struct supe
+@@ -60,15 +81,29 @@
sb->s_id);
return -1;
}
return 0;
}
-@@ -76,7 +111,8 @@ static int v2_read_file_info(struct supe
+@@ -76,7 +111,8 @@
static int v2_write_file_info(struct super_block *sb, int type)
{
struct v2_disk_dqinfo dinfo;
ssize_t size;
spin_lock(&dq_data_lock);
-@@ -85,9 +121,9 @@ static int v2_write_file_info(struct sup
+@@ -85,9 +121,9 @@
dinfo.dqi_igrace = cpu_to_le32(info->dqi_igrace);
dinfo.dqi_flags = cpu_to_le32(info->dqi_flags & DQF_MASK);
spin_unlock(&dq_data_lock);
size = sb->s_op->quota_write(sb, type, (char *)&dinfo,
sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF);
if (size != sizeof(struct v2_disk_dqinfo)) {
-@@ -98,574 +134,75 @@ static int v2_write_file_info(struct sup
+@@ -98,574 +134,75 @@
return 0;
}
d->dqb_curspace = cpu_to_le64(m->dqb_curspace);
d->dqb_btime = cpu_to_le64(m->dqb_btime);
- d->dqb_id = cpu_to_le32(id);
--}
--
++ d->dqb_id = cpu_to_le32(dquot->dq_id);
++ if (qtree_entry_unused(info, dp))
++ d->dqb_itime = cpu_to_le64(1);
+ }
+
-static dqbuf_t getdqbuf(void)
--{
++static int v2_is_id(void *dp, struct dquot *dquot)
+ {
- dqbuf_t buf = kmalloc(V2_DQBLKSIZE, GFP_NOFS);
- if (!buf)
- printk(KERN_WARNING "VFS: Not enough memory for quota buffers.\n");
- return buf;
-}
--
++ struct v2_disk_dqblk *d = dp;
++ struct qtree_mem_dqinfo *info =
++ sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv;
+
-static inline void freedqbuf(dqbuf_t buf)
-{
- kfree(buf);
- memset(buf, 0, V2_DQBLKSIZE);
- return sb->s_op->quota_read(sb, type, (char *)buf,
- V2_DQBLKSIZE, blk << V2_DQBLKSIZE_BITS);
-+ d->dqb_id = cpu_to_le32(dquot->dq_id);
-+ if (qtree_entry_unused(info, dp))
-+ d->dqb_itime = cpu_to_le64(1);
- }
-
+-}
+-
-static inline ssize_t write_blk(struct super_block *sb, int type, uint blk, dqbuf_t buf)
-+static int v2_is_id(void *dp, struct dquot *dquot)
- {
+-{
- return sb->s_op->quota_write(sb, type, (char *)buf,
- V2_DQBLKSIZE, blk << V2_DQBLKSIZE_BITS);
-}
- struct mem_dqinfo *info = sb_dqinfo(sb, type);
- struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf;
- int err;
-+ struct v2_disk_dqblk *d = dp;
-+ struct qtree_mem_dqinfo *info =
-+ sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv;
-
+-
- if (!tmpbuf)
- return -ENOMEM;
- dh->dqdh_next_free = cpu_to_le32(info->u.v2_i.dqi_free_entry);
-out_buf:
- freedqbuf(buf);
- return 0;
-+ return le32_to_cpu(d->dqb_id) == dquot->dq_id;
- }
-
+-}
+-
-/* Insert reference to structure into the trie */
-static int do_insert_tree(struct dquot *dquot, uint *treeblk, int depth)
-{
-
-/* Wrapper for inserting quota structure into tree */
-static inline int dq_insert_tree(struct dquot *dquot)
-+static int v2_read_dquot(struct dquot *dquot)
- {
+-{
- int tmp = V2_DQTREEOFF;
- return do_insert_tree(dquot, &tmp, 0);
-+ return qtree_read_dquot(sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv, dquot);
- }
-
+-}
+-
-/*
- * We don't have to be afraid of deadlocks as we never have quotas on quota files...
- */
- static int v2_write_dquot(struct dquot *dquot)
- {
+-static int v2_write_dquot(struct dquot *dquot)
+-{
- int type = dquot->dq_type;
- ssize_t ret;
- struct v2_disk_dqblk ddquot, empty;
-static inline loff_t find_dqentry(struct dquot *dquot)
-{
- return find_tree_dqentry(dquot, V2_DQTREEOFF, 0);
-+ return qtree_write_dquot(sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv, dquot);
++ return le32_to_cpu(d->dqb_id) == dquot->dq_id;
}
--static int v2_read_dquot(struct dquot *dquot)
-+static int v2_release_dquot(struct dquot *dquot)
+ static int v2_read_dquot(struct dquot *dquot)
{
- int type = dquot->dq_type;
- loff_t offset;
- dqstats.reads++;
-
- return ret;
-+ return qtree_release_dquot(sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv, dquot);
++ return qtree_read_dquot(sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv, dquot);
}
-/* Check whether dquot should not be deleted. We know we are
- * the only one operating on dquot (thanks to dq_lock) */
--static int v2_release_dquot(struct dquot *dquot)
-+static int v2_free_file_info(struct super_block *sb, int type)
++static int v2_write_dquot(struct dquot *dquot)
++{
++ return qtree_write_dquot(sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv, dquot);
++}
++
+ static int v2_release_dquot(struct dquot *dquot)
{
- if (test_bit(DQ_FAKE_B, &dquot->dq_flags) && !(dquot->dq_dqb.dqb_curinodes | dquot->dq_dqb.dqb_curspace))
- return v2_delete_dquot(dquot);
++ return qtree_release_dquot(sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv, dquot);
++}
++
++static int v2_free_file_info(struct super_block *sb, int type)
++{
+ kfree(sb_dqinfo(sb, type)->dqi_priv);
return 0;
}
-@@ -673,7 +210,7 @@ static struct quota_format_ops v2_format
+@@ -673,7 +210,7 @@
.check_quota_file = v2_check_quota_file,
.read_file_info = v2_read_file_info,
.write_file_info = v2_write_file_info,
.read_dqblk = v2_read_dquot,
.commit_dqblk = v2_write_dquot,
.release_dqblk = v2_release_dquot,
-diff -purN linux-2.6.27/fs/quotaio_v1.h linux-2.6.27.19-5.1/fs/quotaio_v1.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/quotaio_v1.h 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/quotaio_v1.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/quotaio_v1.h Wed May 06 16:56:52 2009 +0100
@@ -0,0 +1,33 @@
+#ifndef _LINUX_QUOTAIO_V1_H
+#define _LINUX_QUOTAIO_V1_H
+#define v1_dqoff(UID) ((loff_t)((UID) * sizeof (struct v1_disk_dqblk)))
+
+#endif /* _LINUX_QUOTAIO_V1_H */
-diff -purN linux-2.6.27/fs/quotaio_v2.h linux-2.6.27.19-5.1/fs/quotaio_v2.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/quotaio_v2.h 2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/quotaio_v2.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/quotaio_v2.h Wed May 06 16:56:52 2009 +0100
@@ -0,0 +1,60 @@
+/*
+ * Definitions of structures for vfsv0 quota format
+#define V2_DQBLKSIZE_BITS 10 /* Size of leaf block in tree */
+
+#endif /* _LINUX_QUOTAIO_V2_H */
-diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
---- linux-2.6.27/fs/read_write.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/read_write.c 2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/read_write.c
+--- a/fs/read_write.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/read_write.c Wed May 06 16:56:52 2009 +0100
@@ -16,6 +16,7 @@
#include <linux/syscalls.h>
#include <linux/pagemap.h>
#include "read_write.h"
#include <asm/uaccess.h>
-@@ -112,7 +113,7 @@ loff_t vfs_llseek(struct file *file, lof
+@@ -112,7 +113,7 @@
}
EXPORT_SYMBOL(vfs_llseek);
{
off_t retval;
struct file * file;
-@@ -130,15 +131,18 @@ asmlinkage off_t sys_lseek(unsigned int
+@@ -130,15 +131,18 @@
if (res != (loff_t)retval)
retval = -EOVERFLOW; /* LFS: should only happen on 32 bit platforms */
}
{
int retval;
struct file * file;
-@@ -157,6 +161,8 @@ asmlinkage long sys_llseek(unsigned int
+@@ -156,6 +160,8 @@
+
offset = vfs_llseek(file, ((loff_t) offset_high << 32) | offset_low,
origin);
-
-+ trace_fs_llseek(fd, offset, origin);
+
++ trace_fs_llseek(fd, offset, origin);
+
retval = (int)offset;
if (offset >= 0) {
- retval = -EFAULT;
-@@ -334,7 +340,7 @@ static inline void file_pos_write(struct
+@@ -334,7 +340,7 @@
file->f_pos = pos;
}
{
struct file *file;
ssize_t ret = -EBADF;
-@@ -344,6 +350,7 @@ asmlinkage ssize_t sys_read(unsigned int
+@@ -344,6 +350,7 @@
if (file) {
loff_t pos = file_pos_read(file);
ret = vfs_read(file, buf, count, &pos);
file_pos_write(file, pos);
fput_light(file, fput_needed);
}
-@@ -351,7 +358,8 @@ asmlinkage ssize_t sys_read(unsigned int
+@@ -351,7 +358,8 @@
return ret;
}
{
struct file *file;
ssize_t ret = -EBADF;
-@@ -361,6 +369,7 @@ asmlinkage ssize_t sys_write(unsigned in
+@@ -361,6 +369,7 @@
if (file) {
loff_t pos = file_pos_read(file);
ret = vfs_write(file, buf, count, &pos);
file_pos_write(file, pos);
fput_light(file, fput_needed);
}
-@@ -368,8 +377,8 @@ asmlinkage ssize_t sys_write(unsigned in
+@@ -368,8 +377,8 @@
return ret;
}
{
struct file *file;
ssize_t ret = -EBADF;
-@@ -381,16 +390,27 @@ asmlinkage ssize_t sys_pread64(unsigned
+@@ -381,16 +390,27 @@
file = fget_light(fd, &fput_needed);
if (file) {
ret = -ESPIPE;
{
struct file *file;
ssize_t ret = -EBADF;
-@@ -402,13 +422,23 @@ asmlinkage ssize_t sys_pwrite64(unsigned
+@@ -402,13 +422,23 @@
file = fget_light(fd, &fput_needed);
if (file) {
ret = -ESPIPE;
/*
* Reduce an iovec's length in-place. Return the resulting number of segments
-@@ -637,8 +667,8 @@ ssize_t vfs_writev(struct file *file, co
+@@ -637,8 +667,8 @@
EXPORT_SYMBOL(vfs_writev);
{
struct file *file;
ssize_t ret = -EBADF;
-@@ -648,6 +678,7 @@ sys_readv(unsigned long fd, const struct
+@@ -648,6 +678,7 @@
if (file) {
loff_t pos = file_pos_read(file);
ret = vfs_readv(file, vec, vlen, &pos);
file_pos_write(file, pos);
fput_light(file, fput_needed);
}
-@@ -658,8 +689,8 @@ sys_readv(unsigned long fd, const struct
+@@ -658,8 +689,8 @@
return ret;
}
{
struct file *file;
ssize_t ret = -EBADF;
-@@ -669,6 +700,7 @@ sys_writev(unsigned long fd, const struc
+@@ -669,6 +700,7 @@
if (file) {
loff_t pos = file_pos_read(file);
ret = vfs_writev(file, vec, vlen, &pos);
file_pos_write(file, pos);
fput_light(file, fput_needed);
}
-@@ -777,7 +809,7 @@ out:
+@@ -777,7 +809,7 @@
return retval;
}
{
loff_t pos;
off_t off;
-@@ -796,7 +828,7 @@ asmlinkage ssize_t sys_sendfile(int out_
+@@ -796,7 +828,7 @@
return do_sendfile(out_fd, in_fd, NULL, count, 0);
}
{
loff_t pos;
ssize_t ret;
-diff -purN linux-2.6.27/fs/readdir.c linux-2.6.27.19-5.1/fs/readdir.c
---- linux-2.6.27/fs/readdir.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/readdir.c 2009-03-25 16:11:39.000000000 +0000
-@@ -102,7 +102,8 @@ efault:
+diff -r 9608d5473017 fs/readdir.c
+--- a/fs/readdir.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/readdir.c Wed May 06 16:56:52 2009 +0100
+@@ -102,7 +102,8 @@
return -EFAULT;
}
{
int error;
struct file * file;
-@@ -187,7 +188,8 @@ efault:
+@@ -187,7 +188,8 @@
return -EFAULT;
}
{
struct file * file;
struct linux_dirent __user * lastdirent;
-@@ -271,7 +273,8 @@ efault:
+@@ -271,7 +273,8 @@
return -EFAULT;
}
{
struct file * file;
struct linux_dirent64 __user * lastdirent;
-diff -purN linux-2.6.27/fs/reiserfs/Makefile linux-2.6.27.19-5.1/fs/reiserfs/Makefile
---- linux-2.6.27/fs/reiserfs/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/Makefile 2009-03-25 16:11:37.000000000 +0000
-@@ -7,10 +7,10 @@ obj-$(CONFIG_REISERFS_FS) += reiserfs.o
+diff -r 9608d5473017 fs/reiserfs/Makefile
+--- a/fs/reiserfs/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/Makefile Wed May 06 16:56:52 2009 +0100
+@@ -7,10 +7,10 @@
reiserfs-objs := bitmap.o do_balan.o namei.o inode.o file.o dir.o fix_node.o \
super.o prints.o objectid.o lbalance.o ibalance.o stree.o \
hashes.o tail_conversion.o journal.o resize.o \
endif
ifeq ($(CONFIG_REISERFS_FS_SECURITY),y)
-diff -purN linux-2.6.27/fs/reiserfs/README linux-2.6.27.19-5.1/fs/reiserfs/README
---- linux-2.6.27/fs/reiserfs/README 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/README 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/README
+--- a/fs/reiserfs/README Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/README Wed May 06 16:56:52 2009 +0100
@@ -1,4 +1,4 @@
-[LICENSING]
+[LICENSING]
ReiserFS is hereby licensed under the GNU General
Public License version 2.
-@@ -31,7 +31,7 @@ the GPL as not allowing those additional
+@@ -31,7 +31,7 @@
it wrongly, and Richard Stallman agrees with me, when carefully read
you can see that those restrictions on additional terms do not apply
to the owner of the copyright, and my interpretation of this shall
Finally, nothing in this license shall be interpreted to allow you to
fail to fairly credit me, or to remove my credits, without my
-diff -purN linux-2.6.27/fs/reiserfs/bitmap.c linux-2.6.27.19-5.1/fs/reiserfs/bitmap.c
---- linux-2.6.27/fs/reiserfs/bitmap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/bitmap.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/bitmap.c
+--- a/fs/reiserfs/bitmap.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/bitmap.c Wed May 06 16:56:52 2009 +0100
@@ -40,8 +40,8 @@
#define SET_OPTION(optname) \
} while(0)
#define TEST_OPTION(optname, s) \
test_bit(_ALLOC_ ## optname , &SB_ALLOC_OPTS(s))
-@@ -64,9 +64,9 @@ int is_reusable(struct super_block *s, b
+@@ -64,9 +64,9 @@
unsigned int bmap_count = reiserfs_bmap_count(s);
if (block == 0 || block >= SB_BLOCK_COUNT(s)) {
return 0;
}
-@@ -79,31 +79,30 @@ int is_reusable(struct super_block *s, b
+@@ -79,31 +79,30 @@
b_blocknr_t bmap1 = REISERFS_SB(s)->s_sbh->b_blocknr + 1;
if (block >= bmap1 &&
block <= bmap1 + bmap_count) {
return 0;
}
-@@ -154,8 +153,8 @@ static int scan_bitmap_block(struct reis
+@@ -154,8 +153,8 @@
/* - I mean `a window of zero bits' as in description of this function - Zam. */
if (!bi) {
return 0;
}
-@@ -400,11 +399,8 @@ static void _reiserfs_free_block(struct
+@@ -400,11 +399,8 @@
get_bit_address(s, block, &nr, &offset);
if (nr >= reiserfs_bmap_count(s)) {
return;
}
-@@ -416,9 +412,8 @@ static void _reiserfs_free_block(struct
+@@ -416,9 +412,8 @@
/* clear bit for the given block in bit map */
if (!reiserfs_test_and_clear_le_bit(offset, bmbh->b_data)) {
}
apbi[nr].free_count++;
journal_mark_dirty(th, s, bmbh);
-@@ -445,7 +440,7 @@ void reiserfs_free_block(struct reiserfs
+@@ -445,7 +440,7 @@
return;
if (block > sb_block_count(REISERFS_SB(s)->s_rs)) {
"Trying to free block outside file system "
"boundaries (%lu > %lu)",
block, sb_block_count(REISERFS_SB(s)->s_rs));
-@@ -477,9 +472,8 @@ static void __discard_prealloc(struct re
+@@ -477,9 +472,8 @@
BUG_ON(!th->t_trans_id);
#ifdef CONFIG_REISERFS_CHECK
if (ei->i_prealloc_count < 0)
#endif
while (ei->i_prealloc_count > 0) {
reiserfs_free_prealloc_block(th, inode, ei->i_prealloc_block);
-@@ -515,9 +509,9 @@ void reiserfs_discard_all_prealloc(struc
+@@ -515,9 +509,9 @@
i_prealloc_list);
#ifdef CONFIG_REISERFS_CHECK
if (!ei->i_prealloc_count) {
}
#endif
__discard_prealloc(th, ei);
-@@ -631,12 +625,12 @@ int reiserfs_parse_alloc_options(struct
+@@ -631,12 +625,12 @@
continue;
}
return 0;
}
-@@ -1145,17 +1139,18 @@ static int use_preallocated_list_if_avai
+@@ -1145,17 +1139,18 @@
int amount_needed)
{
struct inode *inode = hint->inode;
break;
}
}
-@@ -1219,7 +1214,9 @@ void reiserfs_cache_bitmap_metadata(stru
+@@ -1219,7 +1214,9 @@
unsigned long *cur = (unsigned long *)(bh->b_data + bh->b_size);
/* The first bit must ALWAYS be 1 */
info->free_count = 0;
-diff -purN linux-2.6.27/fs/reiserfs/dir.c linux-2.6.27.19-5.1/fs/reiserfs/dir.c
---- linux-2.6.27/fs/reiserfs/dir.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/dir.c 2009-03-25 16:11:37.000000000 +0000
-@@ -41,10 +41,10 @@ static int reiserfs_dir_fsync(struct fil
+diff -r 9608d5473017 fs/reiserfs/dir.c
+--- a/fs/reiserfs/dir.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/dir.c Wed May 06 16:56:52 2009 +0100
+@@ -41,10 +41,10 @@
#define store_ih(where,what) copy_item_head (where, what)
struct cpu_key pos_key; /* key of current position in the directory (key of directory entry) */
INITIALIZE_PATH(path_to_entry);
struct buffer_head *bh;
-@@ -64,13 +64,9 @@ static int reiserfs_readdir(struct file
+@@ -64,12 +64,8 @@
/* form key for search the next directory entry using f_pos field of
file structure */
- 3);
+ make_cpu_key(&pos_key, inode, *pos ?: DOT_OFFSET, TYPE_DIRENTRY, 3);
next_pos = cpu_key_k_offset(&pos_key);
-
-- /* reiserfs_warning (inode->i_sb, "reiserfs_readdir 1: f_pos = %Ld", filp->f_pos); */
-
+- /* reiserfs_warning (inode->i_sb, "reiserfs_readdir 1: f_pos = %Ld", filp->f_pos); */
+
path_to_entry.reada = PATH_READA;
while (1) {
- research:
-@@ -144,7 +140,7 @@ static int reiserfs_readdir(struct file
+@@ -144,7 +140,7 @@
/* Ignore the .reiserfs_priv entry */
if (reiserfs_xattrs(inode->i_sb) &&
!old_format_only(inode->i_sb) &&
REISERFS_SB(inode->i_sb)->priv_root &&
REISERFS_SB(inode->i_sb)->priv_root->d_inode
&& deh_objectid(deh) ==
-@@ -156,7 +152,7 @@ static int reiserfs_readdir(struct file
+@@ -156,7 +152,7 @@
}
d_off = deh_offset(deh);
d_ino = deh_objectid(deh);
if (d_reclen <= 32) {
local_buf = small_buf;
-@@ -223,15 +219,21 @@ static int reiserfs_readdir(struct file
+@@ -223,13 +219,19 @@
} /* while */
+out:
reiserfs_write_unlock(inode->i_sb);
return ret;
- }
-
++}
++
+static int reiserfs_readdir(struct file *file, void *dirent, filldir_t filldir)
+{
+ struct dentry *dentry = file->f_path.dentry;
+ return reiserfs_readdir_dentry(dentry, dirent, filldir, &file->f_pos);
-+}
-+
+ }
+
/* compose directory item containing "." and ".." entries (entries are
- not aligned to 4 byte boundary) */
- /* the last four params are LE */
-diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/do_balan.c
---- linux-2.6.27/fs/reiserfs/do_balan.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/do_balan.c 2009-03-25 16:11:37.000000000 +0000
-@@ -29,6 +29,43 @@ struct tree_balance *cur_tb = NULL; /* d
+diff -r 9608d5473017 fs/reiserfs/do_balan.c
+--- a/fs/reiserfs/do_balan.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/do_balan.c Wed May 06 16:56:52 2009 +0100
+@@ -29,6 +29,43 @@
is interrupting do_balance */
#endif
inline void do_balance_mark_leaf_dirty(struct tree_balance *tb,
struct buffer_head *bh, int flag)
{
-@@ -39,21 +76,21 @@ inline void do_balance_mark_leaf_dirty(s
+@@ -39,21 +76,21 @@
#define do_balance_mark_internal_dirty do_balance_mark_leaf_dirty
#define do_balance_mark_sb_dirty do_balance_mark_leaf_dirty
Vladimir made the perceptive comment that we should offload most of
the decision making in this function into fix_nodes/check_balance, and
-@@ -86,6 +123,7 @@ static int balance_leaf_when_delete(stru
+@@ -86,6 +123,7 @@
"PAP-12010: tree can not be empty");
ih = B_N_PITEM_HEAD(tbS0, item_pos);
/* Delete or truncate the item */
-@@ -96,10 +134,6 @@ static int balance_leaf_when_delete(stru
+@@ -96,10 +134,6 @@
"vs-12013: mode Delete, insert size %d, ih to be deleted %h",
-tb->insert_size[0], ih);
leaf_delete_items(&bi, 0, item_pos, 1, -1);
if (!item_pos && tb->CFL[0]) {
-@@ -121,10 +155,6 @@ static int balance_leaf_when_delete(stru
+@@ -121,10 +155,6 @@
break;
case M_CUT:{ /* cut item in S[0] */
if (is_direntry_le_ih(ih)) {
/* UFS unlink semantics are such that you can only delete one directory entry at a time. */
-@@ -153,8 +183,8 @@ static int balance_leaf_when_delete(stru
+@@ -153,8 +183,8 @@
default:
print_cur_tb("12040");
(flag ==
M_PASTE) ? "PASTE" : ((flag ==
M_INSERT) ? "INSERT" :
-@@ -258,15 +288,15 @@ static int balance_leaf(struct tree_bala
+@@ -258,15 +288,15 @@
)
{
struct buffer_head *tbS0 = PATH_PLAST_BUFFER(tb->tb_path);
it is the number of entries from the item that are shifted into S_new
else
it is the number of bytes from the item that are shifted into S_new
-@@ -325,11 +355,7 @@ static int balance_leaf(struct tree_bala
+@@ -325,11 +355,7 @@
ih_item_len(ih));
/* Insert new item into L[0] */
leaf_insert_into_buf(&bi,
n + item_pos -
ret_val, ih, body,
-@@ -369,11 +395,7 @@ static int balance_leaf(struct tree_bala
+@@ -369,11 +395,7 @@
leaf_shift_left(tb, tb->lnum[0] - 1,
tb->lbytes);
/* Insert new item into L[0] */
leaf_insert_into_buf(&bi,
n + item_pos -
ret_val, ih, body,
-@@ -429,13 +451,7 @@ static int balance_leaf(struct tree_bala
+@@ -429,13 +451,7 @@
}
/* Append given directory entry to directory item */
leaf_paste_in_buffer
(&bi,
n + item_pos -
-@@ -449,8 +465,7 @@ static int balance_leaf(struct tree_bala
+@@ -449,8 +465,7 @@
/* when we have merge directory item, pos_in_item has been changed too */
/* paste new directory entry. 1 is entry number */
n +
item_pos
-
-@@ -524,13 +539,7 @@ static int balance_leaf(struct tree_bala
+@@ -524,13 +539,7 @@
(tbS0,
item_pos)));
/* Append to body of item in L[0] */
leaf_paste_in_buffer
(&bi,
n + item_pos -
-@@ -681,11 +690,7 @@ static int balance_leaf(struct tree_bala
+@@ -681,11 +690,7 @@
leaf_shift_left(tb, tb->lnum[0],
tb->lbytes);
/* Append to body of item in L[0] */
leaf_paste_in_buffer(&bi,
n + item_pos -
ret_val,
-@@ -699,7 +704,7 @@ static int balance_leaf(struct tree_bala
+@@ -699,7 +704,7 @@
n + item_pos -
ret_val);
if (is_direntry_le_ih(pasted))
n +
item_pos -
ret_val,
-@@ -722,8 +727,9 @@ static int balance_leaf(struct tree_bala
+@@ -722,8 +727,9 @@
}
break;
default: /* cases d and t */
(flag ==
M_DELETE) ? "DELETE" : ((flag ==
M_CUT)
-@@ -776,11 +782,7 @@ static int balance_leaf(struct tree_bala
+@@ -776,11 +782,7 @@
set_le_ih_k_offset(ih, offset);
put_ih_item_len(ih, tb->rbytes);
/* Insert part of the item into R[0] */
if ((old_len - tb->rbytes) > zeros_num) {
r_zeros_number = 0;
r_body =
-@@ -817,11 +819,7 @@ static int balance_leaf(struct tree_bala
+@@ -817,11 +819,7 @@
tb->rnum[0] - 1,
tb->rbytes);
/* Insert new item into R[0] */
leaf_insert_into_buf(&bi,
item_pos - n +
tb->rnum[0] - 1,
-@@ -881,21 +879,14 @@ static int balance_leaf(struct tree_bala
+@@ -881,21 +879,14 @@
pos_in_item -
entry_count +
tb->rbytes - 1;
0,
paste_entry_position,
1,
-@@ -1019,12 +1010,7 @@ static int balance_leaf(struct tree_bala
+@@ -1019,12 +1010,7 @@
(tb, tb->CFR[0], 0);
/* Append part of body into R[0] */
if (n_rem > zeros_num) {
r_zeros_number = 0;
r_body =
-@@ -1071,12 +1057,7 @@ static int balance_leaf(struct tree_bala
+@@ -1071,12 +1057,7 @@
tb->rbytes);
/* append item in R[0] */
if (pos_in_item >= 0) {
leaf_paste_in_buffer(&bi,
item_pos -
n +
-@@ -1096,7 +1077,7 @@ static int balance_leaf(struct tree_bala
+@@ -1096,7 +1077,7 @@
tb->rnum[0]);
if (is_direntry_le_ih(pasted)
&& pos_in_item >= 0) {
item_pos -
n +
tb->rnum[0],
-@@ -1136,8 +1117,8 @@ static int balance_leaf(struct tree_bala
+@@ -1136,8 +1117,8 @@
}
break;
default: /* cases d and t */
(flag ==
M_DELETE) ? "DELETE" : ((flag ==
M_CUT) ? "CUT"
-@@ -1167,8 +1148,8 @@ static int balance_leaf(struct tree_bala
+@@ -1167,8 +1148,8 @@
not set correctly */
if (tb->CFL[0]) {
if (!tb->CFR[0])
copy_key(B_N_PDELIM_KEY(tb->CFL[0], tb->lkey[0]),
B_N_PDELIM_KEY(tb->CFR[0], tb->rkey[0]));
do_balance_mark_internal_dirty(tb, tb->CFL[0], 0);
-@@ -1232,10 +1213,7 @@ static int balance_leaf(struct tree_bala
+@@ -1232,10 +1213,7 @@
put_ih_item_len(ih, sbytes[i]);
/* Insert part of the item into S_new[i] before 0-th item */
if ((old_len - sbytes[i]) > zeros_num) {
r_zeros_number = 0;
-@@ -1267,10 +1245,7 @@ static int balance_leaf(struct tree_bala
+@@ -1267,10 +1245,7 @@
S_new[i]);
/* Insert new item into S_new[i] */
leaf_insert_into_buf(&bi,
item_pos - n +
snum[i] - 1, ih,
-@@ -1327,10 +1302,7 @@ static int balance_leaf(struct tree_bala
+@@ -1327,10 +1302,7 @@
sbytes[i] - 1,
S_new[i]);
/* Paste given directory entry to directory item */
leaf_paste_in_buffer
(&bi, 0,
pos_in_item -
-@@ -1339,8 +1311,7 @@ static int balance_leaf(struct tree_bala
+@@ -1339,8 +1311,7 @@
tb->insert_size[0],
body, zeros_num);
/* paste new directory entry */
0,
pos_in_item
-
-@@ -1401,11 +1372,7 @@ static int balance_leaf(struct tree_bala
+@@ -1401,11 +1372,7 @@
if (n_rem < 0)
n_rem = 0;
/* Append part of body into S_new[0] */
if (n_rem > zeros_num) {
r_zeros_number = 0;
r_body =
-@@ -1475,7 +1442,10 @@ static int balance_leaf(struct tree_bala
+@@ -1475,7 +1442,10 @@
&& (pos_in_item != ih_item_len(ih_check)
|| tb->insert_size[0] <= 0))
reiserfs_panic(tb->tb_sb,
#endif /* CONFIG_REISERFS_CHECK */
leaf_mi =
-@@ -1489,10 +1459,7 @@ static int balance_leaf(struct tree_bala
+@@ -1489,10 +1459,7 @@
leaf_mi);
/* paste into item */
leaf_paste_in_buffer(&bi,
item_pos - n +
snum[i],
-@@ -1505,7 +1472,7 @@ static int balance_leaf(struct tree_bala
+@@ -1505,7 +1472,7 @@
item_pos - n +
snum[i]);
if (is_direntry_le_ih(pasted)) {
item_pos -
n + snum[i],
pos_in_item,
-@@ -1535,8 +1502,8 @@ static int balance_leaf(struct tree_bala
+@@ -1535,8 +1502,8 @@
}
break;
default: /* cases d and t */
(flag ==
M_DELETE) ? "DELETE" : ((flag ==
M_CUT) ? "CUT"
-@@ -1559,10 +1526,7 @@ static int balance_leaf(struct tree_bala
+@@ -1559,10 +1526,7 @@
switch (flag) {
case M_INSERT: /* insert item into S[0] */
leaf_insert_into_buf(&bi, item_pos, ih, body,
zeros_num);
-@@ -1589,14 +1553,7 @@ static int balance_leaf(struct tree_bala
+@@ -1589,14 +1553,7 @@
"PAP-12260: insert_size is 0 already");
/* prepare space */
leaf_paste_in_buffer(&bi,
item_pos,
pos_in_item,
-@@ -1606,7 +1563,7 @@ static int balance_leaf(struct tree_bala
+@@ -1606,7 +1563,7 @@
zeros_num);
/* paste entry */
item_pos,
pos_in_item,
1,
-@@ -1644,14 +1601,7 @@ static int balance_leaf(struct tree_bala
+@@ -1644,14 +1601,7 @@
RFALSE(tb->insert_size[0] <= 0,
"PAP-12275: insert size must not be %d",
tb->insert_size[0]);
leaf_paste_in_buffer(&bi,
item_pos,
pos_in_item,
-@@ -1681,10 +1631,11 @@ static int balance_leaf(struct tree_bala
+@@ -1681,10 +1631,11 @@
print_cur_tb("12285");
reiserfs_panic(tb->
tb_sb,
}
}
#endif /* CONFIG_REISERFS_CHECK */
-@@ -1697,11 +1648,10 @@ static int balance_leaf(struct tree_bala
+@@ -1697,11 +1648,10 @@
if (flag == M_PASTE && tb->insert_size[0]) {
print_cur_tb("12290");
reiserfs_panic(tb->tb_sb,
return 0;
} /* Leaf level of the tree is balanced (end of balance_leaf) */
-@@ -1724,7 +1674,6 @@ void make_empty_node(struct buffer_info
+@@ -1724,7 +1674,6 @@
struct buffer_head *get_FEB(struct tree_balance *tb)
{
int i;
struct buffer_info bi;
for (i = 0; i < MAX_FEB_SIZE; i++)
-@@ -1732,19 +1681,15 @@ struct buffer_head *get_FEB(struct tree_
+@@ -1732,19 +1681,15 @@
break;
if (i == MAX_FEB_SIZE)
}
/* This is now used because reiserfs_free_block has to be able to
-@@ -1755,15 +1700,16 @@ static void store_thrown(struct tree_bal
+@@ -1755,15 +1700,16 @@
int i;
if (buffer_dirty(bh))
}
static void free_thrown(struct tree_balance *tb)
-@@ -1774,8 +1720,8 @@ static void free_thrown(struct tree_bala
+@@ -1774,8 +1720,8 @@
if (tb->thrown[i]) {
blocknr = tb->thrown[i]->b_blocknr;
if (buffer_dirty(tb->thrown[i]))
blocknr);
brelse(tb->thrown[i]); /* incremented in store_thrown */
reiserfs_free_block(tb->transaction_handle, NULL,
-@@ -1873,20 +1819,19 @@ static void check_internal_node(struct s
+@@ -1873,20 +1819,19 @@
for (i = 0; i <= B_NR_ITEMS(bh); i++, dc++) {
if (!is_reusable(s, dc_block_number(dc), 1)) {
print_cur_tb(mes);
return 1;
}
return 0;
-@@ -1897,26 +1842,28 @@ static int check_before_balancing(struct
+@@ -1897,26 +1842,28 @@
int retval = 0;
if (cur_tb) {
check_leaf(PATH_PLAST_BUFFER(tb->tb_path));
return retval;
-@@ -1930,8 +1877,8 @@ static void check_after_balance_leaf(str
+@@ -1930,8 +1877,8 @@
dc_size(B_N_CHILD
(tb->FL[0], get_left_neighbor_position(tb, 0)))) {
print_cur_tb("12221");
}
}
if (tb->rnum[0]) {
-@@ -1940,8 +1887,8 @@ static void check_after_balance_leaf(str
+@@ -1940,8 +1887,8 @@
dc_size(B_N_CHILD
(tb->FR[0], get_right_neighbor_position(tb, 0)))) {
print_cur_tb("12222");
}
}
if (PATH_H_PBUFFER(tb->tb_path, 1) &&
-@@ -1955,7 +1902,7 @@ static void check_after_balance_leaf(str
+@@ -1955,7 +1902,7 @@
PATH_H_POSITION(tb->tb_path,
1))));
print_cur_tb("12223");
"B_FREE_SPACE (PATH_H_PBUFFER(tb->tb_path,0)) = %d; "
"MAX_CHILD_SIZE (%d) - dc_size( %y, %d ) [%d] = %d",
left,
-@@ -1966,8 +1913,7 @@ static void check_after_balance_leaf(str
+@@ -1966,8 +1913,7 @@
(PATH_H_PBUFFER(tb->tb_path, 1),
PATH_H_POSITION(tb->tb_path, 1))),
right);
}
}
-@@ -2037,7 +1983,7 @@ static inline void do_balance_starts(str
+@@ -2037,7 +1983,7 @@
/* store_print_tb (tb); */
/* do not delete, just comment it out */
"check");*/
RFALSE(check_before_balancing(tb), "PAP-12340: locked buffers in TB");
#ifdef CONFIG_REISERFS_CHECK
-@@ -2102,14 +2048,13 @@ void do_balance(struct tree_balance *tb,
+@@ -2102,14 +2048,13 @@
tb->need_balance_dirty = 0;
if (FILESYSTEM_CHANGED_TB(tb)) {
unfix_nodes(tb);
return;
}
-diff -purN linux-2.6.27/fs/reiserfs/file.c linux-2.6.27.19-5.1/fs/reiserfs/file.c
---- linux-2.6.27/fs/reiserfs/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/file.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/file.c
+--- a/fs/reiserfs/file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/file.c Wed May 06 16:56:52 2009 +0100
@@ -20,14 +20,14 @@
** insertion/balancing, for files that are written in one write.
** It avoids unnecessary tail packings (balances) for files that are written in
*/
static int reiserfs_file_release(struct inode *inode, struct file *filp)
{
-@@ -76,7 +76,7 @@ static int reiserfs_file_release(struct
+@@ -76,7 +76,7 @@
* and let the admin know what is going on.
*/
igrab(inode);
"pinning inode %lu because the "
"preallocation can't be freed",
inode->i_ino);
-@@ -134,23 +134,23 @@ static void reiserfs_vfs_truncate_file(s
+@@ -134,23 +134,23 @@
* be removed...
*/
}
/* taken fs/buffer.c:__block_commit_write */
-@@ -223,7 +223,7 @@ int reiserfs_commit_page(struct inode *i
+@@ -223,7 +223,7 @@
}
/* Write @count bytes at position @ppos in a file indicated by @file
generic_file_write() is only appropriate for filesystems that are not seeking to optimize performance and want
something simple that works. It is not for serious use by general purpose filesystems, excepting the one that it was
-diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/fix_node.c
---- linux-2.6.27/fs/reiserfs/fix_node.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/fix_node.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/fix_node.c
+--- a/fs/reiserfs/fix_node.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/fix_node.c Wed May 06 16:56:52 2009 +0100
@@ -30,8 +30,8 @@
** get_direct_parent
** get_neighbors
**/
#include <linux/time.h>
-@@ -135,8 +135,7 @@ static void create_virtual_node(struct t
+@@ -135,8 +135,7 @@
vn->vn_free_ptr +=
op_create_vi(vn, vi, is_affected, tb->insert_size[0]);
if (tb->vn_buf + tb->vn_buf_size < vn->vn_free_ptr)
"virtual node space consumed");
if (!is_affected)
-@@ -186,8 +185,9 @@ static void create_virtual_node(struct t
+@@ -186,8 +185,9 @@
&& I_ENTRY_COUNT(B_N_PITEM_HEAD(Sh, 0)) == 1)) {
/* node contains more than 1 item, or item is not directory item, or this item contains more than 1 entry */
print_block(Sh, 0, -1, -1);
key, vn->vn_affected_item_num,
vn->vn_mode, M_DELETE);
}
-@@ -377,9 +377,9 @@ static int get_num_ver(int mode, struct
+@@ -377,9 +377,9 @@
int needed_nodes;
int start_item, /* position of item we start filling node from */
end_item, /* position of item we finish filling node by */
we do node include into node that is being filled */
int split_item_positions[2]; /* these are positions in virtual item of
items, that are split between S[0] and
-@@ -496,8 +496,8 @@ static int get_num_ver(int mode, struct
+@@ -496,8 +496,8 @@
snum012[needed_nodes - 1 + 3] = units;
if (needed_nodes > 2)
snum012[needed_nodes - 1]++;
split_item_positions[needed_nodes - 1] = i;
needed_nodes++;
-@@ -533,8 +533,8 @@ static int get_num_ver(int mode, struct
+@@ -533,8 +533,8 @@
if (vn->vn_vi[split_item_num].vi_index != TYPE_DIRENTRY &&
vn->vn_vi[split_item_num].vi_index != TYPE_INDIRECT)
}
/* now we know S2bytes, calculate S1bytes */
-@@ -569,7 +569,7 @@ extern struct tree_balance *cur_tb;
+@@ -569,7 +569,7 @@
/* Set parameters for balancing.
* Performs write of results of analysis of balancing into structure tb,
* Parameters:
* tb tree_balance structure;
* h current level of the node;
-@@ -749,25 +749,26 @@ else \
+@@ -749,25 +749,26 @@
-1, -1);\
}
{
- int n_counter;
+ int i;
-+
-+ pathrelse(tb->tb_path);
- decrement_counters_in_path(p_s_tb->tb_path);
-+ for (i = 0; i < MAX_HEIGHT; i++) {
-+ brelse(tb->L[i]);
-+ brelse(tb->R[i]);
-+ brelse(tb->FL[i]);
-+ brelse(tb->FR[i]);
-+ brelse(tb->CFL[i]);
-+ brelse(tb->CFR[i]);
++ pathrelse(tb->tb_path);
- for (n_counter = 0; n_counter < MAX_HEIGHT; n_counter++) {
- decrement_bcount(p_s_tb->L[n_counter]);
- p_s_tb->CFL[n_counter] = NULL;
- decrement_bcount(p_s_tb->CFR[n_counter]);
- p_s_tb->CFR[n_counter] = NULL;
++ for (i = 0; i < MAX_HEIGHT; i++) {
++ brelse(tb->L[i]);
++ brelse(tb->R[i]);
++ brelse(tb->FL[i]);
++ brelse(tb->FR[i]);
++ brelse(tb->CFL[i]);
++ brelse(tb->CFR[i]);
++
+ tb->L[i] = NULL;
+ tb->R[i] = NULL;
+ tb->FL[i] = NULL;
}
}
-@@ -777,14 +778,14 @@ static void free_buffers_in_tb(struct tr
+@@ -777,14 +778,14 @@
* NO_DISK_SPACE - no disk space.
*/
/* The function is NOT SCHEDULE-SAFE! */
/* number_of_freeblk is the number of empty blocks which have been
acquired for use by the balancing algorithm minus the number of
-@@ -792,7 +793,7 @@ static int get_empty_nodes(struct tree_b
+@@ -792,7 +793,7 @@
number_of_freeblk = tb->cur_blknum can be non-zero if a schedule occurs
after empty blocks are acquired, and the balancing analysis is
then restarted, amount_needed is the number needed by this level
Note that for systems with many processes writing, it would be
more layout optimal to calculate the total number needed by all
-@@ -800,54 +801,54 @@ static int get_empty_nodes(struct tree_b
+@@ -800,54 +801,54 @@
/* Initiate number_of_freeblk to the amount acquired prior to the restart of
the analysis or 0 if not restarted, then subtract the amount needed
}
/* Get free space of the left neighbor, which is stored in the parent
-@@ -895,35 +896,36 @@ static int get_rfree(struct tree_balance
+@@ -895,35 +896,36 @@
}
/* Check whether left neighbor is in memory. */
RFALSE(buffer_uptodate(left) && !B_IS_IN_TREE(left),
"vs-8170: left neighbor (%b %z) is not in the tree",
-@@ -938,10 +940,10 @@ static int is_left_neighbor_in_cache(str
+@@ -938,10 +940,10 @@
#define LEFT_PARENTS 'l'
#define RIGHT_PARENTS 'r'
}
/* Calculate far left/right parent of the left/right neighbor of the current node, that
-@@ -952,77 +954,77 @@ static void decrement_key(struct cpu_key
+@@ -952,77 +954,77 @@
SCHEDULE_OCCURRED - schedule occurred while the function worked;
* CARRY_ON - schedule didn't occur while the function worked;
*/
return REPEAT_SEARCH;
}
}
-@@ -1032,128 +1034,131 @@ static int get_far_parent(struct tree_ba
+@@ -1032,128 +1034,131 @@
/* Form key to get parent of the left/right neighbor. */
le_key2cpu_key(&s_lr_father_key,
- p_s_tb->FL[n_h] = p_s_curf; /* New initialization of FL[n_h]. */
- decrement_bcount(p_s_tb->CFL[n_h]);
- p_s_tb->CFL[n_h] = p_s_curcf; /* New initialization of CFL[n_h]. */
--
++ brelse(tb->FL[h]);
++ tb->FL[h] = curf; /* New initialization of FL[h]. */
++ brelse(tb->CFL[h]);
++ tb->CFL[h] = curcf; /* New initialization of CFL[h]. */
+
- RFALSE((p_s_curf && !B_IS_IN_TREE(p_s_curf)) ||
- (p_s_curcf && !B_IS_IN_TREE(p_s_curcf)),
- "PAP-8195: FL (%b) or CFL (%b) is invalid", p_s_curf, p_s_curcf);
--
++ RFALSE((curf && !B_IS_IN_TREE(curf)) ||
++ (curcf && !B_IS_IN_TREE(curcf)),
++ "PAP-8195: FL (%b) or CFL (%b) is invalid", curf, curcf);
+
-/* Get parent FR[n_h] of R[n_h]. */
--
++/* Get parent FR[h] of R[h]. */
+
-/* Current node is the last child of F[n_h]. FR[n_h] != F[n_h]. */
- if (n_position == B_NR_ITEMS(PATH_H_PBUFFER(p_s_path, n_h + 1))) {
-/* Calculate current parent of R[n_h], which is the right neighbor of F[n_h].
- not equal FR[n_path_offset] and CFR[n_h] not equal F[n_h]. */
- if ((n_ret_value =
- get_far_parent(p_s_tb, n_h + 1, &p_s_curf, &p_s_curcf,
-+ brelse(tb->FL[h]);
-+ tb->FL[h] = curf; /* New initialization of FL[h]. */
-+ brelse(tb->CFL[h]);
-+ tb->CFL[h] = curcf; /* New initialization of CFL[h]. */
-+
-+ RFALSE((curf && !B_IS_IN_TREE(curf)) ||
-+ (curcf && !B_IS_IN_TREE(curcf)),
-+ "PAP-8195: FL (%b) or CFL (%b) is invalid", curf, curcf);
-+
-+/* Get parent FR[h] of R[h]. */
-+
+/* Current node is the last child of F[h]. FR[h] != F[h]. */
+ if (position == B_NR_ITEMS(PATH_H_PBUFFER(path, h + 1))) {
+/* Calculate current parent of R[h], which is the right neighbor of F[h].
- get_bh(p_s_curf);
- get_bh(p_s_curf);
- p_s_tb->rkey[n_h] = n_position;
-- }
--
-- decrement_bcount(p_s_tb->FR[n_h]);
-- p_s_tb->FR[n_h] = p_s_curf; /* New initialization of FR[n_path_offset]. */
--
-- decrement_bcount(p_s_tb->CFR[n_h]);
-- p_s_tb->CFR[n_h] = p_s_curcf; /* New initialization of CFR[n_path_offset]. */
--
-- RFALSE((p_s_curf && !B_IS_IN_TREE(p_s_curf)) ||
-- (p_s_curcf && !B_IS_IN_TREE(p_s_curcf)),
-- "PAP-8205: FR (%b) or CFR (%b) is invalid", p_s_curf, p_s_curcf);
+/* Current node is not the last child of its parent F[h]. */
+ curf = PATH_OFFSET_PBUFFER(path, path_offset - 1);
+ curcf = PATH_OFFSET_PBUFFER(path, path_offset - 1);
+ get_bh(curf);
+ get_bh(curf);
+ tb->rkey[h] = position;
-+ }
-+
+ }
+
+- decrement_bcount(p_s_tb->FR[n_h]);
+- p_s_tb->FR[n_h] = p_s_curf; /* New initialization of FR[n_path_offset]. */
+ brelse(tb->FR[h]);
+ /* New initialization of FR[path_offset]. */
+ tb->FR[h] = curf;
-+
+
+- decrement_bcount(p_s_tb->CFR[n_h]);
+- p_s_tb->CFR[n_h] = p_s_curcf; /* New initialization of CFR[n_path_offset]. */
+ brelse(tb->CFR[h]);
+ /* New initialization of CFR[path_offset]. */
+ tb->CFR[h] = curcf;
-+
+
+- RFALSE((p_s_curf && !B_IS_IN_TREE(p_s_curf)) ||
+- (p_s_curcf && !B_IS_IN_TREE(p_s_curcf)),
+- "PAP-8205: FR (%b) or CFR (%b) is invalid", p_s_curf, p_s_curcf);
+ RFALSE((curf && !B_IS_IN_TREE(curf)) ||
+ (curcf && !B_IS_IN_TREE(curcf)),
+ "PAP-8205: FR (%b) or CFR (%b) is invalid", curf, curcf);
return CARRY_ON;
}
-@@ -1203,7 +1208,7 @@ static inline int can_node_be_removed(in
+@@ -1203,7 +1208,7 @@
* h current level of the node;
* inum item number in S[h];
* mode i - insert, p - paste;
* 0 - balancing for higher levels needed;
* -1 - no balancing for higher levels needed;
* -2 - no disk space.
-@@ -1217,7 +1222,7 @@ static int ip_check_balance(struct tree_
+@@ -1217,7 +1222,7 @@
contains node being balanced. The mnemonic is
that the attempted change in node space used level
is levbytes bytes. */
int lfree, sfree, rfree /* free space in L, S and R */ ;
-@@ -1238,7 +1243,7 @@ static int ip_check_balance(struct tree_
+@@ -1238,7 +1243,7 @@
/* we perform 8 calls to get_num_ver(). For each call we calculate five parameters.
where 4th parameter is s1bytes and 5th - s2bytes
*/
0,1 - do not shift and do not shift but bottle
2 - shift only whole item to left
3 - shift to left and bottle as much as possible
-@@ -1255,24 +1260,24 @@ static int ip_check_balance(struct tree_
+@@ -1255,24 +1260,24 @@
/* Calculate balance parameters for creating new root. */
if (!Sh) {
if (!h)
sfree = B_FREE_SPACE(Sh);
-@@ -1287,7 +1292,7 @@ static int ip_check_balance(struct tree_
+@@ -1287,7 +1292,7 @@
create_virtual_node(tb, h);
determine maximal number of items we can shift to the left neighbor (in tb structure)
and the maximal number of bytes that can flow to the left neighbor
from the left most liquid item that cannot be shifted from S[0] entirely (returned value)
-@@ -1348,13 +1353,13 @@ static int ip_check_balance(struct tree_
+@@ -1348,13 +1353,13 @@
{
int lpar, rpar, nset, lset, rset, lrset;
*/
#define FLOW 1
#define NO_FLOW 0 /* do not any splitting */
-@@ -1544,7 +1549,7 @@ static int ip_check_balance(struct tree_
+@@ -1544,7 +1549,7 @@
* h current level of the node;
* inum item number in S[h];
* mode i - insert, p - paste;
* 0 - balancing for higher levels needed;
* -1 - no balancing for higher levels needed;
* -2 - no disk space.
-@@ -1559,7 +1564,7 @@ static int dc_check_balance_internal(str
+@@ -1559,7 +1564,7 @@
/* Sh is the node whose balance is currently being checked,
and Fh is its father. */
struct buffer_head *Sh, *Fh;
int lfree, rfree /* free space in L and R */ ;
Sh = PATH_H_PBUFFER(tb->tb_path, h);
-@@ -1584,8 +1589,8 @@ static int dc_check_balance_internal(str
+@@ -1584,8 +1589,8 @@
return CARRY_ON;
}
/* get free space of neighbors */
rfree = get_rfree(tb, h);
-@@ -1727,7 +1732,7 @@ static int dc_check_balance_internal(str
+@@ -1727,7 +1732,7 @@
* h current level of the node;
* inum item number in S[h];
* mode i - insert, p - paste;
* 0 - balancing for higher levels needed;
* -1 - no balancing for higher levels needed;
* -2 - no disk space.
-@@ -1742,7 +1747,7 @@ static int dc_check_balance_leaf(struct
+@@ -1742,7 +1747,7 @@
attempted change in node space used level is levbytes bytes. */
int levbytes;
/* the maximal item size */
/* S0 is the node whose balance is currently being checked,
and F0 is its father. */
struct buffer_head *S0, *F0;
-@@ -1764,8 +1769,8 @@ static int dc_check_balance_leaf(struct
+@@ -1764,8 +1769,8 @@
return NO_BALANCING_NEEDED;
}
/* get free space of neighbors */
rfree = get_rfree(tb, h);
-@@ -1821,7 +1826,7 @@ static int dc_check_balance_leaf(struct
+@@ -1821,7 +1826,7 @@
* h current level of the node;
* inum item number in S[h];
* mode d - delete, c - cut.
* 0 - balancing for higher levels needed;
* -1 - no balancing for higher levels needed;
* -2 - no disk space.
-@@ -1850,7 +1855,7 @@ static int dc_check_balance(struct tree_
+@@ -1850,7 +1855,7 @@
* h current level of the node;
* inum item number in S[h];
* mode i - insert, p - paste, d - delete, c - cut.
* 0 - balancing for higher levels needed;
* -1 - no balancing for higher levels needed;
* -2 - no disk space.
-@@ -1884,137 +1889,138 @@ static int check_balance(int mode,
+@@ -1884,137 +1889,138 @@
}
/* Check whether parent at the path is the really parent of the current node.*/
- unsigned long n_son_number;
- struct super_block *p_s_sb = p_s_tb->tb_sb;
- struct buffer_head *p_s_bh;
--
-- PROC_INFO_INC(p_s_sb, get_neighbors[n_h]);
--
-- if (p_s_tb->lnum[n_h]) {
-- /* We need left neighbor to balance S[n_h]. */
-- PROC_INFO_INC(p_s_sb, need_l_neighbor[n_h]);
-- p_s_bh = PATH_OFFSET_PBUFFER(p_s_tb->tb_path, n_path_offset);
+ int child_position,
+ path_offset = PATH_H_PATH_OFFSET(tb->tb_path, h + 1);
+ unsigned long son_number;
+ struct super_block *sb = tb->tb_sb;
+ struct buffer_head *bh;
-+
+
+- PROC_INFO_INC(p_s_sb, get_neighbors[n_h]);
+ PROC_INFO_INC(sb, get_neighbors[h]);
-+
+
+- if (p_s_tb->lnum[n_h]) {
+- /* We need left neighbor to balance S[n_h]. */
+- PROC_INFO_INC(p_s_sb, need_l_neighbor[n_h]);
+- p_s_bh = PATH_OFFSET_PBUFFER(p_s_tb->tb_path, n_path_offset);
+ if (tb->lnum[h]) {
+ /* We need left neighbor to balance S[h]. */
+ PROC_INFO_INC(sb, need_l_neighbor[h]);
- if (p_s_tb->rnum[n_h]) { /* We need right neighbor to balance S[n_path_offset]. */
- PROC_INFO_INC(p_s_sb, need_r_neighbor[n_h]);
- p_s_bh = PATH_OFFSET_PBUFFER(p_s_tb->tb_path, n_path_offset);
--
-- RFALSE(p_s_bh == p_s_tb->FR[n_h] &&
-- PATH_OFFSET_POSITION(p_s_tb->tb_path,
-- n_path_offset) >=
-- B_NR_ITEMS(p_s_bh),
+ /* We need right neighbor to balance S[path_offset]. */
+ if (tb->rnum[h]) { /* We need right neighbor to balance S[path_offset]. */
+ PROC_INFO_INC(sb, need_r_neighbor[h]);
+ bh = PATH_OFFSET_PBUFFER(tb->tb_path, path_offset);
-+
+
+- RFALSE(p_s_bh == p_s_tb->FR[n_h] &&
+- PATH_OFFSET_POSITION(p_s_tb->tb_path,
+- n_path_offset) >=
+- B_NR_ITEMS(p_s_bh),
+ RFALSE(bh == tb->FR[h] &&
+ PATH_OFFSET_POSITION(tb->tb_path,
+ path_offset) >=
}
return CARRY_ON;
-@@ -2088,52 +2094,46 @@ static int get_mem_for_virtual_node(stru
+@@ -2088,52 +2094,46 @@
}
#ifdef CONFIG_REISERFS_CHECK
{
- if (p_s_bh) {
- if (atomic_read(&(p_s_bh->b_count)) <= 0) {
--
++ if (bh) {
++ if (atomic_read(&(bh->b_count)) <= 0)
+
- reiserfs_panic(p_s_sb,
- "jmacd-1: tb_buffer_sanity_check(): negative or zero reference counter for buffer %s[%d] (%b)\n",
- descr, level, p_s_bh);
- }
--
++ reiserfs_panic(sb, "jmacd-1", "negative or zero "
++ "reference counter for buffer %s[%d] "
++ "(%b)", descr, level, bh);
+
- if (!buffer_uptodate(p_s_bh)) {
- reiserfs_panic(p_s_sb,
- "jmacd-2: tb_buffer_sanity_check(): buffer is not up to date %s[%d] (%b)\n",
- descr, level, p_s_bh);
- }
--
++ if (!buffer_uptodate(bh))
++ reiserfs_panic(sb, "jmacd-2", "buffer is not up "
++ "to date %s[%d] (%b)",
++ descr, level, bh);
+
- if (!B_IS_IN_TREE(p_s_bh)) {
- reiserfs_panic(p_s_sb,
- "jmacd-3: tb_buffer_sanity_check(): buffer is not in tree %s[%d] (%b)\n",
- descr, level, p_s_bh);
- }
-+ if (bh) {
-+ if (atomic_read(&(bh->b_count)) <= 0)
++ if (!B_IS_IN_TREE(bh))
++ reiserfs_panic(sb, "jmacd-3", "buffer is not "
++ "in tree %s[%d] (%b)",
++ descr, level, bh);
- if (p_s_bh->b_bdev != p_s_sb->s_bdev) {
- reiserfs_panic(p_s_sb,
- "jmacd-4: tb_buffer_sanity_check(): buffer has wrong device %s[%d] (%b)\n",
- descr, level, p_s_bh);
- }
--
++ if (bh->b_bdev != sb->s_bdev)
++ reiserfs_panic(sb, "jmacd-4", "buffer has wrong "
++ "device %s[%d] (%b)",
++ descr, level, bh);
+
- if (p_s_bh->b_size != p_s_sb->s_blocksize) {
- reiserfs_panic(p_s_sb,
- "jmacd-5: tb_buffer_sanity_check(): buffer has wrong blocksize %s[%d] (%b)\n",
- descr, level, p_s_bh);
- }
--
++ if (bh->b_size != sb->s_blocksize)
++ reiserfs_panic(sb, "jmacd-5", "buffer has wrong "
++ "blocksize %s[%d] (%b)",
++ descr, level, bh);
+
- if (p_s_bh->b_blocknr > SB_BLOCK_COUNT(p_s_sb)) {
- reiserfs_panic(p_s_sb,
- "jmacd-6: tb_buffer_sanity_check(): buffer block number too high %s[%d] (%b)\n",
- descr, level, p_s_bh);
- }
-+ reiserfs_panic(sb, "jmacd-1", "negative or zero "
-+ "reference counter for buffer %s[%d] "
-+ "(%b)", descr, level, bh);
-+
-+ if (!buffer_uptodate(bh))
-+ reiserfs_panic(sb, "jmacd-2", "buffer is not up "
-+ "to date %s[%d] (%b)",
-+ descr, level, bh);
-+
-+ if (!B_IS_IN_TREE(bh))
-+ reiserfs_panic(sb, "jmacd-3", "buffer is not "
-+ "in tree %s[%d] (%b)",
-+ descr, level, bh);
-+
-+ if (bh->b_bdev != sb->s_bdev)
-+ reiserfs_panic(sb, "jmacd-4", "buffer has wrong "
-+ "device %s[%d] (%b)",
-+ descr, level, bh);
-+
-+ if (bh->b_size != sb->s_blocksize)
-+ reiserfs_panic(sb, "jmacd-5", "buffer has wrong "
-+ "blocksize %s[%d] (%b)",
-+ descr, level, bh);
-+
+ if (bh->b_blocknr > SB_BLOCK_COUNT(sb))
+ reiserfs_panic(sb, "jmacd-6", "buffer block "
+ "number too high %s[%d] (%b)",
const char *descr, int level)
{;
}
-@@ -2144,7 +2144,7 @@ static int clear_all_dirty_bits(struct s
+@@ -2144,7 +2144,7 @@
return reiserfs_prepare_for_journal(s, bh, 0);
}
{
struct buffer_head *locked;
#ifdef CONFIG_REISERFS_CHECK
-@@ -2156,95 +2156,94 @@ static int wait_tb_buffers_until_unlocke
+@@ -2156,95 +2156,94 @@
locked = NULL;
}
}
}
-@@ -2257,10 +2256,10 @@ static int wait_tb_buffers_until_unlocke
+@@ -2257,10 +2256,10 @@
** --clm
*/
for (i = 0; !locked && i < MAX_FEB_SIZE; i++) {
}
}
-@@ -2268,21 +2267,20 @@ static int wait_tb_buffers_until_unlocke
+@@ -2268,21 +2267,20 @@
#ifdef CONFIG_REISERFS_CHECK
repeat_counter++;
if ((repeat_counter % 10000) == 0) {
}
} while (locked);
-@@ -2295,15 +2293,15 @@ static int wait_tb_buffers_until_unlocke
+@@ -2295,15 +2293,15 @@
* analyze what and where should be moved;
* get sufficient number of new nodes;
* Balancing will start only after all resources will be collected at a time.
* Latency might be improved by first gathering a list of what buffers are needed
* and then getting as many of them in parallel as possible? -Hans
*
-@@ -2312,159 +2310,160 @@ static int wait_tb_buffers_until_unlocke
+@@ -2312,159 +2310,160 @@
* tb tree_balance structure;
* inum item number in S[h];
* pos_in_item - comment this if you can
goto repeat;
} else {
return CARRY_ON;
-@@ -2485,57 +2484,57 @@ int fix_nodes(int n_op_mode, struct tree
+@@ -2485,57 +2484,57 @@
/* Release path buffers. */
if (wait_tb_buffers_run) {
wanted to make lines shorter */
void unfix_nodes(struct tree_balance *tb)
{
-diff -purN linux-2.6.27/fs/reiserfs/hashes.c linux-2.6.27.19-5.1/fs/reiserfs/hashes.c
---- linux-2.6.27/fs/reiserfs/hashes.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/hashes.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/hashes.c
+--- a/fs/reiserfs/hashes.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/hashes.c Wed May 06 16:56:52 2009 +0100
@@ -7,7 +7,7 @@
* (see Applied Cryptography, 2nd edition, p448).
*
* Jeremy has agreed to the contents of reiserfs/README. -Hans
* Yura's function is added (04/07/2000)
*/
-diff -purN linux-2.6.27/fs/reiserfs/ibalance.c linux-2.6.27.19-5.1/fs/reiserfs/ibalance.c
---- linux-2.6.27/fs/reiserfs/ibalance.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/ibalance.c 2009-03-25 16:11:37.000000000 +0000
-@@ -105,8 +105,8 @@ static void internal_define_dest_src_inf
+diff -r 9608d5473017 fs/reiserfs/ibalance.c
+--- a/fs/reiserfs/ibalance.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/ibalance.c Wed May 06 16:56:52 2009 +0100
+@@ -105,8 +105,8 @@
break;
default:
shift_mode);
}
}
-@@ -278,7 +278,7 @@ static void internal_delete_childs(struc
+@@ -278,7 +278,7 @@
/* copy cpy_num node pointers and cpy_num - 1 items from buffer src to buffer dest
* last_first == FIRST_TO_LAST means, that we copy first items from src to tail of dest
*/
static void internal_copy_pointers_items(struct buffer_info *dest_bi,
struct buffer_head *src,
-@@ -385,7 +385,7 @@ static void internal_move_pointers_items
+@@ -385,7 +385,7 @@
if (last_first == FIRST_TO_LAST) { /* shift_left occurs */
first_pointer = 0;
first_item = 0;
for key - with first_item */
internal_delete_pointers_items(src_bi, first_pointer,
first_item, cpy_num - del_par);
-@@ -453,7 +453,7 @@ static void internal_insert_key(struct b
+@@ -453,7 +453,7 @@
}
}
* Copy pointer_amount node pointers and pointer_amount - 1 items from buffer src to buffer dest.
* Replace d_key'th key in buffer cfl.
* Delete pointer_amount items and node pointers from buffer src.
-@@ -518,7 +518,7 @@ static void internal_shift1_left(struct
+@@ -518,7 +518,7 @@
/* internal_move_pointers_items (tb->L[h], tb->S[h], FIRST_TO_LAST, pointer_amount, 1); */
}
* Copy n node pointers and n - 1 items from buffer src to buffer dest.
* Replace d_key'th key in buffer cfr.
* Delete n items and node pointers from buffer src.
-@@ -702,8 +702,8 @@ static void balance_internal_when_delete
+@@ -702,8 +702,8 @@
return;
}
h, tb->lnum[h], h, tb->rnum[h]);
}
-@@ -749,7 +749,7 @@ int balance_internal(struct tree_balance
+@@ -749,7 +749,7 @@
this means that new pointers and items must be inserted AFTER *
child_pos
}
{
it is the position of the leftmost pointer that must be deleted (together with
its corresponding key to the left of the pointer)
-@@ -940,8 +940,8 @@ int balance_internal(struct tree_balance
+@@ -940,8 +940,8 @@
struct block_head *blkh;
if (tb->blknum[h] != 1)
/* S[h] = empty buffer from the list FEB. */
tbSh = get_FEB(tb);
blkh = B_BLK_HEAD(tbSh);
-diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inode.c
---- linux-2.6.27/fs/reiserfs/inode.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/inode.c 2009-03-25 16:11:37.000000000 +0000
-@@ -52,7 +52,7 @@ void reiserfs_delete_inode(struct inode
+diff -r 9608d5473017 fs/reiserfs/inode.c
+--- a/fs/reiserfs/inode.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/inode.c Wed May 06 16:56:52 2009 +0100
+@@ -52,7 +52,7 @@
/* Do quota update inside a transaction for journaled quotas. We must do that
* after delete_object so that quota updates go into the same transaction as
* stat data deletion */
DQUOT_FREE_INODE(inode);
if (journal_end(&th, inode->i_sb, jbegin_count))
-@@ -363,7 +363,7 @@ static int _get_block_create_0(struct in
+@@ -363,7 +363,7 @@
}
/* make sure we don't read more bytes than actually exist in
** the file. This can happen in odd cases where i_size isn't
** extra bytes at the end of the direct item
*/
if ((le_ih_k_offset(ih) + path.pos_in_item) > inode->i_size)
-@@ -438,15 +438,15 @@ static int reiserfs_bmap(struct inode *i
+@@ -438,15 +438,15 @@
** -ENOENT instead of a valid buffer. block_prepare_write expects to
** be able to do i/o on the buffers returned, unless an error value
** is also returned.
** don't use this function.
*/
static int reiserfs_get_block_create_0(struct inode *inode, sector_t block,
-@@ -602,7 +602,7 @@ int reiserfs_get_block(struct inode *ino
+@@ -602,7 +602,7 @@
int done;
int fs_gen;
struct reiserfs_transaction_handle *th = NULL;
. 3 balancings in direct->indirect conversion
. 1 block involved into reiserfs_update_sd()
XXX in practically impossible worst case direct2indirect()
-@@ -754,7 +754,7 @@ int reiserfs_get_block(struct inode *ino
+@@ -754,7 +754,7 @@
reiserfs_write_unlock(inode->i_sb);
/* the item was found, so new blocks were not added to the file
** transaction
*/
return retval;
-@@ -841,10 +841,12 @@ int reiserfs_get_block(struct inode *ino
+@@ -841,10 +841,12 @@
tail_offset);
if (retval) {
if (retval != -ENOSPC)
if (allocated_block_nr) {
/* the bitmap, the super, and the stat data == 3 */
if (!th)
-@@ -984,7 +986,7 @@ int reiserfs_get_block(struct inode *ino
+@@ -984,7 +986,7 @@
/* this loop could log more blocks than we had originally asked
** for. So, we have to allow the transaction to end if it is
** consistent if we crash before the function returns
**
** release the path so that anybody waiting on the path before
-@@ -995,7 +997,7 @@ int reiserfs_get_block(struct inode *ino
+@@ -995,7 +997,7 @@
if (retval)
goto failure;
}
** long time. reschedule if needed
*/
cond_resched();
-@@ -1006,8 +1008,7 @@ int reiserfs_get_block(struct inode *ino
+@@ -1006,8 +1008,7 @@
goto failure;
}
if (retval == POSITION_FOUND) {
"%K should not be found", &key);
retval = -EEXIST;
if (allocated_block_nr)
-@@ -1299,8 +1300,7 @@ static void update_stat_data(struct tree
+@@ -1299,8 +1300,7 @@
ih = PATH_PITEM_HEAD(path);
if (!is_statdata_le_ih(ih))
INODE_PKEY(inode), ih);
if (stat_data_v1(ih)) {
-@@ -1332,10 +1332,9 @@ void reiserfs_update_sd_size(struct reis
+@@ -1332,10 +1332,9 @@
/* look for the object's stat data */
retval = search_item(inode->i_sb, &key, &path);
if (retval == IO_ERROR) {
return;
}
if (retval == ITEM_NOT_FOUND) {
-@@ -1345,9 +1344,9 @@ void reiserfs_update_sd_size(struct reis
+@@ -1345,9 +1344,9 @@
/*reiserfs_warning (inode->i_sb, "vs-13050: reiserfs_update_sd: i_nlink == 0, stat data not found"); */
return;
}
INODE_PKEY(inode), inode->i_nlink,
pos);
reiserfs_check_path(&path);
-@@ -1424,10 +1423,9 @@ void reiserfs_read_locked_inode(struct i
+@@ -1424,10 +1423,9 @@
/* look for the object's stat data */
retval = search_item(inode->i_sb, &key, &path_to_sd);
if (retval == IO_ERROR) {
reiserfs_make_bad_inode(inode);
return;
}
-@@ -1446,7 +1444,7 @@ void reiserfs_read_locked_inode(struct i
+@@ -1446,7 +1444,7 @@
update sd on unlink all that is required is to check for nlink
here. This bug was first found by Sizif when debugging
SquidNG/Butterfly, forgotten, and found again after Philippe
More logical fix would require changes in fs/inode.c:iput() to
remove inode from hash-table _after_ fs cleaned disk stuff up and
-@@ -1457,8 +1455,7 @@ void reiserfs_read_locked_inode(struct i
+@@ -1457,8 +1455,7 @@
during mount (fs/reiserfs/super.c:finish_unfinished()). */
if ((inode->i_nlink == 0) &&
!REISERFS_SB(inode->i_sb)->s_is_unlinked_ok) {
"dead inode read from disk %K. "
"This is likely to be race with knfsd. Ignore",
&key);
-@@ -1564,7 +1561,7 @@ struct dentry *reiserfs_fh_to_dentry(str
+@@ -1564,7 +1561,7 @@
*/
if (fh_type > fh_len) {
if (fh_type != 6 || fh_len != 5)
"nfsd/reiserfs, fhtype=%d, len=%d - odd",
fh_type, fh_len);
fh_type = 5;
-@@ -1631,7 +1628,7 @@ int reiserfs_write_inode(struct inode *i
+@@ -1631,7 +1628,7 @@
if (inode->i_sb->s_flags & MS_RDONLY)
return -EROFS;
/* memory pressure can sometimes initiate write_inode calls with sync == 1,
** inode needs to reach disk for safety, and they can safely be
** ignored because the altered inode has already been logged.
*/
-@@ -1689,13 +1686,13 @@ static int reiserfs_new_directory(struct
+@@ -1689,13 +1686,13 @@
/* look for place in the tree for new item */
retval = search_item(sb, &key, path);
if (retval == IO_ERROR) {
"object with this key exists (%k)",
&(ih->ih_key));
return -EEXIST;
-@@ -1729,13 +1726,13 @@ static int reiserfs_new_symlink(struct r
+@@ -1729,13 +1726,13 @@
/* look for place in the tree for new item */
retval = search_item(sb, &key, path);
if (retval == IO_ERROR) {
"object with this key exists (%k)",
&(ih->ih_key));
return -EEXIST;
-@@ -1748,7 +1745,7 @@ static int reiserfs_new_symlink(struct r
+@@ -1748,7 +1745,7 @@
/* inserts the stat data into the tree, and then calls
reiserfs_new_directory (to insert ".", ".." item if new object is
directory) or reiserfs_new_symlink (to insert symlink body if new
NOTE! uid and gid must already be set in the inode. If we return
non-zero due to an error, we have to drop the quota previously allocated
-@@ -1756,10 +1753,11 @@ static int reiserfs_new_symlink(struct r
+@@ -1756,10 +1753,11 @@
if we return non-zero, we also end the transaction. */
int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
struct inode *dir, int mode, const char *symname,
{
struct super_block *sb;
INITIALIZE_PATH(path_to_key);
-@@ -1790,7 +1788,7 @@ int reiserfs_new_inode(struct reiserfs_t
+@@ -1790,7 +1788,7 @@
goto out_bad_inode;
}
if (old_format_only(sb))
** this is as good as reiserfs can do right now.
** note that the private part of inode isn't filled in yet, we have
** to use the directory.
-@@ -1922,9 +1920,8 @@ int reiserfs_new_inode(struct reiserfs_t
+@@ -1922,9 +1920,8 @@
goto out_inserted_sd;
}
if (retval) {
err = retval;
reiserfs_check_path(&path_to_key);
-@@ -1932,10 +1929,23 @@ int reiserfs_new_inode(struct reiserfs_t
+@@ -1932,10 +1929,23 @@
goto out_inserted_sd;
}
} else if (inode->i_sb->s_flags & MS_POSIXACL) {
}
insert_inode_hash(inode);
-@@ -1965,19 +1975,7 @@ int reiserfs_new_inode(struct reiserfs_t
+@@ -1965,19 +1975,7 @@
out_inserted_sd:
inode->i_nlink = 0;
th->t_trans_id = 0; /* so the caller can't use this handle later */
return err;
}
-@@ -1994,7 +1992,7 @@ int reiserfs_new_inode(struct reiserfs_t
+@@ -1994,7 +1992,7 @@
**
** on failure, nonzero is returned, page_result and bh_result are untouched.
*/
struct page **page_result,
struct buffer_head **bh_result)
{
-@@ -2002,11 +2000,11 @@ static int grab_tail_page(struct inode *
+@@ -2002,11 +2000,11 @@
/* we want the page with the last byte in the file,
** not the page that will hold the next byte for appending
*/
struct buffer_head *bh;
struct buffer_head *head;
struct page *page;
-@@ -2020,7 +2018,7 @@ static int grab_tail_page(struct inode *
+@@ -2020,7 +2018,7 @@
if ((offset & (blocksize - 1)) == 0) {
return -ENOENT;
}
error = -ENOMEM;
if (!page) {
goto out;
-@@ -2049,10 +2047,8 @@ static int grab_tail_page(struct inode *
+@@ -2049,10 +2047,8 @@
** I've screwed up the code to find the buffer, or the code to
** call prepare_write
*/
error = -EIO;
goto unlock;
}
-@@ -2074,57 +2070,58 @@ static int grab_tail_page(struct inode *
+@@ -2074,57 +2070,58 @@
**
** some code taken from block_truncate_page
*/
if (error)
goto out;
-@@ -2135,7 +2132,7 @@ int reiserfs_truncate_file(struct inode
+@@ -2135,7 +2132,7 @@
}
if (update_timestamps) {
if (error)
goto out;
}
-@@ -2154,14 +2151,14 @@ int reiserfs_truncate_file(struct inode
+@@ -2154,14 +2151,14 @@
page_cache_release(page);
}
return error;
}
-@@ -2213,9 +2210,8 @@ static int map_block_for_writepage(struc
+@@ -2213,9 +2210,8 @@
/* we've found an unformatted node */
if (indirect_item_found(retval, ih)) {
if (bytes_copied > 0) {
}
if (!get_block_num(item, pos_in_item)) {
/* crap, we are writing to a hole */
-@@ -2272,9 +2268,8 @@ static int map_block_for_writepage(struc
+@@ -2272,9 +2268,8 @@
goto research;
}
} else {
retval = -EIO;
goto out;
}
-@@ -2317,8 +2312,8 @@ static int map_block_for_writepage(struc
+@@ -2317,8 +2312,8 @@
return retval;
}
* start/recovery path as __block_write_full_page, along with special
* code to handle reiserfs tails.
*/
-@@ -2458,7 +2453,7 @@ static int reiserfs_write_full_page(stru
+@@ -2458,7 +2453,7 @@
unlock_page(page);
/*
* the first submit_bh can bring the page out of writeback.
* be careful with the buffers.
*/
-@@ -2477,8 +2472,8 @@ static int reiserfs_write_full_page(stru
+@@ -2477,8 +2472,8 @@
if (nr == 0) {
/*
* if this page only had a direct item, it is very possible for
* pipe without locking the page
*/
bh = head;
-@@ -2497,7 +2492,7 @@ static int reiserfs_write_full_page(stru
+@@ -2497,7 +2492,7 @@
fail:
/* catches various errors, we need to make sure any valid dirty blocks
* writeback
*/
ClearPageUptodate(page);
-@@ -2565,7 +2560,7 @@ static int reiserfs_write_begin(struct f
+@@ -2565,7 +2560,7 @@
}
index = pos >> PAGE_CACHE_SHIFT;
if (!page)
return -ENOMEM;
*pagep = page;
-diff -purN linux-2.6.27/fs/reiserfs/ioctl.c linux-2.6.27.19-5.1/fs/reiserfs/ioctl.c
---- linux-2.6.27/fs/reiserfs/ioctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/ioctl.c 2009-03-25 16:11:37.000000000 +0000
-@@ -189,7 +189,7 @@ int reiserfs_unpack(struct inode *inode,
+diff -r 9608d5473017 fs/reiserfs/ioctl.c
+--- a/fs/reiserfs/ioctl.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/ioctl.c Wed May 06 16:56:52 2009 +0100
+@@ -189,7 +189,7 @@
}
/* we unpack by finding the page with the tail, and calling
** reiserfs_get_block to unpack the tail for us.
*/
index = inode->i_size >> PAGE_CACHE_SHIFT;
-diff -purN linux-2.6.27/fs/reiserfs/item_ops.c linux-2.6.27.19-5.1/fs/reiserfs/item_ops.c
---- linux-2.6.27/fs/reiserfs/item_ops.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/item_ops.c 2009-03-25 16:11:37.000000000 +0000
-@@ -97,7 +97,8 @@ static int sd_unit_num(struct virtual_it
+diff -r 9608d5473017 fs/reiserfs/item_ops.c
+--- a/fs/reiserfs/item_ops.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/item_ops.c Wed May 06 16:56:52 2009 +0100
+@@ -97,7 +97,8 @@
static void sd_print_vi(struct virtual_item *vi)
{
vi->vi_index, vi->vi_type, vi->vi_ih);
}
-@@ -190,7 +191,8 @@ static int direct_unit_num(struct virtua
+@@ -190,7 +191,8 @@
static void direct_print_vi(struct virtual_item *vi)
{
vi->vi_index, vi->vi_type, vi->vi_ih);
}
-@@ -278,7 +280,7 @@ static void indirect_print_item(struct i
+@@ -278,7 +280,7 @@
unp = (__le32 *) item;
if (ih_item_len(ih) % UNFM_P_SIZE)
printk("%d pointers\n[ ", (int)I_UNFM_NUM(ih));
for (j = 0; j < I_UNFM_NUM(ih); j++) {
-@@ -334,7 +336,8 @@ static int indirect_unit_num(struct virt
+@@ -334,7 +336,8 @@
static void indirect_print_vi(struct virtual_item *vi)
{
vi->vi_index, vi->vi_type, vi->vi_ih);
}
-@@ -359,7 +362,7 @@ static struct item_operations indirect_o
+@@ -359,7 +362,7 @@
static int direntry_bytes_number(struct item_head *ih, int block_size)
{
"bytes number is asked for direntry");
return 0;
}
-@@ -514,8 +517,9 @@ static int direntry_create_vi(struct vir
+@@ -514,8 +517,9 @@
((is_affected
&& (vn->vn_mode == M_PASTE
|| vn->vn_mode == M_CUT)) ? insert_size : 0)) {
vn->vn_mode, insert_size);
}
}
-@@ -546,7 +550,8 @@ static int direntry_check_left(struct vi
+@@ -546,7 +550,8 @@
}
if (entries == dir_u->entry_count) {
dir_u->entry_count);
}
-@@ -614,7 +619,8 @@ static void direntry_print_vi(struct vir
+@@ -614,7 +619,8 @@
int i;
struct direntry_uarea *dir_u = vi->vi_uarea;
vi->vi_index, vi->vi_type, vi->vi_ih, dir_u->flags);
printk("%d entries: ", dir_u->entry_count);
for (i = 0; i < dir_u->entry_count; i++)
-@@ -642,43 +648,43 @@ static struct item_operations direntry_o
+@@ -642,43 +648,43 @@
//
static int errcatch_bytes_number(struct item_head *ih, int block_size)
{
return 0; // We might return -1 here as well, but it won't help as create_virtual_node() from where
// this operation is called from is of return type void.
}
-@@ -686,36 +692,36 @@ static int errcatch_create_vi(struct vir
+@@ -686,36 +692,36 @@
static int errcatch_check_left(struct virtual_item *vi, int free,
int start_skip, int end_skip)
{
}
static struct item_operations errcatch_ops = {
-diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/journal.c
---- linux-2.6.27/fs/reiserfs/journal.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/journal.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/journal.c
+--- a/fs/reiserfs/journal.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/journal.c Wed May 06 16:56:52 2009 +0100
@@ -1,36 +1,36 @@
/*
** Write ahead logging implementation copyright Chris Mason 2000
** from within kupdate, it will ignore the immediate flag
*/
-@@ -82,6 +82,8 @@ static struct workqueue_struct *commit_w
+@@ -82,6 +82,8 @@
#define LIST_TOUCHED 1
#define LIST_DIRTY 2
#define LIST_COMMIT_PENDING 4 /* someone will commit this list */
/* flags for do_journal_end */
#define FLUSH_ALL 1 /* flush commit and real blocks */
-@@ -97,7 +99,7 @@ static int flush_commit_list(struct supe
+@@ -97,7 +99,7 @@
struct reiserfs_journal_list *jl, int flushall);
static int can_dirty(struct reiserfs_journal_cnode *cn);
static int journal_join(struct reiserfs_transaction_handle *th,
static int release_journal_dev(struct super_block *super,
struct reiserfs_journal *journal);
static int dirty_one_transaction(struct super_block *s,
-@@ -113,12 +115,12 @@ enum {
+@@ -113,12 +115,12 @@
};
static int do_journal_begin_r(struct reiserfs_transaction_handle *th,
unsigned long nblocks, int join);
-static void init_journal_hash(struct super_block *p_s_sb)
-+static void init_journal_hash(struct super_block *sb)
- {
+-{
- struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++static void init_journal_hash(struct super_block *sb)
++{
+ struct reiserfs_journal *journal = SB_JOURNAL(sb);
memset(journal->j_hash_table, 0,
JOURNAL_HASH_SIZE * sizeof(struct reiserfs_journal_cnode *));
}
-@@ -145,7 +147,7 @@ static void disable_barrier(struct super
+@@ -145,7 +147,7 @@
}
static struct reiserfs_bitmap_node *allocate_bitmap_node(struct super_block
{
struct reiserfs_bitmap_node *bn;
static int id;
-@@ -154,7 +156,7 @@ static struct reiserfs_bitmap_node *allo
+@@ -154,7 +156,7 @@
if (!bn) {
return NULL;
}
if (!bn->data) {
kfree(bn);
return NULL;
-@@ -164,9 +166,9 @@ static struct reiserfs_bitmap_node *allo
+@@ -164,9 +166,9 @@
return bn;
}
-static struct reiserfs_bitmap_node *get_bitmap_node(struct super_block *p_s_sb)
-+static struct reiserfs_bitmap_node *get_bitmap_node(struct super_block *sb)
- {
+-{
- struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++static struct reiserfs_bitmap_node *get_bitmap_node(struct super_block *sb)
++{
+ struct reiserfs_journal *journal = SB_JOURNAL(sb);
struct reiserfs_bitmap_node *bn = NULL;
struct list_head *entry = journal->j_bitmap_nodes.next;
-@@ -176,21 +178,21 @@ static struct reiserfs_bitmap_node *get_
+@@ -176,21 +178,21 @@
if (entry != &journal->j_bitmap_nodes) {
bn = list_entry(entry, struct reiserfs_bitmap_node, list);
list_del(entry);
journal->j_used_bitmap_nodes--;
if (journal->j_free_bitmap_nodes > REISERFS_MAX_BITMAP_NODES) {
kfree(bn->data);
-@@ -201,46 +203,46 @@ static inline void free_bitmap_node(stru
+@@ -201,46 +203,46 @@
}
}
-static void allocate_bitmap_nodes(struct super_block *p_s_sb)
-+static void allocate_bitmap_nodes(struct super_block *sb)
- {
- int i;
+-{
+- int i;
- struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++static void allocate_bitmap_nodes(struct super_block *sb)
++{
++ int i;
+ struct reiserfs_journal *journal = SB_JOURNAL(sb);
struct reiserfs_bitmap_node *bn = NULL;
for (i = 0; i < REISERFS_MIN_BITMAP_NODES; i++) {
journal->j_free_bitmap_nodes++;
} else {
- break; // this is ok, we'll try again when more are needed
-+ break; /* this is ok, we'll try again when more are needed */
- }
- }
- }
-
+- }
+- }
+-}
+-
-static int set_bit_in_list_bitmap(struct super_block *p_s_sb,
++ break; /* this is ok, we'll try again when more are needed */
++ }
++ }
++}
++
+static int set_bit_in_list_bitmap(struct super_block *sb,
b_blocknr_t block,
struct reiserfs_list_bitmap *jb)
jb->bitmaps[i] = NULL;
}
}
-@@ -249,7 +251,7 @@ static void cleanup_bitmap_list(struct s
+@@ -249,7 +251,7 @@
/*
** only call this on FS unmount.
*/
struct reiserfs_list_bitmap *jb_array)
{
int i;
-@@ -257,16 +259,16 @@ static int free_list_bitmaps(struct supe
+@@ -257,16 +259,16 @@
for (i = 0; i < JOURNAL_NUM_BITMAPS; i++) {
jb = jb_array + i;
jb->journal_list = NULL;
}
-static int free_bitmap_nodes(struct super_block *p_s_sb)
-+static int free_bitmap_nodes(struct super_block *sb)
- {
+-{
- struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++static int free_bitmap_nodes(struct super_block *sb)
++{
+ struct reiserfs_journal *journal = SB_JOURNAL(sb);
struct list_head *next = journal->j_bitmap_nodes.next;
struct reiserfs_bitmap_node *bn;
-@@ -283,10 +285,10 @@ static int free_bitmap_nodes(struct supe
+@@ -283,10 +285,10 @@
}
/*
struct reiserfs_list_bitmap *jb_array,
unsigned int bmap_nr)
{
-@@ -300,30 +302,30 @@ int reiserfs_allocate_list_bitmaps(struc
+@@ -300,30 +302,30 @@
jb->journal_list = NULL;
jb->bitmaps = vmalloc(mem);
if (!jb->bitmaps) {
struct reiserfs_list_bitmap *jb = NULL;
for (j = 0; j < (JOURNAL_NUM_BITMAPS * 3); j++) {
-@@ -331,7 +333,7 @@ static struct reiserfs_list_bitmap *get_
+@@ -331,7 +333,7 @@
journal->j_list_bitmap_index = (i + 1) % JOURNAL_NUM_BITMAPS;
jb = journal->j_list_bitmap + i;
if (journal->j_list_bitmap[i].journal_list) {
journal->j_list_bitmap[i].
journal_list, 1);
if (!journal->j_list_bitmap[i].journal_list) {
-@@ -348,7 +350,7 @@ static struct reiserfs_list_bitmap *get_
+@@ -348,7 +350,7 @@
return jb;
}
** allocates a new chunk of X nodes, and links them all together as a list.
** Uses the cnode->next and cnode->prev pointers
** returns NULL on failure
-@@ -376,14 +378,14 @@ static struct reiserfs_journal_cnode *al
+@@ -376,14 +378,14 @@
}
/*
-** pulls a cnode off the free list, or returns NULL on failure
-+** pulls a cnode off the free list, or returns NULL on failure
- */
+-*/
-static struct reiserfs_journal_cnode *get_cnode(struct super_block *p_s_sb)
-+static struct reiserfs_journal_cnode *get_cnode(struct super_block *sb)
- {
- struct reiserfs_journal_cnode *cn;
+-{
+- struct reiserfs_journal_cnode *cn;
- struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
-+ struct reiserfs_journal *journal = SB_JOURNAL(sb);
-
+-
- reiserfs_check_lock_depth(p_s_sb, "get_cnode");
++** pulls a cnode off the free list, or returns NULL on failure
++*/
++static struct reiserfs_journal_cnode *get_cnode(struct super_block *sb)
++{
++ struct reiserfs_journal_cnode *cn;
++ struct reiserfs_journal *journal = SB_JOURNAL(sb);
++
+ reiserfs_check_lock_depth(sb, "get_cnode");
if (journal->j_cnode_free <= 0) {
return NULL;
-@@ -403,14 +405,14 @@ static struct reiserfs_journal_cnode *ge
+@@ -403,14 +405,14 @@
}
/*
-** returns a cnode to the free list
-+** returns a cnode to the free list
- */
+-*/
-static void free_cnode(struct super_block *p_s_sb,
++** returns a cnode to the free list
++*/
+static void free_cnode(struct super_block *sb,
struct reiserfs_journal_cnode *cn)
{
- struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
-+ struct reiserfs_journal *journal = SB_JOURNAL(sb);
-
+-
- reiserfs_check_lock_depth(p_s_sb, "free_cnode");
++ struct reiserfs_journal *journal = SB_JOURNAL(sb);
++
+ reiserfs_check_lock_depth(sb, "free_cnode");
journal->j_cnode_used--;
journal->j_cnode_free++;
-@@ -436,8 +438,8 @@ void reiserfs_check_lock_depth(struct su
+@@ -436,8 +438,8 @@
{
#ifdef CONFIG_SMP
if (current->lock_depth < 0) {
}
#else
;
-@@ -481,11 +483,11 @@ static inline struct reiserfs_journal_cn
+@@ -481,11 +483,11 @@
** reject it on the next call to reiserfs_in_journal
**
*/
struct reiserfs_journal_cnode *cn;
struct reiserfs_list_bitmap *jb;
int i;
-@@ -493,14 +495,14 @@ int reiserfs_in_journal(struct super_blo
+@@ -493,14 +495,14 @@
*next_zero_bit = 0; /* always start this at zero. */
jb = journal->j_list_bitmap + i;
if (jb->journal_list && jb->bitmaps[bmap_nr] &&
test_bit(bit_nr,
-@@ -510,28 +512,28 @@ int reiserfs_in_journal(struct super_blo
+@@ -510,28 +512,28 @@
find_next_zero_bit((unsigned long *)
(jb->bitmaps[bmap_nr]->
data),
/* is it in the current transaction. This should never happen */
- if ((cn = get_journal_hash_dev(p_s_sb, journal->j_hash_table, bl))) {
-+ if ((cn = get_journal_hash_dev(sb, journal->j_hash_table, bl))) {
- BUG();
- return 1;
- }
-
+- BUG();
+- return 1;
+- }
+-
- PROC_INFO_INC(p_s_sb, journal.in_journal_reusable);
++ if ((cn = get_journal_hash_dev(sb, journal->j_hash_table, bl))) {
++ BUG();
++ return 1;
++ }
++
+ PROC_INFO_INC(sb, journal.in_journal_reusable);
/* safe for reuse */
return 0;
}
-@@ -553,16 +555,16 @@ static inline void insert_journal_hash(s
+@@ -553,16 +555,16 @@
}
/* lock the current transaction */
-static inline void lock_journal(struct super_block *p_s_sb)
-+static inline void lock_journal(struct super_block *sb)
- {
+-{
- PROC_INFO_INC(p_s_sb, journal.lock_journal);
- mutex_lock(&SB_JOURNAL(p_s_sb)->j_mutex);
++static inline void lock_journal(struct super_block *sb)
++{
+ PROC_INFO_INC(sb, journal.lock_journal);
+ mutex_lock(&SB_JOURNAL(sb)->j_mutex);
}
/* unlock the current transaction */
-static inline void unlock_journal(struct super_block *p_s_sb)
-+static inline void unlock_journal(struct super_block *sb)
- {
+-{
- mutex_unlock(&SB_JOURNAL(p_s_sb)->j_mutex);
++static inline void unlock_journal(struct super_block *sb)
++{
+ mutex_unlock(&SB_JOURNAL(sb)->j_mutex);
}
static inline void get_journal_list(struct reiserfs_journal_list *jl)
-@@ -574,7 +576,7 @@ static inline void put_journal_list(stru
+@@ -574,7 +576,7 @@
struct reiserfs_journal_list *jl)
{
if (jl->j_refcount < 1) {
jl->j_trans_id, jl->j_refcount);
}
if (--jl->j_refcount == 0)
-@@ -586,20 +588,20 @@ static inline void put_journal_list(stru
+@@ -586,20 +588,20 @@
** it gets called by flush_commit_list, and cleans up any data stored about blocks freed during a
** transaction.
*/
{
struct reiserfs_journal *journal = SB_JOURNAL(s);
struct list_head *entry = &journal->j_journal_list;
-@@ -644,8 +646,8 @@ static void reiserfs_end_buffer_io_sync(
+@@ -644,8 +646,8 @@
char b[BDEVNAME_SIZE];
if (buffer_journaled(bh)) {
bh->b_blocknr, bdevname(bh->b_bdev, b));
}
if (uptodate)
-@@ -933,9 +935,9 @@ static int flush_older_commits(struct su
+@@ -933,9 +935,9 @@
struct reiserfs_journal_list *other_jl;
struct reiserfs_journal_list *first_jl;
struct list_head *entry;
find_first:
/*
-@@ -1014,7 +1016,7 @@ static int flush_commit_list(struct supe
+@@ -1014,7 +1016,7 @@
int i;
b_blocknr_t bn;
struct buffer_head *tbh = NULL;
struct reiserfs_journal *journal = SB_JOURNAL(s);
int barrier = 0;
int retval = 0;
-@@ -1031,6 +1033,14 @@ static int flush_commit_list(struct supe
+@@ -1031,6 +1033,14 @@
/* before we can put our commit blocks on disk, we have to make sure everyone older than
** us is on disk too
*/
BUG_ON(jl->j_len <= 0);
BUG_ON(trans_id == journal->j_trans_id);
-@@ -1122,7 +1132,8 @@ static int flush_commit_list(struct supe
+@@ -1122,7 +1132,8 @@
sync_dirty_buffer(tbh);
if (unlikely(!buffer_uptodate(tbh))) {
#ifdef CONFIG_REISERFS_CHECK
#endif
retval = -EIO;
}
-@@ -1154,14 +1165,14 @@ static int flush_commit_list(struct supe
+@@ -1154,14 +1165,14 @@
* up propagating the write error out to the filesystem. */
if (unlikely(!buffer_uptodate(jl->j_commit_bh))) {
#ifdef CONFIG_REISERFS_CHECK
journal->j_last_commit_id, jl->j_trans_id);
}
journal->j_last_commit_id = jl->j_trans_id;
-@@ -1191,8 +1202,8 @@ static int flush_commit_list(struct supe
+@@ -1191,8 +1202,8 @@
}
/*
*/
static struct reiserfs_journal_list *find_newer_jl_for_cn(struct
reiserfs_journal_cnode
-@@ -1236,11 +1247,11 @@ static void remove_journal_hash(struct s
+@@ -1236,11 +1247,11 @@
** journal list for this transaction. Aside from freeing the cnode, this also allows the
** block to be reallocated for data blocks if it had been deleted.
*/
struct reiserfs_journal_cnode *cn, *last;
cn = jl->j_realblock;
-@@ -1250,18 +1261,18 @@ static void remove_all_from_journal_list
+@@ -1250,18 +1261,18 @@
while (cn) {
if (cn->blocknr != 0) {
if (debug) {
}
jl->j_realblock = NULL;
}
-@@ -1273,12 +1284,12 @@ static void remove_all_from_journal_list
+@@ -1273,12 +1284,12 @@
** called by flush_journal_list, before it calls remove_all_from_journal_list
**
*/
if (reiserfs_is_journal_aborted(journal))
return -EIO;
-@@ -1288,8 +1299,8 @@ static int _update_journal_header_block(
+@@ -1288,8 +1299,8 @@
wait_on_buffer((journal->j_header_bh));
if (unlikely(!buffer_uptodate(journal->j_header_bh))) {
#ifdef CONFIG_REISERFS_CHECK
#endif
return -EIO;
}
-@@ -1302,49 +1313,49 @@ static int _update_journal_header_block(
+@@ -1302,49 +1313,49 @@
jh->j_first_unflushed_offset = cpu_to_le32(offset);
jh->j_mount_id = cpu_to_le32(journal->j_mount_id);
+static int update_journal_header_block(struct super_block *sb,
unsigned long offset,
- unsigned long trans_id)
-+ unsigned int trans_id)
- {
+-{
- return _update_journal_header_block(p_s_sb, offset, trans_id);
-+ return _update_journal_header_block(sb, offset, trans_id);
- }
-
+-}
+-
-/*
-** flush any and all journal lists older than you are
++ unsigned int trans_id)
++{
++ return _update_journal_header_block(sb, offset, trans_id);
++}
++
+/*
+** flush any and all journal lists older than you are
** can only be called from flush_journal_list
/* we know we are the only ones flushing things, no extra race
* protection is required.
-@@ -1358,7 +1369,7 @@ static int flush_older_journal_lists(str
+@@ -1358,7 +1369,7 @@
if (other_jl->j_trans_id < trans_id) {
BUG_ON(other_jl->j_refcount <= 0);
/* do not flush all */
/* other_jl is now deleted from the list */
goto restart;
-@@ -1381,8 +1392,8 @@ static void del_from_work_list(struct su
+@@ -1381,8 +1392,8 @@
** always set flushall to 1, unless you are calling from inside
** flush_journal_list
**
** do_journal_end, or by journal_release
*/
static int flush_journal_list(struct super_block *s,
-@@ -1401,8 +1412,7 @@ static int flush_journal_list(struct sup
+@@ -1401,8 +1412,7 @@
BUG_ON(j_len_saved <= 0);
if (atomic_read(&journal->j_wcount) != 0) {
atomic_read(&journal->j_wcount));
}
BUG_ON(jl->j_trans_id == 0);
-@@ -1416,8 +1426,7 @@ static int flush_journal_list(struct sup
+@@ -1416,8 +1426,7 @@
count = 0;
if (j_len_saved > journal->j_trans_max) {
j_len_saved, jl->j_trans_id);
return 0;
}
-@@ -1430,7 +1439,7 @@ static int flush_journal_list(struct sup
+@@ -1430,7 +1439,7 @@
goto flush_older_and_return;
}
** the commit lists of any olders transactions
*/
flush_commit_list(s, jl, 1);
-@@ -1445,12 +1454,12 @@ static int flush_journal_list(struct sup
+@@ -1445,12 +1454,12 @@
goto flush_older_and_return;
}
}
cn = jl->j_realblock;
while (cn) {
-@@ -1474,8 +1483,8 @@ static int flush_journal_list(struct sup
+@@ -1474,8 +1483,8 @@
if (!pjl && cn->bh) {
saved_bh = cn->bh;
*/
get_bh(saved_bh);
-@@ -1498,8 +1507,8 @@ static int flush_journal_list(struct sup
+@@ -1498,8 +1507,8 @@
goto free_cnode;
}
*/
if (saved_bh == NULL) {
goto free_cnode;
-@@ -1510,8 +1519,8 @@ static int flush_journal_list(struct sup
+@@ -1510,8 +1519,8 @@
** is not marked JDirty_wait
*/
if ((!was_jwait) && !buffer_locked(saved_bh)) {
"not in a newer tranasction",
(unsigned long long)saved_bh->
b_blocknr, was_dirty ? ' ' : '!',
-@@ -1529,8 +1538,8 @@ static int flush_journal_list(struct sup
+@@ -1529,8 +1538,8 @@
unlock_buffer(saved_bh);
count++;
} else {
(unsigned long long)saved_bh->
b_blocknr, __func__);
}
-@@ -1541,8 +1550,8 @@ static int flush_journal_list(struct sup
+@@ -1541,8 +1550,8 @@
/* we incremented this to keep others from taking the buffer head away */
put_bh(saved_bh);
if (atomic_read(&(saved_bh->b_count)) < 0) {
}
}
}
-@@ -1551,18 +1560,18 @@ static int flush_journal_list(struct sup
+@@ -1551,18 +1560,18 @@
while (cn) {
if (test_bit(BLOCK_NEEDS_FLUSH, &cn->state)) {
if (!cn->bh) {
#endif
err = -EIO;
}
-@@ -1587,7 +1596,7 @@ static int flush_journal_list(struct sup
+@@ -1587,7 +1596,7 @@
__func__);
flush_older_and_return:
** real blocks from all older transactions to disk. This is because
** once the header block is updated, this transaction will not be
** replayed after a crash
-@@ -1597,7 +1606,7 @@ static int flush_journal_list(struct sup
+@@ -1597,7 +1606,7 @@
}
err = journal->j_errno;
** transaction, we must make sure it can never be replayed
**
** since we are only called from do_journal_end, we know for sure there
-@@ -1623,7 +1632,7 @@ static int flush_journal_list(struct sup
+@@ -1623,7 +1632,7 @@
if (journal->j_last_flush_id != 0 &&
(jl->j_trans_id - journal->j_last_flush_id) != 1) {
journal->j_last_flush_id, jl->j_trans_id);
}
journal->j_last_flush_id = jl->j_trans_id;
-@@ -1637,7 +1646,7 @@ static int flush_journal_list(struct sup
+@@ -1637,7 +1646,7 @@
jl->j_realblock = NULL;
jl->j_commit_bh = NULL;
jl->j_trans_id = 0;
put_journal_list(s, jl);
if (flushall)
mutex_unlock(&journal->j_flush_mutex);
-@@ -1758,13 +1767,13 @@ static int dirty_one_transaction(struct
+@@ -1758,13 +1767,13 @@
static int kupdate_transactions(struct super_block *s,
struct reiserfs_journal_list *jl,
struct reiserfs_journal_list **next_jl,
struct buffer_chunk chunk;
struct list_head *entry;
struct reiserfs_journal *journal = SB_JOURNAL(s);
-@@ -1833,7 +1842,7 @@ static int flush_used_journal_lists(stru
+@@ -1833,7 +1842,7 @@
int limit = 256;
struct reiserfs_journal_list *tjl;
struct reiserfs_journal_list *flush_jl;
struct reiserfs_journal *journal = SB_JOURNAL(s);
flush_jl = tjl = jl;
-@@ -1909,22 +1918,22 @@ void remove_journal_hash(struct super_bl
+@@ -1909,22 +1918,22 @@
}
}
-static void free_journal_ram(struct super_block *p_s_sb)
-+static void free_journal_ram(struct super_block *sb)
- {
+-{
- struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++static void free_journal_ram(struct super_block *sb)
++{
+ struct reiserfs_journal *journal = SB_JOURNAL(sb);
kfree(journal->j_current_jl);
journal->j_num_lists--;
vfree(journal);
}
-@@ -1933,27 +1942,27 @@ static void free_journal_ram(struct supe
+@@ -1933,27 +1942,27 @@
** of read_super() yet. Any other caller must keep error at 0.
*/
static int do_journal_release(struct reiserfs_transaction_handle *th,
flushed = 1;
}
}
-@@ -1961,26 +1970,26 @@ static int do_journal_release(struct rei
+@@ -1961,26 +1970,26 @@
/* this also catches errors during the do_journal_end above */
if (!error && reiserfs_is_journal_aborted(journal)) {
memset(&myth, 0, sizeof(myth));
return 0;
}
-@@ -1989,41 +1998,41 @@ static int do_journal_release(struct rei
+@@ -1989,41 +1998,41 @@
** call on unmount. flush all journal trans, release all alloc'd ram
*/
int journal_release(struct reiserfs_transaction_handle *th,
- struct super_block *p_s_sb)
-+ struct super_block *sb)
- {
+-{
- return do_journal_release(th, p_s_sb, 0);
++ struct super_block *sb)
++{
+ return do_journal_release(th, sb, 0);
}
*/
int journal_release_error(struct reiserfs_transaction_handle *th,
- struct super_block *p_s_sb)
-+ struct super_block *sb)
- {
+-{
- return do_journal_release(th, p_s_sb, 1);
++ struct super_block *sb)
++{
+ return do_journal_release(th, sb, 1);
}
+/* returns 0 if it did not find a description block
** returns -1 if it found a corrupt commit block
-** returns 1 if both desc and commit were valid
-+** returns 1 if both desc and commit were valid
- */
+-*/
-static int journal_transaction_is_valid(struct super_block *p_s_sb,
++** returns 1 if both desc and commit were valid
++*/
+static int journal_transaction_is_valid(struct super_block *sb,
struct buffer_head *d_bh,
- unsigned long *oldest_invalid_trans_id,
unsigned long *newest_mount_id)
{
struct reiserfs_journal_desc *desc;
-@@ -2039,7 +2048,7 @@ static int journal_transaction_is_valid(
+@@ -2039,7 +2048,7 @@
&& !memcmp(get_journal_desc_magic(d_bh), JOURNAL_DESC_MAGIC, 8)) {
if (oldest_invalid_trans_id && *oldest_invalid_trans_id
&& get_desc_trans_id(desc) > *oldest_invalid_trans_id) {
"journal-986: transaction "
"is valid returning because trans_id %d is greater than "
"oldest_invalid %lu",
-@@ -2049,7 +2058,7 @@ static int journal_transaction_is_valid(
+@@ -2049,7 +2058,7 @@
}
if (newest_mount_id
&& *newest_mount_id > get_desc_mount_id(desc)) {
"journal-1087: transaction "
"is valid returning because mount_id %d is less than "
"newest_mount_id %lu",
-@@ -2057,36 +2066,37 @@ static int journal_transaction_is_valid(
+@@ -2057,36 +2066,37 @@
*newest_mount_id);
return -1;
}
"journal-1004: "
"transaction_is_valid setting oldest invalid trans_id "
"to %d",
-@@ -2095,11 +2105,11 @@ static int journal_transaction_is_valid(
+@@ -2095,11 +2105,11 @@
return -1;
}
brelse(c_bh);
get_desc_trans_len(desc),
get_desc_trans_id(desc));
return 1;
-@@ -2121,63 +2131,63 @@ static void brelse_array(struct buffer_h
+@@ -2121,63 +2131,63 @@
** this either reads in a replays a transaction, or returns because the transaction
** is invalid, or too old.
*/
get_commit_trans_id(commit),
get_commit_trans_len(commit));
brelse(c_bh);
-@@ -2195,38 +2205,41 @@ static int journal_read_transaction(stru
+@@ -2195,38 +2205,41 @@
brelse(d_bh);
kfree(log_blocks);
kfree(real_blocks);
abort_replay:
brelse_array(log_blocks, i);
brelse_array(real_blocks, i);
-@@ -2242,8 +2255,9 @@ static int journal_read_transaction(stru
+@@ -2242,8 +2255,9 @@
for (i = 0; i < get_desc_trans_len(desc); i++) {
wait_on_buffer(log_blocks[i]);
if (!buffer_uptodate(log_blocks[i])) {
brelse_array(log_blocks + i,
get_desc_trans_len(desc) - i);
brelse_array(real_blocks, get_desc_trans_len(desc));
-@@ -2266,8 +2280,9 @@ static int journal_read_transaction(stru
+@@ -2266,8 +2280,9 @@
for (i = 0; i < get_desc_trans_len(desc); i++) {
wait_on_buffer(real_blocks[i]);
if (!buffer_uptodate(real_blocks[i])) {
brelse_array(real_blocks + i,
get_desc_trans_len(desc) - i);
brelse(c_bh);
-@@ -2279,15 +2294,15 @@ static int journal_read_transaction(stru
+@@ -2279,15 +2294,15 @@
brelse(real_blocks[i]);
}
cur_dblock =
journal->j_last_flush_trans_id = trans_id;
journal->j_trans_id = trans_id + 1;
/* check for trans_id overflow */
-@@ -2352,12 +2367,12 @@ static struct buffer_head *reiserfs_brea
+@@ -2352,12 +2367,12 @@
**
** On exit, it sets things up so the first transaction will work correctly.
*/
-static int journal_read(struct super_block *p_s_sb)
-+static int journal_read(struct super_block *sb)
- {
+-{
- struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++static int journal_read(struct super_block *sb)
++{
+ struct reiserfs_journal *journal = SB_JOURNAL(sb);
struct reiserfs_journal_desc *desc;
- unsigned long oldest_trans_id = 0;
time_t start;
unsigned long oldest_start = 0;
unsigned long cur_dblock = 0;
-@@ -2370,46 +2385,46 @@ static int journal_read(struct super_blo
+@@ -2370,46 +2385,46 @@
int ret;
char b[BDEVNAME_SIZE];
if (!ret) {
continue_replay = 0;
}
-@@ -2417,9 +2432,9 @@ static int journal_read(struct super_blo
+@@ -2417,9 +2432,9 @@
goto start_log_replay;
}
return -1;
}
-@@ -2428,17 +2443,17 @@ static int journal_read(struct super_blo
+@@ -2428,17 +2443,17 @@
*/
while (continue_replay
&& cur_dblock <
&oldest_invalid_trans_id,
&newest_mount_id);
if (ret == 1) {
-@@ -2447,26 +2462,26 @@ static int journal_read(struct super_blo
+@@ -2447,26 +2462,26 @@
oldest_trans_id = get_desc_trans_id(desc);
oldest_start = d_bh->b_blocknr;
newest_mount_id = get_desc_mount_id(desc);
"journal-1299: Setting "
"newest_mount_id to %d",
get_desc_mount_id(desc));
-@@ -2481,17 +2496,17 @@ static int journal_read(struct super_blo
+@@ -2481,17 +2496,17 @@
start_log_replay:
cur_dblock = oldest_start;
if (oldest_trans_id) {
oldest_trans_id, newest_mount_id);
if (ret < 0) {
return ret;
-@@ -2499,14 +2514,14 @@ static int journal_read(struct super_blo
+@@ -2499,14 +2514,14 @@
break;
}
cur_dblock =
"journal-1225: No valid " "transactions found");
}
/* j_start does not get set correctly if we don't replay any transactions.
-@@ -2526,16 +2541,16 @@ static int journal_read(struct super_blo
+@@ -2526,16 +2541,16 @@
} else {
journal->j_mount_id = newest_mount_id + 1;
}
journal->j_last_flush_trans_id)) {
/* replay failed, caller must call free_journal_ram and abort
** the mount
-@@ -2556,13 +2571,19 @@ static struct reiserfs_journal_list *all
+@@ -2556,13 +2571,19 @@
INIT_LIST_HEAD(&jl->j_bh_list);
mutex_init(&jl->j_commit_mutex);
SB_JOURNAL(s)->j_num_lists++;
}
-static void journal_list_init(struct super_block *p_s_sb)
-+static void journal_list_init(struct super_block *sb)
- {
+-{
- SB_JOURNAL(p_s_sb)->j_current_jl = alloc_journal_list(p_s_sb);
++static void journal_list_init(struct super_block *sb)
++{
+ SB_JOURNAL(sb)->j_current_jl = alloc_journal_list(sb);
}
static int release_journal_dev(struct super_block *super,
-@@ -2580,9 +2601,8 @@ static int release_journal_dev(struct su
+@@ -2580,9 +2601,8 @@
}
if (result != 0) {
}
return result;
}
-@@ -2611,7 +2631,7 @@ static int journal_init_dev(struct super
+@@ -2611,7 +2631,7 @@
if (IS_ERR(journal->j_dev_bd)) {
result = PTR_ERR(journal->j_dev_bd);
journal->j_dev_bd = NULL;
"cannot init journal device '%s': %i",
__bdevname(jdev, b), result);
return result;
-@@ -2659,30 +2679,30 @@ static int journal_init_dev(struct super
+@@ -2659,30 +2679,30 @@
*/
#define REISERFS_STANDARD_BLKSIZE (4096)
return 1;
}
} else {
-@@ -2690,9 +2710,11 @@ static int check_advise_trans_params(str
+@@ -2690,9 +2710,11 @@
The file system was created by old version
of mkreiserfs, so some fields contain zeros,
and we need to advise proper values for them */
journal->j_trans_max = JOURNAL_TRANS_MAX_DEFAULT;
journal->j_max_batch = JOURNAL_MAX_BATCH_DEFAULT;
journal->j_max_commit_age = JOURNAL_MAX_COMMIT_AGE;
-@@ -2703,10 +2725,10 @@ static int check_advise_trans_params(str
+@@ -2703,10 +2725,10 @@
/*
** must be called once on fs mount. calls journal_read for you
*/
struct buffer_head *bhjh;
struct reiserfs_super_block *rs;
struct reiserfs_journal_header *jh;
-@@ -2714,10 +2736,10 @@ int journal_init(struct super_block *p_s
+@@ -2714,10 +2736,10 @@
struct reiserfs_journal_list *jl;
char b[BDEVNAME_SIZE];
return 1;
}
memset(journal, 0, sizeof(struct reiserfs_journal));
-@@ -2726,51 +2748,51 @@ int journal_init(struct super_block *p_s
+@@ -2726,51 +2748,51 @@
INIT_LIST_HEAD(&journal->j_working_list);
INIT_LIST_HEAD(&journal->j_journal_list);
journal->j_persistent_trans = 0;
+ if (reiserfs_allocate_list_bitmaps(sb,
journal->j_list_bitmap,
- reiserfs_bmap_count(p_s_sb)))
-+ reiserfs_bmap_count(sb)))
- goto free_and_return;
+- goto free_and_return;
- allocate_bitmap_nodes(p_s_sb);
++ reiserfs_bmap_count(sb)))
++ goto free_and_return;
+ allocate_bitmap_nodes(sb);
/* reserved for journal area support */
- SB_JOURNAL_1st_RESERVED_BLOCK(p_s_sb),
- SB_ONDISK_JOURNAL_SIZE(p_s_sb),
- p_s_sb->s_blocksize);
-+ SB_JOURNAL_1st_RESERVED_BLOCK(sb),
-+ SB_ONDISK_JOURNAL_SIZE(sb),
-+ sb->s_blocksize);
- goto free_and_return;
- }
-
+- goto free_and_return;
+- }
+-
- if (journal_init_dev(p_s_sb, journal, j_dev_name) != 0) {
- reiserfs_warning(p_s_sb,
- "sh-462: unable to initialize jornal device");
+- goto free_and_return;
+- }
+-
+- rs = SB_DISK_SUPER_BLOCK(p_s_sb);
++ SB_JOURNAL_1st_RESERVED_BLOCK(sb),
++ SB_ONDISK_JOURNAL_SIZE(sb),
++ sb->s_blocksize);
++ goto free_and_return;
++ }
++
+ if (journal_init_dev(sb, journal, j_dev_name) != 0) {
+ reiserfs_warning(sb, "sh-462",
+ "unable to initialize jornal device");
- goto free_and_return;
- }
-
-- rs = SB_DISK_SUPER_BLOCK(p_s_sb);
++ goto free_and_return;
++ }
++
+ rs = SB_DISK_SUPER_BLOCK(sb);
/* read journal header */
goto free_and_return;
}
jh = (struct reiserfs_journal_header *)(bhjh->b_data);
-@@ -2779,10 +2801,10 @@ int journal_init(struct super_block *p_s
+@@ -2779,10 +2801,10 @@
if (is_reiserfs_jr(rs)
&& (le32_to_cpu(jh->jh_journal.jp_journal_magic) !=
sb_jp_journal_magic(rs))) {
bdevname(journal->j_dev_bd, b),
sb_jp_journal_magic(rs));
brelse(bhjh);
-@@ -2795,7 +2817,7 @@ int journal_init(struct super_block *p_s
+@@ -2795,7 +2817,7 @@
le32_to_cpu(jh->jh_journal.jp_journal_max_commit_age);
journal->j_max_trans_age = JOURNAL_MAX_TRANS_AGE;
goto free_and_return;
journal->j_default_max_commit_age = journal->j_max_commit_age;
-@@ -2804,12 +2826,12 @@ int journal_init(struct super_block *p_s
+@@ -2804,12 +2826,12 @@
journal->j_max_trans_age = commit_max_age;
}
journal->j_trans_max,
journal->j_max_batch,
journal->j_max_commit_age, journal->j_max_trans_age);
-@@ -2817,7 +2839,8 @@ int journal_init(struct super_block *p_s
+@@ -2817,7 +2839,8 @@
brelse(bhjh);
journal->j_list_bitmap_index = 0;
memset(journal->j_list_hash_table, 0,
JOURNAL_HASH_SIZE * sizeof(struct reiserfs_journal_cnode *));
-@@ -2849,7 +2872,7 @@ int journal_init(struct super_block *p_s
+@@ -2849,7 +2872,7 @@
journal->j_must_wait = 0;
if (journal->j_cnode_free == 0) {
"allocation failed (%ld bytes). Journal is "
"too large for available memory. Usually "
"this is due to a journal that is too large.",
-@@ -2857,16 +2880,17 @@ int journal_init(struct super_block *p_s
+@@ -2857,16 +2880,17 @@
goto free_and_return;
}
if (!jl->j_list_bitmap) {
- reiserfs_warning(p_s_sb,
- "journal-2005, get_list_bitmap failed for journal list 0");
-+ reiserfs_warning(sb, "journal-2005",
-+ "get_list_bitmap failed for journal list 0");
- goto free_and_return;
- }
+- goto free_and_return;
+- }
- if (journal_read(p_s_sb) < 0) {
- reiserfs_warning(p_s_sb, "Replay Failure, unable to mount");
++ reiserfs_warning(sb, "journal-2005",
++ "get_list_bitmap failed for journal list 0");
++ goto free_and_return;
++ }
+ if (journal_read(sb) < 0) {
+ reiserfs_warning(sb, "reiserfs-2006",
+ "Replay Failure, unable to mount");
goto free_and_return;
}
-@@ -2875,10 +2899,10 @@ int journal_init(struct super_block *p_s
+@@ -2875,10 +2899,10 @@
commit_wq = create_workqueue("reiserfs");
INIT_DELAYED_WORK(&journal->j_work, flush_async_commits);
return 1;
}
-@@ -2909,7 +2933,7 @@ int journal_transaction_should_end(struc
+@@ -2909,7 +2933,7 @@
return 0;
}
** kernel_lock to be held
*/
void reiserfs_block_writes(struct reiserfs_transaction_handle *th)
-@@ -2967,7 +2991,7 @@ static void wake_queued_writers(struct s
+@@ -2967,7 +2991,7 @@
wake_up(&journal->j_join_wait);
}
{
struct reiserfs_journal *journal = SB_JOURNAL(sb);
unsigned long bcount = journal->j_bcount;
-@@ -2994,43 +3018,43 @@ static void let_transaction_grow(struct
+@@ -2994,43 +3018,43 @@
** expect to use in nblocks.
*/
static int do_journal_begin_r(struct reiserfs_transaction_handle *th,
** we don't sleep if there aren't other writers
*/
-@@ -3045,7 +3069,7 @@ static int do_journal_begin_r(struct rei
+@@ -3045,7 +3069,7 @@
|| (!join && journal->j_cnode_free < (journal->j_trans_max * 3))) {
old_trans_id = journal->j_trans_id;
if (!join && (journal->j_len_alloc + nblocks + 2) >=
journal->j_max_batch &&
-@@ -3053,7 +3077,7 @@ static int do_journal_begin_r(struct rei
+@@ -3053,7 +3077,7 @@
(journal->j_len_alloc * 75)) {
if (atomic_read(&journal->j_wcount) > 10) {
sched_count++;
goto relock;
}
}
-@@ -3063,25 +3087,25 @@ static int do_journal_begin_r(struct rei
+@@ -3063,25 +3087,25 @@
if (atomic_read(&journal->j_jlock)) {
while (journal->j_trans_id == old_trans_id &&
atomic_read(&journal->j_jlock)) {
/* someone might have ended the transaction while we joined */
if (old_trans_id != journal->j_trans_id) {
- retval = do_journal_end(&myth, p_s_sb, 1, 0);
-+ retval = do_journal_end(&myth, sb, 1, 0);
- } else {
+- } else {
- retval = do_journal_end(&myth, p_s_sb, 1, COMMIT_NOW);
++ retval = do_journal_end(&myth, sb, 1, 0);
++ } else {
+ retval = do_journal_end(&myth, sb, 1, COMMIT_NOW);
}
goto relock;
}
/* we are the first writer, set trans_id */
-@@ -3093,7 +3117,7 @@ static int do_journal_begin_r(struct rei
+@@ -3093,7 +3117,7 @@
th->t_blocks_logged = 0;
th->t_blocks_allocated = nblocks;
th->t_trans_id = journal->j_trans_id;
INIT_LIST_HEAD(&th->t_list);
get_fs_excl();
return 0;
-@@ -3103,7 +3127,7 @@ static int do_journal_begin_r(struct rei
+@@ -3103,7 +3127,7 @@
/* Re-set th->t_super, so we can properly keep track of how many
* persistent transactions there are. We need to do this so if this
* call is part of a failed restart_transaction, we can free it later */
return retval;
}
-@@ -3154,7 +3178,7 @@ int reiserfs_end_persistent_transaction(
+@@ -3154,7 +3178,7 @@
}
static int journal_join(struct reiserfs_transaction_handle *th,
{
struct reiserfs_transaction_handle *cur_th = current->journal_info;
-@@ -3163,11 +3187,11 @@ static int journal_join(struct reiserfs_
+@@ -3163,11 +3187,11 @@
*/
th->t_handle_save = cur_th;
BUG_ON(cur_th && cur_th->t_refcount > 1);
{
struct reiserfs_transaction_handle *cur_th = current->journal_info;
-@@ -3176,11 +3200,11 @@ int journal_join_abort(struct reiserfs_t
+@@ -3176,11 +3200,11 @@
*/
th->t_handle_save = cur_th;
BUG_ON(cur_th && cur_th->t_refcount > 1);
{
struct reiserfs_transaction_handle *cur_th = current->journal_info;
int ret;
-@@ -3188,28 +3212,29 @@ int journal_begin(struct reiserfs_transa
+@@ -3188,28 +3212,29 @@
th->t_handle_save = NULL;
if (cur_th) {
/* we are nesting into the current transaction */
BUG_ON(current->journal_info != th);
/* I guess this boils down to being the reciprocal of clm-2100 above.
-@@ -3229,32 +3254,32 @@ int journal_begin(struct reiserfs_transa
+@@ -3229,32 +3254,32 @@
**
** if it was dirty, cleans and files onto the clean list. I can't let it be dirty again until the
** transaction is committed.
*/
int journal_mark_dirty(struct reiserfs_transaction_handle *th,
- struct super_block *p_s_sb, struct buffer_head *bh)
-+ struct super_block *sb, struct buffer_head *bh)
- {
+-{
- struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++ struct super_block *sb, struct buffer_head *bh)
++{
+ struct reiserfs_journal *journal = SB_JOURNAL(sb);
struct reiserfs_journal_cnode *cn = NULL;
int count_already_incd = 0;
return 0;
}
-@@ -3263,7 +3288,8 @@ int journal_mark_dirty(struct reiserfs_t
+@@ -3263,7 +3288,8 @@
** could get to disk too early. NOT GOOD.
*/
if (!prepared || buffer_dirty(bh)) {
"%cPREPARED %cLOCKED %cDIRTY %cJDIRTY_WAIT",
(unsigned long long)bh->b_blocknr,
prepared ? ' ' : '!',
-@@ -3273,23 +3299,23 @@ int journal_mark_dirty(struct reiserfs_t
+@@ -3273,23 +3299,23 @@
}
if (atomic_read(&(journal->j_wcount)) <= 0) {
clear_buffer_journal_dirty(bh);
}
-@@ -3301,9 +3327,9 @@ int journal_mark_dirty(struct reiserfs_t
+@@ -3301,9 +3327,9 @@
/* now put this guy on the end */
if (!cn) {
}
if (th->t_blocks_logged == th->t_blocks_allocated) {
-@@ -3315,7 +3341,7 @@ int journal_mark_dirty(struct reiserfs_t
+@@ -3315,7 +3341,7 @@
cn->bh = bh;
cn->blocknr = bh->b_blocknr;
cn->jlist = NULL;
insert_journal_hash(journal->j_hash_table, cn);
if (!count_already_incd) {
-@@ -3336,11 +3362,11 @@ int journal_mark_dirty(struct reiserfs_t
+@@ -3336,11 +3362,11 @@
}
int journal_end(struct reiserfs_transaction_handle *th,
if (!th->t_trans_id) {
WARN_ON(1);
-@@ -3363,26 +3389,26 @@ int journal_end(struct reiserfs_transact
+@@ -3363,26 +3389,26 @@
}
return 0;
} else {
- return do_journal_end(th, p_s_sb, nblocks, 0);
-+ return do_journal_end(th, sb, nblocks, 0);
- }
- }
-
+- }
+-}
+-
-/* removes from the current transaction, relsing and descrementing any counters.
++ return do_journal_end(th, sb, nblocks, 0);
++ }
++}
++
+/* removes from the current transaction, relsing and descrementing any counters.
** also files the removed buffer directly onto the clean list
**
struct buffer_head *bh;
struct reiserfs_journal_cnode *cn;
- struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
-+ struct reiserfs_journal *journal = SB_JOURNAL(sb);
- int ret = 0;
-
+- int ret = 0;
+-
- cn = get_journal_hash_dev(p_s_sb, journal->j_hash_table, blocknr);
++ struct reiserfs_journal *journal = SB_JOURNAL(sb);
++ int ret = 0;
++
+ cn = get_journal_hash_dev(sb, journal->j_hash_table, blocknr);
if (!cn || !cn->bh) {
return ret;
}
-@@ -3400,7 +3426,7 @@ static int remove_from_transaction(struc
+@@ -3400,7 +3426,7 @@
journal->j_last = cn->prev;
}
if (bh)
bh->b_blocknr, 0);
clear_buffer_journaled(bh); /* don't log this one */
-@@ -3410,14 +3436,14 @@ static int remove_from_transaction(struc
+@@ -3410,14 +3436,14 @@
clear_buffer_journal_test(bh);
put_bh(bh);
if (atomic_read(&(bh->b_count)) < 0) {
return ret;
}
-@@ -3465,22 +3491,22 @@ static int can_dirty(struct reiserfs_jou
+@@ -3465,22 +3491,22 @@
}
/* syncs the commit blocks, but does not force the real buffers to disk
*/
int journal_end_sync(struct reiserfs_transaction_handle *th,
- struct super_block *p_s_sb, unsigned long nblocks)
-+ struct super_block *sb, unsigned long nblocks)
- {
+-{
- struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++ struct super_block *sb, unsigned long nblocks)
++{
+ struct reiserfs_journal *journal = SB_JOURNAL(sb);
BUG_ON(!th->t_trans_id);
+ reiserfs_prepare_for_journal(sb, SB_BUFFER_WITH_SB(sb),
1);
- journal_mark_dirty(th, p_s_sb, SB_BUFFER_WITH_SB(p_s_sb));
-+ journal_mark_dirty(th, sb, SB_BUFFER_WITH_SB(sb));
- }
+- }
- return do_journal_end(th, p_s_sb, nblocks, COMMIT_NOW | WAIT);
++ journal_mark_dirty(th, sb, SB_BUFFER_WITH_SB(sb));
++ }
+ return do_journal_end(th, sb, nblocks, COMMIT_NOW | WAIT);
}
/*
-@@ -3490,7 +3516,7 @@ static void flush_async_commits(struct w
+@@ -3490,7 +3516,7 @@
{
struct reiserfs_journal *journal =
container_of(work, struct reiserfs_journal, j_work.work);
struct reiserfs_journal_list *jl;
struct list_head *entry;
-@@ -3499,7 +3525,7 @@ static void flush_async_commits(struct w
+@@ -3499,7 +3525,7 @@
/* last entry is the youngest, commit it and you get everything */
entry = journal->j_journal_list.prev;
jl = JOURNAL_LIST_ENTRY(entry);
}
unlock_kernel();
}
-@@ -3508,11 +3534,11 @@ static void flush_async_commits(struct w
+@@ -3508,11 +3534,11 @@
** flushes any old transactions to disk
** ends the current transaction if it is too old
*/
now = get_seconds();
/* safety check so we don't flush while we are replaying the log during
-@@ -3529,35 +3555,35 @@ int reiserfs_flush_old_commits(struct su
+@@ -3529,35 +3555,35 @@
journal->j_trans_start_time > 0 &&
journal->j_len > 0 &&
(now - journal->j_trans_start_time) > journal->j_max_trans_age) {
** an async commit so that kreiserfsd can do it later
*/
- do_journal_end(&th, p_s_sb, 1, COMMIT_NOW | WAIT);
-+ do_journal_end(&th, sb, 1, COMMIT_NOW | WAIT);
- }
- }
+- }
+- }
- return p_s_sb->s_dirt;
++ do_journal_end(&th, sb, 1, COMMIT_NOW | WAIT);
++ }
++ }
+ return sb->s_dirt;
}
int flags)
{
-@@ -3566,13 +3592,13 @@ static int check_journal_end(struct reis
+@@ -3566,13 +3592,13 @@
int commit_now = flags & COMMIT_NOW;
int wait_on_commit = flags & WAIT;
struct reiserfs_journal_list *jl;
th->t_trans_id, journal->j_trans_id);
}
-@@ -3581,7 +3607,7 @@ static int check_journal_end(struct reis
+@@ -3581,7 +3607,7 @@
atomic_dec(&(journal->j_wcount));
}
** will be dealt with by next transaction that actually writes something, but should be taken
** care of in this trans
*/
-@@ -3590,7 +3616,7 @@ static int check_journal_end(struct reis
+@@ -3590,7 +3616,7 @@
/* if wcount > 0, and we are called to with flush or commit_now,
** we wait on j_join_wait. We will wake up when the last writer has
** finished the transaction, and started it on its way to the disk.
** because the rest of journal end was already done for this transaction.
*/
if (atomic_read(&(journal->j_wcount)) > 0) {
-@@ -3605,31 +3631,31 @@ static int check_journal_end(struct reis
+@@ -3605,31 +3631,31 @@
if (flush) {
journal->j_next_full_flush = 1;
}
+ && journal_list_still_alive(sb, trans_id)
&& wait_on_commit) {
- flush_commit_list(p_s_sb, jl, 1);
-+ flush_commit_list(sb, jl, 1);
- }
- return 0;
- }
+- }
+- return 0;
+- }
- unlock_journal(p_s_sb);
++ flush_commit_list(sb, jl, 1);
++ }
++ return 0;
++ }
+ unlock_journal(sb);
return 0;
}
-@@ -3646,13 +3672,13 @@ static int check_journal_end(struct reis
+@@ -3646,13 +3672,13 @@
&& journal->j_len_alloc < journal->j_max_batch
&& journal->j_cnode_free > (journal->j_trans_max * 3)) {
journal->j_bcount++;
- unlock_journal(p_s_sb);
-+ unlock_journal(sb);
- return 0;
- }
-
+- return 0;
+- }
+-
- if (journal->j_start > SB_ONDISK_JOURNAL_SIZE(p_s_sb)) {
- reiserfs_panic(p_s_sb,
- "journal-003: journal_end: j_start (%ld) is too high\n",
++ unlock_journal(sb);
++ return 0;
++ }
++
+ if (journal->j_start > SB_ONDISK_JOURNAL_SIZE(sb)) {
+ reiserfs_panic(sb, "journal-003",
+ "j_start (%ld) is too high",
journal->j_start);
}
return 1;
-@@ -3661,7 +3687,7 @@ static int check_journal_end(struct reis
+@@ -3661,7 +3687,7 @@
/*
** Does all the work that makes deleting blocks safe.
** when deleting a block mark BH_JNew, just remove it from the current transaction, clean it's buffer_head and move on.
** otherwise:
** set a bit for the block in the journal bitmap. That will prevent it from being allocated for unformatted nodes
** before this transaction has finished.
-@@ -3673,16 +3699,16 @@ static int check_journal_end(struct reis
+@@ -3673,16 +3699,16 @@
** Then remove it from the current transaction, decrementing any counters and filing it on the clean list.
*/
int journal_mark_freed(struct reiserfs_transaction_handle *th,
- struct super_block *p_s_sb, b_blocknr_t blocknr)
-+ struct super_block *sb, b_blocknr_t blocknr)
- {
+-{
- struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++ struct super_block *sb, b_blocknr_t blocknr)
++{
+ struct reiserfs_journal *journal = SB_JOURNAL(sb);
struct reiserfs_journal_cnode *cn = NULL;
struct buffer_head *bh = NULL;
if (cn && cn->bh) {
bh = cn->bh;
get_bh(bh);
-@@ -3692,15 +3718,15 @@ int journal_mark_freed(struct reiserfs_t
+@@ -3692,15 +3718,15 @@
clear_buffer_journal_new(bh);
clear_prepared_bits(bh);
reiserfs_clean_and_file_buffer(bh);
if (!jb) {
- reiserfs_panic(p_s_sb,
- "journal-1702: journal_mark_freed, journal_list_bitmap is NULL\n");
+- }
+- set_bit_in_list_bitmap(p_s_sb, blocknr, jb);
+ reiserfs_panic(sb, "journal-1702",
+ "journal_list_bitmap is NULL");
- }
-- set_bit_in_list_bitmap(p_s_sb, blocknr, jb);
++ }
+ set_bit_in_list_bitmap(sb, blocknr, jb);
/* Note, the entire while loop is not allowed to schedule. */
-@@ -3708,13 +3734,13 @@ int journal_mark_freed(struct reiserfs_t
+@@ -3708,13 +3734,13 @@
clear_prepared_bits(bh);
reiserfs_clean_and_file_buffer(bh);
}
set_bit(BLOCK_FREED, &cn->state);
if (cn->bh) {
if (!cleaned) {
-@@ -3730,8 +3756,9 @@ int journal_mark_freed(struct reiserfs_t
+@@ -3730,8 +3756,9 @@
put_bh(cn->bh);
if (atomic_read
(&(cn->bh->b_count)) < 0) {
}
}
if (cn->jlist) { /* since we are clearing the bh, we MUST dec nonzerolen */
-@@ -3821,7 +3848,7 @@ static int __commit_trans_jl(struct inod
+@@ -3821,7 +3848,7 @@
int reiserfs_commit_for_inode(struct inode *inode)
{
struct reiserfs_journal_list *jl = REISERFS_I(inode)->i_jl;
/* for the whole inode, assume unset id means it was
-@@ -3836,18 +3863,18 @@ int reiserfs_commit_for_inode(struct ino
+@@ -3836,18 +3863,18 @@
return __commit_trans_jl(inode, id, jl);
}
journal->j_list_hash_table,
bh->b_blocknr);
if (cn && can_dirty(cn)) {
-@@ -3864,12 +3891,12 @@ extern struct tree_balance *cur_tb;
+@@ -3864,12 +3891,12 @@
** be written to disk while we are altering it. So, we must:
** clean it
** wait on it.
-**
-+**
- */
+-*/
-int reiserfs_prepare_for_journal(struct super_block *p_s_sb,
++**
++*/
+int reiserfs_prepare_for_journal(struct super_block *sb,
struct buffer_head *bh, int wait)
{
if (!trylock_buffer(bh)) {
if (!wait)
-@@ -3906,7 +3933,7 @@ static void flush_old_journal_lists(stru
+@@ -3906,7 +3933,7 @@
}
}
** long and ugly. If flush, will not return until all commit
** blocks and all real buffers in the trans are on disk.
** If no_async, won't return until all commit blocks are on disk.
-@@ -3917,10 +3944,10 @@ static void flush_old_journal_lists(stru
+@@ -3917,10 +3944,10 @@
** journal lists, etc just won't happen.
*/
static int do_journal_end(struct reiserfs_transaction_handle *th,
struct reiserfs_journal_cnode *cn, *next, *jl_cn;
struct reiserfs_journal_cnode *last_cn = NULL;
struct reiserfs_journal_desc *desc;
-@@ -3935,7 +3962,7 @@ static int do_journal_end(struct reiserf
+@@ -3935,7 +3962,7 @@
struct reiserfs_journal_list *jl, *temp_jl;
struct list_head *entry, *safe;
unsigned long jindex;
int trans_half;
BUG_ON(th->t_refcount > 1);
-@@ -3943,21 +3970,21 @@ static int do_journal_end(struct reiserf
+@@ -3943,21 +3970,21 @@
/* protect flush_older_commits from doing mistakes if the
transaction ID counter gets overflowed. */
+ reiserfs_prepare_for_journal(sb, SB_BUFFER_WITH_SB(sb),
1);
- journal_mark_dirty(th, p_s_sb, SB_BUFFER_WITH_SB(p_s_sb));
-+ journal_mark_dirty(th, sb, SB_BUFFER_WITH_SB(sb));
- }
-
+- }
+-
- lock_journal(p_s_sb);
++ journal_mark_dirty(th, sb, SB_BUFFER_WITH_SB(sb));
++ }
++
+ lock_journal(sb);
if (journal->j_next_full_flush) {
flags |= FLUSH_ALL;
flush = 1;
-@@ -3967,13 +3994,13 @@ static int do_journal_end(struct reiserf
+@@ -3967,13 +3994,13 @@
wait_on_commit = 1;
}
goto out;
}
-@@ -4002,8 +4029,8 @@ static int do_journal_end(struct reiserf
+@@ -4002,8 +4029,8 @@
/* setup description block */
d_bh =
journal->j_start);
set_buffer_uptodate(d_bh);
desc = (struct reiserfs_journal_desc *)(d_bh)->b_data;
-@@ -4012,9 +4039,9 @@ static int do_journal_end(struct reiserf
+@@ -4012,9 +4039,9 @@
set_desc_trans_id(desc, journal->j_trans_id);
/* setup commit block. Don't write (keep it clean too) this one until after everyone else is written */
commit = (struct reiserfs_journal_commit *)c_bh->b_data;
memset(c_bh->b_data, 0, c_bh->b_size);
set_commit_trans_id(commit, journal->j_trans_id);
-@@ -4047,13 +4074,13 @@ static int do_journal_end(struct reiserf
+@@ -4047,13 +4074,13 @@
** for each real block, add it to the journal list hash,
** copy into real block index array in the commit or desc block
*/
}
if (i == 0) {
jl->j_realblock = jl_cn;
-@@ -4064,18 +4091,19 @@ static int do_journal_end(struct reiserf
+@@ -4064,18 +4091,19 @@
last_cn->next = jl_cn;
}
last_cn = jl_cn;
jl_cn->bh = cn->bh;
jl_cn->jlist = jl;
insert_journal_hash(journal->j_list_hash_table, jl_cn);
-@@ -4116,11 +4144,11 @@ static int do_journal_end(struct reiserf
+@@ -4116,11 +4144,11 @@
char *addr;
struct page *page;
tmp_bh =
set_buffer_uptodate(tmp_bh);
page = cn->bh->b_page;
addr = kmap(page);
-@@ -4134,12 +4162,13 @@ static int do_journal_end(struct reiserf
+@@ -4134,12 +4162,13 @@
clear_buffer_journaled(cn->bh);
} else {
/* JDirty cleared sometime during transaction. don't log this one */
cn = next;
cond_resched();
}
-@@ -4149,7 +4178,9 @@ static int do_journal_end(struct reiserf
+@@ -4149,7 +4178,9 @@
** so we dirty/relse c_bh in flush_commit_list, with commit_left <= 1.
*/
/* now it is safe to insert this transaction on the main list */
list_add_tail(&jl->j_list, &journal->j_journal_list);
-@@ -4160,7 +4191,7 @@ static int do_journal_end(struct reiserf
+@@ -4160,7 +4191,7 @@
old_start = journal->j_start;
journal->j_start =
(journal->j_start + journal->j_len +
atomic_set(&(journal->j_wcount), 0);
journal->j_bcount = 0;
journal->j_last = NULL;
-@@ -4175,7 +4206,7 @@ static int do_journal_end(struct reiserf
+@@ -4175,7 +4206,7 @@
journal->j_len_alloc = 0;
journal->j_next_full_flush = 0;
journal->j_next_async_flush = 0;
// make sure reiserfs_add_jh sees the new current_jl before we
// write out the tails
-@@ -4204,14 +4235,14 @@ static int do_journal_end(struct reiserf
+@@ -4204,14 +4235,14 @@
** queue don't wait for this proc to flush journal lists and such.
*/
if (flush) {
*/
first_jl:
list_for_each_safe(entry, safe, &journal->j_journal_list) {
-@@ -4219,11 +4250,11 @@ static int do_journal_end(struct reiserf
+@@ -4219,11 +4250,11 @@
if (journal->j_start <= temp_jl->j_start) {
if ((journal->j_start + journal->j_trans_max + 1) >=
temp_jl->j_start) {
/* if we don't cross into the next transaction and we don't
* wrap, there is no way we can overlap any later transactions
* break now
-@@ -4232,11 +4263,11 @@ static int do_journal_end(struct reiserf
+@@ -4232,11 +4263,11 @@
}
} else if ((journal->j_start +
journal->j_trans_max + 1) >
goto first_jl;
} else {
/* we don't overlap anything from out start to the end of the
-@@ -4247,46 +4278,47 @@ static int do_journal_end(struct reiserf
+@@ -4247,46 +4278,47 @@
}
}
}
sb->s_flags |= MS_RDONLY;
set_bit(J_ABORTED, &journal->j_state);
-@@ -4296,19 +4328,3 @@ static void __reiserfs_journal_abort_har
+@@ -4296,19 +4328,3 @@
#endif
}
-{
- __reiserfs_journal_abort_soft(sb, errno);
-}
-diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/lbalance.c
---- linux-2.6.27/fs/reiserfs/lbalance.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/lbalance.c 2009-03-25 16:11:37.000000000 +0000
-@@ -111,7 +111,7 @@ static void leaf_copy_dir_entries(struct
+diff -r 9608d5473017 fs/reiserfs/lbalance.c
+--- a/fs/reiserfs/lbalance.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/lbalance.c Wed May 06 16:56:52 2009 +0100
+@@ -111,7 +111,7 @@
item_num_in_dest =
(last_first == FIRST_TO_LAST) ? (B_NR_ITEMS(dest) - 1) : 0;
(last_first ==
FIRST_TO_LAST) ? I_ENTRY_COUNT(B_N_PITEM_HEAD(dest,
item_num_in_dest))
-@@ -119,8 +119,8 @@ static void leaf_copy_dir_entries(struct
+@@ -119,8 +119,8 @@
DEH_SIZE * copy_count + copy_records_len);
}
(if last_first) or beginning (!last_first) of the DEST */
/* returns 1 if anything was copied, else 0 */
static int leaf_copy_boundary_item(struct buffer_info *dest_bi,
-@@ -168,10 +168,11 @@ static int leaf_copy_boundary_item(struc
+@@ -168,10 +168,11 @@
if (bytes_or_entries == ih_item_len(ih)
&& is_indirect_le_ih(ih))
if (get_ih_free_space(ih))
}
#endif
-@@ -395,7 +396,7 @@ static void leaf_item_bottle(struct buff
+@@ -395,7 +396,7 @@
else {
struct item_head n_ih;
part defined by 'cpy_bytes'; create new item header; change old item_header (????);
n_ih = new item_header;
*/
-@@ -425,7 +426,7 @@ static void leaf_item_bottle(struct buff
+@@ -425,7 +426,7 @@
else {
struct item_head n_ih;
part defined by 'cpy_bytes'; create new item header;
n_ih = new item_header;
*/
-@@ -622,9 +623,8 @@ static void leaf_define_dest_src_infos(i
+@@ -622,9 +623,8 @@
break;
default:
}
RFALSE(!src_bi->bi_bh || !dest_bi->bi_bh,
"vs-10260: mode==%d, source (%p) or dest (%p) buffer is initialized incorrectly",
-@@ -674,9 +674,9 @@ int leaf_shift_left(struct tree_balance
+@@ -674,9 +674,9 @@
#ifdef CONFIG_REISERFS_CHECK
if (tb->tb_mode == M_PASTE || tb->tb_mode == M_INSERT) {
print_cur_tb("vs-10275");
}
#endif
-@@ -724,7 +724,7 @@ int leaf_shift_right(struct tree_balance
+@@ -724,7 +724,7 @@
static void leaf_delete_items_entirely(struct buffer_info *bi,
int first, int del_num);
/* If del_bytes == -1, starting from position 'first' delete del_num items in whole in buffer CUR.
If last_first == 0. Starting from position 'first' delete del_num-1 items in whole. Delete part of body of
the first item. Part defined by del_bytes. Don't delete first item header
If last_first == 1. Starting from position 'first+1' delete del_num-1 items in whole. Delete part of body of
-@@ -783,7 +783,7 @@ void leaf_delete_items(struct buffer_inf
+@@ -783,7 +783,7 @@
/* len = body len of item */
len = ih_item_len(ih);
do not delete item header
*/
leaf_cut_from_buffer(cur_bi, B_NR_ITEMS(bh) - 1,
-@@ -865,7 +865,7 @@ void leaf_insert_into_buf(struct buffer_
+@@ -865,7 +865,7 @@
}
}
When item is a directory, this only prepare space for new entries */
void leaf_paste_in_buffer(struct buffer_info *bi, int affected_item_num,
int pos_in_item, int paste_size,
-@@ -889,9 +889,12 @@ void leaf_paste_in_buffer(struct buffer_
+@@ -889,9 +889,12 @@
#ifdef CONFIG_REISERFS_CHECK
if (zeros_number > paste_size) {
zeros_number, paste_size);
}
#endif /* CONFIG_REISERFS_CHECK */
-@@ -1019,7 +1022,7 @@ static int leaf_cut_entries(struct buffe
+@@ -1019,7 +1022,7 @@
/* when cut item is part of regular file
pos_in_item - first byte that must be cut
cut_size - number of bytes to be cut beginning from pos_in_item
when cut item is part of directory
pos_in_item - number of first deleted entry
cut_size - count of deleted entries
-@@ -1191,7 +1194,7 @@ static void leaf_delete_items_entirely(s
+@@ -1191,7 +1194,7 @@
}
/* paste new_entry_count entries (new_dehs, records) into position before to item_num-th item */
int item_num,
int before,
int new_entry_count,
-@@ -1203,6 +1206,7 @@ void leaf_paste_entries(struct buffer_he
+@@ -1203,6 +1206,7 @@
struct reiserfs_de_head *deh;
char *insert_point;
int i, old_entry_num;
if (new_entry_count == 0)
return;
-@@ -1271,7 +1275,7 @@ void leaf_paste_entries(struct buffer_he
+@@ -1271,7 +1275,7 @@
/* change item key if necessary (when we paste before 0-th entry */
if (!before) {
set_le_ih_k_offset(ih, deh_offset(new_dehs));
&new_dehs->deh_offset, SHORT_KEY_SIZE);*/
}
#ifdef CONFIG_REISERFS_CHECK
-@@ -1287,13 +1291,17 @@ void leaf_paste_entries(struct buffer_he
+@@ -1287,13 +1291,17 @@
prev = (i != 0) ? deh_location(&(deh[i - 1])) : 0;
if (prev && prev <= deh_location(&(deh[i])))
}
}
#endif
-diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/namei.c
---- linux-2.6.27/fs/reiserfs/namei.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/namei.c 2009-03-25 16:11:37.000000000 +0000
-@@ -106,7 +106,7 @@ key of the first directory entry in it.
+diff -r 9608d5473017 fs/reiserfs/namei.c
+--- a/fs/reiserfs/namei.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/namei.c Wed May 06 16:56:52 2009 +0100
+@@ -106,7 +106,7 @@
This function first calls search_by_key, then, if item whose first
entry matches is not found it looks for the entry inside directory
item found by search_by_key. Fills the path to the entry, and to the
*/
-@@ -120,8 +120,8 @@ int search_by_entry_key(struct super_blo
+@@ -120,8 +120,8 @@
switch (retval) {
case ITEM_NOT_FOUND:
if (!PATH_LAST_POSITION(path)) {
pathrelse(path);
return IO_ERROR;
}
-@@ -135,8 +135,7 @@ int search_by_entry_key(struct super_blo
+@@ -135,8 +135,7 @@
default:
pathrelse(path);
return IO_ERROR;
}
-@@ -146,10 +145,9 @@ int search_by_entry_key(struct super_blo
+@@ -146,10 +145,9 @@
if (!is_direntry_le_ih(de->de_ih) ||
COMP_SHORT_KEYS(&(de->de_ih->ih_key), key)) {
print_block(de->de_bh, 0, -1, -1);
}
#endif /* CONFIG_REISERFS_CHECK */
-@@ -300,8 +298,7 @@ static int reiserfs_find_entry(struct in
+@@ -300,8 +298,7 @@
search_by_entry_key(dir->i_sb, &key_to_search,
path_to_entry, de);
if (retval == IO_ERROR) {
return IO_ERROR;
}
-@@ -361,9 +358,10 @@ static struct dentry *reiserfs_lookup(st
+@@ -361,9 +358,10 @@
return ERR_PTR(-EACCES);
}
}
reiserfs_write_unlock(dir->i_sb);
if (retval == IO_ERROR) {
-@@ -373,7 +371,7 @@ static struct dentry *reiserfs_lookup(st
+@@ -373,7 +371,7 @@
return d_splice_alias(inode, dentry);
}
** looks up the dentry of the parent directory for child.
** taken from ext2_get_parent
*/
-@@ -412,7 +410,7 @@ struct dentry *reiserfs_get_parent(struc
+@@ -412,7 +410,7 @@
return parent;
}
insert definition of when hidden directories are used here -Hans
-@@ -493,10 +491,9 @@ static int reiserfs_add_entry(struct rei
+@@ -493,10 +491,9 @@
}
if (retval != NAME_FOUND) {
}
return -EEXIST;
-@@ -507,8 +504,9 @@ static int reiserfs_add_entry(struct rei
+@@ -507,8 +504,9 @@
MAX_GENERATION_NUMBER + 1);
if (gen_number > MAX_GENERATION_NUMBER) {
/* there is no free generation number */
if (buffer != small_buf)
kfree(buffer);
pathrelse(&path);
-@@ -524,10 +522,9 @@ static int reiserfs_add_entry(struct rei
+@@ -524,10 +522,9 @@
if (gen_number != 0) { /* we need to re-search for the insertion point */
if (search_by_entry_key(dir->i_sb, &entry_key, &path, &de) !=
NAME_NOT_FOUND) {
if (buffer != small_buf)
kfree(buffer);
-@@ -571,7 +568,7 @@ static int drop_new_inode(struct inode *
+@@ -571,7 +568,7 @@
return 0;
}
** DQUOT_INIT needs lots of credits so it's better to have it
** outside of a transaction, so we had to pull some bits of
** reiserfs_new_inode out into this func.
-@@ -610,20 +607,22 @@ static int reiserfs_create(struct inode
+@@ -610,19 +607,21 @@
2 * (REISERFS_QUOTA_INIT_BLOCKS(dir->i_sb) +
REISERFS_QUOTA_TRANS_BLOCKS(dir->i_sb));
struct reiserfs_transaction_handle th;
+ }
+ jbegin_count += retval;
reiserfs_write_lock(dir->i_sb);
-
+-
- if (locked)
- reiserfs_write_lock_xattrs(dir->i_sb);
--
+
retval = journal_begin(&th, dir->i_sb, jbegin_count);
if (retval) {
- drop_new_inode(inode);
-@@ -632,15 +631,10 @@ static int reiserfs_create(struct inode
+@@ -632,14 +631,9 @@
retval =
reiserfs_new_inode(&th, dir, mode, NULL, 0 /*i_size */ , dentry,
+ inode, &security);
if (retval)
goto out_failed;
-
+-
- if (locked) {
- reiserfs_write_unlock_xattrs(dir->i_sb);
- locked = 0;
- }
--
+
inode->i_op = &reiserfs_file_inode_operations;
inode->i_fop = &reiserfs_file_operations;
- inode->i_mapping->a_ops = &reiserfs_address_space_operations;
-@@ -665,8 +659,6 @@ static int reiserfs_create(struct inode
+@@ -665,8 +659,6 @@
retval = journal_end(&th, dir->i_sb, jbegin_count);
out_failed:
reiserfs_write_unlock(dir->i_sb);
return retval;
}
-@@ -677,12 +669,12 @@ static int reiserfs_mknod(struct inode *
+@@ -677,12 +669,12 @@
int retval;
struct inode *inode;
struct reiserfs_transaction_handle th;
if (!new_valid_dev(rdev))
return -EINVAL;
-@@ -692,13 +684,15 @@ static int reiserfs_mknod(struct inode *
+@@ -692,12 +684,14 @@
}
new_inode_init(inode, dir, mode);
+ }
+ jbegin_count += retval;
reiserfs_write_lock(dir->i_sb);
-
+-
- if (locked)
- reiserfs_write_lock_xattrs(dir->i_sb);
--
+
retval = journal_begin(&th, dir->i_sb, jbegin_count);
if (retval) {
- drop_new_inode(inode);
-@@ -707,16 +701,11 @@ static int reiserfs_mknod(struct inode *
+@@ -707,14 +701,9 @@
retval =
reiserfs_new_inode(&th, dir, mode, NULL, 0 /*i_size */ , dentry,
+ inode, &security);
if (retval) {
goto out_failed;
- }
-
+- }
+-
- if (locked) {
- reiserfs_write_unlock_xattrs(dir->i_sb);
- locked = 0;
-- }
--
- inode->i_op = &reiserfs_special_inode_operations;
- init_special_inode(inode, inode->i_mode, rdev);
+ }
-@@ -744,8 +733,6 @@ static int reiserfs_mknod(struct inode *
+ inode->i_op = &reiserfs_special_inode_operations;
+@@ -744,8 +733,6 @@
retval = journal_end(&th, dir->i_sb, jbegin_count);
out_failed:
reiserfs_write_unlock(dir->i_sb);
return retval;
}
-@@ -755,12 +742,12 @@ static int reiserfs_mkdir(struct inode *
+@@ -755,12 +742,12 @@
int retval;
struct inode *inode;
struct reiserfs_transaction_handle th;
#ifdef DISPLACE_NEW_PACKING_LOCALITIES
/* set flag that new packing locality created and new blocks for the content * of that directory are not displaced yet */
-@@ -772,11 +759,14 @@ static int reiserfs_mkdir(struct inode *
+@@ -772,11 +759,14 @@
}
new_inode_init(inode, dir, mode);
retval = journal_begin(&th, dir->i_sb, jbegin_count);
if (retval) {
-@@ -792,17 +782,12 @@ static int reiserfs_mkdir(struct inode *
+@@ -792,15 +782,10 @@
retval = reiserfs_new_inode(&th, dir, mode, NULL /*symlink */ ,
old_format_only(dir->i_sb) ?
EMPTY_DIR_SIZE_V1 : EMPTY_DIR_SIZE,
if (retval) {
dir->i_nlink--;
goto out_failed;
- }
-
+- }
+-
- if (locked) {
- reiserfs_write_unlock_xattrs(dir->i_sb);
- locked = 0;
-- }
--
- reiserfs_update_inode_transaction(inode);
- reiserfs_update_inode_transaction(dir);
+ }
-@@ -830,8 +815,6 @@ static int reiserfs_mkdir(struct inode *
+ reiserfs_update_inode_transaction(inode);
+@@ -830,8 +815,6 @@
d_instantiate(dentry, inode);
retval = journal_end(&th, dir->i_sb, jbegin_count);
out_failed:
reiserfs_write_unlock(dir->i_sb);
return retval;
}
-@@ -840,7 +823,7 @@ static inline int reiserfs_empty_dir(str
+@@ -840,7 +823,7 @@
{
/* we can cheat because an old format dir cannot have
** EMPTY_DIR_SIZE, and a new format dir cannot have
** regardless of disk format version, the directory is empty.
*/
if (inode->i_size != EMPTY_DIR_SIZE &&
-@@ -906,8 +889,9 @@ static int reiserfs_rmdir(struct inode *
+@@ -906,8 +889,9 @@
goto end_rmdir;
if (inode->i_nlink != 2 && inode->i_nlink != 1)
clear_nlink(inode);
inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
-@@ -983,10 +967,9 @@ static int reiserfs_unlink(struct inode
+@@ -983,10 +967,9 @@
}
if (!inode->i_nlink) {
inode->i_nlink = 1;
}
-@@ -1040,6 +1023,7 @@ static int reiserfs_symlink(struct inode
+@@ -1040,6 +1023,7 @@
char *name;
int item_len;
struct reiserfs_transaction_handle th;
int mode = S_IFLNK | S_IRWXUGO;
/* We need blocks for transaction + (user+group)*(quotas for new inode + update of quota for directory owner) */
int jbegin_count =
-@@ -1052,6 +1036,13 @@ static int reiserfs_symlink(struct inode
+@@ -1051,6 +1035,13 @@
+ return -ENOMEM;
}
new_inode_init(inode, parent_dir, mode);
-
++
+ retval = reiserfs_security_init(parent_dir, inode, &security);
+ if (retval < 0) {
+ drop_new_inode(inode);
+ return retval;
+ }
+ jbegin_count += retval;
-+
+
reiserfs_write_lock(parent_dir->i_sb);
item_len = ROUND_UP(strlen(symname));
- if (item_len > MAX_DIRECT_ITEM_LEN(parent_dir->i_sb->s_blocksize)) {
-@@ -1069,8 +1060,6 @@ static int reiserfs_symlink(struct inode
+@@ -1069,8 +1060,6 @@
memcpy(name, symname, strlen(symname));
padd_item(name, item_len, strlen(symname));
retval = journal_begin(&th, parent_dir->i_sb, jbegin_count);
if (retval) {
drop_new_inode(inode);
-@@ -1080,7 +1069,7 @@ static int reiserfs_symlink(struct inode
+@@ -1080,7 +1069,7 @@
retval =
reiserfs_new_inode(&th, parent_dir, mode, name, strlen(symname),
kfree(name);
if (retval) { /* reiserfs_new_inode iputs for us */
goto out_failed;
-@@ -1174,7 +1163,7 @@ static int reiserfs_link(struct dentry *
+@@ -1174,7 +1163,7 @@
return retval;
}
static int de_still_valid(const char *name, int len,
struct reiserfs_dir_entry *de)
{
-@@ -1197,15 +1186,14 @@ static int entry_points_to_object(const
+@@ -1197,15 +1186,14 @@
if (inode) {
if (!de_visible(de->de_deh + de->de_entry_num))
return 1;
}
-@@ -1219,10 +1207,10 @@ static void set_ino_in_dir_entry(struct
+@@ -1219,10 +1207,10 @@
de->de_deh[de->de_entry_num].deh_objectid = key->k_objectid;
}
*/
static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
-@@ -1276,7 +1264,7 @@ static int reiserfs_rename(struct inode
+@@ -1276,7 +1264,7 @@
old_inode_mode = old_inode->i_mode;
if (S_ISDIR(old_inode_mode)) {
// and that its new parent directory has not too many links
// already
-@@ -1287,8 +1275,8 @@ static int reiserfs_rename(struct inode
+@@ -1287,8 +1275,8 @@
}
}
*/
dot_dot_de.de_gen_number_bit_string = NULL;
retval =
-@@ -1319,8 +1307,8 @@ static int reiserfs_rename(struct inode
+@@ -1319,8 +1307,8 @@
new_dentry->d_name.len, old_inode, 0);
if (retval == -EEXIST) {
if (!new_dentry_inode) {
}
} else if (retval) {
int err = journal_end(&th, old_dir->i_sb, jbegin_count);
-@@ -1398,9 +1386,9 @@ static int reiserfs_rename(struct inode
+@@ -1398,9 +1386,9 @@
this stuff, yes? Then, having
gathered everything into RAM we
should lock the buffers, yes? -Hans */
** issues -chris
*/
/* sanity checking before doing the rename - avoid races many
-@@ -1478,7 +1466,7 @@ static int reiserfs_rename(struct inode
+@@ -1478,7 +1466,7 @@
}
if (S_ISDIR(old_inode_mode)) {
set_ino_in_dir_entry(&dot_dot_de, INODE_PKEY(new_dir));
journal_mark_dirty(&th, new_dir->i_sb, dot_dot_de.de_bh);
-@@ -1500,8 +1488,8 @@ static int reiserfs_rename(struct inode
+@@ -1500,8 +1488,8 @@
if (reiserfs_cut_from_item
(&th, &old_entry_path, &(old_de.de_entry_key), old_dir, NULL,
0) < 0)
old_dir->i_size -= DEH_SIZE + old_de.de_entrylen;
-diff -purN linux-2.6.27/fs/reiserfs/objectid.c linux-2.6.27.19-5.1/fs/reiserfs/objectid.c
---- linux-2.6.27/fs/reiserfs/objectid.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/objectid.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/objectid.c
+--- a/fs/reiserfs/objectid.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/objectid.c Wed May 06 16:56:52 2009 +0100
@@ -18,8 +18,7 @@
static void check_objectid_map(struct super_block *s, __le32 * map)
{
(long unsigned int)le32_to_cpu(map[0]));
// FIXME: add something else here
-@@ -61,7 +60,7 @@ __u32 reiserfs_get_unused_objectid(struc
+@@ -61,7 +60,7 @@
/* comment needed -Hans */
unused_objectid = le32_to_cpu(map[1]);
if (unused_objectid == U32_MAX) {
reiserfs_restore_prepared_buffer(s, SB_BUFFER_WITH_SB(s));
return 0;
}
-@@ -160,9 +159,8 @@ void reiserfs_release_objectid(struct re
+@@ -160,9 +159,8 @@
i += 2;
}
}
int reiserfs_convert_objectid_map_v1(struct super_block *s)
-@@ -182,7 +180,7 @@ int reiserfs_convert_objectid_map_v1(str
+@@ -182,7 +180,7 @@
if (cur_size > new_size) {
/* mark everyone used that was listed as free at the end of the objectid
*/
objectid_map[new_size - 1] = objectid_map[cur_size - 1];
set_sb_oid_cursize(disk_sb, new_size);
-diff -purN linux-2.6.27/fs/reiserfs/prints.c linux-2.6.27.19-5.1/fs/reiserfs/prints.c
---- linux-2.6.27/fs/reiserfs/prints.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/prints.c 2009-03-25 16:11:37.000000000 +0000
-@@ -157,19 +157,31 @@ static void sprintf_disk_child(char *buf
+diff -r 9608d5473017 fs/reiserfs/prints.c
+--- a/fs/reiserfs/prints.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/prints.c Wed May 06 16:56:52 2009 +0100
+@@ -157,19 +157,31 @@
dc_size(dc));
}
-static char *is_there_reiserfs_struct(char *fmt, int *what, int *skip)
+static void sprintf_journal_list(char *buf, struct reiserfs_journal_list *jl)
- {
-- char *k = fmt;
++{
+ sprintf(buf, "[j_start=%lu, j_state=%lu, j_len=%lu, j_nonzerolen=%d, "
+ "j_commit_left=%u, j_older_commits_done=%u, j_trans_id=%u, "
+ "j_timestamp=%ld, j_refcount=%d (%08x%08x%08x%08x%08x%08x)]",
+ jl->j_magic1, jl->j_magic2, jl->j_magic3, jl->j_magic4,
+ jl->j_magic5, jl->j_magic6);
+}
-
-- *skip = 0;
++
+static char *is_there_reiserfs_struct(char *fmt, int *what)
-+{
-+ char *k = fmt;
+ {
+ char *k = fmt;
+- *skip = 0;
+-
while ((k = strchr(k, '%')) != NULL) {
if (k[1] == 'k' || k[1] == 'K' || k[1] == 'h' || k[1] == 't' ||
- k[1] == 'z' || k[1] == 'b' || k[1] == 'y' || k[1] == 'a') {
k++;
}
return k;
-@@ -181,30 +193,29 @@ static char *is_there_reiserfs_struct(ch
+@@ -181,29 +193,28 @@
appropriative printk. With this reiserfs_warning you can use format
specification for complex structures like you used to do with
printfs for integers, doubles and pointers. For instance, to print
*k = 0;
p += vsprintf(p, fmt1, args);
-
+-
- for (i = 0; i < skip; i++)
- j = va_arg(args, int);
--
+
switch (what) {
case 'k':
- sprintf_le_key(p, va_arg(args, struct reiserfs_key *));
-@@ -237,21 +248,27 @@ static void prepare_error_buf(const char
+@@ -237,21 +248,27 @@
va_arg(args,
struct reiserfs_de_head *));
break;
%z to print block head (arg must be struct buffer_head *
%b to print buffer_head
*/
-@@ -264,14 +281,17 @@ static void prepare_error_buf(const char
+@@ -264,14 +281,17 @@
va_end( args );\
}
}
/* No newline.. reiserfs_info calls can be followed by printk's */
-@@ -279,10 +299,10 @@ void reiserfs_info(struct super_block *s
+@@ -279,10 +299,10 @@
{
do_reiserfs_warning(fmt);
if (sb)
}
/* No newline.. reiserfs_printk calls can be followed by printk's */
-@@ -297,10 +317,10 @@ void reiserfs_debug(struct super_block *
+@@ -297,10 +317,10 @@
#ifdef CONFIG_REISERFS_CHECK
do_reiserfs_warning(fmt);
if (s)
#endif
}
-@@ -314,17 +334,17 @@ void reiserfs_debug(struct super_block *
+@@ -314,17 +334,17 @@
maintainer-errorid. Don't bother with reusing errorids, there are
lots of numbers out there.
Numbering scheme for panic used by Vladimir and Anatoly( Hans completely ignores this scheme, and considers it
pointless complexity):
-@@ -353,14 +373,46 @@ void reiserfs_debug(struct super_block *
+@@ -353,14 +373,46 @@
extern struct tree_balance *cur_tb;
#endif
}
void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...)
-@@ -368,18 +420,18 @@ void reiserfs_abort(struct super_block *
+@@ -368,18 +420,18 @@
do_reiserfs_warning(fmt);
if (reiserfs_error_panic(sb)) {
}
/* this prints internal nodes (4 keys/items in line) (dc_number,
-@@ -681,12 +733,10 @@ static void check_leaf_block_head(struct
+@@ -681,12 +733,10 @@
blkh = B_BLK_HEAD(bh);
nr = blkh_nr_item(blkh);
if (nr > (bh->b_size - BLKH_SIZE) / IH_SIZE)
bh);
}
-@@ -697,21 +747,15 @@ static void check_internal_block_head(st
+@@ -697,21 +747,15 @@
blkh = B_BLK_HEAD(bh);
if (!(B_LEVEL(bh) > DISK_LEAF_NODE_LEVEL && B_LEVEL(bh) <= MAX_HEIGHT))
}
-diff -purN linux-2.6.27/fs/reiserfs/procfs.c linux-2.6.27.19-5.1/fs/reiserfs/procfs.c
---- linux-2.6.27/fs/reiserfs/procfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/procfs.c 2009-03-25 16:11:37.000000000 +0000
-@@ -323,7 +323,7 @@ static int show_journal(struct seq_file
+diff -r 9608d5473017 fs/reiserfs/procfs.c
+--- a/fs/reiserfs/procfs.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/procfs.c Wed May 06 16:56:52 2009 +0100
+@@ -323,7 +323,7 @@
/* incore fields */
"j_1st_reserved_block: \t%i\n"
"j_state: \t%li\n"
"j_mount_id: \t%lu\n"
"j_start: \t%lu\n"
"j_len: \t%lu\n"
-@@ -331,7 +331,7 @@ static int show_journal(struct seq_file
+@@ -331,7 +331,7 @@
"j_wcount: \t%i\n"
"j_bcount: \t%lu\n"
"j_first_unflushed_offset: \t%lu\n"
"j_trans_start_time: \t%li\n"
"j_list_bitmap_index: \t%i\n"
"j_must_wait: \t%i\n"
-@@ -505,7 +505,7 @@ int reiserfs_proc_info_init(struct super
+@@ -505,7 +505,7 @@
add_file(sb, "journal", show_journal);
return 0;
}
proc_info_root_name, b);
return 1;
}
-@@ -561,8 +561,7 @@ int reiserfs_proc_info_global_init(void)
+@@ -561,8 +561,7 @@
if (proc_info_root) {
proc_info_root->owner = THIS_MODULE;
} else {
proc_info_root_name);
return 1;
}
-@@ -637,7 +636,7 @@ int reiserfs_global_version_in_proc(char
+@@ -637,7 +636,7 @@
*
*/
* Make Linus happy.
* Local variables:
* c-indentation-style: "K&R"
-diff -purN linux-2.6.27/fs/reiserfs/resize.c linux-2.6.27.19-5.1/fs/reiserfs/resize.c
---- linux-2.6.27/fs/reiserfs/resize.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/resize.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/resize.c
+--- a/fs/reiserfs/resize.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/resize.c Wed May 06 16:56:52 2009 +0100
@@ -1,8 +1,8 @@
-/*
+/*
* Written by Alexander Zarochentcev.
*
* The kernel part of the (on-line) reiserfs resizer.
-@@ -101,7 +101,7 @@ int reiserfs_resize(struct super_block *
+@@ -101,7 +101,7 @@
memcpy(jbitmap[i].bitmaps, jb->bitmaps, copy_size);
/* just in case vfree schedules on us, copy the new
** old one
*/
node_tmp = jb->bitmaps;
-diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stree.c
---- linux-2.6.27/fs/reiserfs/stree.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/stree.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/stree.c
+--- a/fs/reiserfs/stree.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/stree.c Wed May 06 16:56:52 2009 +0100
@@ -23,7 +23,6 @@
* get_rkey
* key_in_buffer
0 if key1 == key2
1 if key1 > key2 */
inline int comp_short_keys(const struct reiserfs_key *le_key,
-@@ -136,15 +135,15 @@ static inline int comp_keys(const struct
+@@ -136,15 +135,15 @@
inline int comp_short_le_keys(const struct reiserfs_key *key1,
const struct reiserfs_key *key2)
{
return 1;
}
return 0;
-@@ -175,52 +174,51 @@ inline int comp_le_keys(const struct rei
+@@ -175,52 +174,51 @@
* Binary search toolkit function *
* Search for an item in the array by the item key *
* Returns: 1 if found, 0 if not found; *
return ITEM_NOT_FOUND;
}
-@@ -243,90 +241,88 @@ static const struct reiserfs_key MAX_KEY
+@@ -243,90 +241,88 @@
of the path, and going upwards. We must check the path's validity at each step. If the key is not in
the path, there is no delimiting key in the tree (buffer is first or last buffer in tree), and in this
case we return a special key, either MIN_KEY or MAX_KEY. */
return &MAX_KEY;
return &MIN_KEY;
}
-@@ -336,60 +332,29 @@ inline const struct reiserfs_key *get_rk
+@@ -336,58 +332,27 @@
the path. These delimiting keys are stored at least one level above that buffer in the tree. If the
buffer is the first or last node in the tree order then one of the delimiting keys may be absent, and in
this case get_lkey and get_rkey return a special key which is MIN_KEY or MAX_KEY. */
+ /* key must be less than right delimitiing key */
return 0;
return 1;
- }
-
+-}
+-
-inline void decrement_bcount(struct buffer_head *p_s_bh)
-{
- if (p_s_bh) {
- decrement_bcount(bh);
- }
- p_s_search_path->path_length = ILLEGAL_PATH_ELEMENT_OFFSET;
--}
--
+ }
+
int reiserfs_check_path(struct treepath *p)
- {
- RFALSE(p->path_length != ILLEGAL_PATH_ELEMENT_OFFSET,
-@@ -397,40 +362,38 @@ int reiserfs_check_path(struct treepath
+@@ -397,40 +362,38 @@
return 0;
}
}
static int is_leaf(char *buf, int blocksize, struct buffer_head *bh)
-@@ -444,23 +407,24 @@ static int is_leaf(char *buf, int blocks
+@@ -444,23 +407,24 @@
blkh = (struct block_head *)buf;
if (blkh_level(blkh) != DISK_LEAF_NODE_LEVEL) {
return 0;
}
// FIXME: it is_leaf will hit performance too much - we may have
-@@ -471,29 +435,29 @@ static int is_leaf(char *buf, int blocks
+@@ -471,29 +435,29 @@
prev_location = blocksize;
for (i = 0; i < nr; i++, ih++) {
if (le_ih_k_type(ih) == TYPE_ANY) {
return 0;
}
prev_location = ih_location(ih);
-@@ -514,24 +478,23 @@ static int is_internal(char *buf, int bl
+@@ -514,24 +478,23 @@
nr = blkh_level(blkh);
if (nr <= DISK_LEAF_NODE_LEVEL || nr > MAX_HEIGHT) {
/* this level is not possible for internal nodes */
return 0;
}
// one may imagine much more checks
-@@ -543,8 +506,8 @@ static int is_internal(char *buf, int bl
+@@ -543,8 +506,8 @@
static int is_tree_node(struct buffer_head *bh, int level)
{
if (B_LEVEL(bh) != level) {
B_LEVEL(bh), level);
return 0;
}
-@@ -580,10 +543,10 @@ static void search_by_key_reada(struct s
+@@ -580,10 +543,10 @@
/**************************************************************************
* Algorithm SearchByKey *
* look for item in the Disk S+Tree by its key *
**************************************************************************/
/* This function fills up the path from the root to the leaf as it
-@@ -600,22 +563,22 @@ static void search_by_key_reada(struct s
+@@ -600,22 +563,22 @@
correctness of the top of the path but need not be checked for the
correctness of the bottom of the path */
/* The function is NOT SCHEDULE-SAFE! */
int right_neighbor_of_leaf_node;
int fs_gen;
struct buffer_head *reada_bh[SEARCH_BY_KEY_READA];
-@@ -623,80 +586,79 @@ int search_by_key(struct super_block *p_
+@@ -623,80 +586,79 @@
int reada_count = 0;
#ifdef CONFIG_REISERFS_CHECK
expected_level = -1;
right_neighbor_of_leaf_node = 0;
-@@ -704,53 +666,53 @@ int search_by_key(struct super_block *p_
+@@ -704,53 +666,53 @@
continue;
}
/* if item was not found we choose the position which is to
the left of the found item. This requires no code,
-@@ -759,24 +721,24 @@ int search_by_key(struct super_block *p_
+@@ -759,24 +721,24 @@
/* So we have chosen a position in the current node which is
an internal node. Now we calculate child block number by
position in the node. */
pos--;
else
pos++;
-@@ -784,9 +746,9 @@ int search_by_key(struct super_block *p_
+@@ -784,9 +746,9 @@
/*
* check to make sure we're in the same object
*/
break;
}
}
-@@ -795,11 +757,11 @@ int search_by_key(struct super_block *p_
+@@ -795,11 +757,11 @@
}
/* Form the path to an item and position in this item which contains
entry more than the entry with maximal key which is less than the
sought key.
-@@ -810,48 +772,48 @@ int search_by_key(struct super_block *p_
+@@ -810,48 +772,48 @@
units of directory entries. */
/* The function is NOT SCHEDULE-SAFE! */
if (comp_short_keys(&(p_le_ih->ih_key), p_cpu_key)) {
return FILE_NOT_FOUND;
-@@ -863,10 +825,10 @@ int search_for_position_by_key(struct su
+@@ -863,10 +825,10 @@
/* Needed byte is contained in the item pointed to by the path. */
if (item_offset <= offset &&
}
return POSITION_FOUND;
}
-@@ -874,30 +836,30 @@ int search_for_position_by_key(struct su
+@@ -874,30 +836,30 @@
/* Needed byte is not contained in the item pointed to by the
path. Set pos_in_item out of the item. */
if (is_indirect_le_ih(p_le_ih))
return memcmp(stored_ih, ih, IH_SIZE);
}
-@@ -924,9 +886,9 @@ static inline int prepare_for_direct_ite
+@@ -924,9 +886,9 @@
}
// new file gets truncated
if (get_inode_item_key_version(inode) == KEY_FORMAT_3_6) {
if (round_len < le_ih_k_offset(le_ih)) {
*cut_size = -(IH_SIZE + ih_item_len(le_ih));
return M_DELETE; /* Delete this item. */
-@@ -986,96 +948,95 @@ static inline int prepare_for_direntry_i
+@@ -986,96 +948,95 @@
In case of file truncate calculate whether this item must be deleted/truncated or last
unformatted node of this item will be converted to a direct item.
This function returns a determination of what balance mode the calling function should employ. */
result = M_DELETE;
break;
}
-@@ -1083,12 +1044,12 @@ static char prepare_for_delete_or_cut(st
+@@ -1083,12 +1044,12 @@
/* a trick. If the buffer has been logged, this will do nothing. If
** we've broken the loop without logging it, it will restore the
** buffer */
/* Nothing were cut. maybe convert last unformatted node to the
* direct item? */
result = M_CONVERT;
-@@ -1098,45 +1059,45 @@ static char prepare_for_delete_or_cut(st
+@@ -1098,45 +1059,45 @@
}
/* Calculate number of bytes which will be deleted or cut during balance */
}
void padd_item(char *item, int total_length, int length)
-@@ -1175,73 +1136,77 @@ char head2type(struct item_head *ih)
+@@ -1175,73 +1136,77 @@
}
#endif
quota_cut_bytes = ih_item_len(q_ih);
/* hack so the quota code doesn't have to guess if the file
-@@ -1250,15 +1215,15 @@ int reiserfs_delete_item(struct reiserfs
+@@ -1250,15 +1215,15 @@
** split into multiple items, and we only want to decrement for
** the unfm node once
*/
int off;
char *data;
-@@ -1276,31 +1241,31 @@ int reiserfs_delete_item(struct reiserfs
+@@ -1276,31 +1241,31 @@
** The unformatted node must be dirtied later on. We can't be
** sure here if the entire tail has been deleted yet.
**
}
/* Summary Of Mechanisms For Handling Collisions Between Processes:
-@@ -1338,10 +1303,9 @@ void reiserfs_delete_solid_item(struct r
+@@ -1338,10 +1303,9 @@
while (1) {
retval = search_item(th->t_super, &cpu_key, &path);
if (retval == IO_ERROR) {
break;
}
if (retval != ITEM_FOUND) {
-@@ -1355,9 +1319,8 @@ void reiserfs_delete_solid_item(struct r
+@@ -1355,9 +1319,8 @@
GET_GENERATION_NUMBER(le_key_k_offset
(le_key_version(key),
key)) == 1))
break;
}
if (!tb_init) {
-@@ -1389,8 +1352,7 @@ void reiserfs_delete_solid_item(struct r
+@@ -1389,8 +1352,7 @@
break;
}
// IO_ERROR, NO_DISK_SPACE, etc
"could not delete %K due to fix_nodes failure",
&cpu_key);
unfix_nodes(&tb);
-@@ -1462,36 +1424,37 @@ static void unmap_buffers(struct page *p
+@@ -1462,36 +1424,37 @@
}
static int maybe_indirect_to_direct(struct reiserfs_transaction_handle *th,
}
/* we did indirect_to_direct conversion. And we have inserted direct
-@@ -1515,8 +1478,8 @@ static void indirect_to_direct_roll_back
+@@ -1515,8 +1478,8 @@
/* look for the last byte of the tail */
if (search_for_position_by_key(inode->i_sb, &tail_key, path) ==
POSITION_NOT_FOUND)
RFALSE(path->pos_in_item !=
ih_item_len(PATH_PITEM_HEAD(path)) - 1,
"vs-5616: appended bytes found");
-@@ -1533,38 +1496,39 @@ static void indirect_to_direct_roll_back
+@@ -1533,38 +1496,39 @@
set_cpu_key_k_offset(&tail_key,
cpu_key_k_offset(&tail_key) - removed);
}
/* Repeat this loop until we either cut the item without needing
to balance, or we fix_nodes without schedule occurring */
-@@ -1574,144 +1538,142 @@ int reiserfs_cut_from_item(struct reiser
+@@ -1574,144 +1538,142 @@
free unformatted nodes which are pointed to by the cut
pointers. */
le_ih, s_cut_balance.insert_size[0]);
}
/* it would be useful to make sure, that right neighboring
-@@ -1719,23 +1681,23 @@ int reiserfs_cut_from_item(struct reiser
+@@ -1719,23 +1681,23 @@
}
#endif
}
static void truncate_directory(struct reiserfs_transaction_handle *th,
-@@ -1743,8 +1705,7 @@ static void truncate_directory(struct re
+@@ -1743,8 +1705,7 @@
{
BUG_ON(!th->t_trans_id);
if (inode->i_nlink)
set_le_key_k_offset(KEY_FORMAT_3_5, INODE_PKEY(inode), DOT_OFFSET);
set_le_key_k_type(KEY_FORMAT_3_5, INODE_PKEY(inode), TYPE_DIRENTRY);
-@@ -1756,8 +1717,8 @@ static void truncate_directory(struct re
+@@ -1756,8 +1717,8 @@
/* Truncate file to the new size. Note, this must be called with a transaction
already started */
struct page *page, /* up to date for last block */
int update_timestamps /* when it is called by
file_release to convert
-@@ -1768,47 +1729,45 @@ int reiserfs_do_truncate(struct reiserfs
+@@ -1768,47 +1729,45 @@
INITIALIZE_PATH(s_search_path); /* Path to the current object item. */
struct item_head *p_le_ih; /* Pointer to an item header. */
struct cpu_key s_item_key; /* Key to search for a previous file item. */
err = -EIO;
goto out;
-@@ -1819,56 +1778,56 @@ int reiserfs_do_truncate(struct reiserfs
+@@ -1819,56 +1778,56 @@
/* Get real file size (total length of all file items) */
p_le_ih = PATH_PITEM_HEAD(&s_search_path);
if (is_statdata_le_ih(p_le_ih))
** many more blocks than a transaction can hold. So, we do a polite
** journal end here, and if the transaction needs ending, we make
** sure the file is consistent before ending the current trans
-@@ -1877,37 +1836,38 @@ int reiserfs_do_truncate(struct reiserfs
+@@ -1877,37 +1836,38 @@
if (journal_transaction_should_end(th, 0) ||
reiserfs_transaction_free_space(th) <= JOURNAL_FOR_FREE_BLOCK_AND_UPDATE_SD) {
int orig_len_alloc = th->t_blocks_allocated;
out:
pathrelse(&s_search_path);
-@@ -1917,7 +1877,7 @@ int reiserfs_do_truncate(struct reiserfs
+@@ -1917,7 +1877,7 @@
#ifdef CONFIG_REISERFS_CHECK
// this makes sure, that we __append__, not overwrite or add holes
static void check_research_for_paste(struct treepath *path,
{
struct item_head *found_ih = get_ih(path);
-@@ -1925,36 +1885,36 @@ static void check_research_for_paste(str
+@@ -1925,36 +1885,36 @@
if (le_ih_k_offset(found_ih) +
op_bytes_number(found_ih,
get_last_bh(path)->b_size) !=
{ /* Size of pasted bytes. */
struct tree_balance s_paste_balance;
int retval;
-@@ -1967,18 +1927,18 @@ int reiserfs_paste_into_item(struct reis
+@@ -1967,18 +1927,18 @@
#ifdef REISERQUOTA_DEBUG
reiserfs_debug(inode->i_sb, REISERFS_DEBUG_CODE,
"reiserquota paste_into_item(): allocating %u id=%u type=%c",
#endif
/* DQUOT_* can schedule, must check before the fix_nodes */
-@@ -1988,33 +1948,33 @@ int reiserfs_paste_into_item(struct reis
+@@ -1988,33 +1948,33 @@
while ((retval =
fix_nodes(M_PASTE, &s_paste_balance, NULL,
return 0;
}
retval = (retval == NO_DISK_SPACE) ? -ENOSPC : -EIO;
-@@ -2024,18 +1984,24 @@ int reiserfs_paste_into_item(struct reis
+@@ -2024,18 +1984,24 @@
#ifdef REISERQUOTA_DEBUG
reiserfs_debug(inode->i_sb, REISERFS_DEBUG_CODE,
"reiserquota paste_into_item(): freeing %u id=%u type=%c",
struct tree_balance s_ins_balance;
int retval;
int fs_gen = 0;
-@@ -2045,28 +2011,27 @@ int reiserfs_insert_item(struct reiserfs
+@@ -2045,28 +2011,27 @@
if (inode) { /* Do we count quotas for item? */
fs_gen = get_generation(inode->i_sb);
#ifdef DISPLACE_NEW_PACKING_LOCALITIES
s_ins_balance.key = key->on_disk_key;
#endif
-@@ -2076,19 +2041,18 @@ int reiserfs_insert_item(struct reiserfs
+@@ -2076,19 +2041,18 @@
}
while ((retval =
"key %K already exists in the tree",
key);
retval = -EEXIST;
-@@ -2098,7 +2062,7 @@ int reiserfs_insert_item(struct reiserfs
+@@ -2098,7 +2062,7 @@
/* make balancing after all resources will be collected at a time */
if (retval == CARRY_ON) {
return 0;
}
-@@ -2109,7 +2073,7 @@ int reiserfs_insert_item(struct reiserfs
+@@ -2109,7 +2073,7 @@
#ifdef REISERQUOTA_DEBUG
reiserfs_debug(th->t_super, REISERFS_DEBUG_CODE,
"reiserquota insert_item(): freeing %u id=%u type=%c",
#endif
if (inode)
DQUOT_FREE_SPACE_NODIRTY(inode, quota_bytes);
-diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/super.c
---- linux-2.6.27/fs/reiserfs/super.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/super.c 2009-03-25 16:11:37.000000000 +0000
-@@ -181,9 +181,9 @@ static int finish_unfinished(struct supe
+diff -r 9608d5473017 fs/reiserfs/super.c
+--- a/fs/reiserfs/super.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/super.c Wed May 06 16:56:52 2009 +0100
+@@ -181,9 +181,9 @@
if (REISERFS_SB(s)->s_qf_names[i]) {
int ret = reiserfs_quota_on_mount(s, i);
if (ret < 0)
}
}
#endif
-@@ -193,17 +193,16 @@ static int finish_unfinished(struct supe
+@@ -193,17 +193,16 @@
while (!retval) {
retval = search_item(s, &max_cpu_key, &path);
if (retval != ITEM_NOT_FOUND) {
break;
}
item_pos--;
-@@ -233,8 +232,7 @@ static int finish_unfinished(struct supe
+@@ -233,8 +232,7 @@
if (!inode) {
/* the unlink almost completed, it just did not manage to remove
"save" link and release objectid */
&obj_key);
retval = remove_save_link_only(s, &save_link_key, 1);
continue;
-@@ -242,8 +240,8 @@ static int finish_unfinished(struct supe
+@@ -242,8 +240,8 @@
if (!truncate && inode->i_nlink) {
/* file is not unlinked */
&obj_key);
retval = remove_save_link_only(s, &save_link_key, 0);
continue;
-@@ -255,8 +253,9 @@ static int finish_unfinished(struct supe
+@@ -255,8 +253,9 @@
The only imaginable way is to execute unfinished truncate request
then boot into old kernel, remove the file and create dir with
the same key. */
INODE_PKEY(inode));
retval = remove_save_link_only(s, &save_link_key, 0);
truncate = 0;
-@@ -286,9 +285,10 @@ static int finish_unfinished(struct supe
+@@ -286,9 +285,10 @@
/* removal gets completed in iput */
retval = 0;
} else {
retval = remove_save_link_only(s,
&save_link_key, 0);
}
-@@ -358,8 +358,9 @@ void add_save_link(struct reiserfs_trans
+@@ -358,8 +358,9 @@
} else {
/* truncate */
if (S_ISDIR(inode->i_mode))
INODE_PKEY(inode));
set_cpu_key_k_offset(&key, 1);
set_cpu_key_k_type(&key, TYPE_INDIRECT);
-@@ -374,9 +375,9 @@ void add_save_link(struct reiserfs_trans
+@@ -374,9 +375,9 @@
retval = search_item(inode->i_sb, &key, &path);
if (retval != ITEM_NOT_FOUND) {
if (retval != -ENOSPC)
pathrelse(&path);
return;
}
-@@ -389,9 +390,8 @@ void add_save_link(struct reiserfs_trans
+@@ -389,9 +390,8 @@
reiserfs_insert_item(th, &path, &key, &ih, NULL, (char *)&link);
if (retval) {
if (retval != -ENOSPC)
} else {
if (truncate)
REISERFS_I(inode)->i_flags |=
-@@ -490,8 +490,7 @@ static void reiserfs_put_super(struct su
+@@ -490,8 +490,7 @@
print_statistics(s);
if (REISERFS_SB(s)->reserved_blocks != 0) {
REISERFS_SB(s)->reserved_blocks);
}
-@@ -557,8 +556,8 @@ static void reiserfs_dirty_inode(struct
+@@ -557,8 +556,8 @@
int err = 0;
if (inode->i_sb->s_flags & MS_RDONLY) {
inode->i_ino);
return;
}
-@@ -755,7 +754,7 @@ static int reiserfs_getopt(struct super_
+@@ -755,7 +754,7 @@
char **opt_arg, unsigned long *bit_flags)
{
char *p;
^ ^ ^
| | +-- option_end
| +-- arg_start
-@@ -790,13 +789,15 @@ static int reiserfs_getopt(struct super_
+@@ -790,13 +789,15 @@
if (bit_flags) {
if (opt->clrmask ==
(1 << REISERFS_UNSUPPORTED_OPT))
p);
else
*bit_flags |= opt->setmask;
-@@ -805,7 +806,8 @@ static int reiserfs_getopt(struct super_
+@@ -805,7 +806,8 @@
}
}
if (!opt->option_name) {
return -1;
}
-@@ -813,8 +815,9 @@ static int reiserfs_getopt(struct super_
+@@ -813,8 +815,9 @@
switch (*p) {
case '=':
if (!opt->arg_required) {
opt->option_name);
return -1;
}
-@@ -822,14 +825,15 @@ static int reiserfs_getopt(struct super_
+@@ -822,14 +825,15 @@
case 0:
if (opt->arg_required) {
opt->option_name);
return -1;
}
-@@ -841,7 +845,8 @@ static int reiserfs_getopt(struct super_
+@@ -841,7 +845,8 @@
&& !(opt->arg_required & (1 << REISERFS_OPT_ALLOWEMPTY))
&& !strlen(p)) {
/* this catches "option=," if not allowed */
opt->option_name);
return -1;
}
-@@ -863,7 +868,8 @@ static int reiserfs_getopt(struct super_
+@@ -863,7 +868,8 @@
}
}
opt->option_name);
return -1;
}
-@@ -953,9 +959,9 @@ static int reiserfs_parse_options(struct
+@@ -953,9 +959,9 @@
*blocks = simple_strtoul(arg, &p, 0);
if (*p != '\0') {
/* NNN does not look like a number */
return 0;
}
}
-@@ -966,8 +972,8 @@ static int reiserfs_parse_options(struct
+@@ -966,8 +972,8 @@
unsigned long val = simple_strtoul(arg, &p, 0);
/* commit=NNN (time in seconds) */
if (*p != '\0' || val >= (unsigned int)-1) {
arg);
return 0;
}
-@@ -975,16 +981,18 @@ static int reiserfs_parse_options(struct
+@@ -975,16 +981,18 @@
}
if (c == 'w') {
return 0;
}
*jdev_name = arg;
-@@ -994,32 +1002,37 @@ static int reiserfs_parse_options(struct
+@@ -994,32 +1002,37 @@
if (c == 'u' || c == 'g') {
int qtype = c == 'u' ? USRQUOTA : GRPQUOTA;
return 0;
}
strcpy(qf_names[qtype], arg);
-@@ -1037,22 +1050,24 @@ static int reiserfs_parse_options(struct
+@@ -1037,22 +1050,24 @@
else if (!strcmp(arg, "vfsv0"))
*qfmt = QFMT_VFS_V0;
else {
return 0;
}
#endif
-@@ -1061,15 +1076,15 @@ static int reiserfs_parse_options(struct
+@@ -1061,15 +1076,15 @@
#ifdef CONFIG_QUOTA
if (!REISERFS_SB(s)->s_jquota_fmt && !*qfmt
&& (qf_names[USRQUOTA] || qf_names[GRPQUOTA])) {
return 0;
}
#endif
-@@ -1129,14 +1144,15 @@ static void handle_attrs(struct super_bl
+@@ -1129,14 +1144,15 @@
if (reiserfs_attrs(s)) {
if (old_format_only(s)) {
REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_ATTRS);
}
}
-@@ -1278,6 +1294,8 @@ static int reiserfs_remount(struct super
+@@ -1278,6 +1294,8 @@
REISERFS_SB(s)->s_mount_state = sb_umount_state(rs);
s->s_flags &= ~MS_RDONLY;
set_sb_umount_state(rs, REISERFS_ERROR_FS);
/* mark_buffer_dirty (SB_BUFFER_WITH_SB (s), 1); */
journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s));
REISERFS_SB(s)->s_mount_state = REISERFS_VALID_FS;
-@@ -1312,7 +1330,7 @@ static int read_super_block(struct super
+@@ -1312,7 +1330,7 @@
bh = sb_bread(s, offset / s->s_blocksize);
if (!bh) {
"bread failed (dev %s, block %lu, size %lu)",
reiserfs_bdevname(s), offset / s->s_blocksize,
s->s_blocksize);
-@@ -1326,15 +1344,15 @@ static int read_super_block(struct super
+@@ -1326,15 +1344,15 @@
}
//
// ok, reiserfs signature (old or new) found in at the given offset
reiserfs_bdevname(s), offset / s->s_blocksize,
s->s_blocksize);
return 1;
-@@ -1342,8 +1360,8 @@ static int read_super_block(struct super
+@@ -1342,8 +1360,8 @@
rs = (struct reiserfs_super_block *)bh->b_data;
if (sb_blocksize(rs) != s->s_blocksize) {
reiserfs_bdevname(s),
(unsigned long long)bh->b_blocknr,
s->s_blocksize);
-@@ -1353,9 +1371,10 @@ static int read_super_block(struct super
+@@ -1353,9 +1371,10 @@
if (rs->s_v1.s_root_block == cpu_to_le32(-1)) {
brelse(bh);
"get newer reiserfsprogs package");
return 1;
}
-@@ -1367,18 +1386,15 @@ static int read_super_block(struct super
+@@ -1367,18 +1386,15 @@
/* magic is of non-standard journal filesystem, look at s_version to
find which format is in use */
if (sb_version(rs) == REISERFS_VERSION_2)
return 1;
}
} else
-@@ -1408,8 +1424,7 @@ static int reread_meta_blocks(struct sup
+@@ -1408,8 +1424,7 @@
ll_rw_block(READ, 1, &(SB_BUFFER_WITH_SB(s)));
wait_on_buffer(SB_BUFFER_WITH_SB(s));
if (!buffer_uptodate(SB_BUFFER_WITH_SB(s))) {
return 1;
}
-@@ -1452,8 +1467,8 @@ static __u32 find_hash_out(struct super_
+@@ -1452,8 +1467,8 @@
if (reiserfs_rupasov_hash(s)) {
hash = YURA_HASH;
}
break;
}
r5hash = GET_HASH_VALUE(r5_hash(de.de_name, de.de_namelen));
-@@ -1473,10 +1488,10 @@ static __u32 find_hash_out(struct super_
+@@ -1473,10 +1488,10 @@
&& (yurahash ==
GET_HASH_VALUE(deh_offset
(&(de.de_deh[de.de_entry_num])))))) {
hash = UNSET_HASH;
break;
}
-@@ -1490,7 +1505,8 @@ static __u32 find_hash_out(struct super_
+@@ -1490,7 +1505,8 @@
(deh_offset(&(de.de_deh[de.de_entry_num]))) == r5hash)
hash = R5_HASH;
else {
hash = UNSET_HASH;
}
} while (0);
-@@ -1514,21 +1530,24 @@ static int what_hash(struct super_block
+@@ -1514,21 +1530,24 @@
code = find_hash_out(s);
if (code != UNSET_HASH && reiserfs_hash_detect(s)) {
"unable to force r5 hash",
reiserfs_hashname(code));
code = UNSET_HASH;
-@@ -1544,7 +1563,7 @@ static int what_hash(struct super_block
+@@ -1544,7 +1563,7 @@
}
}
** the super
*/
if (code != UNSET_HASH &&
-@@ -1587,9 +1606,9 @@ static int function2code(hashf_t func)
+@@ -1587,9 +1606,9 @@
return 0;
}
static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
{
-@@ -1623,10 +1642,6 @@ static int reiserfs_fill_super(struct su
+@@ -1623,10 +1642,6 @@
REISERFS_SB(s)->s_alloc_options.preallocmin = 0;
/* Preallocate by 16 blocks (17-1) at once */
REISERFS_SB(s)->s_alloc_options.preallocsize = 17;
/* setup default block allocator options */
reiserfs_init_alloc_options(s);
-@@ -1641,8 +1656,7 @@ static int reiserfs_fill_super(struct su
+@@ -1641,8 +1656,7 @@
#endif
if (blocks) {
goto error;
}
-@@ -1651,8 +1665,7 @@ static int reiserfs_fill_super(struct su
+@@ -1651,8 +1665,7 @@
old_format = 1;
/* try new format (64-th 1k block), which can contain reiserfs super block */
else if (read_super_block(s, REISERFS_DISK_OFFSET_IN_BYTES)) {
reiserfs_bdevname(s));
goto error;
}
-@@ -1664,13 +1677,12 @@ static int reiserfs_fill_super(struct su
+@@ -1664,13 +1677,12 @@
if (s->s_bdev && s->s_bdev->bd_inode
&& i_size_read(s->s_bdev->bd_inode) <
sb_block_count(rs) * sb_blocksize(rs)) {
goto error;
}
-@@ -1678,14 +1690,13 @@ static int reiserfs_fill_super(struct su
+@@ -1678,14 +1690,13 @@
sbi->s_mount_state = REISERFS_VALID_FS;
if ((errval = reiserfs_init_bitmap_cache(s))) {
#endif
/* make data=ordered the default */
-@@ -1701,13 +1712,16 @@ static int reiserfs_fill_super(struct su
+@@ -1701,13 +1712,16 @@
} else {
reiserfs_info(s, "using writeback data mode\n");
}
goto error;
} else {
jinit_done = 1; /* once this is set, journal_release must be called
-@@ -1715,8 +1729,8 @@ static int reiserfs_fill_super(struct su
+@@ -1715,8 +1729,8 @@
*/
}
if (reread_meta_blocks(s)) {
goto error;
}
-@@ -1724,8 +1738,8 @@ static int reiserfs_fill_super(struct su
+@@ -1724,8 +1738,8 @@
goto error;
if (bdev_read_only(s->s_bdev) && !(s->s_flags & MS_RDONLY)) {
s->s_flags |= MS_RDONLY;
}
args.objectid = REISERFS_ROOT_OBJECTID;
-@@ -1734,8 +1748,7 @@ static int reiserfs_fill_super(struct su
+@@ -1734,8 +1748,7 @@
iget5_locked(s, REISERFS_ROOT_OBJECTID, reiserfs_find_actor,
reiserfs_init_locked_inode, (void *)(&args));
if (!root_inode) {
goto error;
}
-@@ -1784,7 +1797,7 @@ static int reiserfs_fill_super(struct su
+@@ -1784,7 +1797,7 @@
* avoiding corruption. -jeffm */
if (bmap_would_wrap(reiserfs_bmap_count(s)) &&
sb_bmap_nr(rs) != 0) {
"claims to use %u bitmap blocks in "
"its super block, but requires %u. "
"Clearing to zero.", sb_bmap_nr(rs),
-@@ -1817,7 +1830,9 @@ static int reiserfs_fill_super(struct su
+@@ -1817,7 +1830,9 @@
} else if (!silent) {
reiserfs_info(s, "using 3.5.x disk format\n");
}
journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s));
errval = journal_end(&th, s, 1);
-@@ -2083,8 +2098,8 @@ static int reiserfs_quota_on(struct supe
+@@ -2083,8 +2098,8 @@
if (!(REISERFS_I(inode)->i_flags & i_nopack_mask)) {
err = reiserfs_unpack(inode, NULL);
if (err) {
" (%d). Cannot turn on quotas.", err);
err = -EINVAL;
goto out;
-@@ -2095,8 +2110,8 @@ static int reiserfs_quota_on(struct supe
+@@ -2095,8 +2110,8 @@
if (REISERFS_SB(sb)->s_qf_names[type]) {
/* Quotafile not of fs root? */
if (nd.path.dentry->d_parent->d_inode != sb->s_root->d_inode)
"Journalled quota will not work.");
}
-@@ -2247,9 +2262,6 @@ static int __init init_reiserfs_fs(void)
+@@ -2247,9 +2262,6 @@
return ret;
}
reiserfs_proc_info_global_init();
reiserfs_proc_register_global("version",
reiserfs_global_version_in_proc);
-@@ -2260,9 +2272,6 @@ static int __init init_reiserfs_fs(void)
+@@ -2260,9 +2272,6 @@
return 0;
}
reiserfs_proc_unregister_global("version");
reiserfs_proc_info_global_done();
destroy_inodecache();
-@@ -2272,7 +2281,6 @@ static int __init init_reiserfs_fs(void)
+@@ -2272,7 +2281,6 @@
static void __exit exit_reiserfs_fs(void)
{
reiserfs_proc_unregister_global("version");
reiserfs_proc_info_global_done();
unregister_filesystem(&reiserfs_fs_type);
-diff -purN linux-2.6.27/fs/reiserfs/tail_conversion.c linux-2.6.27.19-5.1/fs/reiserfs/tail_conversion.c
---- linux-2.6.27/fs/reiserfs/tail_conversion.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/tail_conversion.c 2009-03-25 16:11:37.000000000 +0000
-@@ -26,7 +26,7 @@ int direct2indirect(struct reiserfs_tran
+diff -r 9608d5473017 fs/reiserfs/tail_conversion.c
+--- a/fs/reiserfs/tail_conversion.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/tail_conversion.c Wed May 06 16:56:52 2009 +0100
+@@ -26,7 +26,7 @@
converted item. */
struct item_head ind_ih; /* new indirect item to be inserted or
key of unfm pointer to be pasted */
unp_t unfm_ptr; /* Handle on an unformatted node
that will be inserted in the
tree. */
-@@ -35,7 +35,7 @@ int direct2indirect(struct reiserfs_tran
+@@ -35,7 +35,7 @@
REISERFS_SB(sb)->s_direct2indirect++;
/* and key to search for append or insert pointer to the new
unformatted node. */
-@@ -46,11 +46,11 @@ int direct2indirect(struct reiserfs_tran
+@@ -46,11 +46,11 @@
/* Set the key to search for the place for new unfm pointer */
make_cpu_key(&end_key, inode, tail_offset, TYPE_INDIRECT, 4);
pathrelse(path);
return -EIO;
}
-@@ -64,17 +64,17 @@ int direct2indirect(struct reiserfs_tran
+@@ -64,17 +64,17 @@
set_ih_free_space(&ind_ih, 0); /* delete at nearest future */
put_ih_item_len(&ind_ih, UNFM_P_SIZE);
PATH_LAST_POSITION(path)++;
}
// note: from here there are two keys which have matching first
// three key components. They only differ by the fourth one.
-@@ -92,14 +92,13 @@ int direct2indirect(struct reiserfs_tran
+@@ -92,14 +92,13 @@
last item of the file */
if (search_for_position_by_key(sb, &end_key, path) ==
POSITION_FOUND)
+ ih_item_len(p_le_ih) - 1;
/* we only send the unbh pointer if the buffer is not up to date.
-@@ -114,11 +113,11 @@ int direct2indirect(struct reiserfs_tran
+@@ -114,11 +113,11 @@
} else {
up_to_date_bh = unbh;
}
// done: file does not have direct items anymore
break;
-@@ -130,7 +129,7 @@ int direct2indirect(struct reiserfs_tran
+@@ -130,7 +129,7 @@
unsigned pgoff =
(tail_offset + total_tail - 1) & (PAGE_CACHE_SIZE - 1);
char *kaddr = kmap_atomic(up_to_date_bh->b_page, KM_USER0);
kunmap_atomic(kaddr, KM_USER0);
}
-@@ -171,14 +170,18 @@ void reiserfs_unmap_buffer(struct buffer
+@@ -171,14 +170,18 @@
what we expect from it (number of cut bytes). But when tail remains
in the unformatted node, we set mode to SKIP_BALANCING and unlock
inode */
char *tail;
int tail_len, round_tail_len;
loff_t pos, pos1; /* position of first byte of the tail */
-@@ -186,22 +189,22 @@ int indirect2direct(struct reiserfs_tran
+@@ -186,22 +189,22 @@
BUG_ON(!th->t_trans_id);
pos1 = pos;
// we are protected by i_mutex. The tail can not disapper, not
-@@ -210,27 +213,26 @@ int indirect2direct(struct reiserfs_tran
+@@ -210,27 +213,26 @@
tail = (char *)kmap(page); /* this can schedule */
pos1 + 1, TYPE_DIRECT, round_tail_len,
0xffff /*ih_free_space */ );
-@@ -240,13 +242,13 @@ int indirect2direct(struct reiserfs_tran
+@@ -240,13 +242,13 @@
*/
tail = tail + (pos & (PAGE_CACHE_SIZE - 1));
tail ? tail : NULL) < 0) {
/* No disk memory. So we can not convert last unformatted node
to the direct item. In this case we used to adjust
-@@ -255,12 +257,12 @@ int indirect2direct(struct reiserfs_tran
+@@ -255,12 +257,12 @@
unformatted node. For now i_size is considered as guard for
going out of file size */
kunmap(page);
// note: we have now the same as in above direct2indirect
// conversion: there are two keys which have matching first three
-@@ -268,11 +270,11 @@ int indirect2direct(struct reiserfs_tran
+@@ -268,11 +270,11 @@
/* We have inserted new direct item and must remove last
unformatted node. */
- return n_block_size - round_tail_len;
+ return block_size - round_tail_len;
}
-diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xattr.c
---- linux-2.6.27/fs/reiserfs/xattr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/xattr.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/xattr.c
+--- a/fs/reiserfs/xattr.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/xattr.c Wed May 06 16:56:52 2009 +0100
@@ -27,6 +27,10 @@
* these are special cases for filesystem ACLs, they are interpreted by the
* kernel, in addition, they are negatively and positively cached and attached
+}
- /* This needs to be created at mount-time */
-- if (!privroot)
-- return ERR_PTR(-ENODATA);
+static int xattr_mkdir(struct inode *dir, struct dentry *dentry, int mode)
+{
+ BUG_ON(!mutex_is_locked(&dir->i_mutex));
+ DQUOT_INIT(dir);
+ return dir->i_op->mkdir(dir, dentry, mode);
+}
-
-- mutex_lock_nested(&privroot->d_inode->i_mutex, I_MUTEX_XATTR);
-- if (REISERFS_SB(sb)->xattr_root) {
-- xaroot = dget(REISERFS_SB(sb)->xattr_root);
-- goto out;
-- }
++
+/* We use I_MUTEX_CHILD here to silence lockdep. It's safe because xattr
+ * mutation ops aren't called during rename or splace, which are the
+ * only other users of I_MUTEX_CHILD. It violates the ordering, but that's
+ int error;
+ BUG_ON(!mutex_is_locked(&dir->i_mutex));
+ DQUOT_INIT(dir);
-
-- xaroot = lookup_one_len(XAROOT_NAME, privroot, strlen(XAROOT_NAME));
-- if (IS_ERR(xaroot)) {
-- goto out;
-- } else if (!xaroot->d_inode) {
++
+ mutex_lock_nested(&dentry->d_inode->i_mutex, I_MUTEX_CHILD);
+ error = dir->i_op->unlink(dir, dentry);
+ mutex_unlock(&dentry->d_inode->i_mutex);
+ if (IS_ERR(dentry))
+ return dentry;
+ else if (!dentry->d_inode) {
- int err = -ENODATA;
-- if (flags == 0 || flags & XATTR_CREATE)
-- err = privroot->d_inode->i_op->mkdir(privroot->d_inode,
-- xaroot, 0700);
++ int err = -ENODATA;
+
+ if (xattr_may_create(flags)) {
+ mutex_lock_nested(&parent->d_inode->i_mutex,
+ mutex_unlock(&parent->d_inode->i_mutex);
+ }
+
- if (err) {
-- dput(xaroot);
-- xaroot = ERR_PTR(err);
-- goto out;
++ if (err) {
+ dput(dentry);
+ dentry = ERR_PTR(err);
- }
- }
-- REISERFS_SB(sb)->xattr_root = dget(xaroot);
-
-- out:
-- mutex_unlock(&privroot->d_inode->i_mutex);
-- dput(privroot);
-- return xaroot;
++ }
++ }
++
+ return dentry;
+}
+
+static struct dentry *open_xa_root(struct super_block *sb, int flags)
+{
+ struct dentry *privroot = REISERFS_SB(sb)->priv_root;
-+ if (!privroot)
-+ return ERR_PTR(-ENODATA);
+ if (!privroot)
+ return ERR_PTR(-ENODATA);
+-
+- mutex_lock_nested(&privroot->d_inode->i_mutex, I_MUTEX_XATTR);
+- if (REISERFS_SB(sb)->xattr_root) {
+- xaroot = dget(REISERFS_SB(sb)->xattr_root);
+- goto out;
+- }
+-
+- xaroot = lookup_one_len(XAROOT_NAME, privroot, strlen(XAROOT_NAME));
+- if (IS_ERR(xaroot)) {
+- goto out;
+- } else if (!xaroot->d_inode) {
+- int err = -ENODATA;
+- if (flags == 0 || flags & XATTR_CREATE)
+- err = privroot->d_inode->i_op->mkdir(privroot->d_inode,
+- xaroot, 0700);
+- if (err) {
+- dput(xaroot);
+- xaroot = ERR_PTR(err);
+- goto out;
+- }
+- }
+- REISERFS_SB(sb)->xattr_root = dget(xaroot);
+-
+- out:
+- mutex_unlock(&privroot->d_inode->i_mutex);
+- dput(privroot);
+- return xaroot;
+ return lookup_or_create_dir(privroot, XAROOT_NAME, flags);
}
- if (IS_ERR(xadir)) {
- dput(xaroot);
- return xadir;
-- }
--
++
++ xadir = lookup_or_create_dir(xaroot, namebuf, flags);
++ dput(xaroot);
++ return xadir;
++
++}
++
++/* The following are side effects of other operations that aren't explicitly
++ * modifying extended attributes. This includes operations such as permissions
++ * or ownership changes, object deletions, etc. */
++struct reiserfs_dentry_buf {
++ struct dentry *xadir;
++ int count;
++ struct dentry *dentries[8];
++};
++
++static int
++fill_with_dentries(void *buf, const char *name, int namelen, loff_t offset,
++ u64 ino, unsigned int d_type)
++{
++ struct reiserfs_dentry_buf *dbuf = buf;
++ struct dentry *dentry;
++
++ if (dbuf->count == ARRAY_SIZE(dbuf->dentries))
++ return -ENOSPC;
++
++ if (name[0] == '.' && (name[1] == '\0' ||
++ (name[1] == '.' && name[2] == '\0')))
++ return 0;
++
++ dentry = lookup_one_len(name, dbuf->xadir, namelen);
++ if (IS_ERR(dentry)) {
++ return PTR_ERR(dentry);
++ } else if (!dentry->d_inode) {
++ /* A directory entry exists, but no file? */
++ reiserfs_error(dentry->d_sb, "xattr-20003",
++ "Corrupted directory: xattr %s listed but "
++ "not found for file %s.\n",
++ dentry->d_name.name, dbuf->xadir->d_name.name);
++ dput(dentry);
++ return -EIO;
+ }
+
- if (!xadir->d_inode) {
- int err;
- if (flags == 0 || flags & XATTR_CREATE) {
- dput(xadir);
- return ERR_PTR(err);
- }
-- }
++ dbuf->dentries[dbuf->count++] = dentry;
++ return 0;
++}
++
++static void
++cleanup_dentry_buf(struct reiserfs_dentry_buf *buf)
++{
++ int i;
++ for (i = 0; i < buf->count; i++)
++ if (buf->dentries[i])
++ dput(buf->dentries[i]);
++}
++
++static int reiserfs_for_each_xattr(struct inode *inode,
++ int (*action)(struct dentry *, void *),
++ void *data)
++{
++ struct dentry *dir;
++ int i, err = 0;
++ loff_t pos = 0;
++ struct reiserfs_dentry_buf buf = {
++ .count = 0,
++ };
++
++ /* Skip out, an xattr has no xattrs associated with it */
++ if (IS_PRIVATE(inode) || get_inode_sd_version(inode) == STAT_DATA_V1)
++ return 0;
++
++ dir = open_xa_dir(inode, XATTR_REPLACE);
++ if (IS_ERR(dir)) {
++ err = PTR_ERR(dir);
++ goto out;
++ } else if (!dir->d_inode) {
++ err = 0;
++ goto out_dir;
++ }
++
++ mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_XATTR);
++ buf.xadir = dir;
++ err = reiserfs_readdir_dentry(dir, &buf, fill_with_dentries, &pos);
++ while ((err == 0 || err == -ENOSPC) && buf.count) {
++ err = 0;
++
++ for (i = 0; i < buf.count && buf.dentries[i]; i++) {
++ int lerr = 0;
++ struct dentry *dentry = buf.dentries[i];
++
++ if (err == 0 && !S_ISDIR(dentry->d_inode->i_mode))
++ lerr = action(dentry, data);
++
++ dput(dentry);
++ buf.dentries[i] = NULL;
++ err = lerr ?: err;
+ }
- if (!xadir->d_inode) {
- dput(xaroot);
- dput(xadir);
- return ERR_PTR(-ENODATA);
-- }
-- }
-
-+ xadir = lookup_or_create_dir(xaroot, namebuf, flags);
- dput(xaroot);
- return xadir;
++ buf.count = 0;
++ if (!err)
++ err = reiserfs_readdir_dentry(dir, &buf,
++ fill_with_dentries, &pos);
++ }
++ mutex_unlock(&dir->d_inode->i_mutex);
++
++ /* Clean up after a failed readdir */
++ cleanup_dentry_buf(&buf);
+
++ if (!err) {
++ /* We start a transaction here to avoid a ABBA situation
++ * between the xattr root's i_mutex and the journal lock.
++ * This doesn't incur much additional overhead since the
++ * new transaction will just nest inside the
++ * outer transaction. */
++ int blocks = JOURNAL_PER_BALANCE_CNT * 2 + 2 +
++ 4 * REISERFS_QUOTA_TRANS_BLOCKS(inode->i_sb);
++ struct reiserfs_transaction_handle th;
++ err = journal_begin(&th, inode->i_sb, blocks);
++ if (!err) {
++ int jerror;
++ mutex_lock_nested(&dir->d_parent->d_inode->i_mutex,
++ I_MUTEX_XATTR);
++ err = action(dir, data);
++ jerror = journal_end(&th, inode->i_sb, blocks);
++ mutex_unlock(&dir->d_parent->d_inode->i_mutex);
++ err = jerror ?: err;
+ }
+ }
+-
+- dput(xaroot);
+- return xadir;
++out_dir:
++ dput(dir);
++out:
++ /* -ENODATA isn't an error */
++ if (err == -ENODATA)
++ err = 0;
++ return err;
}
--/* Returns a dentry corresponding to a specific extended attribute file
-- * for the inode. If flags allow, the file is created. Otherwise, a
-- * valid or negative dentry, or an error is returned. */
++static int delete_one_xattr(struct dentry *dentry, void *data)
++{
++ struct inode *dir = dentry->d_parent->d_inode;
++
++ /* This is the xattr dir, handle specially. */
++ if (S_ISDIR(dentry->d_inode->i_mode))
++ return xattr_rmdir(dir, dentry);
++
++ return xattr_unlink(dir, dentry);
++}
++
++static int chown_one_xattr(struct dentry *dentry, void *data)
++{
++ struct iattr *attrs = data;
++ return reiserfs_setattr(dentry, attrs);
++}
++
++/* No i_mutex, but the inode is unconnected. */
++int reiserfs_delete_xattrs(struct inode *inode)
++{
++ int err = reiserfs_for_each_xattr(inode, delete_one_xattr, NULL);
++ if (err)
++ reiserfs_warning(inode->i_sb, "jdm-20004",
++ "Couldn't delete all xattrs (%d)\n", err);
++ return err;
++}
++
++/* inode->i_mutex: down */
++int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs)
++{
++ int err = reiserfs_for_each_xattr(inode, chown_one_xattr, attrs);
++ if (err)
++ reiserfs_warning(inode->i_sb, "jdm-20007",
++ "Couldn't chown all xattrs (%d)\n", err);
++ return err;
++}
++
++#ifdef CONFIG_REISERFS_FS_XATTR
+ /* Returns a dentry corresponding to a specific extended attribute file
+ * for the inode. If flags allow, the file is created. Otherwise, a
+ * valid or negative dentry, or an error is returned. */
-static struct dentry *get_xa_file_dentry(const struct inode *inode,
- const char *name, int flags)
--{
-- struct dentry *xadir, *xafile;
-- int err = 0;
-+/* The following are side effects of other operations that aren't explicitly
-+ * modifying extended attributes. This includes operations such as permissions
-+ * or ownership changes, object deletions, etc. */
-+struct reiserfs_dentry_buf {
-+ struct dentry *xadir;
-+ int count;
-+ struct dentry *dentries[8];
-+};
++static struct dentry *xattr_lookup(struct inode *inode, const char *name,
++ int flags)
+ {
+ struct dentry *xadir, *xafile;
+ int err = 0;
-- xadir = open_xa_dir(inode, flags);
+ xadir = open_xa_dir(inode, flags);
- if (IS_ERR(xadir)) {
-- return ERR_CAST(xadir);
++ if (IS_ERR(xadir))
+ return ERR_CAST(xadir);
- } else if (xadir && !xadir->d_inode) {
- dput(xadir);
- return ERR_PTR(-ENODATA);
- }
-+static int
-+fill_with_dentries(void *buf, const char *name, int namelen, loff_t offset,
-+ u64 ino, unsigned int d_type)
-+{
-+ struct reiserfs_dentry_buf *dbuf = buf;
-+ struct dentry *dentry;
-- xafile = lookup_one_len(name, xadir, strlen(name));
-- if (IS_ERR(xafile)) {
+ xafile = lookup_one_len(name, xadir, strlen(name));
+ if (IS_ERR(xafile)) {
- dput(xadir);
- return ERR_CAST(xafile);
-- }
-+ if (dbuf->count == ARRAY_SIZE(dbuf->dentries))
-+ return -ENOSPC;
++ err = PTR_ERR(xafile);
++ goto out;
+ }
- if (xafile->d_inode) { /* file exists */
- if (flags & XATTR_CREATE) {
- * the same xattr */
- err = xadir->d_inode->i_op->create(xadir->d_inode, xafile,
- 0700 | S_IFREG, NULL);
-+ if (name[0] == '.' && (name[1] == '\0' ||
-+ (name[1] == '.' && name[2] == '\0')))
-+ return 0;
++ if (xafile->d_inode && (flags & XATTR_CREATE))
++ err = -EEXIST;
- if (err) {
- dput(xafile);
- goto out;
-- }
-+ dentry = lookup_one_len(name, dbuf->xadir, namelen);
-+ if (IS_ERR(dentry)) {
-+ return PTR_ERR(dentry);
-+ } else if (!dentry->d_inode) {
-+ /* A directory entry exists, but no file? */
-+ reiserfs_error(dentry->d_sb, "xattr-20003",
-+ "Corrupted directory: xattr %s listed but "
-+ "not found for file %s.\n",
-+ dentry->d_name.name, dbuf->xadir->d_name.name);
-+ dput(dentry);
-+ return -EIO;
++ if (!xafile->d_inode) {
++ err = -ENODATA;
++ if (xattr_may_create(flags)) {
++ mutex_lock_nested(&xadir->d_inode->i_mutex,
++ I_MUTEX_XATTR);
++ err = xattr_create(xadir->d_inode, xafile,
++ 0700|S_IFREG);
++ mutex_unlock(&xadir->d_inode->i_mutex);
+ }
}
- out:
-- dput(xadir);
-- if (err)
++ if (err)
++ dput(xafile);
++out:
+ dput(xadir);
+ if (err)
- xafile = ERR_PTR(err);
- else if (!xafile->d_inode) {
- dput(xafile);
- xafile = ERR_PTR(-ENODATA);
- }
-- return xafile;
-+ dbuf->dentries[dbuf->count++] = dentry;
-+ return 0;
- }
-
++ return ERR_PTR(err);
+ return xafile;
+-}
+-
-/*
- * this is very similar to fs/reiserfs/dir.c:reiserfs_readdir, but
- * we need to drop the path before calling the filldir struct. That
- * changing underneath us.
- */
-static int __xattr_readdir(struct inode *inode, void *dirent, filldir_t filldir)
-+static void
-+cleanup_dentry_buf(struct reiserfs_dentry_buf *buf)
- {
+-{
- struct cpu_key pos_key; /* key of current position in the directory (key of directory entry) */
- INITIALIZE_PATH(path_to_entry);
- struct buffer_head *bh;
- pathrelse(&path_to_entry);
- return -EIO;
- }
-+ int i;
-+ for (i = 0; i < buf->count; i++)
-+ if (buf->dentries[i])
-+ dput(buf->dentries[i]);
-+}
-
+-
- if (search_res == NAME_NOT_FOUND)
- de.de_entry_num--;
-+static int reiserfs_for_each_xattr(struct inode *inode,
-+ int (*action)(struct dentry *, void *),
-+ void *data)
-+{
-+ struct dentry *dir;
-+ int i, err = 0;
-+ loff_t pos = 0;
-+ struct reiserfs_dentry_buf buf = {
-+ .count = 0,
-+ };
-
+-
- set_de_name_and_namelen(&de);
- entry_num = de.de_entry_num;
- deh = &(de.de_deh[entry_num]);
-+ /* Skip out, an xattr has no xattrs associated with it */
-+ if (IS_PRIVATE(inode) || get_inode_sd_version(inode) == STAT_DATA_V1)
-+ return 0;
-
+-
- bh = de.de_bh;
- ih = de.de_ih;
-+ dir = open_xa_dir(inode, XATTR_REPLACE);
-+ if (IS_ERR(dir)) {
-+ err = PTR_ERR(dir);
-+ goto out;
-+ } else if (!dir->d_inode) {
-+ err = 0;
-+ goto out_dir;
-+ }
-
+-
- if (!is_direntry_le_ih(ih)) {
- reiserfs_warning(inode->i_sb, "not direntry %h", ih);
- break;
- }
- copy_item_head(&tmp_ih, ih);
-+ mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_XATTR);
-+ buf.xadir = dir;
-+ err = reiserfs_readdir_dentry(dir, &buf, fill_with_dentries, &pos);
-+ while ((err == 0 || err == -ENOSPC) && buf.count) {
-+ err = 0;
-+
-+ for (i = 0; i < buf.count && buf.dentries[i]; i++) {
-+ int lerr = 0;
-+ struct dentry *dentry = buf.dentries[i];
-+
-+ if (err == 0 && !S_ISDIR(dentry->d_inode->i_mode))
-+ lerr = action(dentry, data);
-+
-+ dput(dentry);
-+ buf.dentries[i] = NULL;
-+ err = lerr ?: err;
-+ }
-+ buf.count = 0;
-+ if (!err)
-+ err = reiserfs_readdir_dentry(dir, &buf,
-+ fill_with_dentries, &pos);
-+ }
-+ mutex_unlock(&dir->d_inode->i_mutex);
-
+-
- /* we must have found item, that is item of this directory, */
- RFALSE(COMP_SHORT_KEYS(&(ih->ih_key), &pos_key),
- "vs-9000: found item %h does not match to dir we readdir %K",
- ih, &pos_key);
-+ /* Clean up after a failed readdir */
-+ cleanup_dentry_buf(&buf);
-
+-
- if (deh_offset(deh) <= DOT_DOT_OFFSET) {
- break;
-+ if (!err) {
-+ /* We start a transaction here to avoid a ABBA situation
-+ * between the xattr root's i_mutex and the journal lock.
-+ * This doesn't incur much additional overhead since the
-+ * new transaction will just nest inside the
-+ * outer transaction. */
-+ int blocks = JOURNAL_PER_BALANCE_CNT * 2 + 2 +
-+ 4 * REISERFS_QUOTA_TRANS_BLOCKS(inode->i_sb);
-+ struct reiserfs_transaction_handle th;
-+ err = journal_begin(&th, inode->i_sb, blocks);
-+ if (!err) {
-+ int jerror;
-+ mutex_lock_nested(&dir->d_parent->d_inode->i_mutex,
-+ I_MUTEX_XATTR);
-+ err = action(dir, data);
-+ jerror = journal_end(&th, inode->i_sb, blocks);
-+ mutex_unlock(&dir->d_parent->d_inode->i_mutex);
-+ err = jerror ?: err;
- }
-+ }
-+out_dir:
-+ dput(dir);
-+out:
-+ /* -ENODATA isn't an error */
-+ if (err == -ENODATA)
-+ err = 0;
-+ return err;
-+}
-
+- }
+-
- /* look for the previous entry in the directory */
- next_pos = deh_offset(deh) - 1;
-
- /* too big to send back to VFS */
- continue;
- }
-+static int delete_one_xattr(struct dentry *dentry, void *data)
-+{
-+ struct inode *dir = dentry->d_parent->d_inode;
-
+-
- /* Ignore the .reiserfs_priv entry */
- if (reiserfs_xattrs(inode->i_sb) &&
- !old_format_only(inode->i_sb) &&
- (REISERFS_SB(inode->i_sb)->priv_root->d_inode)->
- k_objectid))
- continue;
-+ /* This is the xattr dir, handle specially. */
-+ if (S_ISDIR(dentry->d_inode->i_mode))
-+ return xattr_rmdir(dir, dentry);
-
+-
- if (d_reclen <= 32) {
- local_buf = small_buf;
- } else {
- }
- if (item_moved(&tmp_ih, &path_to_entry)) {
- kfree(local_buf);
-+ return xattr_unlink(dir, dentry);
-+}
-
+-
- /* sigh, must retry. Do this same offset again */
- next_pos = d_off;
- goto research;
- }
- }
-+static int chown_one_xattr(struct dentry *dentry, void *data)
-+{
-+ struct iattr *attrs = data;
-+ return reiserfs_setattr(dentry, attrs);
-+}
-
+-
- // Note, that we copy name to user space via temporary
- // buffer (local_buf) because filldir will block if
- // user space buffer is swapped out. At that time
- kfree(local_buf);
- }
- } /* while */
-+/* No i_mutex, but the inode is unconnected. */
-+int reiserfs_delete_xattrs(struct inode *inode)
-+{
-+ int err = reiserfs_for_each_xattr(inode, delete_one_xattr, NULL);
-+ if (err)
-+ reiserfs_warning(inode->i_sb, "jdm-20004",
-+ "Couldn't delete all xattrs (%d)\n", err);
-+ return err;
-+}
-
+-
- end:
- pathrelse(&path_to_entry);
- return 0;
-+/* inode->i_mutex: down */
-+int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs)
-+{
-+ int err = reiserfs_for_each_xattr(inode, chown_one_xattr, attrs);
-+ if (err)
-+ reiserfs_warning(inode->i_sb, "jdm-20007",
-+ "Couldn't chown all xattrs (%d)\n", err);
-+ return err;
- }
-
+-}
+-
-/*
- * this could be done with dedicated readdir ops for the xattr files,
- * but I want to get something working asap
- */
-static
-int xattr_readdir(struct inode *inode, filldir_t filler, void *buf)
-+#ifdef CONFIG_REISERFS_FS_XATTR
-+/* Returns a dentry corresponding to a specific extended attribute file
-+ * for the inode. If flags allow, the file is created. Otherwise, a
-+ * valid or negative dentry, or an error is returned. */
-+static struct dentry *xattr_lookup(struct inode *inode, const char *name,
-+ int flags)
- {
+-{
- int res = -ENOENT;
- mutex_lock_nested(&inode->i_mutex, I_MUTEX_XATTR);
- if (!IS_DEADDIR(inode)) {
- lock_kernel();
- res = __xattr_readdir(inode, buf, filler);
- unlock_kernel();
-+ struct dentry *xadir, *xafile;
-+ int err = 0;
-+
-+ xadir = open_xa_dir(inode, flags);
-+ if (IS_ERR(xadir))
-+ return ERR_CAST(xadir);
-+
-+ xafile = lookup_one_len(name, xadir, strlen(name));
-+ if (IS_ERR(xafile)) {
-+ err = PTR_ERR(xafile);
-+ goto out;
- }
+- }
- mutex_unlock(&inode->i_mutex);
- return res;
-+
-+ if (xafile->d_inode && (flags & XATTR_CREATE))
-+ err = -EEXIST;
-+
-+ if (!xafile->d_inode) {
-+ err = -ENODATA;
-+ if (xattr_may_create(flags)) {
-+ mutex_lock_nested(&xadir->d_inode->i_mutex,
-+ I_MUTEX_XATTR);
-+ err = xattr_create(xadir->d_inode, xafile,
-+ 0700|S_IFREG);
-+ mutex_unlock(&xadir->d_inode->i_mutex);
-+ }
-+ }
-+
-+ if (err)
-+ dput(xafile);
-+out:
-+ dput(xadir);
-+ if (err)
-+ return ERR_PTR(err);
-+ return xafile;
}
/* Internal operations on file data */
-@@ -375,14 +383,14 @@ static inline void reiserfs_put_page(str
+@@ -375,14 +383,14 @@
page_cache_release(page);
}
if (!IS_ERR(page)) {
kmap(page);
if (PageError(page))
-@@ -405,6 +413,45 @@ int reiserfs_commit_write(struct file *f
+@@ -405,6 +413,45 @@
int reiserfs_prepare_write(struct file *f, struct page *page,
unsigned from, unsigned to);
/* Generic extended attribute operations that can be used by xa plugins */
-@@ -412,58 +459,32 @@ int reiserfs_prepare_write(struct file *
+@@ -412,58 +459,32 @@
* inode->i_mutex: down
*/
int
while (buffer_pos < buffer_size || buffer_pos == 0) {
size_t chunk;
size_t skip = 0;
-@@ -473,10 +494,10 @@ reiserfs_xattr_set(struct inode *inode,
+@@ -473,10 +494,10 @@
else
chunk = buffer_size - buffer_pos;
}
lock_page(page);
-@@ -510,28 +531,61 @@ reiserfs_xattr_set(struct inode *inode,
+@@ -510,28 +531,61 @@
break;
}
size_t buffer_size)
{
ssize_t err = 0;
-@@ -540,7 +594,6 @@ reiserfs_xattr_get(const struct inode *i
+@@ -540,7 +594,6 @@
size_t file_pos = 0;
size_t buffer_pos = 0;
struct page *page;
__u32 hash = 0;
if (name == NULL)
-@@ -551,25 +604,25 @@ reiserfs_xattr_get(const struct inode *i
+@@ -551,25 +604,25 @@
if (get_inode_sd_version(inode) == STAT_DATA_V1)
return -EOPNOTSUPP;
}
while (file_pos < isize) {
-@@ -581,10 +634,10 @@ reiserfs_xattr_get(const struct inode *i
+@@ -581,10 +634,10 @@
else
chunk = isize - file_pos;
}
lock_page(page);
-@@ -598,12 +651,12 @@ reiserfs_xattr_get(const struct inode *i
+@@ -598,12 +651,12 @@
if (rxh->h_magic != cpu_to_le32(REISERFS_XATTR_MAGIC)) {
unlock_page(page);
reiserfs_put_page(page);
}
hash = le32_to_cpu(rxh->h_hash);
}
-@@ -618,256 +671,83 @@ reiserfs_xattr_get(const struct inode *i
+@@ -618,256 +671,83 @@
if (xattr_hash(buffer, isize - sizeof(struct reiserfs_xattr_header)) !=
hash) {
}
- out_dput:
-- dput(dentry);
--
++out_unlock:
++ up_read(&REISERFS_I(inode)->i_xattr_sem);
+ dput(dentry);
+
- out:
- return err;
-}
- d_delete(dentry);
-
- out_file:
-+out_unlock:
-+ up_read(&REISERFS_I(inode)->i_xattr_sem);
- dput(dentry);
-
+- dput(dentry);
+-
- out:
- return err;
-}
- if (!err)
- REISERFS_I(inode)->i_flags =
- REISERFS_I(inode)->i_flags & ~i_has_xattr_dir;
-+out:
- return err;
- }
-
+- return err;
+-}
+-
-struct reiserfs_chown_buf {
- struct inode *inode;
- struct dentry *xadir;
- struct iattr *attrs;
-+/* Actual operations that are exported to VFS-land */
-+struct xattr_handler *reiserfs_xattr_handlers[] = {
-+ &reiserfs_xattr_user_handler,
-+ &reiserfs_xattr_trusted_handler,
-+#ifdef CONFIG_REISERFS_FS_SECURITY
-+ &reiserfs_xattr_security_handler,
-+#endif
-+#ifdef CONFIG_REISERFS_FS_POSIX_ACL
-+ &reiserfs_posix_acl_access_handler,
-+ &reiserfs_posix_acl_default_handler,
-+#endif
-+ NULL
- };
-
+-};
+-
-/* XXX: If there is a better way to do this, I'd love to hear about it */
-static int
-reiserfs_chown_xattrs_filler(void *buf, const char *name, int namelen,
-
- return err;
-}
-+/*
-+ * In order to implement different sets of xattr operations for each xattr
-+ * prefix with the generic xattr API, a filesystem should create a
-+ * null-terminated array of struct xattr_handler (one for each prefix) and
-+ * hang a pointer to it off of the s_xattr field of the superblock.
-+ *
-+ * The generic_fooxattr() functions will use this list to dispatch xattr
-+ * operations to the correct xattr_handler.
-+ */
-+#define for_each_xattr_handler(handlers, handler) \
-+ for ((handler) = *(handlers)++; \
-+ (handler) != NULL; \
-+ (handler) = *(handlers)++)
-
+-
-int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs)
-+/* This is the implementation for the xattr plugin infrastructure */
-+static inline struct xattr_handler *
-+find_xattr_handler_prefix(struct xattr_handler **handlers,
-+ const char *name)
- {
+-{
- struct dentry *dir;
- int err = 0;
- struct reiserfs_chown_buf buf;
- unsigned int ia_valid = attrs->ia_valid;
-+ struct xattr_handler *xah;
-
+-
- /* Skip out, an xattr has no xattrs associated with it */
- if (is_reiserfs_priv_object(inode) ||
- get_inode_sd_version(inode) == STAT_DATA_V1 ||
- dput(dir);
- goto out;
- }
-+ if (!handlers)
-+ return NULL;
-
+-
- lock_kernel();
-
- attrs->ia_valid &= (ATTR_UID | ATTR_GID | ATTR_CTIME);
- if (err) {
- unlock_kernel();
- goto out_dir;
-+ for_each_xattr_handler(handlers, xah) {
-+ if (strncmp(xah->prefix, name, strlen(xah->prefix)) == 0)
-+ break;
- }
-
+- }
+-
- err = notify_change(dir, attrs);
- unlock_kernel();
-
-
- out:
- attrs->ia_valid = ia_valid;
-- return err;
-+ return xah;
++out:
+ return err;
}
--/* Actual operations that are exported to VFS-land */
+ /* Actual operations that are exported to VFS-land */
++struct xattr_handler *reiserfs_xattr_handlers[] = {
++ &reiserfs_xattr_user_handler,
++ &reiserfs_xattr_trusted_handler,
++#ifdef CONFIG_REISERFS_FS_SECURITY
++ &reiserfs_xattr_security_handler,
++#endif
++#ifdef CONFIG_REISERFS_FS_POSIX_ACL
++ &reiserfs_posix_acl_access_handler,
++ &reiserfs_posix_acl_default_handler,
++#endif
++ NULL
++};
++
++/*
++ * In order to implement different sets of xattr operations for each xattr
++ * prefix with the generic xattr API, a filesystem should create a
++ * null-terminated array of struct xattr_handler (one for each prefix) and
++ * hang a pointer to it off of the s_xattr field of the superblock.
++ *
++ * The generic_fooxattr() functions will use this list to dispatch xattr
++ * operations to the correct xattr_handler.
++ */
++#define for_each_xattr_handler(handlers, handler) \
++ for ((handler) = *(handlers)++; \
++ (handler) != NULL; \
++ (handler) = *(handlers)++)
++
++/* This is the implementation for the xattr plugin infrastructure */
++static inline struct xattr_handler *
++find_xattr_handler_prefix(struct xattr_handler **handlers,
++ const char *name)
++{
++ struct xattr_handler *xah;
++
++ if (!handlers)
++ return NULL;
++
++ for_each_xattr_handler(handlers, xah) {
++ if (strncmp(xah->prefix, name, strlen(xah->prefix)) == 0)
++ break;
++ }
++
++ return xah;
++}
++
/*
* Inode operation getxattr()
}
/*
-@@ -879,27 +759,15 @@ int
+@@ -879,27 +759,15 @@
reiserfs_setxattr(struct dentry *dentry, const char *name, const void *value,
size_t size, int flags)
{
}
/*
-@@ -909,86 +777,66 @@ reiserfs_setxattr(struct dentry *dentry,
+@@ -909,86 +777,66 @@
*/
int reiserfs_removexattr(struct dentry *dentry, const char *name)
{
- find_xattr_handler_prefix(name);
- if (!xah)
- return 0; /* Unsupported xattr name, skip it */
--
-- /* We call ->list() twice because the operation isn't required to just
-- * return the name back - we want to make sure we have enough space */
-- len += xah->list(b->r_inode, name, namelen, NULL);
--
-- if (len) {
-- if (b->r_pos + len + 1 <= b->r_size) {
-- char *p = b->r_buf + b->r_pos;
-- p += xah->list(b->r_inode, name, namelen, p);
-- *p++ = '\0';
-- }
-- b->r_pos += len + 1;
+ struct listxattr_buf *b = (struct listxattr_buf *)buf;
+ size_t size;
+ if (name[0] != '.' ||
+ return -ERANGE;
+ } else {
+ size = handler->list(b->inode, NULL, 0, name, namelen);
- }
-- }
++ }
+- /* We call ->list() twice because the operation isn't required to just
+- * return the name back - we want to make sure we have enough space */
+- len += xah->list(b->r_inode, name, namelen, NULL);
+-
+- if (len) {
+- if (b->r_pos + len + 1 <= b->r_size) {
+- char *p = b->r_buf + b->r_pos;
+- p += xah->list(b->r_inode, name, namelen, p);
+- *p++ = '\0';
+- }
+- b->r_pos += len + 1;
+- }
+ b->pos += size;
-+ }
+ }
+-
return 0;
}
if (!dentry->d_inode)
return -EINVAL;
-@@ -997,130 +845,104 @@ ssize_t reiserfs_listxattr(struct dentry
+@@ -997,129 +845,103 @@
get_inode_sd_version(dentry->d_inode) == STAT_DATA_V1)
return -EOPNOTSUPP;
+ mutex_unlock(&dir->d_inode->i_mutex);
- REISERFS_I(dentry->d_inode)->i_flags |= i_has_xattr_dir;
--
++ if (!err)
++ err = buf.pos;
+
- err = xattr_readdir(dir->d_inode, reiserfs_listxattr_filler, &buf);
- if (err)
- goto out_dir;
- err = -ERANGE;
- else
- err = buf.r_pos;
-+ if (!err)
-+ err = buf.pos;
-
+-
- out_dir:
dput(dir);
-
-/* This is the implementation for the xattr plugin infrastructure */
-static LIST_HEAD(xattr_handlers);
-static DEFINE_RWLOCK(handler_lock);
--
++static int reiserfs_check_acl(struct inode *inode, int mask)
++{
++ struct posix_acl *acl;
++ int error = -EAGAIN; /* do regular unix permission checks by default */
+
-static struct reiserfs_xattr_handler *find_xattr_handler_prefix(const char
- *prefix)
-+static int reiserfs_check_acl(struct inode *inode, int mask)
- {
+-{
- struct reiserfs_xattr_handler *xah = NULL;
- struct list_head *p;
-+ struct posix_acl *acl;
-+ int error = -EAGAIN; /* do regular unix permission checks by default */
++ acl = reiserfs_get_acl(inode, ACL_TYPE_ACCESS);
- read_lock(&handler_lock);
- list_for_each(p, &xattr_handlers) {
- if (strncmp(xah->prefix, prefix, strlen(xah->prefix)) == 0)
- break;
- xah = NULL;
-+ acl = reiserfs_get_acl(inode, ACL_TYPE_ACCESS);
-+
+ if (acl) {
+ if (!IS_ERR(acl)) {
+ error = posix_acl_permission(inode, acl, mask);
- if (!list_empty(&xattr_handlers)) {
- write_unlock(&handler_lock);
- return 0;
-- }
--
++ int err;
++ struct inode *inode = dentry->d_parent->d_inode;
++ mutex_lock_nested(&inode->i_mutex, I_MUTEX_XATTR);
++ err = xattr_mkdir(inode, dentry, 0700);
++ mutex_unlock(&inode->i_mutex);
++ if (err) {
++ dput(dentry);
++ dentry = NULL;
+ }
+
- /* Add the handlers */
- list_add_tail(&user_handler.handlers, &xattr_handlers);
- list_add_tail(&trusted_handler.handlers, &xattr_handlers);
- list_add_tail(&posix_acl_access_handler.handlers, &xattr_handlers);
- list_add_tail(&posix_acl_default_handler.handlers, &xattr_handlers);
-#endif
--
++ if (dentry && dentry->d_inode)
++ reiserfs_info(dentry->d_sb, "Created %s - reserved for xattr "
++ "storage.\n", PRIVROOT_NAME);
+
- /* Run initializers, if available */
- list_for_each(p, &xattr_handlers) {
- xah = list_entry(p, struct reiserfs_xattr_handler, handlers);
- list_del_init(p);
- break;
- }
-- }
-+ int err;
-+ struct inode *inode = dentry->d_parent->d_inode;
-+ mutex_lock_nested(&inode->i_mutex, I_MUTEX_XATTR);
-+ err = xattr_mkdir(inode, dentry, 0700);
-+ mutex_unlock(&inode->i_mutex);
-+ if (err) {
-+ dput(dentry);
-+ dentry = NULL;
- }
-
-- /* Clean up other handlers, if any failed */
-- if (err)
-- __unregister_handlers();
-+ if (dentry && dentry->d_inode)
-+ reiserfs_info(dentry->d_sb, "Created %s - reserved for xattr "
-+ "storage.\n", PRIVROOT_NAME);
-
-- write_unlock(&handler_lock);
- return err;
- }
-
--void reiserfs_xattr_unregister_handlers(void)
++ return err;
++}
++
+static int xattr_mount_check(struct super_block *s)
- {
-- write_lock(&handler_lock);
-- __unregister_handlers();
-- write_unlock(&handler_lock);
++{
+ /* We need generation numbers to ensure that the oid mapping is correct
+ * v3.5 filesystems don't have them. */
+ if (old_format_only(s)) {
+ "on pre-v3.6 format filesystems. "
+ "Failing mount.");
+ return -EOPNOTSUPP;
-+ }
-+ }
-+
+ }
+ }
+
+- /* Clean up other handlers, if any failed */
+- if (err)
+- __unregister_handlers();
+-
+- write_unlock(&handler_lock);
+- return err;
+ return 0;
}
+-void reiserfs_xattr_unregister_handlers(void)
+-{
+- write_lock(&handler_lock);
+- __unregister_handlers();
+- write_unlock(&handler_lock);
+-}
+#else
+int __init reiserfs_xattr_register_handlers(void) { return 0; }
+void reiserfs_xattr_unregister_handlers(void) {}
+#endif
-+
+
/* This will catch lookups from the fs root to .reiserfs_priv */
static int
- xattr_lookup_poison(struct dentry *dentry, struct qstr *q1, struct qstr *name)
-@@ -1147,48 +969,23 @@ int reiserfs_xattr_init(struct super_blo
+@@ -1147,48 +969,23 @@
{
int err = 0;
dput(dentry);
dentry = NULL;
}
-@@ -1197,73 +994,41 @@ int reiserfs_xattr_init(struct super_blo
+@@ -1197,73 +994,41 @@
if (!err && dentry) {
s->s_root->d_op = &xattr_lookup_poison_ops;
- else
- return generic_permission(inode, mask, reiserfs_check_acl);
-}
-diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/xattr_acl.c
---- linux-2.6.27/fs/reiserfs/xattr_acl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/xattr_acl.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/xattr_acl.c
+--- a/fs/reiserfs/xattr_acl.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/xattr_acl.c Wed May 06 16:56:52 2009 +0100
@@ -10,15 +10,17 @@
#include <linux/reiserfs_acl.h>
#include <asm/uaccess.h>
if (!reiserfs_posixacl(inode->i_sb))
return -EOPNOTSUPP;
if (!is_owner_or_cap(inode))
-@@ -36,7 +38,21 @@ xattr_set_acl(struct inode *inode, int t
+@@ -36,7 +38,21 @@
} else
acl = NULL;
release_and_out:
posix_acl_release(acl);
-@@ -172,6 +188,29 @@ static void *posix_acl_to_disk(const str
+@@ -172,6 +188,29 @@
return ERR_PTR(-EINVAL);
}
/*
* Inode operation get_posix_acl().
*
-@@ -199,11 +238,11 @@ struct posix_acl *reiserfs_get_acl(struc
+@@ -199,11 +238,11 @@
return ERR_PTR(-EINVAL);
}
size = reiserfs_xattr_get(inode, name, NULL, 0);
if (size < 0) {
-@@ -229,7 +268,7 @@ struct posix_acl *reiserfs_get_acl(struc
+@@ -229,7 +268,7 @@
} else {
acl = posix_acl_from_disk(value, retval);
if (!IS_ERR(acl))
}
kfree(value);
-@@ -243,12 +282,13 @@ struct posix_acl *reiserfs_get_acl(struc
+@@ -243,12 +282,13 @@
* BKL held [before 2.5.x]
*/
static int
int error;
struct reiserfs_inode_info *reiserfs_i = REISERFS_I(inode);
-@@ -285,31 +325,28 @@ reiserfs_set_acl(struct inode *inode, in
+@@ -285,31 +325,28 @@
value = posix_acl_to_disk(acl, &size);
if (IS_ERR(value))
return (int)PTR_ERR(value);
return error;
}
-@@ -317,7 +354,8 @@ reiserfs_set_acl(struct inode *inode, in
+@@ -317,7 +354,8 @@
/* dir->i_mutex: locked,
* inode is new and not released into the wild yet */
int
struct inode *inode)
{
struct posix_acl *acl;
-@@ -335,8 +373,8 @@ reiserfs_inherit_default_acl(struct inod
+@@ -335,8 +373,8 @@
/* Don't apply ACLs to objects in the .reiserfs_priv tree.. This
* would be useless since permissions are ignored, and a pain because
* it introduces locking cycles */
goto apply_umask;
}
-@@ -354,7 +392,8 @@ reiserfs_inherit_default_acl(struct inod
+@@ -354,7 +392,8 @@
/* Copy the default ACL to the default ACL of a new directory */
if (S_ISDIR(inode->i_mode)) {
if (err)
goto cleanup;
}
-@@ -375,9 +414,9 @@ reiserfs_inherit_default_acl(struct inod
+@@ -375,9 +414,9 @@
/* If we need an ACL.. */
if (need_acl > 0) {
if (err)
goto cleanup_copy;
}
-@@ -395,25 +434,45 @@ reiserfs_inherit_default_acl(struct inod
+@@ -395,25 +434,45 @@
return err;
}
}
int reiserfs_acl_chmod(struct inode *inode)
-@@ -429,9 +488,7 @@ int reiserfs_acl_chmod(struct inode *ino
+@@ -429,9 +488,7 @@
return 0;
}
if (!acl)
return 0;
if (IS_ERR(acl))
-@@ -442,18 +499,20 @@ int reiserfs_acl_chmod(struct inode *ino
+@@ -442,18 +499,20 @@
return -ENOMEM;
error = posix_acl_chmod_masq(clone, inode->i_mode);
if (!error) {
}
posix_acl_release(clone);
return error;
-@@ -477,38 +536,22 @@ posix_acl_access_set(struct inode *inode
+@@ -477,38 +536,22 @@
return xattr_set_acl(inode, ACL_TYPE_ACCESS, value, size);
}
- }
-
- return 0;
--}
--
++ const size_t size = sizeof(POSIX_ACL_XATTR_ACCESS);
++ if (!reiserfs_posixacl(inode->i_sb))
++ return 0;
++ if (list && size <= list_size)
++ memcpy(list, POSIX_ACL_XATTR_ACCESS, size);
++ return size;
+ }
+
-static int
-posix_acl_access_list(struct inode *inode, const char *name, int namelen,
- char *out)
-{
- int len = namelen;
-+ const size_t size = sizeof(POSIX_ACL_XATTR_ACCESS);
- if (!reiserfs_posixacl(inode->i_sb))
- return 0;
+- if (!reiserfs_posixacl(inode->i_sb))
+- return 0;
- if (out)
- memcpy(out, name, len);
-
- return len;
-+ if (list && size <= list_size)
-+ memcpy(list, POSIX_ACL_XATTR_ACCESS, size);
-+ return size;
- }
-
+-}
+-
-struct reiserfs_xattr_handler posix_acl_access_handler = {
+struct xattr_handler reiserfs_posix_acl_access_handler = {
.prefix = POSIX_ACL_XATTR_ACCESS,
.list = posix_acl_access_list,
};
-@@ -530,37 +573,21 @@ posix_acl_default_set(struct inode *inod
+@@ -530,37 +573,21 @@
return xattr_set_acl(inode, ACL_TYPE_DEFAULT, value, size);
}
- }
-
- return 0;
--}
--
++ const size_t size = sizeof(POSIX_ACL_XATTR_DEFAULT);
++ if (!reiserfs_posixacl(inode->i_sb))
++ return 0;
++ if (list && size <= list_size)
++ memcpy(list, POSIX_ACL_XATTR_DEFAULT, size);
++ return size;
+ }
+
-static int
-posix_acl_default_list(struct inode *inode, const char *name, int namelen,
- char *out)
-{
- int len = namelen;
-+ const size_t size = sizeof(POSIX_ACL_XATTR_DEFAULT);
- if (!reiserfs_posixacl(inode->i_sb))
- return 0;
+- if (!reiserfs_posixacl(inode->i_sb))
+- return 0;
- if (out)
- memcpy(out, name, len);
-
- return len;
-+ if (list && size <= list_size)
-+ memcpy(list, POSIX_ACL_XATTR_DEFAULT, size);
-+ return size;
- }
-
+-}
+-
-struct reiserfs_xattr_handler posix_acl_default_handler = {
+struct xattr_handler reiserfs_posix_acl_default_handler = {
.prefix = POSIX_ACL_XATTR_DEFAULT,
- .del = posix_acl_default_del,
.list = posix_acl_default_list,
};
-diff -purN linux-2.6.27/fs/reiserfs/xattr_security.c linux-2.6.27.19-5.1/fs/reiserfs/xattr_security.c
---- linux-2.6.27/fs/reiserfs/xattr_security.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/xattr_security.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/xattr_security.c
+--- a/fs/reiserfs/xattr_security.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/xattr_security.c Wed May 06 16:56:52 2009 +0100
@@ -4,6 +4,7 @@
#include <linux/pagemap.h>
#include <linux/xattr.h>
#include <asm/uaccess.h>
static int
-@@ -12,7 +13,7 @@ security_get(struct inode *inode, const
+@@ -12,7 +13,7 @@
if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX))
return -EINVAL;
return -EPERM;
return reiserfs_xattr_get(inode, name, buffer, size);
-@@ -25,41 +26,84 @@ security_set(struct inode *inode, const
+@@ -25,41 +26,84 @@
if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX))
return -EINVAL;
- if (is_reiserfs_priv_object(inode))
- return -EPERM;
+-
+- return 0;
+-}
+-
+-static int
+-security_list(struct inode *inode, const char *name, int namelen, char *out)
+-{
+- int len = namelen;
+-
+- if (is_reiserfs_priv_object(inode))
+ if (IS_PRIVATE(inode))
-+ return 0;
+ return 0;
-- return 0;
+- if (out)
+- memcpy(out, name, len);
+ if (list && len <= list_len) {
+ memcpy(list, name, namelen);
+ list[namelen] = '\0';
+ }
-+
-+ return len;
+
+ return len;
}
--static int
--security_list(struct inode *inode, const char *name, int namelen, char *out)
+-struct reiserfs_xattr_handler security_handler = {
+/* Initializes the security context for a new inode and returns the number
+ * of blocks needed for the transaction. If successful, reiserfs_security
+ * must be released using reiserfs_security_free when the caller is done. */
+int reiserfs_security_init(struct inode *dir, struct inode *inode,
+ struct reiserfs_security_handle *sec)
- {
-- int len = namelen;
++{
+ int blocks = 0;
+ int error = security_inode_init_security(inode, dir, &sec->name,
+ &sec->value, &sec->length);
+ }
+ return blocks;
+}
-
-- if (is_reiserfs_priv_object(inode))
-- return 0;
++
+int reiserfs_security_write(struct reiserfs_transaction_handle *th,
+ struct inode *inode,
+ struct reiserfs_security_handle *sec)
+ int error;
+ if (strlen(sec->name) < sizeof(XATTR_SECURITY_PREFIX))
+ return -EINVAL;
-
-- if (out)
-- memcpy(out, name, len);
++
+ error = reiserfs_xattr_set_handle(th, inode, sec->name, sec->value,
+ sec->length, XATTR_CREATE);
+ if (error == -ENODATA || error == -EOPNOTSUPP)
+ error = 0;
-
-- return len;
++
+ return error;
+}
+
+ kfree(sec->value);
+ sec->name = NULL;
+ sec->value = NULL;
- }
-
--struct reiserfs_xattr_handler security_handler = {
++}
++
+struct xattr_handler reiserfs_xattr_security_handler = {
.prefix = XATTR_SECURITY_PREFIX,
.get = security_get,
- .del = security_del,
.list = security_list,
};
-diff -purN linux-2.6.27/fs/reiserfs/xattr_trusted.c linux-2.6.27.19-5.1/fs/reiserfs/xattr_trusted.c
---- linux-2.6.27/fs/reiserfs/xattr_trusted.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/xattr_trusted.c 2009-03-25 16:11:37.000000000 +0000
-@@ -13,10 +13,7 @@ trusted_get(struct inode *inode, const c
+diff -r 9608d5473017 fs/reiserfs/xattr_trusted.c
+--- a/fs/reiserfs/xattr_trusted.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/xattr_trusted.c Wed May 06 16:56:52 2009 +0100
+@@ -13,10 +13,7 @@
if (strlen(name) < sizeof(XATTR_TRUSTED_PREFIX))
return -EINVAL;
return -EPERM;
return reiserfs_xattr_get(inode, name, buffer, size);
-@@ -29,50 +26,30 @@ trusted_set(struct inode *inode, const c
+@@ -29,50 +26,30 @@
if (strlen(name) < sizeof(XATTR_TRUSTED_PREFIX))
return -EINVAL;
- .del = trusted_del,
.list = trusted_list,
};
-diff -purN linux-2.6.27/fs/reiserfs/xattr_user.c linux-2.6.27.19-5.1/fs/reiserfs/xattr_user.c
---- linux-2.6.27/fs/reiserfs/xattr_user.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/xattr_user.c 2009-03-25 16:11:37.000000000 +0000
-@@ -6,10 +6,6 @@
+diff -r 9608d5473017 fs/reiserfs/xattr_user.c
+--- a/fs/reiserfs/xattr_user.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/xattr_user.c Wed May 06 16:56:52 2009 +0100
+@@ -5,10 +5,6 @@
+ #include <linux/xattr.h>
#include <linux/reiserfs_xattr.h>
#include <asm/uaccess.h>
-
+-
-#ifdef CONFIG_REISERFS_FS_POSIX_ACL
-# include <linux/reiserfs_acl.h>
-#endif
--
+
static int
user_get(struct inode *inode, const char *name, void *buffer, size_t size)
- {
-@@ -25,7 +21,6 @@ static int
+@@ -25,7 +21,6 @@
user_set(struct inode *inode, const char *name, const void *buffer,
size_t size, int flags)
{
if (strlen(name) < sizeof(XATTR_USER_PREFIX))
return -EINVAL;
-@@ -34,33 +29,23 @@ user_set(struct inode *inode, const char
+@@ -34,33 +29,23 @@
return reiserfs_xattr_set(inode, name, buffer, size, flags);
}
{
- if (strlen(name) < sizeof(XATTR_USER_PREFIX))
- return -EINVAL;
--
-- if (!reiserfs_xattrs_user(inode->i_sb))
++ const size_t len = name_len + 1;
+
+ if (!reiserfs_xattrs_user(inode->i_sb))
- return -EOPNOTSUPP;
- return 0;
-}
-+ const size_t len = name_len + 1;
-
+-
-static int
-user_list(struct inode *inode, const char *name, int namelen, char *out)
-{
- int len = namelen;
- if (!reiserfs_xattrs_user(inode->i_sb))
+- if (!reiserfs_xattrs_user(inode->i_sb))
return 0;
-
- if (out)
- .del = user_del,
.list = user_list,
};
-diff -purN linux-2.6.27/fs/select.c linux-2.6.27.19-5.1/fs/select.c
---- linux-2.6.27/fs/select.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/select.c 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/select.c
+--- a/fs/select.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/select.c Wed May 06 16:56:52 2009 +0100
@@ -24,6 +24,7 @@
#include <linux/fdtable.h>
#include <linux/fs.h>
#include <asm/uaccess.h>
-@@ -232,6 +233,7 @@ int do_select(int n, fd_set_bits *fds, s
+@@ -232,6 +233,7 @@
file = fget_light(i, &fput_needed);
if (file) {
f_op = file->f_op;
mask = DEFAULT_POLLMASK;
if (f_op && f_op->poll)
mask = (*f_op->poll)(file, retval ? NULL : wait);
-@@ -374,8 +376,8 @@ out_nofds:
+@@ -374,8 +376,8 @@
return ret;
}
{
s64 timeout = -1;
struct timeval tv;
-@@ -427,9 +429,9 @@ sticky:
+@@ -427,9 +429,9 @@
}
#ifdef HAVE_SET_RESTORE_SIGMASK
{
s64 timeout = MAX_SCHEDULE_TIMEOUT;
sigset_t ksigmask, sigsaved;
-@@ -513,8 +515,9 @@ sticky:
+@@ -513,8 +515,9 @@
* which has a pointer to the sigset_t itself followed by a size_t containing
* the sigset size.
*/
{
size_t sigsetsize = 0;
sigset_t __user *up = NULL;
-@@ -527,7 +530,7 @@ asmlinkage long sys_pselect6(int n, fd_s
+@@ -527,7 +530,7 @@
return -EFAULT;
}
}
#endif /* HAVE_SET_RESTORE_SIGMASK */
-@@ -560,6 +563,7 @@ static inline unsigned int do_pollfd(str
+@@ -560,6 +563,7 @@
file = fget_light(fd, &fput_needed);
mask = POLLNVAL;
if (file != NULL) {
mask = DEFAULT_POLLMASK;
if (file->f_op && file->f_op->poll)
mask = file->f_op->poll(file, pwait);
-@@ -727,8 +731,8 @@ static long do_restart_poll(struct resta
+@@ -727,8 +731,8 @@
return ret;
}
{
s64 timeout_jiffies;
int ret;
-@@ -761,9 +765,9 @@ asmlinkage long sys_poll(struct pollfd _
+@@ -761,9 +765,9 @@
}
#ifdef HAVE_SET_RESTORE_SIGMASK
{
sigset_t ksigmask, sigsaved;
struct timespec ts;
-diff -purN linux-2.6.27/fs/seq_file.c linux-2.6.27.19-5.1/fs/seq_file.c
---- linux-2.6.27/fs/seq_file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/seq_file.c 2009-03-25 16:11:39.000000000 +0000
-@@ -54,6 +54,64 @@ int seq_open(struct file *file, const st
+diff -r 9608d5473017 fs/seq_file.c
+--- a/fs/seq_file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/seq_file.c Wed May 06 16:56:52 2009 +0100
+@@ -53,6 +53,64 @@
+ return 0;
}
EXPORT_SYMBOL(seq_open);
-
++
+static int traverse(struct seq_file *m, loff_t offset)
+{
+ loff_t pos = 0, index;
+ m->buf = kmalloc(m->size <<= 1, GFP_KERNEL);
+ return !m->buf ? -ENOMEM : -EAGAIN;
+}
-+
+
/**
* seq_read - ->read() method for sequential files.
- * @file: the file to read from
-@@ -186,63 +244,6 @@ Efault:
+@@ -185,63 +243,6 @@
+ goto Done;
}
EXPORT_SYMBOL(seq_read);
-
+-
-static int traverse(struct seq_file *m, loff_t offset)
-{
- loff_t pos = 0, index;
- m->buf = kmalloc(m->size <<= 1, GFP_KERNEL);
- return !m->buf ? -ENOMEM : -EAGAIN;
-}
--
+
/**
* seq_lseek - ->llseek() method for sequential files.
- * @file: the file in question
-@@ -412,9 +413,7 @@ int seq_path_root(struct seq_file *m, st
+@@ -412,9 +413,7 @@
char *s = m->buf + m->count;
char *p;
err = PTR_ERR(p);
if (!IS_ERR(p)) {
s = mangle_path(s, p, esc);
-diff -purN linux-2.6.27/fs/signalfd.c linux-2.6.27.19-5.1/fs/signalfd.c
---- linux-2.6.27/fs/signalfd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/signalfd.c 2009-03-25 16:11:36.000000000 +0000
-@@ -205,8 +205,8 @@ static const struct file_operations sign
+diff -r 9608d5473017 fs/signalfd.c
+--- a/fs/signalfd.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/signalfd.c Wed May 06 16:56:52 2009 +0100
+@@ -205,8 +205,8 @@
.read = signalfd_read,
};
{
sigset_t sigmask;
struct signalfd_ctx *ctx;
-@@ -259,8 +259,8 @@ asmlinkage long sys_signalfd4(int ufd, s
+@@ -259,8 +259,8 @@
return ufd;
}
{
return sys_signalfd4(ufd, user_mask, sizemask, 0);
}
-diff -purN linux-2.6.27/fs/smbfs/file.c linux-2.6.27.19-5.1/fs/smbfs/file.c
---- linux-2.6.27/fs/smbfs/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/smbfs/file.c 2009-03-25 16:11:35.000000000 +0000
-@@ -297,7 +297,7 @@ static int smb_write_begin(struct file *
+diff -r 9608d5473017 fs/smbfs/file.c
+--- a/fs/smbfs/file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/smbfs/file.c Wed May 06 16:56:52 2009 +0100
+@@ -297,7 +297,7 @@
struct page **pagep, void **fsdata)
{
pgoff_t index = pos >> PAGE_CACHE_SHIFT;
if (!*pagep)
return -ENOMEM;
return 0;
-diff -purN linux-2.6.27/fs/splice.c linux-2.6.27.19-5.1/fs/splice.c
---- linux-2.6.27/fs/splice.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/splice.c 2009-03-25 16:11:38.000000000 +0000
-@@ -1434,8 +1434,8 @@ static long vmsplice_to_pipe(struct file
+diff -r 9608d5473017 fs/splice.c
+--- a/fs/splice.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/splice.c Wed May 06 16:56:52 2009 +0100
+@@ -1434,8 +1434,8 @@
* Currently we punt and implement it as a normal copy, see pipe_to_user().
*
*/
{
struct file *file;
long error;
-@@ -1460,9 +1460,9 @@ asmlinkage long sys_vmsplice(int fd, con
+@@ -1460,9 +1460,9 @@
return error;
}
{
long error;
struct file *in, *out;
-@@ -1684,7 +1684,7 @@ static long do_tee(struct file *in, stru
+@@ -1684,7 +1684,7 @@
return ret;
}
{
struct file *in;
int error, fput_in;
-diff -purN linux-2.6.27/fs/squashfs/Makefile linux-2.6.27.19-5.1/fs/squashfs/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/squashfs/Makefile 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/squashfs/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/squashfs/Makefile Wed May 06 16:56:52 2009 +0100
@@ -0,0 +1,7 @@
+#
+# Makefile for the linux squashfs routines.
+obj-$(CONFIG_SQUASHFS) += squashfs.o
+squashfs-y += inode.o
+squashfs-y += squashfs2_0.o
-diff -purN linux-2.6.27/fs/squashfs/inode.c linux-2.6.27.19-5.1/fs/squashfs/inode.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/squashfs/inode.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/squashfs/inode.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/squashfs/inode.c Wed May 06 16:56:52 2009 +0100
@@ -0,0 +1,2174 @@
+/*
+ * Squashfs - a compressed read only filesystem for Linux
+MODULE_DESCRIPTION("squashfs 3.4, a compressed read-only filesystem");
+MODULE_AUTHOR("Phillip Lougher <phillip@lougher.demon.co.uk>");
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/fs/squashfs/squashfs.h linux-2.6.27.19-5.1/fs/squashfs/squashfs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/squashfs/squashfs.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/squashfs/squashfs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/squashfs/squashfs.h Wed May 06 16:56:52 2009 +0100
@@ -0,0 +1,86 @@
+/*
+ * Squashfs - a compressed read only filesystem for Linux
+ return 0;
+}
+#endif
-diff -purN linux-2.6.27/fs/squashfs/squashfs2_0.c linux-2.6.27.19-5.1/fs/squashfs/squashfs2_0.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/squashfs/squashfs2_0.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/squashfs/squashfs2_0.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/squashfs/squashfs2_0.c Wed May 06 16:56:52 2009 +0100
@@ -0,0 +1,740 @@
+/*
+ * Squashfs - a compressed read only filesystem for Linux
+
+ return 1;
+}
-diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
---- linux-2.6.27/fs/stat.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/stat.c 2009-03-25 16:11:39.000000000 +0000
-@@ -152,7 +152,7 @@ static int cp_old_stat(struct kstat *sta
+diff -r 9608d5473017 fs/stat.c
+--- a/fs/stat.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/stat.c Wed May 06 16:56:52 2009 +0100
+@@ -152,7 +152,7 @@
return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
}
{
struct kstat stat;
int error = vfs_stat_fd(AT_FDCWD, filename, &stat);
-@@ -162,7 +162,8 @@ asmlinkage long sys_stat(char __user * f
+@@ -162,7 +162,8 @@
return error;
}
{
struct kstat stat;
int error = vfs_lstat_fd(AT_FDCWD, filename, &stat);
-@@ -172,7 +173,8 @@ asmlinkage long sys_lstat(char __user *
+@@ -172,7 +173,8 @@
return error;
}
{
struct kstat stat;
int error = vfs_fstat(fd, &stat);
-@@ -235,7 +237,7 @@ static int cp_new_stat(struct kstat *sta
+@@ -235,7 +237,7 @@
return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
}
{
struct kstat stat;
int error = vfs_stat_fd(AT_FDCWD, filename, &stat);
-@@ -246,7 +248,7 @@ asmlinkage long sys_newstat(char __user
+@@ -246,7 +248,7 @@
return error;
}
{
struct kstat stat;
int error = vfs_lstat_fd(AT_FDCWD, filename, &stat);
-@@ -258,8 +260,8 @@ asmlinkage long sys_newlstat(char __user
+@@ -258,8 +260,8 @@
}
#if !defined(__ARCH_WANT_STAT64) || defined(__ARCH_WANT_SYS_NEWFSTATAT)
{
struct kstat stat;
int error = -EINVAL;
-@@ -280,7 +282,7 @@ out:
+@@ -280,7 +282,7 @@
}
#endif
{
struct kstat stat;
int error = vfs_fstat(fd, &stat);
-@@ -291,8 +293,8 @@ asmlinkage long sys_newfstat(unsigned in
+@@ -291,8 +293,8 @@
return error;
}
{
struct path path;
int error;
-@@ -306,7 +308,7 @@ asmlinkage long sys_readlinkat(int dfd,
+@@ -306,7 +308,7 @@
error = -EINVAL;
if (inode->i_op && inode->i_op->readlink) {
if (!error) {
touch_atime(path.mnt, path.dentry);
error = inode->i_op->readlink(path.dentry,
-@@ -318,8 +320,8 @@ asmlinkage long sys_readlinkat(int dfd,
+@@ -318,8 +320,8 @@
return error;
}
{
return sys_readlinkat(AT_FDCWD, path, buf, bufsiz);
}
-@@ -365,7 +367,7 @@ static long cp_new_stat64(struct kstat *
+@@ -365,7 +367,7 @@
return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
}
{
struct kstat stat;
int error = vfs_stat(filename, &stat);
-@@ -375,7 +377,8 @@ asmlinkage long sys_stat64(char __user *
+@@ -375,7 +377,8 @@
return error;
}
{
struct kstat stat;
int error = vfs_lstat(filename, &stat);
-@@ -385,7 +388,8 @@ asmlinkage long sys_lstat64(char __user
+@@ -385,7 +388,8 @@
return error;
}
{
struct kstat stat;
int error = vfs_fstat(fd, &stat);
-@@ -396,8 +400,8 @@ asmlinkage long sys_fstat64(unsigned lon
+@@ -396,8 +400,8 @@
return error;
}
{
struct kstat stat;
int error = -EINVAL;
-diff -purN linux-2.6.27/fs/super.c linux-2.6.27.19-5.1/fs/super.c
---- linux-2.6.27/fs/super.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/super.c 2009-03-25 16:11:37.000000000 +0000
-@@ -534,7 +534,7 @@ rescan:
+diff -r 9608d5473017 fs/super.c
+--- a/fs/super.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/super.c Wed May 06 16:56:52 2009 +0100
+@@ -534,7 +534,7 @@
return NULL;
}
{
struct super_block *s;
struct ustat tmp;
-@@ -597,16 +597,10 @@ retry:
+@@ -597,16 +597,10 @@
file_list_unlock();
}
{
int retval;
int remount_rw;
-@@ -617,13 +611,14 @@ int do_remount_sb(struct super_block *sb
+@@ -617,13 +611,14 @@
#endif
if (flags & MS_RDONLY)
acct_auto_close(sb);
mark_files_ro(sb);
else if (!fs_may_remount_ro(sb))
return -EBUSY;
-@@ -646,6 +641,21 @@ int do_remount_sb(struct super_block *sb
+@@ -644,6 +639,21 @@
+ if (remount_rw)
+ DQUOT_ON_REMOUNT(sb);
return 0;
- }
-
++}
++
+/**
+ * do_remount_sb - asks filesystem to change mount options.
+ * @sb: superblock in question
+{
+ return __do_remount_sb(sb, flags, data,
+ REMOUNT_SHRINK_DCACHE|(force? REMOUNT_FORCE : 0));
-+}
-+
+ }
+
static void do_emergency_remount(unsigned long foo)
- {
- struct super_block *sb;
-@@ -877,7 +887,7 @@ int get_sb_single(struct file_system_typ
+@@ -877,7 +887,7 @@
}
s->s_flags |= MS_ACTIVE;
}
return simple_set_mnt(mnt, s);
}
-diff -purN linux-2.6.27/fs/sync.c linux-2.6.27.19-5.1/fs/sync.c
---- linux-2.6.27/fs/sync.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/sync.c 2009-03-25 16:11:39.000000000 +0000
-@@ -36,7 +36,7 @@ static void do_sync(unsigned long wait)
+diff -r 9608d5473017 fs/sync.c
+--- a/fs/sync.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/sync.c Wed May 06 16:56:52 2009 +0100
+@@ -36,7 +36,7 @@
laptop_sync_completion();
}
{
do_sync(1);
return 0;
-@@ -118,12 +118,12 @@ static long __do_fsync(unsigned int fd,
+@@ -118,12 +118,12 @@
return ret;
}
{
return __do_fsync(fd, 1);
}
-@@ -175,8 +175,8 @@ asmlinkage long sys_fdatasync(unsigned i
+@@ -175,8 +175,8 @@
* already-instantiated disk blocks, there are no guarantees here that the data
* will be available after a crash.
*/
{
int ret;
struct file *file;
-@@ -236,14 +236,32 @@ out_put:
+@@ -236,14 +236,32 @@
out:
return ret;
}
/*
* `endbyte' is inclusive
-@@ -269,7 +287,7 @@ int do_sync_mapping_range(struct address
+@@ -269,7 +287,7 @@
if (flags & SYNC_FILE_RANGE_WRITE) {
ret = __filemap_fdatawrite_range(mapping, offset, endbyte,
if (ret < 0)
goto out;
}
-diff -purN linux-2.6.27/fs/sysfs/bin.c linux-2.6.27.19-5.1/fs/sysfs/bin.c
---- linux-2.6.27/fs/sysfs/bin.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/sysfs/bin.c 2009-03-25 16:11:39.000000000 +0000
-@@ -62,6 +62,9 @@ read(struct file *file, char __user *use
+diff -r 9608d5473017 fs/sysfs/bin.c
+--- a/fs/sysfs/bin.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/sysfs/bin.c Wed May 06 16:56:52 2009 +0100
+@@ -62,6 +62,9 @@
loff_t offs = *off;
int count = min_t(size_t, bytes, PAGE_SIZE);
if (size) {
if (offs > size)
return 0;
-@@ -119,6 +122,9 @@ static ssize_t write(struct file *file,
+@@ -118,6 +121,9 @@
+ int size = dentry->d_inode->i_size;
loff_t offs = *off;
int count = min_t(size_t, bytes, PAGE_SIZE);
-
++
+ if (!bytes)
+ return 0;
-+
+
if (size) {
if (offs > size)
- return 0;
-diff -purN linux-2.6.27/fs/sysfs/file.c linux-2.6.27.19-5.1/fs/sysfs/file.c
---- linux-2.6.27/fs/sysfs/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/sysfs/file.c 2009-03-25 16:11:39.000000000 +0000
-@@ -16,6 +16,7 @@
+diff -r 9608d5473017 fs/sysfs/file.c
+--- a/fs/sysfs/file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/sysfs/file.c Wed May 06 16:56:52 2009 +0100
+@@ -16,12 +16,16 @@
#include <linux/slab.h>
#include <linux/fsnotify.h>
#include <linux/namei.h>
#include <linux/poll.h>
#include <linux/list.h>
#include <linux/mutex.h>
-@@ -23,6 +24,9 @@
+ #include <asm/uaccess.h>
#include "sysfs.h"
-
++
+/* used in crash dumps to help with debugging */
+static char last_sysfs_file[PATH_MAX];
-+
+
/*
* There's one sysfs_buffer for each open file and one
- * sysfs_open_dirent for each sysfs_dirent with one or more open
-@@ -328,6 +332,11 @@ static int sysfs_open_file(struct inode
+@@ -328,6 +332,11 @@
struct sysfs_buffer *buffer;
struct sysfs_ops *ops;
int error = -EACCES;
/* need attr_sd for attr and ops, its parent for kobj */
if (!sysfs_get_active_two(attr_sd))
-@@ -389,6 +398,11 @@ static int sysfs_open_file(struct inode
+@@ -387,6 +396,11 @@
+ err_out:
+ sysfs_put_active_two(attr_sd);
return error;
- }
-
++}
++
+void sysfs_printk_last_file(void)
+{
+ printk(KERN_EMERG "last sysfs file: %s\n", last_sysfs_file);
-+}
-+
+ }
+
static int sysfs_release(struct inode *inode, struct file *filp)
- {
- struct sysfs_dirent *sd = filp->f_path.dentry->d_fsdata;
-diff -purN linux-2.6.27/fs/sysfs/mount.c linux-2.6.27.19-5.1/fs/sysfs/mount.c
---- linux-2.6.27/fs/sysfs/mount.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/sysfs/mount.c 2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/sysfs/mount.c
+--- a/fs/sysfs/mount.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/sysfs/mount.c Wed May 06 16:56:52 2009 +0100
@@ -22,7 +22,7 @@
/* Random magic number */
#define SYSFS_MAGIC 0x62656572
struct super_block * sysfs_sb = NULL;
struct kmem_cache *sysfs_dir_cachep;
-diff -purN linux-2.6.27/fs/timerfd.c linux-2.6.27.19-5.1/fs/timerfd.c
---- linux-2.6.27/fs/timerfd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/timerfd.c 2009-03-25 16:11:39.000000000 +0000
-@@ -179,7 +179,7 @@ static struct file *timerfd_fget(int fd)
+diff -r 9608d5473017 fs/timerfd.c
+--- a/fs/timerfd.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/timerfd.c Wed May 06 16:56:52 2009 +0100
+@@ -179,7 +179,7 @@
return file;
}
{
int ufd;
struct timerfd_ctx *ctx;
-@@ -210,9 +210,9 @@ asmlinkage long sys_timerfd_create(int c
+@@ -210,9 +210,9 @@
return ufd;
}
{
struct file *file;
struct timerfd_ctx *ctx;
-@@ -267,7 +267,7 @@ asmlinkage long sys_timerfd_settime(int
+@@ -267,7 +267,7 @@
return 0;
}
{
struct file *file;
struct timerfd_ctx *ctx;
-diff -purN linux-2.6.27/fs/ubifs/file.c linux-2.6.27.19-5.1/fs/ubifs/file.c
---- linux-2.6.27/fs/ubifs/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ubifs/file.c 2009-03-25 16:11:32.000000000 +0000
-@@ -213,7 +213,8 @@ static void release_existing_page_budget
+diff -r 9608d5473017 fs/ubifs/file.c
+--- a/fs/ubifs/file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ubifs/file.c Wed May 06 16:56:52 2009 +0100
+@@ -213,7 +213,8 @@
}
static int write_begin_slow(struct address_space *mapping,
{
struct inode *inode = mapping->host;
struct ubifs_info *c = inode->i_sb->s_fs_info;
-@@ -241,7 +242,7 @@ static int write_begin_slow(struct addre
+@@ -241,7 +242,7 @@
if (unlikely(err))
return err;
if (unlikely(!page)) {
ubifs_release_budget(c, &req);
return -ENOMEM;
-@@ -432,7 +433,7 @@ static int ubifs_write_begin(struct file
+@@ -432,7 +433,7 @@
return -EROFS;
/* Try out the fast-path part first */
if (unlikely(!page))
return -ENOMEM;
-@@ -477,7 +478,7 @@ static int ubifs_write_begin(struct file
+@@ -477,7 +478,7 @@
unlock_page(page);
page_cache_release(page);
}
/*
-diff -purN linux-2.6.27/fs/utimes.c linux-2.6.27.19-5.1/fs/utimes.c
---- linux-2.6.27/fs/utimes.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/utimes.c 2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/utimes.c
+--- a/fs/utimes.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/utimes.c Wed May 06 16:56:52 2009 +0100
@@ -24,7 +24,7 @@
* must be owner or have write permission.
* Else, update from *times, must be owner or super user.
{
struct timespec tv[2];
-@@ -48,7 +48,8 @@ static bool nsec_valid(long nsec)
+@@ -48,7 +48,8 @@
return nsec >= 0 && nsec <= 999999999;
}
{
int error;
struct iattr newattrs;
-@@ -102,7 +103,7 @@ static int utimes_common(struct path *pa
+@@ -102,7 +103,7 @@
}
}
mutex_lock(&inode->i_mutex);
mutex_unlock(&inode->i_mutex);
mnt_drop_write_and_out:
-@@ -149,7 +150,7 @@ long do_utimes(int dfd, char __user *fil
+@@ -149,7 +150,7 @@
if (!file)
goto out;
fput(file);
} else {
struct path path;
-@@ -162,7 +163,7 @@ long do_utimes(int dfd, char __user *fil
+@@ -162,7 +163,7 @@
if (error)
goto out;
path_put(&path);
}
-@@ -170,7 +171,8 @@ out:
+@@ -170,7 +171,8 @@
return error;
}
{
struct timespec tstimes[2];
-@@ -187,7 +189,8 @@ asmlinkage long sys_utimensat(int dfd, c
+@@ -187,7 +189,8 @@
return do_utimes(dfd, filename, utimes ? tstimes : NULL, flags);
}
{
struct timeval times[2];
struct timespec tstimes[2];
-@@ -214,7 +217,8 @@ asmlinkage long sys_futimesat(int dfd, c
+@@ -214,7 +217,8 @@
return do_utimes(dfd, filename, utimes ? tstimes : NULL, 0);
}
{
return sys_futimesat(AT_FDCWD, filename, utimes);
}
-diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
---- linux-2.6.27/fs/xattr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xattr.c 2009-03-25 16:11:37.000000000 +0000
-@@ -67,8 +67,8 @@ xattr_permission(struct inode *inode, co
+diff -r 9608d5473017 fs/xattr.c
+--- a/fs/xattr.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/xattr.c Wed May 06 16:56:52 2009 +0100
+@@ -67,8 +67,8 @@
}
int
{
struct inode *inode = dentry->d_inode;
int error;
-@@ -78,7 +78,7 @@ vfs_setxattr(struct dentry *dentry, cons
+@@ -78,7 +78,7 @@
return error;
mutex_lock(&inode->i_mutex);
if (error)
goto out;
error = -EOPNOTSUPP;
-@@ -86,7 +86,7 @@ vfs_setxattr(struct dentry *dentry, cons
+@@ -86,7 +86,7 @@
error = inode->i_op->setxattr(dentry, name, value, size, flags);
if (!error) {
fsnotify_xattr(dentry);
size, flags);
}
} else if (!strncmp(name, XATTR_SECURITY_PREFIX,
-@@ -131,7 +131,8 @@ out_noalloc:
+@@ -131,7 +131,8 @@
EXPORT_SYMBOL_GPL(xattr_getsecurity);
ssize_t
{
struct inode *inode = dentry->d_inode;
int error;
-@@ -140,7 +141,7 @@ vfs_getxattr(struct dentry *dentry, cons
+@@ -140,7 +141,7 @@
if (error)
return error;
if (error)
return error;
-@@ -167,18 +168,20 @@ nolsm:
+@@ -167,18 +168,20 @@
EXPORT_SYMBOL_GPL(vfs_getxattr);
ssize_t
if (size && error > size)
error = -ERANGE;
}
-@@ -187,7 +190,8 @@ vfs_listxattr(struct dentry *d, char *li
+@@ -187,7 +190,8 @@
EXPORT_SYMBOL_GPL(vfs_listxattr);
int
{
struct inode *inode = dentry->d_inode;
int error;
-@@ -199,7 +203,7 @@ vfs_removexattr(struct dentry *dentry, c
+@@ -199,7 +203,7 @@
if (error)
return error;
if (error)
return error;
-@@ -218,8 +222,8 @@ EXPORT_SYMBOL_GPL(vfs_removexattr);
+@@ -218,8 +222,8 @@
* Extended attribute SET operations
*/
static long
{
int error;
void *kvalue = NULL;
-@@ -246,14 +250,14 @@ setxattr(struct dentry *d, const char __
+@@ -246,14 +250,14 @@
}
}
{
struct path path;
int error;
-@@ -263,16 +267,16 @@ sys_setxattr(const char __user *pathname
+@@ -263,16 +267,16 @@
return error;
error = mnt_want_write(path.mnt);
if (!error) {
{
struct path path;
int error;
-@@ -282,16 +286,15 @@ sys_lsetxattr(const char __user *pathnam
+@@ -282,16 +286,15 @@
return error;
error = mnt_want_write(path.mnt);
if (!error) {
{
struct file *f;
struct dentry *dentry;
-@@ -302,9 +305,10 @@ sys_fsetxattr(int fd, const char __user
+@@ -302,9 +305,10 @@
return error;
dentry = f->f_path.dentry;
audit_inode(NULL, dentry);
mnt_drop_write(f->f_path.mnt);
}
fput(f);
-@@ -315,8 +319,8 @@ sys_fsetxattr(int fd, const char __user
+@@ -315,8 +319,8 @@
* Extended attribute GET operations
*/
static ssize_t
{
ssize_t error;
void *kvalue = NULL;
-@@ -336,7 +340,7 @@ getxattr(struct dentry *d, const char __
+@@ -336,7 +340,7 @@
return -ENOMEM;
}
if (error > 0) {
if (size && copy_to_user(value, kvalue, error))
error = -EFAULT;
-@@ -349,9 +353,8 @@ getxattr(struct dentry *d, const char __
+@@ -349,9 +353,8 @@
return error;
}
{
struct path path;
ssize_t error;
-@@ -359,14 +362,13 @@ sys_getxattr(const char __user *pathname
+@@ -359,14 +362,13 @@
error = user_path(pathname, &path);
if (error)
return error;
{
struct path path;
ssize_t error;
-@@ -374,13 +376,13 @@ sys_lgetxattr(const char __user *pathnam
+@@ -374,13 +376,13 @@
error = user_lpath(pathname, &path);
if (error)
return error;
{
struct file *f;
ssize_t error = -EBADF;
-@@ -389,7 +391,7 @@ sys_fgetxattr(int fd, const char __user
+@@ -389,7 +391,7 @@
if (!f)
return error;
audit_inode(NULL, f->f_path.dentry);
fput(f);
return error;
}
-@@ -398,7 +400,8 @@ sys_fgetxattr(int fd, const char __user
+@@ -398,7 +400,8 @@
* Extended attribute LIST operations
*/
static ssize_t
{
ssize_t error;
char *klist = NULL;
-@@ -411,7 +414,7 @@ listxattr(struct dentry *d, char __user
+@@ -411,7 +414,7 @@
return -ENOMEM;
}
if (error > 0) {
if (size && copy_to_user(list, klist, error))
error = -EFAULT;
-@@ -424,8 +427,8 @@ listxattr(struct dentry *d, char __user
+@@ -424,8 +427,8 @@
return error;
}
{
struct path path;
ssize_t error;
-@@ -433,13 +436,13 @@ sys_listxattr(const char __user *pathnam
+@@ -433,13 +436,13 @@
error = user_path(pathname, &path);
if (error)
return error;
{
struct path path;
ssize_t error;
-@@ -447,13 +450,12 @@ sys_llistxattr(const char __user *pathna
+@@ -447,13 +450,12 @@
error = user_lpath(pathname, &path);
if (error)
return error;
{
struct file *f;
ssize_t error = -EBADF;
-@@ -462,7 +464,7 @@ sys_flistxattr(int fd, char __user *list
+@@ -462,7 +464,7 @@
if (!f)
return error;
audit_inode(NULL, f->f_path.dentry);
fput(f);
return error;
}
-@@ -471,7 +473,8 @@ sys_flistxattr(int fd, char __user *list
+@@ -471,7 +473,8 @@
* Extended attribute REMOVE operations
*/
static long
{
int error;
char kname[XATTR_NAME_MAX + 1];
-@@ -482,11 +485,11 @@ removexattr(struct dentry *d, const char
+@@ -482,11 +485,11 @@
if (error < 0)
return error;
{
struct path path;
int error;
-@@ -496,15 +499,15 @@ sys_removexattr(const char __user *pathn
+@@ -496,15 +499,15 @@
return error;
error = mnt_want_write(path.mnt);
if (!error) {
{
struct path path;
int error;
-@@ -514,15 +517,14 @@ sys_lremovexattr(const char __user *path
+@@ -514,15 +517,14 @@
return error;
error = mnt_want_write(path.mnt);
if (!error) {
{
struct file *f;
struct dentry *dentry;
-@@ -533,9 +535,9 @@ sys_fremovexattr(int fd, const char __us
+@@ -533,9 +535,9 @@
return error;
dentry = f->f_path.dentry;
audit_inode(NULL, dentry);
mnt_drop_write(f->f_path.mnt);
}
fput(f);
-diff -purN linux-2.6.27/fs/xfs/Kconfig linux-2.6.27.19-5.1/fs/xfs/Kconfig
---- linux-2.6.27/fs/xfs/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/Kconfig 2009-03-25 16:11:35.000000000 +0000
-@@ -35,6 +35,19 @@ config XFS_QUOTA
+diff -r 9608d5473017 fs/xfs/Kconfig
+--- a/fs/xfs/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/Kconfig Wed May 06 16:56:52 2009 +0100
+@@ -34,6 +34,19 @@
+ README.quota in the xfsprogs package. XFS quota can be used either
with or without the generic quota support enabled (CONFIG_QUOTA) -
they are completely independent subsystems.
-
++
+config XFS_DMAPI
+ tristate "XFS DMAPI support"
+ depends on XFS_FS
+ storage management systems.
+
+ If unsure, say N.
-+
+
config XFS_POSIX_ACL
bool "XFS POSIX ACL support"
- depends on XFS_FS
-diff -purN linux-2.6.27/fs/xfs/Makefile linux-2.6.27.19-5.1/fs/xfs/Makefile
---- linux-2.6.27/fs/xfs/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/Makefile 2009-03-25 16:11:35.000000000 +0000
-@@ -38,6 +38,8 @@ ifeq ($(CONFIG_XFS_QUOTA),y)
+diff -r 9608d5473017 fs/xfs/Makefile
+--- a/fs/xfs/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/Makefile Wed May 06 16:56:52 2009 +0100
+@@ -37,6 +37,8 @@
+ ifeq ($(CONFIG_XFS_QUOTA),y)
xfs-$(CONFIG_PROC_FS) += quota/xfs_qm_stats.o
endif
-
-+obj-$(CONFIG_XFS_DMAPI) += dmapi/
+
++obj-$(CONFIG_XFS_DMAPI) += dmapi/
+
xfs-$(CONFIG_XFS_RT) += xfs_rtalloc.o
xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o
- xfs-$(CONFIG_PROC_FS) += $(XFS_LINUX)/xfs_stats.o
-@@ -107,7 +109,8 @@ xfs-y += $(addprefix $(XFS_LINUX)/, \
+@@ -107,7 +109,8 @@
xfs_lrw.o \
xfs_super.o \
xfs_vnode.o \
# Objects in support/
xfs-y += $(addprefix support/, \
-diff -purN linux-2.6.27/fs/xfs/dmapi/Makefile linux-2.6.27.19-5.1/fs/xfs/dmapi/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/dmapi/Makefile 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/xfs/dmapi/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/xfs/dmapi/Makefile Wed May 06 16:56:52 2009 +0100
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2006 Silicon Graphics, Inc.
+obj-$(CONFIG_XFS_DMAPI) += xfs_dmapi.o
+
+xfs_dmapi-y += xfs_dm.o
-diff -purN linux-2.6.27/fs/xfs/dmapi/xfs_dm.c linux-2.6.27.19-5.1/fs/xfs/dmapi/xfs_dm.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/dmapi/xfs_dm.c 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/xfs/dmapi/xfs_dm.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/xfs/dmapi/xfs_dm.c Wed May 06 16:56:52 2009 +0100
@@ -0,0 +1,3337 @@
+/*
+ * Copyright (c) 2000-2006 Silicon Graphics, Inc.
+
+module_init(xfs_dm_init);
+module_exit(xfs_dm_exit);
-diff -purN linux-2.6.27/fs/xfs/dmapi/xfs_dm.h linux-2.6.27.19-5.1/fs/xfs/dmapi/xfs_dm.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/dmapi/xfs_dm.h 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/xfs/dmapi/xfs_dm.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/xfs/dmapi/xfs_dm.h Wed May 06 16:56:52 2009 +0100
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2006 Silicon Graphics, Inc.
+extern struct file_system_type xfs_fs_type;
+
+#endif /* __XFS_DM_H__ */
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_aops.c linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_aops.c
---- linux-2.6.27/fs/xfs/linux-2.6/xfs_aops.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_aops.c 2009-03-25 16:11:35.000000000 +0000
-@@ -1147,16 +1147,6 @@ error:
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_aops.c
+--- a/fs/xfs/linux-2.6/xfs_aops.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/linux-2.6/xfs_aops.c Wed May 06 16:56:53 2009 +0100
+@@ -1147,16 +1147,6 @@
if (iohead)
xfs_cancel_ioend(iohead);
return err;
}
-@@ -1185,7 +1175,7 @@ xfs_vm_writepage(
+@@ -1185,7 +1175,7 @@
struct page *page,
struct writeback_control *wbc)
{
int need_trans;
int delalloc, unmapped, unwritten;
struct inode *inode = page->mapping->host;
-@@ -1231,19 +1221,16 @@ xfs_vm_writepage(
+@@ -1231,19 +1221,16 @@
* to real space and flush out to disk.
*/
error = xfs_page_state_convert(inode, page, wbc, 1, unmapped);
- if (error == -EAGAIN)
-- goto out_fail;
- if (unlikely(error < 0))
++ if (unlikely(error < 0))
+ goto out_fail;
+- if (unlikely(error < 0))
- goto out_unlock;
-+ goto out_fail;
return 0;
return error;
}
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_buf.c linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_buf.c
---- linux-2.6.27/fs/xfs/linux-2.6/xfs_buf.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_buf.c 2009-03-25 16:11:35.000000000 +0000
-@@ -187,7 +187,7 @@ free_address(
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_buf.c
+--- a/fs/xfs/linux-2.6/xfs_buf.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/linux-2.6/xfs_buf.c Wed May 06 16:56:53 2009 +0100
+@@ -187,7 +187,7 @@
{
a_list_t *aentry;
/*
* Xen needs to be able to make sure it can get an exclusive
* RO mapping of pages it wants to turn into a pagetable. If
-@@ -1001,12 +1001,13 @@ xfs_buf_iodone_work(
+@@ -1001,12 +1001,13 @@
* We can get an EOPNOTSUPP to ordered writes. Here we clear the
* ordered flag and reissue them. Because we can't tell the higher
* layers directly that they should not issue ordered I/O anymore, they
xfs_buf_iorequest(bp);
} else if (bp->b_iodone)
(*(bp->b_iodone))(bp);
-@@ -1113,8 +1114,7 @@ xfs_buf_bio_end_io(
+@@ -1113,8 +1114,7 @@
unsigned int blocksize = bp->b_target->bt_bsize;
struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1;
do {
struct page *page = bvec->bv_page;
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_buf.h linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_buf.h
---- linux-2.6.27/fs/xfs/linux-2.6/xfs_buf.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_buf.h 2009-03-25 16:11:35.000000000 +0000
-@@ -85,6 +85,14 @@ typedef enum {
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_buf.h
+--- a/fs/xfs/linux-2.6/xfs_buf.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/linux-2.6/xfs_buf.h Wed May 06 16:56:53 2009 +0100
+@@ -85,6 +85,14 @@
* modifications being lost.
*/
_XBF_PAGE_LOCKED = (1 << 22),
} xfs_buf_flags_t;
typedef enum {
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_file.c linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_file.c
---- linux-2.6.27/fs/xfs/linux-2.6/xfs_file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_file.c 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_file.c
+--- a/fs/xfs/linux-2.6/xfs_file.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/linux-2.6/xfs_file.c Wed May 06 16:56:53 2009 +0100
@@ -43,6 +43,9 @@
#include <linux/smp_lock.h>
STATIC_INLINE ssize_t
__xfs_file_read(
-@@ -204,6 +207,23 @@ xfs_file_fsync(
+@@ -203,6 +206,23 @@
+ xfs_iflags_clear(XFS_I(dentry->d_inode), XFS_ITRUNCATED);
return -xfs_fsync(XFS_I(dentry->d_inode));
}
-
++
+#ifdef HAVE_DMAPI
+STATIC int
+xfs_vm_fault(
+ return filemap_fault(vma, vmf);
+}
+#endif /* HAVE_DMAPI */
-+
+
/*
* Unfortunately we can't just use the clean and simple readdir implementation
- * below, because nfs might call back into ->lookup from the filldir callback
-@@ -372,6 +392,11 @@ xfs_file_mmap(
+@@ -372,6 +392,11 @@
vma->vm_ops = &xfs_file_vm_ops;
vma->vm_flags |= VM_CAN_NONLINEAR;
file_accessed(filp);
return 0;
}
-@@ -418,6 +443,47 @@ xfs_file_ioctl_invis(
+@@ -417,6 +442,47 @@
+ */
return error;
}
-
++
+#ifdef HAVE_DMAPI
+#ifdef HAVE_VMOP_MPROTECT
+STATIC int
+ return 0;
+}
+#endif /* HAVE_FOP_OPEN_EXEC */
-+
+
/*
* mmap()d file has taken write protection fault and is being made
- * writable. We can set the page state up correctly for a writable
-@@ -487,3 +553,13 @@ static struct vm_operations_struct xfs_f
+@@ -487,3 +553,13 @@
.fault = filemap_fault,
.page_mkwrite = xfs_vm_page_mkwrite,
};
+#endif
+};
+#endif /* HAVE_DMAPI */
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_iops.c
---- linux-2.6.27/fs/xfs/linux-2.6/xfs_iops.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_iops.c 2009-03-25 16:11:35.000000000 +0000
-@@ -601,7 +601,12 @@ xfs_vn_setattr(
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_iops.c
+--- a/fs/xfs/linux-2.6/xfs_iops.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/linux-2.6/xfs_iops.c Wed May 06 16:56:53 2009 +0100
+@@ -601,7 +601,12 @@
struct dentry *dentry,
struct iattr *iattr)
{
}
/*
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_ksyms.c linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_ksyms.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_ksyms.c 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_ksyms.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/xfs/linux-2.6/xfs_ksyms.c Wed May 06 16:56:53 2009 +0100
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2004-2008 Silicon Graphics, Inc.
+EXPORT_SYMBOL(xfs_attr_list);
+EXPORT_SYMBOL(kmem_alloc);
+EXPORT_SYMBOL(xfs_change_file_space);
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_linux.h linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_linux.h
---- linux-2.6.27/fs/xfs/linux-2.6/xfs_linux.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_linux.h 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_linux.h
+--- a/fs/xfs/linux-2.6/xfs_linux.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/linux-2.6/xfs_linux.h Wed May 06 16:56:53 2009 +0100
@@ -180,6 +180,10 @@
#define xfs_itruncate_data(ip, off) \
(-vmtruncate(VFS_I(ip), (off)))
/* Move the kernel do_div definition off to one side */
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_super.c linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_super.c
---- linux-2.6.27/fs/xfs/linux-2.6/xfs_super.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_super.c 2009-03-25 16:11:35.000000000 +0000
-@@ -1323,7 +1323,7 @@ xfs_fs_remount(
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_super.c
+--- a/fs/xfs/linux-2.6/xfs_super.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/linux-2.6/xfs_super.c Wed May 06 16:56:53 2009 +0100
+@@ -1323,7 +1323,7 @@
"XFS: mount option \"%s\" not supported for remount\n", p);
return -EINVAL;
#else
#endif
}
}
-@@ -1835,8 +1835,16 @@ xfs_fs_get_sb(
+@@ -1835,8 +1835,16 @@
void *data,
struct vfsmount *mnt)
{
}
static struct super_operations xfs_super_operations = {
-@@ -1861,13 +1869,14 @@ static struct quotactl_ops xfs_quotactl_
+@@ -1861,13 +1869,14 @@
.set_xquota = xfs_fs_setxquota,
};
STATIC int __init
xfs_alloc_trace_bufs(void)
-diff -purN linux-2.6.27/fs/xfs/xfs_da_btree.c linux-2.6.27.19-5.1/fs/xfs/xfs_da_btree.c
---- linux-2.6.27/fs/xfs/xfs_da_btree.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_da_btree.c 2009-03-25 16:11:35.000000000 +0000
-@@ -1566,11 +1566,14 @@ xfs_da_grow_inode(xfs_da_args_t *args, x
+diff -r 9608d5473017 fs/xfs/xfs_da_btree.c
+--- a/fs/xfs/xfs_da_btree.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_da_btree.c Wed May 06 16:56:53 2009 +0100
+@@ -1566,11 +1566,14 @@
int nmap, error, w, count, c, got, i, mapi;
xfs_trans_t *tp;
xfs_mount_t *mp;
/*
* For new directories adjust the file offset and block count.
*/
-@@ -1647,6 +1650,8 @@ xfs_da_grow_inode(xfs_da_args_t *args, x
+@@ -1647,6 +1650,8 @@
}
if (mapp != &map)
kmem_free(mapp);
*new_blkno = (xfs_dablk_t)bno;
return 0;
}
-diff -purN linux-2.6.27/fs/xfs/xfs_dir2.c linux-2.6.27.19-5.1/fs/xfs/xfs_dir2.c
---- linux-2.6.27/fs/xfs/xfs_dir2.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_dir2.c 2009-03-25 16:11:36.000000000 +0000
-@@ -525,11 +525,13 @@ xfs_dir2_grow_inode(
+diff -r 9608d5473017 fs/xfs/xfs_dir2.c
+--- a/fs/xfs/xfs_dir2.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_dir2.c Wed May 06 16:56:53 2009 +0100
+@@ -525,11 +525,13 @@
xfs_mount_t *mp;
int nmap; /* number of bmap entries */
xfs_trans_t *tp;
/*
* Set lowest possible block in the space requested.
*/
-@@ -622,7 +624,11 @@ xfs_dir2_grow_inode(
+@@ -622,7 +624,11 @@
*/
if (mapp != &map)
kmem_free(mapp);
/*
* Update file's size if this is the data space and it grew.
*/
-diff -purN linux-2.6.27/fs/xfs/xfs_dmops.c linux-2.6.27.19-5.1/fs/xfs/xfs_dmops.c
---- linux-2.6.27/fs/xfs/xfs_dmops.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_dmops.c 2009-03-25 16:11:35.000000000 +0000
-@@ -41,16 +41,29 @@ int
+diff -r 9608d5473017 fs/xfs/xfs_dmops.c
+--- a/fs/xfs/xfs_dmops.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_dmops.c Wed May 06 16:56:53 2009 +0100
+@@ -41,16 +41,29 @@
xfs_dmops_get(struct xfs_mount *mp, struct xfs_mount_args *args)
{
if (args->flags & XFSMNT_DMAPI) {
+ if (mp->m_dm_ops != &xfs_dmcore_stub)
+ symbol_put(xfs_dmcore_xfs);
}
-diff -purN linux-2.6.27/fs/xfs/xfs_inode.c linux-2.6.27.19-5.1/fs/xfs/xfs_inode.c
---- linux-2.6.27/fs/xfs/xfs_inode.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_inode.c 2009-03-25 16:11:36.000000000 +0000
-@@ -1414,7 +1414,7 @@ xfs_itruncate_start(
+diff -r 9608d5473017 fs/xfs/xfs_inode.c
+--- a/fs/xfs/xfs_inode.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_inode.c Wed May 06 16:56:53 2009 +0100
+@@ -1414,7 +1414,7 @@
mp = ip->i_mount;
/* wait for the completion of any pending DIOs */
vn_iowait(ip);
/*
-diff -purN linux-2.6.27/fs/xfs/xfs_log.c linux-2.6.27.19-5.1/fs/xfs/xfs_log.c
---- linux-2.6.27/fs/xfs/xfs_log.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_log.c 2009-03-25 16:11:35.000000000 +0000
-@@ -563,6 +563,11 @@ xfs_log_mount(
+diff -r 9608d5473017 fs/xfs/xfs_log.c
+--- a/fs/xfs/xfs_log.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_log.c Wed May 06 16:56:53 2009 +0100
+@@ -563,6 +563,11 @@
}
mp->m_log = xlog_alloc_log(mp, log_target, blk_offset, num_bblks);
/*
* Initialize the AIL now we have a log.
-@@ -601,6 +606,7 @@ xfs_log_mount(
+@@ -601,6 +606,7 @@
return 0;
error:
xfs_log_unmount_dealloc(mp);
return error;
} /* xfs_log_mount */
-@@ -1033,11 +1039,12 @@ xlog_iodone(xfs_buf_t *bp)
+@@ -1033,11 +1039,12 @@
l = iclog->ic_log;
/*
l->l_mp->m_flags &= ~XFS_MOUNT_BARRIER;
xfs_fs_cmn_err(CE_WARN, l->l_mp,
"xlog_iodone: Barriers are no longer supported"
-@@ -1216,7 +1223,9 @@ xlog_alloc_log(xfs_mount_t *mp,
+@@ -1216,7 +1223,9 @@
int i;
int iclogsize;
log->l_mp = mp;
log->l_targ = log_target;
-@@ -1248,6 +1257,8 @@ xlog_alloc_log(xfs_mount_t *mp,
+@@ -1248,6 +1257,8 @@
xlog_get_iclog_buffer_size(mp, log);
bp = xfs_buf_get_empty(log->l_iclog_size, mp->m_logdev_targp);
XFS_BUF_SET_IODONE_FUNC(bp, xlog_iodone);
XFS_BUF_SET_BDSTRAT_FUNC(bp, xlog_bdstrat_cb);
XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)1);
-@@ -1274,13 +1285,17 @@ xlog_alloc_log(xfs_mount_t *mp,
+@@ -1274,13 +1285,17 @@
iclogsize = log->l_iclog_size;
ASSERT(log->l_iclog_size >= 4096);
for (i=0; i < log->l_iclog_bufs; i++) {
if (!XFS_BUF_CPSEMA(bp))
ASSERT(0);
XFS_BUF_SET_IODONE_FUNC(bp, xlog_iodone);
-@@ -1322,6 +1337,25 @@ xlog_alloc_log(xfs_mount_t *mp,
+@@ -1322,6 +1337,25 @@
log->l_iclog->ic_prev = prev_iclog; /* re-write 1st prev ptr */
return log;
} /* xlog_alloc_log */
-diff -purN linux-2.6.27/fs/xfs/xfs_log_recover.c linux-2.6.27.19-5.1/fs/xfs/xfs_log_recover.c
---- linux-2.6.27/fs/xfs/xfs_log_recover.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_log_recover.c 2009-03-25 16:11:35.000000000 +0000
-@@ -1419,7 +1419,13 @@ xlog_recover_add_to_trans(
+diff -r 9608d5473017 fs/xfs/xfs_log_recover.c
+--- a/fs/xfs/xfs_log_recover.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_log_recover.c Wed May 06 16:56:53 2009 +0100
+@@ -1419,7 +1419,13 @@
return 0;
item = trans->r_itemq;
if (item == NULL) {
if (len == sizeof(xfs_trans_header_t))
xlog_recover_add_item(&trans->r_itemq);
memcpy(&trans->r_theader, dp, len); /* d, s, l */
-diff -purN linux-2.6.27/fs/xfs/xfs_mount.h linux-2.6.27.19-5.1/fs/xfs/xfs_mount.h
---- linux-2.6.27/fs/xfs/xfs_mount.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_mount.h 2009-03-25 16:11:35.000000000 +0000
-@@ -341,6 +341,7 @@ typedef struct xfs_mount {
+diff -r 9608d5473017 fs/xfs/xfs_mount.h
+--- a/fs/xfs/xfs_mount.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_mount.h Wed May 06 16:56:53 2009 +0100
+@@ -341,6 +341,7 @@
spinlock_t m_sync_lock; /* work item list lock */
int m_sync_seq; /* sync thread generation no. */
wait_queue_head_t m_wait_single_sync_task;
} xfs_mount_t;
/*
-diff -purN linux-2.6.27/fs/xfs/xfs_rename.c linux-2.6.27.19-5.1/fs/xfs/xfs_rename.c
---- linux-2.6.27/fs/xfs/xfs_rename.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_rename.c 2009-03-25 16:11:35.000000000 +0000
-@@ -212,7 +212,7 @@ xfs_rename(
+diff -r 9608d5473017 fs/xfs/xfs_rename.c
+--- a/fs/xfs/xfs_rename.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_rename.c Wed May 06 16:56:54 2009 +0100
+@@ -212,7 +212,7 @@
if (unlikely((target_dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) &&
(target_dp->i_d.di_projid != src_ip->i_d.di_projid))) {
error = XFS_ERROR(EXDEV);
xfs_trans_cancel(tp, cancel_flags);
goto std_return;
}
-diff -purN linux-2.6.27/include/acpi/acdisasm.h linux-2.6.27.19-5.1/include/acpi/acdisasm.h
---- linux-2.6.27/include/acpi/acdisasm.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/acdisasm.h 2009-03-25 16:11:52.000000000 +0000
-@@ -186,6 +186,8 @@ extern struct acpi_dmtable_info acpi_dm_
+diff -r 9608d5473017 include/acpi/acdisasm.h
+--- a/include/acpi/acdisasm.h Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/acdisasm.h Wed May 06 16:56:54 2009 +0100
+@@ -186,6 +186,8 @@
extern struct acpi_dmtable_info acpi_dm_table_info_madt6[];
extern struct acpi_dmtable_info acpi_dm_table_info_madt7[];
extern struct acpi_dmtable_info acpi_dm_table_info_madt8[];
extern struct acpi_dmtable_info acpi_dm_table_info_madt_hdr[];
extern struct acpi_dmtable_info acpi_dm_table_info_mcfg[];
extern struct acpi_dmtable_info acpi_dm_table_info_mcfg0[];
-@@ -197,8 +199,10 @@ extern struct acpi_dmtable_info acpi_dm_
+@@ -197,8 +199,10 @@
extern struct acpi_dmtable_info acpi_dm_table_info_spcr[];
extern struct acpi_dmtable_info acpi_dm_table_info_spmi[];
extern struct acpi_dmtable_info acpi_dm_table_info_srat[];
extern struct acpi_dmtable_info acpi_dm_table_info_tcpa[];
extern struct acpi_dmtable_info acpi_dm_table_info_wdrt[];
-diff -purN linux-2.6.27/include/acpi/acglobal.h linux-2.6.27.19-5.1/include/acpi/acglobal.h
---- linux-2.6.27/include/acpi/acglobal.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/acglobal.h 2009-03-25 16:11:52.000000000 +0000
-@@ -246,6 +246,7 @@ ACPI_EXTERN u8 acpi_gbl_system_awake_and
+diff -r 9608d5473017 include/acpi/acglobal.h
+--- a/include/acpi/acglobal.h Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/acglobal.h Wed May 06 16:56:54 2009 +0100
+@@ -246,6 +246,7 @@
extern u8 acpi_gbl_shutdown;
extern u32 acpi_gbl_startup_flags;
extern const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT];
extern const char *acpi_gbl_highest_dstate_names[4];
extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
-diff -purN linux-2.6.27/include/acpi/acpi_bus.h linux-2.6.27.19-5.1/include/acpi/acpi_bus.h
---- linux-2.6.27/include/acpi/acpi_bus.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/acpi_bus.h 2009-03-25 16:11:52.000000000 +0000
-@@ -46,7 +46,7 @@ acpi_extract_package(union acpi_object *
+diff -r 9608d5473017 include/acpi/acpi_bus.h
+--- a/include/acpi/acpi_bus.h Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/acpi_bus.h Wed May 06 16:56:54 2009 +0100
+@@ -46,7 +46,7 @@
acpi_status
acpi_evaluate_integer(acpi_handle handle,
acpi_string pathname,
acpi_status
acpi_evaluate_reference(acpi_handle handle,
acpi_string pathname,
-@@ -327,6 +327,9 @@ int acpi_bus_get_private_data(acpi_handl
+@@ -327,6 +327,9 @@
extern int acpi_notifier_call_chain(struct acpi_device *, u32, u32);
extern int register_acpi_notifier(struct notifier_block *);
extern int unregister_acpi_notifier(struct notifier_block *);
/*
* External Functions
*/
-@@ -373,6 +376,8 @@ struct acpi_bus_type {
+@@ -373,6 +376,8 @@
int register_acpi_bus_type(struct acpi_bus_type *);
int unregister_acpi_bus_type(struct acpi_bus_type *);
struct device *acpi_get_physical_device(acpi_handle);
/* helper */
acpi_handle acpi_get_child(acpi_handle, acpi_integer);
acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int);
-diff -purN linux-2.6.27/include/acpi/acpi_drivers.h linux-2.6.27.19-5.1/include/acpi/acpi_drivers.h
---- linux-2.6.27/include/acpi/acpi_drivers.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/acpi_drivers.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/acpi/acpi_drivers.h
+--- a/include/acpi/acpi_drivers.h Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/acpi_drivers.h Wed May 06 16:56:54 2009 +0100
@@ -41,6 +41,7 @@
*/
#define ACPI_PROCESSOR_HID "ACPI0007"
#define ACPI_SYSTEM_HID "LNXSYSTM"
#define ACPI_THERMAL_HID "LNXTHERM"
-@@ -115,12 +116,17 @@ int acpi_processor_set_thermal_limit(acp
+@@ -115,12 +116,17 @@
/*--------------------------------------------------------------------------
Dock Station
-------------------------------------------------------------------------- */
void *context);
extern void unregister_hotplug_dock_device(acpi_handle handle);
#else
-@@ -136,7 +142,7 @@ static inline void unregister_dock_notif
+@@ -136,7 +142,7 @@
{
}
static inline int register_hotplug_dock_device(acpi_handle handle,
void *context)
{
return -ENODEV;
-diff -purN linux-2.6.27/include/acpi/acpiosxf.h linux-2.6.27.19-5.1/include/acpi/acpiosxf.h
---- linux-2.6.27/include/acpi/acpiosxf.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/acpiosxf.h 2009-03-25 16:11:52.000000000 +0000
-@@ -193,6 +193,9 @@ acpi_status
+diff -r 9608d5473017 include/acpi/acpiosxf.h
+--- a/include/acpi/acpiosxf.h Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/acpiosxf.h Wed May 06 16:56:54 2009 +0100
+@@ -193,6 +193,9 @@
acpi_os_execute(acpi_execute_type type,
acpi_osd_exec_callback function, void *context);
void acpi_os_wait_events_complete(void *context);
void acpi_os_sleep(acpi_integer milliseconds);
-diff -purN linux-2.6.27/include/acpi/actbl1.h linux-2.6.27.19-5.1/include/acpi/actbl1.h
---- linux-2.6.27/include/acpi/actbl1.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/actbl1.h 2009-03-25 16:11:52.000000000 +0000
-@@ -908,7 +908,9 @@ enum acpi_madt_type {
+diff -r 9608d5473017 include/acpi/actbl1.h
+--- a/include/acpi/actbl1.h Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/actbl1.h Wed May 06 16:56:54 2009 +0100
+@@ -908,7 +908,9 @@
ACPI_MADT_TYPE_IO_SAPIC = 6,
ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
};
/*
-@@ -1009,6 +1011,26 @@ struct acpi_madt_interrupt_source {
+@@ -1008,6 +1010,26 @@
+ /* Flags field above */
#define ACPI_MADT_CPEI_OVERRIDE (1)
-
++
+/* 9: Processor Local X2_APIC (07/2008) */
+
+struct acpi_madt_local_x2apic {
+ u8 lint; /* LINTn to which NMI is connected */
+ u8 reserved[3];
+};
-+
+
/*
* Common flags fields for MADT subtables
- */
-@@ -1150,10 +1172,15 @@ struct acpi_table_srat {
+@@ -1150,10 +1172,15 @@
enum acpi_srat_type {
ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
struct acpi_srat_cpu_affinity {
struct acpi_subtable_header header;
-@@ -1165,9 +1192,7 @@ struct acpi_srat_cpu_affinity {
+@@ -1165,9 +1192,7 @@
u32 reserved; /* Reserved, must be zero */
};
struct acpi_srat_mem_affinity {
struct acpi_subtable_header header;
-@@ -1186,6 +1211,20 @@ struct acpi_srat_mem_affinity {
+@@ -1185,6 +1210,20 @@
+ #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
#define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
#define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
-
++
+/* 2: Processor Local X2_APIC Affinity (07/2008) */
+
+struct acpi_srat_x2apic_cpu_affinity {
+/* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */
+
+#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
-+
+
/*******************************************************************************
*
- * TCPA - Trusted Computing Platform Alliance table
-diff -purN linux-2.6.27/include/acpi/actypes.h linux-2.6.27.19-5.1/include/acpi/actypes.h
---- linux-2.6.27/include/acpi/actypes.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/actypes.h 2009-03-25 16:11:52.000000000 +0000
-@@ -1225,8 +1225,8 @@ struct acpi_resource {
+diff -r 9608d5473017 include/acpi/actypes.h
+--- a/include/acpi/actypes.h Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/actypes.h Wed May 06 16:56:54 2009 +0100
+@@ -1225,8 +1225,8 @@
#pragma pack()
#define ACPI_RS_SIZE(type) (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type))
#define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length)
-diff -purN linux-2.6.27/include/acpi/pdc_intel.h linux-2.6.27.19-5.1/include/acpi/pdc_intel.h
---- linux-2.6.27/include/acpi/pdc_intel.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/pdc_intel.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/acpi/pdc_intel.h
+--- a/include/acpi/pdc_intel.h Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/pdc_intel.h Wed May 06 16:56:54 2009 +0100
@@ -14,6 +14,7 @@
#define ACPI_PDC_SMP_T_SWCOORD (0x0080)
#define ACPI_PDC_C_C1_FFH (0x0100)
ACPI_PDC_P_FFH)
#define ACPI_PDC_C_CAPABILITY_SMP (ACPI_PDC_SMP_C2C3 | \
-diff -purN linux-2.6.27/include/acpi/processor.h linux-2.6.27.19-5.1/include/acpi/processor.h
---- linux-2.6.27/include/acpi/processor.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/processor.h 2009-03-25 16:11:52.000000000 +0000
-@@ -17,6 +17,12 @@
+diff -r 9608d5473017 include/acpi/processor.h
+--- a/include/acpi/processor.h Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/processor.h Wed May 06 16:56:54 2009 +0100
+@@ -16,6 +16,12 @@
+ #define ACPI_PROCESSOR_MAX_THROTTLING 16
#define ACPI_PROCESSOR_MAX_THROTTLE 250 /* 25% */
#define ACPI_PROCESSOR_MAX_DUTY_WIDTH 4
-
++
+#ifdef CONFIG_XEN
+#define NR_ACPI_CPUS (NR_CPUS < 256 ? 256 : NR_CPUS)
+#else
+#define NR_ACPI_CPUS NR_CPUS
+#endif /* CONFIG_XEN */
-+
+
#define ACPI_PDC_REVISION_ID 0x1
- #define ACPI_PSD_REV0_REVISION 0 /* Support for _PSD as in ACPI 3.0 */
-@@ -42,6 +48,17 @@
+@@ -41,6 +47,17 @@
+ /* Power Management */
struct acpi_processor_cx;
-
++
+#ifdef CONFIG_PROCESSOR_EXTERNAL_CONTROL
+struct acpi_csd_package {
+ acpi_integer num_entries;
+ acpi_integer index;
+} __attribute__ ((packed));
+#endif
-+
+
struct acpi_power_register {
u8 descriptor;
- u16 length;
-@@ -74,6 +91,12 @@ struct acpi_processor_cx {
+@@ -74,6 +91,12 @@
u32 power;
u32 usage;
u64 time;
struct acpi_processor_cx_policy promotion;
struct acpi_processor_cx_policy demotion;
char desc[ACPI_CX_DESC_LEN];
-@@ -304,6 +327,9 @@ static inline void acpi_processor_ppc_ex
+@@ -304,6 +327,9 @@
{
return;
}
static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
{
static unsigned int printout = 1;
-@@ -316,6 +342,7 @@ static inline int acpi_processor_ppc_has
+@@ -316,6 +342,7 @@
}
return 0;
}
#endif /* CONFIG_CPU_FREQ */
/* in processor_throttling.c */
-@@ -352,4 +379,120 @@ static inline void acpi_thermal_cpufreq_
+@@ -352,4 +379,120 @@
}
#endif
+#endif /* CONFIG_XEN */
+
#endif
-diff -purN linux-2.6.27/include/asm-cris/arch-v32/spinlock.h linux-2.6.27.19-5.1/include/asm-cris/arch-v32/spinlock.h
---- linux-2.6.27/include/asm-cris/arch-v32/spinlock.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-cris/arch-v32/spinlock.h 2009-03-25 16:11:51.000000000 +0000
-@@ -121,6 +121,8 @@ static inline int __raw_write_trylock(r
+diff -r 9608d5473017 include/asm-cris/arch-v32/spinlock.h
+--- a/include/asm-cris/arch-v32/spinlock.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-cris/arch-v32/spinlock.h Wed May 06 16:56:54 2009 +0100
+@@ -121,6 +121,8 @@
return 1;
}
#define _raw_spin_relax(lock) cpu_relax()
#define _raw_read_relax(lock) cpu_relax()
-diff -purN linux-2.6.27/include/asm-cris/thread_info.h linux-2.6.27.19-5.1/include/asm-cris/thread_info.h
---- linux-2.6.27/include/asm-cris/thread_info.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-cris/thread_info.h 2009-03-25 16:11:51.000000000 +0000
-@@ -88,6 +88,7 @@ struct thread_info {
+diff -r 9608d5473017 include/asm-cris/thread_info.h
+--- a/include/asm-cris/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-cris/thread_info.h Wed May 06 16:56:54 2009 +0100
+@@ -88,6 +88,7 @@
#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */
#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
#define TIF_MEMDIE 17
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
-@@ -95,6 +96,7 @@ struct thread_info {
+@@ -95,6 +96,7 @@
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */
-diff -purN linux-2.6.27/include/asm-generic/memory_model.h linux-2.6.27.19-5.1/include/asm-generic/memory_model.h
---- linux-2.6.27/include/asm-generic/memory_model.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-generic/memory_model.h 2009-03-25 16:11:46.000000000 +0000
+diff -r 9608d5473017 include/asm-generic/memory_model.h
+--- a/include/asm-generic/memory_model.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-generic/memory_model.h Wed May 06 16:56:54 2009 +0100
@@ -34,7 +34,7 @@
#define __pfn_to_page(pfn) \
NODE_DATA(__nid)->node_mem_map + arch_local_page_offset(__pfn, __nid);\
})
-diff -purN linux-2.6.27/include/asm-generic/pci.h linux-2.6.27.19-5.1/include/asm-generic/pci.h
---- linux-2.6.27/include/asm-generic/pci.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-generic/pci.h 2009-03-25 16:11:46.000000000 +0000
-@@ -43,7 +43,9 @@ pcibios_select_root(struct pci_dev *pdev
+diff -r 9608d5473017 include/asm-generic/pci.h
+--- a/include/asm-generic/pci.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-generic/pci.h Wed May 06 16:56:54 2009 +0100
+@@ -43,7 +43,9 @@
return root;
}
#ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ
static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
-diff -purN linux-2.6.27/include/asm-generic/siginfo.h linux-2.6.27.19-5.1/include/asm-generic/siginfo.h
---- linux-2.6.27/include/asm-generic/siginfo.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-generic/siginfo.h 2009-03-25 16:11:46.000000000 +0000
-@@ -224,6 +224,12 @@ typedef struct siginfo {
+diff -r 9608d5473017 include/asm-generic/siginfo.h
+--- a/include/asm-generic/siginfo.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-generic/siginfo.h Wed May 06 16:56:54 2009 +0100
+@@ -224,6 +224,12 @@
#define NSIGPOLL 6
/*
* sigevent definitions
*
* It seems likely that SIGEV_THREAD will have to be handled from
-diff -purN linux-2.6.27/include/asm-generic/vmlinux.lds.h linux-2.6.27.19-5.1/include/asm-generic/vmlinux.lds.h
---- linux-2.6.27/include/asm-generic/vmlinux.lds.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-generic/vmlinux.lds.h 2009-03-25 16:11:46.000000000 +0000
+diff -r 9608d5473017 include/asm-generic/vmlinux.lds.h
+--- a/include/asm-generic/vmlinux.lds.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-generic/vmlinux.lds.h Wed May 06 16:56:54 2009 +0100
@@ -52,7 +52,10 @@
. = ALIGN(8); \
VMLINUX_SYMBOL(__start___markers) = .; \
#define INIT_TEXT \
*(.init.text) \
-@@ -291,6 +305,26 @@
+@@ -290,6 +304,26 @@
+ DEV_DISCARD(exit.text) \
CPU_DISCARD(exit.text) \
MEM_DISCARD(exit.text)
-
++
+#ifdef CONFIG_STACK_UNWIND
+#define EH_FRAME \
+ /* Unwind data binary search table */ \
+#else
+#define EH_FRAME
+#endif
-+
+
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to
- the beginning of the section so we begin them at 0. */
-diff -purN linux-2.6.27/include/asm-m32r/spinlock.h linux-2.6.27.19-5.1/include/asm-m32r/spinlock.h
---- linux-2.6.27/include/asm-m32r/spinlock.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-m32r/spinlock.h 2009-03-25 16:11:46.000000000 +0000
-@@ -316,6 +316,9 @@ static inline int __raw_write_trylock(ra
+diff -r 9608d5473017 include/asm-m32r/spinlock.h
+--- a/include/asm-m32r/spinlock.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-m32r/spinlock.h Wed May 06 16:56:54 2009 +0100
+@@ -316,6 +316,9 @@
return 0;
}
#define _raw_spin_relax(lock) cpu_relax()
#define _raw_read_relax(lock) cpu_relax()
#define _raw_write_relax(lock) cpu_relax()
-diff -purN linux-2.6.27/include/asm-m68k/ioctls.h linux-2.6.27.19-5.1/include/asm-m68k/ioctls.h
---- linux-2.6.27/include/asm-m68k/ioctls.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-m68k/ioctls.h 2009-03-25 16:11:53.000000000 +0000
+diff -r 9608d5473017 include/asm-m68k/ioctls.h
+--- a/include/asm-m68k/ioctls.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-m68k/ioctls.h Wed May 06 16:56:54 2009 +0100
@@ -52,6 +52,7 @@
#define TCSETSF2 _IOW('T',0x2D, struct termios2)
#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
#define FIOCLEX 0x5451
-diff -purN linux-2.6.27/include/asm-m68k/thread_info.h linux-2.6.27.19-5.1/include/asm-m68k/thread_info.h
---- linux-2.6.27/include/asm-m68k/thread_info.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-m68k/thread_info.h 2009-03-25 16:11:53.000000000 +0000
-@@ -52,5 +52,6 @@ struct thread_info {
+diff -r 9608d5473017 include/asm-m68k/thread_info.h
+--- a/include/asm-m68k/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-m68k/thread_info.h Wed May 06 16:56:54 2009 +0100
+@@ -52,5 +52,6 @@
#define TIF_DELAYED_TRACE 14 /* single step a syscall */
#define TIF_SYSCALL_TRACE 15 /* syscall trace active */
#define TIF_MEMDIE 16
+#define TIF_FREEZE 17 /* thread is freezing for suspend */
#endif /* _ASM_M68K_THREAD_INFO_H */
-diff -purN linux-2.6.27/include/asm-mips/Kbuild linux-2.6.27.19-5.1/include/asm-mips/Kbuild
---- linux-2.6.27/include/asm-mips/Kbuild 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-mips/Kbuild 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/asm-mips/Kbuild
+--- a/include/asm-mips/Kbuild Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-mips/Kbuild Wed May 06 16:56:54 2009 +0100
@@ -1,3 +1,4 @@
include include/asm-generic/Kbuild.asm
header-y += cachectl.h sgidefs.h sysmips.h
+header-y += perfmon.h
-diff -purN linux-2.6.27/include/asm-mips/ioctls.h linux-2.6.27.19-5.1/include/asm-mips/ioctls.h
---- linux-2.6.27/include/asm-mips/ioctls.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-mips/ioctls.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/asm-mips/ioctls.h
+--- a/include/asm-mips/ioctls.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-mips/ioctls.h Wed May 06 16:56:54 2009 +0100
@@ -83,6 +83,7 @@
#define TCSETSF2 _IOW('T', 0x2D, struct termios2)
#define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
/* I hope the range from 0x5480 on is free ... */
#define TIOCSCTTY 0x5480 /* become controlling tty */
-diff -purN linux-2.6.27/include/asm-mips/perfmon.h linux-2.6.27.19-5.1/include/asm-mips/perfmon.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-mips/perfmon.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/asm-mips/perfmon.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-mips/perfmon.h Wed May 06 16:56:54 2009 +0100
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2007 Hewlett-Packard Development Company, L.P.
+#define PFM_ARCH_MAX_PMDS (256+64) /* 256 HW 64 SW */
+
+#endif /* _ASM_MIPS64_PERFMON_H_ */
-diff -purN linux-2.6.27/include/asm-mips/perfmon_kern.h linux-2.6.27.19-5.1/include/asm-mips/perfmon_kern.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-mips/perfmon_kern.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/asm-mips/perfmon_kern.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-mips/perfmon_kern.h Wed May 06 16:56:54 2009 +0100
@@ -0,0 +1,412 @@
+/*
+ * Copyright (c) 2005 Philip Mucci.
+
+#endif /* __KERNEL__ */
+#endif /* _ASM_MIPS64_PERFMON_KERN_H_ */
-diff -purN linux-2.6.27/include/asm-mips/spinlock.h linux-2.6.27.19-5.1/include/asm-mips/spinlock.h
---- linux-2.6.27/include/asm-mips/spinlock.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-mips/spinlock.h 2009-03-25 16:11:52.000000000 +0000
-@@ -368,6 +368,8 @@ static inline int __raw_write_trylock(ra
+diff -r 9608d5473017 include/asm-mips/spinlock.h
+--- a/include/asm-mips/spinlock.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-mips/spinlock.h Wed May 06 16:56:54 2009 +0100
+@@ -368,6 +368,8 @@
return ret;
}
#define _raw_spin_relax(lock) cpu_relax()
#define _raw_read_relax(lock) cpu_relax()
-diff -purN linux-2.6.27/include/asm-mips/system.h linux-2.6.27.19-5.1/include/asm-mips/system.h
---- linux-2.6.27/include/asm-mips/system.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-mips/system.h 2009-03-25 16:11:52.000000000 +0000
-@@ -67,6 +67,10 @@ do { \
+diff -r 9608d5473017 include/asm-mips/system.h
+--- a/include/asm-mips/system.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-mips/system.h Wed May 06 16:56:54 2009 +0100
+@@ -67,6 +67,10 @@
__mips_mt_fpaff_switch_to(prev); \
if (cpu_has_dsp) \
__save_dsp(prev); \
(last) = resume(prev, next, task_thread_info(next)); \
} while (0)
-diff -purN linux-2.6.27/include/asm-mips/thread_info.h linux-2.6.27.19-5.1/include/asm-mips/thread_info.h
---- linux-2.6.27/include/asm-mips/thread_info.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-mips/thread_info.h 2009-03-25 16:11:52.000000000 +0000
-@@ -114,6 +114,7 @@ register struct thread_info *__current_t
+diff -r 9608d5473017 include/asm-mips/thread_info.h
+--- a/include/asm-mips/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-mips/thread_info.h Wed May 06 16:56:54 2009 +0100
+@@ -114,6 +114,7 @@
#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
#define TIF_SYSCALL_AUDIT 3 /* syscall auditing active */
#define TIF_SECCOMP 4 /* secure computing */
#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */
#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */
#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */
-@@ -124,6 +125,7 @@ register struct thread_info *__current_t
+@@ -124,6 +125,7 @@
#define TIF_32BIT_REGS 22 /* also implies 16/32 fprs */
#define TIF_32BIT_ADDR 23 /* 32-bit address space (o32/n32) */
#define TIF_FPUBOUND 24 /* thread bound to FPU-full CPU set */
#define TIF_SYSCALL_TRACE 31 /* syscall trace active */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
-@@ -140,6 +142,8 @@ register struct thread_info *__current_t
+@@ -140,6 +142,8 @@
#define _TIF_32BIT_REGS (1<<TIF_32BIT_REGS)
#define _TIF_32BIT_ADDR (1<<TIF_32BIT_ADDR)
#define _TIF_FPUBOUND (1<<TIF_FPUBOUND)
/* work to do on interrupt/exception return */
#define _TIF_WORK_MASK (0x0000ffef & ~_TIF_SECCOMP)
-diff -purN linux-2.6.27/include/asm-parisc/spinlock.h linux-2.6.27.19-5.1/include/asm-parisc/spinlock.h
---- linux-2.6.27/include/asm-parisc/spinlock.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-parisc/spinlock.h 2009-03-25 16:11:46.000000000 +0000
-@@ -187,6 +187,9 @@ static __inline__ int __raw_write_can_lo
+diff -r 9608d5473017 include/asm-parisc/spinlock.h
+--- a/include/asm-parisc/spinlock.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-parisc/spinlock.h Wed May 06 16:56:54 2009 +0100
+@@ -187,6 +187,9 @@
return !rw->counter;
}
#define _raw_spin_relax(lock) cpu_relax()
#define _raw_read_relax(lock) cpu_relax()
#define _raw_write_relax(lock) cpu_relax()
-diff -purN linux-2.6.27/include/asm-parisc/thread_info.h linux-2.6.27.19-5.1/include/asm-parisc/thread_info.h
---- linux-2.6.27/include/asm-parisc/thread_info.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-parisc/thread_info.h 2009-03-25 16:11:46.000000000 +0000
-@@ -58,6 +58,7 @@ struct thread_info {
+diff -r 9608d5473017 include/asm-parisc/thread_info.h
+--- a/include/asm-parisc/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-parisc/thread_info.h Wed May 06 16:56:54 2009 +0100
+@@ -58,6 +58,7 @@
#define TIF_32BIT 4 /* 32 bit binary */
#define TIF_MEMDIE 5
#define TIF_RESTORE_SIGMASK 6 /* restore saved signal mask */
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
-@@ -65,6 +66,7 @@ struct thread_info {
+@@ -65,6 +66,7 @@
#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
#define _TIF_32BIT (1 << TIF_32BIT)
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
#define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | \
_TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK)
-diff -purN linux-2.6.27/include/asm-parisc/tlbflush.h linux-2.6.27.19-5.1/include/asm-parisc/tlbflush.h
---- linux-2.6.27/include/asm-parisc/tlbflush.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-parisc/tlbflush.h 2009-03-25 16:11:46.000000000 +0000
-@@ -44,9 +44,12 @@ static inline void flush_tlb_mm(struct m
+diff -r 9608d5473017 include/asm-parisc/tlbflush.h
+--- a/include/asm-parisc/tlbflush.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-parisc/tlbflush.h Wed May 06 16:56:54 2009 +0100
+@@ -44,9 +44,12 @@
{
BUG_ON(mm == &init_mm); /* Should never happen */
if (mm) {
if (mm->context != 0)
free_sid(mm->context);
-diff -purN linux-2.6.27/include/asm-um/thread_info.h linux-2.6.27.19-5.1/include/asm-um/thread_info.h
---- linux-2.6.27/include/asm-um/thread_info.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-um/thread_info.h 2009-03-25 16:11:53.000000000 +0000
-@@ -69,6 +69,7 @@ static inline struct thread_info *curren
+diff -r 9608d5473017 include/asm-um/thread_info.h
+--- a/include/asm-um/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-um/thread_info.h Wed May 06 16:56:54 2009 +0100
+@@ -69,6 +69,7 @@
#define TIF_MEMDIE 5
#define TIF_SYSCALL_AUDIT 6
#define TIF_RESTORE_SIGMASK 7
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
-@@ -77,5 +78,6 @@ static inline struct thread_info *curren
+@@ -77,5 +78,6 @@
#define _TIF_MEMDIE (1 << TIF_MEMDIE)
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
+#define _TIF_FREEZE (1 << TIF_FREEZE)
#endif
-diff -purN linux-2.6.27/include/asm-x86/Kbuild linux-2.6.27.19-5.1/include/asm-x86/Kbuild
---- linux-2.6.27/include/asm-x86/Kbuild 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/Kbuild 2009-03-25 16:11:47.000000000 +0000
-@@ -9,6 +9,7 @@ header-y += prctl.h
+diff -r 9608d5473017 include/asm-x86/Kbuild
+--- a/include/asm-x86/Kbuild Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/Kbuild Wed May 06 16:56:54 2009 +0100
+@@ -9,6 +9,7 @@
header-y += ptrace-abi.h
header-y += sigcontext32.h
header-y += ucontext.h
header-y += processor-flags.h
unifdef-y += e820.h
-diff -purN linux-2.6.27/include/asm-x86/acpi.h linux-2.6.27.19-5.1/include/asm-x86/acpi.h
---- linux-2.6.27/include/asm-x86/acpi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/acpi.h 2009-03-25 16:11:47.000000000 +0000
-@@ -30,6 +30,10 @@
+diff -r 9608d5473017 include/asm-x86/acpi.h
+--- a/include/asm-x86/acpi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/acpi.h Wed May 06 16:56:54 2009 +0100
+@@ -29,6 +29,10 @@
+ #include <asm/processor.h>
#include <asm/mmu.h>
#include <asm/mpspec.h>
-
++
+#ifdef CONFIG_XEN
+#include <xen/interface/platform.h>
+#endif
-+
+
#define COMPILER_DEPENDENT_INT64 long long
#define COMPILER_DEPENDENT_UINT64 unsigned long long
-
-@@ -124,6 +128,27 @@ extern unsigned long acpi_wakeup_address
+@@ -124,6 +128,27 @@
/* early initialization routine */
extern void acpi_reserve_bootmem(void);
/*
* Check if the CPU can handle C2 and deeper
*/
-@@ -156,7 +181,9 @@ static inline void disable_acpi(void) {
+@@ -156,7 +181,9 @@
#endif /* !CONFIG_ACPI */
struct bootnode;
-diff -purN linux-2.6.27/include/asm-x86/ansidecl.h linux-2.6.27.19-5.1/include/asm-x86/ansidecl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/ansidecl.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/ansidecl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/ansidecl.h Wed May 06 16:56:54 2009 +0100
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "ansidecl_32.h"
+#else
+# include "ansidecl_64.h"
+#endif
-diff -purN linux-2.6.27/include/asm-x86/ansidecl_32.h linux-2.6.27.19-5.1/include/asm-x86/ansidecl_32.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/ansidecl_32.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/ansidecl_32.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/ansidecl_32.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,383 @@
+/* ANSI and traditional C compatability macros
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+#endif
+
+#endif /* ansidecl.h */
-diff -purN linux-2.6.27/include/asm-x86/ansidecl_64.h linux-2.6.27.19-5.1/include/asm-x86/ansidecl_64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/ansidecl_64.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/ansidecl_64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/ansidecl_64.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,383 @@
+/* ANSI and traditional C compatability macros
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+#endif
+
+#endif /* ansidecl.h */
-diff -purN linux-2.6.27/include/asm-x86/apic.h linux-2.6.27.19-5.1/include/asm-x86/apic.h
---- linux-2.6.27/include/asm-x86/apic.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/apic.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/apic.h
+--- a/include/asm-x86/apic.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/apic.h Wed May 06 16:56:55 2009 +0100
@@ -5,12 +5,18 @@
#include <linux/delay.h>
/*
* Debugging macros
-@@ -36,6 +42,7 @@ extern void generic_apic_probe(void);
+@@ -36,6 +42,7 @@
#ifdef CONFIG_X86_LOCAL_APIC
extern unsigned int apic_verbosity;
extern int local_apic_timer_c2_ok;
extern int ioapic_force;
-@@ -47,15 +54,13 @@ extern int disable_apic;
+@@ -47,15 +54,13 @@
#ifdef CONFIG_PARAVIRT
#include <asm/paravirt.h>
#else
{
volatile u32 *addr = (volatile u32 *)(APIC_BASE + reg);
-@@ -64,15 +69,69 @@ static inline void native_apic_write(uns
+@@ -64,14 +69,68 @@
ASM_OUTPUT2("0" (v), "m" (*addr)));
}
+#define safe_apic_wait_icr_idle (apic_ops->safe_wait_icr_idle)
+
extern int get_physical_broadcast(void);
-
++
+#ifdef CONFIG_X86_64
+static inline void ack_x2APIC_irq(void)
+{
+ native_apic_msr_write(APIC_EOI, 0);
+}
+#endif
-+
+
static inline void ack_APIC_irq(void)
{
- /*
-@@ -85,6 +144,7 @@ static inline void ack_APIC_irq(void)
+@@ -85,6 +144,7 @@
/* Docs say use 0 for future compatibility */
apic_write(APIC_EOI, 0);
}
extern int lapic_get_maxlvt(void);
extern void clear_local_APIC(void);
-diff -purN linux-2.6.27/include/asm-x86/apicdef.h linux-2.6.27.19-5.1/include/asm-x86/apicdef.h
---- linux-2.6.27/include/asm-x86/apicdef.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/apicdef.h 2009-03-25 16:11:47.000000000 +0000
-@@ -1,6 +1,8 @@
+diff -r 9608d5473017 include/asm-x86/apicdef.h
+--- a/include/asm-x86/apicdef.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/apicdef.h Wed May 06 16:56:55 2009 +0100
+@@ -1,5 +1,7 @@
#ifndef _ASM_X86_APICDEF_H
#define _ASM_X86_APICDEF_H
-
-+#ifndef CONFIG_XEN
+
++#ifndef CONFIG_XEN
+
/*
* Constants for various Intel APICs. (local APIC, IOAPIC, etc.)
- *
@@ -105,6 +107,7 @@
#define APIC_TMICT 0x380
#define APIC_TMCCT 0x390
#ifdef CONFIG_X86_32
# define MAX_IO_APICS 64
-@@ -136,6 +151,8 @@
+@@ -135,6 +150,8 @@
+ # define MAX_IO_APICS 128
# define MAX_LOCAL_APIC 32768
#endif
-
-+#ifndef CONFIG_XEN
+
++#ifndef CONFIG_XEN
+
/*
* All x86-64 systems are xAPIC compatible.
- * In the following, "apicid" is a physical APIC ID.
-@@ -406,6 +423,8 @@ struct local_apic {
+@@ -406,6 +423,8 @@
#undef u32
#ifdef CONFIG_X86_32
#define BAD_APICID 0xFFu
#else
-diff -purN linux-2.6.27/include/asm-x86/bfd.h linux-2.6.27.19-5.1/include/asm-x86/bfd.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/bfd.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/bfd.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/bfd.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "bfd_32.h"
+#else
+# include "bfd_64.h"
+#endif
-diff -purN linux-2.6.27/include/asm-x86/bfd_32.h linux-2.6.27.19-5.1/include/asm-x86/bfd_32.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/bfd_32.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/bfd_32.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/bfd_32.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,4921 @@
+/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
+ generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
+}
+#endif
+#endif
-diff -purN linux-2.6.27/include/asm-x86/bfd_64.h linux-2.6.27.19-5.1/include/asm-x86/bfd_64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/bfd_64.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/bfd_64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/bfd_64.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,4917 @@
+/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
+ generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
+}
+#endif
+#endif
-diff -purN linux-2.6.27/include/asm-x86/cacheflush.h linux-2.6.27.19-5.1/include/asm-x86/cacheflush.h
---- linux-2.6.27/include/asm-x86/cacheflush.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/cacheflush.h 2009-03-25 16:11:47.000000000 +0000
-@@ -63,6 +63,7 @@ int set_memory_x(unsigned long addr, int
+diff -r 9608d5473017 include/asm-x86/cacheflush.h
+--- a/include/asm-x86/cacheflush.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/cacheflush.h Wed May 06 16:56:55 2009 +0100
+@@ -63,6 +63,7 @@
int set_memory_nx(unsigned long addr, int numpages);
int set_memory_ro(unsigned long addr, int numpages);
int set_memory_rw(unsigned long addr, int numpages);
int set_memory_np(unsigned long addr, int numpages);
int set_memory_4k(unsigned long addr, int numpages);
-@@ -92,6 +93,7 @@ int set_pages_x(struct page *page, int n
+@@ -92,6 +93,7 @@
int set_pages_nx(struct page *page, int numpages);
int set_pages_ro(struct page *page, int numpages);
int set_pages_rw(struct page *page, int numpages);
void clflush_cache_range(void *addr, unsigned int size);
-@@ -100,6 +102,7 @@ void cpa_init(void);
+@@ -100,6 +102,7 @@
#ifdef CONFIG_DEBUG_RODATA
void mark_rodata_ro(void);
extern const int rodata_test_data;
#endif
-diff -purN linux-2.6.27/include/asm-x86/cpufeature.h linux-2.6.27.19-5.1/include/asm-x86/cpufeature.h
---- linux-2.6.27/include/asm-x86/cpufeature.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/cpufeature.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/cpufeature.h
+--- a/include/asm-x86/cpufeature.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/cpufeature.h Wed May 06 16:56:55 2009 +0100
@@ -82,6 +82,8 @@
#define X86_FEATURE_11AP (3*32+19) /* Bad local APIC aka 11AP */
#define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */
/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
#define X86_FEATURE_XSTORE (5*32+ 2) /* on-CPU RNG present (xstore insn) */
-@@ -193,6 +197,8 @@ extern const char * const x86_power_flag
+@@ -193,6 +197,8 @@
#define cpu_has_arch_perfmon boot_cpu_has(X86_FEATURE_ARCH_PERFMON)
#define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT)
#define cpu_has_xmm4_2 boot_cpu_has(X86_FEATURE_XMM4_2)
#if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64)
# define cpu_has_invlpg 1
-diff -purN linux-2.6.27/include/asm-x86/dma-mapping.h linux-2.6.27.19-5.1/include/asm-x86/dma-mapping.h
---- linux-2.6.27/include/asm-x86/dma-mapping.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/dma-mapping.h 2009-03-25 16:11:47.000000000 +0000
-@@ -74,7 +74,7 @@ static inline struct dma_mapping_ops *ge
+diff -r 9608d5473017 include/asm-x86/dma-mapping.h
+--- a/include/asm-x86/dma-mapping.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/dma-mapping.h Wed May 06 16:56:55 2009 +0100
+@@ -74,7 +74,7 @@
/* Make sure we keep the same behaviour */
static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
{
return 0;
#else
struct dma_mapping_ops *ops = get_dma_ops(dev);
-@@ -223,8 +223,13 @@ static inline dma_addr_t dma_map_page(st
+@@ -223,8 +223,13 @@
struct dma_mapping_ops *ops = get_dma_ops(dev);
BUG_ON(!valid_dma_direction(direction));
}
static inline void dma_unmap_page(struct device *dev, dma_addr_t addr,
-diff -purN linux-2.6.27/include/asm-x86/efi.h linux-2.6.27.19-5.1/include/asm-x86/efi.h
---- linux-2.6.27/include/asm-x86/efi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/efi.h 2009-03-25 16:11:47.000000000 +0000
-@@ -49,6 +49,20 @@ extern u64 efi_call5(void *fp, u64 arg1,
+diff -r 9608d5473017 include/asm-x86/efi.h
+--- a/include/asm-x86/efi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/efi.h Wed May 06 16:56:55 2009 +0100
+@@ -49,6 +49,20 @@
extern u64 efi_call6(void *fp, u64 arg1, u64 arg2, u64 arg3,
u64 arg4, u64 arg5, u64 arg6);
#define efi_call_phys0(f) \
efi_call0((void *)(f))
#define efi_call_phys1(f, a1) \
-diff -purN linux-2.6.27/include/asm-x86/genapic_32.h linux-2.6.27.19-5.1/include/asm-x86/genapic_32.h
---- linux-2.6.27/include/asm-x86/genapic_32.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/genapic_32.h 2009-03-25 16:11:47.000000000 +0000
-@@ -23,7 +23,7 @@ struct genapic {
+diff -r 9608d5473017 include/asm-x86/genapic_32.h
+--- a/include/asm-x86/genapic_32.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/genapic_32.h Wed May 06 16:56:55 2009 +0100
+@@ -23,7 +23,7 @@
int (*probe)(void);
int (*apic_id_registered)(void);
int int_delivery_mode;
int int_dest_mode;
int ESR_DISABLE;
-@@ -56,11 +56,12 @@ struct genapic {
+@@ -56,11 +56,12 @@
unsigned (*get_apic_id)(unsigned long x);
unsigned long apic_id_mask;
void (*send_IPI_allbutself)(int vector);
void (*send_IPI_all)(int vector);
#endif
-@@ -106,6 +107,7 @@ struct genapic {
+@@ -106,6 +107,7 @@
APICFUNC(cpu_mask_to_apicid) \
APICFUNC(acpi_madt_oem_check) \
IPIFUNC(send_IPI_mask) \
IPIFUNC(send_IPI_allbutself) \
IPIFUNC(send_IPI_all) \
APICFUNC(enable_apic_mode) \
-diff -purN linux-2.6.27/include/asm-x86/genapic_64.h linux-2.6.27.19-5.1/include/asm-x86/genapic_64.h
---- linux-2.6.27/include/asm-x86/genapic_64.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/genapic_64.h 2009-03-25 16:11:47.000000000 +0000
-@@ -1,6 +1,8 @@
+diff -r 9608d5473017 include/asm-x86/genapic_64.h
+--- a/include/asm-x86/genapic_64.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/genapic_64.h Wed May 06 16:56:55 2009 +0100
+@@ -1,5 +1,7 @@
#ifndef _ASM_GENAPIC_H
#define _ASM_GENAPIC_H 1
-
-+#include <linux/cpumask.h>
+
++#include <linux/cpumask.h>
+
/*
* Copyright 2004 James Cleverdon, IBM.
- * Subject to the GNU Public License, v.2
@@ -14,27 +16,37 @@
struct genapic {
enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
extern enum uv_system_type get_uv_system_type(void);
extern int is_uv_system(void);
-@@ -44,6 +56,10 @@ DECLARE_PER_CPU(int, x2apic_extra_bits);
+@@ -44,6 +56,10 @@
extern void uv_cpu_init(void);
extern void uv_system_init(void);
extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip);
extern void setup_apic_routing(void);
-diff -purN linux-2.6.27/include/asm-x86/hw_irq.h linux-2.6.27.19-5.1/include/asm-x86/hw_irq.h
---- linux-2.6.27/include/asm-x86/hw_irq.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/hw_irq.h 2009-03-25 16:11:47.000000000 +0000
-@@ -73,7 +73,9 @@ extern void enable_IO_APIC(void);
+diff -r 9608d5473017 include/asm-x86/hw_irq.h
+--- a/include/asm-x86/hw_irq.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/hw_irq.h Wed May 06 16:56:55 2009 +0100
+@@ -73,7 +73,9 @@
#endif
/* IPI functions */
extern void send_IPI(int dest, int vector);
/* Statistics */
-diff -purN linux-2.6.27/include/asm-x86/hypervisor.h linux-2.6.27.19-5.1/include/asm-x86/hypervisor.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/hypervisor.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/hypervisor.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/hypervisor.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2008, VMware, Inc.
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
+#include_next <asm/hypervisor.h>
+#endif
-diff -purN linux-2.6.27/include/asm-x86/i8253.h linux-2.6.27.19-5.1/include/asm-x86/i8253.h
---- linux-2.6.27/include/asm-x86/i8253.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/i8253.h 2009-03-25 16:11:47.000000000 +0000
-@@ -8,10 +8,14 @@
+diff -r 9608d5473017 include/asm-x86/i8253.h
+--- a/include/asm-x86/i8253.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/i8253.h Wed May 06 16:56:55 2009 +0100
+@@ -8,9 +8,13 @@
extern spinlock_t i8253_lock;
extern struct clock_event_device *global_clock_event;
extern void setup_pit_timer(void);
-
-+#endif
+
++#endif
+
#define inb_pit inb_p
#define outb_pit outb_p
-
-diff -purN linux-2.6.27/include/asm-x86/i8259.h linux-2.6.27.19-5.1/include/asm-x86/i8259.h
---- linux-2.6.27/include/asm-x86/i8259.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/i8259.h 2009-03-25 16:11:47.000000000 +0000
-@@ -57,4 +57,7 @@ static inline void outb_pic(unsigned cha
+diff -r 9608d5473017 include/asm-x86/i8259.h
+--- a/include/asm-x86/i8259.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/i8259.h Wed May 06 16:56:55 2009 +0100
+@@ -57,4 +57,7 @@
extern struct irq_chip i8259A_chip;
+extern void unmask_8259A(void);
+
#endif /* __ASM_I8259_H__ */
-diff -purN linux-2.6.27/include/asm-x86/io.h linux-2.6.27.19-5.1/include/asm-x86/io.h
---- linux-2.6.27/include/asm-x86/io.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/io.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/io.h
+--- a/include/asm-x86/io.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/io.h Wed May 06 16:56:55 2009 +0100
@@ -12,7 +12,6 @@
*/
#ifndef __ASSEMBLY__
extern void early_ioremap_reset(void);
extern void *early_ioremap(unsigned long offset, unsigned long size);
extern void early_iounmap(void *addr, unsigned long size);
-@@ -92,7 +91,6 @@ extern void __iomem *ioremap_wc(unsigned
+@@ -92,7 +91,6 @@
* A boot-time mapping is currently limited to at most 16 pages.
*/
extern void early_ioremap_init(void);
extern void early_ioremap_reset(void);
extern void *early_ioremap(unsigned long offset, unsigned long size);
extern void early_iounmap(void *addr, unsigned long size);
-diff -purN linux-2.6.27/include/asm-x86/io_apic.h linux-2.6.27.19-5.1/include/asm-x86/io_apic.h
---- linux-2.6.27/include/asm-x86/io_apic.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/io_apic.h 2009-03-25 16:11:47.000000000 +0000
-@@ -107,6 +107,20 @@ struct IO_APIC_route_entry {
+diff -r 9608d5473017 include/asm-x86/io_apic.h
+--- a/include/asm-x86/io_apic.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/io_apic.h Wed May 06 16:56:55 2009 +0100
+@@ -107,6 +107,20 @@
} __attribute__ ((packed));
#ifdef CONFIG_X86_IO_APIC
/*
-@@ -160,8 +174,18 @@ extern int skip_ioapic_setup;
+@@ -160,8 +174,18 @@
/* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */
extern int timer_through_8259;
skip_ioapic_setup = 1;
}
-@@ -183,6 +207,12 @@ extern int io_apic_set_pci_routing(int i
+@@ -183,6 +207,12 @@
extern int (*ioapic_renumber_irq)(int ioapic, int irq);
extern void ioapic_init_mappings(void);
#else /* !CONFIG_X86_IO_APIC */
#define io_apic_assign_pci_irqs 0
static const int timer_through_8259 = 0;
-diff -purN linux-2.6.27/include/asm-x86/ioctls.h linux-2.6.27.19-5.1/include/asm-x86/ioctls.h
---- linux-2.6.27/include/asm-x86/ioctls.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/ioctls.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/ioctls.h
+--- a/include/asm-x86/ioctls.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/ioctls.h Wed May 06 16:56:55 2009 +0100
@@ -54,6 +54,7 @@
#define TIOCGPTN _IOR('T', 0x30, unsigned int)
/* Get Pty Number (of pty-mux device) */
#define FIONCLEX 0x5450
#define FIOCLEX 0x5451
-diff -purN linux-2.6.27/include/asm-x86/ipi.h linux-2.6.27.19-5.1/include/asm-x86/ipi.h
---- linux-2.6.27/include/asm-x86/ipi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/ipi.h 2009-03-25 16:11:47.000000000 +0000
-@@ -1,6 +1,8 @@
+diff -r 9608d5473017 include/asm-x86/ipi.h
+--- a/include/asm-x86/ipi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/ipi.h Wed May 06 16:56:55 2009 +0100
+@@ -1,5 +1,7 @@
#ifndef __ASM_IPI_H
#define __ASM_IPI_H
-
-+#ifndef CONFIG_XEN
+
++#ifndef CONFIG_XEN
+
/*
* Copyright 2004 James Cleverdon, IBM.
- * Subject to the GNU Public License, v.2
-@@ -49,6 +51,12 @@ static inline int __prepare_ICR2(unsigne
+@@ -49,6 +51,12 @@
return SET_APIC_DEST_FIELD(mask);
}
static inline void __send_IPI_shortcut(unsigned int shortcut, int vector,
unsigned int dest)
{
-@@ -64,7 +72,7 @@ static inline void __send_IPI_shortcut(u
+@@ -64,7 +72,7 @@
/*
* Wait for idle.
*/
/*
* No need to touch the target chip field
-@@ -74,7 +82,7 @@ static inline void __send_IPI_shortcut(u
+@@ -74,7 +82,7 @@
/*
* Send the IPI. The write to APIC_ICR fires this off.
*/
}
/*
-@@ -92,13 +100,13 @@ static inline void __send_IPI_dest_field
+@@ -92,13 +100,13 @@
if (unlikely(vector == NMI_VECTOR))
safe_apic_wait_icr_idle();
else
/*
* program the ICR
-@@ -108,10 +116,10 @@ static inline void __send_IPI_dest_field
+@@ -108,10 +116,10 @@
/*
* Send the IPI. The write to APIC_ICR fires this off.
*/
{
unsigned long flags;
unsigned long query_cpu;
-@@ -122,11 +130,29 @@ static inline void send_IPI_mask_sequenc
+@@ -122,11 +130,29 @@
* - mbligh
*/
local_irq_save(flags);
+#endif /* CONFIG_XEN */
+
#endif /* __ASM_IPI_H */
-diff -purN linux-2.6.27/include/asm-x86/irq.h linux-2.6.27.19-5.1/include/asm-x86/irq.h
---- linux-2.6.27/include/asm-x86/irq.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/irq.h 2009-03-25 16:11:47.000000000 +0000
-@@ -15,7 +15,7 @@ static inline int irq_canonicalize(int i
+diff -r 9608d5473017 include/asm-x86/irq.h
+--- a/include/asm-x86/irq.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/irq.h Wed May 06 16:56:55 2009 +0100
+@@ -15,7 +15,7 @@
return ((irq == 2) ? 9 : irq);
}
# define ARCH_HAS_NMI_WATCHDOG
#endif
-diff -purN linux-2.6.27/include/asm-x86/irq_remapping.h linux-2.6.27.19-5.1/include/asm-x86/irq_remapping.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/irq_remapping.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/irq_remapping.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/irq_remapping.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,8 @@
+#ifndef _ASM_IRQ_REMAPPING_H
+#define _ASM_IRQ_REMAPPING_H
+#define IRTE_DEST(dest) ((x2apic) ? dest : dest << 8)
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/irq_vectors.h linux-2.6.27.19-5.1/include/asm-x86/irq_vectors.h
---- linux-2.6.27/include/asm-x86/irq_vectors.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/irq_vectors.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/irq_vectors.h
+--- a/include/asm-x86/irq_vectors.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/irq_vectors.h Wed May 06 16:56:55 2009 +0100
@@ -16,6 +16,7 @@
#else
# define IA32_SYSCALL_VECTOR 0x80
/*
* Reserve the lowest usable priority level 0x20 - 0x2f for triggering
-@@ -85,6 +86,12 @@
+@@ -85,11 +86,22 @@
#endif
/*
* Local APIC timer IRQ vector is on a different priority level,
* to work around the 'lost local interrupt if more than 2 IRQ
* sources per level' errata.
-@@ -92,6 +99,11 @@
+ */
#define LOCAL_TIMER_VECTOR 0xef
-
- /*
++
++/*
+ * Perfmon PMU interrupt vector
+ */
+#define LOCAL_PERFMON_VECTOR 0xee
-+
-+/*
+
+ /*
* First APIC vector available to drivers: (vectors 0x30-0xee) we
- * start at 0x31(0x41) to spread out vectors evenly between priority
- * levels. (0x80 is the syscall vector)
-diff -purN linux-2.6.27/include/asm-x86/kdb.h linux-2.6.27.19-5.1/include/asm-x86/kdb.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/kdb.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/kdb.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/kdb.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,138 @@
+#ifndef _ASM_KDB_H
+#define _ASM_KDB_H
+#endif
+
+#endif /* !_ASM_KDB_H */
-diff -purN linux-2.6.27/include/asm-x86/kdbprivate.h linux-2.6.27.19-5.1/include/asm-x86/kdbprivate.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/kdbprivate.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/kdbprivate.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/kdbprivate.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,241 @@
+#ifndef _ASM_KDBPRIVATE_H
+#define _ASM_KDBPRIVATE_H
+#endif /* !CONFIG_X86_32 */
+
+#endif /* !_ASM_KDBPRIVATE_H */
-diff -purN linux-2.6.27/include/asm-x86/kdebug.h linux-2.6.27.19-5.1/include/asm-x86/kdebug.h
---- linux-2.6.27/include/asm-x86/kdebug.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/kdebug.h 2009-03-25 16:11:47.000000000 +0000
-@@ -15,6 +15,8 @@ enum die_val {
+diff -r 9608d5473017 include/asm-x86/kdebug.h
+--- a/include/asm-x86/kdebug.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/kdebug.h Wed May 06 16:56:55 2009 +0100
+@@ -15,6 +15,8 @@
DIE_DIE,
DIE_NMIWATCHDOG,
DIE_KERNELDEBUG,
DIE_TRAP,
DIE_GPF,
DIE_CALL,
-diff -purN linux-2.6.27/include/asm-x86/kexec.h linux-2.6.27.19-5.1/include/asm-x86/kexec.h
---- linux-2.6.27/include/asm-x86/kexec.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/kexec.h 2009-03-25 16:11:47.000000000 +0000
-@@ -170,6 +170,19 @@ relocate_kernel(unsigned long indirectio
+diff -r 9608d5473017 include/asm-x86/kexec.h
+--- a/include/asm-x86/kexec.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/kexec.h Wed May 06 16:56:55 2009 +0100
+@@ -170,6 +170,19 @@
unsigned long start_address) ATTRIB_NORET;
#endif
#endif /* __ASSEMBLY__ */
#endif /* _KEXEC_H */
-diff -purN linux-2.6.27/include/asm-x86/kmap_types.h linux-2.6.27.19-5.1/include/asm-x86/kmap_types.h
---- linux-2.6.27/include/asm-x86/kmap_types.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/kmap_types.h 2009-03-25 16:11:47.000000000 +0000
-@@ -21,7 +21,8 @@ D(9) KM_IRQ0,
+diff -r 9608d5473017 include/asm-x86/kmap_types.h
+--- a/include/asm-x86/kmap_types.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/kmap_types.h Wed May 06 16:56:55 2009 +0100
+@@ -21,7 +21,8 @@
D(10) KM_IRQ1,
D(11) KM_SOFTIRQ0,
D(12) KM_SOFTIRQ1,
};
#undef D
-diff -purN linux-2.6.27/include/asm-x86/mach-bigsmp/mach_apic.h linux-2.6.27.19-5.1/include/asm-x86/mach-bigsmp/mach_apic.h
---- linux-2.6.27/include/asm-x86/mach-bigsmp/mach_apic.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-bigsmp/mach_apic.h 2009-03-25 16:11:47.000000000 +0000
-@@ -10,7 +10,7 @@ static inline int apic_id_registered(voi
+diff -r 9608d5473017 include/asm-x86/mach-bigsmp/mach_apic.h
+--- a/include/asm-x86/mach-bigsmp/mach_apic.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-bigsmp/mach_apic.h Wed May 06 16:56:55 2009 +0100
+@@ -10,7 +10,7 @@
}
/* Round robin the irqs amoung the online cpus */
{
static unsigned long cpu = NR_CPUS;
do {
-@@ -19,7 +19,7 @@ static inline cpumask_t target_cpus(void
+@@ -19,7 +19,7 @@
else
cpu = next_cpu(cpu, cpu_online_map);
} while (cpu >= NR_CPUS);
}
#undef APIC_DEST_LOGICAL
-@@ -126,12 +126,12 @@ static inline int check_phys_apicid_pres
+@@ -126,12 +126,12 @@
}
/* As we are using single CPU as destination, pick only one CPU here */
apicid = cpu_to_logical_apicid(cpu);
return apicid;
}
-diff -purN linux-2.6.27/include/asm-x86/mach-bigsmp/mach_ipi.h linux-2.6.27.19-5.1/include/asm-x86/mach-bigsmp/mach_ipi.h
---- linux-2.6.27/include/asm-x86/mach-bigsmp/mach_ipi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-bigsmp/mach_ipi.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-bigsmp/mach_ipi.h
+--- a/include/asm-x86/mach-bigsmp/mach_ipi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-bigsmp/mach_ipi.h Wed May 06 16:56:55 2009 +0100
@@ -1,25 +1,30 @@
#ifndef __ASM_MACH_IPI_H
#define __ASM_MACH_IPI_H
send_IPI_mask_sequence(mask, vector);
}
--static inline void send_IPI_allbutself(int vector)
+static inline void send_IPI_mask_allbutself(const cpumask_t *mask, int vector)
- {
-- cpumask_t mask = cpu_online_map;
-- cpu_clear(smp_processor_id(), mask);
++{
+ cpumask_t allbutself = *mask;
+ cpu_clear(smp_processor_id(), allbutself);
+
+ if (!cpus_empty(allbutself))
+ send_IPI_mask_sequence(&allbutself, vector);
+}
-
++
+ static inline void send_IPI_allbutself(int vector)
+ {
+- cpumask_t mask = cpu_online_map;
+- cpu_clear(smp_processor_id(), mask);
+-
- if (!cpus_empty(mask))
- send_IPI_mask(mask, vector);
-+static inline void send_IPI_allbutself(int vector)
-+{
+ send_IPI_mask_allbutself(&cpu_online_map, vector);
}
}
#endif /* __ASM_MACH_IPI_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-default/entry_arch.h linux-2.6.27.19-5.1/include/asm-x86/mach-default/entry_arch.h
---- linux-2.6.27/include/asm-x86/mach-default/entry_arch.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-default/entry_arch.h 2009-03-25 16:11:47.000000000 +0000
-@@ -32,4 +32,8 @@ BUILD_INTERRUPT(spurious_interrupt,SPURI
+diff -r 9608d5473017 include/asm-x86/mach-default/entry_arch.h
+--- a/include/asm-x86/mach-default/entry_arch.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-default/entry_arch.h Wed May 06 16:56:55 2009 +0100
+@@ -32,4 +32,8 @@
BUILD_INTERRUPT(thermal_interrupt,THERMAL_APIC_VECTOR)
#endif
+#ifdef CONFIG_PERFMON
+BUILD_INTERRUPT(pmu_interrupt,LOCAL_PERFMON_VECTOR)
-+#endif
-+
#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-default/mach_apic.h linux-2.6.27.19-5.1/include/asm-x86/mach-default/mach_apic.h
---- linux-2.6.27/include/asm-x86/mach-default/mach_apic.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-default/mach_apic.h 2009-03-25 16:11:47.000000000 +0000
++
++#endif
+diff -r 9608d5473017 include/asm-x86/mach-default/mach_apic.h
+--- a/include/asm-x86/mach-default/mach_apic.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-default/mach_apic.h Wed May 06 16:56:55 2009 +0100
@@ -8,12 +8,12 @@
#define APIC_DFR_VALUE (APIC_DFR_FLAT)
#endif
}
-@@ -30,6 +30,8 @@ static inline cpumask_t target_cpus(void
+@@ -30,6 +30,8 @@
#define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid)
#define phys_pkg_id (genapic->phys_pkg_id)
#define vector_allocation_domain (genapic->vector_allocation_domain)
extern void setup_apic_routing(void);
#else
#define INT_DELIVERY_MODE dest_LowestPrio
-@@ -54,12 +56,12 @@ static inline void init_apic_ldr(void)
+@@ -54,12 +56,12 @@
static inline int apic_id_registered(void)
{
}
static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
-@@ -113,7 +115,7 @@ static inline int cpu_to_logical_apicid(
+@@ -113,7 +115,7 @@
static inline int cpu_present_to_apicid(int mps_cpu)
{
return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu);
else
return BAD_APICID;
-diff -purN linux-2.6.27/include/asm-x86/mach-default/mach_apicdef.h linux-2.6.27.19-5.1/include/asm-x86/mach-default/mach_apicdef.h
---- linux-2.6.27/include/asm-x86/mach-default/mach_apicdef.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-default/mach_apicdef.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-default/mach_apicdef.h
+--- a/include/asm-x86/mach-default/mach_apicdef.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-default/mach_apicdef.h Wed May 06 16:56:55 2009 +0100
@@ -4,9 +4,9 @@
#include <asm/apic.h>
#else
#define APIC_ID_MASK (0xF<<24)
static inline unsigned get_apic_id(unsigned long x)
-diff -purN linux-2.6.27/include/asm-x86/mach-default/mach_ipi.h linux-2.6.27.19-5.1/include/asm-x86/mach-default/mach_ipi.h
---- linux-2.6.27/include/asm-x86/mach-default/mach_ipi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-default/mach_ipi.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-default/mach_ipi.h
+--- a/include/asm-x86/mach-default/mach_ipi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-default/mach_ipi.h Wed May 06 16:56:55 2009 +0100
@@ -4,7 +4,8 @@
/* Avoid include hell */
#define NMI_VECTOR 0x02
void __send_IPI_shortcut(unsigned int shortcut, int vector);
extern int no_broadcast;
-@@ -12,28 +13,27 @@ extern int no_broadcast;
+@@ -12,28 +13,27 @@
#ifdef CONFIG_X86_64
#include <asm/genapic.h>
#define send_IPI_mask (genapic->send_IPI_mask)
else
__send_IPI_shortcut(APIC_DEST_ALLINC, vector);
}
-diff -purN linux-2.6.27/include/asm-x86/mach-es7000/mach_apic.h linux-2.6.27.19-5.1/include/asm-x86/mach-es7000/mach_apic.h
---- linux-2.6.27/include/asm-x86/mach-es7000/mach_apic.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-es7000/mach_apic.h 2009-03-25 16:11:47.000000000 +0000
-@@ -9,12 +9,12 @@ static inline int apic_id_registered(voi
+diff -r 9608d5473017 include/asm-x86/mach-es7000/mach_apic.h
+--- a/include/asm-x86/mach-es7000/mach_apic.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-es7000/mach_apic.h Wed May 06 16:56:55 2009 +0100
+@@ -9,12 +9,12 @@
return (1);
}
#endif
}
#define TARGET_CPUS (target_cpus())
-@@ -81,7 +81,7 @@ static inline void setup_apic_routing(vo
+@@ -81,7 +81,7 @@
int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id());
printk("Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n",
(apic_version[apic] == 0x14) ?
}
static inline int multi_timer_check(int apic, int irq)
-@@ -141,18 +141,18 @@ static inline void setup_portio_remap(vo
+@@ -141,18 +141,18 @@
extern unsigned int boot_cpu_physical_apicid;
static inline int check_phys_apicid_present(int cpu_physical_apicid)
{
/* Return id to all */
if (num_bits_set == NR_CPUS)
#if defined CONFIG_ES7000_CLUSTERED_APIC
-@@ -164,10 +164,10 @@ static inline unsigned int cpu_mask_to_a
+@@ -164,10 +164,10 @@
* The cpus in the mask must all be on the apic cluster. If are not
* on the same apicid cluster return default value of TARGET_CPUS.
*/
int new_apicid = cpu_to_logical_apicid(cpu);
if (apicid_cluster(apicid) !=
apicid_cluster(new_apicid)){
-diff -purN linux-2.6.27/include/asm-x86/mach-es7000/mach_ipi.h linux-2.6.27.19-5.1/include/asm-x86/mach-es7000/mach_ipi.h
---- linux-2.6.27/include/asm-x86/mach-es7000/mach_ipi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-es7000/mach_ipi.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-es7000/mach_ipi.h
+--- a/include/asm-x86/mach-es7000/mach_ipi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-es7000/mach_ipi.h Wed May 06 16:56:55 2009 +0100
@@ -1,24 +1,30 @@
#ifndef __ASM_MACH_IPI_H
#define __ASM_MACH_IPI_H
}
#endif /* __ASM_MACH_IPI_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-generic/mach_ipi.h linux-2.6.27.19-5.1/include/asm-x86/mach-generic/mach_ipi.h
---- linux-2.6.27/include/asm-x86/mach-generic/mach_ipi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-generic/mach_ipi.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-generic/mach_ipi.h
+--- a/include/asm-x86/mach-generic/mach_ipi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-generic/mach_ipi.h Wed May 06 16:56:55 2009 +0100
@@ -4,6 +4,7 @@
#include <asm/genapic.h>
#define send_IPI_allbutself (genapic->send_IPI_allbutself)
#define send_IPI_all (genapic->send_IPI_all)
-diff -purN linux-2.6.27/include/asm-x86/mach-numaq/mach_apic.h linux-2.6.27.19-5.1/include/asm-x86/mach-numaq/mach_apic.h
---- linux-2.6.27/include/asm-x86/mach-numaq/mach_apic.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-numaq/mach_apic.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-numaq/mach_apic.h
+--- a/include/asm-x86/mach-numaq/mach_apic.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-numaq/mach_apic.h Wed May 06 16:56:55 2009 +0100
@@ -7,9 +7,9 @@
#define APIC_DFR_VALUE (APIC_DFR_CLUSTER)
}
#define TARGET_CPUS (target_cpus())
-@@ -124,7 +124,7 @@ static inline void enable_apic_mode(void
+@@ -124,7 +124,7 @@
* We use physical apicids here, not logical, so just return the default
* physical broadcast to stop people from breaking us
*/
{
return (int) 0xF;
}
-diff -purN linux-2.6.27/include/asm-x86/mach-numaq/mach_ipi.h linux-2.6.27.19-5.1/include/asm-x86/mach-numaq/mach_ipi.h
---- linux-2.6.27/include/asm-x86/mach-numaq/mach_ipi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-numaq/mach_ipi.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-numaq/mach_ipi.h
+--- a/include/asm-x86/mach-numaq/mach_ipi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-numaq/mach_ipi.h Wed May 06 16:56:55 2009 +0100
@@ -1,25 +1,31 @@
#ifndef __ASM_MACH_IPI_H
#define __ASM_MACH_IPI_H
send_IPI_mask_sequence(mask, vector);
}
--static inline void send_IPI_allbutself(int vector)
+static inline void send_IPI_mask_allbutself(const cpumask_t *mask, int vector)
- {
-- cpumask_t mask = cpu_online_map;
-- cpu_clear(smp_processor_id(), mask);
++{
+ cpumask_t allbutself = *mask;
+ cpu_clear(smp_processor_id(), allbutself);
+
+ if (!cpus_empty(allbutself))
+ send_IPI_mask_sequence(&allbutself, vector);
+}
-
++
+ static inline void send_IPI_allbutself(int vector)
+ {
+- cpumask_t mask = cpu_online_map;
+- cpu_clear(smp_processor_id(), mask);
+-
- if (!cpus_empty(mask))
- send_IPI_mask(mask, vector);
-+static inline void send_IPI_allbutself(int vector)
-+{
+ send_IPI_mask_allbutself(&cpu_online_map, vector);
}
#endif /* __ASM_MACH_IPI_H */
+
-diff -purN linux-2.6.27/include/asm-x86/mach-summit/mach_apic.h linux-2.6.27.19-5.1/include/asm-x86/mach-summit/mach_apic.h
---- linux-2.6.27/include/asm-x86/mach-summit/mach_apic.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-summit/mach_apic.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-summit/mach_apic.h
+--- a/include/asm-x86/mach-summit/mach_apic.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-summit/mach_apic.h Wed May 06 16:56:55 2009 +0100
@@ -14,13 +14,13 @@
#define APIC_DFR_VALUE (APIC_DFR_CLUSTER)
}
#define TARGET_CPUS (target_cpus())
-@@ -138,14 +138,14 @@ static inline void enable_apic_mode(void
+@@ -138,14 +138,14 @@
{
}
/* Return id to all */
if (num_bits_set == NR_CPUS)
return (int) 0xFF;
-@@ -153,10 +153,10 @@ static inline unsigned int cpu_mask_to_a
+@@ -153,10 +153,10 @@
* The cpus in the mask must all be on the apic cluster. If are not
* on the same apicid cluster return default value of TARGET_CPUS.
*/
int new_apicid = cpu_to_logical_apicid(cpu);
if (apicid_cluster(apicid) !=
apicid_cluster(new_apicid)){
-diff -purN linux-2.6.27/include/asm-x86/mach-summit/mach_ipi.h linux-2.6.27.19-5.1/include/asm-x86/mach-summit/mach_ipi.h
---- linux-2.6.27/include/asm-x86/mach-summit/mach_ipi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-summit/mach_ipi.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-summit/mach_ipi.h
+--- a/include/asm-x86/mach-summit/mach_ipi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-summit/mach_ipi.h Wed May 06 16:56:55 2009 +0100
@@ -1,25 +1,31 @@
#ifndef __ASM_MACH_IPI_H
#define __ASM_MACH_IPI_H
send_IPI_mask_sequence(mask, vector);
}
--static inline void send_IPI_allbutself(int vector)
+static inline void send_IPI_mask_allbutself(const cpumask_t *mask, int vector)
- {
-- cpumask_t mask = cpu_online_map;
-- cpu_clear(smp_processor_id(), mask);
++{
+ cpumask_t allbutself = *mask;
+ cpu_clear(smp_processor_id(), allbutself);
+
+ if (!cpus_empty(allbutself))
+ send_IPI_mask_sequence(&allbutself, vector);
+}
-
++
+ static inline void send_IPI_allbutself(int vector)
+ {
+- cpumask_t mask = cpu_online_map;
+- cpu_clear(smp_processor_id(), mask);
+-
- if (!cpus_empty(mask))
- send_IPI_mask(mask, vector);
-+static inline void send_IPI_allbutself(int vector)
-+{
+ send_IPI_mask_allbutself(&cpu_online_map, vector);
}
#endif /* __ASM_MACH_IPI_H */
+
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/agp.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/agp.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/agp.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/agp.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/agp.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,43 @@
+#ifndef _ASM_X86_AGP_H
+#define _ASM_X86_AGP_H
+ dma_free_coherent(NULL,PAGE_SIZE<<(order),(table),virt_to_bus(table))
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/desc.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/desc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/desc.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/desc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/desc.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,423 @@
+#ifndef _ASM_DESC_H_
+#define _ASM_DESC_H_
+#endif /* __ASSEMBLY__ */
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/dma-mapping.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/dma-mapping.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/dma-mapping.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/dma-mapping.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/dma-mapping.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,17 @@
+#ifndef _ASM_DMA_MAPPING_H_
+
+extern int range_straddles_page_boundary(paddr_t p, size_t size);
+
+#endif /* _ASM_DMA_MAPPING_H_ */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/fixmap.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/fixmap.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/fixmap.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/fixmap.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/fixmap.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,64 @@
+#ifndef _ASM_FIXMAP_H
+#define _ASM_FIXMAP_H
+ return __virt_to_fix(vaddr);
+}
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/fixmap_32.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/fixmap_32.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/fixmap_32.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/fixmap_32.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/fixmap_32.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,129 @@
+/*
+ * fixmap.h: compile-time virtual memory allocation
+
+#endif /* !__ASSEMBLY__ */
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/fixmap_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/fixmap_64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/fixmap_64.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/fixmap_64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/fixmap_64.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,92 @@
+/*
+ * fixmap.h: compile-time virtual memory allocation
+#define FIXADDR_USER_END (FIXADDR_USER_START + PAGE_SIZE)
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/gnttab_dma.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/gnttab_dma.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/gnttab_dma.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/gnttab_dma.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/gnttab_dma.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2007 Herbert Xu <herbert@gondor.apana.org.au>
+}
+
+#endif /* _ASM_I386_GNTTAB_DMA_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/highmem.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/highmem.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/highmem.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/highmem.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/highmem.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,99 @@
+/*
+ * highmem.h: virtual kernel memory mappings for high memory
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_HIGHMEM_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/hypercall.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypercall.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypercall.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/hypercall.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/hypercall.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,414 @@
+/******************************************************************************
+ * hypercall.h
+}
+
+#endif /* __HYPERCALL_H__ */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/hypercall_32.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypercall_32.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypercall_32.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/hypercall_32.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/hypercall_32.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,62 @@
+#define HYPERCALL_arg1 "ebx"
+#define HYPERCALL_arg2 "ecx"
+ return _hypercall5(int, update_va_mapping_otherdomain, va,
+ new_val.pte_low, pte_hi, flags, domid);
+}
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/hypercall_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypercall_64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypercall_64.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/hypercall_64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/hypercall_64.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,54 @@
+#define HYPERCALL_arg1 "rdi"
+#define HYPERCALL_arg2 "rsi"
+{
+ return _hypercall2(int, set_segment_base, reg, value);
+}
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/hypervisor.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypervisor.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypervisor.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/hypervisor.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/hypervisor.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,362 @@
+/******************************************************************************
+ * hypervisor.h
+#endif
+
+#endif /* __HYPERVISOR_H__ */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/io.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/io.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/io.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/io.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/io.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,103 @@
+#ifndef _ASM_X86_IO_H
+#define _ASM_X86_IO_H
+
+
+#endif /* _ASM_X86_IO_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/io_32.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/io_32.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/io_32.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/io_32.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/io_32.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,295 @@
+#ifndef _ASM_IO_H
+#define _ASM_IO_H
+#define ARCH_HAS_DEV_MEM
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/io_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/io_64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/io_64.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/io_64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/io_64.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,264 @@
+#ifndef _ASM_IO_H
+#define _ASM_IO_H
+#define ARCH_HAS_DEV_MEM
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/irq_vectors.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/irq_vectors.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/irq_vectors.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/irq_vectors.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/irq_vectors.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,52 @@
+#ifndef _ASM_IRQ_VECTORS_H
+#define _ASM_IRQ_VECTORS_H
+#define NR_IRQ_VECTORS NR_IRQS
+
+#endif /* _ASM_IRQ_VECTORS_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/irqflags.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/irqflags.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/irqflags.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/irqflags.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/irqflags.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,217 @@
+#ifndef _X86_IRQFLAGS_H_
+#define _X86_IRQFLAGS_H_
+
+#endif /* __ASSEMBLY__ */
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/maddr.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/maddr.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/maddr.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/maddr.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/maddr.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "maddr_32.h"
+#else
+# include "maddr_64.h"
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/maddr_32.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/maddr_32.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/maddr_32.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/maddr_32.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/maddr_32.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,182 @@
+#ifndef _I386_MADDR_H
+#define _I386_MADDR_H
+#define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT))
+
+#endif /* _I386_MADDR_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/maddr_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/maddr_64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/maddr_64.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/maddr_64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/maddr_64.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,163 @@
+#ifndef _X86_64_MADDR_H
+#define _X86_64_MADDR_H
+
+#endif /* _X86_64_MADDR_H */
+
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/mmu_context.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/mmu_context.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/mmu_context.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/mmu_context.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/mmu_context.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,42 @@
+#ifndef __ASM_X86_MMU_CONTEXT_H
+#define __ASM_X86_MMU_CONTEXT_H
+
+
+#endif /* __ASM_X86_MMU_CONTEXT_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/mmu_context_32.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/mmu_context_32.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/mmu_context_32.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/mmu_context_32.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/mmu_context_32.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,84 @@
+#ifndef __I386_SCHED_H
+#define __I386_SCHED_H
+ asm("movl %0,%%gs": :"r" (0));
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/mmu_context_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/mmu_context_64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/mmu_context_64.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/mmu_context_64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/mmu_context_64.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,109 @@
+#ifndef __X86_64_MMU_CONTEXT_H
+#define __X86_64_MMU_CONTEXT_H
+} while (0)
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/page.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/page.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/page.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/page.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/page.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,249 @@
+#ifndef _ASM_X86_PAGE_H
+#define _ASM_X86_PAGE_H
+
+#endif /* __KERNEL__ */
+#endif /* _ASM_X86_PAGE_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/page_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/page_64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/page_64.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/page_64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/page_64.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,113 @@
+#ifndef _X86_64_PAGE_H
+#define _X86_64_PAGE_H
+
+
+#endif /* _X86_64_PAGE_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pci.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pci.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pci.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pci.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pci.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,120 @@
+#ifndef __x86_PCI_H
+#define __x86_PCI_H
+#endif
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pci_32.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pci_32.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pci_32.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pci_32.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pci_32.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,56 @@
+#ifndef __i386_PCI_H
+#define __i386_PCI_H
+
+
+#endif /* __i386_PCI_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pci_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pci_64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pci_64.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pci_64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pci_64.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,68 @@
+#ifndef __x8664_PCI_H
+#define __x8664_PCI_H
+#endif /* __KERNEL__ */
+
+#endif /* __x8664_PCI_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgalloc.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgalloc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgalloc.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pgalloc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pgalloc.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,135 @@
+#ifndef _ASM_X86_PGALLOC_H
+#define _ASM_X86_PGALLOC_H
+#endif /* PAGETABLE_LEVELS > 2 */
+
+#endif /* _ASM_X86_PGALLOC_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgtable-3level-defs.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable-3level-defs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable-3level-defs.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pgtable-3level-defs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pgtable-3level-defs.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,24 @@
+#ifndef _I386_PGTABLE_3LEVEL_DEFS_H
+#define _I386_PGTABLE_3LEVEL_DEFS_H
+#define PTRS_PER_PTE 512
+
+#endif /* _I386_PGTABLE_3LEVEL_DEFS_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgtable-3level.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable-3level.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable-3level.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pgtable-3level.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pgtable-3level.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,179 @@
+#ifndef _I386_PGTABLE_3LEVEL_H
+#define _I386_PGTABLE_3LEVEL_H
+#define __swp_entry_to_pte(x) ((pte_t){ { .pte_high = (x).val } })
+
+#endif /* _I386_PGTABLE_3LEVEL_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgtable.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pgtable.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pgtable.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,644 @@
+#ifndef _ASM_X86_PGTABLE_H
+#define _ASM_X86_PGTABLE_H
+#endif /* __ASSEMBLY__ */
+
+#endif /* _ASM_X86_PGTABLE_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgtable_32.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable_32.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable_32.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pgtable_32.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pgtable_32.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,198 @@
+#ifndef _I386_PGTABLE_H
+#define _I386_PGTABLE_H
+ direct_remap_pfn_range(vma, from, pfn, size, prot, DOMID_IO)
+
+#endif /* _I386_PGTABLE_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgtable_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable_64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable_64.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pgtable_64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pgtable_64.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,330 @@
+#ifndef _X86_64_PGTABLE_H
+#define _X86_64_PGTABLE_H
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _X86_64_PGTABLE_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/processor.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/processor.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/processor.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/processor.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/processor.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,896 @@
+#ifndef __ASM_X86_PROCESSOR_H
+#define __ASM_X86_PROCESSOR_H
+extern int set_tsc_mode(unsigned int val);
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/segment.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/segment.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/segment.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/segment.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/segment.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,216 @@
+#ifndef _ASM_X86_SEGMENT_H_
+#define _ASM_X86_SEGMENT_H_
+#endif
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/smp.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/smp.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/smp.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/smp.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/smp.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,223 @@
+#ifndef _ASM_X86_SMP_H_
+#define _ASM_X86_SMP_H_
+
+#endif /* __ASSEMBLY__ */
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/spinlock.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/spinlock.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/spinlock.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/spinlock.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/spinlock.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,432 @@
+#ifndef _X86_SPINLOCK_H_
+#define _X86_SPINLOCK_H_
+#define _raw_write_relax(lock) cpu_relax()
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/swiotlb.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/swiotlb.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/swiotlb.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/swiotlb.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/swiotlb.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,8 @@
+#ifndef _ASM_SWIOTLB_H
+
+ int dir);
+
+#endif /* _ASM_SWIOTLB_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/synch_bitops.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/synch_bitops.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/synch_bitops.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/synch_bitops.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/synch_bitops.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,126 @@
+#ifndef __XEN_SYNCH_BITOPS_H__
+#define __XEN_SYNCH_BITOPS_H__
+#define synch_cmpxchg_subword synch_cmpxchg
+
+#endif /* __XEN_SYNCH_BITOPS_H__ */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/system.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/system.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/system.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/system.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/system.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,406 @@
+#ifndef _ASM_X86_SYSTEM_H_
+#define _ASM_X86_SYSTEM_H_
+}
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/system_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/system_64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/system_64.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/system_64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/system_64.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,20 @@
+#ifndef __ASM_SYSTEM_H
+#define __ASM_SYSTEM_H
+#include <linux/irqflags.h>
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/tlbflush.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/tlbflush.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/tlbflush.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/tlbflush.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/tlbflush.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,107 @@
+#ifndef _ASM_X86_TLBFLUSH_H
+#define _ASM_X86_TLBFLUSH_H
+}
+
+#endif /* _ASM_X86_TLBFLUSH_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/vga.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/vga.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/vga.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/vga.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/vga.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,20 @@
+/*
+ * Access to VGA videoram
+#define vga_writeb(x, y) (*(y) = (x))
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/xenoprof.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/xenoprof.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/xenoprof.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/xenoprof.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/xenoprof.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * asm-i386/mach-xen/asm/xenoprof.h
+
+#endif /* CONFIG_XEN */
+#endif /* __ASM_XENOPROF_H__ */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/xor.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/xor.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/xor.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/xor.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/xor.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "../../xor_32.h"
+#else
+# include "xor_64.h"
+#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/xor_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/xor_64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/xor_64.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/xor_64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/xor_64.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,337 @@
+#ifndef ASM_X86__XOR_64_H
+#define ASM_X86__XOR_64_H
+#define XOR_SELECT_TEMPLATE(FASTEST) (&xor_block_sse)
+
+#endif /* ASM_X86__XOR_64_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/mach_apic.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_apic.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_apic.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/mach_apic.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/mach_apic.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,54 @@
+#ifndef __ASM_MACH_APIC_H
+#define __ASM_MACH_APIC_H
+#endif /* CONFIG_X86_64 */
+
+#endif /* __ASM_MACH_APIC_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/mach_time.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_time.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_time.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/mach_time.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/mach_time.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,2 @@
+#include "../mc146818rtc_32.h"
+#include "../mach-default/mach_time.h"
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/mach_timer.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_timer.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_timer.h 2009-03-25 16:11:47.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 include/asm-x86/mach-xen/mach_timer.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/mach_timer.h Wed May 06 16:56:55 2009 +0100
+@@ -0,0 +1,1 @@
+#include "../mach-default/mach_timer.h"
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/mach_traps.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_traps.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_traps.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/mach_traps.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/mach_traps.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,33 @@
+/*
+ * include/asm-xen/asm-i386/mach-xen/mach_traps.h
+static inline void reassert_nmi(void) {}
+
+#endif /* !_MACH_TRAPS_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/setup_arch.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/setup_arch.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/setup_arch.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/setup_arch.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/setup_arch.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,5 @@
+/* Hook to call BIOS initialisation function */
+
+#define ARCH_SETUP machine_specific_arch_setup();
+
+void __init machine_specific_arch_setup(void);
-diff -purN linux-2.6.27/include/asm-x86/mmu.h linux-2.6.27.19-5.1/include/asm-x86/mmu.h
---- linux-2.6.27/include/asm-x86/mmu.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mmu.h 2009-03-25 16:11:47.000000000 +0000
-@@ -16,11 +16,14 @@ typedef struct {
+diff -r 9608d5473017 include/asm-x86/mmu.h
+--- a/include/asm-x86/mmu.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mmu.h Wed May 06 16:56:55 2009 +0100
+@@ -16,11 +16,14 @@
rwlock_t ldtlock;
#endif
int size;
void leave_mm(int cpu);
#else
static inline void leave_mm(int cpu)
-diff -purN linux-2.6.27/include/asm-x86/mmzone_32.h linux-2.6.27.19-5.1/include/asm-x86/mmzone_32.h
---- linux-2.6.27/include/asm-x86/mmzone_32.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mmzone_32.h 2009-03-25 16:11:47.000000000 +0000
-@@ -34,10 +34,14 @@ static inline void get_memcfg_numa(void)
+diff -r 9608d5473017 include/asm-x86/mmzone_32.h
+--- a/include/asm-x86/mmzone_32.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mmzone_32.h Wed May 06 16:56:55 2009 +0100
+@@ -34,9 +34,13 @@
extern int early_pfn_to_nid(unsigned long pfn);
#else /* !CONFIG_NUMA */
#define get_memcfg_numa get_memcfg_numa_flat
-
-+static inline void resume_map_numa_kva(pgd_t *pgd) {}
+
++static inline void resume_map_numa_kva(pgd_t *pgd) {}
+
#endif /* CONFIG_NUMA */
- #ifdef CONFIG_DISCONTIGMEM
-diff -purN linux-2.6.27/include/asm-x86/msidef.h linux-2.6.27.19-5.1/include/asm-x86/msidef.h
---- linux-2.6.27/include/asm-x86/msidef.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/msidef.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/msidef.h
+--- a/include/asm-x86/msidef.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/msidef.h Wed May 06 16:56:55 2009 +0100
@@ -48,4 +48,8 @@
#define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & \
MSI_ADDR_DEST_ID_MASK)
+#define MSI_ADDR_IR_INDEX1(index) ((index & 0x8000) >> 13)
+#define MSI_ADDR_IR_INDEX2(index) ((index & 0x7fff) << 5)
#endif /* ASM_MSIDEF_H */
-diff -purN linux-2.6.27/include/asm-x86/nmi.h linux-2.6.27.19-5.1/include/asm-x86/nmi.h
---- linux-2.6.27/include/asm-x86/nmi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/nmi.h 2009-03-25 16:11:47.000000000 +0000
-@@ -5,8 +5,6 @@
+diff -r 9608d5473017 include/asm-x86/nmi.h
+--- a/include/asm-x86/nmi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/nmi.h Wed May 06 16:56:55 2009 +0100
+@@ -4,8 +4,6 @@
+ #include <linux/pm.h>
#include <asm/irq.h>
#include <asm/io.h>
-
--#ifdef ARCH_HAS_NMI_WATCHDOG
-
+-#ifdef ARCH_HAS_NMI_WATCHDOG
+
/**
* do_nmi_callback
- *
-@@ -20,6 +18,11 @@ extern void default_do_nmi(struct pt_reg
+@@ -20,6 +18,11 @@
#endif
extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
extern int check_nmi_watchdog(void);
extern int nmi_watchdog_enabled;
extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
-@@ -46,7 +49,6 @@ struct ctl_table;
+@@ -46,7 +49,6 @@
struct file;
extern int proc_nmi_enabled(struct ctl_table *, int , struct file *,
void __user *, size_t *, loff_t *);
void __trigger_all_cpu_backtrace(void);
#define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace()
-@@ -69,7 +71,6 @@ static inline int nmi_watchdog_active(vo
+@@ -69,7 +71,6 @@
*/
return nmi_watchdog & 0x3;
}
void lapic_watchdog_stop(void);
int lapic_watchdog_init(unsigned nmi_hz);
-@@ -78,6 +79,9 @@ unsigned lapic_adjust_nmi_hz(unsigned hz
+@@ -78,6 +79,9 @@
int lapic_watchdog_ok(void);
void disable_lapic_nmi_watchdog(void);
void enable_lapic_nmi_watchdog(void);
void stop_nmi(void);
void restart_nmi(void);
-diff -purN linux-2.6.27/include/asm-x86/paravirt.h linux-2.6.27.19-5.1/include/asm-x86/paravirt.h
---- linux-2.6.27/include/asm-x86/paravirt.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/paravirt.h 2009-03-25 16:11:47.000000000 +0000
-@@ -200,15 +200,8 @@ struct pv_irq_ops {
+diff -r 9608d5473017 include/asm-x86/paravirt.h
+--- a/include/asm-x86/paravirt.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/paravirt.h Wed May 06 16:56:55 2009 +0100
+@@ -200,15 +200,8 @@
struct pv_apic_ops {
#ifdef CONFIG_X86_LOCAL_APIC
void (*startup_ipi_hook)(int phys_apicid,
unsigned long start_eip,
unsigned long start_esp);
-@@ -898,19 +891,6 @@ static inline void slow_down_io(void)
+@@ -898,19 +891,6 @@
}
#ifdef CONFIG_X86_LOCAL_APIC
static inline void setup_boot_clock(void)
{
PVOP_VCALL0(pv_apic_ops.setup_boot_clock);
-diff -purN linux-2.6.27/include/asm-x86/pci.h linux-2.6.27.19-5.1/include/asm-x86/pci.h
---- linux-2.6.27/include/asm-x86/pci.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/pci.h 2009-03-25 16:11:47.000000000 +0000
-@@ -19,6 +19,8 @@ struct pci_sysdata {
+diff -r 9608d5473017 include/asm-x86/pci.h
+--- a/include/asm-x86/pci.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/pci.h Wed May 06 16:56:55 2009 +0100
+@@ -19,6 +19,8 @@
};
extern int pci_routeirq;
/* scan a bus after allocating a pci_sysdata for it */
extern struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops,
-diff -purN linux-2.6.27/include/asm-x86/pci_64.h linux-2.6.27.19-5.1/include/asm-x86/pci_64.h
---- linux-2.6.27/include/asm-x86/pci_64.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/pci_64.h 2009-03-25 16:11:47.000000000 +0000
-@@ -34,8 +34,6 @@ extern void pci_iommu_alloc(void);
+diff -r 9608d5473017 include/asm-x86/pci_64.h
+--- a/include/asm-x86/pci_64.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/pci_64.h Wed May 06 16:56:55 2009 +0100
+@@ -34,8 +34,6 @@
*/
#define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys)
#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \
dma_addr_t ADDR_NAME;
#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \
-@@ -49,18 +47,6 @@ extern void pci_iommu_alloc(void);
+@@ -49,18 +47,6 @@
#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
(((PTR)->LEN_NAME) = (VAL))
#endif /* __KERNEL__ */
#endif /* __x8664_PCI_H */
-diff -purN linux-2.6.27/include/asm-x86/pda.h linux-2.6.27.19-5.1/include/asm-x86/pda.h
---- linux-2.6.27/include/asm-x86/pda.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/pda.h 2009-03-25 16:11:47.000000000 +0000
-@@ -26,9 +26,13 @@ struct x8664_pda {
+diff -r 9608d5473017 include/asm-x86/pda.h
+--- a/include/asm-x86/pda.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/pda.h Wed May 06 16:56:55 2009 +0100
+@@ -26,9 +26,13 @@
short in_bootmem; /* pda lives in bootmem */
unsigned int __softirq_pending;
unsigned int __nmi_count; /* number of NMI on this CPUs */
unsigned apic_timer_irqs;
unsigned irq0_irqs;
unsigned irq_resched_count;
-diff -purN linux-2.6.27/include/asm-x86/perfmon.h linux-2.6.27.19-5.1/include/asm-x86/perfmon.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/perfmon.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/perfmon.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/perfmon.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2007 Hewlett-Packard Development Company, L.P.
+#define PFM_ARCH_MAX_PMDS (256+64) /* 256 HW 64 SW */
+
+#endif /* _ASM_X86_PERFMON_H_ */
-diff -purN linux-2.6.27/include/asm-x86/perfmon_kern.h linux-2.6.27.19-5.1/include/asm-x86/perfmon_kern.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/perfmon_kern.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/perfmon_kern.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/perfmon_kern.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,538 @@
+/*
+ * Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
+#endif /* CONFIG_PEFMON */
+
+#endif /* _ASM_X86_PERFMON_KERN_H_ */
-diff -purN linux-2.6.27/include/asm-x86/perfmon_pebs_core_smpl.h linux-2.6.27.19-5.1/include/asm-x86/perfmon_pebs_core_smpl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/perfmon_pebs_core_smpl.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/perfmon_pebs_core_smpl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/perfmon_pebs_core_smpl.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,164 @@
+/*
+ * Copyright (c) 2005-2007 Hewlett-Packard Development Company, L.P.
+ (PFM_PEBS_CORE_SMPL_VERSION_MIN & 0xffff))
+
+#endif /* __PERFMON_PEBS_CORE_SMPL_H__ */
-diff -purN linux-2.6.27/include/asm-x86/perfmon_pebs_p4_smpl.h linux-2.6.27.19-5.1/include/asm-x86/perfmon_pebs_p4_smpl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/perfmon_pebs_p4_smpl.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/perfmon_pebs_p4_smpl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/perfmon_pebs_p4_smpl.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,193 @@
+/*
+ * Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
+ (PFM_PEBS_P4_SMPL_VERSION_MIN & 0xffff))
+
+#endif /* __PERFMON_PEBS_P4_SMPL_H__ */
-diff -purN linux-2.6.27/include/asm-x86/pgalloc.h linux-2.6.27.19-5.1/include/asm-x86/pgalloc.h
---- linux-2.6.27/include/asm-x86/pgalloc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/pgalloc.h 2009-03-25 16:11:47.000000000 +0000
-@@ -42,6 +42,7 @@ static inline void pte_free_kernel(struc
+diff -r 9608d5473017 include/asm-x86/pgalloc.h
+--- a/include/asm-x86/pgalloc.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/pgalloc.h Wed May 06 16:56:55 2009 +0100
+@@ -42,6 +42,7 @@
static inline void pte_free(struct mm_struct *mm, struct page *pte)
{
__free_page(pte);
}
-diff -purN linux-2.6.27/include/asm-x86/processor.h linux-2.6.27.19-5.1/include/asm-x86/processor.h
---- linux-2.6.27/include/asm-x86/processor.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/processor.h 2009-03-25 16:11:47.000000000 +0000
-@@ -109,6 +109,7 @@ struct cpuinfo_x86 {
+diff -r 9608d5473017 include/asm-x86/processor.h
+--- a/include/asm-x86/processor.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/processor.h Wed May 06 16:56:55 2009 +0100
+@@ -109,6 +109,7 @@
/* Index into per_cpu list: */
u16 cpu_index;
#endif
} __attribute__((__aligned__(SMP_CACHE_BYTES)));
#define X86_VENDOR_INTEL 0
-@@ -122,6 +123,9 @@ struct cpuinfo_x86 {
+@@ -121,6 +122,9 @@
+ #define X86_VENDOR_NUM 9
#define X86_VENDOR_UNKNOWN 0xff
-
++
+#define X86_HYPER_VENDOR_NONE 0
+#define X86_HYPER_VENDOR_VMWARE 1
-+
+
/*
* capabilities of CPUs
- */
-@@ -161,6 +165,7 @@ extern void init_scattered_cpuid_feature
+@@ -161,6 +165,7 @@
extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c);
extern unsigned short num_cache_leaves;
#if defined(CONFIG_X86_HT) || defined(CONFIG_X86_64)
extern void detect_ht(struct cpuinfo_x86 *c);
#else
-diff -purN linux-2.6.27/include/asm-x86/ptrace.h linux-2.6.27.19-5.1/include/asm-x86/ptrace.h
---- linux-2.6.27/include/asm-x86/ptrace.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/ptrace.h 2009-03-25 16:11:47.000000000 +0000
-@@ -16,6 +16,29 @@
+diff -r 9608d5473017 include/asm-x86/ptrace.h
+--- a/include/asm-x86/ptrace.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/ptrace.h Wed May 06 16:56:55 2009 +0100
+@@ -15,6 +15,29 @@
+ #ifdef __i386__
/* this struct defines the way the registers are stored on the
stack during a system call. */
-
++
+enum EFLAGS {
+ EF_CF = 0x00000001,
+ EF_PF = 0x00000004,
+ EF_VIP = 0x00100000, /* virtual interrupt pending */
+ EF_ID = 0x00200000, /* id */
+};
-+
+
#ifndef __KERNEL__
- struct pt_regs {
-@@ -213,6 +236,11 @@ static inline unsigned long frame_pointe
+@@ -213,6 +236,11 @@
return regs->bp;
}
/*
* These are defined as per linux/ptrace.h, which see.
*/
-@@ -221,7 +249,9 @@ extern void user_enable_single_step(stru
+@@ -221,7 +249,9 @@
extern void user_disable_single_step(struct task_struct *);
extern void user_enable_block_step(struct task_struct *);
#define arch_has_block_step() (1)
#else
#define arch_has_block_step() (boot_cpu_data.x86 >= 6)
-diff -purN linux-2.6.27/include/asm-x86/scatterlist.h linux-2.6.27.19-5.1/include/asm-x86/scatterlist.h
---- linux-2.6.27/include/asm-x86/scatterlist.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/scatterlist.h 2009-03-25 16:11:47.000000000 +0000
-@@ -24,7 +24,7 @@ struct scatterlist {
+diff -r 9608d5473017 include/asm-x86/scatterlist.h
+--- a/include/asm-x86/scatterlist.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/scatterlist.h Wed May 06 16:56:55 2009 +0100
+@@ -24,7 +24,7 @@
* returns.
*/
#define sg_dma_address(sg) ((sg)->dma_address)
# define sg_dma_len(sg) ((sg)->length)
#else
# define sg_dma_len(sg) ((sg)->dma_length)
-diff -purN linux-2.6.27/include/asm-x86/smp.h linux-2.6.27.19-5.1/include/asm-x86/smp.h
---- linux-2.6.27/include/asm-x86/smp.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/smp.h 2009-03-25 16:11:47.000000000 +0000
-@@ -53,7 +53,7 @@ struct smp_ops {
+diff -r 9608d5473017 include/asm-x86/smp.h
+--- a/include/asm-x86/smp.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/smp.h Wed May 06 16:56:55 2009 +0100
+@@ -53,7 +53,7 @@
void (*smp_send_stop)(void);
void (*smp_send_reschedule)(int cpu);
void (*send_call_func_single_ipi)(int cpu);
};
-@@ -103,14 +103,14 @@ static inline void arch_send_call_functi
+@@ -103,14 +103,14 @@
static inline void arch_send_call_function_ipi(cpumask_t mask)
{
void native_send_call_func_single_ipi(int cpu);
extern int __cpu_disable(void);
-@@ -165,30 +165,33 @@ extern int safe_smp_processor_id(void);
+@@ -165,30 +165,33 @@
#ifdef CONFIG_X86_LOCAL_APIC
}
# endif /* APIC_DEFINITION */
-diff -purN linux-2.6.27/include/asm-x86/spinlock.h linux-2.6.27.19-5.1/include/asm-x86/spinlock.h
---- linux-2.6.27/include/asm-x86/spinlock.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/spinlock.h 2009-03-25 16:11:47.000000000 +0000
-@@ -362,6 +362,9 @@ static inline void __raw_write_unlock(ra
+diff -r 9608d5473017 include/asm-x86/spinlock.h
+--- a/include/asm-x86/spinlock.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/spinlock.h Wed May 06 16:56:55 2009 +0100
+@@ -362,6 +362,9 @@
: "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory");
}
#define _raw_spin_relax(lock) cpu_relax()
#define _raw_read_relax(lock) cpu_relax()
#define _raw_write_relax(lock) cpu_relax()
-diff -purN linux-2.6.27/include/asm-x86/syscall.h linux-2.6.27.19-5.1/include/asm-x86/syscall.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/syscall.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/syscall.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/syscall.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,213 @@
+/*
+ * Access to user system call parameters and results
+#endif /* CONFIG_X86_32 */
+
+#endif /* _ASM_SYSCALL_H */
-diff -purN linux-2.6.27/include/asm-x86/thread_info.h linux-2.6.27.19-5.1/include/asm-x86/thread_info.h
---- linux-2.6.27/include/asm-x86/thread_info.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/thread_info.h 2009-03-25 16:11:47.000000000 +0000
-@@ -71,6 +71,7 @@ struct thread_info {
+diff -r 9608d5473017 include/asm-x86/thread_info.h
+--- a/include/asm-x86/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/thread_info.h Wed May 06 16:56:55 2009 +0100
+@@ -71,6 +71,7 @@
* Warning: layout of LSW is hardcoded in entry.S
*/
#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
#define TIF_SIGPENDING 2 /* signal pending */
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
#define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/
-@@ -78,6 +79,7 @@ struct thread_info {
+@@ -78,6 +79,7 @@
#define TIF_SYSCALL_EMU 6 /* syscall emulation active */
#define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */
#define TIF_SECCOMP 8 /* secure computing */
#define TIF_MCE_NOTIFY 10 /* notify userspace of an MCE */
#define TIF_NOTSC 16 /* TSC is not accessible in userland */
#define TIF_IA32 17 /* 32bit process */
-@@ -91,8 +93,13 @@ struct thread_info {
+@@ -91,8 +93,13 @@
#define TIF_DEBUGCTLMSR 25 /* uses thread_struct.debugctlmsr */
#define TIF_DS_AREA_MSR 26 /* uses thread_struct.ds_area_msr */
#define TIF_BTS_TRACE_TS 27 /* record scheduling event timestamps */
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
-@@ -112,6 +119,9 @@ struct thread_info {
+@@ -112,6 +119,9 @@
#define _TIF_DEBUGCTLMSR (1 << TIF_DEBUGCTLMSR)
#define _TIF_DS_AREA_MSR (1 << TIF_DS_AREA_MSR)
#define _TIF_BTS_TRACE_TS (1 << TIF_BTS_TRACE_TS)
/* work to do in syscall_trace_enter() */
#define _TIF_WORK_SYSCALL_ENTRY \
-@@ -133,13 +143,18 @@ struct thread_info {
+@@ -133,13 +143,18 @@
/* Only used for 64 bit */
#define _TIF_DO_NOTIFY_MASK \
#define _TIF_WORK_CTXSW_PREV _TIF_WORK_CTXSW
#define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW|_TIF_DEBUG)
-diff -purN linux-2.6.27/include/asm-x86/time.h linux-2.6.27.19-5.1/include/asm-x86/time.h
---- linux-2.6.27/include/asm-x86/time.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/time.h 2009-03-25 16:11:47.000000000 +0000
-@@ -58,4 +58,10 @@ static inline int native_set_wallclock(u
+diff -r 9608d5473017 include/asm-x86/time.h
+--- a/include/asm-x86/time.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/time.h Wed May 06 16:56:55 2009 +0100
+@@ -58,4 +58,10 @@
extern unsigned long __init calibrate_cpu(void);
+extern int xen_independent_wallclock(void);
+extern unsigned long xen_read_persistent_clock(void);
+extern int xen_update_persistent_clock(void);
-+#endif
-+
#endif
-diff -purN linux-2.6.27/include/asm-x86/traps.h linux-2.6.27.19-5.1/include/asm-x86/traps.h
---- linux-2.6.27/include/asm-x86/traps.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/traps.h 2009-03-25 16:11:47.000000000 +0000
-@@ -23,6 +23,9 @@ asmlinkage void spurious_interrupt_bug(v
++
++#endif
+diff -r 9608d5473017 include/asm-x86/traps.h
+--- a/include/asm-x86/traps.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/traps.h Wed May 06 16:56:55 2009 +0100
+@@ -23,6 +23,9 @@
#ifdef CONFIG_X86_MCE
asmlinkage void machine_check(void);
#endif /* CONFIG_X86_MCE */
void do_divide_error(struct pt_regs *, long);
void do_overflow(struct pt_regs *, long);
-@@ -48,6 +51,9 @@ void math_error(void __user *);
+@@ -48,6 +51,9 @@
void do_coprocessor_error(struct pt_regs *, long);
void do_simd_coprocessor_error(struct pt_regs *, long);
void do_spurious_interrupt_bug(struct pt_regs *, long);
unsigned long patch_espfix_desc(unsigned long, unsigned long);
asmlinkage void math_emulate(long);
-diff -purN linux-2.6.27/include/asm-x86/unwind.h linux-2.6.27.19-5.1/include/asm-x86/unwind.h
---- linux-2.6.27/include/asm-x86/unwind.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/unwind.h 2009-03-25 16:11:47.000000000 +0000
-@@ -1,6 +1,163 @@
+diff -r 9608d5473017 include/asm-x86/unwind.h
+--- a/include/asm-x86/unwind.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/unwind.h Wed May 06 16:56:55 2009 +0100
+@@ -1,5 +1,162 @@
#ifndef _ASM_X86_UNWIND_H
#define _ASM_X86_UNWIND_H
-
++
+/*
+ * Copyright (C) 2002-2007 Novell, Inc.
+ * Jan Beulich <jbeulich@novell.com>
+}
+
+#else
-+
+
#define UNW_PC(frame) ((void)(frame), 0UL)
#define UNW_SP(frame) ((void)(frame), 0UL)
- #define UNW_FP(frame) ((void)(frame), 0UL)
-@@ -10,4 +167,6 @@ static inline int arch_unw_user_mode(con
+@@ -10,4 +167,6 @@
return 0;
}
+#endif
+
#endif /* _ASM_X86_UNWIND_H */
-diff -purN linux-2.6.27/include/asm-x86/uv/bios.h linux-2.6.27.19-5.1/include/asm-x86/uv/bios.h
---- linux-2.6.27/include/asm-x86/uv/bios.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/uv/bios.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/uv/bios.h
+--- a/include/asm-x86/uv/bios.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/uv/bios.h Wed May 06 16:56:55 2009 +0100
@@ -2,9 +2,7 @@
#define _ASM_X86_BIOS_H
enum {
BIOS_FREQ_BASE_PLATFORM = 0,
-@@ -31,38 +66,55 @@ enum {
+@@ -31,38 +66,55 @@
BIOS_FREQ_BASE_REALTIME_CLOCK = 2
};
- isrv.v0 = 0; \
- isrv.v1 = 0; \
- } while (0)
+-
+-enum {
+- BIOS_STATUS_SUCCESS = 0,
+- BIOS_STATUS_UNIMPLEMENTED = -1,
+- BIOS_STATUS_EINVAL = -2,
+- BIOS_STATUS_ERROR = -3
+union partition_info_u {
+ u64 val;
+ struct {
+ coherence_id : 16,
+ region_size : 24;
+ };
-+};
+ };
--enum {
-- BIOS_STATUS_SUCCESS = 0,
-- BIOS_STATUS_UNIMPLEMENTED = -1,
-- BIOS_STATUS_EINVAL = -2,
-- BIOS_STATUS_ERROR = -3
--};
--
-struct uv_bios_retval {
- /*
- * A zero status value indicates call completed without error.
- u64 v0;
- u64 v1;
- u64 v2;
--};
--
--extern long
--x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second,
-- unsigned long *drift_info);
--extern const char *x86_bios_strerror(long status);
+union uv_watchlist_u {
+ u64 val;
+ struct {
+ size : 32,
+ filler : 16;
+ };
-+};
-+
+ };
+
+-extern long
+-x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second,
+- unsigned long *drift_info);
+-extern const char *x86_bios_strerror(long status);
+enum uv_memprotect {
+ UV_MEMPROT_RESTRICT_ACCESS,
+ UV_MEMPROT_ALLOW_AMO,
+extern struct kobject *sgi_uv_kobj; /* /sys/firmware/sgi_uv */
#endif /* _ASM_X86_BIOS_H */
-diff -purN linux-2.6.27/include/asm-x86/uv/uv_hub.h linux-2.6.27.19-5.1/include/asm-x86/uv/uv_hub.h
---- linux-2.6.27/include/asm-x86/uv/uv_hub.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/uv/uv_hub.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/uv/uv_hub.h
+--- a/include/asm-x86/uv/uv_hub.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/uv/uv_hub.h Wed May 06 16:56:55 2009 +0100
@@ -13,6 +13,7 @@
#include <linux/numa.h>
/*
* The following defines attributes of the HUB chip. These attributes are
* frequently referenced and are kept in the per-cpu data areas of each cpu.
-@@ -130,7 +141,9 @@ struct uv_hub_info_s {
+@@ -130,7 +141,9 @@
unsigned char blade_processor_id;
unsigned char m_val;
unsigned char n_val;
DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
#define uv_hub_info (&__get_cpu_var(__uv_hub_info))
#define uv_cpu_hub_info(cpu) (&per_cpu(__uv_hub_info, cpu))
-@@ -162,6 +175,30 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __
+@@ -162,6 +175,30 @@
#define UV_APIC_PNODE_SHIFT 6
/*
* Macros for converting between kernel virtual addresses, socket local physical
* addresses, and UV global physical addresses.
-@@ -173,7 +210,7 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __
+@@ -173,7 +210,7 @@
static inline unsigned long uv_soc_phys_ram_to_gpa(unsigned long paddr)
{
if (paddr < uv_hub_info->lowmem_remap_top)
return paddr | uv_hub_info->gnode_upper;
}
-@@ -181,19 +218,7 @@ static inline unsigned long uv_soc_phys_
+@@ -181,19 +218,7 @@
/* socket virtual --> UV global physical address */
static inline unsigned long uv_gpa(void *v)
{
}
/* pnode, offset --> socket virtual */
-@@ -276,6 +301,16 @@ static inline void uv_write_local_mmr(un
+@@ -274,6 +299,16 @@
+ static inline void uv_write_local_mmr(unsigned long offset, unsigned long val)
+ {
*uv_local_mmr_address(offset) = val;
- }
-
++}
++
+static inline unsigned char uv_read_local_mmr8(unsigned long offset)
+{
+ return *((unsigned char *)uv_local_mmr_address(offset));
+static inline void uv_write_local_mmr8(unsigned long offset, unsigned char val)
+{
+ *((unsigned char *)uv_local_mmr_address(offset)) = val;
-+}
-+
+ }
+
/*
- * Structures and definitions for converting between cpu, node, pnode, and blade
- * numbers.
-@@ -350,5 +385,21 @@ static inline int uv_num_possible_blades
+@@ -350,5 +385,21 @@
return uv_possible_blades;
}
+
#endif /* __ASM_X86_UV_HUB__ */
-diff -purN linux-2.6.27/include/asm-x86/uv/uv_irq.h linux-2.6.27.19-5.1/include/asm-x86/uv/uv_irq.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/uv/uv_irq.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/uv/uv_irq.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/uv/uv_irq.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,36 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+extern void uv_teardown_irq(unsigned int, int, unsigned long);
+
+#endif /* _ASM_X86_UV_UV_IRQ_H */
-diff -purN linux-2.6.27/include/asm-x86/vmi.h linux-2.6.27.19-5.1/include/asm-x86/vmi.h
---- linux-2.6.27/include/asm-x86/vmi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/vmi.h 2009-03-25 16:11:47.000000000 +0000
-@@ -223,9 +223,15 @@ struct pci_header {
+diff -r 9608d5473017 include/asm-x86/vmi.h
+--- a/include/asm-x86/vmi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/vmi.h Wed May 06 16:56:55 2009 +0100
+@@ -223,9 +223,15 @@
} __attribute__((packed));
/* Function prototypes for bootstrapping */
/* State needed to start an application processor in an SMP system. */
struct vmi_ap_state {
-diff -purN linux-2.6.27/include/asm-x86/vmware.h linux-2.6.27.19-5.1/include/asm-x86/vmware.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/vmware.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/vmware.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/vmware.h Wed May 06 16:56:55 2009 +0100
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2008, VMware, Inc.
+extern void vmware_set_feature_bits(struct cpuinfo_x86 *c);
+
+#endif
-diff -purN linux-2.6.27/include/asm-x86/xen/hypercall.h linux-2.6.27.19-5.1/include/asm-x86/xen/hypercall.h
---- linux-2.6.27/include/asm-x86/xen/hypercall.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/xen/hypercall.h 2009-03-25 16:11:47.000000000 +0000
-@@ -264,7 +264,7 @@ HYPERVISOR_fpu_taskswitch(int set)
+diff -r 9608d5473017 include/asm-x86/xen/hypercall.h
+--- a/include/asm-x86/xen/hypercall.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/xen/hypercall.h Wed May 06 16:56:56 2009 +0100
+@@ -264,7 +264,7 @@
static inline int
HYPERVISOR_sched_op(int cmd, void *arg)
{
}
static inline long
-diff -purN linux-2.6.27/include/asm-x86/xen/interface.h linux-2.6.27.19-5.1/include/asm-x86/xen/interface.h
---- linux-2.6.27/include/asm-x86/xen/interface.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/xen/interface.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/xen/interface.h
+--- a/include/asm-x86/xen/interface.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/xen/interface.h Wed May 06 16:56:56 2009 +0100
@@ -10,17 +10,17 @@
#define __ASM_X86_XEN_INTERFACE_H
#endif
#ifndef HYPERVISOR_VIRT_START
-@@ -103,7 +97,7 @@ struct trap_info {
+@@ -103,7 +97,7 @@
uint16_t cs; /* code selector */
unsigned long address; /* code offset */
};
struct arch_shared_info {
unsigned long max_pfn; /* max pfn that appears in table */
-@@ -157,7 +151,7 @@ struct vcpu_guest_context {
+@@ -157,7 +151,7 @@
uint64_t gs_base_user;
#endif
};
#endif /* !__ASSEMBLY__ */
/*
-diff -purN linux-2.6.27/include/asm-x86/xen/interface_32.h linux-2.6.27.19-5.1/include/asm-x86/xen/interface_32.h
---- linux-2.6.27/include/asm-x86/xen/interface_32.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/xen/interface_32.h 2009-03-25 16:11:47.000000000 +0000
-@@ -62,7 +62,7 @@ struct cpu_user_regs {
+diff -r 9608d5473017 include/asm-x86/xen/interface_32.h
+--- a/include/asm-x86/xen/interface_32.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/xen/interface_32.h Wed May 06 16:56:56 2009 +0100
+@@ -62,7 +62,7 @@
uint16_t fs, _pad4;
uint16_t gs, _pad5;
};
typedef uint64_t tsc_timestamp_t; /* RDTSC timestamp */
-diff -purN linux-2.6.27/include/asm-x86/xen/interface_64.h linux-2.6.27.19-5.1/include/asm-x86/xen/interface_64.h
---- linux-2.6.27/include/asm-x86/xen/interface_64.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/xen/interface_64.h 2009-03-25 16:11:47.000000000 +0000
-@@ -136,7 +136,7 @@ struct cpu_user_regs {
+diff -r 9608d5473017 include/asm-x86/xen/interface_64.h
+--- a/include/asm-x86/xen/interface_64.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/xen/interface_64.h Wed May 06 16:56:56 2009 +0100
+@@ -136,7 +136,7 @@
uint16_t fs, _pad5[3]; /* Non-zero => takes precedence over fs_base. */
uint16_t gs, _pad6[3]; /* Non-zero => takes precedence over gs_base_usr. */
};
#undef __DECL_REG
-diff -purN linux-2.6.27/include/asm-xtensa/thread_info.h linux-2.6.27.19-5.1/include/asm-xtensa/thread_info.h
---- linux-2.6.27/include/asm-xtensa/thread_info.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-xtensa/thread_info.h 2009-03-25 16:11:52.000000000 +0000
-@@ -134,6 +134,7 @@ static inline struct thread_info *curren
+diff -r 9608d5473017 include/asm-xtensa/thread_info.h
+--- a/include/asm-xtensa/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-xtensa/thread_info.h Wed May 06 16:56:56 2009 +0100
+@@ -134,6 +134,7 @@
#define TIF_MEMDIE 5
#define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */
#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
-@@ -142,6 +143,7 @@ static inline struct thread_info *curren
+@@ -142,6 +143,7 @@
#define _TIF_IRET (1<<TIF_IRET)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */
-diff -purN linux-2.6.27/include/drm/via_drm.h linux-2.6.27.19-5.1/include/drm/via_drm.h
---- linux-2.6.27/include/drm/via_drm.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/drm/via_drm.h 2009-03-25 16:11:53.000000000 +0000
+diff -r 9608d5473017 include/drm/via_drm.h
+--- a/include/drm/via_drm.h Wed May 06 15:47:13 2009 +0100
++++ b/include/drm/via_drm.h Wed May 06 16:56:56 2009 +0100
@@ -51,6 +51,12 @@
#define VIA_LOG_MIN_TEX_REGION_SIZE 16
#endif
typedef struct {
uint32_t offset;
-@@ -141,6 +165,8 @@ typedef struct _drm_via_init {
+@@ -141,6 +165,8 @@
unsigned long fb_offset;
unsigned long mmio_offset;
unsigned long agpAddr;
} drm_via_init_t;
typedef struct _drm_via_futex {
-@@ -245,6 +271,12 @@ typedef union drm_via_irqwait {
+@@ -245,6 +271,12 @@
struct drm_wait_vblank_reply reply;
} drm_via_irqwait_t;
typedef struct drm_via_blitsync {
uint32_t sync_handle;
unsigned engine;
-@@ -272,4 +304,13 @@ typedef struct drm_via_dmablit {
+@@ -272,4 +304,13 @@
drm_via_blitsync_t sync;
} drm_via_dmablit_t;
+} ;
+extern struct drm_via_video_save_head *via_video_save_head;
#endif /* _VIA_DRM_H_ */
-diff -purN linux-2.6.27/include/linux/Kbuild linux-2.6.27.19-5.1/include/linux/Kbuild
---- linux-2.6.27/include/linux/Kbuild 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/Kbuild 2009-03-25 16:11:48.000000000 +0000
-@@ -41,6 +41,7 @@ header-y += baycom.h
+diff -r 9608d5473017 include/linux/Kbuild
+--- a/include/linux/Kbuild Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/Kbuild Wed May 06 16:56:56 2009 +0100
+@@ -41,6 +41,7 @@
header-y += bfs_fs.h
header-y += blkpg.h
header-y += bpqether.h
header-y += can.h
header-y += cdk.h
header-y += chio.h
-@@ -162,6 +163,8 @@ header-y += video_decoder.h
+@@ -162,6 +163,8 @@
header-y += video_encoder.h
header-y += videotext.h
header-y += x25.h
unifdef-y += acct.h
unifdef-y += adb.h
-@@ -180,6 +183,7 @@ unifdef-y += audit.h
+@@ -180,6 +183,7 @@
unifdef-y += auto_fs.h
unifdef-y += auxvec.h
unifdef-y += binfmts.h
unifdef-y += capability.h
unifdef-y += capi.h
unifdef-y += cciss_ioctl.h
-diff -purN linux-2.6.27/include/linux/acpi.h linux-2.6.27.19-5.1/include/linux/acpi.h
---- linux-2.6.27/include/linux/acpi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/acpi.h 2009-03-25 16:11:48.000000000 +0000
-@@ -202,6 +202,52 @@ extern bool wmi_has_guid(const char *gui
+diff -r 9608d5473017 include/linux/acpi.h
+--- a/include/linux/acpi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/acpi.h Wed May 06 16:56:56 2009 +0100
+@@ -202,6 +202,52 @@
#endif /* CONFIG_ACPI_WMI */
extern int acpi_blacklisted(void);
#ifdef CONFIG_DMI
extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d);
-diff -purN linux-2.6.27/include/linux/aio.h linux-2.6.27.19-5.1/include/linux/aio.h
---- linux-2.6.27/include/linux/aio.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/aio.h 2009-03-25 16:11:49.000000000 +0000
-@@ -199,6 +199,11 @@ struct kioctx {
+diff -r 9608d5473017 include/linux/aio.h
+--- a/include/linux/aio.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/aio.h Wed May 06 16:56:56 2009 +0100
+@@ -199,6 +199,11 @@
struct aio_ring_info ring_info;
struct delayed_work wq;
};
/* prototypes */
-diff -purN linux-2.6.27/include/linux/ata.h linux-2.6.27.19-5.1/include/linux/ata.h
---- linux-2.6.27/include/linux/ata.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/ata.h 2009-03-25 16:11:50.000000000 +0000
-@@ -681,12 +681,17 @@ static inline int ata_id_current_chs_val
+diff -r 9608d5473017 include/linux/ata.h
+--- a/include/linux/ata.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/ata.h Wed May 06 16:56:56 2009 +0100
+@@ -681,12 +681,17 @@
static inline int ata_id_is_cfa(const u16 *id)
{
return 1;
return 0;
}
-diff -purN linux-2.6.27/include/linux/audit.h linux-2.6.27.19-5.1/include/linux/audit.h
---- linux-2.6.27/include/linux/audit.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/audit.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/audit.h
+--- a/include/linux/audit.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/audit.h Wed May 06 16:56:56 2009 +0100
@@ -33,7 +33,7 @@
* 1200 - 1299 messages internal to the audit daemon
* 1300 - 1399 audit event messages
* 1600 - 1699 kernel crypto events
* 1700 - 1799 kernel anomaly records
* 1800 - 1999 future kernel use (maybe integrity labels and related events)
-@@ -119,6 +119,13 @@
+@@ -118,6 +118,13 @@
+ #define AUDIT_MAC_IPSEC_EVENT 1415 /* Audit an IPSec event */
#define AUDIT_MAC_UNLBL_STCADD 1416 /* NetLabel: add a static label */
#define AUDIT_MAC_UNLBL_STCDEL 1417 /* NetLabel: del a static label */
-
++
+#define AUDIT_APPARMOR_AUDIT 1501 /* AppArmor audited grants */
+#define AUDIT_APPARMOR_ALLOWED 1502 /* Allowed Access for learning */
+#define AUDIT_APPARMOR_DENIED 1503
+#define AUDIT_APPARMOR_HINT 1504 /* Process Tracking information */
+#define AUDIT_APPARMOR_STATUS 1505 /* Changes in config */
+#define AUDIT_APPARMOR_ERROR 1506 /* Internal AppArmor Errors */
-+
+
#define AUDIT_FIRST_KERN_ANOM_MSG 1700
#define AUDIT_LAST_KERN_ANOM_MSG 1799
- #define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */
-@@ -545,6 +552,9 @@ extern void audit_log(struct audit_
+@@ -545,6 +552,9 @@
__attribute__((format(printf,4,5)));
extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type);
extern void audit_log_format(struct audit_buffer *ab,
const char *fmt, ...)
__attribute__((format(printf,2,3)));
-diff -purN linux-2.6.27/include/linux/binfmts.h linux-2.6.27.19-5.1/include/linux/binfmts.h
---- linux-2.6.27/include/linux/binfmts.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/binfmts.h 2009-03-25 16:11:50.000000000 +0000
-@@ -36,6 +36,7 @@ struct linux_binprm{
+diff -r 9608d5473017 include/linux/binfmts.h
+--- a/include/linux/binfmts.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/binfmts.h Wed May 06 16:56:56 2009 +0100
+@@ -36,6 +36,7 @@
unsigned long p; /* current top of mem */
unsigned int sh_bang:1,
misc_bang:1;
struct file * file;
int e_uid, e_gid;
kernel_cap_t cap_post_exec_permitted;
-@@ -58,6 +59,7 @@ struct linux_binprm{
+@@ -58,6 +59,7 @@
#define BINPRM_FLAGS_EXECFD_BIT 1
#define BINPRM_FLAGS_EXECFD (1 << BINPRM_FLAGS_EXECFD_BIT)
/*
* This structure defines the functions that are used to load the binary formats that
-diff -purN linux-2.6.27/include/linux/bio.h linux-2.6.27.19-5.1/include/linux/bio.h
---- linux-2.6.27/include/linux/bio.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/bio.h 2009-03-25 16:11:50.000000000 +0000
-@@ -26,21 +26,8 @@
+diff -r 9608d5473017 include/linux/bio.h
+--- a/include/linux/bio.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/bio.h Wed May 06 16:56:56 2009 +0100
+@@ -26,20 +26,7 @@
#ifdef CONFIG_BLOCK
-/* Platforms may set this to teach the BIO layer about IOMMU hardware. */
#include <asm/io.h>
-
+-
-#if defined(BIO_VMERGE_MAX_SIZE) && defined(BIO_VMERGE_BOUNDARY)
-#define BIOVEC_VIRT_START_SIZE(x) (bvec_to_phys(x) & (BIO_VMERGE_BOUNDARY - 1))
-#define BIOVEC_VIRT_OVERSIZE(x) ((x) > BIO_VMERGE_MAX_SIZE)
-#ifndef BIO_VMERGE_BOUNDARY
-#define BIO_VMERGE_BOUNDARY 0
-#endif
--
+
#define BIO_DEBUG
- #ifdef BIO_DEBUG
-@@ -88,25 +75,21 @@ struct bio {
+@@ -88,24 +75,20 @@
/* Number of segments in this BIO after
* physical address coalescing is performed.
*/
+ unsigned int bi_seg_back_size;
unsigned int bi_max_vecs; /* max bvl_vecs we can hold */
-
-+ unsigned int bi_comp_cpu; /* completion CPU */
+
++ unsigned int bi_comp_cpu; /* completion CPU */
+
struct bio_vec *bi_io_vec; /* the actual vec list */
- bio_end_io_t *bi_end_io;
-@@ -126,11 +109,14 @@ struct bio {
+@@ -126,11 +109,14 @@
#define BIO_UPTODATE 0 /* ok after I/O completion */
#define BIO_RW_BLOCK 1 /* RW_AHEAD set, and read/write would block */
#define BIO_EOF 2 /* out-out-bounds error */
#define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
/*
-@@ -144,18 +130,36 @@ struct bio {
+@@ -144,18 +130,36 @@
/*
* bio bi_rw flags
*
/*
* upper 16 bits of bi_rw define the io priority of this bio
-@@ -182,17 +186,21 @@ struct bio {
+@@ -182,17 +186,21 @@
#define bio_sectors(bio) ((bio)->bi_size >> 9)
#define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER))
#define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC))
}
static inline void *bio_data(struct bio *bio)
-@@ -236,8 +244,6 @@ static inline void *bio_data(struct bio
+@@ -236,8 +244,6 @@
((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
#endif
#define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \
(((addr1) | (mask)) == (((addr2) - 1) | (mask)))
#define BIOVEC_SEG_BOUNDARY(q, b1, b2) \
-@@ -335,7 +341,6 @@ extern void bio_free(struct bio *, struc
+@@ -335,7 +341,6 @@
extern void bio_endio(struct bio *, int);
struct request_queue;
extern int bio_phys_segments(struct request_queue *, struct bio *);
extern void __bio_clone(struct bio *, struct bio *);
extern struct bio *bio_clone(struct bio *, gfp_t);
-@@ -346,6 +351,7 @@ extern int bio_add_page(struct bio *, st
+@@ -346,6 +351,7 @@
extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *,
unsigned int, unsigned int);
extern int bio_get_nr_vecs(struct block_device *);
extern struct bio *bio_map_user(struct request_queue *, struct block_device *,
unsigned long, unsigned int, int);
struct sg_iovec;
-@@ -368,6 +374,14 @@ extern struct bio_vec *bvec_alloc_bs(gfp
+@@ -366,6 +372,14 @@
+ void zero_fill_bio(struct bio *bio);
+ extern struct bio_vec *bvec_alloc_bs(gfp_t, int, unsigned long *, struct bio_set *);
extern unsigned int bvec_nr_vecs(unsigned short idx);
-
- /*
++
++/*
+ * Allow queuer to specify a completion CPU for this bio
+ */
+static inline void bio_set_completion_cpu(struct bio *bio, unsigned int cpu)
+{
+ bio->bi_comp_cpu = cpu;
+}
-+
-+/*
+
+ /*
* bio_set is used to allow other portions of the IO system to
- * allocate their own private memory pools for bio and iovec structures.
- * These memory pools in turn all allocate from the bio_slab
-@@ -445,6 +459,14 @@ static inline char *__bio_kmap_irq(struc
+@@ -445,6 +459,14 @@
__bio_kmap_irq((bio), (bio)->bi_idx, (flags))
#define bio_kunmap_irq(buf,flags) __bio_kunmap_irq(buf, flags)
#if defined(CONFIG_BLK_DEV_INTEGRITY)
#define bip_vec_idx(bip, idx) (&(bip->bip_vec[(idx)]))
-@@ -479,7 +501,7 @@ extern void bio_integrity_endio(struct b
+@@ -479,7 +501,7 @@
extern void bio_integrity_advance(struct bio *, unsigned int);
extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int);
extern void bio_integrity_split(struct bio *, struct bio_pair *, int);
extern int bioset_integrity_create(struct bio_set *, int);
extern void bioset_integrity_free(struct bio_set *);
extern void bio_integrity_init_slab(void);
-@@ -490,7 +512,7 @@ extern void bio_integrity_init_slab(void
+@@ -490,7 +512,7 @@
#define bioset_integrity_create(a, b) (0)
#define bio_integrity_prep(a) (0)
#define bio_integrity_enabled(a) (0)
#define bioset_integrity_free(a) do { } while (0)
#define bio_integrity_free(a, b) do { } while (0)
#define bio_integrity_endio(a, b) do { } while (0)
-diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux/blkdev.h
---- linux-2.6.27/include/linux/blkdev.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/blkdev.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/blkdev.h
+--- a/include/linux/blkdev.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/blkdev.h Wed May 06 16:56:56 2009 +0100
@@ -17,6 +17,7 @@
#include <linux/module.h>
#include <linux/stringify.h>
#include <asm/scatterlist.h>
-@@ -54,7 +55,6 @@ enum rq_cmd_type_bits {
+@@ -54,7 +55,6 @@
REQ_TYPE_PM_SUSPEND, /* suspend request */
REQ_TYPE_PM_RESUME, /* resume request */
REQ_TYPE_PM_SHUTDOWN, /* shutdown request */
REQ_TYPE_SPECIAL, /* driver defined type */
REQ_TYPE_LINUX_BLOCK, /* generic block layer message */
/*
-@@ -76,19 +76,20 @@ enum rq_cmd_type_bits {
+@@ -76,19 +76,20 @@
*
*/
enum {
__REQ_SORTED, /* elevator knows about this request */
__REQ_SOFTBARRIER, /* may not be passed by ioscheduler */
__REQ_HARDBARRIER, /* may not be passed by drive either */
-@@ -111,7 +112,10 @@ enum rq_flag_bits {
+@@ -111,7 +112,10 @@
};
#define REQ_RW (1 << __REQ_RW)
#define REQ_SORTED (1 << __REQ_SORTED)
#define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER)
#define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER)
-@@ -140,12 +144,14 @@ enum rq_flag_bits {
+@@ -140,12 +144,14 @@
*/
struct request {
struct list_head queuelist;
/* Maintain bio traversal state for part by part I/O submission.
* hard_* are block layer internals, no driver should touch them!
-@@ -190,13 +196,6 @@ struct request {
+@@ -190,13 +196,6 @@
*/
unsigned short nr_phys_segments;
unsigned short ioprio;
void *special;
-@@ -220,6 +219,8 @@ struct request {
+@@ -220,6 +219,8 @@
void *data;
void *sense;
unsigned int timeout;
int retries;
-@@ -233,6 +234,11 @@ struct request {
+@@ -232,6 +233,11 @@
+ /* for bidi */
struct request *next_rq;
};
-
++
+static inline unsigned short req_get_ioprio(struct request *req)
+{
+ return req->ioprio;
+}
-+
+
/*
* State information carried for REQ_TYPE_PM_SUSPEND and REQ_TYPE_PM_RESUME
- * requests. Some step values could eventually be made generic.
-@@ -252,6 +258,7 @@ typedef void (request_fn_proc) (struct r
+@@ -252,6 +258,7 @@
typedef int (make_request_fn) (struct request_queue *q, struct bio *bio);
typedef int (prep_rq_fn) (struct request_queue *, struct request *);
typedef void (unplug_fn) (struct request_queue *);
struct bio_vec;
struct bvec_merge_data {
-@@ -265,6 +272,15 @@ typedef int (merge_bvec_fn) (struct requ
+@@ -265,6 +272,15 @@
typedef void (prepare_flush_fn) (struct request_queue *, struct request *);
typedef void (softirq_done_fn)(struct request *);
typedef int (dma_drain_needed_fn)(struct request *);
enum blk_queue_state {
Queue_down,
-@@ -307,10 +323,13 @@ struct request_queue
+@@ -307,10 +323,13 @@
make_request_fn *make_request_fn;
prep_rq_fn *prep_rq_fn;
unplug_fn *unplug_fn;
/*
* Dispatch queue sorting
-@@ -385,6 +404,10 @@ struct request_queue
+@@ -385,6 +404,10 @@
unsigned int nr_sorted;
unsigned int in_flight;
/*
* sg stuff
*/
-@@ -421,6 +444,8 @@ struct request_queue
+@@ -421,6 +444,8 @@
#define QUEUE_FLAG_ELVSWITCH 8 /* don't use elevator, just do FIFO */
#define QUEUE_FLAG_BIDI 9 /* queue supports bidi requests */
#define QUEUE_FLAG_NOMERGES 10 /* disable merge attempts */
static inline int queue_is_locked(struct request_queue *q)
{
-@@ -527,25 +552,34 @@ enum {
+@@ -527,25 +552,34 @@
#define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags)
#define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags)
#define blk_queue_flushing(q) ((q)->ordseq)
#define blk_bidi_rq(rq) ((rq)->next_rq != NULL)
#define blk_empty_barrier(rq) (blk_barrier_rq(rq) && blk_fs_request(rq) && !(rq)->hard_nr_sectors)
/* rq->queuelist of dequeued request must be list_empty() */
-@@ -592,7 +626,8 @@ static inline void blk_clear_queue_full(
+@@ -592,7 +626,8 @@
#define RQ_NOMERGE_FLAGS \
(REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER)
#define rq_mergeable(rq) \
/*
* q->prep_rq_fn return values
-@@ -623,6 +658,7 @@ extern unsigned long blk_max_low_pfn, bl
+@@ -623,6 +658,7 @@
* default timeout for SG_IO if none specified
*/
#define BLK_DEFAULT_SG_TIMEOUT (60 * HZ)
#ifdef CONFIG_BOUNCE
extern int init_emergency_isa_pool(void);
-@@ -664,6 +700,10 @@ extern void __blk_put_request(struct req
+@@ -664,6 +700,10 @@
extern struct request *blk_get_request(struct request_queue *, int, gfp_t);
extern void blk_insert_request(struct request_queue *, struct request *, int, void *);
extern void blk_requeue_request(struct request_queue *, struct request *);
extern void blk_plug_device(struct request_queue *);
extern void blk_plug_device_unlocked(struct request_queue *);
extern int blk_remove_plug(struct request_queue *);
-@@ -734,6 +774,8 @@ static inline void blk_run_address_space
+@@ -734,6 +774,8 @@
blk_run_backing_dev(mapping->backing_dev_info, NULL);
}
/*
* blk_end_request() and friends.
* __blk_end_request() and end_request() must be called with
-@@ -756,6 +798,11 @@ extern int blk_end_request_callback(stru
+@@ -756,6 +798,11 @@
unsigned int nr_bytes,
int (drv_callback)(struct request *));
extern void blk_complete_request(struct request *);
/*
* blk_end_request() takes bytes instead of sectors as a complete size.
-@@ -765,11 +812,6 @@ extern void blk_complete_request(struct
+@@ -764,11 +811,6 @@
+ */
extern unsigned int blk_rq_bytes(struct request *rq);
extern unsigned int blk_rq_cur_bytes(struct request *rq);
-
+-
-static inline void blkdev_dequeue_request(struct request *req)
-{
- elv_dequeue_request(req->q, req);
-}
--
+
/*
* Access functions for manipulating queue properties
- */
-@@ -790,12 +832,16 @@ extern void blk_queue_update_dma_pad(str
+@@ -790,12 +832,16 @@
extern int blk_queue_dma_drain(struct request_queue *q,
dma_drain_needed_fn *dma_drain_needed,
void *buf, unsigned int size);
extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev);
extern int blk_queue_ordered(struct request_queue *, unsigned, prepare_flush_fn *);
extern int blk_do_ordered(struct request_queue *, struct request **);
-@@ -837,6 +883,16 @@ static inline struct request *blk_map_qu
+@@ -837,6 +883,16 @@
}
extern int blkdev_issue_flush(struct block_device *, sector_t *);
/*
* command filter functions
-@@ -852,6 +908,8 @@ extern void blk_set_cmd_filter_defaults(
+@@ -851,6 +907,8 @@
+ #define BLK_DEF_MAX_SECTORS 1024
#define MAX_SEGMENT_SIZE 65536
-
-+#define BLK_SEG_BOUNDARY_MASK 0xFFFFFFFFUL
+
++#define BLK_SEG_BOUNDARY_MASK 0xFFFFFFFFUL
+
#define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist)
- static inline int queue_hardsect_size(struct request_queue *q)
-@@ -900,7 +958,7 @@ static inline void put_dev_sector(Sector
+@@ -900,7 +958,7 @@
}
struct work_struct;
void kblockd_flush_work(struct work_struct *work);
#define MODULE_ALIAS_BLOCKDEV(major,minor) \
-@@ -945,7 +1003,7 @@ struct blk_integrity {
+@@ -945,7 +1003,7 @@
extern int blk_integrity_register(struct gendisk *, struct blk_integrity *);
extern void blk_integrity_unregister(struct gendisk *);
extern int blk_rq_map_integrity_sg(struct request *, struct scatterlist *);
extern int blk_rq_count_integrity_sg(struct request *);
-@@ -962,6 +1020,11 @@ static inline struct blk_integrity *bdev
+@@ -960,6 +1018,11 @@
+ static inline struct blk_integrity *bdev_get_integrity(struct block_device *bdev)
+ {
return bdev->bd_disk->integrity;
- }
-
++}
++
+static inline struct blk_integrity *blk_get_integrity(struct gendisk *disk)
+{
+ return disk->integrity;
-+}
-+
+ }
+
static inline unsigned int bdev_get_tag_size(struct block_device *bdev)
- {
- struct blk_integrity *bi = bdev_get_integrity(bdev);
-@@ -1004,6 +1067,7 @@ static inline int blk_integrity_rq(struc
+@@ -1004,6 +1067,7 @@
#define blk_rq_count_integrity_sg(a) (0)
#define blk_rq_map_integrity_sg(a, b) (0)
#define bdev_get_integrity(a) (0)
#define bdev_get_tag_size(a) (0)
#define blk_integrity_compare(a, b) (0)
#define blk_integrity_register(a, b) (0)
-diff -purN linux-2.6.27/include/linux/blktrace_api.h linux-2.6.27.19-5.1/include/linux/blktrace_api.h
---- linux-2.6.27/include/linux/blktrace_api.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/blktrace_api.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/blktrace_api.h
+--- a/include/linux/blktrace_api.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/blktrace_api.h Wed May 06 16:56:56 2009 +0100
@@ -1,8 +1,10 @@
#ifndef BLKTRACE_H
#define BLKTRACE_H
/*
* Trace categories
-@@ -21,6 +23,8 @@ enum blktrace_cat {
+@@ -21,6 +23,8 @@
BLK_TC_NOTIFY = 1 << 10, /* special message */
BLK_TC_AHEAD = 1 << 11, /* readahead */
BLK_TC_META = 1 << 12, /* metadata */
BLK_TC_END = 1 << 15, /* only 16-bits, reminder */
};
-@@ -47,6 +51,8 @@ enum blktrace_act {
+@@ -47,6 +51,8 @@
__BLK_TA_SPLIT, /* bio was split */
__BLK_TA_BOUNCE, /* bio was bounced */
__BLK_TA_REMAP, /* bio was remapped */
};
/*
-@@ -77,6 +83,8 @@ enum blktrace_notify {
+@@ -77,6 +83,8 @@
#define BLK_TA_SPLIT (__BLK_TA_SPLIT)
#define BLK_TA_BOUNCE (__BLK_TA_BOUNCE)
#define BLK_TA_REMAP (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE))
#define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))
#define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))
-@@ -89,17 +97,17 @@ enum blktrace_notify {
+@@ -89,17 +97,17 @@
* The trace itself
*/
struct blk_io_trace {
};
/*
-@@ -117,6 +125,25 @@ enum {
+@@ -117,6 +125,25 @@
Blktrace_stopped,
};
struct blk_trace {
int trace_state;
struct rchan *rchan;
-@@ -133,21 +160,6 @@ struct blk_trace {
+@@ -133,21 +160,6 @@
atomic_t dropped;
};
extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *);
extern void blk_trace_shutdown(struct request_queue *);
extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *);
-@@ -195,6 +207,9 @@ static inline void blk_add_trace_rq(stru
+@@ -194,6 +206,9 @@
+
if (likely(!bt))
return;
-
++
+ if (blk_discard_rq(rq))
+ rw |= (1 << BIO_RW_DISCARD);
-+
+
if (blk_pc_request(rq)) {
what |= BLK_TC_ACT(BLK_TC_PC);
- __blk_add_trace(bt, 0, rq->data_len, rw, what, rq->errors, sizeof(rq->cmd), rq->cmd);
-@@ -307,6 +322,34 @@ static inline void blk_add_trace_remap(s
+@@ -307,6 +322,34 @@
__blk_add_trace(bt, from, bio->bi_size, bio->bi_rw, BLK_TA_REMAP, !bio_flagged(bio, BIO_UPTODATE), sizeof(r), &r);
}
extern int blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
char __user *arg);
extern int blk_trace_startstop(struct request_queue *q, int start);
-@@ -320,6 +363,7 @@ extern int blk_trace_remove(struct reque
+@@ -320,6 +363,7 @@
#define blk_add_trace_generic(q, rq, rw, what) do { } while (0)
#define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0)
#define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0)
#define do_blk_trace_setup(q, name, dev, buts) (-ENOTTY)
#define blk_trace_setup(q, name, dev, arg) (-ENOTTY)
#define blk_trace_startstop(q, start) (-ENOTTY)
-diff -purN linux-2.6.27/include/linux/buffer_head.h linux-2.6.27.19-5.1/include/linux/buffer_head.h
---- linux-2.6.27/include/linux/buffer_head.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/buffer_head.h 2009-03-25 16:11:50.000000000 +0000
-@@ -35,6 +35,7 @@ enum bh_state_bits {
+diff -r 9608d5473017 include/linux/buffer_head.h
+--- a/include/linux/buffer_head.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/buffer_head.h Wed May 06 16:56:56 2009 +0100
+@@ -35,6 +35,7 @@
BH_Ordered, /* ordered write */
BH_Eopnotsupp, /* operation not supported (barrier) */
BH_Unwritten, /* Buffer is allocated on disk but not written */
BH_PrivateStart,/* not a state bit, but the first bit available
* for private allocation by other entities
-@@ -344,7 +345,7 @@ static inline void invalidate_inode_buff
+@@ -344,7 +345,7 @@
static inline int remove_inode_buffers(struct inode *inode) { return 1; }
static inline int sync_mapping_buffers(struct address_space *mapping) { return 0; }
static inline void invalidate_bdev(struct block_device *bdev) {}
#endif /* CONFIG_BLOCK */
#endif /* _LINUX_BUFFER_HEAD_H */
-diff -purN linux-2.6.27/include/linux/can/core.h linux-2.6.27.19-5.1/include/linux/can/core.h
---- linux-2.6.27/include/linux/can/core.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/can/core.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/can/core.h
+--- a/include/linux/can/core.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/can/core.h Wed May 06 16:56:56 2009 +0100
@@ -19,7 +19,7 @@
#include <linux/skbuff.h>
#include <linux/netdevice.h>
/* increment this number each time you change some user-space interface */
#define CAN_ABI_VERSION "8"
-diff -purN linux-2.6.27/include/linux/capability.h linux-2.6.27.19-5.1/include/linux/capability.h
---- linux-2.6.27/include/linux/capability.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/capability.h 2009-03-25 16:11:48.000000000 +0000
-@@ -68,6 +68,9 @@ typedef struct __user_cap_data_struct {
+diff -r 9608d5473017 include/linux/capability.h
+--- a/include/linux/capability.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/capability.h Wed May 06 16:56:56 2009 +0100
+@@ -68,6 +68,9 @@
#define VFS_CAP_U32 VFS_CAP_U32_2
#define VFS_CAP_REVISION VFS_CAP_REVISION_2
struct vfs_cap_data {
__le32 magic_etc; /* Little endian */
-diff -purN linux-2.6.27/include/linux/cgroup_subsys.h linux-2.6.27.19-5.1/include/linux/cgroup_subsys.h
---- linux-2.6.27/include/linux/cgroup_subsys.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/cgroup_subsys.h 2009-03-25 16:11:48.000000000 +0000
-@@ -48,3 +48,9 @@ SUBSYS(devices)
+diff -r 9608d5473017 include/linux/cgroup_subsys.h
+--- a/include/linux/cgroup_subsys.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/cgroup_subsys.h Wed May 06 16:56:56 2009 +0100
+@@ -48,3 +48,9 @@
#endif
/* */
+#endif
+
+/* */
-diff -purN linux-2.6.27/include/linux/compat.h linux-2.6.27.19-5.1/include/linux/compat.h
---- linux-2.6.27/include/linux/compat.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/compat.h 2009-03-25 16:11:49.000000000 +0000
-@@ -278,5 +278,18 @@ asmlinkage long compat_sys_timerfd_setti
+diff -r 9608d5473017 include/linux/compat.h
+--- a/include/linux/compat.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/compat.h Wed May 06 16:56:56 2009 +0100
+@@ -278,5 +278,18 @@
asmlinkage long compat_sys_timerfd_gettime(int ufd,
struct compat_itimerspec __user *otmr);
+
#endif /* CONFIG_COMPAT */
#endif /* _LINUX_COMPAT_H */
-diff -purN linux-2.6.27/include/linux/console.h linux-2.6.27.19-5.1/include/linux/console.h
---- linux-2.6.27/include/linux/console.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/console.h 2009-03-25 16:11:49.000000000 +0000
-@@ -63,6 +63,7 @@ extern const struct consw dummy_con; /*
+diff -r 9608d5473017 include/linux/console.h
+--- a/include/linux/console.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/console.h Wed May 06 16:56:56 2009 +0100
+@@ -63,6 +63,7 @@
extern const struct consw vga_con; /* VGA text console */
extern const struct consw newport_con; /* SGI Newport console */
extern const struct consw prom_con; /* SPARC PROM console */
int con_is_bound(const struct consw *csw);
int register_con_driver(const struct consw *csw, int first, int last);
-@@ -142,7 +143,12 @@ void vcs_remove_sysfs(struct tty_struct
+@@ -142,7 +143,12 @@
/* Some debug stub to catch some of the obvious races in the VT code */
#if 1
#else
#define WARN_CONSOLE_UNLOCKED()
#endif
-diff -purN linux-2.6.27/include/linux/console_struct.h linux-2.6.27.19-5.1/include/linux/console_struct.h
---- linux-2.6.27/include/linux/console_struct.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/console_struct.h 2009-03-25 16:11:49.000000000 +0000
-@@ -53,7 +53,7 @@ struct vc_data {
+diff -r 9608d5473017 include/linux/console_struct.h
+--- a/include/linux/console_struct.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/console_struct.h Wed May 06 16:56:56 2009 +0100
+@@ -53,7 +53,7 @@
unsigned short vc_hi_font_mask; /* [#] Attribute set for upper 256 chars of font or 0 if not supported */
struct console_font vc_font; /* Current VC font set */
unsigned short vc_video_erase_char; /* Background erase character */
/* VT terminal data */
unsigned int vc_state; /* Escape sequence parser state */
unsigned int vc_npar,vc_par[NPAR]; /* Parameters of current escape sequence */
-@@ -107,6 +107,9 @@ struct vc_data {
+@@ -107,6 +107,9 @@
struct vc_data **vc_display_fg; /* [!] Ptr to var holding fg console for this display */
unsigned long vc_uni_pagedir;
unsigned long *vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */
/* additional information is in vt_kern.h */
};
-diff -purN linux-2.6.27/include/linux/cpufreq.h linux-2.6.27.19-5.1/include/linux/cpufreq.h
---- linux-2.6.27/include/linux/cpufreq.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/cpufreq.h 2009-03-25 16:11:48.000000000 +0000
-@@ -282,7 +282,7 @@ int cpufreq_update_policy(unsigned int c
+diff -r 9608d5473017 include/linux/cpufreq.h
+--- a/include/linux/cpufreq.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/cpufreq.h Wed May 06 16:56:56 2009 +0100
+@@ -282,7 +282,7 @@
unsigned int cpufreq_get(unsigned int cpu);
/* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */
unsigned int cpufreq_quick_get(unsigned int cpu);
#else
static inline unsigned int cpufreq_quick_get(unsigned int cpu)
-diff -purN linux-2.6.27/include/linux/cpumask.h linux-2.6.27.19-5.1/include/linux/cpumask.h
---- linux-2.6.27/include/linux/cpumask.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/cpumask.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/cpumask.h
+--- a/include/linux/cpumask.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/cpumask.h Wed May 06 16:56:56 2009 +0100
@@ -109,6 +109,7 @@
*
* for_each_cpu_mask(cpu, mask) for-loop cpu over mask using NR_CPUS
*
* int num_online_cpus() Number of online CPUs
* int num_possible_cpus() Number of all possible CPUs
-@@ -400,29 +401,41 @@ static inline void __cpus_fold(cpumask_t
+@@ -400,28 +401,40 @@
#if NR_CPUS == 1
+ (cpu) = cpumask_next_and((cpu), &(mask), &(and)), \
+ (cpu) < nr_cpu_ids;)
#endif
-
-+#define cpumask_first_and(mask, and) cpumask_next_and(-1, (mask), (and))
+
++#define cpumask_first_and(mask, and) cpumask_next_and(-1, (mask), (and))
+
#if NR_CPUS <= 64
- #define next_cpu_nr(n, src) next_cpu(n, src)
-@@ -432,12 +445,14 @@ int __any_online_cpu(const cpumask_t *ma
+@@ -432,12 +445,14 @@
#else /* NR_CPUS > 64 */
int __next_cpu_nr(int n, const cpumask_t *srcp);
#endif /* NR_CPUS > 64 */
-diff -purN linux-2.6.27/include/linux/dcache.h linux-2.6.27.19-5.1/include/linux/dcache.h
---- linux-2.6.27/include/linux/dcache.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dcache.h 2009-03-25 16:11:50.000000000 +0000
-@@ -299,9 +299,12 @@ extern int d_validate(struct dentry *, s
+diff -r 9608d5473017 include/linux/dcache.h
+--- a/include/linux/dcache.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/dcache.h Wed May 06 16:56:56 2009 +0100
+@@ -299,9 +299,12 @@
/*
* helper function for dentry_operations.d_dname() members
*/
extern char *d_path(const struct path *, char *, int);
extern char *dentry_path(struct dentry *, char *, int);
-diff -purN linux-2.6.27/include/linux/dcbnl.h linux-2.6.27.19-5.1/include/linux/dcbnl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dcbnl.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/dcbnl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/dcbnl.h Wed May 06 16:56:56 2009 +0100
@@ -0,0 +1,326 @@
+#ifndef __LINUX_DCBNL_H__
+#define __LINUX_DCBNL_H__
+
+
+#endif /* __LINUX_DCBNL_H__ */
-diff -purN linux-2.6.27/include/linux/device-mapper.h linux-2.6.27.19-5.1/include/linux/device-mapper.h
---- linux-2.6.27/include/linux/device-mapper.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/device-mapper.h 2009-03-25 16:11:47.000000000 +0000
-@@ -46,6 +46,8 @@ typedef void (*dm_dtr_fn) (struct dm_tar
+diff -r 9608d5473017 include/linux/device-mapper.h
+--- a/include/linux/device-mapper.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/device-mapper.h Wed May 06 16:56:56 2009 +0100
+@@ -46,6 +46,8 @@
*/
typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio,
union map_info *map_context);
/*
* Returns:
-@@ -58,6 +60,9 @@ typedef int (*dm_map_fn) (struct dm_targ
+@@ -58,6 +60,9 @@
typedef int (*dm_endio_fn) (struct dm_target *ti,
struct bio *bio, int error,
union map_info *map_context);
typedef void (*dm_flush_fn) (struct dm_target *ti);
typedef void (*dm_presuspend_fn) (struct dm_target *ti);
-@@ -77,6 +82,13 @@ typedef int (*dm_ioctl_fn) (struct dm_ta
+@@ -76,6 +81,13 @@
+
typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm,
struct bio_vec *biovec, int max_size);
-
++
+/*
+ * Returns:
+ * 0: The target can handle the next I/O immediately.
+ * 1: The target can't handle the next I/O immediately.
+ */
+typedef int (*dm_busy_fn) (struct dm_target *ti);
-+
+
void dm_error(const char *message);
- /*
-@@ -103,7 +115,9 @@ struct target_type {
+@@ -103,7 +115,9 @@
dm_ctr_fn ctr;
dm_dtr_fn dtr;
dm_map_fn map;
dm_flush_fn flush;
dm_presuspend_fn presuspend;
dm_postsuspend_fn postsuspend;
-@@ -113,6 +127,7 @@ struct target_type {
+@@ -113,6 +127,7 @@
dm_message_fn message;
dm_ioctl_fn ioctl;
dm_merge_fn merge;
};
struct io_restrictions {
-@@ -125,6 +140,7 @@ struct io_restrictions {
+@@ -125,6 +140,7 @@
unsigned short max_hw_segments;
unsigned short max_phys_segments;
unsigned char no_cluster; /* inverted so that 0 is default */
};
struct dm_target {
-@@ -348,4 +364,12 @@ static inline unsigned long to_bytes(sec
+@@ -348,4 +364,12 @@
return (n << SECTOR_SHIFT);
}
+int dm_underlying_device_busy(struct request_queue *q);
+
#endif /* _LINUX_DEVICE_MAPPER_H */
-diff -purN linux-2.6.27/include/linux/device.h linux-2.6.27.19-5.1/include/linux/device.h
---- linux-2.6.27/include/linux/device.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/device.h 2009-03-25 16:11:48.000000000 +0000
-@@ -524,22 +524,40 @@ extern const char *dev_driver_string(con
+diff -r 9608d5473017 include/linux/device.h
+--- a/include/linux/device.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/device.h Wed May 06 16:56:56 2009 +0100
+@@ -524,22 +524,40 @@
printk(level "%s %s: " format , dev_driver_string(dev) , \
dev_name(dev) , ## arg)
#define dev_dbg(dev, format, arg...) \
dev_printk(KERN_DEBUG , dev , format , ## arg)
#else
-diff -purN linux-2.6.27/include/linux/dis-asm.h linux-2.6.27.19-5.1/include/linux/dis-asm.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dis-asm.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/dis-asm.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/dis-asm.h Wed May 06 16:56:56 2009 +0100
@@ -0,0 +1,347 @@
+/* Interface between the opcode library and its callers.
+
+#endif
+
+#endif /* ! defined (DIS_ASM_H) */
-diff -purN linux-2.6.27/include/linux/dlm.h linux-2.6.27.19-5.1/include/linux/dlm.h
---- linux-2.6.27/include/linux/dlm.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dlm.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/dlm.h
+--- a/include/linux/dlm.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/dlm.h Wed May 06 16:56:56 2009 +0100
@@ -2,7 +2,7 @@
*******************************************************************************
**
**
** This copyrighted material is made available to anyone wishing to use,
** modify, copy, or redistribute it subject to the terms and conditions
-@@ -65,9 +65,12 @@ struct dlm_lksb {
+@@ -65,9 +65,12 @@
char * sb_lvbptr;
};
#ifdef __KERNEL__
-diff -purN linux-2.6.27/include/linux/dlm_device.h linux-2.6.27.19-5.1/include/linux/dlm_device.h
---- linux-2.6.27/include/linux/dlm_device.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dlm_device.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/linux/dlm_device.h
+--- a/include/linux/dlm_device.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/dlm_device.h Wed May 06 16:56:56 2009 +0100
@@ -26,7 +26,7 @@
/* Version of the device interface */
#define DLM_DEVICE_VERSION_MAJOR 6
/* struct passed to the lock write */
struct dlm_lock_params {
-diff -purN linux-2.6.27/include/linux/dm-regions.h linux-2.6.27.19-5.1/include/linux/dm-regions.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dm-regions.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/dm-regions.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/dm-regions.h Wed May 06 16:56:56 2009 +0100
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2003 Sistina Software Limited.
+void dm_rh_start_recovery(struct dm_rh_client *rh);
+
+#endif /* #ifdef DM_REGION_HASH_H */
-diff -purN linux-2.6.27/include/linux/dmar.h linux-2.6.27.19-5.1/include/linux/dmar.h
---- linux-2.6.27/include/linux/dmar.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dmar.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/dmar.h
+--- a/include/linux/dmar.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/dmar.h Wed May 06 16:56:56 2009 +0100
@@ -25,9 +25,98 @@
#include <linux/types.h>
#include <linux/msi.h>
extern const char *dmar_get_fault_reason(u8 fault_reason);
/* Can't use the common MSI interrupt functions
-@@ -40,47 +129,30 @@ extern void dmar_msi_write(int irq, stru
+@@ -40,47 +129,30 @@
extern int dmar_set_interrupt(struct intel_iommu *iommu);
extern int arch_setup_dmar_msi(unsigned int irq);
-
#endif /* !CONFIG_DMAR */
#endif /* __DMAR_H__ */
-diff -purN linux-2.6.27/include/linux/dmi.h linux-2.6.27.19-5.1/include/linux/dmi.h
---- linux-2.6.27/include/linux/dmi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dmi.h 2009-03-25 16:11:48.000000000 +0000
-@@ -75,24 +75,29 @@ struct dmi_device {
+diff -r 9608d5473017 include/linux/dmi.h
+--- a/include/linux/dmi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/dmi.h Wed May 06 16:56:56 2009 +0100
+@@ -75,24 +75,29 @@
#ifdef CONFIG_DMI
extern int dmi_check_system(const struct dmi_system_id *list);
#define dmi_available 0
static inline int dmi_walk(void (*decode)(const struct dmi_header *))
{ return -1; }
-diff -purN linux-2.6.27/include/linux/dqblk_qtree.h linux-2.6.27.19-5.1/include/linux/dqblk_qtree.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dqblk_qtree.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/dqblk_qtree.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/dqblk_qtree.h Wed May 06 16:56:56 2009 +0100
@@ -0,0 +1,56 @@
+/*
+ * Definitions of structures and functions for quota formats using trie
+}
+
+#endif /* _LINUX_DQBLK_QTREE_H */
-diff -purN linux-2.6.27/include/linux/dqblk_v1.h linux-2.6.27.19-5.1/include/linux/dqblk_v1.h
---- linux-2.6.27/include/linux/dqblk_v1.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dqblk_v1.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/dqblk_v1.h
+--- a/include/linux/dqblk_v1.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/dqblk_v1.h Wed May 06 16:56:56 2009 +0100
@@ -17,8 +17,4 @@
#define V1_DEL_ALLOC 0
#define V1_DEL_REWRITE 2
-};
-
#endif /* _LINUX_DQBLK_V1_H */
-diff -purN linux-2.6.27/include/linux/dqblk_v2.h linux-2.6.27.19-5.1/include/linux/dqblk_v2.h
---- linux-2.6.27/include/linux/dqblk_v2.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dqblk_v2.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/dqblk_v2.h
+--- a/include/linux/dqblk_v2.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/dqblk_v2.h Wed May 06 16:56:56 2009 +0100
@@ -1,26 +1,19 @@
/*
- * Definitions of structures for vfsv0 quota format
+#define V2_DEL_REWRITE QTREE_DEL_REWRITE
#endif /* _LINUX_DQBLK_V2_H */
-diff -purN linux-2.6.27/include/linux/dynamic_printk.h linux-2.6.27.19-5.1/include/linux/dynamic_printk.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dynamic_printk.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/dynamic_printk.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/dynamic_printk.h Wed May 06 16:56:56 2009 +0100
@@ -0,0 +1,93 @@
+#ifndef _DYNAMIC_PRINTK_H
+#define _DYNAMIC_PRINTK_H
+#endif
+
+#endif
-diff -purN linux-2.6.27/include/linux/efi.h linux-2.6.27.19-5.1/include/linux/efi.h
---- linux-2.6.27/include/linux/efi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/efi.h 2009-03-25 16:11:50.000000000 +0000
-@@ -208,6 +208,9 @@ typedef efi_status_t efi_set_virtual_add
+diff -r 9608d5473017 include/linux/efi.h
+--- a/include/linux/efi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/efi.h Wed May 06 16:56:56 2009 +0100
+@@ -208,6 +208,9 @@
#define EFI_GLOBAL_VARIABLE_GUID \
EFI_GUID( 0x8be4df61, 0x93ca, 0x11d2, 0xaa, 0x0d, 0x00, 0xe0, 0x98, 0x03, 0x2b, 0x8c )
typedef struct {
efi_guid_t guid;
unsigned long table;
-@@ -255,6 +258,7 @@ extern struct efi {
+@@ -255,6 +258,7 @@
unsigned long boot_info; /* boot info table */
unsigned long hcdp; /* HCDP table */
unsigned long uga; /* UGA table */
efi_get_time_t *get_time;
efi_set_time_t *set_time;
efi_get_wakeup_time_t *get_wakeup_time;
-diff -purN linux-2.6.27/include/linux/elevator.h linux-2.6.27.19-5.1/include/linux/elevator.h
---- linux-2.6.27/include/linux/elevator.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/elevator.h 2009-03-25 16:11:50.000000000 +0000
-@@ -112,6 +112,7 @@ extern struct request *elv_latter_reques
+diff -r 9608d5473017 include/linux/elevator.h
+--- a/include/linux/elevator.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/elevator.h Wed May 06 16:56:56 2009 +0100
+@@ -112,6 +112,7 @@
extern int elv_register_queue(struct request_queue *q);
extern void elv_unregister_queue(struct request_queue *q);
extern int elv_may_queue(struct request_queue *, int);
extern void elv_completed_request(struct request_queue *, struct request *);
extern int elv_set_request(struct request_queue *, struct request *, gfp_t);
extern void elv_put_request(struct request_queue *, struct request *);
-@@ -173,15 +174,15 @@ enum {
+@@ -173,15 +174,15 @@
#define rb_entry_rq(node) rb_entry((node), struct request, rb_node)
/*
} while (0)
/*
-diff -purN linux-2.6.27/include/linux/elfnote.h linux-2.6.27.19-5.1/include/linux/elfnote.h
---- linux-2.6.27/include/linux/elfnote.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/elfnote.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/elfnote.h
+--- a/include/linux/elfnote.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/elfnote.h Wed May 06 16:56:56 2009 +0100
@@ -52,7 +52,7 @@
4484:.balign 4 ; \
.popsection ;
ELFNOTE_START(name, type, "") \
desc ; \
ELFNOTE_END
-diff -purN linux-2.6.27/include/linux/ext3_fs.h linux-2.6.27.19-5.1/include/linux/ext3_fs.h
---- linux-2.6.27/include/linux/ext3_fs.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/ext3_fs.h 2009-03-25 16:11:49.000000000 +0000
-@@ -380,6 +380,7 @@ struct ext3_inode {
+diff -r 9608d5473017 include/linux/ext3_fs.h
+--- a/include/linux/ext3_fs.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/ext3_fs.h Wed May 06 16:56:56 2009 +0100
+@@ -380,6 +380,7 @@
#define EXT3_MOUNT_QUOTA 0x80000 /* Some quota option set */
#define EXT3_MOUNT_USRQUOTA 0x100000 /* "old" user quota */
#define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */
/* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
#ifndef _LINUX_EXT2_FS_H
-diff -purN linux-2.6.27/include/linux/ext3_fs_i.h linux-2.6.27.19-5.1/include/linux/ext3_fs_i.h
---- linux-2.6.27/include/linux/ext3_fs_i.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/ext3_fs_i.h 2009-03-25 16:11:50.000000000 +0000
-@@ -107,6 +107,9 @@ struct ext3_inode_info {
+diff -r 9608d5473017 include/linux/ext3_fs_i.h
+--- a/include/linux/ext3_fs_i.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/ext3_fs_i.h Wed May 06 16:56:56 2009 +0100
+@@ -107,6 +107,9 @@
struct posix_acl *i_acl;
struct posix_acl *i_default_acl;
#endif
struct list_head i_orphan; /* unlinked but open inodes */
-diff -purN linux-2.6.27/include/linux/fb.h linux-2.6.27.19-5.1/include/linux/fb.h
---- linux-2.6.27/include/linux/fb.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/fb.h 2009-03-25 16:11:48.000000000 +0000
-@@ -849,6 +849,14 @@ struct fb_info {
+diff -r 9608d5473017 include/linux/fb.h
+--- a/include/linux/fb.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/fb.h Wed May 06 16:56:56 2009 +0100
+@@ -849,6 +849,14 @@
void *fbcon_par; /* fbcon use-only private area */
/* From here on everything is device dependent */
void *par;
};
#ifdef MODULE
-diff -purN linux-2.6.27/include/linux/firmware-map.h linux-2.6.27.19-5.1/include/linux/firmware-map.h
---- linux-2.6.27/include/linux/firmware-map.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/firmware-map.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/firmware-map.h
+--- a/include/linux/firmware-map.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/firmware-map.h Wed May 06 16:56:56 2009 +0100
@@ -24,21 +24,19 @@
*/
#ifdef CONFIG_FIRMWARE_MEMMAP
{
return 0;
}
-diff -purN linux-2.6.27/include/linux/freezer.h linux-2.6.27.19-5.1/include/linux/freezer.h
---- linux-2.6.27/include/linux/freezer.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/freezer.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/freezer.h
+--- a/include/linux/freezer.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/freezer.h Wed May 06 16:56:56 2009 +0100
@@ -6,7 +6,7 @@
#include <linux/sched.h>
#include <linux/wait.h>
/*
* Check if a process has been frozen
*/
-@@ -39,29 +39,14 @@ static inline void clear_freeze_flag(str
+@@ -39,28 +39,13 @@
clear_tsk_thread_flag(p, TIF_FREEZE);
}
- * frozen and no one would thaw it.
- */
-static inline int thaw_process(struct task_struct *p)
--{
++static inline bool should_send_signal(struct task_struct *p)
+ {
- task_lock(p);
- if (frozen(p)) {
- p->flags &= ~PF_FROZEN;
- clear_freeze_flag(p);
- task_unlock(p);
- return 0;
-+static inline bool should_send_signal(struct task_struct *p)
-+{
+ return !(p->flags & PF_FREEZER_NOSIG);
}
-
++
+/* Takes and releases task alloc lock using task_lock() */
+extern int thaw_process(struct task_struct *p);
-+
+
extern void refrigerator(void);
extern int freeze_processes(void);
- extern void thaw_processes(void);
-@@ -75,6 +60,15 @@ static inline int try_to_freeze(void)
+@@ -74,6 +59,15 @@
+ } else
return 0;
}
-
++
+extern bool freeze_task(struct task_struct *p, bool sig_only);
+extern void cancel_freezing(struct task_struct *p);
+
+#else /* !CONFIG_CGROUP_FREEZER */
+static inline int cgroup_frozen(struct task_struct *task) { return 0; }
+#endif /* !CONFIG_CGROUP_FREEZER */
-+
+
/*
* The PF_FREEZER_SKIP flag should be set by a vfork parent right before it
- * calls wait_for_completion(&vfork) and reset right after it returns from this
-@@ -166,7 +160,7 @@ static inline void set_freezable_with_si
+@@ -166,7 +160,7 @@
} while (try_to_freeze()); \
__retval; \
})
static inline int frozen(struct task_struct *p) { return 0; }
static inline int freezing(struct task_struct *p) { return 0; }
static inline void set_freeze_flag(struct task_struct *p) {}
-@@ -191,6 +185,6 @@ static inline void set_freezable_with_si
+@@ -191,6 +185,6 @@
#define wait_event_freezable_timeout(wq, condition, timeout) \
wait_event_interruptible_timeout(wq, condition, timeout)
+#endif /* !CONFIG_FREEZER */
#endif /* FREEZER_H_INCLUDED */
-diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.h
---- linux-2.6.27/include/linux/fs.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/fs.h 2009-03-25 16:11:50.000000000 +0000
-@@ -86,7 +86,9 @@ extern int dir_notify_enable;
+diff -r 9608d5473017 include/linux/fs.h
+--- a/include/linux/fs.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/fs.h Wed May 06 16:56:56 2009 +0100
+@@ -86,7 +86,9 @@
#define READ_META (READ | (1 << BIO_RW_META))
#define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC))
#define SWRITE_SYNC (SWRITE | (1 << BIO_RW_SYNC))
#define SEL_IN 1
#define SEL_OUT 2
-@@ -128,6 +130,7 @@ extern int dir_notify_enable;
+@@ -128,6 +130,7 @@
#define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */
#define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */
#define MS_I_VERSION (1<<23) /* Update inode I_version field */
#define MS_ACTIVE (1<<30)
#define MS_NOUSER (1<<31)
-@@ -178,6 +181,7 @@ extern int dir_notify_enable;
+@@ -178,6 +181,7 @@
#define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK)
#define IS_NOATIME(inode) __IS_FLG(inode, MS_RDONLY|MS_NOATIME)
#define IS_I_VERSION(inode) __IS_FLG(inode, MS_I_VERSION)
#define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA)
#define IS_APPEND(inode) ((inode)->i_flags & S_APPEND)
-@@ -222,6 +226,7 @@ extern int dir_notify_enable;
+@@ -222,6 +226,7 @@
#define BLKTRACESTART _IO(0x12,116)
#define BLKTRACESTOP _IO(0x12,117)
#define BLKTRACETEARDOWN _IO(0x12,118)
#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */
#define FIBMAP _IO(0x00,1) /* bmap access */
-@@ -337,6 +342,7 @@ typedef void (dio_iodone_t)(struct kiocb
+@@ -337,6 +342,7 @@
#define ATTR_KILL_PRIV (1 << 14)
#define ATTR_OPEN (1 << 15) /* Truncating from open(O_TRUNC) */
#define ATTR_TIMES_SET (1 << 16)
/*
* This is the Inode Attributes structure, used for notify_change(). It
-@@ -361,6 +367,10 @@ struct iattr {
+@@ -361,6 +367,10 @@
* Not an attribute, but an auxilary info for filesystems wanting to
* implement an ftruncate() like method. NOTE: filesystem should
* check for (ia_valid & ATTR_FILE), and not for (ia_file != NULL).
*/
struct file *ia_file;
};
-@@ -403,6 +413,9 @@ enum positive_aop_returns {
+@@ -403,6 +413,9 @@
#define AOP_FLAG_UNINTERRUPTIBLE 0x0001 /* will not do a short write */
#define AOP_FLAG_CONT_EXPAND 0x0002 /* called from cont_expand */
/*
* oh the beauties of C type declarations.
-@@ -507,6 +520,15 @@ struct address_space_operations {
+@@ -507,6 +520,15 @@
int (*launder_page) (struct page *);
int (*is_partially_uptodate) (struct page *, read_descriptor_t *,
unsigned long);
};
/*
-@@ -1077,6 +1099,9 @@ struct super_block {
+@@ -1077,6 +1099,9 @@
struct rw_semaphore s_umount;
struct mutex s_lock;
int s_count;
int s_syncing;
int s_need_sync_fs;
atomic_t s_active;
-@@ -1160,13 +1185,13 @@ extern void unlock_super(struct super_bl
+@@ -1160,13 +1185,13 @@
*/
extern int vfs_permission(struct nameidata *, int);
extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *);
/*
* VFS dentry helper functions.
-@@ -1179,6 +1204,11 @@ extern void dentry_unhash(struct dentry
+@@ -1177,6 +1202,11 @@
+ * VFS file helper functions.
+ */
extern int file_permission(struct file *, int);
-
- /*
++
++/*
+ * VFS path helper functions.
+ */
+extern int path_permission(struct path *, int);
-+
-+/*
+
+ /*
* File types
- *
- * NOTE! These match bits 12..15 of stat.st_mode
-@@ -1259,7 +1289,10 @@ struct file_operations {
+@@ -1259,7 +1289,10 @@
int (*flock) (struct file *, int, struct file_lock *);
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
};
struct inode_operations {
-@@ -1278,6 +1311,8 @@ struct inode_operations {
+@@ -1278,6 +1311,8 @@
void (*put_link) (struct dentry *, struct nameidata *, void *);
void (*truncate) (struct inode *);
int (*permission) (struct inode *, int);
int (*setattr) (struct dentry *, struct iattr *);
int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
-@@ -1321,6 +1356,8 @@ struct super_operations {
+@@ -1321,6 +1356,8 @@
void (*clear_inode) (struct inode *);
void (*umount_begin) (struct super_block *);
int (*show_options)(struct seq_file *, struct vfsmount *);
int (*show_stats)(struct seq_file *, struct vfsmount *);
#ifdef CONFIG_QUOTA
-@@ -1612,8 +1649,8 @@ static inline int break_lease(struct ino
+@@ -1612,8 +1649,8 @@
/* fs/open.c */
extern long do_sys_open(int dfd, const char __user *filename, int flags,
int mode);
extern struct file *filp_open(const char *, int, int);
-@@ -1718,6 +1755,9 @@ extern int fs_may_remount_ro(struct supe
+@@ -1718,6 +1755,9 @@
*/
#define bio_data_dir(bio) ((bio)->bi_rw & 1)
extern int check_disk_change(struct block_device *);
extern int __invalidate_device(struct block_device *);
extern int invalidate_partition(struct gendisk *, int);
-@@ -1771,7 +1811,8 @@ extern int do_remount_sb(struct super_bl
+@@ -1771,7 +1811,8 @@
#ifdef CONFIG_BLOCK
extern sector_t bmap(struct inode *, sector_t);
#endif
extern int inode_permission(struct inode *, int);
extern int generic_permission(struct inode *, int,
int (*check_acl)(struct inode *, int));
-@@ -1959,7 +2000,7 @@ extern int page_readlink(struct dentry *
+@@ -1959,7 +2000,7 @@
extern void *page_follow_link_light(struct dentry *, struct nameidata *);
extern void page_put_link(struct dentry *, struct nameidata *, void *);
extern int __page_symlink(struct inode *inode, const char *symname, int len,
extern int page_symlink(struct inode *inode, const char *symname, int len);
extern const struct inode_operations page_symlink_inode_operations;
extern int generic_readlink(struct dentry *, char __user *, int);
-diff -purN linux-2.6.27/include/linux/genhd.h linux-2.6.27.19-5.1/include/linux/genhd.h
---- linux-2.6.27/include/linux/genhd.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/genhd.h 2009-03-25 16:11:49.000000000 +0000
-@@ -109,6 +109,7 @@ struct hd_struct {
+diff -r 9608d5473017 include/linux/genhd.h
+--- a/include/linux/genhd.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/genhd.h Wed May 06 16:56:56 2009 +0100
+@@ -109,6 +109,7 @@
#define GENHD_FL_UP 16
#define GENHD_FL_SUPPRESS_PARTITION_INFO 32
#define GENHD_FL_FAIL 64
struct gendisk {
int major; /* major number of driver */
-diff -purN linux-2.6.27/include/linux/gfp.h linux-2.6.27.19-5.1/include/linux/gfp.h
---- linux-2.6.27/include/linux/gfp.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/gfp.h 2009-03-25 16:11:49.000000000 +0000
-@@ -43,6 +43,7 @@ struct vm_area_struct;
+diff -r 9608d5473017 include/linux/gfp.h
+--- a/include/linux/gfp.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/gfp.h Wed May 06 16:56:56 2009 +0100
+@@ -43,6 +43,7 @@
#define __GFP_REPEAT ((__force gfp_t)0x400u) /* See above */
#define __GFP_NOFAIL ((__force gfp_t)0x800u) /* See above */
#define __GFP_NORETRY ((__force gfp_t)0x1000u)/* See above */
#define __GFP_COMP ((__force gfp_t)0x4000u)/* Add compound page metadata */
#define __GFP_ZERO ((__force gfp_t)0x8000u)/* Return zeroed page on success */
#define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u) /* Don't use emergency reserves */
-@@ -88,7 +89,7 @@ struct vm_area_struct;
+@@ -88,7 +89,7 @@
/* Control page allocator reclaim behavior */
#define GFP_RECLAIM_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|\
__GFP_NOWARN|__GFP_REPEAT|__GFP_NOFAIL|\
/* Control allocation constraints */
#define GFP_CONSTRAINT_MASK (__GFP_HARDWALL|__GFP_THISNODE)
-diff -purN linux-2.6.27/include/linux/hid.h linux-2.6.27.19-5.1/include/linux/hid.h
---- linux-2.6.27/include/linux/hid.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/hid.h 2009-03-25 16:11:49.000000000 +0000
-@@ -298,6 +298,7 @@ struct hid_item {
+diff -r 9608d5473017 include/linux/hid.h
+--- a/include/linux/hid.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/hid.h Wed May 06 16:56:56 2009 +0100
+@@ -298,6 +298,7 @@
#define HID_QUIRK_RDESC_SAMSUNG_REMOTE 0x00000040
#define HID_QUIRK_RDESC_MICROSOFT_RECV_1028 0x00000080
#define HID_QUIRK_RDESC_SUNPLUS_WDESKTOP 0x00000100
/*
* This is the global environment of the parser. This information is
-diff -purN linux-2.6.27/include/linux/highmem.h linux-2.6.27.19-5.1/include/linux/highmem.h
---- linux-2.6.27/include/linux/highmem.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/highmem.h 2009-03-25 16:11:50.000000000 +0000
-@@ -62,6 +62,7 @@ static inline void *kmap_atomic(struct p
+diff -r 9608d5473017 include/linux/highmem.h
+--- a/include/linux/highmem.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/highmem.h Wed May 06 16:56:56 2009 +0100
+@@ -62,6 +62,7 @@
#endif /* CONFIG_HIGHMEM */
/* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
static inline void clear_user_highpage(struct page *page, unsigned long vaddr)
{
-@@ -69,6 +70,7 @@ static inline void clear_user_highpage(s
+@@ -69,6 +70,7 @@
clear_user_page(addr, vaddr, page);
kunmap_atomic(addr, KM_USER0);
}
#ifndef __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
/**
-@@ -115,12 +117,14 @@ alloc_zeroed_user_highpage_movable(struc
+@@ -115,12 +117,14 @@
return __alloc_zeroed_user_highpage(__GFP_MOVABLE, vma, vaddr);
}
static inline void zero_user_segments(struct page *page,
unsigned start1, unsigned end1,
-@@ -174,6 +178,8 @@ static inline void copy_user_highpage(st
+@@ -174,6 +178,8 @@
#endif
static inline void copy_highpage(struct page *to, struct page *from)
{
char *vfrom, *vto;
-@@ -185,4 +191,6 @@ static inline void copy_highpage(struct
+@@ -185,4 +191,6 @@
kunmap_atomic(vto, KM_USER1);
}
+#endif
+
#endif /* _LINUX_HIGHMEM_H */
-diff -purN linux-2.6.27/include/linux/idr.h linux-2.6.27.19-5.1/include/linux/idr.h
---- linux-2.6.27/include/linux/idr.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/idr.h 2009-03-25 16:11:50.000000000 +0000
-@@ -52,13 +52,14 @@ struct idr_layer {
+diff -r 9608d5473017 include/linux/idr.h
+--- a/include/linux/idr.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/idr.h Wed May 06 16:56:56 2009 +0100
+@@ -52,13 +52,14 @@
unsigned long bitmap; /* A zero bit means "space here" */
struct idr_layer *ary[1<<IDR_BITS];
int count; /* When zero, we can release it */
int id_free_cnt;
spinlock_t lock;
};
-diff -purN linux-2.6.27/include/linux/if_vlan.h linux-2.6.27.19-5.1/include/linux/if_vlan.h
---- linux-2.6.27/include/linux/if_vlan.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/if_vlan.h 2009-03-25 16:11:49.000000000 +0000
-@@ -114,6 +114,8 @@ extern u16 vlan_dev_vlan_id(const struct
+diff -r 9608d5473017 include/linux/if_vlan.h
+--- a/include/linux/if_vlan.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/if_vlan.h Wed May 06 16:56:56 2009 +0100
+@@ -114,6 +114,8 @@
extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
u16 vlan_tci, int polling);
#else
static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev)
{
-@@ -133,6 +135,11 @@ static inline int __vlan_hwaccel_rx(stru
+@@ -132,6 +134,11 @@
+ {
BUG();
return NET_XMIT_SUCCESS;
- }
++}
+
+static inline int vlan_hwaccel_do_receive(struct sk_buff *skb)
+{
+ return 0;
-+}
+ }
#endif
- /**
-diff -purN linux-2.6.27/include/linux/inotify.h linux-2.6.27.19-5.1/include/linux/inotify.h
---- linux-2.6.27/include/linux/inotify.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/inotify.h 2009-03-25 16:11:50.000000000 +0000
-@@ -134,6 +134,8 @@ extern void inotify_remove_watch_locked(
+diff -r 9608d5473017 include/linux/inotify.h
+--- a/include/linux/inotify.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/inotify.h Wed May 06 16:56:56 2009 +0100
+@@ -134,6 +134,8 @@
struct inotify_watch *);
extern void get_inotify_watch(struct inotify_watch *);
extern void put_inotify_watch(struct inotify_watch *);
#else
-@@ -228,6 +230,15 @@ static inline void put_inotify_watch(str
+@@ -228,6 +230,15 @@
{
}
#endif /* CONFIG_INOTIFY */
#endif /* __KERNEL __ */
-diff -purN linux-2.6.27/include/linux/interrupt.h linux-2.6.27.19-5.1/include/linux/interrupt.h
---- linux-2.6.27/include/linux/interrupt.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/interrupt.h 2009-03-25 16:11:49.000000000 +0000
-@@ -218,6 +218,12 @@ static inline int disable_irq_wake(unsig
+diff -r 9608d5473017 include/linux/interrupt.h
+--- a/include/linux/interrupt.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/interrupt.h Wed May 06 16:56:56 2009 +0100
+@@ -218,6 +218,12 @@
}
#endif /* CONFIG_GENERIC_HARDIRQS */
#ifndef __ARCH_SET_SOFTIRQ_PENDING
#define set_softirq_pending(x) (local_softirq_pending() = (x))
#define or_softirq_pending(x) (local_softirq_pending() |= (x))
-diff -purN linux-2.6.27/include/linux/irq.h linux-2.6.27.19-5.1/include/linux/irq.h
---- linux-2.6.27/include/linux/irq.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/irq.h 2009-03-25 16:11:49.000000000 +0000
-@@ -62,6 +62,8 @@ typedef void (*irq_flow_handler_t)(unsig
+diff -r 9608d5473017 include/linux/irq.h
+--- a/include/linux/irq.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/irq.h Wed May 06 16:56:56 2009 +0100
+@@ -62,6 +62,8 @@
#define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */
#define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */
#define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */
#ifdef CONFIG_IRQ_PER_CPU
# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
-@@ -294,7 +296,7 @@ static inline void generic_handle_irq(un
+@@ -294,7 +296,7 @@
/* Handling of unhandled and spurious interrupts: */
extern void note_interrupt(unsigned int irq, struct irq_desc *desc,
/* Resending of interrupts :*/
void check_irq_resend(struct irq_desc *desc, unsigned int irq);
-diff -purN linux-2.6.27/include/linux/jbd.h linux-2.6.27.19-5.1/include/linux/jbd.h
---- linux-2.6.27/include/linux/jbd.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/jbd.h 2009-03-25 16:11:50.000000000 +0000
-@@ -908,7 +908,7 @@ extern int journal_set_features
+diff -r 9608d5473017 include/linux/jbd.h
+--- a/include/linux/jbd.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/jbd.h Wed May 06 16:56:56 2009 +0100
+@@ -908,7 +908,7 @@
(journal_t *, unsigned long, unsigned long, unsigned long);
extern int journal_create (journal_t *);
extern int journal_load (journal_t *journal);
extern int journal_recover (journal_t *journal);
extern int journal_wipe (journal_t *, int);
extern int journal_skip_recovery (journal_t *);
-diff -purN linux-2.6.27/include/linux/jbd2.h linux-2.6.27.19-5.1/include/linux/jbd2.h
---- linux-2.6.27/include/linux/jbd2.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/jbd2.h 2009-03-25 16:11:50.000000000 +0000
-@@ -850,7 +850,8 @@ struct journal_s
+diff -r 9608d5473017 include/linux/jbd2.h
+--- a/include/linux/jbd2.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/jbd2.h Wed May 06 16:56:56 2009 +0100
+@@ -850,7 +850,8 @@
*/
struct block_device *j_dev;
int j_blocksize;
/*
* Device which holds the client fs. For internal journal this will be
-diff -purN linux-2.6.27/include/linux/kdb.h linux-2.6.27.19-5.1/include/linux/kdb.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/kdb.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/kdb.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/kdb.h Wed May 06 16:56:56 2009 +0100
@@ -0,0 +1,175 @@
+#ifndef _KDB_H
+#define _KDB_H
+#endif /* CONFIG_KDB_KDUMP */
+
+#endif /* !_KDB_H */
-diff -purN linux-2.6.27/include/linux/kdbprivate.h linux-2.6.27.19-5.1/include/linux/kdbprivate.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/kdbprivate.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/kdbprivate.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/kdbprivate.h Wed May 06 16:56:56 2009 +0100
@@ -0,0 +1,503 @@
+#ifndef _KDBPRIVATE_H
+#define _KDBPRIVATE_H
+#endif /* CONFIG_KDB_KDUMP */
+
+#endif /* !_KDBPRIVATE_H */
-diff -purN linux-2.6.27/include/linux/kernel.h linux-2.6.27.19-5.1/include/linux/kernel.h
---- linux-2.6.27/include/linux/kernel.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/kernel.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/kernel.h
+--- a/include/linux/kernel.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/kernel.h Wed May 06 16:56:57 2009 +0100
@@ -16,6 +16,7 @@
#include <linux/log2.h>
#include <linux/typecheck.h>
#include <asm/byteorder.h>
#include <asm/bug.h>
-@@ -235,7 +236,9 @@ extern int oops_in_progress; /* If set,
+@@ -235,7 +236,9 @@
extern int panic_timeout;
extern int panic_on_oops;
extern int panic_on_unrecovered_nmi;
extern const char *print_tainted(void);
extern void add_taint(unsigned);
extern int root_mountflags;
-@@ -260,6 +263,14 @@ extern enum system_states {
+@@ -260,6 +263,14 @@
#define TAINT_DIE (1<<7)
#define TAINT_OVERRIDDEN_ACPI_TABLE (1<<8)
#define TAINT_WARN (1<<9)
extern void dump_stack(void) __cold;
-@@ -288,28 +299,52 @@ static inline char *pack_hex_byte(char *
+@@ -288,28 +299,52 @@
return buf;
}
#endif
/*
-diff -purN linux-2.6.27/include/linux/kexec.h linux-2.6.27.19-5.1/include/linux/kexec.h
---- linux-2.6.27/include/linux/kexec.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/kexec.h 2009-03-25 16:11:48.000000000 +0000
-@@ -46,6 +46,13 @@
+diff -r 9608d5473017 include/linux/kexec.h
+--- a/include/linux/kexec.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/kexec.h Wed May 06 16:56:57 2009 +0100
+@@ -45,6 +45,13 @@
+ #define KEXEC_NOTE_BYTES ( (KEXEC_NOTE_HEAD_BYTES * 2) + \
KEXEC_CORE_NOTE_NAME_BYTES + \
KEXEC_CORE_NOTE_DESC_BYTES )
-
++
+#ifndef KEXEC_ARCH_HAS_PAGE_MACROS
+#define kexec_page_to_pfn(page) page_to_pfn(page)
+#define kexec_pfn_to_page(pfn) pfn_to_page(pfn)
+#define kexec_virt_to_phys(addr) virt_to_phys(addr)
+#define kexec_phys_to_virt(addr) phys_to_virt(addr)
+#endif
-+
+
/*
* This structure is used to hold the arguments that are used when loading
- * kernel binaries.
-@@ -108,6 +115,12 @@ struct kimage {
+@@ -108,6 +115,12 @@
extern void machine_kexec(struct kimage *image);
extern int machine_kexec_prepare(struct kimage *image);
extern void machine_kexec_cleanup(struct kimage *image);
extern asmlinkage long sys_kexec_load(unsigned long entry,
unsigned long nr_segments,
struct kexec_segment __user *segments,
-@@ -154,6 +167,7 @@ unsigned long paddr_vmcoreinfo_note(void
+@@ -154,6 +167,7 @@
extern struct kimage *kexec_image;
extern struct kimage *kexec_crash_image;
#ifndef kexec_flush_icache_page
#define kexec_flush_icache_page(page)
-@@ -208,5 +222,6 @@ struct pt_regs;
+@@ -208,5 +222,6 @@
struct task_struct;
static inline void crash_kexec(struct pt_regs *regs) { }
static inline int kexec_should_crash(struct task_struct *p) { return 0; }
+#define dump_after_notifier 0
#endif /* CONFIG_KEXEC */
#endif /* LINUX_KEXEC_H */
-diff -purN linux-2.6.27/include/linux/libata.h linux-2.6.27.19-5.1/include/linux/libata.h
---- linux-2.6.27/include/linux/libata.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/libata.h 2009-03-25 16:11:49.000000000 +0000
-@@ -186,6 +186,8 @@ enum {
+diff -r 9608d5473017 include/linux/libata.h
+--- a/include/linux/libata.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/libata.h Wed May 06 16:56:57 2009 +0100
+@@ -186,6 +186,8 @@
ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD
* doesn't handle PIO interrupts */
ATA_FLAG_NCQ = (1 << 10), /* host supports NCQ */
ATA_FLAG_DEBUGMSG = (1 << 13),
ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */
ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */
-@@ -250,7 +252,7 @@ enum {
+@@ -250,7 +252,7 @@
* HHD424020F7SV00. Increase to 2secs when parallel probing
* is in place.
*/
/* Spec mandates to wait for ">= 2ms" before checking status
* after reset. We wait 150ms, because that was the magic
-@@ -321,6 +323,8 @@ enum {
+@@ -321,6 +323,8 @@
ATA_EH_LPM = (1 << 4), /* link power management action */
ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE,
/* ata_eh_info->flags */
ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */
-@@ -335,6 +339,9 @@ enum {
+@@ -334,6 +338,9 @@
+ ATA_EHI_POST_SETMODE = (1 << 20), /* revaildating after setmode */
ATA_EHI_DID_RESET = ATA_EHI_DID_SOFTRESET | ATA_EHI_DID_HARDRESET,
-
++
+ /* mask of flags to transfer *to* the slave link */
+ ATA_EHI_TO_SLAVE_MASK = ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET,
-+
+
/* max tries if error condition is still set after ->error_handler */
ATA_EH_MAX_TRIES = 5,
-
-@@ -364,6 +371,10 @@ enum {
+@@ -364,6 +371,10 @@
ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */
ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */
ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */
/* DMA mask for user DMA control: User visible values; DO NOT
renumber */
-@@ -688,7 +699,8 @@ struct ata_port {
+@@ -688,7 +699,8 @@
unsigned int qc_active;
int nr_active_links; /* #links with active qcs */
int nr_pmp_links; /* nr of available PMP links */
struct ata_link *pmp_link; /* array of PMP links */
-@@ -772,8 +784,8 @@ struct ata_port_operations {
+@@ -772,8 +784,8 @@
/*
* Optional features
*/
void (*pmp_attach)(struct ata_port *ap);
void (*pmp_detach)(struct ata_port *ap);
int (*enable_pm)(struct ata_port *ap, enum link_pm policy);
-@@ -895,6 +907,7 @@ extern void ata_port_disable(struct ata_
+@@ -895,6 +907,7 @@
extern struct ata_host *ata_host_alloc(struct device *dev, int max_ports);
extern struct ata_host *ata_host_alloc_pinfo(struct device *dev,
const struct ata_port_info * const * ppi, int n_ports);
extern int ata_host_start(struct ata_host *host);
extern int ata_host_register(struct ata_host *host,
struct scsi_host_template *sht);
-@@ -920,8 +933,8 @@ extern int sata_scr_valid(struct ata_lin
+@@ -920,8 +933,8 @@
extern int sata_scr_read(struct ata_link *link, int reg, u32 *val);
extern int sata_scr_write(struct ata_link *link, int reg, u32 val);
extern int sata_scr_write_flush(struct ata_link *link, int reg, u32 val);
#ifdef CONFIG_PM
extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg);
extern void ata_host_resume(struct ata_host *host);
-@@ -1134,7 +1147,7 @@ static inline bool sata_pmp_attached(str
+@@ -1134,7 +1147,7 @@
static inline int ata_is_host_link(const struct ata_link *link)
{
}
#else /* CONFIG_SATA_PMP */
static inline bool sata_pmp_supported(struct ata_port *ap)
-@@ -1167,7 +1180,7 @@ static inline int sata_srst_pmp(struct a
+@@ -1167,7 +1180,7 @@
printk("%sata%u: "fmt, lv, (ap)->print_id , ##args)
#define ata_link_printk(link, lv, fmt, args...) do { \
printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id, \
(link)->pmp , ##args); \
else \
-@@ -1265,34 +1278,17 @@ static inline int ata_link_active(struct
+@@ -1265,34 +1278,17 @@
return ata_tag_valid(link->active_tag) || link->sactive;
}
- return ap->pmp_link;
- return &ap->link;
-}
--
++extern struct ata_link *__ata_port_next_link(struct ata_port *ap,
++ struct ata_link *link,
++ bool dev_only);
+
-static inline struct ata_link *ata_port_next_link(struct ata_link *link)
-{
- struct ata_port *ap = link->ap;
-
-#define __ata_port_for_each_link(lk, ap) \
- for ((lk) = &(ap)->link; (lk); (lk) = ata_port_next_link(lk))
-+extern struct ata_link *__ata_port_next_link(struct ata_port *ap,
-+ struct ata_link *link,
-+ bool dev_only);
-+
+#define __ata_port_for_each_link(link, ap) \
+ for ((link) = __ata_port_next_link((ap), NULL, false); (link); \
+ (link) = __ata_port_next_link((ap), (link), false))
#define ata_link_for_each_dev(dev, link) \
for ((dev) = (link)->device; \
-diff -purN linux-2.6.27/include/linux/mm.h linux-2.6.27.19-5.1/include/linux/mm.h
---- linux-2.6.27/include/linux/mm.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/mm.h 2009-03-25 16:11:48.000000000 +0000
-@@ -113,6 +113,9 @@ extern unsigned int kobjsize(const void
+diff -r 9608d5473017 include/linux/mm.h
+--- a/include/linux/mm.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/mm.h Wed May 06 16:56:57 2009 +0100
+@@ -113,6 +113,9 @@
#define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */
#define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */
#define VM_SAO 0x20000000 /* Strong Access Ordering (powerpc) */
#ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */
#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
-@@ -171,6 +174,9 @@ struct vm_operations_struct {
+@@ -171,6 +174,9 @@
void (*close)(struct vm_area_struct * area);
int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf);
/* notification that a previously read-only page is about to become
* writable, if an error is returned it will cause a SIGBUS */
int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page);
-@@ -180,6 +186,13 @@ struct vm_operations_struct {
+@@ -180,6 +186,13 @@
*/
int (*access)(struct vm_area_struct *vma, unsigned long addr,
void *buf, int len, int write);
#ifdef CONFIG_NUMA
/*
* set_policy() op must add a reference to any non-NULL @new mempolicy
-@@ -253,7 +266,6 @@ static inline int put_page_testzero(stru
+@@ -253,7 +266,6 @@
*/
static inline int get_page_unless_zero(struct page *page)
{
return atomic_inc_not_zero(&page->_count);
}
-@@ -643,6 +655,17 @@ static inline struct address_space *page
+@@ -643,6 +655,17 @@
return mapping;
}
static inline int PageAnon(struct page *page)
{
return ((unsigned long)page->mapping & PAGE_MAPPING_ANON) != 0;
-@@ -659,6 +682,20 @@ static inline pgoff_t page_index(struct
- return page->index;
- }
-
+@@ -656,6 +679,20 @@
+ {
+ if (unlikely(PageSwapCache(page)))
+ return page_private(page);
++ return page->index;
++}
++
+extern pgoff_t __page_file_index(struct page *page);
+
+/*
+ if (unlikely(PageSwapCache(page)))
+ return __page_file_index(page);
+
-+ return page->index;
-+}
-+
- /*
- * The atomic page->_mapcount, like _count, starts from -1:
- * so that transitions both from it and to it can be tracked,
-@@ -779,6 +816,8 @@ void free_pgd_range(struct mmu_gather *t
+ return page->index;
+ }
+
+@@ -779,6 +816,8 @@
unsigned long end, unsigned long floor, unsigned long ceiling);
int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
struct vm_area_struct *vma);
void unmap_mapping_range(struct address_space *mapping,
loff_t const holebegin, loff_t const holelen, int even_cows);
int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
-@@ -1169,6 +1208,7 @@ void page_cache_async_readahead(struct a
+@@ -1169,6 +1208,7 @@
unsigned long max_sane_readahead(unsigned long nr);
/* Do stack extension */
extern int expand_stack(struct vm_area_struct *vma, unsigned long address);
#ifdef CONFIG_IA64
extern int expand_upwards(struct vm_area_struct *vma, unsigned long address);
-diff -purN linux-2.6.27/include/linux/mm_types.h linux-2.6.27.19-5.1/include/linux/mm_types.h
---- linux-2.6.27/include/linux/mm_types.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/mm_types.h 2009-03-25 16:11:49.000000000 +0000
-@@ -74,6 +74,8 @@ struct page {
+diff -r 9608d5473017 include/linux/mm_types.h
+--- a/include/linux/mm_types.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/mm_types.h Wed May 06 16:56:57 2009 +0100
+@@ -74,6 +74,8 @@
union {
pgoff_t index; /* Our offset within mapping. */
void *freelist; /* SLUB: freelist req. slab lock */
};
struct list_head lru; /* Pageout list, eg. active_list
* protected by zone->lru_lock !
-diff -purN linux-2.6.27/include/linux/mmzone.h linux-2.6.27.19-5.1/include/linux/mmzone.h
---- linux-2.6.27/include/linux/mmzone.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/mmzone.h 2009-03-25 16:11:49.000000000 +0000
-@@ -206,7 +206,10 @@ enum zone_type {
+diff -r 9608d5473017 include/linux/mmzone.h
+--- a/include/linux/mmzone.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/mmzone.h Wed May 06 16:56:57 2009 +0100
+@@ -206,7 +206,10 @@
struct zone {
/* Fields commonly accessed by the page allocator */
/*
* We don't know if the memory that we're going to allocate will be freeable
* or/and it will be released eventually, so to avoid totally wasting several
-@@ -674,6 +677,7 @@ int sysctl_min_unmapped_ratio_sysctl_han
+@@ -674,6 +677,7 @@
struct file *, void __user *, size_t *, loff_t *);
int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,
struct file *, void __user *, size_t *, loff_t *);
extern int numa_zonelist_order_handler(struct ctl_table *, int,
struct file *, void __user *, size_t *, loff_t *);
-diff -purN linux-2.6.27/include/linux/module.h linux-2.6.27.19-5.1/include/linux/module.h
---- linux-2.6.27/include/linux/module.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/module.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/module.h
+--- a/include/linux/module.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/module.h Wed May 06 16:56:57 2009 +0100
@@ -16,6 +16,7 @@
#include <linux/kobject.h>
#include <linux/moduleparam.h>
#include <asm/local.h>
#include <asm/module.h>
-@@ -332,6 +333,11 @@ struct module
+@@ -332,6 +333,11 @@
unsigned int num_markers;
#endif
#ifdef CONFIG_MODULE_UNLOAD
/* What modules depend on me? */
struct list_head modules_which_use_me;
-@@ -343,9 +349,8 @@ struct module
+@@ -343,9 +349,8 @@
void (*exit)(void);
/* Reference counts */
};
#ifndef MODULE_ARCH_INIT
#define MODULE_ARCH_INIT {}
-@@ -363,6 +368,7 @@ static inline int module_is_live(struct
+@@ -363,6 +368,7 @@
struct module *module_text_address(unsigned long addr);
struct module *__module_text_address(unsigned long addr);
int is_module_address(unsigned long addr);
/* Returns 0 and fills in value, defined and namebuf, or -ERANGE if
symnum out of range. */
-@@ -387,7 +393,6 @@ void symbol_put_addr(void *addr);
+@@ -387,7 +393,6 @@
static inline void __module_get(struct module *module)
{
if (module) {
local_inc(&module->ref[get_cpu()].count);
put_cpu();
}
-@@ -454,6 +459,9 @@ extern void print_modules(void);
+@@ -453,6 +458,9 @@
+ extern void print_modules(void);
extern void module_update_markers(void);
-
++
+extern void module_update_tracepoints(void);
+extern int module_get_iter_tracepoints(struct tracepoint_iter *iter);
-+
+
#else /* !CONFIG_MODULES... */
#define EXPORT_SYMBOL(sym)
- #define EXPORT_SYMBOL_GPL(sym)
-@@ -558,6 +566,15 @@ static inline void module_update_markers
+@@ -558,6 +566,15 @@
{
}
#endif /* CONFIG_MODULES */
struct device_driver;
-diff -purN linux-2.6.27/include/linux/mount.h linux-2.6.27.19-5.1/include/linux/mount.h
---- linux-2.6.27/include/linux/mount.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/mount.h 2009-03-25 16:11:48.000000000 +0000
-@@ -32,6 +32,7 @@ struct mnt_namespace;
+diff -r 9608d5473017 include/linux/mount.h
+--- a/include/linux/mount.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/mount.h Wed May 06 16:56:57 2009 +0100
+@@ -32,6 +32,7 @@
#define MNT_SHRINKABLE 0x100
#define MNT_IMBALANCED_WRITE_COUNT 0x200 /* just for debugging */
#define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */
#define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */
-@@ -66,13 +67,30 @@ struct vfsmount {
+@@ -66,12 +67,29 @@
int mnt_expiry_mark; /* true if marked for expiry */
int mnt_pinned;
int mnt_ghosts;
+#endif
+#endif
};
-
++
+static inline int *get_mnt_writers_ptr(struct vfsmount *mnt)
+{
+#ifdef CONFIG_SMP
+ return &mnt->mnt_writers;
+#endif
+}
-+
+
static inline struct vfsmount *mntget(struct vfsmount *mnt)
{
- if (mnt)
-@@ -81,6 +99,8 @@ static inline struct vfsmount *mntget(st
+@@ -81,6 +99,8 @@
}
extern int mnt_want_write(struct vfsmount *mnt);
extern void mnt_drop_write(struct vfsmount *mnt);
extern void mntput_no_expire(struct vfsmount *mnt);
extern void mnt_pin(struct vfsmount *mnt);
-@@ -114,4 +134,6 @@ extern void mark_mounts_for_expiry(struc
+@@ -114,4 +134,6 @@
extern spinlock_t vfsmount_lock;
extern dev_t name_to_dev_t(char *name);
+extern char *d_namespace_path(struct dentry *, struct vfsmount *, char *, int);
+
#endif /* _LINUX_MOUNT_H */
-diff -purN linux-2.6.27/include/linux/msg.h linux-2.6.27.19-5.1/include/linux/msg.h
---- linux-2.6.27/include/linux/msg.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/msg.h 2009-03-25 16:11:49.000000000 +0000
-@@ -60,8 +60,8 @@ struct msginfo {
+diff -r 9608d5473017 include/linux/msg.h
+--- a/include/linux/msg.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/msg.h Wed May 06 16:56:57 2009 +0100
+@@ -60,8 +60,8 @@
#define MSG_MEM_SCALE 32
#define MSGMNI 16 /* <= IPCMNI */ /* max # of msg queue identifiers */
/* unused */
#define MSGPOOL (MSGMNI * MSGMNB / 1024) /* size in kbytes of message pool */
-diff -purN linux-2.6.27/include/linux/mtd/blktrans.h linux-2.6.27.19-5.1/include/linux/mtd/blktrans.h
---- linux-2.6.27/include/linux/mtd/blktrans.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/mtd/blktrans.h 2009-03-25 16:11:49.000000000 +0000
-@@ -41,6 +41,8 @@ struct mtd_blktrans_ops {
+diff -r 9608d5473017 include/linux/mtd/blktrans.h
+--- a/include/linux/mtd/blktrans.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/mtd/blktrans.h Wed May 06 16:56:57 2009 +0100
+@@ -41,6 +41,8 @@
unsigned long block, char *buffer);
int (*writesect)(struct mtd_blktrans_dev *dev,
unsigned long block, char *buffer);
/* Block layer ioctls */
int (*getgeo)(struct mtd_blktrans_dev *dev, struct hd_geometry *geo);
-diff -purN linux-2.6.27/include/linux/mtd/cfi.h linux-2.6.27.19-5.1/include/linux/mtd/cfi.h
---- linux-2.6.27/include/linux/mtd/cfi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/mtd/cfi.h 2009-03-25 16:11:49.000000000 +0000
-@@ -281,9 +281,25 @@ struct cfi_private {
+diff -r 9608d5473017 include/linux/mtd/cfi.h
+--- a/include/linux/mtd/cfi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/mtd/cfi.h Wed May 06 16:56:57 2009 +0100
+@@ -281,9 +281,25 @@
/*
* Returns the command address according to the given geometry.
*/
}
/*
-@@ -429,7 +445,7 @@ static inline uint32_t cfi_send_gen_cmd(
+@@ -429,7 +445,7 @@
int type, map_word *prev_val)
{
map_word val;
val = cfi_build_cmd(cmd, map, cfi);
-diff -purN linux-2.6.27/include/linux/netdevice.h linux-2.6.27.19-5.1/include/linux/netdevice.h
---- linux-2.6.27/include/linux/netdevice.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/netdevice.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/netdevice.h
+--- a/include/linux/netdevice.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/netdevice.h Wed May 06 16:56:57 2009 +0100
@@ -42,6 +42,9 @@
#include <linux/workqueue.h>
struct vlan_group;
struct ethtool_ops;
-@@ -749,6 +752,11 @@ struct net_device
+@@ -749,6 +752,11 @@
/* for setting kernel sock attribute on TCP connection setup */
#define GSO_MAX_SIZE 65536
unsigned int gso_max_size;
};
#define to_net_dev(d) container_of(d, struct net_device, dev)
-diff -purN linux-2.6.27/include/linux/netfilter_ipv4/ipt_ipv4options.h linux-2.6.27.19-5.1/include/linux/netfilter_ipv4/ipt_ipv4options.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/netfilter_ipv4/ipt_ipv4options.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/netfilter_ipv4/ipt_ipv4options.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/netfilter_ipv4/ipt_ipv4options.h Wed May 06 16:56:57 2009 +0100
@@ -0,0 +1,21 @@
+#ifndef __ipt_ipv4options_h_included__
+#define __ipt_ipv4options_h_included__
+
+
+#endif /* __ipt_ipv4options_h_included__ */
-diff -purN linux-2.6.27/include/linux/nfs4acl.h linux-2.6.27.19-5.1/include/linux/nfs4acl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/nfs4acl.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/nfs4acl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/nfs4acl.h Wed May 06 16:56:57 2009 +0100
@@ -0,0 +1,225 @@
+#ifndef __NFS4ACL_H
+#define __NFS4ACL_H
+extern int nfs4acl_write_through(struct nfs4acl **acl);
+
+#endif /* __NFS4ACL_H */
-diff -purN linux-2.6.27/include/linux/nfs4acl_xattr.h linux-2.6.27.19-5.1/include/linux/nfs4acl_xattr.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/nfs4acl_xattr.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/nfs4acl_xattr.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/nfs4acl_xattr.h Wed May 06 16:56:57 2009 +0100
@@ -0,0 +1,32 @@
+#ifndef __NFS4ACL_XATTR_H
+#define __NFS4ACL_XATTR_H
+extern void nfs4acl_to_xattr(const struct nfs4acl *, void *);
+
+#endif /* __NFS4ACL_XATTR_H */
-diff -purN linux-2.6.27/include/linux/nfs_fs.h linux-2.6.27.19-5.1/include/linux/nfs_fs.h
---- linux-2.6.27/include/linux/nfs_fs.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/nfs_fs.h 2009-03-25 16:11:50.000000000 +0000
-@@ -372,8 +372,11 @@ static inline struct nfs_open_context *n
+diff -r 9608d5473017 include/linux/nfs_fs.h
+--- a/include/linux/nfs_fs.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/nfs_fs.h Wed May 06 16:56:57 2009 +0100
+@@ -372,8 +372,11 @@
static inline struct rpc_cred *nfs_file_cred(struct file *file)
{
return NULL;
}
-@@ -462,6 +465,8 @@ extern int nfs_flush_incompatible(struc
+@@ -462,6 +465,8 @@
extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int);
extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *);
extern void nfs_writedata_release(void *);
/*
* Try to write back everything synchronously (but check the
-diff -purN linux-2.6.27/include/linux/nfsd/nfsd.h linux-2.6.27.19-5.1/include/linux/nfsd/nfsd.h
---- linux-2.6.27/include/linux/nfsd/nfsd.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/nfsd/nfsd.h 2009-03-25 16:11:50.000000000 +0000
-@@ -85,7 +85,8 @@ __be32 nfsd_setattr(struct svc_rqst *,
+diff -r 9608d5473017 include/linux/nfsd/nfsd.h
+--- a/include/linux/nfsd/nfsd.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/nfsd/nfsd.h Wed May 06 16:56:57 2009 +0100
+@@ -85,7 +85,8 @@
#ifdef CONFIG_NFSD_V4
__be32 nfsd4_set_nfs4_acl(struct svc_rqst *, struct svc_fh *,
struct nfs4_acl *);
#endif /* CONFIG_NFSD_V4 */
__be32 nfsd_create(struct svc_rqst *, struct svc_fh *,
char *name, int len, struct iattr *attrs,
-diff -purN linux-2.6.27/include/linux/oprofile.h linux-2.6.27.19-5.1/include/linux/oprofile.h
---- linux-2.6.27/include/linux/oprofile.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/oprofile.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/oprofile.h
+--- a/include/linux/oprofile.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/oprofile.h Wed May 06 16:56:57 2009 +0100
@@ -16,6 +16,9 @@
#include <linux/types.h>
#include <linux/spinlock.h>
struct super_block;
struct dentry;
-@@ -47,6 +51,12 @@ struct oprofile_operations {
+@@ -47,6 +51,12 @@
/* create any necessary configuration files in the oprofile fs.
* Optional. */
int (*create_files)(struct super_block * sb, struct dentry * root);
/* Do any necessary interrupt setup. Optional. */
int (*setup)(void);
/* Do any necessary interrupt shutdown. Optional. */
-@@ -84,13 +94,6 @@ int oprofile_arch_init(struct oprofile_o
+@@ -84,13 +94,6 @@
void oprofile_arch_exit(void);
/**
* Add a sample. This may be called from any context. Pass
* smp_processor_id() as cpu.
*/
-@@ -113,6 +116,8 @@ void oprofile_add_pc(unsigned long pc, i
+@@ -113,6 +116,8 @@
/* add a backtrace entry, to be called from the ->backtrace callback */
void oprofile_add_trace(unsigned long eip);
/**
* Create a file of the given name as a child of the given root, with
-@@ -160,5 +165,14 @@ int oprofilefs_ulong_from_user(unsigned
+@@ -160,5 +165,14 @@
/** lock for read/write safety */
extern spinlock_t oprofilefs_lock;
+void oprofile_cpu_buffer_inc_smpl_lost(void);
#endif /* OPROFILE_H */
-diff -purN linux-2.6.27/include/linux/page-flags.h linux-2.6.27.19-5.1/include/linux/page-flags.h
---- linux-2.6.27/include/linux/page-flags.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/page-flags.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/page-flags.h
+--- a/include/linux/page-flags.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/page-flags.h Wed May 06 16:56:57 2009 +0100
@@ -71,6 +71,7 @@
*/
enum pageflags {
PG_error,
PG_referenced,
PG_uptodate,
-@@ -84,6 +85,7 @@ enum pageflags {
+@@ -84,6 +85,7 @@
PG_private, /* If pagecache, has fs-private data */
PG_writeback, /* Page is under writeback */
#ifdef CONFIG_PAGEFLAGS_EXTENDED
PG_head, /* A head page */
PG_tail, /* A tail page */
#else
-@@ -96,14 +98,23 @@ enum pageflags {
+@@ -96,14 +98,23 @@
#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR
PG_uncached, /* Page has been mapped as uncached */
#endif
/* SLOB */
PG_slob_page = PG_active,
-@@ -147,15 +158,21 @@ static inline int TestSetPage##uname(str
+@@ -147,15 +158,21 @@
static inline int TestClearPage##uname(struct page *page) \
{ return test_and_clear_bit(PG_##lname, &page->flags); }
{ return 0; }
#define TESTSCFLAG(uname, lname) \
-@@ -164,6 +181,7 @@ static inline int Page##uname(struct pag
+@@ -164,6 +181,7 @@
struct page; /* forward declaration */
TESTPAGEFLAG(Locked, locked)
PAGEFLAG(Error, error)
PAGEFLAG(Referenced, referenced) TESTCLEARFLAG(Referenced, referenced)
PAGEFLAG(Dirty, dirty) TESTSCFLAG(Dirty, dirty) __CLEARPAGEFLAG(Dirty, dirty)
-@@ -171,8 +189,12 @@ PAGEFLAG(LRU, lru) __CLEARPAGEFLAG(LRU,
+@@ -171,8 +189,12 @@
PAGEFLAG(Active, active) __CLEARPAGEFLAG(Active, active)
__PAGEFLAG(Slab, slab)
PAGEFLAG(Checked, checked) /* Used by some filesystems */
PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved)
PAGEFLAG(Private, private) __CLEARPAGEFLAG(Private, private)
__SETPAGEFLAG(Private, private)
-@@ -262,6 +284,26 @@ static inline void SetPageUptodate(struc
+@@ -262,6 +284,26 @@
CLEARPAGEFLAG(Uptodate, uptodate)
extern void cancel_dirty_page(struct page *page, unsigned int account_size);
int test_clear_page_writeback(struct page *page);
-@@ -326,9 +368,24 @@ static inline void __ClearPageTail(struc
+@@ -326,9 +368,24 @@
#endif /* !PAGEFLAGS_EXTENDED */
/*
* Flags checked in bad_page(). Pages on the free list should not have
-diff -purN linux-2.6.27/include/linux/pagemap.h linux-2.6.27.19-5.1/include/linux/pagemap.h
---- linux-2.6.27/include/linux/pagemap.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pagemap.h 2009-03-25 16:11:49.000000000 +0000
-@@ -161,7 +161,7 @@ static inline int page_cache_add_specula
+diff -r 9608d5473017 include/linux/pagemap.h
+--- a/include/linux/pagemap.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pagemap.h Wed May 06 16:56:57 2009 +0100
+@@ -161,7 +161,7 @@
if (unlikely(!atomic_add_unless(&page->_count, count, 0)))
return 0;
#endif
return 1;
}
-@@ -213,7 +213,8 @@ unsigned find_get_pages_contig(struct ad
+@@ -213,7 +213,8 @@
unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index,
int tag, unsigned int nr_pages, struct page **pages);
/*
* Returns locked page at given index in given cache, creating it if needed.
-@@ -258,6 +259,11 @@ static inline loff_t page_offset(struct
+@@ -256,6 +257,11 @@
+ static inline loff_t page_offset(struct page *page)
+ {
return ((loff_t)page->index) << PAGE_CACHE_SHIFT;
- }
-
++}
++
+static inline loff_t page_file_offset(struct page *page)
+{
+ return ((loff_t)page_file_index(page)) << PAGE_CACHE_SHIFT;
-+}
-+
+ }
+
static inline pgoff_t linear_page_index(struct vm_area_struct *vma,
- unsigned long address)
- {
-@@ -325,6 +331,7 @@ static inline void lock_page_nosync(stru
+@@ -325,6 +331,7 @@
* Never use this directly!
*/
extern void wait_on_page_bit(struct page *page, int bit_nr);
/*
* Wait for a page to be unlocked.
-@@ -335,8 +342,9 @@ extern void wait_on_page_bit(struct page
+@@ -335,8 +342,9 @@
*/
static inline void wait_on_page_locked(struct page *page)
{
}
/*
-@@ -344,6 +352,7 @@ static inline void wait_on_page_locked(s
+@@ -344,6 +352,7 @@
*/
static inline void wait_on_page_writeback(struct page *page)
{
if (PageWriteback(page))
wait_on_page_bit(page, PG_writeback);
}
-diff -purN linux-2.6.27/include/linux/parser.h linux-2.6.27.19-5.1/include/linux/parser.h
---- linux-2.6.27/include/linux/parser.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/parser.h 2009-03-25 16:11:48.000000000 +0000
-@@ -26,6 +26,7 @@ typedef struct {
+diff -r 9608d5473017 include/linux/parser.h
+--- a/include/linux/parser.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/parser.h Wed May 06 16:56:57 2009 +0100
+@@ -26,6 +26,7 @@
} substring_t;
int match_token(char *, match_table_t table, substring_t args[]);
int match_int(substring_t *, int *result);
int match_octal(substring_t *, int *result);
int match_hex(substring_t *, int *result);
-diff -purN linux-2.6.27/include/linux/pci-acpi.h linux-2.6.27.19-5.1/include/linux/pci-acpi.h
---- linux-2.6.27/include/linux/pci-acpi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pci-acpi.h 2009-03-25 16:11:49.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 include/linux/pci-acpi.h
+--- a/include/linux/pci-acpi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pci-acpi.h Wed May 06 16:56:57 2009 +0100
+@@ -7,6 +7,8 @@
+
#ifndef _PCI_ACPI_H_
#define _PCI_ACPI_H_
-
-+#include <linux/acpi.h>
+
++#include <linux/acpi.h>
+
#define OSC_QUERY_TYPE 0
#define OSC_SUPPORT_TYPE 1
- #define OSC_CONTROL_TYPE 2
@@ -48,15 +50,7 @@
#ifdef CONFIG_ACPI
static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
{
/* Find root host bridge */
-@@ -73,8 +67,6 @@ typedef u32 acpi_status;
+@@ -73,8 +67,6 @@
#endif
static inline acpi_status pci_osc_control_set(acpi_handle handle, u32 flags)
{return AE_ERROR;}
static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
{ return NULL; }
#endif
-diff -purN linux-2.6.27/include/linux/pci.h linux-2.6.27.19-5.1/include/linux/pci.h
---- linux-2.6.27/include/linux/pci.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pci.h 2009-03-25 16:11:49.000000000 +0000
-@@ -64,6 +64,11 @@ struct pci_slot {
+diff -r 9608d5473017 include/linux/pci.h
+--- a/include/linux/pci.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pci.h Wed May 06 16:56:57 2009 +0100
+@@ -64,6 +64,11 @@
struct kobject kobj;
};
/* File state for mmap()s on /proc/bus/pci/X/Y */
enum pci_mmap_state {
pci_mmap_io,
-@@ -128,6 +133,11 @@ enum pci_dev_flags {
+@@ -126,6 +131,11 @@
+ PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1,
+ /* Device configuration is irrevocably lost if disabled into D3 */
PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2,
- };
-
++};
++
+enum pci_irq_reroute_variant {
+ INTEL_IRQ_REROUTE_VARIANT = 1,
+ MAX_IRQ_REROUTE_VARIANTS = 3
-+};
-+
+ };
+
typedef unsigned short __bitwise pci_bus_flags_t;
- enum pci_bus_flags {
- PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1,
-@@ -201,6 +211,9 @@ struct pci_dev {
+@@ -201,6 +211,9 @@
* directly, use the values stored here. They might be different!
*/
unsigned int irq;
struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */
/* These fields are used by common fixups */
-@@ -212,6 +225,7 @@ struct pci_dev {
+@@ -212,6 +225,7 @@
unsigned int no_msi:1; /* device may not use msi */
unsigned int block_ucfg_access:1; /* userspace config space access is blocked */
unsigned int broken_parity_status:1; /* Device generates false positive parity */
unsigned int msi_enabled:1;
unsigned int msix_enabled:1;
unsigned int is_managed:1;
-@@ -225,7 +239,7 @@ struct pci_dev {
+@@ -225,7 +239,7 @@
int rom_attr_enabled; /* has display of the rom attribute been enabled? */
struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */
struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */
struct list_head msi_list;
#endif
struct pci_vpd *vpd;
-@@ -509,7 +523,8 @@ struct pci_bus *pci_create_bus(struct de
+@@ -509,7 +523,8 @@
struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev,
int busnr);
struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
void pci_destroy_slot(struct pci_slot *slot);
void pci_update_slot_number(struct pci_slot *slot, int slot_nr);
int pci_scan_slot(struct pci_bus *bus, int devfn);
-@@ -629,11 +644,14 @@ int pcie_set_readrq(struct pci_dev *dev,
+@@ -629,11 +644,14 @@
void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
int __must_check pci_assign_resource(struct pci_dev *dev, int i);
int pci_select_bars(struct pci_dev *dev, unsigned long flags);
/* Power management related routines */
int pci_save_state(struct pci_dev *dev);
-@@ -755,6 +773,16 @@ static inline void msi_remove_pci_irq_ve
+@@ -755,6 +773,16 @@
static inline void pci_restore_msi_state(struct pci_dev *dev)
{ }
#else
extern int pci_enable_msi(struct pci_dev *dev);
extern void pci_msi_shutdown(struct pci_dev *dev);
-@@ -765,6 +793,21 @@ extern void pci_msix_shutdown(struct pci
+@@ -765,6 +793,21 @@
extern void pci_disable_msix(struct pci_dev *dev);
extern void msi_remove_pci_irq_vectors(struct pci_dev *dev);
extern void pci_restore_msi_state(struct pci_dev *dev);
#endif
#ifdef CONFIG_HT_IRQ
-@@ -1116,5 +1159,7 @@ static inline void pci_mmcfg_early_init(
+@@ -1116,5 +1159,7 @@
static inline void pci_mmcfg_late_init(void) { }
#endif
+
#endif /* __KERNEL__ */
#endif /* LINUX_PCI_H */
-diff -purN linux-2.6.27/include/linux/pci_hotplug.h linux-2.6.27.19-5.1/include/linux/pci_hotplug.h
---- linux-2.6.27/include/linux/pci_hotplug.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pci_hotplug.h 2009-03-25 16:11:49.000000000 +0000
-@@ -142,8 +142,6 @@ struct hotplug_slot_info {
+diff -r 9608d5473017 include/linux/pci_hotplug.h
+--- a/include/linux/pci_hotplug.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pci_hotplug.h Wed May 06 16:56:57 2009 +0100
+@@ -142,8 +142,6 @@
/**
* struct hotplug_slot - used to register a physical slot with the hotplug pci core
* @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
* this slot.
-@@ -153,7 +151,6 @@ struct hotplug_slot_info {
+@@ -153,7 +151,6 @@
* needs.
*/
struct hotplug_slot {
struct hotplug_slot_ops *ops;
struct hotplug_slot_info *info;
void (*release) (struct hotplug_slot *slot);
-@@ -165,7 +162,13 @@ struct hotplug_slot {
+@@ -165,7 +162,13 @@
};
#define to_hotplug_slot(n) container_of(n, struct hotplug_slot, kobj)
extern int pci_hp_deregister(struct hotplug_slot *slot);
extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot,
struct hotplug_slot_info *info);
-diff -purN linux-2.6.27/include/linux/pci_ids.h linux-2.6.27.19-5.1/include/linux/pci_ids.h
---- linux-2.6.27/include/linux/pci_ids.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pci_ids.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/pci_ids.h
+--- a/include/linux/pci_ids.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pci_ids.h Wed May 06 16:56:57 2009 +0100
@@ -1301,6 +1301,7 @@
#define PCI_DEVICE_ID_VIA_VT3351 0x0351
#define PCI_DEVICE_ID_VIA_VT3364 0x0364
#define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f
#define PCI_DEVICE_ID_INTEL_5100_16 0x65f0
#define PCI_DEVICE_ID_INTEL_5100_21 0x65f5
-diff -purN linux-2.6.27/include/linux/percpu_counter.h linux-2.6.27.19-5.1/include/linux/percpu_counter.h
---- linux-2.6.27/include/linux/percpu_counter.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/percpu_counter.h 2009-03-25 16:11:48.000000000 +0000
-@@ -35,7 +35,7 @@ int percpu_counter_init_irq(struct percp
+diff -r 9608d5473017 include/linux/percpu_counter.h
+--- a/include/linux/percpu_counter.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/percpu_counter.h Wed May 06 16:56:57 2009 +0100
+@@ -35,7 +35,7 @@
void percpu_counter_destroy(struct percpu_counter *fbc);
void percpu_counter_set(struct percpu_counter *fbc, s64 amount);
void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch);
static inline void percpu_counter_add(struct percpu_counter *fbc, s64 amount)
{
-@@ -44,19 +44,13 @@ static inline void percpu_counter_add(st
+@@ -44,19 +44,13 @@
static inline s64 percpu_counter_sum_positive(struct percpu_counter *fbc)
{
}
static inline s64 percpu_counter_read(struct percpu_counter *fbc)
-diff -purN linux-2.6.27/include/linux/perfmon.h linux-2.6.27.19-5.1/include/linux/perfmon.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/perfmon.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/perfmon.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/perfmon.h Wed May 06 16:56:57 2009 +0100
@@ -0,0 +1,213 @@
+/*
+ * Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
+#define PFM_VERSION_MINOR(x) ((x) & 0xffff)
+
+#endif /* __LINUX_PERFMON_H__ */
-diff -purN linux-2.6.27/include/linux/perfmon_dfl_smpl.h linux-2.6.27.19-5.1/include/linux/perfmon_dfl_smpl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/perfmon_dfl_smpl.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/perfmon_dfl_smpl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/perfmon_dfl_smpl.h Wed May 06 16:56:57 2009 +0100
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
+ (PFM_DFL_SMPL_VERSION_MIN & 0xffff))
+
+#endif /* __PERFMON_DFL_SMPL_H__ */
-diff -purN linux-2.6.27/include/linux/perfmon_fmt.h linux-2.6.27.19-5.1/include/linux/perfmon_fmt.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/perfmon_fmt.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/perfmon_fmt.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/perfmon_fmt.h Wed May 06 16:56:57 2009 +0100
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
+void pfm_sysfs_remove_fmt(struct pfm_smpl_fmt *fmt);
+
+#endif /* __PERFMON_FMT_H__ */
-diff -purN linux-2.6.27/include/linux/perfmon_kern.h linux-2.6.27.19-5.1/include/linux/perfmon_kern.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/perfmon_kern.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/perfmon_kern.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/perfmon_kern.h Wed May 06 16:56:57 2009 +0100
@@ -0,0 +1,551 @@
+/*
+ * Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
+#endif /* CONFIG_PERFMON */
+
+#endif /* __LINUX_PERFMON_KERN_H__ */
-diff -purN linux-2.6.27/include/linux/perfmon_pmu.h linux-2.6.27.19-5.1/include/linux/perfmon_pmu.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/perfmon_pmu.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/perfmon_pmu.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/perfmon_pmu.h Wed May 06 16:56:57 2009 +0100
@@ -0,0 +1,192 @@
+/*
+ * Copyright (c) 2006 Hewlett-Packard Development Company, L.P.
+int pfm_sysfs_add_pmu(struct pfm_pmu_config *pmu);
+
+#endif /* __PERFMON_PMU_H__ */
-diff -purN linux-2.6.27/include/linux/pid.h linux-2.6.27.19-5.1/include/linux/pid.h
---- linux-2.6.27/include/linux/pid.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pid.h 2009-03-25 16:11:48.000000000 +0000
-@@ -123,6 +123,24 @@ extern struct pid *alloc_pid(struct pid_
+diff -r 9608d5473017 include/linux/pid.h
+--- a/include/linux/pid.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pid.h Wed May 06 16:56:57 2009 +0100
+@@ -123,6 +123,24 @@
extern void free_pid(struct pid *pid);
/*
* the helpers to get the pid's id seen from different namespaces
*
* pid_nr() : global id, i.e. the id seen from the init namespace;
-diff -purN linux-2.6.27/include/linux/pkt_sched.h linux-2.6.27.19-5.1/include/linux/pkt_sched.h
---- linux-2.6.27/include/linux/pkt_sched.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pkt_sched.h 2009-03-25 16:11:49.000000000 +0000
-@@ -123,6 +123,13 @@ struct tc_prio_qopt
+diff -r 9608d5473017 include/linux/pkt_sched.h
+--- a/include/linux/pkt_sched.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pkt_sched.h Wed May 06 16:56:57 2009 +0100
+@@ -121,6 +121,13 @@
+ {
+ int bands; /* Number of bands */
__u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */
- };
-
++};
++
+/* MULTIQ section */
+
+struct tc_multiq_qopt {
+ __u16 bands; /* Number of bands */
+ __u16 max_bands; /* Maximum number of queues */
-+};
-+
- /* TBF section */
+ };
- struct tc_tbf_qopt
-diff -purN linux-2.6.27/include/linux/pnp.h linux-2.6.27.19-5.1/include/linux/pnp.h
---- linux-2.6.27/include/linux/pnp.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pnp.h 2009-03-25 16:11:49.000000000 +0000
-@@ -22,9 +22,11 @@ struct pnp_dev;
+ /* TBF section */
+diff -r 9608d5473017 include/linux/pnp.h
+--- a/include/linux/pnp.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pnp.h Wed May 06 16:56:57 2009 +0100
+@@ -22,9 +22,11 @@
* Resource Management
*/
#ifdef CONFIG_PNP
{
return NULL;
}
-diff -purN linux-2.6.27/include/linux/ptrace.h linux-2.6.27.19-5.1/include/linux/ptrace.h
---- linux-2.6.27/include/linux/ptrace.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/ptrace.h 2009-03-25 16:11:49.000000000 +0000
-@@ -27,6 +27,10 @@
+diff -r 9608d5473017 include/linux/ptrace.h
+--- a/include/linux/ptrace.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/ptrace.h Wed May 06 16:56:57 2009 +0100
+@@ -26,6 +26,10 @@
+ #define PTRACE_GETEVENTMSG 0x4201
#define PTRACE_GETSIGINFO 0x4202
#define PTRACE_SETSIGINFO 0x4203
-
++
+/* PTRACE SELF requests */
+#define PTRACE_SELF_ON 0x4281
+#define PTRACE_SELF_OFF 0x4282
-+
+
/* options set using PTRACE_SETOPTIONS */
#define PTRACE_O_TRACESYSGOOD 0x00000001
- #define PTRACE_O_TRACEFORK 0x00000002
@@ -78,7 +82,21 @@
#include <linux/compiler.h> /* For unlikely. */
#include <linux/sched.h> /* For struct task_struct. */
+#include <linux/unistd.h> /* For syscall definitions */
-+
+
+#define PTS_INSTRUMENTED 0x00000001
+#define PTS_SELF 0x00000002
-
++
+static inline int is_self_ptracing(unsigned long syscall)
+{
+ if (!(current->instrumentation & PTS_SELF))
extern long arch_ptrace(struct task_struct *child, long request, long addr, long data);
extern struct task_struct *ptrace_get_task_struct(pid_t pid);
-diff -purN linux-2.6.27/include/linux/quota.h linux-2.6.27.19-5.1/include/linux/quota.h
---- linux-2.6.27/include/linux/quota.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/quota.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/quota.h
+--- a/include/linux/quota.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/quota.h Wed May 06 16:56:57 2009 +0100
@@ -41,15 +41,6 @@
#define __DQUOT_VERSION__ "dquot_6.5.1"
#define __DQUOT_NUM_VERSION__ 6*10000+5*100+1
#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)
#define QIF_USAGE (QIF_SPACE | QIF_INODES)
#define QIF_TIMES (QIF_BTIME | QIF_ITIME)
-@@ -174,7 +179,7 @@ enum {
+@@ -174,7 +179,7 @@
#include <asm/atomic.h>
typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */
extern spinlock_t dq_data_lock;
-@@ -189,12 +194,12 @@ extern spinlock_t dq_data_lock;
+@@ -189,12 +194,12 @@
* Data for one user/group kept in memory
*/
struct mem_dqblk {
time_t dqb_btime; /* time limit for excessive disk use */
time_t dqb_itime; /* time limit for excessive inode use */
};
-@@ -214,10 +219,7 @@ struct mem_dqinfo {
+@@ -214,10 +219,7 @@
unsigned int dqi_igrace;
qsize_t dqi_maxblimit;
qsize_t dqi_maxilimit;
};
struct super_block;
-@@ -251,6 +253,11 @@ extern struct dqstats dqstats;
+@@ -251,6 +253,11 @@
#define DQ_FAKE_B 3 /* no limits only usage */
#define DQ_READ_B 4 /* dquot was read into memory */
#define DQ_ACTIVE_B 5 /* dquot is active (dquot_release not called) */
struct dquot {
struct hlist_node dq_hash; /* Hash list in memory */
-@@ -289,11 +296,13 @@ struct dquot_operations {
+@@ -289,11 +296,13 @@
int (*initialize) (struct inode *, int);
int (*drop) (struct inode *);
int (*alloc_space) (struct inode *, qsize_t, int);
int (*acquire_dquot) (struct dquot *); /* Quota is going to be created on disk */
int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */
int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */
-@@ -322,12 +331,42 @@ struct quota_format_type {
+@@ -322,12 +331,42 @@
struct quota_format_type *qf_next;
};
struct quota_info {
unsigned int flags; /* Flags for diskquotas on this device */
-diff -purN linux-2.6.27/include/linux/quotaio_v1.h linux-2.6.27.19-5.1/include/linux/quotaio_v1.h
---- linux-2.6.27/include/linux/quotaio_v1.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/quotaio_v1.h 1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 include/linux/quotaio_v1.h
+--- a/include/linux/quotaio_v1.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/quotaio_v1.h Wed May 06 16:56:57 2009 +0100
@@ -1,33 +0,0 @@
-#ifndef _LINUX_QUOTAIO_V1_H
-#define _LINUX_QUOTAIO_V1_H
-#define v1_dqoff(UID) ((loff_t)((UID) * sizeof (struct v1_disk_dqblk)))
-
-#endif /* _LINUX_QUOTAIO_V1_H */
-diff -purN linux-2.6.27/include/linux/quotaio_v2.h linux-2.6.27.19-5.1/include/linux/quotaio_v2.h
---- linux-2.6.27/include/linux/quotaio_v2.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/quotaio_v2.h 1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 include/linux/quotaio_v2.h
+--- a/include/linux/quotaio_v2.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/quotaio_v2.h Wed May 06 16:56:57 2009 +0100
@@ -1,79 +0,0 @@
-/*
- * Definitions of structures for vfsv0 quota format
-#define V2_DQSTRINBLK ((V2_DQBLKSIZE - sizeof(struct v2_disk_dqdbheader)) / sizeof(struct v2_disk_dqblk)) /* Number of entries in one blocks */
-
-#endif /* _LINUX_QUOTAIO_V2_H */
-diff -purN linux-2.6.27/include/linux/quotaops.h linux-2.6.27.19-5.1/include/linux/quotaops.h
---- linux-2.6.27/include/linux/quotaops.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/quotaops.h 2009-03-25 16:11:48.000000000 +0000
-@@ -27,12 +27,19 @@ void sync_dquots(struct super_block *sb,
+diff -r 9608d5473017 include/linux/quotaops.h
+--- a/include/linux/quotaops.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/quotaops.h Wed May 06 16:56:57 2009 +0100
+@@ -27,12 +27,19 @@
int dquot_initialize(struct inode *inode, int type);
int dquot_drop(struct inode *inode);
int dquot_transfer(struct inode *inode, struct iattr *iattr);
int dquot_commit(struct dquot *dquot);
-@@ -43,11 +50,14 @@ int dquot_mark_dquot_dirty(struct dquot
+@@ -43,11 +50,14 @@
int vfs_quota_on(struct super_block *sb, int type, int format_id,
char *path, int remount);
int vfs_quota_sync(struct super_block *sb, int type);
int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
-@@ -67,24 +77,22 @@ static inline struct mem_dqinfo *sb_dqin
+@@ -67,30 +77,53 @@
* Functions for checking status of quota
*/
}
static inline int sb_any_quota_suspended(struct super_block *sb)
-@@ -93,6 +101,31 @@ static inline int sb_any_quota_suspended
+ {
+ return sb_has_quota_suspended(sb, USRQUOTA) ||
sb_has_quota_suspended(sb, GRPQUOTA);
- }
-
++}
++
+/* Does kernel know about any quota information for given sb + type? */
+static inline int sb_has_quota_loaded(struct super_block *sb, int type)
+{
+{
+ return sb_has_quota_active(sb, USRQUOTA) ||
+ sb_has_quota_active(sb, GRPQUOTA);
-+}
-+
+ }
+
/*
- * Operations supported for diskquotas.
- */
-@@ -107,7 +140,7 @@ extern struct quotactl_ops vfs_quotactl_
+@@ -107,7 +140,7 @@
static inline void vfs_dq_init(struct inode *inode)
{
BUG_ON(!inode->i_sb);
inode->i_sb->dq_op->initialize(inode, -1);
}
-@@ -115,7 +148,7 @@ static inline void vfs_dq_init(struct in
+@@ -115,7 +148,7 @@
* a transaction (deadlocks possible otherwise) */
static inline int vfs_dq_prealloc_space_nodirty(struct inode *inode, qsize_t nr)
{
/* Used space is updated in alloc_space() */
if (inode->i_sb->dq_op->alloc_space(inode, nr, 1) == NO_QUOTA)
return 1;
-@@ -135,7 +168,7 @@ static inline int vfs_dq_prealloc_space(
+@@ -135,7 +168,7 @@
static inline int vfs_dq_alloc_space_nodirty(struct inode *inode, qsize_t nr)
{
/* Used space is updated in alloc_space() */
if (inode->i_sb->dq_op->alloc_space(inode, nr, 0) == NO_QUOTA)
return 1;
-@@ -155,7 +188,7 @@ static inline int vfs_dq_alloc_space(str
+@@ -155,7 +188,7 @@
static inline int vfs_dq_alloc_inode(struct inode *inode)
{
vfs_dq_init(inode);
if (inode->i_sb->dq_op->alloc_inode(inode, 1) == NO_QUOTA)
return 1;
-@@ -165,7 +198,7 @@ static inline int vfs_dq_alloc_inode(str
+@@ -165,7 +198,7 @@
static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr)
{
inode->i_sb->dq_op->free_space(inode, nr);
else
inode_sub_bytes(inode, nr);
-@@ -179,7 +212,7 @@ static inline void vfs_dq_free_space(str
+@@ -179,7 +212,7 @@
static inline void vfs_dq_free_inode(struct inode *inode)
{
inode->i_sb->dq_op->free_inode(inode, 1);
}
-@@ -200,12 +233,12 @@ static inline int vfs_dq_off(struct supe
+@@ -200,12 +233,12 @@
#else
{
return 0;
}
-@@ -220,6 +253,22 @@ static inline int sb_any_quota_suspended
- return 0;
+@@ -216,6 +249,22 @@
}
-+/* Does kernel know about any quota information for given sb + type? */
-+static inline int sb_has_quota_loaded(struct super_block *sb, int type)
+ static inline int sb_any_quota_suspended(struct super_block *sb)
+{
+ return 0;
+}
+
-+static inline int sb_any_quota_loaded(struct super_block *sb)
++/* Does kernel know about any quota information for given sb + type? */
++static inline int sb_has_quota_loaded(struct super_block *sb, int type)
+{
+ return 0;
+}
+
-+static inline int sb_any_quota_active(struct super_block *sb)
++static inline int sb_any_quota_loaded(struct super_block *sb)
+{
+ return 0;
+}
+
- /*
- * NO-OP when quota not configured.
- */
-diff -purN linux-2.6.27/include/linux/radix-tree.h linux-2.6.27.19-5.1/include/linux/radix-tree.h
---- linux-2.6.27/include/linux/radix-tree.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/radix-tree.h 2009-03-25 16:11:48.000000000 +0000
-@@ -136,7 +136,7 @@ do { \
++static inline int sb_any_quota_active(struct super_block *sb)
+ {
+ return 0;
+ }
+diff -r 9608d5473017 include/linux/radix-tree.h
+--- a/include/linux/radix-tree.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/radix-tree.h Wed May 06 16:56:57 2009 +0100
+@@ -136,7 +136,7 @@
*/
static inline void *radix_tree_deref_slot(void **pslot)
{
if (unlikely(radix_tree_is_indirect_ptr(ret)))
ret = RADIX_TREE_RETRY;
return ret;
-diff -purN linux-2.6.27/include/linux/raid/md_k.h linux-2.6.27.19-5.1/include/linux/raid/md_k.h
---- linux-2.6.27/include/linux/raid/md_k.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/raid/md_k.h 2009-03-25 16:11:48.000000000 +0000
-@@ -200,6 +200,8 @@ struct mddev_s
+diff -r 9608d5473017 include/linux/raid/md_k.h
+--- a/include/linux/raid/md_k.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/raid/md_k.h Wed May 06 16:56:57 2009 +0100
+@@ -200,6 +200,8 @@
* RESHAPE: A reshape is happening
*
* If neither SYNC or RESHAPE are set, then it is a recovery.
*/
#define MD_RECOVERY_RUNNING 0
#define MD_RECOVERY_SYNC 1
-@@ -212,6 +214,9 @@ struct mddev_s
+@@ -211,6 +213,9 @@
+ #define MD_RECOVERY_CHECK 7
#define MD_RECOVERY_RESHAPE 8
#define MD_RECOVERY_FROZEN 9
-
+
-+#define MD_RECOVERY_DISABLED 16
+
++#define MD_RECOVERY_DISABLED 16
+
unsigned long recovery;
- int in_sync; /* know to not need resync */
-diff -purN linux-2.6.27/include/linux/rcupdate.h linux-2.6.27.19-5.1/include/linux/rcupdate.h
---- linux-2.6.27/include/linux/rcupdate.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/rcupdate.h 2009-03-25 16:11:49.000000000 +0000
-@@ -133,6 +133,26 @@ struct rcu_head {
+diff -r 9608d5473017 include/linux/rcupdate.h
+--- a/include/linux/rcupdate.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/rcupdate.h Wed May 06 16:56:57 2009 +0100
+@@ -133,6 +133,26 @@
#define rcu_read_unlock_bh() __rcu_read_unlock_bh()
/**
* rcu_dereference - fetch an RCU-protected pointer in an
* RCU read-side critical section. This pointer may later
* be safely dereferenced.
-diff -purN linux-2.6.27/include/linux/reboot.h linux-2.6.27.19-5.1/include/linux/reboot.h
---- linux-2.6.27/include/linux/reboot.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/reboot.h 2009-03-25 16:11:48.000000000 +0000
-@@ -53,7 +53,14 @@ extern void machine_power_off(void);
+diff -r 9608d5473017 include/linux/reboot.h
+--- a/include/linux/reboot.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/reboot.h Wed May 06 16:56:57 2009 +0100
+@@ -53,7 +53,14 @@
extern void machine_shutdown(void);
struct pt_regs;
/*
* Architecture independent implemenations of sys_reboot commands.
-diff -purN linux-2.6.27/include/linux/reiserfs_acl.h linux-2.6.27.19-5.1/include/linux/reiserfs_acl.h
---- linux-2.6.27/include/linux/reiserfs_acl.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/reiserfs_acl.h 2009-03-25 16:11:49.000000000 +0000
-@@ -49,13 +49,12 @@ static inline int reiserfs_acl_count(siz
+diff -r 9608d5473017 include/linux/reiserfs_acl.h
+--- a/include/linux/reiserfs_acl.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/reiserfs_acl.h Wed May 06 16:56:57 2009 +0100
+@@ -49,13 +49,12 @@
#ifdef CONFIG_REISERFS_FS_POSIX_ACL
struct posix_acl *reiserfs_get_acl(struct inode *inode, int type);
int reiserfs_acl_chmod(struct inode *inode);
static inline void reiserfs_init_acl_access(struct inode *inode)
{
-@@ -75,16 +74,6 @@ static inline struct posix_acl *reiserfs
+@@ -73,16 +72,6 @@
+ static inline struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
+ {
return NULL;
- }
-
+-}
+-
-static inline int reiserfs_xattr_posix_acl_init(void)
-{
- return 0;
-static inline int reiserfs_xattr_posix_acl_exit(void)
-{
- return 0;
--}
--
+ }
+
static inline int reiserfs_acl_chmod(struct inode *inode)
- {
- return 0;
-diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/linux/reiserfs_fs.h
---- linux-2.6.27/include/linux/reiserfs_fs.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/reiserfs_fs.h 2009-03-25 16:11:50.000000000 +0000
-@@ -79,15 +79,21 @@ struct fid;
+diff -r 9608d5473017 include/linux/reiserfs_fs.h
+--- a/include/linux/reiserfs_fs.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/reiserfs_fs.h Wed May 06 16:56:57 2009 +0100
+@@ -79,15 +79,21 @@
*/
#define REISERFS_DEBUG_CODE 5 /* extra messages to help find/debug errors */
#define RASSERT(cond, format, args...) __RASSERT(cond, #cond, format, ##args)
-@@ -171,7 +177,11 @@ struct reiserfs_super_block {
+@@ -171,7 +177,11 @@
__le32 s_flags; /* Right now used only by inode-attributes, if enabled */
unsigned char s_uuid[16]; /* filesystem unique identifier */
unsigned char s_label[16]; /* filesystem volume label */
* reiserfs_convert_objectid_map_v1()
* so any additions must be updated
* there as well. */
-@@ -553,10 +563,8 @@ static inline int uniqueness2type(__u32
+@@ -553,10 +563,8 @@
return TYPE_DIRECT;
case V1_DIRENTRY_UNIQUENESS:
return TYPE_DIRENTRY;
-- default:
++ case V1_ANY_UNIQUENESS:
+ default:
- reiserfs_warning(NULL, "vs-500: unknown uniqueness %d",
- uniqueness);
- case V1_ANY_UNIQUENESS:
-+ default:
+- case V1_ANY_UNIQUENESS:
return TYPE_ANY;
}
}
-@@ -573,9 +581,8 @@ static inline __u32 type2uniqueness(int
+@@ -573,9 +581,8 @@
return V1_DIRECT_UNIQUENESS;
case TYPE_DIRENTRY:
return V1_DIRENTRY_UNIQUENESS;
-- default:
++ case TYPE_ANY:
+ default:
- reiserfs_warning(NULL, "vs-501: unknown type %d", type);
- case TYPE_ANY:
-+ default:
+- case TYPE_ANY:
return V1_ANY_UNIQUENESS;
}
}
-@@ -687,9 +694,9 @@ static inline void cpu_key_k_offset_dec(
+@@ -687,9 +694,9 @@
#define is_indirect_cpu_ih(ih) (is_indirect_cpu_key (&((ih)->ih_key)))
#define is_statdata_cpu_ih(ih) (is_statdata_cpu_key (&((ih)->ih_key)))
/* maximal length of item */
#define MAX_ITEM_LEN(block_size) (block_size - BLKH_SIZE - IH_SIZE)
-@@ -744,25 +751,25 @@ struct block_head {
+@@ -744,25 +751,25 @@
#define DISK_LEAF_NODE_LEVEL 1 /* Leaf node level. */
/* Given the buffer head of a formatted node, resolve to the block head of that node. */
-#define B_NR_ITEMS(p_s_bh) (blkh_nr_item(B_BLK_HEAD(p_s_bh)))
-#define B_LEVEL(p_s_bh) (blkh_level(B_BLK_HEAD(p_s_bh)))
-#define B_FREE_SPACE(p_s_bh) (blkh_free_space(B_BLK_HEAD(p_s_bh)))
--
--#define PUT_B_NR_ITEMS(p_s_bh,val) do { set_blkh_nr_item(B_BLK_HEAD(p_s_bh),val); } while (0)
--#define PUT_B_LEVEL(p_s_bh,val) do { set_blkh_level(B_BLK_HEAD(p_s_bh),val); } while (0)
--#define PUT_B_FREE_SPACE(p_s_bh,val) do { set_blkh_free_space(B_BLK_HEAD(p_s_bh),val); } while (0)
+#define B_NR_ITEMS(bh) (blkh_nr_item(B_BLK_HEAD(bh)))
+#define B_LEVEL(bh) (blkh_level(B_BLK_HEAD(bh)))
+#define B_FREE_SPACE(bh) (blkh_free_space(B_BLK_HEAD(bh)))
-+
+
+-#define PUT_B_NR_ITEMS(p_s_bh,val) do { set_blkh_nr_item(B_BLK_HEAD(p_s_bh),val); } while (0)
+-#define PUT_B_LEVEL(p_s_bh,val) do { set_blkh_level(B_BLK_HEAD(p_s_bh),val); } while (0)
+-#define PUT_B_FREE_SPACE(p_s_bh,val) do { set_blkh_free_space(B_BLK_HEAD(p_s_bh),val); } while (0)
+#define PUT_B_NR_ITEMS(bh, val) do { set_blkh_nr_item(B_BLK_HEAD(bh), val); } while (0)
+#define PUT_B_LEVEL(bh, val) do { set_blkh_level(B_BLK_HEAD(bh), val); } while (0)
+#define PUT_B_FREE_SPACE(bh, val) do { set_blkh_free_space(B_BLK_HEAD(bh), val); } while (0)
/***************************************************************************/
/* STAT DATA */
-@@ -1112,12 +1119,13 @@ struct disk_child {
+@@ -1112,12 +1119,13 @@
#define put_dc_size(dc_p, val) do { (dc_p)->dc_size = cpu_to_le16(val); } while(0)
/* Get disk child by buffer header and position in the tree node. */
/* maximal value of field child_size in structure disk_child */
/* child size is the combined size of all items and their headers */
-@@ -1188,33 +1196,33 @@ struct treepath {
+@@ -1188,33 +1196,33 @@
struct treepath var = {.path_length = ILLEGAL_PATH_ELEMENT_OFFSET, .reada = 0,}
/* Get path element by path and path position. */
#define get_last_bh(path) PATH_PLAST_BUFFER(path)
#define get_ih(path) PATH_PITEM_HEAD(path)
-@@ -1444,6 +1452,16 @@ struct buffer_info {
+@@ -1444,6 +1452,16 @@
int bi_position;
};
/* there are 4 types of items: stat data, directory item, indirect, direct.
+-------------------+------------+--------------+------------+
| | k_offset | k_uniqueness | mergeable? |
-@@ -1494,7 +1512,7 @@ extern struct item_operations *item_ops[
+@@ -1494,7 +1512,7 @@
#define COMP_SHORT_KEYS comp_short_keys
/* number of blocks pointed to by the indirect item */
/* the used space within the unformatted node corresponding to pos within the item pointed to by ih */
#define I_POS_UNFM_SIZE(ih,pos,size) (((pos) == I_UNFM_NUM(ih) - 1 ) ? (size) - ih_free_space(ih) : (size))
-@@ -1598,6 +1616,10 @@ struct reiserfs_journal_header {
+@@ -1598,6 +1616,10 @@
#define JOURNAL_MAX_COMMIT_AGE 30
#define JOURNAL_MAX_TRANS_AGE 30
#define JOURNAL_PER_BALANCE_CNT (3 * (MAX_HEIGHT-2) + 9)
#ifdef CONFIG_QUOTA
/* We need to update data and inode (atime) */
#define REISERFS_QUOTA_TRANS_BLOCKS(s) (REISERFS_SB(s)->s_mount_opt & (1<<REISERFS_QUOTA) ? 2 : 0)
-@@ -1672,7 +1694,7 @@ struct reiserfs_transaction_handle {
+@@ -1672,7 +1694,7 @@
int t_refcount;
int t_blocks_logged; /* number of blocks this writer has logged */
int t_blocks_allocated; /* number of blocks this writer allocated */
void *t_handle_save; /* save existing current->journal_info */
unsigned displace_new_blocks:1; /* if new block allocation occurres, that block
should be displaced from others */
-@@ -1748,13 +1770,13 @@ int journal_end_sync(struct reiserfs_tra
+@@ -1748,13 +1770,13 @@
int journal_mark_freed(struct reiserfs_transaction_handle *,
struct super_block *, b_blocknr_t blocknr);
int journal_transaction_should_end(struct reiserfs_transaction_handle *, int);
void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...);
int reiserfs_allocate_list_bitmaps(struct super_block *s,
struct reiserfs_list_bitmap *, unsigned int);
-@@ -1771,8 +1793,8 @@ int reiserfs_convert_objectid_map_v1(str
+@@ -1771,8 +1793,8 @@
/* stree.c */
int B_IS_IN_TREE(const struct buffer_head *);
// first key is in cpu form, second - le
extern int comp_short_keys(const struct reiserfs_key *le_key,
-@@ -1807,20 +1829,20 @@ static inline void copy_key(struct reise
+@@ -1807,20 +1829,20 @@
memcpy(to, from, KEY_SIZE);
}
int reiserfs_insert_item(struct reiserfs_transaction_handle *th,
struct treepath *path,
-@@ -1843,14 +1865,14 @@ int reiserfs_cut_from_item(struct reiser
+@@ -1843,14 +1865,14 @@
int reiserfs_delete_item(struct reiserfs_transaction_handle *th,
struct treepath *path,
const struct cpu_key *key,
int update_timestamps);
#define i_block_size(inode) ((inode)->i_sb->s_blocksize)
-@@ -1894,10 +1916,12 @@ void make_le_item_head(struct item_head
+@@ -1894,10 +1916,12 @@
loff_t offset, int type, int length, int entry_count);
struct inode *reiserfs_iget(struct super_block *s, const struct cpu_key *key);
void reiserfs_update_sd_size(struct reiserfs_transaction_handle *th,
struct inode *inode, loff_t size);
-@@ -1955,7 +1979,7 @@ int reiserfs_global_version_in_proc(char
+@@ -1955,7 +1979,7 @@
#define PROC_INFO_MAX( sb, field, value ) VOID_V
#define PROC_INFO_INC( sb, field ) VOID_V
#define PROC_INFO_ADD( sb, field, val ) VOID_V
#endif
/* dir.c */
-@@ -1963,6 +1987,7 @@ extern const struct inode_operations rei
+@@ -1963,6 +1987,7 @@
extern const struct inode_operations reiserfs_symlink_inode_operations;
extern const struct inode_operations reiserfs_special_inode_operations;
extern const struct file_operations reiserfs_dir_operations;
/* tail_conversion.c */
int direct2indirect(struct reiserfs_transaction_handle *, struct inode *,
-@@ -1979,13 +2004,20 @@ extern const struct address_space_operat
+@@ -1979,13 +2004,20 @@
/* fix_nodes.c */
void reiserfs_info(struct super_block *s, const char *fmt, ...);
void reiserfs_debug(struct super_block *s, int level, const char *fmt, ...);
void print_indirect_item(struct buffer_head *bh, int item_num);
-@@ -2022,7 +2054,7 @@ void leaf_paste_in_buffer(struct buffer_
+@@ -2022,7 +2054,7 @@
int zeros_number);
void leaf_cut_from_buffer(struct buffer_info *bi, int cut_item_num,
int pos_in_item, int cut_size);
int new_entry_count, struct reiserfs_de_head *new_dehs,
const char *records, int paste_size);
/* ibalance.c */
-@@ -2200,7 +2232,4 @@ int reiserfs_unpack(struct inode *inode,
+@@ -2200,7 +2232,4 @@
#define reiserfs_write_lock( sb ) lock_kernel()
#define reiserfs_write_unlock( sb ) unlock_kernel()
-#define REISERFS_XATTR_DIR_SEM(s) (REISERFS_SB(s)->xattr_dir_sem)
-
#endif /* _LINUX_REISER_FS_H */
-diff -purN linux-2.6.27/include/linux/reiserfs_fs_i.h linux-2.6.27.19-5.1/include/linux/reiserfs_fs_i.h
---- linux-2.6.27/include/linux/reiserfs_fs_i.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/reiserfs_fs_i.h 2009-03-25 16:11:48.000000000 +0000
-@@ -51,7 +51,7 @@ struct reiserfs_inode_info {
+diff -r 9608d5473017 include/linux/reiserfs_fs_i.h
+--- a/include/linux/reiserfs_fs_i.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/reiserfs_fs_i.h Wed May 06 16:56:57 2009 +0100
+@@ -51,7 +51,7 @@
/* we use these for fsync or O_SYNC to decide which transaction
** needs to be committed in order for this inode to be properly
** flushed */
struct reiserfs_journal_list *i_jl;
struct mutex i_mmap;
#ifdef CONFIG_REISERFS_FS_POSIX_ACL
-@@ -59,7 +59,7 @@ struct reiserfs_inode_info {
+@@ -59,7 +59,7 @@
struct posix_acl *i_acl_default;
#endif
#ifdef CONFIG_REISERFS_FS_XATTR
#endif
struct inode vfs_inode;
};
-diff -purN linux-2.6.27/include/linux/reiserfs_fs_sb.h linux-2.6.27.19-5.1/include/linux/reiserfs_fs_sb.h
---- linux-2.6.27/include/linux/reiserfs_fs_sb.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/reiserfs_fs_sb.h 2009-03-25 16:11:50.000000000 +0000
-@@ -14,7 +14,7 @@ typedef enum {
+diff -r 9608d5473017 include/linux/reiserfs_fs_sb.h
+--- a/include/linux/reiserfs_fs_sb.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/reiserfs_fs_sb.h Wed May 06 16:56:57 2009 +0100
+@@ -14,7 +14,7 @@
} reiserfs_super_block_flags;
/* struct reiserfs_super_block accessors/mutators
* little endian format. */
#define sb_block_count(sbp) (le32_to_cpu((sbp)->s_v1.s_block_count))
#define set_sb_block_count(sbp,v) ((sbp)->s_v1.s_block_count = cpu_to_le32(v))
-@@ -73,6 +73,9 @@ typedef enum {
+@@ -73,6 +73,9 @@
#define sb_version(sbp) (le16_to_cpu((sbp)->s_v1.s_version))
#define set_sb_version(sbp,v) ((sbp)->s_v1.s_version = cpu_to_le16(v))
#define sb_reserved_for_journal(sbp) \
(le16_to_cpu((sbp)->s_v1.s_reserved_for_journal))
#define set_sb_reserved_for_journal(sbp,v) \
-@@ -80,16 +83,16 @@ typedef enum {
+@@ -80,16 +83,16 @@
/* LOGGING -- */
** If your journal fills faster than dirty buffers get flushed to disk, it must flush them before allowing the journal
** to wrap, which slows things down. If you need high speed meta data updates, the journal should be big enough
** to prevent wrapping before dirty meta blocks get to disk.
-@@ -146,6 +149,12 @@ struct reiserfs_list_bitmap {
+@@ -146,6 +149,12 @@
** and to make sure every real block in a transaction is on disk before allowing the log area
** to be overwritten */
struct reiserfs_journal_list {
unsigned long j_start;
unsigned long j_state;
unsigned long j_len;
-@@ -153,7 +162,7 @@ struct reiserfs_journal_list {
+@@ -153,7 +162,7 @@
atomic_t j_commit_left;
atomic_t j_older_commits_done; /* all commits older than this on disk */
struct mutex j_commit_mutex;
time_t j_timestamp;
struct reiserfs_list_bitmap *j_list_bitmap;
struct buffer_head *j_commit_bh; /* commit buffer head */
-@@ -181,7 +190,7 @@ struct reiserfs_journal {
+@@ -181,7 +190,7 @@
int j_1st_reserved_block; /* first block on s_dev of reserved area journal */
unsigned long j_state;
unsigned long j_mount_id;
unsigned long j_start; /* start of current waiting commit (index into j_ap_blocks) */
unsigned long j_len; /* length of current waiting commit */
-@@ -222,10 +231,10 @@ struct reiserfs_journal {
+@@ -222,10 +231,10 @@
int j_num_work_lists; /* number that need attention from kreiserfsd */
/* debugging to make sure things are flushed in order */
struct list_head j_bitmap_nodes;
struct list_head j_dirty_buffers;
-@@ -238,7 +247,7 @@ struct reiserfs_journal {
+@@ -238,7 +247,7 @@
struct reiserfs_list_bitmap j_list_bitmap[JOURNAL_NUM_BITMAPS]; /* array of bitmaps to record the deleted blocks */
struct reiserfs_journal_cnode *j_hash_table[JOURNAL_HASH_SIZE]; /* hash table for real buffer heads in current trans */
the transactions */
struct list_head j_prealloc_list; /* list of inodes which have preallocated blocks */
int j_persistent_trans;
-@@ -398,10 +407,7 @@ struct reiserfs_sb_info {
+@@ -398,10 +407,7 @@
int reserved_blocks; /* amount of blocks reserved for further allocations */
spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */
struct dentry *priv_root; /* root of /.reiserfs_priv */
int j_errno;
#ifdef CONFIG_QUOTA
char *s_qf_names[MAXQUOTAS];
-@@ -425,7 +431,7 @@ enum reiserfs_mount_options {
+@@ -425,7 +431,7 @@
partition will be dealt with in a
manner of 3.5.x */
** reiserfs disks from 3.5.19 or earlier. 99% of the time, this option
** is not required. If the normal autodection code can't determine which
** hash to use (because both hashes had the same value for a file)
-@@ -450,7 +456,6 @@ enum reiserfs_mount_options {
+@@ -450,7 +456,6 @@
REISERFS_NO_UNHASHED_RELOCATION,
REISERFS_HASHED_RELOCATION,
REISERFS_ATTRS,
REISERFS_XATTRS_USER,
REISERFS_POSIXACL,
REISERFS_BARRIER_NONE,
-@@ -488,7 +493,7 @@ enum reiserfs_mount_options {
+@@ -488,7 +493,7 @@
#define reiserfs_data_log(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_LOG))
#define reiserfs_data_ordered(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_ORDERED))
#define reiserfs_data_writeback(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_WRITEBACK))
#define reiserfs_xattrs_user(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_XATTRS_USER))
#define reiserfs_posixacl(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_POSIXACL))
#define reiserfs_xattrs_optional(s) (reiserfs_xattrs_user(s) || reiserfs_posixacl(s))
-diff -purN linux-2.6.27/include/linux/reiserfs_xattr.h linux-2.6.27.19-5.1/include/linux/reiserfs_xattr.h
---- linux-2.6.27/include/linux/reiserfs_xattr.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/reiserfs_xattr.h 2009-03-25 16:11:49.000000000 +0000
-@@ -15,6 +15,12 @@ struct reiserfs_xattr_header {
+diff -r 9608d5473017 include/linux/reiserfs_xattr.h
+--- a/include/linux/reiserfs_xattr.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/reiserfs_xattr.h Wed May 06 16:56:57 2009 +0100
+@@ -15,6 +15,12 @@
__le32 h_hash; /* hash of the value */
};
#ifdef __KERNEL__
#include <linux/init.h>
-@@ -29,22 +35,13 @@ struct iattr;
+@@ -29,22 +35,13 @@
struct super_block;
struct nameidata;
#define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir)
ssize_t reiserfs_getxattr(struct dentry *dentry, const char *name,
void *buffer, size_t size);
-@@ -52,104 +49,97 @@ int reiserfs_setxattr(struct dentry *den
+@@ -52,105 +49,98 @@
const void *value, size_t size, int flags);
ssize_t reiserfs_listxattr(struct dentry *dentry, char *buffer, size_t size);
int reiserfs_removexattr(struct dentry *dentry, const char *name);
+int reiserfs_xattr_set_handle(struct reiserfs_transaction_handle *,
+ struct inode *, const char *, const void *,
+ size_t, int);
-+
+
+-extern struct reiserfs_xattr_handler user_handler;
+-extern struct reiserfs_xattr_handler trusted_handler;
+-extern struct reiserfs_xattr_handler security_handler;
+extern struct xattr_handler reiserfs_xattr_user_handler;
+extern struct xattr_handler reiserfs_xattr_trusted_handler;
+extern struct xattr_handler reiserfs_xattr_security_handler;
+ struct reiserfs_security_handle *sec);
+void reiserfs_security_free(struct reiserfs_security_handle *sec);
+#endif
-+
+
+-int reiserfs_xattr_register_handlers(void) __init;
+-void reiserfs_xattr_unregister_handlers(void);
+-
+-static inline void reiserfs_write_lock_xattrs(struct super_block *sb)
+#define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header))
+static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size)
-+{
+ {
+- down_write(&REISERFS_XATTR_DIR_SEM(sb));
+-}
+-static inline void reiserfs_write_unlock_xattrs(struct super_block *sb)
+-{
+- up_write(&REISERFS_XATTR_DIR_SEM(sb));
+-}
+-static inline void reiserfs_read_lock_xattrs(struct super_block *sb)
+-{
+- down_read(&REISERFS_XATTR_DIR_SEM(sb));
+ loff_t ret = 0;
+ if (reiserfs_file_data_log(inode)) {
+ ret = _ROUND_UP(xattr_size(size), inode->i_sb->s_blocksize);
+ ret >>= inode->i_sb->s_blocksize_bits;
+ }
+ return ret;
-+}
-+
+ }
+
+-static inline void reiserfs_read_unlock_xattrs(struct super_block *sb)
+/* We may have to create up to 3 objects: xattr root, xattr dir, xattr file.
+ * Let's try to be smart about it.
+ * xattr root: We cache it. If it's not cached, we may need to create it.
+ * THIS VALUE.
+ */
+static inline size_t reiserfs_xattr_jcreate_nblocks(struct inode *inode)
-+{
-+ size_t nblocks = JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
-+
-+ if ((REISERFS_I(inode)->i_flags & i_has_xattr_dir) == 0) {
-+ nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
-+ if (REISERFS_SB(inode->i_sb)->xattr_root == NULL)
-+ nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
-+ }
-
--extern struct reiserfs_xattr_handler user_handler;
--extern struct reiserfs_xattr_handler trusted_handler;
--extern struct reiserfs_xattr_handler security_handler;
--
--int reiserfs_xattr_register_handlers(void) __init;
--void reiserfs_xattr_unregister_handlers(void);
--
--static inline void reiserfs_write_lock_xattrs(struct super_block *sb)
--{
-- down_write(&REISERFS_XATTR_DIR_SEM(sb));
--}
--static inline void reiserfs_write_unlock_xattrs(struct super_block *sb)
--{
-- up_write(&REISERFS_XATTR_DIR_SEM(sb));
--}
--static inline void reiserfs_read_lock_xattrs(struct super_block *sb)
--{
-- down_read(&REISERFS_XATTR_DIR_SEM(sb));
--}
--
--static inline void reiserfs_read_unlock_xattrs(struct super_block *sb)
--{
+ {
- up_read(&REISERFS_XATTR_DIR_SEM(sb));
-}
--
++ size_t nblocks = JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
+
-static inline void reiserfs_write_lock_xattr_i(struct inode *inode)
-{
- down_write(&REISERFS_I(inode)->xattr_sem);
-{
- down_read(&REISERFS_I(inode)->xattr_sem);
-}
--
++ if ((REISERFS_I(inode)->i_flags & i_has_xattr_dir) == 0) {
++ nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
++ if (REISERFS_SB(inode->i_sb)->xattr_root == NULL)
++ nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
++ }
+
-static inline void reiserfs_read_unlock_xattr_i(struct inode *inode)
-{
- up_read(&REISERFS_I(inode)->xattr_sem);
-#define reiserfs_xattr_unregister_handlers()
-
-static inline int reiserfs_delete_xattrs(struct inode *inode)
-+static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
- {
+-{
- return 0;
-};
-static inline int reiserfs_chown_xattrs(struct inode *inode,
- struct iattr *attrs)
-+}
-+#endif /* CONFIG_REISERFS_FS_XATTR */
-+
+-{
+- return 0;
+-};
+-static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags)
+-{
+- sb->s_flags = (sb->s_flags & ~MS_POSIXACL); /* to be sure */
+- return 0;
+-};
+ static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
+ {
+ }
+ #endif /* CONFIG_REISERFS_FS_XATTR */
+
+#ifndef CONFIG_REISERFS_FS_SECURITY
+static inline int reiserfs_security_init(struct inode *dir,
+ struct inode *inode,
+ struct reiserfs_security_handle *sec)
- {
- return 0;
--};
--static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags)
++{
++ return 0;
+}
+static inline int
+reiserfs_security_write(struct reiserfs_transaction_handle *th,
+ struct inode *inode,
+ struct reiserfs_security_handle *sec)
- {
-- sb->s_flags = (sb->s_flags & ~MS_POSIXACL); /* to be sure */
- return 0;
--};
--static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
--{
- }
--#endif /* CONFIG_REISERFS_FS_XATTR */
++{
++ return 0;
++}
+static inline void reiserfs_security_free(struct reiserfs_security_handle *sec)
+{}
+#endif
-
++
#endif /* __KERNEL__ */
-diff -purN linux-2.6.27/include/linux/reserve.h linux-2.6.27.19-5.1/include/linux/reserve.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/reserve.h 2009-03-25 16:11:50.000000000 +0000
+ #endif /* _LINUX_REISERFS_XATTR_H */
+diff -r 9608d5473017 include/linux/reserve.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/reserve.h Wed May 06 16:56:57 2009 +0100
@@ -0,0 +1,198 @@
+/*
+ * Memory reserve management.
+}
+
+#endif /* _LINUX_RESERVE_H */
-diff -purN linux-2.6.27/include/linux/resource.h linux-2.6.27.19-5.1/include/linux/resource.h
---- linux-2.6.27/include/linux/resource.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/resource.h 2009-03-25 16:11:48.000000000 +0000
-@@ -59,10 +59,10 @@ struct rlimit {
+diff -r 9608d5473017 include/linux/resource.h
+--- a/include/linux/resource.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/resource.h Wed May 06 16:56:57 2009 +0100
+@@ -59,10 +59,10 @@
#define _STK_LIM (8*1024*1024)
/*
/*
* Due to binary compatibility, the actual resource numbers
-diff -purN linux-2.6.27/include/linux/rtnetlink.h linux-2.6.27.19-5.1/include/linux/rtnetlink.h
---- linux-2.6.27/include/linux/rtnetlink.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/rtnetlink.h 2009-03-25 16:11:49.000000000 +0000
-@@ -107,6 +107,11 @@ enum {
+diff -r 9608d5473017 include/linux/rtnetlink.h
+--- a/include/linux/rtnetlink.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/rtnetlink.h Wed May 06 16:56:57 2009 +0100
+@@ -106,6 +106,11 @@
+ #define RTM_NEWADDRLABEL RTM_NEWADDRLABEL
RTM_GETADDRLABEL,
#define RTM_GETADDRLABEL RTM_GETADDRLABEL
-
++
+ RTM_GETDCB = 78,
+#define RTM_GETDCB RTM_GETDCB
+ RTM_SETDCB,
+#define RTM_SETDCB RTM_SETDCB
-+
+
__RTM_MAX,
#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
- };
-diff -purN linux-2.6.27/include/linux/sched.h linux-2.6.27.19-5.1/include/linux/sched.h
---- linux-2.6.27/include/linux/sched.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/sched.h 2009-03-25 16:11:49.000000000 +0000
-@@ -96,6 +96,7 @@ struct exec_domain;
+diff -r 9608d5473017 include/linux/sched.h
+--- a/include/linux/sched.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/sched.h Wed May 06 16:56:57 2009 +0100
+@@ -96,6 +96,7 @@
struct futex_pi_state;
struct robust_list_head;
struct bio;
/*
* List of flags we want to share for kernel threads,
-@@ -407,8 +408,9 @@ extern int get_dumpable(struct mm_struct
+@@ -407,8 +408,9 @@
#define MMF_DUMP_FILTER_BITS 5
#define MMF_DUMP_FILTER_MASK \
(((1 << MMF_DUMP_FILTER_BITS) - 1) << MMF_DUMP_FILTER_SHIFT)
struct sighand_struct {
atomic_t count;
-@@ -587,6 +589,10 @@ struct user_struct {
+@@ -586,6 +588,10 @@
+ #ifdef CONFIG_INOTIFY_USER
atomic_t inotify_watches; /* How many inotify watches does this user have? */
atomic_t inotify_devs; /* How many inotify devs does this user have opened? */
- #endif
++#endif
+#ifdef CONFIG_EPOLL
+ atomic_t epoll_devs; /* DO NOT USE, ONLY HERE TO KEEP ABI STABLE */
+ atomic_t epoll_watches; /* The number of file descriptors currently watched */
-+#endif
+ #endif
#ifdef CONFIG_POSIX_MQUEUE
/* protected by mq_lock */
- unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */
-@@ -1015,13 +1021,12 @@ struct sched_rt_entity {
+@@ -1015,13 +1021,12 @@
int nr_cpus_allowed;
struct sched_rt_entity *back;
};
struct task_struct {
-@@ -1196,6 +1201,11 @@ struct task_struct {
+@@ -1196,6 +1201,11 @@
#endif
seccomp_t seccomp;
/* Thread group tracking */
u32 parent_exec_id;
u32 self_exec_id;
-@@ -1286,7 +1296,9 @@ struct task_struct {
+@@ -1286,7 +1296,9 @@
atomic_t fs_excl; /* holding fs exclusive resources */
struct rcu_head rcu;
* cache last used pipe for splice
*/
struct pipe_inode_info *splice_pipe;
-@@ -1301,6 +1313,10 @@ struct task_struct {
+@@ -1300,6 +1312,10 @@
+ #ifdef CONFIG_LATENCYTOP
int latency_record_count;
struct latency_record latency_record[LT_SAVECOUNT];
- #endif
++#endif
+ u64 instrumentation;
+#ifdef CONFIG_PERFMON
+ struct pfm_context *pfm_context;
-+#endif
+ #endif
};
- /*
-@@ -1537,6 +1553,13 @@ extern cputime_t task_gtime(struct task_
+@@ -1536,6 +1552,13 @@
+ /* NOTE: this will return 0 or PF_USED_MATH, it will never return 1 */
#define tsk_used_math(p) ((p)->flags & PF_USED_MATH)
#define used_math() tsk_used_math(current)
-
++
+static inline void tsk_restore_flags(struct task_struct *p,
+ unsigned long pflags, unsigned long mask)
+{
+ p->flags &= ~mask;
+ p->flags |= pflags & mask;
+}
-+
+
#ifdef CONFIG_SMP
extern int set_cpus_allowed_ptr(struct task_struct *p,
- const cpumask_t *new_mask);
-diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/linux/security.h
---- linux-2.6.27/include/linux/security.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/security.h 2009-03-25 16:11:48.000000000 +0000
-@@ -54,9 +54,11 @@ extern void cap_capset_set(struct task_s
+diff -r 9608d5473017 include/linux/security.h
+--- a/include/linux/security.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/security.h Wed May 06 16:56:57 2009 +0100
+@@ -54,9 +54,11 @@
extern int cap_bprm_set_security(struct linux_binprm *bprm);
extern void cap_bprm_apply_creds(struct linux_binprm *bprm, int unsafe);
extern int cap_bprm_secureexec(struct linux_binprm *bprm);
extern int cap_inode_need_killpriv(struct dentry *dentry);
extern int cap_inode_killpriv(struct dentry *dentry);
extern int cap_task_post_setuid(uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags);
-@@ -337,23 +339,28 @@ static inline void security_free_mnt_opt
+@@ -337,23 +339,28 @@
* Check permission to create a regular file.
* @dir contains inode structure of the parent of the new file.
* @dentry contains the dentry structure for the file to be created.
* @old_name contains the pathname of file.
* Return 0 if permission is granted.
* @inode_mkdir:
-@@ -361,12 +368,14 @@ static inline void security_free_mnt_opt
+@@ -361,12 +368,14 @@
* associated with inode strcture @dir.
* @dir containst the inode structure of parent of the directory to be created.
* @dentry contains the dentry structure of new directory.
* Return 0 if permission is granted.
* @inode_mknod:
* Check permissions when creating a special file (or a socket or a fifo
-@@ -375,6 +384,7 @@ static inline void security_free_mnt_opt
+@@ -375,6 +384,7 @@
* and not this hook.
* @dir contains the inode structure of parent of the new file.
* @dentry contains the dentry structure of the new file.
* @mode contains the mode of the new file.
* @dev contains the device number.
* Return 0 if permission is granted.
-@@ -382,12 +392,15 @@ static inline void security_free_mnt_opt
+@@ -382,12 +392,15 @@
* Check for permission to rename a file or directory.
* @old_dir contains the inode structure for parent of the old link.
* @old_dentry contains the dentry structure of the old link.
* Return 0 if permission is granted.
* @inode_follow_link:
* Check permission to follow a symbolic link when looking up a pathname.
-@@ -411,6 +424,7 @@ static inline void security_free_mnt_opt
+@@ -411,6 +424,7 @@
* file attributes change (such as when a file is truncated, chown/chmod
* operations, transferring disk quotas, etc).
* @dentry contains the dentry structure for the file.
* @attr is the iattr structure containing the new file attributes.
* Return 0 if permission is granted.
* @inode_getattr:
-@@ -426,18 +440,18 @@ static inline void security_free_mnt_opt
+@@ -426,18 +440,18 @@
* inode.
* @inode_setxattr:
* Check permission before setting the extended attributes
* Return 0 if permission is granted.
* @inode_removexattr:
* Check permission before removing the extended attribute
-@@ -578,6 +592,20 @@ static inline void security_free_mnt_opt
+@@ -578,6 +592,20 @@
* file_permission, and recheck access if anything has changed
* since inode_permission.
*
* Security hooks for task operations.
*
* @task_create:
-@@ -1354,32 +1382,45 @@ struct security_operations {
+@@ -1354,32 +1382,45 @@
void (*inode_free_security) (struct inode *inode);
int (*inode_init_security) (struct inode *inode, struct inode *dir,
char **name, void **value, size_t *len);
int (*inode_need_killpriv) (struct dentry *dentry);
int (*inode_killpriv) (struct dentry *dentry);
int (*inode_getsecurity) (const struct inode *inode, const char *name, void **buffer, bool alloc);
-@@ -1407,6 +1448,7 @@ struct security_operations {
+@@ -1407,6 +1448,7 @@
struct fown_struct *fown, int sig);
int (*file_receive) (struct file *file);
int (*dentry_open) (struct file *file);
int (*task_create) (unsigned long clone_flags);
int (*task_alloc_security) (struct task_struct *p);
-@@ -1622,30 +1664,43 @@ int security_inode_alloc(struct inode *i
+@@ -1622,30 +1664,43 @@
void security_inode_free(struct inode *inode);
int security_inode_init_security(struct inode *inode, struct inode *dir,
char **name, void **value, size_t *len);
int security_inode_need_killpriv(struct dentry *dentry);
int security_inode_killpriv(struct dentry *dentry);
int security_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc);
-@@ -1668,6 +1723,7 @@ int security_file_send_sigiotask(struct
+@@ -1668,6 +1723,7 @@
struct fown_struct *fown, int sig);
int security_file_receive(struct file *file);
int security_dentry_open(struct file *file);
int security_task_create(unsigned long clone_flags);
int security_task_alloc(struct task_struct *p);
void security_task_free(struct task_struct *p);
-@@ -1968,26 +2024,31 @@ static inline int security_inode_init_se
+@@ -1968,26 +2024,31 @@
static inline int security_inode_create(struct inode *dir,
struct dentry *dentry,
const char *old_name)
{
return 0;
-@@ -1995,19 +2056,22 @@ static inline int security_inode_symlink
+@@ -1995,19 +2056,22 @@
static inline int security_inode_mkdir(struct inode *dir,
struct dentry *dentry,
int mode, dev_t dev)
{
return 0;
-@@ -2015,13 +2079,16 @@ static inline int security_inode_mknod(s
+@@ -2015,13 +2079,16 @@
static inline int security_inode_rename(struct inode *old_dir,
struct dentry *old_dentry,
{
return 0;
}
-@@ -2038,7 +2105,8 @@ static inline int security_inode_permiss
+@@ -2038,7 +2105,8 @@
}
static inline int security_inode_setattr(struct dentry *dentry,
{
return 0;
}
-@@ -2053,30 +2121,42 @@ static inline void security_inode_delete
+@@ -2053,30 +2121,42 @@
{ }
static inline int security_inode_setxattr(struct dentry *dentry,
}
static inline int security_inode_need_killpriv(struct dentry *dentry)
-@@ -2177,6 +2257,11 @@ static inline int security_dentry_open(s
- return 0;
+@@ -2173,6 +2253,11 @@
}
-+static inline int security_path_permission(struct path *path, int mask)
+ static inline int security_dentry_open(struct file *file)
+{
+ return 0;
+}
+
- static inline int security_task_create(unsigned long clone_flags)
++static inline int security_path_permission(struct path *path, int mask)
{
return 0;
-diff -purN linux-2.6.27/include/linux/sem.h linux-2.6.27.19-5.1/include/linux/sem.h
---- linux-2.6.27/include/linux/sem.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/sem.h 2009-03-25 16:11:48.000000000 +0000
-@@ -63,7 +63,7 @@ struct seminfo {
+ }
+diff -r 9608d5473017 include/linux/sem.h
+--- a/include/linux/sem.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/sem.h Wed May 06 16:56:57 2009 +0100
+@@ -63,7 +63,7 @@
int semaem;
};
#define SEMMSL 250 /* <= 8 000 max num of semaphores per id */
#define SEMMNS (SEMMNI*SEMMSL) /* <= INT_MAX max # of semaphores in system */
#define SEMOPM 32 /* <= 1 000 max num of ops per semop call */
-diff -purN linux-2.6.27/include/linux/shm.h linux-2.6.27.19-5.1/include/linux/shm.h
---- linux-2.6.27/include/linux/shm.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/shm.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/shm.h
+--- a/include/linux/shm.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/shm.h Wed May 06 16:56:57 2009 +0100
@@ -14,7 +14,7 @@
* be increased by sysctl
*/
#define SHMMIN 1 /* min shared seg size (bytes) */
#define SHMMNI 4096 /* max num of segs system wide */
#ifdef __KERNEL__
-diff -purN linux-2.6.27/include/linux/skbuff.h linux-2.6.27.19-5.1/include/linux/skbuff.h
---- linux-2.6.27/include/linux/skbuff.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/skbuff.h 2009-03-25 16:11:48.000000000 +0000
-@@ -217,6 +217,8 @@ typedef unsigned char *sk_buff_data_t;
+diff -r 9608d5473017 include/linux/skbuff.h
+--- a/include/linux/skbuff.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/skbuff.h Wed May 06 16:56:57 2009 +0100
+@@ -217,6 +217,8 @@
* @local_df: allow local fragmentation
* @cloned: Head may be cloned (check refcnt to be sure)
* @nohdr: Payload reference only, must not modify header
* @pkt_type: Packet class
* @fclone: skbuff clone status
* @ip_summed: Driver fed us an IP checksum
-@@ -320,7 +322,14 @@ struct sk_buff {
+@@ -320,7 +322,14 @@
#if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE)
__u8 do_not_encrypt:1;
#endif
#ifdef CONFIG_NET_DMA
dma_cookie_t dma_cookie;
-@@ -353,10 +362,22 @@ struct sk_buff {
+@@ -353,10 +362,22 @@
#include <asm/system.h>
static inline struct sk_buff *alloc_skb(unsigned int size,
gfp_t priority)
{
-@@ -366,7 +387,7 @@ static inline struct sk_buff *alloc_skb(
+@@ -366,7 +387,7 @@
static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
gfp_t priority)
{
}
extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src);
-@@ -829,6 +850,9 @@ static inline void skb_fill_page_desc(st
+@@ -829,6 +850,9 @@
skb_shinfo(skb)->nr_frags = i + 1;
}
#define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags)
#define SKB_FRAG_ASSERT(skb) BUG_ON(skb_shinfo(skb)->frag_list)
#define SKB_LINEAR_ASSERT(skb) BUG_ON(skb_is_nonlinear(skb))
-@@ -1213,7 +1237,8 @@ static inline void __skb_queue_purge(str
+@@ -1213,7 +1237,8 @@
static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
gfp_t gfp_mask)
{
if (likely(skb))
skb_reserve(skb, NET_SKB_PAD);
return skb;
-@@ -1243,6 +1268,27 @@ static inline struct sk_buff *netdev_all
+@@ -1241,6 +1266,27 @@
+ unsigned int length)
+ {
return __netdev_alloc_skb(dev, length, GFP_ATOMIC);
- }
-
++}
++
+extern struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask);
+extern void __netdev_free_page(struct net_device *dev, struct page *page);
+
+static inline void netdev_free_page(struct net_device *dev, struct page *page)
+{
+ __netdev_free_page(dev, page);
-+}
-+
+ }
+
/**
- * skb_clone_writable - is the header of a clone writable
- * @skb: buffer to check
-@@ -1725,5 +1771,12 @@ static inline void skb_forward_csum(stru
+@@ -1725,5 +1771,12 @@
}
bool skb_partial_csum_set(struct sk_buff *skb, u16 start, u16 off);
+
#endif /* __KERNEL__ */
#endif /* _LINUX_SKBUFF_H */
-diff -purN linux-2.6.27/include/linux/slab.h linux-2.6.27.19-5.1/include/linux/slab.h
---- linux-2.6.27/include/linux/slab.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/slab.h 2009-03-25 16:11:48.000000000 +0000
-@@ -65,6 +65,8 @@ void kmem_cache_free(struct kmem_cache *
+diff -r 9608d5473017 include/linux/slab.h
+--- a/include/linux/slab.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/slab.h Wed May 06 16:56:57 2009 +0100
+@@ -65,6 +65,8 @@
unsigned int kmem_cache_size(struct kmem_cache *);
const char *kmem_cache_name(struct kmem_cache *);
int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);
/*
* Please use this macro to create slab caches. Simply specify the
-@@ -100,6 +102,8 @@ void * __must_check __krealloc(const voi
+@@ -100,6 +102,8 @@
void * __must_check krealloc(const void *, size_t, gfp_t);
void kfree(const void *);
size_t ksize(const void *);
/*
* Allocator specific definitions. These are mainly used to establish optimized
-@@ -226,13 +230,14 @@ static inline void *kmem_cache_alloc_nod
+@@ -226,12 +230,13 @@
*/
#if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB)
extern void *__kmalloc_track_caller(size_t, gfp_t, void*);
--#define kmalloc_track_caller(size, flags) \
-- __kmalloc_track_caller(size, flags, __builtin_return_address(0))
- #else
--#define kmalloc_track_caller(size, flags) \
++#else
+#define __kmalloc_track_caller(size, flags, ip) \
- __kmalloc(size, flags)
- #endif /* DEBUG_SLAB */
-
-+#define kmalloc_track_caller(size, flags) \
-+ __kmalloc_track_caller(size, flags, __builtin_return_address(0))
++ __kmalloc(size, flags)
++#endif /* DEBUG_SLAB */
+
+ #define kmalloc_track_caller(size, flags) \
+ __kmalloc_track_caller(size, flags, __builtin_return_address(0))
+-#else
+-#define kmalloc_track_caller(size, flags) \
+- __kmalloc(size, flags)
+-#endif /* DEBUG_SLAB */
+
#ifdef CONFIG_NUMA
/*
- * kmalloc_node_track_caller is a special version of kmalloc_node that
-@@ -244,21 +249,22 @@ extern void *__kmalloc_track_caller(size
+@@ -244,20 +249,21 @@
*/
#if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB)
extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, void *);
+ __kmalloc_track_caller(size, flags, ip)
#endif /* DEBUG_SLAB */
-
++
+#define kmalloc_node_track_caller(size, flags, node) \
+ __kmalloc_node_track_caller(size, flags, node, \
+ __builtin_return_address(0))
-+
+
/*
* Shortcuts
- */
-diff -purN linux-2.6.27/include/linux/slub_def.h linux-2.6.27.19-5.1/include/linux/slub_def.h
---- linux-2.6.27/include/linux/slub_def.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/slub_def.h 2009-03-25 16:11:48.000000000 +0000
-@@ -38,6 +38,7 @@ struct kmem_cache_cpu {
+diff -r 9608d5473017 include/linux/slub_def.h
+--- a/include/linux/slub_def.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/slub_def.h Wed May 06 16:56:57 2009 +0100
+@@ -38,6 +38,7 @@
int node; /* The node of the page (or -1 for debug) */
unsigned int offset; /* Freepointer offset (in word units) */
unsigned int objsize; /* Size of an object (from kmem_cache) */
#ifdef CONFIG_SLUB_STATS
unsigned stat[NR_SLUB_STAT_ITEMS];
#endif
-diff -purN linux-2.6.27/include/linux/spinlock.h linux-2.6.27.19-5.1/include/linux/spinlock.h
---- linux-2.6.27/include/linux/spinlock.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/spinlock.h 2009-03-25 16:11:50.000000000 +0000
-@@ -148,9 +148,11 @@ do { \
+diff -r 9608d5473017 include/linux/spinlock.h
+--- a/include/linux/spinlock.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/spinlock.h Wed May 06 16:56:57 2009 +0100
+@@ -148,9 +148,11 @@
extern int _raw_spin_trylock(spinlock_t *lock);
extern void _raw_spin_unlock(spinlock_t *lock);
extern void _raw_read_lock(rwlock_t *lock);
extern int _raw_write_trylock(rwlock_t *lock);
extern void _raw_write_unlock(rwlock_t *lock);
#else
-@@ -160,9 +162,13 @@ do { \
+@@ -160,9 +162,13 @@
# define _raw_spin_trylock(lock) __raw_spin_trylock(&(lock)->raw_lock)
# define _raw_spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock)
# define _raw_read_lock(rwlock) __raw_read_lock(&(rwlock)->raw_lock)
# define _raw_write_trylock(rwlock) __raw_write_trylock(&(rwlock)->raw_lock)
# define _raw_write_unlock(rwlock) __raw_write_unlock(&(rwlock)->raw_lock)
#endif
-diff -purN linux-2.6.27/include/linux/squashfs_fs.h linux-2.6.27.19-5.1/include/linux/squashfs_fs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/squashfs_fs.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/squashfs_fs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/squashfs_fs.h Wed May 06 16:56:57 2009 +0100
@@ -0,0 +1,935 @@
+#ifndef SQUASHFS_FS
+#define SQUASHFS_FS
+
+#endif
+#endif
-diff -purN linux-2.6.27/include/linux/squashfs_fs_i.h linux-2.6.27.19-5.1/include/linux/squashfs_fs_i.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/squashfs_fs_i.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/squashfs_fs_i.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/squashfs_fs_i.h Wed May 06 16:56:57 2009 +0100
@@ -0,0 +1,45 @@
+#ifndef SQUASHFS_FS_I
+#define SQUASHFS_FS_I
+ struct inode vfs_inode;
+};
+#endif
-diff -purN linux-2.6.27/include/linux/squashfs_fs_sb.h linux-2.6.27.19-5.1/include/linux/squashfs_fs_sb.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/squashfs_fs_sb.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/squashfs_fs_sb.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/squashfs_fs_sb.h Wed May 06 16:56:57 2009 +0100
@@ -0,0 +1,79 @@
+#ifndef SQUASHFS_FS_SB
+#define SQUASHFS_FS_SB
+ int (*read_fragment_index_table)(struct super_block *s);
+};
+#endif
-diff -purN linux-2.6.27/include/linux/string_helpers.h linux-2.6.27.19-5.1/include/linux/string_helpers.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/string_helpers.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/string_helpers.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/string_helpers.h Wed May 06 16:56:57 2009 +0100
@@ -0,0 +1,16 @@
+#ifndef _LINUX_STRING_HELPERS_H_
+#define _LINUX_STRING_HELPERS_H_
+ char *buf, int len);
+
+#endif
-diff -purN linux-2.6.27/include/linux/sunrpc/xprt.h linux-2.6.27.19-5.1/include/linux/sunrpc/xprt.h
---- linux-2.6.27/include/linux/sunrpc/xprt.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/sunrpc/xprt.h 2009-03-25 16:11:48.000000000 +0000
-@@ -147,7 +147,9 @@ struct rpc_xprt {
+diff -r 9608d5473017 include/linux/sunrpc/xprt.h
+--- a/include/linux/sunrpc/xprt.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/sunrpc/xprt.h Wed May 06 16:56:57 2009 +0100
+@@ -147,7 +147,9 @@
unsigned int max_reqs; /* total slots */
unsigned long state; /* transport state */
unsigned char shutdown : 1, /* being shut down */
unsigned int bind_index; /* bind function index */
/*
-@@ -249,6 +251,7 @@ void xprt_release_rqst_cong(struct rpc
+@@ -249,6 +251,7 @@
void xprt_disconnect_done(struct rpc_xprt *xprt);
void xprt_force_disconnect(struct rpc_xprt *xprt);
void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie);
/*
* Reserved bit positions in xprt->state
-diff -purN linux-2.6.27/include/linux/suspend.h linux-2.6.27.19-5.1/include/linux/suspend.h
---- linux-2.6.27/include/linux/suspend.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/suspend.h 2009-03-25 16:11:50.000000000 +0000
-@@ -232,6 +232,7 @@ extern unsigned long get_safe_page(gfp_t
+diff -r 9608d5473017 include/linux/suspend.h
+--- a/include/linux/suspend.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/suspend.h Wed May 06 16:56:57 2009 +0100
+@@ -232,6 +232,7 @@
extern void hibernation_set_ops(struct platform_hibernation_ops *ops);
extern int hibernate(void);
#else /* CONFIG_HIBERNATION */
static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }
static inline void swsusp_set_page_free(struct page *p) {}
-@@ -239,6 +240,7 @@ static inline void swsusp_unset_page_fre
+@@ -239,6 +240,7 @@
static inline void hibernation_set_ops(struct platform_hibernation_ops *ops) {}
static inline int hibernate(void) { return -ENOSYS; }
#endif /* CONFIG_HIBERNATION */
#ifdef CONFIG_PM_SLEEP
-diff -purN linux-2.6.27/include/linux/swap.h linux-2.6.27.19-5.1/include/linux/swap.h
---- linux-2.6.27/include/linux/swap.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/swap.h 2009-03-25 16:11:48.000000000 +0000
-@@ -120,6 +120,7 @@ enum {
+diff -r 9608d5473017 include/linux/swap.h
+--- a/include/linux/swap.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/swap.h Wed May 06 16:56:57 2009 +0100
+@@ -120,6 +120,7 @@
SWP_USED = (1 << 0), /* is slot in swap_info[] used? */
SWP_WRITEOK = (1 << 1), /* ok to write to this swap? */
SWP_ACTIVE = (SWP_USED | SWP_WRITEOK),
/* add others here before... */
SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */
};
-@@ -217,6 +218,8 @@ extern void swap_unplug_io_fn(struct bac
+@@ -217,6 +218,8 @@
/* linux/mm/page_io.c */
extern int swap_readpage(struct file *, struct page *);
extern int swap_writepage(struct page *page, struct writeback_control *wbc);
extern void end_swap_bio_read(struct bio *bio, int err);
/* linux/mm/swap_state.c */
-@@ -249,6 +252,7 @@ extern unsigned int count_swap_pages(int
+@@ -249,6 +252,7 @@
extern sector_t map_swap_page(struct swap_info_struct *, pgoff_t);
extern sector_t swapdev_block(int, pgoff_t);
extern struct swap_info_struct *get_swap_info_struct(unsigned);
extern int can_share_swap_page(struct page *);
extern int remove_exclusive_swap_page(struct page *);
struct backing_dev_info;
-diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/linux/syscalls.h
---- linux-2.6.27/include/linux/syscalls.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/syscalls.h 2009-03-25 16:11:48.000000000 +0000
-@@ -29,6 +29,13 @@ struct msqid_ds;
+diff -r 9608d5473017 include/linux/syscalls.h
+--- a/include/linux/syscalls.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/syscalls.h Wed May 06 16:56:57 2009 +0100
+@@ -29,6 +29,13 @@
struct new_utsname;
struct nfsctl_arg;
struct __old_kernel_stat;
struct pollfd;
struct rlimit;
struct rusage;
-@@ -54,6 +61,7 @@ struct compat_stat;
+@@ -54,6 +61,7 @@
struct compat_timeval;
struct robust_list_head;
struct getcpu_cache;
#include <linux/types.h>
#include <linux/aio_abi.h>
-@@ -65,6 +73,74 @@ struct getcpu_cache;
+@@ -64,6 +72,74 @@
+ #include <asm/signal.h>
#include <linux/quota.h>
#include <linux/key.h>
-
++
+#define __SC_DECL1(t1, a1) t1 a1
+#define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__)
+#define __SC_DECL3(t3, a3, ...) t3 a3, __SC_DECL2(__VA_ARGS__)
+ asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__))
+
+#endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */
-+
+
asmlinkage long sys_time(time_t __user *tloc);
asmlinkage long sys_stime(time_t __user *tptr);
- asmlinkage long sys_gettimeofday(struct timeval __user *tv,
-@@ -77,7 +153,7 @@ asmlinkage long sys_times(struct tms __u
+@@ -77,7 +153,7 @@
asmlinkage long sys_gettid(void);
asmlinkage long sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp);
asmlinkage long sys_getpid(void);
asmlinkage long sys_getppid(void);
asmlinkage long sys_getuid(void);
-@@ -166,7 +242,7 @@ asmlinkage long sys_kexec_load(unsigned
+@@ -166,7 +242,7 @@
unsigned long flags);
asmlinkage long sys_exit(int error_code);
asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr,
int options, struct rusage __user *ru);
asmlinkage long sys_waitid(int which, pid_t pid,
-@@ -196,7 +272,7 @@ asmlinkage long sys_tkill(int pid, int s
+@@ -196,7 +272,7 @@
asmlinkage long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo);
asmlinkage long sys_sgetmask(void);
asmlinkage long sys_ssetmask(int newmask);
asmlinkage long sys_pause(void);
asmlinkage long sys_sync(void);
-@@ -246,29 +322,29 @@ asmlinkage long sys_lsetxattr(const char
+@@ -246,29 +322,29 @@
const void __user *value, size_t size, int flags);
asmlinkage long sys_fsetxattr(int fd, const char __user *name,
const void __user *value, size_t size, int flags);
asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size,
unsigned long prot, unsigned long pgoff,
unsigned long flags);
-@@ -321,10 +397,10 @@ asmlinkage long sys_io_submit(aio_contex
+@@ -321,10 +397,10 @@
struct iocb __user * __user *);
asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb,
struct io_event __user *result);
asmlinkage long sys_readlink(const char __user *path,
char __user *buf, int bufsiz);
asmlinkage long sys_creat(const char __user *pathname, int mode);
-@@ -368,26 +444,25 @@ asmlinkage long sys_utime(char __user *f
+@@ -368,26 +444,25 @@
struct utimbuf __user *times);
asmlinkage long sys_utimes(char __user *filename,
struct timeval __user *utimes);
asmlinkage long sys_getcwd(char __user *buf, unsigned long size);
asmlinkage long sys_mkdir(const char __user *pathname, int mode);
asmlinkage long sys_chdir(const char __user *filename);
-@@ -477,7 +552,7 @@ asmlinkage long sys_shmctl(int shmid, in
+@@ -477,7 +552,7 @@
asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr);
asmlinkage long sys_mq_unlink(const char __user *name);
asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec __user *abs_timeout);
asmlinkage long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification);
asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat);
-@@ -531,11 +606,6 @@ asmlinkage long sys_move_pages(pid_t pid
+@@ -531,11 +606,6 @@
const int __user *nodes,
int __user *status,
int flags);
asmlinkage long sys_mbind(unsigned long start, unsigned long len,
unsigned long mode,
unsigned long __user *nmask,
-@@ -550,7 +620,7 @@ asmlinkage long sys_inotify_init(void);
+@@ -550,7 +620,7 @@
asmlinkage long sys_inotify_init1(int flags);
asmlinkage long sys_inotify_add_watch(int fd, const char __user *path,
u32 mask);
asmlinkage long sys_spu_run(int fd, __u32 __user *unpc,
__u32 __user *ustatus);
-@@ -584,13 +654,6 @@ asmlinkage long sys_readlinkat(int dfd,
+@@ -584,13 +654,6 @@
int bufsiz);
asmlinkage long sys_utimensat(int dfd, char __user *filename,
struct timespec __user *utimes, int flags);
asmlinkage long sys_unshare(unsigned long unshare_flags);
asmlinkage long sys_splice(int fd_in, loff_t __user *off_in,
-@@ -622,6 +685,15 @@ asmlinkage long sys_timerfd_gettime(int
+@@ -622,6 +685,15 @@
asmlinkage long sys_eventfd(unsigned int count);
asmlinkage long sys_eventfd2(unsigned int count, int flags);
asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len);
int kernel_execve(const char *filename, char *const argv[], char *const envp[]);
-diff -purN linux-2.6.27/include/linux/sysctl.h linux-2.6.27.19-5.1/include/linux/sysctl.h
---- linux-2.6.27/include/linux/sysctl.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/sysctl.h 2009-03-25 16:11:50.000000000 +0000
-@@ -69,6 +69,7 @@ enum
+diff -r 9608d5473017 include/linux/sysctl.h
+--- a/include/linux/sysctl.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/sysctl.h Wed May 06 16:56:57 2009 +0100
+@@ -69,6 +69,7 @@
CTL_BUS=8, /* Busses */
CTL_ABI=9, /* Binary emulation */
CTL_CPU=10, /* CPU stuff (speed scaling, etc) */
CTL_ARLAN=254, /* arlan wireless driver */
CTL_S390DBF=5677, /* s390 debug */
CTL_SUNRPC=7249, /* sunrpc debug */
-@@ -163,6 +164,9 @@ enum
+@@ -163,6 +164,9 @@
KERN_MAX_LOCK_DEPTH=74,
KERN_NMI_WATCHDOG=75, /* int: enable/disable nmi watchdog */
KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */
};
-@@ -996,6 +1000,8 @@ extern int proc_doulongvec_minmax(struct
+@@ -996,6 +1000,8 @@
extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
struct file *, void __user *, size_t *, loff_t *);
extern int do_sysctl (int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen);
-diff -purN linux-2.6.27/include/linux/sysfs.h linux-2.6.27.19-5.1/include/linux/sysfs.h
---- linux-2.6.27/include/linux/sysfs.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/sysfs.h 2009-03-25 16:11:48.000000000 +0000
-@@ -121,6 +121,8 @@ void sysfs_notify(struct kobject *kobj,
+diff -r 9608d5473017 include/linux/sysfs.h
+--- a/include/linux/sysfs.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/sysfs.h Wed May 06 16:56:57 2009 +0100
+@@ -120,6 +120,8 @@
+ void sysfs_notify(struct kobject *kobj, char *dir, char *attr);
extern int __must_check sysfs_init(void);
-
-+void sysfs_printk_last_file(void);
+
++void sysfs_printk_last_file(void);
+
#else /* CONFIG_SYSFS */
- static inline int sysfs_schedule_callback(struct kobject *kobj,
-@@ -231,6 +233,11 @@ static inline int __must_check sysfs_ini
+@@ -231,6 +233,11 @@
return 0;
}
#endif /* CONFIG_SYSFS */
#endif /* _SYSFS_H_ */
-diff -purN linux-2.6.27/include/linux/tc_act/Kbuild linux-2.6.27.19-5.1/include/linux/tc_act/Kbuild
---- linux-2.6.27/include/linux/tc_act/Kbuild 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/tc_act/Kbuild 2009-03-25 16:11:49.000000000 +0000
-@@ -3,3 +3,4 @@ header-y += tc_ipt.h
+diff -r 9608d5473017 include/linux/tc_act/Kbuild
+--- a/include/linux/tc_act/Kbuild Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/tc_act/Kbuild Wed May 06 16:56:57 2009 +0100
+@@ -3,3 +3,4 @@
header-y += tc_mirred.h
header-y += tc_pedit.h
header-y += tc_nat.h
+header-y += tc_skbedit.h
-diff -purN linux-2.6.27/include/linux/tc_act/tc_skbedit.h linux-2.6.27.19-5.1/include/linux/tc_act/tc_skbedit.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/tc_act/tc_skbedit.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/tc_act/tc_skbedit.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/tc_act/tc_skbedit.h Wed May 06 16:56:57 2009 +0100
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2008, Intel Corporation.
+#define TCA_SKBEDIT_MAX (__TCA_SKBEDIT_MAX - 1)
+
+#endif
-diff -purN linux-2.6.27/include/linux/time.h linux-2.6.27.19-5.1/include/linux/time.h
---- linux-2.6.27/include/linux/time.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/time.h 2009-03-25 16:11:50.000000000 +0000
-@@ -99,6 +99,7 @@ extern unsigned long read_persistent_clo
+diff -r 9608d5473017 include/linux/time.h
+--- a/include/linux/time.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/time.h Wed May 06 16:56:57 2009 +0100
+@@ -99,6 +99,7 @@
extern int update_persistent_clock(struct timespec now);
extern int no_sync_cmos_clock __read_mostly;
void timekeeping_init(void);
unsigned long get_seconds(void);
struct timespec current_kernel_time(void);
-diff -purN linux-2.6.27/include/linux/timer.h linux-2.6.27.19-5.1/include/linux/timer.h
---- linux-2.6.27/include/linux/timer.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/timer.h 2009-03-25 16:11:48.000000000 +0000
-@@ -186,4 +186,9 @@ unsigned long __round_jiffies_relative(u
+diff -r 9608d5473017 include/linux/timer.h
+--- a/include/linux/timer.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/timer.h Wed May 06 16:56:57 2009 +0100
+@@ -186,4 +186,9 @@
unsigned long round_jiffies(unsigned long j);
unsigned long round_jiffies_relative(unsigned long j);
+unsigned long round_jiffies_up_relative(unsigned long j);
+
#endif
-diff -purN linux-2.6.27/include/linux/topology.h linux-2.6.27.19-5.1/include/linux/topology.h
---- linux-2.6.27/include/linux/topology.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/topology.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/topology.h
+--- a/include/linux/topology.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/topology.h Wed May 06 16:56:57 2009 +0100
@@ -49,7 +49,7 @@
for_each_online_node(node) \
if (nr_cpus_node(node))
/* Conform to ACPI 2.0 SLIT distance definitions */
#define LOCAL_DISTANCE 10
-@@ -99,8 +99,7 @@ void arch_update_cpu_topology(void);
+@@ -99,8 +99,7 @@
| SD_BALANCE_FORK \
| SD_BALANCE_EXEC \
| SD_WAKE_AFFINE \
.last_balance = jiffies, \
.balance_interval = 1, \
}
-diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/linux/tracehook.h
---- linux-2.6.27/include/linux/tracehook.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/tracehook.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/tracehook.h
+--- a/include/linux/tracehook.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/tracehook.h Wed May 06 16:56:57 2009 +0100
@@ -49,6 +49,7 @@
#include <linux/sched.h>
#include <linux/ptrace.h>
struct linux_binprm;
/**
-@@ -63,6 +64,8 @@ struct linux_binprm;
+@@ -63,6 +64,8 @@
*/
static inline int tracehook_expect_breakpoints(struct task_struct *task)
{
return (task_ptrace(task) & PT_PTRACED) != 0;
}
-@@ -111,6 +114,9 @@ static inline void ptrace_report_syscall
+@@ -111,6 +114,9 @@
static inline __must_check int tracehook_report_syscall_entry(
struct pt_regs *regs)
{
ptrace_report_syscall(regs);
return 0;
}
-@@ -134,6 +140,8 @@ static inline __must_check int tracehook
+@@ -134,6 +140,8 @@
*/
static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step)
{
ptrace_report_syscall(regs);
}
-@@ -155,6 +163,8 @@ static inline int tracehook_unsafe_exec(
+@@ -155,6 +163,8 @@
else
unsafe |= LSM_UNSAFE_PTRACE;
}
return unsafe;
}
-@@ -173,6 +183,8 @@ static inline struct task_struct *traceh
+@@ -173,6 +183,8 @@
{
if (task_ptrace(tsk) & PT_PTRACED)
return rcu_dereference(tsk->parent);
return NULL;
}
-@@ -194,6 +206,8 @@ static inline void tracehook_report_exec
+@@ -194,6 +206,8 @@
struct linux_binprm *bprm,
struct pt_regs *regs)
{
if (!ptrace_event(PT_TRACE_EXEC, PTRACE_EVENT_EXEC, 0) &&
unlikely(task_ptrace(current) & PT_PTRACED))
send_sig(SIGTRAP, current, 0);
-@@ -211,6 +225,8 @@ static inline void tracehook_report_exec
+@@ -211,6 +225,8 @@
*/
static inline void tracehook_report_exit(long *exit_code)
{
ptrace_event(PT_TRACE_EXIT, PTRACE_EVENT_EXIT, *exit_code);
}
-@@ -254,6 +270,7 @@ static inline int tracehook_prepare_clon
+@@ -254,6 +270,7 @@
static inline void tracehook_finish_clone(struct task_struct *child,
unsigned long clone_flags, int trace)
{
ptrace_init_task(child, (clone_flags & CLONE_PTRACE) || trace);
}
-@@ -280,6 +297,8 @@ static inline void tracehook_report_clon
+@@ -280,6 +297,8 @@
unsigned long clone_flags,
pid_t pid, struct task_struct *child)
{
if (unlikely(trace) || unlikely(clone_flags & CLONE_PTRACE)) {
/*
* The child starts up with an immediate SIGSTOP.
-@@ -345,6 +364,11 @@ static inline void tracehook_report_vfor
+@@ -345,6 +364,11 @@
*/
static inline void tracehook_prepare_release_task(struct task_struct *task)
{
}
/**
-@@ -358,7 +382,25 @@ static inline void tracehook_prepare_rel
+@@ -358,7 +382,25 @@
*/
static inline void tracehook_finish_release_task(struct task_struct *task)
{
}
/**
-@@ -380,6 +422,8 @@ static inline void tracehook_signal_hand
+@@ -380,6 +422,8 @@
const struct k_sigaction *ka,
struct pt_regs *regs, int stepping)
{
if (stepping)
ptrace_notify(SIGTRAP);
}
-@@ -400,6 +444,8 @@ static inline int tracehook_consider_ign
+@@ -400,6 +444,8 @@
int sig,
void __user *handler)
{
return (task_ptrace(task) & PT_PTRACED) != 0;
}
-@@ -421,6 +467,9 @@ static inline int tracehook_consider_fat
+@@ -421,6 +467,9 @@
int sig,
void __user *handler)
{
return (task_ptrace(task) & PT_PTRACED) != 0;
}
-@@ -435,6 +484,8 @@ static inline int tracehook_consider_fat
+@@ -435,6 +484,8 @@
*/
static inline int tracehook_force_sigpending(void)
{
return 0;
}
-@@ -464,6 +515,8 @@ static inline int tracehook_get_signal(s
+@@ -464,6 +515,8 @@
siginfo_t *info,
struct k_sigaction *return_ka)
{
return 0;
}
-@@ -484,6 +537,8 @@ static inline int tracehook_get_signal(s
+@@ -484,6 +537,8 @@
*/
static inline int tracehook_notify_jctl(int notify, int why)
{
return notify || (current->ptrace & PT_PTRACED);
}
-@@ -507,6 +562,10 @@ static inline int tracehook_notify_jctl(
+@@ -507,6 +562,10 @@
static inline int tracehook_notify_death(struct task_struct *task,
void **death_cookie, int group_dead)
{
if (task->exit_signal == -1)
return task->ptrace ? SIGCHLD : DEATH_REAP;
-@@ -543,6 +602,12 @@ static inline void tracehook_report_deat
+@@ -543,6 +602,12 @@
int signal, void *death_cookie,
int group_dead)
{
}
#ifdef TIF_NOTIFY_RESUME
-@@ -572,10 +637,14 @@ static inline void set_notify_resume(str
+@@ -572,10 +637,14 @@
* asynchronously, this will be called again before we return to
* user mode.
*
}
#endif /* TIF_NOTIFY_RESUME */
-diff -purN linux-2.6.27/include/linux/tracepoint.h linux-2.6.27.19-5.1/include/linux/tracepoint.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/tracepoint.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/tracepoint.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/tracepoint.h Wed May 06 16:56:57 2009 +0100
@@ -0,0 +1,134 @@
+#ifndef _LINUX_TRACEPOINT_H
+#define _LINUX_TRACEPOINT_H
+#define tracepoint_synchronize_unregister() synchronize_sched()
+
+#endif
-diff -purN linux-2.6.27/include/linux/unwind.h linux-2.6.27.19-5.1/include/linux/unwind.h
---- linux-2.6.27/include/linux/unwind.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/unwind.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/unwind.h
+--- a/include/linux/unwind.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/unwind.h Wed May 06 16:56:57 2009 +0100
@@ -14,6 +14,63 @@
struct module;
struct unwind_frame_info {};
static inline void unwind_init(void) {}
-@@ -28,12 +85,12 @@ static inline void *unwind_add_table(str
+@@ -28,11 +85,11 @@
return NULL;
}
static inline void unwind_remove_table(void *handle, int init_only)
{
}
-
--#endif
-
+-#endif
+
static inline int unwind_init_frame_info(struct unwind_frame_info *info,
struct task_struct *tsk,
- const struct pt_regs *regs)
-@@ -65,4 +122,6 @@ static inline int unwind_to_user(struct
+@@ -65,4 +122,6 @@
return -ENOSYS;
}
+#endif
+
#endif /* _LINUX_UNWIND_H */
-diff -purN linux-2.6.27/include/linux/usb/ehci_def.h linux-2.6.27.19-5.1/include/linux/usb/ehci_def.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/usb/ehci_def.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/usb.h
+--- a/include/linux/usb.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/usb.h Wed May 06 16:56:58 2009 +0100
+@@ -108,6 +108,7 @@
+ * (in probe()), bound to a driver, or unbinding (in disconnect())
+ * @is_active: flag set when the interface is bound and not suspended.
+ * @sysfs_files_created: sysfs attributes exist
++ * @unregistering: flag set when the interface is being unregistered
+ * @needs_remote_wakeup: flag set when the driver requires remote-wakeup
+ * capability during autosuspend.
+ * @needs_altsetting0: flag set when a set-interface request for altsetting 0
+@@ -163,6 +164,7 @@
+ enum usb_interface_condition condition; /* state of binding */
+ unsigned is_active:1; /* the interface is not suspended */
+ unsigned sysfs_files_created:1; /* the sysfs attributes exist */
++ unsigned unregistering:1; /* unregistration is in progress */
+ unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */
+ unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */
+ unsigned needs_binding:1; /* needs delayed unbind/rebind */
+diff -r 9608d5473017 include/linux/usb/ehci_def.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/usb/ehci_def.h Wed May 06 16:56:58 2009 +0100
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2001-2002 by David Brownell
+} __attribute__ ((packed));
+
+#endif /* __LINUX_USB_EHCI_DEF_H */
-diff -purN linux-2.6.27/include/linux/usb.h linux-2.6.27.19-5.1/include/linux/usb.h
---- linux-2.6.27/include/linux/usb.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/usb.h 2009-03-25 16:11:49.000000000 +0000
-@@ -108,6 +108,7 @@ enum usb_interface_condition {
- * (in probe()), bound to a driver, or unbinding (in disconnect())
- * @is_active: flag set when the interface is bound and not suspended.
- * @sysfs_files_created: sysfs attributes exist
-+ * @unregistering: flag set when the interface is being unregistered
- * @needs_remote_wakeup: flag set when the driver requires remote-wakeup
- * capability during autosuspend.
- * @needs_altsetting0: flag set when a set-interface request for altsetting 0
-@@ -163,6 +164,7 @@ struct usb_interface {
- enum usb_interface_condition condition; /* state of binding */
- unsigned is_active:1; /* the interface is not suspended */
- unsigned sysfs_files_created:1; /* the sysfs attributes exist */
-+ unsigned unregistering:1; /* unregistration is in progress */
- unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */
- unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */
- unsigned needs_binding:1; /* needs delayed unbind/rebind */
-diff -purN linux-2.6.27/include/linux/usb_usual.h linux-2.6.27.19-5.1/include/linux/usb_usual.h
---- linux-2.6.27/include/linux/usb_usual.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/usb_usual.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/usb_usual.h
+--- a/include/linux/usb_usual.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/usb_usual.h Wed May 06 16:56:58 2009 +0100
@@ -52,8 +52,9 @@
US_FLAG(MAX_SECTORS_MIN,0x00002000) \
/* Sets max_sectors to arch min */ \
#define US_FLAG(name, value) US_FL_##name = value ,
enum { US_DO_ALL_FLAGS };
-diff -purN linux-2.6.27/include/linux/utrace.h linux-2.6.27.19-5.1/include/linux/utrace.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/utrace.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/utrace.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/utrace.h Wed May 06 16:56:58 2009 +0100
@@ -0,0 +1,711 @@
+/*
+ * utrace infrastructure interface for debugging user processes
+#endif /* CONFIG_UTRACE */
+
+#endif /* linux/utrace.h */
-diff -purN linux-2.6.27/include/linux/vermagic.h linux-2.6.27.19-5.1/include/linux/vermagic.h
---- linux-2.6.27/include/linux/vermagic.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/vermagic.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/vermagic.h
+--- a/include/linux/vermagic.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/vermagic.h Wed May 06 16:56:58 2009 +0100
@@ -22,6 +22,11 @@
#else
#define MODULE_VERMAGIC_MODVERSIONS ""
- MODULE_ARCH_VERMAGIC
+ MODULE_VERMAGIC_XEN MODULE_ARCH_VERMAGIC
-diff -purN linux-2.6.27/include/linux/wait.h linux-2.6.27.19-5.1/include/linux/wait.h
---- linux-2.6.27/include/linux/wait.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/wait.h 2009-03-25 16:11:48.000000000 +0000
-@@ -141,6 +141,8 @@ static inline void __remove_wait_queue(w
+diff -r 9608d5473017 include/linux/wait.h
+--- a/include/linux/wait.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/wait.h Wed May 06 16:56:58 2009 +0100
+@@ -141,6 +141,8 @@
list_del(&old->task_list);
}
void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key);
extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode);
extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr);
-@@ -342,16 +344,19 @@ do { \
+@@ -342,16 +344,19 @@
for (;;) { \
prepare_to_wait_exclusive(&wq, &__wait, \
TASK_INTERRUPTIBLE); \
} while (0)
#define wait_event_interruptible_exclusive(wq, condition) \
-@@ -440,6 +445,8 @@ extern long interruptible_sleep_on_timeo
+@@ -440,6 +445,8 @@
void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state);
void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state);
void finish_wait(wait_queue_head_t *q, wait_queue_t *wait);
int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
-diff -purN linux-2.6.27/include/linux/writeback.h linux-2.6.27.19-5.1/include/linux/writeback.h
---- linux-2.6.27/include/linux/writeback.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/writeback.h 2009-03-25 16:11:50.000000000 +0000
-@@ -30,7 +30,7 @@ static inline int task_is_pdflush(struct
+diff -r 9608d5473017 include/linux/writeback.h
+--- a/include/linux/writeback.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/writeback.h Wed May 06 16:56:58 2009 +0100
+@@ -30,7 +30,7 @@
enum writeback_sync_modes {
WB_SYNC_NONE, /* Don't wait on anything */
WB_SYNC_ALL, /* Wait on every mapping */
};
/*
-diff -purN linux-2.6.27/include/linux/xattr.h linux-2.6.27.19-5.1/include/linux/xattr.h
---- linux-2.6.27/include/linux/xattr.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/xattr.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/xattr.h
+--- a/include/linux/xattr.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/xattr.h Wed May 06 16:56:58 2009 +0100
@@ -16,6 +16,8 @@
#ifdef __KERNEL__
/* Namespaces */
#define XATTR_OS2_PREFIX "os2."
-@@ -47,10 +49,10 @@ struct xattr_handler {
+@@ -47,10 +49,10 @@
};
ssize_t xattr_getsecurity(struct inode *, const char *, void *, size_t);
ssize_t generic_getxattr(struct dentry *dentry, const char *name, void *buffer, size_t size);
ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size);
-diff -purN linux-2.6.27/include/math-emu/op-common.h linux-2.6.27.19-5.1/include/math-emu/op-common.h
---- linux-2.6.27/include/math-emu/op-common.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/math-emu/op-common.h 2009-03-25 16:11:51.000000000 +0000
-@@ -139,18 +139,27 @@ do { \
+diff -r 9608d5473017 include/math-emu/op-common.h
+--- a/include/math-emu/op-common.h Wed May 06 15:47:13 2009 +0100
++++ b/include/math-emu/op-common.h Wed May 06 16:56:58 2009 +0100
+@@ -139,18 +139,27 @@
if (X##_e <= _FP_WFRACBITS_##fs) \
{ \
_FP_FRAC_SRS_##wc(X, X##_e, _FP_WFRACBITS_##fs); \
} \
if ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) || \
(FP_TRAPPING_EXCEPTIONS & FP_EX_UNDERFLOW)) \
-diff -purN linux-2.6.27/include/net/af_unix.h linux-2.6.27.19-5.1/include/net/af_unix.h
---- linux-2.6.27/include/net/af_unix.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/af_unix.h 2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 include/net/af_unix.h
+--- a/include/net/af_unix.h Wed May 06 15:47:13 2009 +0100
++++ b/include/net/af_unix.h Wed May 06 16:56:58 2009 +0100
@@ -9,6 +9,7 @@
extern void unix_inflight(struct file *fp);
extern void unix_notinflight(struct file *fp);
#define UNIX_HASH_SIZE 256
-@@ -54,6 +55,7 @@ struct unix_sock {
+@@ -54,6 +55,7 @@
atomic_long_t inflight;
spinlock_t lock;
unsigned int gc_candidate : 1;
wait_queue_head_t peer_wait;
};
#define unix_sk(__sk) ((struct unix_sock *)__sk)
-diff -purN linux-2.6.27/include/net/dcbnl.h linux-2.6.27.19-5.1/include/net/dcbnl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/dcbnl.h 2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 include/net/dcbnl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/net/dcbnl.h Wed May 06 16:56:58 2009 +0100
@@ -0,0 +1,40 @@
+#ifndef __NET_DCBNL_H__
+#define __NET_DCBNL_H__
+};
+
+#endif /* __NET_DCBNL_H__ */
-diff -purN linux-2.6.27/include/net/inet_frag.h linux-2.6.27.19-5.1/include/net/inet_frag.h
---- linux-2.6.27/include/net/inet_frag.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/inet_frag.h 2009-03-25 16:11:45.000000000 +0000
-@@ -1,6 +1,9 @@
+diff -r 9608d5473017 include/net/inet_frag.h
+--- a/include/net/inet_frag.h Wed May 06 15:47:13 2009 +0100
++++ b/include/net/inet_frag.h Wed May 06 16:56:58 2009 +0100
+@@ -1,5 +1,8 @@
#ifndef __NET_FRAG_H__
#define __NET_FRAG_H__
-
++
+#include <linux/reserve.h>
+#include <linux/mutex.h>
-+
+
struct netns_frags {
int nqueues;
- atomic_t mem;
-@@ -10,6 +13,10 @@ struct netns_frags {
+@@ -10,6 +13,10 @@
int timeout;
int high_thresh;
int low_thresh;
};
struct inet_frag_queue {
-diff -purN linux-2.6.27/include/net/netns/ipv6.h linux-2.6.27.19-5.1/include/net/netns/ipv6.h
---- linux-2.6.27/include/net/netns/ipv6.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/netns/ipv6.h 2009-03-25 16:11:45.000000000 +0000
-@@ -24,6 +24,8 @@ struct netns_sysctl_ipv6 {
+diff -r 9608d5473017 include/net/netns/ipv6.h
+--- a/include/net/netns/ipv6.h Wed May 06 15:47:13 2009 +0100
++++ b/include/net/netns/ipv6.h Wed May 06 16:56:58 2009 +0100
+@@ -24,6 +24,8 @@
int ip6_rt_mtu_expires;
int ip6_rt_min_advmss;
int icmpv6_time;
};
struct netns_ipv6 {
-@@ -55,5 +57,7 @@ struct netns_ipv6 {
+@@ -55,5 +57,7 @@
struct sock *ndisc_sk;
struct sock *tcp_sk;
struct sock *igmp_sk;
+ struct mem_reserve ip6_rt_reserve;
};
#endif
-diff -purN linux-2.6.27/include/net/scm.h linux-2.6.27.19-5.1/include/net/scm.h
---- linux-2.6.27/include/net/scm.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/scm.h 2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 include/net/scm.h
+--- a/include/net/scm.h Wed May 06 15:47:13 2009 +0100
++++ b/include/net/scm.h Wed May 06 16:56:58 2009 +0100
@@ -14,8 +14,9 @@
struct scm_fp_list
};
struct scm_cookie
-diff -purN linux-2.6.27/include/net/sctp/checksum.h linux-2.6.27.19-5.1/include/net/sctp/checksum.h
---- linux-2.6.27/include/net/sctp/checksum.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/sctp/checksum.h 2009-03-25 16:11:45.000000000 +0000
-@@ -79,5 +79,5 @@ static inline __be32 sctp_update_cksum(_
+diff -r 9608d5473017 include/net/sctp/checksum.h
+--- a/include/net/sctp/checksum.h Wed May 06 15:47:13 2009 +0100
++++ b/include/net/sctp/checksum.h Wed May 06 16:56:58 2009 +0100
+@@ -79,5 +79,5 @@
static inline __be32 sctp_end_cksum(__be32 crc32)
{
- return ~crc32;
+ return (__force __be32)~cpu_to_le32((__force u32)crc32);
}
-diff -purN linux-2.6.27/include/net/sock.h linux-2.6.27.19-5.1/include/net/sock.h
---- linux-2.6.27/include/net/sock.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/sock.h 2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 include/net/sock.h
+--- a/include/net/sock.h Wed May 06 15:47:13 2009 +0100
++++ b/include/net/sock.h Wed May 06 16:56:59 2009 +0100
@@ -50,6 +50,7 @@
#include <linux/skbuff.h> /* struct sk_buff */
#include <linux/mm.h>
#include <linux/filter.h>
-@@ -413,6 +414,7 @@ enum sock_flags {
+@@ -413,6 +414,7 @@
SOCK_RCVTSTAMPNS, /* %SO_TIMESTAMPNS setting */
SOCK_LOCALROUTE, /* route locally only, %SO_DONTROUTE setting */
SOCK_QUEUE_SHRUNK, /* write queue has been shrunk recently */
};
static inline void sock_copy_flags(struct sock *nsk, struct sock *osk)
-@@ -435,6 +437,50 @@ static inline int sock_flag(struct sock
+@@ -433,6 +435,50 @@
+ static inline int sock_flag(struct sock *sk, enum sock_flags flag)
+ {
return test_bit(flag, &sk->sk_flags);
- }
-
++}
++
+static inline int sk_has_memalloc(struct sock *sk)
+{
+ return sock_flag(sk, SOCK_MEMALLOC);
+static inline gfp_t sk_allocation(struct sock *sk, gfp_t gfp_mask)
+{
+ return gfp_mask | (sk->sk_allocation & __GFP_MEMALLOC);
-+}
-+
- static inline void sk_acceptq_removed(struct sock *sk)
- {
- sk->sk_ack_backlog--;
-@@ -482,6 +528,16 @@ static inline void sk_add_backlog(struct
- skb->next = NULL;
}
+ static inline void sk_acceptq_removed(struct sock *sk)
+@@ -480,6 +526,16 @@
+ sk->sk_backlog.tail = skb;
+ }
+ skb->next = NULL;
++}
++
+extern int __sk_backlog_rcv(struct sock *sk, struct sk_buff *skb);
+
+static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb)
+ return __sk_backlog_rcv(sk, skb);
+
+ return sk->sk_backlog_rcv(sk, skb);
-+}
-+
+ }
+
#define sk_wait_event(__sk, __timeo, __condition) \
- ({ int __rc; \
- release_sock(__sk); \
-@@ -737,12 +793,13 @@ static inline int sk_wmem_schedule(struc
+@@ -737,12 +793,13 @@
__sk_mem_schedule(sk, size, SK_MEM_SEND);
}
}
static inline void sk_mem_reclaim(struct sock *sk)
-diff -purN linux-2.6.27/include/net/tc_act/tc_skbedit.h linux-2.6.27.19-5.1/include/net/tc_act/tc_skbedit.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/tc_act/tc_skbedit.h 2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 include/net/tc_act/tc_skbedit.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/net/tc_act/tc_skbedit.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2008, Intel Corporation.
+ container_of(pc, struct tcf_skbedit, common)
+
+#endif /* __NET_TC_SKBEDIT_H */
-diff -purN linux-2.6.27/include/net/tcp.h linux-2.6.27.19-5.1/include/net/tcp.h
---- linux-2.6.27/include/net/tcp.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/tcp.h 2009-03-25 16:11:45.000000000 +0000
-@@ -894,7 +894,7 @@ static inline int tcp_prequeue(struct so
+diff -r 9608d5473017 include/net/tcp.h
+--- a/include/net/tcp.h Wed May 06 15:47:13 2009 +0100
++++ b/include/net/tcp.h Wed May 06 16:56:59 2009 +0100
+@@ -894,7 +894,7 @@
BUG_ON(sock_owned_by_user(sk));
while ((skb1 = __skb_dequeue(&tp->ucopy.prequeue)) != NULL) {
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPPREQUEUEDROPPED);
}
-diff -purN linux-2.6.27/include/scsi/fc/fc_els.h linux-2.6.27.19-5.1/include/scsi/fc/fc_els.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_els.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_els.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_els.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,816 @@
+/*
+ * Copyright(c) 2007 Intel Corporation. All rights reserved.
+};
+
+#endif /* _FC_ELS_H_ */
-diff -purN linux-2.6.27/include/scsi/fc/fc_encaps.h linux-2.6.27.19-5.1/include/scsi/fc/fc_encaps.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_encaps.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_encaps.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_encaps.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,138 @@
+/*
+ * Copyright(c) 2007 Intel Corporation. All rights reserved.
+}
+
+#endif /* _FC_ENCAPS_H_ */
-diff -purN linux-2.6.27/include/scsi/fc/fc_fc2.h linux-2.6.27.19-5.1/include/scsi/fc/fc_fc2.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_fc2.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_fc2.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_fc2.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,124 @@
+/*
+ * Copyright(c) 2007 Intel Corporation. All rights reserved.
+#define ESB_ST_PRI_INUSE (1 << 21) /* priority / preemption in use */
+
+#endif /* _FC_FC2_H_ */
-diff -purN linux-2.6.27/include/scsi/fc/fc_fcoe.h linux-2.6.27.19-5.1/include/scsi/fc/fc_fcoe.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_fcoe.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_fcoe.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_fcoe.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,114 @@
+/*
+ * Copyright(c) 2007 Intel Corporation. All rights reserved.
+}
+
+#endif /* _FC_FCOE_H_ */
-diff -purN linux-2.6.27/include/scsi/fc/fc_fcp.h linux-2.6.27.19-5.1/include/scsi/fc/fc_fcp.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_fcp.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_fcp.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_fcp.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,199 @@
+/*
+ * Copyright(c) 2007 Intel Corporation. All rights reserved.
+};
+
+#endif /* _FC_FCP_H_ */
-diff -purN linux-2.6.27/include/scsi/fc/fc_fs.h linux-2.6.27.19-5.1/include/scsi/fc/fc_fs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_fs.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_fs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_fs.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,345 @@
+/*
+ * Copyright(c) 2007 Intel Corporation. All rights reserved.
+#define FC_DEF_R_A_TOV 10000UL
+
+#endif /* _FC_FS_H_ */
-diff -purN linux-2.6.27/include/scsi/fc/fc_gs.h linux-2.6.27.19-5.1/include/scsi/fc/fc_gs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_gs.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_gs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_gs.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,93 @@
+/*
+ * Copyright(c) 2007 Intel Corporation. All rights reserved.
+};
+
+#endif /* _FC_GS_H_ */
-diff -purN linux-2.6.27/include/scsi/fc/fc_ns.h linux-2.6.27.19-5.1/include/scsi/fc/fc_ns.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_ns.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_ns.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_ns.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,159 @@
+/*
+ * Copyright(c) 2007 Intel Corporation. All rights reserved.
+} __attribute__((__packed__));
+
+#endif /* _FC_NS_H_ */
-diff -purN linux-2.6.27/include/scsi/fc_encode.h linux-2.6.27.19-5.1/include/scsi/fc_encode.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc_encode.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc_encode.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc_encode.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,309 @@
+/*
+ * Copyright(c) 2008 Intel Corporation. All rights reserved.
+ return 0;
+}
+#endif /* _FC_ENCODE_H_ */
-diff -purN linux-2.6.27/include/scsi/fc_frame.h linux-2.6.27.19-5.1/include/scsi/fc_frame.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc_frame.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc_frame.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc_frame.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,242 @@
+/*
+ * Copyright(c) 2007 Intel Corporation. All rights reserved.
+void fc_frame_leak_check(void);
+
+#endif /* _FC_FRAME_H_ */
-diff -purN linux-2.6.27/include/scsi/fc_transport_fcoe.h linux-2.6.27.19-5.1/include/scsi/fc_transport_fcoe.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc_transport_fcoe.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc_transport_fcoe.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc_transport_fcoe.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,54 @@
+#ifndef FC_TRANSPORT_FCOE_H
+#define FC_TRANSPORT_FCOE_H
+/* fcow_sw is the default transport */
+extern struct fcoe_transport fcoe_sw_transport;
+#endif /* FC_TRANSPORT_FCOE_H */
-diff -purN linux-2.6.27/include/scsi/iscsi_if.h linux-2.6.27.19-5.1/include/scsi/iscsi_if.h
---- linux-2.6.27/include/scsi/iscsi_if.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/iscsi_if.h 2009-03-25 16:11:50.000000000 +0000
-@@ -213,6 +213,7 @@ enum iscsi_err {
+diff -r 9608d5473017 include/scsi/iscsi_if.h
+--- a/include/scsi/iscsi_if.h Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/iscsi_if.h Wed May 06 16:56:59 2009 +0100
+@@ -213,6 +213,7 @@
ISCSI_ERR_DATA_DGST = ISCSI_ERR_BASE + 15,
ISCSI_ERR_PARAM_NOT_FOUND = ISCSI_ERR_BASE + 16,
ISCSI_ERR_NO_SCSI_CMD = ISCSI_ERR_BASE + 17,
};
/*
-@@ -333,6 +334,7 @@ enum iscsi_host_param {
+@@ -333,6 +334,7 @@
#define CAP_FW_DB 0x200
#define CAP_SENDTARGETS_OFFLOAD 0x400
#define CAP_DATA_PATH_OFFLOAD 0x800
/*
* These flags describes reason of stop_conn() call
-diff -purN linux-2.6.27/include/scsi/libfc.h linux-2.6.27.19-5.1/include/scsi/libfc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/libfc.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/scsi/libfc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/libfc.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,930 @@
+/*
+ * Copyright(c) 2007 Intel Corporation. All rights reserved.
+void fc_destroy_rport(void);
+
+#endif /* _LIBFC_H_ */
-diff -purN linux-2.6.27/include/scsi/libfcoe.h linux-2.6.27.19-5.1/include/scsi/libfcoe.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/libfcoe.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/libfcoe.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/libfcoe.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,177 @@
+/*
+ * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
+int __init fcoe_sw_init(void);
+int __exit fcoe_sw_exit(void);
+#endif /* _LIBFCOE_H */
-diff -purN linux-2.6.27/include/scsi/libiscsi.h linux-2.6.27.19-5.1/include/scsi/libiscsi.h
---- linux-2.6.27/include/scsi/libiscsi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/libiscsi.h 2009-03-25 16:11:51.000000000 +0000
-@@ -75,7 +75,7 @@ enum {
+diff -r 9608d5473017 include/scsi/libiscsi.h
+--- a/include/scsi/libiscsi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/libiscsi.h Wed May 06 16:56:59 2009 +0100
+@@ -75,7 +75,7 @@
/* this must be a power of two greater than ISCSI_MGMT_CMDS_MAX */
#define ISCSI_TOTAL_CMDS_MIN 16
#define ISCSI_AGE_SHIFT 28
#define ISCSI_ADDRESS_BUF_LEN 64
-@@ -287,6 +287,10 @@ struct iscsi_session {
+@@ -287,6 +287,10 @@
struct iscsi_pool cmdpool; /* PDU's pool */
};
struct iscsi_host {
char *initiatorname;
/* hw address or netdev iscsi connection is bound to */
-@@ -295,6 +299,13 @@ struct iscsi_host {
+@@ -295,6 +299,13 @@
/* local address */
int local_port;
char local_address[ISCSI_ADDRESS_BUF_LEN];
};
/*
-@@ -351,6 +362,8 @@ extern void iscsi_conn_stop(struct iscsi
+@@ -351,6 +362,8 @@
extern int iscsi_conn_bind(struct iscsi_cls_session *, struct iscsi_cls_conn *,
int);
extern void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err);
extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn,
enum iscsi_param param, char *buf);
extern void iscsi_suspend_tx(struct iscsi_conn *conn);
-@@ -373,8 +386,10 @@ extern int __iscsi_complete_pdu(struct i
+@@ -373,8 +386,10 @@
char *, int);
extern int iscsi_verify_itt(struct iscsi_conn *, itt_t);
extern struct iscsi_task *iscsi_itt_to_ctask(struct iscsi_conn *, itt_t);
extern void __iscsi_get_task(struct iscsi_task *task);
/*
-diff -purN linux-2.6.27/include/scsi/scsi.h linux-2.6.27.19-5.1/include/scsi/scsi.h
---- linux-2.6.27/include/scsi/scsi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi.h 2009-03-25 16:11:51.000000000 +0000
-@@ -381,6 +381,11 @@ static inline int scsi_is_wlun(unsigned
+diff -r 9608d5473017 include/scsi/scsi.h
+--- a/include/scsi/scsi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi.h Wed May 06 16:56:59 2009 +0100
+@@ -381,6 +381,11 @@
#define DID_IMM_RETRY 0x0c /* Retry without decrementing retry count */
#define DID_REQUEUE 0x0d /* Requeue command (no immediate retry) also
* without decrementing the retry count */
#define DRIVER_OK 0x00 /* Driver status */
/*
-@@ -426,6 +431,7 @@ static inline int scsi_is_wlun(unsigned
+@@ -426,6 +431,7 @@
#define SCSI_MLQUEUE_HOST_BUSY 0x1055
#define SCSI_MLQUEUE_DEVICE_BUSY 0x1056
#define SCSI_MLQUEUE_EH_RETRY 0x1057
/*
* Use these to separate status msg and our bytes
-diff -purN linux-2.6.27/include/scsi/scsi_cmnd.h linux-2.6.27.19-5.1/include/scsi/scsi_cmnd.h
---- linux-2.6.27/include/scsi/scsi_cmnd.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_cmnd.h 2009-03-25 16:11:50.000000000 +0000
-@@ -75,7 +75,6 @@ struct scsi_cmnd {
+diff -r 9608d5473017 include/scsi/scsi_cmnd.h
+--- a/include/scsi/scsi_cmnd.h Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_cmnd.h Wed May 06 16:56:59 2009 +0100
+@@ -75,7 +75,6 @@
int retries;
int allowed;
unsigned char prot_op;
unsigned char prot_type;
-@@ -86,7 +85,6 @@ struct scsi_cmnd {
+@@ -86,7 +85,6 @@
/* These elements define the operation we are about to perform */
unsigned char *cmnd;
/* These elements define the operation we ultimately want to perform */
struct scsi_data_buffer sdb;
-@@ -139,7 +137,6 @@ extern void scsi_put_command(struct scsi
+@@ -139,7 +137,6 @@
extern void __scsi_put_command(struct Scsi_Host *, struct scsi_cmnd *,
struct device *);
extern void scsi_finish_command(struct scsi_cmnd *cmd);
extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count,
size_t *offset, size_t *len);
-diff -purN linux-2.6.27/include/scsi/scsi_device.h linux-2.6.27.19-5.1/include/scsi/scsi_device.h
---- linux-2.6.27/include/scsi/scsi_device.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_device.h 2009-03-25 16:11:51.000000000 +0000
-@@ -42,9 +42,11 @@ enum scsi_device_state {
+diff -r 9608d5473017 include/scsi/scsi_device.h
+--- a/include/scsi/scsi_device.h Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_device.h Wed May 06 16:56:59 2009 +0100
+@@ -42,9 +42,11 @@
* originate in the mid-layer) */
SDEV_OFFLINE, /* Device offlined (by error handling or
* user request */
};
enum scsi_device_event {
-@@ -94,7 +96,8 @@ struct scsi_device {
+@@ -94,7 +96,8 @@
void *hostdata; /* available to low-level driver */
char type;
char scsi_level;
unsigned char inquiry_len; /* valid bytes in 'inquiry' */
unsigned char * inquiry; /* INQUIRY response data */
const char * vendor; /* [back_compat] point into 'inquiry' ... */
-@@ -157,8 +160,6 @@ struct scsi_device {
+@@ -157,8 +160,6 @@
atomic_t iodone_cnt;
atomic_t ioerr_cnt;
struct device sdev_gendev,
sdev_dev;
-@@ -172,6 +173,7 @@ struct scsi_device {
+@@ -172,6 +173,7 @@
struct scsi_dh_devlist {
char *vendor;
char *model;
};
struct scsi_device_handler {
-@@ -236,6 +238,16 @@ struct scsi_target {
+@@ -236,6 +238,16 @@
* for the device at a time. */
unsigned int pdt_1f_for_no_lun; /* PDT = 0x1f */
/* means no lun present */
char scsi_level;
struct execute_work ew;
-@@ -384,9 +396,23 @@ static inline unsigned int sdev_id(struc
+@@ -384,9 +396,23 @@
#define scmd_id(scmd) sdev_id((scmd)->device)
#define scmd_channel(scmd) sdev_channel((scmd)->device)
}
/* accessor functions for the SCSI parameters */
-diff -purN linux-2.6.27/include/scsi/scsi_driver.h linux-2.6.27.19-5.1/include/scsi/scsi_driver.h
---- linux-2.6.27/include/scsi/scsi_driver.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_driver.h 2009-03-25 16:11:50.000000000 +0000
-@@ -32,5 +32,6 @@ int scsi_setup_blk_pc_cmnd(struct scsi_d
+diff -r 9608d5473017 include/scsi/scsi_driver.h
+--- a/include/scsi/scsi_driver.h Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_driver.h Wed May 06 16:56:59 2009 +0100
+@@ -32,5 +32,6 @@
int scsi_setup_fs_cmnd(struct scsi_device *sdev, struct request *req);
int scsi_prep_state_check(struct scsi_device *sdev, struct request *req);
int scsi_prep_return(struct request_queue *q, struct request *req, int ret);
+int scsi_prep_fn(struct request_queue *, struct request *);
#endif /* _SCSI_SCSI_DRIVER_H */
-diff -purN linux-2.6.27/include/scsi/scsi_host.h linux-2.6.27.19-5.1/include/scsi/scsi_host.h
---- linux-2.6.27/include/scsi/scsi_host.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_host.h 2009-03-25 16:11:50.000000000 +0000
-@@ -43,13 +43,6 @@ struct blk_queue_tags;
+diff -r 9608d5473017 include/scsi/scsi_host.h
+--- a/include/scsi/scsi_host.h Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_host.h Wed May 06 16:56:59 2009 +0100
+@@ -42,13 +42,6 @@
+
#define DISABLE_CLUSTERING 0
#define ENABLE_CLUSTERING 1
-
+-
-enum scsi_eh_timer_return {
- EH_NOT_HANDLED,
- EH_HANDLED,
- EH_RESET_TIMER,
-};
-
--
+
struct scsi_host_template {
struct module *module;
- const char *name;
-@@ -347,7 +340,7 @@ struct scsi_host_template {
+@@ -347,7 +340,7 @@
*
* Status: OPTIONAL
*/
/*
* Name of proc directory
-@@ -696,6 +689,10 @@ static inline void *shost_priv(struct Sc
+@@ -696,6 +689,10 @@
int scsi_is_host_device(const struct device *);
static inline struct Scsi_Host *dev_to_shost(struct device *dev)
{
while (!scsi_is_host_device(dev)) {
-@@ -706,6 +703,26 @@ static inline struct Scsi_Host *dev_to_s
+@@ -704,6 +701,26 @@
+ dev = dev->parent;
+ }
return container_of(dev, struct Scsi_Host, shost_gendev);
- }
-
++}
++
+/*
+ * walks object list backward, to find the first physical
+ * device object. If none is found return the original device.
+ dev = dev->parent;
+ }
+ return dev?dev:orig;
-+}
-+
+ }
+
static inline int scsi_host_in_recovery(struct Scsi_Host *shost)
- {
- return shost->shost_state == SHOST_RECOVERY ||
-diff -purN linux-2.6.27/include/scsi/scsi_netlink.h linux-2.6.27.19-5.1/include/scsi/scsi_netlink.h
---- linux-2.6.27/include/scsi/scsi_netlink.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_netlink.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/scsi_netlink.h
+--- a/include/scsi/scsi_netlink.h Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_netlink.h Wed May 06 16:56:59 2009 +0100
@@ -22,6 +22,9 @@
#ifndef SCSI_NETLINK_H
#define SCSI_NETLINK_H
/* SCSI_TRANSPORT_MSG event message header */
-@@ -53,9 +57,44 @@ struct scsi_nl_hdr {
+@@ -53,9 +57,44 @@
/* scsi_nl_hdr->transport value */
#define SCSI_NL_TRANSPORT 0
#define SCSI_NL_TRANSPORT_FC 1
-#define SCSI_NL_MAX_TRANSPORTS 2
+#define SCSI_NL_TRANSPORT_ML 2
+#define SCSI_NL_MAX_TRANSPORTS 3
-+
-+/* Transport-based scsi_nl_hdr->msgtype values are defined in each transport */
-/* scsi_nl_hdr->msgtype values are defined in each transport */
++/* Transport-based scsi_nl_hdr->msgtype values are defined in each transport */
++
+/*
+ * GENERIC SCSI scsi_nl_hdr->msgtype Values
+ */
/*
-@@ -83,5 +122,28 @@ struct scsi_nl_hdr {
+@@ -83,5 +122,28 @@
}
+
#endif /* SCSI_NETLINK_H */
-diff -purN linux-2.6.27/include/scsi/scsi_netlink_ml.h linux-2.6.27.19-5.1/include/scsi/scsi_netlink_ml.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_netlink_ml.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/scsi/scsi_netlink_ml.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/scsi_netlink_ml.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,64 @@
+/*
+ * SCSI Midlayer Netlink Interface
+
+#endif /* SCSI_NETLINK_ML_H */
+
-diff -purN linux-2.6.27/include/scsi/scsi_transport.h linux-2.6.27.19-5.1/include/scsi/scsi_transport.h
---- linux-2.6.27/include/scsi/scsi_transport.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_transport.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/scsi/scsi_transport.h
+--- a/include/scsi/scsi_transport.h Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_transport.h Wed May 06 16:56:59 2009 +0100
@@ -21,6 +21,7 @@
#define SCSI_TRANSPORT_H
#include <scsi/scsi_host.h>
#include <scsi/scsi_device.h>
-@@ -64,7 +65,7 @@ struct scsi_transport_template {
+@@ -64,7 +65,7 @@
* begin counting again
* EH_NOT_HANDLED Begin normal error recovery
*/
/*
* Used as callback for the completion of i_t_nexus request
-diff -purN linux-2.6.27/include/scsi/scsi_transport_fc.h linux-2.6.27.19-5.1/include/scsi/scsi_transport_fc.h
---- linux-2.6.27/include/scsi/scsi_transport_fc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_transport_fc.h 2009-03-25 16:11:50.000000000 +0000
-@@ -167,6 +167,26 @@ enum fc_tgtid_binding_type {
+diff -r 9608d5473017 include/scsi/scsi_transport_fc.h
+--- a/include/scsi/scsi_transport_fc.h Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_transport_fc.h Wed May 06 16:56:59 2009 +0100
+@@ -167,6 +167,26 @@
struct device_attribute dev_attr_vport_##_name = \
__ATTR(_name,_mode,_show,_store)
/*
* FC Virtual Port Attributes
-@@ -197,7 +217,6 @@ struct device_attribute dev_attr_vport_#
+@@ -197,7 +217,6 @@
* managed by the transport w/o driver interaction.
*/
struct fc_vport {
/* Fixed Attributes */
-@@ -338,6 +357,8 @@ struct fc_rport { /* aka fc_starget_attr
+@@ -338,6 +357,8 @@
/* bit field values for struct fc_rport "flags" field: */
#define FC_RPORT_DEVLOSS_PENDING 0x01
#define FC_RPORT_SCAN_PENDING 0x02
#define dev_to_rport(d) \
container_of(d, struct fc_rport, dev)
-@@ -659,12 +680,15 @@ fc_remote_port_chkready(struct fc_rport
+@@ -659,12 +680,15 @@
if (rport->roles & FC_PORT_ROLE_FCP_TARGET)
result = 0;
else if (rport->flags & FC_RPORT_DEVLOSS_PENDING)
break;
default:
result = DID_NO_CONNECT << 16;
-@@ -732,6 +756,8 @@ void fc_host_post_vendor_event(struct Sc
+@@ -732,6 +756,8 @@
* be sure to read the Vendor Type and ID formatting requirements
* specified in scsi_netlink.h
*/
int fc_vport_terminate(struct fc_vport *vport);
#endif /* SCSI_TRANSPORT_FC_H */
-diff -purN linux-2.6.27/include/scsi/scsi_transport_iscsi.h linux-2.6.27.19-5.1/include/scsi/scsi_transport_iscsi.h
---- linux-2.6.27/include/scsi/scsi_transport_iscsi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_transport_iscsi.h 2009-03-25 16:11:50.000000000 +0000
-@@ -56,6 +56,9 @@ struct sockaddr;
+diff -r 9608d5473017 include/scsi/scsi_transport_iscsi.h
+--- a/include/scsi/scsi_transport_iscsi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_transport_iscsi.h Wed May 06 16:56:59 2009 +0100
+@@ -56,6 +56,9 @@
* is not supported, and a -Exx value on other error
* @start_conn: set connection to be operational
* @stop_conn: suspend/recover/terminate connection
* @send_pdu: send iSCSI PDU, Login, Logout, NOP-Out, Reject, Text.
* @session_recovery_timedout: notify LLD a block during recovery timed out
* @init_task: Initialize a iscsi_task and any internal structs.
-@@ -109,6 +112,10 @@ struct iscsi_transport {
+@@ -109,6 +112,10 @@
int (*set_host_param) (struct Scsi_Host *shost,
enum iscsi_host_param param, char *buf,
int buflen);
int (*send_pdu) (struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr,
char *data, uint32_t data_size);
void (*get_stats) (struct iscsi_cls_conn *conn,
-@@ -207,7 +214,7 @@ extern void iscsi_host_for_each_session(
+@@ -207,7 +214,7 @@
struct iscsi_endpoint {
void *dd_data; /* LLD private data */
struct device dev;
};
/*
-diff -purN linux-2.6.27/include/trace/filemap.h linux-2.6.27.19-5.1/include/trace/filemap.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/filemap.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/filemap.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/filemap.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,13 @@
+#ifndef _TRACE_FILEMAP_H
+#define _TRACE_FILEMAP_H
+ TPARGS(page, bit_nr));
+
+#endif
-diff -purN linux-2.6.27/include/trace/fs.h linux-2.6.27.19-5.1/include/trace/fs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/fs.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/fs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/fs.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,65 @@
+#ifndef _TRACE_FS_H
+#define _TRACE_FS_H
+ TPPROTO(int fd),
+ TPARGS(fd));
+#endif
-diff -purN linux-2.6.27/include/trace/hugetlb.h linux-2.6.27.19-5.1/include/trace/hugetlb.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/hugetlb.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/hugetlb.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/hugetlb.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,28 @@
+#ifndef _TRACE_HUGETLB_H
+#define _TRACE_HUGETLB_H
+ TPARGS(inode, offset, freed));
+
+#endif
-diff -purN linux-2.6.27/include/trace/ipc.h linux-2.6.27.19-5.1/include/trace/ipc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/ipc.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/ipc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/ipc.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,15 @@
+#ifndef _TRACE_IPC_H
+#define _TRACE_IPC_H
+ TPPROTO(long id, int flags),
+ TPARGS(id, flags));
+#endif
-diff -purN linux-2.6.27/include/trace/ipv4.h linux-2.6.27.19-5.1/include/trace/ipv4.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/ipv4.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/ipv4.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/ipv4.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,14 @@
+#ifndef _TRACE_IPV4_H
+#define _TRACE_IPV4_H
+ TPARGS(ifa));
+
+#endif
-diff -purN linux-2.6.27/include/trace/ipv6.h linux-2.6.27.19-5.1/include/trace/ipv6.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/ipv6.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/ipv6.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/ipv6.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,14 @@
+#ifndef _TRACE_IPV6_H
+#define _TRACE_IPV6_H
+ TPARGS(ifa));
+
+#endif
-diff -purN linux-2.6.27/include/trace/irq.h linux-2.6.27.19-5.1/include/trace/irq.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/irq.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/irq.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/irq.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,36 @@
+#ifndef _TRACE_IRQ_H
+#define _TRACE_IRQ_H
+ TPARGS(t));
+
+#endif
-diff -purN linux-2.6.27/include/trace/kernel.h linux-2.6.27.19-5.1/include/trace/kernel.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/kernel.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/kernel.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/kernel.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,13 @@
+#ifndef _TRACE_KERNEL_H
+#define _TRACE_KERNEL_H
+ TPARGS(mod));
+
+#endif
-diff -purN linux-2.6.27/include/trace/memory.h linux-2.6.27.19-5.1/include/trace/memory.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/memory.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/memory.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/memory.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,14 @@
+#ifndef _TRACE_MEMORY_H
+#define _TRACE_MEMORY_H
+ TPARGS(res));
+
+#endif
-diff -purN linux-2.6.27/include/trace/net.h linux-2.6.27.19-5.1/include/trace/net.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/net.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/net.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/net.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,14 @@
+#ifndef _TRACE_NET_H
+#define _TRACE_NET_H
+ TPARGS(skb));
+
+#endif
-diff -purN linux-2.6.27/include/trace/page_alloc.h linux-2.6.27.19-5.1/include/trace/page_alloc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/page_alloc.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/page_alloc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/page_alloc.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,16 @@
+#ifndef _TRACE_PAGE_ALLOC_H
+#define _TRACE_PAGE_ALLOC_H
+ TPARGS(page, order));
+
+#endif
-diff -purN linux-2.6.27/include/trace/sched.h linux-2.6.27.19-5.1/include/trace/sched.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/sched.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/sched.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/sched.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,45 @@
+#ifndef _TRACE_SCHED_H
+#define _TRACE_SCHED_H
+ TPARGS(sig, p));
+
+#endif
-diff -purN linux-2.6.27/include/trace/socket.h linux-2.6.27.19-5.1/include/trace/socket.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/socket.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/socket.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/socket.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,26 @@
+#ifndef _TRACE_SOCKET_H
+#define _TRACE_SOCKET_H
+ TPPROTO(int call, unsigned long a0),
+ TPARGS(call, a0));
+#endif
-diff -purN linux-2.6.27/include/trace/swap.h linux-2.6.27.19-5.1/include/trace/swap.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/swap.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/swap.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/swap.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,20 @@
+#ifndef _TRACE_SWAP_H
+#define _TRACE_SWAP_H
+ TPARGS(file));
+
+#endif
-diff -purN linux-2.6.27/include/trace/timer.h linux-2.6.27.19-5.1/include/trace/timer.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/timer.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/timer.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/timer.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,24 @@
+#ifndef _TRACE_TIMER_H
+#define _TRACE_TIMER_H
+ TPPROTO(struct task_struct *p),
+ TPARGS(p));
+#endif
-diff -purN linux-2.6.27/include/xen/balloon.h linux-2.6.27.19-5.1/include/xen/balloon.h
---- linux-2.6.27/include/xen/balloon.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/balloon.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/balloon.h
+--- a/include/xen/balloon.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/balloon.h Wed May 06 16:56:59 2009 +0100
@@ -36,7 +36,7 @@
#include <linux/spinlock.h>
/*
* Inform the balloon driver that it should allow some slop for device-driver
* memory activities.
-@@ -47,6 +47,10 @@ void balloon_update_driver_allowance(lon
+@@ -46,6 +46,10 @@
+ /* Allocate/free a set of empty pages in low memory (i.e., no RAM mapped). */
struct page **alloc_empty_pages_and_pagevec(int nr_pages);
void free_empty_pages_and_pagevec(struct page **pagevec, int nr_pages);
-
++
+/* Free an empty page range (not allocated through
+ alloc_empty_pages_and_pagevec), adding to the balloon. */
+void free_empty_pages(struct page **pagevec, int nr_pages);
-+
+
void balloon_release_driver_page(struct page *page);
- /*
-diff -purN linux-2.6.27/include/xen/blkif.h linux-2.6.27.19-5.1/include/xen/blkif.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/blkif.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/blkif.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/blkif.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,123 @@
+/*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+}
+
+#endif /* __XEN_BLKIF_H__ */
-diff -purN linux-2.6.27/include/xen/compat_ioctl.h linux-2.6.27.19-5.1/include/xen/compat_ioctl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/compat_ioctl.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/compat_ioctl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/compat_ioctl.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,45 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ _IOC(_IOC_NONE, 'P', 3, sizeof(struct privcmd_mmapbatch_32))
+
+#endif /* __LINUX_XEN_COMPAT_H__ */
-diff -purN linux-2.6.27/include/xen/cpu_hotplug.h linux-2.6.27.19-5.1/include/xen/cpu_hotplug.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/cpu_hotplug.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/cpu_hotplug.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/cpu_hotplug.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,41 @@
+#ifndef __XEN_CPU_HOTPLUG_H__
+#define __XEN_CPU_HOTPLUG_H__
+#endif /* !defined(CONFIG_HOTPLUG_CPU) */
+
+#endif /* __XEN_CPU_HOTPLUG_H__ */
-diff -purN linux-2.6.27/include/xen/driver_util.h linux-2.6.27.19-5.1/include/xen/driver_util.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/driver_util.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/driver_util.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/driver_util.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,10 @@
+
+#ifndef __ASM_XEN_DRIVER_UTIL_H__
+extern struct class *get_xen_class(void);
+
+#endif /* __ASM_XEN_DRIVER_UTIL_H__ */
-diff -purN linux-2.6.27/include/xen/evtchn.h linux-2.6.27.19-5.1/include/xen/evtchn.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/evtchn.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/evtchn.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/evtchn.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,233 @@
+/******************************************************************************
+ * evtchn.h
+#endif
+
+#endif /* __ASM_EVTCHN_H__ */
-diff -purN linux-2.6.27/include/xen/features.h linux-2.6.27.19-5.1/include/xen/features.h
---- linux-2.6.27/include/xen/features.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/features.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/features.h
+--- a/include/xen/features.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/features.h Wed May 06 16:56:59 2009 +0100
@@ -10,6 +10,7 @@
#define __XEN_FEATURES_H__
void xen_setup_features(void);
-@@ -20,4 +21,4 @@ static inline int xen_feature(int flag)
+@@ -20,4 +21,4 @@
return xen_features[flag];
}
-#endif /* __ASM_XEN_FEATURES_H__ */
+#endif /* __XEN_FEATURES_H__ */
-diff -purN linux-2.6.27/include/xen/firmware.h linux-2.6.27.19-5.1/include/xen/firmware.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/firmware.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/firmware.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/firmware.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,10 @@
+#ifndef __XEN_FIRMWARE_H__
+#define __XEN_FIRMWARE_H__
+void copy_edid(void);
+
+#endif /* __XEN_FIRMWARE_H__ */
-diff -purN linux-2.6.27/include/xen/gnttab.h linux-2.6.27.19-5.1/include/xen/gnttab.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/gnttab.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/gnttab.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/gnttab.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,165 @@
+/******************************************************************************
+ * gnttab.h
+}
+
+#endif /* __ASM_GNTTAB_H__ */
-diff -purN linux-2.6.27/include/xen/hvm.h linux-2.6.27.19-5.1/include/xen/hvm.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/hvm.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/hvm.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/hvm.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,23 @@
+/* Simple wrappers around HVM functions */
+#ifndef XEN_HVM_H__
+}
+
+#endif /* XEN_HVM_H__ */
-diff -purN linux-2.6.27/include/xen/hypercall.h linux-2.6.27.19-5.1/include/xen/hypercall.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/hypercall.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/hypercall.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/hypercall.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,30 @@
+#ifndef __XEN_HYPERCALL_H__
+#define __XEN_HYPERCALL_H__
+#define VOID(expr) ((void)((expr)?:0))
+
+#endif /* __XEN_HYPERCALL_H__ */
-diff -purN linux-2.6.27/include/xen/hypervisor_sysfs.h linux-2.6.27.19-5.1/include/xen/hypervisor_sysfs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/hypervisor_sysfs.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/hypervisor_sysfs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/hypervisor_sysfs.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,30 @@
+/*
+ * copyright (c) 2006 IBM Corporation
+};
+
+#endif /* _HYP_SYSFS_H_ */
-diff -purN linux-2.6.27/include/xen/interface/COPYING linux-2.6.27.19-5.1/include/xen/interface/COPYING
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/COPYING 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/COPYING
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/COPYING Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,38 @@
+XEN NOTICE
+==========
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
-diff -purN linux-2.6.27/include/xen/interface/acm.h linux-2.6.27.19-5.1/include/xen/interface/acm.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/acm.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/acm.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/acm.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,228 @@
+/*
+ * acm.h: Xen access control module interface defintions
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/acm_ops.h linux-2.6.27.19-5.1/include/xen/interface/acm_ops.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/acm_ops.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/acm_ops.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/acm_ops.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,159 @@
+/*
+ * acm_ops.h: Xen access control module hypervisor commands
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/arch-x86/cpuid.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86/cpuid.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86/cpuid.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86/cpuid.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86/cpuid.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,68 @@
+/******************************************************************************
+ * arch-x86/cpuid.h
+#define XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD (1u<<0)
+
+#endif /* __XEN_PUBLIC_ARCH_X86_CPUID_H__ */
-diff -purN linux-2.6.27/include/xen/interface/arch-x86/hvm/save.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86/hvm/save.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86/hvm/save.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86/hvm/save.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86/hvm/save.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,440 @@
+/*
+ * Structure definitions for HVM state that is held by Xen and must
+#define HVM_SAVE_CODE_MAX 15
+
+#endif /* __XEN_PUBLIC_HVM_SAVE_X86_H__ */
-diff -purN linux-2.6.27/include/xen/interface/arch-x86/xen-mca.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen-mca.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen-mca.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86/xen-mca.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86/xen-mca.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,279 @@
+/******************************************************************************
+ * arch-x86/mca.h
+#endif /* __ASSEMBLY__ */
+
+#endif /* __XEN_PUBLIC_ARCH_X86_MCA_H__ */
-diff -purN linux-2.6.27/include/xen/interface/arch-x86/xen-x86_32.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen-x86_32.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen-x86_32.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86/xen-x86_32.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86/xen-x86_32.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,180 @@
+/******************************************************************************
+ * xen-x86_32.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/arch-x86/xen-x86_64.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen-x86_64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen-x86_64.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86/xen-x86_64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86/xen-x86_64.h Wed May 06 16:56:59 2009 +0100
@@ -0,0 +1,212 @@
+/******************************************************************************
+ * xen-x86_64.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/arch-x86/xen.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86/xen.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86/xen.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,207 @@
+/******************************************************************************
+ * arch-x86/xen.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/arch-x86_32.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86_32.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86_32.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86_32.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86_32.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,27 @@
+/******************************************************************************
+ * arch-x86_32.h
+ */
+
+#include "arch-x86/xen.h"
-diff -purN linux-2.6.27/include/xen/interface/arch-x86_64.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86_64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86_64.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86_64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86_64.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,27 @@
+/******************************************************************************
+ * arch-x86_64.h
+ */
+
+#include "arch-x86/xen.h"
-diff -purN linux-2.6.27/include/xen/interface/callback.h linux-2.6.27.19-5.1/include/xen/interface/callback.h
---- linux-2.6.27/include/xen/interface/callback.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/callback.h 2009-03-25 16:11:52.000000000 +0000
-@@ -86,6 +86,8 @@ struct callback_register {
+diff -r 9608d5473017 include/xen/interface/callback.h
+--- a/include/xen/interface/callback.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/callback.h Wed May 06 16:57:00 2009 +0100
+@@ -86,6 +86,8 @@
uint16_t flags;
xen_callback_t address;
};
/*
* Unregister a callback.
-@@ -98,5 +100,22 @@ struct callback_unregister {
+@@ -98,5 +100,22 @@
uint16_t type;
uint16_t _unused;
};
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/dom0_ops.h linux-2.6.27.19-5.1/include/xen/interface/dom0_ops.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/dom0_ops.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/dom0_ops.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/dom0_ops.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,120 @@
+/******************************************************************************
+ * dom0_ops.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/domctl.h linux-2.6.27.19-5.1/include/xen/interface/domctl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/domctl.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/domctl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/domctl.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,680 @@
+/******************************************************************************
+ * domctl.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/elfnote.h linux-2.6.27.19-5.1/include/xen/interface/elfnote.h
---- linux-2.6.27/include/xen/interface/elfnote.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/elfnote.h 2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/elfnote.h
+--- a/include/xen/interface/elfnote.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/elfnote.h Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+ * elfnote.h
*
* Definitions used for the Xen ELF notes.
- *
++ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
-+ *
+ *
* Copyright (c) 2006, Ian Campbell, XenSource Ltd.
*/
-
@@ -10,7 +28,7 @@
#define __XEN_PUBLIC_ELFNOTE_H__
#endif /* __XEN_PUBLIC_ELFNOTE_H__ */
/*
-diff -purN linux-2.6.27/include/xen/interface/event_channel.h linux-2.6.27.19-5.1/include/xen/interface/event_channel.h
---- linux-2.6.27/include/xen/interface/event_channel.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/event_channel.h 2009-03-25 16:11:52.000000000 +0000
-@@ -3,14 +3,39 @@
+diff -r 9608d5473017 include/xen/interface/event_channel.h
+--- a/include/xen/interface/event_channel.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/event_channel.h Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+ * event_channel.h
*
* Event channels between domains.
- *
++ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
-+ *
+ *
* Copyright (c) 2003-2004, K A Fraser.
*/
-
+@@ -9,8 +27,15 @@
#ifndef __XEN_PUBLIC_EVENT_CHANNEL_H__
#define __XEN_PUBLIC_EVENT_CHANNEL_H__
/*
* EVTCHNOP_alloc_unbound: Allocate a port in domain <dom> and mark as
-@@ -20,13 +45,14 @@ DEFINE_GUEST_HANDLE(evtchn_port_t);
+@@ -20,13 +45,14 @@
* 1. If the caller is unprivileged then <dom> must be DOMID_SELF.
* 2. <rdom> may be DOMID_SELF, allowing loopback connections.
*/
/*
* EVTCHNOP_bind_interdomain: Construct an interdomain event channel between
-@@ -39,29 +65,35 @@ struct evtchn_alloc_unbound {
+@@ -39,29 +65,35 @@
*/
#define EVTCHNOP_bind_interdomain 0
struct evtchn_bind_interdomain {
/*
* EVTCHNOP_bind_pirq: Bind a local event channel to PIRQ <irq>.
-@@ -69,15 +101,16 @@ struct evtchn_bind_virq {
+@@ -69,15 +101,16 @@
* 1. A physical IRQ may be bound to at most one event channel per domain.
* 2. Only a sufficiently-privileged domain may bind to a physical IRQ.
*/
/*
* EVTCHNOP_bind_ipi: Bind a local event channel to receive events.
-@@ -85,33 +118,36 @@ struct evtchn_bind_pirq {
+@@ -85,33 +118,36 @@
* 1. The allocated event channel is bound to the specified vcpu. The binding
* may not be changed.
*/
/*
* EVTCHNOP_status: Get the current status of the communication channel which
-@@ -121,75 +157,109 @@ struct evtchn_send {
+@@ -121,75 +157,109 @@
* 2. Only a sufficiently-privileged domain may obtain the status of an event
* channel for which <dom> is not DOMID_SELF.
*/
};
+typedef struct evtchn_unmask evtchn_unmask_t;
--struct evtchn_op {
-- uint32_t cmd; /* EVTCHNOP_* */
-- union {
-- struct evtchn_alloc_unbound alloc_unbound;
-- struct evtchn_bind_interdomain bind_interdomain;
-- struct evtchn_bind_virq bind_virq;
-- struct evtchn_bind_pirq bind_pirq;
-- struct evtchn_bind_ipi bind_ipi;
-- struct evtchn_close close;
-- struct evtchn_send send;
-- struct evtchn_status status;
-- struct evtchn_bind_vcpu bind_vcpu;
-- struct evtchn_unmask unmask;
-- } u;
+/*
+ * EVTCHNOP_reset: Close all event channels associated with specified domain.
+ * NOTES:
+struct evtchn_reset {
+ /* IN parameters. */
+ domid_t dom;
- };
--DEFINE_GUEST_HANDLE_STRUCT(evtchn_op);
++};
+typedef struct evtchn_reset evtchn_reset_t;
+
+/*
+ * Argument to event_channel_op_compat() hypercall. Superceded by new
+ * event_channel_op() hypercall since 0x00030202.
+ */
-+struct evtchn_op {
+ struct evtchn_op {
+- uint32_t cmd; /* EVTCHNOP_* */
+- union {
+- struct evtchn_alloc_unbound alloc_unbound;
+- struct evtchn_bind_interdomain bind_interdomain;
+- struct evtchn_bind_virq bind_virq;
+- struct evtchn_bind_pirq bind_pirq;
+- struct evtchn_bind_ipi bind_ipi;
+- struct evtchn_close close;
+- struct evtchn_send send;
+- struct evtchn_status status;
+- struct evtchn_bind_vcpu bind_vcpu;
+- struct evtchn_unmask unmask;
+- } u;
+ uint32_t cmd; /* EVTCHNOP_* */
+ union {
+ struct evtchn_alloc_unbound alloc_unbound;
+ struct evtchn_bind_vcpu bind_vcpu;
+ struct evtchn_unmask unmask;
+ } u;
-+};
+ };
+-DEFINE_GUEST_HANDLE_STRUCT(evtchn_op);
+DEFINE_XEN_GUEST_HANDLE_STRUCT(evtchn_op);
+typedef struct evtchn_op evtchn_op_t;
+DEFINE_XEN_GUEST_HANDLE(evtchn_op_t);
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/features.h linux-2.6.27.19-5.1/include/xen/interface/features.h
---- linux-2.6.27/include/xen/interface/features.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/features.h 2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/features.h
+--- a/include/xen/interface/features.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/features.h Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+ * features.h
*
* Feature flags, reported by XENVER_get_features.
- *
++ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
-+ *
+ *
* Copyright (c) 2006, Keir Fraser <keir@xensource.com>
*/
-
@@ -41,6 +59,25 @@
/* x86: Does this Xen host support the MMU_PT_UPDATE_PRESERVE_AD hypercall? */
#define XENFEAT_mmu_pt_update_preserve_ad 5
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/grant_table.h linux-2.6.27.19-5.1/include/xen/interface/grant_table.h
---- linux-2.6.27/include/xen/interface/grant_table.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/grant_table.h 2009-03-25 16:11:52.000000000 +0000
-@@ -100,6 +100,7 @@ struct grant_entry {
+diff -r 9608d5473017 include/xen/interface/grant_table.h
+--- a/include/xen/interface/grant_table.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/grant_table.h Wed May 06 16:57:00 2009 +0100
+@@ -100,6 +100,7 @@
*/
uint32_t frame;
};
/*
* Type of grant entry.
-@@ -118,6 +119,7 @@ struct grant_entry {
+@@ -118,6 +119,7 @@
* GTF_readonly: Restrict @domid to read-only mappings and accesses. [GST]
* GTF_reading: Grant entry is currently mapped for reading by @domid. [XEN]
* GTF_writing: Grant entry is currently mapped for writing by @domid. [XEN]
*/
#define _GTF_readonly (2)
#define GTF_readonly (1U<<_GTF_readonly)
-@@ -125,6 +127,12 @@ struct grant_entry {
+@@ -125,6 +127,12 @@
#define GTF_reading (1U<<_GTF_reading)
#define _GTF_writing (4)
#define GTF_writing (1U<<_GTF_writing)
/*
* Subflags for GTF_accept_transfer:
-@@ -185,7 +193,9 @@ struct gnttab_map_grant_ref {
+@@ -185,7 +193,9 @@
grant_handle_t handle;
uint64_t dev_bus_addr;
};
/*
* GNTTABOP_unmap_grant_ref: Destroy one or more grant-reference mappings
-@@ -207,7 +217,9 @@ struct gnttab_unmap_grant_ref {
+@@ -207,7 +217,9 @@
/* OUT parameters. */
int16_t status; /* GNTST_* */
};
/*
* GNTTABOP_setup_table: Set up a grant table for <dom> comprising at least
-@@ -225,9 +237,11 @@ struct gnttab_setup_table {
+@@ -225,9 +237,11 @@
uint32_t nr_frames;
/* OUT parameters. */
int16_t status; /* GNTST_* */
/*
* GNTTABOP_dump_table: Dump the contents of the grant table to the
-@@ -240,7 +254,9 @@ struct gnttab_dump_table {
+@@ -240,7 +254,9 @@
/* OUT parameters. */
int16_t status; /* GNTST_* */
};
/*
* GNTTABOP_transfer_grant_ref: Transfer <frame> to a foreign domain. The
-@@ -253,13 +269,16 @@ DEFINE_GUEST_HANDLE_STRUCT(gnttab_dump_t
+@@ -253,13 +269,16 @@
#define GNTTABOP_transfer 4
struct gnttab_transfer {
/* IN parameters. */
/*
* GNTTABOP_copy: Hypervisor based copy
-@@ -285,22 +304,23 @@ DEFINE_GUEST_HANDLE_STRUCT(gnttab_transf
+@@ -285,22 +304,23 @@
#define GNTCOPY_dest_gref (1<<_GNTCOPY_dest_gref)
#define GNTTABOP_copy 5
/*
* GNTTABOP_query_size: Query the current and maximum sizes of the shared
-@@ -318,10 +338,36 @@ struct gnttab_query_size {
+@@ -318,10 +338,36 @@
uint32_t max_nr_frames;
int16_t status; /* GNTST_* */
};
*/
/* Map the grant entry for access by I/O devices. */
#define _GNTMAP_device_map (0)
-@@ -349,6 +395,13 @@ DEFINE_GUEST_HANDLE_STRUCT(gnttab_query_
+@@ -349,6 +395,13 @@
#define GNTMAP_contains_pte (1<<_GNTMAP_contains_pte)
/*
* Values for error status returns. All errors are -ve.
*/
#define GNTST_okay (0) /* Normal return. */
-@@ -361,7 +414,8 @@ DEFINE_GUEST_HANDLE_STRUCT(gnttab_query_
+@@ -361,7 +414,8 @@
#define GNTST_no_device_space (-7) /* Out of space in I/O MMU. */
#define GNTST_permission_denied (-8) /* Not enough privilege for operation. */
#define GNTST_bad_page (-9) /* Specified page was invalid for op. */
#define GNTTABOP_error_msgs { \
"okay", \
-@@ -374,7 +428,18 @@ DEFINE_GUEST_HANDLE_STRUCT(gnttab_query_
+@@ -374,7 +428,18 @@
"no spare translation slot in the I/O MMU", \
"permission denied", \
"bad page", \
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/hvm/e820.h linux-2.6.27.19-5.1/include/xen/interface/hvm/e820.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/hvm/e820.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/hvm/e820.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/hvm/e820.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,34 @@
+
+/*
+#define HVM_BELOW_4G_MMIO_LENGTH ((1ULL << 32) - HVM_BELOW_4G_MMIO_START)
+
+#endif /* __XEN_PUBLIC_HVM_E820_H__ */
-diff -purN linux-2.6.27/include/xen/interface/hvm/hvm_info_table.h linux-2.6.27.19-5.1/include/xen/interface/hvm/hvm_info_table.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/hvm/hvm_info_table.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/hvm/hvm_info_table.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/hvm/hvm_info_table.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * hvm/hvm_info_table.h
+};
+
+#endif /* __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__ */
-diff -purN linux-2.6.27/include/xen/interface/hvm/hvm_op.h linux-2.6.27.19-5.1/include/xen/interface/hvm/hvm_op.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/hvm/hvm_op.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/hvm/hvm_op.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/hvm/hvm_op.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,131 @@
+/*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */
+
+#endif /* __XEN_PUBLIC_HVM_HVM_OP_H__ */
-diff -purN linux-2.6.27/include/xen/interface/hvm/ioreq.h linux-2.6.27.19-5.1/include/xen/interface/hvm/ioreq.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/hvm/ioreq.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/hvm/ioreq.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/hvm/ioreq.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,127 @@
+/*
+ * ioreq.h: I/O request definitions for device models
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/hvm/params.h linux-2.6.27.19-5.1/include/xen/interface/hvm/params.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/hvm/params.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/hvm/params.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/hvm/params.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,105 @@
+/*
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+#define HVM_NR_PARAMS 15
+
+#endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
-diff -purN linux-2.6.27/include/xen/interface/hvm/save.h linux-2.6.27.19-5.1/include/xen/interface/hvm/save.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/hvm/save.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/hvm/save.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/hvm/save.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,88 @@
+/*
+ * hvm/save.h
+#endif
+
+#endif /* __XEN_PUBLIC_HVM_SAVE_H__ */
-diff -purN linux-2.6.27/include/xen/interface/hvm/vmx_assist.h linux-2.6.27.19-5.1/include/xen/interface/hvm/vmx_assist.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/hvm/vmx_assist.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/hvm/vmx_assist.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/hvm/vmx_assist.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,122 @@
+/*
+ * vmx_assist.h: Context definitions for the VMXASSIST world switch.
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/io/blkif.h linux-2.6.27.19-5.1/include/xen/interface/io/blkif.h
---- linux-2.6.27/include/xen/interface/io/blkif.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/blkif.h 2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/io/blkif.h
+--- a/include/xen/interface/io/blkif.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/blkif.h Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+ * blkif.h
*
* Unified block-device I/O interface for Xen guest OSes.
- *
++ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
-+ *
+ *
* Copyright (c) 2003-2004, Keir Fraser
*/
-
@@ -24,8 +42,10 @@
* rsp_event appropriately (e.g., using RING_FINAL_CHECK_FOR_RESPONSES()).
*/
/*
* REQUEST CODES.
-@@ -34,7 +54,7 @@ typedef uint64_t blkif_sector_t;
+@@ -34,7 +54,7 @@
#define BLKIF_OP_WRITE 1
/*
* Recognised only if "feature-barrier" is present in backend xenbus info.
* requests are likely to succeed or fail. Either way, a barrier request
* may fail at any time with BLKIF_RSP_EOPNOTSUPP if it is unsupported by
* the underlying block-device hardware. The boolean simply indicates whether
-@@ -43,33 +63,54 @@ typedef uint64_t blkif_sector_t;
+@@ -43,33 +63,54 @@
* create the "feature-barrier" node!
*/
#define BLKIF_OP_WRITE_BARRIER 2
*/
#define BLKIF_MAX_SEGMENTS_PER_REQUEST 11
-+struct blkif_request_segment {
-+ grant_ref_t gref; /* reference to I/O buffer frame */
-+ /* @first_sect: first sector in frame to transfer (inclusive). */
-+ /* @last_sect: last sector in frame to transfer (inclusive). */
-+ uint8_t first_sect, last_sect;
-+};
-+
- struct blkif_request {
+-struct blkif_request {
- uint8_t operation; /* BLKIF_OP_??? */
- uint8_t nr_segments; /* number of segments */
- blkif_vdev_t handle; /* only for read/write requests */
- /* @last_sect: last sector in frame to transfer (inclusive). */
- uint8_t first_sect, last_sect;
- } seg[BLKIF_MAX_SEGMENTS_PER_REQUEST];
++struct blkif_request_segment {
++ grant_ref_t gref; /* reference to I/O buffer frame */
++ /* @first_sect: first sector in frame to transfer (inclusive). */
++ /* @last_sect: last sector in frame to transfer (inclusive). */
++ uint8_t first_sect, last_sect;
+ };
+
++struct blkif_request {
+ uint8_t operation; /* BLKIF_OP_??? */
+ uint8_t nr_segments; /* number of segments */
+ blkif_vdev_t handle; /* only for read/write requests */
+ uint64_t id; /* private guest value, echoed in resp */
+ blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */
+ struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_REQUEST];
- };
++};
+typedef struct blkif_request blkif_request_t;
-
++
struct blkif_response {
- uint64_t id; /* copied from request */
- uint8_t operation; /* copied from request */
/*
* STATUS RETURN CODES.
-@@ -92,3 +133,13 @@ DEFINE_RING_TYPES(blkif, struct blkif_re
+@@ -92,3 +133,13 @@
#define VDISK_READONLY 0x4
#endif /* __XEN_PUBLIC_IO_BLKIF_H__ */
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/io/cdromif.h linux-2.6.27.19-5.1/include/xen/interface/io/cdromif.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/cdromif.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/cdromif.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/io/cdromif.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,120 @@
+/******************************************************************************
+ * cdromif.h
+ sizeof(struct vcd_generic_command) - sizeof(struct request_sense))
+
+#endif
-diff -purN linux-2.6.27/include/xen/interface/io/console.h linux-2.6.27.19-5.1/include/xen/interface/io/console.h
---- linux-2.6.27/include/xen/interface/io/console.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/console.h 2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/io/console.h
+--- a/include/xen/interface/io/console.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/console.h Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+ * console.h
*
* Console I/O interface for Xen guest OSes.
- *
++ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
-+ *
+ *
* Copyright (c) 2005, Keir Fraser
*/
-
-@@ -21,3 +39,13 @@ struct xencons_interface {
+@@ -21,3 +39,13 @@
};
#endif /* __XEN_PUBLIC_IO_CONSOLE_H__ */
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/io/fbif.h linux-2.6.27.19-5.1/include/xen/interface/io/fbif.h
---- linux-2.6.27/include/xen/interface/io/fbif.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/fbif.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/fbif.h
+--- a/include/xen/interface/io/fbif.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/fbif.h Wed May 06 16:57:00 2009 +0100
@@ -41,12 +41,13 @@
*/
#define XENFB_TYPE_UPDATE 2
};
/*
-@@ -55,36 +56,58 @@ struct xenfb_update {
+@@ -55,36 +56,58 @@
*/
#define XENFB_TYPE_RESIZE 3
* Frontends should ignore unknown in events.
- * No in events currently defined.
*/
-
++
+/*
+ * Framebuffer refresh period advice
+ * Backend sends it to advise the frontend their preferred period of
+ uint32_t period; /* period of refresh, in ms,
+ * XENFB_NO_REFRESH if no refresh is needed */
+};
-+
+
#define XENFB_IN_EVENT_SIZE 40
-union xenfb_in_event {
};
/* shared page */
-@@ -93,41 +116,46 @@ union xenfb_in_event {
+@@ -93,41 +116,46 @@
#define XENFB_IN_RING_LEN (XENFB_IN_RING_SIZE / XENFB_IN_EVENT_SIZE)
#define XENFB_IN_RING_OFFS 1024
#define XENFB_IN_RING(page) \
-struct xenfb_page {
- uint32_t in_cons, in_prod;
- uint32_t out_cons, out_prod;
--
++struct xenfb_page
++{
++ uint32_t in_cons, in_prod;
++ uint32_t out_cons, out_prod;
+
- int32_t width; /* width of the framebuffer (in pixels) */
- int32_t height; /* height of the framebuffer (in pixels) */
- uint32_t line_length; /* length of a row of pixels (in bytes) */
- uint32_t mem_length; /* length of the framebuffer (in bytes) */
- uint8_t depth; /* depth of a pixel (in bits) */
--
++ int32_t width; /* the width of the framebuffer (in pixels) */
++ int32_t height; /* the height of the framebuffer (in pixels) */
++ uint32_t line_length; /* the length of a row of pixels (in bytes) */
++ uint32_t mem_length; /* the length of the framebuffer (in bytes) */
++ uint8_t depth; /* the depth of a pixel (in bits) */
+
- /*
- * Framebuffer page directory
- *
- * expansion.
- */
- unsigned long pd[256];
-+struct xenfb_page
-+{
-+ uint32_t in_cons, in_prod;
-+ uint32_t out_cons, out_prod;
-+
-+ int32_t width; /* the width of the framebuffer (in pixels) */
-+ int32_t height; /* the height of the framebuffer (in pixels) */
-+ uint32_t line_length; /* the length of a row of pixels (in bytes) */
-+ uint32_t mem_length; /* the length of the framebuffer (in bytes) */
-+ uint8_t depth; /* the depth of a pixel (in bits) */
-+
+ /*
+ * Framebuffer page directory
+ *
};
/*
-@@ -141,3 +169,13 @@ struct xenfb_page {
+@@ -141,3 +169,13 @@
#endif
#endif
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/io/fsif.h linux-2.6.27.19-5.1/include/xen/interface/io/fsif.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/fsif.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/fsif.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/io/fsif.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,191 @@
+/******************************************************************************
+ * fsif.h
+
+
+#endif
-diff -purN linux-2.6.27/include/xen/interface/io/kbdif.h linux-2.6.27.19-5.1/include/xen/interface/io/kbdif.h
---- linux-2.6.27/include/xen/interface/io/kbdif.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/kbdif.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/kbdif.h
+--- a/include/xen/interface/io/kbdif.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/kbdif.h Wed May 06 16:57:00 2009 +0100
@@ -45,34 +45,38 @@
*/
#define XENKBD_TYPE_POS 4
- int32_t rel_x; /* relative X motion */
- int32_t rel_y; /* relative Y motion */
- int32_t rel_z; /* relative Z motion (wheel) */
--};
--
--struct xenkbd_key {
-- uint8_t type; /* XENKBD_TYPE_KEY */
-- uint8_t pressed; /* 1 if pressed; 0 otherwise */
-- uint32_t keycode; /* KEY_* from linux/input.h */
--};
--
--struct xenkbd_position {
-- uint8_t type; /* XENKBD_TYPE_POS */
-- int32_t abs_x; /* absolute X position (in FB pixels) */
-- int32_t abs_y; /* absolute Y position (in FB pixels) */
-- int32_t rel_z; /* relative Z motion (wheel) */
+struct xenkbd_motion
+{
+ uint8_t type; /* XENKBD_TYPE_MOTION */
+ int32_t rel_x; /* relative X motion */
+ int32_t rel_y; /* relative Y motion */
+ int32_t rel_z; /* relative Z motion (wheel) */
-+};
-+
+ };
+
+-struct xenkbd_key {
+- uint8_t type; /* XENKBD_TYPE_KEY */
+- uint8_t pressed; /* 1 if pressed; 0 otherwise */
+- uint32_t keycode; /* KEY_* from linux/input.h */
+struct xenkbd_key
+{
+ uint8_t type; /* XENKBD_TYPE_KEY */
+ uint8_t pressed; /* 1 if pressed; 0 otherwise */
+ uint32_t keycode; /* KEY_* from linux/input.h */
-+};
-+
+ };
+
+-struct xenkbd_position {
+- uint8_t type; /* XENKBD_TYPE_POS */
+- int32_t abs_x; /* absolute X position (in FB pixels) */
+- int32_t abs_y; /* absolute Y position (in FB pixels) */
+- int32_t rel_z; /* relative Z motion (wheel) */
+struct xenkbd_position
+{
+ uint8_t type; /* XENKBD_TYPE_POS */
};
/* Out events (frontend -> backend) */
-@@ -85,9 +89,10 @@ union xenkbd_in_event {
+@@ -85,9 +89,10 @@
#define XENKBD_OUT_EVENT_SIZE 40
};
/* shared page */
-@@ -96,21 +101,32 @@ union xenkbd_out_event {
+@@ -96,21 +101,32 @@
#define XENKBD_IN_RING_LEN (XENKBD_IN_RING_SIZE / XENKBD_IN_EVENT_SIZE)
#define XENKBD_IN_RING_OFFS 1024
#define XENKBD_IN_RING(page) \
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/io/netif.h linux-2.6.27.19-5.1/include/xen/interface/io/netif.h
---- linux-2.6.27/include/xen/interface/io/netif.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/netif.h 2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/io/netif.h
+--- a/include/xen/interface/io/netif.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/netif.h Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+ * netif.h
*
* Unified network-device I/O interface for Xen guest OSes.
- *
++ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
-+ *
+ *
* Copyright (c) 2003-2004, Keir Fraser
*/
-
@@ -47,18 +65,21 @@
#define _NETTXF_extra_info (3)
#define NETTXF_extra_info (1U<<_NETTXF_extra_info)
/* netif_extra_info flags. */
#define _XEN_NETIF_EXTRA_FLAG_MORE (0)
-@@ -71,49 +92,68 @@ struct xen_netif_tx_request {
+@@ -71,49 +92,68 @@
* This structure needs to fit within both netif_tx_request and
* netif_rx_response for compatibility.
*/
-struct xen_netif_extra_info {
- uint8_t type; /* XEN_NETIF_EXTRA_TYPE_* */
- uint8_t flags; /* XEN_NETIF_EXTRA_FLAG_* */
--
++struct netif_extra_info {
++ uint8_t type; /* XEN_NETIF_EXTRA_TYPE_* */
++ uint8_t flags; /* XEN_NETIF_EXTRA_FLAG_* */
+
- union {
- struct {
- /*
- * example, for TCP this is just the path MSS.
- */
- uint16_t size;
--
-- /*
-- * GSO type. This determines the protocol of
-- * the packet and any extra features required
-- * to segment the packet properly.
-- */
-- uint8_t type; /* XEN_NETIF_GSO_TYPE_* */
--
-- /* Future expansion. */
-- uint8_t pad;
--
-- /*
-- * GSO features. This specifies any extra GSO
-- * features required to process this packet,
-- * such as ECN support for TCPv4.
-- */
-- uint16_t features; /* XEN_NETIF_GSO_FEAT_* */
-- } gso;
-+struct netif_extra_info {
-+ uint8_t type; /* XEN_NETIF_EXTRA_TYPE_* */
-+ uint8_t flags; /* XEN_NETIF_EXTRA_FLAG_* */
-+
+ union {
+ /*
+ * XEN_NETIF_EXTRA_TYPE_GSO:
+ * is just the path MSS.
+ */
+ uint16_t size;
-+
+
+- /*
+- * GSO type. This determines the protocol of
+- * the packet and any extra features required
+- * to segment the packet properly.
+- */
+- uint8_t type; /* XEN_NETIF_GSO_TYPE_* */
+ /*
+ * GSO type. This determines the protocol of the packet and any
+ * extra features required to segment the packet properly.
+ */
+ uint8_t type; /* XEN_NETIF_GSO_TYPE_* */
-+
+
+- /* Future expansion. */
+- uint8_t pad;
+ /* Future expansion. */
+ uint8_t pad;
-+
+
+- /*
+- * GSO features. This specifies any extra GSO
+- * features required to process this packet,
+- * such as ECN support for TCPv4.
+- */
+- uint16_t features; /* XEN_NETIF_GSO_FEAT_* */
+- } gso;
+ /*
+ * GSO features. This specifies any extra GSO features required
+ * to process this packet, such as ECN support for TCPv4.
+ */
+ uint16_t features; /* XEN_NETIF_GSO_FEAT_* */
+ } gso;
-+
+
+- uint16_t pad[3];
+- } u;
+ /*
+ * XEN_NETIF_EXTRA_TYPE_MCAST_{ADD,DEL}:
+ * Backend advertises availability via 'feature-multicast-control'
+ struct {
+ uint8_t addr[6]; /* Address to add/remove. */
+ } mcast;
-
-- uint16_t pad[3];
-- } u;
++
+ uint16_t pad[3];
+ } u;
};
/* Packet data has been validated against protocol checksum. */
#define _NETRXF_data_validated (0)
-@@ -131,23 +171,34 @@ struct xen_netif_rx_request {
+@@ -131,23 +171,34 @@
#define _NETRXF_extra_info (3)
#define NETRXF_extra_info (1U<<_NETRXF_extra_info)
#define NETIF_RSP_DROPPED -2
#define NETIF_RSP_ERROR -1
-@@ -156,3 +207,13 @@ DEFINE_RING_TYPES(xen_netif_rx,
+@@ -156,3 +207,13 @@
#define NETIF_RSP_NULL 1
#endif
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/io/pciif.h linux-2.6.27.19-5.1/include/xen/interface/io/pciif.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/pciif.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/pciif.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/io/pciif.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,101 @@
+/*
+ * PCI Backend/Frontend Common Data Structures & Macros
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/io/protocols.h linux-2.6.27.19-5.1/include/xen/interface/io/protocols.h
---- linux-2.6.27/include/xen/interface/io/protocols.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/protocols.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/protocols.h
+--- a/include/xen/interface/io/protocols.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/protocols.h Wed May 06 16:57:00 2009 +0100
@@ -1,10 +1,31 @@
+/******************************************************************************
+ * protocols.h
#else
# error arch fixup needed here
#endif
-diff -purN linux-2.6.27/include/xen/interface/io/ring.h linux-2.6.27.19-5.1/include/xen/interface/io/ring.h
---- linux-2.6.27/include/xen/interface/io/ring.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/ring.h 2009-03-25 16:11:52.000000000 +0000
-@@ -3,16 +3,42 @@
+diff -r 9608d5473017 include/xen/interface/io/ring.h
+--- a/include/xen/interface/io/ring.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/ring.h Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+ * ring.h
*
* Shared producer-consumer ring macros.
- *
++ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
-+ *
+ *
* Tim Deegan and Andrew Warfield November 2004.
*/
-
+@@ -9,10 +27,18 @@
#ifndef __XEN_PUBLIC_IO_RING_H__
#define __XEN_PUBLIC_IO_RING_H__
#define __RD4(_x) (((_x) & 0x0000000c) ? __RD2((_x)>>2)<<2 : __RD2(_x))
#define __RD8(_x) (((_x) & 0x000000f0) ? __RD4((_x)>>4)<<4 : __RD4(_x))
#define __RD16(_x) (((_x) & 0x0000ff00) ? __RD8((_x)>>8)<<8 : __RD8(_x))
-@@ -25,73 +51,76 @@ typedef unsigned int RING_IDX;
+@@ -25,73 +51,76 @@
* power of two (so we can mask with (size-1) to loop around).
*/
#define __RING_SIZE(_s, _sz) \
/*
* Macros for manipulating rings.
-@@ -109,86 +138,94 @@ struct __name##_back_ring { \
+@@ -109,86 +138,94 @@
*/
/* Initialising empty rings */
} while (0)
/*
-@@ -221,40 +258,50 @@ struct __name##_back_ring { \
+@@ -221,40 +258,50 @@
* field appropriately.
*/
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/io/tpmif.h linux-2.6.27.19-5.1/include/xen/interface/io/tpmif.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/tpmif.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/tpmif.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/io/tpmif.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,77 @@
+/******************************************************************************
+ * tpmif.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/io/vscsiif.h linux-2.6.27.19-5.1/include/xen/interface/io/vscsiif.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/vscsiif.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/vscsiif.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/io/vscsiif.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,105 @@
+/******************************************************************************
+ * vscsiif.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/io/xenbus.h linux-2.6.27.19-5.1/include/xen/interface/io/xenbus.h
---- linux-2.6.27/include/xen/interface/io/xenbus.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/xenbus.h 2009-03-25 16:11:52.000000000 +0000
-@@ -3,42 +3,78 @@
+diff -r 9608d5473017 include/xen/interface/io/xenbus.h
+--- a/include/xen/interface/io/xenbus.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/xenbus.h Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+ * xenbus.h
*
* Xenbus protocol details.
- *
++ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
-+ *
+ *
* Copyright (C) 2005 XenSource Ltd.
*/
-
+@@ -9,36 +27,54 @@
#ifndef _XEN_PUBLIC_IO_XENBUS_H
#define _XEN_PUBLIC_IO_XENBUS_H
+ */
+enum xenbus_state {
+ XenbusStateUnknown = 0,
-+
+
+ XenbusStateInitialising = 1,
+
+ /*
+ * Reconfiguring: The device is being reconfigured.
+ */
+ XenbusStateReconfiguring = 7,
-
++
+ XenbusStateReconfigured = 8
};
+typedef enum xenbus_state XenbusState;
+ * indent-tabs-mode: nil
* End:
*/
-diff -purN linux-2.6.27/include/xen/interface/io/xs_wire.h linux-2.6.27.19-5.1/include/xen/interface/io/xs_wire.h
---- linux-2.6.27/include/xen/interface/io/xs_wire.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/xs_wire.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/xs_wire.h
+--- a/include/xen/interface/io/xs_wire.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/xs_wire.h Wed May 06 16:57:00 2009 +0100
@@ -1,6 +1,25 @@
/*
* Details of the "wire" protocol between Xen Store Daemon and client
* Copyright (C) 2005 Rusty Russell IBM Corporation
*/
-@@ -26,7 +45,9 @@ enum xsd_sockmsg_type
+@@ -26,7 +45,9 @@
XS_SET_PERMS,
XS_WATCH_EVENT,
XS_ERROR,
};
#define XS_WRITE_NONE "NONE"
-@@ -40,7 +61,12 @@ struct xsd_errors
+@@ -40,7 +61,12 @@
const char *errstring;
};
#define XSD_ERROR(x) { x, #x }
XSD_ERROR(EINVAL),
XSD_ERROR(EACCES),
XSD_ERROR(EEXIST),
-@@ -84,4 +110,21 @@ struct xenstore_domain_interface {
+@@ -84,4 +110,21 @@
XENSTORE_RING_IDX rsp_cons, rsp_prod;
};
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/kexec.h linux-2.6.27.19-5.1/include/xen/interface/kexec.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/kexec.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/kexec.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/kexec.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,168 @@
+/******************************************************************************
+ * kexec.h - Public portion
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/memory.h linux-2.6.27.19-5.1/include/xen/interface/memory.h
---- linux-2.6.27/include/xen/interface/memory.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/memory.h 2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/memory.h
+--- a/include/xen/interface/memory.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/memory.h Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+ * memory.h
*
* Memory reservation and information.
- *
++ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
-+ *
+ *
* Copyright (c) 2005, Keir Fraser <keir@xensource.com>
*/
-
@@ -10,13 +28,28 @@
#define __XEN_PUBLIC_MEMORY_H__
struct xen_memory_reservation {
/*
-@@ -29,19 +62,18 @@ struct xen_memory_reservation {
+@@ -29,19 +62,18 @@
* OUT: GMFN bases of extents that were allocated
* (NB. This command also updates the mach_to_phys translation table)
*/
/*
* Domain whose reservation is being changed.
-@@ -50,7 +82,52 @@ struct xen_memory_reservation {
+@@ -50,7 +82,52 @@
domid_t domid;
};
/*
* Returns the maximum machine frame number of mapped RAM in this system.
-@@ -68,6 +145,11 @@ DEFINE_GUEST_HANDLE_STRUCT(xen_memory_re
+@@ -66,6 +143,11 @@
+ */
+ #define XENMEM_current_reservation 3
#define XENMEM_maximum_reservation 4
-
- /*
++
++/*
+ * Returns the maximum GPFN in use by the guest, or -ve errcode on failure.
+ */
+#define XENMEM_maximum_gpfn 14
-+
-+/*
+
+ /*
* Returns a list of MFN bases of 2MB extents comprising the machine_to_phys
- * mapping table. Architectures which do not have a m2p table do not implement
- * this command.
-@@ -86,7 +168,7 @@ struct xen_machphys_mfn_list {
+@@ -86,7 +168,7 @@
* any large discontiguities in the machine address space, 2MB gaps in
* the machphys table will be represented by an MFN base of zero.
*/
/*
* Number of extents written to the above array. This will be smaller
-@@ -94,7 +176,23 @@ struct xen_machphys_mfn_list {
+@@ -94,7 +176,23 @@
*/
unsigned int nr_extents;
};
/*
* Sets the GPFN at which a particular page appears in the specified guest's
-@@ -109,15 +207,34 @@ struct xen_add_to_physmap {
+@@ -109,15 +207,34 @@
/* Source mapping space. */
#define XENMAPSPACE_shared_info 0 /* shared info page */
#define XENMAPSPACE_grant_table 1 /* grant table page */
/*
* Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error
-@@ -129,17 +246,72 @@ struct xen_translate_gpfn_list {
+@@ -129,17 +246,72 @@
domid_t domid;
/* Length of list. */
*/
- GUEST_HANDLE(ulong) mfn_list;
+ XEN_GUEST_HANDLE(xen_pfn_t) mfn_list;
-+};
+ };
+-DEFINE_GUEST_HANDLE_STRUCT(xen_translate_gpfn_list);
+DEFINE_XEN_GUEST_HANDLE_STRUCT(xen_translate_gpfn_list);
+typedef struct xen_translate_gpfn_list xen_translate_gpfn_list_t;
+DEFINE_XEN_GUEST_HANDLE(xen_translate_gpfn_list_t);
+struct xen_foreign_memory_map {
+ domid_t domid;
+ struct xen_memory_map map;
- };
--DEFINE_GUEST_HANDLE_STRUCT(xen_translate_gpfn_list);
++};
+typedef struct xen_foreign_memory_map xen_foreign_memory_map_t;
+DEFINE_XEN_GUEST_HANDLE(xen_foreign_memory_map_t);
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/nmi.h linux-2.6.27.19-5.1/include/xen/interface/nmi.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/nmi.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/nmi.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/nmi.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,78 @@
+/******************************************************************************
+ * nmi.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/physdev.h linux-2.6.27.19-5.1/include/xen/interface/physdev.h
---- linux-2.6.27/include/xen/interface/physdev.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/physdev.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/physdev.h
+--- a/include/xen/interface/physdev.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/physdev.h Wed May 06 16:57:00 2009 +0100
@@ -24,7 +24,7 @@
/*
* Prototype for this hypercall is:
+ uint32_t irq;
+ /* IN or OUT */
+ uint32_t vector;
-+};
+ };
+typedef struct physdev_irq physdev_irq_t;
+DEFINE_XEN_GUEST_HANDLE(physdev_irq_t);
+
+ /* IN */
+ uint8_t bus;
+ uint8_t devfn;
- };
++};
+typedef struct physdev_restore_msi physdev_restore_msi_t;
+DEFINE_XEN_GUEST_HANDLE(physdev_restore_msi_t);
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/platform.h linux-2.6.27.19-5.1/include/xen/interface/platform.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/platform.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/platform.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/platform.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,357 @@
+/******************************************************************************
+ * platform.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/sched.h linux-2.6.27.19-5.1/include/xen/interface/sched.h
---- linux-2.6.27/include/xen/interface/sched.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/sched.h 2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/sched.h
+--- a/include/xen/interface/sched.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/sched.h Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+ * sched.h
*
* Scheduler state interactions
- *
++ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
-+ *
+ *
* Copyright (c) 2005, Keir Fraser <keir@xensource.com>
*/
-
@@ -13,17 +31,17 @@
/*
/*
* Poll a set of event-channel ports. Return when one or more are pending. An
-@@ -58,11 +78,27 @@ DEFINE_GUEST_HANDLE_STRUCT(sched_shutdow
+@@ -58,11 +78,27 @@
*/
#define SCHEDOP_poll 3
struct sched_poll {
/*
* Reason codes for SCHEDOP_shutdown. These may be interpreted by control
-@@ -75,3 +111,13 @@ DEFINE_GUEST_HANDLE_STRUCT(sched_poll);
+@@ -75,3 +111,13 @@
#define SHUTDOWN_crash 3 /* Tell controller we've crashed. */
#endif /* __XEN_PUBLIC_SCHED_H__ */
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/sysctl.h linux-2.6.27.19-5.1/include/xen/interface/sysctl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/sysctl.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/sysctl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/sysctl.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,308 @@
+/******************************************************************************
+ * sysctl.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/trace.h linux-2.6.27.19-5.1/include/xen/interface/trace.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/trace.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/trace.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/trace.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,205 @@
+/******************************************************************************
+ * include/public/trace.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/vcpu.h linux-2.6.27.19-5.1/include/xen/interface/vcpu.h
---- linux-2.6.27/include/xen/interface/vcpu.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/vcpu.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/vcpu.h
+--- a/include/xen/interface/vcpu.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/vcpu.h Wed May 06 16:57:00 2009 +0100
@@ -29,9 +29,9 @@
/*
/* VCPU is currently running on a physical CPU. */
#define RUNSTATE_running 0
-@@ -108,47 +110,54 @@ DEFINE_GUEST_HANDLE_STRUCT(vcpu_runstate
+@@ -108,47 +110,54 @@
* Register a shared memory area from which the guest may obtain its own
* runstate information without needing to execute a hypercall.
* Notes:
/* Flags to VCPUOP_set_singleshot_timer. */
/* Require the timeout to be in the future (return -ETIME if it's passed). */
-@@ -161,13 +170,48 @@ DEFINE_GUEST_HANDLE_STRUCT(vcpu_set_sing
+@@ -161,13 +170,48 @@
* structure in a convenient place, such as in a per-cpu data area.
* The pointer need not be page aligned, but the structure must not
* cross a page boundary.
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/version.h linux-2.6.27.19-5.1/include/xen/interface/version.h
---- linux-2.6.27/include/xen/interface/version.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/version.h 2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/version.h
+--- a/include/xen/interface/version.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/version.h Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+ * version.h
*
* Xen version, type, and compile information.
- *
++ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
-+ *
+ *
* Copyright (c) 2005, Nguyen Anh Quynh <aquynh@gmail.com>
* Copyright (c) 2005, Keir Fraser <keir@xensource.com>
- */
@@ -10,17 +28,18 @@
#ifndef __XEN_PUBLIC_VERSION_H__
#define __XEN_PUBLIC_VERSION_H__
/* arg == xen_compile_info_t. */
#define XENVER_compile_info 2
-@@ -30,31 +49,52 @@ struct xen_compile_info {
+@@ -30,31 +49,52 @@
char compile_domain[32];
char compile_date[32];
};
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/xen-compat.h linux-2.6.27.19-5.1/include/xen/interface/xen-compat.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/xen-compat.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/xen-compat.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/xen-compat.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * xen-compat.h
+#endif
+
+#endif /* __XEN_PUBLIC_XEN_COMPAT_H__ */
-diff -purN linux-2.6.27/include/xen/interface/xen.h linux-2.6.27.19-5.1/include/xen/interface/xen.h
---- linux-2.6.27/include/xen/interface/xen.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/xen.h 2009-03-25 16:11:52.000000000 +0000
-@@ -3,35 +3,70 @@
+diff -r 9608d5473017 include/xen/interface/xen.h
+--- a/include/xen/interface/xen.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/xen.h Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+ * xen.h
*
* Guest OS interface to Xen.
- *
++ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
-+ *
+ *
* Copyright (c) 2004, K A Fraser
*/
-
+@@ -9,29 +27,46 @@
#ifndef __XEN_PUBLIC_XEN_H__
#define __XEN_PUBLIC_XEN_H__
--#include <asm/xen/interface.h>
+#include "xen-compat.h"
+#ifdef CONFIG_PARAVIRT_XEN
- #include <asm/pvclock-abi.h>
++#include <asm/pvclock-abi.h>
+#endif
-
--/*
-- * XEN "SYSTEM CALLS" (a.k.a. HYPERCALLS).
-- */
++
+#if defined(CONFIG_PARAVIRT_XEN) && !defined(HAVE_XEN_PLATFORM_COMPAT_H)
-+#include <asm/xen/interface.h>
+ #include <asm/xen/interface.h>
+-#include <asm/pvclock-abi.h>
+#elif defined(__i386__) || defined(__x86_64__)
+#include "arch-x86/xen.h"
+#elif defined(__ia64__)
+#endif
/*
+- * XEN "SYSTEM CALLS" (a.k.a. HYPERCALLS).
++ * HYPERCALLS
+ */
+
+-/*
- * x86_32: EAX = vector; EBX, ECX, EDX, ESI, EDI = args 1, 2, 3, 4, 5.
- * EAX = return value
- * (argument registers may be clobbered on return)
- * x86_64: RAX = vector; RDI, RSI, RDX, R10, R8, R9 = args 1, 2, 3, 4, 5, 6.
- * RAX = return value
- * (argument registers not clobbered on return; RCX, R11 are)
-+ * HYPERCALLS
- */
-+
+- */
#define __HYPERVISOR_set_trap_table 0
#define __HYPERVISOR_mmu_update 1
#define __HYPERVISOR_set_gdt 2
* VIRTUAL INTERRUPTS
*
* Virtual interrupts that a guest OS may receive from Xen.
-- */
--#define VIRQ_TIMER 0 /* Timebase update, and/or requested timeout. */
--#define VIRQ_DEBUG 1 /* Request guest to dump debug info. */
--#define VIRQ_CONSOLE 2 /* (DOM0) Bytes received on emergency console. */
--#define VIRQ_DOM_EXC 3 /* (DOM0) Exceptional event for some domain. */
--#define VIRQ_DEBUGGER 6 /* (DOM0) A domain has paused for debugging. */
+ *
+ * In the side comments, 'V.' denotes a per-VCPU VIRQ while 'G.' denotes a
+ * global VIRQ. The former can be bound once per VCPU and cannot be re-bound.
+ * The latter can be allocated only once per guest: they must initially be
+ * allocated to VCPU0 but can subsequently be re-bound.
-+ */
+ */
+-#define VIRQ_TIMER 0 /* Timebase update, and/or requested timeout. */
+-#define VIRQ_DEBUG 1 /* Request guest to dump debug info. */
+-#define VIRQ_CONSOLE 2 /* (DOM0) Bytes received on emergency console. */
+-#define VIRQ_DOM_EXC 3 /* (DOM0) Exceptional event for some domain. */
+-#define VIRQ_DEBUGGER 6 /* (DOM0) A domain has paused for debugging. */
+#define VIRQ_TIMER 0 /* V. Timebase update, and/or requested timeout. */
+#define VIRQ_DEBUG 1 /* V. Request guest to dump debug info. */
+#define VIRQ_CONSOLE 2 /* G. (DOM0) Bytes received on emergency console. */
#endif
/* These are passed as 'flags' to update_va_mapping. They can be ORed. */
-@@ -224,11 +312,24 @@ DEFINE_GUEST_HANDLE_STRUCT(mmuext_op);
+@@ -224,11 +312,24 @@
*/
#define VMASST_CMD_enable 0
#define VMASST_CMD_disable 1
#ifndef __ASSEMBLY__
-@@ -267,7 +368,9 @@ struct mmu_update {
+@@ -267,7 +368,9 @@
uint64_t ptr; /* Machine address of PTE. */
uint64_t val; /* New contents of PTE. */
};
/*
* Send an array of these to HYPERVISOR_multicall().
-@@ -275,10 +378,16 @@ DEFINE_GUEST_HANDLE_STRUCT(mmu_update);
+@@ -275,10 +378,16 @@
*/
struct multicall_entry {
unsigned long op;
/*
* Event channel endpoints per domain:
-@@ -287,173 +396,240 @@ DEFINE_GUEST_HANDLE_STRUCT(multicall_ent
+@@ -287,179 +396,251 @@
#define NR_EVENT_CHANNELS (sizeof(unsigned long) * sizeof(unsigned long) * 64)
struct vcpu_time_info {
- */
- unsigned long evtchn_pending[sizeof(unsigned long) * 8];
- unsigned long evtchn_mask[sizeof(unsigned long) * 8];
--
-- /*
-- * Wallclock time: updated only by control software. Guests should base
-- * their gettimeofday() syscall on this wallclock-base value.
-- */
-- struct pvclock_wall_clock wc;
+ /*
+ * A domain can create "event channels" on which it can send and receive
+ * asynchronous event notifications. There are three classes of event that
+ */
+ unsigned long evtchn_pending[sizeof(unsigned long) * 8];
+ unsigned long evtchn_mask[sizeof(unsigned long) * 8];
-+
+
+- /*
+- * Wallclock time: updated only by control software. Guests should base
+- * their gettimeofday() syscall on this wallclock-base value.
+- */
+- struct pvclock_wall_clock wc;
+ /*
+ * Wallclock time: updated only by control software. Guests should base
+ * their gettimeofday() syscall on this wallclock-base value.
typedef uint8_t xen_domain_handle_t[16];
-@@ -461,6 +637,11 @@ typedef uint8_t xen_domain_handle_t[16];
+ /* Turn a plain number into a C unsigned long constant. */
#define __mk_unsigned_long(x) x ## UL
#define mk_unsigned_long(x) __mk_unsigned_long(x)
-
++
+__DEFINE_XEN_GUEST_HANDLE(uint8, uint8_t);
+__DEFINE_XEN_GUEST_HANDLE(uint16, uint16_t);
+__DEFINE_XEN_GUEST_HANDLE(uint32, uint32_t);
+__DEFINE_XEN_GUEST_HANDLE(uint64, uint64_t);
-+
+
#else /* __ASSEMBLY__ */
- /* In assembly code we cannot use C numeric constant suffixes. */
-@@ -468,4 +649,24 @@ typedef uint8_t xen_domain_handle_t[16];
+@@ -468,4 +649,24 @@
#endif /* !__ASSEMBLY__ */
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/xenoprof.h linux-2.6.27.19-5.1/include/xen/interface/xenoprof.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/xenoprof.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/xenoprof.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/xenoprof.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,138 @@
+/******************************************************************************
+ * xenoprof.h
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/xsm/acm.h linux-2.6.27.19-5.1/include/xen/interface/xsm/acm.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/xsm/acm.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/xsm/acm.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/xsm/acm.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,235 @@
+/*
+ * acm.h: Xen access control module interface defintions
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/xsm/acm_ops.h linux-2.6.27.19-5.1/include/xen/interface/xsm/acm_ops.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/xsm/acm_ops.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/xsm/acm_ops.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/xsm/acm_ops.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,159 @@
+/*
+ * acm_ops.h: Xen access control module hypervisor commands
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -purN linux-2.6.27/include/xen/interface/xsm/flask_op.h linux-2.6.27.19-5.1/include/xen/interface/xsm/flask_op.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/xsm/flask_op.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/xsm/flask_op.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/xsm/flask_op.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,45 @@
+/*
+ * This file contains the flask_op hypercall commands and definitions.
+DEFINE_XEN_GUEST_HANDLE(flask_op_t);
+
+#endif
-diff -purN linux-2.6.27/include/xen/pcifront.h linux-2.6.27.19-5.1/include/xen/pcifront.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/pcifront.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/pcifront.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/pcifront.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,69 @@
+/*
+ * PCI Frontend - arch-dependendent declarations
+#endif /* __KERNEL__ */
+
+#endif /* __XEN_ASM_PCIFRONT_H__ */
-diff -purN linux-2.6.27/include/xen/public/evtchn.h linux-2.6.27.19-5.1/include/xen/public/evtchn.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/public/evtchn.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/public/evtchn.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/public/evtchn.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,88 @@
+/******************************************************************************
+ * evtchn.h
+ _IOC(_IOC_NONE, 'E', 5, 0)
+
+#endif /* __LINUX_PUBLIC_EVTCHN_H__ */
-diff -purN linux-2.6.27/include/xen/public/gntdev.h linux-2.6.27.19-5.1/include/xen/public/gntdev.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/public/gntdev.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/public/gntdev.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/public/gntdev.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,119 @@
+/******************************************************************************
+ * gntdev.h
+};
+
+#endif /* __LINUX_PUBLIC_GNTDEV_H__ */
-diff -purN linux-2.6.27/include/xen/public/privcmd.h linux-2.6.27.19-5.1/include/xen/public/privcmd.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/public/privcmd.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/public/privcmd.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/public/privcmd.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,79 @@
+/******************************************************************************
+ * privcmd.h
+ _IOC(_IOC_NONE, 'P', 3, sizeof(privcmd_mmapbatch_t))
+
+#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */
-diff -purN linux-2.6.27/include/xen/sysctl.h linux-2.6.27.19-5.1/include/xen/sysctl.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/sysctl.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/sysctl.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/sysctl.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,11 @@
+#ifndef _XEN_SYSCTL_H
+#define _XEN_SYSCTL_H
+};
+
+#endif /* _XEN_SYSCTL_H */
-diff -purN linux-2.6.27/include/xen/xen_proc.h linux-2.6.27.19-5.1/include/xen/xen_proc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/xen_proc.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/xen_proc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/xen_proc.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,12 @@
+
+#ifndef __ASM_XEN_PROC_H__
+ const char *name);
+
+#endif /* __ASM_XEN_PROC_H__ */
-diff -purN linux-2.6.27/include/xen/xenbus.h linux-2.6.27.19-5.1/include/xen/xenbus.h
---- linux-2.6.27/include/xen/xenbus.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/xenbus.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/xenbus.h
+--- a/include/xen/xenbus.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/xenbus.h Wed May 06 16:57:00 2009 +0100
@@ -39,6 +39,7 @@
#include <linux/mutex.h>
#include <linux/completion.h>
#include <xen/interface/xen.h>
#include <xen/interface/grant_table.h>
#include <xen/interface/io/xenbus.h>
-@@ -55,8 +56,21 @@ struct xenbus_watch
+@@ -55,8 +56,21 @@
/* Callback (executed in a process context with no locks held). */
void (*callback)(struct xenbus_watch *,
const char **vec, unsigned int len);
/* A xenbus device. */
struct xenbus_device {
-@@ -83,8 +97,7 @@ struct xenbus_device_id
+@@ -83,8 +97,7 @@
/* A xenbus driver. */
struct xenbus_driver {
const struct xenbus_device_id *ids;
int (*probe)(struct xenbus_device *dev,
const struct xenbus_device_id *id);
-@@ -94,7 +107,7 @@ struct xenbus_driver {
+@@ -94,7 +107,7 @@
int (*suspend)(struct xenbus_device *dev);
int (*suspend_cancel)(struct xenbus_device *dev);
int (*resume)(struct xenbus_device *dev);
struct device_driver driver;
int (*read_otherend_details)(struct xenbus_device *dev);
int (*is_ready)(struct xenbus_device *dev);
-@@ -112,7 +125,6 @@ int __must_check __xenbus_register_front
+@@ -112,7 +125,6 @@
static inline int __must_check
xenbus_register_frontend(struct xenbus_driver *drv)
{
return __xenbus_register_frontend(drv, THIS_MODULE, KBUILD_MODNAME);
}
-@@ -122,7 +134,6 @@ int __must_check __xenbus_register_backe
+@@ -122,7 +134,6 @@
static inline int __must_check
xenbus_register_backend(struct xenbus_driver *drv)
{
return __xenbus_register_backend(drv, THIS_MODULE, KBUILD_MODNAME);
}
-@@ -136,8 +147,6 @@ struct xenbus_transaction
+@@ -135,8 +146,6 @@
+
/* Nil transaction ID. */
#define XBT_NIL ((struct xenbus_transaction) { 0 })
-
--int __init xenbus_dev_init(void);
-
+-int __init xenbus_dev_init(void);
+
char **xenbus_directory(struct xenbus_transaction t,
const char *dir, const char *node, unsigned int *num);
- void *xenbus_read(struct xenbus_transaction t,
-@@ -167,7 +176,6 @@ int xenbus_printf(struct xenbus_transact
+@@ -167,7 +176,6 @@
int xenbus_gather(struct xenbus_transaction t, const char *dir, ...);
/* notifer routines for when the xenstore comes up */
int register_xenstore_notifier(struct notifier_block *nb);
void unregister_xenstore_notifier(struct notifier_block *nb);
-@@ -180,12 +188,9 @@ void xs_suspend_cancel(void);
+@@ -180,12 +188,9 @@
/* Used by xenbus_dev to borrow kernel's store connection. */
void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg);
void xenbus_suspend_cancel(void);
#define XENBUS_IS_ERR_READ(str) ({ \
-@@ -198,38 +203,132 @@ void xenbus_suspend_cancel(void);
+@@ -198,38 +203,132 @@
#define XENBUS_EXIST_ERR(err) ((err) == -ENOENT || (err) == -ERANGE)
+int xenbus_for_each_frontend(void *arg, int (*fn)(struct device *, void *));
+
#endif /* _XEN_XENBUS_H */
-diff -purN linux-2.6.27/include/xen/xencons.h linux-2.6.27.19-5.1/include/xen/xencons.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/xencons.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/xencons.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/xencons.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,17 @@
+#ifndef __ASM_XENCONS_H__
+#define __ASM_XENCONS_H__
+int xencons_ring_send(const char *data, unsigned len);
+
+#endif /* __ASM_XENCONS_H__ */
-diff -purN linux-2.6.27/include/xen/xenoprof.h linux-2.6.27.19-5.1/include/xen/xenoprof.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/xenoprof.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/xenoprof.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/xenoprof.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * xen/xenoprof.h
+
+#endif /* CONFIG_XEN */
+#endif /* __XEN_XENOPROF_H__ */
-diff -purN linux-2.6.27/init/Kconfig linux-2.6.27.19-5.1/init/Kconfig
---- linux-2.6.27/init/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/init/Kconfig 2009-03-25 16:11:32.000000000 +0000
-@@ -101,6 +101,10 @@ config LOCALVERSION_AUTO
+diff -r 9608d5473017 init/Kconfig
+--- a/init/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/init/Kconfig Wed May 06 16:57:00 2009 +0100
+@@ -100,6 +100,10 @@
+ $ git rev-parse --verify HEAD
which is done within the script "scripts/setlocalversion".)
-
++
+config SUSE_KERNEL
+ bool
+ default y
-+
+
config SWAP
bool "Support for paging of anonymous memory (swap)"
- depends on MMU && BLOCK
-@@ -299,6 +303,13 @@ config CGROUP_NS
+@@ -298,6 +302,13 @@
+ provide hierarchical naming of sets of namespaces,
for instance virtual servers and checkpoint/restart
jobs.
-
++
+config CGROUP_FREEZER
+ bool "control group freezer subsystem"
+ depends on CGROUPS
+ help
+ Provides a way to freeze and unfreeze all tasks in a
+ cgroup.
-+
+
config CGROUP_DEVICE
bool "Device controller for cgroups"
- depends on CGROUPS && EXPERIMENTAL
-@@ -771,6 +782,13 @@ config PROFILING
+@@ -771,6 +782,13 @@
Say Y here to enable the extended profiling support mechanisms used
by profilers such as OProfile.
config MARKERS
bool "Activate markers"
help
-@@ -898,6 +916,16 @@ config STOP_MACHINE
+@@ -898,6 +916,16 @@
help
Need stop_machine() primitive.
source "block/Kconfig"
config PREEMPT_NOTIFIERS
-diff -purN linux-2.6.27/init/do_mounts_rd.c linux-2.6.27.19-5.1/init/do_mounts_rd.c
---- linux-2.6.27/init/do_mounts_rd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/init/do_mounts_rd.c 2009-03-25 16:11:32.000000000 +0000
+diff -r 9608d5473017 init/do_mounts_rd.c
+--- a/init/do_mounts_rd.c Wed May 06 15:47:13 2009 +0100
++++ b/init/do_mounts_rd.c Wed May 06 16:57:00 2009 +0100
@@ -5,6 +5,7 @@
#include <linux/ext2_fs.h>
#include <linux/romfs_fs.h>
#include <linux/initrd.h>
#include <linux/string.h>
-@@ -37,6 +38,7 @@ static int __init crd_load(int in_fd, in
+@@ -37,6 +38,7 @@
* numbers could not be found.
*
* We currently check for the following magic numbers:
* minix
* ext2
* romfs
-@@ -51,6 +53,7 @@ identify_ramdisk_image(int fd, int start
+@@ -51,6 +53,7 @@
struct ext2_super_block *ext2sb;
struct romfs_super_block *romfsb;
struct cramfs_super *cramfsb;
int nblocks = -1;
unsigned char *buf;
-@@ -62,6 +65,7 @@ identify_ramdisk_image(int fd, int start
+@@ -62,6 +65,7 @@
ext2sb = (struct ext2_super_block *) buf;
romfsb = (struct romfs_super_block *) buf;
cramfsb = (struct cramfs_super *) buf;
memset(buf, 0xe5, size);
/*
-@@ -99,6 +103,18 @@ identify_ramdisk_image(int fd, int start
- goto done;
- }
-
+@@ -96,6 +100,18 @@
+ "RAMDISK: cramfs filesystem found at block %d\n",
+ start_block);
+ nblocks = (cramfsb->size + BLOCK_SIZE - 1) >> BLOCK_SIZE_BITS;
++ goto done;
++ }
++
+ /* squashfs is at block zero too */
+ if (squashfsb->s_magic == SQUASHFS_MAGIC) {
+ printk(KERN_NOTICE
+ nblocks = (squashfsb->bytes_used_2+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS;
+ else
+ nblocks = (squashfsb->bytes_used+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS;
-+ goto done;
-+ }
-+
- /*
- * Read block 1 to test for minix and ext2 superblock
- */
-diff -purN linux-2.6.27/init/initramfs.c linux-2.6.27.19-5.1/init/initramfs.c
---- linux-2.6.27/init/initramfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/init/initramfs.c 2009-03-25 16:11:32.000000000 +0000
+ goto done;
+ }
+
+diff -r 9608d5473017 init/initramfs.c
+--- a/init/initramfs.c Wed May 06 15:47:13 2009 +0100
++++ b/init/initramfs.c Wed May 06 16:57:00 2009 +0100
@@ -6,6 +6,9 @@
#include <linux/delay.h>
#include <linux/string.h>
static __initdata char *message;
static void __init error(char *x)
-@@ -80,6 +83,12 @@ static __initdata unsigned long body_len
+@@ -80,6 +83,12 @@
static __initdata uid_t uid;
static __initdata gid_t gid;
static __initdata unsigned rdev;
static void __init parse_header(char *s)
{
-@@ -113,6 +122,7 @@ static __initdata enum state {
+@@ -113,6 +122,7 @@
SkipIt,
GotName,
CopyFile,
GotSymlink,
Reset
} state, next_state;
-@@ -257,6 +267,9 @@ static int __init do_name(void)
+@@ -257,6 +267,9 @@
free_hash();
return 0;
}
if (dry_run)
return 0;
clean_path(collected, mode);
-@@ -289,6 +302,40 @@ static int __init do_name(void)
+@@ -288,6 +301,40 @@
+ }
return 0;
}
-
++
+#ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD
+static int __init do_copy_mem(void)
+{
+#else
+#define do_copy_mem NULL
+#endif
-+
+
static int __init do_copy(void)
{
- if (count >= body_len) {
-@@ -323,6 +370,7 @@ static __initdata int (*actions[])(void)
+@@ -323,6 +370,7 @@
[SkipIt] = do_skip,
[GotName] = do_name,
[CopyFile] = do_copy,
[GotSymlink] = do_symlink,
[Reset] = do_reset,
};
-@@ -560,3 +608,31 @@ static int __init populate_rootfs(void)
+@@ -560,3 +608,31 @@
return 0;
}
rootfs_initcall(populate_rootfs);
+ return file_mem;
+}
+#endif
-diff -purN linux-2.6.27/init/main.c linux-2.6.27.19-5.1/init/main.c
---- linux-2.6.27/init/main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/init/main.c 2009-03-25 16:11:32.000000000 +0000
-@@ -71,6 +71,10 @@
+diff -r 9608d5473017 init/main.c
+--- a/init/main.c Wed May 06 15:47:13 2009 +0100
++++ b/init/main.c Wed May 06 16:57:00 2009 +0100
+@@ -70,6 +70,10 @@
+ #ifdef CONFIG_X86_LOCAL_APIC
#include <asm/smp.h>
#endif
-
++
+#ifdef CONFIG_KDB
+#include <linux/kdb.h>
+#endif /* CONFIG_KDB */
-+
+
/*
* This is one of the first .c files built. Error out early if we have compiler
- * trouble.
-@@ -193,6 +197,26 @@ static const char *panic_later, *panic_p
+@@ -192,6 +196,26 @@
+ static const char *panic_later, *panic_param;
extern struct obs_kernel_param __setup_start[], __setup_end[];
-
++
+#ifdef CONFIG_KDB
+static int __init kdb_setup(char *str)
+{
+
+__setup("kdb=", kdb_setup);
+#endif /* CONFIG_KDB */
-+
+
static int __init obsolete_checksetup(char *line)
{
- struct obs_kernel_param *p;
-@@ -659,6 +683,14 @@ asmlinkage void __init start_kernel(void
+@@ -659,6 +683,14 @@
pgtable_cache_init();
prio_tree_init();
anon_vma_init();
#ifdef CONFIG_X86
if (efi_enabled)
efi_enter_virtual_mode();
-diff -purN linux-2.6.27/ipc/mqueue.c linux-2.6.27.19-5.1/ipc/mqueue.c
---- linux-2.6.27/ipc/mqueue.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/ipc/mqueue.c 2009-03-25 16:11:43.000000000 +0000
-@@ -498,7 +498,8 @@ static void __do_notify(struct mqueue_in
+diff -r 9608d5473017 ipc/mqueue.c
+--- a/ipc/mqueue.c Wed May 06 15:47:13 2009 +0100
++++ b/ipc/mqueue.c Wed May 06 16:57:00 2009 +0100
+@@ -498,7 +498,8 @@
sig_i.si_errno = 0;
sig_i.si_code = SI_MESGQ;
sig_i.si_value = info->notify.sigev_value;
sig_i.si_uid = current->uid;
kill_pid_info(info->notify.sigev_signo,
-@@ -647,8 +648,8 @@ static int oflag2acc[O_ACCMODE] = { MAY_
+@@ -647,8 +648,8 @@
return dentry_open(dentry, mqueue_mnt, oflag);
}
{
struct dentry *dentry;
struct file *filp;
-@@ -715,7 +716,7 @@ out_putname:
+@@ -715,7 +716,7 @@
return fd;
}
{
int err;
char *name;
-@@ -745,7 +746,7 @@ asmlinkage long sys_mq_unlink(const char
+@@ -745,7 +746,7 @@
err = mnt_want_write(mqueue_mnt);
if (err)
goto out_err;
mnt_drop_write(mqueue_mnt);
out_err:
dput(dentry);
-@@ -808,9 +809,9 @@ static inline void pipelined_receive(str
+@@ -808,9 +809,9 @@
sender->state = STATE_READY;
}
{
struct file *filp;
struct inode *inode;
-@@ -896,9 +897,9 @@ out:
+@@ -896,9 +897,9 @@
return ret;
}
{
long timeout;
ssize_t ret;
-@@ -981,8 +982,8 @@ out:
+@@ -981,8 +982,8 @@
* and he isn't currently owner of notification, will be silently discarded.
* It isn't explicitly defined in the POSIX.
*/
{
int ret;
struct file *filp;
-@@ -1107,9 +1108,9 @@ out:
+@@ -1107,9 +1108,9 @@
return ret;
}
{
int ret;
struct mq_attr mqstat, omqstat;
-diff -purN linux-2.6.27/ipc/msg.c linux-2.6.27.19-5.1/ipc/msg.c
---- linux-2.6.27/ipc/msg.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/ipc/msg.c 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 ipc/msg.c
+--- a/ipc/msg.c Wed May 06 15:47:13 2009 +0100
++++ b/ipc/msg.c Wed May 06 16:57:00 2009 +0100
@@ -38,6 +38,7 @@
#include <linux/rwsem.h>
#include <linux/nsproxy.h>
#include <asm/current.h>
#include <asm/uaccess.h>
-@@ -309,11 +310,12 @@ static inline int msg_security(struct ke
+@@ -309,11 +310,12 @@
return security_msg_queue_associate(msq, msgflg);
}
ns = current->nsproxy->ipc_ns;
-@@ -324,7 +326,9 @@ asmlinkage long sys_msgget(key_t key, in
+@@ -324,7 +326,9 @@
msg_params.key = key;
msg_params.flg = msgflg;
}
static inline unsigned long
-@@ -466,7 +470,7 @@ out_up:
+@@ -466,7 +470,7 @@
return err;
}
{
struct msg_queue *msq;
int err, version;
-@@ -723,8 +727,8 @@ out_free:
+@@ -723,8 +727,8 @@
return err;
}
{
long mtype;
-@@ -904,8 +908,8 @@ out_unlock:
+@@ -904,8 +908,8 @@
return msgsz;
}
{
long err, mtype;
-diff -purN linux-2.6.27/ipc/sem.c linux-2.6.27.19-5.1/ipc/sem.c
---- linux-2.6.27/ipc/sem.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/ipc/sem.c 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 ipc/sem.c
+--- a/ipc/sem.c Wed May 06 15:47:13 2009 +0100
++++ b/ipc/sem.c Wed May 06 16:57:00 2009 +0100
@@ -83,6 +83,7 @@
#include <linux/rwsem.h>
#include <linux/nsproxy.h>
#include <asm/uaccess.h>
#include "util.h"
-@@ -308,11 +309,12 @@ static inline int sem_more_checks(struct
+@@ -308,11 +309,12 @@
return 0;
}
ns = current->nsproxy->ipc_ns;
-@@ -327,7 +329,9 @@ asmlinkage long sys_semget(key_t key, in
+@@ -327,7 +329,9 @@
sem_params.flg = semflg;
sem_params.u.nsems = nsems;
}
/*
-@@ -887,7 +891,7 @@ out_up:
+@@ -887,7 +891,7 @@
return err;
}
{
int err = -EINVAL;
int version;
-@@ -923,6 +927,13 @@ asmlinkage long sys_semctl (int semid, i
+@@ -923,6 +927,13 @@
return -EINVAL;
}
}
/* If the task doesn't already have a undo_list, then allocate one
* here. We guarantee there is only one thread using this undo list,
-@@ -1048,8 +1059,8 @@ out:
+@@ -1048,8 +1059,8 @@
return un;
}
{
int error = -EINVAL;
struct sem_array *sma;
-@@ -1226,7 +1237,8 @@ out_free:
+@@ -1226,7 +1237,8 @@
return error;
}
{
return sys_semtimedop(semid, tsops, nsops, NULL);
}
-diff -purN linux-2.6.27/ipc/shm.c linux-2.6.27.19-5.1/ipc/shm.c
---- linux-2.6.27/ipc/shm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/ipc/shm.c 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 ipc/shm.c
+--- a/ipc/shm.c Wed May 06 15:47:13 2009 +0100
++++ b/ipc/shm.c Wed May 06 16:57:00 2009 +0100
@@ -39,6 +39,7 @@
#include <linux/nsproxy.h>
#include <linux/mount.h>
#include <asm/uaccess.h>
-@@ -440,11 +441,12 @@ static inline int shm_more_checks(struct
+@@ -440,11 +441,12 @@
return 0;
}
ns = current->nsproxy->ipc_ns;
-@@ -456,7 +458,9 @@ asmlinkage long sys_shmget (key_t key, s
+@@ -456,7 +458,9 @@
shm_params.flg = shmflg;
shm_params.u.size = size;
}
static inline unsigned long copy_shmid_to_user(void __user *buf, struct shmid64_ds *in, int version)
-@@ -565,11 +569,15 @@ static void shm_get_stat(struct ipc_name
+@@ -565,11 +569,15 @@
struct hstate *h = hstate_file(shp->shm_file);
*rss += pages_per_huge_page(h) * mapping->nrpages;
} else {
}
total++;
-@@ -621,7 +629,7 @@ out_up:
+@@ -621,7 +629,7 @@
return err;
}
{
struct shmid_kernel *shp;
int err, version;
-@@ -941,7 +949,7 @@ out_put_dentry:
+@@ -941,7 +949,7 @@
goto out_nattch;
}
{
unsigned long ret;
long err;
-@@ -957,7 +965,7 @@ asmlinkage long sys_shmat(int shmid, cha
+@@ -957,7 +965,7 @@
* detach and kill segment if marked destroyed.
* The work is done in shm_close.
*/
{
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma, *next;
-diff -purN linux-2.6.27/ipc/util.c linux-2.6.27.19-5.1/ipc/util.c
---- linux-2.6.27/ipc/util.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/ipc/util.c 2009-03-25 16:11:43.000000000 +0000
-@@ -266,9 +266,17 @@ int ipc_addid(struct ipc_ids* ids, struc
+diff -r 9608d5473017 ipc/util.c
+--- a/ipc/util.c Wed May 06 15:47:13 2009 +0100
++++ b/ipc/util.c Wed May 06 16:57:00 2009 +0100
+@@ -266,9 +266,17 @@
if (ids->in_use >= size)
return -ENOSPC;
ids->in_use++;
-@@ -280,10 +288,6 @@ int ipc_addid(struct ipc_ids* ids, struc
+@@ -280,10 +288,6 @@
ids->seq = 0;
new->id = ipc_buildid(id, new->seq);
return id;
}
-diff -purN linux-2.6.27/kdb/ChangeLog linux-2.6.27.19-5.1/kdb/ChangeLog
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/ChangeLog 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/ChangeLog
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/ChangeLog Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,2012 @@
+2008-09-30 Jay Lan <jlan@sgi.com>
+
+ * include/linux/kdbprivate.h: add kdb_initial_cpu.
+
+ * include/linux/kdb.h: add kdb_on, bump version to kdb v1.4.
-diff -purN linux-2.6.27/kdb/Makefile linux-2.6.27.19-5.1/kdb/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/Makefile 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/Makefile Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,43 @@
+#
+# This file is subject to the terms and conditions of the GNU General Public
+
+$(obj)/gen-kdb_cmds.c: $(src)/kdb_cmds $(wildcard $(TOPDIR)/arch/$(KDB_CMDS)) $(src)/Makefile
+ $(call cmd,gen-kdb)
-diff -purN linux-2.6.27/kdb/kdb_bp.c linux-2.6.27.19-5.1/kdb/kdb_bp.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdb_bp.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdb_bp.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdb_bp.c Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,661 @@
+/*
+ * Kernel Debugger Architecture Independent Breakpoint Handler
+ */
+ kdba_initbp();
+}
-diff -purN linux-2.6.27/kdb/kdb_bt.c linux-2.6.27.19-5.1/kdb/kdb_bt.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdb_bt.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdb_bt.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdb_bt.c Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,180 @@
+/*
+ * Kernel Debugger Architecture Independent Stack Traceback
+ /* NOTREACHED */
+ return 0;
+}
-diff -purN linux-2.6.27/kdb/kdb_cmds linux-2.6.27.19-5.1/kdb/kdb_cmds
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdb_cmds 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdb_cmds
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdb_cmds Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,32 @@
+# Initial commands for kdb, alter to suit your needs.
+# These commands are executed in kdb_init() context, no SMP, no
+ -archkdbcommon
+ -bta
+endefcmd
-diff -purN linux-2.6.27/kdb/kdb_id.c linux-2.6.27.19-5.1/kdb/kdb_id.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdb_id.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdb_id.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdb_id.c Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,236 @@
+/*
+ * Kernel Debugger Architecture Independent Instruction Disassembly
+ kdb_di.target = 0;
+ kdb_di.target2 = 0;
+}
-diff -purN linux-2.6.27/kdb/kdb_io.c linux-2.6.27.19-5.1/kdb/kdb_io.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdb_io.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdb_io.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdb_io.c Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,857 @@
+/*
+ * Kernel Debugger Architecture Independent Console I/O handler
+#endif
+
+EXPORT_SYMBOL(kdb_read);
-diff -purN linux-2.6.27/kdb/kdbdereference.c linux-2.6.27.19-5.1/kdb/kdbdereference.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdbdereference.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdbdereference.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdbdereference.c Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,7257 @@
+/*
+ *
+ return dividend - (__divdi3(dividend, divisor) * divisor);
+}
+#endif /* CONFIG_x86_32 */
-diff -purN linux-2.6.27/kdb/kdbmain.c linux-2.6.27.19-5.1/kdb/kdbmain.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdbmain.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdbmain.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdbmain.c Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,4335 @@
+/*
+ * Kernel Debugger Architecture Independent Main Code
+EXPORT_SYMBOL(kdb_printf);
+EXPORT_SYMBOL(kdb_symbol_print);
+EXPORT_SYMBOL(kdb_running_process);
-diff -purN linux-2.6.27/kdb/kdbsupport.c linux-2.6.27.19-5.1/kdb/kdbsupport.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdbsupport.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdbsupport.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdbsupport.c Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,1154 @@
+/*
+ * Kernel Debugger Architecture Independent Support Functions
+ BUG_ON(kdb_flags_index <= 0);
+ kdb_flags = kdb_flags_stack[--kdb_flags_index];
+}
-diff -purN linux-2.6.27/kdb/modules/Makefile linux-2.6.27.19-5.1/kdb/modules/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/Makefile 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/Makefile Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,14 @@
+#
+# This file is subject to the terms and conditions of the GNU General Public
+obj-$(CONFIG_KDB_MODULES) += kdbm_x86.o
+endif
+CFLAGS_kdbm_vm.o += -I $(srctree)/drivers/scsi
-diff -purN linux-2.6.27/kdb/modules/kdbm_debugtypes.c linux-2.6.27.19-5.1/kdb/modules/kdbm_debugtypes.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/kdbm_debugtypes.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/kdbm_debugtypes.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/kdbm_debugtypes.c Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,388 @@
+/* this one has some additional address validation - untested */
+/*
+
+module_init(kdbm_debuginfo_init);
+module_exit(kdbm_debuginfo_exit);
-diff -purN linux-2.6.27/kdb/modules/kdbm_pg.c linux-2.6.27.19-5.1/kdb/modules/kdbm_pg.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/kdbm_pg.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/kdbm_pg.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/kdbm_pg.c Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,688 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+
+module_init(kdbm_pg_init)
+module_exit(kdbm_pg_exit)
-diff -purN linux-2.6.27/kdb/modules/kdbm_sched.c linux-2.6.27.19-5.1/kdb/modules/kdbm_sched.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/kdbm_sched.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/kdbm_sched.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/kdbm_sched.c Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,57 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+
+module_init(kdbm_sched_init)
+module_exit(kdbm_sched_exit)
-diff -purN linux-2.6.27/kdb/modules/kdbm_task.c linux-2.6.27.19-5.1/kdb/modules/kdbm_task.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/kdbm_task.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/kdbm_task.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/kdbm_task.c Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,205 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+
+module_init(kdbm_task_init)
+module_exit(kdbm_task_exit)
-diff -purN linux-2.6.27/kdb/modules/kdbm_vm.c linux-2.6.27.19-5.1/kdb/modules/kdbm_vm.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/kdbm_vm.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/kdbm_vm.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/kdbm_vm.c Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,1036 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+
+module_init(kdbm_vm_init)
+module_exit(kdbm_vm_exit)
-diff -purN linux-2.6.27/kdb/modules/kdbm_x86.c linux-2.6.27.19-5.1/kdb/modules/kdbm_x86.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/kdbm_x86.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/kdbm_x86.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/kdbm_x86.c Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,1093 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+
+module_init(kdbm_x86_init)
+module_exit(kdbm_x86_exit)
-diff -purN linux-2.6.27/kdb/modules/lcrash/README linux-2.6.27.19-5.1/kdb/modules/lcrash/README
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/README 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/README
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/README Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,3 @@
+
+ These files are copied from lcrash.
+ The only changes are flagged with "cpw".
-diff -purN linux-2.6.27/kdb/modules/lcrash/asm/README linux-2.6.27.19-5.1/kdb/modules/lcrash/asm/README
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/asm/README 2009-03-25 16:11:31.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 kdb/modules/lcrash/asm/README
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/asm/README Wed May 06 16:57:00 2009 +0100
+@@ -0,0 +1,1 @@
+This kl_types.h is asm-ia64 version.
-diff -purN linux-2.6.27/kdb/modules/lcrash/asm/kl_dump_ia64.h linux-2.6.27.19-5.1/kdb/modules/lcrash/asm/kl_dump_ia64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/asm/kl_dump_ia64.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/asm/kl_dump_ia64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/asm/kl_dump_ia64.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,199 @@
+/*
+ * $Id: kl_dump_ia64.h 1151 2005-02-23 01:09:12Z tjm $
+int kl_read_dump_header_ia64(void);
+
+#endif /* __KL_DUMP_IA64_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/asm/kl_types.h linux-2.6.27.19-5.1/kdb/modules/lcrash/asm/kl_types.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/asm/kl_types.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/asm/kl_types.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/asm/kl_types.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,48 @@
+/*
+ * $Id: kl_types.h 1122 2004-12-21 23:26:23Z tjm $
+#define KL_DUMP_ASM_MAGIC_NUMBER KL_DUMP_MAGIC_NUMBER_IA64
+
+#endif /* __ASMIA64_KL_TYPES_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_alloc.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_alloc.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_alloc.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_alloc.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_alloc.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,124 @@
+/*
+ * $Id: kl_alloc.h 1122 2004-12-21 23:26:23Z tjm $
+#define kl_str_to_block(s, flags) _kl_str_to_block(s, flags, kl_get_ra())
+
+#endif /* __KL_ALLOC_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_bfd.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_bfd.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_bfd.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_bfd.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_bfd.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,31 @@
+/*
+ * $Id: kl_bfd.h 1122 2004-12-21 23:26:23Z tjm $
+int kl_read_bfd_syminfo(maplist_t*);
+
+#endif /* __KL_BFD_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_btnode.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_btnode.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_btnode.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_btnode.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_btnode.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,95 @@
+/*
+ * $Id: kl_btnode.h 1122 2004-12-21 23:26:23Z tjm $
+ btnode_t * /* Pointer to current btnode */);
+
+#endif /* __KL_BTNODE_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_cmp.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_cmp.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_cmp.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_cmp.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_cmp.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,102 @@
+/*
+ * $Id: kl_cmp.h 1216 2005-07-06 10:03:13Z holzheu $
+int kl_compress_gzip(const unsigned char *old, uint32_t old_size, unsigned char *new, uint32_t new_size);
+
+#endif /* __KL_CMP_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_copt.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_copt.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_copt.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_copt.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_copt.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,29 @@
+/*
+ * $Id: kl_copt.h 1122 2004-12-21 23:26:23Z tjm $
+int get_copt(int, char **, const char *, char **);
+
+#endif /* __KL_COPT_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_debug.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_debug.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_debug.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_debug.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_debug.h Wed May 06 16:57:00 2009 +0100
@@ -0,0 +1,168 @@
+/*
+ * $Id: kl_debug.h 1196 2005-05-17 18:34:12Z tjm $
+ uint64_t /* typenum */);
+
+#endif /* __KL_DEBUG_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_dump.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dump.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dump.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_dump.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_dump.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,511 @@
+/*
+ * $Id: kl_dump.h 1336 2006-10-23 23:27:06Z tjm $
+uint64_t kl_vread_swap_uint64(kaddr_t);
+
+#endif /* __KL_DUMP_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_dump_arch.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dump_arch.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dump_arch.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_dump_arch.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_dump_arch.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,124 @@
+/*
+ * $Id: kl_dump_arch.h 1122 2004-12-21 23:26:23Z tjm $
+ char * /* name of struct */);
+
+#endif /* __KL_DUMP_ARCH_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_dump_ia64.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dump_ia64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dump_ia64.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_dump_ia64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_dump_ia64.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,199 @@
+/*
+ * $Id: kl_dump_ia64.h 1151 2005-02-23 01:09:12Z tjm $
+int kl_read_dump_header_ia64(void);
+
+#endif /* __KL_DUMP_IA64_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_dwarfs.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dwarfs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dwarfs.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_dwarfs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_dwarfs.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,27 @@
+/*
+ * $Id: kl_dwarfs.h 1122 2004-12-21 23:26:23Z tjm $
+int dw_setup_typeinfo(void);
+
+#endif /* __KL_DWARFS_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_error.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_error.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_error.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_error.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_error.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,266 @@
+/*
+ * $Id: kl_error.h 1169 2005-03-02 21:38:01Z tjm $
+uint64_t kl_get_dbg_component(void);
+
+#endif /* __KL_ERROR_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_htnode.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_htnode.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_htnode.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_htnode.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_htnode.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,71 @@
+/*
+ * $Id: kl_htnode.h 1122 2004-12-21 23:26:23Z tjm $
+ htnode_t * /* new htnode pointer*/);
+
+#endif /* __KL_HTNODE_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_lib.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_lib.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_lib.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_lib.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_lib.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,65 @@
+/*
+ * $Id: kl_lib.h 1122 2004-12-21 23:26:23Z tjm $
+#include "kl_stringtab.h"
+
+#endif /* __KL_LIB_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_libutil.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_libutil.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_libutil.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_libutil.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_libutil.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,40 @@
+/*
+ * $Id: kl_libutil.h 1122 2004-12-21 23:26:23Z tjm $
+void *kl_get_ra(void);
+
+#endif /* __KL_LIBUTIL_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_mem.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_mem.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_mem.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_mem.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_mem.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,104 @@
+/*
+ * $Id: kl_mem.h 1157 2005-02-25 22:04:05Z tjm $
+int kl_init_virtop(void);
+
+#endif /* __KL_MEM_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_mem_ia64.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_mem_ia64.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_mem_ia64.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_mem_ia64.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_mem_ia64.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,149 @@
+/*
+ * $Id: kl_mem_ia64.h 1250 2006-04-18 18:23:44Z cliffpwickman $
+#define ADDR_TO_NASID(A) (((A) >> (long)(KL_NASID_SHIFT)) & KL_NASID_MASK)
+
+#endif /* __KL_MEM_IA64_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_module.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_module.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_module.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_module.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_module.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,69 @@
+/*
+ * $Id: kl_module.h 1122 2004-12-21 23:26:23Z tjm $
+kl_modinfo_t * kl_lkup_modinfo(char*);
+
+#endif /* __KL_MODULE_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_queue.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_queue.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_queue.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_queue.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_queue.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,89 @@
+/*
+ * $Id: kl_queue.h 1122 2004-12-21 23:26:23Z tjm $
+ element_t* /* ptr to element to remove from list */);
+
+#endif /* __KL_QUEUE_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_stabs.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_stabs.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_stabs.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_stabs.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_stabs.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,122 @@
+/*
+ * $Id: kl_stabs.h 1122 2004-12-21 23:26:23Z tjm $
+#define CUR_CHAR G_stab_str.ptr
+
+#endif /* __KL_STABS_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_stringtab.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_stringtab.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_stringtab.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_stringtab.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_stringtab.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,68 @@
+/*
+ * $Id: kl_stringtab.h 1122 2004-12-21 23:26:23Z tjm $
+ int /* flag (K_TEMP/K_PERM)*/);
+
+#endif /* __KL_STRINGTAB_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_sym.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_sym.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_sym.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_sym.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_sym.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,131 @@
+/*
+ * $Id: kl_sym.h 1233 2005-09-10 08:01:11Z tjm $
+#define KL_SYMBYNAME (0x04) /* print symbol sorted by name */
+
+#endif /* __KL_SYM_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_task.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_task.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_task.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_task.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_task.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,39 @@
+/*
+ * $Id: kl_task.h 1122 2004-12-21 23:26:23Z tjm $
+int kl_task_size(kaddr_t);
+
+#endif /* __KL_TASK_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_typeinfo.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_typeinfo.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_typeinfo.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_typeinfo.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_typeinfo.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,199 @@
+/*
+ * $Id: kl_typeinfo.h 1259 2006-04-25 18:33:20Z tjm $
+ int /* flags */);
+
+#endif /* __KL_TYPEINFO_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_types.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_types.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_types.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_types.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_types.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,54 @@
+/*
+ * $Id: kl_types.h 1122 2004-12-21 23:26:23Z tjm $
+#include "asm/kl_types.h"
+
+#endif /* __KL_TYPES_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/klib.h linux-2.6.27.19-5.1/kdb/modules/lcrash/klib.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/klib.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/klib.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/klib.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,480 @@
+/*
+ * $Id: klib.h 1336 2006-10-23 23:27:06Z tjm $
+void kl_s390tod_to_timeval(uint64_t, struct timeval*);
+
+#endif /* __KLIB_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/lc_eval.h linux-2.6.27.19-5.1/kdb/modules/lcrash/lc_eval.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/lc_eval.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/lc_eval.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/lc_eval.h Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,225 @@
+/*
+ * $Id: lc_eval.h 1122 2004-12-21 23:26:23Z tjm $
+int print_eval_results(node_t *, int);
+
+#endif /* __LC_EVAL_H */
-diff -purN linux-2.6.27/kernel/Kconfig.freezer linux-2.6.27.19-5.1/kernel/Kconfig.freezer
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/Kconfig.freezer 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 kernel/Kconfig.freezer
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kernel/Kconfig.freezer Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,2 @@
+config FREEZER
+ def_bool PM_SLEEP || CGROUP_FREEZER
-diff -purN linux-2.6.27/kernel/Kconfig.preempt linux-2.6.27.19-5.1/kernel/Kconfig.preempt
---- linux-2.6.27/kernel/Kconfig.preempt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/Kconfig.preempt 2009-03-25 16:11:42.000000000 +0000
-@@ -35,6 +35,7 @@ config PREEMPT_VOLUNTARY
+diff -r 9608d5473017 kernel/Kconfig.preempt
+--- a/kernel/Kconfig.preempt Wed May 06 15:47:13 2009 +0100
++++ b/kernel/Kconfig.preempt Wed May 06 16:57:01 2009 +0100
+@@ -35,6 +35,7 @@
config PREEMPT
bool "Preemptible Kernel (Low-Latency Desktop)"
help
This option reduces the latency of the kernel by making
all kernel code (that is not executing in a critical section)
-diff -purN linux-2.6.27/kernel/Makefile linux-2.6.27.19-5.1/kernel/Makefile
---- linux-2.6.27/kernel/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/Makefile 2009-03-25 16:11:42.000000000 +0000
-@@ -11,8 +11,6 @@ obj-y = sched.o fork.o exec_domain.o
+diff -r 9608d5473017 kernel/Makefile
+--- a/kernel/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/kernel/Makefile Wed May 06 16:57:01 2009 +0100
+@@ -11,8 +11,6 @@
hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \
notifier.o ksysfs.o pm_qos_params.o sched_clock.o
ifdef CONFIG_FTRACE
# Do not trace debug files and internal ftrace files
CFLAGS_REMOVE_lockdep.o = -pg
-@@ -21,9 +19,10 @@ CFLAGS_REMOVE_mutex-debug.o = -pg
+@@ -21,9 +19,10 @@
CFLAGS_REMOVE_rtmutex-debug.o = -pg
CFLAGS_REMOVE_cgroup-debug.o = -pg
CFLAGS_REMOVE_sched_clock.o = -pg
obj-$(CONFIG_PROFILING) += profile.o
obj-$(CONFIG_SYSCTL_SYSCALL_CHECK) += sysctl_check.o
obj-$(CONFIG_STACKTRACE) += stacktrace.o
-@@ -48,6 +47,7 @@ obj-$(CONFIG_PROVE_LOCKING) += spinlock.
+@@ -48,6 +47,7 @@
obj-$(CONFIG_UID16) += uid16.o
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_KALLSYMS) += kallsyms.o
obj-$(CONFIG_PM) += power/
obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
obj-$(CONFIG_KEXEC) += kexec.o
-@@ -55,6 +55,7 @@ obj-$(CONFIG_BACKTRACE_SELF_TEST) += bac
+@@ -55,6 +55,7 @@
obj-$(CONFIG_COMPAT) += compat.o
obj-$(CONFIG_CGROUPS) += cgroup.o
obj-$(CONFIG_CGROUP_DEBUG) += cgroup_debug.o
obj-$(CONFIG_CPUSETS) += cpuset.o
obj-$(CONFIG_CGROUP_NS) += ns_cgroup.o
obj-$(CONFIG_UTS_NS) += utsname.o
-@@ -64,6 +65,7 @@ obj-$(CONFIG_IKCONFIG) += configs.o
+@@ -64,6 +65,7 @@
obj-$(CONFIG_RESOURCE_COUNTERS) += res_counter.o
obj-$(CONFIG_STOP_MACHINE) += stop_machine.o
obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o
obj-$(CONFIG_AUDIT) += audit.o auditfilter.o
obj-$(CONFIG_AUDITSYSCALL) += auditsc.o
obj-$(CONFIG_AUDIT_TREE) += audit_tree.o
-@@ -83,6 +85,7 @@ obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
+@@ -83,6 +85,7 @@
obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
obj-$(CONFIG_MARKERS) += marker.o
obj-$(CONFIG_LATENCYTOP) += latencytop.o
obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o
obj-$(CONFIG_FTRACE) += trace/
-diff -purN linux-2.6.27/kernel/acct.c linux-2.6.27.19-5.1/kernel/acct.c
---- linux-2.6.27/kernel/acct.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/acct.c 2009-03-25 16:11:41.000000000 +0000
-@@ -277,7 +277,7 @@ static int acct_on(char *name)
+diff -r 9608d5473017 kernel/acct.c
+--- a/kernel/acct.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/acct.c Wed May 06 16:57:01 2009 +0100
+@@ -277,7 +277,7 @@
* should be written. If the filename is NULL, accounting will be
* shutdown.
*/
{
int error;
-diff -purN linux-2.6.27/kernel/audit.c linux-2.6.27.19-5.1/kernel/audit.c
---- linux-2.6.27/kernel/audit.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/audit.c 2009-03-25 16:11:40.000000000 +0000
-@@ -1231,8 +1231,7 @@ static inline int audit_expand(struct au
+diff -r 9608d5473017 kernel/audit.c
+--- a/kernel/audit.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/audit.c Wed May 06 16:57:01 2009 +0100
+@@ -1231,8 +1231,7 @@
* will be called a second time. Currently, we assume that a printk
* can't format message larger than 1024 bytes, so we don't either.
*/
{
int len, avail;
struct sk_buff *skb;
-@@ -1506,3 +1505,6 @@ EXPORT_SYMBOL(audit_log_start);
+@@ -1506,3 +1505,6 @@
EXPORT_SYMBOL(audit_log_end);
EXPORT_SYMBOL(audit_log_format);
EXPORT_SYMBOL(audit_log);
+EXPORT_SYMBOL_GPL(audit_log_vformat);
+EXPORT_SYMBOL_GPL(audit_log_untrustedstring);
+EXPORT_SYMBOL_GPL(audit_log_d_path);
-diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tree.c
---- linux-2.6.27/kernel/audit_tree.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/audit_tree.c 2009-03-25 16:11:42.000000000 +0000
-@@ -24,6 +24,7 @@ struct audit_chunk {
+diff -r 9608d5473017 kernel/audit_tree.c
+--- a/kernel/audit_tree.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/audit_tree.c Wed May 06 16:57:01 2009 +0100
+@@ -24,6 +24,7 @@
struct list_head trees; /* with root here */
int dead;
int count;
struct rcu_head head;
struct node {
struct list_head list;
-@@ -56,7 +57,8 @@ static LIST_HEAD(prune_list);
+@@ -56,7 +57,8 @@
* tree is refcounted; one reference for "some rules on rules_list refer to
* it", one for each chunk with pointer to it.
*
*
* node.index allows to get from node.list to containing chunk.
* MSB of that sucker is stolen to mark taggings that we might have to
-@@ -121,6 +123,7 @@ static struct audit_chunk *alloc_chunk(i
+@@ -121,6 +123,7 @@
INIT_LIST_HEAD(&chunk->hash);
INIT_LIST_HEAD(&chunk->trees);
chunk->count = count;
for (i = 0; i < count; i++) {
INIT_LIST_HEAD(&chunk->owners[i].list);
chunk->owners[i].index = i;
-@@ -129,9 +132,8 @@ static struct audit_chunk *alloc_chunk(i
+@@ -129,9 +132,8 @@
return chunk;
}
int i;
for (i = 0; i < chunk->count; i++) {
-@@ -141,14 +143,16 @@ static void __free_chunk(struct rcu_head
+@@ -141,14 +143,16 @@
kfree(chunk);
}
}
enum {HASH_SIZE = 128};
-@@ -176,7 +180,7 @@ struct audit_chunk *audit_tree_lookup(co
+@@ -176,7 +180,7 @@
list_for_each_entry_rcu(p, list, hash) {
if (p->watch.inode == inode) {
return p;
}
}
-@@ -194,17 +198,49 @@ int audit_tree_match(struct audit_chunk
+@@ -194,17 +198,49 @@
/* tagging and untagging inodes with trees */
-static void untag_chunk(struct audit_chunk *chunk, struct node *p)
+static struct audit_chunk *find_chunk(struct node *p)
-+{
+ {
+ int index = p->index & ~(1U<<31);
+ p -= index;
+ return container_of(p, struct audit_chunk, owners[0]);
+}
+
+static void untag_chunk(struct node *p)
- {
++{
+ struct audit_chunk *chunk = find_chunk(p);
struct audit_chunk *new;
struct audit_tree *owner;
}
owner = p->owner;
-@@ -221,7 +257,7 @@ static void untag_chunk(struct audit_chu
+@@ -221,7 +257,7 @@
inotify_evict_watch(&chunk->watch);
mutex_unlock(&chunk->watch.inode->inotify_mutex);
put_inotify_watch(&chunk->watch);
}
new = alloc_chunk(size);
-@@ -263,7 +299,7 @@ static void untag_chunk(struct audit_chu
+@@ -263,7 +299,7 @@
inotify_evict_watch(&chunk->watch);
mutex_unlock(&chunk->watch.inode->inotify_mutex);
put_inotify_watch(&chunk->watch);
Fallback:
// do the best we can
-@@ -277,6 +313,9 @@ Fallback:
+@@ -277,6 +313,9 @@
put_tree(owner);
spin_unlock(&hash_lock);
mutex_unlock(&chunk->watch.inode->inotify_mutex);
}
static int create_chunk(struct inode *inode, struct audit_tree *tree)
-@@ -387,13 +426,6 @@ static int tag_chunk(struct inode *inode
+@@ -387,13 +426,6 @@
return 0;
}
static void kill_rules(struct audit_tree *tree)
{
struct audit_krule *rule, *next;
-@@ -431,17 +463,10 @@ static void prune_one(struct audit_tree
+@@ -431,17 +463,10 @@
spin_lock(&hash_lock);
while (!list_empty(&victim->chunks)) {
struct node *p;
- chunk = find_chunk(p);
- get_inotify_watch(&chunk->watch);
- spin_unlock(&hash_lock);
--
-- untag_chunk(chunk, p);
+- untag_chunk(chunk, p);
+-
- put_inotify_watch(&chunk->watch);
- spin_lock(&hash_lock);
+ untag_chunk(p);
}
spin_unlock(&hash_lock);
put_tree(victim);
-@@ -469,7 +494,6 @@ static void trim_marked(struct audit_tre
+@@ -469,7 +494,6 @@
while (!list_empty(&tree->chunks)) {
struct node *node;
node = list_entry(tree->chunks.next, struct node, list);
-@@ -477,14 +501,7 @@ static void trim_marked(struct audit_tre
+@@ -477,14 +501,7 @@
if (!(node->index & (1U<<31)))
break;
}
if (!tree->root && !tree->goner) {
tree->goner = 1;
-@@ -878,7 +895,7 @@ static void handle_event(struct inotify_
+@@ -878,7 +895,7 @@
static void destroy_watch(struct inotify_watch *watch)
{
struct audit_chunk *chunk = container_of(watch, struct audit_chunk, watch);
}
static const struct inotify_operations rtree_inotify_ops = {
-diff -purN linux-2.6.27/kernel/auditfilter.c linux-2.6.27.19-5.1/kernel/auditfilter.c
---- linux-2.6.27/kernel/auditfilter.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/auditfilter.c 2009-03-25 16:11:42.000000000 +0000
-@@ -1094,8 +1094,8 @@ static void audit_inotify_unregister(str
+diff -r 9608d5473017 kernel/auditfilter.c
+--- a/kernel/auditfilter.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/auditfilter.c Wed May 06 16:57:01 2009 +0100
+@@ -1094,8 +1094,8 @@
list_for_each_entry_safe(p, n, in_list, ilist) {
list_del(&p->ilist);
inotify_rm_watch(audit_ih, &p->wdata);
}
}
-@@ -1389,9 +1389,13 @@ static inline int audit_del_rule(struct
+@@ -1389,9 +1389,13 @@
/* Put parent on the inotify un-registration
* list. Grab a reference before releasing
* audit_filter_mutex, to be released in
}
}
}
-diff -purN linux-2.6.27/kernel/capability.c linux-2.6.27.19-5.1/kernel/capability.c
---- linux-2.6.27/kernel/capability.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/capability.c 2009-03-25 16:11:41.000000000 +0000
-@@ -33,6 +33,17 @@ EXPORT_SYMBOL(__cap_empty_set);
+diff -r 9608d5473017 kernel/capability.c
+--- a/kernel/capability.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/capability.c Wed May 06 16:57:01 2009 +0100
+@@ -32,6 +32,17 @@
+ EXPORT_SYMBOL(__cap_empty_set);
EXPORT_SYMBOL(__cap_full_set);
EXPORT_SYMBOL(__cap_init_eff_set);
-
++
+#ifdef CONFIG_SECURITY_FILE_CAPABILITIES
+int file_caps_enabled;
+
+}
+__setup("file_caps=", setup_file_caps);
+#endif
-+
+
/*
* More recent versions of libcap are available from:
- *
-@@ -348,7 +359,7 @@ EXPORT_SYMBOL(cap_set_effective);
+@@ -348,7 +359,7 @@
*
* Returns 0 on success and < 0 on error.
*/
{
int ret = 0;
pid_t pid;
-@@ -425,7 +436,7 @@ asmlinkage long sys_capget(cap_user_head
+@@ -425,7 +436,7 @@
*
* Returns 0 on success and < 0 on error.
*/
{
struct __user_cap_data_struct kdata[_KERNEL_CAPABILITY_U32S];
unsigned i, tocopy;
-diff -purN linux-2.6.27/kernel/cgroup.c linux-2.6.27.19-5.1/kernel/cgroup.c
---- linux-2.6.27/kernel/cgroup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/cgroup.c 2009-03-25 16:11:42.000000000 +0000
-@@ -2045,10 +2045,13 @@ int cgroupstats_build(struct cgroupstats
+diff -r 9608d5473017 kernel/cgroup.c
+--- a/kernel/cgroup.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/cgroup.c Wed May 06 16:57:01 2009 +0100
+@@ -2045,10 +2045,13 @@
struct cgroup *cgrp;
struct cgroup_iter it;
struct task_struct *tsk;
goto err;
ret = 0;
-@@ -2443,7 +2446,6 @@ static int cgroup_rmdir(struct inode *un
+@@ -2443,7 +2446,6 @@
list_del(&cgrp->sibling);
spin_lock(&cgrp->dentry->d_lock);
d = dget(cgrp->dentry);
spin_unlock(&d->d_lock);
cgroup_d_remove_dir(d);
-@@ -2873,9 +2875,6 @@ int cgroup_clone(struct task_struct *tsk
+@@ -2873,9 +2875,6 @@
again:
root = subsys->root;
if (root == &rootnode) {
mutex_unlock(&cgroup_mutex);
return 0;
}
-@@ -2883,7 +2882,11 @@ int cgroup_clone(struct task_struct *tsk
+@@ -2883,7 +2882,11 @@
parent = task_cgroup(tsk, subsys->subsys_id);
/* Pin the hierarchy */
/* Keep the cgroup alive */
get_css_set(cg);
-@@ -2905,7 +2908,7 @@ int cgroup_clone(struct task_struct *tsk
+@@ -2905,7 +2908,7 @@
}
/* Create the cgroup directory, which also creates the cgroup */
child = __d_cgrp(dentry);
dput(dentry);
if (ret) {
-@@ -3096,7 +3099,7 @@ static void cgroup_release_agent(struct
+@@ -3096,7 +3099,7 @@
mutex_unlock(&cgroup_mutex);
}
{
int i;
char *token;
-@@ -3109,13 +3112,22 @@ static int __init cgroup_disable(char *s
+@@ -3109,13 +3112,22 @@
struct cgroup_subsys *ss = subsys[i];
if (!strcmp(token, ss->name)) {
+ return cgroup_turnonoff(str, 0);
+}
+__setup("cgroup_enable=", cgroup_enable);
-diff -purN linux-2.6.27/kernel/cgroup_freezer.c linux-2.6.27.19-5.1/kernel/cgroup_freezer.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/cgroup_freezer.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/cgroup_freezer.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kernel/cgroup_freezer.c Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,379 @@
+/*
+ * cgroup_freezer.c - control group freezer subsystem
+ .fork = freezer_fork,
+ .exit = NULL,
+};
-diff -purN linux-2.6.27/kernel/cpuset.c linux-2.6.27.19-5.1/kernel/cpuset.c
---- linux-2.6.27/kernel/cpuset.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/cpuset.c 2009-03-25 16:11:42.000000000 +0000
-@@ -587,7 +587,6 @@ static int generate_sched_domains(cpumas
+diff -r 9608d5473017 kernel/cpuset.c
+--- a/kernel/cpuset.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/cpuset.c Wed May 06 16:57:01 2009 +0100
+@@ -587,7 +587,6 @@
int ndoms; /* number of sched domains in result */
int nslot; /* next empty doms[] cpumask_t slot */
doms = NULL;
dattr = NULL;
csa = NULL;
-@@ -674,10 +673,8 @@ restart:
+@@ -674,10 +673,8 @@
* Convert <csn, csa> to <ndoms, doms> and populate cpu masks.
*/
doms = kmalloc(ndoms * sizeof(cpumask_t), GFP_KERNEL);
/*
* The rest of the code, including the scheduler, can deal with
-@@ -732,6 +729,13 @@ restart:
+@@ -731,6 +728,13 @@
+
done:
kfree(csa);
-
++
+ /*
+ * Fallback to the default domain if kmalloc() failed.
+ * See comments in partition_sched_domains().
+ */
+ if (doms == NULL)
+ ndoms = 1;
-+
+
*domains = doms;
*attributes = dattr;
- return ndoms;
-diff -purN linux-2.6.27/kernel/exec_domain.c linux-2.6.27.19-5.1/kernel/exec_domain.c
---- linux-2.6.27/kernel/exec_domain.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/exec_domain.c 2009-03-25 16:11:40.000000000 +0000
-@@ -188,8 +188,7 @@ get_exec_domain_list(char *page)
+diff -r 9608d5473017 kernel/exec_domain.c
+--- a/kernel/exec_domain.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/exec_domain.c Wed May 06 16:57:01 2009 +0100
+@@ -188,8 +188,7 @@
return (len);
}
{
u_long old = current->personality;
-diff -purN linux-2.6.27/kernel/exit.c linux-2.6.27.19-5.1/kernel/exit.c
---- linux-2.6.27/kernel/exit.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/exit.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/exit.c
+--- a/kernel/exit.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/exit.c Wed May 06 16:57:01 2009 +0100
@@ -4,6 +4,9 @@
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#include <asm/uaccess.h>
#include <asm/unistd.h>
-@@ -149,7 +153,10 @@ static void __exit_signal(struct task_st
+@@ -149,7 +153,10 @@
static void delayed_put_task_struct(struct rcu_head *rhp)
{
}
-@@ -1074,6 +1081,8 @@ NORET_TYPE void do_exit(long code)
+@@ -1074,6 +1081,8 @@
if (group_dead)
acct_process();
exit_sem(tsk);
exit_files(tsk);
exit_fs(tsk);
-@@ -1145,7 +1154,7 @@ NORET_TYPE void complete_and_exit(struct
+@@ -1145,7 +1154,7 @@
EXPORT_SYMBOL(complete_and_exit);
{
do_exit((error_code&0xff)<<8);
}
-@@ -1186,9 +1195,11 @@ do_group_exit(int exit_code)
+@@ -1186,9 +1195,11 @@
* wait4()-ing process will get the correct exit code - even if this
* thread is not the thread group leader.
*/
}
static struct pid *task_pid_type(struct task_struct *task, enum pid_type type)
-@@ -1675,6 +1686,8 @@ static long do_wait(enum pid_type type,
+@@ -1675,6 +1686,8 @@
struct task_struct *tsk;
int retval;
add_wait_queue(¤t->signal->wait_chldexit,&wait);
repeat:
/*
-@@ -1749,9 +1762,8 @@ end:
+@@ -1749,9 +1762,8 @@
return retval;
}
{
struct pid *pid = NULL;
enum pid_type type;
-@@ -1790,8 +1802,8 @@ asmlinkage long sys_waitid(int which, pi
+@@ -1790,8 +1802,8 @@
return ret;
}
{
struct pid *pid = NULL;
enum pid_type type;
-@@ -1828,7 +1840,7 @@ asmlinkage long sys_wait4(pid_t upid, in
+@@ -1828,7 +1840,7 @@
* sys_waitpid() remains for compatibility. waitpid() should be
* implemented by calling sys_wait4() from libc.a.
*/
{
return sys_wait4(pid, stat_addr, options, NULL);
}
-diff -purN linux-2.6.27/kernel/fork.c linux-2.6.27.19-5.1/kernel/fork.c
---- linux-2.6.27/kernel/fork.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/fork.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/fork.c
+--- a/kernel/fork.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/fork.c Wed May 06 16:57:01 2009 +0100
@@ -58,6 +58,7 @@
#include <linux/tty.h>
#include <linux/proc_fs.h>
#include <asm/pgtable.h>
#include <asm/pgalloc.h>
-@@ -313,17 +314,20 @@ static int dup_mmap(struct mm_struct *mm
+@@ -313,17 +314,20 @@
file = tmp->vm_file;
if (file) {
struct inode *inode = file->f_path.dentry->d_inode;
if (tmp->vm_flags & VM_DENYWRITE)
atomic_dec(&inode->i_writecount);
-
-- /* insert tmp into the share list, just after mpnt */
-- spin_lock(&file->f_mapping->i_mmap_lock);
+ spin_lock(&mapping->i_mmap_lock);
+ if (tmp->vm_flags & VM_SHARED)
+ mapping->i_mmap_writable++;
- tmp->vm_truncate_count = mpnt->vm_truncate_count;
-- flush_dcache_mmap_lock(file->f_mapping);
++ tmp->vm_truncate_count = mpnt->vm_truncate_count;
+ flush_dcache_mmap_lock(mapping);
-+ /* insert tmp into the share list, just after mpnt */
+ /* insert tmp into the share list, just after mpnt */
+- spin_lock(&file->f_mapping->i_mmap_lock);
+- tmp->vm_truncate_count = mpnt->vm_truncate_count;
+- flush_dcache_mmap_lock(file->f_mapping);
vma_prio_tree_add(tmp, mpnt);
- flush_dcache_mmap_unlock(file->f_mapping);
- spin_unlock(&file->f_mapping->i_mmap_lock);
}
/*
-@@ -862,7 +866,7 @@ static void copy_flags(unsigned long clo
+@@ -862,7 +866,7 @@
clear_freeze_flag(p);
}
{
current->clear_child_tid = tidptr;
-@@ -1139,7 +1143,9 @@ static struct task_struct *copy_process(
+@@ -1139,7 +1143,9 @@
p->parent_exec_id = p->self_exec_id;
/* ok, now we should be set up.. */
p->pdeath_signal = 0;
p->exit_state = 0;
-@@ -1361,6 +1367,8 @@ long do_fork(unsigned long clone_flags,
+@@ -1361,6 +1367,8 @@
if (!IS_ERR(p)) {
struct completion vfork;
nr = task_pid_vnr(p);
if (clone_flags & CLONE_PARENT_SETTID)
-@@ -1558,7 +1566,7 @@ static int unshare_fd(unsigned long unsh
+@@ -1558,7 +1566,7 @@
* constructed. Here we are modifying the current, active,
* task_struct.
*/
{
int err = 0;
struct fs_struct *fs, *new_fs = NULL;
-diff -purN linux-2.6.27/kernel/freezer.c linux-2.6.27.19-5.1/kernel/freezer.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/freezer.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 kernel/freezer.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kernel/freezer.c Wed May 06 16:57:01 2009 +0100
@@ -0,0 +1,154 @@
+/*
+ * kernel/freezer.c - Function to freeze a process
+ return 0;
+}
+EXPORT_SYMBOL(thaw_process);
-diff -purN linux-2.6.27/kernel/futex.c linux-2.6.27.19-5.1/kernel/futex.c
---- linux-2.6.27/kernel/futex.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/futex.c 2009-03-25 16:11:40.000000000 +0000
-@@ -1797,9 +1797,8 @@ pi_faulted:
+diff -r 9608d5473017 kernel/futex.c
+--- a/kernel/futex.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/futex.c Wed May 06 16:57:01 2009 +0100
+@@ -1797,9 +1797,8 @@
* @head: pointer to the list-head
* @len: length of the list-head, as userspace expects
*/
{
if (!futex_cmpxchg_enabled)
return -ENOSYS;
-@@ -1820,9 +1819,9 @@ sys_set_robust_list(struct robust_list_h
+@@ -1820,9 +1819,9 @@
* @head_ptr: pointer to a list-head pointer, the kernel fills it in
* @len_ptr: pointer to a length field, the kernel fills in the header size
*/
{
struct robust_list_head __user *head;
unsigned long ret;
-@@ -2036,9 +2035,9 @@ long do_futex(u32 __user *uaddr, int op,
+@@ -2036,9 +2035,9 @@
}
{
struct timespec ts;
ktime_t t, *tp = NULL;
-diff -purN linux-2.6.27/kernel/hrtimer.c linux-2.6.27.19-5.1/kernel/hrtimer.c
---- linux-2.6.27/kernel/hrtimer.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/hrtimer.c 2009-03-25 16:11:40.000000000 +0000
-@@ -1084,7 +1084,7 @@ ktime_t hrtimer_get_remaining(const stru
+diff -r 9608d5473017 kernel/hrtimer.c
+--- a/kernel/hrtimer.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/hrtimer.c Wed May 06 16:57:01 2009 +0100
+@@ -1084,7 +1084,7 @@
}
EXPORT_SYMBOL_GPL(hrtimer_get_remaining);
/**
* hrtimer_get_next_event - get the time until next expiry event
*
-@@ -1560,8 +1560,8 @@ out:
+@@ -1560,8 +1560,8 @@
return ret;
}
{
struct timespec tu;
-diff -purN linux-2.6.27/kernel/irq/chip.c linux-2.6.27.19-5.1/kernel/irq/chip.c
---- linux-2.6.27/kernel/irq/chip.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/irq/chip.c 2009-03-25 16:11:40.000000000 +0000
-@@ -78,6 +78,7 @@ void dynamic_irq_cleanup(unsigned int ir
+diff -r 9608d5473017 kernel/irq/chip.c
+--- a/kernel/irq/chip.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/irq/chip.c Wed May 06 16:57:01 2009 +0100
+@@ -78,6 +78,7 @@
desc->chip_data = NULL;
desc->handle_irq = handle_bad_irq;
desc->chip = &no_irq_chip;
spin_unlock_irqrestore(&desc->lock, flags);
}
-@@ -323,7 +324,7 @@ handle_simple_irq(unsigned int irq, stru
+@@ -323,7 +324,7 @@
action_ret = handle_IRQ_event(irq, action);
if (!noirqdebug)
spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS;
-@@ -369,7 +370,7 @@ handle_level_irq(unsigned int irq, struc
+@@ -369,7 +370,7 @@
action_ret = handle_IRQ_event(irq, action);
if (!noirqdebug)
spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS;
-@@ -422,7 +423,7 @@ handle_fasteoi_irq(unsigned int irq, str
+@@ -422,7 +423,7 @@
action_ret = handle_IRQ_event(irq, action);
if (!noirqdebug)
spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS;
-@@ -502,7 +503,7 @@ handle_edge_irq(unsigned int irq, struct
+@@ -502,7 +503,7 @@
spin_unlock(&desc->lock);
action_ret = handle_IRQ_event(irq, action);
if (!noirqdebug)
spin_lock(&desc->lock);
} while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING);
-@@ -531,7 +532,7 @@ handle_percpu_irq(unsigned int irq, stru
+@@ -531,7 +532,7 @@
action_ret = handle_IRQ_event(irq, desc->action);
if (!noirqdebug)
if (desc->chip->eoi)
desc->chip->eoi(irq);
-diff -purN linux-2.6.27/kernel/irq/handle.c linux-2.6.27.19-5.1/kernel/irq/handle.c
---- linux-2.6.27/kernel/irq/handle.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/irq/handle.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/irq/handle.c
+--- a/kernel/irq/handle.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/irq/handle.c Wed May 06 16:57:01 2009 +0100
@@ -15,6 +15,7 @@
#include <linux/random.h>
#include <linux/interrupt.h>
#include "internals.h"
-@@ -130,6 +131,9 @@ irqreturn_t handle_IRQ_event(unsigned in
+@@ -130,6 +131,9 @@
{
irqreturn_t ret, retval = IRQ_NONE;
unsigned int status = 0;
handle_dynamic_tick(action);
-@@ -148,6 +152,8 @@ irqreturn_t handle_IRQ_event(unsigned in
+@@ -147,6 +151,8 @@
+ if (status & IRQF_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
local_irq_disable();
-
-+ trace_irq_exit(retval);
+
++ trace_irq_exit(retval);
+
return retval;
}
-
-@@ -181,7 +187,7 @@ unsigned int __do_IRQ(unsigned int irq)
+@@ -181,7 +187,7 @@
if (likely(!(desc->status & IRQ_DISABLED))) {
action_ret = handle_IRQ_event(irq, desc->action);
if (!noirqdebug)
}
desc->chip->end(irq);
return 1;
-@@ -235,7 +241,7 @@ unsigned int __do_IRQ(unsigned int irq)
+@@ -235,7 +241,7 @@
action_ret = handle_IRQ_event(irq, action);
if (!noirqdebug)
spin_lock(&desc->lock);
if (likely(!(desc->status & IRQ_PENDING)))
-diff -purN linux-2.6.27/kernel/irq/manage.c linux-2.6.27.19-5.1/kernel/irq/manage.c
---- linux-2.6.27/kernel/irq/manage.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/irq/manage.c 2009-03-25 16:11:40.000000000 +0000
-@@ -89,7 +89,14 @@ int irq_set_affinity(unsigned int irq, c
+diff -r 9608d5473017 kernel/irq/manage.c
+--- a/kernel/irq/manage.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/irq/manage.c Wed May 06 16:57:01 2009 +0100
+@@ -89,7 +89,14 @@
set_balance_irq_affinity(irq, cpumask);
#ifdef CONFIG_GENERIC_PENDING_IRQ
#else
desc->affinity = cpumask;
desc->chip->set_affinity(irq, cpumask);
-@@ -110,6 +117,17 @@ int irq_select_affinity(unsigned int irq
+@@ -109,6 +116,17 @@
+ return 0;
cpus_and(mask, cpu_online_map, irq_default_affinity);
-
++
+ /*
+ * Preserve the affinity that was previously set, but make
+ * sure one of the targets is online.
+ else
+ irq_desc[irq].status &= ~IRQ_AFFINITY_SET;
+ }
-+
+
irq_desc[irq].affinity = mask;
irq_desc[irq].chip->set_affinity(irq, mask);
-
-diff -purN linux-2.6.27/kernel/irq/spurious.c linux-2.6.27.19-5.1/kernel/irq/spurious.c
---- linux-2.6.27/kernel/irq/spurious.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/irq/spurious.c 2009-03-25 16:11:40.000000000 +0000
-@@ -171,8 +171,19 @@ static inline int try_misrouted_irq(unsi
+diff -r 9608d5473017 kernel/irq/spurious.c
+--- a/kernel/irq/spurious.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/irq/spurious.c Wed May 06 16:57:01 2009 +0100
+@@ -171,8 +171,19 @@
}
void note_interrupt(unsigned int irq, struct irq_desc *desc,
if (unlikely(action_ret != IRQ_HANDLED)) {
/*
* If we are seeing only the odd spurious IRQ caused by
-@@ -182,7 +193,7 @@ void note_interrupt(unsigned int irq, st
+@@ -182,7 +193,7 @@
*/
if (time_after(jiffies, desc->last_unhandled + HZ/10))
desc->irqs_unhandled = 1;
desc->irqs_unhandled++;
desc->last_unhandled = jiffies;
if (unlikely(action_ret != IRQ_NONE))
-diff -purN linux-2.6.27/kernel/itimer.c linux-2.6.27.19-5.1/kernel/itimer.c
---- linux-2.6.27/kernel/itimer.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/itimer.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 kernel/itimer.c
+--- a/kernel/itimer.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/itimer.c Wed May 06 16:57:01 2009 +0100
@@ -12,6 +12,7 @@
#include <linux/time.h>
#include <linux/posix-timers.h>
#include <asm/uaccess.h>
-@@ -109,7 +110,7 @@ int do_getitimer(int which, struct itime
+@@ -109,7 +110,7 @@
return 0;
}
{
int error = -EFAULT;
struct itimerval get_buffer;
-@@ -132,6 +133,8 @@ enum hrtimer_restart it_real_fn(struct h
+@@ -131,6 +132,8 @@
+ {
struct signal_struct *sig =
container_of(timer, struct signal_struct, real_timer);
-
-+ trace_timer_itimer_expired(sig);
+
++ trace_timer_itimer_expired(sig);
+
kill_pid_info(SIGALRM, SEND_SIG_PRIV, sig->leader_pid);
- return HRTIMER_NORESTART;
-@@ -157,6 +160,8 @@ int do_setitimer(int which, struct itime
+@@ -156,6 +159,8 @@
+ if (!timeval_valid(&value->it_value) ||
!timeval_valid(&value->it_interval))
return -EINVAL;
-
-+ trace_timer_itimer_set(which, value);
+
++ trace_timer_itimer_set(which, value);
+
switch (which) {
case ITIMER_REAL:
- again:
-@@ -273,9 +278,8 @@ unsigned int alarm_setitimer(unsigned in
+@@ -273,9 +278,8 @@
return it_old.it_value.tv_sec;
}
{
struct itimerval set_buffer, get_buffer;
int error;
-diff -purN linux-2.6.27/kernel/kallsyms.c linux-2.6.27.19-5.1/kernel/kallsyms.c
---- linux-2.6.27/kernel/kallsyms.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/kallsyms.c 2009-03-25 16:11:40.000000000 +0000
-@@ -479,3 +479,25 @@ __initcall(kallsyms_init);
+diff -r 9608d5473017 kernel/kallsyms.c
+--- a/kernel/kallsyms.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/kallsyms.c Wed May 06 16:57:01 2009 +0100
+@@ -479,3 +479,25 @@
EXPORT_SYMBOL(__print_symbol);
EXPORT_SYMBOL_GPL(sprint_symbol);
+ }
+}
+#endif /* CONFIG_KDB */
-diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
---- linux-2.6.27/kernel/kexec.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/kexec.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/kexec.c
+--- a/kernel/kexec.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/kexec.c Wed May 06 16:57:01 2009 +0100
@@ -30,6 +30,7 @@
#include <linux/pm.h>
#include <linux/cpu.h>
/* vmcoreinfo stuff */
unsigned char vmcoreinfo_data[VMCOREINFO_BYTES];
-@@ -351,13 +359,26 @@ static int kimage_is_destination_range(s
+@@ -351,13 +359,26 @@
return 0;
}
pages->mapping = NULL;
set_page_private(pages, order);
count = 1 << order;
-@@ -421,10 +442,10 @@ static struct page *kimage_alloc_normal_
+@@ -421,10 +442,10 @@
do {
unsigned long pfn, epfn, addr, eaddr;
epfn = pfn + count;
addr = pfn << PAGE_SHIFT;
eaddr = epfn << PAGE_SHIFT;
-@@ -458,6 +479,7 @@ static struct page *kimage_alloc_normal_
+@@ -458,6 +479,7 @@
return pages;
}
static struct page *kimage_alloc_crash_control_pages(struct kimage *image,
unsigned int order)
{
-@@ -511,7 +533,7 @@ static struct page *kimage_alloc_crash_c
+@@ -511,7 +533,7 @@
}
/* If I don't overlap any segments I have found my hole! */
if (i == image->nr_segments) {
break;
}
}
-@@ -538,6 +560,13 @@ struct page *kimage_alloc_control_pages(
+@@ -538,6 +560,13 @@
return pages;
}
static int kimage_add_entry(struct kimage *image, kimage_entry_t entry)
{
-@@ -553,7 +582,7 @@ static int kimage_add_entry(struct kimag
+@@ -553,7 +582,7 @@
return -ENOMEM;
ind_page = page_address(page);
image->entry = ind_page;
image->last_entry = ind_page +
((PAGE_SIZE/sizeof(kimage_entry_t)) - 1);
-@@ -612,13 +641,13 @@ static void kimage_terminate(struct kima
+@@ -612,13 +641,13 @@
#define for_each_kimage_entry(image, ptr, entry) \
for (ptr = &image->head; (entry = *ptr) && !(entry & IND_DONE); \
ptr = (entry & IND_INDIRECTION)? \
kimage_free_pages(page);
}
-@@ -630,6 +659,10 @@ static void kimage_free(struct kimage *i
+@@ -629,6 +658,10 @@
+
if (!image)
return;
-
++
+#ifdef CONFIG_XEN
+ xen_machine_kexec_unload(image);
+#endif
-+
+
kimage_free_extra_pages(image);
for_each_kimage_entry(image, ptr, entry) {
- if (entry & IND_INDIRECTION) {
-@@ -705,7 +738,7 @@ static struct page *kimage_alloc_page(st
+@@ -705,7 +738,7 @@
* have a match.
*/
list_for_each_entry(page, &image->dest_pages, lru) {
if (addr == destination) {
list_del(&page->lru);
return page;
-@@ -716,16 +749,16 @@ static struct page *kimage_alloc_page(st
+@@ -716,16 +749,16 @@
kimage_entry_t *old;
/* Allocate a page, if we run out of memory give up */
/* If it is the destination page we want use it */
if (addr == destination)
-@@ -748,7 +781,7 @@ static struct page *kimage_alloc_page(st
+@@ -748,7 +781,7 @@
struct page *old_page;
old_addr = *old & PAGE_MASK;
copy_highpage(page, old_page);
*old = addr | (*old & ~PAGE_MASK);
-@@ -804,7 +837,7 @@ static int kimage_load_normal_segment(st
+@@ -804,7 +837,7 @@
result = -ENOMEM;
goto out;
}
<< PAGE_SHIFT);
if (result < 0)
goto out;
-@@ -836,6 +869,7 @@ out:
+@@ -836,6 +869,7 @@
return result;
}
static int kimage_load_crash_segment(struct kimage *image,
struct kexec_segment *segment)
{
-@@ -858,7 +892,7 @@ static int kimage_load_crash_segment(str
+@@ -858,7 +892,7 @@
char *ptr;
size_t uchunk, mchunk;
if (!page) {
result = -ENOMEM;
goto out;
-@@ -907,6 +941,13 @@ static int kimage_load_segment(struct ki
+@@ -907,6 +941,13 @@
return result;
}
/*
* Exec Kernel system call: for obvious reasons only root may call it.
-@@ -933,9 +974,8 @@ struct kimage *kexec_crash_image;
+@@ -933,9 +974,8 @@
static DEFINE_MUTEX(kexec_mutex);
{
struct kimage **dest_image, *image;
int result;
-@@ -1011,6 +1051,13 @@ asmlinkage long sys_kexec_load(unsigned
+@@ -1011,6 +1051,13 @@
}
kimage_terminate(image);
}
/* Install the new kernel, and Uninstall the old */
image = xchg(dest_image, image);
-@@ -1073,9 +1120,19 @@ void crash_kexec(struct pt_regs *regs)
+@@ -1073,9 +1120,19 @@
if (mutex_trylock(&kexec_mutex)) {
if (kexec_crash_image) {
struct pt_regs fixed_regs;
machine_kexec(kexec_crash_image);
}
mutex_unlock(&kexec_mutex);
-@@ -1136,6 +1193,30 @@ void crash_save_cpu(struct pt_regs *regs
+@@ -1136,6 +1193,30 @@
final_note(buf);
}
static int __init crash_notes_memory_init(void)
{
/* Allocate memory for saving cpu registers. */
-@@ -1145,11 +1226,15 @@ static int __init crash_notes_memory_ini
+@@ -1145,11 +1226,15 @@
" states failed\n");
return -ENOMEM;
}
/*
* parsing the "crashkernel" commandline
*
-@@ -1312,7 +1397,7 @@ int __init parse_crashkernel(char *cm
+@@ -1312,7 +1397,7 @@
return 0;
}
void crash_save_vmcoreinfo(void)
-@@ -1369,7 +1454,18 @@ static int __init crash_save_vmcoreinfo_
+@@ -1369,7 +1454,18 @@
VMCOREINFO_SYMBOL(init_uts_ns);
VMCOREINFO_SYMBOL(node_online_map);
VMCOREINFO_SYMBOL(_stext);
#ifndef CONFIG_NEED_MULTIPLE_NODES
-diff -purN linux-2.6.27/kernel/ksysfs.c linux-2.6.27.19-5.1/kernel/ksysfs.c
---- linux-2.6.27/kernel/ksysfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/ksysfs.c 2009-03-25 16:11:40.000000000 +0000
-@@ -104,6 +104,23 @@ static struct bin_attribute notes_attr =
+diff -r 9608d5473017 kernel/ksysfs.c
+--- a/kernel/ksysfs.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/ksysfs.c Wed May 06 16:57:01 2009 +0100
+@@ -104,6 +104,23 @@
struct kobject *kernel_kobj;
EXPORT_SYMBOL_GPL(kernel_kobj);
static struct attribute * kernel_attrs[] = {
#if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET)
&uevent_seqnum_attr.attr,
-@@ -114,6 +131,7 @@ static struct attribute * kernel_attrs[]
+@@ -114,6 +131,7 @@
&kexec_crash_loaded_attr.attr,
&vmcoreinfo_attr.attr,
#endif
NULL
};
-diff -purN linux-2.6.27/kernel/kthread.c linux-2.6.27.19-5.1/kernel/kthread.c
---- linux-2.6.27/kernel/kthread.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/kthread.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/kthread.c
+--- a/kernel/kthread.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/kthread.c Wed May 06 16:57:01 2009 +0100
@@ -13,6 +13,7 @@
#include <linux/file.h>
#include <linux/module.h>
#define KTHREAD_NICE_LEVEL (-5)
-@@ -206,6 +207,8 @@ int kthread_stop(struct task_struct *k)
+@@ -206,6 +207,8 @@
/* It could exit after stop_info.k set, but before wake_up_process. */
get_task_struct(k);
/* Must init completion *before* thread sees kthread_stop_info.k */
init_completion(&kthread_stop_info.done);
smp_wmb();
-@@ -221,6 +224,8 @@ int kthread_stop(struct task_struct *k)
+@@ -220,6 +223,8 @@
+ kthread_stop_info.k = NULL;
ret = kthread_stop_info.err;
mutex_unlock(&kthread_stop_lock);
-
-+ trace_sched_kthread_stop_ret(ret);
+
++ trace_sched_kthread_stop_ret(ret);
+
return ret;
}
- EXPORT_SYMBOL(kthread_stop);
-diff -purN linux-2.6.27/kernel/marker.c linux-2.6.27.19-5.1/kernel/marker.c
---- linux-2.6.27/kernel/marker.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/marker.c 2009-03-25 16:11:42.000000000 +0000
-@@ -103,11 +103,11 @@ void marker_probe_cb(const struct marker
+diff -r 9608d5473017 kernel/marker.c
+--- a/kernel/marker.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/marker.c Wed May 06 16:57:01 2009 +0100
+@@ -103,11 +103,11 @@
char ptype;
/*
ptype = mdata->ptype;
if (likely(!ptype)) {
marker_probe_func *func;
-@@ -145,7 +145,7 @@ void marker_probe_cb(const struct marker
+@@ -145,7 +145,7 @@
va_end(args);
}
}
}
EXPORT_SYMBOL_GPL(marker_probe_cb);
-@@ -162,7 +162,7 @@ void marker_probe_cb_noarg(const struct
+@@ -162,7 +162,7 @@
va_list args; /* not initialized */
char ptype;
ptype = mdata->ptype;
if (likely(!ptype)) {
marker_probe_func *func;
-@@ -195,7 +195,7 @@ void marker_probe_cb_noarg(const struct
+@@ -195,7 +195,7 @@
multi[i].func(multi[i].probe_private, call_private,
mdata->format, &args);
}
}
EXPORT_SYMBOL_GPL(marker_probe_cb_noarg);
-@@ -560,7 +560,7 @@ static int set_marker(struct marker_entr
+@@ -560,7 +560,7 @@
* Disable a marker and its probe callback.
* Note: only waiting an RCU period after setting elem->call to the empty
* function insures that the original callback is not used anymore. This insured
*/
static void disable_marker(struct marker *elem)
{
-diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
---- linux-2.6.27/kernel/module.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/module.c 2009-03-25 16:11:41.000000000 +0000
+diff -r 9608d5473017 kernel/module.c
+--- a/kernel/module.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/module.c Wed May 06 16:57:01 2009 +0100
@@ -46,6 +46,8 @@
#include <asm/cacheflush.h>
#include <linux/license.h>
#if 0
#define DEBUGP printk
-@@ -60,6 +62,20 @@
+@@ -59,6 +61,20 @@
+
/* If this is set, the section belongs in the init part of the module */
#define INIT_OFFSET_MASK (1UL << (BITS_PER_LONG-1))
-
++
+/* Allow unsupported modules switch. */
+#ifdef UNSUPPORTED_MODULES
+int unsupported = UNSUPPORTED_MODULES;
+ return 1;
+}
+__setup("unsupported=", unsupported_setup);
-+
+
/* List of modules, protected by module_mutex or preempt_disable
* (add/delete uses stop_machine). */
- static DEFINE_MUTEX(module_mutex);
-@@ -543,17 +559,28 @@ static char last_unloaded_module[MODULE_
+@@ -543,17 +559,28 @@
#ifdef CONFIG_MODULE_UNLOAD
/* Init the unload section of the module. */
}
/* modules using other modules */
-@@ -633,6 +660,10 @@ static void module_unload_free(struct mo
+@@ -633,6 +660,10 @@
}
}
}
}
#ifdef CONFIG_MODULE_FORCE_UNLOAD
-@@ -691,7 +722,7 @@ unsigned int module_refcount(struct modu
+@@ -691,7 +722,7 @@
{
unsigned int i, total = 0;
total += local_read(&mod->ref[i].count);
return total;
}
-@@ -715,8 +746,8 @@ static void wait_for_zero_refcount(struc
+@@ -715,8 +746,8 @@
mutex_lock(&module_mutex);
}
{
struct module *mod;
char name[MODULE_NAME_LEN];
-@@ -784,6 +815,7 @@ sys_delete_module(const char __user *nam
+@@ -784,6 +815,7 @@
mutex_lock(&module_mutex);
/* Store the name of the last unloaded module for diagnostic purposes */
strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
free_module(mod);
out:
-@@ -879,8 +911,9 @@ static inline int use_module(struct modu
+@@ -879,8 +911,9 @@
return strong_try_module_get(b) == 0;
}
}
#endif /* CONFIG_MODULE_UNLOAD */
-@@ -908,10 +941,36 @@ static struct module_attribute initstate
+@@ -908,10 +941,36 @@
.show = show_initstate,
};
#ifdef CONFIG_MODULE_UNLOAD
&refcnt,
#endif
-@@ -1173,7 +1232,7 @@ static void free_notes_attrs(struct modu
+@@ -1173,7 +1232,7 @@
while (i-- > 0)
sysfs_remove_bin_file(notes_attrs->dir,
¬es_attrs->attrs[i]);
}
kfree(notes_attrs);
}
-@@ -1415,6 +1474,8 @@ static int __unlink_module(void *_mod)
+@@ -1415,6 +1474,8 @@
/* Free a module, remove from lists, etc (must hold module_mutex). */
static void free_module(struct module *mod)
{
/* Delete from various lists */
stop_machine(__unlink_module, mod, NULL);
remove_notes_attrs(mod);
-@@ -1783,6 +1844,33 @@ static inline void add_kallsyms(struct m
+@@ -1783,6 +1844,33 @@
}
#endif /* CONFIG_KALLSYMS */
static void *module_alloc_update_bounds(unsigned long size)
{
void *ret = module_alloc(size);
-@@ -1806,6 +1894,7 @@ static noinline struct module *load_modu
+@@ -1806,6 +1894,7 @@
Elf_Ehdr *hdr;
Elf_Shdr *sechdrs;
char *secstrings, *args, *modmagic, *strtab = NULL;
unsigned int i;
unsigned int symindex = 0;
unsigned int strindex = 0;
-@@ -1831,6 +1920,9 @@ static noinline struct module *load_modu
+@@ -1831,6 +1920,9 @@
#endif
unsigned int markersindex;
unsigned int markersstringsindex;
struct module *mod;
long err = 0;
void *percpu = NULL, *ptr = NULL; /* Stops spurious gcc warning */
-@@ -1960,6 +2052,14 @@ static noinline struct module *load_modu
+@@ -1960,6 +2052,14 @@
goto free_hdr;
}
/* Now copy in args */
args = strndup_user(uargs, ~0UL >> 1);
if (IS_ERR(args)) {
-@@ -2039,7 +2139,9 @@ static noinline struct module *load_modu
+@@ -2039,7 +2139,9 @@
mod = (void *)sechdrs[modindex].sh_addr;
/* Now we've moved module, initialize linked lists, etc. */
/* add kobject, so we can reference it. */
err = mod_sysfs_init(mod);
-@@ -2117,6 +2219,11 @@ static noinline struct module *load_modu
+@@ -2117,6 +2219,11 @@
markersindex = find_sec(hdr, sechdrs, secstrings, "__markers");
markersstringsindex = find_sec(hdr, sechdrs, secstrings,
"__markers_strings");
/* Now do relocations. */
for (i = 1; i < hdr->e_shnum; i++) {
-@@ -2144,6 +2251,12 @@ static noinline struct module *load_modu
+@@ -2144,6 +2251,12 @@
mod->num_markers =
sechdrs[markersindex].sh_size / sizeof(*mod->markers);
#endif
/* Find duplicate symbols */
err = verify_export_symbols(mod);
-@@ -2162,11 +2275,17 @@ static noinline struct module *load_modu
+@@ -2162,11 +2275,17 @@
add_kallsyms(mod, sechdrs, symindex, strindex, secstrings);
err = module_finalize(hdr, sechdrs, mod);
if (err < 0)
goto cleanup;
-@@ -2219,6 +2338,26 @@ static noinline struct module *load_modu
+@@ -2219,6 +2338,26 @@
add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
/* Size of section 0 is 0, so this works well if no unwind info. */
mod->unwind_info = unwind_add_table(mod,
(void *)sechdrs[unwindex].sh_addr,
-@@ -2227,6 +2366,8 @@ static noinline struct module *load_modu
+@@ -2226,6 +2365,8 @@
+
/* Get rid of temporary copy */
vfree(hdr);
-
-+ trace_kernel_module_load(mod);
+
++ trace_kernel_module_load(mod);
+
/* Done! */
return mod;
-
-@@ -2257,10 +2398,8 @@ static noinline struct module *load_modu
+@@ -2257,10 +2398,8 @@
}
/* This is where the real work happens */
{
struct module *mod;
int ret = 0;
-@@ -2469,12 +2608,23 @@ out:
+@@ -2469,12 +2608,23 @@
return -ERANGE;
}
list_for_each_entry(mod, &modules, list) {
if (symnum < mod->num_symtab) {
*value = mod->symtab[symnum].st_value;
-@@ -2483,12 +2633,14 @@ int module_get_kallsym(unsigned int symn
+@@ -2483,12 +2633,14 @@
KSYM_NAME_LEN);
strlcpy(module_name, mod->name, MODULE_NAME_LEN);
*exported = is_exported(name, mod);
return -ERANGE;
}
-@@ -2556,6 +2708,12 @@ static char *module_flags(struct module
+@@ -2556,6 +2708,12 @@
buf[bx++] = 'P';
if (mod->taints & TAINT_FORCED_MODULE)
buf[bx++] = 'F';
/*
* TAINT_FORCED_RMMOD: could be added.
* TAINT_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't
-@@ -2696,6 +2854,7 @@ void print_modules(void)
+@@ -2696,6 +2854,7 @@
if (last_unloaded_module[0])
printk(" [last unloaded: %s]", last_unloaded_module);
printk("\n");
}
#ifdef CONFIG_MODVERSIONS
-@@ -2717,3 +2876,50 @@ void module_update_markers(void)
+@@ -2717,3 +2876,50 @@
mutex_unlock(&module_mutex);
}
#endif
+ return found;
+}
+#endif
-diff -purN linux-2.6.27/kernel/panic.c linux-2.6.27.19-5.1/kernel/panic.c
---- linux-2.6.27/kernel/panic.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/panic.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/panic.c
+--- a/kernel/panic.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/panic.c Wed May 06 16:57:01 2009 +0100
@@ -21,6 +21,9 @@
#include <linux/debug_locks.h>
#include <linux/random.h>
int panic_on_oops;
int tainted;
-@@ -82,12 +85,18 @@ NORET_TYPE void panic(const char * fmt,
+@@ -82,12 +85,18 @@
printk(KERN_EMERG "Kernel panic - not syncing: %s\n",buf);
bust_spinlocks(0);
#ifdef CONFIG_SMP
/*
-@@ -100,6 +109,8 @@ NORET_TYPE void panic(const char * fmt,
+@@ -100,6 +109,8 @@
atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
if (!panic_blink)
panic_blink = no_blink;
-@@ -109,6 +120,12 @@ NORET_TYPE void panic(const char * fmt,
+@@ -109,6 +120,12 @@
* We can't use the "normal" timers since we just panicked..
*/
printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);
for (i = 0; i < panic_timeout*1000; ) {
touch_nmi_watchdog();
i += panic_blink(i);
-@@ -133,6 +150,12 @@ NORET_TYPE void panic(const char * fmt,
+@@ -133,6 +150,12 @@
disabled_wait(caller);
#endif
local_irq_enable();
for (i = 0;;) {
touch_softlockup_watchdog();
i += panic_blink(i);
-@@ -155,6 +178,9 @@ EXPORT_SYMBOL(panic);
+@@ -155,6 +178,9 @@
* 'U' - Userspace-defined naughtiness.
* 'A' - ACPI table overridden.
* 'W' - Taint on warning.
*
* The string is overwritten by the next call to print_taint().
*/
-@@ -163,7 +189,7 @@ const char *print_tainted(void)
+@@ -163,7 +189,7 @@
{
static char buf[20];
if (tainted) {
tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G',
tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
-@@ -173,7 +199,10 @@ const char *print_tainted(void)
+@@ -173,7 +199,10 @@
tainted & TAINT_USER ? 'U' : ' ',
tainted & TAINT_DIE ? 'D' : ' ',
tainted & TAINT_OVERRIDDEN_ACPI_TABLE ? 'A' : ' ',
}
else
snprintf(buf, sizeof(buf), "Not tainted");
-diff -purN linux-2.6.27/kernel/posix-timers.c linux-2.6.27.19-5.1/kernel/posix-timers.c
---- linux-2.6.27/kernel/posix-timers.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/posix-timers.c 2009-03-25 16:11:40.000000000 +0000
-@@ -463,10 +463,9 @@ static void release_posix_timer(struct k
+diff -r 9608d5473017 kernel/posix-timers.c
+--- a/kernel/posix-timers.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/posix-timers.c Wed May 06 16:57:01 2009 +0100
+@@ -463,10 +463,9 @@
/* Create a POSIX.1b interval timer. */
{
int error = 0;
struct k_itimer *new_timer = NULL;
-@@ -682,8 +681,8 @@ common_timer_get(struct k_itimer *timr,
+@@ -682,8 +681,8 @@
}
/* Get the time remaining on a POSIX.1b interval timer. */
{
struct k_itimer *timr;
struct itimerspec cur_setting;
-@@ -712,8 +711,7 @@ sys_timer_gettime(timer_t timer_id, stru
+@@ -712,8 +711,7 @@
* the call back to do_schedule_next_timer(). So all we need to do is
* to pick up the frozen overrun.
*/
{
struct k_itimer *timr;
int overrun;
-@@ -783,10 +781,9 @@ common_timer_set(struct k_itimer *timr,
+@@ -783,10 +781,9 @@
}
/* Set a POSIX.1b interval timer */
{
struct k_itimer *timr;
struct itimerspec new_spec, old_spec;
-@@ -839,8 +836,7 @@ static inline int timer_delete_hook(stru
+@@ -839,8 +836,7 @@
}
/* Delete a POSIX.1b interval timer. */
{
struct k_itimer *timer;
unsigned long flags;
-@@ -930,8 +926,8 @@ int do_posix_clock_nonanosleep(const clo
+@@ -930,8 +926,8 @@
}
EXPORT_SYMBOL_GPL(do_posix_clock_nonanosleep);
{
struct timespec new_tp;
-@@ -943,8 +939,8 @@ asmlinkage long sys_clock_settime(const
+@@ -943,8 +939,8 @@
return CLOCK_DISPATCH(which_clock, clock_set, (which_clock, &new_tp));
}
{
struct timespec kernel_tp;
int error;
-@@ -960,8 +956,8 @@ sys_clock_gettime(const clockid_t which_
+@@ -960,8 +956,8 @@
}
{
struct timespec rtn_tp;
int error;
-@@ -990,10 +986,9 @@ static int common_nsleep(const clockid_t
+@@ -990,10 +986,9 @@
which_clock);
}
{
struct timespec t;
-diff -purN linux-2.6.27/kernel/power/disk.c linux-2.6.27.19-5.1/kernel/power/disk.c
---- linux-2.6.27/kernel/power/disk.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/power/disk.c 2009-03-25 16:11:41.000000000 +0000
-@@ -71,6 +71,14 @@ void hibernation_set_ops(struct platform
+diff -r 9608d5473017 kernel/power/disk.c
+--- a/kernel/power/disk.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/power/disk.c Wed May 06 16:57:01 2009 +0100
+@@ -70,6 +70,14 @@
+
mutex_unlock(&pm_mutex);
}
-
++
+static bool entering_platform_hibernation;
+
+bool system_entering_hibernation(void)
+ return entering_platform_hibernation;
+}
+EXPORT_SYMBOL_GPL(system_entering_hibernation);
-+
+
#ifdef CONFIG_PM_DEBUG
static void hibernation_debug_sleep(void)
- {
-@@ -415,6 +423,7 @@ int hibernation_platform_enter(void)
+@@ -415,6 +423,7 @@
if (error)
goto Close;
suspend_console();
ftrace_save = __ftrace_enabled_save();
error = device_suspend(PMSG_HIBERNATE);
-@@ -450,6 +459,7 @@ int hibernation_platform_enter(void)
+@@ -450,6 +459,7 @@
Finish:
hibernation_ops->finish();
Resume_devices:
device_resume(PMSG_RESTORE);
__ftrace_enabled_restore(ftrace_save);
resume_console();
-diff -purN linux-2.6.27/kernel/power/process.c linux-2.6.27.19-5.1/kernel/power/process.c
---- linux-2.6.27/kernel/power/process.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/power/process.c 2009-03-25 16:11:41.000000000 +0000
-@@ -28,121 +28,6 @@ static inline int freezeable(struct task
+diff -r 9608d5473017 kernel/power/process.c
+--- a/kernel/power/process.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/power/process.c Wed May 06 16:57:01 2009 +0100
+@@ -26,121 +26,6 @@
+ (p->exit_state != 0))
+ return 0;
return 1;
- }
-
+-}
+-
-/*
- * freezing is complete, mark current process as frozen
- */
- recalc_sigpending_and_wake(p);
- spin_unlock_irqrestore(&p->sighand->siglock, flags);
- }
--}
--
+ }
+
static int try_to_freeze_tasks(bool sig_only)
- {
- struct task_struct *g, *p;
-@@ -250,6 +135,9 @@ static void thaw_tasks(bool nosig_only)
+@@ -250,6 +135,9 @@
if (nosig_only && should_send_signal(p))
continue;
thaw_process(p);
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
-@@ -264,4 +152,3 @@ void thaw_processes(void)
+@@ -264,4 +152,3 @@
printk("done.\n");
}
-EXPORT_SYMBOL(refrigerator);
-diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power/snapshot.c
---- linux-2.6.27/kernel/power/snapshot.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/power/snapshot.c 2009-03-25 16:11:41.000000000 +0000
+diff -r 9608d5473017 kernel/power/snapshot.c
+--- a/kernel/power/snapshot.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/power/snapshot.c Wed May 06 16:57:01 2009 +0100
@@ -25,6 +25,7 @@
#include <linux/syscalls.h>
#include <linux/console.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
-@@ -192,12 +193,6 @@ static void *chain_alloc(struct chain_al
+@@ -192,12 +193,6 @@
return ret;
}
/**
* Data types related to memory bitmaps.
*
-@@ -233,7 +228,7 @@ static void chain_free(struct chain_allo
+@@ -233,7 +228,7 @@
#define BM_BITS_PER_BLOCK (PAGE_SIZE << 3)
struct bm_block {
unsigned long start_pfn; /* pfn represented by the first bit */
unsigned long end_pfn; /* pfn represented by the last bit plus 1 */
unsigned long *data; /* bitmap representing pages */
-@@ -244,24 +239,15 @@ static inline unsigned long bm_block_bit
+@@ -244,24 +239,15 @@
return bb->end_pfn - bb->start_pfn;
}
struct linked_page *p_list; /* list of pages used to store zone
* bitmap objects and bitmap block
* objects
-@@ -273,11 +259,7 @@ struct memory_bitmap {
+@@ -273,11 +259,7 @@
static void memory_bm_position_reset(struct memory_bitmap *bm)
{
bm->cur.bit = 0;
}
-@@ -285,151 +267,184 @@ static void memory_bm_free(struct memory
+@@ -285,151 +267,184 @@
/**
* create_bm_block_list - create a list of block bitmap objects
-- */
--
--static inline struct bm_block *
--create_bm_block_list(unsigned int nr_blocks, struct chain_allocator *ca)
+ * @nr_blocks - number of blocks to allocate
+ * @list - list to put the allocated blocks into
+ * @ca - chain allocator to be used for allocating memory
-+ */
+ */
+-
+-static inline struct bm_block *
+-create_bm_block_list(unsigned int nr_blocks, struct chain_allocator *ca)
+static int create_bm_block_list(unsigned long pages,
+ struct list_head *list,
+ struct chain_allocator *ca)
bb = chain_alloc(ca, sizeof(struct bm_block));
if (!bb)
- return NULL;
--
-- bb->next = bblist;
-- bblist = bb;
+ return -ENOMEM;
+ list_add(&bb->hook, list);
- }
-- return bblist;
-+
-+ return 0;
- }
++ }
+- bb->next = bblist;
+- bblist = bb;
++ return 0;
++}
++
+struct mem_extent {
+ struct list_head hook;
+ unsigned long start;
+ unsigned long end;
+};
+
- /**
-- * create_zone_bm_list - create a list of zone bitmap objects
++/**
+ * free_mem_extents - free a list of memory extents
+ * @list - list of extents to empty
- */
++ */
+static void free_mem_extents(struct list_head *list)
+{
+ struct mem_extent *ext, *aux;
-
--static inline struct zone_bitmap *
--create_zone_bm_list(unsigned int nr_zones, struct chain_allocator *ca)
++
+ list_for_each_entry_safe(ext, aux, list, hook) {
+ list_del(&ext->hook);
+ kfree(ext);
-+ }
-+}
-+
-+/**
+ }
+- return bblist;
+ }
+
+ /**
+- * create_zone_bm_list - create a list of zone bitmap objects
+ * create_mem_extents - create a list of memory extents representing
+ * contiguous ranges of PFNs
+ * @list - list to put the extents into
+ * @gfp_mask - mask to use for memory allocations
-+ */
+ */
+static int create_mem_extents(struct list_head *list, gfp_t gfp_mask)
- {
-- struct zone_bitmap *zbmlist = NULL;
++{
+ struct zone *zone;
+-static inline struct zone_bitmap *
+-create_zone_bm_list(unsigned int nr_zones, struct chain_allocator *ca)
+-{
+- struct zone_bitmap *zbmlist = NULL;
++ INIT_LIST_HEAD(list);
+
- while (nr_zones-- > 0) {
- struct zone_bitmap *zbm;
-+ INIT_LIST_HEAD(list);
++ for_each_zone(zone) {
++ unsigned long zone_start, zone_end;
++ struct mem_extent *ext, *cur, *aux;
- zbm = chain_alloc(ca, sizeof(struct zone_bitmap));
- if (!zbm)
- return NULL;
-+ for_each_zone(zone) {
-+ unsigned long zone_start, zone_end;
-+ struct mem_extent *ext, *cur, *aux;
-+
+ if (!populated_zone(zone))
+ continue;
-+
+
+- zbm->next = zbmlist;
+- zbmlist = zbm;
+ zone_start = zone->zone_start_pfn;
+ zone_end = zone->zone_start_pfn + zone->spanned_pages;
+
+ list_add_tail(&new_ext->hook, &ext->hook);
+ continue;
+ }
-
-- zbm->next = zbmlist;
-- zbmlist = zbm;
++
+ /* Merge this zone's range of PFNs with the existing one */
+ if (zone_start < ext->start)
+ ext->start = zone_start;
- for_each_zone(zone)
- if (populated_zone(zone))
- nr++;
--
++ error = create_mem_extents(&mem_extents, gfp_mask);
++ if (error)
++ return error;
+
- /* Allocate the list of zones bitmap objects */
- zone_bm = create_zone_bm_list(nr, &ca);
- bm->zone_bm_list = zone_bm;
- if (!zone_bm) {
- chain_free(&ca, PG_UNSAFE_CLEAR);
- return -ENOMEM;
-- }
-+ error = create_mem_extents(&mem_extents, gfp_mask);
-+ if (error)
-+ return error;
-
-- /* Initialize the zone bitmap objects */
-- for_each_zone(zone) {
-- unsigned long pfn;
+ list_for_each_entry(ext, &mem_extents, hook) {
+ struct bm_block *bb;
+ unsigned long pfn = ext->start;
+ unsigned long pages = ext->end - ext->start;
++
++ bb = list_entry(bm->blocks.prev, struct bm_block, hook);
++
++ error = create_bm_block_list(pages, bm->blocks.prev, &ca);
++ if (error)
++ goto Error;
++
++ list_for_each_entry_continue(bb, &bm->blocks, hook) {
++ bb->data = get_image_page(gfp_mask, safe_needed);
++ if (!bb->data) {
++ error = -ENOMEM;
++ goto Error;
++ }
++
++ bb->start_pfn = pfn;
++ if (pages >= BM_BITS_PER_BLOCK) {
++ pfn += BM_BITS_PER_BLOCK;
++ pages -= BM_BITS_PER_BLOCK;
++ } else {
++ /* This is executed only once in the loop */
++ pfn += pages;
++ }
++ bb->end_pfn = pfn;
++ }
+ }
+- /* Initialize the zone bitmap objects */
+- for_each_zone(zone) {
+- unsigned long pfn;
+-
- if (!populated_zone(zone))
- continue;
-+ bb = list_entry(bm->blocks.prev, struct bm_block, hook);
-
+-
- zone_bm->start_pfn = zone->zone_start_pfn;
- zone_bm->end_pfn = zone->zone_start_pfn + zone->spanned_pages;
- /* Allocate the list of bitmap block objects */
- zone_bm->cur_block = bb;
- if (!bb)
- goto Free;
-+ error = create_bm_block_list(pages, bm->blocks.prev, &ca);
-+ if (error)
-+ goto Error;
-
+-
- nr = zone->spanned_pages;
- pfn = zone->zone_start_pfn;
- /* Initialize the bitmap block objects */
- bb->data = ptr;
- if (!ptr)
- goto Free;
-+ list_for_each_entry_continue(bb, &bm->blocks, hook) {
-+ bb->data = get_image_page(gfp_mask, safe_needed);
-+ if (!bb->data) {
-+ error = -ENOMEM;
-+ goto Error;
-+ }
-
- bb->start_pfn = pfn;
+-
+- bb->start_pfn = pfn;
- if (nr >= BM_BITS_PER_BLOCK) {
-+ if (pages >= BM_BITS_PER_BLOCK) {
- pfn += BM_BITS_PER_BLOCK;
+- pfn += BM_BITS_PER_BLOCK;
- nr -= BM_BITS_PER_BLOCK;
-+ pages -= BM_BITS_PER_BLOCK;
- } else {
- /* This is executed only once in the loop */
+- } else {
+- /* This is executed only once in the loop */
- pfn += nr;
-+ pfn += pages;
- }
- bb->end_pfn = pfn;
+- }
+- bb->end_pfn = pfn;
- bb = bb->next;
- }
+- }
- zone_bm = zone_bm->next;
- }
-+
+- }
bm->p_list = ca.chain;
memory_bm_position_reset(bm);
- return 0;
}
/**
-@@ -437,38 +452,33 @@ static void memory_bm_free(struct memory
+@@ -437,38 +452,33 @@
* to given pfn. The cur_zone_bm member of @bm and the cur_block member
* of @bm->cur_zone_bm are updated.
*/
- /* We don't assume that the zones are sorted by pfns */
- while (pfn < zone_bm->start_pfn || pfn >= zone_bm->end_pfn) {
- zone_bm = zone_bm->next;
--
-- if (!zone_bm)
-- return -EFAULT;
-- }
-- bm->cur.zone_bm = zone_bm;
-- }
-- /* Check if the pfn corresponds to the current bitmap block */
-- bb = zone_bm->cur_block;
+ /*
+ * Check if the pfn corresponds to the current bitmap block and find
+ * the block where it fits if this is not the case.
+ */
+ bb = bm->cur.block;
- if (pfn < bb->start_pfn)
-- bb = zone_bm->bm_blocks;
++ if (pfn < bb->start_pfn)
+ list_for_each_entry_continue_reverse(bb, &bm->blocks, hook)
+ if (pfn >= bb->start_pfn)
+ break;
-+
+
+- if (!zone_bm)
+- return -EFAULT;
+- }
+- bm->cur.zone_bm = zone_bm;
+- }
+- /* Check if the pfn corresponds to the current bitmap block */
+- bb = zone_bm->cur_block;
+- if (pfn < bb->start_pfn)
+- bb = zone_bm->bm_blocks;
+ if (pfn >= bb->end_pfn)
+ list_for_each_entry_continue(bb, &bm->blocks, hook)
+ if (pfn >= bb->start_pfn && pfn < bb->end_pfn)
*bit_nr = pfn;
*addr = bb->data;
return 0;
-@@ -530,29 +540,21 @@ static int memory_bm_test_bit(struct mem
+@@ -530,29 +540,21 @@
static unsigned long memory_bm_next_pfn(struct memory_bitmap *bm)
{
- bit = find_next_bit(bb->data, bm_block_bits(bb), bit);
- if (bit < bm_block_bits(bb))
- goto Return_pfn;
--
++ bit = bm->cur.bit;
++ bit = find_next_bit(bb->data, bm_block_bits(bb), bit);
++ if (bit < bm_block_bits(bb))
++ goto Return_pfn;
+
- bb = bb->next;
- bm->cur.block = bb;
- bm->cur.bit = 0;
- bm->cur.bit = 0;
- }
- } while (zone_bm);
-+ bit = bm->cur.bit;
-+ bit = find_next_bit(bb->data, bm_block_bits(bb), bit);
-+ if (bit < bm_block_bits(bb))
-+ goto Return_pfn;
-+
+ bb = list_entry(bb->hook.next, struct bm_block, hook);
+ bm->cur.block = bb;
+ bm->cur.bit = 0;
memory_bm_position_reset(bm);
return BM_END_OF_MAP;
-@@ -808,8 +810,7 @@ static unsigned int count_free_highmem_p
+@@ -808,8 +810,7 @@
* We should save the page if it isn't Nosave or NosaveFree, or Reserved,
* and it isn't a part of a free chunk of pages.
*/
{
struct page *page;
-@@ -817,6 +818,8 @@ static struct page *saveable_highmem_pag
+@@ -817,6 +818,8 @@
return NULL;
page = pfn_to_page(pfn);
BUG_ON(!PageHighMem(page));
-@@ -846,13 +849,16 @@ unsigned int count_highmem_pages(void)
+@@ -846,13 +849,16 @@
mark_free_pages(zone);
max_zone_pfn = zone->zone_start_pfn + zone->spanned_pages;
for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++)
#endif /* CONFIG_HIGHMEM */
/**
-@@ -863,8 +869,7 @@ static inline void *saveable_highmem_pag
+@@ -863,8 +869,7 @@
* of pages statically defined as 'unsaveable', and it isn't a part of
* a free chunk of pages.
*/
{
struct page *page;
-@@ -872,6 +877,8 @@ static struct page *saveable_page(unsign
+@@ -872,6 +877,8 @@
return NULL;
page = pfn_to_page(pfn);
BUG_ON(PageHighMem(page));
-@@ -903,7 +910,7 @@ unsigned int count_data_pages(void)
+@@ -903,7 +910,7 @@
mark_free_pages(zone);
max_zone_pfn = zone->zone_start_pfn + zone->spanned_pages;
for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++)
n++;
}
return n;
-@@ -944,7 +951,7 @@ static inline struct page *
+@@ -944,7 +951,7 @@
page_is_saveable(struct zone *zone, unsigned long pfn)
{
return is_highmem(zone) ?
}
static void copy_data_page(unsigned long dst_pfn, unsigned long src_pfn)
-@@ -975,7 +982,7 @@ static void copy_data_page(unsigned long
+@@ -975,7 +982,7 @@
}
}
#else
static inline void copy_data_page(unsigned long dst_pfn, unsigned long src_pfn)
{
-diff -purN linux-2.6.27/kernel/printk.c linux-2.6.27.19-5.1/kernel/printk.c
---- linux-2.6.27/kernel/printk.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/printk.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/printk.c
+--- a/kernel/printk.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/printk.c Wed May 06 16:57:01 2009 +0100
@@ -32,6 +32,8 @@
#include <linux/security.h>
#include <linux/bootmem.h>
#include <asm/uaccess.h>
-@@ -421,11 +423,40 @@ out:
+@@ -421,10 +423,39 @@
return error;
}
{
return do_syslog(type, buf, len);
}
-
++
+#ifdef CONFIG_DEBUG_KERNEL
+/* Its very handy to be able to view the syslog buffer during debug.
+ * But do_syslog() uses locks so it cannot be used during debugging.
+ syslog_data[3] = log_buf + log_end;
+}
+#endif /* CONFIG_KDB */
-+
+
/*
* Call the console drivers on a range of log_buf
- */
-@@ -782,11 +813,6 @@ EXPORT_SYMBOL(vprintk);
+@@ -781,11 +812,6 @@
+ EXPORT_SYMBOL(vprintk);
#else
-
+-
-asmlinkage long sys_syslog(int type, char __user *buf, int len)
-{
- return -ENOSYS;
-}
--
+
static void call_console_drivers(unsigned start, unsigned end)
{
- }
-@@ -1343,3 +1369,46 @@ bool printk_timed_ratelimit(unsigned lon
+@@ -1343,3 +1369,46 @@
}
EXPORT_SYMBOL(printk_timed_ratelimit);
#endif
+}
+EXPORT_SYMBOL(printk_dev_hash);
+#endif
-diff -purN linux-2.6.27/kernel/ptrace.c linux-2.6.27.19-5.1/kernel/ptrace.c
---- linux-2.6.27/kernel/ptrace.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/ptrace.c 2009-03-25 16:11:41.000000000 +0000
-@@ -545,7 +545,7 @@ struct task_struct *ptrace_get_task_stru
+diff -r 9608d5473017 kernel/ptrace.c
+--- a/kernel/ptrace.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/ptrace.c Wed May 06 16:57:01 2009 +0100
+@@ -545,7 +545,7 @@
#define arch_ptrace_attach(child) do { } while (0)
#endif
{
struct task_struct *child;
long ret;
-@@ -554,6 +554,38 @@ asmlinkage long sys_ptrace(long request,
+@@ -554,6 +554,38 @@
* This lock_kernel fixes a subtle race with suid exec
*/
lock_kernel();
if (request == PTRACE_TRACEME) {
ret = ptrace_traceme();
if (!ret)
-diff -purN linux-2.6.27/kernel/relay.c linux-2.6.27.19-5.1/kernel/relay.c
---- linux-2.6.27/kernel/relay.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/relay.c 2009-03-25 16:11:41.000000000 +0000
-@@ -664,8 +664,10 @@ int relay_late_setup_files(struct rchan
+diff -r 9608d5473017 kernel/relay.c
+--- a/kernel/relay.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/relay.c Wed May 06 16:57:01 2009 +0100
+@@ -664,8 +664,10 @@
mutex_lock(&relay_channels_mutex);
/* Is chan already set up? */
chan->has_base_filename = 1;
chan->parent = parent;
curr_cpu = get_cpu();
-diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
---- linux-2.6.27/kernel/sched.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sched.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/sched.c
+--- a/kernel/sched.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sched.c Wed May 06 16:57:01 2009 +0100
@@ -71,6 +71,8 @@
#include <linux/debugfs.h>
#include <linux/ctype.h>
#include <asm/tlb.h>
#include <asm/irq_regs.h>
-@@ -263,12 +265,10 @@ struct task_group {
+@@ -263,12 +265,10 @@
unsigned long shares;
#endif
struct rcu_head rcu;
struct list_head list;
-@@ -454,14 +454,12 @@ struct rt_rq {
+@@ -454,14 +454,12 @@
/* Nests inside the rq lock: */
spinlock_t rt_runtime_lock;
};
#ifdef CONFIG_SMP
-@@ -533,9 +531,8 @@ struct rq {
+@@ -533,9 +531,8 @@
/* list of leaf cfs_rq on this cpu: */
struct list_head leaf_cfs_rq_list;
#endif
/*
* This is part of a global counter where only the total sum
-@@ -1918,6 +1915,7 @@ unsigned long wait_task_inactive(struct
+@@ -1918,6 +1915,7 @@
* just go back and repeat.
*/
rq = task_rq_lock(p, &flags);
running = task_running(rq, p);
on_rq = p->se.on_rq;
ncsw = 0;
-@@ -2107,6 +2105,28 @@ find_idlest_cpu(struct sched_group *grou
+@@ -2107,6 +2105,28 @@
return idlest;
}
/*
* sched_balance_self: balance the current task (running on cpu) in domains
* that have the 'flag' flag set. In practice, this is SD_BALANCE_FORK and
-@@ -2118,11 +2138,17 @@ find_idlest_cpu(struct sched_group *grou
+@@ -2118,10 +2138,16 @@
*
* preempt must be disabled.
*/
{
struct task_struct *t = current;
struct sched_domain *tmp, *sd = NULL;
-
++
+ if (affinity_load_balancing && !cpus_full(t->cpus_allowed))
+ return find_idlest_cpu_nodomain(t, cpu);
-+
+
for_each_domain(cpu, tmp) {
/*
- * If power savings logic is enabled for a domain, stop there.
-@@ -2282,9 +2308,7 @@ out_activate:
+@@ -2282,9 +2308,7 @@
success = 1;
out_running:
check_preempt_curr(rq, p);
p->state = TASK_RUNNING;
-@@ -2417,9 +2441,7 @@ void wake_up_new_task(struct task_struct
+@@ -2417,9 +2441,7 @@
p->sched_class->task_new(rq, p);
inc_nr_running(rq);
}
check_preempt_curr(rq, p);
#ifdef CONFIG_SMP
if (p->sched_class->task_wake_up)
-@@ -2592,11 +2614,7 @@ context_switch(struct rq *rq, struct tas
+@@ -2592,11 +2614,7 @@
struct mm_struct *mm, *oldmm;
prepare_task_switch(rq, prev, next);
mm = next->mm;
oldmm = prev->active_mm;
/*
-@@ -2836,6 +2854,7 @@ static void sched_migrate_task(struct ta
+@@ -2836,6 +2854,7 @@
|| unlikely(!cpu_active(dest_cpu)))
goto out;
/* force the process onto the specified CPU */
if (migrate_task(p, dest_cpu, &req)) {
/* Need to wait for migration thread (might exit: take ref). */
-@@ -4426,12 +4445,9 @@ need_resched_nonpreemptible:
+@@ -4426,12 +4445,9 @@
if (sched_feat(HRTICK))
hrtick_clear(rq);
clear_tsk_need_resched(prev);
if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) {
-@@ -4556,8 +4572,8 @@ EXPORT_SYMBOL(default_wake_function);
+@@ -4556,8 +4572,8 @@
* started to run but is not in state TASK_RUNNING. try_to_wake_up() returns
* zero in this (rare) case, and we handle it by continuing to scan the queue.
*/
{
wait_queue_t *curr, *next;
-@@ -4942,7 +4958,7 @@ int can_nice(const struct task_struct *p
+@@ -4942,7 +4958,7 @@
* sys_setpriority is a more generic, but much slower function that
* does similar things.
*/
{
long nice, retval;
-@@ -5233,8 +5249,8 @@ do_sched_setscheduler(pid_t pid, int pol
+@@ -5233,8 +5249,8 @@
* @policy: new policy.
* @param: structure containing the new RT priority.
*/
{
/* negative values for policy are not valid */
if (policy < 0)
-@@ -5248,7 +5264,7 @@ sys_sched_setscheduler(pid_t pid, int po
+@@ -5248,7 +5264,7 @@
* @pid: the pid in question.
* @param: structure containing the new RT priority.
*/
{
return do_sched_setscheduler(pid, -1, param);
}
-@@ -5257,7 +5273,7 @@ asmlinkage long sys_sched_setparam(pid_t
+@@ -5257,7 +5273,7 @@
* sys_sched_getscheduler - get the policy (scheduling class) of a thread
* @pid: the pid in question.
*/
{
struct task_struct *p;
int retval;
-@@ -5282,7 +5298,7 @@ asmlinkage long sys_sched_getscheduler(p
+@@ -5282,7 +5298,7 @@
* @pid: the pid in question.
* @param: structure containing the RT priority.
*/
{
struct sched_param lp;
struct task_struct *p;
-@@ -5390,8 +5406,8 @@ static int get_user_cpu_mask(unsigned lo
+@@ -5390,8 +5406,8 @@
* @len: length in bytes of the bitmask pointed to by user_mask_ptr
* @user_mask_ptr: user-space pointer to the new cpu mask
*/
{
cpumask_t new_mask;
int retval;
-@@ -5435,8 +5451,8 @@ out_unlock:
+@@ -5435,8 +5451,8 @@
* @len: length in bytes of the bitmask pointed to by user_mask_ptr
* @user_mask_ptr: user-space pointer to hold the current cpu mask
*/
{
int ret;
cpumask_t mask;
-@@ -5460,7 +5476,7 @@ asmlinkage long sys_sched_getaffinity(pi
+@@ -5460,7 +5476,7 @@
* This function yields the current CPU to other tasks. If there are no
* other threads running on this CPU then this function will return.
*/
{
struct rq *rq = this_rq_lock();
-@@ -5601,7 +5617,7 @@ long __sched io_schedule_timeout(long ti
+@@ -5601,7 +5617,7 @@
* this syscall returns the maximum rt_priority that can be used
* by a given scheduling class.
*/
{
int ret = -EINVAL;
-@@ -5626,7 +5642,7 @@ asmlinkage long sys_sched_get_priority_m
+@@ -5626,7 +5642,7 @@
* this syscall returns the minimum rt_priority that can be used
* by a given scheduling class.
*/
{
int ret = -EINVAL;
-@@ -5651,8 +5667,8 @@ asmlinkage long sys_sched_get_priority_m
+@@ -5651,8 +5667,8 @@
* this syscall writes the default timeslice value of a given process
* into the user-space timespec buffer. A value of '0' means infinity.
*/
{
struct task_struct *p;
unsigned int time_slice;
-@@ -6052,8 +6068,9 @@ static void move_task_off_dead_cpu(int d
+@@ -6052,8 +6068,9 @@
do {
/* On same node? */
dest_cpu = any_online_cpu(mask);
/* On any allowed CPU? */
-@@ -6500,7 +6517,9 @@ migration_call(struct notifier_block *nf
+@@ -6500,7 +6517,9 @@
req = list_entry(rq->migration_queue.next,
struct migration_req, list);
list_del_init(&req->list);
}
spin_unlock_irq(&rq->lock);
break;
-@@ -6802,15 +6821,17 @@ cpu_attach_domain(struct sched_domain *s
+@@ -6802,15 +6821,17 @@
struct sched_domain *tmp;
/* Remove the sched domains which do not contribute to scheduling. */
}
if (sd && sd_degenerate(sd)) {
-@@ -7059,9 +7080,9 @@ static int cpu_to_allnodes_group(int cpu
+@@ -7059,9 +7080,9 @@
struct sched_group **sg, cpumask_t *nodemask)
{
int group;
-+ node_to_cpumask_ptr(pnodemask, cpu_to_node(cpu));
-
+-
- *nodemask = node_to_cpumask(cpu_to_node(cpu));
- cpus_and(*nodemask, *nodemask, *cpu_map);
++ node_to_cpumask_ptr(pnodemask, cpu_to_node(cpu));
++
+ cpus_and(*nodemask, *pnodemask, *cpu_map);
group = first_cpu(*nodemask);
if (sg)
-@@ -7111,9 +7132,9 @@ static void free_sched_groups(const cpum
+@@ -7111,9 +7132,9 @@
for (i = 0; i < nr_node_ids; i++) {
struct sched_group *oldsg, *sg = sched_group_nodes[i];
-+ node_to_cpumask_ptr(pnodemask, i);
-
+-
- *nodemask = node_to_cpumask(i);
- cpus_and(*nodemask, *nodemask, *cpu_map);
++ node_to_cpumask_ptr(pnodemask, i);
++
+ cpus_and(*nodemask, *pnodemask, *cpu_map);
if (cpus_empty(*nodemask))
continue;
-@@ -7612,8 +7633,14 @@ static struct sched_domain_attr *dattr_c
+@@ -7612,8 +7633,14 @@
*/
static cpumask_t fallback_doms;
-void __attribute__((weak)) arch_update_cpu_topology(void)
+-{
+/*
+ * arch_update_cpu_topology lets virtualized architectures update the
+ * cpu core maps. It is supposed to return 1 if the topology changed
+ * or 0 if it stayed the same.
+ */
+int __attribute__((weak)) arch_update_cpu_topology(void)
- {
++{
+ return 0;
}
/*
-@@ -7692,13 +7719,14 @@ static int dattrs_equal(struct sched_dom
+@@ -7692,13 +7719,14 @@
*
* The passed in 'doms_new' should be kmalloc'd. This routine takes
* ownership of it and will kfree it when done with it. If the caller
*
* Call with hotplug lock held
*/
-@@ -7706,17 +7734,21 @@ void partition_sched_domains(int ndoms_n
+@@ -7706,17 +7734,21 @@
struct sched_domain_attr *dattr_new)
{
int i, j, n;
if (cpus_equal(doms_cur[i], doms_new[j])
&& dattrs_equal(dattr_cur, i, dattr_new, j))
goto match1;
-@@ -7736,7 +7768,7 @@ match1:
+@@ -7736,7 +7768,7 @@
/* Build new domains */
for (i = 0; i < ndoms_new; i++) {
if (cpus_equal(doms_new[i], doms_cur[j])
&& dattrs_equal(dattr_new, i, dattr_cur, j))
goto match2;
-@@ -8322,7 +8354,7 @@ void normalize_rt_tasks(void)
+@@ -8322,7 +8354,7 @@
#endif /* CONFIG_MAGIC_SYSRQ */
/*
* These functions are only useful for the IA64 MCA handling.
*
-@@ -9263,3 +9295,94 @@ struct cgroup_subsys cpuacct_subsys = {
+@@ -9263,3 +9295,94 @@
.subsys_id = cpuacct_subsys_id,
};
#endif /* CONFIG_CGROUP_CPUACCT */
+EXPORT_SYMBOL(kdb_runqueue);
+
+#endif /* CONFIG_KDB */
-diff -purN linux-2.6.27/kernel/sched_clock.c linux-2.6.27.19-5.1/kernel/sched_clock.c
---- linux-2.6.27/kernel/sched_clock.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sched_clock.c 2009-03-25 16:11:40.000000000 +0000
-@@ -124,7 +124,7 @@ static u64 __update_sched_clock(struct s
+diff -r 9608d5473017 kernel/sched_clock.c
+--- a/kernel/sched_clock.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sched_clock.c Wed May 06 16:57:01 2009 +0100
+@@ -124,7 +124,7 @@
clock = scd->tick_gtod + delta;
min_clock = wrap_max(scd->tick_gtod, scd->clock);
clock = wrap_max(clock, min_clock);
clock = wrap_min(clock, max_clock);
-@@ -227,6 +227,9 @@ EXPORT_SYMBOL_GPL(sched_clock_idle_sleep
+@@ -227,6 +227,9 @@
*/
void sched_clock_idle_wakeup_event(u64 delta_ns)
{
sched_clock_tick();
touch_softlockup_watchdog();
}
-diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fair.c
---- linux-2.6.27/kernel/sched_fair.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sched_fair.c 2009-03-25 16:11:40.000000000 +0000
-@@ -141,6 +141,49 @@ static inline struct sched_entity *paren
+diff -r 9608d5473017 kernel/sched_fair.c
+--- a/kernel/sched_fair.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sched_fair.c Wed May 06 16:57:01 2009 +0100
+@@ -141,6 +141,49 @@
return se->parent;
}
#else /* CONFIG_FAIR_GROUP_SCHED */
static inline struct rq *rq_of(struct cfs_rq *cfs_rq)
-@@ -191,6 +234,11 @@ static inline struct sched_entity *paren
+@@ -189,6 +232,11 @@
+ static inline struct sched_entity *parent_entity(struct sched_entity *se)
+ {
return NULL;
- }
-
++}
++
+static inline void
+find_matching_se(struct sched_entity **se, struct sched_entity **pse)
+{
-+}
-+
- #endif /* CONFIG_FAIR_GROUP_SCHED */
-
+ }
-@@ -334,7 +382,7 @@ int sched_nr_latency_handler(struct ctl_
+ #endif /* CONFIG_FAIR_GROUP_SCHED */
+@@ -334,7 +382,7 @@
#endif
/*
*/
static inline unsigned long
calc_delta_weight(unsigned long delta, struct sched_entity *se)
-@@ -348,15 +396,13 @@ calc_delta_weight(unsigned long delta, s
+@@ -348,15 +396,13 @@
}
/*
return delta;
}
-@@ -386,84 +432,26 @@ static u64 __sched_period(unsigned long
+@@ -386,84 +432,26 @@
* We calculate the wall-time slice from the period by taking a part
* proportional to the weight.
*
static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)
{
- return calc_delta_weight(__sched_period(cfs_rq->nr_running), se);
--}
--
--/*
-- * We calculate the vruntime slice of a to be inserted task
-- *
-- * vs = s*rw/w = p
-- */
--static u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se)
--{
- unsigned long nr_running = cfs_rq->nr_running;
-
-- if (!se->on_rq)
++ unsigned long nr_running = cfs_rq->nr_running;
++
+ if (unlikely(!se->on_rq))
- nr_running++;
-
-- return __sched_period(nr_running);
++ nr_running++;
++
+ return calc_delta_weight(__sched_period(nr_running), se);
}
/*
+ * We calculate the vruntime slice of a to be inserted task
+ *
+- * vs = s*rw/w = p
++ * vs = s/w
+ */
+-static u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se)
++static u64 sched_vslice(struct cfs_rq *cfs_rq, struct sched_entity *se)
+ {
+- unsigned long nr_running = cfs_rq->nr_running;
+-
+- if (!se->on_rq)
+- nr_running++;
+-
+- return __sched_period(nr_running);
+-}
+-
+-/*
- * The goal of calc_delta_asym() is to be asymmetrically around NICE_0_LOAD, in
- * that it favours >=0 over <0.
- *
- * 0 --------+-------
- * .'
- * 19 .'
-+ * We calculate the vruntime slice of a to be inserted task
- *
-+ * vs = s/w
- */
+- *
+- */
-static unsigned long
-calc_delta_asym(unsigned long delta, struct sched_entity *se)
-+static u64 sched_vslice(struct cfs_rq *cfs_rq, struct sched_entity *se)
- {
+-{
- struct load_weight lw = {
- .weight = NICE_0_LOAD,
- .inv_weight = 1UL << (WMULT_SHIFT-NICE_0_SHIFT)
}
/*
-@@ -683,7 +671,7 @@ place_entity(struct cfs_rq *cfs_rq, stru
+@@ -683,7 +671,7 @@
* stays open at the end.
*/
if (initial && sched_feat(START_DEBIT))
if (!initial) {
/* sleeps upto a single latency don't count. */
-@@ -1280,9 +1268,7 @@ static unsigned long wakeup_gran(struct
+@@ -1280,9 +1268,7 @@
* More easily preempt - nice tasks, while not making it harder for
* + nice tasks.
*/
gran = calc_delta_fair(sysctl_sched_wakeup_granularity, se);
return gran;
-@@ -1307,7 +1293,7 @@ wakeup_preempt_entity(struct sched_entit
+@@ -1307,7 +1293,7 @@
{
s64 gran, vdiff = curr->vruntime - se->vruntime;
return -1;
gran = wakeup_gran(curr);
-@@ -1317,17 +1303,6 @@ wakeup_preempt_entity(struct sched_entit
- return 0;
- }
+@@ -1315,17 +1301,6 @@
+ return 1;
+ return 0;
+-}
+-
-/* return depth at which a sched entity is present in the hierarchy */
-static inline int depth_se(struct sched_entity *se)
-{
- depth++;
-
- return depth;
--}
--
+ }
+
/*
- * Preempt the current task with a newly woken task if needed:
- */
-@@ -1336,7 +1311,6 @@ static void check_preempt_wakeup(struct
+@@ -1336,7 +1311,6 @@
struct task_struct *curr = rq->curr;
struct cfs_rq *cfs_rq = task_cfs_rq(curr);
struct sched_entity *se = &curr->se, *pse = &p->se;
if (unlikely(rt_prio(p->prio))) {
update_rq_clock(rq);
-@@ -1360,34 +1334,19 @@ static void check_preempt_wakeup(struct
+@@ -1360,34 +1334,19 @@
if (!sched_feat(WAKEUP_PREEMPT))
return;
- se_depth--;
- se = parent_entity(se);
- }
--
-- while (pse_depth > se_depth) {
-- pse_depth--;
-- pse = parent_entity(pse);
-- }
+ if (wakeup_preempt_entity(se, pse) == 1) {
+ resched_task(curr);
+ break;
+ }
+- while (pse_depth > se_depth) {
+- pse_depth--;
+- pse = parent_entity(pse);
+- }
+-
- while (!is_same_group(se, pse)) {
se = parent_entity(se);
pse = parent_entity(pse);
}
static struct task_struct *pick_next_task_fair(struct rq *rq)
-@@ -1451,7 +1410,7 @@ __load_balance_iterator(struct cfs_rq *c
+@@ -1451,7 +1410,7 @@
next = next->next;
} while (next != &cfs_rq->tasks && !entity_is_task(se));
return NULL;
cfs_rq->balance_iterator = next;
-diff -purN linux-2.6.27/kernel/sched_features.h linux-2.6.27.19-5.1/kernel/sched_features.h
---- linux-2.6.27/kernel/sched_features.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sched_features.h 2009-03-25 16:11:42.000000000 +0000
-@@ -5,7 +5,7 @@ SCHED_FEAT(START_DEBIT, 1)
+diff -r 9608d5473017 kernel/sched_features.h
+--- a/kernel/sched_features.h Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sched_features.h Wed May 06 16:57:01 2009 +0100
+@@ -5,7 +5,7 @@
SCHED_FEAT(AFFINE_WAKEUPS, 1)
SCHED_FEAT(CACHE_HOT_BUDDY, 1)
SCHED_FEAT(SYNC_WAKEUPS, 1)
SCHED_FEAT(DOUBLE_TICK, 0)
SCHED_FEAT(ASYM_GRAN, 1)
SCHED_FEAT(LB_BIAS, 1)
-diff -purN linux-2.6.27/kernel/sched_rt.c linux-2.6.27.19-5.1/kernel/sched_rt.c
---- linux-2.6.27/kernel/sched_rt.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sched_rt.c 2009-03-25 16:11:40.000000000 +0000
-@@ -102,12 +102,12 @@ static void dequeue_rt_entity(struct sch
+diff -r 9608d5473017 kernel/sched_rt.c
+--- a/kernel/sched_rt.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sched_rt.c Wed May 06 16:57:02 2009 +0100
+@@ -102,12 +102,12 @@
static void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
{
if (rt_rq->highest_prio < curr->prio)
resched_task(curr);
}
-diff -purN linux-2.6.27/kernel/sched_stats.h linux-2.6.27.19-5.1/kernel/sched_stats.h
---- linux-2.6.27/kernel/sched_stats.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sched_stats.h 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/sched_stats.h
+--- a/kernel/sched_stats.h Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sched_stats.h Wed May 06 16:57:02 2009 +0100
@@ -9,7 +9,7 @@
static int show_schedstat(struct seq_file *seq, void *v)
{
char *mask_str = kmalloc(mask_len, GFP_KERNEL);
if (mask_str == NULL)
-diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
---- linux-2.6.27/kernel/signal.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/signal.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/signal.c
+--- a/kernel/signal.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/signal.c Wed May 06 16:57:02 2009 +0100
@@ -27,6 +27,7 @@
#include <linux/freezer.h>
#include <linux/pid_namespace.h>
#include <asm/param.h>
#include <asm/uaccess.h>
-@@ -803,6 +804,8 @@ static int send_signal(int sig, struct s
+@@ -803,6 +804,8 @@
struct sigpending *pending;
struct sigqueue *q;
assert_spin_locked(&t->sighand->siglock);
if (!prepare_signal(sig, t))
return 0;
-@@ -1141,7 +1144,8 @@ static int kill_something_info(int sig,
+@@ -1141,7 +1144,8 @@
struct task_struct * p;
for_each_process(p) {
int err = group_send_sig_info(sig, info, p);
++count;
if (err != -EPERM)
-@@ -1936,7 +1940,7 @@ EXPORT_SYMBOL(unblock_all_signals);
+@@ -1936,7 +1940,7 @@
* System call entry points.
*/
{
struct restart_block *restart = ¤t_thread_info()->restart_block;
return restart->fn(restart);
-@@ -1989,8 +1993,8 @@ int sigprocmask(int how, sigset_t *set,
+@@ -1989,8 +1993,8 @@
return error;
}
{
int error = -EINVAL;
sigset_t old_set, new_set;
-@@ -2049,8 +2053,7 @@ out:
+@@ -2049,8 +2053,7 @@
return error;
}
{
return do_sigpending(set, sigsetsize);
}
-@@ -2121,11 +2124,9 @@ int copy_siginfo_to_user(siginfo_t __use
+@@ -2121,11 +2124,9 @@
#endif
{
int ret, sig;
sigset_t these;
-@@ -2198,8 +2199,7 @@ sys_rt_sigtimedwait(const sigset_t __use
+@@ -2198,8 +2199,7 @@
return ret;
}
{
struct siginfo info;
-@@ -2258,7 +2258,7 @@ static int do_tkill(pid_t tgid, pid_t pi
+@@ -2258,7 +2258,7 @@
* exists but it's not belonging to the target process anymore. This
* method solves the problem of threads exiting and PIDs getting reused.
*/
{
/* This is only valid for single tasks */
if (pid <= 0 || tgid <= 0)
-@@ -2270,8 +2270,7 @@ asmlinkage long sys_tgkill(pid_t tgid, p
+@@ -2270,8 +2270,7 @@
/*
* Send a signal to only one task, even if it's a CLONE_THREAD task.
*/
{
/* This is only valid for single tasks */
if (pid <= 0)
-@@ -2280,8 +2279,8 @@ sys_tkill(pid_t pid, int sig)
+@@ -2280,8 +2279,8 @@
return do_tkill(0, pid, sig);
}
{
siginfo_t info;
-@@ -2409,8 +2408,7 @@ out:
+@@ -2409,8 +2408,7 @@
#ifdef __ARCH_WANT_SYS_SIGPENDING
{
return do_sigpending(set, sizeof(*set));
}
-@@ -2421,8 +2419,8 @@ sys_sigpending(old_sigset_t __user *set)
+@@ -2421,8 +2419,8 @@
/* Some platforms have their own version with special arguments others
support only sys_rt_sigprocmask. */
{
int error;
old_sigset_t old_set, new_set;
-@@ -2472,11 +2470,10 @@ out:
+@@ -2472,11 +2470,10 @@
#endif /* __ARCH_WANT_SYS_SIGPROCMASK */
#ifdef __ARCH_WANT_SYS_RT_SIGACTION
{
struct k_sigaction new_sa, old_sa;
int ret = -EINVAL;
-@@ -2506,15 +2503,13 @@ out:
+@@ -2506,15 +2503,13 @@
/*
* For backwards compatibility. Functionality superseded by sigprocmask.
*/
{
int old;
-@@ -2534,8 +2529,7 @@ sys_ssetmask(int newmask)
+@@ -2534,8 +2529,7 @@
/*
* For backwards compatibility. Functionality superseded by sigaction.
*/
{
struct k_sigaction new_sa, old_sa;
int ret;
-@@ -2552,8 +2546,7 @@ sys_signal(int sig, __sighandler_t handl
+@@ -2552,8 +2546,7 @@
#ifdef __ARCH_WANT_SYS_PAUSE
{
current->state = TASK_INTERRUPTIBLE;
schedule();
-@@ -2563,7 +2556,7 @@ sys_pause(void)
+@@ -2563,7 +2556,7 @@
#endif
#ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND
{
sigset_t newset;
-@@ -2597,3 +2590,52 @@ void __init signals_init(void)
+@@ -2597,3 +2590,52 @@
{
sigqueue_cachep = KMEM_CACHE(sigqueue, SLAB_PANIC);
}
+ kdb_printf("Signal %d is sent to process %d.\n", sig, t->pid);
+}
+#endif /* CONFIG_KDB */
-diff -purN linux-2.6.27/kernel/smp.c linux-2.6.27.19-5.1/kernel/smp.c
---- linux-2.6.27/kernel/smp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/smp.c 2009-03-25 16:11:40.000000000 +0000
-@@ -287,7 +287,7 @@ static void quiesce_dummy(void *unused)
+diff -r 9608d5473017 kernel/smp.c
+--- a/kernel/smp.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/smp.c Wed May 06 16:57:02 2009 +0100
+@@ -287,7 +287,7 @@
* If a faster scheme can be made, we could go back to preferring stack based
* data -- the data allocation/free is non-zero cost.
*/
{
struct call_single_data data;
int cpu;
-@@ -295,7 +295,7 @@ static void smp_call_function_mask_quies
+@@ -295,7 +295,7 @@
data.func = quiesce_dummy;
data.info = NULL;
data.flags = CSD_FLAG_WAIT;
generic_exec_single(cpu, &data);
}
-@@ -323,7 +323,6 @@ int smp_call_function_mask(cpumask_t mas
+@@ -323,7 +323,6 @@
{
struct call_function_data d;
struct call_function_data *data = NULL;
unsigned long flags;
int cpu, num_cpus;
int slowpath = 0;
-@@ -332,9 +331,8 @@ int smp_call_function_mask(cpumask_t mas
+@@ -332,9 +331,8 @@
WARN_ON(irqs_disabled());
cpu = smp_processor_id();
num_cpus = cpus_weight(mask);
/*
-@@ -377,7 +375,7 @@ int smp_call_function_mask(cpumask_t mas
+@@ -377,7 +375,7 @@
if (wait) {
csd_flag_wait(&data->csd);
if (unlikely(slowpath))
}
return 0;
-diff -purN linux-2.6.27/kernel/softirq.c linux-2.6.27.19-5.1/kernel/softirq.c
---- linux-2.6.27/kernel/softirq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/softirq.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/softirq.c
+--- a/kernel/softirq.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/softirq.c Wed May 06 16:57:02 2009 +0100
@@ -21,6 +21,7 @@
#include <linux/rcupdate.h>
#include <linux/smp.h>
#include <asm/irq.h>
/*
-@@ -187,6 +188,8 @@ asmlinkage void __do_softirq(void)
+@@ -187,6 +188,8 @@
__u32 pending;
int max_restart = MAX_SOFTIRQ_RESTART;
int cpu;
pending = local_softirq_pending();
account_system_vtime(current);
-@@ -205,7 +208,9 @@ restart:
+@@ -205,7 +208,9 @@
do {
if (pending & 1) {
rcu_bh_qsctr_inc(cpu);
}
h++;
-@@ -225,6 +230,7 @@ restart:
+@@ -225,6 +230,7 @@
account_system_vtime(current);
_local_bh_enable();
}
#ifndef __ARCH_HAS_DO_SOFTIRQ
-@@ -297,6 +303,7 @@ void irq_exit(void)
+@@ -297,6 +303,7 @@
*/
inline void raise_softirq_irqoff(unsigned int nr)
{
__raise_softirq_irqoff(nr);
/*
-@@ -383,7 +390,9 @@ static void tasklet_action(struct softir
+@@ -383,7 +390,9 @@
if (!atomic_read(&t->count)) {
if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
BUG();
tasklet_unlock(t);
continue;
}
-@@ -418,7 +427,9 @@ static void tasklet_hi_action(struct sof
+@@ -418,7 +427,9 @@
if (!atomic_read(&t->count)) {
if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
BUG();
tasklet_unlock(t);
continue;
}
-diff -purN linux-2.6.27/kernel/spinlock.c linux-2.6.27.19-5.1/kernel/spinlock.c
---- linux-2.6.27/kernel/spinlock.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/spinlock.c 2009-03-25 16:11:42.000000000 +0000
-@@ -121,7 +121,11 @@ unsigned long __lockfunc _read_lock_irqs
+diff -r 9608d5473017 kernel/spinlock.c
+--- a/kernel/spinlock.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/spinlock.c Wed May 06 16:57:02 2009 +0100
+@@ -121,7 +121,11 @@
local_irq_save(flags);
preempt_disable();
rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
return flags;
}
EXPORT_SYMBOL(_read_lock_irqsave);
-@@ -151,7 +155,11 @@ unsigned long __lockfunc _write_lock_irq
+@@ -151,7 +155,11 @@
local_irq_save(flags);
preempt_disable();
rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_);
return flags;
}
EXPORT_SYMBOL(_write_lock_irqsave);
-diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
---- linux-2.6.27/kernel/sys.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sys.c 2009-03-25 16:11:41.000000000 +0000
-@@ -137,7 +137,7 @@ out:
+diff -r 9608d5473017 kernel/sys.c
+--- a/kernel/sys.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sys.c Wed May 06 16:57:02 2009 +0100
+@@ -137,7 +137,7 @@
return error;
}
{
struct task_struct *g, *p;
struct user_struct *user;
-@@ -201,7 +201,7 @@ out:
+@@ -201,7 +201,7 @@
* has been offset by 20 (ie it returns 40..1 instead of -20..19)
* to stay compatible.
*/
{
struct task_struct *g, *p;
struct user_struct *user;
-@@ -347,7 +347,8 @@ EXPORT_SYMBOL_GPL(kernel_power_off);
+@@ -347,7 +347,8 @@
*
* reboot doesn't sync: do that yourself before calling this.
*/
{
char buffer[256];
-@@ -470,7 +471,7 @@ void ctrl_alt_del(void)
+@@ -470,7 +471,7 @@
* SMP: There are not races, the GIDs are checked only by filesystem
* operations (as far as semantic preservation is concerned).
*/
{
int old_rgid = current->gid;
int old_egid = current->egid;
-@@ -519,7 +520,7 @@ asmlinkage long sys_setregid(gid_t rgid,
+@@ -519,7 +520,7 @@
*
* SMP: Same implicit races as above.
*/
{
int old_egid = current->egid;
int retval;
-@@ -589,7 +590,7 @@ static int set_user(uid_t new_ruid, int
+@@ -589,7 +590,7 @@
* 100% compatible with BSD. A program which uses just setuid() will be
* 100% compatible with POSIX with saved IDs.
*/
{
int old_ruid, old_euid, old_suid, new_ruid, new_euid;
int retval;
-@@ -651,7 +652,7 @@ asmlinkage long sys_setreuid(uid_t ruid,
+@@ -651,7 +652,7 @@
* will allow a root program to temporarily drop privileges and be able to
* regain them by swapping the real and effective uid.
*/
{
int old_euid = current->euid;
int old_ruid, old_suid, new_suid;
-@@ -690,7 +691,7 @@ asmlinkage long sys_setuid(uid_t uid)
+@@ -690,7 +691,7 @@
* This function implements a generic ability to update ruid, euid,
* and suid. This allows you to implement the 4.4 compatible seteuid().
*/
{
int old_ruid = current->uid;
int old_euid = current->euid;
-@@ -733,7 +734,7 @@ asmlinkage long sys_setresuid(uid_t ruid
+@@ -733,7 +734,7 @@
return security_task_post_setuid(old_ruid, old_euid, old_suid, LSM_SETID_RES);
}
{
int retval;
-@@ -747,7 +748,7 @@ asmlinkage long sys_getresuid(uid_t __us
+@@ -747,7 +748,7 @@
/*
* Same as above, but for rgid, egid, sgid.
*/
{
int retval;
-@@ -784,7 +785,7 @@ asmlinkage long sys_setresgid(gid_t rgid
+@@ -784,7 +785,7 @@
return 0;
}
{
int retval;
-@@ -802,7 +803,7 @@ asmlinkage long sys_getresgid(gid_t __us
+@@ -802,7 +803,7 @@
* whatever uid it wants to). It normally shadows "euid", except when
* explicitly set by setfsuid() or for access..
*/
{
int old_fsuid;
-@@ -831,7 +832,7 @@ asmlinkage long sys_setfsuid(uid_t uid)
+@@ -831,7 +832,7 @@
/*
* Samma på svenska..
*/
{
int old_fsgid;
-@@ -853,7 +854,7 @@ asmlinkage long sys_setfsgid(gid_t gid)
+@@ -853,7 +854,7 @@
return old_fsgid;
}
{
/*
* In the SMP world we might just be unlucky and have one of
-@@ -903,7 +904,7 @@ asmlinkage long sys_times(struct tms __u
+@@ -903,7 +904,7 @@
* Auch. Had to add the 'did_exec' flag to conform completely to POSIX.
* LBT 04.03.94
*/
{
struct task_struct *p;
struct task_struct *group_leader = current->group_leader;
-@@ -974,7 +975,7 @@ out:
+@@ -974,7 +975,7 @@
return err;
}
{
struct task_struct *p;
struct pid *grp;
-@@ -1004,14 +1005,14 @@ out:
+@@ -1004,14 +1005,14 @@
#ifdef __ARCH_WANT_SYS_GETPGRP
{
struct task_struct *p;
struct pid *sid;
-@@ -1039,7 +1040,7 @@ out:
+@@ -1039,7 +1040,7 @@
return retval;
}
{
struct task_struct *group_leader = current->group_leader;
struct pid *sid = task_pid(group_leader);
-@@ -1245,7 +1246,7 @@ int set_current_groups(struct group_info
+@@ -1245,7 +1246,7 @@
EXPORT_SYMBOL(set_current_groups);
{
int i = 0;
-@@ -1278,7 +1279,7 @@ out:
+@@ -1278,7 +1279,7 @@
* without another task interfering.
*/
{
struct group_info *group_info;
int retval;
-@@ -1328,7 +1329,7 @@ EXPORT_SYMBOL(in_egroup_p);
+@@ -1328,7 +1329,7 @@
DECLARE_RWSEM(uts_sem);
{
int errno = 0;
-@@ -1339,7 +1340,7 @@ asmlinkage long sys_newuname(struct new_
+@@ -1339,7 +1340,7 @@
return errno;
}
{
int errno;
char tmp[__NEW_UTS_LEN];
-@@ -1361,7 +1362,7 @@ asmlinkage long sys_sethostname(char __u
+@@ -1361,7 +1362,7 @@
#ifdef __ARCH_WANT_SYS_GETHOSTNAME
{
int i, errno;
-@@ -1384,7 +1385,7 @@ asmlinkage long sys_gethostname(char __u
+@@ -1384,7 +1385,7 @@
* Only setdomainname; getdomainname can be implemented by calling
* uname()
*/
{
int errno;
char tmp[__NEW_UTS_LEN];
-@@ -1405,7 +1406,7 @@ asmlinkage long sys_setdomainname(char _
+@@ -1405,7 +1406,7 @@
return errno;
}
{
if (resource >= RLIM_NLIMITS)
return -EINVAL;
-@@ -1424,7 +1425,8 @@ asmlinkage long sys_getrlimit(unsigned i
+@@ -1424,7 +1425,8 @@
* Back compatibility for getrlimit. Needed for some apps.
*/
{
struct rlimit x;
if (resource >= RLIM_NLIMITS)
-@@ -1442,7 +1444,7 @@ asmlinkage long sys_old_getrlimit(unsign
+@@ -1442,7 +1444,7 @@
#endif
{
struct rlimit new_rlim, *old_rlim;
unsigned long it_prof_secs;
-@@ -1618,7 +1620,7 @@ int getrusage(struct task_struct *p, int
+@@ -1618,7 +1620,7 @@
return copy_to_user(ru, &r, sizeof(r)) ? -EFAULT : 0;
}
{
if (who != RUSAGE_SELF && who != RUSAGE_CHILDREN &&
who != RUSAGE_THREAD)
-@@ -1626,14 +1628,14 @@ asmlinkage long sys_getrusage(int who, s
+@@ -1626,14 +1628,14 @@
return getrusage(current, who, ru);
}
{
long error = 0;
-@@ -1734,8 +1736,8 @@ asmlinkage long sys_prctl(int option, un
+@@ -1734,8 +1736,8 @@
return error;
}
{
int err = 0;
int cpu = raw_smp_processor_id();
-diff -purN linux-2.6.27/kernel/sys_ni.c linux-2.6.27.19-5.1/kernel/sys_ni.c
---- linux-2.6.27/kernel/sys_ni.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sys_ni.c 2009-03-25 16:11:40.000000000 +0000
-@@ -125,6 +125,7 @@ cond_syscall(sys_vm86old);
+diff -r 9608d5473017 kernel/sys_ni.c
+--- a/kernel/sys_ni.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sys_ni.c Wed May 06 16:57:02 2009 +0100
+@@ -125,6 +125,7 @@
cond_syscall(sys_vm86);
cond_syscall(compat_sys_ipc);
cond_syscall(compat_sys_sysctl);
/* arch-specific weak syscall entries */
cond_syscall(sys_pciconfig_read);
-diff -purN linux-2.6.27/kernel/sysctl.c linux-2.6.27.19-5.1/kernel/sysctl.c
---- linux-2.6.27/kernel/sysctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sysctl.c 2009-03-25 16:11:40.000000000 +0000
-@@ -179,6 +179,9 @@ extern struct ctl_table random_table[];
+diff -r 9608d5473017 kernel/sysctl.c
+--- a/kernel/sysctl.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sysctl.c Wed May 06 16:57:02 2009 +0100
+@@ -179,6 +179,9 @@
#ifdef CONFIG_INOTIFY_USER
extern struct ctl_table inotify_table[];
#endif
#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
int sysctl_legacy_va_layout;
-@@ -234,6 +237,8 @@ static int min_wakeup_granularity_ns;
+@@ -233,6 +236,8 @@
+ static int min_wakeup_granularity_ns; /* 0 usecs */
static int max_wakeup_granularity_ns = NSEC_PER_SEC; /* 1 second */
#endif
-
-+extern int affinity_load_balancing;
+
++extern int affinity_load_balancing;
+
static struct ctl_table kern_table[] = {
#ifdef CONFIG_SCHED_DEBUG
- {
-@@ -547,6 +552,16 @@ static struct ctl_table kern_table[] = {
+@@ -547,6 +552,16 @@
.mode = 0644,
.proc_handler = &proc_dointvec,
},
{
.ctl_name = KERN_RANDOM,
.procname = "random",
-@@ -658,6 +673,7 @@ static struct ctl_table kern_table[] = {
+@@ -658,6 +673,7 @@
.mode = 0644,
.proc_handler = &proc_dointvec,
},
{
.procname = "nmi_watchdog",
.data = &nmi_watchdog_enabled,
-@@ -666,6 +682,7 @@ static struct ctl_table kern_table[] = {
+@@ -666,11 +682,20 @@
.proc_handler = &proc_nmi_enabled,
},
#endif
#if defined(CONFIG_X86)
{
.ctl_name = KERN_PANIC_ON_NMI,
-@@ -676,6 +693,14 @@ static struct ctl_table kern_table[] = {
- .proc_handler = &proc_dointvec,
- },
- {
-+ .ctl_name = KERN_PANIC_ON_IO_NMI,
-+ .procname = "panic_on_io_nmi",
-+ .data = &panic_on_io_nmi,
+ .procname = "panic_on_unrecovered_nmi",
+ .data = &panic_on_unrecovered_nmi,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
- .ctl_name = KERN_BOOTLOADER_TYPE,
- .procname = "bootloader_type",
- .data = &bootloader_type,
-@@ -710,6 +735,14 @@ static struct ctl_table kern_table[] = {
++ .ctl_name = KERN_PANIC_ON_IO_NMI,
++ .procname = "panic_on_io_nmi",
++ .data = &panic_on_io_nmi,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+@@ -710,6 +735,14 @@
.proc_handler = &proc_dointvec,
},
#endif
#if defined(CONFIG_S390) && defined(CONFIG_SMP)
{
.ctl_name = KERN_SPIN_RETRY,
-@@ -720,7 +753,7 @@ static struct ctl_table kern_table[] = {
+@@ -720,7 +753,7 @@
.proc_handler = &proc_dointvec,
},
#endif
{
.procname = "acpi_video_flags",
.data = &acpi_realmode_flags,
-@@ -851,6 +884,16 @@ static struct ctl_table kern_table[] = {
+@@ -851,6 +884,16 @@
* NOTE: do not add new entries to this table unless you have read
* Documentation/sysctl/ctl_unnumbered.txt
*/
{ .ctl_name = 0 }
};
-@@ -1176,6 +1219,14 @@ static struct ctl_table vm_table[] = {
+@@ -1176,6 +1219,14 @@
.extra2 = &one,
},
#endif
/*
* NOTE: do not add new entries to this table unless you have read
* Documentation/sysctl/ctl_unnumbered.txt
-@@ -1313,6 +1364,13 @@ static struct ctl_table fs_table[] = {
+@@ -1313,6 +1364,13 @@
.child = inotify_table,
},
#endif
#endif
{
.ctl_name = KERN_SETUID_DUMPABLE,
-@@ -1506,6 +1564,33 @@ void register_sysctl_root(struct ctl_tab
+@@ -1506,6 +1564,33 @@
spin_unlock(&sysctl_lock);
}
#ifdef CONFIG_SYSCTL_SYSCALL
/* Perform the actual read/write of a sysctl table entry. */
static int do_sysctl_strategy(struct ctl_table_root *root,
-@@ -1604,7 +1689,7 @@ int do_sysctl(int __user *name, int nlen
+@@ -1604,7 +1689,7 @@
return error;
}
{
struct __sysctl_args tmp;
int error;
-@@ -2915,7 +3000,7 @@ int sysctl_ms_jiffies(struct ctl_table *
+@@ -2915,7 +3000,7 @@
#else /* CONFIG_SYSCTL_SYSCALL */
{
struct __sysctl_args tmp;
int error;
-diff -purN linux-2.6.27/kernel/sysctl_check.c linux-2.6.27.19-5.1/kernel/sysctl_check.c
---- linux-2.6.27/kernel/sysctl_check.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sysctl_check.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/sysctl_check.c
+--- a/kernel/sysctl_check.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sysctl_check.c Wed May 06 16:57:02 2009 +0100
@@ -4,6 +4,7 @@
#include <linux/sunrpc/debug.h>
#include <linux/string.h>
struct trans_ctl_table {
int ctl_name;
-@@ -104,6 +105,10 @@ static const struct trans_ctl_table tran
+@@ -104,6 +105,10 @@
{ KERN_MAX_LOCK_DEPTH, "max_lock_depth" },
{ KERN_NMI_WATCHDOG, "nmi_watchdog" },
{ KERN_PANIC_ON_NMI, "panic_on_unrecovered_nmi" },
{}
};
-@@ -893,6 +898,14 @@ static const struct trans_ctl_table tran
+@@ -893,6 +898,14 @@
{}
};
static const struct trans_ctl_table trans_arlan_conf_table0[] = {
{ 1, "spreadingCode" },
{ 2, "channelNumber" },
-@@ -1228,6 +1241,9 @@ static const struct trans_ctl_table tran
+@@ -1228,6 +1241,9 @@
{ CTL_BUS, "bus", trans_bus_table },
{ CTL_ABI, "abi" },
/* CTL_CPU not used */
{ CTL_ARLAN, "arlan", trans_arlan_table },
{ CTL_S390DBF, "s390dbf", trans_s390dbf_table },
{ CTL_SUNRPC, "sunrpc", trans_sunrpc_table },
-diff -purN linux-2.6.27/kernel/taskstats.c linux-2.6.27.19-5.1/kernel/taskstats.c
---- linux-2.6.27/kernel/taskstats.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/taskstats.c 2009-03-25 16:11:42.000000000 +0000
-@@ -433,6 +433,12 @@ static int taskstats_user_cmd(struct sk_
+diff -r 9608d5473017 kernel/taskstats.c
+--- a/kernel/taskstats.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/taskstats.c Wed May 06 16:57:02 2009 +0100
+@@ -433,6 +433,12 @@
struct taskstats *stats;
size_t size;
cpumask_t mask;
rc = parse(info->attrs[TASKSTATS_CMD_ATTR_REGISTER_CPUMASK], &mask);
if (rc < 0)
-@@ -463,7 +469,7 @@ static int taskstats_user_cmd(struct sk_
+@@ -463,7 +469,7 @@
if (!stats)
goto err;
if (rc < 0)
goto err;
} else if (info->attrs[TASKSTATS_CMD_ATTR_TGID]) {
-@@ -472,12 +478,15 @@ static int taskstats_user_cmd(struct sk_
+@@ -472,12 +478,15 @@
if (!stats)
goto err;
return send_reply(rep_skb, info->snd_pid);
err:
nlmsg_free(rep_skb);
-diff -purN linux-2.6.27/kernel/time/timekeeping.c linux-2.6.27.19-5.1/kernel/time/timekeeping.c
---- linux-2.6.27/kernel/time/timekeeping.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/time/timekeeping.c 2009-03-25 16:11:40.000000000 +0000
-@@ -46,6 +46,9 @@ struct timespec xtime __attribute__ ((al
+diff -r 9608d5473017 kernel/time.c
+--- a/kernel/time.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/time.c Wed May 06 16:57:02 2009 +0100
+@@ -59,7 +59,7 @@
+ * why not move it into the appropriate arch directory (for those
+ * architectures that need it).
+ */
+-asmlinkage long sys_time(time_t __user * tloc)
++SYSCALL_DEFINE1(time, time_t __user *, tloc)
+ {
+ time_t i = get_seconds();
+
+@@ -77,7 +77,7 @@
+ * architectures that need it).
+ */
+
+-asmlinkage long sys_stime(time_t __user *tptr)
++SYSCALL_DEFINE1(stime, time_t __user *, tptr)
+ {
+ struct timespec tv;
+ int err;
+@@ -97,8 +97,8 @@
+
+ #endif /* __ARCH_WANT_SYS_TIME */
+
+-asmlinkage long sys_gettimeofday(struct timeval __user *tv,
+- struct timezone __user *tz)
++SYSCALL_DEFINE2(gettimeofday, struct timeval __user *, tv,
++ struct timezone __user *, tz)
+ {
+ if (likely(tv != NULL)) {
+ struct timeval ktv;
+@@ -182,8 +182,8 @@
+ return 0;
+ }
+
+-asmlinkage long sys_settimeofday(struct timeval __user *tv,
+- struct timezone __user *tz)
++SYSCALL_DEFINE2(settimeofday, struct timeval __user *, tv,
++ struct timezone __user *, tz)
+ {
+ struct timeval user_tv;
+ struct timespec new_ts;
+@@ -203,7 +203,7 @@
+ return do_sys_settimeofday(tv ? &new_ts : NULL, tz ? &new_tz : NULL);
+ }
+
+-asmlinkage long sys_adjtimex(struct timex __user *txc_p)
++SYSCALL_DEFINE1(adjtimex, struct timex __user *, txc_p)
+ {
+ struct timex txc; /* Local copy of parameter */
+ int ret;
+diff -r 9608d5473017 kernel/time/timekeeping.c
+--- a/kernel/time/timekeeping.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/time/timekeeping.c Wed May 06 16:57:02 2009 +0100
+@@ -46,6 +46,9 @@
struct timespec wall_to_monotonic __attribute__ ((aligned (16)));
static unsigned long total_sleep_time; /* seconds */
static struct timespec xtime_cache __attribute__ ((aligned (16)));
void update_xtime_cache(u64 nsec)
{
-@@ -58,27 +61,23 @@ struct clocksource *clock;
+@@ -58,27 +61,23 @@
#ifdef CONFIG_GENERIC_TIME
/**
- /* read clocksource: */
cycle_now = clocksource_read(clock);
--
-- /* calculate the delta since the last update_wall_time: */
- cycle_delta = (cycle_now - clock->cycle_last) & clock->mask;
++ cycle_delta = (cycle_now - clock->cycle_last) & clock->mask;
+ clock->cycle_last = cycle_now;
+- /* calculate the delta since the last update_wall_time: */
+- cycle_delta = (cycle_now - clock->cycle_last) & clock->mask;
+-
- /* convert to nanoseconds: */
- ns_offset = cyc2ns(clock, cycle_delta);
-
}
/**
-@@ -89,14 +88,25 @@ static inline s64 __get_nsec_offset(void
+@@ -89,14 +88,25 @@
*/
void getnstimeofday(struct timespec *ts)
{
+ cycle_t cycle_now, cycle_delta;
unsigned long seq;
s64 nsecs;
-
-+ WARN_ON(timekeeping_suspended);
+
++ WARN_ON(timekeeping_suspended);
+
do {
seq = read_seqbegin(&xtime_lock);
} while (read_seqretry(&xtime_lock, seq));
-@@ -129,22 +139,22 @@ EXPORT_SYMBOL(do_gettimeofday);
+@@ -129,22 +139,22 @@
*/
int do_settimeofday(struct timespec *tv)
{
+ ts_delta.tv_sec = tv->tv_sec - xtime.tv_sec;
+ ts_delta.tv_nsec = tv->tv_nsec - xtime.tv_nsec;
+ wall_to_monotonic = timespec_sub(wall_to_monotonic, ts_delta);
-+
-+ xtime = *tv;
- set_normalized_timespec(&xtime, sec, nsec);
- set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
++ xtime = *tv;
++
update_xtime_cache(0);
clock->error = 0;
-@@ -170,22 +180,17 @@ EXPORT_SYMBOL(do_settimeofday);
+@@ -170,22 +180,17 @@
static void change_clocksource(void)
{
struct clocksource *new;
clock->error = 0;
clock->xtime_nsec = 0;
clocksource_calculate_interval(clock, NTP_INTERVAL_LENGTH);
-@@ -200,8 +205,8 @@ static void change_clocksource(void)
+@@ -200,8 +205,8 @@
*/
}
#else
#endif
/**
-@@ -261,12 +266,8 @@ void __init timekeeping_init(void)
+@@ -261,12 +266,8 @@
write_sequnlock_irqrestore(&xtime_lock, flags);
}
/**
* timekeeping_resume - Resumes the generic timekeeping subsystem.
-@@ -292,8 +293,6 @@ static int timekeeping_resume(struct sys
+@@ -292,8 +293,6 @@
wall_to_monotonic.tv_sec -= sleep_length;
total_sleep_time += sleep_length;
}
update_xtime_cache(0);
/* re-base the last cycle value */
clock->cycle_last = 0;
-@@ -319,8 +318,7 @@ static int timekeeping_suspend(struct sy
+@@ -319,8 +318,7 @@
timekeeping_suspend_time = read_persistent_clock();
write_seqlock_irqsave(&xtime_lock, flags);
timekeeping_suspended = 1;
write_sequnlock_irqrestore(&xtime_lock, flags);
-@@ -461,10 +459,10 @@ void update_wall_time(void)
+@@ -461,10 +459,10 @@
*/
while (offset >= clock->cycle_interval) {
/* accumulate one interval */
-- clock->xtime_nsec += clock->xtime_interval;
-- clock->cycle_last += clock->cycle_interval;
- offset -= clock->cycle_interval;
++ offset -= clock->cycle_interval;
+ clock->cycle_last += clock->cycle_interval;
-
-+ clock->xtime_nsec += clock->xtime_interval;
++
+ clock->xtime_nsec += clock->xtime_interval;
+- clock->cycle_last += clock->cycle_interval;
+- offset -= clock->cycle_interval;
+-
if (clock->xtime_nsec >= (u64)NSEC_PER_SEC << clock->shift) {
clock->xtime_nsec -= (u64)NSEC_PER_SEC << clock->shift;
xtime.tv_sec++;
-diff -purN linux-2.6.27/kernel/time.c linux-2.6.27.19-5.1/kernel/time.c
---- linux-2.6.27/kernel/time.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/time.c 2009-03-25 16:11:42.000000000 +0000
-@@ -59,7 +59,7 @@ EXPORT_SYMBOL(sys_tz);
- * why not move it into the appropriate arch directory (for those
- * architectures that need it).
- */
--asmlinkage long sys_time(time_t __user * tloc)
-+SYSCALL_DEFINE1(time, time_t __user *, tloc)
- {
- time_t i = get_seconds();
-
-@@ -77,7 +77,7 @@ asmlinkage long sys_time(time_t __user *
- * architectures that need it).
- */
-
--asmlinkage long sys_stime(time_t __user *tptr)
-+SYSCALL_DEFINE1(stime, time_t __user *, tptr)
- {
- struct timespec tv;
- int err;
-@@ -97,8 +97,8 @@ asmlinkage long sys_stime(time_t __user
-
- #endif /* __ARCH_WANT_SYS_TIME */
-
--asmlinkage long sys_gettimeofday(struct timeval __user *tv,
-- struct timezone __user *tz)
-+SYSCALL_DEFINE2(gettimeofday, struct timeval __user *, tv,
-+ struct timezone __user *, tz)
- {
- if (likely(tv != NULL)) {
- struct timeval ktv;
-@@ -182,8 +182,8 @@ int do_sys_settimeofday(struct timespec
- return 0;
- }
-
--asmlinkage long sys_settimeofday(struct timeval __user *tv,
-- struct timezone __user *tz)
-+SYSCALL_DEFINE2(settimeofday, struct timeval __user *, tv,
-+ struct timezone __user *, tz)
- {
- struct timeval user_tv;
- struct timespec new_ts;
-@@ -203,7 +203,7 @@ asmlinkage long sys_settimeofday(struct
- return do_sys_settimeofday(tv ? &new_ts : NULL, tz ? &new_tz : NULL);
- }
-
--asmlinkage long sys_adjtimex(struct timex __user *txc_p)
-+SYSCALL_DEFINE1(adjtimex, struct timex __user *, txc_p)
- {
- struct timex txc; /* Local copy of parameter */
- int ret;
-diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
---- linux-2.6.27/kernel/timer.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/timer.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/timer.c
+--- a/kernel/timer.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/timer.c Wed May 06 16:57:02 2009 +0100
@@ -37,12 +37,14 @@
#include <linux/delay.h>
#include <linux/tick.h>
u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;
-@@ -112,27 +114,8 @@ timer_set_base(struct timer_list *timer,
+@@ -112,6 +114,44 @@
tbase_get_deferrable(timer->base));
}
--/**
-- * __round_jiffies - function to round jiffies to a full second
-- * @j: the time in (absolute) jiffies that should be rounded
-- * @cpu: the processor number on which the timeout will happen
-- *
-- * __round_jiffies() rounds an absolute time in the future (in jiffies)
-- * up or down to (approximately) full seconds. This is useful for timers
-- * for which the exact time they fire does not matter too much, as long as
-- * they fire approximately every X seconds.
-- *
-- * By rounding these timers to whole seconds, all such timers will fire
-- * at the same time, rather than at various times spread out. The goal
-- * of this is to have the CPU wake up less, which saves power.
-- *
-- * The exact rounding is skewed for each processor to avoid all
-- * processors firing at the exact same time, which could lead
-- * to lock contention or spurious cache line bouncing.
-- *
-- * The return value is the rounded version of the @j parameter.
-- */
--unsigned long __round_jiffies(unsigned long j, int cpu)
+static unsigned long round_jiffies_common(unsigned long j, int cpu,
+ bool force_up)
- {
- int rem;
- unsigned long original = j;
-@@ -154,8 +137,9 @@ unsigned long __round_jiffies(unsigned l
- * due to delays of the timer irq, long irq off times etc etc) then
- * we should round down to the whole second, not up. Use 1/4th second
- * as cutoff for this rounding as an extreme upper bound for this.
++{
++ int rem;
++ unsigned long original = j;
++
++ /*
++ * We don't want all cpus firing their timers at once hitting the
++ * same lock or cachelines, so we skew each extra cpu with an extra
++ * 3 jiffies. This 3 jiffies came originally from the mm/ code which
++ * already did this.
++ * The skew is done by adding 3*cpunr, then round, then subtract this
++ * extra offset again.
++ */
++ j += cpu * 3;
++
++ rem = j % HZ;
++
++ /*
++ * If the target jiffie is just after a whole second (which can happen
++ * due to delays of the timer irq, long irq off times etc etc) then
++ * we should round down to the whole second, not up. Use 1/4th second
++ * as cutoff for this rounding as an extreme upper bound for this.
+ * But never round down if @force_up is set.
- */
-- if (rem < HZ/4) /* round down */
++ */
+ if (rem < HZ/4 && !force_up) /* round down */
- j = j - rem;
- else /* round up */
- j = j - rem + HZ;
-@@ -167,6 +151,31 @@ unsigned long __round_jiffies(unsigned l
- return original;
- return j;
- }
++ j = j - rem;
++ else /* round up */
++ j = j - rem + HZ;
+
-+/**
-+ * __round_jiffies - function to round jiffies to a full second
-+ * @j: the time in (absolute) jiffies that should be rounded
-+ * @cpu: the processor number on which the timeout will happen
-+ *
-+ * __round_jiffies() rounds an absolute time in the future (in jiffies)
-+ * up or down to (approximately) full seconds. This is useful for timers
-+ * for which the exact time they fire does not matter too much, as long as
-+ * they fire approximately every X seconds.
-+ *
-+ * By rounding these timers to whole seconds, all such timers will fire
-+ * at the same time, rather than at various times spread out. The goal
-+ * of this is to have the CPU wake up less, which saves power.
-+ *
-+ * The exact rounding is skewed for each processor to avoid all
-+ * processors firing at the exact same time, which could lead
-+ * to lock contention or spurious cache line bouncing.
-+ *
-+ * The return value is the rounded version of the @j parameter.
-+ */
-+unsigned long __round_jiffies(unsigned long j, int cpu)
-+{
-+ return round_jiffies_common(j, cpu, false);
++ /* now that we have rounded, subtract the extra skew again */
++ j -= cpu * 3;
++
++ if (j <= jiffies) /* rounding ate our timeout entirely; */
++ return original;
++ return j;
+}
++
+ /**
+ * __round_jiffies - function to round jiffies to a full second
+ * @j: the time in (absolute) jiffies that should be rounded
+@@ -134,38 +174,7 @@
+ */
+ unsigned long __round_jiffies(unsigned long j, int cpu)
+ {
+- int rem;
+- unsigned long original = j;
+-
+- /*
+- * We don't want all cpus firing their timers at once hitting the
+- * same lock or cachelines, so we skew each extra cpu with an extra
+- * 3 jiffies. This 3 jiffies came originally from the mm/ code which
+- * already did this.
+- * The skew is done by adding 3*cpunr, then round, then subtract this
+- * extra offset again.
+- */
+- j += cpu * 3;
+-
+- rem = j % HZ;
+-
+- /*
+- * If the target jiffie is just after a whole second (which can happen
+- * due to delays of the timer irq, long irq off times etc etc) then
+- * we should round down to the whole second, not up. Use 1/4th second
+- * as cutoff for this rounding as an extreme upper bound for this.
+- */
+- if (rem < HZ/4) /* round down */
+- j = j - rem;
+- else /* round up */
+- j = j - rem + HZ;
+-
+- /* now that we have rounded, subtract the extra skew again */
+- j -= cpu * 3;
+-
+- if (j <= jiffies) /* rounding ate our timeout entirely; */
+- return original;
+- return j;
++ return round_jiffies_common(j, cpu, false);
+ }
EXPORT_SYMBOL_GPL(__round_jiffies);
- /**
-@@ -191,13 +200,10 @@ EXPORT_SYMBOL_GPL(__round_jiffies);
+@@ -191,13 +200,10 @@
*/
unsigned long __round_jiffies_relative(unsigned long j, int cpu)
{
}
EXPORT_SYMBOL_GPL(__round_jiffies_relative);
-@@ -218,7 +224,7 @@ EXPORT_SYMBOL_GPL(__round_jiffies_relati
+@@ -218,7 +224,7 @@
*/
unsigned long round_jiffies(unsigned long j)
{
}
EXPORT_SYMBOL_GPL(round_jiffies);
-@@ -243,6 +249,71 @@ unsigned long round_jiffies_relative(uns
+@@ -242,6 +248,71 @@
+ return __round_jiffies_relative(j, raw_smp_processor_id());
}
EXPORT_SYMBOL_GPL(round_jiffies_relative);
-
++
+/**
+ * __round_jiffies_up - function to round jiffies up to a full second
+ * @j: the time in (absolute) jiffies that should be rounded
+ return __round_jiffies_up_relative(j, raw_smp_processor_id());
+}
+EXPORT_SYMBOL_GPL(round_jiffies_up_relative);
-+
+
static inline void set_running_timer(struct tvec_base *base,
- struct timer_list *timer)
-@@ -288,6 +359,7 @@ static void internal_add_timer(struct tv
+@@ -288,6 +359,7 @@
i = (expires >> (TVR_BITS + 3 * TVN_BITS)) & TVN_MASK;
vec = base->tv5.vec + i;
}
/*
* Timers are FIFO:
*/
-@@ -812,7 +884,7 @@ static inline void __run_timers(struct t
+@@ -812,7 +884,7 @@
spin_unlock_irq(&base->lock);
}
/*
* Find out when the next timer event is due to happen. This
* is used on S/390 to stop all activity when a cpus is idle.
-@@ -1066,6 +1138,7 @@ void do_timer(unsigned long ticks)
+@@ -1066,6 +1138,7 @@
{
jiffies_64 += ticks;
update_times(ticks);
}
#ifdef __ARCH_WANT_SYS_ALARM
-@@ -1074,7 +1147,7 @@ void do_timer(unsigned long ticks)
+@@ -1074,7 +1147,7 @@
* For backwards compatibility? This can be done in libc so Alpha
* and all newer ports shouldn't need it.
*/
{
return alarm_setitimer(seconds);
}
-@@ -1097,7 +1170,7 @@ asmlinkage unsigned long sys_alarm(unsig
+@@ -1097,7 +1170,7 @@
*
* This is SMP safe as current->tgid does not change.
*/
{
return task_tgid_vnr(current);
}
-@@ -1108,7 +1181,7 @@ asmlinkage long sys_getpid(void)
+@@ -1108,7 +1181,7 @@
* value of ->real_parent under rcu_read_lock(), see
* release_task()->call_rcu(delayed_put_task_struct).
*/
{
int pid;
-@@ -1119,25 +1192,25 @@ asmlinkage long sys_getppid(void)
+@@ -1119,25 +1192,25 @@
return pid;
}
{
/* Only we change this so SMP safe */
return current->egid;
-@@ -1147,7 +1220,9 @@ asmlinkage long sys_getegid(void)
+@@ -1147,7 +1220,9 @@
static void process_timeout(unsigned long __data)
{
}
/**
-@@ -1253,7 +1328,7 @@ signed long __sched schedule_timeout_uni
+@@ -1253,7 +1328,7 @@
EXPORT_SYMBOL(schedule_timeout_uninterruptible);
/* Thread ID - the internal kernel "pid" */
{
return task_pid_vnr(current);
}
-@@ -1345,7 +1420,7 @@ out:
+@@ -1345,7 +1420,7 @@
return 0;
}
{
struct sysinfo val;
-diff -purN linux-2.6.27/kernel/trace/Kconfig linux-2.6.27.19-5.1/kernel/trace/Kconfig
---- linux-2.6.27/kernel/trace/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/trace/Kconfig 2009-03-25 16:11:40.000000000 +0000
-@@ -18,7 +18,6 @@ config TRACING
+diff -r 9608d5473017 kernel/trace/Kconfig
+--- a/kernel/trace/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/kernel/trace/Kconfig Wed May 06 16:57:02 2009 +0100
+@@ -18,7 +18,6 @@
config FTRACE
bool "Kernel Function Tracer"
depends on HAVE_FTRACE
select TRACING
select CONTEXT_SWITCH_TRACER
help
-@@ -79,6 +78,7 @@ config SYSPROF_TRACER
+@@ -79,6 +78,7 @@
bool "Sysprof Tracer"
depends on X86
select TRACING
help
This tracer provides the trace needed by the 'Sysprof' userspace
tool.
-@@ -103,7 +103,8 @@ config CONTEXT_SWITCH_TRACER
+@@ -103,7 +103,8 @@
all switching of tasks.
config DYNAMIC_FTRACE
depends on FTRACE
depends on HAVE_DYNAMIC_FTRACE
default y
-diff -purN linux-2.6.27/kernel/trace/trace_sched_switch.c linux-2.6.27.19-5.1/kernel/trace/trace_sched_switch.c
---- linux-2.6.27/kernel/trace/trace_sched_switch.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/trace/trace_sched_switch.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/trace/trace_sched_switch.c
+--- a/kernel/trace/trace_sched_switch.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/trace/trace_sched_switch.c Wed May 06 16:57:02 2009 +0100
@@ -9,8 +9,8 @@
#include <linux/debugfs.h>
#include <linux/kallsyms.h>
#include "trace.h"
-@@ -19,16 +19,17 @@ static int __read_mostly tracer_enabled;
+@@ -19,15 +19,16 @@
static atomic_t sched_ref;
static void
unsigned long flags;
long disabled;
int cpu;
-
++
+ if (!atomic_read(&sched_ref))
+ return;
-+
+
tracing_record_cmdline(prev);
tracing_record_cmdline(next);
-
-@@ -37,95 +38,42 @@ sched_switch_func(void *private, void *_
+@@ -37,93 +38,40 @@
local_irq_save(flags);
cpu = raw_smp_processor_id();
-static notrace void
-sched_switch_callback(void *probe_data, void *call_data,
- const char *format, va_list *args)
--{
++static void
++probe_sched_wakeup(struct rq *__rq, struct task_struct *wakee)
+ {
- struct task_struct *prev;
- struct task_struct *next;
- struct rq *__rq;
- sched_switch_func(probe_data, __rq, prev, next);
-}
-
- static void
+-static void
-wakeup_func(void *private, void *__rq, struct task_struct *wakee, struct
- task_struct *curr)
-+probe_sched_wakeup(struct rq *__rq, struct task_struct *wakee)
- {
+-{
- struct trace_array **ptr = private;
- struct trace_array *tr = *ptr;
struct trace_array_cpu *data;
atomic_dec(&data->disabled);
local_irq_restore(flags);
- }
-
+-}
+-
-static notrace void
-wake_up_callback(void *probe_data, void *call_data,
- const char *format, va_list *args)
- tracing_record_cmdline(curr);
-
- wakeup_func(probe_data, __rq, task, curr);
--}
--
+ }
+
static void sched_switch_reset(struct trace_array *tr)
- {
- int cpu;
-@@ -140,60 +88,40 @@ static int tracing_sched_register(void)
+@@ -140,60 +88,40 @@
{
int ret;
}
static void tracing_start_sched_switch(void)
-diff -purN linux-2.6.27/kernel/trace/trace_sched_wakeup.c linux-2.6.27.19-5.1/kernel/trace/trace_sched_wakeup.c
---- linux-2.6.27/kernel/trace/trace_sched_wakeup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/trace/trace_sched_wakeup.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/trace/trace_sched_wakeup.c
+--- a/kernel/trace/trace_sched_wakeup.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/trace/trace_sched_wakeup.c Wed May 06 16:57:02 2009 +0100
@@ -15,7 +15,7 @@
#include <linux/kallsyms.h>
#include <linux/uaccess.h>
#include "trace.h"
-@@ -112,18 +112,18 @@ static int report_latency(cycle_t delta)
+@@ -112,17 +112,17 @@
}
static void notrace
unsigned long flags;
long disabled;
int cpu;
-
-+ tracing_record_cmdline(prev);
+
++ tracing_record_cmdline(prev);
+
if (unlikely(!tracer_enabled))
return;
-
-@@ -140,11 +140,11 @@ wakeup_sched_switch(void *private, void
+@@ -140,11 +140,11 @@
return;
/* The task we are waiting for is waking up */
if (likely(disabled != 1))
goto out;
-@@ -155,7 +155,7 @@ wakeup_sched_switch(void *private, void
+@@ -155,7 +155,7 @@
if (unlikely(!tracer_enabled || next != wakeup_task))
goto out_unlock;
/*
* usecs conversion is slow so we try to delay the conversion
-@@ -174,39 +174,14 @@ wakeup_sched_switch(void *private, void
+@@ -174,39 +174,14 @@
t0 = nsecs_to_usecs(T0);
t1 = nsecs_to_usecs(T1);
}
static void __wakeup_reset(struct trace_array *tr)
-@@ -240,19 +215,24 @@ static void wakeup_reset(struct trace_ar
+@@ -240,19 +215,24 @@
}
static void
if (unlikely(disabled != 1))
goto out;
-@@ -264,7 +244,7 @@ wakeup_check_start(struct trace_array *t
+@@ -264,7 +244,7 @@
goto out_locked;
/* reset the trace */
wakeup_cpu = task_cpu(p);
wakeup_prio = p->prio;
-@@ -274,74 +254,37 @@ wakeup_check_start(struct trace_array *t
+@@ -274,74 +254,37 @@
local_save_flags(flags);
" probe to kernel_sched_schedule\n");
goto fail_deprobe_wake_new;
}
-@@ -363,28 +306,18 @@ static void start_wakeup_tracer(struct t
+@@ -363,28 +306,18 @@
return;
fail_deprobe_wake_new:
}
static void wakeup_tracer_init(struct trace_array *tr)
-diff -purN linux-2.6.27/kernel/tracepoint.c linux-2.6.27.19-5.1/kernel/tracepoint.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/tracepoint.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/tracepoint.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kernel/tracepoint.c Wed May 06 16:57:02 2009 +0100
@@ -0,0 +1,476 @@
+/*
+ * Copyright (C) 2008 Mathieu Desnoyers
+ iter->tracepoint = NULL;
+}
+EXPORT_SYMBOL_GPL(tracepoint_iter_reset);
-diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
---- linux-2.6.27/kernel/uid16.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/uid16.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 kernel/uid16.c
+--- a/kernel/uid16.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/uid16.c Wed May 06 16:57:02 2009 +0100
@@ -17,7 +17,7 @@
#include <asm/uaccess.h>
{
long ret = sys_chown(filename, low2highuid(user), low2highgid(group));
/* avoid REGPARM breakage on x86: */
-@@ -25,7 +25,7 @@ asmlinkage long sys_chown16(const char _
+@@ -25,7 +25,7 @@
return ret;
}
{
long ret = sys_lchown(filename, low2highuid(user), low2highgid(group));
/* avoid REGPARM breakage on x86: */
-@@ -33,7 +33,7 @@ asmlinkage long sys_lchown16(const char
+@@ -33,7 +33,7 @@
return ret;
}
{
long ret = sys_fchown(fd, low2highuid(user), low2highgid(group));
/* avoid REGPARM breakage on x86: */
-@@ -41,7 +41,7 @@ asmlinkage long sys_fchown16(unsigned in
+@@ -41,7 +41,7 @@
return ret;
}
{
long ret = sys_setregid(low2highgid(rgid), low2highgid(egid));
/* avoid REGPARM breakage on x86: */
-@@ -49,7 +49,7 @@ asmlinkage long sys_setregid16(old_gid_t
+@@ -49,7 +49,7 @@
return ret;
}
{
long ret = sys_setgid(low2highgid(gid));
/* avoid REGPARM breakage on x86: */
-@@ -57,7 +57,7 @@ asmlinkage long sys_setgid16(old_gid_t g
+@@ -57,7 +57,7 @@
return ret;
}
{
long ret = sys_setreuid(low2highuid(ruid), low2highuid(euid));
/* avoid REGPARM breakage on x86: */
-@@ -65,7 +65,7 @@ asmlinkage long sys_setreuid16(old_uid_t
+@@ -65,7 +65,7 @@
return ret;
}
{
long ret = sys_setuid(low2highuid(uid));
/* avoid REGPARM breakage on x86: */
-@@ -73,7 +73,7 @@ asmlinkage long sys_setuid16(old_uid_t u
+@@ -73,7 +73,7 @@
return ret;
}
{
long ret = sys_setresuid(low2highuid(ruid), low2highuid(euid),
low2highuid(suid));
-@@ -82,7 +82,7 @@ asmlinkage long sys_setresuid16(old_uid_
+@@ -82,7 +82,7 @@
return ret;
}
{
int retval;
-@@ -93,7 +93,7 @@ asmlinkage long sys_getresuid16(old_uid_
+@@ -93,7 +93,7 @@
return retval;
}
{
long ret = sys_setresgid(low2highgid(rgid), low2highgid(egid),
low2highgid(sgid));
-@@ -102,7 +102,8 @@ asmlinkage long sys_setresgid16(old_gid_
+@@ -102,7 +102,8 @@
return ret;
}
{
int retval;
-@@ -113,7 +114,7 @@ asmlinkage long sys_getresgid16(old_gid_
+@@ -113,7 +114,7 @@
return retval;
}
{
long ret = sys_setfsuid(low2highuid(uid));
/* avoid REGPARM breakage on x86: */
-@@ -121,7 +122,7 @@ asmlinkage long sys_setfsuid16(old_uid_t
+@@ -121,7 +122,7 @@
return ret;
}
{
long ret = sys_setfsgid(low2highgid(gid));
/* avoid REGPARM breakage on x86: */
-@@ -159,7 +160,7 @@ static int groups16_from_user(struct gro
+@@ -159,7 +160,7 @@
return 0;
}
{
int i = 0;
-@@ -183,7 +184,7 @@ out:
+@@ -183,7 +184,7 @@
return i;
}
{
struct group_info *group_info;
int retval;
-@@ -208,22 +209,22 @@ asmlinkage long sys_setgroups16(int gids
+@@ -208,22 +209,22 @@
return retval;
}
{
return high2lowgid(current->egid);
}
-diff -purN linux-2.6.27/kernel/unwind.c linux-2.6.27.19-5.1/kernel/unwind.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/unwind.c 2009-03-25 16:11:41.000000000 +0000
+diff -r 9608d5473017 kernel/unwind.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kernel/unwind.c Wed May 06 16:57:02 2009 +0100
@@ -0,0 +1,1303 @@
+/*
+ * Copyright (C) 2002-2006 Novell, Inc.
+ return 0;
+}
+EXPORT_SYMBOL_GPL(unwind_to_user);
-diff -purN linux-2.6.27/kernel/utrace.c linux-2.6.27.19-5.1/kernel/utrace.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/utrace.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 kernel/utrace.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/kernel/utrace.c Wed May 06 16:57:02 2009 +0100
@@ -0,0 +1,2495 @@
+/*
+ * utrace infrastructure interface for debugging user processes
+ utrace->report ? " (report)" : "",
+ utrace->interrupt ? " (interrupt)" : "");
+}
-diff -purN linux-2.6.27/kernel/wait.c linux-2.6.27.19-5.1/kernel/wait.c
---- linux-2.6.27/kernel/wait.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/wait.c 2009-03-25 16:11:40.000000000 +0000
-@@ -101,6 +101,15 @@ prepare_to_wait_exclusive(wait_queue_hea
+diff -r 9608d5473017 kernel/wait.c
+--- a/kernel/wait.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/wait.c Wed May 06 16:57:02 2009 +0100
+@@ -101,6 +101,15 @@
}
EXPORT_SYMBOL(prepare_to_wait_exclusive);
void finish_wait(wait_queue_head_t *q, wait_queue_t *wait)
{
unsigned long flags;
-@@ -127,6 +136,39 @@ void finish_wait(wait_queue_head_t *q, w
+@@ -127,6 +136,39 @@
}
EXPORT_SYMBOL(finish_wait);
int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key)
{
int ret = default_wake_function(wait, mode, sync, key);
-@@ -144,8 +186,7 @@ int wake_bit_function(wait_queue_t *wait
+@@ -144,8 +186,7 @@
= container_of(wait, struct wait_bit_queue, wait);
if (wait_bit->key.flags != key->flags ||
return 0;
else
return autoremove_wake_function(wait, mode, sync, key);
-@@ -187,17 +228,20 @@ int __sched
+@@ -187,17 +228,20 @@
__wait_on_bit_lock(wait_queue_head_t *wq, struct wait_bit_queue *q,
int (*action)(void *), unsigned mode)
{
- int ret = 0;
--
- do {
++ do {
+ int ret;
-+
+
+- do {
prepare_to_wait_exclusive(wq, &q->wait, mode);
- if (test_bit(q->key.bit_nr, q->key.flags)) {
- if ((ret = (*action)(q->key.flags)))
}
EXPORT_SYMBOL(__wait_on_bit_lock);
-diff -purN linux-2.6.27/lib/Kconfig.debug linux-2.6.27.19-5.1/lib/Kconfig.debug
---- linux-2.6.27/lib/Kconfig.debug 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/Kconfig.debug 2009-03-25 16:11:43.000000000 +0000
-@@ -548,6 +548,24 @@ config FRAME_POINTER
+diff -r 9608d5473017 lib/Kconfig.debug
+--- a/lib/Kconfig.debug Wed May 06 15:47:13 2009 +0100
++++ b/lib/Kconfig.debug Wed May 06 16:57:02 2009 +0100
+@@ -548,6 +548,24 @@
some architectures or if you use external debuggers.
If you don't debug the kernel, you can say N.
config BOOT_PRINTK_DELAY
bool "Delay each boot printk message by N milliseconds"
depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY
-@@ -676,13 +694,15 @@ config FAULT_INJECTION_STACKTRACE_FILTER
+@@ -676,13 +694,15 @@
depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
depends on !X86_64
select STACKTRACE
select KALLSYMS
select KALLSYMS_ALL
select STACKTRACE
-@@ -752,6 +772,61 @@ menuconfig BUILD_DOCSRC
+@@ -752,6 +772,61 @@
Say N if you are unsure.
source "samples/Kconfig"
source "lib/Kconfig.kgdb"
-diff -purN linux-2.6.27/lib/Makefile linux-2.6.27.19-5.1/lib/Makefile
---- linux-2.6.27/lib/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/Makefile 2009-03-25 16:11:43.000000000 +0000
-@@ -19,7 +19,8 @@ lib-$(CONFIG_SMP) += cpumask.o
+diff -r 9608d5473017 lib/Makefile
+--- a/lib/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/lib/Makefile Wed May 06 16:57:02 2009 +0100
+@@ -19,7 +19,8 @@
lib-y += kobject.o kref.o klist.o
obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
ifeq ($(CONFIG_DEBUG_KOBJECT),y)
CFLAGS_kobject.o += -DDEBUG
-@@ -80,6 +81,8 @@ obj-$(CONFIG_HAVE_LMB) += lmb.o
+@@ -80,6 +81,8 @@
obj-$(CONFIG_HAVE_ARCH_TRACEHOOK) += syscall.o
hostprogs-y := gen_crc32table
clean-files := crc32table.h
-diff -purN linux-2.6.27/lib/bug.c linux-2.6.27.19-5.1/lib/bug.c
---- linux-2.6.27/lib/bug.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/bug.c 2009-03-25 16:11:43.000000000 +0000
-@@ -41,6 +41,10 @@
+diff -r 9608d5473017 lib/bug.c
+--- a/lib/bug.c Wed May 06 15:47:13 2009 +0100
++++ b/lib/bug.c Wed May 06 16:57:02 2009 +0100
+@@ -40,6 +40,10 @@
+ #include <linux/kernel.h>
#include <linux/bug.h>
#include <linux/sched.h>
-
++
+#ifdef CONFIG_KDB
+#include <linux/kdb.h>
+#endif
-+
+
extern const struct bug_entry __start___bug_table[], __stop___bug_table[];
- #ifdef CONFIG_MODULES
-@@ -162,5 +166,9 @@ enum bug_trap_type report_bug(unsigned l
+@@ -162,5 +166,9 @@
"[verbose debug info unavailable]\n",
(void *)bugaddr);
+
return BUG_TRAP_TYPE_BUG;
}
-diff -purN linux-2.6.27/lib/cpumask.c linux-2.6.27.19-5.1/lib/cpumask.c
---- linux-2.6.27/lib/cpumask.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/cpumask.c 2009-03-25 16:11:42.000000000 +0000
-@@ -15,6 +15,15 @@ int __next_cpu(int n, const cpumask_t *s
+diff -r 9608d5473017 lib/cpumask.c
+--- a/lib/cpumask.c Wed May 06 15:47:13 2009 +0100
++++ b/lib/cpumask.c Wed May 06 16:57:02 2009 +0100
+@@ -14,6 +14,15 @@
+ return min_t(int, NR_CPUS, find_next_bit(srcp->bits, NR_CPUS, n+1));
}
EXPORT_SYMBOL(__next_cpu);
-
++
+int cpumask_next_and(int n, const cpumask_t *srcp, const cpumask_t *andp)
+{
+ while ((n = next_cpu_nr(n, *srcp)) < nr_cpu_ids)
+ return n;
+}
+EXPORT_SYMBOL(cpumask_next_and);
-+
+
#if NR_CPUS > 64
int __next_cpu_nr(int n, const cpumask_t *srcp)
- {
-diff -purN linux-2.6.27/lib/dynamic_printk.c linux-2.6.27.19-5.1/lib/dynamic_printk.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/dynamic_printk.c 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 lib/dynamic_printk.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/lib/dynamic_printk.c Wed May 06 16:57:02 2009 +0100
@@ -0,0 +1,420 @@
+/*
+ * lib/dynamic_printk.c
+}
+/* Use early_param(), so we can get debug output as early as possible */
+early_param("dynamic_printk", dynamic_printk_setup);
-diff -purN linux-2.6.27/lib/idr.c linux-2.6.27.19-5.1/lib/idr.c
---- linux-2.6.27/lib/idr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/idr.c 2009-03-25 16:11:43.000000000 +0000
-@@ -121,7 +121,7 @@ int idr_pre_get(struct idr *idp, gfp_t g
+diff -r 9608d5473017 lib/idr.c
+--- a/lib/idr.c Wed May 06 15:47:13 2009 +0100
++++ b/lib/idr.c Wed May 06 16:57:02 2009 +0100
+@@ -121,7 +121,7 @@
{
while (idp->id_free_cnt < IDR_FREE_MAX) {
struct idr_layer *new;
if (new == NULL)
return (0);
move_to_free_list(idp, new);
-@@ -185,6 +185,7 @@ static int sub_alloc(struct idr *idp, in
+@@ -185,6 +185,7 @@
new = get_from_free_list(idp);
if (!new)
return -1;
rcu_assign_pointer(p->ary[m], new);
p->count++;
}
-@@ -210,6 +211,7 @@ build_up:
+@@ -210,6 +211,7 @@
if (unlikely(!p)) {
if (!(p = get_from_free_list(idp)))
return -1;
layers = 1;
}
/*
-@@ -218,8 +220,14 @@ build_up:
+@@ -218,8 +220,14 @@
*/
while ((layers < (MAX_LEVEL - 1)) && (id >= (1 << (layers*IDR_BITS)))) {
layers++;
if (!(new = get_from_free_list(idp))) {
/*
* The allocation failed. If we built part of
-@@ -237,6 +245,7 @@ build_up:
+@@ -237,6 +245,7 @@
}
new->ary[0] = p;
new->count = 1;
if (p->bitmap == IDR_FULL)
__set_bit(0, &new->bitmap);
p = new;
-@@ -493,17 +502,21 @@ void *idr_find(struct idr *idp, int id)
+@@ -493,17 +502,21 @@
int n;
struct idr_layer *p;
p = rcu_dereference(p->ary[(id >> n) & IDR_MASK]);
}
return((void *)p);
-@@ -582,8 +595,11 @@ void *idr_replace(struct idr *idp, void
+@@ -582,8 +595,11 @@
int n;
struct idr_layer *p, *old_p;
id &= MAX_ID_MASK;
-@@ -607,16 +623,10 @@ void *idr_replace(struct idr *idp, void
+@@ -607,16 +623,10 @@
}
EXPORT_SYMBOL(idr_replace);
}
/**
-diff -purN linux-2.6.27/lib/parser.c linux-2.6.27.19-5.1/lib/parser.c
---- linux-2.6.27/lib/parser.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/parser.c 2009-03-25 16:11:42.000000000 +0000
-@@ -111,6 +111,19 @@ int match_token(char *s, match_table_t t
+diff -r 9608d5473017 lib/parser.c
+--- a/lib/parser.c Wed May 06 15:47:13 2009 +0100
++++ b/lib/parser.c Wed May 06 16:57:02 2009 +0100
+@@ -111,6 +111,19 @@
}
/**
* match_number: scan a number in the given base from a substring_t
* @s: substring to be scanned
* @result: resulting integer on success
-@@ -221,6 +234,7 @@ char *match_strdup(const substring_t *s)
+@@ -221,6 +234,7 @@
}
EXPORT_SYMBOL(match_token);
EXPORT_SYMBOL(match_int);
EXPORT_SYMBOL(match_octal);
EXPORT_SYMBOL(match_hex);
-diff -purN linux-2.6.27/lib/percpu_counter.c linux-2.6.27.19-5.1/lib/percpu_counter.c
---- linux-2.6.27/lib/percpu_counter.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/percpu_counter.c 2009-03-25 16:11:42.000000000 +0000
-@@ -52,7 +52,7 @@ EXPORT_SYMBOL(__percpu_counter_add);
+diff -r 9608d5473017 lib/percpu_counter.c
+--- a/lib/percpu_counter.c Wed May 06 15:47:13 2009 +0100
++++ b/lib/percpu_counter.c Wed May 06 16:57:02 2009 +0100
+@@ -52,7 +52,7 @@
* Add up all the per-cpu counts, return the result. This is a more accurate
* but much slower version of percpu_counter_read_positive()
*/
{
s64 ret;
int cpu;
-@@ -62,11 +62,9 @@ s64 __percpu_counter_sum(struct percpu_c
+@@ -62,11 +62,9 @@
for_each_online_cpu(cpu) {
s32 *pcount = per_cpu_ptr(fbc->counters, cpu);
ret += *pcount;
spin_unlock(&fbc->lock);
return ret;
-diff -purN linux-2.6.27/lib/scatterlist.c linux-2.6.27.19-5.1/lib/scatterlist.c
---- linux-2.6.27/lib/scatterlist.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/scatterlist.c 2009-03-25 16:11:43.000000000 +0000
-@@ -395,7 +395,7 @@ void sg_miter_stop(struct sg_mapping_ite
+diff -r 9608d5473017 lib/scatterlist.c
+--- a/lib/scatterlist.c Wed May 06 15:47:13 2009 +0100
++++ b/lib/scatterlist.c Wed May 06 16:57:02 2009 +0100
+@@ -395,7 +395,7 @@
WARN_ON(!irqs_disabled());
kunmap_atomic(miter->addr, KM_BIO_SRC_IRQ);
} else
miter->page = NULL;
miter->addr = NULL;
-diff -purN linux-2.6.27/lib/string_helpers.c linux-2.6.27.19-5.1/lib/string_helpers.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/string_helpers.c 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 lib/string_helpers.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/lib/string_helpers.c Wed May 06 16:57:02 2009 +0100
@@ -0,0 +1,64 @@
+/*
+ * Helpers for formatting and printing strings
+ return 0;
+}
+EXPORT_SYMBOL(string_get_size);
-diff -purN linux-2.6.27/lib/swiotlb-xen.c linux-2.6.27.19-5.1/lib/swiotlb-xen.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/swiotlb-xen.c 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 lib/swiotlb-xen.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/lib/swiotlb-xen.c Wed May 06 16:57:02 2009 +0100
@@ -0,0 +1,783 @@
+/*
+ * Dynamic DMA mapping support.
+EXPORT_SYMBOL(swiotlb_sync_sg_for_device);
+EXPORT_SYMBOL(swiotlb_dma_mapping_error);
+EXPORT_SYMBOL(swiotlb_dma_supported);
-diff -purN linux-2.6.27/mm/Kconfig linux-2.6.27.19-5.1/mm/Kconfig
---- linux-2.6.27/mm/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/Kconfig 2009-03-25 16:11:30.000000000 +0000
-@@ -128,12 +128,9 @@ config SPARSEMEM_VMEMMAP
+diff -r 9608d5473017 mm/Kconfig
+--- a/mm/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/mm/Kconfig Wed May 06 16:57:02 2009 +0100
+@@ -128,11 +128,8 @@
config MEMORY_HOTPLUG
bool "Allow for memory hot-add"
depends on SPARSEMEM || X86_64_ACPI_NUMA
- depends on HOTPLUG && !HIBERNATION && ARCH_ENABLE_MEMORY_HOTPLUG
+ depends on HOTPLUG && ARCH_ENABLE_MEMORY_HOTPLUG
depends on (IA64 || X86 || PPC64 || SUPERH || S390)
-
+-
-comment "Memory hotplug is currently incompatible with Software Suspend"
- depends on SPARSEMEM && HOTPLUG && HIBERNATION
--
+
config MEMORY_HOTPLUG_SPARSE
def_bool y
- depends on SPARSEMEM && MEMORY_HOTPLUG
-diff -purN linux-2.6.27/mm/Makefile linux-2.6.27.19-5.1/mm/Makefile
---- linux-2.6.27/mm/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/Makefile 2009-03-25 16:11:31.000000000 +0000
-@@ -11,7 +11,7 @@ obj-y := bootmem.o filemap.o mempool.o
+diff -r 9608d5473017 mm/Makefile
+--- a/mm/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/mm/Makefile Wed May 06 16:57:02 2009 +0100
+@@ -11,7 +11,7 @@
maccess.o page_alloc.o page-writeback.o pdflush.o \
readahead.o swap.o truncate.o vmscan.o \
prio_tree.o util.o mmzone.o vmstat.o backing-dev.o \
obj-$(CONFIG_PROC_PAGE_MONITOR) += pagewalk.o
obj-$(CONFIG_BOUNCE) += bounce.o
-diff -purN linux-2.6.27/mm/bounce.c linux-2.6.27.19-5.1/mm/bounce.c
---- linux-2.6.27/mm/bounce.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/bounce.c 2009-03-25 16:11:31.000000000 +0000
-@@ -267,7 +267,7 @@ void blk_queue_bounce(struct request_que
+diff -r 9608d5473017 mm/bounce.c
+--- a/mm/bounce.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/bounce.c Wed May 06 16:57:02 2009 +0100
+@@ -267,7 +267,7 @@
/*
* Data-less bio, nothing to bounce
*/
return;
/*
-diff -purN linux-2.6.27/mm/fadvise.c linux-2.6.27.19-5.1/mm/fadvise.c
---- linux-2.6.27/mm/fadvise.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/fadvise.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 mm/fadvise.c
+--- a/mm/fadvise.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/fadvise.c Wed May 06 16:57:02 2009 +0100
@@ -24,7 +24,7 @@
* POSIX_FADV_WILLNEED could set PG_Referenced, and POSIX_FADV_NOREUSE could
* deactivate the pages and clear PG_Referenced.
{
struct file *file = fget(fd);
struct address_space *mapping;
-@@ -126,12 +126,26 @@ out:
+@@ -126,12 +126,26 @@
fput(file);
return ret;
}
+#endif
#endif
-diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
---- linux-2.6.27/mm/filemap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/filemap.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 mm/filemap.c
+--- a/mm/filemap.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/filemap.c Wed May 06 16:57:02 2009 +0100
@@ -34,6 +34,7 @@
#include <linux/hardirq.h> /* for BUG_ON(!in_atomic()) only */
#include <linux/memcontrol.h>
/*
* FIXME: remove all knowledge of the buffer layer from the core VM
-@@ -134,6 +135,7 @@ void __remove_from_page_cache(struct pag
+@@ -134,6 +135,7 @@
dec_bdi_stat(mapping->backing_dev_info, BDI_RECLAIMABLE);
}
}
void remove_from_page_cache(struct page *page)
{
-@@ -145,6 +147,7 @@ void remove_from_page_cache(struct page
+@@ -145,6 +147,7 @@
__remove_from_page_cache(page);
spin_unlock_irq(&mapping->tree_lock);
}
static int sync_page(void *word)
{
-@@ -179,6 +182,7 @@ static int sync_page(void *word)
+@@ -179,6 +182,7 @@
if (mapping && mapping->a_ops && mapping->a_ops->sync_page)
mapping->a_ops->sync_page(page);
io_schedule();
return 0;
}
-@@ -209,7 +213,7 @@ int __filemap_fdatawrite_range(struct ad
+@@ -209,7 +213,7 @@
int ret;
struct writeback_control wbc = {
.sync_mode = sync_mode,
.range_start = start,
.range_end = end,
};
-@@ -497,6 +501,7 @@ int add_to_page_cache_lru(struct page *p
+@@ -497,6 +501,7 @@
lru_cache_add(page);
return ret;
}
#ifdef CONFIG_NUMA
struct page *__page_cache_alloc(gfp_t gfp)
-@@ -510,12 +515,6 @@ struct page *__page_cache_alloc(gfp_t gf
+@@ -509,12 +514,6 @@
+ }
EXPORT_SYMBOL(__page_cache_alloc);
#endif
-
+-
-static int __sleep_on_page_lock(void *word)
-{
- io_schedule();
- return 0;
-}
--
+
/*
* In order to wait for pages to become available there must be
- * waitqueues associated with pages. By using a hash table of
-@@ -542,12 +541,30 @@ void wait_on_page_bit(struct page *page,
+@@ -542,11 +541,29 @@
{
DEFINE_WAIT_BIT(wait, &page->flags, bit_nr);
+ trace_wait_on_page_end(page, bit_nr);
}
EXPORT_SYMBOL(wait_on_page_bit);
-
++
+/*
+ * If PageWaiters was found to be set at unlock time, __wake_page_waiters
+ * should be called to actually perform the wakeup of waiters.
+ smp_mb__after_clear_bit();
+ wake_up_page(page, PG_locked);
+}
-+
+
/**
* unlock_page - unlock a locked page
- * @page: the page
-@@ -564,11 +581,10 @@ EXPORT_SYMBOL(wait_on_page_bit);
+@@ -564,11 +581,10 @@
*/
void unlock_page(struct page *page)
{
}
EXPORT_SYMBOL(unlock_page);
-@@ -598,22 +614,59 @@ EXPORT_SYMBOL(end_page_writeback);
+@@ -598,22 +614,59 @@
* chances are that on the second loop, the block layer's plug list is empty,
* so sync_page() will then return in state TASK_UNINTERRUPTIBLE.
*/
-int __lock_page_killable(struct page *page)
+int __lock_page_killable(struct page *page)
-+{
+ {
+ wait_queue_head_t *wq = page_waitqueue(page);
+ DEFINE_WAIT_BIT(wait, &page->flags, PG_locked);
+ int err = 0;
+}
+
+void __wait_on_page_locked(struct page *page)
- {
++{
+ wait_queue_head_t *wq = page_waitqueue(page);
DEFINE_WAIT_BIT(wait, &page->flags, PG_locked);
/**
* __lock_page_nosync - get a lock on the page, without calling sync_page()
-@@ -622,11 +675,18 @@ int __lock_page_killable(struct page *pa
+@@ -622,11 +675,18 @@
* Variant of lock_page that does not require the caller to hold a reference
* on the page's mapping.
*/
}
/**
-@@ -796,6 +856,7 @@ repeat:
+@@ -796,6 +856,7 @@
rcu_read_unlock();
return ret;
}
/**
* find_get_pages_contig - gang contiguous pagecache lookup
-@@ -1304,7 +1365,8 @@ generic_file_aio_read(struct kiocb *iocb
+@@ -1304,7 +1365,8 @@
goto out; /* skip atime */
size = i_size_read(inode);
if (pos < size) {
if (!retval) {
retval = mapping->a_ops->direct_IO(READ, iocb,
iov, pos, nr_segs);
-@@ -1353,7 +1415,7 @@ do_readahead(struct address_space *mappi
+@@ -1353,7 +1415,7 @@
return 0;
}
{
ssize_t ret;
struct file *file;
-@@ -1372,6 +1434,13 @@ asmlinkage ssize_t sys_readahead(int fd,
+@@ -1372,6 +1434,13 @@
}
return ret;
}
#ifdef CONFIG_MMU
/**
-@@ -1760,12 +1829,12 @@ int should_remove_suid(struct dentry *de
+@@ -1760,12 +1829,12 @@
}
EXPORT_SYMBOL(should_remove_suid);
}
int file_remove_suid(struct file *file)
-@@ -1780,7 +1849,7 @@ int file_remove_suid(struct file *file)
+@@ -1780,7 +1849,7 @@
if (killpriv)
error = security_inode_killpriv(dentry);
if (!error && killsuid)
return error;
}
-@@ -2026,7 +2095,7 @@ int pagecache_write_begin(struct file *f
+@@ -2026,7 +2095,7 @@
struct inode *inode = mapping->host;
struct page *page;
again:
*pagep = page;
if (!page)
return -ENOMEM;
-@@ -2110,18 +2179,10 @@ generic_file_direct_write(struct kiocb *
+@@ -2110,18 +2179,10 @@
if (count != ocount)
*nr_segs = iov_shorten((struct iovec *)iov, *nr_segs, count);
if (written)
goto out;
-@@ -2190,19 +2251,24 @@ EXPORT_SYMBOL(generic_file_direct_write)
+@@ -2190,19 +2251,24 @@
* Find or create a page at the given pagecache position. Return the locked
* page. This function is specifically for buffered writes.
*/
if (unlikely(status)) {
page_cache_release(page);
if (status == -EEXIST)
-@@ -2211,7 +2277,7 @@ repeat:
+@@ -2211,7 +2277,7 @@
}
return page;
}
static ssize_t generic_perform_write_2copy(struct file *file,
struct iov_iter *i, loff_t pos)
-@@ -2256,7 +2322,7 @@ static ssize_t generic_perform_write_2co
+@@ -2256,7 +2322,7 @@
break;
}
if (!page) {
status = -ENOMEM;
break;
-@@ -2488,7 +2554,7 @@ generic_file_buffered_write(struct kiocb
+@@ -2488,7 +2554,7 @@
if (likely(status >= 0)) {
written += status;
/*
* For now, when the user asks for O_SYNC, we'll actually give
-@@ -2506,8 +2572,22 @@ generic_file_buffered_write(struct kiocb
+@@ -2506,8 +2572,22 @@
* to buffered writes (block instantiation inside i_size). So we sync
* the file data here, to try to honour O_DIRECT expectations.
*/
return written ? written : status;
}
-diff -purN linux-2.6.27/mm/fremap.c linux-2.6.27.19-5.1/mm/fremap.c
---- linux-2.6.27/mm/fremap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/fremap.c 2009-03-25 16:11:30.000000000 +0000
-@@ -118,8 +118,8 @@ static int populate_range(struct mm_stru
+diff -r 9608d5473017 mm/fremap.c
+--- a/mm/fremap.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/fremap.c Wed May 06 16:57:02 2009 +0100
+@@ -118,8 +118,8 @@
* and the vma's default protection is used. Arbitrary protections
* might be implemented in the future.
*/
{
struct mm_struct *mm = current->mm;
struct address_space *mapping;
-diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
---- linux-2.6.27/mm/hugetlb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/hugetlb.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 mm/hugetlb.c
+--- a/mm/hugetlb.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/hugetlb.c Wed May 06 16:57:02 2009 +0100
@@ -17,6 +17,7 @@
#include <linux/mutex.h>
#include <linux/bootmem.h>
#include <asm/page.h>
#include <asm/pgtable.h>
-@@ -353,11 +354,26 @@ static int vma_has_reserves(struct vm_ar
+@@ -353,10 +354,25 @@
return 0;
}
unsigned long addr, unsigned long sz)
{
int i;
-
++
+ if (unlikely(sz > MAX_ORDER_NR_PAGES))
+ return clear_gigantic_page(page, addr, sz);
-+
+
might_sleep();
for (i = 0; i < sz/PAGE_SIZE; i++) {
- cond_resched();
-@@ -365,12 +381,32 @@ static void clear_huge_page(struct page
+@@ -365,11 +381,31 @@
}
}
{
int i;
struct hstate *h = hstate_vma(vma);
-
++
+ if (unlikely(pages_per_huge_page(h) > MAX_ORDER_NR_PAGES))
+ return copy_gigantic_page(dst, src, addr, vma);
-+
+
might_sleep();
for (i = 0; i < pages_per_huge_page(h); i++) {
- cond_resched();
-@@ -455,6 +491,9 @@ static void update_and_free_page(struct
+@@ -455,6 +491,9 @@
{
int i;
h->nr_huge_pages--;
h->nr_huge_pages_node[page_to_nid(page)]--;
for (i = 0; i < pages_per_huge_page(h); i++) {
-@@ -489,6 +528,7 @@ static void free_huge_page(struct page *
+@@ -489,6 +528,7 @@
int nid = page_to_nid(page);
struct address_space *mapping;
mapping = (struct address_space *) page_private(page);
set_page_private(page, 0);
BUG_ON(page_count(page));
-@@ -556,8 +596,10 @@ static struct page *alloc_fresh_huge_pag
+@@ -556,8 +596,10 @@
{
struct page *page;
page = alloc_pages_node(nid,
htlb_alloc_mask|__GFP_COMP|__GFP_THISNODE|
-@@ -566,11 +608,13 @@ static struct page *alloc_fresh_huge_pag
+@@ -566,11 +608,13 @@
if (page) {
if (arch_prepare_hugepage(page)) {
__free_pages(page, huge_page_order(h));
return page;
}
-@@ -654,7 +698,8 @@ static struct page *alloc_buddy_huge_pag
+@@ -654,7 +698,8 @@
spin_lock(&hugetlb_lock);
if (h->surplus_huge_pages >= h->nr_overcommit_huge_pages) {
spin_unlock(&hugetlb_lock);
} else {
h->nr_huge_pages++;
h->surplus_huge_pages++;
-@@ -692,7 +737,8 @@ static struct page *alloc_buddy_huge_pag
+@@ -692,7 +737,8 @@
__count_vm_event(HTLB_BUDDY_PGALLOC_FAIL);
}
spin_unlock(&hugetlb_lock);
return page;
}
-@@ -931,6 +977,7 @@ static struct page *alloc_huge_page(stru
+@@ -931,6 +977,7 @@
vma_commit_reservation(h, vma, addr);
return page;
}
-@@ -969,6 +1016,14 @@ found:
+@@ -969,6 +1016,14 @@
return 1;
}
/* Put bootmem huge pages into the standard lists after mem_map is up */
static void __init gather_bootmem_prealloc(void)
{
-@@ -979,7 +1034,7 @@ static void __init gather_bootmem_preall
+@@ -979,7 +1034,7 @@
struct hstate *h = m->hstate;
__ClearPageReserved(page);
WARN_ON(page_count(page) != 1);
prep_new_huge_page(h, page, page_to_nid(page));
}
}
-@@ -1455,6 +1510,28 @@ int hugetlb_overcommit_handler(struct ct
+@@ -1455,6 +1510,28 @@
#endif /* CONFIG_SYSCTL */
int hugetlb_report_meminfo(char *buf)
{
struct hstate *h = &default_hstate;
-@@ -1752,6 +1829,7 @@ int unmap_ref_private(struct mm_struct *
+@@ -1752,6 +1829,7 @@
struct page *page,
unsigned long address)
{
struct vm_area_struct *iter_vma;
struct address_space *mapping;
struct prio_tree_iter iter;
-@@ -1761,7 +1839,7 @@ int unmap_ref_private(struct mm_struct *
+@@ -1761,7 +1839,7 @@
* vm_pgoff is in PAGE_SIZE units, hence the different calculation
* from page cache lookup which is in HPAGE_SIZE units.
*/
pgoff = ((address - vma->vm_start) >> PAGE_SHIFT)
+ (vma->vm_pgoff >> PAGE_SHIFT);
mapping = (struct address_space *)page_private(page);
-@@ -1780,7 +1858,7 @@ int unmap_ref_private(struct mm_struct *
+@@ -1780,7 +1858,7 @@
*/
if (!is_vma_resv_set(iter_vma, HPAGE_RESV_OWNER))
unmap_hugepage_range(iter_vma,
page);
}
-@@ -2103,7 +2181,7 @@ int follow_hugetlb_page(struct mm_struct
+@@ -2103,7 +2181,7 @@
same_page:
if (pages) {
get_page(page);
}
if (vmas)
-@@ -2165,11 +2243,12 @@ int hugetlb_reserve_pages(struct inode *
+@@ -2165,11 +2243,12 @@
long from, long to,
struct vm_area_struct *vma)
{
/*
* Shared mappings base their reservation on the number of pages that
-@@ -2181,8 +2260,10 @@ int hugetlb_reserve_pages(struct inode *
+@@ -2181,8 +2260,10 @@
chg = region_chg(&inode->i_mapping->private_list, from, to);
else {
struct resv_map *resv_map = resv_map_alloc();
chg = to - from;
-@@ -2190,26 +2271,34 @@ int hugetlb_reserve_pages(struct inode *
+@@ -2190,26 +2271,34 @@
set_vma_resv_flags(vma, HPAGE_RESV_OWNER);
}
spin_lock(&inode->i_lock);
inode->i_blocks -= blocks_per_huge_page(h);
spin_unlock(&inode->i_lock);
-diff -purN linux-2.6.27/mm/internal.h linux-2.6.27.19-5.1/mm/internal.h
---- linux-2.6.27/mm/internal.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/internal.h 2009-03-25 16:11:31.000000000 +0000
-@@ -17,6 +17,7 @@ void free_pgtables(struct mmu_gather *tl
+diff -r 9608d5473017 mm/internal.h
+--- a/mm/internal.h Wed May 06 15:47:13 2009 +0100
++++ b/mm/internal.h Wed May 06 16:57:02 2009 +0100
+@@ -17,6 +17,7 @@
unsigned long floor, unsigned long ceiling);
extern void prep_compound_page(struct page *page, unsigned long order);
static inline void set_page_count(struct page *page, int v)
{
-@@ -53,6 +54,34 @@ static inline unsigned long page_order(s
+@@ -53,6 +54,34 @@
}
/*
* FLATMEM and DISCONTIGMEM configurations use alloc_bootmem_node,
* so all functions starting at paging_init should be marked __init
* in those cases. SPARSEMEM, however, allows for memory hotplug,
-@@ -64,6 +93,16 @@ static inline unsigned long page_order(s
+@@ -63,6 +92,16 @@
+ #else
#define __paginginit __init
#endif
-
++
+#define ALLOC_HARDER 0x01 /* try to alloc harder */
+#define ALLOC_HIGH 0x02 /* __GFP_HIGH set */
+#define ALLOC_WMARK_MIN 0x04 /* use pages_min watermark */
+#define ALLOC_CPUSET 0x40 /* check for correct cpuset */
+
+int gfp_to_alloc_flags(gfp_t gfp_mask);
-+
+
/* Memory initialisation debug and verification */
enum mminit_level {
- MMINIT_WARNING,
-diff -purN linux-2.6.27/mm/madvise.c linux-2.6.27.19-5.1/mm/madvise.c
---- linux-2.6.27/mm/madvise.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/madvise.c 2009-03-25 16:11:31.000000000 +0000
-@@ -239,12 +239,30 @@ madvise_vma(struct vm_area_struct *vma,
+diff -r 9608d5473017 mm/madvise.c
+--- a/mm/madvise.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/madvise.c Wed May 06 16:57:02 2009 +0100
+@@ -239,12 +239,30 @@
break;
default:
/*
* The madvise(2) system call.
*
-@@ -281,7 +299,7 @@ madvise_vma(struct vm_area_struct *vma,
+@@ -281,7 +299,7 @@
* -EBADF - map exists, but area maps something that isn't a file.
* -EAGAIN - a kernel resource was temporarily unavailable.
*/
{
unsigned long end, tmp;
struct vm_area_struct * vma, *prev;
-@@ -290,6 +308,9 @@ asmlinkage long sys_madvise(unsigned lon
+@@ -289,6 +307,9 @@
+ int error = -EINVAL;
int write;
size_t len;
-
++
+ if (!madvise_behavior_valid(behavior))
+ return error;
-+
+
write = madvise_need_mmap_write(behavior);
if (write)
- down_write(¤t->mm->mmap_sem);
-diff -purN linux-2.6.27/mm/memcontrol.c linux-2.6.27.19-5.1/mm/memcontrol.c
---- linux-2.6.27/mm/memcontrol.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/memcontrol.c 2009-03-25 16:11:30.000000000 +0000
-@@ -59,7 +59,7 @@ struct mem_cgroup_stat_cpu {
+diff -r 9608d5473017 mm/memcontrol.c
+--- a/mm/memcontrol.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/memcontrol.c Wed May 06 16:57:02 2009 +0100
+@@ -59,7 +59,7 @@
} ____cacheline_aligned_in_smp;
struct mem_cgroup_stat {
};
/*
-@@ -143,6 +143,7 @@ struct mem_cgroup {
+@@ -143,6 +143,7 @@
struct mem_cgroup_stat stat;
};
static struct mem_cgroup init_mem_cgroup;
/*
* We use the lower bit of the page->page_cgroup pointer as a bit spin
-@@ -1097,23 +1098,54 @@ static void free_mem_cgroup_per_zone_inf
+@@ -1097,23 +1098,54 @@
static struct mem_cgroup *mem_cgroup_alloc(void)
{
struct mem_cgroup *mem;
- if (sizeof(*mem) < PAGE_SIZE)
- mem = kmalloc(sizeof(*mem), GFP_KERNEL);
-- else
+ if (sizeof(*mem) > PAGE_SIZE) {
- mem = vmalloc(sizeof(*mem));
--
-- if (mem)
++ mem = vmalloc(sizeof(*mem));
+ if (!mem)
+ goto out;
- memset(mem, 0, sizeof(*mem));
++ memset(mem, 0, sizeof(*mem));
+ } else
+ mem = kzalloc(sizeof(*mem), GFP_KERNEL);
+
+ goto out_mem;
+
+ mem->stat.cpustat = cpustat;
- return mem;
++ return mem;
+
+out_mem:
+ if (is_vmalloc_addr(mem))
+ vfree(mem);
-+ else
+ else
+- mem = vmalloc(sizeof(*mem));
+-
+- if (mem)
+- memset(mem, 0, sizeof(*mem));
+- return mem;
+ kfree(mem);
+out:
+ return NULL;
static void mem_cgroup_free(struct mem_cgroup *mem)
{
- if (sizeof(*mem) < PAGE_SIZE)
-- kfree(mem);
+ if (is_vmalloc_addr(mem->stat.cpustat))
+ vfree(mem->stat.cpustat);
- else
++ else
+ kfree(mem->stat.cpustat);
+
+ if (is_vmalloc_addr(mem))
- vfree(mem);
++ vfree(mem);
+ else
-+ kfree(mem);
+ kfree(mem);
+- else
+- vfree(mem);
}
-@@ -1125,6 +1157,7 @@ mem_cgroup_create(struct cgroup_subsys *
+@@ -1125,6 +1157,7 @@
if (unlikely((cont->parent) == NULL)) {
mem = &init_mem_cgroup;
page_cgroup_cache = KMEM_CACHE(page_cgroup, SLAB_PANIC);
} else {
mem = mem_cgroup_alloc();
-@@ -1208,4 +1241,5 @@ struct cgroup_subsys mem_cgroup_subsys =
+@@ -1208,4 +1241,5 @@
.populate = mem_cgroup_populate,
.attach = mem_cgroup_move_task,
.early_init = 0,
+ .disabled = 1,
};
-diff -purN linux-2.6.27/mm/memory.c linux-2.6.27.19-5.1/mm/memory.c
---- linux-2.6.27/mm/memory.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/memory.c 2009-03-25 16:11:30.000000000 +0000
-@@ -61,9 +61,12 @@
+diff -r 9608d5473017 mm/memory.c
+--- a/mm/memory.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/memory.c Wed May 06 16:57:02 2009 +0100
+@@ -61,8 +61,11 @@
#include <linux/swapops.h>
#include <linux/elf.h>
+#include <trace/memory.h>
#include "internal.h"
-
-+#include <trace/swap.h>
+
++#include <trace/swap.h>
+
#ifndef CONFIG_NEED_MULTIPLE_NODES
/* use the per-pgdat data instead for discontigmem - mbligh */
- unsigned long max_mapnr;
-@@ -443,6 +446,12 @@ struct page *vm_normal_page(struct vm_ar
+@@ -443,6 +446,12 @@
{
unsigned long pfn;
if (HAVE_PTE_SPECIAL) {
if (likely(!pte_special(pte))) {
VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
-@@ -471,7 +480,14 @@ struct page *vm_normal_page(struct vm_ar
+@@ -471,7 +480,14 @@
}
}
/*
* NOTE! We still have PageReserved() pages in the page tables.
-@@ -742,8 +758,14 @@ static unsigned long zap_pte_range(struc
+@@ -742,8 +758,14 @@
page->index > details->last_index))
continue;
}
tlb_remove_tlb_entry(tlb, pte, addr);
if (unlikely(!page))
continue;
-@@ -855,11 +877,11 @@ static unsigned long unmap_page_range(st
+@@ -855,11 +877,11 @@
return addr;
}
#endif
/**
-@@ -993,6 +1015,7 @@ unsigned long zap_page_range(struct vm_a
+@@ -993,6 +1015,7 @@
tlb_finish_mmu(tlb, address, end);
return end;
}
/**
* zap_vma_ptes - remove ptes mapping the vma
-@@ -1190,6 +1213,26 @@ int get_user_pages(struct task_struct *t
+@@ -1190,6 +1213,26 @@
continue;
}
if (!vma || (vma->vm_flags & (VM_IO | VM_PFNMAP))
|| !(vm_flags & vma->vm_flags))
return i ? : -EFAULT;
-@@ -1268,6 +1311,95 @@ int get_user_pages(struct task_struct *t
+@@ -1267,6 +1310,95 @@
+ return i;
}
EXPORT_SYMBOL(get_user_pages);
-
++
+static int zeromap_pte_range(struct mm_struct *mm, pmd_t *pmd,
+ unsigned long addr, unsigned long end, pgprot_t prot)
+{
+ } while (pgd++, addr = next, addr != end);
+ return err;
+}
-+
+
pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr,
spinlock_t **ptl)
- {
-@@ -1854,7 +1986,6 @@ gotten:
+@@ -1854,7 +1986,6 @@
if (unlikely(anon_vma_prepare(vma)))
goto oom;
new_page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, address);
if (!new_page)
goto oom;
-@@ -2286,6 +2417,7 @@ static int do_swap_page(struct mm_struct
+@@ -2286,6 +2417,7 @@
/* Had to read the page from swap area: Major fault */
ret = VM_FAULT_MAJOR;
count_vm_event(PGMAJFAULT);
}
if (mem_cgroup_charge(page, mm, GFP_KERNEL)) {
-@@ -2679,31 +2811,46 @@ unlock:
+@@ -2679,31 +2811,46 @@
int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, int write_access)
{
#ifndef __PAGETABLE_PUD_FOLDED
/*
-diff -purN linux-2.6.27/mm/memory_hotplug.c linux-2.6.27.19-5.1/mm/memory_hotplug.c
---- linux-2.6.27/mm/memory_hotplug.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/memory_hotplug.c 2009-03-25 16:11:31.000000000 +0000
-@@ -323,11 +323,11 @@ int __remove_pages(struct zone *zone, un
+diff -r 9608d5473017 mm/memory_hotplug.c
+--- a/mm/memory_hotplug.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/memory_hotplug.c Wed May 06 16:57:02 2009 +0100
+@@ -323,11 +323,11 @@
BUG_ON(phys_start_pfn & ~PAGE_SECTION_MASK);
BUG_ON(nr_pages % PAGES_PER_SECTION);
ret = __remove_section(zone, __pfn_to_section(pfn));
if (ret)
break;
-diff -purN linux-2.6.27/mm/mempolicy.c linux-2.6.27.19-5.1/mm/mempolicy.c
---- linux-2.6.27/mm/mempolicy.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/mempolicy.c 2009-03-25 16:11:31.000000000 +0000
-@@ -1059,10 +1059,9 @@ static int copy_nodes_to_user(unsigned l
+diff -r 9608d5473017 mm/mempolicy.c
+--- a/mm/mempolicy.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/mempolicy.c Wed May 06 16:57:02 2009 +0100
+@@ -1059,10 +1059,9 @@
return copy_to_user(mask, nodes_addr(*nodes), copy) ? -EFAULT : 0;
}
{
nodemask_t nodes;
int err;
-@@ -1082,8 +1081,8 @@ asmlinkage long sys_mbind(unsigned long
+@@ -1082,8 +1081,8 @@
}
/* Set the process memory policy */
{
int err;
nodemask_t nodes;
-@@ -1101,9 +1100,9 @@ asmlinkage long sys_set_mempolicy(int mo
+@@ -1101,9 +1100,9 @@
return do_set_mempolicy(mode, flags, &nodes);
}
{
struct mm_struct *mm;
struct task_struct *task;
-@@ -1171,10 +1170,9 @@ out:
+@@ -1171,10 +1170,9 @@
/* Retrieve NUMA policy */
{
int err;
int uninitialized_var(pval);
-diff -purN linux-2.6.27/mm/migrate.c linux-2.6.27.19-5.1/mm/migrate.c
---- linux-2.6.27/mm/migrate.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/migrate.c 2009-03-25 16:11:30.000000000 +0000
-@@ -65,6 +65,7 @@ int isolate_lru_page(struct page *page,
+diff -r 9608d5473017 mm/migrate.c
+--- a/mm/migrate.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/migrate.c Wed May 06 16:57:02 2009 +0100
+@@ -65,6 +65,7 @@
}
return ret;
}
/*
* migrate_prep() needs to be called before we start compiling a list of pages
-@@ -82,6 +83,7 @@ int migrate_prep(void)
+@@ -82,6 +83,7 @@
return 0;
}
static inline void move_to_lru(struct page *page)
{
-@@ -116,6 +118,7 @@ int putback_lru_pages(struct list_head *
+@@ -116,6 +118,7 @@
}
return count;
}
/*
* Restore a potential migration pte to a working pte entry
-@@ -741,7 +744,26 @@ unlock:
+@@ -741,7 +744,26 @@
* restored.
*/
list_del(&page->lru);
}
move_newpage:
-@@ -813,6 +835,17 @@ int migrate_pages(struct list_head *from
+@@ -813,6 +835,17 @@
}
}
}
rc = 0;
out:
if (!swapwrite)
-@@ -825,6 +858,7 @@ out:
+@@ -825,6 +858,7 @@
return nr_failed + retry;
}
#ifdef CONFIG_NUMA
/*
-@@ -979,10 +1013,10 @@ set_status:
+@@ -979,10 +1013,10 @@
* Move a list of pages in the address space of the currently executing
* process.
*/
{
int err = 0;
int i;
-diff -purN linux-2.6.27/mm/mincore.c linux-2.6.27.19-5.1/mm/mincore.c
---- linux-2.6.27/mm/mincore.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/mincore.c 2009-03-25 16:11:31.000000000 +0000
-@@ -177,8 +177,8 @@ none_mapped:
+diff -r 9608d5473017 mm/mincore.c
+--- a/mm/mincore.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/mincore.c Wed May 06 16:57:02 2009 +0100
+@@ -177,8 +177,8 @@
* mapped
* -EAGAIN - A kernel resource was temporarily unavailable.
*/
{
long retval;
unsigned long pages;
-diff -purN linux-2.6.27/mm/mlock.c linux-2.6.27.19-5.1/mm/mlock.c
---- linux-2.6.27/mm/mlock.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/mlock.c 2009-03-25 16:11:31.000000000 +0000
-@@ -130,7 +130,7 @@ static int do_mlock(unsigned long start,
+diff -r 9608d5473017 mm/mlock.c
+--- a/mm/mlock.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/mlock.c Wed May 06 16:57:02 2009 +0100
+@@ -130,7 +130,7 @@
return error;
}
{
unsigned long locked;
unsigned long lock_limit;
-@@ -156,7 +156,7 @@ asmlinkage long sys_mlock(unsigned long
+@@ -156,7 +156,7 @@
return error;
}
{
int ret;
-@@ -193,7 +193,7 @@ out:
+@@ -193,7 +193,7 @@
return 0;
}
{
unsigned long lock_limit;
int ret = -EINVAL;
-@@ -219,7 +219,7 @@ out:
+@@ -219,7 +219,7 @@
return ret;
}
{
int ret;
-diff -purN linux-2.6.27/mm/mmap.c linux-2.6.27.19-5.1/mm/mmap.c
---- linux-2.6.27/mm/mmap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/mmap.c 2009-03-25 16:11:31.000000000 +0000
-@@ -85,6 +85,7 @@ int sysctl_overcommit_memory = OVERCOMMI
+diff -r 9608d5473017 mm/mmap.c
+--- a/mm/mmap.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/mmap.c Wed May 06 16:57:02 2009 +0100
+@@ -85,6 +85,7 @@
int sysctl_overcommit_ratio = 50; /* default is 50% */
int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT;
atomic_long_t vm_committed_space = ATOMIC_LONG_INIT(0);
/*
* Check that a process has enough memory to allocate a new virtual
-@@ -244,7 +245,7 @@ static struct vm_area_struct *remove_vma
+@@ -244,7 +245,7 @@
return next;
}
{
unsigned long rlim, retval;
unsigned long newbrk, oldbrk;
-@@ -1290,6 +1291,8 @@ arch_get_unmapped_area(struct file *filp
+@@ -1290,6 +1291,8 @@
full_search:
for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
/* At this point: (!vma || addr < vma->vm_end). */
if (TASK_SIZE - len < addr) {
/*
-@@ -1304,15 +1307,23 @@ full_search:
+@@ -1304,15 +1307,23 @@
}
return -ENOMEM;
}
addr = vma->vm_end;
}
}
-@@ -1370,34 +1381,51 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1370,34 +1381,51 @@
/* make sure it can fit in the remaining address space */
if (addr > len) {
} while (len < vma->vm_start);
bottomup:
-@@ -1620,6 +1648,19 @@ int expand_upwards(struct vm_area_struct
+@@ -1620,6 +1648,19 @@
/* Somebody else might have raced and expanded it already */
if (address > vma->vm_end) {
unsigned long size, grow;
size = address - vma->vm_start;
grow = (address - vma->vm_end) >> PAGE_SHIFT;
-@@ -1628,6 +1669,7 @@ int expand_upwards(struct vm_area_struct
+@@ -1628,6 +1669,7 @@
if (!error)
vma->vm_end = address;
}
anon_vma_unlock(vma);
return error;
}
-@@ -1664,7 +1706,21 @@ static inline int expand_downwards(struc
+@@ -1664,7 +1706,21 @@
/* Somebody else might have raced and expanded it already */
if (address < vma->vm_start) {
unsigned long size, grow;
+ struct vm_area_struct *prev_vma;
-+
-+ find_vma_prev(vma->vm_mm, address, &prev_vma);
++ find_vma_prev(vma->vm_mm, address, &prev_vma);
++
+ error = -ENOMEM;
+ if (prev_vma) {
+ unsigned long guard;
size = vma->vm_end - address;
grow = (vma->vm_start - address) >> PAGE_SHIFT;
-@@ -1674,6 +1730,7 @@ static inline int expand_downwards(struc
+@@ -1674,6 +1730,7 @@
vma->vm_pgoff -= grow;
}
}
anon_vma_unlock(vma);
return error;
}
-@@ -1927,7 +1984,7 @@ int do_munmap(struct mm_struct *mm, unsi
+@@ -1927,7 +1984,7 @@
EXPORT_SYMBOL(do_munmap);
{
int ret;
struct mm_struct *mm = current->mm;
-diff -purN linux-2.6.27/mm/mmzone.c linux-2.6.27.19-5.1/mm/mmzone.c
---- linux-2.6.27/mm/mmzone.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/mmzone.c 2009-03-25 16:11:31.000000000 +0000
-@@ -22,6 +22,10 @@ struct pglist_data *next_online_pgdat(st
+diff -r 9608d5473017 mm/mmzone.c
+--- a/mm/mmzone.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/mmzone.c Wed May 06 16:57:02 2009 +0100
+@@ -22,6 +22,10 @@
return NULL;
return NODE_DATA(nid);
}
/*
* next_zone - helper magic for for_each_zone()
-diff -purN linux-2.6.27/mm/mprotect.c linux-2.6.27.19-5.1/mm/mprotect.c
---- linux-2.6.27/mm/mprotect.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/mprotect.c 2009-03-25 16:11:31.000000000 +0000
-@@ -219,8 +219,8 @@ fail:
+diff -r 9608d5473017 mm/mprotect.c
+--- a/mm/mprotect.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/mprotect.c Wed May 06 16:57:02 2009 +0100
+@@ -219,8 +219,8 @@
return error;
}
{
unsigned long vm_flags, nstart, end, tmp, reqprot;
struct vm_area_struct *vma, *prev;
-@@ -294,6 +294,11 @@ sys_mprotect(unsigned long start, size_t
+@@ -294,6 +294,11 @@
if (error)
goto out;
tmp = vma->vm_end;
if (tmp > end)
tmp = end;
-diff -purN linux-2.6.27/mm/mremap.c linux-2.6.27.19-5.1/mm/mremap.c
---- linux-2.6.27/mm/mremap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/mremap.c 2009-03-25 16:11:31.000000000 +0000
-@@ -418,9 +418,9 @@ out_nc:
+diff -r 9608d5473017 mm/mremap.c
+--- a/mm/mremap.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/mremap.c Wed May 06 16:57:02 2009 +0100
+@@ -418,9 +418,9 @@
return ret;
}
{
unsigned long ret;
-diff -purN linux-2.6.27/mm/msync.c linux-2.6.27.19-5.1/mm/msync.c
---- linux-2.6.27/mm/msync.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/msync.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 mm/msync.c
+--- a/mm/msync.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/msync.c Wed May 06 16:57:02 2009 +0100
@@ -28,7 +28,7 @@
* So by _not_ starting I/O in MS_ASYNC we provide complete flexibility to
* applications.
{
unsigned long end;
struct mm_struct *mm = current->mm;
-diff -purN linux-2.6.27/mm/nommu.c linux-2.6.27.19-5.1/mm/nommu.c
---- linux-2.6.27/mm/nommu.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/nommu.c 2009-03-25 16:11:31.000000000 +0000
-@@ -355,7 +355,7 @@ EXPORT_SYMBOL(vm_insert_page);
+diff -r 9608d5473017 mm/nommu.c
+--- a/mm/nommu.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/nommu.c Wed May 06 16:57:02 2009 +0100
+@@ -355,7 +355,7 @@
* to a regular file. in this case, the unmapping will need
* to invoke file system routines that need the global lock.
*/
{
struct mm_struct *mm = current->mm;
-@@ -1170,7 +1170,7 @@ int do_munmap(struct mm_struct *mm, unsi
+@@ -1170,7 +1170,7 @@
}
EXPORT_SYMBOL(do_munmap);
{
int ret;
struct mm_struct *mm = current->mm;
-@@ -1261,9 +1261,9 @@ unsigned long do_mremap(unsigned long ad
+@@ -1261,9 +1261,9 @@
}
EXPORT_SYMBOL(do_mremap);
{
unsigned long ret;
-diff -purN linux-2.6.27/mm/page-writeback.c linux-2.6.27.19-5.1/mm/page-writeback.c
---- linux-2.6.27/mm/page-writeback.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/page-writeback.c 2009-03-25 16:11:31.000000000 +0000
-@@ -66,7 +66,7 @@ static inline long sync_writeback_pages(
+diff -r 9608d5473017 mm/page-writeback.c
+--- a/mm/page-writeback.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/page-writeback.c Wed May 06 16:57:02 2009 +0100
+@@ -66,7 +66,7 @@
/*
* Start background writeback (via pdflush) at this percentage
*/
/*
* free highmem will not be subtracted from the total free memory
-@@ -77,7 +77,7 @@ int vm_highmem_is_dirtyable;
+@@ -77,7 +77,7 @@
/*
* The generator of dirty data starts writeback at this percentage
*/
/*
* The interval between `kupdate'-style writebacks, in jiffies
-@@ -872,9 +872,11 @@ int write_cache_pages(struct address_spa
+@@ -872,9 +872,11 @@
int done = 0;
struct pagevec pvec;
int nr_pages;
int range_whole = 0;
if (wbc->nonblocking && bdi_write_congested(bdi)) {
-@@ -884,82 +886,146 @@ int write_cache_pages(struct address_spa
+@@ -884,82 +886,146 @@
pagevec_init(&pvec, 0);
if (wbc->range_cyclic) {
+ done_index = index;
+ while (!done && (index <= end)) {
+ int i;
-+
+
+- scanned = 1;
+ nr_pages = pagevec_lookup_tag(&pvec, mapping, &index,
+ PAGECACHE_TAG_DIRTY,
+ min(end - index, (pgoff_t)PAGEVEC_SIZE-1) + 1);
+ if (nr_pages == 0)
+ break;
-
-- scanned = 1;
++
for (i = 0; i < nr_pages; i++) {
struct page *page = pvec.pages[i];
- if (wbc->sync_mode != WB_SYNC_NONE)
- wait_on_page_writeback(page);
--
-- if (PageWriteback(page) ||
-- !clear_page_dirty_for_io(page)) {
-- unlock_page(page);
-- continue;
+ if (PageWriteback(page)) {
+ if (wbc->sync_mode != WB_SYNC_NONE)
+ wait_on_page_writeback(page);
+ else
+ goto continue_unlock;
- }
++ }
+- if (PageWriteback(page) ||
+- !clear_page_dirty_for_io(page)) {
+- unlock_page(page);
+- continue;
+- }
+ BUG_ON(PageWriteback(page));
+ if (!clear_page_dirty_for_io(page))
+ goto continue_unlock;
-+
+
ret = (*writepage)(page, wbc, data);
- if (unlikely(ret == AOP_WRITEPAGE_ACTIVATE)) {
if (wbc->range_cont)
wbc->range_start = index << PAGE_CACHE_SHIFT;
-diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
---- linux-2.6.27/mm/page_alloc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/page_alloc.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 mm/page_alloc.c
+--- a/mm/page_alloc.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/page_alloc.c Wed May 06 16:57:02 2009 +0100
@@ -51,6 +51,8 @@
#include <asm/div64.h>
#include "internal.h"
/*
* Array of node states.
*/
-@@ -118,7 +120,10 @@ static char * const zone_names[MAX_NR_ZO
+@@ -118,7 +120,10 @@
"Movable",
};
unsigned long __meminitdata nr_kernel_pages;
unsigned long __meminitdata nr_all_pages;
-@@ -268,24 +273,39 @@ void prep_compound_page(struct page *pag
+@@ -268,24 +273,39 @@
{
int i;
int nr_pages = 1 << order;
-+
-+ set_compound_page_dtor(page, free_compound_page);
-+ set_compound_order(page, order);
-+ __SetPageHead(page);
-+ for (i = 1; i < nr_pages; i++) {
-+ struct page *p = page + i;
-+
-+ __SetPageTail(p);
-+ p->first_page = page;
-+ }
-+}
-+
-+#ifdef CONFIG_HUGETLBFS
-+void prep_compound_gigantic_page(struct page *page, unsigned long order)
-+{
-+ int i;
-+ int nr_pages = 1 << order;
- struct page *p = page + 1;
+- struct page *p = page + 1;
set_compound_page_dtor(page, free_compound_page);
set_compound_order(page, order);
- for (i = 1; i < nr_pages; i++, p++) {
- if (unlikely((i & (MAX_ORDER_NR_PAGES - 1)) == 0))
- p = pfn_to_page(page_to_pfn(page) + i);
-+ for (i = 1; i < nr_pages; i++, p = mem_map_next(p, page, i)) {
++ for (i = 1; i < nr_pages; i++) {
++ struct page *p = page + i;
++
__SetPageTail(p);
p->first_page = page;
}
}
-+#endif
- static void destroy_compound_page(struct page *page, unsigned long order)
+-static void destroy_compound_page(struct page *page, unsigned long order)
++#ifdef CONFIG_HUGETLBFS
++void prep_compound_gigantic_page(struct page *page, unsigned long order)
{
int i;
int nr_pages = 1 << order;
-- struct page *p = page + 1;
+ struct page *p = page + 1;
++
++ set_compound_page_dtor(page, free_compound_page);
++ set_compound_order(page, order);
++ __SetPageHead(page);
++ for (i = 1; i < nr_pages; i++, p = mem_map_next(p, page, i)) {
++ __SetPageTail(p);
++ p->first_page = page;
++ }
++}
++#endif
++
++static void destroy_compound_page(struct page *page, unsigned long order)
++{
++ int i;
++ int nr_pages = 1 << order;
if (unlikely(compound_order(page) != order))
bad_page(page);
-@@ -293,9 +313,8 @@ static void destroy_compound_page(struct
+@@ -293,9 +313,8 @@
if (unlikely(!PageHead(page)))
bad_page(page);
__ClearPageHead(page);
if (unlikely(!PageTail(p) |
(p->first_page != page)))
-@@ -514,6 +533,14 @@ static void __free_pages_ok(struct page
+@@ -514,6 +533,14 @@
int i;
int reserved = 0;
for (i = 0 ; i < (1 << order) ; ++i)
reserved += free_pages_check(page + i);
if (reserved)
-@@ -974,6 +1001,14 @@ static void free_hot_cold_page(struct pa
+@@ -973,6 +1000,14 @@
+ struct zone *zone = page_zone(page);
struct per_cpu_pages *pcp;
unsigned long flags;
-
++
+#ifdef CONFIG_XEN
+ if (PageForeign(page)) {
+ PageForeignDestructor(page, 0);
+ }
+#endif
+ trace_page_free(page, 0);
-+
+
if (PageAnon(page))
page->mapping = NULL;
- if (free_pages_check(page))
-@@ -1103,14 +1138,6 @@ failed:
+@@ -1103,14 +1138,6 @@
return NULL;
}
#ifdef CONFIG_FAIL_PAGE_ALLOC
static struct fail_page_alloc_attr {
-@@ -1223,7 +1250,7 @@ int zone_watermark_ok(struct zone *z, in
+@@ -1223,7 +1250,7 @@
if (alloc_flags & ALLOC_HARDER)
min -= min / 4;
return 0;
for (o = 0; o < order; o++) {
/* At the next order, this order's pages become unavailable */
-@@ -1412,8 +1439,10 @@ zonelist_scan:
+@@ -1412,8 +1439,10 @@
}
page = buffered_rmqueue(preferred_zone, zone, order, gfp_mask);
- if (page)
+- break;
+ if (page) {
+ page->reserve = !!(alloc_flags & ALLOC_NO_WATERMARKS);
- break;
++ break;
+ }
this_zone_full:
if (NUMA_BUILD)
zlc_mark_zone_full(zonelist, z);
-@@ -1435,6 +1464,47 @@ try_next_zone:
+@@ -1435,6 +1464,47 @@
}
/*
* This is the 'heart' of the zoned buddy allocator.
*/
struct page *
-@@ -1449,7 +1519,7 @@ __alloc_pages_internal(gfp_t gfp_mask, u
+@@ -1449,7 +1519,7 @@
struct reclaim_state reclaim_state;
struct task_struct *p = current;
int do_retry;
unsigned long did_some_progress;
unsigned long pages_reclaimed = 0;
-@@ -1492,49 +1562,33 @@ restart:
+@@ -1492,55 +1562,43 @@
* OK, we're below the kswapd watermark and have kicked background
* reclaim. Now things get more complex, so set up alloc_flags according
* to how we want to proceed.
- * cannot run direct reclaim, or if the caller has realtime scheduling
- * policy or is asking for __GFP_HIGH memory. GFP_ATOMIC requests will
- * set both ALLOC_HARDER (!wait) and ALLOC_HIGH (__GFP_HIGH).
- */
+- */
- alloc_flags = ALLOC_WMARK_MIN;
- if ((unlikely(rt_task(p)) && !in_interrupt()) || !wait)
- alloc_flags |= ALLOC_HARDER;
- alloc_flags |= ALLOC_HIGH;
- if (wait)
- alloc_flags |= ALLOC_CPUSET;
-+ alloc_flags = gfp_to_alloc_flags(gfp_mask);
-
+-
- /*
- * Go through the zonelist again. Let __GFP_HIGH and allocations
- * coming from realtime tasks go deeper into reserves.
- * Ignore cpuset if GFP_ATOMIC (!wait) rather than fail alloc.
- * See also cpuset_zone_allowed() comment in kernel/cpuset.c.
- */
++ */
++ alloc_flags = gfp_to_alloc_flags(gfp_mask);
++
+ /* This is the last chance, in general, before the goto nopage. */
page = get_page_from_freelist(gfp_mask, nodemask, order, zonelist,
- high_zoneidx, alloc_flags);
}
goto nopage;
}
-@@ -1543,6 +1597,10 @@ nofail_alloc:
- if (!wait)
- goto nopage;
-+ /* Avoid recursion of direct reclaim */
-+ if (p->flags & PF_MEMALLOC)
+ /* Atomic allocations - we can't balance anything */
+ if (!wait)
+ goto nopage;
+
- cond_resched();
++ /* Avoid recursion of direct reclaim */
++ if (p->flags & PF_MEMALLOC)
+ goto nopage;
- /* We now go into synchronous reclaim */
-@@ -1631,13 +1689,20 @@ nofail_alloc:
+ cond_resched();
+@@ -1631,13 +1689,20 @@
nopage:
if (!(gfp_mask & __GFP_NOWARN) && printk_ratelimit()) {
return page;
}
EXPORT_SYMBOL(__alloc_pages_internal);
-@@ -1896,9 +1961,9 @@ void show_free_areas(void)
+@@ -1896,9 +1961,9 @@
"\n",
zone->name,
K(zone_page_state(zone, NR_FREE_PAGES)),
K(zone_page_state(zone, NR_ACTIVE)),
K(zone_page_state(zone, NR_INACTIVE)),
K(zone->present_pages),
-@@ -4139,7 +4204,7 @@ static void calculate_totalreserve_pages
+@@ -4139,7 +4204,7 @@
}
/* we treat pages_high as reserved pages. */
if (max > zone->present_pages)
max = zone->present_pages;
-@@ -4189,14 +4254,15 @@ static void setup_per_zone_lowmem_reserv
+@@ -4189,14 +4254,15 @@
}
/**
* with respect to min_free_kbytes.
*/
-void setup_per_zone_pages_min(void)
-+static void __setup_per_zone_pages_min(void)
- {
+-{
- unsigned long pages_min = min_free_kbytes >> (PAGE_SHIFT - 10);
++static void __setup_per_zone_pages_min(void)
++{
+ unsigned pages_min = min_free_kbytes >> (PAGE_SHIFT - 10);
+ unsigned pages_emerg = var_free_kbytes >> (PAGE_SHIFT - 10);
unsigned long lowmem_pages = 0;
struct zone *zone;
unsigned long flags;
-@@ -4208,11 +4274,13 @@ void setup_per_zone_pages_min(void)
+@@ -4208,11 +4274,13 @@
}
for_each_zone(zone) {
- u64 tmp;
-+ u64 tmp, tmp_emerg;
-
+-
- spin_lock_irqsave(&zone->lru_lock, flags);
++ u64 tmp, tmp_emerg;
++
+ spin_lock_irqsave(&zone->lock, flags);
tmp = (u64)pages_min * zone->present_pages;
do_div(tmp, lowmem_pages);
if (is_highmem(zone)) {
/*
* __GFP_HIGH and PF_MEMALLOC allocations usually don't
-@@ -4231,24 +4299,92 @@ void setup_per_zone_pages_min(void)
+@@ -4231,23 +4299,91 @@
if (min_pages > 128)
min_pages = 128;
zone->pages_min = min_pages;
/* update totalreserve_pages */
calculate_totalreserve_pages();
}
-
++
+void setup_per_zone_pages_min(void)
+{
+ unsigned long flags;
+ return err;
+}
+EXPORT_SYMBOL_GPL(adjust_memalloc_reserve);
-+
+
/*
* Initialise min_free_kbytes.
- *
-@@ -4284,7 +4420,7 @@ static int __init init_per_zone_pages_mi
+@@ -4284,7 +4420,7 @@
min_free_kbytes = 128;
if (min_free_kbytes > 65536)
min_free_kbytes = 65536;
setup_per_zone_lowmem_reserve();
return 0;
}
-diff -purN linux-2.6.27/mm/page_io.c linux-2.6.27.19-5.1/mm/page_io.c
---- linux-2.6.27/mm/page_io.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/page_io.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 mm/page_io.c
+--- a/mm/page_io.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/page_io.c Wed May 06 16:57:03 2009 +0100
@@ -17,6 +17,8 @@
#include <linux/bio.h>
#include <linux/swapops.h>
#include <asm/pgtable.h>
static struct bio *get_swap_bio(gfp_t gfp_flags, pgoff_t index,
-@@ -97,11 +99,23 @@ int swap_writepage(struct page *page, st
+@@ -97,11 +99,23 @@
{
struct bio *bio;
int ret = 0, rw = WRITE;
bio = get_swap_bio(GFP_NOIO, page_private(page), page,
end_swap_bio_write);
if (bio == NULL) {
-@@ -114,19 +128,61 @@ int swap_writepage(struct page *page, st
+@@ -114,19 +128,61 @@
rw |= (1 << BIO_RW_SYNC);
count_vm_event(PSWPOUT);
set_page_writeback(page);
bio = get_swap_bio(GFP_KERNEL, page_private(page), page,
end_swap_bio_read);
if (bio == NULL) {
-diff -purN linux-2.6.27/mm/page_isolation.c linux-2.6.27.19-5.1/mm/page_isolation.c
---- linux-2.6.27/mm/page_isolation.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/page_isolation.c 2009-03-25 16:11:31.000000000 +0000
-@@ -130,10 +130,11 @@ int test_pages_isolated(unsigned long st
+diff -r 9608d5473017 mm/page_isolation.c
+--- a/mm/page_isolation.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/page_isolation.c Wed May 06 16:57:03 2009 +0100
+@@ -130,10 +130,11 @@
if (page && get_pageblock_migratetype(page) != MIGRATE_ISOLATE)
break;
}
spin_lock_irqsave(&zone->lock, flags);
ret = __test_page_isolated_in_pageblock(start_pfn, end_pfn);
spin_unlock_irqrestore(&zone->lock, flags);
-diff -purN linux-2.6.27/mm/pdflush.c linux-2.6.27.19-5.1/mm/pdflush.c
---- linux-2.6.27/mm/pdflush.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/pdflush.c 2009-03-25 16:11:30.000000000 +0000
-@@ -223,6 +223,7 @@ int pdflush_operation(void (*fn)(unsigne
+diff -r 9608d5473017 mm/pdflush.c
+--- a/mm/pdflush.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/pdflush.c Wed May 06 16:57:03 2009 +0100
+@@ -223,6 +223,7 @@
return ret;
}
static void start_one_pdflush_thread(void)
{
-diff -purN linux-2.6.27/mm/reserve.c linux-2.6.27.19-5.1/mm/reserve.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/reserve.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 mm/reserve.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/mm/reserve.c Wed May 06 16:57:03 2009 +0100
@@ -0,0 +1,637 @@
+/*
+ * Memory reserve management.
+ __free_pages(page, order);
+ mem_reserve_pages_charge(res, -(1 << order));
+}
-diff -purN linux-2.6.27/mm/rmap.c linux-2.6.27.19-5.1/mm/rmap.c
---- linux-2.6.27/mm/rmap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/rmap.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 mm/rmap.c
+--- a/mm/rmap.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/rmap.c Wed May 06 16:57:03 2009 +0100
@@ -55,7 +55,33 @@
struct kmem_cache *anon_vma_cachep;
int anon_vma_prepare(struct vm_area_struct *vma)
{
struct anon_vma *anon_vma = vma->anon_vma;
-@@ -63,20 +89,17 @@ int anon_vma_prepare(struct vm_area_stru
+@@ -63,20 +89,17 @@
might_sleep();
if (unlikely(!anon_vma)) {
struct mm_struct *mm = vma->vm_mm;
/* page_table_lock to protect against threads */
spin_lock(&mm->page_table_lock);
-@@ -87,8 +110,7 @@ int anon_vma_prepare(struct vm_area_stru
+@@ -87,8 +110,7 @@
}
spin_unlock(&mm->page_table_lock);
if (unlikely(allocated))
anon_vma_free(allocated);
}
-diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
---- linux-2.6.27/mm/slab.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/slab.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 mm/slab.c
+--- a/mm/slab.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/slab.c Wed May 06 16:57:03 2009 +0100
@@ -116,6 +116,8 @@
#include <asm/tlbflush.h>
#include <asm/page.h>
/*
* DEBUG - 1 for kmem_cache_create() to honour; SLAB_RED_ZONE & SLAB_POISON.
* 0 for faster, smaller code (especially in the critical paths).
-@@ -264,7 +266,8 @@ struct array_cache {
+@@ -264,7 +266,8 @@
unsigned int avail;
unsigned int limit;
unsigned int batchcount;
spinlock_t lock;
void *entry[]; /*
* Must have this definition in here for the proper
-@@ -760,6 +763,27 @@ static inline struct array_cache *cpu_ca
+@@ -760,6 +763,27 @@
return cachep->array[smp_processor_id()];
}
static inline struct kmem_cache *__find_general_cachep(size_t size,
gfp_t gfpflags)
{
-@@ -959,6 +983,7 @@ static struct array_cache *alloc_arrayca
+@@ -959,6 +983,7 @@
nc->limit = entries;
nc->batchcount = batchcount;
nc->touched = 0;
spin_lock_init(&nc->lock);
}
return nc;
-@@ -1661,7 +1686,8 @@ __initcall(cpucache_init);
+@@ -1661,7 +1686,8 @@
* did not request dmaable memory, we might get it, but that
* would be relatively rare and ignorable.
*/
{
struct page *page;
int nr_pages;
-@@ -1683,6 +1709,7 @@ static void *kmem_getpages(struct kmem_c
+@@ -1683,6 +1709,7 @@
if (!page)
return NULL;
nr_pages = (1 << cachep->gfporder);
if (cachep->flags & SLAB_RECLAIM_ACCOUNT)
add_zone_page_state(page_zone(page),
-@@ -2103,6 +2130,7 @@ static int __init_refok setup_cpu_cache(
+@@ -2103,6 +2130,7 @@
cpu_cache_get(cachep)->limit = BOOT_CPUCACHE_ENTRIES;
cpu_cache_get(cachep)->batchcount = 1;
cpu_cache_get(cachep)->touched = 0;
cachep->batchcount = 1;
cachep->limit = BOOT_CPUCACHE_ENTRIES;
return 0;
-@@ -2608,7 +2636,7 @@ static struct slab *alloc_slabmgmt(struc
+@@ -2608,7 +2636,7 @@
if (OFF_SLAB(cachep)) {
/* Slab management obj is off-slab. */
slabp = kmem_cache_alloc_node(cachep->slabp_cache,
if (!slabp)
return NULL;
} else {
-@@ -2757,6 +2785,7 @@ static int cache_grow(struct kmem_cache
+@@ -2757,6 +2785,7 @@
size_t offset;
gfp_t local_flags;
struct kmem_list3 *l3;
/*
* Be lazy and only check for valid flags here, keeping it out of the
-@@ -2795,7 +2824,7 @@ static int cache_grow(struct kmem_cache
+@@ -2795,7 +2824,7 @@
* 'nodeid'.
*/
if (!objp)
if (!objp)
goto failed;
-@@ -2812,6 +2841,8 @@ static int cache_grow(struct kmem_cache
+@@ -2812,6 +2841,8 @@
if (local_flags & __GFP_WAIT)
local_irq_disable();
check_irq_off();
spin_lock(&l3->list_lock);
/* Make slab active. */
-@@ -2946,7 +2977,8 @@ bad:
+@@ -2946,7 +2977,8 @@
#define check_slabp(x,y) do { } while(0)
#endif
{
int batchcount;
struct kmem_list3 *l3;
-@@ -2956,6 +2988,8 @@ static void *cache_alloc_refill(struct k
+@@ -2956,6 +2988,8 @@
retry:
check_irq_off();
node = numa_node_id();
ac = cpu_cache_get(cachep);
batchcount = ac->batchcount;
if (!ac->touched && batchcount > BATCHREFILL_LIMIT) {
-@@ -3023,11 +3057,14 @@ alloc_done:
+@@ -3023,11 +3057,14 @@
if (unlikely(!ac->avail)) {
int x;
return NULL;
if (!ac->avail) /* objects refilled by interrupt? */
-@@ -3182,17 +3219,18 @@ static inline void *____cache_alloc(stru
+@@ -3182,17 +3219,18 @@
{
void *objp;
struct array_cache *ac;
}
return objp;
}
-@@ -3236,7 +3274,7 @@ static void *fallback_alloc(struct kmem_
+@@ -3236,7 +3274,7 @@
struct zone *zone;
enum zone_type high_zoneidx = gfp_zone(flags);
void *obj = NULL;
if (flags & __GFP_THISNODE)
return NULL;
-@@ -3272,10 +3310,11 @@ retry:
+@@ -3272,10 +3310,11 @@
if (local_flags & __GFP_WAIT)
local_irq_enable();
kmem_flagcheck(cache, flags);
/*
* Insert into the appropriate per node queues
*/
-@@ -3314,6 +3353,9 @@ static void *____cache_alloc_node(struct
+@@ -3314,6 +3353,9 @@
l3 = cachep->nodelists[nodeid];
BUG_ON(!l3);
retry:
check_irq_off();
spin_lock(&l3->list_lock);
-@@ -3351,6 +3393,7 @@ retry:
+@@ -3351,6 +3393,7 @@
must_grow:
spin_unlock(&l3->list_lock);
x = cache_grow(cachep, flags | GFP_THISNODE, nodeid, NULL);
if (x)
goto retry;
-@@ -3803,6 +3846,81 @@ const char *kmem_cache_name(struct kmem_
+@@ -3803,6 +3846,81 @@
EXPORT_SYMBOL_GPL(kmem_cache_name);
/*
* This initializes kmem_list3 or resizes various caches for all nodes.
*/
static int alloc_kmemlist(struct kmem_cache *cachep)
-diff -purN linux-2.6.27/mm/slob.c linux-2.6.27.19-5.1/mm/slob.c
---- linux-2.6.27/mm/slob.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/slob.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 mm/slob.c
+--- a/mm/slob.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/slob.c Wed May 06 16:57:03 2009 +0100
@@ -66,6 +66,7 @@
#include <linux/rcupdate.h>
#include <linux/list.h>
/*
* slob_block has a field 'units', which indicates size of block if +ve,
-@@ -183,6 +184,11 @@ struct slob_rcu {
+@@ -183,6 +184,11 @@
static DEFINE_SPINLOCK(slob_lock);
/*
* Encode the given size and next info into a free slob block s.
*/
static void set_slob(slob_t *s, slobidx_t size, slob_t *next)
-@@ -232,7 +238,7 @@ static int slob_last(slob_t *s)
+@@ -232,7 +238,7 @@
static void *slob_new_page(gfp_t gfp, int order, int node)
{
#ifdef CONFIG_NUMA
if (node != -1)
-@@ -244,6 +250,8 @@ static void *slob_new_page(gfp_t gfp, in
+@@ -243,6 +249,8 @@
+
if (!page)
return NULL;
-
-+ slob_reserve = page->reserve;
+
++ slob_reserve = page->reserve;
+
return page_address(page);
}
-
-@@ -309,6 +317,11 @@ static void *slob_alloc(size_t size, gfp
+@@ -309,6 +317,11 @@
slob_t *b = NULL;
unsigned long flags;
if (size < SLOB_BREAK1)
slob_list = &free_slob_small;
else if (size < SLOB_BREAK2)
-@@ -347,6 +360,7 @@ static void *slob_alloc(size_t size, gfp
+@@ -347,6 +360,7 @@
}
spin_unlock_irqrestore(&slob_lock, flags);
/* Not enough space: must allocate a new page */
if (!b) {
b = slob_new_page(gfp & ~__GFP_ZERO, 0, node);
-@@ -645,3 +659,70 @@ void __init kmem_cache_init(void)
+@@ -645,3 +659,70 @@
{
slob_ready = 1;
}
+ return pages;
+}
+EXPORT_SYMBOL_GPL(kmalloc_estimate_bytes);
-diff -purN linux-2.6.27/mm/slub.c linux-2.6.27.19-5.1/mm/slub.c
---- linux-2.6.27/mm/slub.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/slub.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 mm/slub.c
+--- a/mm/slub.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/slub.c Wed May 06 16:57:03 2009 +0100
@@ -23,6 +23,7 @@
#include <linux/kallsyms.h>
#include <linux/memory.h>
/*
* Lock order:
-@@ -1106,7 +1107,8 @@ static void setup_object(struct kmem_cac
+@@ -1106,7 +1107,8 @@
s->ctor(object);
}
{
struct page *page;
void *start;
-@@ -1120,6 +1122,8 @@ static struct page *new_slab(struct kmem
+@@ -1119,6 +1121,8 @@
+ flags & (GFP_RECLAIM_MASK | GFP_CONSTRAINT_MASK), node);
if (!page)
goto out;
-
-+ *reserve = page->reserve;
+
++ *reserve = page->reserve;
+
inc_slabs_node(s, page_to_nid(page), page->objects);
page->slab = s;
- page->flags |= 1 << PG_slab;
-@@ -1503,10 +1507,20 @@ static void *__slab_alloc(struct kmem_ca
+@@ -1503,10 +1507,20 @@
{
void **object;
struct page *new;
if (!c->page)
goto new_slab;
-@@ -1520,8 +1534,8 @@ load_freelist:
+@@ -1520,8 +1534,8 @@
object = c->page->freelist;
if (unlikely(!object))
goto another_slab;
c->freelist = object[c->offset];
c->page->inuse = c->page->objects;
-@@ -1543,16 +1557,18 @@ new_slab:
+@@ -1543,16 +1557,18 @@
goto load_freelist;
}
stat(c, ALLOC_SLAB);
if (c->page)
flush_slab(s, c);
-@@ -1562,10 +1578,21 @@ new_slab:
+@@ -1562,9 +1578,20 @@
goto load_freelist;
}
return NULL;
+ if (PageSlubDebug(c->page) &&
+ !alloc_debug_processing(s, c->page, object, addr))
goto another_slab;
-
++
+ /*
+ * Avoid the slub fast path in slab_alloc() by not setting
+ * c->freelist and the fast path in slab_free() by making
+ * We use this for for debug and reserve checks which need
+ * to be done for each allocation.
+ */
-+
+
c->page->inuse++;
c->page->freelist = object[c->offset];
- c->node = -1;
-@@ -2078,10 +2105,11 @@ static struct kmem_cache_node *early_kme
+@@ -2078,10 +2105,11 @@
struct page *page;
struct kmem_cache_node *n;
unsigned long flags;
BUG_ON(!page);
if (page_to_nid(page) != node) {
-@@ -2371,6 +2399,42 @@ const char *kmem_cache_name(struct kmem_
+@@ -2370,6 +2398,42 @@
+ return s->name;
}
EXPORT_SYMBOL(kmem_cache_name);
-
++
+/*
+ * Calculate the upper bound of pages required to sequentially allocate
+ * @objects objects from @cachep.
+ return pages;
+}
+EXPORT_SYMBOL_GPL(kmem_alloc_estimate);
-+
+
static void list_slab_objects(struct kmem_cache *s, struct page *page,
const char *text)
- {
-@@ -2662,6 +2726,7 @@ void *__kmalloc(size_t size, gfp_t flags
+@@ -2662,6 +2726,7 @@
}
EXPORT_SYMBOL(__kmalloc);
static void *kmalloc_large_node(size_t size, gfp_t flags, int node)
{
struct page *page = alloc_pages_node(node, flags | __GFP_COMP,
-@@ -2673,7 +2738,6 @@ static void *kmalloc_large_node(size_t s
+@@ -2673,7 +2738,6 @@
return NULL;
}
void *__kmalloc_node(size_t size, gfp_t flags, int node)
{
struct kmem_cache *s;
-@@ -2748,6 +2812,57 @@ void kfree(const void *x)
+@@ -2746,6 +2810,57 @@
+ slab_free(page->slab, page, object, __builtin_return_address(0));
+ }
EXPORT_SYMBOL(kfree);
-
- /*
++
++/*
+ * Calculate the upper bound of pages required to sequentially allocate
+ * @count objects of @size bytes from kmalloc given @flags.
+ */
+ return pages;
+}
+EXPORT_SYMBOL_GPL(kmalloc_estimate_bytes);
-+
-+/*
+
+ /*
* kmem_cache_shrink removes empty slabs from the partial lists and sorts
- * the remaining slabs by the number of items in use. The slabs with the
- * most items in use come first. New allocations will then fill those up
-diff -purN linux-2.6.27/mm/swap.c linux-2.6.27.19-5.1/mm/swap.c
---- linux-2.6.27/mm/swap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/swap.c 2009-03-25 16:11:30.000000000 +0000
-@@ -244,7 +244,6 @@ void lru_add_drain(void)
+diff -r 9608d5473017 mm/swap.c
+--- a/mm/swap.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/swap.c Wed May 06 16:57:03 2009 +0100
+@@ -244,7 +244,6 @@
put_cpu();
}
static void lru_add_drain_per_cpu(struct work_struct *dummy)
{
lru_add_drain();
-@@ -258,18 +257,6 @@ int lru_add_drain_all(void)
+@@ -257,18 +256,6 @@
+ {
return schedule_on_each_cpu(lru_add_drain_per_cpu);
}
-
+-
-#else
-
-/*
- return 0;
-}
-#endif
--
+
/*
* Batched page_cache_release(). Decrement the reference count on all the
- * passed pages. If it fell to zero then remove the page from the LRU and
-diff -purN linux-2.6.27/mm/swap_state.c linux-2.6.27.19-5.1/mm/swap_state.c
---- linux-2.6.27/mm/swap_state.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/swap_state.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 mm/swap_state.c
+--- a/mm/swap_state.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/swap_state.c Wed May 06 16:57:03 2009 +0100
@@ -27,8 +27,8 @@
*/
static const struct address_space_operations swap_aops = {
.migratepage = migrate_page,
};
-diff -purN linux-2.6.27/mm/swapfile.c linux-2.6.27.19-5.1/mm/swapfile.c
---- linux-2.6.27/mm/swapfile.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/swapfile.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 mm/swapfile.c
+--- a/mm/swapfile.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/swapfile.c Wed May 06 16:57:03 2009 +0100
@@ -13,6 +13,10 @@
#include <linux/swap.h>
#include <linux/vmalloc.h>
static DEFINE_SPINLOCK(swap_lock);
static unsigned int nr_swapfiles;
-@@ -1013,6 +1018,14 @@ static void destroy_swap_extents(struct
+@@ -1013,6 +1018,14 @@
list_del(&se->list);
kfree(se);
}
}
/*
-@@ -1087,7 +1100,9 @@ add_swap_extent(struct swap_info_struct
+@@ -1087,7 +1100,9 @@
*/
static int setup_swap_extents(struct swap_info_struct *sis, sector_t *span)
{
unsigned blocks_per_page;
unsigned long page_no;
unsigned blkbits;
-@@ -1098,13 +1113,22 @@ static int setup_swap_extents(struct swa
+@@ -1098,10 +1113,19 @@
int nr_extents = 0;
int ret;
if (S_ISBLK(inode->i_mode)) {
ret = add_swap_extent(sis, 0, sis->max, 0);
*span = sis->pages;
- goto done;
- }
-
++ goto done;
++ }
++
+ if (mapping->a_ops->swapon) {
+ ret = mapping->a_ops->swapon(swap_file);
+ if (!ret) {
+ ret = add_swap_extent(sis, 0, sis->max, 0);
+ *span = sis->pages;
+ }
-+ goto done;
-+ }
-+
- blkbits = inode->i_blkbits;
- blocks_per_page = PAGE_SIZE >> blkbits;
+ goto done;
+ }
-@@ -1204,7 +1228,7 @@ int page_queue_congested(struct page *pa
+@@ -1204,7 +1228,7 @@
}
#endif
{
struct swap_info_struct * p = NULL;
unsigned short *swap_map;
-@@ -1321,6 +1345,7 @@ asmlinkage long sys_swapoff(const char _
+@@ -1321,6 +1345,7 @@
swap_map = p->swap_map;
p->swap_map = NULL;
p->flags = 0;
spin_unlock(&swap_lock);
mutex_unlock(&swapon_mutex);
vfree(swap_map);
-@@ -1448,7 +1473,7 @@ __initcall(procswaps_init);
+@@ -1448,7 +1473,7 @@
*
* The swapon system call
*/
{
struct swap_info_struct * p;
char *name = NULL;
-@@ -1677,7 +1702,7 @@ asmlinkage long sys_swapon(const char __
+@@ -1677,7 +1702,7 @@
else
p->prio = --least_priority;
p->swap_map = swap_map;
nr_swap_pages += nr_good_pages;
total_swap_pages += nr_good_pages;
-@@ -1700,6 +1725,7 @@ asmlinkage long sys_swapon(const char __
+@@ -1700,6 +1725,7 @@
} else {
swap_info[prev].next = p - swap_info;
}
spin_unlock(&swap_lock);
mutex_unlock(&swapon_mutex);
error = 0;
-@@ -1750,6 +1776,24 @@ void si_swapinfo(struct sysinfo *val)
+@@ -1750,6 +1776,24 @@
spin_unlock(&swap_lock);
}
/*
* Verify that a swap entry is valid and increment its swap map count.
*
-@@ -1798,6 +1842,38 @@ get_swap_info_struct(unsigned type)
+@@ -1797,6 +1841,38 @@
+ {
return &swap_info[type];
}
-
++
+struct swap_info_struct *page_swap_info(struct page *page)
+{
+ swp_entry_t swap = { .val = page_private(page) };
+ return swp_offset(swap);
+}
+EXPORT_SYMBOL_GPL(__page_file_index);
-+
+
/*
* swap_lock prevents swap_map being freed. Don't grab an extra
- * reference on the swaphandle, it doesn't matter if it becomes unused.
-diff -purN linux-2.6.27/mm/thrash.c linux-2.6.27.19-5.1/mm/thrash.c
---- linux-2.6.27/mm/thrash.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/thrash.c 2009-03-25 16:11:31.000000000 +0000
-@@ -31,6 +31,9 @@ void grab_swap_token(void)
+diff -r 9608d5473017 mm/thrash.c
+--- a/mm/thrash.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/thrash.c Wed May 06 16:57:03 2009 +0100
+@@ -31,6 +31,9 @@
int current_interval;
global_faults++;
current_interval = global_faults - current->mm->faultstamp;
-diff -purN linux-2.6.27/mm/vmstat.c linux-2.6.27.19-5.1/mm/vmstat.c
---- linux-2.6.27/mm/vmstat.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/vmstat.c 2009-03-25 16:11:31.000000000 +0000
-@@ -692,9 +692,9 @@ static void zoneinfo_show_print(struct s
+diff -r 9608d5473017 mm/vmstat.c
+--- a/mm/vmstat.c Wed May 06 15:47:13 2009 +0100
++++ b/mm/vmstat.c Wed May 06 16:57:03 2009 +0100
+@@ -692,9 +692,9 @@
"\n spanned %lu"
"\n present %lu",
zone_page_state(zone, NR_FREE_PAGES),
zone->pages_scanned,
zone->nr_scan_active, zone->nr_scan_inactive,
zone->spanned_pages,
-diff -purN linux-2.6.27/net/8021q/vlan.c linux-2.6.27.19-5.1/net/8021q/vlan.c
---- linux-2.6.27/net/8021q/vlan.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/8021q/vlan.c 2009-03-25 16:11:02.000000000 +0000
-@@ -394,6 +394,7 @@ static void vlan_transfer_features(struc
+diff -r 9608d5473017 net/8021q/vlan.c
+--- a/net/8021q/vlan.c Wed May 06 15:47:13 2009 +0100
++++ b/net/8021q/vlan.c Wed May 06 16:57:03 2009 +0100
+@@ -394,6 +394,7 @@
vlandev->features &= ~dev->vlan_features;
vlandev->features |= dev->features & dev->vlan_features;
if (old_features != vlandev->features)
netdev_features_change(vlandev);
-diff -purN linux-2.6.27/net/8021q/vlan_core.c linux-2.6.27.19-5.1/net/8021q/vlan_core.c
---- linux-2.6.27/net/8021q/vlan_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/8021q/vlan_core.c 2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/8021q/vlan_core.c
+--- a/net/8021q/vlan_core.c Wed May 06 15:47:13 2009 +0100
++++ b/net/8021q/vlan_core.c Wed May 06 16:57:03 2009 +0100
@@ -3,11 +3,20 @@
#include <linux/if_vlan.h>
#include "vlan.h"
if (skb_bond_should_drop(skb)) {
dev_kfree_skb_any(skb);
-@@ -15,23 +24,35 @@ int __vlan_hwaccel_rx(struct sk_buff *sk
+@@ -15,23 +24,35 @@
}
skb->vlan_tci = vlan_tci;
switch (skb->pkt_type) {
case PACKET_BROADCAST:
break;
-@@ -43,13 +64,12 @@ int __vlan_hwaccel_rx(struct sk_buff *sk
+@@ -43,13 +64,12 @@
* This allows the VLAN to have a different MAC than the
* underlying device, and still route correctly. */
if (!compare_ether_addr(eth_hdr(skb)->h_dest,
struct net_device *vlan_dev_real_dev(const struct net_device *dev)
{
-diff -purN linux-2.6.27/net/8021q/vlan_dev.c linux-2.6.27.19-5.1/net/8021q/vlan_dev.c
---- linux-2.6.27/net/8021q/vlan_dev.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/8021q/vlan_dev.c 2009-03-25 16:11:02.000000000 +0000
-@@ -607,6 +607,7 @@ static int vlan_dev_init(struct net_devi
+diff -r 9608d5473017 net/8021q/vlan_dev.c
+--- a/net/8021q/vlan_dev.c Wed May 06 15:47:13 2009 +0100
++++ b/net/8021q/vlan_dev.c Wed May 06 16:57:03 2009 +0100
+@@ -607,6 +607,7 @@
(1<<__LINK_STATE_PRESENT);
dev->features |= real_dev->features & real_dev->vlan_features;
/* ipv6 shared card related stuff */
dev->dev_id = real_dev->dev_id;
-diff -purN linux-2.6.27/net/Kconfig linux-2.6.27.19-5.1/net/Kconfig
---- linux-2.6.27/net/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/Kconfig 2009-03-25 16:11:00.000000000 +0000
-@@ -190,6 +190,7 @@ source "net/lapb/Kconfig"
+diff -r 9608d5473017 net/Kconfig
+--- a/net/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/net/Kconfig Wed May 06 16:57:04 2009 +0100
+@@ -190,6 +190,7 @@
source "net/econet/Kconfig"
source "net/wanrouter/Kconfig"
source "net/sched/Kconfig"
menu "Network testing"
-@@ -248,4 +249,7 @@ endmenu
+@@ -248,4 +249,7 @@
source "net/rfkill/Kconfig"
source "net/9p/Kconfig"
+ def_bool n
+
endif # if NET
-diff -purN linux-2.6.27/net/Makefile linux-2.6.27.19-5.1/net/Makefile
---- linux-2.6.27/net/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/Makefile 2009-03-25 16:11:02.000000000 +0000
-@@ -55,6 +55,9 @@ obj-$(CONFIG_NETLABEL) += netlabel/
+diff -r 9608d5473017 net/Makefile
+--- a/net/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/net/Makefile Wed May 06 16:57:04 2009 +0100
+@@ -55,6 +55,9 @@
obj-$(CONFIG_IUCV) += iucv/
obj-$(CONFIG_RFKILL) += rfkill/
obj-$(CONFIG_NET_9P) += 9p/
ifeq ($(CONFIG_NET),y)
obj-$(CONFIG_SYSCTL) += sysctl_net.o
-diff -purN linux-2.6.27/net/atm/svc.c linux-2.6.27.19-5.1/net/atm/svc.c
---- linux-2.6.27/net/atm/svc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/atm/svc.c 2009-03-25 16:11:02.000000000 +0000
-@@ -293,7 +293,10 @@ static int svc_listen(struct socket *soc
+diff -r 9608d5473017 net/atm/svc.c
+--- a/net/atm/svc.c Wed May 06 15:47:13 2009 +0100
++++ b/net/atm/svc.c Wed May 06 16:57:04 2009 +0100
+@@ -293,7 +293,10 @@
error = -EINVAL;
goto out;
}
set_bit(ATM_VF_WAITING, &vcc->flags);
prepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE);
sigd_enq(vcc,as_listen,NULL,NULL,&vcc->local);
-@@ -307,6 +310,7 @@ static int svc_listen(struct socket *soc
+@@ -307,6 +310,7 @@
goto out;
}
set_bit(ATM_VF_LISTEN,&vcc->flags);
sk->sk_max_ack_backlog = backlog > 0 ? backlog : ATM_BACKLOG_DEFAULT;
error = -sk->sk_err;
out:
-diff -purN linux-2.6.27/net/bluetooth/hidp/core.c linux-2.6.27.19-5.1/net/bluetooth/hidp/core.c
---- linux-2.6.27/net/bluetooth/hidp/core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/bluetooth/hidp/core.c 2009-03-25 16:11:00.000000000 +0000
-@@ -684,6 +684,10 @@ static const struct {
+diff -r 9608d5473017 net/bluetooth/hidp/core.c
+--- a/net/bluetooth/hidp/core.c Wed May 06 15:47:13 2009 +0100
++++ b/net/bluetooth/hidp/core.c Wed May 06 16:57:04 2009 +0100
+@@ -684,6 +684,10 @@
} hidp_blacklist[] = {
/* Apple wireless Mighty Mouse */
{ 0x05ac, 0x030c, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL },
{ } /* Terminating entry */
};
-diff -purN linux-2.6.27/net/bridge/br_if.c linux-2.6.27.19-5.1/net/bridge/br_if.c
---- linux-2.6.27/net/bridge/br_if.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/bridge/br_if.c 2009-03-25 16:11:02.000000000 +0000
-@@ -271,6 +271,11 @@ int br_add_bridge(const char *name)
+diff -r 9608d5473017 net/bridge/br_if.c
+--- a/net/bridge/br_if.c Wed May 06 15:47:13 2009 +0100
++++ b/net/bridge/br_if.c Wed May 06 16:57:04 2009 +0100
+@@ -271,6 +271,11 @@
if (!dev)
return -ENOMEM;
rtnl_lock();
if (strchr(dev->name, '%')) {
ret = dev_alloc_name(dev, dev->name);
-@@ -287,6 +292,8 @@ int br_add_bridge(const char *name)
+@@ -287,6 +292,8 @@
unregister_netdevice(dev);
out:
rtnl_unlock();
return ret;
out_free:
-@@ -318,6 +325,8 @@ int br_del_bridge(const char *name)
+@@ -318,6 +325,8 @@
del_br(netdev_priv(dev));
rtnl_unlock();
return ret;
}
-diff -purN linux-2.6.27/net/can/af_can.c linux-2.6.27.19-5.1/net/can/af_can.c
---- linux-2.6.27/net/can/af_can.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/can/af_can.c 2009-03-25 16:11:02.000000000 +0000
-@@ -319,23 +319,52 @@ static struct dev_rcv_lists *find_dev_rc
+diff -r 9608d5473017 net/can/af_can.c
+--- a/net/can/af_can.c Wed May 06 15:47:13 2009 +0100
++++ b/net/can/af_can.c Wed May 06 16:57:04 2009 +0100
+@@ -319,23 +319,52 @@
return n ? d : NULL;
}
/* reduce condition testing at receive time */
*can_id &= *mask;
-@@ -348,15 +377,19 @@ static struct hlist_head *find_rcv_list(
+@@ -348,15 +377,19 @@
if (!(*mask))
return &d->rx[RX_ALL];
}
/* default: filter via can_id/can_mask */
-@@ -589,7 +622,10 @@ static int can_rcv_filter(struct dev_rcv
+@@ -589,7 +622,10 @@
}
}
if (can_id & CAN_EFF_FLAG) {
hlist_for_each_entry_rcu(r, n, &d->rx[RX_EFF], list) {
if (r->can_id == can_id) {
-diff -purN linux-2.6.27/net/can/bcm.c linux-2.6.27.19-5.1/net/can/bcm.c
---- linux-2.6.27/net/can/bcm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/can/bcm.c 2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/can/bcm.c
+--- a/net/can/bcm.c Wed May 06 15:47:13 2009 +0100
++++ b/net/can/bcm.c Wed May 06 16:57:04 2009 +0100
@@ -64,10 +64,11 @@
#define BCM_CAN_DLC_MASK 0x0F /* clean private flags in can_dlc by masking */
static __initdata const char banner[] = KERN_INFO
"can: broadcast manager protocol (rev " CAN_BCM_VERSION ")\n";
-diff -purN linux-2.6.27/net/core/dev.c linux-2.6.27.19-5.1/net/core/dev.c
---- linux-2.6.27/net/core/dev.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/core/dev.c 2009-03-25 16:11:01.000000000 +0000
-@@ -127,9 +127,16 @@
+diff -r 9608d5473017 net/core/dev.c
+--- a/net/core/dev.c Wed May 06 15:47:13 2009 +0100
++++ b/net/core/dev.c Wed May 06 16:57:04 2009 +0100
+@@ -127,8 +127,15 @@
#include <linux/in.h>
#include <linux/jhash.h>
#include <linux/random.h>
+#include <trace/net.h>
#include "net-sysfs.h"
-
++
+#if defined(CONFIG_XEN) || defined(CONFIG_PARAVIRT_XEN)
+#include <net/ip.h>
+#include <linux/tcp.h>
+#include <linux/udp.h>
+#endif
-+
+
/*
* The list of packet types we will receive (as opposed to discard)
- * and the routines to invoke.
-@@ -922,7 +929,11 @@ int dev_change_name(struct net_device *d
+@@ -922,7 +929,11 @@
else if (__dev_get_by_name(net, newname))
return -EEXIST;
else
rollback:
err = device_rename(&dev->dev, dev->name);
-@@ -1729,6 +1740,58 @@ static struct netdev_queue *dev_pick_tx(
+@@ -1729,6 +1740,58 @@
return netdev_get_tx_queue(dev, queue_index);
}
/**
* dev_queue_xmit - transmit a buffer
* @skb: buffer to transmit
-@@ -1761,6 +1824,12 @@ int dev_queue_xmit(struct sk_buff *skb)
+@@ -1760,6 +1823,12 @@
+ struct netdev_queue *txq;
struct Qdisc *q;
int rc = -ENOMEM;
-
++
+ /* If a checksum-deferred packet is forwarded to a device that needs a
+ * checksum, correct the pointers and force checksumming.
+ */
+ if (skb_checksum_setup(skb))
+ goto out_kfree_skb;
-+
+
/* GSO will handle the following emulations directly. */
if (netif_needs_gso(dev, skb))
- goto gso;
-@@ -1790,6 +1859,7 @@ int dev_queue_xmit(struct sk_buff *skb)
+@@ -1790,6 +1859,7 @@
}
gso:
/* Disable soft irqs for various locks below. Also
* stops preemption for RCU.
*/
-@@ -2164,6 +2234,30 @@ void netif_nit_deliver(struct sk_buff *s
+@@ -2164,6 +2234,30 @@
rcu_read_unlock();
}
/**
* netif_receive_skb - process receive buffer from network
* @skb: buffer to process
-@@ -2186,10 +2280,26 @@ int netif_receive_skb(struct sk_buff *sk
+@@ -2186,10 +2280,26 @@
struct net_device *null_or_orig;
int ret = NET_RX_DROP;
__be16 type;
if (!skb->tstamp.tv64)
net_timestamp(skb);
-@@ -2208,6 +2318,7 @@ int netif_receive_skb(struct sk_buff *sk
+@@ -2208,6 +2318,7 @@
__get_cpu_var(netdev_rx_stat).total++;
skb_reset_network_header(skb);
skb_reset_transport_header(skb);
skb->mac_len = skb->network_header - skb->mac_header;
-@@ -2227,6 +2338,22 @@ int netif_receive_skb(struct sk_buff *sk
+@@ -2226,6 +2337,22 @@
+ goto ncls;
}
#endif
-
++
+#ifdef CONFIG_XEN
+ switch (skb->ip_summed) {
+ case CHECKSUM_UNNECESSARY:
+
+ if (skb_emergency(skb))
+ goto skip_taps;
-+
+
list_for_each_entry_rcu(ptype, &ptype_all, list) {
if (ptype->dev == null_or_orig || ptype->dev == skb->dev ||
- ptype->dev == orig_dev) {
-@@ -2236,19 +2363,23 @@ int netif_receive_skb(struct sk_buff *sk
+@@ -2236,19 +2363,23 @@
}
}
+ goto unlock;
ncls:
#endif
-
++
+ if (!skb_emergency_protocol(skb))
+ goto drop;
-+
+
skb = handle_bridge(skb, &pt_prev, &ret, orig_dev);
if (!skb)
- goto out;
type = skb->protocol;
list_for_each_entry_rcu(ptype,
-@@ -2265,6 +2396,7 @@ ncls:
+@@ -2265,6 +2396,7 @@
if (pt_prev) {
ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
} else {
kfree_skb(skb);
/* Jamal, now you will not able to escape explaining
* me how you were going to use this. :-)
-@@ -2272,8 +2404,10 @@ ncls:
+@@ -2272,8 +2404,10 @@
ret = NET_RX_DROP;
}
return ret;
}
-@@ -3990,7 +4124,7 @@ int register_netdevice(struct net_device
+@@ -3990,7 +4124,7 @@
dev->features &= ~NETIF_F_TSO;
}
if (dev->features & NETIF_F_UFO) {
printk(KERN_ERR "%s: Dropping NETIF_F_UFO since no "
"NETIF_F_HW_CSUM feature.\n",
dev->name);
-diff -purN linux-2.6.27/net/core/filter.c linux-2.6.27.19-5.1/net/core/filter.c
---- linux-2.6.27/net/core/filter.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/core/filter.c 2009-03-25 16:11:01.000000000 +0000
-@@ -81,6 +81,9 @@ int sk_filter(struct sock *sk, struct sk
+diff -r 9608d5473017 net/core/filter.c
+--- a/net/core/filter.c Wed May 06 15:47:13 2009 +0100
++++ b/net/core/filter.c Wed May 06 16:57:04 2009 +0100
+@@ -80,6 +80,9 @@
+ {
int err;
struct sk_filter *filter;
-
++
+ if (skb_emergency(skb) && !sk_has_memalloc(sk))
+ return -ENOMEM;
-+
+
err = security_sock_rcv_skb(sk, skb);
if (err)
- return err;
-diff -purN linux-2.6.27/net/core/scm.c linux-2.6.27.19-5.1/net/core/scm.c
---- linux-2.6.27/net/core/scm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/core/scm.c 2009-03-25 16:11:01.000000000 +0000
-@@ -75,6 +75,7 @@ static int scm_fp_copy(struct cmsghdr *c
+diff -r 9608d5473017 net/core/scm.c
+--- a/net/core/scm.c Wed May 06 15:47:13 2009 +0100
++++ b/net/core/scm.c Wed May 06 16:57:04 2009 +0100
+@@ -75,6 +75,7 @@
if (!fpl)
return -ENOMEM;
*fplp = fpl;
fpl->count = 0;
}
fpp = &fpl->fp[fpl->count];
-@@ -106,9 +107,25 @@ void __scm_destroy(struct scm_cookie *sc
+@@ -106,9 +107,25 @@
if (fpl) {
scm->fp = NULL;
}
}
-@@ -284,6 +301,7 @@ struct scm_fp_list *scm_fp_dup(struct sc
+@@ -284,6 +301,7 @@
new_fpl = kmalloc(sizeof(*fpl), GFP_KERNEL);
if (new_fpl) {
for (i=fpl->count-1; i>=0; i--)
get_file(fpl->fp[i]);
memcpy(new_fpl, fpl, sizeof(*fpl));
-diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
---- linux-2.6.27/net/core/skbuff.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/core/skbuff.c 2009-03-25 16:11:01.000000000 +0000
-@@ -73,17 +73,13 @@ static struct kmem_cache *skbuff_fclone_
+diff -r 9608d5473017 net/core/skbuff.c
+--- a/net/core/skbuff.c Wed May 06 15:47:13 2009 +0100
++++ b/net/core/skbuff.c Wed May 06 16:57:04 2009 +0100
+@@ -73,17 +73,13 @@
static void sock_pipe_buf_release(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
{
}
static int sock_pipe_buf_steal(struct pipe_inode_info *pipe,
-@@ -177,23 +173,29 @@ EXPORT_SYMBOL(skb_truesize_bug);
+@@ -177,23 +173,29 @@
* %GFP_ATOMIC.
*/
struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
u8 *data;
+ int emergency = 0;
+ int memalloc = sk_memalloc_socks();
-+
+
+- cache = fclone ? skbuff_fclone_cache : skbuff_head_cache;
+ size = SKB_DATA_ALIGN(size);
+ cache = (flags & SKB_ALLOC_FCLONE)
+ ? skbuff_fclone_cache : skbuff_head_cache;
-
-- cache = fclone ? skbuff_fclone_cache : skbuff_head_cache;
++
+ if (memalloc && (flags & SKB_ALLOC_RX))
+ gfp_mask |= __GFP_MEMALLOC;
if (!data)
goto nodata;
-@@ -203,6 +205,9 @@ struct sk_buff *__alloc_skb(unsigned int
+@@ -203,6 +205,9 @@
* the tail pointer in struct sk_buff!
*/
memset(skb, 0, offsetof(struct sk_buff, tail));
skb->truesize = size + sizeof(struct sk_buff);
atomic_set(&skb->users, 1);
skb->head = data;
-@@ -219,7 +224,7 @@ struct sk_buff *__alloc_skb(unsigned int
+@@ -219,7 +224,7 @@
shinfo->ip6_frag_id = 0;
shinfo->frag_list = NULL;
struct sk_buff *child = skb + 1;
atomic_t *fclone_ref = (atomic_t *) (child + 1);
-@@ -227,6 +232,9 @@ struct sk_buff *__alloc_skb(unsigned int
+@@ -227,6 +232,9 @@
atomic_set(fclone_ref, 1);
child->fclone = SKB_FCLONE_UNAVAILABLE;
}
out:
return skb;
-@@ -255,7 +263,7 @@ struct sk_buff *__netdev_alloc_skb(struc
+@@ -255,13 +263,62 @@
int node = dev->dev.parent ? dev_to_node(dev->dev.parent) : -1;
struct sk_buff *skb;
if (likely(skb)) {
skb_reserve(skb, NET_SKB_PAD);
skb->dev = dev;
-@@ -263,6 +271,55 @@ struct sk_buff *__netdev_alloc_skb(struc
+ }
return skb;
}
-
++
+struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask)
+{
+ int node = dev->dev.parent ? dev_to_node(dev->dev.parent) : -1;
+#endif
+}
+EXPORT_SYMBOL(skb_add_rx_frag);
-+
+
/**
* dev_alloc_skb - allocate an skbuff for receiving
- * @length: length to allocate
-@@ -311,21 +368,38 @@ static void skb_clone_fraglist(struct sk
+@@ -311,21 +368,38 @@
skb_get(list);
}
}
}
-@@ -446,6 +520,9 @@ static void __copy_skb_header(struct sk_
+@@ -446,6 +520,9 @@
#if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE)
new->ipvs_property = old->ipvs_property;
#endif
new->protocol = old->protocol;
new->mark = old->mark;
__nf_copy(new, old);
-@@ -478,6 +555,10 @@ static struct sk_buff *__skb_clone(struc
+@@ -478,6 +555,10 @@
n->hdr_len = skb->nohdr ? skb_headroom(skb) : skb->hdr_len;
n->cloned = 1;
n->nohdr = 0;
n->destructor = NULL;
C(iif);
C(tail);
-@@ -539,6 +620,9 @@ struct sk_buff *skb_clone(struct sk_buff
+@@ -539,6 +620,9 @@
n->fclone = SKB_FCLONE_CLONE;
atomic_inc(fclone_ref);
} else {
n = kmem_cache_alloc(skbuff_head_cache, gfp_mask);
if (!n)
return NULL;
-@@ -570,6 +654,14 @@ static void copy_skb_header(struct sk_bu
+@@ -570,6 +654,14 @@
skb_shinfo(new)->gso_type = skb_shinfo(old)->gso_type;
}
/**
* skb_copy - create private copy of an sk_buff
* @skb: buffer to copy
-@@ -590,15 +682,17 @@ static void copy_skb_header(struct sk_bu
+@@ -590,15 +682,17 @@
struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t gfp_mask)
{
int headerlen = skb->data - skb->head;
if (!n)
return NULL;
-@@ -633,12 +727,14 @@ struct sk_buff *pskb_copy(struct sk_buff
+@@ -633,12 +727,14 @@
/*
* Allocate the copy buffer
*/
if (!n)
goto out;
-@@ -657,8 +753,9 @@ struct sk_buff *pskb_copy(struct sk_buff
+@@ -657,8 +753,9 @@
int i;
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
}
skb_shinfo(n)->nr_frags = i;
}
-@@ -706,7 +803,11 @@ int pskb_expand_head(struct sk_buff *skb
+@@ -706,7 +803,11 @@
size = SKB_DATA_ALIGN(size);
if (!data)
goto nodata;
-@@ -721,7 +822,7 @@ int pskb_expand_head(struct sk_buff *skb
+@@ -721,7 +822,7 @@
sizeof(struct skb_shared_info));
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
if (skb_shinfo(skb)->frag_list)
skb_clone_fraglist(skb);
-@@ -800,8 +901,8 @@ struct sk_buff *skb_copy_expand(const st
+@@ -800,8 +901,8 @@
/*
* Allocate the copy buffer
*/
int oldheadroom = skb_headroom(skb);
int head_copy_len, head_copy_off;
int off;
-@@ -990,7 +1091,7 @@ drop_pages:
+@@ -990,7 +1091,7 @@
skb_shinfo(skb)->nr_frags = i;
for (; i < nfrags; i++)
if (skb_shinfo(skb)->frag_list)
skb_drop_fraglist(skb);
-@@ -1159,7 +1260,7 @@ pull_pages:
+@@ -1159,7 +1260,7 @@
k = 0;
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
if (skb_shinfo(skb)->frags[i].size <= eat) {
eat -= skb_shinfo(skb)->frags[i].size;
} else {
skb_shinfo(skb)->frags[k] = skb_shinfo(skb)->frags[i];
-@@ -1262,9 +1363,19 @@ fault:
+@@ -1262,9 +1363,19 @@
*/
static void sock_spd_release(struct splice_pipe_desc *spd, unsigned int i)
{
}
/*
-@@ -1272,16 +1383,23 @@ static void sock_spd_release(struct spli
+@@ -1272,16 +1383,23 @@
*/
static inline int spd_fill_page(struct splice_pipe_desc *spd, struct page *page,
unsigned int len, unsigned int offset,
return 0;
}
-@@ -1297,7 +1415,7 @@ static inline void __segment_seek(struct
+@@ -1297,7 +1415,7 @@
static inline int __splice_segment(struct page *page, unsigned int poff,
unsigned int plen, unsigned int *off,
unsigned int *len, struct sk_buff *skb,
{
if (!*len)
return 1;
-@@ -1320,7 +1438,7 @@ static inline int __splice_segment(struc
+@@ -1320,7 +1438,7 @@
/* the linear region may spread across several pages */
flen = min_t(unsigned int, flen, PAGE_SIZE - poff);
return 1;
__segment_seek(&page, &poff, &plen, flen);
-@@ -1347,7 +1465,7 @@ static int __skb_splice_bits(struct sk_b
+@@ -1347,7 +1465,7 @@
if (__splice_segment(virt_to_page(skb->data),
(unsigned long) skb->data & (PAGE_SIZE - 1),
skb_headlen(skb),
return 1;
/*
-@@ -1357,7 +1475,7 @@ static int __skb_splice_bits(struct sk_b
+@@ -1357,7 +1475,7 @@
const skb_frag_t *f = &skb_shinfo(skb)->frags[seg];
if (__splice_segment(f->page, f->page_offset, f->size,
return 1;
}
-@@ -1370,7 +1488,7 @@ static int __skb_splice_bits(struct sk_b
+@@ -1370,7 +1488,7 @@
* the frag list, if such a thing exists. We'd probably need to recurse to
* handle that cleanly.
*/
struct pipe_inode_info *pipe, unsigned int tlen,
unsigned int flags)
{
-@@ -1383,16 +1501,6 @@ int skb_splice_bits(struct sk_buff *__sk
+@@ -1383,16 +1501,6 @@
.ops = &sock_pipe_buf_ops,
.spd_release = sock_spd_release,
};
/*
* __skb_splice_bits() only fails if the output has no room left,
-@@ -1416,15 +1524,9 @@ int skb_splice_bits(struct sk_buff *__sk
+@@ -1416,15 +1524,9 @@
}
done:
/*
* Drop the socket lock, otherwise we have reverse
-@@ -1908,6 +2010,7 @@ static inline void skb_split_no_header(s
+@@ -1908,6 +2010,7 @@
skb_shinfo(skb1)->frags[k] = skb_shinfo(skb)->frags[i];
if (pos < len) {
/* Split frag.
* We have two variants in this case:
* 1. Move all the frag to the second
-@@ -1916,7 +2019,7 @@ static inline void skb_split_no_header(s
+@@ -1916,7 +2019,7 @@
* where splitting is expensive.
* 2. Split is accurately. We make this.
*/
skb_shinfo(skb1)->frags[0].page_offset += len - pos;
skb_shinfo(skb1)->frags[0].size -= len - pos;
skb_shinfo(skb)->frags[i].size = len - pos;
-@@ -2001,10 +2104,10 @@ unsigned int skb_seq_read(unsigned int c
+@@ -2001,10 +2104,10 @@
return 0;
next_skb:
return block_limit - abs_offset;
}
-@@ -2039,13 +2142,14 @@ next_skb:
+@@ -2039,13 +2142,14 @@
st->frag_data = NULL;
}
- if (st->cur_skb->next) {
-- st->cur_skb = st->cur_skb->next;
+ if (st->root_skb == st->cur_skb &&
+ skb_shinfo(st->root_skb)->frag_list) {
+ st->cur_skb = skb_shinfo(st->root_skb)->frag_list;
++ st->frag_idx = 0;
++ goto next_skb;
++ } else if (st->cur_skb->next) {
+ st->cur_skb = st->cur_skb->next;
st->frag_idx = 0;
- goto next_skb;
+- goto next_skb;
- } else if (st->root_skb == st->cur_skb &&
- skb_shinfo(st->root_skb)->frag_list) {
- st->cur_skb = skb_shinfo(st->root_skb)->frag_list;
-+ } else if (st->cur_skb->next) {
-+ st->cur_skb = st->cur_skb->next;
-+ st->frag_idx = 0;
goto next_skb;
}
-@@ -2246,7 +2350,8 @@ struct sk_buff *skb_segment(struct sk_bu
+@@ -2246,7 +2350,8 @@
if (hsize > len || !sg)
hsize = len;
if (unlikely(!nskb))
goto err;
-@@ -2284,7 +2389,7 @@ struct sk_buff *skb_segment(struct sk_bu
+@@ -2284,7 +2389,7 @@
BUG_ON(i >= nfrags);
*frag = skb_shinfo(skb)->frags[i];
size = frag->size;
if (pos < offset) {
-diff -purN linux-2.6.27/net/core/sock.c linux-2.6.27.19-5.1/net/core/sock.c
---- linux-2.6.27/net/core/sock.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/core/sock.c 2009-03-25 16:11:01.000000000 +0000
+diff -r 9608d5473017 net/core/sock.c
+--- a/net/core/sock.c Wed May 06 15:47:13 2009 +0100
++++ b/net/core/sock.c Wed May 06 16:57:04 2009 +0100
@@ -110,6 +110,7 @@
#include <linux/tcp.h>
#include <linux/init.h>
#include <asm/uaccess.h>
#include <asm/system.h>
-@@ -211,6 +212,121 @@ __u32 sysctl_rmem_default __read_mostly
+@@ -211,6 +212,121 @@
/* Maximal space eaten by iovec or ancilliary data plus some space */
int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512);
static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen)
{
struct timeval tv;
-@@ -281,7 +397,7 @@ int sock_queue_rcv_skb(struct sock *sk,
+@@ -281,7 +397,7 @@
if (err)
goto out;
err = -ENOBUFS;
goto out;
}
-@@ -324,7 +440,7 @@ int sk_receive_skb(struct sock *sk, stru
+@@ -324,7 +440,7 @@
*/
mutex_acquire(&sk->sk_lock.dep_map, 0, 1, _RET_IP_);
mutex_release(&sk->sk_lock.dep_map, 1, _RET_IP_);
} else
-@@ -695,6 +811,8 @@ int sock_getsockopt(struct socket *sock,
+@@ -695,6 +811,8 @@
if (len < 0)
return -EINVAL;
switch(optname) {
case SO_DEBUG:
v.val = sock_flag(sk, SOCK_DBG);
-@@ -957,6 +1075,7 @@ void sk_free(struct sock *sk)
+@@ -957,6 +1075,7 @@
{
struct sk_filter *filter;
if (sk->sk_destruct)
sk->sk_destruct(sk);
-@@ -1106,6 +1225,12 @@ void __init sk_init(void)
+@@ -1106,6 +1225,12 @@
sysctl_wmem_max = 131071;
sysctl_rmem_max = 131071;
}
}
/*
-@@ -1371,7 +1496,7 @@ static void __release_sock(struct sock *
+@@ -1371,7 +1496,7 @@
struct sk_buff *next = skb->next;
skb->next = NULL;
/*
* We are in process context here with softirqs
-diff -purN linux-2.6.27/net/dcb/Kconfig linux-2.6.27.19-5.1/net/dcb/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/dcb/Kconfig 2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/dcb/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/net/dcb/Kconfig Wed May 06 16:57:04 2009 +0100
@@ -0,0 +1,12 @@
+config DCB
+ tristate "Data Center Bridging support"
+ (dcbnl) for Data Center Bridging capable devices.
+
+ If unsure, say N.
-diff -purN linux-2.6.27/net/dcb/Makefile linux-2.6.27.19-5.1/net/dcb/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/dcb/Makefile 2009-03-25 16:11:02.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 net/dcb/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/net/dcb/Makefile Wed May 06 16:57:04 2009 +0100
+@@ -0,0 +1,1 @@
+obj-$(CONFIG_DCB) += dcbnl.o
-diff -purN linux-2.6.27/net/dcb/dcbnl.c linux-2.6.27.19-5.1/net/dcb/dcbnl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/dcb/dcbnl.c 2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/dcb/dcbnl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/net/dcb/dcbnl.c Wed May 06 16:57:04 2009 +0100
@@ -0,0 +1,1087 @@
+/*
+ * This is the Data Center Bridging configuration interface.
+module_exit(dcbnl_exit);
+
+
-diff -purN linux-2.6.27/net/ieee80211/Kconfig linux-2.6.27.19-5.1/net/ieee80211/Kconfig
---- linux-2.6.27/net/ieee80211/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ieee80211/Kconfig 2009-03-25 16:11:02.000000000 +0000
-@@ -46,7 +46,6 @@ config IEEE80211_CRYPT_CCMP
+diff -r 9608d5473017 net/ieee80211/Kconfig
+--- a/net/ieee80211/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/net/ieee80211/Kconfig Wed May 06 16:57:04 2009 +0100
+@@ -46,7 +46,6 @@
tristate "IEEE 802.11i CCMP support"
depends on IEEE80211
select CRYPTO
---help---
Include software based cipher suites in support of IEEE 802.11i
(aka TGi, WPA, WPA2, WPA-PSK, etc.) for use with CCMP enabled
-diff -purN linux-2.6.27/net/ipv4/devinet.c linux-2.6.27.19-5.1/net/ipv4/devinet.c
---- linux-2.6.27/net/ipv4/devinet.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/devinet.c 2009-03-25 16:11:03.000000000 +0000
+diff -r 9608d5473017 net/ipv4/devinet.c
+--- a/net/ipv4/devinet.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/devinet.c Wed May 06 16:57:04 2009 +0100
@@ -61,6 +61,7 @@
#include <net/ip_fib.h>
#include <net/rtnetlink.h>
static struct ipv4_devconf ipv4_devconf = {
.data = {
-@@ -257,6 +258,7 @@ static void __inet_del_ifa(struct in_dev
+@@ -257,6 +258,7 @@
struct in_ifaddr **ifap1 = &ifa1->ifa_next;
while ((ifa = *ifap1) != NULL) {
if (!(ifa->ifa_flags & IFA_F_SECONDARY) &&
ifa1->ifa_scope <= ifa->ifa_scope)
last_prim = ifa;
-@@ -363,6 +365,7 @@ static int __inet_insert_ifa(struct in_i
+@@ -363,6 +365,7 @@
}
ifa->ifa_flags |= IFA_F_SECONDARY;
}
}
if (!(ifa->ifa_flags & IFA_F_SECONDARY)) {
-diff -purN linux-2.6.27/net/ipv4/inet_fragment.c linux-2.6.27.19-5.1/net/ipv4/inet_fragment.c
---- linux-2.6.27/net/ipv4/inet_fragment.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/inet_fragment.c 2009-03-25 16:11:03.000000000 +0000
+diff -r 9608d5473017 net/ipv4/inet_fragment.c
+--- a/net/ipv4/inet_fragment.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/inet_fragment.c Wed May 06 16:57:04 2009 +0100
@@ -19,6 +19,7 @@
#include <linux/random.h>
#include <linux/skbuff.h>
#include <net/inet_frag.h>
-@@ -74,6 +75,8 @@ void inet_frags_init_net(struct netns_fr
+@@ -74,6 +75,8 @@
nf->nqueues = 0;
atomic_set(&nf->mem, 0);
INIT_LIST_HEAD(&nf->lru_list);
}
EXPORT_SYMBOL(inet_frags_init_net);
-diff -purN linux-2.6.27/net/ipv4/ip_fragment.c linux-2.6.27.19-5.1/net/ipv4/ip_fragment.c
---- linux-2.6.27/net/ipv4/ip_fragment.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/ip_fragment.c 2009-03-25 16:11:03.000000000 +0000
+diff -r 9608d5473017 net/ipv4/ip_fragment.c
+--- a/net/ipv4/ip_fragment.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/ip_fragment.c Wed May 06 16:57:04 2009 +0100
@@ -42,6 +42,8 @@
#include <linux/udp.h>
#include <linux/inet.h>
/* NOTE. Logic of IP defragmentation is parallel to corresponding IPv6
* code now. If you change something here, _PLEASE_ update ipv6/reassembly.c
-@@ -599,6 +601,64 @@ int ip_defrag(struct sk_buff *skb, u32 u
+@@ -599,6 +601,64 @@
}
#ifdef CONFIG_SYSCTL
static int zero;
static struct ctl_table ip4_frags_ns_ctl_table[] = {
-@@ -608,7 +668,8 @@ static struct ctl_table ip4_frags_ns_ctl
+@@ -608,7 +668,8 @@
.data = &init_net.ipv4.frags.high_thresh,
.maxlen = sizeof(int),
.mode = 0644,
},
{
.ctl_name = NET_IPV4_IPFRAG_LOW_THRESH,
-@@ -711,6 +772,8 @@ static inline void ip4_frags_ctl_registe
+@@ -711,6 +772,8 @@
static int ipv4_frags_init_net(struct net *net)
{
/*
* Fragment cache limits. We will commit 256K at one time. Should we
* cross that limit we will prune down to 192K. This should cope with
-@@ -728,11 +791,31 @@ static int ipv4_frags_init_net(struct ne
+@@ -728,11 +791,31 @@
inet_frags_init_net(&net->ipv4.frags);
ip4_frags_ns_ctl_unregister(net);
inet_frags_exit_net(&net->ipv4.frags, &ip4_frags);
}
-diff -purN linux-2.6.27/net/ipv4/ipconfig.c linux-2.6.27.19-5.1/net/ipv4/ipconfig.c
---- linux-2.6.27/net/ipv4/ipconfig.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/ipconfig.c 2009-03-25 16:11:03.000000000 +0000
-@@ -1272,6 +1272,9 @@ __be32 __init root_nfs_parse_addr(char *
+diff -r 9608d5473017 net/ipv4/ipconfig.c
+--- a/net/ipv4/ipconfig.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/ipconfig.c Wed May 06 16:57:04 2009 +0100
+@@ -1272,6 +1272,9 @@
static int __init ip_auto_config(void)
{
__be32 addr;
#ifdef CONFIG_PROC_FS
proc_net_fops_create(&init_net, "pnp", S_IRUGO, &pnp_seq_fops);
-@@ -1308,9 +1311,6 @@ static int __init ip_auto_config(void)
+@@ -1308,9 +1311,6 @@
#endif
ic_first_dev->next) {
#ifdef IPCONFIG_DYNAMIC
if (ic_dynamic() < 0) {
ic_close_devs();
-diff -purN linux-2.6.27/net/ipv4/netfilter/Kconfig linux-2.6.27.19-5.1/net/ipv4/netfilter/Kconfig
---- linux-2.6.27/net/ipv4/netfilter/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/Kconfig 2009-03-25 16:11:03.000000000 +0000
-@@ -111,6 +111,20 @@ config IP_NF_MATCH_ADDRTYPE
+diff -r 9608d5473017 net/ipv4/netfilter/Kconfig
+--- a/net/ipv4/netfilter/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/netfilter/Kconfig Wed May 06 16:57:04 2009 +0100
+@@ -110,6 +110,20 @@
+
If you want to compile it as a module, say M here and read
<file:Documentation/kbuild/modules.txt>. If unsure, say `N'.
-
++
+config IP_NF_MATCH_IPV4OPTIONS
+ tristate 'IPV4OPTIONS match support'
+ depends on IP_NF_IPTABLES
+ If you want to compile it as a module, say M here and read
+ Documentation/modules.txt. If unsure, say 'N'.
+
-+
+
# `filter', generic and specific targets
config IP_NF_FILTER
- tristate "Packet filtering"
-diff -purN linux-2.6.27/net/ipv4/netfilter/Makefile linux-2.6.27.19-5.1/net/ipv4/netfilter/Makefile
---- linux-2.6.27/net/ipv4/netfilter/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/Makefile 2009-03-25 16:11:03.000000000 +0000
-@@ -50,6 +50,7 @@ obj-$(CONFIG_IP_NF_MATCH_AH) += ipt_ah.o
+diff -r 9608d5473017 net/ipv4/netfilter/Makefile
+--- a/net/ipv4/netfilter/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/netfilter/Makefile Wed May 06 16:57:04 2009 +0100
+@@ -50,6 +50,7 @@
obj-$(CONFIG_IP_NF_MATCH_ECN) += ipt_ecn.o
obj-$(CONFIG_IP_NF_MATCH_RECENT) += ipt_recent.o
obj-$(CONFIG_IP_NF_MATCH_TTL) += ipt_ttl.o
# targets
obj-$(CONFIG_IP_NF_TARGET_CLUSTERIP) += ipt_CLUSTERIP.o
-diff -purN linux-2.6.27/net/ipv4/netfilter/ipt_LOG.c linux-2.6.27.19-5.1/net/ipv4/netfilter/ipt_LOG.c
---- linux-2.6.27/net/ipv4/netfilter/ipt_LOG.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/ipt_LOG.c 2009-03-25 16:11:03.000000000 +0000
-@@ -410,12 +410,12 @@ ipt_log_packet(unsigned int pf,
+diff -r 9608d5473017 net/ipv4/netfilter/ipt_LOG.c
+--- a/net/ipv4/netfilter/ipt_LOG.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/netfilter/ipt_LOG.c Wed May 06 16:57:04 2009 +0100
+@@ -410,12 +410,12 @@
printk("MAC=");
if (skb->dev && skb->dev->hard_header_len
&& skb->mac_header != skb->network_header) {
} else
printk(" ");
}
-diff -purN linux-2.6.27/net/ipv4/netfilter/ipt_ipv4options.c linux-2.6.27.19-5.1/net/ipv4/netfilter/ipt_ipv4options.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/ipt_ipv4options.c 2009-03-25 16:11:03.000000000 +0000
+diff -r 9608d5473017 net/ipv4/netfilter/ipt_ipv4options.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/net/ipv4/netfilter/ipt_ipv4options.c Wed May 06 16:57:04 2009 +0100
@@ -0,0 +1,175 @@
+/*
+ This is a module which is used to match ipv4 options.
+
+module_init(init);
+module_exit(fini);
-diff -purN linux-2.6.27/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
---- linux-2.6.27/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c 2009-03-25 16:11:03.000000000 +0000
-@@ -150,10 +150,12 @@ static unsigned int ipv4_conntrack_defra
+diff -r 9608d5473017 net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
+--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c Wed May 06 16:57:04 2009 +0100
+@@ -150,10 +150,12 @@
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
/* Gather fragments. */
if (ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET)) {
-diff -purN linux-2.6.27/net/ipv4/netfilter/nf_nat_proto_tcp.c linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_nat_proto_tcp.c
---- linux-2.6.27/net/ipv4/netfilter/nf_nat_proto_tcp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_nat_proto_tcp.c 2009-03-25 16:11:03.000000000 +0000
-@@ -75,6 +75,9 @@ tcp_manip_pkt(struct sk_buff *skb,
+diff -r 9608d5473017 net/ipv4/netfilter/nf_nat_proto_tcp.c
+--- a/net/ipv4/netfilter/nf_nat_proto_tcp.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/netfilter/nf_nat_proto_tcp.c Wed May 06 16:57:04 2009 +0100
+@@ -75,6 +75,9 @@
if (hdrsize < sizeof(*hdr))
return true;
inet_proto_csum_replace4(&hdr->check, skb, oldip, newip, 1);
inet_proto_csum_replace2(&hdr->check, skb, oldport, newport, 0);
return true;
-diff -purN linux-2.6.27/net/ipv4/netfilter/nf_nat_proto_udp.c linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_nat_proto_udp.c
---- linux-2.6.27/net/ipv4/netfilter/nf_nat_proto_udp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_nat_proto_udp.c 2009-03-25 16:11:03.000000000 +0000
-@@ -60,6 +60,10 @@ udp_manip_pkt(struct sk_buff *skb,
+diff -r 9608d5473017 net/ipv4/netfilter/nf_nat_proto_udp.c
+--- a/net/ipv4/netfilter/nf_nat_proto_udp.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/netfilter/nf_nat_proto_udp.c Wed May 06 16:57:04 2009 +0100
+@@ -60,6 +60,10 @@
newport = tuple->dst.u.udp.port;
portptr = &hdr->dest;
}
if (hdr->check || skb->ip_summed == CHECKSUM_PARTIAL) {
inet_proto_csum_replace4(&hdr->check, skb, oldip, newip, 1);
inet_proto_csum_replace2(&hdr->check, skb, *portptr, newport,
-diff -purN linux-2.6.27/net/ipv4/netfilter/nf_nat_snmp_basic.c linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_nat_snmp_basic.c
---- linux-2.6.27/net/ipv4/netfilter/nf_nat_snmp_basic.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_nat_snmp_basic.c 2009-03-25 16:11:03.000000000 +0000
-@@ -742,6 +742,7 @@ static unsigned char snmp_object_decode(
+diff -r 9608d5473017 net/ipv4/netfilter/nf_nat_snmp_basic.c
+--- a/net/ipv4/netfilter/nf_nat_snmp_basic.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c Wed May 06 16:57:04 2009 +0100
+@@ -742,6 +742,7 @@
*obj = kmalloc(sizeof(struct snmp_object) + len,
GFP_ATOMIC);
if (*obj == NULL) {
kfree(id);
if (net_ratelimit())
printk("OOM in bsalg (%d)\n", __LINE__);
-diff -purN linux-2.6.27/net/ipv4/proc.c linux-2.6.27.19-5.1/net/ipv4/proc.c
---- linux-2.6.27/net/ipv4/proc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/proc.c 2009-03-25 16:11:03.000000000 +0000
-@@ -237,43 +237,45 @@ static const struct snmp_mib snmp4_net_l
+diff -r 9608d5473017 net/ipv4/proc.c
+--- a/net/ipv4/proc.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/proc.c Wed May 06 16:57:04 2009 +0100
+@@ -237,43 +237,45 @@
SNMP_MIB_SENTINEL
};
- snmp_fold_field((void **) net->mib.icmpmsg_statistics,
- out[j]));
- seq_putc(seq, '\n');
-- }
-- if (count) {
-- seq_printf(seq, "\nIcmpMsg:");
-- for (j = 0; j < count; ++j)
-- seq_printf(seq, " %sType%u", out[j] & 0x100 ? "Out" :
-- "In", out[j] & 0xff);
-- seq_printf(seq, "\nIcmpMsg:");
-- for (j = 0; j < count; ++j)
-- seq_printf(seq, " %lu", snmp_fold_field((void **)
-- net->mib.icmpmsg_statistics, out[j]));
+ val = snmp_fold_field((void **) net->mib.icmpmsg_statistics, i);
+ if (val) {
+ type[count] = i;
+ count = 0;
+ }
}
+- if (count) {
+- seq_printf(seq, "\nIcmpMsg:");
+- for (j = 0; j < count; ++j)
+- seq_printf(seq, " %sType%u", out[j] & 0x100 ? "Out" :
+- "In", out[j] & 0xff);
+- seq_printf(seq, "\nIcmpMsg:");
+- for (j = 0; j < count; ++j)
+- seq_printf(seq, " %lu", snmp_fold_field((void **)
+- net->mib.icmpmsg_statistics, out[j]));
+- }
+ icmpmsg_put_line(seq, vals, type, count);
#undef PERLINE
}
-diff -purN linux-2.6.27/net/ipv4/route.c linux-2.6.27.19-5.1/net/ipv4/route.c
---- linux-2.6.27/net/ipv4/route.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/route.c 2009-03-25 16:11:03.000000000 +0000
+diff -r 9608d5473017 net/ipv4/route.c
+--- a/net/ipv4/route.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/route.c Wed May 06 16:57:04 2009 +0100
@@ -107,6 +107,7 @@
#ifdef CONFIG_SYSCTL
#include <linux/sysctl.h>
#define RT_FL_TOS(oldflp) \
((u32)(oldflp->fl4_tos & (IPTOS_RT_MASK | RTO_ONLINK)))
-@@ -269,6 +270,8 @@ static inline int rt_genid(struct net *n
+@@ -268,6 +269,8 @@
+ {
return atomic_read(&net->ipv4.rt_genid);
}
-
-+static struct mem_reserve ipv4_route_reserve;
+
++static struct mem_reserve ipv4_route_reserve;
+
#ifdef CONFIG_PROC_FS
struct rt_cache_iter_state {
- struct seq_net_private p;
-@@ -393,6 +396,62 @@ static int rt_cache_seq_show(struct seq_
+@@ -391,6 +394,62 @@
+ seq_printf(seq, "%*s\n", 127 - len, "");
+ }
return 0;
- }
-
++}
++
+static struct mutex ipv4_route_lock;
+
+static int proc_dointvec_route(struct ctl_table *table, int write,
+ mutex_unlock(&ipv4_route_lock);
+
+ return ret;
-+}
-+
+ }
+
static const struct seq_operations rt_cache_seq_ops = {
- .start = rt_cache_seq_start,
- .next = rt_cache_seq_next,
-@@ -2991,7 +3050,8 @@ static ctl_table ipv4_route_table[] = {
+@@ -2991,7 +3050,8 @@
.data = &ip_rt_max_size,
.maxlen = sizeof(int),
.mode = 0644,
},
{
/* Deprecated. Use gc_min_interval_ms */
-@@ -3270,6 +3330,15 @@ int __init ip_rt_init(void)
+@@ -3270,6 +3330,15 @@
ipv4_dst_ops.gc_thresh = (rt_hash_mask + 1);
ip_rt_max_size = (rt_hash_mask + 1) * 16;
devinet_init();
ip_fib_init();
-diff -purN linux-2.6.27/net/ipv4/tcp.c linux-2.6.27.19-5.1/net/ipv4/tcp.c
---- linux-2.6.27/net/ipv4/tcp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/tcp.c 2009-03-25 16:11:03.000000000 +0000
-@@ -518,8 +518,13 @@ static int tcp_splice_data_recv(read_des
+diff -r 9608d5473017 net/ipv4/tcp.c
+--- a/net/ipv4/tcp.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/tcp.c Wed May 06 16:57:04 2009 +0100
+@@ -518,8 +518,13 @@
unsigned int offset, size_t len)
{
struct tcp_splice_state *tss = rd_desc->arg.data;
}
static int __tcp_splice_read(struct sock *sk, struct tcp_splice_state *tss)
-@@ -527,6 +532,7 @@ static int __tcp_splice_read(struct sock
+@@ -527,6 +532,7 @@
/* Store TCP splice context information in read_descriptor_t. */
read_descriptor_t rd_desc = {
.arg.data = tss,
};
return tcp_read_sock(sk, &rd_desc, tcp_splice_data_recv);
-@@ -576,10 +582,6 @@ ssize_t tcp_splice_read(struct socket *s
+@@ -576,10 +582,6 @@
else if (!ret) {
if (spliced)
break;
if (sock_flag(sk, SOCK_DONE))
break;
if (sk->sk_err) {
-@@ -597,6 +599,10 @@ ssize_t tcp_splice_read(struct socket *s
+@@ -597,6 +599,10 @@
ret = -ENOTCONN;
break;
}
if (!timeo) {
ret = -EAGAIN;
break;
-@@ -611,11 +617,13 @@ ssize_t tcp_splice_read(struct socket *s
+@@ -611,11 +617,13 @@
tss.len -= ret;
spliced += ret;
signal_pending(current))
break;
}
-@@ -635,7 +643,8 @@ struct sk_buff *sk_stream_alloc_skb(stru
+@@ -635,7 +643,8 @@
/* The TCP header must be at least 32-bit aligned. */
size = ALIGN(size, 4);
if (skb) {
if (sk_wmem_schedule(sk, skb->truesize)) {
/*
-@@ -1157,7 +1166,7 @@ static void tcp_prequeue_process(struct
+@@ -1157,7 +1166,7 @@
* necessary */
local_bh_disable();
while ((skb = __skb_dequeue(&tp->ucopy.prequeue)) != NULL)
local_bh_enable();
/* Clear memory counter. */
-@@ -2381,7 +2390,7 @@ struct sk_buff *tcp_tso_segment(struct s
+@@ -2381,7 +2390,7 @@
unsigned int seq;
__be32 delta;
unsigned int oldlen;
if (!pskb_may_pull(skb, sizeof(*th)))
goto out;
-@@ -2397,10 +2406,13 @@ struct sk_buff *tcp_tso_segment(struct s
+@@ -2397,10 +2406,13 @@
oldlen = (u16)~skb->len;
__skb_pull(skb, thlen);
if (unlikely(type &
~(SKB_GSO_TCPV4 |
-@@ -2411,7 +2423,6 @@ struct sk_buff *tcp_tso_segment(struct s
+@@ -2411,7 +2423,6 @@
!(type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))))
goto out;
skb_shinfo(skb)->gso_segs = DIV_ROUND_UP(skb->len, mss);
segs = NULL;
-@@ -2422,8 +2433,7 @@ struct sk_buff *tcp_tso_segment(struct s
+@@ -2422,8 +2433,7 @@
if (IS_ERR(segs))
goto out;
skb = segs;
th = tcp_hdr(skb);
-@@ -2439,7 +2449,7 @@ struct sk_buff *tcp_tso_segment(struct s
+@@ -2439,7 +2449,7 @@
csum_fold(csum_partial(skb_transport_header(skb),
thlen, skb->csum));
skb = skb->next;
th = tcp_hdr(skb);
-diff -purN linux-2.6.27/net/ipv4/tcp_input.c linux-2.6.27.19-5.1/net/ipv4/tcp_input.c
---- linux-2.6.27/net/ipv4/tcp_input.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/tcp_input.c 2009-03-25 16:11:02.000000000 +0000
-@@ -3936,19 +3936,19 @@ static void tcp_ofo_queue(struct sock *s
+diff -r 9608d5473017 net/ipv4/tcp_input.c
+--- a/net/ipv4/tcp_input.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/tcp_input.c Wed May 06 16:57:05 2009 +0100
+@@ -3936,19 +3936,19 @@
static int tcp_prune_ofo_queue(struct sock *sk);
static int tcp_prune_queue(struct sock *sk);
return -1;
}
}
-@@ -4003,7 +4003,7 @@ static void tcp_data_queue(struct sock *
+@@ -4003,7 +4003,7 @@
if (eaten <= 0) {
queue_and_out:
if (eaten < 0 &&
goto drop;
skb_set_owner_r(skb, sk);
-@@ -4074,7 +4074,7 @@ drop:
+@@ -4074,7 +4074,7 @@
TCP_ECN_check_ce(tp, skb);
goto drop;
/* Disable header prediction. */
-diff -purN linux-2.6.27/net/ipv4/tcp_output.c linux-2.6.27.19-5.1/net/ipv4/tcp_output.c
---- linux-2.6.27/net/ipv4/tcp_output.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/tcp_output.c 2009-03-25 16:11:03.000000000 +0000
-@@ -357,6 +357,17 @@ struct tcp_out_options {
+diff -r 9608d5473017 net/ipv4/tcp_output.c
+--- a/net/ipv4/tcp_output.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/tcp_output.c Wed May 06 16:57:05 2009 +0100
+@@ -357,6 +357,17 @@
__u32 tsval, tsecr; /* need to include OPTION_TS */
};
static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp,
const struct tcp_out_options *opts,
__u8 **md5_hash) {
-@@ -371,6 +382,12 @@ static void tcp_options_write(__be32 *pt
+@@ -369,6 +380,12 @@
+ ptr += 4;
+ } else {
*md5_hash = NULL;
- }
-
++ }
++
+ if (unlikely(opts->mss)) {
+ *ptr++ = htonl((TCPOPT_MSS << 24) |
+ (TCPOLEN_MSS << 16) |
+ opts->mss);
-+ }
-+
- if (likely(OPTION_TS & opts->options)) {
- if (unlikely(OPTION_SACK_ADVERTISE & opts->options)) {
- *ptr++ = htonl((TCPOPT_SACK_PERM << 24) |
-@@ -387,12 +404,6 @@ static void tcp_options_write(__be32 *pt
- *ptr++ = htonl(opts->tsecr);
}
+ if (likely(OPTION_TS & opts->options)) {
+@@ -385,12 +402,6 @@
+ }
+ *ptr++ = htonl(opts->tsval);
+ *ptr++ = htonl(opts->tsecr);
+- }
+-
- if (unlikely(opts->mss)) {
- *ptr++ = htonl((TCPOPT_MSS << 24) |
- (TCPOLEN_MSS << 16) |
- opts->mss);
-- }
--
+ }
+
if (unlikely(OPTION_SACK_ADVERTISE & opts->options &&
- !(OPTION_TS & opts->options))) {
- *ptr++ = htonl((TCPOPT_NOP << 24) |
-@@ -2148,7 +2159,8 @@ void tcp_send_fin(struct sock *sk)
+@@ -2148,7 +2159,8 @@
} else {
/* Socket is locked, keep trying until memory is available. */
for (;;) {
if (skb)
break;
yield();
-@@ -2174,7 +2186,7 @@ void tcp_send_active_reset(struct sock *
+@@ -2174,7 +2186,7 @@
struct sk_buff *skb;
/* NOTE: No TCP options attached and we never retransmit this. */
if (!skb) {
NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPABORTFAILED);
return;
-@@ -2242,7 +2254,8 @@ struct sk_buff *tcp_make_synack(struct s
+@@ -2242,7 +2254,8 @@
struct tcp_md5sig_key *md5;
__u8 *md5_hash_location;
if (skb == NULL)
return NULL;
-@@ -2266,6 +2279,11 @@ struct sk_buff *tcp_make_synack(struct s
+@@ -2266,6 +2279,11 @@
}
memset(&opts, 0, sizeof(opts));
TCP_SKB_CB(skb)->when = tcp_time_stamp;
tcp_header_size = tcp_synack_options(sk, req,
dst_metric(dst, RTAX_ADVMSS),
-@@ -2292,11 +2310,6 @@ struct sk_buff *tcp_make_synack(struct s
+@@ -2292,11 +2310,6 @@
/* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */
th->window = htons(min(req->rcv_wnd, 65535U));
tcp_options_write((__be32 *)(th + 1), tp, &opts, &md5_hash_location);
th->doff = (tcp_header_size >> 2);
TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS);
-@@ -2482,7 +2495,7 @@ void tcp_send_ack(struct sock *sk)
+@@ -2482,7 +2495,7 @@
* tcp_transmit_skb() will set the ownership to this
* sock.
*/
if (buff == NULL) {
inet_csk_schedule_ack(sk);
inet_csk(sk)->icsk_ack.ato = TCP_ATO_MIN;
-@@ -2517,7 +2530,7 @@ static int tcp_xmit_probe_skb(struct soc
+@@ -2517,7 +2530,7 @@
struct sk_buff *skb;
/* We don't queue it, tcp_transmit_skb() sets ownership. */
if (skb == NULL)
return -1;
-diff -purN linux-2.6.27/net/ipv4/tcp_timer.c linux-2.6.27.19-5.1/net/ipv4/tcp_timer.c
---- linux-2.6.27/net/ipv4/tcp_timer.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/tcp_timer.c 2009-03-25 16:11:03.000000000 +0000
-@@ -201,7 +201,7 @@ static void tcp_delack_timer(unsigned lo
+diff -r 9608d5473017 net/ipv4/tcp_timer.c
+--- a/net/ipv4/tcp_timer.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/tcp_timer.c Wed May 06 16:57:05 2009 +0100
+@@ -201,7 +201,7 @@
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPSCHEDULERFAILED);
while ((skb = __skb_dequeue(&tp->ucopy.prequeue)) != NULL)
tp->ucopy.memory = 0;
}
-diff -purN linux-2.6.27/net/ipv4/udp.c linux-2.6.27.19-5.1/net/ipv4/udp.c
---- linux-2.6.27/net/ipv4/udp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/udp.c 2009-03-25 16:11:02.000000000 +0000
-@@ -302,7 +302,7 @@ static struct sock *__udp4_lib_lookup(st
+diff -r 9608d5473017 net/ipv4/udp.c
+--- a/net/ipv4/udp.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/udp.c Wed May 06 16:57:05 2009 +0100
+@@ -302,7 +302,7 @@
return result;
}
__be16 loc_port, __be32 loc_addr,
__be16 rmt_port, __be32 rmt_addr,
int dif)
-@@ -314,7 +314,8 @@ static inline struct sock *udp_v4_mcast_
+@@ -314,7 +314,8 @@
sk_for_each_from(s, node) {
struct inet_sock *inet = inet_sk(s);
(inet->daddr && inet->daddr != rmt_addr) ||
(inet->dport != rmt_port && inet->dport) ||
(inet->rcv_saddr && inet->rcv_saddr != loc_addr) ||
-@@ -958,9 +959,11 @@ static int __udp_queue_rcv_skb(struct so
+@@ -958,9 +959,11 @@
if ((rc = sock_queue_rcv_skb(sk, skb)) < 0) {
/* Note that an ENOMEM error is charged twice */
goto drop;
}
-@@ -1097,15 +1100,16 @@ static int __udp4_lib_mcast_deliver(stru
+@@ -1097,15 +1100,16 @@
read_lock(&udp_hash_lock);
sk = sk_head(&udptable[udp_hashfn(net, ntohs(uh->dest))]);
dif = skb->dev->ifindex;
if (sknext)
skb1 = skb_clone(skb, GFP_ATOMIC);
-@@ -1170,7 +1174,7 @@ int __udp4_lib_rcv(struct sk_buff *skb,
+@@ -1170,7 +1174,7 @@
int proto)
{
struct sock *sk;
unsigned short ulen;
struct rtable *rt = (struct rtable*)skb->dst;
__be32 saddr = ip_hdr(skb)->saddr;
-@@ -1183,6 +1187,7 @@ int __udp4_lib_rcv(struct sk_buff *skb,
+@@ -1183,6 +1187,7 @@
if (!pskb_may_pull(skb, sizeof(struct udphdr)))
goto drop; /* No space for header. */
ulen = ntohs(uh->len);
if (ulen > skb->len)
goto short_packet;
-diff -purN linux-2.6.27/net/ipv4/xfrm4_output.c linux-2.6.27.19-5.1/net/ipv4/xfrm4_output.c
---- linux-2.6.27/net/ipv4/xfrm4_output.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/xfrm4_output.c 2009-03-25 16:11:03.000000000 +0000
-@@ -81,7 +81,7 @@ static int xfrm4_output_finish(struct sk
+diff -r 9608d5473017 net/ipv4/xfrm4_output.c
+--- a/net/ipv4/xfrm4_output.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/xfrm4_output.c Wed May 06 16:57:05 2009 +0100
+@@ -81,7 +81,7 @@
#endif
skb->protocol = htons(ETH_P_IP);
}
int xfrm4_output(struct sk_buff *skb)
-diff -purN linux-2.6.27/net/ipv6/addrconf.c linux-2.6.27.19-5.1/net/ipv6/addrconf.c
---- linux-2.6.27/net/ipv6/addrconf.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/addrconf.c 2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/ipv6/addrconf.c
+--- a/net/ipv6/addrconf.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/addrconf.c Wed May 06 16:57:05 2009 +0100
@@ -85,6 +85,7 @@
#include <linux/proc_fs.h>
/* Set to 3 to get tracing... */
#define ACONF_DEBUG 2
-@@ -653,6 +654,8 @@ ipv6_add_addr(struct inet6_dev *idev, co
+@@ -652,6 +653,8 @@
+ in6_dev_hold(idev);
/* For caller */
in6_ifa_hold(ifa);
-
-+ trace_ipv6_addr_add(ifa);
+
++ trace_ipv6_addr_add(ifa);
+
/* Add to big hash table */
hash = ipv6_addr_hash(addr);
-
-@@ -2167,6 +2170,7 @@ static int inet6_addr_del(struct net *ne
+@@ -2167,6 +2170,7 @@
in6_ifa_hold(ifp);
read_unlock_bh(&idev->lock);
ipv6_del_addr(ifp);
/* If the last address is deleted administratively,
-@@ -2777,6 +2781,7 @@ static void addrconf_dad_start(struct in
+@@ -2777,6 +2781,7 @@
spin_lock_bh(&ifp->lock);
if (dev->flags&(IFF_NOARP|IFF_LOOPBACK) ||
idev->cnf.accept_dad < 1 ||
!(ifp->flags&IFA_F_TENTATIVE) ||
ifp->flags & IFA_F_NODAD) {
-@@ -2874,6 +2879,7 @@ static void addrconf_dad_completed(struc
+@@ -2874,6 +2879,7 @@
if (ifp->idev->cnf.forwarding == 0 &&
ifp->idev->cnf.rtr_solicits > 0 &&
(dev->flags&IFF_LOOPBACK) == 0 &&
(ipv6_addr_type(&ifp->addr) & IPV6_ADDR_LINKLOCAL)) {
/*
* If a host as already performed a random delay
-diff -purN linux-2.6.27/net/ipv6/af_inet6.c linux-2.6.27.19-5.1/net/ipv6/af_inet6.c
---- linux-2.6.27/net/ipv6/af_inet6.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/af_inet6.c 2009-03-25 16:11:02.000000000 +0000
-@@ -839,14 +839,6 @@ static int inet6_net_init(struct net *ne
+diff -r 9608d5473017 net/ipv6/af_inet6.c
+--- a/net/ipv6/af_inet6.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/af_inet6.c Wed May 06 16:57:05 2009 +0100
+@@ -839,14 +839,6 @@
int err = 0;
net->ipv6.sysctl.bindv6only = 0;
net->ipv6.sysctl.icmpv6_time = 1*HZ;
#ifdef CONFIG_PROC_FS
-diff -purN linux-2.6.27/net/ipv6/ip6_fib.c linux-2.6.27.19-5.1/net/ipv6/ip6_fib.c
---- linux-2.6.27/net/ipv6/ip6_fib.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/ip6_fib.c 2009-03-25 16:11:02.000000000 +0000
-@@ -298,6 +298,10 @@ static void fib6_dump_end(struct netlink
+diff -r 9608d5473017 net/ipv6/ip6_fib.c
+--- a/net/ipv6/ip6_fib.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/ip6_fib.c Wed May 06 16:57:05 2009 +0100
+@@ -298,6 +298,10 @@
struct fib6_walker_t *w = (void*)cb->args[2];
if (w) {
cb->args[2] = 0;
kfree(w);
}
-@@ -330,15 +334,12 @@ static int fib6_dump_table(struct fib6_t
+@@ -330,15 +334,12 @@
read_lock_bh(&table->tb6_lock);
res = fib6_walk_continue(w);
read_unlock_bh(&table->tb6_lock);
return res;
}
-diff -purN linux-2.6.27/net/ipv6/ip6_flowlabel.c linux-2.6.27.19-5.1/net/ipv6/ip6_flowlabel.c
---- linux-2.6.27/net/ipv6/ip6_flowlabel.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/ip6_flowlabel.c 2009-03-25 16:11:02.000000000 +0000
-@@ -323,17 +323,21 @@ static struct ip6_flowlabel *
+diff -r 9608d5473017 net/ipv6/ip6_flowlabel.c
+--- a/net/ipv6/ip6_flowlabel.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/ip6_flowlabel.c Wed May 06 16:57:05 2009 +0100
+@@ -323,17 +323,21 @@
fl_create(struct net *net, struct in6_flowlabel_req *freq, char __user *optval,
int optlen, int *err_p)
{
int olen;
int addr_type;
int err;
-
++
+ olen = optlen - CMSG_ALIGN(sizeof(*freq));
+ err = -EINVAL;
+ if (olen > 64 * 1024)
+ goto done;
-+
+
err = -ENOMEM;
fl = kzalloc(sizeof(*fl), GFP_KERNEL);
if (fl == NULL)
if (olen > 0) {
struct msghdr msg;
struct flowi flowi;
-diff -purN linux-2.6.27/net/ipv6/ip6_output.c linux-2.6.27.19-5.1/net/ipv6/ip6_output.c
---- linux-2.6.27/net/ipv6/ip6_output.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/ip6_output.c 2009-03-25 16:11:02.000000000 +0000
-@@ -1091,6 +1091,18 @@ static inline int ip6_ufo_append_data(st
+diff -r 9608d5473017 net/ipv6/ip6_output.c
+--- a/net/ipv6/ip6_output.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/ip6_output.c Wed May 06 16:57:05 2009 +0100
+@@ -1091,6 +1091,18 @@
return err;
}
int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
int offset, int len, int odd, struct sk_buff *skb),
void *from, int length, int transhdrlen,
-@@ -1116,17 +1128,37 @@ int ip6_append_data(struct sock *sk, int
+@@ -1116,17 +1128,37 @@
* setup for corking
*/
if (opt) {
/* need source address above miyazawa*/
}
dst_hold(&rt->u.dst);
-@@ -1153,8 +1185,7 @@ int ip6_append_data(struct sock *sk, int
+@@ -1153,8 +1185,7 @@
} else {
rt = (struct rt6_info *)inet->cork.dst;
fl = &inet->cork.fl;
transhdrlen = 0;
exthdrlen = 0;
mtu = inet->cork.fragsize;
-@@ -1393,9 +1424,15 @@ error:
+@@ -1393,9 +1424,15 @@
static void ip6_cork_release(struct inet_sock *inet, struct ipv6_pinfo *np)
{
if (inet->cork.dst) {
dst_release(inet->cork.dst);
inet->cork.dst = NULL;
-diff -purN linux-2.6.27/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c linux-2.6.27.19-5.1/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
---- linux-2.6.27/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c 2009-03-25 16:11:02.000000000 +0000
-@@ -49,8 +49,8 @@ static bool icmpv6_pkt_to_tuple(const st
+diff -r 9608d5473017 net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
+--- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c Wed May 06 16:57:05 2009 +0100
+@@ -49,8 +49,8 @@
static const u_int8_t invmap[] = {
[ICMPV6_ECHO_REQUEST - 128] = ICMPV6_ECHO_REPLY + 1,
[ICMPV6_ECHO_REPLY - 128] = ICMPV6_ECHO_REQUEST + 1,
};
static bool icmpv6_invert_tuple(struct nf_conntrack_tuple *tuple,
-diff -purN linux-2.6.27/net/ipv6/reassembly.c linux-2.6.27.19-5.1/net/ipv6/reassembly.c
---- linux-2.6.27/net/ipv6/reassembly.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/reassembly.c 2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/ipv6/reassembly.c
+--- a/net/ipv6/reassembly.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/reassembly.c Wed May 06 16:57:05 2009 +0100
@@ -41,6 +41,7 @@
#include <linux/random.h>
#include <linux/jhash.h>
#include <net/sock.h>
#include <net/snmp.h>
-@@ -632,6 +633,64 @@ static struct inet6_protocol frag_protoc
+@@ -632,6 +633,64 @@
};
#ifdef CONFIG_SYSCTL
static struct ctl_table ip6_frags_ns_ctl_table[] = {
{
.ctl_name = NET_IPV6_IP6FRAG_HIGH_THRESH,
-@@ -639,7 +698,8 @@ static struct ctl_table ip6_frags_ns_ctl
+@@ -639,7 +698,8 @@
.data = &init_net.ipv6.frags.high_thresh,
.maxlen = sizeof(int),
.mode = 0644,
},
{
.ctl_name = NET_IPV6_IP6FRAG_LOW_THRESH,
-@@ -748,17 +808,39 @@ static inline void ip6_frags_sysctl_unre
+@@ -748,17 +808,39 @@
static int ipv6_frags_init_net(struct net *net)
{
ip6_frags_ns_sysctl_unregister(net);
inet_frags_exit_net(&net->ipv6.frags, &ip6_frags);
}
-diff -purN linux-2.6.27/net/ipv6/route.c linux-2.6.27.19-5.1/net/ipv6/route.c
---- linux-2.6.27/net/ipv6/route.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/route.c 2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/ipv6/route.c
+--- a/net/ipv6/route.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/route.c Wed May 06 16:57:05 2009 +0100
@@ -37,6 +37,7 @@
#include <linux/mroute6.h>
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/nsproxy.h>
-@@ -2473,6 +2474,64 @@ int ipv6_sysctl_rtcache_flush(ctl_table
+@@ -2473,6 +2474,64 @@
return -EINVAL;
}
ctl_table ipv6_route_table_template[] = {
{
.procname = "flush",
-@@ -2495,7 +2554,8 @@ ctl_table ipv6_route_table_template[] =
+@@ -2495,7 +2554,8 @@
.data = &init_net.ipv6.sysctl.ip6_rt_max_size,
.maxlen = sizeof(int),
.mode = 0644,
},
{
.ctl_name = NET_IPV6_ROUTE_GC_MIN_INTERVAL,
-@@ -2583,6 +2643,8 @@ struct ctl_table *ipv6_route_sysctl_init
+@@ -2583,6 +2643,8 @@
table[8].data = &net->ipv6.sysctl.ip6_rt_min_advmss;
}
return table;
}
#endif
-@@ -2611,10 +2673,8 @@ static int ip6_route_net_init(struct net
+@@ -2611,10 +2673,8 @@
net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
sizeof(*net->ipv6.ip6_prohibit_entry),
GFP_KERNEL);
net->ipv6.ip6_prohibit_entry->u.dst.path =
(struct dst_entry *)net->ipv6.ip6_prohibit_entry;
net->ipv6.ip6_prohibit_entry->u.dst.ops = net->ipv6.ip6_dst_ops;
-@@ -2622,16 +2682,30 @@ static int ip6_route_net_init(struct net
+@@ -2622,15 +2682,29 @@
net->ipv6.ip6_blk_hole_entry = kmemdup(&ip6_blk_hole_entry_template,
sizeof(*net->ipv6.ip6_blk_hole_entry),
GFP_KERNEL);
(struct dst_entry *)net->ipv6.ip6_blk_hole_entry;
net->ipv6.ip6_blk_hole_entry->u.dst.ops = net->ipv6.ip6_dst_ops;
#endif
-
++
+ net->ipv6.sysctl.flush_delay = 0;
+ net->ipv6.sysctl.ip6_rt_max_size = 4096;
+ net->ipv6.sysctl.ip6_rt_gc_min_interval = HZ / 2;
+ net->ipv6.sysctl.ip6_rt_max_size);
+ if (ret)
+ goto out_reserve_fail;
-+
+
#ifdef CONFIG_PROC_FS
proc_net_fops_create(net, "ipv6_route", 0, &ipv6_route_proc_fops);
- proc_net_fops_create(net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops);
-@@ -2642,6 +2716,15 @@ static int ip6_route_net_init(struct net
+@@ -2642,6 +2716,15 @@
out:
return ret;
out_ip6_dst_ops:
release_net(net->ipv6.ip6_dst_ops->dst_net);
kfree(net->ipv6.ip6_dst_ops);
-@@ -2654,6 +2737,7 @@ static void ip6_route_net_exit(struct ne
+@@ -2654,6 +2737,7 @@
proc_net_remove(net, "ipv6_route");
proc_net_remove(net, "rt6_stats");
#endif
kfree(net->ipv6.ip6_null_entry);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry);
-diff -purN linux-2.6.27/net/ipv6/tcp_ipv6.c linux-2.6.27.19-5.1/net/ipv6/tcp_ipv6.c
---- linux-2.6.27/net/ipv6/tcp_ipv6.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/tcp_ipv6.c 2009-03-25 16:11:02.000000000 +0000
-@@ -582,7 +582,8 @@ static int tcp_v6_md5_do_add(struct sock
+diff -r 9608d5473017 net/ipv6/tcp_ipv6.c
+--- a/net/ipv6/tcp_ipv6.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/tcp_ipv6.c Wed May 06 16:57:05 2009 +0100
+@@ -582,7 +582,8 @@
} else {
/* reallocate new list if current one is full. */
if (!tp->md5sig_info) {
if (!tp->md5sig_info) {
kfree(newkey);
return -ENOMEM;
-@@ -595,7 +596,8 @@ static int tcp_v6_md5_do_add(struct sock
+@@ -595,7 +596,8 @@
}
if (tp->md5sig_info->alloced6 == tp->md5sig_info->entries6) {
keys = kmalloc((sizeof (tp->md5sig_info->keys6[0]) *
if (!keys) {
tcp_free_md5sig_pool();
-@@ -719,7 +721,8 @@ static int tcp_v6_parse_md5_keys (struct
+@@ -719,7 +721,8 @@
struct tcp_sock *tp = tcp_sk(sk);
struct tcp_md5sig_info *p;
if (!p)
return -ENOMEM;
-@@ -952,6 +955,7 @@ static void tcp_v6_send_reset(struct soc
+@@ -952,6 +955,7 @@
#ifdef CONFIG_TCP_MD5SIG
struct tcp_md5sig_key *key;
#endif
if (th->rst)
return;
-@@ -969,13 +973,16 @@ static void tcp_v6_send_reset(struct soc
+@@ -969,13 +973,16 @@
tot_len += TCPOLEN_MD5SIG_ALIGNED;
#endif
if (buff == NULL)
return;
-@@ -1063,7 +1070,7 @@ static void tcp_v6_send_ack(struct sk_bu
+@@ -1063,7 +1070,7 @@
#endif
buff = alloc_skb(MAX_HEADER + sizeof(struct ipv6hdr) + tot_len,
if (buff == NULL)
return;
-@@ -1087,7 +1094,7 @@ static void tcp_v6_send_ack(struct sk_bu
+@@ -1087,7 +1094,7 @@
*topt++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
(TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP);
*topt++ = htonl(tcp_time_stamp);
}
#ifdef CONFIG_TCP_MD5SIG
-diff -purN linux-2.6.27/net/ipv6/udp.c linux-2.6.27.19-5.1/net/ipv6/udp.c
---- linux-2.6.27/net/ipv6/udp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/udp.c 2009-03-25 16:11:02.000000000 +0000
-@@ -313,7 +313,7 @@ drop:
+diff -r 9608d5473017 net/ipv6/udp.c
+--- a/net/ipv6/udp.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/udp.c Wed May 06 16:57:05 2009 +0100
+@@ -313,7 +313,7 @@
return -1;
}
__be16 loc_port, struct in6_addr *loc_addr,
__be16 rmt_port, struct in6_addr *rmt_addr,
int dif)
-@@ -325,7 +325,7 @@ static struct sock *udp_v6_mcast_next(st
+@@ -325,7 +325,7 @@
sk_for_each_from(s, node) {
struct inet_sock *inet = inet_sk(s);
continue;
if (s->sk_hash == num && s->sk_family == PF_INET6) {
-@@ -368,14 +368,14 @@ static int __udp6_lib_mcast_deliver(stru
+@@ -368,14 +368,14 @@
read_lock(&udp_hash_lock);
sk = sk_head(&udptable[udp_hashfn(net, ntohs(uh->dest))]);
dif = inet6_iif(skb);
uh->source, saddr, dif))) {
struct sk_buff *buff = skb_clone(skb, GFP_ATOMIC);
if (buff) {
-diff -purN linux-2.6.27/net/iucv/af_iucv.c linux-2.6.27.19-5.1/net/iucv/af_iucv.c
---- linux-2.6.27/net/iucv/af_iucv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/iucv/af_iucv.c 2009-03-25 16:11:00.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 net/iucv/af_iucv.c
+--- a/net/iucv/af_iucv.c Wed May 06 15:47:13 2009 +0100
++++ b/net/iucv/af_iucv.c Wed May 06 16:57:05 2009 +0100
+@@ -7,6 +7,8 @@
+ *
* Author(s): Jennifer Hunt <jenhunt@us.ibm.com>
*/
-
-+#define KMSG_COMPONENT "af_iucv"
+
++#define KMSG_COMPONENT "af_iucv"
+
#include <linux/module.h>
#include <linux/types.h>
- #include <linux/list.h>
-@@ -616,6 +618,8 @@ static int iucv_sock_sendmsg(struct kioc
+@@ -616,6 +618,8 @@
struct iucv_sock *iucv = iucv_sk(sk);
struct sk_buff *skb;
struct iucv_message txmsg;
int err;
err = sock_error(sk);
-@@ -651,8 +655,15 @@ static int iucv_sock_sendmsg(struct kioc
+@@ -651,8 +655,15 @@
err = iucv_message_send(iucv->path, &txmsg, 0, 0,
(void *) skb->data, skb->len);
if (err) {
skb_unlink(skb, &iucv->send_skb_q);
err = -EPIPE;
goto fail;
-@@ -778,6 +789,8 @@ static int iucv_sock_recvmsg(struct kioc
+@@ -778,6 +789,8 @@
target = sock_rcvlowat(sk, flags & MSG_WAITALL, len);
skb = skb_recv_datagram(sk, flags, noblock, &err);
if (!skb) {
if (sk->sk_shutdown & RCV_SHUTDOWN)
-@@ -825,9 +838,7 @@ static int iucv_sock_recvmsg(struct kioc
+@@ -825,9 +838,7 @@
iucv_process_message_q(sk);
spin_unlock_bh(&iucv->message_q.lock);
}
done:
return err ? : copied;
-@@ -1190,7 +1201,8 @@ static int __init afiucv_init(void)
+@@ -1190,7 +1201,8 @@
int err;
if (!MACHINE_IS_VM) {
err = -EPROTONOSUPPORT;
goto out;
}
-diff -purN linux-2.6.27/net/iucv/iucv.c linux-2.6.27.19-5.1/net/iucv/iucv.c
---- linux-2.6.27/net/iucv/iucv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/iucv/iucv.c 2009-03-25 16:11:00.000000000 +0000
-@@ -30,6 +30,8 @@
+diff -r 9608d5473017 net/iucv/iucv.c
+--- a/net/iucv/iucv.c Wed May 06 15:47:13 2009 +0100
++++ b/net/iucv/iucv.c Wed May 06 16:57:05 2009 +0100
+@@ -29,6 +29,8 @@
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
-+#define KMSG_COMPONENT "iucv"
+
++#define KMSG_COMPONENT "iucv"
+
#include <linux/module.h>
#include <linux/moduleparam.h>
- #include <linux/spinlock.h>
-@@ -424,8 +426,8 @@ static void iucv_declare_cpu(void *data)
+@@ -424,8 +426,8 @@
err = "Paging or storage error";
break;
}
return;
}
-@@ -514,6 +516,7 @@ static int iucv_enable(void)
+@@ -514,6 +516,7 @@
size_t alloc_size;
int cpu, rc;
rc = -ENOMEM;
alloc_size = iucv_max_pathid * sizeof(struct iucv_path);
iucv_path_table = kzalloc(alloc_size, GFP_KERNEL);
-@@ -521,19 +524,17 @@ static int iucv_enable(void)
+@@ -521,19 +524,17 @@
goto out;
/* Declare per cpu buffers. */
rc = -EIO;
return 0;
-
-out_path:
-- put_online_cpus();
-- kfree(iucv_path_table);
- out:
++out:
+ kfree(iucv_path_table);
+ iucv_path_table = NULL;
-+ put_online_cpus();
+ put_online_cpus();
+- kfree(iucv_path_table);
+-out:
return rc;
}
-@@ -548,8 +549,9 @@ static void iucv_disable(void)
+@@ -548,8 +549,9 @@
{
get_online_cpus();
on_each_cpu(iucv_retrieve_cpu, NULL, 1);
-- put_online_cpus();
- kfree(iucv_path_table);
++ kfree(iucv_path_table);
+ iucv_path_table = NULL;
-+ put_online_cpus();
+ put_online_cpus();
+- kfree(iucv_path_table);
}
static int __cpuinit iucv_cpu_notify(struct notifier_block *self,
-@@ -586,10 +588,14 @@ static int __cpuinit iucv_cpu_notify(str
+@@ -586,10 +588,14 @@
case CPU_ONLINE_FROZEN:
case CPU_DOWN_FAILED:
case CPU_DOWN_FAILED_FROZEN:
cpumask = iucv_buffer_cpumask;
cpu_clear(cpu, cpumask);
if (cpus_empty(cpumask))
-@@ -1572,7 +1578,7 @@ static void iucv_external_interrupt(u16
+@@ -1572,7 +1578,7 @@
BUG_ON(p->iptype < 0x01 || p->iptype > 0x09);
work = kmalloc(sizeof(struct iucv_irq_list), GFP_ATOMIC);
if (!work) {
return;
}
memcpy(&work->data, p, sizeof(work->data));
-diff -purN linux-2.6.27/net/key/af_key.c linux-2.6.27.19-5.1/net/key/af_key.c
---- linux-2.6.27/net/key/af_key.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/key/af_key.c 2009-03-25 16:11:01.000000000 +0000
-@@ -2051,7 +2051,6 @@ static int pfkey_xfrm_policy2msg(struct
+diff -r 9608d5473017 net/key/af_key.c
+--- a/net/key/af_key.c Wed May 06 15:47:13 2009 +0100
++++ b/net/key/af_key.c Wed May 06 16:57:05 2009 +0100
+@@ -2051,7 +2051,6 @@
req_size += socklen * 2;
} else {
size -= 2*socklen;
}
rq = (void*)skb_put(skb, req_size);
pol->sadb_x_policy_len += req_size/8;
-diff -purN linux-2.6.27/net/mac80211/Kconfig linux-2.6.27.19-5.1/net/mac80211/Kconfig
---- linux-2.6.27/net/mac80211/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/mac80211/Kconfig 2009-03-25 16:11:01.000000000 +0000
-@@ -3,7 +3,6 @@ config MAC80211
+diff -r 9608d5473017 net/mac80211/Kconfig
+--- a/net/mac80211/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/net/mac80211/Kconfig Wed May 06 16:57:05 2009 +0100
+@@ -3,7 +3,6 @@
select CRYPTO
select CRYPTO_ECB
select CRYPTO_ARC4
select CRC32
select WIRELESS_EXT
select CFG80211
-diff -purN linux-2.6.27/net/mac80211/debugfs_netdev.c linux-2.6.27.19-5.1/net/mac80211/debugfs_netdev.c
---- linux-2.6.27/net/mac80211/debugfs_netdev.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/mac80211/debugfs_netdev.c 2009-03-25 16:11:02.000000000 +0000
-@@ -537,6 +537,7 @@ static int netdev_notify(struct notifier
+diff -r 9608d5473017 net/mac80211/debugfs_netdev.c
+--- a/net/mac80211/debugfs_netdev.c Wed May 06 15:47:13 2009 +0100
++++ b/net/mac80211/debugfs_netdev.c Wed May 06 16:57:05 2009 +0100
+@@ -537,6 +537,7 @@
{
struct net_device *dev = ndev;
struct dentry *dir;
struct ieee80211_sub_if_data *sdata;
char buf[10+IFNAMSIZ];
-@@ -549,10 +550,19 @@ static int netdev_notify(struct notifier
+@@ -549,10 +550,19 @@
if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid)
return 0;
+ * handle here.
+ */
+ sdata = netdev_priv(dev);
-
-- sprintf(buf, "netdev:%s", dev->name);
- dir = sdata->debugfsdir;
++
++ dir = sdata->debugfsdir;
+
+ if (!dir)
+ return 0;
-+
-+ sprintf(buf, "netdev:%s", dev->name);
+
+ sprintf(buf, "netdev:%s", dev->name);
+- dir = sdata->debugfsdir;
if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs "
"dir to %s\n", buf);
-diff -purN linux-2.6.27/net/mac80211/debugfs_sta.c linux-2.6.27.19-5.1/net/mac80211/debugfs_sta.c
---- linux-2.6.27/net/mac80211/debugfs_sta.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/mac80211/debugfs_sta.c 2009-03-25 16:11:02.000000000 +0000
-@@ -200,7 +200,7 @@ static ssize_t sta_agg_status_write(stru
+diff -r 9608d5473017 net/mac80211/debugfs_sta.c
+--- a/net/mac80211/debugfs_sta.c Wed May 06 15:47:13 2009 +0100
++++ b/net/mac80211/debugfs_sta.c Wed May 06 16:57:05 2009 +0100
+@@ -200,7 +200,7 @@
/* toggle Rx aggregation command */
tid_num = tid_num - 100;
if (tid_static_rx[tid_num] == 1) {
ieee80211_sta_stop_rx_ba_session(dev, da, tid_num, 0,
WLAN_REASON_QSTA_REQUIRE_SETUP);
sta->ampdu_mlme.tid_state_rx[tid_num] |=
-diff -purN linux-2.6.27/net/mac80211/ieee80211_i.h linux-2.6.27.19-5.1/net/mac80211/ieee80211_i.h
---- linux-2.6.27/net/mac80211/ieee80211_i.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/mac80211/ieee80211_i.h 2009-03-25 16:11:02.000000000 +0000
-@@ -117,6 +117,10 @@ struct ieee80211_sta_bss {
+diff -r 9608d5473017 net/mac80211/ieee80211_i.h
+--- a/net/mac80211/ieee80211_i.h Wed May 06 15:47:13 2009 +0100
++++ b/net/mac80211/ieee80211_i.h Wed May 06 16:57:05 2009 +0100
+@@ -117,6 +117,10 @@
* otherwise, you probably don't want to use them. */
int has_erp_value;
u8 erp_value;
};
static inline u8 *bss_mesh_cfg(struct ieee80211_sta_bss *bss)
-@@ -310,6 +314,9 @@ struct ieee80211_if_sta {
+@@ -310,6 +314,9 @@
IEEE80211_ASSOCIATE, IEEE80211_ASSOCIATED,
IEEE80211_IBSS_SEARCH, IEEE80211_IBSS_JOINED,
IEEE80211_MESH_UP
} state;
size_t ssid_len;
u8 scan_ssid[IEEE80211_MAX_SSID_LEN];
-@@ -363,6 +370,7 @@ struct ieee80211_if_sta {
+@@ -363,6 +370,7 @@
#define IEEE80211_STA_REQ_SCAN 0
#define IEEE80211_STA_REQ_AUTH 1
#define IEEE80211_STA_REQ_RUN 2
#define IEEE80211_AUTH_ALG_OPEN BIT(0)
#define IEEE80211_AUTH_ALG_SHARED_KEY BIT(1)
-diff -purN linux-2.6.27/net/mac80211/mlme.c linux-2.6.27.19-5.1/net/mac80211/mlme.c
---- linux-2.6.27/net/mac80211/mlme.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/mac80211/mlme.c 2009-03-25 16:11:02.000000000 +0000
-@@ -658,6 +658,36 @@ static void ieee80211_send_auth(struct n
- ieee80211_sta_tx(dev, skb, encrypt);
- }
+diff -r 9608d5473017 net/mac80211/mlme.c
+--- a/net/mac80211/mlme.c Wed May 06 15:47:13 2009 +0100
++++ b/net/mac80211/mlme.c Wed May 06 16:57:05 2009 +0100
+@@ -656,6 +656,36 @@
+ memcpy(skb_put(skb, extra_len), extra, extra_len);
+ ieee80211_sta_tx(dev, skb, encrypt);
++}
++
+static void ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata,
+ struct ieee80211_if_sta *ifsta)
+{
+ ifsta->ssid, ifsta->ssid_len);
+
+ mod_timer(&ifsta->timer, jiffies + IEEE80211_AUTH_TIMEOUT);
-+}
-+
+ }
- static void ieee80211_authenticate(struct net_device *dev,
- struct ieee80211_if_sta *ifsta)
-@@ -1958,7 +1988,7 @@ static void ieee80211_rx_mgmt_deauth(str
+
+@@ -1958,7 +1988,7 @@
if (ifsta->state == IEEE80211_AUTHENTICATE ||
ifsta->state == IEEE80211_ASSOCIATE ||
ifsta->state == IEEE80211_ASSOCIATED) {
mod_timer(&ifsta->timer, jiffies +
IEEE80211_RETRY_AUTH_INTERVAL);
}
-@@ -2559,8 +2589,7 @@ static void ieee80211_rx_bss_info(struct
+@@ -2559,8 +2589,7 @@
struct ieee80211_mgmt *mgmt,
size_t len,
struct ieee80211_rx_status *rx_status,
{
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
int freq, clen;
-@@ -2569,6 +2598,7 @@ static void ieee80211_rx_bss_info(struct
+@@ -2569,6 +2598,7 @@
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
u64 beacon_timestamp, rx_timestamp;
struct ieee80211_channel *channel;
DECLARE_MAC_BUF(mac);
DECLARE_MAC_BUF(mac2);
-@@ -2728,15 +2758,14 @@ static void ieee80211_rx_bss_info(struct
+@@ -2728,15 +2758,14 @@
bss->signal = rx_status->signal;
bss->noise = rx_status->noise;
bss->qual = rx_status->qual;
ieee80211_rx_bss_put(local, bss);
return;
}
-@@ -2891,6 +2920,8 @@ static void ieee80211_rx_mgmt_probe_resp
+@@ -2891,6 +2920,8 @@
{
size_t baselen;
struct ieee802_11_elems elems;
baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt;
if (baselen > len)
-@@ -2899,7 +2930,17 @@ static void ieee80211_rx_mgmt_probe_resp
+@@ -2899,7 +2930,17 @@
ieee802_11_parse_elems(mgmt->u.probe_resp.variable, len - baselen,
&elems);
}
-@@ -2923,7 +2964,7 @@ static void ieee80211_rx_mgmt_beacon(str
+@@ -2923,7 +2964,7 @@
ieee802_11_parse_elems(mgmt->u.beacon.variable, len - baselen, &elems);
sdata = IEEE80211_DEV_TO_SUB_IF(dev);
if (sdata->vif.type != IEEE80211_IF_TYPE_STA)
-@@ -3361,7 +3402,8 @@ void ieee80211_sta_work(struct work_stru
+@@ -3361,7 +3402,8 @@
mesh_path_start_discovery(dev);
#endif
ifsta->state != IEEE80211_ASSOCIATE &&
test_and_clear_bit(IEEE80211_STA_REQ_SCAN, &ifsta->request)) {
if (ifsta->scan_ssid_len)
-@@ -3381,6 +3423,10 @@ void ieee80211_sta_work(struct work_stru
+@@ -3381,6 +3423,10 @@
switch (ifsta->state) {
case IEEE80211_DISABLED:
break;
case IEEE80211_AUTHENTICATE:
ieee80211_authenticate(dev, ifsta);
break;
-@@ -3541,8 +3587,18 @@ static int ieee80211_sta_config_auth(str
+@@ -3541,8 +3587,18 @@
selected->ssid_len);
ieee80211_sta_set_bssid(dev, selected->bssid);
ieee80211_sta_def_wmm_params(dev, selected, 0);
ieee80211_sta_reset_auth(dev, ifsta);
return 0;
} else {
-@@ -3553,6 +3609,7 @@ static int ieee80211_sta_config_auth(str
+@@ -3553,6 +3609,7 @@
ieee80211_sta_start_scan(dev, ifsta->ssid,
ifsta->ssid_len);
ifsta->state = IEEE80211_AUTHENTICATE;
set_bit(IEEE80211_STA_REQ_AUTH, &ifsta->request);
} else
ifsta->state = IEEE80211_DISABLED;
-diff -purN linux-2.6.27/net/mac80211/tx.c linux-2.6.27.19-5.1/net/mac80211/tx.c
---- linux-2.6.27/net/mac80211/tx.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/mac80211/tx.c 2009-03-25 16:11:02.000000000 +0000
-@@ -1335,8 +1335,10 @@ int ieee80211_master_start_xmit(struct s
+diff -r 9608d5473017 net/mac80211/tx.c
+--- a/net/mac80211/tx.c Wed May 06 15:47:13 2009 +0100
++++ b/net/mac80211/tx.c Wed May 06 16:57:05 2009 +0100
+@@ -1335,8 +1335,10 @@
if (is_multicast_ether_addr(hdr->addr3))
memcpy(hdr->addr1, hdr->addr3, ETH_ALEN);
else
if (memcmp(odev->dev_addr, hdr->addr4, ETH_ALEN) != 0)
IEEE80211_IFSTA_MESH_CTR_INC(&osdata->u.sta,
fwded_frames);
-diff -purN linux-2.6.27/net/mac80211/wext.c linux-2.6.27.19-5.1/net/mac80211/wext.c
---- linux-2.6.27/net/mac80211/wext.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/mac80211/wext.c 2009-03-25 16:11:01.000000000 +0000
-@@ -804,7 +804,7 @@ static int ieee80211_ioctl_siwfrag(struc
+diff -r 9608d5473017 net/mac80211/wext.c
+--- a/net/mac80211/wext.c Wed May 06 15:47:13 2009 +0100
++++ b/net/mac80211/wext.c Wed May 06 16:57:05 2009 +0100
+@@ -804,7 +804,7 @@
* configure it here */
if (local->ops->set_frag_threshold)
local_to_hw(local),
local->fragmentation_threshold);
-diff -purN linux-2.6.27/net/netfilter/Kconfig linux-2.6.27.19-5.1/net/netfilter/Kconfig
---- linux-2.6.27/net/netfilter/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/netfilter/Kconfig 2009-03-25 16:11:02.000000000 +0000
-@@ -278,6 +278,21 @@ config NF_CONNTRACK_TFTP
-
- To compile it as a module, choose M here. If unsure, say N.
-
+diff -r 9608d5473017 net/netfilter/Kconfig
+--- a/net/netfilter/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/net/netfilter/Kconfig Wed May 06 16:57:05 2009 +0100
+@@ -275,6 +275,21 @@
+ on how restrictive your ruleset is.
+ If you are using a tftp client behind -j SNAT or -j MASQUERADING
+ you will need this.
++
++ To compile it as a module, choose M here. If unsure, say N.
++
+config NF_CONNTRACK_SLP
+ tristate "SLP protocol support"
+ depends on NF_CONNTRACK
+ originating broadcast SLP queries and the corresponding
+ responses. It relies on correct IP address configuration, specifically
+ netmask and broadcast address.
-+
-+ To compile it as a module, choose M here. If unsure, say N.
-+
- config NF_CT_NETLINK
- tristate 'Connection tracking netlink interface'
- depends on NF_CONNTRACK
-diff -purN linux-2.6.27/net/netfilter/Makefile linux-2.6.27.19-5.1/net/netfilter/Makefile
---- linux-2.6.27/net/netfilter/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/netfilter/Makefile 2009-03-25 16:11:02.000000000 +0000
-@@ -33,6 +33,7 @@ obj-$(CONFIG_NF_CONNTRACK_PPTP) += nf_co
+
+ To compile it as a module, choose M here. If unsure, say N.
+
+diff -r 9608d5473017 net/netfilter/Makefile
+--- a/net/netfilter/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/net/netfilter/Makefile Wed May 06 16:57:05 2009 +0100
+@@ -33,6 +33,7 @@
obj-$(CONFIG_NF_CONNTRACK_SANE) += nf_conntrack_sane.o
obj-$(CONFIG_NF_CONNTRACK_SIP) += nf_conntrack_sip.o
obj-$(CONFIG_NF_CONNTRACK_TFTP) += nf_conntrack_tftp.o
# generic X tables
obj-$(CONFIG_NETFILTER_XTABLES) += x_tables.o xt_tcpudp.o
-diff -purN linux-2.6.27/net/netfilter/core.c linux-2.6.27.19-5.1/net/netfilter/core.c
---- linux-2.6.27/net/netfilter/core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/netfilter/core.c 2009-03-25 16:11:02.000000000 +0000
-@@ -184,9 +184,12 @@ next_hook:
+diff -r 9608d5473017 net/netfilter/core.c
+--- a/net/netfilter/core.c Wed May 06 15:47:13 2009 +0100
++++ b/net/netfilter/core.c Wed May 06 16:57:05 2009 +0100
+@@ -184,9 +184,12 @@
ret = 1;
goto unlock;
} else if (verdict == NF_DROP) {
if (!nf_queue(skb, elem, pf, hook, indev, outdev, okfn,
verdict >> NF_VERDICT_BITS))
goto next_hook;
-diff -purN linux-2.6.27/net/netfilter/nf_conntrack_pptp.c linux-2.6.27.19-5.1/net/netfilter/nf_conntrack_pptp.c
---- linux-2.6.27/net/netfilter/nf_conntrack_pptp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/netfilter/nf_conntrack_pptp.c 2009-03-25 16:11:02.000000000 +0000
-@@ -65,7 +65,7 @@ void
+diff -r 9608d5473017 net/netfilter/nf_conntrack_pptp.c
+--- a/net/netfilter/nf_conntrack_pptp.c Wed May 06 15:47:13 2009 +0100
++++ b/net/netfilter/nf_conntrack_pptp.c Wed May 06 16:57:05 2009 +0100
+@@ -65,7 +65,7 @@
struct nf_conntrack_expect *exp) __read_mostly;
EXPORT_SYMBOL_GPL(nf_nat_pptp_hook_expectfn);
/* PptpControlMessageType names */
const char *const pptp_msg_name[] = {
"UNKNOWN_MESSAGE",
-diff -purN linux-2.6.27/net/netfilter/nf_conntrack_slp.c linux-2.6.27.19-5.1/net/netfilter/nf_conntrack_slp.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/netfilter/nf_conntrack_slp.c 2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/netfilter/nf_conntrack_slp.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/net/netfilter/nf_conntrack_slp.c Wed May 06 16:57:05 2009 +0100
@@ -0,0 +1,132 @@
+/*
+ * NetBIOS name service broadcast connection tracking helper
+
+module_init(nf_conntrack_slp_init);
+module_exit(nf_conntrack_slp_fini);
-diff -purN linux-2.6.27/net/netfilter/xt_iprange.c linux-2.6.27.19-5.1/net/netfilter/xt_iprange.c
---- linux-2.6.27/net/netfilter/xt_iprange.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/netfilter/xt_iprange.c 2009-03-25 16:11:02.000000000 +0000
-@@ -67,7 +67,7 @@ iprange_mt4(const struct sk_buff *skb, c
+diff -r 9608d5473017 net/netfilter/xt_iprange.c
+--- a/net/netfilter/xt_iprange.c Wed May 06 15:47:13 2009 +0100
++++ b/net/netfilter/xt_iprange.c Wed May 06 16:57:06 2009 +0100
+@@ -67,7 +67,7 @@
if (info->flags & IPRANGE_SRC) {
m = ntohl(iph->saddr) < ntohl(info->src_min.ip);
m |= ntohl(iph->saddr) > ntohl(info->src_max.ip);
if (m) {
pr_debug("src IP " NIPQUAD_FMT " NOT in range %s"
NIPQUAD_FMT "-" NIPQUAD_FMT "\n",
-@@ -81,7 +81,7 @@ iprange_mt4(const struct sk_buff *skb, c
+@@ -81,7 +81,7 @@
if (info->flags & IPRANGE_DST) {
m = ntohl(iph->daddr) < ntohl(info->dst_min.ip);
m |= ntohl(iph->daddr) > ntohl(info->dst_max.ip);
if (m) {
pr_debug("dst IP " NIPQUAD_FMT " NOT in range %s"
NIPQUAD_FMT "-" NIPQUAD_FMT "\n",
-@@ -123,14 +123,14 @@ iprange_mt6(const struct sk_buff *skb, c
+@@ -123,14 +123,14 @@
if (info->flags & IPRANGE_SRC) {
m = iprange_ipv6_sub(&iph->saddr, &info->src_min.in6) < 0;
m |= iprange_ipv6_sub(&iph->saddr, &info->src_max.in6) > 0;
if (m)
return false;
}
-diff -purN linux-2.6.27/net/netfilter/xt_sctp.c linux-2.6.27.19-5.1/net/netfilter/xt_sctp.c
---- linux-2.6.27/net/netfilter/xt_sctp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/netfilter/xt_sctp.c 2009-03-25 16:11:02.000000000 +0000
-@@ -105,7 +105,7 @@ match_packet(const struct sk_buff *skb,
+diff -r 9608d5473017 net/netfilter/xt_sctp.c
+--- a/net/netfilter/xt_sctp.c Wed May 06 15:47:13 2009 +0100
++++ b/net/netfilter/xt_sctp.c Wed May 06 16:57:06 2009 +0100
+@@ -105,7 +105,7 @@
switch (chunk_match_type) {
case SCTP_CHUNK_MATCH_ALL:
case SCTP_CHUNK_MATCH_ANY:
return false;
case SCTP_CHUNK_MATCH_ONLY:
-diff -purN linux-2.6.27/net/packet/af_packet.c linux-2.6.27.19-5.1/net/packet/af_packet.c
---- linux-2.6.27/net/packet/af_packet.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/packet/af_packet.c 2009-03-25 16:11:00.000000000 +0000
+diff -r 9608d5473017 net/packet/af_packet.c
+--- a/net/packet/af_packet.c Wed May 06 15:47:13 2009 +0100
++++ b/net/packet/af_packet.c Wed May 06 16:57:06 2009 +0100
@@ -77,6 +77,7 @@
#include <linux/poll.h>
#include <linux/module.h>
#ifdef CONFIG_INET
#include <net/inet_common.h>
-@@ -175,6 +176,7 @@ struct packet_sock {
+@@ -175,6 +176,7 @@
#endif
struct packet_type prot_hook;
spinlock_t bind_lock;
unsigned int running:1, /* prot_hook is attached*/
auxdata:1,
origdev:1;
-@@ -220,13 +222,13 @@ static void *packet_lookup_frame(struct
+@@ -220,13 +222,13 @@
h.raw = po->pg_vec[pg_vec_pos] + (frame_offset * po->frame_size);
switch (po->tp_version) {
case TPACKET_V1:
return NULL;
break;
}
-@@ -1068,6 +1070,7 @@ static int packet_create(struct net *net
+@@ -1068,6 +1070,7 @@
*/
spin_lock_init(&po->bind_lock);
po->prot_hook.func = packet_rcv;
if (sock->type == SOCK_PACKET)
-@@ -1863,6 +1866,7 @@ static int packet_set_ring(struct sock *
+@@ -1863,6 +1866,7 @@
synchronize_net();
err = -EBUSY;
if (closing || atomic_read(&po->mapped) == 0) {
err = 0;
#define XC(a, b) ({ __typeof__ ((a)) __t; __t = (a); (a) = (b); __t; })
-@@ -1884,6 +1888,7 @@ static int packet_set_ring(struct sock *
+@@ -1884,6 +1888,7 @@
if (atomic_read(&po->mapped))
printk(KERN_DEBUG "packet_mmap: vma is busy: %d\n", atomic_read(&po->mapped));
}
spin_lock(&po->bind_lock);
if (was_running && !po->running) {
-@@ -1916,7 +1921,7 @@ static int packet_mmap(struct file *file
+@@ -1916,7 +1921,7 @@
size = vma->vm_end - vma->vm_start;
if (po->pg_vec == NULL)
goto out;
if (size != po->pg_vec_len*po->pg_vec_pages*PAGE_SIZE)
-@@ -1939,7 +1944,7 @@ static int packet_mmap(struct file *file
+@@ -1939,7 +1944,7 @@
err = 0;
out:
return err;
}
#endif
-diff -purN linux-2.6.27/net/rfkill/rfkill.c linux-2.6.27.19-5.1/net/rfkill/rfkill.c
---- linux-2.6.27/net/rfkill/rfkill.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/rfkill/rfkill.c 2009-03-25 16:11:00.000000000 +0000
-@@ -117,6 +117,7 @@ static void rfkill_led_trigger_activate(
+diff -r 9608d5473017 net/rfkill/rfkill.c
+--- a/net/rfkill/rfkill.c Wed May 06 15:47:13 2009 +0100
++++ b/net/rfkill/rfkill.c Wed May 06 16:57:06 2009 +0100
+@@ -117,6 +117,7 @@
static void notify_rfkill_state_change(struct rfkill *rfkill)
{
blocking_notifier_call_chain(&rfkill_notifier_list,
RFKILL_STATE_CHANGED,
rfkill);
-@@ -204,10 +205,8 @@ static int rfkill_toggle_radio(struct rf
+@@ -204,10 +205,8 @@
rfkill->state = state;
}
return retval;
}
-diff -purN linux-2.6.27/net/sched/Kconfig linux-2.6.27.19-5.1/net/sched/Kconfig
---- linux-2.6.27/net/sched/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sched/Kconfig 2009-03-25 16:11:02.000000000 +0000
-@@ -106,6 +106,15 @@ config NET_SCH_PRIO
+diff -r 9608d5473017 net/sched/Kconfig
+--- a/net/sched/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/net/sched/Kconfig Wed May 06 16:57:06 2009 +0100
+@@ -105,6 +105,15 @@
+
To compile this code as a module, choose M here: the
module will be called sch_prio.
-
++
+config NET_SCH_MULTIQ
+ tristate "Hardware Multiqueue-aware Multi Band Queuing (MULTIQ)"
+ ---help---
+
+ To compile this code as a module, choose M here: the
+ module will be called sch_multiq.
-+
+
config NET_SCH_RED
tristate "Random Early Detection (RED)"
- ---help---
-@@ -476,6 +485,17 @@ config NET_ACT_SIMP
+@@ -476,6 +485,17 @@
To compile this code as a module, choose M here: the
module will be called simple.
config NET_CLS_IND
bool "Incoming device classification"
depends on NET_CLS_U32 || NET_CLS_FW
-diff -purN linux-2.6.27/net/sched/Makefile linux-2.6.27.19-5.1/net/sched/Makefile
---- linux-2.6.27/net/sched/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sched/Makefile 2009-03-25 16:11:02.000000000 +0000
-@@ -14,6 +14,7 @@ obj-$(CONFIG_NET_ACT_IPT) += act_ipt.o
+diff -r 9608d5473017 net/sched/Makefile
+--- a/net/sched/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/net/sched/Makefile Wed May 06 16:57:06 2009 +0100
+@@ -14,6 +14,7 @@
obj-$(CONFIG_NET_ACT_NAT) += act_nat.o
obj-$(CONFIG_NET_ACT_PEDIT) += act_pedit.o
obj-$(CONFIG_NET_ACT_SIMP) += act_simple.o
obj-$(CONFIG_NET_SCH_FIFO) += sch_fifo.o
obj-$(CONFIG_NET_SCH_CBQ) += sch_cbq.o
obj-$(CONFIG_NET_SCH_HTB) += sch_htb.o
-@@ -26,6 +27,7 @@ obj-$(CONFIG_NET_SCH_SFQ) += sch_sfq.o
+@@ -26,6 +27,7 @@
obj-$(CONFIG_NET_SCH_TBF) += sch_tbf.o
obj-$(CONFIG_NET_SCH_TEQL) += sch_teql.o
obj-$(CONFIG_NET_SCH_PRIO) += sch_prio.o
obj-$(CONFIG_NET_SCH_ATM) += sch_atm.o
obj-$(CONFIG_NET_SCH_NETEM) += sch_netem.o
obj-$(CONFIG_NET_CLS_U32) += cls_u32.o
-diff -purN linux-2.6.27/net/sched/act_skbedit.c linux-2.6.27.19-5.1/net/sched/act_skbedit.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sched/act_skbedit.c 2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/sched/act_skbedit.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/net/sched/act_skbedit.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,203 @@
+/*
+ * Copyright (c) 2008, Intel Corporation.
+
+module_init(skbedit_init_module);
+module_exit(skbedit_cleanup_module);
-diff -purN linux-2.6.27/net/sched/cls_u32.c linux-2.6.27.19-5.1/net/sched/cls_u32.c
---- linux-2.6.27/net/sched/cls_u32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sched/cls_u32.c 2009-03-25 16:11:02.000000000 +0000
-@@ -637,8 +637,9 @@ static int u32_change(struct tcf_proto *
+diff -r 9608d5473017 net/sched/cls_u32.c
+--- a/net/sched/cls_u32.c Wed May 06 15:47:13 2009 +0100
++++ b/net/sched/cls_u32.c Wed May 06 16:57:06 2009 +0100
+@@ -637,8 +637,9 @@
break;
n->next = *ins;
*arg = (unsigned long)n;
return 0;
-diff -purN linux-2.6.27/net/sched/sch_generic.c linux-2.6.27.19-5.1/net/sched/sch_generic.c
---- linux-2.6.27/net/sched/sch_generic.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sched/sch_generic.c 2009-03-25 16:11:02.000000000 +0000
-@@ -319,6 +319,7 @@ struct Qdisc_ops noop_qdisc_ops __read_m
+diff -r 9608d5473017 net/sched/sch_generic.c
+--- a/net/sched/sch_generic.c Wed May 06 15:47:13 2009 +0100
++++ b/net/sched/sch_generic.c Wed May 06 16:57:06 2009 +0100
+@@ -319,6 +319,7 @@
static struct netdev_queue noop_netdev_queue = {
.qdisc = &noop_qdisc,
};
struct Qdisc noop_qdisc = {
-@@ -344,6 +345,7 @@ static struct Qdisc_ops noqueue_qdisc_op
+@@ -344,6 +345,7 @@
static struct Qdisc noqueue_qdisc;
static struct netdev_queue noqueue_netdev_queue = {
.qdisc = &noqueue_qdisc,
};
static struct Qdisc noqueue_qdisc = {
-diff -purN linux-2.6.27/net/sched/sch_htb.c linux-2.6.27.19-5.1/net/sched/sch_htb.c
---- linux-2.6.27/net/sched/sch_htb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sched/sch_htb.c 2009-03-25 16:11:02.000000000 +0000
-@@ -924,6 +924,7 @@ static struct sk_buff *htb_dequeue(struc
+diff -r 9608d5473017 net/sched/sch_htb.c
+--- a/net/sched/sch_htb.c Wed May 06 15:47:13 2009 +0100
++++ b/net/sched/sch_htb.c Wed May 06 16:57:06 2009 +0100
+@@ -924,6 +924,7 @@
}
}
sch->qstats.overlimits++;
qdisc_watchdog_schedule(&q->watchdog, next_event);
fin:
return skb;
-diff -purN linux-2.6.27/net/sched/sch_multiq.c linux-2.6.27.19-5.1/net/sched/sch_multiq.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sched/sch_multiq.c 2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/sched/sch_multiq.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/net/sched/sch_multiq.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,474 @@
+/*
+ * Copyright (c) 2008, Intel Corporation.
+module_exit(multiq_module_exit)
+
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/net/sctp/input.c linux-2.6.27.19-5.1/net/sctp/input.c
---- linux-2.6.27/net/sctp/input.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sctp/input.c 2009-03-25 16:11:03.000000000 +0000
-@@ -249,6 +249,19 @@ int sctp_rcv(struct sk_buff *skb)
+diff -r 9608d5473017 net/sctp/input.c
+--- a/net/sctp/input.c Wed May 06 15:47:13 2009 +0100
++++ b/net/sctp/input.c Wed May 06 16:57:06 2009 +0100
+@@ -248,6 +248,19 @@
+ * so check if it is busy.
*/
sctp_bh_lock_sock(sk);
-
++
+ if (sk != rcvr->sk) {
+ /* Our cached sk is different from the rcvr->sk. This is
+ * because migrate()/accept() may have moved the association
+ sk = rcvr->sk;
+ sctp_bh_lock_sock(sk);
+ }
-+
+
if (sock_owned_by_user(sk)) {
SCTP_INC_STATS_BH(SCTP_MIB_IN_PKT_BACKLOG);
- sctp_add_backlog(sk, skb);
-diff -purN linux-2.6.27/net/sctp/output.c linux-2.6.27.19-5.1/net/sctp/output.c
---- linux-2.6.27/net/sctp/output.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sctp/output.c 2009-03-25 16:11:03.000000000 +0000
-@@ -324,14 +324,16 @@ append:
+diff -r 9608d5473017 net/sctp/output.c
+--- a/net/sctp/output.c Wed May 06 15:47:13 2009 +0100
++++ b/net/sctp/output.c Wed May 06 16:57:06 2009 +0100
+@@ -324,14 +324,16 @@
switch (chunk->chunk_hdr->type) {
case SCTP_CID_DATA:
retval = sctp_packet_append_data(packet, chunk);
break;
case SCTP_CID_COOKIE_ECHO:
packet->has_cookie_echo = 1;
-@@ -470,7 +472,6 @@ int sctp_packet_transmit(struct sctp_pac
+@@ -470,7 +472,6 @@
} else
chunk->resent = 1;
has_data = 1;
}
-diff -purN linux-2.6.27/net/sctp/outqueue.c linux-2.6.27.19-5.1/net/sctp/outqueue.c
---- linux-2.6.27/net/sctp/outqueue.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sctp/outqueue.c 2009-03-25 16:11:03.000000000 +0000
-@@ -929,7 +929,6 @@ static int sctp_outq_flush(struct sctp_o
+diff -r 9608d5473017 net/sctp/outqueue.c
+--- a/net/sctp/outqueue.c Wed May 06 15:47:13 2009 +0100
++++ b/net/sctp/outqueue.c Wed May 06 16:57:06 2009 +0100
+@@ -929,7 +929,6 @@
}
/* Finally, transmit new packets. */
while ((chunk = sctp_outq_dequeue_data(q)) != NULL) {
/* RFC 2960 6.5 Every DATA chunk MUST carry a valid
* stream identifier.
-@@ -1028,7 +1027,7 @@ static int sctp_outq_flush(struct sctp_o
+@@ -1028,7 +1027,7 @@
list_add_tail(&chunk->transmitted_list,
&transport->transmitted);
q->empty = 0;
-diff -purN linux-2.6.27/net/sctp/sm_statefuns.c linux-2.6.27.19-5.1/net/sctp/sm_statefuns.c
---- linux-2.6.27/net/sctp/sm_statefuns.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sctp/sm_statefuns.c 2009-03-25 16:11:03.000000000 +0000
-@@ -3635,6 +3635,7 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn(c
+diff -r 9608d5473017 net/sctp/sm_statefuns.c
+--- a/net/sctp/sm_statefuns.c Wed May 06 15:47:13 2009 +0100
++++ b/net/sctp/sm_statefuns.c Wed May 06 16:57:06 2009 +0100
+@@ -3635,6 +3635,7 @@
{
struct sctp_chunk *chunk = arg;
struct sctp_fwdtsn_hdr *fwdtsn_hdr;
__u16 len;
__u32 tsn;
-@@ -3664,6 +3665,12 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn(c
+@@ -3664,6 +3665,12 @@
if (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0)
goto discard_noforce;
sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn));
if (len > sizeof(struct sctp_fwdtsn_hdr))
sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN,
-@@ -3695,6 +3702,7 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_f
+@@ -3695,6 +3702,7 @@
{
struct sctp_chunk *chunk = arg;
struct sctp_fwdtsn_hdr *fwdtsn_hdr;
__u16 len;
__u32 tsn;
-@@ -3724,6 +3732,12 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_f
+@@ -3723,6 +3731,12 @@
+ */
if (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0)
goto gen_shutdown;
-
++
+ /* Silently discard the chunk if stream-id is not valid */
+ sctp_walk_fwdtsn(skip, chunk) {
+ if (ntohs(skip->stream) >= asoc->c.sinit_max_instreams)
+ goto gen_shutdown;
+ }
-+
+
sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn));
if (len > sizeof(struct sctp_fwdtsn_hdr))
- sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN,
-diff -purN linux-2.6.27/net/sctp/ulpevent.c linux-2.6.27.19-5.1/net/sctp/ulpevent.c
---- linux-2.6.27/net/sctp/ulpevent.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sctp/ulpevent.c 2009-03-25 16:11:03.000000000 +0000
-@@ -701,7 +701,7 @@ struct sctp_ulpevent *sctp_ulpevent_make
+diff -r 9608d5473017 net/sctp/ulpevent.c
+--- a/net/sctp/ulpevent.c Wed May 06 15:47:13 2009 +0100
++++ b/net/sctp/ulpevent.c Wed May 06 16:57:06 2009 +0100
+@@ -701,7 +701,7 @@
if (rx_count >= asoc->base.sk->sk_rcvbuf) {
if ((asoc->base.sk->sk_userlocks & SOCK_RCVBUF_LOCK) ||
goto fail;
}
-diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
---- linux-2.6.27/net/socket.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/socket.c 2009-03-25 16:11:01.000000000 +0000
+diff -r 9608d5473017 net/socket.c
+--- a/net/socket.c Wed May 06 15:47:13 2009 +0100
++++ b/net/socket.c Wed May 06 16:57:06 2009 +0100
@@ -96,6 +96,7 @@
#include <net/sock.h>
static int sock_no_open(struct inode *irrelevant, struct file *dontcare);
static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov,
-@@ -575,6 +576,7 @@ int sock_sendmsg(struct socket *sock, st
+@@ -575,6 +576,7 @@
ret = __sock_sendmsg(&iocb, sock, msg, size);
if (-EIOCBQUEUED == ret)
ret = wait_on_sync_kiocb(&iocb);
return ret;
}
-@@ -654,10 +656,12 @@ int sock_recvmsg(struct socket *sock, st
+@@ -654,10 +656,12 @@
int ret;
init_sync_kiocb(&iocb, NULL);
return ret;
}
-@@ -1216,7 +1220,7 @@ int sock_create_kern(int family, int typ
+@@ -1216,7 +1220,7 @@
return __sock_create(&init_net, family, type, protocol, res, 1);
}
{
int retval;
struct socket *sock;
-@@ -1244,6 +1248,7 @@ asmlinkage long sys_socket(int family, i
+@@ -1244,6 +1248,7 @@
if (retval < 0)
goto out_release;
out:
/* It may be already another descriptor 8) Not kernel problem. */
return retval;
-@@ -1257,8 +1262,8 @@ out_release:
+@@ -1257,8 +1262,8 @@
* Create a pair of connected sockets.
*/
{
struct socket *sock1, *sock2;
int fd1, fd2, err;
-@@ -1365,7 +1370,7 @@ out_fd:
+@@ -1365,7 +1370,7 @@
* the protocol layer (having also checked the address is ok).
*/
{
struct socket *sock;
struct sockaddr_storage address;
-@@ -1394,7 +1399,7 @@ asmlinkage long sys_bind(int fd, struct
+@@ -1394,7 +1399,7 @@
* ready for listening.
*/
{
struct socket *sock;
int err, fput_needed;
-@@ -1567,8 +1572,8 @@ asmlinkage long sys_paccept(int fd, stru
+@@ -1567,8 +1572,8 @@
#endif
#endif
{
return do_accept(fd, upeer_sockaddr, upeer_addrlen, 0);
}
-@@ -1585,8 +1590,8 @@ asmlinkage long sys_accept(int fd, struc
+@@ -1585,8 +1590,8 @@
* include the -EINPROGRESS status for such sockets.
*/
{
struct socket *sock;
struct sockaddr_storage address;
-@@ -1617,8 +1622,8 @@ out:
+@@ -1617,8 +1622,8 @@
* name to user space.
*/
{
struct socket *sock;
struct sockaddr_storage address;
-@@ -1648,8 +1653,8 @@ out:
+@@ -1648,8 +1653,8 @@
* name to user space.
*/
{
struct socket *sock;
struct sockaddr_storage address;
-@@ -1680,9 +1685,9 @@ asmlinkage long sys_getpeername(int fd,
+@@ -1680,9 +1685,9 @@
* the protocol.
*/
{
struct socket *sock;
struct sockaddr_storage address;
-@@ -1725,7 +1730,8 @@ out:
+@@ -1725,7 +1730,8 @@
* Send a datagram down a socket.
*/
{
return sys_sendto(fd, buff, len, flags, NULL, 0);
}
-@@ -1736,9 +1742,9 @@ asmlinkage long sys_send(int fd, void __
+@@ -1736,9 +1742,9 @@
* sender address from kernel to user space.
*/
{
struct socket *sock;
struct iovec iov;
-@@ -1790,8 +1796,8 @@ asmlinkage long sys_recv(int fd, void __
+@@ -1790,8 +1796,8 @@
* to pass the user mode parameter for the protocols to sort out.
*/
{
int err, fput_needed;
struct socket *sock;
-@@ -1824,8 +1830,8 @@ out_put:
+@@ -1824,8 +1830,8 @@
* to pass a user mode parameter for the protocols to sort out.
*/
{
int err, fput_needed;
struct socket *sock;
-@@ -1854,7 +1860,7 @@ out_put:
+@@ -1854,7 +1860,7 @@
* Shutdown a socket.
*/
{
int err, fput_needed;
struct socket *sock;
-@@ -1880,7 +1886,7 @@ asmlinkage long sys_shutdown(int fd, int
+@@ -1880,7 +1886,7 @@
* BSD sendmsg interface
*/
{
struct compat_msghdr __user *msg_compat =
(struct compat_msghdr __user *)msg;
-@@ -1986,8 +1992,8 @@ out:
+@@ -1986,8 +1992,8 @@
* BSD recvmsg interface
*/
{
struct compat_msghdr __user *msg_compat =
(struct compat_msghdr __user *)msg;
-@@ -2110,7 +2116,7 @@ static const unsigned char nargs[19]={
+@@ -2110,7 +2116,7 @@
* it is set by the callees.
*/
{
unsigned long a[6];
unsigned long a0, a1;
-@@ -2130,6 +2136,8 @@ asmlinkage long sys_socketcall(int call,
+@@ -2129,6 +2135,8 @@
+
a0 = a[0];
a1 = a[1];
-
-+ trace_socket_call(call, a0);
+
++ trace_socket_call(call, a0);
+
switch (call) {
case SYS_SOCKET:
- err = sys_socket(a0, a1, a[2]);
-diff -purN linux-2.6.27/net/sunrpc/auth_generic.c linux-2.6.27.19-5.1/net/sunrpc/auth_generic.c
---- linux-2.6.27/net/sunrpc/auth_generic.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sunrpc/auth_generic.c 2009-03-25 16:11:01.000000000 +0000
-@@ -133,13 +133,29 @@ static int
+diff -r 9608d5473017 net/sunrpc/auth_generic.c
+--- a/net/sunrpc/auth_generic.c Wed May 06 15:47:13 2009 +0100
++++ b/net/sunrpc/auth_generic.c Wed May 06 16:57:06 2009 +0100
+@@ -133,13 +133,29 @@
generic_match(struct auth_cred *acred, struct rpc_cred *cred, int flags)
{
struct generic_cred *gcred = container_of(cred, struct generic_cred, gc_base);
}
void __init rpc_init_generic_auth(void)
-diff -purN linux-2.6.27/net/sunrpc/rpcb_clnt.c linux-2.6.27.19-5.1/net/sunrpc/rpcb_clnt.c
---- linux-2.6.27/net/sunrpc/rpcb_clnt.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sunrpc/rpcb_clnt.c 2009-03-25 16:11:00.000000000 +0000
-@@ -469,6 +469,28 @@ static struct rpc_task *rpcb_call_async(
+diff -r 9608d5473017 net/sunrpc/rpcb_clnt.c
+--- a/net/sunrpc/rpcb_clnt.c Wed May 06 15:47:13 2009 +0100
++++ b/net/sunrpc/rpcb_clnt.c Wed May 06 16:57:06 2009 +0100
+@@ -469,6 +469,28 @@
return rpc_run_task(&task_setup_data);
}
/**
* rpcb_getport_async - obtain the port for a given RPC service on a given host
* @task: task that is waiting for portmapper request
-@@ -478,10 +500,10 @@ static struct rpc_task *rpcb_call_async(
+@@ -478,10 +500,10 @@
*/
void rpcb_getport_async(struct rpc_task *task)
{
struct rpc_clnt *rpcb_clnt;
static struct rpcbind_args *map;
struct rpc_task *child;
-@@ -490,13 +512,13 @@ void rpcb_getport_async(struct rpc_task
+@@ -490,12 +512,12 @@
size_t salen;
int status;
dprintk("RPC: %5u %s(%s, %u, %u, %d)\n",
task->tk_pid, __func__,
clnt->cl_server, clnt->cl_prog, clnt->cl_vers, xprt->prot);
-
+-
- /* Autobind on cloned rpc clients is discouraged */
- BUG_ON(clnt->cl_parent != clnt);
--
+
/* Put self on the wait queue to ensure we get notified if
* some other task is already attempting to bind the port */
- rpc_sleep_on(&xprt->binding, task, NULL);
-@@ -558,7 +580,7 @@ void rpcb_getport_async(struct rpc_task
+@@ -558,7 +580,7 @@
status = -ENOMEM;
dprintk("RPC: %5u %s: no memory available\n",
task->tk_pid, __func__);
}
map->r_prog = clnt->cl_prog;
map->r_vers = clnt->cl_vers;
-@@ -578,11 +600,13 @@ void rpcb_getport_async(struct rpc_task
+@@ -578,11 +600,13 @@
task->tk_pid, __func__);
return;
}
-- rpc_put_task(child);
-
-- task->tk_xprt->stat.bind_count++;
++
+ xprt->stat.bind_count++;
-+ rpc_put_task(child);
+ rpc_put_task(child);
+-
+- task->tk_xprt->stat.bind_count++;
return;
+bailout_release_client:
bailout_nofree:
rpcb_wake_rpcbind_waiters(xprt, status);
task->tk_status = status;
-diff -purN linux-2.6.27/net/sunrpc/sched.c linux-2.6.27.19-5.1/net/sunrpc/sched.c
---- linux-2.6.27/net/sunrpc/sched.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sunrpc/sched.c 2009-03-25 16:11:00.000000000 +0000
-@@ -729,7 +729,10 @@ struct rpc_buffer {
+diff -r 9608d5473017 net/sunrpc/sched.c
+--- a/net/sunrpc/sched.c Wed May 06 15:47:13 2009 +0100
++++ b/net/sunrpc/sched.c Wed May 06 16:57:06 2009 +0100
+@@ -729,7 +729,10 @@
void *rpc_malloc(struct rpc_task *task, size_t size)
{
struct rpc_buffer *buf;
size += sizeof(struct rpc_buffer);
if (size <= RPC_BUFFER_MAXSIZE)
-@@ -800,6 +803,8 @@ static void rpc_init_task(struct rpc_tas
+@@ -800,6 +803,8 @@
kref_get(&task->tk_client->cl_kref);
if (task->tk_client->cl_softrtry)
task->tk_flags |= RPC_TASK_SOFT;
}
if (task->tk_ops->rpc_call_prepare != NULL)
-@@ -825,7 +830,7 @@ static void rpc_init_task(struct rpc_tas
+@@ -825,7 +830,7 @@
static struct rpc_task *
rpc_alloc_task(void)
{
}
/*
-diff -purN linux-2.6.27/net/sunrpc/svcsock.c linux-2.6.27.19-5.1/net/sunrpc/svcsock.c
---- linux-2.6.27/net/sunrpc/svcsock.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sunrpc/svcsock.c 2009-03-25 16:11:01.000000000 +0000
-@@ -1171,7 +1171,11 @@ int svc_addsock(struct svc_serv *serv,
+diff -r 9608d5473017 net/sunrpc/svcsock.c
+--- a/net/sunrpc/svcsock.c Wed May 06 15:47:13 2009 +0100
++++ b/net/sunrpc/svcsock.c Wed May 06 16:57:06 2009 +0100
+@@ -1171,7 +1171,11 @@
else if (so->state > SS_UNCONNECTED)
err = -EISCONN;
else {
if (svsk) {
struct sockaddr_storage addr;
struct sockaddr *sin = (struct sockaddr *)&addr;
-@@ -1184,7 +1188,8 @@ int svc_addsock(struct svc_serv *serv,
+@@ -1184,7 +1188,8 @@
spin_unlock_bh(&serv->sv_lock);
svc_xprt_received(&svsk->sk_xprt);
err = 0;
}
if (err) {
sockfd_put(so);
-diff -purN linux-2.6.27/net/sunrpc/xprtsock.c linux-2.6.27.19-5.1/net/sunrpc/xprtsock.c
---- linux-2.6.27/net/sunrpc/xprtsock.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sunrpc/xprtsock.c 2009-03-25 16:11:01.000000000 +0000
-@@ -1445,6 +1445,55 @@ static inline void xs_reclassify_socket6
+diff -r 9608d5473017 net/sunrpc/xprtsock.c
+--- a/net/sunrpc/xprtsock.c Wed May 06 15:47:13 2009 +0100
++++ b/net/sunrpc/xprtsock.c Wed May 06 16:57:06 2009 +0100
+@@ -1445,6 +1445,55 @@
}
#endif
static void xs_udp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
{
struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
-@@ -1469,6 +1518,8 @@ static void xs_udp_finish_connecting(str
+@@ -1469,6 +1518,8 @@
transport->sock = sock;
transport->inet = sk;
write_unlock_bh(&sk->sk_callback_lock);
}
xs_udp_do_set_buffer_size(xprt);
-@@ -1486,11 +1537,15 @@ static void xs_udp_connect_worker4(struc
+@@ -1486,10 +1537,14 @@
container_of(work, struct sock_xprt, connect_worker.work);
struct rpc_xprt *xprt = &transport->xprt;
struct socket *sock = transport->sock;
if (xprt->shutdown || !xprt_bound(xprt))
goto out;
-
++
+ if (xprt->swapper)
+ current->flags |= PF_MEMALLOC;
-+
+
/* Start by resetting any existing state */
xs_close(xprt);
-
-@@ -1513,6 +1568,7 @@ static void xs_udp_connect_worker4(struc
+@@ -1513,6 +1568,7 @@
out:
xprt_wake_pending_tasks(xprt, status);
xprt_clear_connecting(xprt);
}
/**
-@@ -1527,11 +1583,15 @@ static void xs_udp_connect_worker6(struc
+@@ -1527,10 +1583,14 @@
container_of(work, struct sock_xprt, connect_worker.work);
struct rpc_xprt *xprt = &transport->xprt;
struct socket *sock = transport->sock;
if (xprt->shutdown || !xprt_bound(xprt))
goto out;
-
++
+ if (xprt->swapper)
+ current->flags |= PF_MEMALLOC;
-+
+
/* Start by resetting any existing state */
xs_close(xprt);
-
-@@ -1554,6 +1614,7 @@ static void xs_udp_connect_worker6(struc
+@@ -1554,6 +1614,7 @@
out:
xprt_wake_pending_tasks(xprt, status);
xprt_clear_connecting(xprt);
}
/*
-@@ -1613,6 +1674,8 @@ static int xs_tcp_finish_connecting(stru
+@@ -1613,6 +1674,8 @@
write_unlock_bh(&sk->sk_callback_lock);
}
/* Tell the socket layer to start connecting... */
xprt->stat.connect_count++;
xprt->stat.connect_start = jiffies;
-@@ -1631,11 +1694,15 @@ static void xs_tcp_connect_worker4(struc
+@@ -1631,10 +1694,14 @@
container_of(work, struct sock_xprt, connect_worker.work);
struct rpc_xprt *xprt = &transport->xprt;
struct socket *sock = transport->sock;
if (xprt->shutdown || !xprt_bound(xprt))
goto out;
-
++
+ if (xprt->swapper)
+ current->flags |= PF_MEMALLOC;
-+
+
if (!sock) {
/* start from scratch */
- if ((err = sock_create_kern(PF_INET, SOCK_STREAM, IPPROTO_TCP, &sock)) < 0) {
-@@ -1677,6 +1744,7 @@ out:
+@@ -1677,6 +1744,7 @@
xprt_wake_pending_tasks(xprt, status);
out_clear:
xprt_clear_connecting(xprt);
}
/**
-@@ -1691,11 +1759,15 @@ static void xs_tcp_connect_worker6(struc
+@@ -1691,10 +1759,14 @@
container_of(work, struct sock_xprt, connect_worker.work);
struct rpc_xprt *xprt = &transport->xprt;
struct socket *sock = transport->sock;
if (xprt->shutdown || !xprt_bound(xprt))
goto out;
-
++
+ if (xprt->swapper)
+ current->flags |= PF_MEMALLOC;
-+
+
if (!sock) {
/* start from scratch */
- if ((err = sock_create_kern(PF_INET6, SOCK_STREAM, IPPROTO_TCP, &sock)) < 0) {
-@@ -1736,6 +1808,7 @@ out:
+@@ -1736,6 +1808,7 @@
xprt_wake_pending_tasks(xprt, status);
out_clear:
xprt_clear_connecting(xprt);
}
/**
-diff -purN linux-2.6.27/net/unix/af_unix.c linux-2.6.27.19-5.1/net/unix/af_unix.c
---- linux-2.6.27/net/unix/af_unix.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/unix/af_unix.c 2009-03-25 16:11:00.000000000 +0000
-@@ -827,7 +827,8 @@ static int unix_bind(struct socket *sock
+diff -r 9608d5473017 net/unix/af_unix.c
+--- a/net/unix/af_unix.c Wed May 06 15:47:13 2009 +0100
++++ b/net/unix/af_unix.c Wed May 06 16:57:06 2009 +0100
+@@ -827,7 +827,8 @@
err = mnt_want_write(nd.path.mnt);
if (err)
goto out_mknod_dput;
mnt_drop_write(nd.path.mnt);
if (err)
goto out_mknod_dput;
-@@ -1300,14 +1301,23 @@ static void unix_destruct_fds(struct sk_
+@@ -1300,14 +1301,23 @@
sock_wfree(skb);
}
}
/*
-@@ -1332,6 +1342,7 @@ static int unix_dgram_sendmsg(struct kio
+@@ -1332,6 +1342,7 @@
if (NULL == siocb->scm)
siocb->scm = &tmp_scm;
err = scm_send(sock, msg, siocb->scm);
if (err < 0)
return err;
-@@ -1366,8 +1377,11 @@ static int unix_dgram_sendmsg(struct kio
+@@ -1366,8 +1377,11 @@
goto out;
memcpy(UNIXCREDS(skb), &siocb->scm->creds, sizeof(struct ucred));
unix_get_secdata(siocb->scm, skb);
skb_reset_transport_header(skb);
-@@ -1479,6 +1493,7 @@ static int unix_stream_sendmsg(struct ki
+@@ -1479,6 +1493,7 @@
if (NULL == siocb->scm)
siocb->scm = &tmp_scm;
err = scm_send(sock, msg, siocb->scm);
if (err < 0)
return err;
-@@ -1536,8 +1551,13 @@ static int unix_stream_sendmsg(struct ki
+@@ -1536,8 +1551,13 @@
size = min_t(int, size, skb_tailroom(skb));
memcpy(UNIXCREDS(skb), &siocb->scm->creds, sizeof(struct ucred));
if ((err = memcpy_fromiovec(skb_put(skb,size), msg->msg_iov, size)) != 0) {
kfree_skb(skb);
-@@ -2211,7 +2231,7 @@ static int unix_net_init(struct net *net
+@@ -2211,7 +2231,7 @@
#endif
error = 0;
out:
}
static void unix_net_exit(struct net *net)
-diff -purN linux-2.6.27/net/unix/garbage.c linux-2.6.27.19-5.1/net/unix/garbage.c
---- linux-2.6.27/net/unix/garbage.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/unix/garbage.c 2009-03-25 16:11:00.000000000 +0000
+diff -r 9608d5473017 net/unix/garbage.c
+--- a/net/unix/garbage.c Wed May 06 15:47:13 2009 +0100
++++ b/net/unix/garbage.c Wed May 06 16:57:06 2009 +0100
@@ -80,6 +80,7 @@
#include <linux/file.h>
#include <linux/proc_fs.h>
unsigned int unix_tot_inflight;
-@@ -186,8 +188,17 @@ static void scan_inflight(struct sock *x
+@@ -186,8 +188,17 @@
*/
struct sock *sk = unix_get_socket(*fp++);
if (sk) {
}
}
if (hit && hitlist != NULL) {
-@@ -249,24 +260,29 @@ static void inc_inflight_move_tail(struc
+@@ -249,24 +260,29 @@
{
atomic_long_inc(&u->inflight);
/*
list_move_tail(&u->link, &gc_candidates);
}
--/* The external entry point: unix_gc() */
+static bool gc_in_progress = false;
-
--void unix_gc(void)
++
+void wait_for_unix_gc(void)
- {
-- static bool gc_in_progress = false;
++{
+ wait_event(unix_gc_wait, gc_in_progress == false);
+}
-
-+/* The external entry point: unix_gc() */
-+void unix_gc(void)
-+{
++
+ /* The external entry point: unix_gc() */
+-
+ void unix_gc(void)
+ {
+- static bool gc_in_progress = false;
+-
struct unix_sock *u;
struct unix_sock *next;
struct sk_buff_head hitlist;
spin_lock(&unix_gc_lock);
-@@ -282,10 +298,14 @@ void unix_gc(void)
+@@ -282,10 +298,14 @@
*
* Holding unix_gc_lock will protect these candidates from
* being detached, and hence from gaining an external
*/
list_for_each_entry_safe(u, next, &gc_inflight_list, link) {
long total_refs;
-@@ -299,6 +319,7 @@ void unix_gc(void)
+@@ -299,6 +319,7 @@
if (total_refs == inflight_refs) {
list_move_tail(&u->link, &gc_candidates);
u->gc_candidate = 1;
}
}
-@@ -325,14 +346,24 @@ void unix_gc(void)
+@@ -325,12 +346,22 @@
list_move(&cursor, &u->link);
if (atomic_long_read(&u->inflight) > 0) {
}
}
list_del(&cursor);
-
- /*
++
++ /*
+ * not_cycle_list contains those sockets which do not make up a
+ * cycle. Restore these to the inflight list.
+ */
+ u->gc_candidate = 0;
+ list_move_tail(&u->link, &gc_inflight_list);
+ }
-+
-+ /*
+
+ /*
* Now gc_candidates contains only garbage. Restore original
- * inflight counters for these as well, and remove the skbuffs
- * which are creating the cycle(s).
-@@ -351,6 +382,7 @@ void unix_gc(void)
+@@ -351,6 +382,7 @@
/* All candidates should have been detached by now. */
BUG_ON(!list_empty(&gc_candidates));
gc_in_progress = false;
out:
spin_unlock(&unix_gc_lock);
-diff -purN linux-2.6.27/perfmon/Makefile linux-2.6.27.19-5.1/perfmon/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/Makefile 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/Makefile Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,13 @@
+#
+# Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
+ perfmon_control.o
+
+obj-$(CONFIG_PERFMON_DEBUG_FS) += perfmon_debugfs.o
-diff -purN linux-2.6.27/perfmon/perfmon_activate.c linux-2.6.27.19-5.1/perfmon/perfmon_activate.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_activate.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_activate.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_activate.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,265 @@
+/*
+ * perfmon_activate.c: perfmon2 start/stop functions
+ */
+ return 0;
+}
-diff -purN linux-2.6.27/perfmon/perfmon_attach.c linux-2.6.27.19-5.1/perfmon/perfmon_attach.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_attach.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_attach.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_attach.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,474 @@
+/*
+ * perfmon_attach.c: perfmon2 load/unload functions
+ if (free_ok)
+ pfm_free_context(ctx);
+}
-diff -purN linux-2.6.27/perfmon/perfmon_control.c linux-2.6.27.19-5.1/perfmon/perfmon_control.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_control.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_control.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_control.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,310 @@
+/*
+ * perfmon_control.c: perfmon2 ioctl interface
+#endif
+ return ret;
+}
-diff -purN linux-2.6.27/perfmon/perfmon_ctx.c linux-2.6.27.19-5.1/perfmon/perfmon_ctx.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_ctx.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_ctx.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_ctx.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,314 @@
+/*
+ * perfmon_ctx.c: perfmon2 context functions
+ }
+ return 0;
+}
-diff -purN linux-2.6.27/perfmon/perfmon_ctxsw.c linux-2.6.27.19-5.1/perfmon/perfmon_ctxsw.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_ctxsw.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_ctxsw.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_ctxsw.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,342 @@
+/*
+ * perfmon_cxtsw.c: perfmon2 context switch code
+ pfm_stats_inc(ctxswin_count);
+ pfm_stats_add(ctxswin_ns, sched_clock() - now);
+}
-diff -purN linux-2.6.27/perfmon/perfmon_debugfs.c linux-2.6.27.19-5.1/perfmon/perfmon_debugfs.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_debugfs.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_debugfs.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_debugfs.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,168 @@
+/*
+ * perfmon_debugfs.c: perfmon2 statistics interface to debugfs
+ }
+ return -1;
+}
-diff -purN linux-2.6.27/perfmon/perfmon_dfl_smpl.c linux-2.6.27.19-5.1/perfmon/perfmon_dfl_smpl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_dfl_smpl.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_dfl_smpl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_dfl_smpl.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,298 @@
+/*
+ * Copyright (c) 1999-2006 Hewlett-Packard Development Company, L.P.
+
+module_init(pfm_dfl_fmt_init_module);
+module_exit(pfm_dfl_fmt_cleanup_module);
-diff -purN linux-2.6.27/perfmon/perfmon_file.c linux-2.6.27.19-5.1/perfmon/perfmon_file.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_file.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_file.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_file.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,751 @@
+/*
+ * perfmon_file.c: perfmon2 file input/output functions
+ put_unused_fd(fd);
+ return ret;
+}
-diff -purN linux-2.6.27/perfmon/perfmon_fmt.c linux-2.6.27.19-5.1/perfmon/perfmon_fmt.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_fmt.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_fmt.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_fmt.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,219 @@
+/*
+ * perfmon_fmt.c: perfmon2 sampling buffer format management
+ pfm_sysfs_add_fmt(entry);
+ }
+}
-diff -purN linux-2.6.27/perfmon/perfmon_hotplug.c linux-2.6.27.19-5.1/perfmon/perfmon_hotplug.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_hotplug.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_hotplug.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_hotplug.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,151 @@
+/*
+ * perfmon_hotplug.c: handling of CPU hotplug
+ return ret;
+}
+#endif /* CONFIG_HOTPLUG_CPU */
-diff -purN linux-2.6.27/perfmon/perfmon_init.c linux-2.6.27.19-5.1/perfmon/perfmon_init.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_init.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_init.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_init.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,134 @@
+/*
+ * perfmon.c: perfmon2 global initialization functions
+ * compiled in.
+ */
+subsys_initcall(pfm_init);
-diff -purN linux-2.6.27/perfmon/perfmon_intr.c linux-2.6.27.19-5.1/perfmon/perfmon_intr.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_intr.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_intr.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_intr.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,648 @@
+/*
+ * perfmon_intr.c: perfmon2 interrupt handling
+}
+EXPORT_SYMBOL(pfm_interrupt_handler);
+
-diff -purN linux-2.6.27/perfmon/perfmon_msg.c linux-2.6.27.19-5.1/perfmon/perfmon_msg.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_msg.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_msg.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_msg.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,229 @@
+/*
+ * perfmon_msg.c: perfmon2 notification message queue management
+ ctx->msgq_tail & PFM_MSGQ_MASK,
+ m->type);
+}
-diff -purN linux-2.6.27/perfmon/perfmon_pmu.c linux-2.6.27.19-5.1/perfmon/perfmon_pmu.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_pmu.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_pmu.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_pmu.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,590 @@
+/*
+ * perfmon_pmu.c: perfmon2 PMU configuration management
+ }
+ spin_unlock(&pfm_pmu_acq_lock);
+}
-diff -purN linux-2.6.27/perfmon/perfmon_priv.h linux-2.6.27.19-5.1/perfmon/perfmon_priv.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_priv.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_priv.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_priv.h Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,207 @@
+/*
+ * Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
+#endif /* CONFIG_PERFMON */
+
+#endif /* __PERFMON_PRIV_H__ */
-diff -purN linux-2.6.27/perfmon/perfmon_res.c linux-2.6.27.19-5.1/perfmon/perfmon_res.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_res.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_res.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_res.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,450 @@
+/*
+ * perfmon_res.c: perfmon2 resource allocations
+ spin_unlock_irqrestore(&pfm_res_lock, flags);
+ return strlen(buf);
+}
-diff -purN linux-2.6.27/perfmon/perfmon_rw.c linux-2.6.27.19-5.1/perfmon/perfmon_rw.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_rw.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_rw.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_rw.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,733 @@
+/*
+ * perfmon.c: perfmon2 PMC/PMD read/write system calls
+error:
+ return ret;
+}
-diff -purN linux-2.6.27/perfmon/perfmon_sets.c linux-2.6.27.19-5.1/perfmon/perfmon_sets.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_sets.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_sets.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_sets.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,873 @@
+/*
+ * perfmon_sets.c: perfmon2 event sets and multiplexing functions
+ }
+ return 0;
+}
-diff -purN linux-2.6.27/perfmon/perfmon_smpl.c linux-2.6.27.19-5.1/perfmon/perfmon_smpl.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_smpl.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_smpl.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_smpl.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,865 @@
+/*
+ * perfmon_smpl.c: perfmon2 sampling management
+ pfm_smpl_fmt_put(f);
+ return ret;
+}
-diff -purN linux-2.6.27/perfmon/perfmon_syscalls.c linux-2.6.27.19-5.1/perfmon/perfmon_syscalls.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_syscalls.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_syscalls.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_syscalls.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,1060 @@
+/*
+ * perfmon_syscalls.c: perfmon2 system call interface
+ pfm_release_ctx_from_fd(&cookie);
+ return ret;
+}
-diff -purN linux-2.6.27/perfmon/perfmon_sysfs.c linux-2.6.27.19-5.1/perfmon/perfmon_sysfs.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_sysfs.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_sysfs.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_sysfs.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,515 @@
+/*
+ * perfmon_sysfs.c: perfmon2 sysfs interface
+ kobject_del(pfm_kernel_kobj);
+ return ret;
+}
-diff -purN linux-2.6.27/samples/Kconfig linux-2.6.27.19-5.1/samples/Kconfig
---- linux-2.6.27/samples/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/samples/Kconfig 2009-03-25 16:11:42.000000000 +0000
-@@ -13,6 +13,12 @@ config SAMPLE_MARKERS
+diff -r 9608d5473017 samples/Kconfig
+--- a/samples/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/samples/Kconfig Wed May 06 16:57:06 2009 +0100
+@@ -12,6 +12,12 @@
+ depends on MARKERS && m
help
This build markers example modules.
-
++
+config SAMPLE_TRACEPOINTS
+ tristate "Build tracepoints examples -- loadable modules only"
+ depends on TRACEPOINTS && m
+ help
+ This build tracepoints example modules.
-+
+
config SAMPLE_KOBJECT
tristate "Build kobject examples"
- help
-diff -purN linux-2.6.27/samples/Makefile linux-2.6.27.19-5.1/samples/Makefile
---- linux-2.6.27/samples/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/samples/Makefile 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 samples/Makefile
+--- a/samples/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/samples/Makefile Wed May 06 16:57:06 2009 +0100
@@ -1,3 +1,3 @@
# Makefile for Linux samples code
-obj-$(CONFIG_SAMPLES) += markers/ kobject/ kprobes/
+obj-$(CONFIG_SAMPLES) += markers/ kobject/ kprobes/ tracepoints/
-diff -purN linux-2.6.27/samples/tracepoints/Makefile linux-2.6.27.19-5.1/samples/tracepoints/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/samples/tracepoints/Makefile 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 samples/tracepoints/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/samples/tracepoints/Makefile Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,6 @@
+# builds the tracepoint example kernel modules;
+# then to use one (as root): insmod <module_name.ko>
+obj-$(CONFIG_SAMPLE_TRACEPOINTS) += tracepoint-sample.o
+obj-$(CONFIG_SAMPLE_TRACEPOINTS) += tracepoint-probe-sample.o
+obj-$(CONFIG_SAMPLE_TRACEPOINTS) += tracepoint-probe-sample2.o
-diff -purN linux-2.6.27/samples/tracepoints/tp-samples-trace.h linux-2.6.27.19-5.1/samples/tracepoints/tp-samples-trace.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/samples/tracepoints/tp-samples-trace.h 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 samples/tracepoints/tp-samples-trace.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/samples/tracepoints/tp-samples-trace.h Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,13 @@
+#ifndef _TP_SAMPLES_TRACE_H
+#define _TP_SAMPLES_TRACE_H
+ TPPROTO(void),
+ TPARGS());
+#endif
-diff -purN linux-2.6.27/samples/tracepoints/tracepoint-probe-sample.c linux-2.6.27.19-5.1/samples/tracepoints/tracepoint-probe-sample.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/samples/tracepoints/tracepoint-probe-sample.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 samples/tracepoints/tracepoint-probe-sample.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/samples/tracepoints/tracepoint-probe-sample.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,56 @@
+/*
+ * tracepoint-probe-sample.c
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Mathieu Desnoyers");
+MODULE_DESCRIPTION("Tracepoint Probes Samples");
-diff -purN linux-2.6.27/samples/tracepoints/tracepoint-probe-sample2.c linux-2.6.27.19-5.1/samples/tracepoints/tracepoint-probe-sample2.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/samples/tracepoints/tracepoint-probe-sample2.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 samples/tracepoints/tracepoint-probe-sample2.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/samples/tracepoints/tracepoint-probe-sample2.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,43 @@
+/*
+ * tracepoint-probe-sample2.c
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Mathieu Desnoyers");
+MODULE_DESCRIPTION("Tracepoint Probes Samples");
-diff -purN linux-2.6.27/samples/tracepoints/tracepoint-sample.c linux-2.6.27.19-5.1/samples/tracepoints/tracepoint-sample.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/samples/tracepoints/tracepoint-sample.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 samples/tracepoints/tracepoint-sample.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/samples/tracepoints/tracepoint-sample.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,53 @@
+/* tracepoint-sample.c
+ *
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Mathieu Desnoyers");
+MODULE_DESCRIPTION("Tracepoint example");
-diff -purN linux-2.6.27/scripts/Makefile.build linux-2.6.27.19-5.1/scripts/Makefile.build
---- linux-2.6.27/scripts/Makefile.build 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/Makefile.build 2009-03-25 16:11:43.000000000 +0000
-@@ -73,6 +73,20 @@ ifndef obj
- $(warning kbuild: Makefile.build is included improperly)
- endif
+diff -r 9608d5473017 scripts/Makefile.build
+--- a/scripts/Makefile.build Wed May 06 15:47:13 2009 +0100
++++ b/scripts/Makefile.build Wed May 06 16:57:06 2009 +0100
+@@ -71,6 +71,20 @@
+ ifndef obj
+ $(warning kbuild: Makefile.build is included improperly)
++endif
++
+ifeq ($(CONFIG_XEN),y)
+$(objtree)/scripts/Makefile.xen: $(srctree)/scripts/Makefile.xen.awk $(srctree)/scripts/Makefile.build
+ @echo ' Updating $@'
+single-used-m := $(filter-out $(xen-single-used-m),$(single-used-m))
+
+-include $(objtree)/scripts/Makefile.xen
-+endif
-+
- # ===========================================================================
+ endif
- ifneq ($(strip $(lib-y) $(lib-m) $(lib-n) $(lib-)),)
-@@ -153,12 +167,19 @@ $(obj)/%.i: $(src)/%.c FORCE
+ # ===========================================================================
+@@ -153,12 +167,19 @@
quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@
cmd_cc_symtypes_c = \
# C (.c) files
# The C file is compiled and updated dependency information is generated.
-@@ -187,7 +208,12 @@ cmd_modversions = \
+@@ -187,7 +208,12 @@
if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \
$(CPP) -D__GENKSYMS__ $(c_flags) $< \
| $(GENKSYMS) $(if $(KBUILD_SYMTYPES), \
> $(@D)/.tmp_$(@F:.o=.ver); \
\
$(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \
-@@ -211,12 +237,14 @@ endef
+@@ -211,12 +237,14 @@
# Built-in and composite module parts
$(obj)/%.o: $(src)/%.c FORCE
$(call cmd,force_checksrc)
$(call if_changed_rule,cc_o_c)
@{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod)
-@@ -339,6 +367,18 @@ $(multi-used-m) : %.o: $(multi-objs-m) F
+@@ -339,6 +367,18 @@
targets += $(multi-used-y) $(multi-used-m)
# Descending
# ---------------------------------------------------------------------------
-diff -purN linux-2.6.27/scripts/Makefile.lib linux-2.6.27.19-5.1/scripts/Makefile.lib
---- linux-2.6.27/scripts/Makefile.lib 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/Makefile.lib 2009-03-25 16:11:43.000000000 +0000
-@@ -17,6 +17,12 @@ obj-m := $(filter-out $(obj-y),$(obj-m))
+diff -r 9608d5473017 scripts/Makefile.lib
+--- a/scripts/Makefile.lib Wed May 06 15:47:13 2009 +0100
++++ b/scripts/Makefile.lib Wed May 06 16:57:06 2009 +0100
+@@ -16,6 +16,12 @@
+ # Filter out objects already built-in
lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m)))
-
++
+# Remove objects forcibly disabled
+
+obj-y := $(filter-out $(disabled-obj-y),$(obj-y))
+obj-m := $(filter-out $(disabled-obj-y),$(obj-m))
+lib-y := $(filter-out $(disabled-obj-y),$(lib-y))
-+
+
# Handle objects in subdirs
- # ---------------------------------------------------------------------------
-@@ -96,6 +102,14 @@ basename_flags = -D"KBUILD_BASENAME=KBUI
+@@ -96,6 +102,14 @@
modname_flags = $(if $(filter 1,$(words $(modname))),\
-D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
orig_c_flags = $(KBUILD_CFLAGS) $(ccflags-y) $(CFLAGS_$(basetarget).o)
_c_flags = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags))
_a_flags = $(KBUILD_AFLAGS) $(asflags-y) $(AFLAGS_$(basetarget).o)
-@@ -121,7 +135,8 @@ endif
+@@ -121,7 +135,8 @@
c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
$(__c_flags) $(modkern_cflags) \
a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
$(__a_flags) $(modkern_aflags)
-diff -purN linux-2.6.27/scripts/Makefile.modpost linux-2.6.27.19-5.1/scripts/Makefile.modpost
---- linux-2.6.27/scripts/Makefile.modpost 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/Makefile.modpost 2009-03-25 16:11:43.000000000 +0000
-@@ -88,7 +88,9 @@ modpost = scripts/mod/modpost
+diff -r 9608d5473017 scripts/Makefile.modpost
+--- a/scripts/Makefile.modpost Wed May 06 15:47:13 2009 +0100
++++ b/scripts/Makefile.modpost Wed May 06 16:57:06 2009 +0100
+@@ -88,7 +88,9 @@
$(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \
$(if $(CONFIG_MARKERS),-M $(markersfile)) \
$(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) \
quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
cmd_modpost = $(modpost) -s
-diff -purN linux-2.6.27/scripts/Makefile.xen.awk linux-2.6.27.19-5.1/scripts/Makefile.xen.awk
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/Makefile.xen.awk 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 scripts/Makefile.xen.awk
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/scripts/Makefile.xen.awk Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,34 @@
+BEGIN {
+ is_rule = 0
+ print $0
+ next
+}
-diff -purN linux-2.6.27/scripts/basic/Makefile linux-2.6.27.19-5.1/scripts/basic/Makefile
---- linux-2.6.27/scripts/basic/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/basic/Makefile 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 scripts/basic/Makefile
+--- a/scripts/basic/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/scripts/basic/Makefile Wed May 06 16:57:06 2009 +0100
@@ -9,7 +9,7 @@
# fixdep: Used to generate dependency information during build process
# docproc: Used in Documentation/DocBook
always := $(hostprogs-y)
# fixdep is needed to compile other host programs
-diff -purN linux-2.6.27/scripts/basic/hash.c linux-2.6.27.19-5.1/scripts/basic/hash.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/basic/hash.c 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 scripts/basic/hash.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/scripts/basic/hash.c Wed May 06 16:57:06 2009 +0100
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2008 Red Hat, Inc., Jason Baron <jbaron@redhat.com>
+ exit(0);
+}
+
-diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/genksyms/genksyms.c
---- linux-2.6.27/scripts/genksyms/genksyms.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/genksyms/genksyms.c 2009-03-25 16:11:43.000000000 +0000
-@@ -42,7 +42,8 @@ static FILE *debugfile;
+diff -r 9608d5473017 scripts/genksyms/genksyms.c
+--- a/scripts/genksyms/genksyms.c Wed May 06 15:47:13 2009 +0100
++++ b/scripts/genksyms/genksyms.c Wed May 06 16:57:07 2009 +0100
+@@ -42,7 +42,8 @@
int cur_line = 1;
char *cur_filename;
static const char *arch = "";
static const char *mod_prefix = "";
-@@ -58,6 +59,8 @@ static const char *const symbol_type_nam
+@@ -58,6 +59,8 @@
static int equal_list(struct string_list *a, struct string_list *b);
static void print_list(FILE * f, struct string_list *list);
/*----------------------------------------------------------------------*/
-@@ -151,27 +154,83 @@ struct symbol *find_symbol(const char *n
+@@ -151,25 +154,81 @@
for (sym = symtab[h]; sym; sym = sym->hash_next)
if (map_to_ns(sym->type) == map_to_ns(ns) &&
+ }
+ break;
}
- }
-
++ }
++
+ if (sym) {
+ struct symbol **psym;
+
+ }
+ }
+ --nsyms;
-+ }
-+
+ }
+
sym = xmalloc(sizeof(*sym));
- sym->name = name;
- sym->type = type;
-@@ -183,6 +242,10 @@ struct symbol *add_symbol(const char *na
+@@ -183,6 +242,10 @@
sym->hash_next = symtab[h];
symtab[h] = sym;
if (flag_debug) {
fprintf(debugfile, "Defn for %s %s == <",
symbol_type_name[type], name);
-@@ -196,6 +259,18 @@ struct symbol *add_symbol(const char *na
- return sym;
- }
+@@ -194,6 +257,18 @@
+ ++nsyms;
+ return sym;
++}
++
+struct symbol *add_symbol(const char *name, enum symbol_type type,
+ struct string_list *defn, int is_extern)
+{
+ struct string_list *defn, int is_extern)
+{
+ return __add_symbol(name, type, defn, is_extern, 1);
-+}
-+
+ }
+
/*----------------------------------------------------------------------*/
+@@ -234,6 +309,90 @@
+ }
- void free_node(struct string_list *node)
-@@ -236,6 +311,90 @@ static int equal_list(struct string_list
return !a && !b;
- }
-
++}
++
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+
+struct string_list *read_node(FILE *f)
+ subsym->is_override = is_override;
+ free_node(sym);
+ }
-+}
-+
+ }
+
static void print_node(FILE * f, struct string_list *list)
- {
- if (list->tag != SYM_NORMAL) {
-@@ -311,6 +470,7 @@ static unsigned long expand_and_crc_sym(
+@@ -311,6 +470,7 @@
case SYM_TYPEDEF:
subsym = find_symbol(cur->string, cur->tag);
if (subsym->expansion_trail) {
if (flag_dump_defs)
fprintf(debugfile, "%s ", cur->string);
-@@ -347,9 +507,22 @@ static unsigned long expand_and_crc_sym(
+@@ -347,9 +507,22 @@
t = n;
n = xmalloc(sizeof(*n));
- n->string = xstrdup("{ UNKNOWN }");
+ n->string = xstrdup("{");
-+ n->tag = SYM_NORMAL;
-+ n->next = t;
+ n->tag = SYM_NORMAL;
+ n->next = t;
+ t = n;
+
+ n = xmalloc(sizeof(*n));
+ n->string = xstrdup("UNKNOWN");
- n->tag = SYM_NORMAL;
- n->next = t;
++ n->tag = SYM_NORMAL;
++ n->next = t;
+ t = n;
+
+ n = xmalloc(sizeof(*n));
subsym =
add_symbol(cur->string, cur->tag, n, 0);
-@@ -397,20 +570,44 @@ void export_symbol(const char *name)
+@@ -397,20 +570,44 @@
error_with_pos("export undefined symbol %s", name);
else {
unsigned long crc;
if (flag_dump_defs)
fputs(">\n", debugfile);
-@@ -421,13 +618,26 @@ void export_symbol(const char *name)
+@@ -421,13 +618,26 @@
}
/*----------------------------------------------------------------------*/
va_start(args, fmt);
vfprintf(stderr, fmt, args);
-@@ -445,7 +655,10 @@ static void genksyms_usage(void)
+@@ -445,7 +655,10 @@
" -a, --arch Select architecture\n"
" -d, --debug Increment the debug level (repeatable)\n"
" -D, --dump Dump expanded symbol defs (for debugging only)\n"
" -w, --warnings Enable warnings\n"
" -q, --quiet Disable warnings (default)\n"
" -h, --help Print this message\n"
-@@ -454,7 +667,10 @@ static void genksyms_usage(void)
+@@ -454,7 +667,10 @@
" -a Select architecture\n"
" -d Increment the debug level (repeatable)\n"
" -D Dump expanded symbol defs (for debugging only)\n"
" -w Enable warnings\n"
" -q Disable warnings (default)\n"
" -h Print this message\n"
-@@ -465,7 +681,7 @@ static void genksyms_usage(void)
+@@ -465,7 +681,7 @@
int main(int argc, char **argv)
{
int o;
#ifdef __GNU_LIBRARY__
-@@ -475,16 +691,19 @@ int main(int argc, char **argv)
+@@ -475,16 +691,19 @@
{"warnings", 0, 0, 'w'},
{"quiet", 0, 0, 'q'},
{"dump", 0, 0, 'D'},
#endif /* __GNU_LIBRARY__ */
switch (o) {
case 'a':
-@@ -505,6 +724,14 @@ int main(int argc, char **argv)
+@@ -505,6 +724,14 @@
case 'D':
flag_dump_defs = 1;
break;
case 'T':
flag_dump_types = 1;
dumpfile = fopen(optarg, "w");
-@@ -513,6 +740,13 @@ int main(int argc, char **argv)
+@@ -512,6 +739,13 @@
+ perror(optarg);
return 1;
}
- break;
++ break;
+ case 'o':
+ flag_override = 1;
+ break;
+ case 'p':
+ flag_override = 1;
+ flag_preserve = 1;
-+ break;
+ break;
case 'h':
genksyms_usage();
- return 0;
-@@ -533,12 +767,17 @@ int main(int argc, char **argv)
+@@ -533,12 +767,17 @@
/* setlinebuf(debugfile); */
}
if (sym->type != SYM_NORMAL) {
putc(symbol_type_name[sym->type][0], dumpfile);
putc('#', dumpfile);
-diff -purN linux-2.6.27/scripts/genksyms/genksyms.h linux-2.6.27.19-5.1/scripts/genksyms/genksyms.h
---- linux-2.6.27/scripts/genksyms/genksyms.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/genksyms/genksyms.h 2009-03-25 16:11:43.000000000 +0000
-@@ -29,6 +29,10 @@ enum symbol_type {
+diff -r 9608d5473017 scripts/genksyms/genksyms.h
+--- a/scripts/genksyms/genksyms.h Wed May 06 15:47:13 2009 +0100
++++ b/scripts/genksyms/genksyms.h Wed May 06 16:57:07 2009 +0100
+@@ -29,6 +29,10 @@
SYM_NORMAL, SYM_TYPEDEF, SYM_ENUM, SYM_STRUCT, SYM_UNION
};
struct string_list {
struct string_list *next;
enum symbol_type tag;
-@@ -43,6 +47,9 @@ struct symbol {
+@@ -43,6 +47,9 @@
struct symbol *expansion_trail;
struct symbol *visited;
int is_extern;
};
typedef struct string_list **yystype;
-diff -purN linux-2.6.27/scripts/kconfig/Makefile linux-2.6.27.19-5.1/scripts/kconfig/Makefile
---- linux-2.6.27/scripts/kconfig/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/kconfig/Makefile 2009-03-25 16:11:43.000000000 +0000
-@@ -61,6 +61,22 @@ allnoconfig: $(obj)/conf
+diff -r 9608d5473017 scripts/kconfig/Makefile
+--- a/scripts/kconfig/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/scripts/kconfig/Makefile Wed May 06 16:57:07 2009 +0100
+@@ -60,6 +60,22 @@
+
allmodconfig: $(obj)/conf
$< -m $(Kconfig)
-
++
+UNAME_RELEASE := $(shell uname -r)
+CLONECONFIG := $(firstword $(wildcard /proc/config.gz \
+ /lib/modules/$(UNAME_RELEASE)/.config \
+ esac && \
+ echo -e "Cloning configuration file $(CLONECONFIG)\n"
+ $(Q)$< -D .config.running arch/$(SRCARCH)/Kconfig
-+
+
defconfig: $(obj)/conf
ifeq ($(KBUILD_DEFCONFIG),)
- $< -d $(Kconfig)
-diff -purN linux-2.6.27/scripts/kernel-doc linux-2.6.27.19-5.1/scripts/kernel-doc
---- linux-2.6.27/scripts/kernel-doc 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/kernel-doc 2009-03-25 16:11:43.000000000 +0000
-@@ -1758,6 +1758,40 @@ sub reset_state {
+diff -r 9608d5473017 scripts/kernel-doc
+--- a/scripts/kernel-doc Wed May 06 15:47:13 2009 +0100
++++ b/scripts/kernel-doc Wed May 06 16:57:07 2009 +0100
+@@ -1758,6 +1758,40 @@
$state = 0;
}
sub process_state3_function($$) {
my $x = shift;
my $file = shift;
-@@ -1774,7 +1808,10 @@ sub process_state3_function($$) {
+@@ -1774,7 +1808,10 @@
$prototype =~ s@/\*.*?\*/@@gos; # strip comments.
$prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
$prototype =~ s@^\s+@@gos; # strip leading spaces
reset_state();
}
}
-diff -purN linux-2.6.27/scripts/kmsg-doc linux-2.6.27.19-5.1/scripts/kmsg-doc
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/kmsg-doc 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 scripts/kmsg-doc
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/scripts/kmsg-doc Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,477 @@
+#!/usr/bin/perl -w
+#
+}
+
+exit($errors);
-diff -purN linux-2.6.27/scripts/mkcompile_h linux-2.6.27.19-5.1/scripts/mkcompile_h
---- linux-2.6.27/scripts/mkcompile_h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/mkcompile_h 2009-03-25 16:11:43.000000000 +0000
-@@ -60,16 +60,9 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}
+diff -r 9608d5473017 scripts/mkcompile_h
+--- a/scripts/mkcompile_h Wed May 06 15:47:13 2009 +0100
++++ b/scripts/mkcompile_h Wed May 06 16:57:07 2009 +0100
+@@ -60,16 +60,9 @@
echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\"
echo \#define LINUX_COMPILE_TIME \"`date +%T`\"
echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\"
) > .tmpcompile
-diff -purN linux-2.6.27/scripts/mksysmap linux-2.6.27.19-5.1/scripts/mksysmap
---- linux-2.6.27/scripts/mksysmap 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/mksysmap 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 scripts/mksysmap
+--- a/scripts/mksysmap Wed May 06 15:47:13 2009 +0100
++++ b/scripts/mksysmap Wed May 06 16:57:07 2009 +0100
@@ -41,5 +41,5 @@
# so we just ignore them to let readprofile continue to work.
# (At least sparc64 has __crc_ in the middle).
-$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $2
+$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\(L2\ 2\)' > $2
-diff -purN linux-2.6.27/scripts/mod/modpost.c linux-2.6.27.19-5.1/scripts/mod/modpost.c
---- linux-2.6.27/scripts/mod/modpost.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/mod/modpost.c 2009-03-25 16:11:43.000000000 +0000
-@@ -86,7 +86,8 @@ static int is_vmlinux(const char *modnam
+diff -r 9608d5473017 scripts/mod/modpost.c
+--- a/scripts/mod/modpost.c Wed May 06 15:47:13 2009 +0100
++++ b/scripts/mod/modpost.c Wed May 06 16:57:07 2009 +0100
+@@ -86,7 +86,8 @@
myname = modname;
return (strcmp(myname, "vmlinux") == 0) ||
}
void *do_nofail(void *ptr, const char *expr)
-@@ -1545,6 +1546,48 @@ static void get_markers(struct elf_info
+@@ -1545,6 +1546,48 @@
}
}
static void read_symbols(char *modname)
{
const char *symname;
-@@ -1726,6 +1769,21 @@ static void add_header(struct buffer *b,
+@@ -1726,6 +1769,21 @@
buf_printf(b, "};\n");
}
/**
* Record CRCs for unresolved symbols
**/
-@@ -1866,6 +1924,13 @@ static void write_if_changed(struct buff
+@@ -1864,6 +1922,13 @@
+ exit(1);
+ }
fclose(file);
- }
-
++}
++
+void read_supported(const char *fname)
+{
+ supported_file = grab_file(fname, &supported_size);
+ if (!supported_file)
+ ; /* ignore error */
-+}
-+
+ }
+
/* parse Module.symvers file. line format:
- * 0x12345678<tab>symbol<tab>module[[<tab>export]<tab>something]
- **/
-@@ -2050,12 +2115,13 @@ int main(int argc, char **argv)
+@@ -2050,12 +2115,13 @@
char *dump_write = NULL;
char *markers_read = NULL;
char *markers_write = NULL;
switch (opt) {
case 'i':
kernel_read = optarg;
-@@ -2099,11 +2165,16 @@ int main(int argc, char **argv)
+@@ -2099,11 +2165,16 @@
case 'K':
markers_read = optarg;
break;
if (kernel_read)
read_dump(kernel_read, 1);
if (module_read)
-@@ -2135,6 +2206,8 @@ int main(int argc, char **argv)
+@@ -2135,6 +2206,8 @@
buf.pos = 0;
add_header(&buf, mod);
err |= add_versions(&buf, mod);
add_depends(&buf, mod, modules);
add_moddevtable(&buf, mod);
-diff -purN linux-2.6.27/scripts/package/builddeb linux-2.6.27.19-5.1/scripts/package/builddeb
---- linux-2.6.27/scripts/package/builddeb 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/package/builddeb 2009-03-25 16:11:43.000000000 +0000
-@@ -15,15 +15,18 @@ set -e
+diff -r 9608d5473017 scripts/package/builddeb
+--- a/scripts/package/builddeb Wed May 06 15:47:13 2009 +0100
++++ b/scripts/package/builddeb Wed May 06 16:57:07 2009 +0100
+@@ -15,15 +15,18 @@
version=$KERNELRELEASE
revision=`cat .version`
tmpdir="$objtree/debian/tmp"
if [ "$ARCH" == "um" ] ; then
mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin"
fi
-@@ -107,6 +110,7 @@ Standards-Version: 3.6.1
+@@ -107,6 +110,7 @@
Package: $packagename
Provides: kernel-image-$version, linux-image-$version
Architecture: any
Description: Linux kernel, version $version
This package contains the Linux kernel, modules and corresponding other
-@@ -118,8 +122,24 @@ fi
+@@ -118,8 +122,24 @@
chown -R root:root "$tmpdir"
chmod -R go-w "$tmpdir"
dpkg --build "$tmpdir" ..
exit 0
-diff -purN linux-2.6.27/scripts/package/mkspec linux-2.6.27.19-5.1/scripts/package/mkspec
---- linux-2.6.27/scripts/package/mkspec 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/package/mkspec 2009-03-25 16:11:43.000000000 +0000
-@@ -64,8 +64,10 @@ fi
+diff -r 9608d5473017 scripts/package/mkspec
+--- a/scripts/package/mkspec Wed May 06 15:47:13 2009 +0100
++++ b/scripts/package/mkspec Wed May 06 16:57:07 2009 +0100
+@@ -64,8 +64,10 @@
echo "%install"
echo "%ifarch ia64"
echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules'
echo "%endif"
echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} modules_install'
-@@ -92,5 +94,6 @@ echo "%files"
+@@ -92,5 +94,6 @@
echo '%defattr (-, root, root)'
echo "%dir /lib/modules"
echo "/lib/modules/$KERNELRELEASE"
+echo "/lib/firmware"
echo "/boot/*"
echo ""
-diff -purN linux-2.6.27/security/Kconfig linux-2.6.27.19-5.1/security/Kconfig
---- linux-2.6.27/security/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/Kconfig 2009-03-25 16:11:42.000000000 +0000
-@@ -51,6 +51,15 @@ config SECURITY
+diff -r 9608d5473017 security/Kconfig
+--- a/security/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/security/Kconfig Wed May 06 16:57:07 2009 +0100
+@@ -50,6 +50,15 @@
+ model will be used.
If you are unsure how to answer this question, answer N.
-
++
+config SECURITY_DEFAULT
+ string "Default security module"
+ depends on SECURITY
+ This determines the security module used if the security=
+ boot parmater is not provided. If a security module is not
+ specified the first module to register will be used.
-+
+
config SECURITY_NETWORK
bool "Socket and Networking Security Hooks"
- depends on SECURITY
-@@ -117,6 +126,7 @@ config SECURITY_DEFAULT_MMAP_MIN_ADDR
+@@ -117,6 +126,7 @@
source security/selinux/Kconfig
source security/smack/Kconfig
endmenu
-diff -purN linux-2.6.27/security/Makefile linux-2.6.27.19-5.1/security/Makefile
---- linux-2.6.27/security/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/Makefile 2009-03-25 16:11:42.000000000 +0000
-@@ -14,5 +14,6 @@ obj-$(CONFIG_SECURITY) += security.o c
+diff -r 9608d5473017 security/Makefile
+--- a/security/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/security/Makefile Wed May 06 16:57:07 2009 +0100
+@@ -14,5 +14,6 @@
# Must precede capability.o in order to stack properly.
obj-$(CONFIG_SECURITY_SELINUX) += selinux/built-in.o
obj-$(CONFIG_SECURITY_SMACK) += smack/built-in.o
+obj-$(CONFIG_SECURITY_APPARMOR) += commoncap.o apparmor/
+ obj-$(CONFIG_SECURITY_ROOTPLUG) += root_plug.o
obj-$(CONFIG_CGROUP_DEVICE) += device_cgroup.o
-diff -purN linux-2.6.27/security/apparmor/Kconfig linux-2.6.27.19-5.1/security/apparmor/Kconfig
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/Kconfig 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/Kconfig
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/Kconfig Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,42 @@
+config SECURITY_APPARMOR
+ bool "AppArmor support"
+ parameters are difficult to employ.
+
+ If you are unsure how to answer this question, answer N.
-diff -purN linux-2.6.27/security/apparmor/Makefile linux-2.6.27.19-5.1/security/apparmor/Makefile
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/Makefile 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/Makefile
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/Makefile Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,18 @@
+# Makefile for AppArmor Linux Security Module
+#
+ $(call cmd,make-caps)
+$(obj)/af_names.h : $(srctree)/include/linux/socket.h
+ $(call cmd,make-af)
-diff -purN linux-2.6.27/security/apparmor/apparmor.h linux-2.6.27.19-5.1/security/apparmor/apparmor.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/apparmor.h 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/apparmor.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/apparmor.h Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,403 @@
+/*
+ * Copyright (C) 1998-2007 Novell/SUSE
+ unsigned int start);
+
+#endif /* __APPARMOR_H */
-diff -purN linux-2.6.27/security/apparmor/apparmorfs.c linux-2.6.27.19-5.1/security/apparmor/apparmorfs.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/apparmorfs.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/apparmorfs.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/apparmorfs.c Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,281 @@
+/*
+ * Copyright (C) 1998-2007 Novell/SUSE
+
+fs_initcall(create_apparmorfs);
+
-diff -purN linux-2.6.27/security/apparmor/inline.h linux-2.6.27.19-5.1/security/apparmor/inline.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/inline.h 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/inline.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/inline.h Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,250 @@
+/*
+ * Copyright (C) 1998-2007 Novell/SUSE
+}
+
+#endif /* __INLINE_H__ */
-diff -purN linux-2.6.27/security/apparmor/list.c linux-2.6.27.19-5.1/security/apparmor/list.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/list.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/list.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/list.c Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,174 @@
+/*
+ * Copyright (C) 1998-2007 Novell/SUSE
+ .stop = p_stop,
+ .show = seq_show_profile,
+};
-diff -purN linux-2.6.27/security/apparmor/locking.txt linux-2.6.27.19-5.1/security/apparmor/locking.txt
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/locking.txt 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/locking.txt
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/locking.txt Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,68 @@
+Locking in AppArmor
+===================
+dead task A. The kernel should not be taking a dead task's task_lock
+at the same time the task is being freed by task rcu cleanup other wise
+the task would not be out of its quiescent period.
-diff -purN linux-2.6.27/security/apparmor/lsm.c linux-2.6.27.19-5.1/security/apparmor/lsm.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/lsm.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/lsm.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/lsm.c Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,1033 @@
+/*
+ * Copyright (C) 1998-2007 Novell/SUSE
+MODULE_DESCRIPTION("AppArmor process confinement");
+MODULE_AUTHOR("Novell/Immunix, http://bugs.opensuse.org");
+MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/security/apparmor/main.c linux-2.6.27.19-5.1/security/apparmor/main.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/main.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/main.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/main.c Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,1689 @@
+/*
+ * Copyright (C) 2002-2007 Novell/SUSE
+ }
+ rcu_assign_pointer(task->security, new_cxt);
+}
-diff -purN linux-2.6.27/security/apparmor/match.c linux-2.6.27.19-5.1/security/apparmor/match.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/match.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/match.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/match.c Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,364 @@
+/*
+ * Copyright (C) 2007 Novell/SUSE
+ return 0;
+}
+
-diff -purN linux-2.6.27/security/apparmor/match.h linux-2.6.27.19-5.1/security/apparmor/match.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/match.h 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/match.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/match.h Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2007 Novell/SUSE
+}
+
+#endif /* __MATCH_H */
-diff -purN linux-2.6.27/security/apparmor/module_interface.c linux-2.6.27.19-5.1/security/apparmor/module_interface.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/module_interface.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/module_interface.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/module_interface.c Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,967 @@
+/*
+ * Copyright (C) 1998-2007 Novell/SUSE
+ task_unlock(task);
+ }
+}
-diff -purN linux-2.6.27/security/apparmor/procattr.c linux-2.6.27.19-5.1/security/apparmor/procattr.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/procattr.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/procattr.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/procattr.c Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 1998-2007 Novell/SUSE
+ aa_put_profile(new_profile);
+ return 0;
+}
-diff -purN linux-2.6.27/security/capability.c linux-2.6.27.19-5.1/security/capability.c
---- linux-2.6.27/security/capability.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/capability.c 2009-03-25 16:11:42.000000000 +0000
-@@ -155,52 +155,56 @@ static int cap_inode_init_security(struc
+diff -r 9608d5473017 security/capability.c
+--- a/security/capability.c Wed May 06 15:47:13 2009 +0100
++++ b/security/capability.c Wed May 06 16:57:07 2009 +0100
+@@ -155,52 +155,56 @@
}
static int cap_inode_create(struct inode *inode, struct dentry *dentry,
{
return 0;
}
-@@ -216,7 +220,8 @@ static int cap_inode_permission(struct i
+@@ -216,7 +220,8 @@
return 0;
}
{
return 0;
}
-@@ -230,17 +235,20 @@ static void cap_inode_delete(struct inod
+@@ -230,17 +235,20 @@
{
}
{
return 0;
}
-@@ -335,6 +343,11 @@ static int cap_dentry_open(struct file *
+@@ -333,6 +341,11 @@
+ static int cap_dentry_open(struct file *file)
+ {
return 0;
- }
-
++}
++
+static int cap_path_permission(struct path *path, int mask)
+{
+ return security_inode_permission(path->dentry->d_inode, mask);
-+}
-+
+ }
+
static int cap_task_create(unsigned long clone_flags)
- {
- return 0;
-@@ -889,6 +902,7 @@ void security_fixup_ops(struct security_
+@@ -889,6 +902,7 @@
set_to_cap_if_null(ops, file_send_sigiotask);
set_to_cap_if_null(ops, file_receive);
set_to_cap_if_null(ops, dentry_open);
set_to_cap_if_null(ops, task_create);
set_to_cap_if_null(ops, task_alloc_security);
set_to_cap_if_null(ops, task_free_security);
-diff -purN linux-2.6.27/security/commoncap.c linux-2.6.27.19-5.1/security/commoncap.c
---- linux-2.6.27/security/commoncap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/commoncap.c 2009-03-25 16:11:42.000000000 +0000
-@@ -279,10 +279,13 @@ static int get_file_caps(struct linux_bi
+diff -r 9608d5473017 security/commoncap.c
+--- a/security/commoncap.c Wed May 06 15:47:13 2009 +0100
++++ b/security/commoncap.c Wed May 06 16:57:07 2009 +0100
+@@ -279,10 +279,13 @@
struct vfs_cap_data vcaps;
struct inode *inode;
+ bprm_clear_caps(bprm);
+
+ if (!file_caps_enabled)
-+ return 0;
-+
-+ if (bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID)
return 0;
- }
++
++ if (bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID)
++ return 0;
dentry = dget(bprm->file->f_dentry);
inode = dentry->d_inode;
-@@ -411,8 +414,9 @@ int cap_bprm_secureexec (struct linux_bi
+@@ -411,8 +414,9 @@
current->egid != current->gid);
}
{
if (!strcmp(name, XATTR_NAME_CAPS)) {
if (!capable(CAP_SETFCAP))
-@@ -425,7 +429,8 @@ int cap_inode_setxattr(struct dentry *de
+@@ -425,7 +429,8 @@
return 0;
}
{
if (!strcmp(name, XATTR_NAME_CAPS)) {
if (!capable(CAP_SETFCAP))
-diff -purN linux-2.6.27/security/device_cgroup.c linux-2.6.27.19-5.1/security/device_cgroup.c
---- linux-2.6.27/security/device_cgroup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/device_cgroup.c 2009-03-25 16:11:42.000000000 +0000
-@@ -543,6 +543,9 @@ int devcgroup_inode_mknod(int mode, dev_
+diff -r 9608d5473017 security/device_cgroup.c
+--- a/security/device_cgroup.c Wed May 06 15:47:13 2009 +0100
++++ b/security/device_cgroup.c Wed May 06 16:57:07 2009 +0100
+@@ -543,6 +543,9 @@
struct dev_cgroup *dev_cgroup;
struct dev_whitelist_item *wh;
rcu_read_lock();
dev_cgroup = task_devcgroup(current);
-diff -purN linux-2.6.27/security/keys/internal.h linux-2.6.27.19-5.1/security/keys/internal.h
---- linux-2.6.27/security/keys/internal.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/keys/internal.h 2009-03-25 16:11:42.000000000 +0000
-@@ -107,6 +107,7 @@ extern key_ref_t search_process_keyrings
+diff -r 9608d5473017 security/keys/internal.h
+--- a/security/keys/internal.h Wed May 06 15:47:13 2009 +0100
++++ b/security/keys/internal.h Wed May 06 16:57:07 2009 +0100
+@@ -107,6 +107,7 @@
extern struct key *find_keyring_by_name(const char *name, bool skip_perm_check);
extern int install_thread_keyring(struct task_struct *tsk);
extern int install_process_keyring(struct task_struct *tsk);
-diff -purN linux-2.6.27/security/keys/keyctl.c linux-2.6.27.19-5.1/security/keys/keyctl.c
---- linux-2.6.27/security/keys/keyctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/keys/keyctl.c 2009-03-25 16:11:42.000000000 +0000
-@@ -54,11 +54,11 @@ static int key_get_type_from_user(char *
+diff -r 9608d5473017 security/keys/keyctl.c
+--- a/security/keys/keyctl.c Wed May 06 15:47:13 2009 +0100
++++ b/security/keys/keyctl.c Wed May 06 16:57:07 2009 +0100
+@@ -54,11 +54,11 @@
* - returns the new key's serial number
* - implements add_key()
*/
{
key_ref_t keyring_ref, key_ref;
char type[32], *description;
-@@ -146,10 +146,10 @@ asmlinkage long sys_add_key(const char _
+@@ -146,10 +146,10 @@
* - if the _callout_info string is empty, it will be rendered as "-"
* - implements request_key()
*/
{
struct key_type *ktype;
struct key *key;
-@@ -270,6 +270,7 @@ long keyctl_join_session_keyring(const c
+@@ -270,6 +270,7 @@
/* join the session */
ret = join_session_keyring(name);
error:
return ret;
-@@ -1152,8 +1153,8 @@ long keyctl_get_security(key_serial_t ke
+@@ -1152,8 +1153,8 @@
/*
* the key control system call
*/
{
switch (option) {
case KEYCTL_GET_KEYRING_ID:
-diff -purN linux-2.6.27/security/keys/process_keys.c linux-2.6.27.19-5.1/security/keys/process_keys.c
---- linux-2.6.27/security/keys/process_keys.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/keys/process_keys.c 2009-03-25 16:11:42.000000000 +0000
-@@ -40,7 +40,7 @@ struct key_user root_key_user = {
+diff -r 9608d5473017 security/keys/process_keys.c
+--- a/security/keys/process_keys.c Wed May 06 15:47:13 2009 +0100
++++ b/security/keys/process_keys.c Wed May 06 16:57:07 2009 +0100
+@@ -40,7 +40,7 @@
/*
* install user and user session keyrings for a particular UID
*/
{
struct user_struct *user = tsk->user;
struct key *uid_keyring, *session_keyring;
-diff -purN linux-2.6.27/security/keys/request_key.c linux-2.6.27.19-5.1/security/keys/request_key.c
---- linux-2.6.27/security/keys/request_key.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/keys/request_key.c 2009-03-25 16:11:42.000000000 +0000
-@@ -74,6 +74,10 @@ static int call_sbin_request_key(struct
+diff -r 9608d5473017 security/keys/request_key.c
+--- a/security/keys/request_key.c Wed May 06 15:47:13 2009 +0100
++++ b/security/keys/request_key.c Wed May 06 16:57:07 2009 +0100
+@@ -73,6 +73,10 @@
+ int ret, i;
kenter("{%d},{%d},%s", key->serial, authkey->serial, op);
-
++
+ ret = install_user_keyrings(tsk);
+ if (ret < 0)
+ goto error_alloc;
-+
+
/* allocate a new session keyring */
sprintf(desc, "_req.%u", key->serial);
-
-diff -purN linux-2.6.27/security/security.c linux-2.6.27.19-5.1/security/security.c
---- linux-2.6.27/security/security.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/security.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/security.c
+--- a/security/security.c Wed May 06 15:47:13 2009 +0100
++++ b/security/security.c Wed May 06 16:57:07 2009 +0100
@@ -18,7 +18,7 @@
#include <linux/security.h>
/* things that live in capability.c */
extern struct security_operations default_security_ops;
-@@ -358,72 +358,81 @@ int security_inode_init_security(struct
+@@ -358,72 +358,81 @@
}
EXPORT_SYMBOL(security_inode_init_security);
}
int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
-@@ -440,11 +449,12 @@ int security_inode_permission(struct ino
+@@ -440,11 +449,12 @@
return security_ops->inode_permission(inode, mask);
}
}
EXPORT_SYMBOL_GPL(security_inode_setattr);
-@@ -462,41 +472,48 @@ void security_inode_delete(struct inode
+@@ -462,41 +472,48 @@
security_ops->inode_delete(inode);
}
}
int security_inode_need_killpriv(struct dentry *dentry)
-@@ -599,6 +616,15 @@ int security_dentry_open(struct file *fi
+@@ -597,6 +614,15 @@
+ int security_dentry_open(struct file *file)
+ {
return security_ops->dentry_open(file);
- }
-
++}
++
+int security_path_permission(struct path *path, int mask)
+{
+ struct inode *inode = path->dentry->d_inode;
+ return 0;
+
+ return security_ops->path_permission(path, mask);
-+}
-+
+ }
+
int security_task_create(unsigned long clone_flags)
- {
- return security_ops->task_create(clone_flags);
-diff -purN linux-2.6.27/security/selinux/avc.c linux-2.6.27.19-5.1/security/selinux/avc.c
---- linux-2.6.27/security/selinux/avc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/selinux/avc.c 2009-03-25 16:11:42.000000000 +0000
-@@ -337,7 +337,7 @@ static struct avc_node *avc_alloc_node(v
+diff -r 9608d5473017 security/selinux/avc.c
+--- a/security/selinux/avc.c Wed May 06 15:47:13 2009 +0100
++++ b/security/selinux/avc.c Wed May 06 16:57:07 2009 +0100
+@@ -337,7 +337,7 @@
{
struct avc_node *node;
if (!node)
goto out;
-diff -purN linux-2.6.27/security/selinux/hooks.c linux-2.6.27.19-5.1/security/selinux/hooks.c
---- linux-2.6.27/security/selinux/hooks.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/selinux/hooks.c 2009-03-25 16:11:42.000000000 +0000
-@@ -1811,40 +1811,16 @@ static int selinux_capable(struct task_s
+diff -r 9608d5473017 security/selinux/hooks.c
+--- a/security/selinux/hooks.c Wed May 06 15:47:13 2009 +0100
++++ b/security/selinux/hooks.c Wed May 06 16:57:07 2009 +0100
+@@ -1811,40 +1811,16 @@
static int selinux_sysctl_get_sid(ctl_table *table, u16 tclass, u32 *sid)
{
- int buflen, rc;
- char *buffer, *path, *end;
+-
+- rc = -ENOMEM;
+ char *buffer, *path;
+ int rc = -ENOMEM;
-
-- rc = -ENOMEM;
++
buffer = (char *)__get_free_page(GFP_KERNEL);
if (!buffer)
goto out;
free_page((unsigned long)buffer);
out:
return rc;
-@@ -2566,64 +2542,79 @@ static int selinux_inode_init_security(s
+@@ -2566,64 +2542,79 @@
return 0;
}
}
-static int selinux_inode_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry)
+-{
+- int rc;
+-
+- rc = secondary_ops->inode_link(old_dentry, dir, new_dentry);
+static int selinux_inode_link(struct dentry *old_dentry,
+ struct vfsmount *old_mnt,
+ struct inode *dir,
+ struct dentry *new_dentry,
+ struct vfsmount *new_mnt)
- {
- int rc;
-
-- rc = secondary_ops->inode_link(old_dentry, dir, new_dentry);
++{
++ int rc;
++
+ rc = secondary_ops->inode_link(old_dentry, old_mnt, dir, new_dentry,
+ new_mnt);
if (rc)
}
-static int selinux_inode_unlink(struct inode *dir, struct dentry *dentry)
+-{
+- int rc;
+-
+- rc = secondary_ops->inode_unlink(dir, dentry);
+static int selinux_inode_unlink(struct inode *dir, struct dentry *dentry,
+ struct vfsmount *mnt)
- {
- int rc;
-
-- rc = secondary_ops->inode_unlink(dir, dentry);
++{
++ int rc;
++
+ rc = secondary_ops->inode_unlink(dir, dentry, mnt);
if (rc)
return rc;
}
-static int selinux_inode_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
+-{
+- int rc;
+-
+- rc = secondary_ops->inode_mknod(dir, dentry, mode, dev);
+static int selinux_inode_mknod(struct inode *dir, struct dentry *dentry,
+ struct vfsmount *mnt, int mode, dev_t dev)
- {
- int rc;
-
-- rc = secondary_ops->inode_mknod(dir, dentry, mode, dev);
++{
++ int rc;
++
+ rc = secondary_ops->inode_mknod(dir, dentry, mnt, mode, dev);
if (rc)
return rc;
{
return dentry_has_perm(current, NULL, dentry, FILE__READ);
}
-@@ -2655,11 +2646,12 @@ static int selinux_inode_permission(stru
+@@ -2655,11 +2646,12 @@
open_file_mask_to_av(inode->i_mode, mask), NULL);
}
-static int selinux_inode_setattr(struct dentry *dentry, struct iattr *iattr)
+-{
+- int rc;
+-
+- rc = secondary_ops->inode_setattr(dentry, iattr);
+static int selinux_inode_setattr(struct dentry *dentry, struct vfsmount *mnt,
+ struct iattr *iattr)
- {
- int rc;
-
-- rc = secondary_ops->inode_setattr(dentry, iattr);
++{
++ int rc;
++
+ rc = secondary_ops->inode_setattr(dentry, mnt, iattr);
if (rc)
return rc;
-@@ -2697,8 +2689,9 @@ static int selinux_inode_setotherxattr(s
+@@ -2697,8 +2689,9 @@
return dentry_has_perm(current, NULL, dentry, FILE__SETATTR);
}
{
struct task_security_struct *tsec = current->security;
struct inode *inode = dentry->d_inode;
-@@ -2752,7 +2745,8 @@ static int selinux_inode_setxattr(struct
+@@ -2752,7 +2745,8 @@
&ad);
}
const void *value, size_t size,
int flags)
{
-@@ -2778,17 +2772,21 @@ static void selinux_inode_post_setxattr(
+@@ -2778,17 +2772,21 @@
return;
}
{
if (strcmp(name, XATTR_NAME_SELINUX))
return selinux_inode_setotherxattr(dentry, name);
-diff -purN linux-2.6.27/security/smack/smack_lsm.c linux-2.6.27.19-5.1/security/smack/smack_lsm.c
---- linux-2.6.27/security/smack/smack_lsm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/smack/smack_lsm.c 2009-03-25 16:11:42.000000000 +0000
-@@ -432,8 +432,9 @@ static int smack_inode_init_security(str
+diff -r 9608d5473017 security/smack/smack_lsm.c
+--- a/security/smack/smack_lsm.c Wed May 06 15:47:13 2009 +0100
++++ b/security/smack/smack_lsm.c Wed May 06 16:57:07 2009 +0100
+@@ -432,8 +432,9 @@
*
* Returns 0 if access is permitted, an error code otherwise
*/
{
int rc;
char *isp;
-@@ -453,11 +454,13 @@ static int smack_inode_link(struct dentr
+@@ -453,11 +454,13 @@
* smack_inode_unlink - Smack check on inode deletion
* @dir: containing directory object
* @dentry: file to unlink
{
struct inode *ip = dentry->d_inode;
int rc;
-@@ -479,11 +482,13 @@ static int smack_inode_unlink(struct ino
+@@ -479,11 +482,13 @@
* smack_inode_rmdir - Smack check on directory deletion
* @dir: containing directory object
* @dentry: directory to unlink
{
int rc;
-@@ -504,8 +509,10 @@ static int smack_inode_rmdir(struct inod
+@@ -504,8 +509,10 @@
* smack_inode_rename - Smack check on rename
* @old_inode: the old directory
* @old_dentry: unused
*
* Read and write access is required on both the old and
* new directories.
-@@ -514,8 +521,10 @@ static int smack_inode_rmdir(struct inod
+@@ -514,8 +521,10 @@
*/
static int smack_inode_rename(struct inode *old_inode,
struct dentry *old_dentry,
{
int rc;
char *isp;
-@@ -559,7 +568,8 @@ static int smack_inode_permission(struct
+@@ -559,7 +568,8 @@
*
* Returns 0 if access is permitted, an error code otherwise
*/
{
/*
* Need to allow for clearing the setuid bit.
-@@ -585,17 +595,20 @@ static int smack_inode_getattr(struct vf
+@@ -585,17 +595,20 @@
/**
* smack_inode_setxattr - Smack check for setting xattrs
* @dentry: the object
{
int rc = 0;
-@@ -605,7 +618,8 @@ static int smack_inode_setxattr(struct d
+@@ -605,7 +618,8 @@
if (!capable(CAP_MAC_ADMIN))
rc = -EPERM;
} else
if (rc == 0)
rc = smk_curacc(smk_of_inode(dentry->d_inode), MAY_WRITE);
-@@ -616,6 +630,7 @@ static int smack_inode_setxattr(struct d
+@@ -616,6 +630,7 @@
/**
* smack_inode_post_setxattr - Apply the Smack update approved above
* @dentry: object
* @name: attribute name
* @value: attribute value
* @size: attribute size
-@@ -624,7 +639,8 @@ static int smack_inode_setxattr(struct d
+@@ -624,7 +639,8 @@
* Set the pointer in the inode blob to the entry found
* in the master label list.
*/
const void *value, size_t size, int flags)
{
struct inode_smack *isp;
-@@ -657,11 +673,14 @@ static void smack_inode_post_setxattr(st
+@@ -657,11 +673,14 @@
/*
* smack_inode_getxattr - Smack check on getxattr
* @dentry: the object
{
return smk_curacc(smk_of_inode(dentry->d_inode), MAY_READ);
}
-@@ -669,13 +688,16 @@ static int smack_inode_getxattr(struct d
+@@ -669,13 +688,16 @@
/*
* smack_inode_removexattr - Smack check on removexattr
* @dentry: the object
{
int rc = 0;
-@@ -685,7 +707,7 @@ static int smack_inode_removexattr(struc
+@@ -685,7 +707,7 @@
if (!capable(CAP_MAC_ADMIN))
rc = -EPERM;
} else
if (rc == 0)
rc = smk_curacc(smk_of_inode(dentry->d_inode), MAY_WRITE);
-diff -purN linux-2.6.27/sound/core/control.c linux-2.6.27.19-5.1/sound/core/control.c
---- linux-2.6.27/sound/core/control.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/core/control.c 2009-03-25 16:10:57.000000000 +0000
-@@ -1427,12 +1427,12 @@ static int snd_ctl_dev_disconnect(struct
+diff -r 9608d5473017 sound/core/control.c
+--- a/sound/core/control.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/core/control.c Wed May 06 16:57:07 2009 +0100
+@@ -1427,12 +1427,12 @@
cardnum = card->number;
snd_assert(cardnum >= 0 && cardnum < SNDRV_CARDS, return -ENXIO);
if ((err = snd_unregister_device(SNDRV_DEVICE_TYPE_CONTROL,
card, -1)) < 0)
-diff -purN linux-2.6.27/sound/drivers/mtpav.c linux-2.6.27.19-5.1/sound/drivers/mtpav.c
---- linux-2.6.27/sound/drivers/mtpav.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/drivers/mtpav.c 2009-03-25 16:10:55.000000000 +0000
-@@ -706,7 +706,6 @@ static int __devinit snd_mtpav_probe(str
+diff -r 9608d5473017 sound/drivers/mtpav.c
+--- a/sound/drivers/mtpav.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/drivers/mtpav.c Wed May 06 16:57:07 2009 +0100
+@@ -706,7 +706,6 @@
mtp_card->card = card;
mtp_card->irq = -1;
mtp_card->share_irq = 0;
mtp_card->inmidistate = 0;
mtp_card->outmidihwport = 0xffffffff;
init_timer(&mtp_card->timer);
-@@ -715,6 +714,8 @@ static int __devinit snd_mtpav_probe(str
+@@ -714,6 +713,8 @@
+ mtp_card->timer.data = (unsigned long) mtp_card;
card->private_free = snd_mtpav_free;
-
-+ mtp_card->inmidiport = mtp_card->num_ports + MTPAV_PIDX_BROADCAST;
+
++ mtp_card->inmidiport = mtp_card->num_ports + MTPAV_PIDX_BROADCAST;
+
err = snd_mtpav_get_ISA(mtp_card);
if (err < 0)
- goto __error;
-diff -purN linux-2.6.27/sound/pci/Kconfig linux-2.6.27.19-5.1/sound/pci/Kconfig
---- linux-2.6.27/sound/pci/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/Kconfig 2009-03-25 16:10:55.000000000 +0000
-@@ -517,6 +517,14 @@ config SND_HDA_HWDEP
+diff -r 9608d5473017 sound/pci/Kconfig
+--- a/sound/pci/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/Kconfig Wed May 06 16:57:07 2009 +0100
+@@ -517,6 +517,14 @@
This interface can be used for out-of-band communication
with codecs for debugging purposes.
config SND_HDA_CODEC_REALTEK
bool "Build Realtek HD-audio codec support"
depends on SND_HDA_INTEL
-@@ -557,6 +565,14 @@ config SND_HDA_CODEC_ATIHDMI
+@@ -556,6 +564,14 @@
+ help
Say Y here to include ATI HDMI HD-audio codec support in
snd-hda-intel driver, such as ATI RS600 HDMI.
-
++
+config SND_HDA_CODEC_NVHDMI
+ bool "Build NVIDIA HDMI HD-audio codec support"
+ depends on SND_HDA_INTEL
+ help
+ Say Y here to include NVIDIA HDMI HD-audio codec support in
+ snd-hda-intel driver, such as NVIDIA MCP78 HDMI.
-+
+
config SND_HDA_CODEC_CONEXANT
bool "Build Conexant HD-audio codec support"
- depends on SND_HDA_INTEL
-diff -purN linux-2.6.27/sound/pci/ca0106/ca0106.h linux-2.6.27.19-5.1/sound/pci/ca0106/ca0106.h
---- linux-2.6.27/sound/pci/ca0106/ca0106.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/ca0106/ca0106.h 2009-03-25 16:10:56.000000000 +0000
-@@ -686,7 +686,7 @@ struct snd_ca0106 {
+diff -r 9608d5473017 sound/pci/ca0106/ca0106.h
+--- a/sound/pci/ca0106/ca0106.h Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/ca0106/ca0106.h Wed May 06 16:57:07 2009 +0100
+@@ -686,7 +686,7 @@
spinlock_t emu_lock;
struct snd_ac97 *ac97;
struct snd_ca0106_channel playback_channels[4];
struct snd_ca0106_channel capture_channels[4];
-@@ -703,6 +703,11 @@ struct snd_ca0106 {
+@@ -703,6 +703,11 @@
struct snd_ca_midi midi2;
u16 spi_dac_reg[16];
};
int snd_ca0106_mixer(struct snd_ca0106 *emu);
-@@ -721,3 +726,11 @@ int snd_ca0106_i2c_write(struct snd_ca01
+@@ -721,3 +726,11 @@
int snd_ca0106_spi_write(struct snd_ca0106 * emu,
unsigned int data);
+#define snd_ca0106_mixer_suspend(chip) do { } while (0)
+#define snd_ca0106_mixer_resume(chip) do { } while (0)
+#endif
-diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound/pci/ca0106/ca0106_main.c
---- linux-2.6.27/sound/pci/ca0106/ca0106_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/ca0106/ca0106_main.c 2009-03-25 16:10:56.000000000 +0000
-@@ -305,9 +305,15 @@ static struct snd_pcm_hardware snd_ca010
+diff -r 9608d5473017 sound/pci/ca0106/ca0106_main.c
+--- a/sound/pci/ca0106/ca0106_main.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/ca0106/ca0106_main.c Wed May 06 16:57:07 2009 +0100
+@@ -305,9 +305,15 @@
SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP_VALID),
.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE,
.rate_max = 192000,
.channels_min = 2,
.channels_max = 2,
-@@ -848,15 +854,18 @@ static int snd_ca0106_pcm_trigger_playba
+@@ -848,15 +854,18 @@
struct snd_pcm_substream *s;
u32 basic = 0;
u32 extended = 0;
break;
}
snd_pcm_group_for_each_entry(s, substream) {
-@@ -866,22 +875,32 @@ static int snd_ca0106_pcm_trigger_playba
+@@ -866,22 +875,32 @@
runtime = s->runtime;
epcm = runtime->private_data;
channel = epcm->channel_id;
break;
default:
result = -EINVAL;
-@@ -1104,21 +1123,13 @@ static int snd_ca0106_ac97(struct snd_ca
+@@ -1104,21 +1123,13 @@
return snd_ac97_mixer(pbus, &ac97, &chip->ac97);
}
}
if (chip->irq >= 0)
free_irq(chip->irq, chip);
-@@ -1204,15 +1215,14 @@ static irqreturn_t snd_ca0106_interrupt(
+@@ -1204,15 +1215,14 @@
return IRQ_HANDLED;
}
return err;
pcm->private_data = emu;
-@@ -1239,7 +1249,6 @@ static int __devinit snd_ca0106_pcm(stru
+@@ -1239,7 +1249,6 @@
pcm->info_flags = 0;
pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX;
strcpy(pcm->name, "CA0106");
for(substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream;
substream;
-@@ -1261,8 +1270,7 @@ static int __devinit snd_ca0106_pcm(stru
+@@ -1261,8 +1270,7 @@
return err;
}
return 0;
}
-@@ -1302,89 +1310,10 @@ static unsigned int i2c_adc_init[][2] =
+@@ -1302,89 +1310,10 @@
{ 0x15, ADC_MUX_LINEIN }, /* ADC Mixer control */
};
outl(0, chip->port + INTE);
-@@ -1402,31 +1331,22 @@ static int __devinit snd_ca0106_create(i
+@@ -1402,31 +1331,22 @@
* AN = 0 (Audio data)
* P = 0 (Consumer)
*/
snd_ca0106_ptr_write(chip, PLAYBACK_MUTE, 0, 0x00fc0000);
snd_ca0106_ptr_write(chip, CAPTURE_MUTE, 0, 0x00fc0000);
-@@ -1434,92 +1354,124 @@ static int __devinit snd_ca0106_create(i
+@@ -1434,92 +1354,124 @@
/* Write 0x8000 to AC97_REC_GAIN to mute it. */
outb(AC97_REC_GAIN, chip->port + AC97ADDRESS);
outw(0x8000, chip->port + AC97DATA);
- //snd_ca0106_ptr_write(chip, 0x45, 0, 0xf00); /* Digital out */
+ /*snd_ca0106_ptr_write(chip, 0x45, 0, 0);*/ /* Analogue out */
+ /*snd_ca0106_ptr_write(chip, 0x45, 0, 0xf00);*/ /* Digital out */
-+
+
+- snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 0, 0x40c81000); /* goes to 0x40c80000 when doing SPDIF IN/OUT */
+- snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 1, 0xffffffff); /* (Mute) CAPTURE feedback into PLAYBACK volume. Only lower 16 bits matter. */
+- snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 2, 0x30300000); /* SPDIF IN Volume */
+- snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 3, 0x00700000); /* SPDIF IN Volume, 0x70 = (vol & 0x3f) | 0x40 */
+ /* goes to 0x40c80000 when doing SPDIF IN/OUT */
+ snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 0, 0x40c81000);
+ /* (Mute) CAPTURE feedback into PLAYBACK volume.
+ snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 2, 0x30300000);
+ /* SPDIF IN Volume, 0x70 = (vol & 0x3f) | 0x40 */
+ snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 3, 0x00700000);
-
-- snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 0, 0x40c81000); /* goes to 0x40c80000 when doing SPDIF IN/OUT */
-- snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 1, 0xffffffff); /* (Mute) CAPTURE feedback into PLAYBACK volume. Only lower 16 bits matter. */
-- snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 2, 0x30300000); /* SPDIF IN Volume */
-- snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 3, 0x00700000); /* SPDIF IN Volume, 0x70 = (vol & 0x3f) | 0x40 */
++
snd_ca0106_ptr_write(chip, PLAYBACK_ROUTING1, 0, 0x32765410);
snd_ca0106_ptr_write(chip, PLAYBACK_ROUTING2, 0, 0x76767676);
snd_ca0106_ptr_write(chip, CAPTURE_ROUTING1, 0, 0x32765410);
- //snd_printk("I2C:array size=0x%x\n", size);
- for (n=0; n < size; n++) {
- snd_ca0106_i2c_write(chip, i2c_adc_init[n][0], i2c_adc_init[n][1]);
-- }
-- for (n=0; n < 4; n++) {
-- chip->i2c_capture_volume[n][0]= 0xcf;
-- chip->i2c_capture_volume[n][1]= 0xcf;
+ /* snd_printk("I2C:array size=0x%x\n", size); */
+ for (n = 0; n < size; n++)
+ snd_ca0106_i2c_write(chip, i2c_adc_init[n][0],
+ chip->i2c_capture_volume[n][0] = 0xcf;
+ chip->i2c_capture_volume[n][1] = 0xcf;
}
+- for (n=0; n < 4; n++) {
+- chip->i2c_capture_volume[n][0]= 0xcf;
+- chip->i2c_capture_volume[n][1]= 0xcf;
+- }
- chip->i2c_capture_source=2; /* Line in */
- //snd_ca0106_i2c_write(chip, ADC_MUX, ADC_MUX_LINEIN); /* Enable Line-in capture. MIC in currently untested. */
+ chip->i2c_capture_source = 2; /* Line in */
int size, n;
size = ARRAY_SIZE(spi_dac_init);
-@@ -1531,9 +1483,112 @@ static int __devinit snd_ca0106_create(i
+@@ -1531,9 +1483,112 @@
chip->spi_dac_reg[reg] = spi_dac_init[n];
}
}
+}
-+
+
+- if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,
+- chip, &ops)) < 0) {
+static void ca0106_stop_chip(struct snd_ca0106 *chip)
+{
+ /* disable interrupts */
+ * So we can fix: snd-malloc: Memory leak? pages not freed = 8
+ */
+}
-
-- if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,
-- chip, &ops)) < 0) {
++
+static int __devinit snd_ca0106_create(int dev, struct snd_card *card,
+ struct pci_dev *pci,
+ struct snd_ca0106 **rchip)
snd_ca0106_free(chip);
return err;
}
-@@ -1630,7 +1685,7 @@ static int __devinit snd_ca0106_probe(st
+@@ -1630,7 +1685,7 @@
static int dev;
struct snd_card *card;
struct snd_ca0106 *chip;
if (dev >= SNDRV_CARDS)
return -ENODEV;
-@@ -1643,44 +1698,31 @@ static int __devinit snd_ca0106_probe(st
+@@ -1643,44 +1698,31 @@
if (card == NULL)
return -ENOMEM;
- if ((err = snd_ca0106_create(dev, card, pci, &chip)) < 0) {
- snd_card_free(card);
- return err;
-- }
+ err = snd_ca0106_create(dev, card, pci, &chip);
+ if (err < 0)
+ goto error;
+ card->private_data = chip;
++
++ for (i = 0; i < 4; i++) {
++ err = snd_ca0106_pcm(chip, i);
++ if (err < 0)
++ goto error;
+ }
- if ((err = snd_ca0106_pcm(chip, 0, NULL)) < 0) {
- snd_card_free(card);
- return err;
-- }
++ if (chip->details->ac97 == 1) {
++ /* The SB0410 and SB0413 do not have an AC97 chip. */
++ err = snd_ca0106_ac97(chip);
++ if (err < 0)
++ goto error;
+ }
- if ((err = snd_ca0106_pcm(chip, 1, NULL)) < 0) {
- snd_card_free(card);
- return err;
- snd_card_free(card);
- return err;
- }
-+ for (i = 0; i < 4; i++) {
-+ err = snd_ca0106_pcm(chip, i);
-+ if (err < 0)
-+ goto error;
- }
+- }
- if ((err = snd_ca0106_mixer(chip)) < 0) {
- snd_card_free(card);
- return err;
-+
-+ if (chip->details->ac97 == 1) {
-+ /* The SB0410 and SB0413 do not have an AC97 chip. */
-+ err = snd_ca0106_ac97(chip);
-+ if (err < 0)
-+ goto error;
- }
+- }
+ err = snd_ca0106_mixer(chip);
+ if (err < 0)
+ goto error;
snd_printdd(" done.\n");
#ifdef CONFIG_PROC_FS
-@@ -1689,14 +1731,17 @@ static int __devinit snd_ca0106_probe(st
+@@ -1689,14 +1731,17 @@
snd_card_set_dev(card, &pci->dev);
}
static void __devexit snd_ca0106_remove(struct pci_dev *pci)
-@@ -1705,6 +1750,59 @@ static void __devexit snd_ca0106_remove(
+@@ -1704,6 +1749,59 @@
+ snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
-
++
+#ifdef CONFIG_PM
+static int snd_ca0106_suspend(struct pci_dev *pci, pm_message_t state)
+{
+ return 0;
+}
+#endif
-+
+
// PCI IDs
static struct pci_device_id snd_ca0106_ids[] = {
- { 0x1102, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Audigy LS or Live 24bit */
-@@ -1718,6 +1816,8 @@ static struct pci_driver driver = {
+@@ -1718,6 +1816,8 @@
.id_table = snd_ca0106_ids,
.probe = snd_ca0106_probe,
.remove = __devexit_p(snd_ca0106_remove),
};
// initialization of the module
-diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_mixer.c linux-2.6.27.19-5.1/sound/pci/ca0106/ca0106_mixer.c
---- linux-2.6.27/sound/pci/ca0106/ca0106_mixer.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/ca0106/ca0106_mixer.c 2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/ca0106/ca0106_mixer.c
+--- a/sound/pci/ca0106/ca0106_mixer.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/ca0106/ca0106_mixer.c Wed May 06 16:57:07 2009 +0100
@@ -75,6 +75,84 @@
#include "ca0106.h"
static const DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale1, -5175, 25, 1);
static const DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale2, -10350, 50, 1);
-@@ -95,30 +173,12 @@ static int snd_ca0106_shared_spdif_put(s
+@@ -95,30 +173,12 @@
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
unsigned int val;
int change = 0;
}
return change;
}
-@@ -154,8 +214,6 @@ static int snd_ca0106_capture_source_put
+@@ -154,8 +214,6 @@
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
unsigned int val;
int change = 0;
val = ucontrol->value.enumerated.item[0] ;
if (val >= 6)
-@@ -163,9 +221,7 @@ static int snd_ca0106_capture_source_put
+@@ -163,9 +221,7 @@
change = (emu->capture_source != val);
if (change) {
emu->capture_source = val;
}
return change;
}
-@@ -200,9 +256,7 @@ static int snd_ca0106_i2c_capture_source
+@@ -200,9 +256,7 @@
{
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
unsigned int source_id;
/* If the capture source has changed,
* update the capture volume from the cached value
* for the particular source.
-@@ -212,18 +266,7 @@ static int snd_ca0106_i2c_capture_source
+@@ -212,18 +266,7 @@
return -EINVAL;
change = (emu->i2c_capture_source != source_id);
if (change) {
}
return change;
}
-@@ -271,7 +314,6 @@ static int snd_ca0106_capture_mic_line_i
+@@ -271,7 +314,6 @@
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
unsigned int val;
int change = 0;
val = ucontrol->value.enumerated.item[0] ;
if (val > 1)
-@@ -279,18 +321,7 @@ static int snd_ca0106_capture_mic_line_i
+@@ -279,18 +321,7 @@
change = (emu->capture_mic_line_in != val);
if (change) {
emu->capture_mic_line_in = val;
}
return change;
}
-@@ -359,8 +390,8 @@ static int snd_ca0106_spdif_put(struct s
+@@ -359,8 +390,8 @@
(ucontrol->value.iec958.status[3] << 24);
change = val != emu->spdif_bits[idx];
if (change) {
}
return change;
}
-@@ -773,3 +804,50 @@ int __devinit snd_ca0106_mixer(struct sn
+@@ -773,3 +804,50 @@
return 0;
}
+ ca0106_set_capture_mic_line_in(chip);
+}
+#endif /* CONFIG_PM */
-diff -purN linux-2.6.27/sound/pci/emu10k1/emu10k1_main.c linux-2.6.27.19-5.1/sound/pci/emu10k1/emu10k1_main.c
---- linux-2.6.27/sound/pci/emu10k1/emu10k1_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/emu10k1/emu10k1_main.c 2009-03-25 16:10:56.000000000 +0000
-@@ -1451,6 +1451,7 @@ static struct snd_emu_chip_details emu_c
+diff -r 9608d5473017 sound/pci/emu10k1/emu10k1_main.c
+--- a/sound/pci/emu10k1/emu10k1_main.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/emu10k1/emu10k1_main.c Wed May 06 16:57:07 2009 +0100
+@@ -1451,6 +1451,7 @@
.ca0151_chip = 1,
.spk71 = 1,
.spdif_bug = 1,
.ac97_chip = 1} ,
/* Tested by shane-alsa@cm.nu 5th Nov 2005 */
/* The 0x20061102 does have SB0350 written on it
-@@ -1464,6 +1465,7 @@ static struct snd_emu_chip_details emu_c
+@@ -1464,6 +1465,7 @@
.ca0151_chip = 1,
.spk71 = 1,
.spdif_bug = 1,
.ac97_chip = 1} ,
{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20021102,
.driver = "Audigy2", .name = "Audigy 2 ZS [SB0350]",
-@@ -1473,6 +1475,7 @@ static struct snd_emu_chip_details emu_c
+@@ -1473,6 +1475,7 @@
.ca0151_chip = 1,
.spk71 = 1,
.spdif_bug = 1,
.ac97_chip = 1} ,
{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20011102,
.driver = "Audigy2", .name = "Audigy 2 ZS [2001]",
-@@ -1482,6 +1485,7 @@ static struct snd_emu_chip_details emu_c
+@@ -1482,6 +1485,7 @@
.ca0151_chip = 1,
.spk71 = 1,
.spdif_bug = 1,
.ac97_chip = 1} ,
/* Audigy 2 */
/* Tested by James@superbug.co.uk 3rd July 2005 */
-@@ -1519,6 +1523,7 @@ static struct snd_emu_chip_details emu_c
+@@ -1519,6 +1523,7 @@
.ca0151_chip = 1,
.spk71 = 1,
.spdif_bug = 1,
.ac97_chip = 1} ,
{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10021102,
.driver = "Audigy2", .name = "Audigy 2 Platinum [SB0240P]",
-@@ -1538,6 +1543,7 @@ static struct snd_emu_chip_details emu_c
+@@ -1538,6 +1543,7 @@
.ca0102_chip = 1,
.ca0151_chip = 1,
.spdif_bug = 1,
.ac97_chip = 1} ,
{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x00531102,
.driver = "Audigy", .name = "Audigy 1 [SB0090]",
-diff -purN linux-2.6.27/sound/pci/hda/Makefile linux-2.6.27.19-5.1/sound/pci/hda/Makefile
---- linux-2.6.27/sound/pci/hda/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/Makefile 2009-03-25 16:10:56.000000000 +0000
-@@ -5,6 +5,7 @@ snd-hda-intel-y := hda_intel.o
+diff -r 9608d5473017 sound/pci/hda/Makefile
+--- a/sound/pci/hda/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/Makefile Wed May 06 16:57:07 2009 +0100
+@@ -5,6 +5,7 @@
snd-hda-intel-y += hda_codec.o
snd-hda-intel-$(CONFIG_PROC_FS) += hda_proc.o
snd-hda-intel-$(CONFIG_SND_HDA_HWDEP) += hda_hwdep.o
snd-hda-intel-$(CONFIG_SND_HDA_GENERIC) += hda_generic.o
snd-hda-intel-$(CONFIG_SND_HDA_CODEC_REALTEK) += patch_realtek.o
snd-hda-intel-$(CONFIG_SND_HDA_CODEC_CMEDIA) += patch_cmedia.o
-@@ -14,5 +15,6 @@ snd-hda-intel-$(CONFIG_SND_HDA_CODEC_SI3
+@@ -14,5 +15,6 @@
snd-hda-intel-$(CONFIG_SND_HDA_CODEC_ATIHDMI) += patch_atihdmi.o
snd-hda-intel-$(CONFIG_SND_HDA_CODEC_CONEXANT) += patch_conexant.o
snd-hda-intel-$(CONFIG_SND_HDA_CODEC_VIA) += patch_via.o
+snd-hda-intel-$(CONFIG_SND_HDA_CODEC_NVHDMI) += patch_nvhdmi.o
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-intel.o
-diff -purN linux-2.6.27/sound/pci/hda/hda_beep.c linux-2.6.27.19-5.1/sound/pci/hda/hda_beep.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_beep.c 2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/hda/hda_beep.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/sound/pci/hda/hda_beep.c Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,142 @@
+/*
+ * Digital Beep Input Interface for HD-audio codec
+ kfree(beep);
+ }
+}
-diff -purN linux-2.6.27/sound/pci/hda/hda_beep.h linux-2.6.27.19-5.1/sound/pci/hda/hda_beep.h
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_beep.h 2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/hda/hda_beep.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/sound/pci/hda/hda_beep.h Wed May 06 16:57:07 2009 +0100
@@ -0,0 +1,45 @@
+/*
+ * Digital Beep Input Interface for HD-audio codec
+#define snd_hda_detach_beep_device(...)
+#endif
+#endif
-diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/hda/hda_codec.c
---- linux-2.6.27/sound/pci/hda/hda_codec.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_codec.c 2009-03-25 16:10:56.000000000 +0000
-@@ -94,6 +94,9 @@ static const struct hda_codec_preset *hd
+diff -r 9608d5473017 sound/pci/hda/hda_codec.c
+--- a/sound/pci/hda/hda_codec.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/hda_codec.c Wed May 06 16:57:08 2009 +0100
+@@ -93,6 +93,9 @@
+ #endif
#ifdef CONFIG_SND_HDA_CODEC_VIA
snd_hda_preset_via,
- #endif
++#endif
+#ifdef CONFIG_SND_HDA_CODEC_NVHDMI
+ snd_hda_preset_nvhdmi,
-+#endif
+ #endif
NULL
};
-
-@@ -956,15 +959,6 @@ void snd_hda_codec_resume_amp(struct hda
+@@ -956,15 +959,6 @@
}
#endif /* SND_HDA_NEEDS_RESUME */
/* volume */
int snd_hda_mixer_amp_volume_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
-@@ -973,6 +967,7 @@ int snd_hda_mixer_amp_volume_info(struct
+@@ -973,6 +967,7 @@
u16 nid = get_amp_nid(kcontrol);
u8 chs = get_amp_channels(kcontrol);
int dir = get_amp_direction(kcontrol);
u32 caps;
caps = query_amp_caps(codec, nid, dir);
-@@ -984,6 +979,8 @@ int snd_hda_mixer_amp_volume_info(struct
+@@ -984,11 +979,39 @@
kcontrol->id.name);
return -EINVAL;
}
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = chs == 3 ? 2 : 1;
uinfo->value.integer.min = 0;
-@@ -991,6 +988,32 @@ int snd_hda_mixer_amp_volume_info(struct
+ uinfo->value.integer.max = caps;
return 0;
- }
-
++}
++
+
+static inline unsigned int
+read_amp_value(struct hda_codec *codec, hda_nid_t nid,
+ val += ofs;
+ return snd_hda_codec_amp_update(codec, nid, ch, dir, idx,
+ HDA_AMP_VOLMASK, val);
-+}
-+
+ }
+
int snd_hda_mixer_amp_volume_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
-@@ -999,14 +1022,13 @@ int snd_hda_mixer_amp_volume_get(struct
+@@ -999,14 +1022,13 @@
int chs = get_amp_channels(kcontrol);
int dir = get_amp_direction(kcontrol);
int idx = get_amp_index(kcontrol);
return 0;
}
-@@ -1018,18 +1040,17 @@ int snd_hda_mixer_amp_volume_put(struct
+@@ -1018,18 +1040,17 @@
int chs = get_amp_channels(kcontrol);
int dir = get_amp_direction(kcontrol);
int idx = get_amp_index(kcontrol);
snd_hda_power_down(codec);
return change;
}
-@@ -1040,6 +1061,7 @@ int snd_hda_mixer_amp_tlv(struct snd_kco
+@@ -1040,6 +1061,7 @@
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
hda_nid_t nid = get_amp_nid(kcontrol);
int dir = get_amp_direction(kcontrol);
u32 caps, val1, val2;
if (size < 4 * sizeof(unsigned int))
-@@ -1048,6 +1070,7 @@ int snd_hda_mixer_amp_tlv(struct snd_kco
+@@ -1048,6 +1070,7 @@
val2 = (caps & AC_AMPCAP_STEP_SIZE) >> AC_AMPCAP_STEP_SIZE_SHIFT;
val2 = (val2 + 1) * 25;
val1 = -((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT);
val1 = ((int)val1) * ((int)val2);
if (put_user(SNDRV_CTL_TLVT_DB_SCALE, _tlv))
return -EFAULT;
-@@ -1430,6 +1453,29 @@ static unsigned int convert_to_spdif_sta
+@@ -1430,6 +1453,29 @@
return sbits;
}
static int snd_hda_spdif_default_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
-@@ -1448,14 +1494,8 @@ static int snd_hda_spdif_default_put(str
+@@ -1448,14 +1494,8 @@
change = codec->spdif_ctls != val;
codec->spdif_ctls = val;
mutex_unlock(&codec->spdif_mutex);
return change;
-@@ -1487,9 +1527,7 @@ static int snd_hda_spdif_out_switch_put(
+@@ -1487,9 +1527,7 @@
change = codec->spdif_ctls != val;
if (change) {
codec->spdif_ctls = val;
/* unmute amp switch (if any) */
if ((get_wcaps(codec, nid) & AC_WCAP_OUT_AMP) &&
(val & AC_DIG1_ENABLE))
-@@ -2355,6 +2393,66 @@ int snd_hda_check_board_config(struct hd
+@@ -2355,6 +2393,66 @@
}
/**
* snd_hda_add_new_ctls - create controls from the array
* @codec: the HDA codec
* @knew: the array of struct snd_kcontrol_new
-@@ -2583,14 +2681,31 @@ static void setup_dig_out_stream(struct
+@@ -2583,14 +2681,31 @@
unsigned int stream_tag, unsigned int format)
{
/* turn off SPDIF once; otherwise the IEC958 bits won't be updated */
}
/*
-@@ -2602,7 +2717,7 @@ int snd_hda_multi_out_dig_open(struct hd
+@@ -2602,7 +2717,7 @@
mutex_lock(&codec->spdif_mutex);
if (mout->dig_out_used == HDA_DIG_ANALOG_DUP)
/* already opened as analog dup; reset it once */
mout->dig_out_used = HDA_DIG_EXCLUSIVE;
mutex_unlock(&codec->spdif_mutex);
return 0;
-@@ -2697,7 +2812,7 @@ int snd_hda_multi_out_analog_prepare(str
+@@ -2697,7 +2812,7 @@
stream_tag, format);
} else {
mout->dig_out_used = 0;
}
}
mutex_unlock(&codec->spdif_mutex);
-@@ -2748,7 +2863,7 @@ int snd_hda_multi_out_analog_cleanup(str
+@@ -2748,7 +2863,7 @@
mout->extra_out_nid[i]);
mutex_lock(&codec->spdif_mutex);
if (mout->dig_out_nid && mout->dig_out_used == HDA_DIG_ANALOG_DUP) {
mout->dig_out_used = 0;
}
mutex_unlock(&codec->spdif_mutex);
-diff -purN linux-2.6.27/sound/pci/hda/hda_codec.h linux-2.6.27.19-5.1/sound/pci/hda/hda_codec.h
---- linux-2.6.27/sound/pci/hda/hda_codec.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_codec.h 2009-03-25 16:10:56.000000000 +0000
-@@ -90,6 +90,14 @@ enum {
+diff -r 9608d5473017 sound/pci/hda/hda_codec.h
+--- a/sound/pci/hda/hda_codec.h Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/hda_codec.h Wed May 06 16:57:08 2009 +0100
+@@ -90,6 +90,14 @@
#define AC_VERB_GET_CONFIG_DEFAULT 0x0f1c
/* f20: AFG/MFG */
#define AC_VERB_GET_SUBSYSTEM_ID 0x0f20
/*
* SET verbs
-@@ -121,7 +129,14 @@ enum {
+@@ -121,7 +129,14 @@
#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_1 0x71d
#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_2 0x71e
#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_3 0x71f
/*
* Parameter IDs
-@@ -143,6 +158,7 @@ enum {
+@@ -143,6 +158,7 @@
#define AC_PAR_GPIO_CAP 0x11
#define AC_PAR_AMP_OUT_CAP 0x12
#define AC_PAR_VOL_KNB_CAP 0x13
/*
* AC_VERB_PARAMETERS results (32bit)
-@@ -171,6 +187,8 @@ enum {
+@@ -171,6 +187,8 @@
#define AC_WCAP_DIGITAL (1<<9) /* digital I/O */
#define AC_WCAP_POWER (1<<10) /* power control */
#define AC_WCAP_LR_SWAP (1<<11) /* L/R swap */
#define AC_WCAP_DELAY (0xf<<16)
#define AC_WCAP_DELAY_SHIFT 16
#define AC_WCAP_TYPE (0xf<<20)
-@@ -206,9 +224,20 @@ enum {
+@@ -206,9 +224,20 @@
/* Input converter SDI select */
#define AC_SDI_SELECT (0xf<<0)
/* Pin widget capabilies */
#define AC_PINCAP_IMP_SENSE (1<<0) /* impedance sense capable */
-@@ -222,6 +251,10 @@ enum {
+@@ -222,6 +251,10 @@
* but is marked reserved in the Intel HDA specification.
*/
#define AC_PINCAP_LR_SWAP (1<<7) /* L/R swap */
#define AC_PINCAP_VREF (0x37<<8)
#define AC_PINCAP_VREF_SHIFT 8
#define AC_PINCAP_EAPD (1<<16) /* EAPD capable */
-@@ -272,6 +305,22 @@ enum {
+@@ -272,6 +305,22 @@
#define AC_KNBCAP_NUM_STEPS (0x7f<<0)
#define AC_KNBCAP_DELTA (1<<7)
/*
* Control Parameters
*/
-@@ -317,18 +366,44 @@ enum {
+@@ -317,17 +366,43 @@
#define AC_PINCTL_OUT_EN (1<<6)
#define AC_PINCTL_HP_EN (1<<7)
#define AC_EAPDBTL_BALANCED (1<<0)
#define AC_EAPDBTL_EAPD (1<<1)
#define AC_EAPDBTL_LR_SWAP (1<<2)
-
++
+/* HDMI ELD data */
+#define AC_ELDD_ELD_VALID (1<<31)
+#define AC_ELDD_ELD_DATA 0xff
+/* Converter channel <-> HDMI slot mapping */
+#define AC_CVTMAP_HDMI_SLOT (0xf<<0) /* HDMI slot number */
+#define AC_CVTMAP_CHAN (0xf<<4) /* converter channel number */
-+
+
/* configuration default - 32bit */
#define AC_DEFCFG_SEQUENCE (0xf<<0)
- #define AC_DEFCFG_DEF_ASSOC (0xf<<4)
-@@ -449,6 +524,7 @@ enum {
+@@ -449,6 +524,7 @@
*/
struct hda_bus;
struct hda_codec;
struct hda_pcm;
struct hda_pcm_stream;
-@@ -634,6 +710,9 @@ struct hda_codec {
+@@ -634,6 +710,9 @@
/* codec specific info */
void *spec;
/* widget capabilities cache */
unsigned int num_nodes;
hda_nid_t start_nid;
-@@ -646,9 +725,15 @@ struct hda_codec {
+@@ -646,9 +725,15 @@
unsigned int spdif_status; /* IEC958 status bits */
unsigned short spdif_ctls; /* SPDIF control bits */
unsigned int spdif_in_enable; /* SPDIF input enable? */
#ifdef CONFIG_SND_HDA_POWER_SAVE
unsigned int power_on :1; /* current (global) power-state */
unsigned int power_transition :1; /* power-state in transition */
-diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/hda/hda_intel.c
---- linux-2.6.27/sound/pci/hda/hda_intel.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_intel.c 2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/hda/hda_intel.c
+--- a/sound/pci/hda/hda_intel.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/hda_intel.c Wed May 06 16:57:08 2009 +0100
@@ -45,6 +45,7 @@
#include <linux/slab.h>
#include <linux/pci.h>
#include <sound/core.h>
#include <sound/initval.h>
#include "hda_codec.h"
-@@ -222,9 +223,9 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO
+@@ -222,9 +223,9 @@
#define RIRB_INT_OVERRUN 0x04
#define RIRB_INT_MASK 0x05
/* SD_CTL bits */
#define SD_CTL_STREAM_RESET 0x01 /* stream reset bit */
-@@ -286,6 +287,11 @@ enum {
+@@ -286,6 +287,11 @@
#define INTEL_SCH_HDA_DEVC 0x78
#define INTEL_SCH_HDA_DEVC_NOSNOOP (0x1<<11)
/*
*/
-@@ -317,6 +323,12 @@ struct azx_dev {
+@@ -317,6 +323,12 @@
unsigned int running :1;
unsigned int irq_pending :1;
unsigned int irq_ignore :1;
};
/* CORB/RIRB */
-@@ -379,12 +391,16 @@ struct azx {
+@@ -379,12 +391,16 @@
unsigned int polling_mode :1;
unsigned int msi :1;
unsigned int irq_pending_warned :1;
};
/* driver types */
-@@ -398,6 +414,7 @@ enum {
+@@ -398,6 +414,7 @@
AZX_DRIVER_ULI,
AZX_DRIVER_NVIDIA,
AZX_DRIVER_TERA,
};
static char *driver_short_names[] __devinitdata = {
-@@ -818,6 +835,11 @@ static void azx_int_clear(struct azx *ch
+@@ -818,6 +835,11 @@
/* start a stream */
static void azx_stream_start(struct azx *chip, struct azx_dev *azx_dev)
{
/* enable SIE */
azx_writeb(chip, INTCTL,
azx_readb(chip, INTCTL) | (1 << azx_dev->index));
-@@ -1151,7 +1173,8 @@ static int azx_setup_controller(struct a
+@@ -1151,7 +1173,8 @@
/* enable the position buffer */
if (chip->position_fix == POS_FIX_POSBUF ||
if (!(azx_readl(chip, DPLBASE) & ICH6_DPLBASE_ENABLE))
azx_writel(chip, DPLBASE,
(u32)chip->posbuf.addr | ICH6_DPLBASE_ENABLE);
-@@ -1169,23 +1192,26 @@ static int azx_setup_controller(struct a
+@@ -1169,16 +1192,18 @@
* Codec initialization
*/
+/* number of codec slots for each chipset: 0 = default slots (i.e. 4) */
+static unsigned int azx_max_codecs[AZX_NUM_DRIVERS] __devinitdata = {
[AZX_DRIVER_TERA] = 1,
- };
-
++};
++
+/* number of slots to probe as default
+ * this can be different from azx_max_codecs[] -- e.g. some boards
+ * report wrongly the non-existing 4th slot availability
+static unsigned int azx_default_codecs[AZX_NUM_DRIVERS] __devinitdata = {
+ [AZX_DRIVER_ICH] = 3,
+ [AZX_DRIVER_ATI] = 3,
-+};
-+
+ };
+
static int __devinit azx_codec_create(struct azx *chip, const char *model,
- unsigned int codec_probe_mask)
+@@ -1186,6 +1211,7 @@
{
struct hda_bus_template bus_temp;
int c, codecs, audio_codecs, err;
memset(&bus_temp, 0, sizeof(bus_temp));
bus_temp.private_data = chip;
-@@ -1201,8 +1227,17 @@ static int __devinit azx_codec_create(st
+@@ -1201,8 +1227,17 @@
if (err < 0)
return err;
if ((chip->codec_mask & (1 << c)) & codec_probe_mask) {
struct hda_codec *codec;
err = snd_hda_codec_new(chip->bus, c, &codec);
-@@ -1215,7 +1250,7 @@ static int __devinit azx_codec_create(st
+@@ -1215,7 +1250,7 @@
}
if (!audio_codecs) {
/* probe additional slots if no codec is found */
if ((chip->codec_mask & (1 << c)) & codec_probe_mask) {
err = snd_hda_codec_new(chip->bus, c, NULL);
if (err < 0)
-@@ -1507,13 +1542,71 @@ static int azx_pcm_trigger(struct snd_pc
+@@ -1507,13 +1542,71 @@
return 0;
}
/* use the position buffer */
pos = le32_to_cpu(*azx_dev->posbuf);
} else {
-@@ -1559,6 +1652,8 @@ static int azx_position_ok(struct azx *c
+@@ -1559,6 +1652,8 @@
chip->position_fix = POS_FIX_POSBUF;
}
if (pos % azx_dev->period_bytes > azx_dev->period_bytes / 2)
return 0; /* NG - it's below the period boundary */
return 1; /* OK, it's fine */
-@@ -1670,7 +1765,7 @@ static int __devinit create_codec_pcm(st
+@@ -1670,7 +1765,7 @@
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &azx_pcm_ops);
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
snd_dma_pci_data(chip->pci),
chip->pcm[cpcm->device] = pcm;
return 0;
}
-@@ -1890,12 +1985,36 @@ static int azx_resume(struct pci_dev *pc
+@@ -1890,11 +1985,35 @@
/*
static int azx_free(struct azx *chip)
{
int i;
-
-+ azx_notifier_unregister(chip);
+
++ azx_notifier_unregister(chip);
+
if (chip->initialized) {
azx_clear_irq_pending(chip);
- for (i = 0; i < chip->num_streams; i++)
-@@ -1946,6 +2065,15 @@ static int __devinit check_position_fix(
+@@ -1946,6 +2065,15 @@
{
const struct snd_pci_quirk *q;
if (fix == POS_FIX_AUTO) {
q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
if (q) {
-@@ -1969,6 +2097,8 @@ static struct snd_pci_quirk probe_mask_l
+@@ -1969,6 +2097,8 @@
SND_PCI_QUIRK(0x1014, 0x05b7, "Thinkpad Z60", 0x01),
SND_PCI_QUIRK(0x17aa, 0x2010, "Thinkpad X/T/R60", 0x01),
SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X/T/R61", 0x01),
{}
};
-@@ -2250,6 +2380,7 @@ static int __devinit azx_probe(struct pc
+@@ -2250,6 +2380,7 @@
pci_set_drvdata(pci, card);
chip->running = 1;
power_down_all_codecs(chip);
dev++;
return err;
-diff -purN linux-2.6.27/sound/pci/hda/hda_local.h linux-2.6.27.19-5.1/sound/pci/hda/hda_local.h
---- linux-2.6.27/sound/pci/hda/hda_local.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_local.h 2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/hda/hda_local.h
+--- a/sound/pci/hda/hda_local.h Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/hda_local.h Wed May 06 16:57:08 2009 +0100
@@ -26,8 +26,10 @@
/*
* for mixer controls
/* mono volume with index (index=0,1,...) (channel=1,2) */
#define HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, channel, xindex, direction) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xcidx, \
-@@ -288,6 +290,9 @@ static inline int snd_hda_codec_proc_new
+@@ -288,6 +290,9 @@
int snd_hda_check_board_config(struct hda_codec *codec, int num_configs,
const char **modelnames,
const struct snd_pci_quirk *pci_list);
int snd_hda_add_new_ctls(struct hda_codec *codec,
struct snd_kcontrol_new *knew);
-@@ -368,12 +373,15 @@ int snd_hda_parse_pin_def_config(struct
+@@ -368,12 +373,15 @@
#define AMP_OUT_UNMUTE 0xb000
#define AMP_OUT_ZERO 0xb000
/* pinctl values */
/*
* get widget capabilities
-@@ -418,4 +426,14 @@ int snd_hda_check_amp_list_power(struct
+@@ -418,4 +426,14 @@
hda_nid_t nid);
#endif /* CONFIG_SND_HDA_POWER_SAVE */
+#define get_amp_offset(kc) (((kc)->private_value >> 23) & 0x3f)
+
#endif /* __SOUND_HDA_LOCAL_H */
-diff -purN linux-2.6.27/sound/pci/hda/hda_patch.h linux-2.6.27.19-5.1/sound/pci/hda/hda_patch.h
---- linux-2.6.27/sound/pci/hda/hda_patch.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_patch.h 2009-03-25 16:10:56.000000000 +0000
-@@ -18,3 +18,5 @@ extern struct hda_codec_preset snd_hda_p
+diff -r 9608d5473017 sound/pci/hda/hda_patch.h
+--- a/sound/pci/hda/hda_patch.h Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/hda_patch.h Wed May 06 16:57:08 2009 +0100
+@@ -18,3 +18,5 @@
extern struct hda_codec_preset snd_hda_preset_conexant[];
/* VIA codecs */
extern struct hda_codec_preset snd_hda_preset_via[];
+/* NVIDIA HDMI codecs */
+extern struct hda_codec_preset snd_hda_preset_nvhdmi[];
-diff -purN linux-2.6.27/sound/pci/hda/hda_proc.c linux-2.6.27.19-5.1/sound/pci/hda/hda_proc.c
---- linux-2.6.27/sound/pci/hda/hda_proc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_proc.c 2009-03-25 16:10:56.000000000 +0000
-@@ -216,7 +216,7 @@ static void print_pin_caps(struct snd_in
+diff -r 9608d5473017 sound/pci/hda/hda_proc.c
+--- a/sound/pci/hda/hda_proc.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/hda_proc.c Wed May 06 16:57:08 2009 +0100
+@@ -216,7 +216,7 @@
unsigned int caps, val;
caps = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP);
if (caps & AC_PINCAP_IN)
snd_iprintf(buffer, " IN");
if (caps & AC_PINCAP_OUT)
-@@ -229,6 +229,13 @@ static void print_pin_caps(struct snd_in
+@@ -229,6 +229,13 @@
snd_iprintf(buffer, " Detect");
if (caps & AC_PINCAP_BALANCE)
snd_iprintf(buffer, " Balanced");
if (caps & AC_PINCAP_LR_SWAP)
snd_iprintf(buffer, " R/L");
if (caps & AC_PINCAP_TRIG_REQ)
-@@ -478,6 +485,8 @@ static void print_gpio(struct snd_info_b
+@@ -478,6 +485,8 @@
(gpio & AC_GPIO_UNSOLICITED) ? 1 : 0,
(gpio & AC_GPIO_WAKE) ? 1 : 0);
max = gpio & AC_GPIO_IO_COUNT;
enable = snd_hda_codec_read(codec, nid, 0,
AC_VERB_GET_GPIO_MASK, 0);
direction = snd_hda_codec_read(codec, nid, 0,
-@@ -552,9 +561,15 @@ static void print_codec_info(struct snd_
+@@ -552,9 +561,15 @@
snd_iprintf(buffer, "Node 0x%02x [%s] wcaps 0x%x:", nid,
get_wid_type_name(wid_type), wid_caps);
snd_iprintf(buffer, " Mono");
if (wid_caps & AC_WCAP_DIGITAL)
snd_iprintf(buffer, " Digital");
-@@ -566,6 +581,8 @@ static void print_codec_info(struct snd_
+@@ -566,6 +581,8 @@
snd_iprintf(buffer, " Stripe");
if (wid_caps & AC_WCAP_LR_SWAP)
snd_iprintf(buffer, " R/L");
snd_iprintf(buffer, "\n");
/* volume knob is a special widget that always have connection
-diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/pci/hda/patch_analog.c
---- linux-2.6.27/sound/pci/hda/patch_analog.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/patch_analog.c 2009-03-25 16:10:56.000000000 +0000
-@@ -629,6 +629,36 @@ static struct snd_kcontrol_new ad1986a_l
- HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw),
- HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT),
+diff -r 9608d5473017 sound/pci/hda/patch_analog.c
+--- a/sound/pci/hda/patch_analog.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/patch_analog.c Wed May 06 16:57:08 2009 +0100
+@@ -625,6 +625,36 @@
+ };
+
+ static struct snd_kcontrol_new ad1986a_laptop_eapd_mixers[] = {
++ HDA_BIND_VOL("Master Playback Volume", &ad1986a_laptop_master_vol),
++ HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw),
++ HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT),
++ HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT),
+ HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0, HDA_OUTPUT),
+ HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x17, 0, HDA_OUTPUT),
+ HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT),
+};
+
+static struct snd_kcontrol_new ad1986a_samsung_mixers[] = {
-+ HDA_BIND_VOL("Master Playback Volume", &ad1986a_laptop_master_vol),
-+ HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw),
-+ HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT),
-+ HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT),
- HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT),
- HDA_CODEC_VOLUME("Mic Boost", 0x0f, 0x0, HDA_OUTPUT),
-@@ -917,6 +947,7 @@ enum {
+ HDA_BIND_VOL("Master Playback Volume", &ad1986a_laptop_master_vol),
+ HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw),
+ HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT),
+@@ -917,6 +947,7 @@
AD1986A_LAPTOP_EAPD,
AD1986A_LAPTOP_AUTOMUTE,
AD1986A_ULTRA,
AD1986A_MODELS
};
-@@ -927,6 +958,7 @@ static const char *ad1986a_models[AD1986
+@@ -927,6 +958,7 @@
[AD1986A_LAPTOP_EAPD] = "laptop-eapd",
[AD1986A_LAPTOP_AUTOMUTE] = "laptop-automute",
[AD1986A_ULTRA] = "ultra",
};
static struct snd_pci_quirk ad1986a_cfg_tbl[] = {
-@@ -949,9 +981,9 @@ static struct snd_pci_quirk ad1986a_cfg_
+@@ -949,9 +981,9 @@
SND_PCI_QUIRK(0x1179, 0xff40, "Toshiba", AD1986A_LAPTOP_EAPD),
SND_PCI_QUIRK(0x144d, 0xb03c, "Samsung R55", AD1986A_3STACK),
SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_LAPTOP),
SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_ULTRA),
SND_PCI_QUIRK(0x144d, 0xc504, "Samsung Q35", AD1986A_3STACK),
SND_PCI_QUIRK(0x17aa, 0x1011, "Lenovo M55", AD1986A_LAPTOP),
-@@ -1033,6 +1065,17 @@ static int patch_ad1986a(struct hda_code
+@@ -1033,6 +1065,17 @@
break;
case AD1986A_LAPTOP_EAPD:
spec->mixers[0] = ad1986a_laptop_eapd_mixers;
spec->num_init_verbs = 3;
spec->init_verbs[1] = ad1986a_eapd_init_verbs;
spec->init_verbs[2] = ad1986a_automic_verbs;
-@@ -1826,9 +1869,14 @@ static hda_nid_t ad1988_capsrc_nids[3] =
+@@ -1826,8 +1869,13 @@
0x0c, 0x0d, 0x0e
};
+#define AD1988_SPDIF_OUT 0x02
+#define AD1988_SPDIF_OUT_HDMI 0x0b
#define AD1988_SPDIF_IN 0x07
-
++
+static hda_nid_t ad1989b_slave_dig_outs[2] = {
+ AD1988_SPDIF_OUT, AD1988_SPDIF_OUT_HDMI
+};
-+
+
static struct hda_input_mux ad1988_6stack_capture_source = {
.num_items = 5,
- .items = {
-@@ -2143,6 +2191,7 @@ static struct snd_kcontrol_new ad1988_sp
+@@ -2143,6 +2191,7 @@
static struct snd_kcontrol_new ad1989_spdif_out_mixers[] = {
HDA_CODEC_VOLUME("IEC958 Playback Volume", 0x1b, 0x0, HDA_OUTPUT),
{ } /* end */
};
-@@ -2207,6 +2256,8 @@ static struct hda_verb ad1988_6stack_ini
+@@ -2207,6 +2256,8 @@
{0x34, AC_VERB_SET_CONNECT_SEL, 0x0},
/* Analog CD Input */
{0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
{ }
};
-@@ -2247,8 +2298,12 @@ static struct hda_verb ad1988_spdif_init
+@@ -2247,8 +2298,12 @@
/* AD1989 has no ADC -> SPDIF route */
static struct hda_verb ad1989_spdif_init_verbs[] = {
- /* SPDIF out pin */
+- {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE | 0x27}, /* 0dB */
+ /* SPDIF-1 out pin */
+ {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
- {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE | 0x27}, /* 0dB */
++ {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE | 0x27}, /* 0dB */
+ /* SPDIF-2/HDMI out pin */
+ {0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
+ {0x1d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE | 0x27}, /* 0dB */
{ }
};
-@@ -2336,6 +2391,8 @@ static struct hda_verb ad1988_3stack_ini
+@@ -2336,6 +2391,8 @@
{0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
{0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
{ }
};
-@@ -2409,6 +2466,8 @@ static struct hda_verb ad1988_laptop_ini
+@@ -2409,6 +2466,8 @@
{0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
{0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
{ }
};
-@@ -2868,6 +2927,7 @@ static struct snd_pci_quirk ad1988_cfg_t
+@@ -2868,6 +2927,7 @@
SND_PCI_QUIRK(0x1043, 0x81ec, "Asus P5B-DLX", AD1988_6STACK_DIG),
SND_PCI_QUIRK(0x1043, 0x81f6, "Asus M2N-SLI", AD1988_6STACK_DIG),
SND_PCI_QUIRK(0x1043, 0x8277, "Asus P5K-E/WIFI-AP", AD1988_6STACK_DIG),
{}
};
-@@ -2975,6 +3035,7 @@ static int patch_ad1988(struct hda_codec
+@@ -2975,6 +3035,7 @@
ad1989_spdif_out_mixers;
spec->init_verbs[spec->num_init_verbs++] =
ad1989_spdif_init_verbs;
} else {
spec->mixers[spec->num_mixers++] =
ad1988_spdif_out_mixers;
-@@ -3842,6 +3903,17 @@ static const char *ad1884a_models[AD1884
+@@ -3842,6 +3903,17 @@
static struct snd_pci_quirk ad1884a_cfg_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE),
SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD),
{}
};
-@@ -3887,6 +3959,14 @@ static int patch_ad1884a(struct hda_code
+@@ -3887,6 +3959,14 @@
spec->input_mux = &ad1884a_laptop_capture_source;
codec->patch_ops.unsol_event = ad1884a_hp_unsol_event;
codec->patch_ops.init = ad1884a_hp_init;
break;
case AD1884A_MOBILE:
spec->mixers[0] = ad1884a_mobile_mixers;
-@@ -3911,7 +3991,7 @@ static int patch_ad1884a(struct hda_code
+@@ -3911,7 +3991,7 @@
/*
*
* port-A - front hp-out
* port-B - front mic-in
-@@ -3948,6 +4028,18 @@ static struct hda_input_mux ad1882_captu
+@@ -3948,6 +4028,18 @@
},
};
static struct snd_kcontrol_new ad1882_base_mixers[] = {
HDA_CODEC_VOLUME("Front Playback Volume", 0x04, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME("Surround Playback Volume", 0x03, 0x0, HDA_OUTPUT),
-@@ -3957,16 +4049,7 @@ static struct snd_kcontrol_new ad1882_ba
+@@ -3957,6 +4049,40 @@
HDA_CODEC_MUTE("Front Playback Switch", 0x12, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x13, 1, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x13, 1, 0x0, HDA_OUTPUT),
-- HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x20, 0x00, HDA_INPUT),
-- HDA_CODEC_MUTE("Front Mic Playback Switch", 0x20, 0x00, HDA_INPUT),
-- HDA_CODEC_VOLUME("Mic Playback Volume", 0x20, 0x01, HDA_INPUT),
-- HDA_CODEC_MUTE("Mic Playback Switch", 0x20, 0x01, HDA_INPUT),
-- HDA_CODEC_VOLUME("Line Playback Volume", 0x20, 0x04, HDA_INPUT),
-- HDA_CODEC_MUTE("Line Playback Switch", 0x20, 0x04, HDA_INPUT),
-- HDA_CODEC_VOLUME("CD Playback Volume", 0x20, 0x06, HDA_INPUT),
-- HDA_CODEC_MUTE("CD Playback Switch", 0x20, 0x06, HDA_INPUT),
-- HDA_CODEC_VOLUME("Beep Playback Volume", 0x20, 0x07, HDA_INPUT),
-- HDA_CODEC_MUTE("Beep Playback Switch", 0x20, 0x07, HDA_INPUT),
-+
- HDA_CODEC_VOLUME("Mic Boost", 0x3c, 0x0, HDA_OUTPUT),
- HDA_CODEC_VOLUME("Front Mic Boost", 0x39, 0x0, HDA_OUTPUT),
- HDA_CODEC_VOLUME("Line-In Boost", 0x3a, 0x0, HDA_OUTPUT),
-@@ -3999,6 +4082,35 @@ static struct snd_kcontrol_new ad1882_ba
- { } /* end */
- };
-
++
++ HDA_CODEC_VOLUME("Mic Boost", 0x3c, 0x0, HDA_OUTPUT),
++ HDA_CODEC_VOLUME("Front Mic Boost", 0x39, 0x0, HDA_OUTPUT),
++ HDA_CODEC_VOLUME("Line-In Boost", 0x3a, 0x0, HDA_OUTPUT),
++ HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT),
++ HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT),
++ HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x0d, 0x0, HDA_OUTPUT),
++ HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x0d, 0x0, HDA_OUTPUT),
++ {
++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
++ /* The multiple "Capture Source" controls confuse alsamixer
++ * So call somewhat different..
++ */
++ /* .name = "Capture Source", */
++ .name = "Input Source",
++ .count = 2,
++ .info = ad198x_mux_enum_info,
++ .get = ad198x_mux_enum_get,
++ .put = ad198x_mux_enum_put,
++ },
++ /* SPDIF controls */
++ HDA_CODEC_VOLUME("IEC958 Playback Volume", 0x1b, 0x0, HDA_OUTPUT),
++ {
++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
++ .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Source",
++ /* identical with ad1983 */
++ .info = ad1983_spdif_route_info,
++ .get = ad1983_spdif_route_get,
++ .put = ad1983_spdif_route_put,
++ },
++ { } /* end */
++};
++
+static struct snd_kcontrol_new ad1882_loopback_mixers[] = {
-+ HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x20, 0x00, HDA_INPUT),
-+ HDA_CODEC_MUTE("Front Mic Playback Switch", 0x20, 0x00, HDA_INPUT),
-+ HDA_CODEC_VOLUME("Mic Playback Volume", 0x20, 0x01, HDA_INPUT),
-+ HDA_CODEC_MUTE("Mic Playback Switch", 0x20, 0x01, HDA_INPUT),
-+ HDA_CODEC_VOLUME("Line Playback Volume", 0x20, 0x04, HDA_INPUT),
-+ HDA_CODEC_MUTE("Line Playback Switch", 0x20, 0x04, HDA_INPUT),
-+ HDA_CODEC_VOLUME("CD Playback Volume", 0x20, 0x06, HDA_INPUT),
-+ HDA_CODEC_MUTE("CD Playback Switch", 0x20, 0x06, HDA_INPUT),
-+ HDA_CODEC_VOLUME("Beep Playback Volume", 0x20, 0x07, HDA_INPUT),
-+ HDA_CODEC_MUTE("Beep Playback Switch", 0x20, 0x07, HDA_INPUT),
+ HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x20, 0x00, HDA_INPUT),
+ HDA_CODEC_MUTE("Front Mic Playback Switch", 0x20, 0x00, HDA_INPUT),
+ HDA_CODEC_VOLUME("Mic Playback Volume", 0x20, 0x01, HDA_INPUT),
+@@ -3967,35 +4093,21 @@
+ HDA_CODEC_MUTE("CD Playback Switch", 0x20, 0x06, HDA_INPUT),
+ HDA_CODEC_VOLUME("Beep Playback Volume", 0x20, 0x07, HDA_INPUT),
+ HDA_CODEC_MUTE("Beep Playback Switch", 0x20, 0x07, HDA_INPUT),
+- HDA_CODEC_VOLUME("Mic Boost", 0x3c, 0x0, HDA_OUTPUT),
+- HDA_CODEC_VOLUME("Front Mic Boost", 0x39, 0x0, HDA_OUTPUT),
+- HDA_CODEC_VOLUME("Line-In Boost", 0x3a, 0x0, HDA_OUTPUT),
+- HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT),
+- HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT),
+- HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x0d, 0x0, HDA_OUTPUT),
+- HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x0d, 0x0, HDA_OUTPUT),
+- {
+- .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+- /* The multiple "Capture Source" controls confuse alsamixer
+- * So call somewhat different..
+- */
+- /* .name = "Capture Source", */
+- .name = "Input Source",
+- .count = 2,
+- .info = ad198x_mux_enum_info,
+- .get = ad198x_mux_enum_get,
+- .put = ad198x_mux_enum_put,
+- },
+- /* SPDIF controls */
+- HDA_CODEC_VOLUME("IEC958 Playback Volume", 0x1b, 0x0, HDA_OUTPUT),
+- {
+- .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+- .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Source",
+- /* identical with ad1983 */
+- .info = ad1983_spdif_route_info,
+- .get = ad1983_spdif_route_get,
+- .put = ad1983_spdif_route_put,
+- },
+ { } /* end */
+};
+
+ HDA_CODEC_VOLUME("Beep Playback Volume", 0x20, 0x07, HDA_INPUT),
+ HDA_CODEC_MUTE("Beep Playback Switch", 0x20, 0x07, HDA_INPUT),
+ HDA_CODEC_VOLUME("Digital Mic Boost", 0x1f, 0x0, HDA_INPUT),
-+ { } /* end */
-+};
-+
- static struct snd_kcontrol_new ad1882_3stack_mixers[] = {
- HDA_CODEC_MUTE("Surround Playback Switch", 0x15, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x17, 1, 0x0, HDA_OUTPUT),
-@@ -4168,9 +4280,16 @@ static int patch_ad1882(struct hda_codec
+ { } /* end */
+ };
+
+@@ -4168,9 +4280,16 @@
spec->num_adc_nids = ARRAY_SIZE(ad1882_adc_nids);
spec->adc_nids = ad1882_adc_nids;
spec->capsrc_nids = ad1882_capsrc_nids;
spec->num_init_verbs = 1;
spec->init_verbs[0] = ad1882_init_verbs;
spec->spdif_route = 0;
-@@ -4187,8 +4306,8 @@ static int patch_ad1882(struct hda_codec
+@@ -4187,8 +4306,8 @@
switch (board_config) {
default:
case AD1882_3STACK:
spec->channel_mode = ad1882_modes;
spec->num_channel_mode = ARRAY_SIZE(ad1882_modes);
spec->need_dac_fix = 1;
-@@ -4196,8 +4315,8 @@ static int patch_ad1882(struct hda_codec
+@@ -4196,8 +4315,8 @@
spec->multiout.num_dacs = 1;
break;
case AD1882_6STACK:
break;
}
return 0;
-@@ -4220,6 +4339,7 @@ struct hda_codec_preset snd_hda_preset_a
+@@ -4220,6 +4339,7 @@
{ .id = 0x11d41986, .name = "AD1986A", .patch = patch_ad1986a },
{ .id = 0x11d41988, .name = "AD1988", .patch = patch_ad1988 },
{ .id = 0x11d4198b, .name = "AD1988B", .patch = patch_ad1988 },
{ .id = 0x11d4989a, .name = "AD1989A", .patch = patch_ad1988 },
{ .id = 0x11d4989b, .name = "AD1989B", .patch = patch_ad1988 },
{} /* terminator */
-diff -purN linux-2.6.27/sound/pci/hda/patch_atihdmi.c linux-2.6.27.19-5.1/sound/pci/hda/patch_atihdmi.c
---- linux-2.6.27/sound/pci/hda/patch_atihdmi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/patch_atihdmi.c 2009-03-25 16:10:56.000000000 +0000
-@@ -35,6 +35,9 @@ struct atihdmi_spec {
+diff -r 9608d5473017 sound/pci/hda/patch_atihdmi.c
+--- a/sound/pci/hda/patch_atihdmi.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/patch_atihdmi.c Wed May 06 16:57:08 2009 +0100
+@@ -35,6 +35,9 @@
struct hda_pcm pcm_rec;
};
static struct hda_verb atihdmi_basic_init[] = {
/* enable digital output on pin widget */
{ 0x03, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
-@@ -60,8 +63,9 @@ static int atihdmi_init(struct hda_codec
+@@ -60,8 +63,9 @@
{
snd_hda_sequence_write(codec, atihdmi_basic_init);
/* SI codec requires to unmute the pin */
AMP_OUT_UNMUTE);
return 0;
}
-@@ -92,15 +96,29 @@ static int atihdmi_dig_playback_pcm_prep
+@@ -92,15 +96,29 @@
struct snd_pcm_substream *substream)
{
struct atihdmi_spec *spec = codec->spec;
.ops = {
.open = atihdmi_dig_playback_pcm_open,
.close = atihdmi_dig_playback_pcm_close,
-@@ -112,6 +130,7 @@ static int atihdmi_build_pcms(struct hda
+@@ -112,6 +130,7 @@
{
struct atihdmi_spec *spec = codec->spec;
struct hda_pcm *info = &spec->pcm_rec;
codec->num_pcms = 1;
codec->pcm_info = info;
-@@ -120,6 +139,13 @@ static int atihdmi_build_pcms(struct hda
+@@ -119,6 +138,13 @@
+ info->name = "ATI HDMI";
info->pcm_type = HDA_PCM_TYPE_HDMI;
info->stream[SNDRV_PCM_STREAM_PLAYBACK] = atihdmi_pcm_digital_playback;
-
++
+ /* FIXME: we must check ELD and change the PCM parameters dynamically
+ */
+ chans = get_wcaps(codec, CVT_NID);
+ chans = (chans & AC_WCAP_CHAN_CNT_EXT) >> 13;
+ chans = ((chans << 1) | 1) + 1;
+ info->stream[SNDRV_PCM_STREAM_PLAYBACK].channels_max = chans;
-+
+
return 0;
}
-
-@@ -147,9 +173,11 @@ static int patch_atihdmi(struct hda_code
+@@ -147,9 +173,11 @@
spec->multiout.num_dacs = 0; /* no analog */
spec->multiout.max_channels = 2;
codec->patch_ops = atihdmi_patch_ops;
-@@ -164,6 +192,7 @@ struct hda_codec_preset snd_hda_preset_a
+@@ -164,6 +192,7 @@
{ .id = 0x10027919, .name = "ATI RS600 HDMI", .patch = patch_atihdmi },
{ .id = 0x1002791a, .name = "ATI RS690/780 HDMI", .patch = patch_atihdmi },
{ .id = 0x1002aa01, .name = "ATI R6xx HDMI", .patch = patch_atihdmi },
{ .id = 0x10951392, .name = "SiI1392 HDMI", .patch = patch_atihdmi },
{ .id = 0x17e80047, .name = "Chrontel HDMI", .patch = patch_atihdmi },
{} /* terminator */
-diff -purN linux-2.6.27/sound/pci/hda/patch_conexant.c linux-2.6.27.19-5.1/sound/pci/hda/patch_conexant.c
---- linux-2.6.27/sound/pci/hda/patch_conexant.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/patch_conexant.c 2009-03-25 16:10:56.000000000 +0000
-@@ -1470,6 +1470,7 @@ static struct snd_pci_quirk cxt5047_cfg_
+diff -r 9608d5473017 sound/pci/hda/patch_conexant.c
+--- a/sound/pci/hda/patch_conexant.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/patch_conexant.c Wed May 06 16:57:08 2009 +0100
+@@ -1470,6 +1470,7 @@
SND_PCI_QUIRK(0x103c, 0x30a5, "HP DV5200T/DV8000T", CXT5047_LAPTOP_HP),
SND_PCI_QUIRK(0x103c, 0x30b2, "HP DV2000T/DV3000T", CXT5047_LAPTOP),
SND_PCI_QUIRK(0x103c, 0x30b5, "HP DV2000Z", CXT5047_LAPTOP),
SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba P100", CXT5047_LAPTOP_EAPD),
{}
};
-diff -purN linux-2.6.27/sound/pci/hda/patch_nvhdmi.c linux-2.6.27.19-5.1/sound/pci/hda/patch_nvhdmi.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/patch_nvhdmi.c 2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/hda/patch_nvhdmi.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/sound/pci/hda/patch_nvhdmi.c Wed May 06 16:57:08 2009 +0100
@@ -0,0 +1,165 @@
+/*
+ * Universal Interface for Intel High Definition Audio Codec
+ { .id = 0x10de0007, .name = "NVIDIA MCP7A HDMI", .patch = patch_nvhdmi },
+ {} /* terminator */
+};
-diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/pci/hda/patch_realtek.c
---- linux-2.6.27/sound/pci/hda/patch_realtek.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/patch_realtek.c 2009-03-25 16:10:56.000000000 +0000
-@@ -72,6 +72,7 @@ enum {
+diff -r 9608d5473017 sound/pci/hda/patch_realtek.c
+--- a/sound/pci/hda/patch_realtek.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/patch_realtek.c Wed May 06 16:57:08 2009 +0100
+@@ -72,6 +72,7 @@
enum {
ALC260_BASIC,
ALC260_HP,
ALC260_HP_3013,
ALC260_FUJITSU_S702X,
ALC260_ACER,
-@@ -100,6 +101,9 @@ enum {
+@@ -100,6 +101,9 @@
ALC262_BENQ_T31,
ALC262_ULTRA,
ALC262_LENOVO_3000,
ALC262_AUTO,
ALC262_MODEL_LAST /* last tag */
};
-@@ -110,6 +114,8 @@ enum {
+@@ -110,6 +114,8 @@
ALC268_3ST,
ALC268_TOSHIBA,
ALC268_ACER,
ALC268_DELL,
ALC268_ZEPTO,
#ifdef CONFIG_SND_DEBUG
-@@ -122,8 +128,10 @@ enum {
+@@ -122,8 +128,10 @@
/* ALC269 models */
enum {
ALC269_BASIC,
ALC269_AUTO,
ALC269_MODEL_LAST /* last tag */
};
-@@ -169,6 +177,13 @@ enum {
+@@ -169,6 +177,13 @@
ALC663_ASUS_G71V,
ALC663_ASUS_H13,
ALC663_ASUS_G50V,
ALC662_AUTO,
ALC662_MODEL_LAST,
};
-@@ -200,18 +215,21 @@ enum {
+@@ -200,18 +215,21 @@
ALC883_ACER,
ALC883_ACER_ASPIRE,
ALC883_MEDION,
ALC883_AUTO,
ALC883_MODEL_LAST,
};
-@@ -291,6 +309,13 @@ struct alc_spec {
+@@ -291,6 +309,13 @@
/* for PLL fix */
hda_nid_t pll_nid;
unsigned int pll_coef_idx, pll_coef_bit;
};
/*
-@@ -398,7 +423,7 @@ static int alc_ch_mode_put(struct snd_kc
+@@ -398,7 +423,7 @@
/*
* Control the mode of pin widget settings via the mixer. "pc" is used
* being part of a format specifier. Maximum allowed length of a value is
* 63 characters plus NULL terminator.
*
-@@ -429,7 +454,7 @@ static unsigned char alc_pin_mode_values
+@@ -429,7 +454,7 @@
#define ALC_PIN_DIR_IN_NOMICBIAS 0x03
#define ALC_PIN_DIR_INOUT_NOMICBIAS 0x04
* For each direction the minimum and maximum values are given.
*/
static signed char alc_pin_mode_dir_info[5][2] = {
-@@ -502,7 +527,7 @@ static int alc_pin_mode_put(struct snd_k
+@@ -502,7 +527,7 @@
AC_VERB_SET_PIN_WIDGET_CONTROL,
alc_pin_mode_values[val]);
* for the requested pin mode. Enum values of 2 or less are
* input modes.
*
-@@ -707,7 +732,7 @@ static void setup_preset(struct alc_spec
+@@ -707,7 +732,7 @@
i++)
spec->init_verbs[spec->num_init_verbs++] =
preset->init_verbs[i];
spec->channel_mode = preset->channel_mode;
spec->num_channel_mode = preset->num_channel_mode;
spec->need_dac_fix = preset->need_dac_fix;
-@@ -718,7 +743,7 @@ static void setup_preset(struct alc_spec
+@@ -718,7 +743,7 @@
spec->multiout.dac_nids = preset->dac_nids;
spec->multiout.dig_out_nid = preset->dig_out_nid;
spec->multiout.hp_nid = preset->hp_nid;
spec->num_mux_defs = preset->num_mux_defs;
if (!spec->num_mux_defs)
spec->num_mux_defs = 1;
-@@ -806,6 +831,31 @@ static void alc_sku_automute(struct hda_
+@@ -806,6 +831,31 @@
spec->jack_present ? 0 : PIN_OUT);
}
/* unsolicited event for HP jack sensing */
static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res)
{
-@@ -813,10 +863,17 @@ static void alc_sku_unsol_event(struct h
+@@ -813,10 +863,17 @@
res >>= 28;
else
res >>= 26;
- if (res != ALC880_HP_EVENT)
- return;
+-
+ if (res == ALC880_HP_EVENT)
+ alc_sku_automute(codec);
+
+ if (res == ALC880_MIC_EVENT)
+ alc_mic_automute(codec);
+}
-
++
+static void alc_inithook(struct hda_codec *codec)
+{
alc_sku_automute(codec);
}
/* additional initialization for ALC888 variants */
-@@ -855,7 +912,7 @@ static void alc_subsystem_id(struct hda_
+@@ -855,7 +912,7 @@
if ((ass != codec->bus->pci->subsystem_device) && (ass & 1))
goto do_sku;
* 31~30 : port conetcivity
* 29~21 : reserve
* 20 : PCBEEP input
-@@ -912,6 +969,7 @@ do_sku:
+@@ -912,6 +969,7 @@
case 0x10ec0267:
case 0x10ec0268:
case 0x10ec0269:
case 0x10ec0660:
case 0x10ec0662:
case 0x10ec0663:
-@@ -940,13 +998,14 @@ do_sku:
+@@ -940,13 +998,14 @@
case 0x10ec0882:
case 0x10ec0883:
case 0x10ec0885:
snd_hda_codec_write(codec, 0x20, 0,
AC_VERB_SET_PROC_COEF,
tmp | 0x2010);
-@@ -961,7 +1020,7 @@ do_sku:
+@@ -961,7 +1020,7 @@
tmp = snd_hda_codec_read(codec, 0x20, 0,
AC_VERB_GET_PROC_COEF, 0);
snd_hda_codec_write(codec, 0x20, 0,
snd_hda_codec_write(codec, 0x20, 0,
AC_VERB_SET_PROC_COEF,
tmp | 0x3000);
-@@ -970,7 +1029,7 @@ do_sku:
+@@ -970,7 +1029,7 @@
default:
break;
}
/* is laptop or Desktop and enable the function "Mute internal speaker
* when the external headphone out jack is plugged"
*/
-@@ -1002,10 +1061,20 @@ do_sku:
+@@ -1002,10 +1061,20 @@
else
return;
}
+-
+- snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0,
+- AC_VERB_SET_UNSOLICITED_ENABLE,
+- AC_USRSP_EN | ALC880_HP_EVENT);
+ if (spec->autocfg.hp_pins[0])
+ snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0,
+ AC_VERB_SET_UNSOLICITED_ENABLE,
+ AC_VERB_SET_UNSOLICITED_ENABLE,
+ AC_USRSP_EN | ALC880_MIC_EVENT);
+#endif /* disabled */
-
-- snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0,
-- AC_VERB_SET_UNSOLICITED_ENABLE,
-- AC_USRSP_EN | ALC880_HP_EVENT);
++
spec->unsol_event = alc_sku_unsol_event;
}
-@@ -1296,7 +1365,7 @@ static struct snd_kcontrol_new alc880_si
+@@ -1296,7 +1365,7 @@
*
* The system also has a pair of internal speakers, and a headphone jack.
* These are both connected to Line2 on the codec, hence to DAC 02.
* There is a variable resistor to control the speaker or headphone
* volume. This is a hardware-only device without a software API.
*
-@@ -1554,6 +1623,7 @@ static const char *alc_slave_vols[] = {
+@@ -1554,6 +1623,7 @@
"Speaker Playback Volume",
"Mono Playback Volume",
"Line-Out Playback Volume",
NULL,
};
-@@ -1824,7 +1894,7 @@ static struct hda_verb alc880_pin_6stack
+@@ -1824,7 +1894,7 @@
{0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
{0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
{0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
{ }
};
-@@ -1869,7 +1939,7 @@ static struct hda_verb alc880_uniwill_in
+@@ -1869,7 +1939,7 @@
/*
* Uniwill P53
*/
static struct hda_verb alc880_uniwill_p53_init_verbs[] = {
{0x13, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
-@@ -1968,7 +2038,7 @@ static void alc880_uniwill_p53_hp_automu
+@@ -1968,7 +2038,7 @@
static void alc880_uniwill_p53_dcvol_automute(struct hda_codec *codec)
{
unsigned int present;
present = snd_hda_codec_read(codec, 0x21, 0,
AC_VERB_GET_VOLUME_KNOB_CONTROL, 0);
present &= HDA_AMP_VOLMASK;
-@@ -2050,7 +2120,7 @@ static struct hda_verb alc880_pin_asus_i
+@@ -2050,7 +2120,7 @@
{0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
{0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
{ }
};
-@@ -2667,6 +2737,8 @@ static int alc_build_pcms(struct hda_cod
+@@ -2667,6 +2737,8 @@
info->stream[SNDRV_PCM_STREAM_CAPTURE] = *(spec->stream_digital_capture);
info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->dig_in_nid;
}
}
/* If the use of more than one ADC is requested for the current
-@@ -2722,6 +2794,64 @@ static void alc_free(struct hda_codec *c
+@@ -2722,6 +2794,64 @@
codec->spec = NULL; /* to be sure */
}
/*
*/
static struct hda_codec_ops alc_patch_ops = {
-@@ -2730,6 +2860,9 @@ static struct hda_codec_ops alc_patch_op
+@@ -2730,6 +2860,9 @@
.init = alc_init,
.free = alc_free,
.unsol_event = alc_unsol_event,
#ifdef CONFIG_SND_HDA_POWER_SAVE
.check_power_status = alc_check_power_status,
#endif
-@@ -3683,7 +3816,7 @@ static void alc880_auto_init_multi_out(s
+@@ -3683,7 +3816,7 @@
{
struct alc_spec *spec = codec->spec;
int i;
alc_subsystem_id(codec, 0x15, 0x1b, 0x14);
for (i = 0; i < spec->autocfg.line_outs; i++) {
hda_nid_t nid = spec->autocfg.line_out_pins[i];
-@@ -3776,6 +3909,7 @@ static int alc880_parse_auto_config(stru
+@@ -3776,6 +3909,7 @@
spec->num_mux_defs = 1;
spec->input_mux = &spec->private_imux;
return 1;
}
-@@ -3787,7 +3921,7 @@ static void alc880_auto_init(struct hda_
+@@ -3787,7 +3921,7 @@
alc880_auto_init_extra_out(codec);
alc880_auto_init_analog_input(codec);
if (spec->unsol_event)
}
/*
-@@ -4026,13 +4160,13 @@ static void alc260_hp_master_update(stru
+@@ -4026,13 +4160,13 @@
struct alc_spec *spec = codec->spec;
unsigned int val = spec->master_sw ? PIN_HP : 0;
/* change HP and line-out pins */
val);
}
-@@ -4111,7 +4245,7 @@ static struct snd_kcontrol_new alc260_hp
+@@ -4111,7 +4245,7 @@
.info = snd_ctl_boolean_mono_info,
.get = alc260_hp_master_sw_get,
.put = alc260_hp_master_sw_put,
},
HDA_CODEC_VOLUME("Front Playback Volume", 0x09, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE("Front Playback Switch", 0x10, 0x0, HDA_OUTPUT),
-@@ -4124,6 +4258,33 @@ static struct snd_kcontrol_new alc260_hp
+@@ -4124,6 +4258,33 @@
{ } /* end */
};
static struct hda_verb alc260_hp_3013_unsol_verbs[] = {
{0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
{},
-@@ -4137,7 +4298,7 @@ static void alc260_hp_3013_automute(stru
+@@ -4137,7 +4298,7 @@
present = snd_hda_codec_read(codec, 0x15, 0,
AC_VERB_GET_PIN_SENSE, 0);
spec->jack_present = (present & AC_PINSENSE_PRESENCE) != 0;
}
static void alc260_hp_3013_unsol_event(struct hda_codec *codec,
-@@ -4147,7 +4308,30 @@ static void alc260_hp_3013_unsol_event(s
+@@ -4147,7 +4308,30 @@
alc260_hp_3013_automute(codec);
}
* HP jack = 0x14, CD audio = 0x16, internal speaker = 0x10.
*/
static struct snd_kcontrol_new alc260_fujitsu_mixer[] = {
-@@ -4478,7 +4662,7 @@ static struct hda_verb alc260_fujitsu_in
+@@ -4478,7 +4662,7 @@
{0x03, AC_VERB_SET_DIGI_CONVERT_1, 0},
{0x06, AC_VERB_SET_DIGI_CONVERT_1, 0},
* when acting as an output.
*/
{0x0d, AC_VERB_SET_CONNECT_SEL, 0},
-@@ -4503,14 +4687,14 @@ static struct hda_verb alc260_fujitsu_in
+@@ -4503,14 +4687,14 @@
* stage.
*/
{0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
* in (on mic1 pin)
*/
{0x04, AC_VERB_SET_CONNECT_SEL, 0x00},
-@@ -4564,7 +4748,7 @@ static struct hda_verb alc260_acer_init_
+@@ -4564,7 +4748,7 @@
{0x03, AC_VERB_SET_DIGI_CONVERT_1, 0},
{0x06, AC_VERB_SET_DIGI_CONVERT_1, 0},
* bus when acting as outputs.
*/
{0x0b, AC_VERB_SET_CONNECT_SEL, 0},
-@@ -4675,6 +4859,20 @@ static void alc260_replacer_672v_unsol_e
+@@ -4675,6 +4859,20 @@
alc260_replacer_672v_automute(codec);
}
/* Test configuration for debugging, modelled after the ALC880 test
* configuration.
*/
-@@ -4686,7 +4884,7 @@ static hda_nid_t alc260_test_adc_nids[2]
+@@ -4686,7 +4884,7 @@
0x04, 0x05,
};
/* For testing the ALC260, each input MUX needs its own definition since
* is NID 0x04.
*/
static struct hda_input_mux alc260_test_capture_sources[2] = {
-@@ -4769,7 +4967,7 @@ static struct snd_kcontrol_new alc260_te
+@@ -4769,7 +4967,7 @@
/* Switches to allow the digital IO pins to be enabled. The datasheet
* is ambigious as to which NID is which; testing on laptops which
*/
ALC_SPDIF_CTRL_SWITCH("SPDIF Playback Switch", 0x03, 0x01),
ALC_SPDIF_CTRL_SWITCH("SPDIF Capture Switch", 0x06, 0x01),
-@@ -4805,7 +5003,7 @@ static struct hda_verb alc260_test_init_
+@@ -4805,7 +5003,7 @@
{0x03, AC_VERB_SET_DIGI_CONVERT_1, 0},
{0x06, AC_VERB_SET_DIGI_CONVERT_1, 0},
* OUT1 sum bus when acting as an output.
*/
{0x0b, AC_VERB_SET_CONNECT_SEL, 0},
-@@ -4876,7 +5074,7 @@ static struct hda_verb alc260_test_init_
+@@ -4876,7 +5074,7 @@
*/
static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid,
{
hda_nid_t nid_vol;
unsigned long vol_val, sw_val;
-@@ -4897,11 +5095,15 @@ static int alc260_add_playback_controls(
+@@ -4897,11 +5095,15 @@
sw_val = HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_OUTPUT);
} else
return 0; /* N/A */
snprintf(name, sizeof(name), "%s Playback Switch", pfx);
err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, sw_val);
if (err < 0)
-@@ -4915,6 +5117,7 @@ static int alc260_auto_create_multi_out_
+@@ -4915,6 +5117,7 @@
{
hda_nid_t nid;
int err;
spec->multiout.num_dacs = 1;
spec->multiout.dac_nids = spec->private_dac_nids;
-@@ -4922,21 +5125,22 @@ static int alc260_auto_create_multi_out_
+@@ -4922,21 +5125,22 @@
nid = cfg->line_out_pins[0];
if (nid) {
if (err < 0)
return err;
}
-@@ -5003,7 +5207,7 @@ static void alc260_auto_init_multi_out(s
+@@ -5003,7 +5207,7 @@
int pin_type = get_pin_type(spec->autocfg.line_out_type);
alc260_auto_set_output_and_unmute(codec, nid, pin_type, 0);
}
nid = spec->autocfg.speaker_pins[0];
if (nid)
alc260_auto_set_output_and_unmute(codec, nid, PIN_OUT, 0);
-@@ -5045,7 +5249,7 @@ static struct hda_verb alc260_volume_ini
+@@ -5045,7 +5249,7 @@
{0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{0x05, AC_VERB_SET_CONNECT_SEL, 0x00},
{0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
/* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
* mixer widget
* Note: PASD motherboards uses the Line In 2 as the input for
-@@ -5074,7 +5278,7 @@ static struct hda_verb alc260_volume_ini
+@@ -5074,7 +5278,7 @@
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
{0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
{ }
};
-@@ -5124,6 +5328,7 @@ static int alc260_parse_auto_config(stru
+@@ -5124,6 +5328,7 @@
}
spec->num_mixers++;
return 1;
}
-@@ -5134,7 +5339,7 @@ static void alc260_auto_init(struct hda_
+@@ -5134,7 +5339,7 @@
alc260_auto_init_multi_out(codec);
alc260_auto_init_analog_input(codec);
if (spec->unsol_event)
}
#ifdef CONFIG_SND_HDA_POWER_SAVE
-@@ -5155,6 +5360,7 @@ static const char *alc260_models[ALC260_
+@@ -5155,6 +5360,7 @@
[ALC260_BASIC] = "basic",
[ALC260_HP] = "hp",
[ALC260_HP_3013] = "hp-3013",
[ALC260_FUJITSU_S702X] = "fujitsu",
[ALC260_ACER] = "acer",
[ALC260_WILL] = "will",
-@@ -5172,7 +5378,7 @@ static struct snd_pci_quirk alc260_cfg_t
+@@ -5172,7 +5378,7 @@
SND_PCI_QUIRK(0x103c, 0x280a, "HP d5750", ALC260_HP_3013),
SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013),
SND_PCI_QUIRK(0x103c, 0x3011, "HP", ALC260_HP_3013),
SND_PCI_QUIRK(0x103c, 0x3013, "HP", ALC260_HP_3013),
SND_PCI_QUIRK(0x103c, 0x3014, "HP", ALC260_HP),
SND_PCI_QUIRK(0x103c, 0x3015, "HP", ALC260_HP),
-@@ -5218,6 +5424,22 @@ static struct alc_config_preset alc260_p
+@@ -5217,6 +5423,22 @@
+ .input_mux = &alc260_capture_source,
.unsol_event = alc260_hp_unsol_event,
.init_hook = alc260_hp_automute,
- },
++ },
+ [ALC260_HP_DC7600] = {
+ .mixers = { alc260_hp_dc7600_mixer,
+ alc260_input_mixer,
+ .input_mux = &alc260_capture_source,
+ .unsol_event = alc260_hp_3012_unsol_event,
+ .init_hook = alc260_hp_3012_automute,
-+ },
+ },
[ALC260_HP_3013] = {
.mixers = { alc260_hp_3013_mixer,
- alc260_input_mixer,
-@@ -5933,7 +6155,7 @@ static struct hda_verb alc882_targa_verb
+@@ -5933,7 +6155,7 @@
{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
{0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{0x18, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */
{0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, /* line/surround */
{0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
-@@ -5949,7 +6171,7 @@ static struct hda_verb alc882_targa_verb
+@@ -5949,7 +6171,7 @@
static void alc882_targa_automute(struct hda_codec *codec)
{
unsigned int present;
present = snd_hda_codec_read(codec, 0x14, 0,
AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0,
-@@ -5975,7 +6197,7 @@ static struct hda_verb alc882_asus_a7j_v
+@@ -5975,7 +6197,7 @@
{0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front */
{0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
{0x16, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front */
-@@ -5993,7 +6215,7 @@ static struct hda_verb alc882_asus_a7m_v
+@@ -5993,7 +6215,7 @@
{0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front */
{0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
{0x16, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front */
-@@ -6319,7 +6541,7 @@ static struct alc_config_preset alc882_p
+@@ -6319,7 +6541,7 @@
.channel_mode = alc882_3ST_6ch_modes,
.need_dac_fix = 1,
.input_mux = &alc882_capture_source,
[ALC882_ASUS_A7M] = {
.mixers = { alc882_asus_a7m_mixer, alc882_chmode_mixer },
.init_verbs = { alc882_init_verbs, alc882_eapd_verbs,
-@@ -6332,14 +6554,14 @@ static struct alc_config_preset alc882_p
+@@ -6332,14 +6554,14 @@
.channel_mode = alc880_threestack_modes,
.need_dac_fix = 1,
.input_mux = &alc882_capture_source,
PINFIX_ABIT_AW9D_MAX
};
-@@ -6527,7 +6749,7 @@ static void alc882_auto_init(struct hda_
+@@ -6527,7 +6749,7 @@
alc882_auto_init_analog_input(codec);
alc882_auto_init_input_src(codec);
if (spec->unsol_event)
}
static int patch_alc883(struct hda_codec *codec); /* called in patch_alc882() */
-@@ -6554,16 +6776,20 @@ static int patch_alc882(struct hda_codec
+@@ -6554,16 +6776,20 @@
board_config = ALC885_MACPRO;
break;
case 0x106b1000: /* iMac 24 */
alc_free(codec);
return patch_alc883(codec);
}
-@@ -6718,6 +6944,23 @@ static struct hda_input_mux alc883_fujit
+@@ -6718,6 +6944,23 @@
},
};
#define alc883_mux_enum_info alc_mux_enum_info
#define alc883_mux_enum_get alc_mux_enum_get
/* ALC883 has the ALC882-type input selection */
-@@ -7032,13 +7275,11 @@ static struct snd_kcontrol_new alc883_3S
+@@ -7032,13 +7275,11 @@
HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
- HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
- HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
- {
- .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
- /* .name = "Capture Source", */
- .name = "Input Source",
+- {
+- .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+- /* .name = "Capture Source", */
+- .name = "Input Source",
- .count = 2,
++ {
++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
++ /* .name = "Capture Source", */
++ .name = "Input Source",
+ .count = 1,
.info = alc883_mux_enum_info,
.get = alc883_mux_enum_get,
.put = alc883_mux_enum_put,
-@@ -7256,7 +7497,7 @@ static struct snd_kcontrol_new alc883_me
+@@ -7256,7 +7497,7 @@
.put = alc883_mux_enum_put,
},
{ } /* end */
static struct snd_kcontrol_new alc883_acer_aspire_mixer[] = {
HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
-@@ -7283,6 +7524,87 @@ static struct snd_kcontrol_new alc883_ac
- { } /* end */
- };
-
+@@ -7276,6 +7517,87 @@
+ /* .name = "Capture Source", */
+ .name = "Input Source",
+ .count = 2,
++ .info = alc883_mux_enum_info,
++ .get = alc883_mux_enum_get,
++ .put = alc883_mux_enum_put,
++ },
++ { } /* end */
++};
++
+static struct snd_kcontrol_new alc888_lenovo_sky_mixer[] = {
+ HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
+ HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
+ /* .name = "Capture Source", */
+ .name = "Input Source",
+ .count = 1,
-+ .info = alc883_mux_enum_info,
-+ .get = alc883_mux_enum_get,
-+ .put = alc883_mux_enum_put,
-+ },
-+ { } /* end */
-+};
-+
- static struct snd_kcontrol_new alc883_chmode_mixer[] = {
- {
- .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-@@ -7296,7 +7618,7 @@ static struct snd_kcontrol_new alc883_ch
+ .info = alc883_mux_enum_info,
+ .get = alc883_mux_enum_get,
+ .put = alc883_mux_enum_put,
+@@ -7296,7 +7618,7 @@
static struct hda_verb alc883_init_verbs[] = {
/* ADC1: mute amp left and right */
{0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
/* ADC2: mute amp left and right */
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
-@@ -7361,14 +7683,14 @@ static struct hda_verb alc883_init_verbs
+@@ -7361,14 +7683,14 @@
/* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */
/* Input mixer2 */
{0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{ }
};
-@@ -7468,7 +7790,7 @@ static struct hda_verb alc883_tagra_verb
+@@ -7468,7 +7790,7 @@
{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
{0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{0x18, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */
{0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, /* line/surround */
{0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
-@@ -7518,6 +7840,18 @@ static struct hda_verb alc883_haier_w66_
- { } /* end */
- };
-
+@@ -7515,6 +7837,18 @@
+ {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
+ {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
+ {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
++ { } /* end */
++};
++
+static struct hda_verb alc888_lenovo_sky_verbs[] = {
+ {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+ {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+ {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+ {0x1a, AC_VERB_SET_CONNECT_SEL, 0x00},
+ {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
-+ { } /* end */
-+};
-+
- static struct hda_verb alc888_3st_hp_verbs[] = {
- {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front: output 0 (0x0c) */
- {0x16, AC_VERB_SET_CONNECT_SEL, 0x01}, /* Rear : output 1 (0x0d) */
-@@ -7555,7 +7889,7 @@ static struct hda_channel_mode alc888_3s
+ { } /* end */
+ };
+
+@@ -7555,7 +7889,7 @@
static void alc888_lenovo_ms7195_front_automute(struct hda_codec *codec)
{
unsigned int present;
present = snd_hda_codec_read(codec, 0x1b, 0,
AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
-@@ -7568,7 +7902,7 @@ static void alc888_lenovo_ms7195_front_a
+@@ -7568,7 +7902,7 @@
static void alc888_lenovo_ms7195_rca_automute(struct hda_codec *codec)
{
unsigned int present;
present = snd_hda_codec_read(codec, 0x14, 0,
AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0,
-@@ -7598,7 +7932,7 @@ static struct hda_verb alc883_medion_md2
+@@ -7598,7 +7932,7 @@
static void alc883_medion_md2_automute(struct hda_codec *codec)
{
unsigned int present;
present = snd_hda_codec_read(codec, 0x14, 0,
AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0,
-@@ -7753,7 +8087,7 @@ static void alc883_lenovo_101e_unsol_eve
+@@ -7753,7 +8087,7 @@
static void alc883_acer_aspire_automute(struct hda_codec *codec)
{
unsigned int present;
present = snd_hda_codec_read(codec, 0x14, 0,
AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0,
-@@ -7790,7 +8124,7 @@ static struct hda_verb alc883_acer_eapd_
+@@ -7790,7 +8124,7 @@
static void alc888_6st_dell_front_automute(struct hda_codec *codec)
{
unsigned int present;
present = snd_hda_codec_read(codec, 0x1b, 0,
AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
-@@ -7814,31 +8148,75 @@ static void alc888_6st_dell_unsol_event(
+@@ -7812,6 +8146,50 @@
+ alc888_6st_dell_front_automute(codec);
+ break;
}
- }
-
--/*
-- * generic initialization of ADC, input mixers and output mixers
-- */
--static struct hda_verb alc883_auto_init_verbs[] = {
-- /*
-- * Unmute ADC0-2 and set the default input to mic-in
-- */
-- {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
-- {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
-- {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
-- {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
--
-- /* Mute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
-- * mixer widget
-- * Note: PASD motherboards uses the Line In 2 as the input for
-- * front panel mic (mic 2)
-- */
-- /* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
-- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
-- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
-- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
-- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
-- {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
++}
++
+static void alc888_lenovo_sky_front_automute(struct hda_codec *codec)
+{
+ unsigned int mute;
+ unsigned int present;
-
-- /*
++
+ snd_hda_codec_read(codec, 0x1b, 0, AC_VERB_SET_PIN_SENSE, 0);
+ present = snd_hda_codec_read(codec, 0x1b, 0,
+ AC_VERB_GET_PIN_SENSE, 0);
+{
+ if ((res >> 26) == ALC880_HP_EVENT)
+ alc888_lenovo_sky_front_automute(codec);
-+}
-+
-+/*
-+ * generic initialization of ADC, input mixers and output mixers
-+ */
-+static struct hda_verb alc883_auto_init_verbs[] = {
-+ /*
-+ * Unmute ADC0-2 and set the default input to mic-in
-+ */
-+ {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
-+ {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
-+ {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
-+ {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
-+
-+ /* Mute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
-+ * mixer widget
-+ * Note: PASD motherboards uses the Line In 2 as the input for
-+ * front panel mic (mic 2)
-+ */
-+ /* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
-+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
-+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
-+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
-+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
-+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
-+
-+ /*
- * Set up output mixers (0x0c - 0x0f)
- */
- /* set vol=0 to output mixers */
-@@ -7898,6 +8276,105 @@ static struct snd_kcontrol_new alc883_ca
+ }
+
+ /*
+@@ -7897,6 +8275,105 @@
+ },
{ } /* end */
};
-
++
+static struct hda_verb alc888_asus_m90v_verbs[] = {
+ {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
+ {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
+{
+ alc883_eee1601_speaker_automute(codec);
+}
-+
+
#ifdef CONFIG_SND_HDA_POWER_SAVE
#define alc883_loopbacks alc880_loopbacks
- #endif
-@@ -7927,6 +8404,7 @@ static const char *alc883_models[ALC883_
+@@ -7927,6 +8404,7 @@
[ALC883_LENOVO_101E_2ch] = "lenovo-101e",
[ALC883_LENOVO_NB0763] = "lenovo-nb0763",
[ALC888_LENOVO_MS7195_DIG] = "lenovo-ms7195-dig",
[ALC883_HAIER_W66] = "haier-w66",
[ALC888_3ST_HP] = "3stack-hp",
[ALC888_6ST_DELL] = "6stack-dell",
-@@ -7940,20 +8418,24 @@ static const char *alc883_models[ALC883_
+@@ -7940,20 +8418,24 @@
static struct snd_pci_quirk alc883_cfg_tbl[] = {
SND_PCI_QUIRK(0x1019, 0x6668, "ECS", ALC883_3ST_6ch_DIG),
SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_ACER_ASPIRE),
SND_PCI_QUIRK(0x108e, 0x534d, NULL, ALC883_3ST_6ch),
SND_PCI_QUIRK(0x1458, 0xa002, "MSI", ALC883_6ST_DIG),
SND_PCI_QUIRK(0x1462, 0x0349, "MSI", ALC883_TARGA_2ch_DIG),
-@@ -7984,12 +8466,16 @@ static struct snd_pci_quirk alc883_cfg_t
+@@ -7984,12 +8466,16 @@
SND_PCI_QUIRK(0x1558, 0, "Clevo laptop", ALC883_LAPTOP_EAPD),
SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch),
SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION),
SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG),
SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66),
SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL),
-@@ -8128,7 +8614,7 @@ static struct alc_config_preset alc883_p
+@@ -8128,7 +8614,7 @@
.input_mux = &alc883_capture_source,
.unsol_event = alc883_medion_md2_unsol_event,
.init_hook = alc883_medion_md2_automute,
[ALC883_LAPTOP_EAPD] = {
.mixers = { alc883_base_mixer },
.init_verbs = { alc883_init_verbs, alc882_eapd_verbs },
-@@ -8245,6 +8731,49 @@ static struct alc_config_preset alc883_p
+@@ -8244,6 +8730,49 @@
+ .input_mux = &alc883_fujitsu_pi2515_capture_source,
.unsol_event = alc883_2ch_fujitsu_pi2515_unsol_event,
.init_hook = alc883_2ch_fujitsu_pi2515_automute,
- },
++ },
+ [ALC888_LENOVO_SKY] = {
+ .mixers = { alc888_lenovo_sky_mixer, alc883_chmode_mixer },
+ .init_verbs = { alc883_init_verbs, alc888_lenovo_sky_verbs},
+ .input_mux = &alc883_asus_eee1601_capture_source,
+ .unsol_event = alc883_eee1601_unsol_event,
+ .init_hook = alc883_eee1601_inithook,
-+ },
+ },
};
-
-@@ -8354,7 +8883,7 @@ static void alc883_auto_init(struct hda_
+@@ -8354,7 +8883,7 @@
alc883_auto_init_analog_input(codec);
alc883_auto_init_input_src(codec);
if (spec->unsol_event)
}
static int patch_alc883(struct hda_codec *codec)
-@@ -8398,8 +8927,13 @@ static int patch_alc883(struct hda_codec
+@@ -8398,8 +8927,13 @@
switch (codec->vendor_id) {
case 0x10ec0888:
break;
case 0x10ec0889:
spec->stream_name_analog = "ALC889 Analog";
-@@ -8452,6 +8986,13 @@ static int patch_alc883(struct hda_codec
+@@ -8451,6 +8985,13 @@
+
#define alc262_modes alc260_modes
#define alc262_capture_source alc882_capture_source
-
++
+static hda_nid_t alc262_dmic_adc_nids[1] = {
+ /* ADC0 */
+ 0x09
+};
+
+static hda_nid_t alc262_dmic_capsrc_nids[1] = { 0x22 };
-+
+
static struct snd_kcontrol_new alc262_base_mixer[] = {
HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
- HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT),
-@@ -8833,10 +9374,10 @@ static struct hda_verb alc262_init_verbs
+@@ -8833,10 +9374,10 @@
{0x16, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000},
{0x18, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000},
{0x1a, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000},
/* FIXME: use matrix-type input source selection */
/* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */
/* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */
-@@ -8858,6 +9399,12 @@ static struct hda_verb alc262_init_verbs
+@@ -8858,6 +9399,12 @@
{ }
};
static struct hda_verb alc262_hippo_unsol_verbs[] = {
{0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
{0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
-@@ -8884,6 +9431,91 @@ static struct hda_verb alc262_sony_unsol
+@@ -8883,6 +9430,91 @@
+ {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
{}
};
-
++
+static struct hda_input_mux alc262_dmic_capture_source = {
+ .num_items = 2,
+ .items = {
+ alc262_toshiba_s06_speaker_automute(codec);
+ alc262_dmic_automute(codec);
+}
-+
+
/* mute/unmute internal speaker according to the hp jack and mute state */
static void alc262_hippo_automute(struct hda_codec *codec)
- {
-@@ -8948,6 +9580,41 @@ static void alc262_hippo1_unsol_event(st
+@@ -8946,6 +9578,41 @@
+ return;
+ alc262_hippo1_automute(codec);
}
-
- /*
++
++/*
+ * nec model
+ * 0x15 = headphone
+ * 0x16 = internal speaker
+ {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+ {}
+};
-+
-+/*
+
+ /*
* fujitsu model
- * 0x14 = headphone/spdif-out, 0x15 = internal speaker,
- * 0x1b = port replicator headphone out
-@@ -9179,9 +9846,28 @@ static struct snd_kcontrol_new alc262_le
+@@ -9179,6 +9846,25 @@
{ } /* end */
};
--/* additional init verbs for Benq laptops */
--static struct hda_verb alc262_EAPD_verbs[] = {
-- {0x20, AC_VERB_SET_COEF_INDEX, 0x07},
+static struct snd_kcontrol_new alc262_toshiba_rx1_mixer[] = {
+ HDA_BIND_VOL("Master Playback Volume", &alc262_fujitsu_bind_master_vol),
+ {
+ { } /* end */
+};
+
-+/* additional init verbs for Benq laptops */
-+static struct hda_verb alc262_EAPD_verbs[] = {
-+ {0x20, AC_VERB_SET_COEF_INDEX, 0x07},
- {0x20, AC_VERB_SET_PROC_COEF, 0x3070},
- {}
- };
-@@ -9427,7 +10113,7 @@ static struct hda_verb alc262_volume_ini
+ /* additional init verbs for Benq laptops */
+ static struct hda_verb alc262_EAPD_verbs[] = {
+ {0x20, AC_VERB_SET_COEF_INDEX, 0x07},
+@@ -9427,7 +10113,7 @@
{0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
{0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
{0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
/* set up input amps for analog loopback */
/* Amp Indices: DAC = 0, mixer = 1 */
{0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
-@@ -9482,7 +10168,7 @@ static struct hda_verb alc262_HP_BPC_ini
+@@ -9482,7 +10168,7 @@
{0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
{0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)},
{0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)},
/*
* Set up output mixers (0x0c - 0x0e)
*/
-@@ -9643,6 +10329,24 @@ static struct hda_verb alc262_HP_BPC_Wil
+@@ -9643,6 +10329,24 @@
{ }
};
#ifdef CONFIG_SND_HDA_POWER_SAVE
#define alc262_loopbacks alc880_loopbacks
#endif
-@@ -9693,6 +10397,7 @@ static int alc262_parse_auto_config(stru
+@@ -9693,6 +10397,7 @@
if (err < 0)
return err;
return 1;
}
-@@ -9711,7 +10416,7 @@ static void alc262_auto_init(struct hda_
+@@ -9711,7 +10416,7 @@
alc262_auto_init_analog_input(codec);
alc262_auto_init_input_src(codec);
if (spec->unsol_event)
}
/*
-@@ -9729,13 +10434,17 @@ static const char *alc262_models[ALC262_
+@@ -9729,13 +10434,17 @@
[ALC262_BENQ_ED8] = "benq",
[ALC262_BENQ_T31] = "benq-t31",
[ALC262_SONY_ASSAMD] = "sony-assamd",
SND_PCI_QUIRK(0x103c, 0x12fe, "HP xw9400", ALC262_HP_BPC),
SND_PCI_QUIRK(0x103c, 0x12ff, "HP xw4550", ALC262_HP_BPC),
SND_PCI_QUIRK(0x103c, 0x1306, "HP xw8600", ALC262_HP_BPC),
-@@ -9763,12 +10472,16 @@ static struct snd_pci_quirk alc262_cfg_t
+@@ -9763,12 +10472,16 @@
SND_PCI_QUIRK(0x104d, 0x820f, "Sony ASSAMD", ALC262_SONY_ASSAMD),
SND_PCI_QUIRK(0x104d, 0x900e, "Sony ASSAMD", ALC262_SONY_ASSAMD),
SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD),
-- SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1",
+ SND_PCI_QUIRK(0x104d, 0x9033, "Sony VAIO VGN-SR19XN",
- ALC262_SONY_ASSAMD),
-+ SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1",
++ ALC262_SONY_ASSAMD),
+ SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1",
+- ALC262_SONY_ASSAMD),
+ ALC262_TOSHIBA_RX1),
+ SND_PCI_QUIRK(0x1179, 0xff7b, "Toshiba S06", ALC262_TOSHIBA_S06),
SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU),
SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000 y410", ALC262_LENOVO_3000),
SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_BENQ_ED8),
SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_BENQ_T31),
-@@ -9918,7 +10631,7 @@ static struct alc_config_preset alc262_p
+@@ -9918,7 +10631,7 @@
.input_mux = &alc262_capture_source,
.unsol_event = alc262_hippo_unsol_event,
.init_hook = alc262_hippo_automute,
[ALC262_ULTRA] = {
.mixers = { alc262_ultra_mixer, alc262_ultra_capture_mixer },
.init_verbs = { alc262_ultra_verbs },
-@@ -9946,6 +10659,53 @@ static struct alc_config_preset alc262_p
+@@ -9946,6 +10659,53 @@
.input_mux = &alc262_fujitsu_capture_source,
.unsol_event = alc262_lenovo_3000_unsol_event,
},
};
static int patch_alc262(struct hda_codec *codec)
-@@ -10004,7 +10764,7 @@ static int patch_alc262(struct hda_codec
+@@ -10004,7 +10764,7 @@
spec->stream_name_analog = "ALC262 Analog";
spec->stream_analog_playback = &alc262_pcm_analog_playback;
spec->stream_analog_capture = &alc262_pcm_analog_capture;
spec->stream_name_digital = "ALC262 Digital";
spec->stream_digital_playback = &alc262_pcm_digital_playback;
spec->stream_digital_capture = &alc262_pcm_digital_capture;
-@@ -10040,7 +10800,7 @@ static int patch_alc262(struct hda_codec
+@@ -10040,7 +10800,7 @@
if (!spec->loopback.amplist)
spec->loopback.amplist = alc262_loopbacks;
#endif
return 0;
}
-@@ -10049,7 +10809,7 @@ static int patch_alc262(struct hda_codec
+@@ -10049,7 +10809,7 @@
*/
#define ALC268_DIGOUT_NID ALC880_DIGOUT_NID
#define alc268_modes alc260_modes
static hda_nid_t alc268_dac_nids[2] = {
/* front, hp */
0x02, 0x03
-@@ -10109,6 +10869,14 @@ static struct hda_verb alc268_toshiba_ve
+@@ -10107,6 +10867,14 @@
+ static struct hda_verb alc268_toshiba_verbs[] = {
+ {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
{ } /* end */
- };
-
++};
++
+static struct hda_input_mux alc268_acer_lc_capture_source = {
+ .num_items = 2,
+ .items = {
+ { "i-Mic", 0x6 },
+ { "E-Mic", 0x0 },
+ },
-+};
-+
+ };
+
/* Acer specific */
- /* bind volumes of both NID 0x02 and 0x03 */
- static struct hda_bind_ctls alc268_acer_bind_master_vol = {
-@@ -10161,6 +10929,21 @@ static int alc268_acer_master_sw_put(str
+@@ -10161,7 +10929,7 @@
return change;
}
+-static struct snd_kcontrol_new alc268_acer_mixer[] = {
+static struct snd_kcontrol_new alc268_acer_aspire_one_mixer[] = {
+ /* output mixer control */
+ HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol),
+ {
+@@ -10172,9 +10940,50 @@
+ .put = alc268_acer_master_sw_put,
+ .private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
+ },
++ HDA_CODEC_VOLUME("Mic Boost Capture Volume", 0x18, 0, HDA_INPUT),
++ { }
++};
++
++static struct snd_kcontrol_new alc268_acer_mixer[] = {
+ /* output mixer control */
+ HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol),
+ {
+ .put = alc268_acer_master_sw_put,
+ .private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
+ },
-+ HDA_CODEC_VOLUME("Mic Boost Capture Volume", 0x18, 0, HDA_INPUT),
+ HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
+ HDA_CODEC_VOLUME("Internal Mic Boost", 0x19, 0, HDA_INPUT),
+ HDA_CODEC_VOLUME("Line In Boost", 0x1a, 0, HDA_INPUT),
+ { }
+};
+
- static struct snd_kcontrol_new alc268_acer_mixer[] = {
- /* output mixer control */
- HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol),
-@@ -10178,6 +10961,32 @@ static struct snd_kcontrol_new alc268_ac
- { }
- };
-
+static struct snd_kcontrol_new alc268_acer_dmic_mixer[] = {
+ /* output mixer control */
+ HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol),
+ {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT},
+ {0x23, AC_VERB_SET_CONNECT_SEL, 0x06},
+ {0x23, AC_VERB_SET_AMP_GAIN_MUTE, 0xa017},
-+ { }
-+};
-+
- static struct hda_verb alc268_acer_verbs[] = {
- {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* internal dmic? */
- {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
-@@ -10185,7 +10994,6 @@ static struct hda_verb alc268_acer_verbs
+ { }
+ };
+
+@@ -10185,7 +10994,6 @@
{0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
{0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
{0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
{ }
};
-@@ -10212,6 +11020,47 @@ static void alc268_acer_init_hook(struct
+@@ -10210,6 +11018,47 @@
+ static void alc268_acer_init_hook(struct hda_codec *codec)
+ {
alc268_acer_automute(codec, 1);
- }
-
++}
++
+/* toggle speaker-output according to the hp-jack state */
+static void alc268_aspire_one_speaker_automute(struct hda_codec *codec)
+{
+{
+ alc268_aspire_one_speaker_automute(codec);
+ alc268_acer_mic_automute(codec);
-+}
-+
+ }
+
static struct snd_kcontrol_new alc268_dell_mixer[] = {
- /* output mixer control */
- HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT),
-@@ -10360,7 +11209,7 @@ static struct hda_verb alc268_base_init_
+@@ -10360,7 +11209,7 @@
{0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
/* Unmute Selector 23h,24h and set the default input to mic-in */
{0x23, AC_VERB_SET_CONNECT_SEL, 0x00},
{0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
{0x24, AC_VERB_SET_CONNECT_SEL, 0x00},
-@@ -10460,6 +11309,15 @@ static struct hda_input_mux alc268_acer_
- .num_items = 3,
- .items = {
- { "Mic", 0x0 },
+@@ -10457,6 +11306,15 @@
+ };
+
+ static struct hda_input_mux alc268_acer_capture_source = {
++ .num_items = 3,
++ .items = {
++ { "Mic", 0x0 },
+ { "Internal Mic", 0x1 },
+ { "Line", 0x2 },
+ },
+};
+
+static struct hda_input_mux alc268_acer_dmic_capture_source = {
-+ .num_items = 3,
-+ .items = {
-+ { "Mic", 0x0 },
- { "Internal Mic", 0x6 },
- { "Line", 0x2 },
- },
-@@ -10559,7 +11417,7 @@ static int alc268_auto_create_multi_out_
+ .num_items = 3,
+ .items = {
+ { "Mic", 0x0 },
+@@ -10559,7 +11417,7 @@
nid = cfg->line_out_pins[0];
if (nid)
nid = cfg->speaker_pins[0];
if (nid == 0x1d) {
-@@ -10581,7 +11439,7 @@ static int alc268_auto_create_multi_out_
+@@ -10581,7 +11439,7 @@
if (err < 0)
return err;
}
}
/* create playback/capture controls for input pins */
-@@ -10602,7 +11460,7 @@ static int alc268_auto_create_analog_inp
+@@ -10602,7 +11460,7 @@
case 0x1a:
idx1 = 2; /* Line In */
break;
idx1 = 3; /* CD */
break;
case 0x12:
-@@ -10614,7 +11472,7 @@ static int alc268_auto_create_analog_inp
+@@ -10614,7 +11472,7 @@
}
imux->items[imux->num_items].label = auto_pin_cfg_labels[i];
imux->items[imux->num_items].index = idx1;
}
return 0;
}
-@@ -10644,11 +11502,11 @@ static void alc268_auto_init_mono_speake
+@@ -10644,11 +11502,11 @@
}
dac_vol1 = dac_vol2 = 0xb000 | 0x40; /* set max volume */
dac_vol2 = AMP_OUT_ZERO;
else if (hp_nid == 0x15)
dac_vol1 = AMP_OUT_ZERO;
-@@ -10712,6 +11570,7 @@ static int alc268_parse_auto_config(stru
+@@ -10712,6 +11570,7 @@
if (err < 0)
return err;
return 1;
}
-@@ -10728,7 +11587,7 @@ static void alc268_auto_init(struct hda_
+@@ -10728,7 +11587,7 @@
alc268_auto_init_mono_speaker_out(codec);
alc268_auto_init_analog_input(codec);
if (spec->unsol_event)
}
/*
-@@ -10739,6 +11598,8 @@ static const char *alc268_models[ALC268_
+@@ -10739,6 +11598,8 @@
[ALC268_3ST] = "3stack",
[ALC268_TOSHIBA] = "toshiba",
[ALC268_ACER] = "acer",
[ALC268_DELL] = "dell",
[ALC268_ZEPTO] = "zepto",
#ifdef CONFIG_SND_DEBUG
-@@ -10753,11 +11614,14 @@ static struct snd_pci_quirk alc268_cfg_t
+@@ -10753,11 +11614,14 @@
SND_PCI_QUIRK(0x1025, 0x012e, "Acer Aspire 5310", ALC268_ACER),
SND_PCI_QUIRK(0x1025, 0x0130, "Acer Extensa 5210", ALC268_ACER),
SND_PCI_QUIRK(0x1025, 0x0136, "Acer Aspire 5315", ALC268_ACER),
SND_PCI_QUIRK(0x14c0, 0x0025, "COMPAL IFL90/JFL-92", ALC268_TOSHIBA),
SND_PCI_QUIRK(0x152d, 0x0763, "Diverse (CPR2000)", ALC268_ACER),
SND_PCI_QUIRK(0x152d, 0x0771, "Quanta IL1", ALC267_QUANTA_IL1),
-@@ -10830,6 +11694,40 @@ static struct alc_config_preset alc268_p
+@@ -10830,6 +11694,40 @@
.unsol_event = alc268_acer_unsol_event,
.init_hook = alc268_acer_init_hook,
},
[ALC268_DELL] = {
.mixers = { alc268_dell_mixer, alc268_beep_mixer },
.init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
-@@ -10974,7 +11872,7 @@ static int patch_alc268(struct hda_codec
+@@ -10974,7 +11872,7 @@
codec->patch_ops = alc_patch_ops;
if (board_config == ALC268_AUTO)
spec->init_hook = alc268_auto_init;
return 0;
}
-@@ -10990,6 +11888,14 @@ static hda_nid_t alc269_adc_nids[1] = {
+@@ -10990,6 +11888,14 @@
0x08,
};
static struct hda_input_mux alc269_eeepc_dmic_capture_source = {
.num_items = 2,
.items = {
-@@ -11016,6 +11922,8 @@ static struct snd_kcontrol_new alc269_ba
+@@ -11016,6 +11922,8 @@
HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT),
HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT),
-@@ -11025,6 +11933,28 @@ static struct snd_kcontrol_new alc269_ba
+@@ -11023,6 +11931,28 @@
+ HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
+ HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT),
{ } /* end */
- };
-
++};
++
+static struct snd_kcontrol_new alc269_quanta_fl1_mixer[] = {
+ /* output mixer control */
+ HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol),
+ HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x04, HDA_INPUT),
+ HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x04, HDA_INPUT),
+ { }
-+};
-+
+ };
+
/* bind volumes of both NID 0x0c and 0x0d */
- static struct hda_bind_ctls alc269_epc_bind_vol = {
- .ops = &snd_hda_bind_vol,
-@@ -11065,78 +11995,84 @@ static struct snd_kcontrol_new alc269_ca
+@@ -11065,78 +11995,84 @@
static struct snd_kcontrol_new alc269_epc_capture_mixer[] = {
HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-+ HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
- { } /* end */
- };
-
+- { } /* end */
+-};
+-
-/*
- * generic initialization of ADC, input mixers and output mixers
- */
- /* set vol=0 to output mixers */
- {0x02, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
- {0x03, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
-+/* FSC amilo */
-+static struct snd_kcontrol_new alc269_fujitsu_mixer[] = {
-+ HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT),
-+ HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
-+ HDA_BIND_VOL("PCM Playback Volume", &alc269_epc_bind_vol),
-+ { } /* end */
-+};
-
+-
- /* set up input amps for analog loopback */
- /* Amp Indices: DAC = 0, mixer = 1 */
- {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
- {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
- {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
- {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+-
+- {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+- {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
+- {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+- {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
+- {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
+- {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
+- {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
+-
+- {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+- {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+- {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
+- {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
+- {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
+- {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
+- {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
+-
+- {0x14, AC_VERB_SET_CONNECT_SEL, 0x00},
+- {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
+-
+- /* FIXME: use matrix-type input source selection */
+- /* Mixer elements: 0x18, 19, 1a, 1b, 1d, 0b */
+- /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */
+- {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+- {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
+- {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
+- {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
+-
+- /* set EAPD */
+- {0x14, AC_VERB_SET_EAPD_BTLENABLE, 2},
+- {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2},
+- { }
+-};
++ HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
++ { } /* end */
++};
++
++/* FSC amilo */
++static struct snd_kcontrol_new alc269_fujitsu_mixer[] = {
++ HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT),
++ HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
++ HDA_BIND_VOL("PCM Playback Volume", &alc269_epc_bind_vol),
++ { } /* end */
++};
++
+/* beep control */
+static struct snd_kcontrol_new alc269_beep_mixer[] = {
+ HDA_CODEC_VOLUME("Beep Playback Volume", 0x0b, 0x4, HDA_INPUT),
+ HDA_CODEC_MUTE("Beep Playback Switch", 0x0b, 0x4, HDA_INPUT),
+ { } /* end */
+};
-
-- {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
++
+static struct hda_verb alc269_quanta_fl1_verbs[] = {
+ {0x15, AC_VERB_SET_CONNECT_SEL, 0x01},
+ {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
- {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
-- {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
-- {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
-- {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
-- {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
-- {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
++ {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
+ {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
+ {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT},
+ {0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
+ { }
+};
-
-- {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
-- {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
-- {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
-- {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
-- {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
-- {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
-- {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
++
+/* toggle speaker-output according to the hp-jack state */
+static void alc269_quanta_fl1_speaker_automute(struct hda_codec *codec)
+{
+ unsigned int present;
+ unsigned char bits;
-
-- {0x14, AC_VERB_SET_CONNECT_SEL, 0x00},
-- {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
++
+ present = snd_hda_codec_read(codec, 0x15, 0,
+ AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
+ bits = present ? AMP_IN_MUTE(0) : 0;
+ AMP_IN_MUTE(0), bits);
+ snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1,
+ AMP_IN_MUTE(0), bits);
-
-- /* FIXME: use matrix-type input source selection */
-- /* Mixer elements: 0x18, 19, 1a, 1b, 1d, 0b */
-- /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */
-- {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
-- {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
-- {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
-- {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
++
+ snd_hda_codec_write(codec, 0x20, 0,
+ AC_VERB_SET_COEF_INDEX, 0x0c);
+ snd_hda_codec_write(codec, 0x20, 0,
+ AC_VERB_SET_PROC_COEF, 0x680);
-
-- /* set EAPD */
-- {0x14, AC_VERB_SET_EAPD_BTLENABLE, 2},
-- {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2},
-- { }
--};
++
+ snd_hda_codec_write(codec, 0x20, 0,
+ AC_VERB_SET_COEF_INDEX, 0x0c);
+ snd_hda_codec_write(codec, 0x20, 0,
static struct hda_verb alc269_eeepc_dmic_init_verbs[] = {
{0x15, AC_VERB_SET_CONNECT_SEL, 0x01},
-@@ -11163,42 +12099,42 @@ static struct hda_verb alc269_eeepc_amic
+@@ -11163,42 +12099,42 @@
static void alc269_speaker_automute(struct hda_codec *codec)
{
unsigned int present;
{
if ((res >> 26) == ALC880_HP_EVENT)
alc269_speaker_automute(codec);
-@@ -11215,7 +12151,7 @@ static void alc269_eeepc_dmic_inithook(s
+@@ -11215,7 +12151,7 @@
/* unsolicited event for HP jack sensing */
static void alc269_eeepc_amic_unsol_event(struct hda_codec *codec,
{
if ((res >> 26) == ALC880_HP_EVENT)
alc269_speaker_automute(codec);
-@@ -11230,6 +12166,76 @@ static void alc269_eeepc_amic_inithook(s
+@@ -11229,6 +12165,76 @@
+ alc269_speaker_automute(codec);
alc269_eeepc_amic_automute(codec);
}
-
++
+/*
+ * generic initialization of ADC, input mixers and output mixers
+ */
+ {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2},
+ { }
+};
-+
+
/* add playback controls from the parsed DAC table */
static int alc269_auto_create_multi_out_ctls(struct alc_spec *spec,
- const struct auto_pin_cfg *cfg)
-@@ -11311,8 +12317,26 @@ static int alc269_auto_create_multi_out_
+@@ -11311,8 +12317,26 @@
return 0;
}
#ifdef CONFIG_SND_HDA_POWER_SAVE
#define alc269_loopbacks alc880_loopbacks
-@@ -11330,7 +12354,7 @@ static int alc269_auto_create_multi_out_
+@@ -11330,7 +12354,7 @@
static int alc269_parse_auto_config(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
static hda_nid_t alc269_ignore[] = { 0x1d, 0 };
err = snd_hda_parse_pin_def_config(codec, &spec->autocfg,
-@@ -11353,9 +12377,20 @@ static int alc269_parse_auto_config(stru
+@@ -11352,10 +12376,21 @@
+
if (spec->kctl_alloc)
spec->mixers[spec->num_mixers++] = spec->kctl_alloc;
-
++
+ /* create a beep mixer control if the pin 0x1d isn't assigned */
+ for (i = 0; i < ARRAY_SIZE(spec->autocfg.input_pins); i++)
+ if (spec->autocfg.input_pins[i] == 0x1d)
+ break;
+ if (i >= ARRAY_SIZE(spec->autocfg.input_pins))
+ spec->mixers[spec->num_mixers++] = alc269_beep_mixer;
-+
+
spec->init_verbs[spec->num_init_verbs++] = alc269_init_verbs;
spec->num_mux_defs = 1;
spec->input_mux = &spec->private_imux;
err = alc_auto_add_mic_boost(codec);
if (err < 0)
-@@ -11364,6 +12399,7 @@ static int alc269_parse_auto_config(stru
+@@ -11364,6 +12399,7 @@
spec->mixers[spec->num_mixers] = alc269_capture_mixer;
spec->num_mixers++;
return 1;
}
-@@ -11380,21 +12416,29 @@ static void alc269_auto_init(struct hda_
+@@ -11380,21 +12416,29 @@
alc269_auto_init_hp_out(codec);
alc269_auto_init_analog_input(codec);
if (spec->unsol_event)
{}
};
-@@ -11409,6 +12453,18 @@ static struct alc_config_preset alc269_p
+@@ -11409,6 +12453,18 @@
.channel_mode = alc269_modes,
.input_mux = &alc269_capture_source,
},
[ALC269_ASUS_EEEPC_P703] = {
.mixers = { alc269_eeepc_mixer, alc269_epc_capture_mixer },
.init_verbs = { alc269_init_verbs,
-@@ -11435,6 +12491,20 @@ static struct alc_config_preset alc269_p
+@@ -11435,6 +12491,20 @@
.unsol_event = alc269_eeepc_dmic_unsol_event,
.init_hook = alc269_eeepc_dmic_inithook,
},
};
static int patch_alc269(struct hda_codec *codec)
-@@ -11488,6 +12558,7 @@ static int patch_alc269(struct hda_codec
+@@ -11488,6 +12558,7 @@
spec->adc_nids = alc269_adc_nids;
spec->num_adc_nids = ARRAY_SIZE(alc269_adc_nids);
codec->patch_ops = alc_patch_ops;
if (board_config == ALC269_AUTO)
-@@ -11689,7 +12760,7 @@ static struct snd_kcontrol_new alc861_to
+@@ -11689,7 +12760,7 @@
HDA_CODEC_MUTE("Master Playback Switch", 0x03, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME("Mic Playback Volume", 0x15, 0x01, HDA_INPUT),
HDA_CODEC_MUTE("Mic Playback Switch", 0x15, 0x01, HDA_INPUT),
/*Capture mixer control */
HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-@@ -11832,20 +12903,20 @@ static struct hda_verb alc861_base_init_
+@@ -11832,20 +12903,20 @@
/* route front mic to ADC1*/
{0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
{0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
/* Unmute Stereo Mixer 15 */
{0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
-@@ -11901,13 +12972,13 @@ static struct hda_verb alc861_threestack
+@@ -11901,13 +12972,13 @@
{0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
{0x06, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
{0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
/* Unmute Stereo Mixer 15 */
{0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
-@@ -11963,13 +13034,13 @@ static struct hda_verb alc861_uniwill_m3
+@@ -11963,13 +13034,13 @@
{0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
{0x06, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
{0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
/* Unmute Stereo Mixer 15 */
{0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
-@@ -12034,7 +13105,7 @@ static struct hda_verb alc861_asus_init_
+@@ -12034,7 +13105,7 @@
{0x014, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
{0x01c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{0x01c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
/* Unmute Stereo Mixer 15 */
{0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
-@@ -12071,20 +13142,20 @@ static struct hda_verb alc861_auto_init_
+@@ -12071,20 +13142,20 @@
*/
/* {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, */
{0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
/* Unmute Stereo Mixer 15 */
{0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
-@@ -12431,6 +13502,7 @@ static int alc861_parse_auto_config(stru
+@@ -12431,6 +13502,7 @@
spec->mixers[spec->num_mixers] = alc861_capture_mixer;
spec->num_mixers++;
return 1;
}
-@@ -12442,7 +13514,7 @@ static void alc861_auto_init(struct hda_
+@@ -12442,7 +13514,7 @@
alc861_auto_init_hp_out(codec);
alc861_auto_init_analog_input(codec);
if (spec->unsol_event)
}
#ifdef CONFIG_SND_HDA_POWER_SAVE
-@@ -12659,7 +13731,7 @@ static int patch_alc861(struct hda_codec
+@@ -12659,7 +13731,7 @@
if (!spec->loopback.amplist)
spec->loopback.amplist = alc861_loopbacks;
#endif
return 0;
}
-@@ -12913,7 +13985,7 @@ static struct snd_kcontrol_new alc861vd_
+@@ -12913,7 +13985,7 @@
HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
HDA_CODEC_VOLUME("ATAPI Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
HDA_CODEC_MUTE("ATAPI Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
{ } /* end */
};
-@@ -13058,7 +14130,7 @@ static struct hda_verb alc861vd_lenovo_u
+@@ -13058,7 +14130,7 @@
{0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
{0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)},
{0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
{}
};
-@@ -13120,7 +14192,7 @@ static struct hda_verb alc861vd_dallas_v
+@@ -13120,7 +14192,7 @@
{0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
{0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
{0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
{0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
-@@ -13145,7 +14217,7 @@ static struct hda_verb alc861vd_dallas_v
+@@ -13145,7 +14217,7 @@
{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
{0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
{ } /* end */
-@@ -13304,7 +14376,7 @@ static struct alc_config_preset alc861vd
+@@ -13304,7 +14376,7 @@
.input_mux = &alc861vd_hp_capture_source,
.unsol_event = alc861vd_dallas_unsol_event,
.init_hook = alc861vd_dallas_automute,
};
/*
-@@ -13542,6 +14614,7 @@ static int alc861vd_parse_auto_config(st
+@@ -13542,6 +14614,7 @@
if (err < 0)
return err;
return 1;
}
-@@ -13554,7 +14627,7 @@ static void alc861vd_auto_init(struct hd
+@@ -13554,7 +14627,7 @@
alc861vd_auto_init_analog_input(codec);
alc861vd_auto_init_input_src(codec);
if (spec->unsol_event)
}
static int patch_alc861vd(struct hda_codec *codec)
-@@ -13883,13 +14956,120 @@ static struct snd_kcontrol_new alc662_ee
+@@ -13883,13 +14956,120 @@
{ } /* end */
};
{ } /* end */
};
-@@ -14074,17 +15254,84 @@ static struct hda_verb alc663_auto_init_
+@@ -14074,14 +15254,81 @@
};
static struct hda_verb alc663_m51va_init_verbs[] = {
+ {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(9)},
{0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT},
{0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
- {}
- };
-
++ {}
++};
++
+static struct hda_verb alc663_21jd_amic_init_verbs[] = {
+ {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
+ {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+ {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT},
+ {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
+ {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
-+ {}
-+};
-+
- static struct hda_verb alc663_g71v_init_verbs[] = {
- {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
- /* {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, */
-@@ -14110,6 +15357,14 @@ static struct hda_verb alc663_g50v_init_
+ {}
+ };
+
+@@ -14110,6 +15357,14 @@
{}
};
/* capture mixer elements */
static struct snd_kcontrol_new alc662_capture_mixer[] = {
HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT),
-@@ -14129,6 +15384,12 @@ static struct snd_kcontrol_new alc662_ca
- { } /* end */
- };
-
-+static struct snd_kcontrol_new alc662_auto_capture_mixer[] = {
-+ HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT),
-+ HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT),
+@@ -14126,6 +15381,12 @@
+ .get = alc662_mux_enum_get,
+ .put = alc662_mux_enum_put,
+ },
+ { } /* end */
+};
+
- static void alc662_lenovo_101e_ispeaker_automute(struct hda_codec *codec)
- {
- unsigned int present;
-@@ -14209,12 +15470,12 @@ static void alc662_eeepc_ep20_automute(s
++static struct snd_kcontrol_new alc662_auto_capture_mixer[] = {
++ HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT),
++ HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT),
+ { } /* end */
+ };
+
+@@ -14209,12 +15470,12 @@
if (present) {
/* mute internal speaker */
snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0,
}
}
-@@ -14237,11 +15498,108 @@ static void alc663_m51va_speaker_automut
+@@ -14237,11 +15498,108 @@
unsigned char bits;
present = snd_hda_codec_read(codec, 0x21, 0,
- AC_VERB_GET_PIN_SENSE, 0)
- & AC_PINSENSE_PRESENCE;
-+ AC_VERB_GET_PIN_SENSE, 0)
-+ & AC_PINSENSE_PRESENCE;
- bits = present ? HDA_AMP_MUTE : 0;
+- bits = present ? HDA_AMP_MUTE : 0;
- snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
- HDA_AMP_MUTE, bits);
++ AC_VERB_GET_PIN_SENSE, 0)
++ & AC_PINSENSE_PRESENCE;
++ bits = present ? HDA_AMP_MUTE : 0;
+ snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0,
+ AMP_IN_MUTE(0), bits);
+ snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1,
}
static void alc663_m51va_mic_automute(struct hda_codec *codec)
-@@ -14249,16 +15607,16 @@ static void alc663_m51va_mic_automute(st
+@@ -14249,16 +15607,16 @@
unsigned int present;
present = snd_hda_codec_read(codec, 0x18, 0,
}
static void alc663_m51va_unsol_event(struct hda_codec *codec,
-@@ -14280,6 +15638,121 @@ static void alc663_m51va_inithook(struct
+@@ -14278,6 +15636,121 @@
+ {
+ alc663_m51va_speaker_automute(codec);
alc663_m51va_mic_automute(codec);
- }
-
++}
++
+/* ***************** Mode1 ******************************/
+static void alc663_mode1_unsol_event(struct hda_codec *codec,
+ unsigned int res)
+{
+ alc663_two_hp_m2_speaker_automute(codec);
+ alc662_eeepc_mic_automute(codec);
-+}
-+
+ }
+
static void alc663_g71v_hp_automute(struct hda_codec *codec)
- {
- unsigned int present;
-@@ -14350,6 +15823,46 @@ static void alc663_g50v_inithook(struct
+@@ -14349,6 +15822,46 @@
+ alc663_m51va_speaker_automute(codec);
alc662_eeepc_mic_automute(codec);
}
-
++
+/* bind hp and internal speaker mute (with plug check) */
+static int alc662_ecs_master_sw_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
+ HDA_CODEC_MUTE("i-Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
+ { } /* end */
+};
-+
+
#ifdef CONFIG_SND_HDA_POWER_SAVE
#define alc662_loopbacks alc880_loopbacks
- #endif
-@@ -14372,21 +15885,68 @@ static const char *alc662_models[ALC662_
+@@ -14372,21 +15885,68 @@
[ALC662_LENOVO_101E] = "lenovo-101e",
[ALC662_ASUS_EEEPC_P701] = "eeepc-p701",
[ALC662_ASUS_EEEPC_EP20] = "eeepc-ep20",
SND_PCI_QUIRK(0x1854, 0x2000, "ASUS H13-2000", ALC663_ASUS_H13),
SND_PCI_QUIRK(0x1854, 0x2001, "ASUS H13-2001", ALC663_ASUS_H13),
SND_PCI_QUIRK(0x1854, 0x2002, "ASUS H13-2002", ALC663_ASUS_H13),
-@@ -14477,6 +16037,18 @@ static struct alc_config_preset alc662_p
+@@ -14476,6 +16036,18 @@
+ .input_mux = &alc662_lenovo_101e_capture_source,
.unsol_event = alc662_eeepc_ep20_unsol_event,
.init_hook = alc662_eeepc_ep20_inithook,
- },
++ },
+ [ALC662_ECS] = {
+ .mixers = { alc662_ecs_mixer, alc662_capture_mixer },
+ .init_verbs = { alc662_init_verbs,
+ .input_mux = &alc662_eeepc_capture_source,
+ .unsol_event = alc662_eeepc_unsol_event,
+ .init_hook = alc662_eeepc_inithook,
-+ },
+ },
[ALC663_ASUS_M51VA] = {
.mixers = { alc663_m51va_mixer, alc662_capture_mixer},
- .init_verbs = { alc662_init_verbs, alc663_m51va_init_verbs },
-@@ -14524,6 +16096,91 @@ static struct alc_config_preset alc662_p
+@@ -14523,6 +16095,91 @@
+ .input_mux = &alc663_capture_source,
.unsol_event = alc663_g50v_unsol_event,
.init_hook = alc663_g50v_inithook,
- },
++ },
+ [ALC663_ASUS_MODE1] = {
+ .mixers = { alc663_m51va_mixer, alc662_auto_capture_mixer },
+ .init_verbs = { alc662_init_verbs,
+ .input_mux = &alc662_eeepc_capture_source,
+ .unsol_event = alc663_mode6_unsol_event,
+ .init_hook = alc663_mode6_inithook,
-+ },
+ },
};
-
-@@ -14560,15 +16217,15 @@ static int alc662_auto_create_multi_out_
+@@ -14560,15 +16217,15 @@
HDA_OUTPUT));
if (err < 0)
return err;
HDA_INPUT));
if (err < 0)
return err;
-@@ -14580,9 +16237,9 @@ static int alc662_auto_create_multi_out_
+@@ -14580,9 +16237,9 @@
if (err < 0)
return err;
sprintf(name, "%s Playback Switch", chname[i]);
if (err < 0)
return err;
}
-@@ -14777,7 +16434,7 @@ static int alc662_parse_auto_config(stru
+@@ -14777,7 +16434,7 @@
spec->num_mux_defs = 1;
spec->input_mux = &spec->private_imux;
spec->init_verbs[spec->num_init_verbs++] = alc662_auto_init_verbs;
if (codec->vendor_id == 0x10ec0663)
spec->init_verbs[spec->num_init_verbs++] =
-@@ -14789,6 +16446,8 @@ static int alc662_parse_auto_config(stru
+@@ -14789,6 +16446,8 @@
spec->mixers[spec->num_mixers] = alc662_capture_mixer;
spec->num_mixers++;
return 1;
}
-@@ -14801,7 +16460,7 @@ static void alc662_auto_init(struct hda_
+@@ -14801,7 +16460,7 @@
alc662_auto_init_analog_input(codec);
alc662_auto_init_input_src(codec);
if (spec->unsol_event)
}
static int patch_alc662(struct hda_codec *codec)
-@@ -14846,6 +16505,9 @@ static int patch_alc662(struct hda_codec
+@@ -14846,6 +16505,9 @@
if (codec->vendor_id == 0x10ec0663) {
spec->stream_name_analog = "ALC663 Analog";
spec->stream_name_digital = "ALC663 Digital";
} else {
spec->stream_name_analog = "ALC662 Analog";
spec->stream_name_digital = "ALC662 Digital";
-@@ -14883,6 +16545,7 @@ struct hda_codec_preset snd_hda_preset_r
+@@ -14883,6 +16545,7 @@
{ .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 },
{ .id = 0x10ec0268, .name = "ALC268", .patch = patch_alc268 },
{ .id = 0x10ec0269, .name = "ALC269", .patch = patch_alc269 },
{ .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660",
.patch = patch_alc861 },
{ .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd },
-@@ -14896,10 +16559,15 @@ struct hda_codec_preset snd_hda_preset_r
+@@ -14896,10 +16559,15 @@
{ .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 },
{ .id = 0x10ec0882, .name = "ALC882", .patch = patch_alc882 },
{ .id = 0x10ec0883, .name = "ALC883", .patch = patch_alc883 },
{ .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 },
{} /* terminator */
};
-diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound/pci/hda/patch_sigmatel.c
---- linux-2.6.27/sound/pci/hda/patch_sigmatel.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/patch_sigmatel.c 2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/hda/patch_sigmatel.c
+--- a/sound/pci/hda/patch_sigmatel.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/patch_sigmatel.c Wed May 06 16:57:08 2009 +0100
@@ -33,8 +33,12 @@
#include "hda_codec.h"
#include "hda_local.h"
#define STAC_PWR_EVENT 0x20
#define STAC_HP_EVENT 0x30
-@@ -51,7 +55,8 @@ enum {
+@@ -51,7 +55,8 @@
STAC_9200_DELL_M25,
STAC_9200_DELL_M26,
STAC_9200_DELL_M27,
STAC_9200_PANASONIC,
STAC_9200_MODELS
};
-@@ -61,27 +66,44 @@ enum {
+@@ -61,27 +66,44 @@
STAC_9205_DELL_M42,
STAC_9205_DELL_M43,
STAC_9205_DELL_M44,
+ STAC_DELL_M6_BOTH,
+ STAC_DELL_EQ,
STAC_92HD73XX_MODELS
- };
-
- enum {
-+ STAC_92HD83XXX_REF,
-+ STAC_92HD83XXX_MODELS
+};
+
+enum {
++ STAC_92HD83XXX_REF,
++ STAC_92HD83XXX_MODELS
+ };
+
+ enum {
STAC_92HD71BXX_REF,
STAC_DELL_M4_1,
STAC_DELL_M4_2,
STAC_925x_MODELS
};
-@@ -104,6 +126,7 @@ enum {
+@@ -104,6 +126,7 @@
STAC_MACBOOK_PRO_V2,
STAC_IMAC_INTEL,
STAC_IMAC_INTEL_20,
STAC_922X_DELL_D81,
STAC_922X_DELL_D82,
STAC_922X_DELL_M81,
-@@ -112,6 +135,7 @@ enum {
+@@ -112,6 +135,7 @@
};
enum {
STAC_D965_REF,
STAC_D965_3ST,
STAC_D965_5ST,
-@@ -125,11 +149,14 @@ struct sigmatel_spec {
+@@ -125,11 +149,14 @@
unsigned int num_mixers;
int board_config;
/* gpio lines */
unsigned int eapd_mask;
-@@ -138,21 +165,28 @@ struct sigmatel_spec {
+@@ -138,20 +165,27 @@
unsigned int gpio_data;
unsigned int gpio_mute;
unsigned int cur_mmux;
struct hda_multi_out multiout;
hda_nid_t dac_nids[5];
-
-+ int volume_offset;
+
++ int volume_offset;
+
/* capture */
hda_nid_t *adc_nids;
- unsigned int num_adcs;
-@@ -162,8 +196,14 @@ struct sigmatel_spec {
+@@ -162,8 +196,14 @@
unsigned int num_dmics;
hda_nid_t *dmux_nids;
unsigned int num_dmuxes;
/* pin widgets */
hda_nid_t *pin_nids;
-@@ -180,11 +220,17 @@ struct sigmatel_spec {
+@@ -180,11 +220,17 @@
unsigned int cur_dmux[2];
struct hda_input_mux *input_mux;
unsigned int cur_mux[3];
unsigned int aloopback;
struct hda_pcm pcm_rec[2]; /* PCM information */
-@@ -195,6 +241,8 @@ struct sigmatel_spec {
+@@ -195,6 +241,8 @@
struct snd_kcontrol_new *kctl_alloc;
struct hda_input_mux private_dimux;
struct hda_input_mux private_imux;
struct hda_input_mux private_mono_mux;
};
-@@ -215,10 +263,19 @@ static hda_nid_t stac92hd73xx_pwr_nids[8
+@@ -215,8 +263,17 @@
0x0f, 0x10, 0x11
};
+
static hda_nid_t stac92hd73xx_adc_nids[2] = {
0x1a, 0x1b
- };
-
++};
++
+#define DELL_M6_AMP 2
+static hda_nid_t stac92hd73xx_amp_nids[3] = {
+ 0x0b, 0x0c, 0x0e
-+};
-+
+ };
+
#define STAC92HD73XX_NUM_DMICS 2
- static hda_nid_t stac92hd73xx_dmic_nids[STAC92HD73XX_NUM_DMICS + 1] = {
- 0x13, 0x14, 0
-@@ -237,6 +294,41 @@ static hda_nid_t stac92hd73xx_dmux_nids[
+@@ -237,6 +294,41 @@
0x20, 0x21,
};
static hda_nid_t stac92hd71bxx_pwr_nids[3] = {
0x0a, 0x0d, 0x0f
};
-@@ -249,8 +341,12 @@ static hda_nid_t stac92hd71bxx_mux_nids[
+@@ -249,8 +341,12 @@
0x1a, 0x1b
};
};
static hda_nid_t stac92hd71bxx_dac_nids[1] = {
-@@ -262,6 +358,10 @@ static hda_nid_t stac92hd71bxx_dmic_nids
+@@ -262,6 +358,10 @@
0x18, 0x19, 0
};
static hda_nid_t stac925x_adc_nids[1] = {
0x03,
};
-@@ -299,6 +399,10 @@ static hda_nid_t stac927x_mux_nids[3] =
+@@ -299,6 +399,10 @@
0x15, 0x16, 0x17
};
static hda_nid_t stac927x_dac_nids[6] = {
0x02, 0x03, 0x04, 0x05, 0x06, 0
};
-@@ -312,6 +416,11 @@ static hda_nid_t stac927x_dmic_nids[STAC
+@@ -312,6 +416,11 @@
0x13, 0x14, 0
};
static hda_nid_t stac9205_adc_nids[2] = {
0x12, 0x13
};
-@@ -324,6 +433,10 @@ static hda_nid_t stac9205_dmux_nids[1] =
- 0x1d,
- };
+@@ -322,6 +431,10 @@
-+static hda_nid_t stac9205_smux_nids[1] = {
-+ 0x21,
+ static hda_nid_t stac9205_dmux_nids[1] = {
+ 0x1d,
+};
+
++static hda_nid_t stac9205_smux_nids[1] = {
++ 0x21,
+ };
+
#define STAC9205_NUM_DMICS 2
- static hda_nid_t stac9205_dmic_nids[STAC9205_NUM_DMICS + 1] = {
- 0x17, 0x18, 0
-@@ -347,12 +460,18 @@ static hda_nid_t stac922x_pin_nids[10] =
+@@ -347,12 +460,18 @@
static hda_nid_t stac92hd73xx_pin_nids[13] = {
0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
0x0f, 0x10, 0x11, 0x12, 0x13,
- 0x14, 0x1e, 0x22
-+ 0x14, 0x22, 0x23
- };
-
+-};
+-
-static hda_nid_t stac92hd71bxx_pin_nids[10] = {
++ 0x14, 0x22, 0x23
++};
++
+static hda_nid_t stac92hd83xxx_pin_nids[14] = {
+ 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
+ 0x0f, 0x10, 0x11, 0x12, 0x13,
};
static hda_nid_t stac927x_pin_nids[14] = {
-@@ -367,6 +486,34 @@ static hda_nid_t stac9205_pin_nids[12] =
+@@ -367,6 +486,34 @@
0x21, 0x22,
};
static int stac92xx_dmux_enum_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
-@@ -397,6 +544,56 @@ static int stac92xx_dmux_enum_put(struct
+@@ -397,6 +544,56 @@
spec->dmux_nids[dmux_idx], &spec->cur_dmux[dmux_idx]);
}
static int stac92xx_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
-@@ -452,6 +649,41 @@ static int stac92xx_mono_mux_enum_put(st
- spec->mono_nid, &spec->cur_mmux);
- }
+@@ -450,6 +647,41 @@
+ return snd_hda_input_mux_put(codec, spec->mono_mux, ucontrol,
+ spec->mono_nid, &spec->cur_mmux);
++}
++
+static int stac92xx_amp_mux_enum_info(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_info *uinfo)
+{
+
+ return snd_hda_input_mux_put(codec, spec->amp_mux, ucontrol,
+ 0, &spec->cur_amux);
-+}
-+
- #define stac92xx_aloopback_info snd_ctl_boolean_mono_info
+ }
- static int stac92xx_aloopback_get(struct snd_kcontrol *kcontrol,
-@@ -546,8 +778,8 @@ static struct hda_verb dell_eq_core_init
+ #define stac92xx_aloopback_info snd_ctl_boolean_mono_info
+@@ -546,8 +778,8 @@
{ 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xec},
/* setup audio connections */
{ 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00},
/* setup adcs to point to mixer */
{ 0x20, AC_VERB_SET_CONNECT_SEL, 0x0b},
{ 0x21, AC_VERB_SET_CONNECT_SEL, 0x0b},
-@@ -560,9 +792,7 @@ static struct hda_verb dell_eq_core_init
+@@ -560,9 +792,7 @@
};
static struct hda_verb dell_m6_core_init[] = {
/* setup audio connections */
{ 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00},
{ 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01},
-@@ -628,25 +858,38 @@ static struct hda_verb stac92hd73xx_10ch
+@@ -628,25 +858,38 @@
{}
};
{ 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{ 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{ 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
-+ {}
- };
-
+-};
+-
-#define HD_DISABLE_PORTF 3
++ {}
++};
++
+#define HD_DISABLE_PORTF 2
static struct hda_verb stac92hd71bxx_analog_core_init[] = {
/* start of config #1 */
/* unmute right and left channels for node 0x0f */
{ 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
/* start of config #2 */
-@@ -655,10 +898,6 @@ static struct hda_verb stac92hd71bxx_ana
+@@ -655,10 +898,6 @@
{ 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
/* connect headphone jack to dac1 */
{ 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01},
/* unmute right and left channels for nodes 0x0a, 0xd */
{ 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{ 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
-@@ -668,6 +907,8 @@ static struct hda_verb stac92hd71bxx_ana
+@@ -668,6 +907,8 @@
static struct hda_verb stac925x_core_init[] = {
/* set dac0mux for dac converter */
{ 0x06, AC_VERB_SET_CONNECT_SEL, 0x00},
{}
};
-@@ -690,12 +931,16 @@ static struct hda_verb d965_core_init[]
+@@ -690,12 +931,16 @@
static struct hda_verb stac927x_core_init[] = {
/* set master volume and direct control */
{ 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
{}
};
-@@ -709,6 +954,31 @@ static struct hda_verb stac9205_core_ini
+@@ -707,6 +952,31 @@
+ .info = stac92xx_mono_mux_enum_info, \
+ .get = stac92xx_mono_mux_enum_get, \
.put = stac92xx_mono_mux_enum_put, \
- }
-
++ }
++
+#define STAC_AMP_MUX \
+ { \
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+ .put = stac92xx_amp_volume_put, \
+ .tlv = { .c = snd_hda_mixer_amp_tlv }, \
+ .private_value = HDA_COMPOSE_AMP_VAL(nid, chs, idx, dir) \
-+ }
-+
+ }
+
#define STAC_INPUT_SOURCE(cnt) \
- { \
- .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-@@ -736,33 +1006,36 @@ static struct snd_kcontrol_new stac9200_
+@@ -736,11 +1006,28 @@
STAC_INPUT_SOURCE(1),
HDA_CODEC_VOLUME("Capture Volume", 0x0a, 0, HDA_OUTPUT),
HDA_CODEC_MUTE("Capture Switch", 0x0a, 0, HDA_OUTPUT),
- HDA_CODEC_VOLUME("Capture Mux Volume", 0x0c, 0, HDA_OUTPUT),
- { } /* end */
- };
-
+- { } /* end */
+-};
+-
++ { } /* end */
++};
++
+#define DELL_M6_MIXER 6
static struct snd_kcontrol_new stac92hd73xx_6ch_mixer[] = {
-- STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 3),
--
-- HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x20, 0x0, HDA_OUTPUT),
-- HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x20, 0x0, HDA_OUTPUT),
--
-- HDA_CODEC_VOLUME_IDX("Capture Volume", 0x1, 0x21, 0x0, HDA_OUTPUT),
-- HDA_CODEC_MUTE_IDX("Capture Switch", 0x1, 0x21, 0x0, HDA_OUTPUT),
--
+ /* start of config #1 */
- HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT),
- HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT),
-
-- HDA_CODEC_VOLUME("Mic Mixer Capture Volume", 0x1d, 0x1, HDA_INPUT),
-- HDA_CODEC_MUTE("Mic Mixer Capture Switch", 0x1d, 0x1, HDA_INPUT),
--
- HDA_CODEC_VOLUME("Line In Mixer Capture Volume", 0x1d, 0x2, HDA_INPUT),
- HDA_CODEC_MUTE("Line In Mixer Capture Switch", 0x1d, 0x2, HDA_INPUT),
-
++ HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT),
++ HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT),
++
++ HDA_CODEC_VOLUME("Line In Mixer Capture Volume", 0x1d, 0x2, HDA_INPUT),
++ HDA_CODEC_MUTE("Line In Mixer Capture Switch", 0x1d, 0x2, HDA_INPUT),
++
+ HDA_CODEC_VOLUME("CD Mixer Capture Volume", 0x1d, 0x4, HDA_INPUT),
+ HDA_CODEC_MUTE("CD Mixer Capture Switch", 0x1d, 0x4, HDA_INPUT),
+
+ HDA_CODEC_VOLUME("Mic Mixer Capture Volume", 0x1d, 0x1, HDA_INPUT),
+ HDA_CODEC_MUTE("Mic Mixer Capture Switch", 0x1d, 0x1, HDA_INPUT),
+
- HDA_CODEC_VOLUME("DAC Mixer Capture Volume", 0x1d, 0x3, HDA_INPUT),
- HDA_CODEC_MUTE("DAC Mixer Capture Switch", 0x1d, 0x3, HDA_INPUT),
++ HDA_CODEC_VOLUME("DAC Mixer Capture Volume", 0x1d, 0x3, HDA_INPUT),
++ HDA_CODEC_MUTE("DAC Mixer Capture Switch", 0x1d, 0x3, HDA_INPUT),
++
+ STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 3),
-- HDA_CODEC_VOLUME("CD Mixer Capture Volume", 0x1d, 0x4, HDA_INPUT),
-- HDA_CODEC_MUTE("CD Mixer Capture Switch", 0x1d, 0x4, HDA_INPUT),
-+ STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 3),
+ HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x20, 0x0, HDA_OUTPUT),
+@@ -749,6 +1036,18 @@
+ HDA_CODEC_VOLUME_IDX("Capture Volume", 0x1, 0x21, 0x0, HDA_OUTPUT),
+ HDA_CODEC_MUTE_IDX("Capture Switch", 0x1, 0x21, 0x0, HDA_OUTPUT),
+
++ { } /* end */
++};
++
++static struct snd_kcontrol_new stac92hd73xx_8ch_mixer[] = {
++ STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 4),
+
+ HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x20, 0x0, HDA_OUTPUT),
+ HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x20, 0x0, HDA_OUTPUT),
+ HDA_CODEC_VOLUME_IDX("Capture Volume", 0x1, 0x21, 0x0, HDA_OUTPUT),
+ HDA_CODEC_MUTE_IDX("Capture Switch", 0x1, 0x21, 0x0, HDA_OUTPUT),
+
+ HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT),
+ HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT),
+
+@@ -766,8 +1065,8 @@
{ } /* end */
};
-@@ -818,22 +1091,59 @@ static struct snd_kcontrol_new stac92hd7
+-static struct snd_kcontrol_new stac92hd73xx_8ch_mixer[] = {
+- STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 4),
++static struct snd_kcontrol_new stac92hd73xx_10ch_mixer[] = {
++ STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 5),
+
+ HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x20, 0x0, HDA_OUTPUT),
+ HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x20, 0x0, HDA_OUTPUT),
+@@ -792,48 +1091,59 @@
{ } /* end */
};
+-static struct snd_kcontrol_new stac92hd73xx_10ch_mixer[] = {
+- STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 5),
+-
+- HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x20, 0x0, HDA_OUTPUT),
+- HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x20, 0x0, HDA_OUTPUT),
+-
+- HDA_CODEC_VOLUME_IDX("Capture Volume", 0x1, 0x21, 0x0, HDA_OUTPUT),
+- HDA_CODEC_MUTE_IDX("Capture Switch", 0x1, 0x21, 0x0, HDA_OUTPUT),
+-
+- HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT),
+- HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT),
+-
+- HDA_CODEC_VOLUME("Mic Mixer Capture Volume", 0x1d, 0x1, HDA_INPUT),
+- HDA_CODEC_MUTE("Mic Mixer Capture Switch", 0x1d, 0x1, HDA_INPUT),
+-
+- HDA_CODEC_VOLUME("Line In Mixer Capture Volume", 0x1d, 0x2, HDA_INPUT),
+- HDA_CODEC_MUTE("Line In Mixer Capture Switch", 0x1d, 0x2, HDA_INPUT),
+-
+- HDA_CODEC_VOLUME("DAC Mixer Capture Volume", 0x1d, 0x3, HDA_INPUT),
+- HDA_CODEC_MUTE("DAC Mixer Capture Switch", 0x1d, 0x3, HDA_INPUT),
+-
+- HDA_CODEC_VOLUME("CD Mixer Capture Volume", 0x1d, 0x4, HDA_INPUT),
+- HDA_CODEC_MUTE("CD Mixer Capture Switch", 0x1d, 0x4, HDA_INPUT),
+
+static struct snd_kcontrol_new stac92hd83xxx_mixer[] = {
+ HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x17, 0x0, HDA_OUTPUT),
+ HDA_CODEC_VOLUME("Mic Capture Volume", 0x1b, 0x4, HDA_INPUT),
+ HDA_CODEC_MUTE("Mic Capture Switch", 0x1b 0x4, HDA_INPUT),
+ */
-+ { } /* end */
-+};
-+
+ { } /* end */
+ };
+
static struct snd_kcontrol_new stac92hd71bxx_analog_mixer[] = {
STAC_INPUT_SOURCE(2),
+ STAC_ANALOG_LOOPBACK(0xFA0, 0x7A0, 2),
+ /*
HDA_CODEC_VOLUME("PC Beep Volume", 0x17, 0x2, HDA_INPUT),
HDA_CODEC_MUTE("PC Beep Switch", 0x17, 0x2, HDA_INPUT),
+-
+- HDA_CODEC_MUTE("Analog Loopback 1", 0x17, 0x3, HDA_INPUT),
+- HDA_CODEC_MUTE("Analog Loopback 2", 0x17, 0x4, HDA_INPUT),
+ */
+
+ HDA_CODEC_MUTE("Import0 Mux Capture Switch", 0x17, 0x0, HDA_INPUT),
+
+ HDA_CODEC_MUTE("Import1 Mux Capture Switch", 0x17, 0x1, HDA_INPUT),
+ HDA_CODEC_VOLUME("Import1 Mux Capture Volume", 0x17, 0x1, HDA_INPUT),
-
-- HDA_CODEC_MUTE("Analog Loopback 1", 0x17, 0x3, HDA_INPUT),
-- HDA_CODEC_MUTE("Analog Loopback 2", 0x17, 0x4, HDA_INPUT),
++
+ HDA_CODEC_MUTE("DAC0 Capture Switch", 0x17, 0x3, HDA_INPUT),
+ HDA_CODEC_VOLUME("DAC0 Capture Volume", 0x17, 0x3, HDA_INPUT),
+
{ } /* end */
};
-@@ -843,19 +1153,18 @@ static struct snd_kcontrol_new stac92hd7
+@@ -843,19 +1153,18 @@
HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1c, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1c, 0x0, HDA_OUTPUT),
{ } /* end */
};
-@@ -865,12 +1174,9 @@ static struct snd_kcontrol_new stac9205_
+@@ -865,12 +1174,9 @@
HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1b, 0x0, HDA_INPUT),
HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1d, 0x0, HDA_OUTPUT),
{ } /* end */
};
-@@ -879,11 +1185,9 @@ static struct snd_kcontrol_new stac922x_
+@@ -879,11 +1185,9 @@
STAC_INPUT_SOURCE(2),
HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x17, 0x0, HDA_INPUT),
HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x17, 0x0, HDA_INPUT),
{ } /* end */
};
-@@ -894,15 +1198,12 @@ static struct snd_kcontrol_new stac927x_
+@@ -894,15 +1198,12 @@
HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x18, 0x0, HDA_INPUT),
HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1b, 0x0, HDA_OUTPUT),
{ } /* end */
};
-@@ -915,6 +1216,15 @@ static struct snd_kcontrol_new stac_dmux
+@@ -915,6 +1216,15 @@
.put = stac92xx_dmux_enum_put,
};
static const char *slave_vols[] = {
"Front Playback Volume",
"Surround Playback Volume",
-@@ -966,6 +1276,22 @@ static int stac92xx_build_controls(struc
+@@ -966,6 +1276,22 @@
if (err < 0)
return err;
}
if (spec->multiout.dig_out_nid) {
err = snd_hda_create_spdif_out_ctls(codec, spec->multiout.dig_out_nid);
-@@ -977,7 +1303,7 @@ static int stac92xx_build_controls(struc
+@@ -977,7 +1303,7 @@
return err;
spec->multiout.share_spdif = 1;
}
err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid);
if (err < 0)
return err;
-@@ -988,6 +1314,8 @@ static int stac92xx_build_controls(struc
+@@ -988,6 +1314,8 @@
unsigned int vmaster_tlv[4];
snd_hda_set_vmaster_tlv(codec, spec->multiout.dac_nids[0],
HDA_OUTPUT, vmaster_tlv);
err = snd_hda_add_vmaster(codec, "Master Playback Volume",
vmaster_tlv, slave_vols);
if (err < 0)
-@@ -1008,7 +1336,16 @@ static unsigned int ref9200_pin_configs[
+@@ -1008,7 +1336,16 @@
0x02a19020, 0x01a19021, 0x90100140, 0x01813122,
};
STAC 9200 pin configs for
102801A8
102801DE
-@@ -1138,6 +1475,8 @@ static unsigned int *stac9200_brd_tbl[ST
+@@ -1138,6 +1475,8 @@
[STAC_9200_DELL_M25] = dell9200_m25_pin_configs,
[STAC_9200_DELL_M26] = dell9200_m26_pin_configs,
[STAC_9200_DELL_M27] = dell9200_m27_pin_configs,
[STAC_9200_PANASONIC] = ref9200_pin_configs,
};
-@@ -1154,7 +1493,8 @@ static const char *stac9200_models[STAC_
+@@ -1154,7 +1493,8 @@
[STAC_9200_DELL_M25] = "dell-m25",
[STAC_9200_DELL_M26] = "dell-m26",
[STAC_9200_DELL_M27] = "dell-m27",
[STAC_9200_PANASONIC] = "panasonic",
};
-@@ -1224,11 +1564,9 @@ static struct snd_pci_quirk stac9200_cfg
+@@ -1224,11 +1564,9 @@
/* Panasonic */
SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-74", STAC_9200_PANASONIC),
/* Gateway machines needs EAPD to be set on resume */
/* OQO Mobile */
SND_PCI_QUIRK(0x1106, 0x3288, "OQO Model 2", STAC_9200_OQO),
{} /* terminator */
-@@ -1239,44 +1577,85 @@ static unsigned int ref925x_pin_configs[
+@@ -1239,44 +1577,85 @@
0x90a70320, 0x02214210, 0x01019020, 0x9033032e,
};
-static unsigned int stac925x_MA6_pin_configs[8] = {
- 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021,
- 0x90a70320, 0x90100211, 0x400003f1, 0x9033032e,
-+static unsigned int stac925xM1_pin_configs[8] = {
-+ 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
-+ 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e,
- };
-
+-};
+-
-static unsigned int stac925x_PA6_pin_configs[8] = {
- 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021,
- 0x50a103f0, 0x90100211, 0x400003f1, 0x9033032e,
++static unsigned int stac925xM1_pin_configs[8] = {
++ 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
++ 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e,
++};
++
+static unsigned int stac925xM1_2_pin_configs[8] = {
+ 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
+ 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e,
{} /* terminator */
};
-@@ -1296,12 +1675,19 @@ static unsigned int dell_m6_pin_configs[
+@@ -1296,12 +1675,19 @@
static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = {
[STAC_92HD73XX_REF] = ref92hd73xx_pin_configs,
};
static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = {
-@@ -1309,56 +1695,108 @@ static struct snd_pci_quirk stac92hd73xx
+@@ -1309,56 +1695,108 @@
SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
"DFI LanParty", STAC_92HD73XX_REF),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0254,
+ "unknown Dell", STAC_DELL_M6_AMIC),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0271,
- "unknown Dell", STAC_DELL_M6),
+- {} /* terminator */
+-};
+-
+-static unsigned int ref92hd71bxx_pin_configs[10] = {
+ "unknown Dell", STAC_DELL_M6_DMIC),
+ SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0272,
+ "unknown Dell", STAC_DELL_M6_DMIC),
+ /* SigmaTel reference board */
+ SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
+ "DFI LanParty", STAC_92HD83XXX_REF),
- {} /* terminator */
- };
-
--static unsigned int ref92hd71bxx_pin_configs[10] = {
++ {} /* terminator */
++};
++
+static unsigned int ref92hd71bxx_pin_configs[11] = {
0x02214030, 0x02a19040, 0x01a19020, 0x01014010,
- 0x0181302e, 0x01114010, 0x01019020, 0x90a000f0,
- 0x90a000f0, 0x01452050,
+-};
+-
+-static unsigned int dell_m4_1_pin_configs[10] = {
+ 0x0181302e, 0x01014010, 0x01019020, 0x90a000f0,
+ 0x90a000f0, 0x01452050, 0x01452050,
- };
-
--static unsigned int dell_m4_1_pin_configs[10] = {
++};
++
+static unsigned int dell_m4_1_pin_configs[11] = {
0x0421101f, 0x04a11221, 0x40f000f0, 0x90170110,
0x23a1902e, 0x23014250, 0x40f000f0, 0x90a000f0,
- 0x40f000f0, 0x4f0000f0,
-+ 0x40f000f0, 0x4f0000f0, 0x4f0000f0,
- };
-
+-};
+-
-static unsigned int dell_m4_2_pin_configs[10] = {
++ 0x40f000f0, 0x4f0000f0, 0x4f0000f0,
++};
++
+static unsigned int dell_m4_2_pin_configs[11] = {
0x0421101f, 0x04a11221, 0x90a70330, 0x90170110,
0x23a1902e, 0x23014250, 0x40f000f0, 0x40f000f0,
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233,
"unknown Dell", STAC_DELL_M4_1),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0234,
-@@ -1381,6 +1819,8 @@ static struct snd_pci_quirk stac92hd71bx
+@@ -1381,6 +1819,8 @@
"unknown Dell", STAC_DELL_M4_2),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0264,
"unknown Dell", STAC_DELL_M4_2),
{} /* terminator */
};
-@@ -1477,6 +1917,11 @@ static unsigned int intel_mac_v5_pin_con
+@@ -1477,6 +1917,11 @@
0x400000fc, 0x400000fb,
};
static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = {
[STAC_D945_REF] = ref922x_pin_configs,
-@@ -1495,6 +1940,7 @@ static unsigned int *stac922x_brd_tbl[ST
+@@ -1495,6 +1940,7 @@
[STAC_MACBOOK_PRO_V2] = intel_mac_v3_pin_configs,
[STAC_IMAC_INTEL] = intel_mac_v2_pin_configs,
[STAC_IMAC_INTEL_20] = intel_mac_v3_pin_configs,
[STAC_922X_DELL_D81] = dell_922x_d81_pin_configs,
[STAC_922X_DELL_D82] = dell_922x_d82_pin_configs,
[STAC_922X_DELL_M81] = dell_922x_m81_pin_configs,
-@@ -1518,6 +1964,7 @@ static const char *stac922x_models[STAC_
+@@ -1518,6 +1964,7 @@
[STAC_MACBOOK_PRO_V2] = "macbook-pro",
[STAC_IMAC_INTEL] = "imac-intel",
[STAC_IMAC_INTEL_20] = "imac-intel-20",
[STAC_922X_DELL_D81] = "dell-d81",
[STAC_922X_DELL_D82] = "dell-d82",
[STAC_922X_DELL_M81] = "dell-m81",
-@@ -1581,6 +2028,9 @@ static struct snd_pci_quirk stac922x_cfg
+@@ -1581,6 +2028,9 @@
"Intel D945P", STAC_D945GTP3),
SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0707,
"Intel D945P", STAC_D945GTP5),
/* other systems */
/* Apple Intel Mac (Mac Mini, MacBook, MacBook Pro...) */
SND_PCI_QUIRK(0x8384, 0x7680,
-@@ -1604,6 +2054,33 @@ static struct snd_pci_quirk stac922x_cfg
+@@ -1604,6 +2054,33 @@
"unknown Dell", STAC_922X_DELL_D81),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d7,
"Dell XPS M1210", STAC_922X_DELL_M82),
{} /* terminator */
};
-@@ -1636,6 +2113,7 @@ static unsigned int dell_3st_pin_configs
+@@ -1636,6 +2113,7 @@
};
static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = {
[STAC_D965_REF] = ref927x_pin_configs,
[STAC_D965_3ST] = d965_3st_pin_configs,
[STAC_D965_5ST] = d965_5st_pin_configs,
-@@ -1644,6 +2122,7 @@ static unsigned int *stac927x_brd_tbl[ST
+@@ -1644,6 +2122,7 @@
};
static const char *stac927x_models[STAC_927X_MODELS] = {
[STAC_D965_REF] = "ref",
[STAC_D965_3ST] = "3stack",
[STAC_D965_5ST] = "5stack",
-@@ -1751,6 +2230,7 @@ static unsigned int *stac9205_brd_tbl[ST
+@@ -1751,6 +2230,7 @@
[STAC_9205_DELL_M42] = dell_9205_m42_pin_configs,
[STAC_9205_DELL_M43] = dell_9205_m43_pin_configs,
[STAC_9205_DELL_M44] = dell_9205_m44_pin_configs,
};
static const char *stac9205_models[STAC_9205_MODELS] = {
-@@ -1758,12 +2238,14 @@ static const char *stac9205_models[STAC_
+@@ -1758,12 +2238,14 @@
[STAC_9205_DELL_M42] = "dell-m42",
[STAC_9205_DELL_M43] = "dell-m43",
[STAC_9205_DELL_M44] = "dell-m44",
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f1,
"unknown Dell", STAC_9205_DELL_M42),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f2,
-@@ -1794,6 +2276,8 @@ static struct snd_pci_quirk stac9205_cfg
+@@ -1794,6 +2276,8 @@
"Dell Inspiron", STAC_9205_DELL_M44),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0228,
"Dell Vostro 1500", STAC_9205_DELL_M42),
{} /* terminator */
};
-@@ -1867,6 +2351,8 @@ static int stac92xx_playback_pcm_open(st
+@@ -1867,6 +2351,8 @@
struct snd_pcm_substream *substream)
{
struct sigmatel_spec *spec = codec->spec;
return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream,
hinfo);
}
-@@ -1919,7 +2405,6 @@ static int stac92xx_dig_playback_pcm_pre
+@@ -1919,7 +2405,6 @@
stream_tag, format, substream);
}
/*
* Analog capture callbacks
*/
-@@ -1930,9 +2415,14 @@ static int stac92xx_capture_pcm_prepare(
+@@ -1930,9 +2415,14 @@
struct snd_pcm_substream *substream)
{
struct sigmatel_spec *spec = codec->spec;
-+ hda_nid_t nid = spec->adc_nids[substream->number];
-
+-
- snd_hda_codec_setup_stream(codec, spec->adc_nids[substream->number],
- stream_tag, 0, format);
++ hda_nid_t nid = spec->adc_nids[substream->number];
++
+ if (spec->powerdown_adcs) {
+ msleep(40);
+ snd_hda_codec_write_cache(codec, nid, 0,
return 0;
}
-@@ -1941,8 +2431,12 @@ static int stac92xx_capture_pcm_cleanup(
+@@ -1941,8 +2431,12 @@
struct snd_pcm_substream *substream)
{
struct sigmatel_spec *spec = codec->spec;
-+ hda_nid_t nid = spec->adc_nids[substream->number];
-
+-
- snd_hda_codec_cleanup_stream(codec, spec->adc_nids[substream->number]);
++ hda_nid_t nid = spec->adc_nids[substream->number];
++
+ snd_hda_codec_cleanup_stream(codec, nid);
+ if (spec->powerdown_adcs)
+ snd_hda_codec_write_cache(codec, nid, 0,
return 0;
}
-@@ -2009,6 +2503,8 @@ static int stac92xx_build_pcms(struct hd
+@@ -2009,6 +2503,8 @@
info->name = "STAC92xx Analog";
info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_playback;
info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture;
info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0];
info->stream[SNDRV_PCM_STREAM_CAPTURE].substreams = spec->num_adcs;
-@@ -2069,7 +2565,7 @@ static int stac92xx_hp_switch_get(struct
+@@ -2069,7 +2565,7 @@
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
struct sigmatel_spec *spec = codec->spec;
return 0;
}
-@@ -2078,8 +2574,9 @@ static int stac92xx_hp_switch_put(struct
+@@ -2078,8 +2574,9 @@
{
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
struct sigmatel_spec *spec = codec->spec;
-+ int nid = kcontrol->private_value;
-
+-
- spec->hp_switch = ucontrol->value.integer.value[0];
++ int nid = kcontrol->private_value;
++
+ spec->hp_switch = ucontrol->value.integer.value[0] ? nid : 0;
/* check to be sure that the ports are upto date with
* switch changes
-@@ -2193,6 +2690,8 @@ enum {
+@@ -2193,6 +2690,8 @@
STAC_CTL_WIDGET_VOL,
STAC_CTL_WIDGET_MUTE,
STAC_CTL_WIDGET_MONO_MUX,
STAC_CTL_WIDGET_HP_SWITCH,
STAC_CTL_WIDGET_IO_SWITCH,
STAC_CTL_WIDGET_CLFE_SWITCH
-@@ -2202,13 +2701,18 @@ static struct snd_kcontrol_new stac92xx_
+@@ -2202,13 +2701,18 @@
HDA_CODEC_VOLUME(NULL, 0, 0, 0),
HDA_CODEC_MUTE(NULL, 0, 0, 0),
STAC_MONO_MUX,
{
struct snd_kcontrol_new *knew;
-@@ -2227,15 +2731,33 @@ static int stac92xx_add_control(struct s
+@@ -2227,13 +2731,31 @@
}
knew = &spec->kctl_alloc[spec->num_kctl_used];
knew->private_value = val;
spec->num_kctl_used++;
return 0;
- }
-
++}
++
+static inline int stac92xx_add_control_idx(struct sigmatel_spec *spec,
+ int type, int idx, const char *name,
+ unsigned long val)
+ const char *name, unsigned long val)
+{
+ return stac92xx_add_control_idx(spec, type, 0, name, val);
-+}
-+
+ }
+
/* flag inputs as additional dynamic lineouts */
- static int stac92xx_add_dyn_out_pins(struct hda_codec *codec, struct auto_pin_cfg *cfg)
- {
-@@ -2379,14 +2901,34 @@ static int stac92xx_auto_fill_dac_nids(s
+@@ -2379,14 +2901,34 @@
}
/* create volume control/switch for the given prefx type */
-static int create_controls(struct sigmatel_spec *spec, const char *pfx, hda_nid_t nid, int chs)
+-{
+static int create_controls(struct hda_codec *codec, const char *pfx,
+ hda_nid_t nid, int chs)
- {
++{
+ struct sigmatel_spec *spec = codec->spec;
char name[32];
int err;
-
++
+ if (!spec->check_volume_offset) {
+ unsigned int caps, step, nums, db_scale;
+ caps = query_amp_caps(codec, nid, HDA_OUTPUT);
+ spec->volume_offset = nums / 2;
+ spec->check_volume_offset = 1;
+ }
-+
+
sprintf(name, "%s Playback Volume", pfx);
err = stac92xx_add_control(spec, STAC_CTL_WIDGET_VOL, name,
- HDA_COMPOSE_AMP_VAL(nid, chs, 0, HDA_OUTPUT));
if (err < 0)
return err;
sprintf(name, "%s Playback Switch", pfx);
-@@ -2427,7 +2969,7 @@ static int stac92xx_auto_create_multi_ou
+@@ -2427,7 +2969,7 @@
static const char *chname[4] = {
"Front", "Surround", NULL /*CLFE*/, "Side"
};
int i, err;
struct sigmatel_spec *spec = codec->spec;
-@@ -2442,10 +2984,10 @@ static int stac92xx_auto_create_multi_ou
+@@ -2442,10 +2984,10 @@
if (i == 2) {
/* Center/LFE */
- err = create_controls(spec, "Center", nid, 1);
-+ err = create_controls(codec, "Center", nid, 1);
- if (err < 0)
- return err;
+- if (err < 0)
+- return err;
- err = create_controls(spec, "LFE", nid, 2);
++ err = create_controls(codec, "Center", nid, 1);
++ if (err < 0)
++ return err;
+ err = create_controls(codec, "LFE", nid, 2);
if (err < 0)
return err;
-@@ -2461,16 +3003,21 @@ static int stac92xx_auto_create_multi_ou
+@@ -2461,16 +3003,21 @@
}
} else {
- err = create_controls(spec, chname[i], nid, 3);
-+ err = create_controls(codec, chname[i], nid, 3);
- if (err < 0)
- return err;
- }
- }
-
+- if (err < 0)
+- return err;
+- }
+- }
+-
- if (cfg->hp_outs > 1) {
++ err = create_controls(codec, chname[i], nid, 3);
++ if (err < 0)
++ return err;
++ }
++ }
++
+ if ((spec->multiout.num_dacs - cfg->line_outs) > 0 &&
+ cfg->hp_outs == 1 && !spec->multiout.hp_nid)
+ spec->multiout.hp_nid = nid;
if (err < 0)
return err;
}
-@@ -2563,13 +3110,13 @@ static int stac92xx_auto_create_hp_ctls(
+@@ -2563,13 +3110,13 @@
static const char *pfxs[] = {
"Speaker", "External Speaker", "Speaker2",
};
spec->multiout.hp_nid, 3);
if (err < 0)
return err;
-@@ -2579,8 +3126,8 @@ static int stac92xx_auto_create_hp_ctls(
+@@ -2579,8 +3126,8 @@
}
/* labels for mono mux outputs */
};
/* create mono mux for mono out on capable codecs */
-@@ -2609,27 +3156,174 @@ static int stac92xx_auto_create_mono_out
- "Mono Mux", spec->mono_nid);
- }
+@@ -2607,6 +3154,153 @@
--/* labels for dmic mux inputs */
--static const char *stac92xx_dmic_labels[5] = {
-- "Analog Inputs", "Digital Mic 1", "Digital Mic 2",
-- "Digital Mic 3", "Digital Mic 4"
+ return stac92xx_add_control(spec, STAC_CTL_WIDGET_MONO_MUX,
+ "Mono Mux", spec->mono_nid);
++}
++
+/* labels for amp mux outputs */
+static const char *stac92xx_amp_labels[3] = {
+ "Front Microphone", "Microphone", "Line In",
- };
-
--/* create playback/capture controls for input pins on dmic capable codecs */
--static int stac92xx_auto_create_dmic_input_ctls(struct hda_codec *codec,
-- const struct auto_pin_cfg *cfg)
++};
++
+/* create amp out controls mux on capable codecs */
+static int stac92xx_auto_create_amp_output_ctls(struct hda_codec *codec)
- {
- struct sigmatel_spec *spec = codec->spec;
-- struct hda_input_mux *dimux = &spec->private_dimux;
-- hda_nid_t con_lst[HDA_MAX_NUM_INPUTS];
-- int err, i, j;
-- char name[32];
++{
++ struct sigmatel_spec *spec = codec->spec;
+ struct hda_input_mux *amp_mux = &spec->private_amp_mux;
+ int i, err;
-
-- dimux->items[dimux->num_items].label = stac92xx_dmic_labels[0];
-- dimux->items[dimux->num_items].index = 0;
-- dimux->num_items++;
++
+ for (i = 0; i < spec->num_amps; i++) {
+ amp_mux->items[amp_mux->num_items].label =
+ stac92xx_amp_labels[i];
+ amp_mux->items[amp_mux->num_items].index = i;
+ amp_mux->num_items++;
+ }
-
-- for (i = 0; i < spec->num_dmics; i++) {
++
+ if (spec->num_amps > 1) {
+ err = stac92xx_add_control(spec, STAC_CTL_WIDGET_AMP_MUX,
+ "Amp Selector Capture Switch", 0);
+ }
+
+ return 0;
-+}
-+
-+/* labels for dmic mux inputs */
-+static const char *stac92xx_dmic_labels[5] = {
-+ "Analog Inputs", "Digital Mic 1", "Digital Mic 2",
-+ "Digital Mic 3", "Digital Mic 4"
-+};
-+
-+/* create playback/capture controls for input pins on dmic capable codecs */
-+static int stac92xx_auto_create_dmic_input_ctls(struct hda_codec *codec,
-+ const struct auto_pin_cfg *cfg)
-+{
-+ struct sigmatel_spec *spec = codec->spec;
-+ struct hda_input_mux *dimux = &spec->private_dimux;
-+ hda_nid_t con_lst[HDA_MAX_NUM_INPUTS];
-+ int err, i, j;
-+ char name[32];
-+
-+ dimux->items[dimux->num_items].label = stac92xx_dmic_labels[0];
-+ dimux->items[dimux->num_items].index = 0;
-+ dimux->num_items++;
-+
-+ for (i = 0; i < spec->num_dmics; i++) {
- hda_nid_t nid;
- int index;
- int num_cons;
-@@ -2656,16 +3350,19 @@ static int stac92xx_auto_create_dmic_inp
+ }
+
+ /* labels for dmic mux inputs */
+@@ -2656,16 +3350,19 @@
}
continue;
found:
- wcaps = get_wcaps(codec, nid);
+-
+- if (wcaps & AC_WCAP_OUT_AMP) {
+ wcaps = get_wcaps(codec, nid) &
+ (AC_WCAP_OUT_AMP | AC_WCAP_IN_AMP);
-
-- if (wcaps & AC_WCAP_OUT_AMP) {
++
+ if (wcaps) {
sprintf(name, "%s Capture Volume",
stac92xx_dmic_labels[dimux->num_items]);
if (err < 0)
return err;
}
-@@ -2789,8 +3486,8 @@ static int stac92xx_parse_auto_config(st
+@@ -2789,8 +3486,8 @@
hp_speaker_swap = 1;
}
if (spec->autocfg.mono_out_pin) {
u32 caps = query_amp_caps(codec,
spec->autocfg.mono_out_pin, dir);
hda_nid_t conn_list[1];
-@@ -2812,21 +3509,26 @@ static int stac92xx_parse_auto_config(st
+@@ -2812,21 +3509,26 @@
!(wcaps & AC_WCAP_LR_SWAP))
spec->mono_nid = conn_list[0];
}
- "Mono Playback Volume",
- HDA_COMPOSE_AMP_VAL(spec->autocfg.mono_out_pin,
- 1, 0, dir));
+- if (err < 0)
+- return err;
+ if (dir) {
+ hda_nid_t nid = spec->autocfg.mono_out_pin;
+
+ err = stac92xx_add_control(spec, STAC_CTL_WIDGET_MUTE,
+ "Mono Playback Switch",
+ HDA_COMPOSE_AMP_VAL(nid, 1, 0, dir));
- if (err < 0)
- return err;
++ if (err < 0)
++ return err;
+ /* check for volume support for the amp */
+ if ((caps & AC_AMPCAP_NUM_STEPS)
+ >> AC_AMPCAP_NUM_STEPS_SHIFT) {
}
stac92xx_auto_set_pinctl(codec, spec->autocfg.mono_out_pin,
-@@ -2835,14 +3537,45 @@ static int stac92xx_parse_auto_config(st
+@@ -2835,14 +3537,45 @@
if ((err = stac92xx_add_dyn_out_pins(codec, &spec->autocfg)) < 0)
return err;
+ if (spec->multiout.num_dacs == 0) {
if ((err = stac92xx_auto_fill_dac_nids(codec, &spec->autocfg)) < 0)
return err;
+-
+- err = stac92xx_auto_create_multi_out_ctls(codec, &spec->autocfg);
+-
+- if (err < 0)
+- return err;
+ err = stac92xx_auto_create_multi_out_ctls(codec,
+ &spec->autocfg);
+ if (err < 0)
+ return err;
+ }
-
-- err = stac92xx_auto_create_multi_out_ctls(codec, &spec->autocfg);
++
+ /* setup analog beep controls */
+ if (spec->anabeep_nid > 0) {
+ err = stac92xx_auto_create_beep_ctls(codec,
+ if (err < 0)
+ return err;
+ }
-
-- if (err < 0)
-- return err;
++
+ /* setup digital beep controls and input device */
+#ifdef CONFIG_SND_HDA_INPUT_BEEP
+ if (spec->digbeep_nid > 0) {
if (hp_speaker_swap == 1) {
/* Restore the hp_outs and line_outs */
-@@ -2872,11 +3605,25 @@ static int stac92xx_parse_auto_config(st
+@@ -2872,11 +3605,25 @@
if (err < 0)
return err;
}
spec->multiout.max_channels = spec->multiout.num_dacs * 2;
if (spec->multiout.max_channels > 2)
-@@ -2884,17 +3631,17 @@ static int stac92xx_parse_auto_config(st
+@@ -2884,17 +3631,17 @@
if (spec->autocfg.dig_out_pin)
spec->multiout.dig_out_nid = dig_out;
return 1;
}
-@@ -2959,7 +3706,7 @@ static int stac9200_auto_create_lfe_ctls
+@@ -2959,7 +3706,7 @@
}
if (lfe_pin) {
if (err < 0)
return err;
}
-@@ -2984,6 +3731,12 @@ static int stac9200_parse_auto_config(st
+@@ -2983,6 +3730,12 @@
+
if ((err = stac9200_auto_create_lfe_ctls(codec, &spec->autocfg)) < 0)
return err;
-
++
+ if (spec->num_muxes > 0) {
+ err = stac92xx_auto_create_mux_input_ctls(codec);
+ if (err < 0)
+ return err;
+ }
-+
+
if (spec->autocfg.dig_out_pin)
spec->multiout.dig_out_nid = 0x05;
- if (spec->autocfg.dig_in_pin)
-@@ -3066,14 +3819,34 @@ static void stac92xx_power_down(struct h
+@@ -3066,13 +3819,33 @@
AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
}
int i;
snd_hda_sequence_write(codec, spec->init);
-
++
+ /* power down adcs initially */
+ if (spec->powerdown_adcs)
+ for (i = 0; i < spec->num_adcs; i++)
+ if (!spec->eapd_switch)
+ gpio |= spec->eapd_mask;
+ stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, gpio);
-+
+
/* set up pins */
if (spec->hp_detect) {
- /* Enable unsolicited responses on the HP widget */
-@@ -3095,48 +3868,61 @@ static int stac92xx_init(struct hda_code
+@@ -3095,48 +3868,61 @@
for (i = 0; i < AUTO_PIN_LAST; i++) {
hda_nid_t nid = cfg->input_pins[i];
if (nid) {
for (i = 0; i < spec->num_dmics; i++)
stac92xx_auto_set_pinctl(codec, spec->dmic_nids[i],
AC_PINCTL_IN_EN);
-+ if (cfg->dig_out_pin)
-+ stac92xx_auto_set_pinctl(codec, cfg->dig_out_pin,
-+ AC_PINCTL_OUT_EN);
-+ if (cfg->dig_in_pin)
-+ stac92xx_auto_set_pinctl(codec, cfg->dig_in_pin,
-+ AC_PINCTL_IN_EN);
- for (i = 0; i < spec->num_pwrs; i++) {
+- for (i = 0; i < spec->num_pwrs; i++) {
- int event = is_nid_hp_pin(cfg, spec->pwr_nids[i])
- ? STAC_HP_EVENT : STAC_PWR_EVENT;
- int pinctl = snd_hda_codec_read(codec, spec->pwr_nids[i],
- int def_conf = snd_hda_codec_read(codec, spec->pwr_nids[i],
- 0, AC_VERB_GET_CONFIG_DEFAULT, 0);
- def_conf = get_defcfg_connect(def_conf);
+- /* outputs are only ports capable of power management
+- * any attempts on powering down a input port cause the
+- * referenced VREF to act quirky.
+- */
+- if (pinctl & AC_PINCTL_IN_EN)
+- continue;
+- /* skip any ports that don't have jacks since presence
+- * detection is useless */
+- if (def_conf && def_conf != AC_JACK_PORT_FIXED)
+- continue;
+- enable_pin_detect(codec, spec->pwr_nids[i], event | i);
+- codec->patch_ops.unsol_event(codec, (event | i) << 26);
+- }
+- if (spec->dac_list)
+- stac92xx_power_down(codec);
+ if (cfg->dig_out_pin)
+ stac92xx_auto_set_pinctl(codec, cfg->dig_out_pin,
+ AC_PINCTL_OUT_EN);
+ if (cfg->dig_in_pin)
+ stac92xx_auto_set_pinctl(codec, cfg->dig_in_pin,
+ AC_PINCTL_IN_EN);
+-
+- stac_gpio_set(codec, spec->gpio_mask,
+- spec->gpio_dir, spec->gpio_data);
+-
++ for (i = 0; i < spec->num_pwrs; i++) {
+ hda_nid_t nid = spec->pwr_nids[i];
+ int pinctl, def_conf;
+ int event = STAC_PWR_EVENT;
+
+ pinctl = snd_hda_codec_read(codec, nid, 0,
+ AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
- /* outputs are only ports capable of power management
- * any attempts on powering down a input port cause the
- * referenced VREF to act quirky.
- */
- if (pinctl & AC_PINCTL_IN_EN)
- continue;
++ /* outputs are only ports capable of power management
++ * any attempts on powering down a input port cause the
++ * referenced VREF to act quirky.
++ */
++ if (pinctl & AC_PINCTL_IN_EN)
++ continue;
+ def_conf = snd_hda_codec_read(codec, nid, 0,
+ AC_VERB_GET_CONFIG_DEFAULT, 0);
+ def_conf = get_defcfg_connect(def_conf);
- /* skip any ports that don't have jacks since presence
- * detection is useless */
-- if (def_conf && def_conf != AC_JACK_PORT_FIXED)
++ /* skip any ports that don't have jacks since presence
++ * detection is useless */
+ if (def_conf != AC_JACK_PORT_COMPLEX) {
+ if (def_conf != AC_JACK_PORT_NONE)
+ stac_toggle_power_map(codec, nid, 1);
- continue;
++ continue;
+ }
- enable_pin_detect(codec, spec->pwr_nids[i], event | i);
- codec->patch_ops.unsol_event(codec, (event | i) << 26);
- }
- if (spec->dac_list)
- stac92xx_power_down(codec);
-- if (cfg->dig_out_pin)
-- stac92xx_auto_set_pinctl(codec, cfg->dig_out_pin,
-- AC_PINCTL_OUT_EN);
-- if (cfg->dig_in_pin)
-- stac92xx_auto_set_pinctl(codec, cfg->dig_in_pin,
-- AC_PINCTL_IN_EN);
--
-- stac_gpio_set(codec, spec->gpio_mask,
-- spec->gpio_dir, spec->gpio_data);
--
++ enable_pin_detect(codec, spec->pwr_nids[i], event | i);
++ codec->patch_ops.unsol_event(codec, (event | i) << 26);
++ }
++ if (spec->dac_list)
++ stac92xx_power_down(codec);
return 0;
}
-@@ -3158,6 +3944,7 @@ static void stac92xx_free(struct hda_cod
+@@ -3158,6 +3944,7 @@
kfree(spec->bios_pin_configs);
kfree(spec);
}
static void stac92xx_set_pinctl(struct hda_codec *codec, hda_nid_t nid,
-@@ -3218,11 +4005,30 @@ static int get_hp_pin_presence(struct hd
+@@ -3218,11 +4005,30 @@
return 0;
}
int i, presence;
presence = 0;
-@@ -3233,75 +4039,109 @@ static void stac92xx_hp_detect(struct hd
+@@ -3233,75 +4039,109 @@
for (i = 0; i < cfg->hp_outs; i++) {
if (presence)
break;
}
-static void stac92xx_pin_sense(struct hda_codec *codec, int idx)
-+static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid,
-+ int enable)
- {
- struct sigmatel_spec *spec = codec->spec;
+-{
+- struct sigmatel_spec *spec = codec->spec;
- hda_nid_t nid = spec->pwr_nids[idx];
- int presence, val;
- val = snd_hda_codec_read(codec, codec->afg, 0, 0x0fec, 0x0)
- & 0x000000ff;
- presence = get_hp_pin_presence(codec, nid);
- idx = 1 << idx;
+-
+- if (presence)
++static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid,
++ int enable)
++{
++ struct sigmatel_spec *spec = codec->spec;
+ unsigned int idx, val;
+
+ for (idx = 0; idx < spec->num_pwrs; idx++) {
+ idx = spec->pwr_mapping[idx];
+ else
+ idx = 1 << idx;
-
-- if (presence)
++
+ val = snd_hda_codec_read(codec, codec->afg, 0, 0x0fec, 0x0) & 0xff;
+ if (enable)
val &= ~idx;
}
}
-@@ -3375,7 +4215,8 @@ static int patch_stac9200(struct hda_cod
+@@ -3375,7 +4215,8 @@
spec->num_adcs = 1;
spec->num_pwrs = 0;
spec->board_config == STAC_9200_OQO)
spec->init = stac9200_eapd_init;
else
-@@ -3410,12 +4251,22 @@ static int patch_stac925x(struct hda_cod
+@@ -3410,12 +4251,22 @@
codec->spec = spec;
spec->num_pins = ARRAY_SIZE(stac925x_pin_nids);
spec->pin_nids = stac925x_pin_nids;
"using BIOS defaults\n");
err = stac92xx_save_bios_config_regs(codec);
if (err < 0) {
-@@ -3478,9 +4329,9 @@ static struct hda_input_mux stac92hd73xx
+@@ -3478,9 +4329,9 @@
.num_items = 4,
.items = {
{ "Analog Inputs", 0x0b },
}
};
-@@ -3495,6 +4346,7 @@ static int patch_stac92hd73xx(struct hda
+@@ -3495,6 +4346,7 @@
return -ENOMEM;
codec->spec = spec;
spec->num_pins = ARRAY_SIZE(stac92hd73xx_pin_nids);
spec->pin_nids = stac92hd73xx_pin_nids;
spec->board_config = snd_hda_check_board_config(codec,
-@@ -3546,53 +4398,72 @@ again:
+@@ -3546,53 +4398,72 @@
spec->aloopback_mask = 0x01;
spec->aloopback_shift = 8;
+ case STAC_DELL_M6_AMIC: /* Analog Mics */
stac92xx_set_config_reg(codec, 0x0b, 0x90A70170);
spec->num_dmics = 0;
-+ spec->private_dimux.num_items = 1;
- break;
+- break;
- case 0x10280271: /* Digital Mics */
- case 0x10280272:
- spec->init = dell_m6_core_init;
- /* fall-through */
- case 0x10280254:
- case 0x10280255:
++ spec->private_dimux.num_items = 1;
++ break;
+ case STAC_DELL_M6_DMIC: /* Digital Mics */
stac92xx_set_config_reg(codec, 0x13, 0x90A60160);
spec->num_dmics = 1;
-+ spec->private_dimux.num_items = 2;
- break;
+- break;
- case 0x10280256: /* Both */
- case 0x10280057:
++ spec->private_dimux.num_items = 2;
++ break;
+ case STAC_DELL_M6_BOTH: /* Both */
stac92xx_set_config_reg(codec, 0x0b, 0x90A70170);
stac92xx_set_config_reg(codec, 0x13, 0x90A60160);
break;
default:
spec->num_dmics = STAC92HD73XX_NUM_DMICS;
+- }
+ spec->num_smuxes = ARRAY_SIZE(stac92hd73xx_smux_nids);
+ spec->eapd_switch = 1;
- }
++ }
+ if (spec->board_config > STAC_92HD73XX_REF) {
+ /* GPIO0 High = Enable EAPD */
+ spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1;
if (!err) {
if (spec->board_config < 0) {
-@@ -3609,11 +4480,160 @@ again:
+@@ -3609,10 +4480,159 @@
return err;
}
+- codec->patch_ops = stac92xx_patch_ops;
+-
+- return 0;
+-}
+ if (spec->board_config == STAC_92HD73XX_NO_JD)
+ spec->hp_detect = 0;
+
+ return err;
+ }
+
- codec->patch_ops = stac92xx_patch_ops;
-
- return 0;
- }
-
++ codec->patch_ops = stac92xx_patch_ops;
++
++ return 0;
++}
++
+#ifdef SND_HDA_NEEDS_RESUME
+static void stac92hd71xx_set_power_state(struct hda_codec *codec, int pwr)
+{
+ { "Digital Mic 2", 0x03 },
+ }
+};
-+
+
static int patch_stac92hd71bxx(struct hda_codec *codec)
{
- struct sigmatel_spec *spec;
-@@ -3624,9 +4644,12 @@ static int patch_stac92hd71bxx(struct hd
+@@ -3624,9 +4644,12 @@
return -ENOMEM;
codec->spec = spec;
spec->board_config = snd_hda_check_board_config(codec,
STAC_92HD71BXX_MODELS,
stac92hd71bxx_models,
-@@ -3646,6 +4669,13 @@ again:
+@@ -3644,6 +4667,13 @@
+ } else {
+ spec->pin_configs = stac92hd71bxx_brd_tbl[spec->board_config];
stac92xx_set_config_regs(codec);
- }
-
++ }
++
+ if (spec->board_config > STAC_92HD71BXX_REF) {
+ /* GPIO0 = EAPD */
+ spec->gpio_mask = 0x01;
+ spec->gpio_dir = 0x01;
+ spec->gpio_data = 0x01;
-+ }
-+
+ }
+
switch (codec->vendor_id) {
- case 0x111d76b6: /* 4 Port without Analog Mixer */
- case 0x111d76b7:
-@@ -3653,47 +4683,101 @@ again:
+@@ -3653,47 +4683,101 @@
case 0x111d76b5:
spec->mixer = stac92hd71bxx_mixer;
spec->init = stac92hd71bxx_core_init;
+ spec->dinput_mux = &spec->private_dimux;
spec->mixer = stac92hd71bxx_analog_mixer;
spec->init = stac92hd71bxx_analog_core_init;
-+ codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
- }
-
+- }
+-
- spec->aloopback_mask = 0x20;
++ codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
++ }
++
+ spec->aloopback_mask = 0x50;
spec->aloopback_shift = 0;
err = stac92xx_parse_auto_config(codec, 0x21, 0x23);
if (!err) {
-@@ -3711,8 +4795,6 @@ again:
+@@ -3710,8 +4794,6 @@
+ stac92xx_free(codec);
return err;
}
-
-- codec->patch_ops = stac92xx_patch_ops;
-
+- codec->patch_ops = stac92xx_patch_ops;
+
return 0;
};
-
-@@ -3854,10 +4936,14 @@ static int patch_stac927x(struct hda_cod
+@@ -3854,10 +4936,14 @@
stac92xx_set_config_regs(codec);
}
spec->dac_list = stac927x_dac_nids;
spec->multiout.dac_nids = spec->dac_nids;
-@@ -3900,9 +4986,11 @@ static int patch_stac927x(struct hda_cod
+@@ -3900,9 +4986,11 @@
spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids);
break;
default:
spec->num_dmics = 0;
spec->init = stac927x_core_init;
-@@ -3912,6 +5000,7 @@ static int patch_stac927x(struct hda_cod
+@@ -3912,6 +5000,7 @@
spec->num_pwrs = 0;
spec->aloopback_mask = 0x40;
spec->aloopback_shift = 0;
err = stac92xx_parse_auto_config(codec, 0x1e, 0x20);
if (!err) {
-@@ -3942,6 +5031,10 @@ static int patch_stac927x(struct hda_cod
+@@ -3942,6 +5031,10 @@
*/
codec->bus->needs_damn_long_delay = 1;
return 0;
}
-@@ -3974,10 +5067,13 @@ static int patch_stac9205(struct hda_cod
+@@ -3974,10 +5067,13 @@
stac92xx_set_config_regs(codec);
}
spec->dmic_nids = stac9205_dmic_nids;
spec->num_dmics = STAC9205_NUM_DMICS;
spec->dmux_nids = stac9205_dmux_nids;
-@@ -3989,6 +5085,9 @@ static int patch_stac9205(struct hda_cod
+@@ -3989,6 +5085,9 @@
spec->aloopback_mask = 0x40;
spec->aloopback_shift = 0;
spec->multiout.dac_nids = spec->dac_nids;
switch (spec->board_config){
-@@ -3998,7 +5097,7 @@ static int patch_stac9205(struct hda_cod
+@@ -3998,7 +5097,7 @@
stac92xx_set_config_reg(codec, 0x20, 0x1c410030);
/* Enable unsol response for GPIO4/Dock HP connection */
AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK, 0x10);
snd_hda_codec_write_cache(codec, codec->afg, 0,
AC_VERB_SET_UNSOLICITED_ENABLE,
-@@ -4013,6 +5112,9 @@ static int patch_stac9205(struct hda_cod
+@@ -4012,6 +5111,9 @@
+ * GPIO3 Low = DRM
*/
spec->gpio_data = 0x01;
- break;
++ break;
+ case STAC_9205_REF:
+ /* SPDIF-In enabled */
-+ break;
+ break;
default:
/* GPIO0 High = EAPD */
- spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1;
-@@ -4332,6 +5434,8 @@ struct hda_codec_preset snd_hda_preset_s
+@@ -4332,6 +5434,8 @@
{ .id = 0x838476a6, .name = "STAC9254", .patch = patch_stac9205 },
{ .id = 0x838476a7, .name = "STAC9254D", .patch = patch_stac9205 },
{ .id = 0x111d7603, .name = "92HD75B3X5", .patch = patch_stac92hd71bxx},
{ .id = 0x111d7608, .name = "92HD75B2X5", .patch = patch_stac92hd71bxx},
{ .id = 0x111d7674, .name = "92HD73D1X5", .patch = patch_stac92hd73xx },
{ .id = 0x111d7675, .name = "92HD73C1X5", .patch = patch_stac92hd73xx },
-diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/hda/patch_via.c
---- linux-2.6.27/sound/pci/hda/patch_via.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/patch_via.c 2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/hda/patch_via.c
+--- a/sound/pci/hda/patch_via.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/patch_via.c Wed May 06 16:57:08 2009 +0100
@@ -1,10 +1,10 @@
/*
* Universal Interface for Intel High Definition Audio Codec
#define IS_VT1708B_4CH_VENDORID(x) ((x) >= 0x1106e724 && (x) <= 0x1106e727)
+#define IS_VT1708S_VENDORID(x) ((x) >= 0x11060397 && (x) <= 0x11067397)
+#define IS_VT1702_VENDORID(x) ((x) >= 0x11060398 && (x) <= 0x11067398)
-+
+
+enum VIA_HDA_CODEC {
+ UNKNOWN = -1,
+ VT1708,
+ codec_type = UNKNOWN;
+ return codec_type;
+};
-
++
+#define VIA_HP_EVENT 0x01
+#define VIA_GPIO_EVENT 0x02
enum {
VIA_CTL_WIDGET_VOL,
-@@ -77,12 +139,54 @@ enum {
+@@ -77,11 +139,53 @@
};
enum {
AUTO_SEQ_CENLFE,
AUTO_SEQ_SIDE
};
-
++
+#define get_amp_nid(kc) ((kc)->private_value & 0xffff)
+
+/* Some VT1708S based boards gets the micboost setting wrong, so we have
+ }
+ return 0;
+}
-+
+
static struct snd_kcontrol_new vt1708_control_templates[] = {
HDA_CODEC_VOLUME(NULL, 0, 0, 0),
- HDA_CODEC_MUTE(NULL, 0, 0, 0),
-@@ -94,7 +198,8 @@ struct via_spec {
+@@ -94,7 +198,8 @@
struct snd_kcontrol_new *mixers[3];
unsigned int num_mixers;
char *stream_name_analog;
struct hda_pcm_stream *stream_analog_playback;
-@@ -106,6 +211,7 @@ struct via_spec {
+@@ -106,6 +211,7 @@
/* playback */
struct hda_multi_out multiout;
/* capture */
unsigned int num_adc_nids;
-@@ -117,15 +223,19 @@ struct via_spec {
+@@ -117,14 +223,18 @@
unsigned int cur_mux[3];
/* PCM information */
- struct hda_input_mux private_imux;
+ struct hda_input_mux private_imux[2];
hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS];
-
++
+ /* HP mode source */
+ const struct hda_input_mux *hp_mux;
+ unsigned int hp_independent_mode;
-+
+
#ifdef CONFIG_SND_HDA_POWER_SAVE
struct hda_loopback_check loopback;
- #endif
-@@ -146,6 +256,16 @@ static hda_nid_t vt1708B_adc_nids[2] = {
+@@ -144,6 +254,16 @@
+ static hda_nid_t vt1708B_adc_nids[2] = {
+ /* ADC1-2 */
0x13, 0x14
- };
-
++};
++
+static hda_nid_t vt1708S_adc_nids[2] = {
+ /* ADC1-2 */
+ 0x13, 0x14
+static hda_nid_t vt1702_adc_nids[3] = {
+ /* ADC1-2 */
+ 0x12, 0x20, 0x1F
-+};
-+
+ };
+
/* add dynamic controls */
- static int via_add_control(struct via_spec *spec, int type, const char *name,
- unsigned long val)
-@@ -283,19 +403,108 @@ static int via_mux_enum_put(struct snd_k
+@@ -283,18 +403,107 @@
return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol,
0x18, &spec->cur_mux[adc_idx]);
else if ((IS_VT1709_10CH_VENDORID(vendor_id) ||
spec->adc_nids[adc_idx],
&spec->cur_mux[adc_idx]);
}
-
++
+static int via_independent_hp_info(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_info *uinfo)
+{
+ },
+ { } /* end */
+};
-+
+
/* capture mixer elements */
static struct snd_kcontrol_new vt1708_capture_mixer[] = {
- HDA_CODEC_VOLUME("Capture Volume", 0x15, 0x0, HDA_INPUT),
-@@ -380,6 +589,138 @@ static int via_playback_pcm_cleanup(stru
+@@ -380,6 +589,138 @@
return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout);
}
/*
* Digital out
*/
-@@ -399,6 +740,21 @@ static int via_dig_playback_pcm_close(st
+@@ -399,6 +740,21 @@
return snd_hda_multi_out_dig_close(codec, &spec->multiout);
}
static int via_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
unsigned int stream_tag,
-@@ -406,8 +762,20 @@ static int via_dig_playback_pcm_prepare(
+@@ -406,8 +762,20 @@
struct snd_pcm_substream *substream)
{
struct via_spec *spec = codec->spec;
}
/*
-@@ -436,14 +804,14 @@ static int via_capture_pcm_cleanup(struc
+@@ -436,14 +804,14 @@
}
static struct hda_pcm_stream vt1708_pcm_analog_playback = {
},
};
-@@ -515,6 +883,13 @@ static int via_build_controls(struct hda
+@@ -515,6 +883,13 @@
if (err < 0)
return err;
spec->multiout.share_spdif = 1;
}
if (spec->dig_in_nid) {
err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid);
-@@ -580,10 +955,89 @@ static void via_free(struct hda_codec *c
+@@ -580,10 +955,89 @@
kfree(codec->spec);
}
/* Lydia Add for EAPD enable */
if (!spec->dig_in_nid) { /* No Digital In connection */
if (IS_VT1708_VENDORID(codec->vendor_id)) {
-@@ -611,6 +1065,9 @@ static int via_init(struct hda_codec *co
+@@ -610,6 +1064,9 @@
+ } else /* enable SPDIF-input pin */
snd_hda_codec_write(codec, spec->autocfg.dig_in_pin, 0,
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN);
-
++
+ /* no slave outs */
+ codec->slave_dig_outs = slave_dig_outs;
-+
+
return 0;
}
-
-@@ -657,10 +1114,10 @@ static int vt1708_auto_fill_dac_nids(str
+@@ -657,10 +1114,10 @@
spec->multiout.dac_nids[i] = 0x12;
break;
case AUTO_SEQ_SURROUND:
break;
}
}
-@@ -685,7 +1142,7 @@ static int vt1708_auto_create_multi_out_
+@@ -685,7 +1142,7 @@
continue;
if (i != AUTO_SEQ_FRONT)
if (i == AUTO_SEQ_CENLFE) {
/* Center/LFE */
-@@ -760,6 +1217,24 @@ static int vt1708_auto_create_multi_out_
+@@ -760,6 +1217,24 @@
return 0;
}
static int vt1708_auto_create_hp_ctls(struct via_spec *spec, hda_nid_t pin)
{
int err;
-@@ -780,6 +1255,8 @@ static int vt1708_auto_create_hp_ctls(st
+@@ -780,6 +1255,8 @@
if (err < 0)
return err;
return 0;
}
-@@ -790,7 +1267,7 @@ static int vt1708_auto_create_analog_inp
+@@ -790,7 +1267,7 @@
static char *labels[] = {
"Mic", "Front Mic", "Line", "Front Line", "CD", "Aux", NULL
};
int i, err, idx = 0;
/* for internal loopback recording select */
-@@ -840,11 +1317,36 @@ static struct hda_amp_list vt1708_loopba
+@@ -840,10 +1317,35 @@
};
#endif
{
struct via_spec *spec = codec->spec;
int err;
-
++
+ /* Add HP and CD pin config connect bit re-config action */
+ vt1708_set_pinconfig_connect(codec, VT1708_HP_PIN_NID);
+ vt1708_set_pinconfig_connect(codec, VT1708_CD_PIN_NID);
-+
+
err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, NULL);
if (err < 0)
- return err;
-@@ -874,9 +1376,12 @@ static int vt1708_parse_auto_config(stru
+@@ -874,9 +1376,12 @@
if (spec->kctl_alloc)
spec->mixers[spec->num_mixers++] = spec->kctl_alloc;
- spec->init_verbs = vt1708_volume_init_verbs;
+ spec->init_verbs[spec->num_iverbs++] = vt1708_volume_init_verbs;
-+
-+ spec->input_mux = &spec->private_imux[0];
- spec->input_mux = &spec->private_imux;
++ spec->input_mux = &spec->private_imux[0];
++
+ if (spec->hp_mux)
+ spec->mixers[spec->num_mixers++] = via_hp_mixer;
return 1;
}
-@@ -897,7 +1402,7 @@ static int patch_vt1708(struct hda_codec
+@@ -897,7 +1402,7 @@
int err;
/* create a codec specific record */
if (spec == NULL)
return -ENOMEM;
-@@ -966,6 +1471,11 @@ static struct snd_kcontrol_new vt1709_ca
+@@ -964,6 +1469,11 @@
+ .put = via_mux_enum_put,
+ },
{ } /* end */
- };
-
++};
++
+static struct hda_verb vt1709_uniwill_init_verbs[] = {
+ {0x20, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | VIA_HP_EVENT},
+ { }
-+};
-+
+ };
+
/*
- * generic initialization of ADC, input mixers and output mixers
- */
-@@ -1090,11 +1600,11 @@ static int vt1709_auto_fill_dac_nids(str
+@@ -1090,11 +1600,11 @@
break;
case AUTO_SEQ_SURROUND:
/* AOW3 */
break;
default:
break;
-@@ -1203,26 +1713,26 @@ static int vt1709_auto_create_multi_out_
+@@ -1203,6 +1713,19 @@
} else if (i == AUTO_SEQ_SURROUND) {
sprintf(name, "%s Playback Volume", chname[i]);
err = via_add_control(spec, VIA_CTL_WIDGET_VOL, name,
-- HDA_COMPOSE_AMP_VAL(0x29, 3, 0,
+ HDA_COMPOSE_AMP_VAL(0x1a, 3, 0,
- HDA_OUTPUT));
- if (err < 0)
- return err;
- sprintf(name, "%s Playback Switch", chname[i]);
- err = via_add_control(spec, VIA_CTL_WIDGET_MUTE, name,
-- HDA_COMPOSE_AMP_VAL(0x29, 3, 0,
++ HDA_OUTPUT));
++ if (err < 0)
++ return err;
++ sprintf(name, "%s Playback Switch", chname[i]);
++ err = via_add_control(spec, VIA_CTL_WIDGET_MUTE, name,
+ HDA_COMPOSE_AMP_VAL(0x1a, 3, 0,
++ HDA_OUTPUT));
++ if (err < 0)
++ return err;
++ } else if (i == AUTO_SEQ_SIDE) {
++ sprintf(name, "%s Playback Volume", chname[i]);
++ err = via_add_control(spec, VIA_CTL_WIDGET_VOL, name,
+ HDA_COMPOSE_AMP_VAL(0x29, 3, 0,
HDA_OUTPUT));
if (err < 0)
- return err;
- } else if (i == AUTO_SEQ_SIDE) {
- sprintf(name, "%s Playback Volume", chname[i]);
- err = via_add_control(spec, VIA_CTL_WIDGET_VOL, name,
-- HDA_COMPOSE_AMP_VAL(0x1a, 3, 0,
-+ HDA_COMPOSE_AMP_VAL(0x29, 3, 0,
- HDA_OUTPUT));
- if (err < 0)
- return err;
+@@ -1210,19 +1733,6 @@
sprintf(name, "%s Playback Switch", chname[i]);
err = via_add_control(spec, VIA_CTL_WIDGET_MUTE, name,
+ HDA_COMPOSE_AMP_VAL(0x29, 3, 0,
+- HDA_OUTPUT));
+- if (err < 0)
+- return err;
+- } else if (i == AUTO_SEQ_SIDE) {
+- sprintf(name, "%s Playback Volume", chname[i]);
+- err = via_add_control(spec, VIA_CTL_WIDGET_VOL, name,
+- HDA_COMPOSE_AMP_VAL(0x1a, 3, 0,
+- HDA_OUTPUT));
+- if (err < 0)
+- return err;
+- sprintf(name, "%s Playback Switch", chname[i]);
+- err = via_add_control(spec, VIA_CTL_WIDGET_MUTE, name,
- HDA_COMPOSE_AMP_VAL(0x1a, 3, 0,
-+ HDA_COMPOSE_AMP_VAL(0x29, 3, 0,
HDA_OUTPUT));
if (err < 0)
return err;
-@@ -1265,7 +1775,7 @@ static int vt1709_auto_create_analog_inp
+@@ -1265,7 +1775,7 @@
static char *labels[] = {
"Mic", "Front Mic", "Line", "Front Line", "CD", "Aux", NULL
};
int i, err, idx = 0;
/* for internal loopback recording select */
-@@ -1339,7 +1849,10 @@ static int vt1709_parse_auto_config(stru
+@@ -1339,7 +1849,10 @@
if (spec->kctl_alloc)
spec->mixers[spec->num_mixers++] = spec->kctl_alloc;
return 1;
}
-@@ -1360,7 +1873,7 @@ static int patch_vt1709_10ch(struct hda_
+@@ -1360,7 +1873,7 @@
int err;
/* create a codec specific record */
if (spec == NULL)
return -ENOMEM;
-@@ -1375,7 +1888,8 @@ static int patch_vt1709_10ch(struct hda_
+@@ -1375,7 +1888,8 @@
"Using genenic mode...\n");
}
spec->stream_name_analog = "VT1709 Analog";
spec->stream_analog_playback = &vt1709_10ch_pcm_analog_playback;
-@@ -1396,6 +1910,7 @@ static int patch_vt1709_10ch(struct hda_
+@@ -1396,6 +1910,7 @@
codec->patch_ops = via_patch_ops;
codec->patch_ops.init = via_auto_init;
#ifdef CONFIG_SND_HDA_POWER_SAVE
spec->loopback.amplist = vt1709_loopbacks;
#endif
-@@ -1451,7 +1966,7 @@ static int patch_vt1709_6ch(struct hda_c
+@@ -1451,7 +1966,7 @@
int err;
/* create a codec specific record */
if (spec == NULL)
return -ENOMEM;
-@@ -1466,7 +1981,8 @@ static int patch_vt1709_6ch(struct hda_c
+@@ -1466,7 +1981,8 @@
"Using genenic mode...\n");
}
spec->stream_name_analog = "VT1709 Analog";
spec->stream_analog_playback = &vt1709_6ch_pcm_analog_playback;
-@@ -1487,6 +2003,7 @@ static int patch_vt1709_6ch(struct hda_c
+@@ -1487,6 +2003,7 @@
codec->patch_ops = via_patch_ops;
codec->patch_ops.init = via_auto_init;
#ifdef CONFIG_SND_HDA_POWER_SAVE
spec->loopback.amplist = vt1709_loopbacks;
#endif
-@@ -1586,27 +2103,32 @@ static struct hda_verb vt1708B_4ch_volum
+@@ -1586,27 +2103,32 @@
{ }
};
},
};
-@@ -1662,10 +2184,10 @@ static int vt1708B_auto_fill_dac_nids(st
+@@ -1662,10 +2184,10 @@
spec->multiout.dac_nids[i] = 0x24;
break;
case AUTO_SEQ_SURROUND:
break;
}
}
-@@ -1680,7 +2202,7 @@ static int vt1708B_auto_create_multi_out
+@@ -1680,7 +2202,7 @@
{
char name[32];
static const char *chname[4] = { "Front", "Surround", "C/LFE", "Side" };
hda_nid_t nid, nid_vol = 0;
int i, err;
-@@ -1785,6 +2307,8 @@ static int vt1708B_auto_create_hp_ctls(s
+@@ -1785,6 +2307,8 @@
if (err < 0)
return err;
return 0;
}
-@@ -1795,7 +2319,7 @@ static int vt1708B_auto_create_analog_in
+@@ -1795,7 +2319,7 @@
static char *labels[] = {
"Mic", "Front Mic", "Line", "Front Line", "CD", "Aux", NULL
};
int i, err, idx = 0;
/* for internal loopback recording select */
-@@ -1869,7 +2393,10 @@ static int vt1708B_parse_auto_config(str
+@@ -1869,7 +2393,10 @@
if (spec->kctl_alloc)
spec->mixers[spec->num_mixers++] = spec->kctl_alloc;
return 1;
}
-@@ -1890,7 +2417,7 @@ static int patch_vt1708B_8ch(struct hda_
+@@ -1890,7 +2417,7 @@
int err;
/* create a codec specific record */
if (spec == NULL)
return -ENOMEM;
-@@ -1906,7 +2433,8 @@ static int patch_vt1708B_8ch(struct hda_
+@@ -1906,7 +2433,8 @@
"from BIOS. Using genenic mode...\n");
}
spec->stream_name_analog = "VT1708B Analog";
spec->stream_analog_playback = &vt1708B_8ch_pcm_analog_playback;
-@@ -1926,6 +2454,7 @@ static int patch_vt1708B_8ch(struct hda_
+@@ -1926,6 +2454,7 @@
codec->patch_ops = via_patch_ops;
codec->patch_ops.init = via_auto_init;
#ifdef CONFIG_SND_HDA_POWER_SAVE
spec->loopback.amplist = vt1708B_loopbacks;
#endif
-@@ -1939,7 +2468,7 @@ static int patch_vt1708B_4ch(struct hda_
+@@ -1939,7 +2468,7 @@
int err;
/* create a codec specific record */
if (spec == NULL)
return -ENOMEM;
-@@ -1955,7 +2484,8 @@ static int patch_vt1708B_4ch(struct hda_
+@@ -1955,7 +2484,8 @@
"from BIOS. Using genenic mode...\n");
}
spec->stream_name_analog = "VT1708B Analog";
spec->stream_analog_playback = &vt1708B_4ch_pcm_analog_playback;
-@@ -1975,6 +2505,7 @@ static int patch_vt1708B_4ch(struct hda_
+@@ -1975,9 +2505,756 @@
codec->patch_ops = via_patch_ops;
codec->patch_ops.init = via_auto_init;
#ifdef CONFIG_SND_HDA_POWER_SAVE
spec->loopback.amplist = vt1708B_loopbacks;
#endif
-@@ -1982,6 +2513,752 @@ static int patch_vt1708B_4ch(struct hda_
- return 0;
- }
-
++
++ return 0;
++}
++
+/* Patch for VT1708S */
+
+/* VT1708S software backdoor based override for buggy hardware micboost
+ response = snd_hda_codec_read(codec, codec->afg, 0, 0xF84, 0);
+ control = (unsigned char)((response >> 16) & 0x3f);
+ snd_hda_codec_write(codec, codec->afg, 0, 0xF82, control);
-+
-+ return 0;
-+}
-+
- /*
- * patch entries
- */
-@@ -2022,5 +3299,37 @@ struct hda_codec_preset snd_hda_preset_v
+
+ return 0;
+ }
+@@ -2022,5 +3299,37 @@
.patch = patch_vt1708B_4ch},
{ .id = 0x1106E727, .name = "VIA VT1708B 4-Ch",
.patch = patch_vt1708B_4ch},
+ .patch = patch_vt1702},
{} /* terminator */
};
-diff -purN linux-2.6.27/sound/pci/oxygen/virtuoso.c linux-2.6.27.19-5.1/sound/pci/oxygen/virtuoso.c
---- linux-2.6.27/sound/pci/oxygen/virtuoso.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/oxygen/virtuoso.c 2009-03-25 16:10:55.000000000 +0000
+diff -r 9608d5473017 sound/pci/oxygen/virtuoso.c
+--- a/sound/pci/oxygen/virtuoso.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/oxygen/virtuoso.c Wed May 06 16:57:08 2009 +0100
@@ -26,7 +26,7 @@
* SPI 0 -> 1st PCM1796 (front)
* SPI 1 -> 2nd PCM1796 (surround)
*
* GPIO 2 -> M0 of CS5381
* GPIO 3 -> M1 of CS5381
-@@ -142,6 +142,12 @@ struct xonar_data {
+@@ -142,6 +142,12 @@
static void pcm1796_write(struct oxygen *chip, unsigned int codec,
u8 reg, u8 value)
{
/* maps ALSA channel pair number to SPI output */
static const u8 codec_map[4] = {
0, 1, 2, 4
-@@ -152,6 +158,7 @@ static void pcm1796_write(struct oxygen
+@@ -152,6 +158,7 @@
(codec_map[codec] << OXYGEN_SPI_CODEC_SHIFT) |
OXYGEN_SPI_CEN_LATCH_CLOCK_HI,
(reg << 8) | value);
}
static void cs4398_write(struct oxygen *chip, u8 reg, u8 value)
-@@ -539,6 +546,9 @@ static const DECLARE_TLV_DB_SCALE(cs4362
+@@ -539,6 +546,9 @@
static int xonar_d2_control_filter(struct snd_kcontrol_new *template)
{
if (!strncmp(template->name, "CD Capture ", 11))
/* CD in is actually connected to the video in pin */
template->private_value ^= AC97_CD ^ AC97_VIDEO;
-@@ -588,9 +598,8 @@ static const struct oxygen_model xonar_m
+@@ -588,9 +598,8 @@
.dac_volume_min = 0x0f,
.dac_volume_max = 0xff,
.misc_flags = OXYGEN_MISC_MIDI,
.adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
},
[MODEL_D2X] = {
-@@ -619,9 +628,8 @@ static const struct oxygen_model xonar_m
+@@ -619,9 +628,8 @@
.dac_volume_min = 0x0f,
.dac_volume_max = 0xff,
.misc_flags = OXYGEN_MISC_MIDI,
.adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
},
[MODEL_D1] = {
-diff -purN linux-2.6.27/sound/ppc/Kconfig linux-2.6.27.19-5.1/sound/ppc/Kconfig
---- linux-2.6.27/sound/ppc/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/ppc/Kconfig 2009-03-25 16:11:00.000000000 +0000
-@@ -48,4 +48,19 @@ config SND_PS3_DEFAULT_START_DELAY
+diff -r 9608d5473017 sound/ppc/Kconfig
+--- a/sound/ppc/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/sound/ppc/Kconfig Wed May 06 16:57:08 2009 +0100
+@@ -48,4 +48,19 @@
depends on SND_PS3
default "2000"
+endmenu
+
endif # SND_PPC
-diff -purN linux-2.6.27/sound/ppc/Makefile linux-2.6.27.19-5.1/sound/ppc/Makefile
---- linux-2.6.27/sound/ppc/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/ppc/Makefile 2009-03-25 16:11:00.000000000 +0000
+diff -r 9608d5473017 sound/ppc/Makefile
+--- a/sound/ppc/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/sound/ppc/Makefile Wed May 06 16:57:08 2009 +0100
@@ -4,7 +4,9 @@
#
obj-$(CONFIG_SND_POWERMAC) += snd-powermac.o
obj-$(CONFIG_SND_PS3) += snd_ps3.o
+obj-$(CONFIG_SND_PPC_MPC52xx_AC97) += snd-mpc52xx-ac97.o
-diff -purN linux-2.6.27/sound/ppc/mpc52xx_ac97.c linux-2.6.27.19-5.1/sound/ppc/mpc52xx_ac97.c
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/ppc/mpc52xx_ac97.c 2009-03-25 16:11:00.000000000 +0000
+diff -r 9608d5473017 sound/ppc/mpc52xx_ac97.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/sound/ppc/mpc52xx_ac97.c Wed May 06 16:57:08 2009 +0100
@@ -0,0 +1,807 @@
+/*
+ * Driver for the PSC of the Freescale MPC52xx configured as AC97 interface
+MODULE_DESCRIPTION(DRV_NAME ": Freescale MPC52xx PSC AC97 driver");
+MODULE_LICENSE("GPL");
+
-diff -purN linux-2.6.27/sound/ppc/snd_ps3.c linux-2.6.27.19-5.1/sound/ppc/snd_ps3.c
---- linux-2.6.27/sound/ppc/snd_ps3.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/ppc/snd_ps3.c 2009-03-25 16:11:00.000000000 +0000
-@@ -666,6 +666,7 @@ static int snd_ps3_init_avsetting(struct
+diff -r 9608d5473017 sound/ppc/snd_ps3.c
+--- a/sound/ppc/snd_ps3.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/ppc/snd_ps3.c Wed May 06 16:57:09 2009 +0100
+@@ -666,6 +666,7 @@
card->avs.avs_audio_width = PS3AV_CMD_AUDIO_WORD_BITS_16;
card->avs.avs_audio_format = PS3AV_CMD_AUDIO_FORMAT_PCM;
card->avs.avs_audio_source = PS3AV_CMD_AUDIO_SOURCE_SERIAL;
ret = snd_ps3_change_avsetting(card);
-@@ -685,6 +686,7 @@ static int snd_ps3_set_avsetting(struct
+@@ -685,6 +686,7 @@
{
struct snd_ps3_card_info *card = snd_pcm_substream_chip(substream);
struct snd_ps3_avsetting_info avs;
avs = card->avs;
-@@ -729,19 +731,92 @@ static int snd_ps3_set_avsetting(struct
+@@ -729,19 +731,92 @@
return 1;
}
+ snd_ps3_change_avsetting(card);
+ ret = 0;
} else
+- return 1;
+ ret = 1;
+
+ /* check CS non-audio bit and mute accordingly */
+ ps3av_audio_mute_analog(0);
+
+ return ret;
-+}
-+
+ }
+
+/*
+ * SPDIF status bits controls
+ */
+{
+ if (memcmp(ps3av_mode_cs_info, ucontrol->value.iec958.status, 8)) {
+ memcpy(ps3av_mode_cs_info, ucontrol->value.iec958.status, 8);
- return 1;
++ return 1;
+ }
+ return 0;
- }
-
++}
++
+static struct snd_kcontrol_new spdif_ctls[] = {
+ {
+ .access = SNDRV_CTL_ELEM_ACCESS_READ,
static int snd_ps3_map_mmio(void)
-@@ -842,7 +917,7 @@ static void snd_ps3_audio_set_base_addr(
+@@ -842,7 +917,7 @@
static int __init snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
{
u64 lpar_addr, lpar_size;
BUG_ON(!firmware_has_feature(FW_FEATURE_PS3_LV1));
-@@ -903,6 +978,15 @@ static int __init snd_ps3_driver_probe(s
+@@ -903,6 +978,15 @@
strcpy(the_card.card->driver, "PS3");
strcpy(the_card.card->shortname, "PS3");
strcpy(the_card.card->longname, "PS3 sound");
/* create PCM devices instance */
/* NOTE:this driver works assuming pcm:substream = 1:1 */
ret = snd_pcm_new(the_card.card,
-diff -purN linux-2.6.27/sound/ppc/snd_ps3.h linux-2.6.27.19-5.1/sound/ppc/snd_ps3.h
---- linux-2.6.27/sound/ppc/snd_ps3.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/ppc/snd_ps3.h 2009-03-25 16:11:00.000000000 +0000
-@@ -51,6 +51,7 @@ struct snd_ps3_avsetting_info {
+diff -r 9608d5473017 sound/ppc/snd_ps3.h
+--- a/sound/ppc/snd_ps3.h Wed May 06 15:47:13 2009 +0100
++++ b/sound/ppc/snd_ps3.h Wed May 06 16:57:09 2009 +0100
+@@ -51,6 +51,7 @@
uint32_t avs_audio_width;
uint32_t avs_audio_format; /* fixed */
uint32_t avs_audio_source; /* fixed */
};
/*
* PS3 audio 'card' instance
-diff -purN linux-2.6.27/sound/ppc/tumbler.c linux-2.6.27.19-5.1/sound/ppc/tumbler.c
---- linux-2.6.27/sound/ppc/tumbler.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/ppc/tumbler.c 2009-03-25 16:11:00.000000000 +0000
-@@ -879,7 +879,8 @@ static struct snd_kcontrol_new snapper_m
+diff -r 9608d5473017 sound/ppc/tumbler.c
+--- a/sound/ppc/tumbler.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/ppc/tumbler.c Wed May 06 16:57:09 2009 +0100
+@@ -879,7 +879,8 @@
.put = tumbler_put_master_switch
},
DEFINE_SNAPPER_MIX("PCM Playback Volume", 0, VOL_IDX_PCM),
DEFINE_SNAPPER_MIX("Monitor Mix Volume", 0, VOL_IDX_ADC),
DEFINE_SNAPPER_MONO("Tone Control - Bass", bass),
DEFINE_SNAPPER_MONO("Tone Control - Treble", treble),
-diff -purN linux-2.6.27/sound/soc/omap/omap-pcm.c linux-2.6.27.19-5.1/sound/soc/omap/omap-pcm.c
---- linux-2.6.27/sound/soc/omap/omap-pcm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/soc/omap/omap-pcm.c 2009-03-25 16:11:00.000000000 +0000
-@@ -231,7 +231,7 @@ static int omap_pcm_open(struct snd_pcm_
+diff -r 9608d5473017 sound/soc/omap/omap-pcm.c
+--- a/sound/soc/omap/omap-pcm.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/soc/omap/omap-pcm.c Wed May 06 16:57:09 2009 +0100
+@@ -231,7 +231,7 @@
if (ret < 0)
goto out;
if (prtd == NULL) {
ret = -ENOMEM;
goto out;
-diff -purN linux-2.6.27/sound/sparc/amd7930.c linux-2.6.27.19-5.1/sound/sparc/amd7930.c
---- linux-2.6.27/sound/sparc/amd7930.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/sparc/amd7930.c 2009-03-25 16:10:56.000000000 +0000
-@@ -1108,6 +1108,7 @@ static struct of_device_id amd7930_match
+diff -r 9608d5473017 sound/sparc/amd7930.c
+--- a/sound/sparc/amd7930.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/sparc/amd7930.c Wed May 06 16:57:09 2009 +0100
+@@ -1108,6 +1108,7 @@
};
static struct of_platform_driver amd7930_sbus_driver = {
.name = "audio",
.match_table = amd7930_match,
.probe = amd7930_sbus_probe,
-diff -purN linux-2.6.27/sound/sparc/dbri.c linux-2.6.27.19-5.1/sound/sparc/dbri.c
---- linux-2.6.27/sound/sparc/dbri.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/sparc/dbri.c 2009-03-25 16:10:56.000000000 +0000
-@@ -2679,6 +2679,7 @@ static struct of_device_id dbri_match[]
+diff -r 9608d5473017 sound/sparc/dbri.c
+--- a/sound/sparc/dbri.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/sparc/dbri.c Wed May 06 16:57:09 2009 +0100
+@@ -2679,6 +2679,7 @@
MODULE_DEVICE_TABLE(of, dbri_match);
static struct of_platform_driver dbri_sbus_driver = {
.name = "dbri",
.match_table = dbri_match,
.probe = dbri_probe,
-diff -purN linux-2.6.27/sound/usb/caiaq/caiaq-device.h linux-2.6.27.19-5.1/sound/usb/caiaq/caiaq-device.h
---- linux-2.6.27/sound/usb/caiaq/caiaq-device.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/usb/caiaq/caiaq-device.h 2009-03-25 16:10:57.000000000 +0000
-@@ -75,6 +75,7 @@ struct snd_usb_caiaqdev {
+diff -r 9608d5473017 sound/usb/caiaq/caiaq-device.h
+--- a/sound/usb/caiaq/caiaq-device.h Wed May 06 15:47:13 2009 +0100
++++ b/sound/usb/caiaq/caiaq-device.h Wed May 06 16:57:09 2009 +0100
+@@ -75,6 +75,7 @@
wait_queue_head_t ep1_wait_queue;
wait_queue_head_t prepare_wait_queue;
int spec_received, audio_parm_answer;
char vendor_name[CAIAQ_USB_STR_LEN];
char product_name[CAIAQ_USB_STR_LEN];
-diff -purN linux-2.6.27/sound/usb/caiaq/caiaq-midi.c linux-2.6.27.19-5.1/sound/usb/caiaq/caiaq-midi.c
---- linux-2.6.27/sound/usb/caiaq/caiaq-midi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/usb/caiaq/caiaq-midi.c 2009-03-25 16:10:57.000000000 +0000
-@@ -59,6 +59,11 @@ static int snd_usb_caiaq_midi_output_ope
+diff -r 9608d5473017 sound/usb/caiaq/caiaq-midi.c
+--- a/sound/usb/caiaq/caiaq-midi.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/usb/caiaq/caiaq-midi.c Wed May 06 16:57:09 2009 +0100
+@@ -59,6 +59,11 @@
static int snd_usb_caiaq_midi_output_close(struct snd_rawmidi_substream *substream)
{
return 0;
}
-@@ -69,7 +74,8 @@ static void snd_usb_caiaq_midi_send(stru
+@@ -69,7 +74,8 @@
dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE;
dev->midi_out_buf[1] = 0; /* port */
if (len <= 0)
return;
-@@ -79,24 +85,24 @@ static void snd_usb_caiaq_midi_send(stru
+@@ -79,24 +85,24 @@
ret = usb_submit_urb(&dev->midi_out_urb, GFP_ATOMIC);
if (ret < 0)
}
-@@ -161,16 +167,14 @@ int snd_usb_caiaq_midi_init(struct snd_u
+@@ -161,16 +167,14 @@
void snd_usb_caiaq_midi_output_done(struct urb* urb)
{
struct snd_usb_caiaqdev *dev = urb->context;
snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
}
-diff -purN linux-2.6.27/sound/usb/usbaudio.c linux-2.6.27.19-5.1/sound/usb/usbaudio.c
---- linux-2.6.27/sound/usb/usbaudio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/usb/usbaudio.c 2009-03-25 16:10:57.000000000 +0000
-@@ -2958,6 +2958,7 @@ static int create_fixed_stream_quirk(str
+diff -r 9608d5473017 sound/usb/usbaudio.c
+--- a/sound/usb/usbaudio.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/usb/usbaudio.c Wed May 06 16:57:09 2009 +0100
+@@ -2958,6 +2958,7 @@
return -EINVAL;
}
alts = &iface->altsetting[fp->altset_idx];