profile/ivi/kernel-adaptation-intel-automotive.git
18 years agoIPoIB: Remove unused include of vmalloc.h
Dotan Barak [Thu, 21 Sep 2006 15:26:43 +0000 (18:26 +0300)]
IPoIB: Remove unused include of vmalloc.h

IPoIB doesn't use anything from <linux/vmalloc.h>, so don't include it.

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIPoIB: Rejoin all multicast groups after a port event
Eli Cohen [Fri, 22 Sep 2006 22:22:56 +0000 (15:22 -0700)]
IPoIB: Rejoin all multicast groups after a port event

When ipoib_ib_dev_flush() is called because of a port event, the
driver needs to rejoin all multicast groups, since the flush will call
ipoib_mcast_dev_flush() (via ipoib_ib_dev_down()).  Otherwise no
(non-broadcast) multicast groups will be rejoined until the networking
core calls ->set_multicast_list again, and so multicast reception will
be broken for potentially a long time.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIPoIB: Create MCGs with all attributes required by RFC
Roland Dreier [Fri, 22 Sep 2006 22:22:56 +0000 (15:22 -0700)]
IPoIB: Create MCGs with all attributes required by RFC

RFC 4391 ("Transmission of IP over InfiniBand (IPoIB)") says:

  If the IB multicast group does not already exist, one must be
  created first with the IPoIB link MTU.  The MGID MUST use the same
  P_Key, Q_Key, SL, MTU, and HopLimit as those used in the
  broadcast-GID.  The rest of attributes SHOULD follow the values used
  in the broadcast-GID as well.

However, the current IPoIB driver is only setting the attributes
required by the InfiniBand spec to create a multicast group, so in
particular the MTU and HopLimit are not being set.  Add these
attributes when creating MCGs, and also set the Rate attribute, since
IPoIB pays attention to that attribute as well.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/sa: fix ib_sa_selector names
Michael S. Tsirkin [Mon, 18 Sep 2006 19:17:08 +0000 (22:17 +0300)]
IB/sa: fix ib_sa_selector names

Relevant SA queries are actually "greater than" / "less than", not
"greater than or equal" / "less than or equal" as the names imply.
(See IB spec 1.2 Vol 1, 15.2.5.16 PATHRECORD/Table 205 PathRecord)

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/iser: INFINIBAND_ISER depends on INET
Roland Dreier [Fri, 22 Sep 2006 22:22:55 +0000 (15:22 -0700)]
IB/iser: INFINIBAND_ISER depends on INET

iSER won't build without CONFIG_INET enabled, so make Kconfig reflect that.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mthca: Simplify calls to mthca_cq_clean()
Roland Dreier [Fri, 22 Sep 2006 22:22:55 +0000 (15:22 -0700)]
IB/mthca: Simplify calls to mthca_cq_clean()

If a QP has separate send and receive CQs, then the send CQ will never
have receive completions from that QP in it.  So when cleaning the
send CQ, there's no need to pass in an SRQ pointer, even if the QP is
attached to an SRQ.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoRDMA/cma: Document rdma_accept() error handling
Or Gerlitz [Fri, 22 Sep 2006 22:22:54 +0000 (15:22 -0700)]
RDMA/cma: Document rdma_accept() error handling

Document the reject sending and modifying QP to error done in rdma_accept().

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mthca: Recover from catastrophic errors
Jack Morgenstein [Tue, 15 Aug 2006 18:11:18 +0000 (21:11 +0300)]
IB/mthca: Recover from catastrophic errors

Trigger device remove and then add when a catastrophic error is
detected in hardware.  This, in turn, will cause a device reset, which
we hope will recover from the catastrophic condition.

Since this might interefere with debugging the root cause, add a
module option to suppress this behaviour.

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoRDMA/cma: Document rdma_destroy_id() function
Or Gerlitz [Tue, 12 Sep 2006 16:03:33 +0000 (09:03 -0700)]
RDMA/cma: Document rdma_destroy_id() function

Clarify that rdma_destroy_id cancels outstanding asynchronous operations on the
Associated id.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/cm: Do not track remote QPN in timewait state
Michael S. Tsirkin [Mon, 28 Aug 2006 13:32:50 +0000 (16:32 +0300)]
IB/cm: Do not track remote QPN in timewait state

Do not track remote QPN in TimeWait state, since QP is not connected.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/sa: Require SA registration
Michael S. Tsirkin [Mon, 21 Aug 2006 23:40:12 +0000 (16:40 -0700)]
IB/sa: Require SA registration

Require users to register with SA module, to prevent the sa_query
module text from going away while an SA query callback is still
running.  Update all in-tree users for the new interface.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIPoIB: Refactor completion handling
Roland Dreier [Fri, 22 Sep 2006 22:22:52 +0000 (15:22 -0700)]
IPoIB: Refactor completion handling

Split up ipoib_ib_handle_wc() into ipoib_ib_handle_rx_wc() and
ipoib_ib_handle_tx_wc() to make the code easier to read.  This will
also help implement NAPI in the future.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/iser: Do not use FMR for a single dma entry sg
Erez Zilber [Mon, 11 Sep 2006 09:26:33 +0000 (12:26 +0300)]
IB/iser: Do not use FMR for a single dma entry sg

