1. 12 6月, 2017 1 次提交
  2. 12 5月, 2017 2 次提交
    • J
      s390/qeth: unbreak OSM and OSN support · 2d2ebb3e
      Julian Wiedmann 提交于
      commit b4d72c08 ("qeth: bridgeport support - basic control")
      broke the support for OSM and OSN devices as follows:
      
      As OSM and OSN are L2 only, qeth_core_probe_device() does an early
      setup by loading the l2 discipline and calling qeth_l2_probe_device().
      In this context, adding the l2-specific bridgeport sysfs attributes
      via qeth_l2_create_device_attributes() hits a BUG_ON in fs/sysfs/group.c,
      since the basic sysfs infrastructure for the device hasn't been
      established yet.
      
      Note that OSN actually has its own unique sysfs attributes
      (qeth_osn_devtype), so the additional attributes shouldn't be created
      at all.
      For OSM, add a new qeth_l2_devtype that contains all the common
      and l2-specific sysfs attributes.
      When qeth_core_probe_device() does early setup for OSM or OSN, assign
      the corresponding devtype so that the ccwgroup probe code creates the
      full set of sysfs attributes.
      This allows us to skip qeth_l2_create_device_attributes() in case
      of an early setup.
      
      Any device that can't do early setup will initially have only the
      generic sysfs attributes, and when it's probed later
      qeth_l2_probe_device() adds the l2-specific attributes.
      
      If an early-setup device is removed (by calling ccwgroup_ungroup()),
      device_unregister() will - using the devtype - delete the
      l2-specific attributes before qeth_l2_remove_device() is called.
      So make sure to not remove them twice.
      
      What complicates the issue is that qeth_l2_probe_device() and
      qeth_l2_remove_device() is also called on a device when its
      layer2 attribute changes (ie. its layer mode is switched).
      For early-setup devices this wouldn't work properly - we wouldn't
      remove the l2-specific attributes when switching to L3.
      But switching the layer mode doesn't actually make any sense;
      we already decided that the device can only operate in L2!
      So just refuse to switch the layer mode on such devices. Note that
      OSN doesn't have a layer2 attribute, so we only need to special-case
      OSM.
      
      Based on an initial patch by Ursula Braun.
      
      Fixes: b4d72c08 ("qeth: bridgeport support - basic control")
      Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d2ebb3e
    • U
      s390/qeth: handle sysfs error during initialization · 9111e788
      Ursula Braun 提交于
      When setting up the device from within the layer discipline's
      probe routine, creating the layer-specific sysfs attributes can fail.
      Report this error back to the caller, and handle it by
      releasing the layer discipline.
      Signed-off-by: NUrsula Braun <ubraun@linux.vnet.ibm.com>
      [jwi: updated commit msg, moved an OSN change to a subsequent patch]
      Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9111e788
  3. 12 4月, 2017 8 次提交
  4. 07 4月, 2017 5 次提交
  5. 25 3月, 2017 1 次提交
    • J
      s390/qeth: size calculation outbound buffers · 7d969d2e
      Julian Wiedmann 提交于
      Depending on the device type, hard_start_xmit() builds different output
      buffer formats. For instance with HiperSockets, on both L2 and L3 we
      strip the ETH header from the skb - L3 doesn't need it, and L2 carries
      it in the buffer's header element.
      For this, we pass data_offset = ETH_HLEN all the way down to
      __qeth_fill_buffer(), where skb->data is then adjusted accordingly.
      But the initial size calculation still considers the *full* skb length
      (including the ETH header). So qeth_get_elements_no() can erroneously
      reject a skb as too big, even though it would actually fit into an
      output buffer once the ETH header has been trimmed off later.
      
      Fix this by passing an additional offset to qeth_get_elements_no(),
      that indicates where in the skb the on-wire data actually begins.
      Since the current code uses data_offset=-1 for some special handling
      on OSA, we need to clamp data_offset to 0...
      
      On HiperSockets this helps when sending ~MTU-size skbs with weird page
      alignment. No change for OSA or AF_IUCV.
      Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NUrsula Braun <ubraun@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d969d2e
  6. 12 1月, 2017 4 次提交
  7. 21 10月, 2016 1 次提交
  8. 16 9月, 2016 2 次提交
    • U
      qeth: check not more than 16 SBALEs on the completion queue · 903e4853
      Ursula Braun 提交于
      af_iucv socket programs with HiperSockets as transport make use of the qdio
      completion queue. Running such an af_iucv socket program may result in a
      crash:
      
      [90341.677709] Oops: 0038 ilc:2 [#1] SMP
      [90341.677743] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.6.0-20160720.0.0e86ec7.5e62689.fc23.s390xperformance #1
      [90341.677744] Hardware name: IBM              2964 N96              703              (LPAR)
      [90341.677746] task: 00000000edb79f00 ti: 00000000edb84000 task.ti: 00000000edb84000
      [90341.677748] Krnl PSW : 0704d00180000000 000000000075bc50 (qeth_qdio_input_handler+0x258/0x4e0)
      [90341.677756]            R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:1 PM:0 RI:0 EA:3
      Krnl GPRS: 000003d10391e900 0000000000000001 00000000e61e6000 0000000000000005
      [90341.677759]            0000000000a9e6ec 5420040001a77400 0000000000000001 000000000000006f
      [90341.677761]            00000000e0d83f00 0000000000000003 0000000000000010 5420040001a77400
      [90341.677784]            000000007ba8b000 0000000000943fd0 000000000075bc4e 00000000ed3b3c10
      [90341.677793] Krnl Code: 000000000075bc42: e320cc180004        lg      %r2,3096(%r12)
                 000000000075bc48: c0e5ffffc5cc       brasl   %r14,7547e0
                #000000000075bc4e: 1816               lr      %r1,%r6
                >000000000075bc50: ba19b008           cs      %r1,%r9,8(%r11)
                 000000000075bc54: ec180041017e       cij     %r1,1,8,75bcd6
                 000000000075bc5a: 5810b008           l       %r1,8(%r11)
                 000000000075bc5e: ec16005c027e       cij     %r1,2,6,75bd16
                 000000000075bc64: 5090b008           st      %r9,8(%r11)
      [90341.677807] Call Trace:
      [90341.677810] ([<000000000075bbc0>] qeth_qdio_input_handler+0x1c8/0x4e0)
      [90341.677812] ([<000000000070efbc>] qdio_kick_handler+0x124/0x2a8)
      [90341.677814] ([<0000000000713570>] __tiqdio_inbound_processing+0xf0/0xcd0)
      [90341.677818] ([<0000000000143312>] tasklet_action+0x92/0x120)
      [90341.677823] ([<00000000008b6e72>] __do_softirq+0x112/0x308)
      [90341.677824] ([<0000000000142bce>] irq_exit+0xd6/0xf8)
      [90341.677829] ([<000000000010b1d2>] do_IRQ+0x6a/0x88)
      [90341.677830] ([<00000000008b6322>] io_int_handler+0x112/0x220)
      [90341.677832] ([<0000000000102b2e>] enabled_wait+0x56/0xa8)
      [90341.677833] ([<0000000000000000>]           (null))
      [90341.677835] ([<0000000000102e32>] arch_cpu_idle+0x32/0x48)
      [90341.677838] ([<000000000018a126>] cpu_startup_entry+0x266/0x2b0)
      [90341.677841] ([<0000000000113b38>] smp_start_secondary+0x100/0x110)
      [90341.677843] ([<00000000008b68a6>] restart_int_handler+0x62/0x78)
      [90341.677845] ([<00000000008b6588>] psw_idle+0x3c/0x40)
      [90341.677846] Last Breaking-Event-Address:
      [90341.677848]  [<00000000007547ec>] qeth_dbf_longtext+0xc/0xc0
      [90341.677849]
      [90341.677850] Kernel panic - not syncing: Fatal exception in interrupt
      
      qeth_qdio_cq_handler() analyzes SBALs on this completion queue, but does
      not observe the limit of 16 SBAL elements per SBAL. This patch adds the
      additional check to process not more than 16 SBAL elements.
      Signed-off-by: NUrsula Braun <ubraun@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      903e4853
    • H
      qeth: restore device features after recovery · e830baa9
      Hans Wippel 提交于
      After device recovery, only a basic set of network device features is
      enabled on the device. If features like checksum offloading or TSO were
      enabled by the user before the recovery, this results in a mismatch
      between the network device features, that the kernel assumes to be
      enabled on the device, and the features actually enabled on the device.
      
      This patch tries to restore previously set features, that require
      changes on the device, after the recovery of a device. In case of an
      error, the network device's features are changed to contain only the
      features that are actually turned on.
      Signed-off-by: NHans Wippel <hwippel@linux.vnet.ibm.com>
      Signed-off-by: NUrsula Braun <ubraun@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e830baa9
  9. 17 6月, 2016 6 次提交
  10. 05 5月, 2016 1 次提交
  11. 15 12月, 2015 2 次提交
  12. 22 9月, 2015 2 次提交
  13. 19 5月, 2015 1 次提交
  14. 01 3月, 2015 1 次提交
  15. 26 1月, 2015 2 次提交
    • T
      390/qeth: Fix locking warning during qeth device setup · 1aec42bc
      Thomas Richter 提交于
      Do not wait for channel command buffers in IPA commands.
      The potential wait could be done while holding a spin lock and causes
      in recent kernels such a bug if kernel lock debugging is enabled:
      
      kernel: BUG: sleeping function called from invalid context at drivers/s390/net/qeth_core_main.c:
      794
      kernel: in_atomic(): 1, irqs_disabled(): 0, pid: 2031, name: NetworkManager
      kernel: 2 locks held by NetworkManager/2031:
      kernel:  #0:  (rtnl_mutex){+.+.+.}, at: [<00000000006e0d7a>] rtnetlink_rcv+0x32/0x50
      kernel:  #1:  (_xmit_ETHER){+.....}, at: [<00000000006cfe90>] dev_set_rx_mode+0x30/0x50
      kernel: CPU: 0 PID: 2031 Comm: NetworkManager Not tainted 3.18.0-rc5-next-20141124 #1
      kernel:        00000000275fb1f0 00000000275fb280 0000000000000002 0000000000000000
                     00000000275fb320 00000000275fb298 00000000275fb298 00000000007e326a
                     0000000000000000 000000000099ce2c 00000000009b4988 000000000000000b
                     00000000275fb2e0 00000000275fb280 0000000000000000 0000000000000000
                     0000000000000000 00000000001129c8 00000000275fb280 00000000275fb2e0
      kernel: Call Trace:
      kernel: ([<00000000001128b0>] show_trace+0xf8/0x158)
      kernel:  [<000000000011297a>] show_stack+0x6a/0xe8
      kernel:  [<00000000007e995a>] dump_stack+0x82/0xb0
      kernel:  [<000000000017d668>] ___might_sleep+0x170/0x228
      kernel:  [<000003ff80026f0e>] qeth_wait_for_buffer+0x36/0xd0 [qeth]
      kernel:  [<000003ff80026fe2>] qeth_get_ipacmd_buffer+0x3a/0xc0 [qeth]
      kernel:  [<000003ff80105078>] qeth_l3_send_setdelmc+0x58/0xf8 [qeth_l3]
      kernel:  [<000003ff8010b1fe>] qeth_l3_set_ip_addr_list+0x2c6/0x848 [qeth_l3]
      kernel:  [<000003ff8010bbb4>] qeth_l3_set_multicast_list+0x434/0xc48 [qeth_l3]
      kernel:  [<00000000006cfe9a>] dev_set_rx_mode+0x3a/0x50
      kernel:  [<00000000006cff90>] __dev_open+0xe0/0x140
      kernel:  [<00000000006d02a0>] __dev_change_flags+0xa0/0x178
      kernel:  [<00000000006d03a8>] dev_change_flags+0x30/0x70
      kernel:  [<00000000006e14ee>] do_setlink+0x346/0x9a0
      ...
      
      The device driver has plenty of command buffers available
      per channel for channel command communication.
      In the extremely rare case when there is no command buffer
      available, return a NULL pointer and issue a warning
      in the kernel log. The caller handles the case when
      a NULL pointer is encountered and returns an error.
      
      In the case the wait for command buffer is possible
      (because no lock is held as in the OSN case), still wait
      until a channel command buffer is available.
      Signed-off-by: NThomas Richter <tmricht@linux.vnet.ibm.com>
      Signed-off-by: NUrsula Braun <ursula.braun@de.ibm.com>
      Reviewed-by: NEugene Crosser <Eugene.Crosser@ru.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1aec42bc
    • E
      qeth: clean up error handling · efbbc1d5
      Eugene Crosser 提交于
      In the functions that are registering and unregistering MAC
      addresses in the qeth-handled hardware, remove callback functions
      that are unnesessary, as only the return code is analyzed.
      Translate hardware response codes to semi-standard 'errno'-like
      codes for readability.
      
      Add kernel-doc description to the internal API function
      qeth_send_control_data().
      Signed-off-by: NEugene Crosser <Eugene.Crosser@ru.ibm.com>
      Signed-off-by: NUrsula Braun <ursula.braun@de.ibm.com>
      Reviewed-by: NThomas-Mich Richter <tmricht@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      efbbc1d5
  16. 27 10月, 2014 1 次提交