1. 09 Mar, 2016 3 commits
    • Matthew R. Ochs's avatar
      cxlflash: Split out context initialization · 5e6632d1
      Matthew R. Ochs authored
      Presently, context information structures are allocated and
      initialized in the same routine, create_context(). This imposes
      an ordering restriction such that all pieces of information needed
      to initialize a context must be known before the context is even
      allocated.
      
      This design point is not flexible when the order of context
      creation needs to be modified. Specifically, this can lead to
      problems when members of the context information structure are
      a part of an ordering dependency (i.e. - the 'work' structure
      embedded within the context).
      
      To remedy, the allocation is left as-is, inside of the existing
      create_context() routine and the initialization is transitioned
      to a new void routine, init_context(). At the same time, in
      anticipation of these routines not being called in sequence, a
      state boolean is added to the context information structure to
      track when the context has been initilized. The context teardown
      routine, destroy_context(), is modified to support being called
      with a non-initialized context.
      Signed-off-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
      Reviewed-by: default avatarUma Krishnan <ukrishn@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      5e6632d1
    • Uma Krishnan's avatar
      cxlflash: Unmap problem state area before detaching master context · 6ded8b3c
      Uma Krishnan authored
      When operating in the PowerVM environment, the cxlflash module can
      receive an error from the hypervisor indicating that there are
      existing mappings in the page table for the process MMIO space.
      
      This issue exists because term_afu() currently invokes term_mc()
      before stop_afu(), allowing for the master context to be detached
      first and the problem state area to be unmapped second.
      
      To resolve this issue, stop_afu() should be called before term_mc().
      Signed-off-by: default avatarUma Krishnan <ukrishn@linux.vnet.ibm.com>
      Acked-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      6ded8b3c
    • Manoj N. Kumar's avatar
      cxlflash: Simplify PCI registration · 961487e4
      Manoj N. Kumar authored
      The calls to pci_request_regions(), pci_resource_start(),
      pci_set_dma_mask(), pci_set_master() and pci_save_state() are all
      unnecessary for the IBM CXL flash adapter since data buffers
      are not required to be mapped to the device's memory.
      
      The use of services such as pci_set_dma_mask() are problematic on
      hypervisor managed systems as the IBM CXL flash adapter is operating
      under a virtual PCI Host Bridge (virtual PHB) which does not support
      these services.
      
      cxlflash 0001:00:00.0: init_pci: Failed to set PCI DMA mask rc=-5
      
      The resolution is to simplify init_pci(), to a point where it does the
      bare minimum (pci_enable_device). Similarly, remove the call the
      pci_release_regions() from cxlflash_remove().
      Signed-off-by: default avatarManoj N. Kumar <manoj@linux.vnet.ibm.com>
      Acked-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
      Reviewed-by: default avatarUma Krishnan <ukrishn@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      961487e4
  2. 08 Mar, 2016 1 commit
  3. 05 Mar, 2016 9 commits
  4. 02 Mar, 2016 2 commits
  5. 01 Mar, 2016 14 commits
  6. 26 Feb, 2016 3 commits
    • Alison Schofield's avatar
      gdth: replace struct timeval with ktime_get_real_seconds() · 5a412c38
      Alison Schofield authored
      struct timeval will overflow on 32-bit systems in y2038 and is being
      removed from the kernel. Replace the use of struct timeval and
      do_gettimeofday() with ktime_get_real_seconds() which provides a 64-bit
      seconds value and is y2038 safe.
      
      gdth driver requires changes in two areas:
      
      1) gdth_store_event() loads two u32 timestamp fields for ioctl GDTIOCTL_EVENT
      
         These timestamp fields are part of struct gdth_evt_str used for passing
         event data to userspace. At the first instance of an event we do
         (first_stamp=last_stamp="current time"). If that same event repeats,
         we do (last_stamp="current time") AND increment same_count to indicate
         how many times the event has repeated since first_stamp.
      
         This patch replaces the use of timeval and do_gettimeofday() with
         ktime_get_real_seconds() cast to u32 to extend the timestamp fields
         to y2106.
      
         Beyond y2106, the userspace tools (ie. RAID controller monitors) can
         work around the time rollover and this driver would still not need to
         change.
      
         Alternative: The alternative approach is to introduce a new ioctl in gdth
         with the u32 time fields defined as u64.  This would require userspace
         changes now, but not in y2106.
      
      2)  gdth_show_info() calculates elapsed time using u32 first_stamp
      
          It is adding events with timestamps to a seq_file.  Timestamps are
          calculated as the "current time" minus the first_stamp.
      
          This patch replaces the use of timeval and do_gettimeofday() with
          ktime_get_real_seconds() cast to u32 to calculate the timestamp.
      
          This elapsed time calculation is safe even when the time wraps (beyond
          y2106) due to how unsigned subtraction works. A comment has been added
          to the code to indicate this safety.
      
          Alternative: This piece itself doesn't warrant an alternative, but
          if we do introduce a new structure & ioctl with u64 timestamps, this
          would change accordingly.
      Signed-off-by: default avatarAlison Schofield <amsfield22@gmail.com>
      Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      5a412c38
    • Sudip Mukherjee's avatar
      osd: remove deadcode · ba690c79
      Sudip Mukherjee authored
      The variable is_ver1 is always true and so OSD_CAP_LEN can never be
      used.
      
      Reported by Coverity.
      Signed-off-by: default avatarSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
      Reviewed-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
      Acked-by: default avatarBoaz harrosh <ooo@elecrozaur.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      ba690c79
    • Sudip Mukherjee's avatar
      imm: check parport_claim · 9ffeca3e
      Sudip Mukherjee authored
      parport_claim() can fail and we should be checking if we were able to
      claim the port.
      Signed-off-by: default avatarSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
      Reviewed-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      9ffeca3e
  7. 24 Feb, 2016 8 commits