Fast Memory Registration (fmr) is used to register for rdma an sg whose
elements are not linearly sequential after dma mapping.

The IB verbs layer provides an "all dma memory MR (memory region)" which
can be used for RDMA-ing a dma linearly sequential buffer.

Change the code to use the dma mr instead of doing fmr when dma mapping
produces a single dma entry sg.

Signed-off-by: Erez Zilber <erezz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/iser: fix some debug prints
Erez Zilber [Mon, 11 Sep 2006 09:24:00 +0000 (12:24 +0300)]
IB/iser: fix some debug prints

fix and add some debug prints related to iser
handling of memory for rdma.

Signed-off-by: Erez Zilber <erezz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/iser: make FMR "page size" be 4K and not PAGE_SIZE
Erez Zilber [Mon, 11 Sep 2006 09:22:30 +0000 (12:22 +0300)]
IB/iser: make FMR "page size" be 4K and not PAGE_SIZE

As iser is able to use at most one rdma operation for the
execution of a scsi command, and registration of the sg
associated with scsi command has its restrictions, the code
checks if an sg is "aligned for rdma".

Alignment for rdma is measured in "fmr page" units whose
possible resolutions are different between HCAs and can be
smaller, equal or bigger to the system page size.

When the system page size is bigger than 4KB (eg the default
with ia64 kernels) there a bigger chance that an sg would be
aligned for rdma if the fmr page size is 4KB.

Change the code to create FMR whose pages are of size 4KB
and to take that into account when processing the sg.

Signed-off-by: Erez Zilber <erezz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/iser: Limit the max size of a scsi command
Erez Zilber [Mon, 11 Sep 2006 09:20:54 +0000 (12:20 +0300)]
IB/iser: Limit the max size of a scsi command

Currently, the data length of a command coming down from scsi-ml
is limited only by the size of its sg list (sg_tablesize). The
max data length may be different for different page size values.
By setting max_sectors, we limit the data length to
max_sectors*512 bytes.

Signed-off-by: Erez Zilber <erezz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/iser: fix a check of SG alignment for RDMA
Erez Zilber [Mon, 11 Sep 2006 09:19:17 +0000 (12:19 +0300)]
IB/iser: fix a check of SG alignment for RDMA

dma mapping may include a "compaction" of the sg associated with scsi command.
Hence, the size of the maximal prefix of the SG which is aligned for rdma must be
compared against the length of the dma mapped sg (mem->dma_nents) and not against
the size of it before it was mapped (mem->size).

Signed-off-by: Erez Zilber <erezz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoRDMA/cma: Protect against adding device during destruction
Sean Hefty [Fri, 1 Sep 2006 22:33:55 +0000 (15:33 -0700)]
RDMA/cma: Protect against adding device during destruction

Closes a window where address resolution can attach an rdma_cm_id to a
device during destruction of the rdma_cm_id.  This can result in the
rdma_cm_id remaining in the device list after its memory has been
freed.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoRDMA/amso1100: Add driver for Ammasso 1100 RNIC
Tom Tucker [Fri, 22 Sep 2006 22:22:48 +0000 (15:22 -0700)]
RDMA/amso1100: Add driver for Ammasso 1100 RNIC

Add a driver for the Ammasso 1100 gigabit ethernet RNIC.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoRDMA: iWARP Core Changes.
Tom Tucker [Thu, 3 Aug 2006 21:02:42 +0000 (16:02 -0500)]
RDMA: iWARP Core Changes.

Modifications to the existing rdma header files, core files, drivers,
and ulp files to support iWARP, including:
 - Hook iWARP CM into the build system and use it in rdma_cm.
 - Convert enum ib_node_type to enum rdma_node_type, which includes
   the possibility of RDMA_NODE_RNIC, and update everything for this.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoRDMA: iWARP Connection Manager.
Tom Tucker [Thu, 3 Aug 2006 21:02:40 +0000 (16:02 -0500)]
RDMA: iWARP Connection Manager.

Add an iWARP Connection Manager (CM), which abstracts connection
management for iWARP devices (RNICs).  It is a logical instance of the
xx_cm where xx is the transport type (ib or iw).  The symbols exported
are used by the transport independent rdma_cm module, and are
available also for transport dependent ULPs.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB: Whitespace fixes
Roland Dreier [Fri, 22 Sep 2006 22:22:46 +0000 (15:22 -0700)]
IB: Whitespace fixes

Remove some trailing whitespace that has snuck in despite the best
efforts of whitespace=error-all.  Also fix a few other whitespace
bogosities.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/cm: Randomize starting comm ID
Sean Hefty [Mon, 28 Aug 2006 22:15:18 +0000 (15:15 -0700)]
IB/cm: Randomize starting comm ID

Randomize the starting local comm ID to avoid getting a rejected
connection due to a stale connection after a system reboot or
reloading of the ib_cm.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mad: Remove unused includes
James Lentini [Mon, 28 Aug 2006 22:12:04 +0000 (15:12 -0700)]
IB/mad: Remove unused includes

