1. 18 9月, 2006 12 次提交
    • D
      video1394: add poll file operation support · 4b60912e
      David Moore 提交于
      This patch adds support for the poll file operation to the video1394
      driver.
      Signed-off-by: NDavid Moore <dcm@acm.org>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      4b60912e
    • A
      the scheduled removal of drivers/ieee1394/sbp2.c:force_inquiry_hack · a1b3206b
      Adrian Bunk 提交于
      This patch contains the scheduled removal of the force_inquiry_hack
      module parameter.
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      a1b3206b
    • A
      Initialize ieee1394 early when built in · 8df4083c
      Andi Kleen 提交于
      This makes debugging with firescope easier.
      
      Signed-off-by: Andi Kleen <ak@suse.de> (original patch)
      
      Update:
       - no need for #ifdef MODULE
       - add comment in ieee1394_core, more verbose comment in ohci1394
      
      Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (update)
      8df4083c
    • S
      ieee1394: sbp2: convert sbp2util_down_timeout to waitqueue · e8398bb7
      Stefan Richter 提交于
      The waitqueue API is used to replace a custom wait mechanism.  Only one
      global waitqueue (instead of per-device waitqueues or completions) is
      added because there is usually just one waiter.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      e8398bb7
    • S
      ieee1394: sbp2: more checks of status block · 6065772d
      Stefan Richter 提交于
       - 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: NStefan Richter <stefanr@s5r6.in-berlin.de>
      6065772d
    • S
      ieee1394: sbp2: safer initialization of status fifo · 3e98eab4
      Stefan Richter 提交于
      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: NStefan Richter <stefanr@s5r6.in-berlin.de>
      3e98eab4
    • S
      ieee1394: sbp2: optimize DMA direction of command ORBs · d4018d7f
      Stefan Richter 提交于
      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: NStefan Richter <stefanr@s5r6.in-berlin.de>
      d4018d7f
    • S
      ieee1394: sbp2: discard return value of sbp2_link_orb_command · 28212767
      Stefan Richter 提交于
      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: NStefan Richter <stefanr@s5r6.in-berlin.de>
      28212767
    • S
      ieee1394: sbp2: safer last_orb and next_ORB handling · cc078189
      Stefan Richter 提交于
      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: NStefan Richter <stefanr@s5r6.in-berlin.de>
      cc078189
    • S
      ieee1394: remove #include <asm/semaphore.h> · 9154df53
      Stefan Richter 提交于
      These includes in ieee1394_core and eth1394 are obsolete.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      9154df53
    • S
      ieee1394: shrink tlabel pools, remove tpool semaphores · 9951903e
      Stefan Richter 提交于
      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: NStefan Richter <stefanr@s5r6.in-berlin.de>
      9951903e
    • S
      ieee1394: merge from Linus · 9b4f2e95
      Stefan Richter 提交于
      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: NStefan Richter <stefanr@s5r6.in-berlin.de>
      9b4f2e95
  2. 17 9月, 2006 28 次提交