1. 30 6月, 2011 17 次提交
  2. 29 6月, 2011 3 次提交
  3. 02 6月, 2011 1 次提交
  4. 29 5月, 2011 1 次提交
  5. 27 5月, 2011 9 次提交
  6. 25 5月, 2011 9 次提交
    • R
      x86: remove 32-bit versions of readq()/writeq() · dbee8a0a
      Roland Dreier 提交于
      The presense of a writeq() implementation on 32-bit x86 that splits the
      64-bit write into two 32-bit writes turns out to break the mpt2sas driver
      (and in general is risky for drivers as was discussed in
      <http://lkml.kernel.org/r/adaab6c1h7c.fsf@cisco.com>).  To fix this,
      revert 2c5643b1 ("x86: provide readq()/writeq() on 32-bit too") and
      follow-on cleanups.
      
      This unfortunately leads to pushing non-atomic definitions of readq() and
      write() to various x86-only drivers that in the meantime started using the
      definitions in the x86 version of <asm/io.h>.  However as discussed
      exhaustively, this is actually the right thing to do, because the right
      way to split a 64-bit transaction is hardware dependent and therefore
      belongs in the hardware driver (eg mpt2sas needs a spinlock to make sure
      no other accesses occur in between the two halves of the access).
      
      Build tested on 32- and 64-bit x86 allmodconfig.
      
      Link: http://lkml.kernel.org/r/x86-32-writeq-is-broken@mdm.bga.comAcked-by: NHitoshi Mitake <h.mitake@gmail.com>
      Cc: Kashyap Desai <Kashyap.Desai@lsi.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Ravi Anand <ravi.anand@qlogic.com>
      Cc: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Jason Uhlenkott <juhlenko@akamai.com>
      Acked-by: NJames Bottomley <James.Bottomley@parallels.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dbee8a0a
    • S
      [SCSI] Fix Ultrastor asm snippet · fad4dab5
      Samuel Thibault 提交于
      Commit 1292500b replaced
      
      "=m" (*field) : "1" (*field)
      
      with
      
      "=m" (*field) :
      
      with comment "The following patch fixes it by using the '+' operator on
      the (*field) operand, marking it as read-write to gcc."
      '+' was actually forgotten.  This really puts it.
      Signed-off-by: NSamuel Thibault <samuel.thibault@ens-lyon.org>
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      fad4dab5
    • A
      [SCSI] osst: fix warning · 6e2037b0
      Andrew Morton 提交于
      drivers/scsi/osst.c: In function '__os_scsi_tape_open':
      drivers/scsi/osst.c:4705: warning: ISO C90 forbids mixed declarations and code
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      6e2037b0
    • R
      [SCSI] osst: wrong index used in inner loop · a061f57d
      Roel Kluin 提交于
      Index i was already used in the outer loop.  Fixes a potentially-infinite
      loop.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Cc: Willem Riede <osst@riede.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      a061f57d
    • V
      [SCSI] aic94xx: world-writable sysfs update_bios file · 8e910965
      Vasiliy Kulikov 提交于
      Don't allow everybody to load firmware.
      Signed-off-by: NVasiliy Kulikov <segoon@openwall.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      8e910965
    • D
      [SCSI] Reduce error recovery time by reducing use of TURs · 3eef6257
      David Jeffery 提交于
      In error recovery, most scsi error recovery stages will send a TUR command
      for every bad command when a driver's error handler reports success.  When
      several bad commands to the same device, this results in a device
      being probed multiple times.
      
      This becomes very problematic if the device or connection is in a state
      where the device still doesn't respond to commands even after a recovery
      function returns success.  The error handler must wait for the test
      commands to time out.  The time waiting for the redundant commands can
      drastically lengthen error recovery.
      
      This patch alters the scsi mid-layer's error routines to send test commands
      once per device instead of once per bad command.  This can drastically
      lower error recovery time.
      
      [jejb: fixed up whitespace and formatting]
      Signed-of-by: NDavid Jeffery <djeffery@redhat.com>
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      3eef6257
    • L
      [SCSI] Retrieve the Caching mode page (version 2) · 0bcaa111
      Luben Tuikov 提交于
      Some kernel transport drivers unconditionally disable
      retrieval of the Caching mode page. One such for example is
      the BBB/CBI transport over USB. Such a restraint is too
      harsh as some devices do support the Caching mode
      page. Unconditionally enabling the retrieval of this mode
      page over those transports at their transport code level may
      result in some devices failing and becoming unusable.
      
      This patch implements a method of retrieving the Caching
      mode page without unconditionally enabling it in the
      transports which unconditionally disable it. The idea is to
      ask for all supported pages, page code 0x3F, and then search
      for the Caching mode page in the mode parameter data
      returned. The sd driver already asks for all the mode pages
      supported by the attached device by setting the page code to
      0x3F in order to find out if the media is write protected by
      reading the WP bit in the Device Specific Parameter
      field. It then attempts to retrieve only the Caching mode
      page by setting the page code to 8 and actually attempting
      to retrieve it if and only if the transport allows it.
      
      The method implemented here is that if the transport doesn't
      allow retrieval of the Caching mode page and the device is
      not RBC, then we ask for all pages supported by setting the
      page code to 0x3F (similarly to how the WP bit is retrieved
      above), and then we search for the Caching mode page in the
      mode parameter data returned.
      
      With this patch, devices over SATA, report this (no change):
      
      Oct 22 18:45:58 localhost kernel: sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
      Oct 22 18:45:58 localhost kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
      Oct 22 18:45:58 localhost kernel: sd 0:0:0:0: [sda] Write Protect is off
      Oct 22 18:45:58 localhost kernel: sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
      Oct 22 18:45:58 localhost kernel: sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
      
      Smart devices report their Caching mode page. This is a
      change where we'd previously see the kernel making
      assumption about the device's cache being write-through:
      
      Oct 22 18:45:58 localhost kernel: sd 6:0:0:0: Attached scsi generic sg2 type 0
      Oct 22 18:45:58 localhost kernel: sd 6:0:0:0: [sdb] 610472646 4096-byte logical blocks: (2.50 TB/2.27 TiB)
      Oct 22 18:45:58 localhost kernel: sd 6:0:0:0: [sdb] Write Protect is off
      Oct 22 18:45:58 localhost kernel: sd 6:0:0:0: [sdb] Mode Sense: 47 00 10 08
      Oct 22 18:45:58 localhost kernel: sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, supports DPO and FUA
      
      And "dumb" devices over BBB, are correctly shown not to
      support reporting the Caching mode page:
      
      Oct 22 18:49:06 localhost kernel: sd 7:0:0:0: [sdc] 15663104 512-byte logical blocks: (8.01 GB/7.46 GiB)
      Oct 22 18:49:06 localhost kernel: sd 7:0:0:0: [sdc] Write Protect is off
      Oct 22 18:49:06 localhost kernel: sd 7:0:0:0: [sdc] Mode Sense: 23 00 00 00
      Oct 22 18:49:06 localhost kernel: sd 7:0:0:0: [sdc] No Caching mode page present
      Oct 22 18:49:06 localhost kernel: sd 7:0:0:0: [sdc] Assuming drive cache: write through
      
      Version 2 adds this:
      
      Some devices don't support page code 0x3F, and others require a
      fixed transfer length of 192 bytes. This single commit includes a
      patch by Alan Stern which fixes this.
      Reported-and-tested-by: NRichard Senior <richard@r-senior.demon.co.uk>
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NLuben Tuikov <ltuikov@yahoo.com>
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      0bcaa111
    • E
      [SCSI] bnx2i: Optimized the iSCSI offload performance · 9ae58e14
      Eddie Wai 提交于
      Modified the event coalescing code for iSCSI offload to combat both
      corner cases and optimize performance as follows:
      
      1. Added mechanism to loop back a second time to process any leftover
      CQEs that was generated by the hardware during the time the driver is
      busy processing previous CQEs in the bh.  This not only helps the
      performance but also fixes the corner case when no more CQEs are being
      generated in the pipeline; so those leftover CQEs will get a a chance
      to be processed.
      
      2. Added ARM_CQE_FP to distinguish between fast path arming versus
      slow path arming.  This change will guarantee that the CQEs will
      always get a chance to be re-armed during fast path completions.
      
      3. Removed the inline event coalescing division for perf optimization.
      Also fixed a division-by-zero error when the event_coal_div module
      param was set to 0.
      
      4. Changed the default SQ WQEs size from 256 to 128 to match chip
      default.
      
      5. Changed the cmd_per_lun from 32 to 24.
      Signed-off-by: NEddie Wai <eddie.wai@broadcom.com>
      Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      9ae58e14
    • E
      [SCSI] bnx2i: Updated the connection shutdown/cleanup timeout · d5307a07
      Eddie Wai 提交于
      Modified the 10s wait time for inflight offload connections to
      advance to the next state to 2s based on test result.
      Modified the 20s shutdown timeout to 30s based on test result.
      Signed-off-by: NEddie Wai <eddie.wai@broadcom.com>
      Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      d5307a07