The ib_mad module does not use a kthread function, but mad_priv.h
includes <linux/kthread.h>.  mad_rmpp.c does not do any DMA-related
stuff, but includes <linux/dma-mapping.h>.  Remove the unused includes.

Signed-off-by: James Lentini <jlentini@netapp.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mad: Add support for dual-sided RMPP transfers.
Sean Hefty [Mon, 28 Aug 2006 22:10:32 +0000 (15:10 -0700)]
IB/mad: Add support for dual-sided RMPP transfers.

The implementation assumes that any RMPP request that requires a
response uses DS RMPP.  Based on the RMPP start-up scenarios defined
by the spec, this should be a valid assumption.  That is, there is no
start-up scenario defined where an RMPP request is followed by a
non-RMPP response.  By having this assumption we avoid any API
changes.

In order for a node that supports DS RMPP to communicate with one that
does not, RMPP responses assume a new window size of 1 if a DS ACK has
not been received.  (By DS ACK, I'm referring to the turn-around ACK
after the final ACK of the request.)  This is a slight spec deviation,
but is necessary to allow communication with nodes that do not
generate the DS ACK.  It also handles the case when a response is sent
after the request state has been discarded.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/cm: Use correct reject code for invalid GID
Sean Hefty [Mon, 28 Aug 2006 18:57:42 +0000 (11:57 -0700)]
IB/cm: Use correct reject code for invalid GID

Set the reject code properly when rejecting a request that contains an
invalid GID.  A suitable GID is returned by the IB CM in the
additional reject information (ARI).  This is a spec compliancy issue.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/cm: Enable atomics along with RDMA reads
Sean Hefty [Mon, 28 Aug 2006 18:55:52 +0000 (11:55 -0700)]
IB/cm: Enable atomics along with RDMA reads

Enable atomic operations along with RDMA reads if a local RDMA
read/atomic depth is provided by the user.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mthca: Return correct number of bits for static rate in query_qp
Jack Morgenstein [Mon, 28 Aug 2006 16:12:39 +0000 (19:12 +0300)]
IB/mthca: Return correct number of bits for static rate in query_qp

Incorrect number of bits was taken for static_rate field.

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mthca: Return port number for unconnected QPs in query_qp
Jack Morgenstein [Mon, 28 Aug 2006 16:10:34 +0000 (19:10 +0300)]
IB/mthca: Return port number for unconnected QPs in query_qp

port_num was not being returned for unconnected QPs.

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mthca: Fix default static rate returned for Tavor in AV
Jack Morgenstein [Mon, 28 Aug 2006 16:08:53 +0000 (19:08 +0300)]
IB/mthca: Fix default static rate returned for Tavor in AV

When default static rate is returned for Tavor, need to translate it
to an ib rate value.

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: control receive polarity inversion
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:48 +0000 (11:24 -0700)]
IB/ipath: control receive polarity inversion

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: fix return value from ipath_poll
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:46 +0000 (11:24 -0700)]
IB/ipath: fix return value from ipath_poll

This stops the generic poll code from waiting for a timeout.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: allow SMA to be disabled
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:45 +0000 (11:24 -0700)]
IB/ipath: allow SMA to be disabled

This is useful for testing purposes.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: handle sq_sig_all field correctly
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:44 +0000 (11:24 -0700)]
IB/ipath: handle sq_sig_all field correctly

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: put a limit on the number of QPs that can be created
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:43 +0000 (11:24 -0700)]
IB/ipath: put a limit on the number of QPs that can be created

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: validate path_mig_state properly
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:42 +0000 (11:24 -0700)]
IB/ipath: validate path_mig_state properly

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: be more strict about testing the modify QP verb
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:41 +0000 (11:24 -0700)]
IB/ipath: be more strict about testing the modify QP verb

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: add serial number to hardware freeze error message
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:40 +0000 (11:24 -0700)]
IB/ipath: add serial number to hardware freeze error message

Also added the word "Hardware" after "Fatal" to make it more obvious
that it's hardware, not software.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: support new QLogic product naming scheme
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:39 +0000 (11:24 -0700)]
IB/ipath: support new QLogic product naming scheme

This patch only renames files, fixes product names, and updates
comments.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: account for attached QPs correctly
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:38 +0000 (11:24 -0700)]
IB/ipath: account for attached QPs correctly

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: do not allow use of CQ entries with invalid counts
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:37 +0000 (11:24 -0700)]
IB/ipath: do not allow use of CQ entries with invalid counts

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: add new minor device to allow sending of diag packets
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:36 +0000 (11:24 -0700)]
IB/ipath: add new minor device to allow sending of diag packets

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: trivial cleanups
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:35 +0000 (11:24 -0700)]
IB/ipath: trivial cleanups

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: remove stale references to userspace SMA
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:34 +0000 (11:24 -0700)]
IB/ipath: remove stale references to userspace SMA

When we first submitted a userspace subnet management agent, it was
rejected, so we left it out of the final driver submission.  This patch
removes a number of vestigial references to it.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: simplify debugging code after ipath_core and ib_ipath merger
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:33 +0000 (11:24 -0700)]
IB/ipath: simplify debugging code after ipath_core and ib_ipath merger

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: simplify layering code
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:32 +0000 (11:24 -0700)]
IB/ipath: simplify layering code

