1. 29 3月, 2019 10 次提交
  2. 19 3月, 2019 3 次提交
  3. 01 3月, 2019 9 次提交
  4. 20 2月, 2019 1 次提交
  5. 16 2月, 2019 7 次提交
  6. 13 2月, 2019 10 次提交
    • J
      s390/qeth: convert remaining legacy cmd callbacks · 742d4d40
      Julian Wiedmann 提交于
      This calls the existing errno translation helpers from the callbacks,
      adding trivial wrappers where necessary. For cmds that have no
      sophisticated errno translation, default to -EIO.
      
      For IPA cmds with no callback, fall back to a minimal default. This is
      currently being used by qeth_l3_send_setrouting().
      
      Thus having all converted all callbacks, remove the legacy path in
      qeth_send_control_data_cb().
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      742d4d40
    • J
      s390/qeth: convert bridgeport callbacks · 1709ff8d
      Julian Wiedmann 提交于
      By letting the callbacks deal with error translation, we no longer need
      to pass the raw error codes back to the originator. This allows us to
      slim down the callback's private data, and nicely simplifies the code.
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1709ff8d
    • 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: simplify reply object handling · 0951c6ba
      Julian Wiedmann 提交于
      Current code enqueues & dequeues a reply object from the waiter list
      in various places. In particular, the dequeue & enqueue in
      qeth_send_control_data_cb() looks fragile - this can cause
      qeth_clear_ipacmd_list() to skip the active object.
      Add some helpers, and boil the logic down by giving
      qeth_send_control_data() the sole responsibility to add and remove
      objects.
      
      qeth_send_control_data_cb() and qeth_clear_ipacmd_list() will now only
      notify the reply object to interrupt its wait cycle. This can cause
      a slight delay in the removal, but that's no concern.
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0951c6ba
    • J
      s390/qeth: limit trace to valid data of command request · 51581fd0
      Julian Wiedmann 提交于
      'len' specifies how much data we send to the HW, don't dump beyond this
      boundary.
      As of today this is no big concern - commands are built in full, zeroed
      pages.
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      51581fd0
    • J
      s390/qeth: align csum offload with TSO control logic · 4386e34f
      Julian Wiedmann 提交于
      csum offload and TSO have similar programming requirements. The TSO code
      was reworked with commit "s390/qeth: enhance TSO control sequence",
      adjust the csum control flow accordingly. Primarily this means replacing
      custom helpers with more generic infrastructure.
      
      Also, change the LP2LP check so that it warns on TX offload (not RX).
      This is where reduced csum capability actually matters.
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4386e34f
    • J
      s390/qeth: enable only required csum offload features · 7e83747d
      Julian Wiedmann 提交于
      Current code attempts to enable all advertised HW csum offload features.
      Future-proof this by enabling only those features that we actually use.
      
      Also, the IPv4 header csum feature is only needed for TX on L3 devices.
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7e83747d
    • 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