1. 22 12月, 2010 5 次提交
    • W
      [SCSI] ipr: fix mailbox register definition and add a delay before reading · 110def85
      Wayne Boyer 提交于
      The definition for the mailbox register for new adapters was incorrect.  The
      value has been updated to the correct offset.
      
      After an adapter reset, the mailbox register on the new adapters takes a
      number of seconds to stabilize.  A delay has been added before reading the
      register.
      Signed-off-by: NWayne Boyer <wayneb@linux.vnet.ibm.com>
      Acked-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      110def85
    • W
      [SCSI] ipr: fix lun assignment and comparison · 0cb992ed
      Wayne Boyer 提交于
      The lun value was not getting set up correctly for all devices attached to the
      new 64 bit adapters.  The fix is to move the logic to earlier in the
      ipr_init_res_entry routine such that the value does get set correctly for all
      devices.
      
      Then the ipr_is_same_device comparison function was using the wrong lun value
      in the logic for the new adapters.  Change this to use the correct lun value.
      Signed-off-by: NWayne Boyer <wayneb@linux.vnet.ibm.com>
      Acked-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      0cb992ed
    • L
      [SCSI] Retrieve the Caching mode page · 24d720b7
      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
      Signed-off-by: NLuben Tuikov <ltuikov@yahoo.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      24d720b7
    • D
      [SCSI] libsas: fix definition of wideport, include local sas address · 00f0254e
      Dan Williams 提交于
      To date libsas has only looked at the attached sas address when
      determining the formation of wide ports.  The specification and some
      hardware expects that phys with different addresses will not form a wide
      port unless the local peer phys also match each other.  Introduce a flag
      to select stricter behavior at sas_register_ha() time.  The flag can be
      dropped once it is known that all libsas users expect the same behavior.
      
      Current drivers just initialize this field to zero and get the
      traditional behavior.
      Reported-by: NPatrick Thomson <patrick.s.thomson@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      00f0254e
    • A
      [SCSI] sd: improve logic and efficiecy of media-change detection · 3ff5588d
      Alan Stern 提交于
      This patch (as1415) improves the formerly incomprehensible logic in
      sd_media_changed() (the current code refers to "changed" as a state,
      whereas in fact it is a relation between two states).  It also adds a
      big comment so that everyone can understand what is really going on.
      
      The patch also improves efficiency by not reporting a media change
      when no medium was ever present.  If no medium was present the last
      time we checked and there's still no medium, it's not necessary to
      tell the caller that a change occurred.  Doing so merely causes the
      caller to attempt to revalidate a non-existent disk, which is a waste
      of time.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      3ff5588d
  2. 21 12月, 2010 2 次提交
  3. 16 12月, 2010 6 次提交
  4. 15 12月, 2010 27 次提交