1. 22 12月, 2010 4 次提交
  2. 17 11月, 2010 1 次提交
    • J
      SCSI host lock push-down · f281233d
      Jeff Garzik 提交于
      Move the mid-layer's ->queuecommand() invocation from being locked
      with the host lock to being unlocked to facilitate speeding up the
      critical path for drivers who don't need this lock taken anyway.
      
      The patch below presents a simple SCSI host lock push-down as an
      equivalent transformation.  No locking or other behavior should change
      with this patch.  All existing bugs and locking orders are preserved.
      
      Additionally, add one parameter to queuecommand,
      	struct Scsi_Host *
      and remove one parameter from queuecommand,
      	void (*done)(struct scsi_cmnd *)
      
      Scsi_Host* is a convenient pointer that most host drivers need anyway,
      and 'done' is redundant to struct scsi_cmnd->scsi_done.
      
      Minimal code disturbance was attempted with this change.  Most drivers
      needed only two one-line modifications for their host lock push-down.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      Acked-by: NJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f281233d
  3. 26 10月, 2010 3 次提交
    • B
      [SCSI] libosd: write/read_sg_kern API · 6dd1d8a7
      Boaz Harrosh 提交于
      This is a trivial addition to the SG API that can receive kernel
      pointers. It is only used by the out-of-tree test module. So
      it's immediate need is questionable. For maintenance ease it might
      just get in, as it's very small.
      
      John.
      do you need this in the Kernel, or is it only for osd_ktest.ko?
      Signed-off-by: NJohn A. Chandy <john.chandy@uconn.edu>
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      6dd1d8a7
    • B
      [SCSI] libosd: Support for scatter gather write/read commands · e96e72c4
      Boaz Harrosh 提交于
      This patch adds the Scatter-Gather (sg) API to libosd.
      Scatter-gather enables a write/read of multiple none-contiguous
      areas of an object, in a single call. The extents may overlap
      and/or be in any order.
      
      The Scatter-Gather list is sent to the target in what is called
      a "cdb continuation segment". This is yet another possible segment
      in the osd-out-buffer. It is unlike all other segments in that it
      sits before the actual "data" segment (which until now was always
      first), and that it is signed by itself and not part of the data
      buffer. This is because the cdb-continuation-segment is considered
      a spill-over of the CDB data, and is therefor signed under
      OSD_SEC_CAPKEY and higher.
      
      TODO: A new osd_finalize_request_ex version should be supplied so
      the @caps received on the network also contains a size parameter
      and can be spilled over into the "cdb continuation segment".
      
      Thanks to John Chandy <john.chandy@uconn.edu> for the original
      code, and investigations. And the implementation of SG support
      in the osd-target.
      Original-coded-by: NJohn Chandy <john.chandy@uconn.edu>
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      e96e72c4
    • B
      [SCSI] libfc: Do not let disc work cancel itself · c531b9b4
      Bhanu Prakash Gollapudi 提交于
      When number of NPIV ports created are greater than the xids
      allocated per pool -- for eg., creating 255 NPIV ports on a
      system with nr_cpu_ids of 32, with each pool containing 128
      xids -- and then generating a link event - for eg.,
      shutdown/no shutdown -- on the switch port causes the hang
      with the following stack trace.
      
      Call Trace:
      schedule_timeout+0x19d/0x230
      wait_for_common+0xc0/0x170
      __cancel_work_timer+0xcf/0x1b0
      fc_disc_stop+0x16/0x30 [libfc]
      fc_lport_reset_locked+0x47/0x90 [libfc]
      fc_lport_enter_reset+0x67/0xe0 [libfc]
      fc_lport_disc_callback+0xbc/0xe0 [libfc]
      fc_disc_done+0xa8/0xf0 [libfc]
      fc_disc_timeout+0x29/0x40 [libfc]
      run_workqueue+0xb8/0x140
      worker_thread+0x96/0x110
      kthread+0x96/0xa0
      child_rip+0xa/0x20
      
      Fix is to not cancel the disc_work if discovery is already
      stopped, thus allowing lport state machine to restart and try
      discovery again.
      Signed-off-by: NBhanu Prakash Gollapudi <bprakash@broadcom.com>
      Acked-by: NJoe Eykholt <jeykholt@cisco.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      c531b9b4
  4. 23 10月, 2010 4 次提交
    • D
      IB/srp: Implement SRP_CRED_REQ and SRP_AER_REQ · bb12588a
      David Dillow 提交于
      This patch adds support for SRP_CRED_REQ to avoid a lockup by targets
      that use that mechanism to return credits to the initiator. This
      prevents a lockup observed in the field where we would never add the
      credits from the SRP_CRED_REQ to our current count, and would therefore
      never send another command to the target.
      
      Minimal support for SRP_AER_REQ is also added, as these messages can
      also be used to convey additional credits to the initiator.
      
      Based upon extensive debugging and code by Bart Van Assche and a bug
      report by Chris Worley.
      Signed-off-by: NDavid Dillow <dillowda@ornl.gov>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      bb12588a
    • M
      USB: gadget: storage: reuse definitions from scsi.h header file · 0a6a717c
      Michal Nazarewicz 提交于
      This commit changes storage_common.h, file_storage.c and
      f_mass_storage.c to use definitions of SCSI commands from
      scsi/scsi.h file instead of redefining the commands in
      storage_common.c.
      
      scsi/scsi.h header file was missing READ_FORMAT_CAPACITIES and
      READ_HEADER so this commit also add those to the header.
      Signed-off-by: NMichal Nazarewicz <mina86@mina86.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: James Bottomley <James.Bottomley@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0a6a717c
    • H
      scsi/sd: add a no_read_capacity_16 scsi_device flag · 5ce524bd
      Hans de Goede 提交于
      I seem to have a knack for digging up buggy usb devices which don't work
      with Linux, and I'm crazy enough to try to make them work.  So this time a
      friend of mine asked me to get an mp4 player (an mp3 player which can play
      videos on a small screen) to work with Linux.
      
      It is based on the well known rockbox chipset for which we already have an
      unusual devs entries to work around some of its bugs.  But this model
      comes with an additional twist.
      
      This model chokes on read_capacity_16 calls.  Now normally we don't make
      those calls, but this model comes with an sdcard slot and when there is no
      card in there (and shipped from the factory there is none), it reports a
      size of 0.  However this time the programmers actually got the
      read_capacity_10 response right!  So they substract one from the size as
      stored internally in the mp3 player before reporting it back, resulting in
      an answer of ...  0xffffffff sectors, causing sd.c to try a
      read_capacity_16, on which the device crashes.
      
      This patch adds a flag to scsi_device to indicate that a a device cannot
      handle read_capacity_16, and when this flag is set if a device reports an
      lba of 0xffffffff as answer to a read_capacity_10, assumes it tries to
      report a size of 0.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5ce524bd
    • H
      scsi/sr: add no_read_disc_info scsi_device flag · 8e04d805
      Hans de Goede 提交于
      Some USB devices emulate a usb-mass-storage attached (scsi) cdrom device,
      usually this fake cdrom contains the windows software for the device.
      While working on supporting Appotech ax3003 based photoframes, which do
      this I discovered that they will go of into lala land when ever they see a
      READ_DISC_INFO scsi command.
      
      Thus this patch adds a scsi_device flag (which can then be set by the
      usb-storage driver through an unsual-devs entry), to indicate this, and
      makes the sr driver honor this flag.
      
      I know this sucks, but as discussed on linux-scsi list there is no other
      way to make this device work properly.
      
      Looking at usb traces made under windows, windows never sends a
      READ_DISC_INFO during normal interactions with a usb cdrom device.  So as
      this cdrom emulation thingie becomes more common we might see more of this
      problem.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8e04d805
  5. 09 10月, 2010 1 次提交
  6. 08 10月, 2010 1 次提交
  7. 11 9月, 2010 1 次提交
  8. 10 9月, 2010 1 次提交
    • T
      block: remove spurious uses of REQ_HARDBARRIER · 9cbbdca4
      Tejun Heo 提交于
      REQ_HARDBARRIER is deprecated.  Remove spurious uses in the following
      users.  Please note that other than osdblk, all other uses were
      already spurious before deprecation.
      
      * osdblk: osdblk_rq_fn() won't receive any request with
        REQ_HARDBARRIER set.  Remove the test for it.
      
      * pktcdvd: use of REQ_HARDBARRIER in pkt_generic_packet() doesn't mean
        anything.  Removed.
      
      * aic7xxx_old: Setting MSG_ORDERED_Q_TAG on REQ_HARDBARRIER is
        spurious.  Removed.
      
      * sas_scsi_host: Setting TASK_ATTR_ORDERED on REQ_HARDBARRIER is
        spurious.  Removed.
      
      * scsi_tcq: The ordered tag path wasn't being used anyway.  Removed.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NBoaz Harrosh <bharrosh@panasas.com>
      Cc: James Bottomley <James.Bottomley@suse.de>
      Cc: Peter Osterlund <petero2@telia.com>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      9cbbdca4
  9. 06 9月, 2010 1 次提交
  10. 11 8月, 2010 1 次提交
  11. 28 7月, 2010 22 次提交