pandora-kernel.git
16 years agoIB/mlx4: Implement query SRQ
Jack Morgenstein [Thu, 21 Jun 2007 10:03:11 +0000 (13:03 +0300)]
IB/mlx4: Implement query SRQ

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/mlx4: Implement query QP
Jack Morgenstein [Thu, 21 Jun 2007 09:27:47 +0000 (12:27 +0300)]
IB/mlx4: Implement query QP

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/cm: Send no match if a SIDR REQ does not match a listen
Sean Hefty [Mon, 2 Jul 2007 23:14:14 +0000 (16:14 -0700)]
IB/cm: Send no match if a SIDR REQ does not match a listen

If a SIDR REQ does not match a listen, we should reply with status
value 1 (service ID not supported), rather than dropping through to
the default case of status 2 (rejected by service provider).

Doing this also fixes a bug where the cm_id_priv is removed from the
remote_sidr_table twice.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/cm: Fix handling of duplicate SIDR REQs
Sean Hefty [Mon, 2 Jul 2007 21:36:19 +0000 (14:36 -0700)]
IB/cm: Fix handling of duplicate SIDR REQs

Fix handling to duplicate SIDR REQs to avoid sending a reject if a
duplicate is detected.  Duplicates should just be silently discarded.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/cm: cm_msgs.h should include ib_cm.h
Sean Hefty [Fri, 29 Jun 2007 02:16:51 +0000 (19:16 -0700)]
IB/cm: cm_msgs.h should include ib_cm.h

cm_msgs.h uses definitions from ib_cm.h.  Include it directly, rather
than depending on a specific include order.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/cm: Include HCA ACK delay in local ACK timeout
Sean Hefty [Mon, 18 Jun 2007 18:09:37 +0000 (11:09 -0700)]
IB/cm: Include HCA ACK delay in local ACK timeout

The IB CM should include the HCA ACK delay when calculating the local
ACK timeout value to use for RC QPs.  If the HCA ACK delay is large
enough relative to the packet life time, then if it is not taken into
account, the calculated timeout value ends up being too small, which
can result in "retry exceeded" errors.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/cm: Use spin_lock_irq() instead of spin_lock_irqsave() when possible
Sean Hefty [Mon, 18 Jun 2007 18:09:36 +0000 (11:09 -0700)]
IB/cm: Use spin_lock_irq() instead of spin_lock_irqsave() when possible

The ib_cm is a little over zealous about using spin_lock_irqsave,
when spin_lock_irq would do.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/sa: Make sure SA queries use default P_Key
Sean Hefty [Mon, 18 Jun 2007 18:03:58 +0000 (11:03 -0700)]
IB/sa: Make sure SA queries use default P_Key

MADs sent to the SA should use the the default P_Key (0x7fff/0xffff).
There's no requirement that the default P_Key is stored at index 0 in
the local P_Key table, so add code to the sa_query module to look up
the index of the default P_Key when creating an address handle for the
SA (which is done any time the P_Key table might change), and use this
index for all SA queries.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIPoIB: Recycle loopback skbs instead of freeing and reallocating
Roland Dreier [Tue, 10 Jul 2007 20:43:53 +0000 (13:43 -0700)]
IPoIB: Recycle loopback skbs instead of freeing and reallocating

InfiniBand HCAs replicate multicast packets back to the QP that sent
them if that QP is attached to the destination multicast group.  This
means that IPoIB multicasts are often replicated back to the receive
queue of the interface that generated them.  To avoid confusing the
network stack, we drop these duplicates within the IPoIB driver.

However, there's no reason to free the skb that received the duplicate
and then immediately allocate a new skb to post to the receive queue.
We can be more efficient and just repost the same skb.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/mthca: Replace memset(<addr>, 0, PAGE_SIZE) with clear_page(<addr>)
Shani Moideen [Mon, 18 Jun 2007 03:16:41 +0000 (08:46 +0530)]
IB/mthca: Replace memset(<addr>, 0, PAGE_SIZE) with clear_page(<addr>)

Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
----

16 years agoIPoIB/cm: Fix warning if IPV6 is not enabled
Roland Dreier [Tue, 10 Jul 2007 18:18:34 +0000 (11:18 -0700)]
IPoIB/cm: Fix warning if IPV6 is not enabled

Fix

    drivers/infiniband/ulp/ipoib/ipoib_cm.c:1151: warning: unused variable 'dev'

by getting rid of the variable dev, which is only used if CONFIG_IPV6
is enabled, and replacing the one use of it with the value it is
assigned, namely priv->dev.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/core: Take sizeof the correct pointer when calling kmalloc()
Dotan Barak [Tue, 10 Jul 2007 13:55:57 +0000 (16:55 +0300)]
IB/core: Take sizeof the correct pointer when calling kmalloc()

When allocating out_mad in show_pma_counter(), take sizeof *out_mad
instead of sizeof *in_mad.  It is true that today the type of in_mad
and out_mad are the same, but this patch will give us a cleaner code.

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ehca: Improve latency by unlocking after triggering the hardware
Hoang-Nam Nguyen [Mon, 9 Jul 2007 13:33:52 +0000 (15:33 +0200)]
IB/ehca: Improve latency by unlocking after triggering the hardware

