1. 29 3月, 2019 7 次提交
  2. 01 3月, 2019 3 次提交
  3. 16 2月, 2019 4 次提交
  4. 13 2月, 2019 4 次提交
    • J
      s390/qeth: allow cmd callbacks to return errnos · 4b7ae122
      Julian Wiedmann 提交于
      Error propagation from cmd callbacks currently works in a way where
      qeth_send_control_data_cb() picks the raw HW code from the response,
      and the cmd's originator later translates this into an errno.
      The callback itself only returns 0 ("done") or 1 ("expect more data").
      
      This is
      1. limiting, as the only means for the callback to report an internal
      error is to invent pseudo HW codes (such as IPA_RC_ENOMEM), that
      the originator then needs to understand. For non-IPA callbacks, we
      even provide a separate field in the IO buffer metadata (iob->rc) so
      the callback can pass back a return value.
      2. fragile, as the originator must take care to not translate any errno
      that is returned by qeth's own IO code paths (eg -ENOMEM). Also, any
      originator that forgets to translate the HW codes potentially passes
      garbage back to its caller. For instance, see
      commit 2aa48671 ("s390/qeth: translate SETVLAN/DELVLAN errors").
      
      Introduce a new model where all HW error translation is done within the
      callback, and the callback returns
      >  0, if it expects more data (as before)
      == 0, on success
      <  0, with an errno
      
      Start off with converting all callbacks to the new model that either
      a) pass back pseudo HW codes, or b) have a dependency on a specific
      HW error code. Also convert c) the one callback that uses iob->rc, and
      d) qeth_setadpparms_change_macaddr_cb() so that it can pass back an
      error back to qeth_l2_request_initial_mac() even when the cmd itself
      was successful.
      
      The old model remains supported: if the callback returns 0, we still
      propagate the response's HW error code back to the originator.
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4b7ae122
    • J
      s390/qeth: cancel cmd on early error · 54daaca7
      Julian Wiedmann 提交于
      When sending cmds via qeth_send_control_data(), qeth puts the request
      on the IO channel and then blocks on the reply object until the response
      has been received.
      
      If the IO completes with error, there will never be a response and we
      block until the reply-wait hits its timeout. For this case, connect the
      request buffer to its reply object, so that we can immediately cancel
      the wait.
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      54daaca7
    • J
      s390/qeth: consolidate filling of low-level cmd length fields · c2153277
      Julian Wiedmann 提交于
      The code to fill the IPA length fields is duplicated three times across
      the driver:
      1. qeth_send_ipa_cmd() sets IPA_CMD_LENGTH, which matches the defaults
         in the IPA_PDU_HEADER template.
      2. for OSN, qeth_osn_send_ipa_cmd() bypasses this logic and inserts the
         length passed by the caller.
      3. SNMP commands (that can outgrow IPA_CMD_LENGTH) have their own way
         of setting the length fields, via qeth_send_ipa_snmp_cmd().
      
      Consolidate this into qeth_prepare_ipa_cmd(), which all originators of
      IPA cmds already call during setup of their cmd. Let qeth_send_ipa_cmd()
      pull the length from the cmd instead of hard-coding IPA_CMD_LENGTH.
      
      For now, the SNMP code still needs to fix-up its length fields manually.
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c2153277
    • J
      s390/qeth: reduce data length for ARP cache query · 84dbea46
      Julian Wiedmann 提交于
      qeth_l3_query_arp_cache_info() indicates a data length that's much
      larger than the actual length of its request (ie. the value passed to
      qeth_get_setassparms_cmd()). The confusion presumably comes from the
      fact that the cmd _response_ can be quite large - but that's no concern
      for the initial request IO.
      
      Fixing this up allows us to use the generic qeth_send_ipa_cmd()
      infrastructure.
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      84dbea46
  5. 05 2月, 2019 2 次提交
  6. 26 1月, 2019 3 次提交
  7. 09 11月, 2018 4 次提交
  8. 04 11月, 2018 4 次提交
  9. 13 10月, 2018 2 次提交
  10. 27 9月, 2018 3 次提交
  11. 18 9月, 2018 4 次提交