A lot of ipath layer code was only called in one place. Now that the
ipath_core and ib_ipath drivers are merged, it's more sensible to simply
inline the simple stuff that the layer code was doing.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: merge ipath_core and ib_ipath drivers
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:31 +0000 (11:24 -0700)]
IB/ipath: merge ipath_core and ib_ipath drivers

There is little point in keeping the two drivers separate, so we are
merging them.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: drop requirement that PIO buffers be mmaped write-only
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:30 +0000 (11:24 -0700)]
IB/ipath: drop requirement that PIO buffers be mmaped write-only

Some userlands try to mmap these pages read-write, so accommodate them.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: fix handling of kpiobufs
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:29 +0000 (11:24 -0700)]
IB/ipath: fix handling of kpiobufs

Change comment: no longer imply that user can set ipath_kpiobufs to zero.
Actually set ipath_kpiobufs from parameter. Previously only altered
per-device ipath_lastport_piobuf, which was over-written in chip init.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: fix for crash on module unload, if cfgports < portcnt
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:28 +0000 (11:24 -0700)]
IB/ipath: fix for crash on module unload, if cfgports < portcnt

Allocate enough pointers for all possible ports, to avoid problems in
cleanup/unload.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: lock resource limit counters correctly
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:27 +0000 (11:24 -0700)]
IB/ipath: lock resource limit counters correctly

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: More changes to support InfiniPath on PowerPC 970 systems
Bryan O'Sullivan [Fri, 25 Aug 2006 18:24:26 +0000 (11:24 -0700)]
IB/ipath: More changes to support InfiniPath on PowerPC 970 systems

Ordering of writethrough store buffers needs to be forced, and we need
to use ifdef to get writethrough behavior to InfiniPath buffers, because
there is no generic way to specify that at this time (similar to code
in char/drm/drm_vm.c and block/z2ram.c).

Signed-off-by: John Gregor <john.gregor@qlogic.com>
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Performance improvements via mmap of queues
Ralph Campbell [Fri, 22 Sep 2006 22:22:26 +0000 (15:22 -0700)]
IB/ipath: Performance improvements via mmap of queues

Improve performance of userspace post receive, post SRQ receive, and
poll CQ operations for ipath by allowing userspace to directly mmap()
receive queues and completion queues.  This eliminates the copying
between userspace and the kernel in the data path.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/uverbs: Pass userspace data to modify_srq and modify_qp methods
Ralph Campbell [Fri, 11 Aug 2006 21:58:09 +0000 (14:58 -0700)]
IB/uverbs: Pass userspace data to modify_srq and modify_qp methods

Pass a struct ib_udata to the low-level driver's ->modify_srq() and
->modify_qp() methods, so that it can get to the device-specific data
passed in by the userspace driver.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/uverbs: Allow resize CQ operation to return driver-specific data
Ralph Campbell [Fri, 22 Sep 2006 22:22:24 +0000 (15:22 -0700)]
IB/uverbs: Allow resize CQ operation to return driver-specific data

Add a ib_uverbs_resize_cq_resp.driver_data field so that low-level
drivers can return data from a resize CQ operation to userspace.  Have
ib_uverbs_resize_cq() only copy the cqe field, to avoid having to bump
the userspace ABI.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ehca: Add driver for IBM eHCA InfiniBand adapters
Heiko J Schick [Fri, 22 Sep 2006 22:22:22 +0000 (15:22 -0700)]
IB/ehca: Add driver for IBM eHCA InfiniBand adapters

Add a driver for IBM GX bus InfiniBand adapters, which are usable with
some pSeries/System p systems.

Signed-off-by: Heiko J Schick <schickhj.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/srp: Add port/device attributes
Ishai Rabinovitz [Tue, 15 Aug 2006 14:34:52 +0000 (17:34 +0300)]
IB/srp: Add port/device attributes

Add local_ib_device and local_ib_port attributes to srp scsi_host.
These are needed when we want to connect to the same target through
multiple distinct ports.

Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mthca: Include the header we really want
James Lentini [Fri, 22 Sep 2006 22:17:20 +0000 (15:17 -0700)]
IB/mthca: Include the header we really want

Signed-off-by: James Lentini <jlentini@netapp.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/uverbs: Fix lockdep warning when QP is created with 2 CQs
Roland Dreier [Fri, 22 Sep 2006 22:17:20 +0000 (15:17 -0700)]
IB/uverbs: Fix lockdep warning when QP is created with 2 CQs

Lockdep warns when userspace creates a QP that uses different CQs for
send completions and receive completions, because both CQs are locked
and their mutexes belong to the same lock class.  However, we know
that the mutexes are distinct and the nesting is safe (there is no
possibility of AB-BA deadlock because the mutexes are locked with
down_read()), so annotate the situation with SINGLE_DEPTH_NESTING to
get rid of the lockdep warning.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/uverbs: Use idr_read_cq() where appropriate
Roland Dreier [Fri, 22 Sep 2006 22:17:19 +0000 (15:17 -0700)]
IB/uverbs: Use idr_read_cq() where appropriate