Kick the hardware before unlocking the send/receive queue to overlap
processing a little more.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ehca: Notify consumers of LID/PKEY/SM changes after nondisruptive events
Joachim Fenkes [Mon, 9 Jul 2007 13:32:22 +0000 (15:32 +0200)]
IB/ehca: Notify consumers of LID/PKEY/SM changes after nondisruptive events

When firmware reports a nondisruptive port configuration change event,
previous versions of the eHCA driver didn't forward the event to consumers
like IPoIB.  Add code that determines the type of configuration change by
comparing old and new port attributes and reports it.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ehca: Return QP pointer in poll_cq()
Joachim Fenkes [Mon, 9 Jul 2007 13:31:53 +0000 (15:31 +0200)]
IB/ehca: Return QP pointer in poll_cq()

Also add two unlikely() statements.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ehca: Change idr spinlocks into rwlocks
Joachim Fenkes [Mon, 9 Jul 2007 13:31:10 +0000 (15:31 +0200)]
IB/ehca: Change idr spinlocks into rwlocks

This eliminates lock contention among IRQs as well as the need to
disable IRQs around idr_find, because there are no IRQ writers.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ehca: Refactor sync between completions and destroy_cq using atomic_t
Joachim Fenkes [Mon, 9 Jul 2007 13:30:39 +0000 (15:30 +0200)]
IB/ehca: Refactor sync between completions and destroy_cq using atomic_t

- ehca_cq.nr_events is made an atomic_t, eliminating a lot of locking.
- The CQ is removed from the CQ idr first now to make sure no more
  completions are scheduled on that CQ. The "wait for all completions to
  end" code becomes much simpler this way.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ehca: Lock renaming, static initializers
Joachim Fenkes [Mon, 9 Jul 2007 13:29:03 +0000 (15:29 +0200)]
IB/ehca: Lock renaming, static initializers

- Rename all spinlock flags to "flags", matching the vast majority of kernel
  code.
- Move hcall_lock into the only file it's used in.
- Replaced spin_lock_init() and friends with static initializers for
  global variables.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ehca: Report RDMA atomic attributes in query_qp()
Hoang-Nam Nguyen [Mon, 9 Jul 2007 13:28:18 +0000 (15:28 +0200)]
IB/ehca: Report RDMA atomic attributes in query_qp()

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ehca: Set SEND_GRH flag for all non-LL UD QPs on eHCA2
Stefan Roscher [Mon, 9 Jul 2007 13:27:13 +0000 (15:27 +0200)]
IB/ehca: Set SEND_GRH flag for all non-LL UD QPs on eHCA2

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ehca: Support UD low-latency QPs
Stefan Roscher [Mon, 9 Jul 2007 13:26:31 +0000 (15:26 +0200)]
IB/ehca: Support UD low-latency QPs

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ehca: add Shared Receive Queue support
Joachim Fenkes [Mon, 9 Jul 2007 13:25:10 +0000 (15:25 +0200)]
IB/ehca: add Shared Receive Queue support

Support SRQs on eHCA2. Since an SRQ is a QP for eHCA2, a lot of code
(structures, create, destroy, post_recv) can be shared between QP and SRQ.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ehca: QP code restructuring in preparation for SRQ
Joachim Fenkes [Mon, 9 Jul 2007 13:23:15 +0000 (15:23 +0200)]
IB/ehca: QP code restructuring in preparation for SRQ

- Replace init_qp_queues() by a shorter init_qp_queue(), eliminating
  duplicate code.

- hipz_h_alloc_resource_qp() doesn't need a pointer to struct ehca_qp any
  longer. All input and output data is transferred through the parms
  parameter.

- Change the interface to also support SRQ.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ehca: HW level, HW caps and MTU autodetection
Joachim Fenkes [Mon, 9 Jul 2007 13:21:45 +0000 (15:21 +0200)]
IB/ehca: HW level, HW caps and MTU autodetection

In preparation for support of new eHCA2 features, change adapter probing:
 - Hardware level is changed to encode major and minor chip version
 - Hardware capabilities are queried from the firmware
 - The maximum MTU is queried from the firmware instead of assuming a
   fixed value

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ehca: Change scaling_code parameter description to match default value
Hoang-Nam Nguyen [Mon, 9 Jul 2007 13:20:55 +0000 (15:20 +0200)]
IB/ehca: Change scaling_code parameter description to match default value

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: return correct PortGUID in NodeInfo
Sean Hefty [Fri, 29 Jun 2007 02:16:20 +0000 (19:16 -0700)]
IB/ipath: return correct PortGUID in NodeInfo

Return the PortGUID of the correct port when responding to a NodeInfo
query.  Returning the SystemImageGUID causes issues when there are
multiple HCAs in a single system.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB: Update mailing list address
Roland Dreier [Tue, 10 Jul 2007 03:12:26 +0000 (20:12 -0700)]
IB: Update mailing list address

The InfiniBand / RDMA discussion list has moved.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Remove bogus RD_ATOMIC checks from modify_qp
Arthur Jones [Fri, 6 Jul 2007 19:48:58 +0000 (12:48 -0700)]
IB/ipath: Remove bogus RD_ATOMIC checks from modify_qp

