1. 27 Jul, 2013 5 commits
    • Steffen Maier's avatar
      zfcp: status read buffers on first adapter open with link down · c49e1c85
      Steffen Maier authored
      commit 9edf7d75 upstream.
      
      Commit 64deb6ef
      "[SCSI] zfcp: Use status_read_buf_num provided by FCP channel"
      started using a value returned by the channel but only evaluated the value
      if the fabric link is up.
      Commit 8d88cf3f
      "[SCSI] zfcp: Update status read mempool"
      introduced mempool resizings based on the above value.
      On setting an FCP device online for the very first time since boot, a new
      zeroed adapter object is allocated. If the link is down, the number of
      status read requests remains zero. Since just the config data exchange is
      incomplete, we proceed with adapter open recovery. However, we
      unconditionally call mempool_resize with adapter->stat_read_buf_num == 0 in
      this case.
      
      This causes a kernel message "kernel BUG at mm/mempool.c:131!" in process
      "zfcperp<FCP-device-bus-ID>" with last function mempool_resize in Krnl PSW
      and zfcp_erp_thread in the Call Trace.
      
      Don't evaluate channel values which are invalid on link down. The number of
      status read requests is always valid, evaluated, and set to a positive
      minimum greater than zero. The adapter open recovery can proceed and the
      channel has status read buffers to inform us on a future link up event.
      While we are not aware of any other code path that could result in mempool
      resize attempts of size zero, we still also initialize the number of status
      read buffers to be posted to a static minimum number on adapter object
      allocation.
      Signed-off-by: default avatarSteffen Maier <maier@linux.vnet.ibm.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      [bwh: Backported to 3.2:
       - Copyright notice changed slightly
       - Don't use zfcp_fsf_convert_portspeed()]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      c49e1c85
    • Steffen Maier's avatar
      zfcp: block queue limits with data router · d5dc413b
      Steffen Maier authored
      commit 5fea4291 upstream.
      
      Commit 86a9668a
      "[SCSI] zfcp: support for hardware data router"
      reduced the initial block queue limits in the scsi_host_template to the
      absolute minimum and adjusted them later on. However, the adjustment was
      too late for the BSG devices of Scsi_Host and fc_host.
      
      Therefore, ioctl(..., SG_IO, ...) with request or response size > 4kB to a
      BSG device of an fc_host or a Scsi_Host fails with EINVAL. As a result,
      users of such ioctl such as HBA_SendCTPassThru() in libzfcphbaapi return
      with error HBA_STATUS_ERROR.
      
      Initialize the block queue limits in zfcp_scsi_host_template to the
      greatest common denominator (GCD).
      
      While we cannot exploit the slightly enlarged maximum request size with
      data router, this should be neglectible. Doing so also avoids running into
      trouble after live guest relocation (LGR) / migration from a data router
      FCP device to an FCP device that does not support data router. In that
      case, zfcp would figure out the new limits on adapter recovery, but the
      fc_host and Scsi_Host (plus in fact all sdevs) still exist with the old and
      now too large queue limits.
      
      It should also OK, not to use half the size as in the DIX case, because
      fc_host and Scsi_Host do not transport FCP requests including SCSI commands
      using protection data.
      Signed-off-by: default avatarSteffen Maier <maier@linux.vnet.ibm.com>
      Reviewed-by: default avatarMartin Peschke <mpeschke@linux.vnet.ibm.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      [bwh: Backported to 3.2: copyright notice changed slightly]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      d5dc413b
    • Daniel Hansel's avatar
      zfcp: fix adapter (re)open recovery while link to SAN is down · 657b0bf0
      Daniel Hansel authored
      commit f76ccaac upstream.
      
      FCP device remains in status ERP_FAILED when device is switched online
      or adapter recovery is triggered  while link to SAN is down.
      
      When Exchange Configuration Data command returns the FSF status
      FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE it aborts the exchange process.
      The only retries are done during the common error recovery procedure
      (i.e. max. 3 retries with 8sec sleep between) and remains in status
      ERP_FAILED with QDIO down.
      
      This commit reverts the commit 0df13847
      (zfcp: Fix adapter activation on link down).
      When FSF status FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE is received the
      adapter recovery will be finished without any retries. QDIO will be
      up now and status changes such as LINK UP will be received now.
      Signed-off-by: default avatarDaniel Hansel <daniel.hansel@linux.vnet.ibm.com>
      Signed-off-by: default avatarSteffen Maier <maier@linux.vnet.ibm.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      657b0bf0
    • Bu, Yitian's avatar
      printk: Fix rq->lock vs logbuf_lock unlock lock inversion · ff766b8d
      Bu, Yitian authored
      commit dbda92d1 upstream.
      
      commit 07354eb1 ("locking printk: Annotate logbuf_lock as raw")
      reintroduced a lock inversion problem which was fixed in commit
      0b5e1c52 ("printk: Release console_sem after logbuf_lock"). This
      happened probably when fixing up patch rejects.
      
      Restore the ordering and unlock logbuf_lock before releasing
      console_sem.
      Signed-off-by: default avatarybu <ybu@qti.qualcomm.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/E807E903FE6CBE4D95E420FBFCC273B827413C@nasanexd01h.na.qualcomm.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      [bwh: Backported to 3.2: adjust context]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      ff766b8d
    • Ben Hutchings's avatar
      r8169: fix offloaded tx checksum for small packets. · 5f97f7c7
      Ben Hutchings authored
      The workaround introduced by commit e5195c1f 'r8169: fix 8168evl
      frame padding.' upstream was incorrect and was entirely replaced in
      commit b423e9ae 'r8169: fix offloaded tx checksum for small
      packets.'
      
      On the 3.2.y branch, the first commit has effectively been applied
      twice: the first time by itself, and the second time in commit
      3cf40360 which squashed the two upstream commits together.  That
      left us with both the incorrect and the correct workaround in place.
      Remove the incorrect one.
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Cc: Francois Romieu <romieu@fr.zoreil.com>
      5f97f7c7
  2. 29 Jun, 2013 28 commits
  3. 19 Jun, 2013 7 commits