1. 19 3月, 2021 3 次提交
  2. 10 3月, 2021 4 次提交
    • J
      s390/qeth: fix notification for pending buffers during teardown · 7eefda7f
      Julian Wiedmann 提交于
      The cited commit reworked the state machine for pending TX buffers.
      In qeth_iqd_tx_complete() it turned PENDING into a transient state, and
      uses NEED_QAOB for buffers that get parked while waiting for their QAOB
      completion.
      
      But it missed to adjust the check in qeth_tx_complete_buf(). So if
      qeth_tx_complete_pending_bufs() is called during teardown to drain
      the parked TX buffers, we no longer raise a notification for af_iucv.
      
      Instead of updating the checked state, just move this code into
      qeth_tx_complete_pending_bufs() itself. This also gets rid of the
      special-case in the common TX completion path.
      
      Fixes: 8908f36d ("s390/qeth: fix af_iucv notification race")
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7eefda7f
    • J
      s390/qeth: schedule TX NAPI on QAOB completion · 3e83d467
      Julian Wiedmann 提交于
      When a QAOB notifies us that a pending TX buffer has been delivered, the
      actual TX completion processing by qeth_tx_complete_pending_bufs()
      is done within the context of a TX NAPI instance. We shouldn't rely on
      this instance being scheduled by some other TX event, but just do it
      ourselves.
      
      qeth_qdio_handle_aob() is called from qeth_poll(), ie. our main NAPI
      instance. To avoid touching the TX queue's NAPI instance
      before/after it is (un-)registered, reorder the code in qeth_open()
      and qeth_stop() accordingly.
      
      Fixes: 0da9581d ("qeth: exploit asynchronous delivery of storage blocks")
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3e83d467
    • J
      s390/qeth: improve completion of pending TX buffers · c20383ad
      Julian Wiedmann 提交于
      The current design attaches a pending TX buffer to a custom
      single-linked list, which is anchored at the buffer's slot on the
      TX ring. The buffer is then checked for final completion whenever
      this slot is processed during a subsequent TX NAPI poll cycle.
      
      But if there's insufficient traffic on the ring, we might never make
      enough progress to get back to this ring slot and discover the pending
      buffer's final TX completion. In particular if this missing TX
      completion blocks the application from sending further traffic.
      
      So convert the custom single-linked list code to a per-queue list_head,
      and scan this list on every TX NAPI cycle.
      
      Fixes: 0da9581d ("qeth: exploit asynchronous delivery of storage blocks")
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c20383ad
    • J
      s390/qeth: fix memory leak after failed TX Buffer allocation · e7a36d27
      Julian Wiedmann 提交于
      When qeth_alloc_qdio_queues() fails to allocate one of the buffers that
      back an Output Queue, the 'out_freeoutqbufs' path will free all
      previously allocated buffers for this queue. But it misses to free the
      half-finished queue struct itself.
      
      Move the buffer allocation into qeth_alloc_output_queue(), and deal with
      such errors internally.
      
      Fixes: 0da9581d ("qeth: exploit asynchronous delivery of storage blocks")
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Reviewed-by: NAlexandra Winter <wintera@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e7a36d27
  3. 24 2月, 2021 1 次提交
    • C
      virtio/s390: implement virtio-ccw revision 2 correctly · 182f709c
      Cornelia Huck 提交于
      CCW_CMD_READ_STATUS was introduced with revision 2 of virtio-ccw,
      and drivers should only rely on it being implemented when they
      negotiated at least that revision with the device.
      
      However, virtio_ccw_get_status() issued READ_STATUS for any
      device operating at least at revision 1. If the device accepts
      READ_STATUS regardless of the negotiated revision (which some
      implementations like QEMU do, even though the spec currently does
      not allow it), everything works as intended. While a device
      rejecting the command should also be handled gracefully, we will
      not be able to see any changes the device makes to the status,
      such as setting NEEDS_RESET or setting the status to zero after
      a completed reset.
      
      We negotiated the revision to at most 1, as we never bumped the
      maximum revision; let's do that now and properly send READ_STATUS
      only if we are operating at least at revision 2.
      
      Cc: stable@vger.kernel.org
      Fixes: 7d3ce5ab ("virtio/s390: support READ_STATUS command for virtio-ccw")
      Reviewed-by: NHalil Pasic <pasic@linux.ibm.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      Signed-off-by: NVasily Gorbik <gor@linux.ibm.com>
      Link: https://lore.kernel.org/r/20210216110645.1087321-1-cohuck@redhat.comSigned-off-by: NVasily Gorbik <gor@linux.ibm.com>
      182f709c
  4. 23 2月, 2021 1 次提交
  5. 14 2月, 2021 4 次提交
  6. 10 2月, 2021 1 次提交
  7. 09 2月, 2021 6 次提交
  8. 29 1月, 2021 6 次提交
  9. 27 1月, 2021 4 次提交
  10. 26 1月, 2021 1 次提交
    • J
      s390/dasd: Fix inconsistent kobject removal · ac55ad2b
      Jan Höppner 提交于
      Our intention was to only remove path kobjects whenever a device is
      being set offline. However, one corner case was missing.
      
      If a device is disabled and enabled (using the IOCTLs BIODASDDISABLE and
      BIODASDENABLE respectively), the enabling process will call
      dasd_eckd_reload_device() which itself calls dasd_eckd_read_conf() in
      order to update path information. During that update,
      dasd_eckd_clear_conf_data() clears all old data and also removes all
      kobjects. This will leave us with an inconsistent state of path kobjects
      and a subsequent path verification leads to a failing kobject creation.
      
      Fix this by removing kobjects only in the context of offlining a device
      as initially intended.
      
      Fixes: 19508b20 ("s390/dasd: Display FC Endpoint Security information via sysfs")
      Reported-by: NStefan Haberland <sth@linux.ibm.com>
      Signed-off-by: NJan Höppner <hoeppner@linux.ibm.com>
      Reviewed-by: NStefan Haberland <sth@linux.ibm.com>
      Reviewed-by: NCornelia Huck <cohuck@redhat.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      ac55ad2b
  11. 25 1月, 2021 3 次提交
  12. 23 1月, 2021 1 次提交
  13. 19 1月, 2021 2 次提交
  14. 08 1月, 2021 3 次提交
    • J
      s390/qeth: fix L2 header access in qeth_l3_osa_features_check() · f9c48453
      Julian Wiedmann 提交于
      ip_finish_output_gso() may call .ndo_features_check() even before the
      skb has a L2 header. This conflicts with qeth_get_ip_version()'s attempt
      to inspect the L2 header via vlan_eth_hdr().
      
      Switch to vlan_get_protocol(), as already used further down in the
      common qeth_features_check() path.
      
      Fixes: f13ade19 ("s390/qeth: run non-offload L3 traffic over common xmit path")
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      f9c48453
    • J
      s390/qeth: fix locking for discipline setup / removal · b41b554c
      Julian Wiedmann 提交于
      Due to insufficient locking, qeth_core_set_online() and
      qeth_dev_layer2_store() can run in parallel, both attempting to load &
      setup the discipline (and stepping on each other toes along the way).
      A similar race can also occur between qeth_core_remove_device() and
      qeth_dev_layer2_store().
      
      Access to .discipline is meant to be protected by the discipline_mutex,
      so add/expand the locking in qeth_core_remove_device() and
      qeth_core_set_online().
      Adjust the locking in qeth_l*_remove_device() accordingly, as it's now
      handled by the callers in a consistent manner.
      
      Based on an initial patch by Ursula Braun.
      
      Fixes: 9dc48ccc ("qeth: serialize sysfs-triggered device configurations")
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Reviewed-by: NAlexandra Winter <wintera@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      b41b554c
    • J
      s390/qeth: fix deadlock during recovery · 0b9902c1
      Julian Wiedmann 提交于
      When qeth_dev_layer2_store() - holding the discipline_mutex - waits
      inside qeth_l*_remove_device() for a qeth_do_reset() thread to complete,
      we can hit a deadlock if qeth_do_reset() concurrently calls
      qeth_set_online() and thus tries to aquire the discipline_mutex.
      
      Move the discipline_mutex locking outside of qeth_set_online() and
      qeth_set_offline(), and turn the discipline into a parameter so that
      callers understand the dependency.
      
      To fix the deadlock, we can now relax the locking:
      As already established, qeth_l*_remove_device() waits for
      qeth_do_reset() to complete. So qeth_do_reset() itself is under no risk
      of having card->discipline ripped out while it's running, and thus
      doesn't need to take the discipline_mutex.
      
      Fixes: 9dc48ccc ("qeth: serialize sysfs-triggered device configurations")
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Reviewed-by: NAlexandra Winter <wintera@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      0b9902c1