1. 17 Sep, 2006 20 commits
    • Stefan Richter's avatar
      ieee1394: sbp2: more checks of status block · 6065772d
      Stefan Richter authored
       - Add checks for the (very unlikely) cases that the target writes too
         little or too much status data or writes unsolicited status.
       - Indicate that these and similar conditions are unlikely().
       - Check the 'resp' and 'sbp_status' fields for possible failure status.
       - Slightly optimize access macros for the status block bitfields.
       - Unify a few related log messages.
      
      TODO:  Check if 'src'==1, then withhold the respective ORB from reuse
      until status for any subsequent ORB was received.  This is an old bug
      whose fix requires more complex command queue handling.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      6065772d
    • Stefan Richter's avatar
      ieee1394: sbp2: safer initialization of status fifo · 3e98eab4
      Stefan Richter authored
      Sbp2's copy of the status fifo was cleared when management ORBs or new
      command ORBs were prepared.  The latter had potential for a race
      condition if the block layer's soft IRQ and the 1394 LLD's interrupt
      handler ran on different CPUs.  It would also yield wrong status if a
      command was completed with non-zero completion status before other
      commands that had zero completion status, and no new command was
      enqueued in the meantime.
      
      Now, the status buffer is cleared right before it is written.  Thus it
      ends up in the following simpler and safer access pattern:
       - sbp2_alloc_device: allocates and implicitly clears once,
       - sbp2_handle_status_write: clears, writes, and reads,
       - sbp2_query_logins, sbp2_login_device, sbp2_reconnect_device: read.
      The latter three do not race with sbp2_handle_status_write because of
      how the protocol works.
      
      As a tiny optimization, the first two quadlets of the status never need
      to be cleared.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      3e98eab4
    • Stefan Richter's avatar
      ieee1394: sbp2: optimize DMA direction of command ORBs · d4018d7f
      Stefan Richter authored
      Only the driver writes ORBs, the device just reads them.  Therefore
      PCI_DMA_BIDIRECTIONAL can be replaced by PCI_DMA_TODEVICE which may be
      cheaper on some architectures.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      d4018d7f
    • Stefan Richter's avatar
      ieee1394: sbp2: discard return value of sbp2_link_orb_command · 28212767
      Stefan Richter authored
      Since sbp2 is at the moment unable to do anything with the return value
      of sbp2_link_orb_command, just discard it.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      28212767
    • Stefan Richter's avatar
      ieee1394: sbp2: safer last_orb and next_ORB handling · cc078189
      Stefan Richter authored
      The sbp2 initiator has two ways to tell a target's fetch agent about new
      command ORBs:
       - Write the ORB's address to the ORB_POINTER register.  This must not
         be done while the fetch agent is active.
       - Put the ORB's address into the previously submitted ORB's next_ORB
         field and write to the DOORBELL register.  This may be done while the
         fetch agent is active or suspended.  It must not be done while the
         fetch agent is in reset state.
      Sbp2 has a last_orb pointer which indicates in what way a new command
      should be announced.  That pointer is concurrently accessed at various
      occasions.  Furthermore, initiator and target are accessing the next_ORB
      field of ORBs concurrently and asynchronously.
      
      This patch does:
       - Protect all initiator accesses to last_orb by sbp2_command_orb_lock.
       - Add pci_dma_sync_single_for_device before a previously submitted
         ORB's next_ORB field is overwritten.
       - Insert a memory barrier between when next_ORB_lo and next_ORB_hi are
         overwritten.  Next_ORB_hi must not be updated before next_ORB_lo.
       - Remove the rather unspecific and now superfluous qualifier "volatile"
         from the next_ORB fields.
       - Add comments on how last_orb is connected with what is known about
         the target's fetch agent's state.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      cc078189
    • Stefan Richter's avatar
      ieee1394: remove #include <asm/semaphore.h> · 9154df53
      Stefan Richter authored
      These includes in ieee1394_core and eth1394 are obsolete.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      9154df53
    • Stefan Richter's avatar
      ieee1394: shrink tlabel pools, remove tpool semaphores · 9951903e
      Stefan Richter authored
      This patch reduces the size of struct hpsb_host and also removes
      semaphores from ieee1394_transactions.c.  On i386, struct hpsb_host
      shrinks from 10656 bytes to 6688 bytes.  This is accomplished by
       - using a single wait_queue for hpsb_get_tlabel instead of many
         instances of semaphores,
       - using a single lock to serialize access to all tlabel pools (the
         protected code regions are small, i.e. lock contention very low),
       - omitting the sysfs attribute tlabels_allocations.
      
      Drawback:  In the rare case that a process needs to sleep because all
      transaction labels for the node are temporarily exhausted, it is also
      woken up if a tlabel for a different node became free, checks for an
      available tlabel, and is put to sleep again.  The check is not costly
      and the situation occurs extremely rarely.  (Tlabels are typically
      only exhausted if there was no context switch to the khpsbpkt thread
      which recycles tlables.)  Therefore the benefit of reduced tpool size
      outweighs this drawback.
      
      The sysfs attributes tlabels_free and tlabels_mask are not compiled
      anymore unless CONFIG_IEEE1394_VERBOSEDEBUG is set.
      
      The by far biggest member of struct hpsb_host, the struct csr_control
      csr (5272 bytes on i386), is now placed at the end of struct hpsb_host.
      
      Note, hpsb_get_tlabel calls the macro wait_event_interruptible with a
      condition argument which has a side effect (allocation of a tlabel and
      manipulation of the packet).  This side effect happens only if the
      condition is true.  The patch relies on wait_event_interruptible not
      evaluating the condition again after it became true.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      9951903e
    • Stefan Richter's avatar
      ieee1394: merge from Linus · 9b4f2e95
      Stefan Richter authored
      Conflicts: drivers/ieee1394/hosts.c
      Patch "lockdep: annotate ieee1394 skb-queue-head locking" was meddling
      with patch "ieee1394: fix kerneldoc of hpsb_alloc_host".
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      9b4f2e95
    • Jeff Garzik's avatar
      Merge branch 'master' into upstream-fixes · 803db244
      Jeff Garzik authored
      803db244
    • Frank Pavlic's avatar
      [PATCH] s390: qeth driver fixes [6/6] · 8b98a37c
      Frank Pavlic authored
      [PATCH 9/9] s390: qeth driver fixes [6/6]
      
      From: Frank Pavlic <fpavlic@de.ibm.com>
      	- Hipersockets has no IPV6 support, thus prevent issueing
      	  SETRTG_IPV6 control commands on Hipersockets devices.
      	- fixed error handling in qeth_sysfs_(un)register
      Signed-off-by: default avatarFrank Pavlic <fpavlic@de.ibm.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      8b98a37c
    • Frank Pavlic's avatar
      [PATCH] s390: qeth driver fixes [5/6] · f956b690
      Frank Pavlic authored
      [PATCH 8/9] s390: qeth driver fixes [5/6]
      
      From: Frank Pavlic <fpavlic@de.ibm.com>
      	fix kernel panic in qdio queue handling.
      	qeth_qdio_clear_card() could be invoked by 2 CPUs
      	simultaneously (for example reboot event and recovery).
      Signed-off-by: default avatarFrank Pavlic <fpavlic@de.ibm.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      f956b690
    • Frank Pavlic's avatar
      [PATCH] s390: qeth driver fixes [4/6] · 09d2d38a
      Frank Pavlic authored
      [PATCH 7/9] s390: qeth driver fixes [4/6]
      
      From: Frank Pavlic <fpavlic@de.ibm.com>
      	- fix kernel crash due to race,
      	  set card->state to SOFTSETUP after
      	  card and card->dev are initialized properly.
      	- remove CONFIG_QETH_PERF_STATS, use sysfs attribute instead,
      	  as we want to have the ability to turn on/off the
      	  statistics at runtime.
      Signed-off-by: default avatarFrank Pavlic <fpavlic@de.ibm.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      09d2d38a
    • Frank Pavlic's avatar
      [PATCH] s390: qeth driver fixes [3/6] · f7b65d70
      Frank Pavlic authored
      [PATCH 6/9] s390: qeth driver fixes [3/6]
      
      From: Frank Pavlic <fpavlic@de.ibm.com>
             	fixed kernel panic caused by qeth driver:
              Using a bonding device qeth driver will realloc
              headroom for every skb coming from the bond device.
              Once this happens qeth frees the original skb and
              set the skb pointer to the new realloced skb.
              Under heavy transmit workload (e.g.UDP streams) through bond
              network device the qdio output queue might get full.
              In this case we return with EBUSY from qeth_send_packet.
              Returning to qeth_hard_start_xmit routine
              the skb address on the stack still points to the old address,
              which has been freed before.
              Returning from qeth_hard_start_xmit with EBUSY results in
              requeuing the skb. In this case it corrupts the qdisc queue
              and results in kernel panic.
      Signed-off-by: default avatarFrank Pavlic <fpavlic@de.ibm.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      f7b65d70
    • Frank Pavlic's avatar
      [PATCH] s390: qeth driver fixes [2/6] · 1fda1a12
      Frank Pavlic authored
      [PATCH 5/9] s390: qeth driver fixes [2/6]
      
      From: Frank Pavlic <fpavlic@de.ibm.com>
      	- fixed error handling in create_device_attributes
      	- fixed some minor bugs in IPv4
      	  and IPv6 address checking
      Signed-off-by: default avatarFrank Pavlic <fpavlic@de.ibm.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      1fda1a12
    • Frank Pavlic's avatar
      [PATCH] s390: qeth driver fixes [1/6] · 330b6369
      Frank Pavlic authored
      [PATCH 4/9] s390: qeth driver fixes [1/6]
      
      From: Frank Pavlic <fpavlic@de.ibm.com>
      	- Drop incoming packets with vlan_tag set
                if card->vlangrp is not set.
              - use always vlan_hwaccel_rx to pass
      	  vlan frames to the stack.
              - fix recovery problem. Device was recovered
      	  properly but still not working.
      	  netif_carrier_on call right before
                recovery start fixes it.
      Signed-off-by: default avatarFrank Pavlic <fpavlic@de.ibm.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      330b6369
    • Frank Pavlic's avatar
      [PATCH] s390: Makefile cleanup · f449c565
      Frank Pavlic authored
      [PATCH 3/9] s390: Makefile cleanup
      
      From: Frank Pavlic <fpavlic@de.ibm.com>
       	remove CONFIG_MPC from Makefile which was
      	introduced accidently in the past.
      Signed-off-by: default avatarFrank Pavlic <fpavlic@de.ibm.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      f449c565
    • Frank Pavlic's avatar
      [PATCH] s390: netiucv driver fixes · 16a83b30
      Frank Pavlic authored
      [PATCH 2/9] s390: netiucv driver fixes
      
      From: Frank Pavlic <fpavlic@de.ibm.com>
      	- missing lock initialization added
              - avoid duplicate iucv-interfaces to the same peer
             	- rw-lock added for manipulating the list of
                defined iucv connections
      Signed-off-by: default avatarFrank Pavlic <fpavlic@de.ibm.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      16a83b30
    • Frank Pavlic's avatar
      [PATCH] s390: minor s390 network driver fixes · 4c7ae6ea
      Frank Pavlic authored
      Hi Jeff,
      this is a RESEND of the nine s390 network driver patches.
      I finally found  that my kmail corrupted almost every patch
      I sent the last time. Please apply these 9 patches and forget
      about my first attempt! Sorry for the delay, I had some fights
      with sendmail, IMAP and mutt configuration.
      
      Frank
      
      [RESEND PATCH 1/9] s390: minor s390 network driver fixes
      
      From: Frank Pavlic <fpavlic@de.ibm.com>
      	- iucv driver:
                use do { } while (0) constructs
      	  instead of empty defines to avoid compile bugs.
              - ctc driver:
                missing lock initialization added
              - lcs driver:
                BUG_ON usage was removed accidently
      	  with the last lcs patch.
                Put them back in place.
      Signed-off-by: default avatarFrank Pavlic <fpavlic@de.ibm.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      4c7ae6ea
    • Benjamin LaHaise's avatar
      [PATCH] i386/x86-64: Add core 2 to oprofile · f04b92e9
      Benjamin LaHaise authored
      Add the CPU identification needed by oprofile for Intel (r) Core (tm) 2
      CPUs.
      Signed-off-by: default avatarBenjamin LaHaise <benjamin.c.lahaise@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Cc: "Arun Sharma" <aruns@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      f04b92e9
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband · 35e4ddfc
      Linus Torvalds authored
      * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
        RDMA/cma: Increase the IB CM retry count in CMA
        IPoIB: Retry failed send-only multicast group joins
        IB/srp: Don't schedule reconnect from srp
      35e4ddfc
  2. 16 Sep, 2006 20 commits