The changeset 3859e39d ("IB/ipath: Support larger IB_QP_MAX_DEST_RD_ATOMIC
and IB_QP_MAX_QP_RD_ATOMIC") added support for larger RD_ATOMIC values,
but it failed to take out the stricter checks that were before these and
hence had no effect.  This patch takes out the bogus checks....

Signed-off-by: Arthur Jones <arthur.jones@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Test interrupts at driver startup
Arthur Jones [Fri, 6 Jul 2007 19:48:53 +0000 (12:48 -0700)]
IB/ipath: Test interrupts at driver startup

All too often, interrupts do not get enabled for our card due to BIOS
misconfiguration and other issues.  This patch checks for that
condition on startup and warns the user.  This patch is based on work
(check LID availability) by Robert Walsh.

Signed-off-by: Arthur Jones <arthur.jones@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Remove support for preproduction HTX InfiniPath cards
Ralph Campbell [Fri, 6 Jul 2007 19:48:48 +0000 (12:48 -0700)]
IB/ipath: Remove support for preproduction HTX InfiniPath cards

Clean up some code by removing support for some older pre-production
HTX InfiniPath cards.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
16 years agoIB/ipath: Change version wording to be less confusing with release number
Dave Olson [Fri, 6 Jul 2007 19:48:43 +0000 (12:48 -0700)]
IB/ipath: Change version wording to be less confusing with release number

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Lower default number of kernel send buffers
Ralph Campbell [Fri, 6 Jul 2007 19:48:38 +0000 (12:48 -0700)]
IB/ipath: Lower default number of kernel send buffers

The default calculation for the number of send buffers to allocate to
the kernel was too high for the PCIe version of the chip thus leaving
fewer than desired send buffers for user MPI applications.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Update MAINTAINERS entry
Arthur Jones [Tue, 10 Jul 2007 03:12:26 +0000 (20:12 -0700)]
IB/ipath: Update MAINTAINERS entry

Bryan is no longer with QLogic and we now have a public git server and
a public email alias for infinipath driver patches.  And, as pointed
out by Hal Rosenstock, the mailing list has changed as well.

Signed-off-by: Arthur Jones <arthur.jones@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Be more cautious about coming out of freeze mode
Dave Olson [Fri, 6 Jul 2007 19:48:33 +0000 (12:48 -0700)]
IB/ipath: Be more cautious about coming out of freeze mode

We are more careful to be sure that we don't lose information about
changes that occurred while we were in freeze mode, when the chip will
not notify us, and try to avoid false error interrupts while doing
cleanup.  Put all of this logic in a new function ipath_clear_freeze().

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Add barrier before updating WC head in shared memory
Ralph Campbell [Fri, 6 Jul 2007 19:48:23 +0000 (12:48 -0700)]
IB/ipath: Add barrier before updating WC head in shared memory

Add a barrier to make sure the CPU doesn't reorder writes to memory,
since user programs can be polling on the head index update and the
entry should be written before that.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB: Use menuconfig for InfiniBand menu
Jan Engelhardt [Wed, 23 May 2007 21:21:22 +0000 (14:21 -0700)]
IB: Use menuconfig for InfiniBand menu

Change Kconfig objects from "menu, config" into "menuconfig" so
that the user can disable the whole feature without having to
enter the menu first.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/cxgb3: Check return of kmalloc() in iwch_register_device()
WANG Cong [Tue, 10 Jul 2007 03:12:26 +0000 (20:12 -0700)]
RDMA/cxgb3: Check return of kmalloc() in iwch_register_device()

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
[ Also remove cast from void * return of kmalloc() as suggested by
  Jesper Juhl <jesper.juhl@gmail.com>. ]
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/cxgb3: Don't abort after failures sending the mpa reply
Steve Wise [Mon, 25 Jun 2007 17:46:00 +0000 (12:46 -0500)]
RDMA/cxgb3: Don't abort after failures sending the mpa reply

This bug results in an abort request being sent down _after_ the tid
has been released.  If the tid happens to have been reused, then the
subsequent generation of the tid gets incorrectly aborted.

The thread running iwch_accecpt_cr() must not abort a connection if an
error is returned after being awakened.  If any errors did occur while
iwch_accept_cr() is blocked, then the connection has already been
aborted on the thread processing the error.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/cxgb3: Don't post TID_RELEASE message
Steve Wise [Thu, 21 Jun 2007 23:17:57 +0000 (18:17 -0500)]
RDMA/cxgb3: Don't post TID_RELEASE message

The LLD does this for us in cxgb3_remove_tid().

Also fixed active open failure cases where we also shouldn't be
releasing the TID.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/cxgb3: ctrl-qp init/clear shouldn't set the gen bit
Steve Wise [Tue, 19 Jun 2007 14:27:48 +0000 (09:27 -0500)]
RDMA/cxgb3: ctrl-qp init/clear shouldn't set the gen bit

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/cxgb3: Don't count neg_adv abort_req_rss messages as real aborts
Steve Wise [Tue, 19 Jun 2007 14:27:48 +0000 (09:27 -0500)]
RDMA/cxgb3: Don't count neg_adv abort_req_rss messages as real aborts

Negative advice messages should _not_ count toward the 2 abort
requests needed to indicate an abort request.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/cxgb3: TERMINATE WRs can hang the tx ofld queue
Steve Wise [Tue, 19 Jun 2007 14:27:48 +0000 (09:27 -0500)]
RDMA/cxgb3: TERMINATE WRs can hang the tx ofld queue

Don't set the gen bits nor length bits in the terminate WR.  This is
done by the LLD driver.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/cxgb3: Streaming -> RDMA mode transition fixes
Steve Wise [Mon, 14 May 2007 18:27:27 +0000 (13:27 -0500)]
RDMA/cxgb3: Streaming -> RDMA mode transition fixes

Due to a HW issue, our current scheme to transition the connection from
streaming to rdma mode is broken on the passive side.  The firmware
and driver now support a new transition scheme for the passive side:

 - driver posts rdma_init_wr (now including the initial receive seqno)
 - driver posts last streaming message via TX_DATA message (MPA start
   response)
 - uP atomically sends the last streaming message and transitions the
   tcb to rdma mode.
 - driver waits for wr_ack indicating the last streaming message was ACKed.

NOTE: This change also bumps the required firmware version to 4.3.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agomlx4_core: Get the maximum message size from reported device capabilities
Dotan Barak [Tue, 26 Jun 2007 12:55:28 +0000 (15:55 +0300)]
mlx4_core: Get the maximum message size from reported device capabilities

Get the maximum message size from the device capabilities returned
from the QUERY_DEV_CAP firmware command, rather than hard-coding 2 GB.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Update copyright dates
John Gregor [Mon, 11 Jun 2007 17:21:14 +0000 (10:21 -0700)]
IB/ipath: Update copyright dates

Now that it's June, it's about time to update
the copyright notices of files that have changed.

Signed-off-by: John Gregor <john.gregor@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Clean send flags properly on QP reset
Robert Walsh [Mon, 4 Jun 2007 16:55:48 +0000 (09:55 -0700)]
IB/ipath: Clean send flags properly on QP reset

Signed-off-by: Robert Walsh <robert.walsh@qlogic.com>
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: ipath_poll fixups and enhancements
Robert Walsh [Mon, 18 Jun 2007 21:24:49 +0000 (14:24 -0700)]
IB/ipath: ipath_poll fixups and enhancements

Fix ipath_poll and enhance it so we can poll for urgent packets or
regular packets and receive notifications of when a header queue
overflows.

Signed-off-by: Robert Walsh <robert.walsh@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Send ACK invalid where appropriate
Robert Walsh [Mon, 18 Jun 2007 21:24:48 +0000 (14:24 -0700)]
IB/ipath: Send ACK invalid where appropriate

The IB specification ch. 9.9.3 table 58 says that a QP which isn't set
up for the operation should return a NAK invalid request.

Signed-off-by: Robert Walsh <robert.walsh@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Add capability to modify PBC word
Michael Albaugh [Mon, 18 Jun 2007 21:24:47 +0000 (14:24 -0700)]
IB/ipath: Add capability to modify PBC word

During compliance testing and when debugging some interconnect issues,
it is very useful to be able to send malformed packets, without having
the device signal them as malformed (drop, or terminate with EBP). The
hardware supports this, but the driver "diagnostic packet" interface
did not.

Extend capability to send specific malformed packets for testing.

Signed-off-by: Michael Albaugh <Michael.Albaugh@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Make handling of one subport consistent
Mark Debbage [Mon, 18 Jun 2007 21:24:46 +0000 (14:24 -0700)]
IB/ipath: Make handling of one subport consistent

Previously the driver and userspace code handled the case of 1 subport
somewhat inconsistently.  The new interpretation of this situation is
that if one subport is requested, the driver turns on the subport
mechanism and arranges for the port to be "shared" by one process.  In
normal use the userspace library does not use this configuration and
instead arranges for the port not to be shared at all.  This
particular idiom can be useful for testing purposes.

Signed-off-by: Mark Debbage <mark.debbage@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Correct checking of swminor version field when using subports
Mark Debbage [Mon, 18 Jun 2007 21:24:45 +0000 (14:24 -0700)]
IB/ipath: Correct checking of swminor version field when using subports

When subports are required to run a program, this patch checks that
the driver and the userspace library have compatible subport
implementations.  This is achieved through checks on the swminor
version field built into the driver and userspace library.  Bad
combinations are reported through syslog and result in an error when
opening the port.

Signed-off-by: Mark Debbage <mark.debbage@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Duplicate RDMA reads can cause responder to NAK inappropriately
Ralph Campbell [Mon, 18 Jun 2007 21:24:44 +0000 (14:24 -0700)]
IB/ipath: Duplicate RDMA reads can cause responder to NAK inappropriately

A duplicate RDMA read request can fool the responder into NAKing a new
RDMA read request because the responder wasn't keeping track of
whether the queue of RDMA read requests had been sent at least once.
For example, requester sends 4 2K byte RDMA read requests, times out,
and resends the first, then sees the 4 responses, then sends a 5th
RDMA read or atomic operation.  The responder sees the 4 requests,
sends 4 responses, sees the resent 1st request, rewinds the queue,
then sees the 5th request but thinks the queue is full and that the
requester is invalidly sending a 5th new request.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Fix possible data corruption if multiple SGEs used for receive
Ralph Campbell [Mon, 18 Jun 2007 21:24:44 +0000 (14:24 -0700)]
IB/ipath: Fix possible data corruption if multiple SGEs used for receive

The code to copy data from the receive queue buffers to the IB SGEs
doesn't check the SGE length, only the memory region/page length when
copying data.  This could overwrite parts of the user's memory that
were not intended to be written.  It can only happen if multiple SGEs
are used to describe a receive buffer which almost never happens in
practice.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Wait for PIO available interrupt
Ralph Campbell [Mon, 18 Jun 2007 21:24:43 +0000 (14:24 -0700)]
IB/ipath: Wait for PIO available interrupt

The send function is called when posting new send work requests.
There is no point in trying to send a packet if the QP is already
waiting for a HW send buffer so don't clear the busy bit until the
buffer available interrupt happens.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Fix RDMA read retry code
Ralph Campbell [Mon, 18 Jun 2007 21:24:42 +0000 (14:24 -0700)]
IB/ipath: Fix RDMA read retry code

A RDMA read response or atomic response can ACK earlier sends and RDMA
writes.  In this case, the wrong work request pointer was being used
to store the read first response or atomic result.  Also, if a RDMA
read request is retried, the code to compute which request to resend
was incorrect.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Use S_ABORT not cancel and abort on exit freeze mode after recovery
Dave Olson [Mon, 18 Jun 2007 21:24:41 +0000 (14:24 -0700)]
IB/ipath: Use S_ABORT not cancel and abort on exit freeze mode after recovery

This centralizes the use of the abort functionality, removes the
unneeded buffer cancel (abort does the same thing), sets up to ignore
launch errors after abort, same as cancel.  We need abort on exit from
freeze mode to avoid having buffers stuck in the busy state, if a user
process happened to complete the send while we were in freeze mode
doing the recovery.

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Fix the mtrr_add args for chips with 2 buffer sizes
Dave Olson [Mon, 18 Jun 2007 21:24:40 +0000 (14:24 -0700)]
IB/ipath: Fix the mtrr_add args for chips with 2 buffer sizes

The values passed have never been right for iba 6120 chips, but just
happened to work.  We needed to select the right buffer offset in the
chip (both are in same register), and the total length was wrong also,
but was covered by the rounding up.

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Change use of constants for TID type to defined values
Joan Eslinger [Mon, 18 Jun 2007 21:24:39 +0000 (14:24 -0700)]
IB/ipath: Change use of constants for TID type to defined values

Define pkt rcvd 'type' in a way consistent with HW spec and chips.

The hardware considers received packets of type 0 to be expected, and
type 1 to be eager. The driver was calling the ipath_f_put_tid
functions using a variable called 'type' set to 0 for eager and to 1
for expected packets.  Worse, the iba6110 and iba6120 drivers used
those values inconsistently.  This was quite confusing.  Now
everything is consistent with the hardware.

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Set M bit in BTH according to IB spec
Ralph Campbell [Mon, 18 Jun 2007 21:24:38 +0000 (14:24 -0700)]
IB/ipath: Set M bit in BTH according to IB spec

According to chapter 17.2.8.1.1, QPs start in the migrated state and
should send packets with the M bit set in the BTH.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Fix local loopback bug when waiting for resources
Ralph Campbell [Mon, 18 Jun 2007 21:24:38 +0000 (14:24 -0700)]
IB/ipath: Fix local loopback bug when waiting for resources

This patch fixes a minor bug where the wrong QP was checked for a send
work request that should wait for an RNR timeout.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Fix problem with next WQE after a UC completion
Ralph Campbell [Mon, 18 Jun 2007 21:24:37 +0000 (14:24 -0700)]
IB/ipath: Fix problem with next WQE after a UC completion

This patch fixes a bug introduced when moving some code around for
readability.

Setting the wqe pointer at the end of the function is a NOP since it
isn't used.  Move it back to where it is used.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Fill in some missing FMR-related fields in query_device
Robert Walsh [Mon, 18 Jun 2007 21:24:36 +0000 (14:24 -0700)]
IB/ipath: Fill in some missing FMR-related fields in query_device

In ipath_query_device(), some of the struct ib_device_attr fields were
not being initialized.

Signed-off-by: Robert Walsh <robert.walsh@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Fix maximum MTU reporting
Robert Walsh [Mon, 18 Jun 2007 21:24:35 +0000 (14:24 -0700)]
IB/ipath: Fix maximum MTU reporting

Although our chip supports 4K MTUs, our driver doesn't yet support
this feature, so limit the maximum MTU to 2K until we get support for
4K MTUs implemented.

Signed-off-by: Robert Walsh <robert.walsh@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Support the IBA6110 revision 4
Dave Olson [Mon, 18 Jun 2007 21:24:35 +0000 (14:24 -0700)]
IB/ipath: Support the IBA6110 revision 4

Recognize IBA 6110 Revision 4: same feature set, etc. as earlier revisions.

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Log "active" time and some errors to EEPROM
Michael Albaugh [Thu, 17 May 2007 14:26:28 +0000 (07:26 -0700)]
IB/ipath: Log "active" time and some errors to EEPROM

We currently track various errors, now we enhance that capability by
logging some of them to EEPROM.  We also now log a cumulative "active"
time defined by traffic though the InfiniPath HCA beyond the normal SM
traffic.

Signed-off-by: Michael Albaugh <michael.albaugh@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Remove incompletely implemented ipath_runtime flags and code
John Gregor [Thu, 17 May 2007 15:15:50 +0000 (08:15 -0700)]
IB/ipath: Remove incompletely implemented ipath_runtime flags and code

The IPATH_RUNTIME_PBC_REWRITE and the IPATH_RUNTIME_LOOSE_DMA_ALIGN
flags were not ever implemented correctly and did not turn out to be
necessary.  Remove the last vestiges of these flags but mark the spot
with a comment to remind us to not reuse these flags in the interest
of binary compatibility.  The INFINIPATH_XGXS_SUPPRESS_ARMLAUNCH_ERR
bit was also not found to be useful, so it was dropped in the cleanup
as well.

Signed-off-by: John Gregor <john.gregor@qlogic.com>
Signed-off-by: Arthur Jones <arthur.jones@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Lock and always use shadow copies of GPIO register
Michael Albaugh [Thu, 17 May 2007 14:05:04 +0000 (07:05 -0700)]
IB/ipath: Lock and always use shadow copies of GPIO register

The new LED blinking interface adds more contention for the
unprotected GPIO pins that were already shared, though not commonly at
the same time.  We add locks to the accesses to these pins so that
Read-Modify-Write is now safe.  Some of these locks are added at
interrupt context, so we shadow the registers which drive and inspect
these pins to avoid the mmio read/writes.  This mitigates the effects
of the locks and hastens us through the interrupt.

Add locking and always use shadows for registers controlling GPIO pins
(ExtCtrl and GPIOout). The use of shadows implies doing less I/O,
which can make I2C operation too fast on some platforms. An explicit
udelay(1) in SCL manipulation fixes that.

Signed-off-by: Michael Albaugh <michael.albaugh@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Support blinking LEDs with an led_override file
Michael Albaugh [Wed, 16 May 2007 22:45:09 +0000 (15:45 -0700)]
IB/ipath: Support blinking LEDs with an led_override file

When we want to find an InfiniPath HCA in a rack of nodes, it is often
expeditious to blink the status LEDs via a userspace /sys file.

A write-only led_override "file" is published per device. Writes to
this file are interpreted as (string form) numbers, and the resulting
value sent to ipath_set_led_override(). The upper eight bits are
interpretted as a 4.4 fixed-point "frequency in Hertz", and the bottom
two 4-bit values are alternately (D0..3, then D4..7) used by the
board-specific LED-setting function to override the normal state.

Signed-off-by: Michael Albaugh <michael.albaugh@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Include <linux/vmalloc.h> to fix ppc64 build
Bryan O'Sullivan [Wed, 16 May 2007 22:31:19 +0000 (15:31 -0700)]
IB/ipath: Include <linux/vmalloc.h> to fix ppc64 build

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agomlx4_core: Include linux/mutex.h from mlx4.h
Michael S. Tsirkin [Tue, 10 Jul 2007 03:12:20 +0000 (20:12 -0700)]
mlx4_core: Include linux/mutex.h from mlx4.h

mlx4.h uses struct mutex, so although <linux/mutex.h> seems to be pulled in
indirectly by one of the headers it includes, the right thing to do is
to include <linux/mutex.h> directly.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/mlx4: Include linux/mutex.h from mlx4_ib.h
Michael S. Tsirkin [Mon, 11 Jun 2007 05:56:10 +0000 (08:56 +0300)]
IB/mlx4: Include linux/mutex.h from mlx4_ib.h

mlx4_ib.h uses struct mutex, so although <linux/mutex.h> seems to be
pulled in indirectly by one of the headers it includes, the right
thing is to include <linux/mutex.h> directly.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB: Fix ib_umem_get() when npages == 0
Andrew Morton [Fri, 8 Jun 2007 23:29:43 +0000 (16:29 -0700)]
IB: Fix ib_umem_get() when npages == 0

gcc correctly warned:

drivers/infiniband/core/umem.c: In function 'ib_umem_get':
drivers/infiniband/core/umem.c:78: warning: 'ret' may be used uninitialized in this function

Set ret to 0 in case npages == 0 and the loop isn't entered at all.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB: Remove garbage non-ASCII characters from comments
Roland Dreier [Mon, 9 Jul 2007 23:17:32 +0000 (16:17 -0700)]
IB: Remove garbage non-ASCII characters from comments

A few files had 0xa0 characters in comments.  Remove them so that the
files are clean ASCII text.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ehca: Refactor "maybe missed event" code
Joachim Fenkes [Thu, 24 May 2007 14:51:05 +0000 (16:51 +0200)]
IB/ehca: Refactor "maybe missed event" code

Refactor the ehca changes from commit ed23a727 ("IB: Return "maybe
missed event" hint from ib_req_notify_cq()") so the queue arithmetic
is done in slightly fewer lines.  Also, move the spinlock flags into
the block they're used in.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/mad: Enhance SMI for switch support
Hal Rosenstock [Mon, 14 May 2007 21:21:52 +0000 (17:21 -0400)]
IB/mad: Enhance SMI for switch support

Extend the SMI with switch (intermediate hop) support. Care has been
taken to ensure that the CA (and router) code paths are changed as
little as possible.

Signed-off-by: Suresh Shelvapille <suri@baymicrosystems.com>
Signed-off-by: Hal Rosenstock <halr@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Mon, 9 Jul 2007 22:50:56 +0000 (15:50 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (31 commits)
  firewire: fw-sbp2: fix DMA mapping of management ORBs
  firewire: fw-sbp2: fix DMA mapping of command ORBs
  firewire: fw-sbp2: fix DMA mapping of S/G tables
  firewire: fw-sbp2: add a boundary check
  firewire: fw-sbp2: correctly align page tables
  firewire: fw-sbp2: memset wants string.h
  firewire: fw-sbp2: use correct speed in sbp2_agent_reset
  firewire: fw-sbp2: correctly dereference by container_of
  firewire: Document userspace ioctl interface.
  firewire: fw-sbp2: implement nonexclusive login
  firewire: fw-sbp2: let SCSI shutdown commands through before logout
  firewire: fw-sbp2: implement max sectors limit for some old bridges
  firewire: simplify a struct type
  firewire: support S100B...S400B and link slower than PHY
  firewire: optimize gap count with 1394b leaf nodes
  firewire: remove unused macro
  firewire: missing newline in printk
  firewire: fw-sbp2: remove unused struct member
  ieee1394: remove old isochronous ABI
  ieee1394: sbp2: change some module parameters from int to bool
  ...

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Mon, 9 Jul 2007 22:50:31 +0000 (15:50 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: handle cases of volume knobs generating relative values
  HID: Logitech keyboard 0xc311 needs reset leds quirk
  HID: support for logitech cordless desktop LX500 special mapping
  HID: fix autocentering of PID devices
  HID: separate quirks for report descriptor fixup
  HID: Add NOGET quirk for all NCR devices
  HID: support for Petalynx Maxter remote control
  HID: fix mismatch between hid-input HUT find/search mapping and the HUT
  HID: support for Gameron dual psx adaptor
  USB HID: avoid flush_scheduled_work()
  HID: Use menuconfig objects
  HID: force hid-input for Microsoft SideWinder GameVoice device
  HID: input mapping for Chicony KU-0418 tactical pad
  HID: make debugging output runtime-configurable

16 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Mon, 9 Jul 2007 22:26:43 +0000 (15:26 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (75 commits)
  Ethernet driver for EISA only SNI RM200/RM400 machines
  Extract chip specific code out of lasi_82596.c
  ehea: Whitespace cleanup
  pasemi_mac: Fix TX interrupt threshold
  spidernet: Replace literal with const
  r8169: perform RX config change after mac filtering
  r8169: mac address change support
  r8169: display some extra debug information during startup
  r8169: add endianess annotations to [RT]xDesc
  r8169: align the IP header when there is no DMA constraint
  r8169: add bit description for the TxPoll register
  r8169: cleanup
  r8169: remove the media option
  r8169: small 8101 comment
  r8169: confusion between hardware and IP header alignment
  r8169: merge with version 8.001.00 of Realtek's r8168 driver
  r8169: merge with version 6.001.00 of Realtek's r8169 driver
  r8169: prettify mac_version
  r8169: populate the hw_start handler for the 8110
  r8169: populate the hw_start handler for the 8168
  ...

16 years agofirewire: fw-sbp2: fix DMA mapping of management ORBs
Stefan Richter [Mon, 2 Jul 2007 19:04:44 +0000 (21:04 +0200)]
firewire: fw-sbp2: fix DMA mapping of management ORBs

The CPU must not touch the buffer after it was DMA-mapped.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: fw-sbp2: fix DMA mapping of command ORBs
Stefan Richter [Mon, 2 Jul 2007 19:04:08 +0000 (21:04 +0200)]
firewire: fw-sbp2: fix DMA mapping of command ORBs

The CPU must not touch the buffer after it was DMA-mapped.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: fw-sbp2: fix DMA mapping of S/G tables
Stefan Richter [Mon, 2 Jul 2007 20:07:34 +0000 (22:07 +0200)]
firewire: fw-sbp2: fix DMA mapping of S/G tables

  - The CPU must not touch the buffer after it was DMA-mapped.
  - The size argument of dma_unmap_single(...page_table...) was bogus.
  - Move a comment closer to the code to which it refers to.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: fw-sbp2: add a boundary check
Stefan Richter [Sun, 1 Jul 2007 11:56:03 +0000 (13:56 +0200)]
firewire: fw-sbp2: add a boundary check

Add rudimentary check for the case that the page table overflows due to
merging of s/g elements by the IOMMU.  This would have lead to
overwriting of arbitrary memory.

After this change I expect that an offending command will be
unsuccessfully retried until the scsi_device is taken offline by SCSI
core.  It's a border case and not worth to implement a recovery
strategy.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: fw-sbp2: correctly align page tables
Stefan Richter [Sun, 1 Jul 2007 11:55:31 +0000 (13:55 +0200)]
firewire: fw-sbp2: correctly align page tables

This is required per SBP-2 clause 5.2.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: fw-sbp2: memset wants string.h
Stefan Richter [Sun, 1 Jul 2007 11:54:57 +0000 (13:54 +0200)]
firewire: fw-sbp2: memset wants string.h

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: fw-sbp2: use correct speed in sbp2_agent_reset
Stefan Richter [Sun, 1 Jul 2007 11:54:24 +0000 (13:54 +0200)]
firewire: fw-sbp2: use correct speed in sbp2_agent_reset

noticed by Jay Fenlason

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: fw-sbp2: correctly dereference by container_of
Jay Fenlason [Wed, 27 Jun 2007 20:04:33 +0000 (16:04 -0400)]
firewire: fw-sbp2: correctly dereference by container_of

Replace a cast with a container_of().  As long as nobody reorders the
structure elements, they do the same thing, but container_of() is more
readable.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (added complete_command_orb)
Acked-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: Document userspace ioctl interface.
Kristian Høgsberg [Thu, 21 Jun 2007 22:20:34 +0000 (00:20 +0200)]
firewire: Document userspace ioctl interface.

The isochronous packet format is still not documented, but this
is a good first step.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (format, wording)
16 years agofirewire: fw-sbp2: implement nonexclusive login
Stefan Richter [Sun, 17 Jun 2007 21:55:41 +0000 (23:55 +0200)]
firewire: fw-sbp2: implement nonexclusive login

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: fw-sbp2: let SCSI shutdown commands through before logout
Stefan Richter [Mon, 18 Jun 2007 16:46:49 +0000 (18:46 +0200)]
firewire: fw-sbp2: let SCSI shutdown commands through before logout

This affects of course only the "soft shutdown" case, e.g. "modprobe -r
firewire-sbp2", while it doesn't matter for hot unplug.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: fw-sbp2: implement max sectors limit for some old bridges
Stefan Richter [Sun, 17 Jun 2007 21:52:08 +0000 (23:52 +0200)]
firewire: fw-sbp2: implement max sectors limit for some old bridges

This currently only affects one bridge in the hardwired blacklist.
I don't own one of those, hence haven't tested it.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agofirewire: simplify a struct type
Stefan Richter [Sun, 17 Jun 2007 21:39:58 +0000 (23:39 +0200)]
firewire: simplify a struct type

cleanup after "firewire: support S100B...S400B and link slower than PHY"

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: support S100B...S400B and link slower than PHY
Stefan Richter [Sun, 10 Jun 2007 19:31:36 +0000 (21:31 +0200)]
firewire: support S100B...S400B and link slower than PHY

Use a speed probe to determine the speed over 1394b buses and of nodes
which report a link speed less than their PHY speed.

Log the effective maximum speed of newly created nodes in dmesg.

Also, read the config ROM (except bus info block) at the maximum speed
rather than S100.  This isn't a real optimization though because we
still only use quadlet read requests for the entire ROM.

The patch also adds support for S1600 and S3200, although such hardware
does not exist yet.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: optimize gap count with 1394b leaf nodes
Stefan Richter [Mon, 18 Jun 2007 17:44:12 +0000 (19:44 +0200)]
firewire: optimize gap count with 1394b leaf nodes

Table-based gap count optimization cannot be used if 1394b repeater PHYs
are present.  But it does work with 1394b leaf nodes.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
16 years agofirewire: remove unused macro
Stefan Richter [Sat, 9 Jun 2007 17:27:07 +0000 (19:27 +0200)]
firewire: remove unused macro

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agofirewire: missing newline in printk
Stefan Richter [Sat, 9 Jun 2007 17:26:22 +0000 (19:26 +0200)]
firewire: missing newline in printk

Also remove some errno printouts which will be shown by infrastructure
code anyway.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agofirewire: fw-sbp2: remove unused struct member
Stefan Richter [Fri, 11 May 2007 21:04:08 +0000 (23:04 +0200)]
firewire: fw-sbp2: remove unused struct member

cleanup after support of single-buffer requests was dropped

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
16 years agoieee1394: remove old isochronous ABI
Stefan Richter [Sun, 24 Jun 2007 13:31:54 +0000 (15:31 +0200)]
ieee1394: remove old isochronous ABI

Based on patch "the scheduled removal of RAW1394_REQ_ISO_{SEND,LISTEN}"
from Adrian Bunk, November 20 2006.

This patch also removes the underlying facilities in ohci1394 and
disables them in pcilynx.  That is, hpsb_host_driver.devctl() and
hpsb_host_driver.transmit_packet() are no longer used for iso reception
and transmission.

Since video1394 and dv1394 only work with ohci1394 and raw1394's rawiso
interface has never been implemented in pcilynx, pcilynx is now no
longer useful for isochronous applications.

raw1394 will still handle the request types but will complete the
requests with errors that indicate API version conflicts.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agoieee1394: sbp2: change some module parameters from int to bool
Stefan Richter [Sun, 17 Jun 2007 21:54:52 +0000 (23:54 +0200)]
ieee1394: sbp2: change some module parameters from int to bool

This is upwards compatible, except that integer values other than 0 or 1
are no longer accepted.  But values like "Y", "N", "no", "nnoooh!" work
now.

Also, improve a comment on the serialize_io parameter and make the
ORB_SET_EXCLUSIVE macro ultra-safe.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agoieee1394: first minimal NUMA awareness
Stefan Richter [Sun, 8 Jul 2007 11:34:21 +0000 (13:34 +0200)]
ieee1394: first minimal NUMA awareness

Association of a host device with a node on NUMA machines optimizes
allocations of skbs given from the networking stack to eth1394.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agoieee1394: eth1394: revert parent device to that in 2.6.20
Stefan Richter [Sun, 27 May 2007 21:14:05 +0000 (23:14 +0200)]
ieee1394: eth1394: revert parent device to that in 2.6.20

After ieee1394 was converted away from class_device like the networking
subsystem was already in 2.6.21, eth1394's device may point to the
fw-host device as its parent again like in 2.6.20.

This affects userspace tools which examine the sysfs representation of
eth1394's device.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>