There were two functions that open-coded idr_read_cq() in terms of
idr_read_uobj() rather than using the helper.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipoib: Fix flush/start xmit race (from code review)
Michael S. Tsirkin [Thu, 3 Aug 2006 19:16:06 +0000 (22:16 +0300)]
IB/ipoib: Fix flush/start xmit race (from code review)

Prevent flush task from freeing the ipoib_neigh pointer, while
ipoib_start_xmit() is accessing the ipoib_neigh through the pointer it
has loaded from the skb's hardware address.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mthca: Don't use privileged UAR for kernel access
Michael S. Tsirkin [Fri, 22 Sep 2006 22:17:18 +0000 (15:17 -0700)]
IB/mthca: Don't use privileged UAR for kernel access

Make kernel use UAR2 instead of UAR1 for hardware access: this adds
sanity checking from the hardware side, without any performance cost.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mthca: Fix lid used for sending traps
Jack Morgenstein [Tue, 19 Sep 2006 08:13:24 +0000 (11:13 +0300)]
IB/mthca: Fix lid used for sending traps

The SM LID used to send traps to is incorrectly set to port LID.  This
is a regression from 2.6.17 -- after a PortInfo MAD is received, no
traps are sent to the SM LID.  The traps go to the loopback interface
instead, and are dropped there.  The SM LID should be taken from the
sm_lid of the PortInfo response.

The bug was introduced by commit 12bbb2b7be7f5564952ebe0196623e97464b8ac5:
IB/mthca: Add client reregister event generation

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoMerge git://git.infradead.org/~dwmw2/hdroneline
Linus Torvalds [Fri, 22 Sep 2006 19:56:22 +0000 (12:56 -0700)]
Merge git://git.infradead.org/~dwmw2/hdroneline

* git://git.infradead.org/~dwmw2/hdroneline:
  [HEADERS] One line per header in Kbuild files to reduce conflicts

Manual (trivial) conflict resolution in include/asm-s390/Kbuild

18 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Fri, 22 Sep 2006 19:52:16 +0000 (12:52 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: Remove overzealous BUG_ON()
  ocfs2: Don't print on unknown remote blocking call
  ocfs2: Remove EXPERIMENTAL dependency
  ocfs2: implement directory read-ahead
  ocfs2: properly update i_mtime on buffered write
  ocfs2: Fix directory link count checks in ocfs2_link()
  ocfs2: move nlink check in ocfs2_mknod()
  ocfs2: Fix heartbeat sector calculation
  [PATCH] fs/ocfs2/ioctl.c should #include "ioctl.h"
  ocfs2: add ext2 attributes
  configfs: Prevent duplicate subsystem names.

18 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Fri, 22 Sep 2006 19:51:33 +0000 (12:51 -0700)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (64 commits)
  [BLOCK] dm-crypt: trivial comment improvements
  [CRYPTO] api: Deprecate crypto_digest_* and crypto_alg_available
  [CRYPTO] padlock: Convert padlock-sha to use crypto_hash
  [CRYPTO] users: Use crypto_comp and crypto_has_*
  [CRYPTO] api: Add crypto_comp and crypto_has_*
  [CRYPTO] users: Use crypto_hash interface instead of crypto_digest
  [SCSI] iscsi: Use crypto_hash interface instead of crypto_digest
  [CRYPTO] digest: Remove old HMAC implementation
  [CRYPTO] doc: Update documentation for hash and me
  [SCTP]: Use HMAC template and hash interface
  [IPSEC]: Use HMAC template and hash interface
  [CRYPTO] tcrypt: Use HMAC template and hash interface
  [CRYPTO] hmac: Add crypto template implementation
  [CRYPTO] digest: Added user API for new hash type
  [CRYPTO] api: Mark parts of cipher interface as deprecated
  [PATCH] scatterlist: Add const to sg_set_buf/sg_init_one pointer argument
  [CRYPTO] drivers: Remove obsolete block cipher operations
  [CRYPTO] users: Use block ciphers where applicable
  [SUNRPC] GSS: Use block ciphers where applicable
  [IPSEC] ESP: Use block ciphers where applicable
  ...

18 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Fri, 22 Sep 2006 19:50:35 +0000 (12:50 -0700)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (44 commits)
  [S390] hypfs crashes with invalid mount option.
  [S390] cio: subchannel evaluation function operates without lock
  [S390] cio: always query all paths on path verification.
  [S390] cio: update path groups on logical CHPID changes.
  [S390] cio: subchannels in no-path state.
  [S390] Replace nopav-message on VM.
  [S390] set modalias for ccw bus uevents.
  [S390] Get rid of DBG macro.
  [S390] Use alternative user-copy operations for new hardware.
  [S390] Make user-copy operations run-time configurable.
  [S390] Cleanup in signal handling code.
  [S390] Cleanup in page table related code.
  [S390] Linux API for writing z/VM APPLDATA Monitor records.
  [S390] xpram off by one error.
  [S390] Remove kexec experimental flag.
  [S390] cleanup appldata.
  [S390] fix typo in vmcp.
  [S390] Kernel stack overflow handling.
  [S390] qdio slsb processing state.
  [S390] Missing initialization in common i/o layer.
  ...

18 years agoMerge git://git.infradead.org/mtd-2.6
Linus Torvalds [Fri, 22 Sep 2006 19:49:18 +0000 (12:49 -0700)]
Merge git://git.infradead.org/mtd-2.6

* git://git.infradead.org/mtd-2.6:
  Remove accidentally-added include/linux/utsrelease.h
  Revert "[MTD] blkdev helper code: fix printk format warning"
  [MTD] Add SSFDC (SmartMedia) read-only translation layer
  [MTD] pmc551 pci cleanup
  [MTD] pmc551 use kzalloc
  [MTD] pmc551 whitespace cleanup
  [MTD] Remove iq80310 map driver
  [MTD NAND] Fix in typo ndfc.c causing wrong ECC layout
  [MTD] physmap: add power management support
  ioremap balanced with iounmap for drivers/mtd subsystem
  [MTD] Switch to pci_get_device and do ref counting
  [MTD] blkdev helper code: fix printk format warning
  [MTD] Fix ixp4xx partition parsing.
  [JFFS2] Remove unneeded ifdefs from jffs2_fs_i.h
  [MTD NAND] Remove old code in au1550nd.c
  [MTD] Unlock NOR flash automatically where necessary

18 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Fri, 22 Sep 2006 19:48:03 +0000 (12:48 -0700)]
Merge git://git./linux/kernel/git/paulus/powerpc

* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (114 commits)
  [POWERPC] Fix ohare IDE irq workaround on old powermacs
  [POWERPC] EEH: Power4 systems sometimes need multiple resets.
  [POWERPC] Include <asm/mmu.h> in arch/powerpc/sysdev/fsl_soc.h for phys_addr_t.
  [POWERPC] Demacrofy arch/powerpc/platforms/maple/pci.c
  [POWERPC] Maple U3 HT - reject inappropriate config space access
  [POWERPC] Fix IPIC pending register assignments
  [POWERPC] powerpc: fix building gdb against asm/ptrace.h
  [POWERPC] Remove DISCONTIGMEM cruft from page.h
  [POWERPC] Merge iSeries i/o operations with the rest
  [POWERPC] 40x: Fix debug status register defines
  [POWERPC] Fix compile error in sbc8560
  [POWERPC] EEH: support MMIO enable recovery step
  [POWERPC] EEH: enable MMIO/DMA on frozen slot
  [POWERPC] EEH: code comment cleanup
  [POWERPC] EEH: balance pcidev_get/put calls
  [POWERPC] PPC: Fix xmon stack frame address in backtrace
  [POWERPC] Add AT_PLATFORM value for Xilinx Virtex-4 FX
  [POWERPC] Start arch/powerpc/boot code reorganization
  [POWERPC] Define of_read_ulong helper
  [POWERPC] iseries: eliminate a couple of warnings
  ...

18 years agoRemove accidentally-added include/linux/utsrelease.h
David Woodhouse [Fri, 22 Sep 2006 17:41:20 +0000 (18:41 +0100)]
Remove accidentally-added include/linux/utsrelease.h

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agoRevert "[MTD] blkdev helper code: fix printk format warning"
David Woodhouse [Fri, 22 Sep 2006 10:05:42 +0000 (11:05 +0100)]
Revert "[MTD] blkdev helper code: fix printk format warning"

This reverts commit 668040fcd1e06fc3e68a92708cbdfa5a52c37d3c.

The 'flags' field of the struct request is 'unsigned long'. Quite
how Randy came to see 'long int format, different type arg' I don't
know, but it doesn't seem to be the case any more.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] Add SSFDC (SmartMedia) read-only translation layer
Claudio Lanconelli [Fri, 22 Sep 2006 10:01:37 +0000 (11:01 +0100)]
[MTD] Add SSFDC (SmartMedia) read-only translation layer

Signed-off-by: Claudio Lanconelli <lanconelli.claudio@eptar.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] pmc551 pci cleanup
Jiri Slaby [Tue, 19 Sep 2006 19:55:28 +0000 (21:55 +0200)]
[MTD] pmc551 pci cleanup

Use pci_resource_start for getting start of regions and pci_iomap to not
doing this directly by using dev->resource... (Thanks to Rolf Eike Beer)

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] pmc551 use kzalloc
Jiri Slaby [Tue, 19 Sep 2006 19:55:18 +0000 (21:55 +0200)]
[MTD] pmc551 use kzalloc

Use kzalloc instad of kmalloc+memset(0).

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] pmc551 whitespace cleanup
Jiri Slaby [Tue, 19 Sep 2006 19:55:06 +0000 (21:55 +0200)]
[MTD] pmc551 whitespace cleanup

Spaces were used for indent, there was more than 80 columns per line. Get
rid of that stuff.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] Remove iq80310 map driver
Lennert Buytenhek [Thu, 21 Sep 2006 01:47:48 +0000 (03:47 +0200)]
[MTD] Remove iq80310 map driver

