1. 01 6月, 2007 1 次提交
    • S
      ieee1394: sbp2: offer SAM-conforming target port ID in sysfs · d7794c86
      Stefan Richter 提交于
      With "modprobe sbp2 long_ieee1394_id=y", the format of
      /sys/bus/scsi/devices/*:*:*:*/ieee1394_id is changed from e.g.
      0001041010004beb:0:0 to 0001041010004beb:00042c:0000.
      
      The longer format fully conforms to object identifier sizes as per
      SAM(-2...4) and reflects what the SAM target port identifier is meant to
      contain:  A Discovery ID allegedly specified by ISO/IEC 13213:1994 ---
      however there is no such thing; the authors of SAM probably meant
      Directory ID).  Especially target nodes with multiple dynamically added
      targets may use Directory IDs to persistently identify target ports.
      
      The new format is independent of implementation details of nodemgr.
      Thus the same ieee1394_id attribute format can be implemented in the new
      firewire stack.
      
      The ieee1394_id is typically used to create persistently named links in
      /dev/disk/by-id.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      d7794c86
  2. 28 5月, 2007 1 次提交
  3. 30 4月, 2007 4 次提交
    • A
      ieee1394: sbp2: include fixes · f84c922b
      Andrew Morton 提交于
      drivers/ieee1394/sbp2.c: In function 'sbp2util_access_timeout':
      drivers/ieee1394/sbp2.c:399: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
      drivers/ieee1394/sbp2.c:399: error: (Each undeclared identifier is reported only once
      drivers/ieee1394/sbp2.c:399: error: for each function it appears in.)
      drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'signal_pending'
      drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'schedule_timeout'
      drivers/ieee1394/sbp2.c: In function 'sbp2_prep_command_orb_sg':
      drivers/ieee1394/sbp2.c:1438: warning: implicit declaration of function 'page_address'
      drivers/ieee1394/sbp2.c:1438: warning: passing argument 2 of 'dma_map_single' makes pointer from integer without a cast
      drivers/ieee1394/sbp2.c: In function 'sbp2_handle_status_write':
      drivers/ieee1394/sbp2.c:1842: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
      
      Possibly due to changes in -mm, but this file should explicitly include the
      headers for the stuff it uses.
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (brought into alphabetic order)
      f84c922b
    • S
      ieee1394: sbp2: move some memory allocations into non-atomic context · 3d269cb5
      Stefan Richter 提交于
      When the command ORB pool is created, the ORB list won't be accessed
      concurrently.  Therefore we don't have to take the spinlock there.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      3d269cb5
    • S
      ieee1394: sbp2: optimize DMA direction of s/g tables · 2446a79f
      Stefan Richter 提交于
      Unlike the name suggests, "cmd->scatter_gather_element" holds only the
      s/g table, not the actual s/g elements.  Since the table is only read
      but never written by the device, DMA_BIDIRECTIONAL can be replaced by
      DMA_TO_DEVICE which may be cheaper on some architectures.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      2446a79f
    • S
      ieee1394: sbp2: enforce 32bit DMA mapping · 0555659d
      Stefan Richter 提交于
      In order to use OHCI-1394 physical DMA, all s/g elements, s/g tables,
      ORBs, and response buffers have to reside within the first 4 GB of the
      FireWire controller's physical address space.  Set the correct mask for
      DMA mappings.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      0555659d
  4. 09 2月, 2007 3 次提交
  5. 11 1月, 2007 1 次提交
  6. 30 12月, 2006 2 次提交
  7. 08 12月, 2006 20 次提交
  8. 22 11月, 2006 1 次提交
  9. 18 9月, 2006 7 次提交
    • S
      ieee1394: sbp2: enable auto spin-up for all SBP-2 devices · c394f1ea
      Stefan Richter 提交于
      This is a follow-up to patch "ieee1394: sbp2: enable auto spin-up for
      Maxtor disks".  When I 'ejected' an OXUF922 based HDD from a Mac OS X
      box, it was spun down by the Mac and did not spin up by itself when
      attached to a Linux box right after that.  The first SCSI command that
      required the bridge to access the drive ended in
      sda:<6>sd 18:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
          Additional sense: Logical unit not ready, initializing cmd. required
      
      Therefore the flag which instructs scsi_mod to send START STOP UNIT with
      START=1 ("make medium ready") after such a condition is now enabled
      unconditionally for all FireWire storage devices.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      c394f1ea
    • S
      ieee1394: sbp2: don't prefer MODE SENSE 10 · 98e238cd
      Stefan Richter 提交于
      In the old days, sbp2 used to coerce all MODE SENSE commands into the
      10 bytes version.  When all command set conversions were removed from
      sbp2 several months ago, sdev->use_10_for_ms = 1 was added.  Meaning,
      higher SCSI layers preferred the 10 bytes version but would try the 6
      bytes version if the former failed.
      
      Recently, a problem with the 10 bytes version was discovered.  An Initio
      INIC-1530 firmware accepted the 10 bytes version but replied with bogus
      data, showing the HDD incorrectly as write-protected.  Since RBC
      actually mandates MODE SENSE (6), I checked which version was sent by
      Windows XP and Mac OS X 10.3 to an SBP-2 target hosted by Linux --- it
      was the 6 bytes version.  (Exception: OS X sent the 10 bytes version to
      an MMC target.  RBC and SBC got MODE SENSE (6).)
      
      Therefore, drop the use_10_for_ms flag from sbp2.  Now the upper layers
      will try MODE SENSE (6) before MODE SENSE (10) on all SBP-2 devices.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      98e238cd
    • S
      ieee1394: sbp2: prevent rare deadlock in shutdown · 2cccbb55
      Stefan Richter 提交于
      Scsi_remove_device() may go into uninterruptible sleep if blocked.
      Therefore sbp2_remove() unblocks the Scsi_Host before the device is
      requested to be removed.  But there could be another 1394 bus reset
      after that which would block the host again.  The 1394 subsystem won't
      call sbp2_update() concurrently to sbp2_remove(), which is why there is
      no chance for sbp2_remove() to be unblocked by sbp2_update().
      
      The fix is to tell sbp2's bus reset handler when a device is to be shut
      down so that it skips scsi_block_requests() on that host.  As before,
      any new commands after a reset without reconnect will be failed quickly
      by sbp2scsi_queuecommand().
      
      In the long term, means to go without scsi_block_requests() should be
      found.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      2cccbb55
    • S
      ieee1394: sbp2: update includes · 902abed1
      Stefan Richter 提交于
      Remove unused includes.  Add missing includes, i.e. explicitly include
      all used headers.  Sort includes alphabetically.  Replace one call to
      signal_pending(current) to avoid to include headers just for this line.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      902abed1
    • S
      ieee1394: sbp2: better handling of transport errors · abbca103
      Stefan Richter 提交于
      If the target signals a transport failure via status block, complete the
      request with DID_BUSY to indicate to the SCSI subsystem that the command
      may succeed when retried.
      
      Also log diagnostic information if the status block shows a transport
      related problem.  It may point to hardware faults.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      abbca103
    • S
      ieee1394: sbp2: recheck node generation in sbp2_update · 4fc383c0
      Stefan Richter 提交于
      While sbp2_update() is doing its duties after a bus reset, another reset
      could happen.  Don't accept new requests until the next undisturbed
      sbp2_update() or until sbp2_remove().
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      4fc383c0
    • S
      ieee1394: sbp2: safer agent reset in error handlers · 1f427e80
      Stefan Richter 提交于
      The scsi_host_template's eh_abort_handler and eh_device_reset_handler
      are allowed to sleep.  Use this to run sbp2_agent_reset in the more
      reliable mode which returns _after_ its write transaction was finished.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      1f427e80