1. 21 Dec, 2010 10 commits
    • James Smart's avatar
      [SCSI] lpfc 8.3.19: Add SLI4 FC Discovery support · 76a95d75
      James Smart authored
      Add SLI4 FC Discovery support
      
      - Replace READ_LA and READ_LA64 with READ_TOPOLOGY mailbox command.
      - Converted the old READ_LA structure to use bf_set/get instead of bit fields.
      - Rename HBA_FCOE_SUPPORT flag to HBA_FCOE_MODE. Flag now indicates function
        is running as SLI-4 FC or FCoE port. Make sure flag reset each time
        READ_REV completed as it can dynamically change.
      - Removed BDE union in the READ_TOPOLOGY mailbox command and added a define to
        define the ALPA MAP SIZE. Added FC Code for async events.
      - Added code to support new 16G link speed.
      - Define new set of values to keep track of valid user settable link speeds.
      - Used new link speed definitions to define link speed max and bitmap.
      - Redefined FDMI Port sppeds to be hax values and added the 16G value.
      - Added new CQE trailer code for FC Events.
      - Add lpfc_issue_init_vfi and lpfc_init_vfi_cmpl routines.
      - Replace many calls to the initial_flogi routine with lpfc_issue_init_vfi.
      - Add vp and vpi fields to the INIT_VFI mailbox command.
      - Addapt lpfc_hba_init_link routine for SLI4 use.
      - Use lpfc_hba_init_link call from lpfc_sli4_hba_setup.
      - Add a check for FC mode to register the FCFI before init link.
      - Convert lpfc_sli4_init_vpi to be called without a vpi (get it from vport).
      Signed-off-by: default avatarAlex Iannicelli <alex.iannicelli@emulex.com>
      Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      76a95d75
    • James Smart's avatar
      [SCSI] lpfc 8.3.19: Add latest SLI4 Hardware initialization support · 085c647c
      James Smart authored
      - Add the Lancer FC and FCoE PCI IDs
      - Add new SLI4 INTF register definitions
      - Implement new SLI4 doorbell register
      Signed-off-by: default avatarAlex Iannicelli <alex.iannicelli@emulex.com>
      Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      085c647c
    • James Smart's avatar
      [SCSI] lpfc 8.3.19: Fix critical errors and crashes · 63e801ce
      James Smart authored
      Fix critical errors and crashes
      
      - Replace LOF_SECURITY with LOG_SECURITY
      - When calculating diag test memory size, use full size with header.
      - Return LS_RJT with status=UNSUPPORTED on unrecognized ELS's
      - Correct NULL pointer dereference when lpfc_create_vport_work_array()
        returns NULL.
      - Added code to handle CVL when port is in LPFC_VPORT_FAILED state.
      - In lpfc_do_scr_ns_plogi, check the nodelist for FDMI_DID and reuse
        the resource.
      - Check for generic request 64 and calculate the sgl offset for the request
        and reply sgls, also calculate the xmit length using only the request bde.
      Signed-off-by: default avatarAlex Iannicelli <alex.iannicelli@emulex.com>
      Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      63e801ce
    • James Bottomley's avatar
      [SCSI] fix id computation in scsi_eh_target_reset() · 98db5195
      James Bottomley authored
      The current code in scsi_eh_target_reset() has an off by one error
      that actually sends spurious extra resets.  Since there's no real need
      to reset the targets in numerical order, simply chunk up the command
      recovery list doing target resets and pulling matching targets out of
      the list (that also makes the loop O(N) instead of O(N^2).
      
      [mike christie found and fixed a list_splice -> list_splice_init problem]
      
      Reported-by: Hillf Danton<dhillf@gmail.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      98db5195
    • Wayne Boyer's avatar
      [SCSI] ipr: fix mailbox register definition and add a delay before reading · 110def85
      Wayne Boyer authored
      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: default avatarWayne Boyer <wayneb@linux.vnet.ibm.com>
      Acked-by: default avatarBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      110def85
    • Wayne Boyer's avatar
      [SCSI] ipr: fix lun assignment and comparison · 0cb992ed
      Wayne Boyer authored
      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: default avatarWayne Boyer <wayneb@linux.vnet.ibm.com>
      Acked-by: default avatarBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      0cb992ed
    • Luben Tuikov's avatar
      [SCSI] Retrieve the Caching mode page · 24d720b7
      Luben Tuikov authored
      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: default avatarLuben Tuikov <ltuikov@yahoo.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      24d720b7
    • Dan Williams's avatar
      [SCSI] libsas: fix definition of wideport, include local sas address · 00f0254e
      Dan Williams authored
      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: default avatarPatrick Thomson <patrick.s.thomson@intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      00f0254e
    • Alan Stern's avatar
      [SCSI] sd: improve logic and efficiecy of media-change detection · 3ff5588d
      Alan Stern authored
      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: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      3ff5588d
    • James Bottomley's avatar
      [SCSI] fix up documentation for change in ->queuecommand to lockless calling · 29687512
      James Bottomley authored
      The current doc still says we call it with the host lock held, which is
      going to cause confusion.
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      29687512
  2. 20 Dec, 2010 1 commit
  3. 16 Dec, 2010 2 commits
  4. 15 Dec, 2010 16 commits
  5. 14 Dec, 2010 11 commits