The iq80310 mtd map driver depends on ARCH_IQ80310, which isn't
defined anywhere in the tree (as we don't have 80310 support), and
furthermore, everything the driver does can be done with physmap
instead.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD NAND] Fix in typo ndfc.c causing wrong ECC layout
Frank Haverkamp [Wed, 20 Sep 2006 15:24:52 +0000 (17:24 +0200)]
[MTD NAND] Fix in typo ndfc.c causing wrong ECC layout

Due to this typo, a wrong ECC layout table is chosen.

Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] physmap: add power management support
Lennert Buytenhek [Thu, 21 Sep 2006 21:16:48 +0000 (23:16 +0200)]
[MTD] physmap: add power management support

Implement PM handling for physmap.  Idea from Steven Scholz, patch
by David Anders.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agoioremap balanced with iounmap for drivers/mtd subsystem
Amol Lad [Thu, 21 Sep 2006 12:42:43 +0000 (18:12 +0530)]
ioremap balanced with iounmap for drivers/mtd subsystem

ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.

Tested (compilation only) with:
- allmodconfig
- Modifying drivers/mtd/maps/Kconfig and drivers/mtd/nand/Kconfig to
make sure that the changed file is compiling without warning

Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] Switch to pci_get_device and do ref counting
Alan Cox [Fri, 22 Sep 2006 09:19:20 +0000 (10:19 +0100)]
[MTD] Switch to pci_get_device and do ref counting

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] blkdev helper code: fix printk format warning
Randy Dunlap [Fri, 22 Sep 2006 09:17:28 +0000 (10:17 +0100)]
[MTD] blkdev helper code: fix printk format warning

Fix printk format warning(s):
drivers/mtd/mtd_blkdevs.c:72: warning: long int format, different type arg (arg 2)

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] Fix ixp4xx partition parsing.
Brian Walsh [Fri, 22 Sep 2006 09:16:16 +0000 (10:16 +0100)]
[MTD] Fix ixp4xx partition parsing.

If the amount of flash is not divisible by 2 then the mask in
parse_mtd_partitions would fail to work as designed.  Passing in the base
address corrects this problem.

Signed-off-by: Brian Walsh <brian@walsh.ws>
Cc: Deepak Sanexa <dsanexa@mvista.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[JFFS2] Remove unneeded ifdefs from jffs2_fs_i.h
Michal Piotrowski [Fri, 22 Sep 2006 09:13:46 +0000 (10:13 +0100)]
[JFFS2] Remove unneeded ifdefs from jffs2_fs_i.h

We certainly don't need the check for Linux version > 2.5.2, and in fact
we can also live without the __ECOS check, since we can just add it back
in the eCos git tree which is automatically derived from the Linux fs/jffs2
subdirectory in the upstream git tree.

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD NAND] Remove old code in au1550nd.c
Michal Piotrowski [Fri, 22 Sep 2006 09:09:44 +0000 (10:09 +0100)]
[MTD NAND] Remove old code in au1550nd.c

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[MTD] Unlock NOR flash automatically where necessary
Håvard Skinnemoen [Fri, 22 Sep 2006 09:07:08 +0000 (10:07 +0100)]
[MTD] Unlock NOR flash automatically where necessary

Introduce the MTD_STUPID_LOCK flag which indicates that the flash chip is
always locked after power-up, so all sectors need to be unlocked before it
is usable.

If this flag is set, and the chip provides an unlock() operation,
mtd_add_device will unlock the whole MTD device if it's writeable.  This
means that non-writeable partitions will stay locked.

Set MTD_STUPID_LOCK in fixup_use_atmel_lock() so that these chips will work
as expected.

Signed-off-by: Håvard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[POWERPC] Fix ohare IDE irq workaround on old powermacs
Benjamin Herrenschmidt [Fri, 22 Sep 2006 02:56:30 +0000 (12:56 +1000)]
[POWERPC] Fix ohare IDE irq workaround on old powermacs

Looks like a workaround for old bogus OF bitrot...  This fixes it and
hence fixes boot on some performa machines.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[POWERPC] EEH: Power4 systems sometimes need multiple resets.
Linas Vepstas [Thu, 21 Sep 2006 23:25:56 +0000 (18:25 -0500)]
[POWERPC] EEH: Power4 systems sometimes need multiple resets.

On detection of an EEH error, some Power4 systems seem to occasionally
want to be reset twice before they report themselves as fully recovered.
This patch re-arranges the code to attempt additional resets if the first
one doesn't take.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[POWERPC] Include <asm/mmu.h> in arch/powerpc/sysdev/fsl_soc.h for phys_addr_t.
Scott Wood [Thu, 21 Sep 2006 18:11:52 +0000 (13:11 -0500)]
[POWERPC] Include <asm/mmu.h> in arch/powerpc/sysdev/fsl_soc.h for phys_addr_t.

This patch causes fsl_soc.h to import the definition of phys_addr_t
itself, rather than relying on its includer to do so.

Signed-off-by: Scott Wood <scott@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[POWERPC] Demacrofy arch/powerpc/platforms/maple/pci.c
Nathan Lynch [Thu, 21 Sep 2006 19:31:13 +0000 (14:31 -0500)]
[POWERPC] Demacrofy arch/powerpc/platforms/maple/pci.c

Noticed that the U3_*CFA macros have some typos:

#define U3_HT_CFA0(devfn, off) \
((((unsigned long)devfn) << 8) | offset)

(refers to offset rather than off)

#define U3_AGP_CFA0(devfn, off) \
((1 << (unsigned long)PCI_SLOT(dev_fn)) \
| (((unsigned long)PCI_FUNC(dev_fn)) << 8) \

(refers to dev_fn rather than devfn)

Things happen to work, but there doesn't seem to be any reason these
shouldn't be functions.  Overall behavior should be unchanged.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[POWERPC] Maple U3 HT - reject inappropriate config space access
Nathan Lynch [Thu, 21 Sep 2006 19:25:34 +0000 (14:25 -0500)]
[POWERPC] Maple U3 HT - reject inappropriate config space access

When there is a PCI-X mode 2 capable device behind the HT<->PCI-X
bridge, the pci core decides that the device has the extended 4K
config space, even though the bus is not operating in mode 2.  This is
because the u3_ht pci ops silently accept offsets greater than 255 but
use only the 8 least significant bits, which means reading at offset
0x100 gets the data at offset 0x0, and causes confusion for lspci.

Reject accesses to configuration space offsets greater than 255.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[POWERPC] Fix IPIC pending register assignments
Scott Wood [Thu, 21 Sep 2006 18:10:51 +0000 (13:10 -0500)]
[POWERPC] Fix IPIC pending register assignments

This patch fixes the assignment of pending registers to IRQ numbers for
the IPIC; the code previously assigned all IRQs to the high pending word
regardless of which word the interrupt belonged to.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[POWERPC] powerpc: fix building gdb against asm/ptrace.h
Arnd Bergmann [Thu, 21 Sep 2006 10:29:51 +0000 (12:29 +0200)]
[POWERPC] powerpc: fix building gdb against asm/ptrace.h

Ulrich Weigand found a bug with the current version of the
asm-powerpc/ptrace.h that prevents building at least the
SPU target version of gdb, since some ptrace opcodes are
not defined.

The problem seems to have originated in the merging of 32 and
64 bit versions of that file, the problem is that some opcodes
are only valid on 64 bit kernels, but are also used by 32 bit
programs, so they can't depends on the __powerpc64__ symbol.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[POWERPC] Remove DISCONTIGMEM cruft from page.h
Michael Ellerman [Thu, 21 Sep 2006 08:21:35 +0000 (18:21 +1000)]
[POWERPC] Remove DISCONTIGMEM cruft from page.h

This looks like cruft to me, these functions don't exist AFAICT,
and I can't see that it's possible to even enable DISCONTIGMEM on
powerpc anymore. CC'ing some folks who might know better, based on
the who-touched-it-last principle.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[POWERPC] Merge iSeries i/o operations with the rest
Stephen Rothwell [Thu, 21 Sep 2006 08:00:00 +0000 (18:00 +1000)]
[POWERPC] Merge iSeries i/o operations with the rest

This patch changes the io operations so that they are out of line if
CONFIG_PPC_ISERIES is set and includes a firmware feature check in
that case.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[POWERPC] 40x: Fix debug status register defines
Josh Boyer [Wed, 20 Sep 2006 14:11:59 +0000 (09:11 -0500)]
[POWERPC] 40x: Fix debug status register defines

This fixes some debug register defines on PPC 40x that were incorrect.

Signed-off-by: Josh Boyer <jdub@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[POWERPC] Fix compile error in sbc8560
Amy Fong [Tue, 19 Sep 2006 03:07:24 +0000 (23:07 -0400)]
[POWERPC] Fix compile error in sbc8560

The following fixes compile errors in sbc8560.

Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[POWERPC] EEH: support MMIO enable recovery step
Linas Vepstas [Fri, 15 Sep 2006 23:58:59 +0000 (18:58 -0500)]
[POWERPC] EEH: support MMIO enable recovery step

Update to the PowerPC PCI error recovery code.

Add code to enable MMIO if a device driver reports that it is capable
of recovering on its own.  One anticipated use of this having a device
driver enable MMIO so that it can take a register dump, which might
then be followed by the device driver requesting a full reset.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[POWERPC] EEH: enable MMIO/DMA on frozen slot
Linas Vepstas [Fri, 15 Sep 2006 23:57:42 +0000 (18:57 -0500)]
[POWERPC] EEH: enable MMIO/DMA on frozen slot

Add wrapper around the rtas call to enable MMIO or DMA on a frozen pci
slot.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[POWERPC] EEH: code comment cleanup
Linas Vepstas [Fri, 15 Sep 2006 23:56:35 +0000 (18:56 -0500)]
[POWERPC] EEH: code comment cleanup

Clean up subroutine documentation; mostly formatting changes, with
some new content.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[POWERPC] EEH: balance pcidev_get/put calls
Linas Vepstas [Fri, 15 Sep 2006 23:55:34 +0000 (18:55 -0500)]
[POWERPC] EEH: balance pcidev_get/put calls

This corrects a pci_dev get/put imbalance that can occur only in
highly unlikely situations (kmalloc failures, pci devices with
overlapping resource addresses).  No actual failures seen, this was
spotted during code review.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>