All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH rdma-rc 2/9] IB/mlx4: Check gid_index return value
From: Leon Romanovsky @ 2016-11-09  7:26 UTC (permalink / raw)
  To: Yuval Shaia
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Daniel Jurgens
In-Reply-To: <20161106072503.GB3799-Hxa29pjIrETwm8eLU6eYyt+IiqhCXseY@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 219 bytes --]

On Sun, Nov 06, 2016 at 09:25:04AM +0200, Yuval Shaia wrote:
> FWIW
> Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

Thanks Yuval,
As I wrote earlier, we will address all your comments.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: esp_scsi, was Re: Modified Linux 4.1.20 (mac+scsi) on Quadra 660av
From: Finn Thain @ 2016-11-09  7:26 UTC (permalink / raw)
  To: Michael Schmitz; +Cc: linux-m68k, Tuomas Vainikka
In-Reply-To: <a72ead45-5b30-8ab8-aa2e-1b2404e7dc16@gmail.com>


On Wed, 9 Nov 2016, Michael Schmitz wrote:
> 
> > Well, the point is, we potentially release ACK (either after the 
> > Information Transfer command or after the Accept Message command) with 
> > ATN still asserted.
> 
> Who asserts ATN in case of reselection? I always thought that the 
> target, by initiating reselection, assumes the role of initiator and is 
> in charge of driving bus phase changes (including control of ATN).
> 

The difference between selection and reselection is the SEL signal. For 
selection, the host controls SEL. For reselection, the device controls it.

If the device disconnects and reconnects a command, it doesn't alter the 
initiator/target roles for that command. The host always controls ATN.

> >> How does the target signal end of message in phase? Stop handshaking, 
> >> or change phase?
> > 
> > Either would do. To stop handshaking would imply entering bus free 
> > phase.
> > 
> >> ATN going false?
> > 
> > AIUI, only the initiator can drive ATN.
> 
> So the initiator would have to read two tag message bytes if a target 
> reselects that had a tagged command disconnected?

Right, the target contols the bus phase, so it will send as many bytes as 
it wants. The initiator gets to alter that behaviour by signalling with 
ATN. Hence esp_scsi needs to be more careful with ATN during reselection.

> From the initiator side, that should work (if an untagged commmand has 
> been issued, no tagged commands are sent so we expect either tagged or 
> untagged reselections).
> 
> >> With the DMA programmed for two tag bytes, and the reselection 
> >> originating from a tagged command, I would expect the target to send 
> >> the two tag bytes.
> > 
> > Sure, but I think the initator is messing it up along the way.
> 
> Can't see how - reconnect_with_tag() is only used if no untagged command 
> is on record for the target.

Please see prior discussion of "Queue Tag Enable" bit, which relates to 
target response to ACK with and without ATN. Please also refer to the 
first para quoted at the top of this message.

> 
> > 
> >> Would it help to do the message transfer without DMA?
> > 
> > I would, just to see more clearly what was going on (command queue, 
> > control lines, bus phase).
> 
> Not sure we can get control lines read - bus phases are available IIRC.
> 
> > Recall that Tuomas said he tried PIO for this with zorro_esp without 
> > any improvement. And I first saw this bug on a Quadra 660av, on which 
> > mac_esp uses PIO for all transfers.
> 
> PIO does get set up for the expected number of message bytes though. Is 
> there a check for phase mismatch during PIO?
> 

There is in mac_esp. But you really need to try it.

> > 
> > If only the initator drives ATN, the documentation can only be 
> > referring to an ESP device in target mode.
> 
> The documentation mentions a command descriptor block to be transferred
> - would only apply to ESP in target mode again.
> 
> > My recollection from 2009 is that this particular disk did work with 
> > mac_esp on one of my Quadras, but not on my 660av. And three people have 
> > reported the problem now (to my knowledge) so I don't blame the disks.
> 
> What ESP versions are used in the Quadras vs 660av?

All are ESP236 according to esp_scsi detection.

-- 

> 
> Cheers,
> 
> 	Michael
> 
> 
> 

^ permalink raw reply

* Re: [PATCH] build: Fix build script to use correct cmake cmd
From: Leon Romanovsky @ 2016-11-09  7:27 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Doug Ledford, Dennis Dalessandro,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20161107235709.GF7002-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

On Mon, Nov 07, 2016 at 04:57:09PM -0700, Jason Gunthorpe wrote:
> On Tue, Oct 25, 2016 at 01:12:00PM +0300, Leon Romanovsky wrote:
> > > stuff I have - eg should I make it pushable? It is easy to use, but
> > > you need to have docker installed.
> >
> > I would be happy to get it and be more confident in my local tests.
>
> You can test it out with this commit:
>
> https://github.com/jgunthorpe/rdma-plumbing/commit/ef24b991c949ad4f50614bf6bf549e1cdf841358
>
> It will need some tidying before it can merged, but let me know if it
> is useful as-is.

Thanks, I'll do my best to try it next week.

>
> Jason

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [Qemu-devel] [PATCH v6 1/3] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest
From: Jason Wang @ 2016-11-09  7:28 UTC (permalink / raw)
  To: Aviv B.D, qemu-devel
  Cc: Jan Kiszka, Alex Williamson, Peter Xu, Michael S. Tsirkin
In-Reply-To: <1478603064-32562-2-git-send-email-bd.aviv@gmail.com>



On 2016年11月08日 19:04, Aviv B.D wrote:
> From: "Aviv Ben-David" <bd.aviv@gmail.com>
>
> This capability asks the guest to invalidate cache before each map operation.
> We can use this invalidation to trap map operations in the hypervisor.

Hi:

Like I've asked twice in the past, I want to know why don't you cache 
translation faults as what spec required (especially this is a guest 
visible behavior)?

Btw, please cc me on posting future versions.

Thanks

>
> Signed-off-by: Aviv Ben-David <bd.aviv@gmail.com>
> ---
>   hw/i386/intel_iommu.c          | 5 +++++
>   hw/i386/intel_iommu_internal.h | 1 +
>   include/hw/i386/intel_iommu.h  | 2 ++
>   3 files changed, 8 insertions(+)
>
> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
> index 1655a65..834887f 100644
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -2017,6 +2017,7 @@ static Property vtd_properties[] = {
>       DEFINE_PROP_ON_OFF_AUTO("eim", IntelIOMMUState, intr_eim,
>                               ON_OFF_AUTO_AUTO),
>       DEFINE_PROP_BOOL("x-buggy-eim", IntelIOMMUState, buggy_eim, false),
> +    DEFINE_PROP_BOOL("cache-mode", IntelIOMMUState, cache_mode_enabled, FALSE),
>       DEFINE_PROP_END_OF_LIST(),
>   };
>   
> @@ -2391,6 +2392,10 @@ static void vtd_init(IntelIOMMUState *s)
>           assert(s->intr_eim != ON_OFF_AUTO_AUTO);
>       }
>   
> +    if (s->cache_mode_enabled) {
> +        s->cap |= VTD_CAP_CM;
> +    }
> +
>       vtd_reset_context_cache(s);
>       vtd_reset_iotlb(s);
>   
> diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h
> index 0829a50..35d9f3a 100644
> --- a/hw/i386/intel_iommu_internal.h
> +++ b/hw/i386/intel_iommu_internal.h
> @@ -201,6 +201,7 @@
>   #define VTD_CAP_MAMV                (VTD_MAMV << 48)
>   #define VTD_CAP_PSI                 (1ULL << 39)
>   #define VTD_CAP_SLLPS               ((1ULL << 34) | (1ULL << 35))
> +#define VTD_CAP_CM                  (1ULL << 7)
>   
>   /* Supported Adjusted Guest Address Widths */
>   #define VTD_CAP_SAGAW_SHIFT         8
> diff --git a/include/hw/i386/intel_iommu.h b/include/hw/i386/intel_iommu.h
> index 1989c1e..42d293f 100644
> --- a/include/hw/i386/intel_iommu.h
> +++ b/include/hw/i386/intel_iommu.h
> @@ -258,6 +258,8 @@ struct IntelIOMMUState {
>       uint8_t womask[DMAR_REG_SIZE];  /* WO (write only - read returns 0) */
>       uint32_t version;
>   
> +    bool cache_mode_enabled;        /* RO - is cap CM enabled? */
> +
>       dma_addr_t root;                /* Current root table pointer */
>       bool root_extended;             /* Type of root table (extended or not) */
>       bool dmar_enabled;              /* Set if DMA remapping is enabled */

^ permalink raw reply

* Re: [PATCH v2 2/3] iwlwifi: mvm: rs: Remove unused 'mcs' variable
From: Luca Coelho @ 2016-11-09  7:28 UTC (permalink / raw)
  To: Kirtika Ruchandani
  Cc: linux-wireless, Arnd Bergmann, Kalle Valo, Emmanuel Grumbach,
	Johannes Berg, Sara Sharon, Liad Kaufman, Eyal Shapira,
	Alexander Bondar
In-Reply-To: <20161109055033.GA27470@google.com>

Another nitpick....
On Tue, 2016-11-08 at 21:50 -0800, Kirtika Ruchandani wrote:
> Commit 5fc0f76c4 introduced Rx stats from debugfs, the function
> iwl_mvm_reset_frame_stats from that commit defines and sets mcs but does not use
> it. Compiling iwlwifi with W=1 gives this warning -
> 
> iwlwifi/mvm/rs.c: In function ‘iwl_mvm_update_frame_stats’:
> iwlwifi/mvm/rs.c:3074:14: warning: variable ‘mcs’ set but not used [-Wunused-but-set-variable]
> 
> Fixes: 5fc0f76c43bd (iwlwifi: mvm: add Rx frames statistics via debugfs)

You forgot the quotes here, but no worries, I'll add them.

--
Luca.

^ permalink raw reply

* [Buildroot] [autobuild.buildroot.net] Build results for 2016-11-08
From: Thomas Petazzoni @ 2016-11-09  7:30 UTC (permalink / raw)
  To: buildroot

Hello,

Build statistics for 2016-11-08
================================

      successes : 193
       failures : 57 
       timeouts : 0  
          TOTAL : 250

Classification of failures by reason
====================================

                 mesa3d-13.0.0 | 5 
tvheadend-50a370707aedf5c12... | 5 
             berkeleydb-5.3.28 | 3 
                    mpfr-3.1.5 | 3 
                 mplayer-1.3.0 | 3 
                    quota-4.01 | 3 
                  guile-2.0.13 | 2 
kvm-unit-tests-5731572b2ac2... | 2 
                    ola-0.10.2 | 2 
qt5webkit-b35917bcb44d7f200... | 2 
               tcpreplay-4.1.1 | 2 
                 weston-1.12.0 | 2 
             core-dependencies | 1 
      docker-containerd-v0.2.4 | 1 
               domoticz-3.5837 | 1 
                     gpsd-3.16 | 1 
                 jack2-v1.9.10 | 1 
kvmtool-372f583d359a5bdcbbe... | 1 
libasplib-f7219142e790a329b... | 1 
                  libsoc-0.8.2 | 1 
                   mpd-0.19.19 | 1 
                    mpv-0.20.0 | 1 
openblas-f04af36ad0e85b64f1... | 1 
                   perl-5.22.2 | 1 
               polarssl-1.2.19 | 1 
                 qt5base-5.6.2 | 1 
             qt5location-5.6.2 | 1 
               runc-v1.0.0-rc2 | 1 
                  stunnel-5.36 | 1 
                sysklogd-1.5.1 | 1 
                   taskd-1.1.0 | 1 
               trousers-0.3.13 | 1 
vpnc-b1243d29e0c00312ead038... | 1 
x264-72d53ab2ac7af24597a824... | 1 
              xmlstarlet-1.6.1 | 1 


Detail of failures
===================

        m68k |              berkeleydb-5.3.28 | NOK | http://autobuild.buildroot.net/results/75214a405b9ffe65bd10c97cdcdd3a868c22cabd
        m68k |              berkeleydb-5.3.28 | NOK | http://autobuild.buildroot.net/results/aa9973994aad6cd384b43ee53d72ee3c56f05c52
        m68k |              berkeleydb-5.3.28 | NOK | http://autobuild.buildroot.net/results/fefaa6bbb9e0c8358ba20dc10bdea82e56e53c38
        i686 |              core-dependencies | NOK | http://autobuild.buildroot.net/results/09653e88862cd6583209003108ec57013967261b
   powerpc64 |       docker-containerd-v0.2.4 | NOK | http://autobuild.buildroot.net/results/971685adb0ccbc15362f4aac4473b2cb20cc1b70
        sh4a |                domoticz-3.5837 | NOK | http://autobuild.buildroot.net/results/7bba1b7008c9c21e8699604a1aacfaef93f5f02a
         arc |                      gpsd-3.16 | NOK | http://autobuild.buildroot.net/results/6a3877781523b88aac22df927726456fe8e89eca
         arm |                   guile-2.0.13 | NOK | http://autobuild.buildroot.net/results/48043d99610d5450fe1dd15733d5882359f8c978
         arm |                   guile-2.0.13 | NOK | http://autobuild.buildroot.net/results/c93741534f87069ac384cfd7c7e6f8697cfa88e4
      xtensa |                  jack2-v1.9.10 | NOK | http://autobuild.buildroot.net/results/b41c1123bc36fe941037a98f0c3c89ca3edc9ee7
      x86_64 | kvm-unit-tests-5731572b2ac2... | NOK | http://autobuild.buildroot.net/results/f28246d2de3086ca4994a27915c2d47db9bd87bb
      x86_64 | kvm-unit-tests-5731572b2ac2... | NOK | http://autobuild.buildroot.net/results/d077a9a9bc03769d6f799fc1aa0d162d6e8de231
         arm | kvmtool-372f583d359a5bdcbbe... | NOK | http://autobuild.buildroot.net/results/7c3a4771ecde2fd0c894a1f375d91bf3b3291695
        m68k | libasplib-f7219142e790a329b... | NOK | http://autobuild.buildroot.net/results/915eb4cab8e746a576ad3279df289f7fb7ac7985
        bfin |                   libsoc-0.8.2 | NOK | http://autobuild.buildroot.net/results/b2b27c0e04789612329bb4889dc87e7464e40f15
         arc |                  mesa3d-13.0.0 | NOK | http://autobuild.buildroot.net/results/abbe7ba515a968e454bd11c085ba4d721d977570
 powerpc64le |                  mesa3d-13.0.0 | NOK | http://autobuild.buildroot.net/results/2dada7eeb72c8313fbf466aaf7fe9387c2740b04
         arm |                  mesa3d-13.0.0 | NOK | http://autobuild.buildroot.net/results/2ab84c2f9188f81c24cc39daeab491dad2e54c34
    mips64el |                  mesa3d-13.0.0 | NOK | http://autobuild.buildroot.net/results/685badb1a47d342e28197483839259a55c2347f2
         arc |                  mesa3d-13.0.0 | NOK | http://autobuild.buildroot.net/results/42b547abaa29f6bb88377cc5068bfa0918ab52de
         arm |                    mpd-0.19.19 | NOK | http://autobuild.buildroot.net/results/f9dac5a9c3bfe49c510ee9dcf7e54cea38473dc5
         arc |                     mpfr-3.1.5 | NOK | http://autobuild.buildroot.net/results/6669196edb3e21d5bed344f8c6c2fe415c2a42f4
         arc |                     mpfr-3.1.5 | NOK | http://autobuild.buildroot.net/results/4fa7993d22e41a988b3277c220f547c0d6616a1b
         arc |                     mpfr-3.1.5 | NOK | http://autobuild.buildroot.net/results/d805748991c7522193c91eddfee318aaeef4145f
         arm |                  mplayer-1.3.0 | NOK | http://autobuild.buildroot.net/results/81fdcd9c68a487ed9014d97668a5ed93cefd1695
        i686 |                  mplayer-1.3.0 | NOK | http://autobuild.buildroot.net/results/403c8f7e27c9842bdbae0d17104a7931e0d331f2
        i686 |                  mplayer-1.3.0 | NOK | http://autobuild.buildroot.net/results/fe9c1127126362e2d6d98c8c879586561701e863
     powerpc |                     mpv-0.20.0 | NOK | http://autobuild.buildroot.net/results/e763b06081aee52f9ca581773eedb127fa3ae9e3
         arc |                     ola-0.10.2 | NOK | http://autobuild.buildroot.net/results/9bf879585e17df33d84b86d8eb774bb87d0cb4ea
        mips |                     ola-0.10.2 | NOK | http://autobuild.buildroot.net/results/76b1d44cbc85755463eae8f62bbb803dc01a1de9
   powerpc64 | openblas-f04af36ad0e85b64f1... | NOK | http://autobuild.buildroot.net/results/c8d112573ddb89a97286fd045f21033e29f809a0
         arm |                    perl-5.22.2 | NOK | http://autobuild.buildroot.net/results/686ef1b26fa4f2b434edb0628e84c897e8ef84be
         arm |                polarssl-1.2.19 | NOK | http://autobuild.buildroot.net/results/dbb36c090dd0c690b208a637bbadce50cad43962
     aarch64 |                  qt5base-5.6.2 | NOK | http://autobuild.buildroot.net/results/0149202d5b56ef8d8b3ef0bcdb09a6ed9f87f1a2
     powerpc |              qt5location-5.6.2 | NOK | http://autobuild.buildroot.net/results/b33ac12369dd1e5f6b05974786d003dcee82fee9
         arm | qt5webkit-b35917bcb44d7f200... | NOK | http://autobuild.buildroot.net/results/e5b43370a4a3ab5ea999e292b7c8396757ab6ebb
      mipsel | qt5webkit-b35917bcb44d7f200... | NOK | http://autobuild.buildroot.net/results/28809c3da103a24e7b0663ebfdc02f288f2d23dc
        i586 |                     quota-4.01 | NOK | http://autobuild.buildroot.net/results/032276eaf10e4eb13de385470023a020a1d59734
         arm |                     quota-4.01 | NOK | http://autobuild.buildroot.net/results/12cee0b16b816fed515870113ade6096002e4ffd
      x86_64 |                     quota-4.01 | NOK | http://autobuild.buildroot.net/results/668bae48696f84310ace06e8f054098447b5120b
   powerpc64 |                runc-v1.0.0-rc2 | NOK | http://autobuild.buildroot.net/results/77c31d6e8f5efe3e024e27a160cf5d1d1952719e
        i586 |                   stunnel-5.36 | NOK | http://autobuild.buildroot.net/results/5d42dd192677029120bad4ab44bb0653f925616e
         arm |                 sysklogd-1.5.1 | NOK | http://autobuild.buildroot.net/results/4764d67a17f3af6eb7daa332dd6e490c728721cd
         arm |                    taskd-1.1.0 | NOK | http://autobuild.buildroot.net/results/232c82b8393c45b971cb7a4fa7f0cb2e619293f4
         arm |                tcpreplay-4.1.1 | NOK | http://autobuild.buildroot.net/results/b2936d32e2e01a903a9073be3940c7d5002fc9dc
      x86_64 |                tcpreplay-4.1.1 | NOK | http://autobuild.buildroot.net/results/b3a6d18ca5d87078623aa991ac02556eb5296761
         arc |                trousers-0.3.13 | NOK | http://autobuild.buildroot.net/results/3eb1aa093b251541818fcf08f15c9826f6dca860
      mipsel | tvheadend-50a370707aedf5c12... | NOK | http://autobuild.buildroot.net/results/6ed5cef61ee3a0e5c24b0e4595324a9b838067c3
    mips64el | tvheadend-50a370707aedf5c12... | NOK | http://autobuild.buildroot.net/results/9ab8b605b017f153299b874fd5a0a2f9f050081f
      xtensa | tvheadend-50a370707aedf5c12... | NOK | http://autobuild.buildroot.net/results/7e2d6d0d158d6092a10c75dcf7011a8d5c68eda9
    mips64el | tvheadend-50a370707aedf5c12... | NOK | http://autobuild.buildroot.net/results/8a93d6d8d1047ad721193c7a1210f140cc812747
    mips64el | tvheadend-50a370707aedf5c12... | NOK | http://autobuild.buildroot.net/results/f4342823be613e8348e39d1b3138e0069f8db796
      mipsel | vpnc-b1243d29e0c00312ead038... | NOK | http://autobuild.buildroot.net/results/1a870077517fdbfcb358259916e815559acb0561
     powerpc |                  weston-1.12.0 | NOK | http://autobuild.buildroot.net/results/a5aff121f9275e949729e114cc89fefa6cc63d23
         arm |                  weston-1.12.0 | NOK | http://autobuild.buildroot.net/results/c82e6c366e18d387ec5521ea95c2cd1b98e102c0
        bfin | x264-72d53ab2ac7af24597a824... | NOK | http://autobuild.buildroot.net/results/e3ee9733d77a1b723c1c0b82633e3b53d32db53f
      x86_64 |               xmlstarlet-1.6.1 | NOK | http://autobuild.buildroot.net/results/31e3af00b259ff0f8565a236e566c6ed038dcda4

-- 
http://autobuild.buildroot.net

^ permalink raw reply

* [U-Boot] [PATCH 0/3] Enable the host controller and hub on PopMetal board
From: Kever Yang @ 2016-11-09  7:30 UTC (permalink / raw)
  To: u-boot


The PopMetal board based on rk3288 SoC have 3 USB 2.0 host ports from
a usb 2.0 hub which connect to the rk3288 usb host1.

This patch set enable those ports by enable the rk3288 usb host controller
driver and usb host function like storage and ether, enable the port
power and de-assert the hub reset signal.

Test with U-disk on Popmetal board.
=> usb start
starting USB...
USB0:   Core Release: 3.10a
scanning bus 0 for devices... ** First descriptor is NOT a primary desc
on 0:1 **
3 USB Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
=> usb tree
USB device tree:
  1  Hub (480 Mb/s, 0mA)
  |   U-Boot Root Hub
  |
  +-2  Hub (480 Mb/s, 100mA)
    |   USB 2.0 Hub
    |
    +-3  Mass Storage (480 Mb/s, 300mA)
         Kingston DataTraveler G2 001D92AD7612B91113680066



Kever Yang (3):
  dts: popmetal: add usb host power supply node
  config: popmetal: enable the USB host controller and function
  board: popmetal: enable the usb host port power in board init

 arch/arm/dts/rk3288-popmetal.dtsi                 | 22 ++++++++++++++++
 board/chipspark/popmetal_rk3288/popmetal-rk3288.c | 31 +++++++++++++++++++++++
 configs/popmetal-rk3288_defconfig                 |  3 +++
 include/configs/rk3288_common.h                   |  7 +++++
 4 files changed, 63 insertions(+)

-- 
1.9.1

^ permalink raw reply

* [U-Boot] [PATCH 1/3] dts: popmetal: add usb host power supply node
From: Kever Yang @ 2016-11-09  7:30 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1478676621-6987-1-git-send-email-kever.yang@rock-chips.com>

The popmetal board using a HOST_VBUS_DRV gpio signal to control the
USB host port 5V power, add a fix regulator and pinctrl for it, and
enable the USB host1 controller at the same time.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 arch/arm/dts/rk3288-popmetal.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm/dts/rk3288-popmetal.dtsi b/arch/arm/dts/rk3288-popmetal.dtsi
index f3bd468..4382860 100644
--- a/arch/arm/dts/rk3288-popmetal.dtsi
+++ b/arch/arm/dts/rk3288-popmetal.dtsi
@@ -145,6 +145,18 @@
 		regulator-always-on;
 		vin-supply = <&vcc_io>;
 	};
+
+	vcc5v0_host: usb-host-regulator {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&host_vbus_drv>;
+		regulator-name = "vcc5v0_host";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+	};
 };
 
 &cpu0 {
@@ -471,6 +483,12 @@
 			rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 	};
+
+	usb_host {
+		host_vbus_drv: host-vbus-drv {
+			rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
 };
 
 &tsadc {
@@ -515,6 +533,10 @@
 	status = "okay";
 };
 
+&usb_host1 {
+	status = "okay";
+};
+
 &usbphy {
 	status = "okay";
 };
-- 
1.9.1

^ permalink raw reply related

* [U-Boot] [PATCH 2/3] config: popmetal: enable the USB host controller and function
From: Kever Yang @ 2016-11-09  7:30 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1478676621-6987-1-git-send-email-kever.yang@rock-chips.com>

RK3288 using the dwc2 USB host controller, enable it and other usb host
funtion like storage and ether.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 configs/popmetal-rk3288_defconfig | 3 +++
 include/configs/rk3288_common.h   | 7 +++++++
 2 files changed, 10 insertions(+)

diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
index 1e70ae0..a2d1d65 100644
--- a/configs/popmetal-rk3288_defconfig
+++ b/configs/popmetal-rk3288_defconfig
@@ -63,3 +63,6 @@ CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_ERRNO_STR=y
 CONFIG_ROCKCHIP_SPL_BACK_TO_BROM=y
+CONFIG_CMD_USB=y
+CONFIG_USB=y
+CONFIG_USB_STORAGE=y
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index 0868612..8006aac 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -90,6 +90,13 @@
 #define CONFIG_G_DNL_VENDOR_NUM		0x2207
 #define CONFIG_G_DNL_PRODUCT_NUM	0x320a
 
+/* usb host support */
+#ifdef CONFIG_CMD_USB
+#define CONFIG_USB_DWC2
+#define CONFIG_USB_HOST_ETHER
+#define CONFIG_USB_ETHER_SMSC95XX
+#define CONFIG_USB_ETHER_ASIX
+#endif
 #define ENV_MEM_LAYOUT_SETTINGS \
 	"scriptaddr=0x00000000\0" \
 	"pxefile_addr_r=0x00100000\0" \
-- 
1.9.1

^ permalink raw reply related

* [U-Boot] [PATCH 3/3] board: popmetal: enable the usb host port power in board init
From: Kever Yang @ 2016-11-09  7:30 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1478676621-6987-1-git-send-email-kever.yang@rock-chips.com>

Enable the usb host port 5V power by enable the fix regulator.
The PopMetal board have a on board FE1.1 usb 2.0 hub which connect to
the usb host port, we need to de-assert its reset pin at the same time.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 board/chipspark/popmetal_rk3288/popmetal-rk3288.c | 31 +++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/board/chipspark/popmetal_rk3288/popmetal-rk3288.c b/board/chipspark/popmetal_rk3288/popmetal-rk3288.c
index aad74ef..6f5d3a8c 100644
--- a/board/chipspark/popmetal_rk3288/popmetal-rk3288.c
+++ b/board/chipspark/popmetal_rk3288/popmetal-rk3288.c
@@ -6,6 +6,8 @@
 
 #include <common.h>
 #include <spl.h>
+#include <asm/gpio.h>
+#include <power/regulator.h>
 
 void board_boot_order(u32 *spl_boot_list)
 {
@@ -13,3 +15,32 @@ void board_boot_order(u32 *spl_boot_list)
 	spl_boot_list[0] = BOOT_DEVICE_MMC2;
 	spl_boot_list[1] = BOOT_DEVICE_MMC1;
 }
+
+#define GPIO7A3_HUB_RST	227
+
+int rk_board_late_init(void)
+{
+	int ret;
+	struct udevice *regulator;
+
+	ret = regulator_get_by_platname("vcc5v0_host", &regulator);
+	if (ret) {
+		printf("%s vcc5v0_host init fail! ret %d\n", __func__, ret);
+		goto out;
+	}
+
+	ret = regulator_set_enable(regulator, true);
+	if (ret) {
+		printf("%s vcc5v0-host enable fail!\n", __func__);
+		goto out;
+	}
+
+	gpio_request(GPIO7A3_HUB_RST, "hub_rst");
+	gpio_direction_output(GPIO7A3_HUB_RST, 1);
+
+	return 0;
+out:
+	printf("%s init error %x\n", __func__, ret);
+
+	return ret;
+}
-- 
1.9.1

^ permalink raw reply related

* Re: [PATCH v2 3/3] iwlwifi: pcie: trans: Remove unused 'shift_param'
From: Luca Coelho @ 2016-11-09  7:31 UTC (permalink / raw)
  To: Kirtika Ruchandani
  Cc: linux-wireless, Arnd Bergmann, Kalle Valo, Emmanuel Grumbach,
	Johannes Berg, Sara Sharon, Eran Harary, Liad Kaufman,
	Eyal Shapira, Alexander Bondar
In-Reply-To: <20161109055048.GA27520@google.com>

On Tue, 2016-11-08 at 21:50 -0800, Kirtika Ruchandani wrote:
> shift_param is defined and set in iwl_pcie_load_cpu_sections
> but not used. Fix this to avoid -Wunused-but-set-variable
> warning.
> The code using it turned into dead code with commit dcab8ecd5617
> which added a separate function iwl_pcie_load_given_ucode_8000
> (then 8000b) for IWL_DEVICE_FAMILY_8000. Commit 76f8c0e17edc
> removed the dead code but left shift_param as is.
> 
> iwlwifi/pcie/trans.c: In function ‘iwl_pcie_load_cpu_sections’:
> iwlwifi/pcie/trans.c:871:6: warning: variable ‘shift_param’ set but not used [-Wunused-but-set-variable]
> 
> Fixes: dcab8ecd5617 (iwlwifi: mvm: support ucode load for family_8000 B0 only)
> Fixes: 76f8c0e17edc (iwlwifi: pcie: remove dead code)
> 
> Signed-off-by: Kirtika Ruchandani <kirtika@google.com>
> Cc: Sara Sharon <sara.sharon@intel.com>
> Cc: Luca Coelho <luciano.coelho@intel.com>
> Cc: Eran Harary <eran.harary@intel.com>

I'll remove Harary's Cc here too, since this email is not valid anymore
and I don't know his new one (and he probably doesn't care anymore
anyway).

--
Luca.

^ permalink raw reply

* Re: [PATCH 2/2] clk: pxa: fix pxa2xx_determine_rate return
From: Robert Jarzmik @ 2016-11-09  7:31 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Stephen Boyd, Michael Turquette, linux-clk, linux-kernel
In-Reply-To: <2012366.hMim84DLbv@wuerfel>

Arnd Bergmann <arnd@arndb.de> writes:

> On Tuesday, November 8, 2016 7:01:57 PM CET Robert Jarzmik wrote:
>> Arnd Bergmann <arnd@arndb.de> writes:
>> If a non-exact match is found, either by closest_below or closest_above, rate is
>> set (rate = freqs[closest_xxx].cpll). And a couple of lines later after the
>> if/else, req->rate = rate is set as well, so I don't think this part of the
>> commit message is accurate.
>
> It is only set if rate is zero, and that normally is not the case here:
>
>        if (!rate)
>                req->rate = rate;
Ah ok, that's where the bug was lurking, if should have been "if (rate)".

But anyway, after comparing the end result of your code and mine, I find yours
more maintainable, especially the replacement of 'ret = 0'.

So let's proceed, thanks for finding this one out.
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>

--
Robert

^ permalink raw reply

* Re: Xen ARM community call
From: Dirk Behme @ 2016-11-09  7:32 UTC (permalink / raw)
  To: Julien Grall
  Cc: Edgar Iglesias (edgar.iglesias@xilinx.com), andrii.anisov,
	Stefano Stabellini, Steve Capper, alistair.francis, Lars Kurth,
	stewart.hildebrand, Goel, Sameer, xen-devel@lists.xen.org,
	Shanker Donthineni
In-Reply-To: <bc284008-e878-737d-5277-f7cff47fc626@arm.com>

On 08.11.2016 13:19, Julien Grall wrote:
> Hi all,
>
> I would like to start organizing a recurring community call to discuss
> and sync-up on upcoming features for Xen ARM.
>
> Example of features that could be discussed:
>     - Sharing co-processor between guests
>     - PCI passthrough


Would it be an option to talk about

"Don't disable clocks owned by Xen in the Linux kernel"
https://bugs.xenproject.org/xen/bug/45

too?

Some month ago we've had a discussion with the kernel people about that 
issue. But I think there has been no solution, yet.


> I would suggest to start with a 1 hour meeting on the Wednesday 23rd
> November. I know that people are spread across different timezones, so I
> would like to gather thought before choosing a time.


GMT+1


Best regards

Dirk



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply

* [U-Boot] Rockchip USB driver
From: Kever Yang @ 2016-11-09  7:33 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <CAPnjgZ32ZwL4a7x2O_ohUu-0yobn4G00ibyWmWUyUC8F+jFLeQ@mail.gmail.com>

Hi Simon,

     I have send patch for rk3036 kylin and rk3288 PopMetal to enable 
the usb host,
both have test with U-Disk, you can enable usb host for other boards 
with reference
to my patches if you want.

Thanks,
- Kever
On 11/07/2016 10:59 AM, Simon Glass wrote:
> Hi Kever,
>
> On 3 November 2016 at 18:56, Kever Yang <kever.yang@rock-chips.com> wrote:
>> Hi Doug,
>>
>>      Do you mean usb gadget driver or usb host driver?
> I mean USB host.
>
>> The usb controller for rk3288 is very similar to rk3036, I though the driver
>> are working on upstream.
>> Let me double check.
> OK, thanks. I don't see it.
>
> - Simon
>
>> Thanks,
>> - Kever
>>
>> On 11/02/2016 09:04 AM, Simon Glass wrote:
>>> Hi Kever,
>>>
>>> Do you have a USB driver for RK3288 that you could upstream please?
>>>
>>> Regards,
>>> Simon
>>>
>>
>
>

^ permalink raw reply

* Re: [PATCH] ARM: dts: r8a7794: Correct hsusb parent clock
From: Simon Horman @ 2016-11-09  7:34 UTC (permalink / raw)
  To: Yoshihiro Shimoda
  Cc: Geert Uytterhoeven, Magnus Damm, Shinobu Uehara,
	linux-renesas-soc@vger.kernel.org
In-Reply-To: <HK2PR06MB0548F5A24A6C6BBB7BB4C024D8A60@HK2PR06MB0548.apcprd06.prod.outlook.com>

On Tue, Nov 08, 2016 at 12:16:17PM +0000, Yoshihiro Shimoda wrote:
> Hi Geert-san,
> 
> > -----Original Message-----
> > From: Geert Uytterhoeven
> > Sent: Tuesday, November 08, 2016 4:07 AM
> > 
> > The parent clock of the HSUSB clock is the HP clock, not the MP clock.
> > 
> > Fixes: c7bab9f929e51761 ("ARM: shmobile: r8a7794: Add USB clocks to device tree")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> Thank you for the patch.
> 
> Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Thanks, I have queued this up.

^ permalink raw reply

* Re: [PATCH v2 rdma-core 3/7] libhns: Add verbs of pd and mr support
From: Leon Romanovsky @ 2016-11-09  7:34 UTC (permalink / raw)
  To: Lijun Ou
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linuxarm-hv44wF8Li93QT0dZR+AlfA
In-Reply-To: <1477731826-10787-4-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]

On Sat, Oct 29, 2016 at 05:03:42PM +0800, Lijun Ou wrote:
> This patch mainly introduces the verbs with pd and mr,
> included alloc_pd, dealloc_pd, reg_mr and dereg_mr.
>
> Signed-off-by: Lijun Ou <oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Wei Hu <xavier.huwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> ---
> v2:
> - No change over v1
>
> v1:
> - The initial submit
> ---
>  providers/hns/hns_roce_u.c       |  4 ++
>  providers/hns/hns_roce_u.h       | 18 +++++++++
>  providers/hns/hns_roce_u_abi.h   |  6 +++
>  providers/hns/hns_roce_u_verbs.c | 79 ++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 107 insertions(+)

<....>

> +struct ibv_mr *hns_roce_u_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
> +				 int access)
> +{
> +	int ret;
> +	struct ibv_mr *mr;
> +	struct ibv_reg_mr cmd;
> +	struct ibv_reg_mr_resp resp;
> +
> +	if (addr == NULL) {

It can be great if you use one style for all your code e.g. if(!addr) ....

> +		fprintf(stderr, "2nd parm addr is NULL!\n");
> +		return NULL;
> +	}
> +
> +	if (length == 0) {
> +		fprintf(stderr, "3st parm length is 0!\n");
> +		return NULL;
> +	}
> +
> +	mr = malloc(sizeof(*mr));
> +	if (mr)
> +		return NULL;

It looks like bug and you wanted if(!mr) and not if(mr).


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [PATCH] ARM: dts: r8a7794: Use SYSC "always-on" PM Domain for sound
From: Simon Horman @ 2016-11-09  7:34 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Magnus Damm, Sergei Shtylyov, Kuninori Morimoto,
	linux-renesas-soc
In-Reply-To: <1478545804-1330-1-git-send-email-geert+renesas@glider.be>

On Mon, Nov 07, 2016 at 08:10:04PM +0100, Geert Uytterhoeven wrote:
> Hook up the Audio-DMAC and sound device nodes to the SYSC "always-on" PM
> Domain, for a more consistent device-power-area description in DT.
> 
> Cfr. commit 0761ff2ad0c581f3 ("ARM: dts: r8a7794: Add SYSC PM Domains").
> 
> Fixes: 320d6c5a08a4abd3 ("ARM: dts: r8a7794: add sound support")
> Fixes: 298e4ee3d213a076 ("ARM: dts: r8a7794: add Audio-DMAC support")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Due to race condition between audio support and SYSC PM Domains patch
> series.

Thanks, I have queued this up.

^ permalink raw reply

* [PATCH] ARM: dts: socfpga: add nand controller nodes
From: Steffen Trumtrar @ 2016-11-09  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

Add the denali nand controller to the socfpga dtsi.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
 arch/arm/boot/dts/socfpga.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
index 9f48141270b8..6b0c23ca5e88 100644
--- a/arch/arm/boot/dts/socfpga.dtsi
+++ b/arch/arm/boot/dts/socfpga.dtsi
@@ -700,6 +700,19 @@
 			status = "disabled";
 		};
 
+		nand0: nand at ff900000 {
+			#address-cells = <0x1>;
+			#size-cells = <0x1>;
+			compatible = "denali,denali-nand-dt";
+			reg = <0xff900000 0x100000>,
+			      <0xffb80000 0x10000>;
+			reg-names = "nand_data", "denali_reg";
+			interrupts = <0x0 0x90 0x4>;
+			dma-mask = <0xffffffff>;
+			clocks = <&nand_clk>;
+			status = "disabled";
+		};
+
 		ocram: sram at ffff0000 {
 			compatible = "mmio-sram";
 			reg = <0xffff0000 0x10000>;
-- 
2.10.1

^ permalink raw reply related

* [PATCH] net/mlx4_en: Fix bpf_prog_add ref_cnt in mlx4
From: Zhiyi Sun @ 2016-11-09  7:35 UTC (permalink / raw)
  To: bblanco, Tariq Toukan, Yishai Hadas, netdev, linux-rdma,
	linux-kernel
  Cc: zhiyisun

There are rx_ring_num queues. Each queue will load xdp prog. So
bpf_prog_add() should add rx_ring_num to ref_cnt.

Signed-off-by: Zhiyi Sun <zhiyisun@gmail.com>
---
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 12c99a2..d25e150 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -2650,7 +2650,7 @@ static int mlx4_xdp_set(struct net_device *dev, struct bpf_prog *prog)
 	 */
 	if (priv->xdp_ring_num == xdp_ring_num) {
 		if (prog) {
-			prog = bpf_prog_add(prog, priv->rx_ring_num - 1);
+			prog = bpf_prog_add(prog, priv->rx_ring_num);
 			if (IS_ERR(prog))
 				return PTR_ERR(prog);
 		}
@@ -2680,7 +2680,7 @@ static int mlx4_xdp_set(struct net_device *dev, struct bpf_prog *prog)
 	}
 
 	if (prog) {
-		prog = bpf_prog_add(prog, priv->rx_ring_num - 1);
+		prog = bpf_prog_add(prog, priv->rx_ring_num);
 		if (IS_ERR(prog))
 			return PTR_ERR(prog);
 	}
-- 
2.9.3

^ permalink raw reply related

* [Buildroot] [PATCH 1/4] configs: atmel: at91sam9260eknf: update defconfig
From: Baruch Siach @ 2016-11-09  7:36 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20161109065948.1851-2-ludovic.desroches@atmel.com>

Hi Ludovic,

On Wed, Nov 09, 2016 at 07:59:45AM +0100, Ludovic Desroches wrote:
> Bump to a recent version of AT91bootstrap and use mainline version of
> U-Boot and Linux.
> 
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> ---
>  configs/at91sam9260eknf_defconfig | 22 ++++++++++++----------
>  1 file changed, 12 insertions(+), 10 deletions(-)
> 
> diff --git a/configs/at91sam9260eknf_defconfig b/configs/at91sam9260eknf_defconfig
> index 92bb071..4c17cb6 100644
> --- a/configs/at91sam9260eknf_defconfig
> +++ b/configs/at91sam9260eknf_defconfig
> @@ -2,9 +2,6 @@
>  BR2_arm=y
>  BR2_arm926t=y
>  
> -# Linux headers same as kernel, a 3.9 series
> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_9=y
> -
>  # Packages
>  BR2_PACKAGE_HOST_SAM_BA=y
>  
> @@ -13,15 +10,20 @@ BR2_TARGET_ROOTFS_UBIFS=y
>  BR2_TARGET_ROOTFS_UBI=y
>  
>  # Bootloaders
> -BR2_TARGET_AT91BOOTSTRAP=y
> -BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9260ek"
> -BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y
> +BR2_TARGET_AT91BOOTSTRAP3=y
> +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y
> +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL="https://github.com/linux4sam/at91bootstrap.git"
> +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="v3.8.7"
> +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="at91sam9260eknf_uboot"
>  BR2_TARGET_BAREBOX=y
>  BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="at91sam9260ek"
> +BR2_TARGET_UBOOT=y
> +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
> +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="at91sam9260ek_nandflash"

Why enable both U-Boot and Barebox?

>  # Kernel
>  BR2_LINUX_KERNEL=y
> -BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.9.1"

For the sake of reproducibility you should set this to the version you tested, 
say, 4.8.6. The same goes for other patches in this series.

> -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
> -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/atmel/at91sam9260ek/linux-3.9.config"

You can now drop this file.

> +BR2_LINUX_KERNEL_DEFCONFIG="at91_dt"
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91sam9260ek"

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply

* RE: [PATCH] scsi_devinfo: remove synchronous ALUA for NETAPP/RDAC devices
From: George, Martin @ 2016-11-09  7:38 UTC (permalink / raw)
  To: Hannes Reinecke, Xose Vazquez Perez
  Cc: Stankey, Robert, Schremmer, Steven, Stewart, Sean,
	Christophe Varoqui, James E . J . Bottomley, Martin K . Petersen,
	SCSI ML, device-mapper development
In-Reply-To: <e6686f70-5de7-2618-0ba7-5a7b98eba068@suse.de>

As discussed with Hannes, this is not required for ONTAP's LUN C-Mode as well. So the ALUA blacklisting may be removed here as well, and not just for NetApp RDAC.

-Martin

-----Original Message-----
From: Hannes Reinecke [mailto:hare@suse.de] 
Sent: Wednesday, November 9, 2016 12:20 PM
To: Xose Vazquez Perez <xose.vazquez@gmail.com>
Cc: George, Martin <Martin.George@netapp.com>; Stankey, Robert <Robert.Stankey@netapp.com>; Schremmer, Steven <Steve.Schremmer@netapp.com>; Stewart, Sean <Sean.Stewart@netapp.com>; Christophe Varoqui <christophe.varoqui@opensvc.com>; James E . J . Bottomley <jejb@linux.vnet.ibm.com>; Martin K . Petersen <martin.petersen@oracle.com>; SCSI ML <linux-scsi@vger.kernel.org>; device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH] scsi_devinfo: remove synchronous ALUA for NETAPP/RDAC devices

On 11/08/2016 08:32 PM, Xose Vazquez Perez wrote:
> NetApp did confirm this is only required for ONTAP(LUN C-Mode).
>
> Cc: Martin George <Martin.George@netapp.com>
> Cc: Robert Stankey <Robert.Stankey@netapp.com>
> Cc: Steven Schremmer <Steven.Schremmer@netapp.com>
> Cc: Sean Stewart <Sean.Stewart@netapp.com>
> Cc: Hannes Reinecke <hare@suse.de>
> Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
> Cc: James E.J. Bottomley <jejb@linux.vnet.ibm.com>
> Cc: Martin K. Petersen <martin.petersen@oracle.com>
> Cc: SCSI ML <linux-scsi@vger.kernel.org>
> Cc: device-mapper development <dm-devel@redhat.com>
> Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
> ---
>  drivers/scsi/scsi_devinfo.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c 
> index 2464569..1fb7964 100644
> --- a/drivers/scsi/scsi_devinfo.c
> +++ b/drivers/scsi/scsi_devinfo.c
> @@ -221,7 +221,6 @@ static struct {
>  	{"NEC", "PD-1 ODX654P", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
>  	{"NEC", "iStorage", NULL, BLIST_REPORTLUN2},
>  	{"NETAPP", "LUN C-Mode", NULL, BLIST_SYNC_ALUA},
> -	{"NETAPP", "INF-01-00", NULL, BLIST_SYNC_ALUA},
>  	{"NRC", "MBR-7", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
>  	{"NRC", "MBR-7.4", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
>  	{"PIONEER", "CD-ROM DRM-600", NULL, BLIST_FORCELUN | 
> BLIST_SINGLELUN},
>

Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)

^ permalink raw reply

* [PATCH 1/3] tuntap: rx batching
From: Jason Wang @ 2016-11-09  7:38 UTC (permalink / raw)
  To: mst, netdev, linux-kernel; +Cc: Jason Wang

Backlog were used for tuntap rx, but it can only process 1 packet at
one time since it was scheduled during sendmsg() synchronously in
process context. This lead bad cache utilization so this patch tries
to do some batching before call rx NAPI. This is done through:

- accept MSG_MORE as a hint from sendmsg() caller, if it was set,
  batch the packet temporarily in a linked list and submit them all
  once MSG_MORE were cleared.
- implement a tuntap specific NAPI handler for processing this kind of
  possible batching. (This could be done by extending backlog to
  support skb like, but using a tun specific one looks cleaner and
  easier for future extension).

Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 drivers/net/tun.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 65 insertions(+), 6 deletions(-)

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 1588469..d40583b 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -74,6 +74,7 @@
 #include <linux/skb_array.h>
 
 #include <asm/uaccess.h>
+#include <linux/interrupt.h>
 
 /* Uncomment to enable debugging */
 /* #define TUN_DEBUG 1 */
@@ -169,6 +170,8 @@ struct tun_file {
 	struct list_head next;
 	struct tun_struct *detached;
 	struct skb_array tx_array;
+	struct napi_struct napi;
+	struct sk_buff_head process_queue;
 };
 
 struct tun_flow_entry {
@@ -522,6 +525,8 @@ static void tun_queue_purge(struct tun_file *tfile)
 	while ((skb = skb_array_consume(&tfile->tx_array)) != NULL)
 		kfree_skb(skb);
 
+	skb_queue_purge(&tfile->sk.sk_write_queue);
+	skb_queue_purge(&tfile->process_queue);
 	skb_queue_purge(&tfile->sk.sk_error_queue);
 }
 
@@ -532,6 +537,11 @@ static void __tun_detach(struct tun_file *tfile, bool clean)
 
 	tun = rtnl_dereference(tfile->tun);
 
+	if (tun && clean) {
+		napi_disable(&tfile->napi);
+		netif_napi_del(&tfile->napi);
+	}
+
 	if (tun && !tfile->detached) {
 		u16 index = tfile->queue_index;
 		BUG_ON(index >= tun->numqueues);
@@ -587,6 +597,7 @@ static void tun_detach_all(struct net_device *dev)
 
 	for (i = 0; i < n; i++) {
 		tfile = rtnl_dereference(tun->tfiles[i]);
+		napi_disable(&tfile->napi);
 		BUG_ON(!tfile);
 		tfile->socket.sk->sk_shutdown = RCV_SHUTDOWN;
 		tfile->socket.sk->sk_data_ready(tfile->socket.sk);
@@ -603,6 +614,7 @@ static void tun_detach_all(struct net_device *dev)
 	synchronize_net();
 	for (i = 0; i < n; i++) {
 		tfile = rtnl_dereference(tun->tfiles[i]);
+		netif_napi_del(&tfile->napi);
 		/* Drop read queue */
 		tun_queue_purge(tfile);
 		sock_put(&tfile->sk);
@@ -618,6 +630,41 @@ static void tun_detach_all(struct net_device *dev)
 		module_put(THIS_MODULE);
 }
 
+static int tun_poll(struct napi_struct *napi, int budget)
+{
+	struct tun_file *tfile = container_of(napi, struct tun_file, napi);
+	struct sk_buff_head *input_queue =
+	       &tfile->socket.sk->sk_write_queue;
+	struct sk_buff *skb;
+	unsigned int received = 0;
+
+	while (1) {
+		while ((skb = __skb_dequeue(&tfile->process_queue))) {
+			netif_receive_skb(skb);
+			if (++received >= budget)
+				return received;
+		}
+
+		spin_lock(&input_queue->lock);
+		if (skb_queue_empty(input_queue)) {
+			spin_unlock(&input_queue->lock);
+			break;
+		}
+		skb_queue_splice_tail_init(input_queue, &tfile->process_queue);
+		spin_unlock(&input_queue->lock);
+	}
+
+	if (received < budget) {
+		napi_complete(napi);
+		if (skb_peek(&tfile->socket.sk->sk_write_queue) &&
+		    unlikely(napi_schedule_prep(napi))) {
+			__napi_schedule(napi);
+		}
+	}
+
+	return received;
+}
+
 static int tun_attach(struct tun_struct *tun, struct file *file, bool skip_filter)
 {
 	struct tun_file *tfile = file->private_data;
@@ -666,9 +713,11 @@ static int tun_attach(struct tun_struct *tun, struct file *file, bool skip_filte
 
 	if (tfile->detached)
 		tun_enable_queue(tfile);
-	else
+	else {
 		sock_hold(&tfile->sk);
-
+		netif_napi_add(tun->dev, &tfile->napi, tun_poll, 64);
+		napi_enable(&tfile->napi);
+	}
 	tun_set_real_num_queues(tun);
 
 	/* device is allowed to go away first, so no need to hold extra
@@ -1150,7 +1199,7 @@ static struct sk_buff *tun_alloc_skb(struct tun_file *tfile,
 /* Get packet from user space buffer */
 static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
 			    void *msg_control, struct iov_iter *from,
-			    int noblock)
+			    int noblock, bool more)
 {
 	struct tun_pi pi = { 0, cpu_to_be16(ETH_P_IP) };
 	struct sk_buff *skb;
@@ -1296,7 +1345,13 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
 	skb_probe_transport_header(skb, 0);
 
 	rxhash = skb_get_hash(skb);
-	netif_rx_ni(skb);
+	skb_queue_tail(&tfile->socket.sk->sk_write_queue, skb);
+
+	if (!more) {
+		local_bh_disable();
+		napi_schedule(&tfile->napi);
+		local_bh_enable();
+	}
 
 	stats = get_cpu_ptr(tun->pcpu_stats);
 	u64_stats_update_begin(&stats->syncp);
@@ -1319,7 +1374,8 @@ static ssize_t tun_chr_write_iter(struct kiocb *iocb, struct iov_iter *from)
 	if (!tun)
 		return -EBADFD;
 
-	result = tun_get_user(tun, tfile, NULL, from, file->f_flags & O_NONBLOCK);
+	result = tun_get_user(tun, tfile, NULL, from,
+			      file->f_flags & O_NONBLOCK, false);
 
 	tun_put(tun);
 	return result;
@@ -1579,7 +1635,8 @@ static int tun_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len)
 		return -EBADFD;
 
 	ret = tun_get_user(tun, tfile, m->msg_control, &m->msg_iter,
-			   m->msg_flags & MSG_DONTWAIT);
+			   m->msg_flags & MSG_DONTWAIT,
+			   m->msg_flags & MSG_MORE);
 	tun_put(tun);
 	return ret;
 }
@@ -2336,6 +2393,8 @@ static int tun_chr_open(struct inode *inode, struct file * file)
 	file->private_data = tfile;
 	INIT_LIST_HEAD(&tfile->next);
 
+	skb_queue_head_init(&tfile->process_queue);
+
 	sock_set_flag(&tfile->sk, SOCK_ZEROCOPY);
 
 	return 0;
-- 
2.7.4

^ permalink raw reply related

* [PATCH 2/3] vhost: better detection of available buffers
From: Jason Wang @ 2016-11-09  7:38 UTC (permalink / raw)
  To: mst, netdev, linux-kernel; +Cc: Jason Wang
In-Reply-To: <1478677113-13126-1-git-send-email-jasowang@redhat.com>

We should use vq->last_avail_idx instead of vq->avail_idx in the
checking of vhost_vq_avail_empty() since latter is the cached avail
index from guest but we want to know if there's pending available
buffers in the virtqueue.

Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 drivers/vhost/vhost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index c6f2d89..fdf4cdf 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -2230,7 +2230,7 @@ bool vhost_vq_avail_empty(struct vhost_dev *dev, struct vhost_virtqueue *vq)
 	if (r)
 		return false;
 
-	return vhost16_to_cpu(vq, avail_idx) == vq->avail_idx;
+	return vhost16_to_cpu(vq, avail_idx) == vq->last_avail_idx;
 }
 EXPORT_SYMBOL_GPL(vhost_vq_avail_empty);
 
-- 
2.7.4

^ permalink raw reply related

* [Buildroot] [PATCH] package/e2fsprogs: backport build fix for rhel5 due to missing magic
From: Max Filippov @ 2016-11-09  7:39 UTC (permalink / raw)
  To: buildroot

RHEL 5.x does have magic.h, but it does not define all expected symbols. In
particular, the NO_CHECK symbols were only added in file 4.20 and RHEL 5.x
is using 4.17.

Add substitute defines to allow continued usage of magic but without the
requested exclude checks.

Backported from: b003b2e6f9e54e7b2bde15828b97f5dc285b915e

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 ...fix-compilation-on-RHEL-5.x-due-to-missin.patch | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 package/e2fsprogs/0003-libsupport-fix-compilation-on-RHEL-5.x-due-to-missin.patch

diff --git a/package/e2fsprogs/0003-libsupport-fix-compilation-on-RHEL-5.x-due-to-missin.patch b/package/e2fsprogs/0003-libsupport-fix-compilation-on-RHEL-5.x-due-to-missin.patch
new file mode 100644
index 0000000..3569a3a
--- /dev/null
+++ b/package/e2fsprogs/0003-libsupport-fix-compilation-on-RHEL-5.x-due-to-missin.patch
@@ -0,0 +1,45 @@
+From b003b2e6f9e54e7b2bde15828b97f5dc285b915e Mon Sep 17 00:00:00 2001
+From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
+Date: Tue, 25 Oct 2016 13:22:39 -0400
+Subject: [PATCH] libsupport: fix compilation on RHEL 5.x due to missing magic
+ define
+
+RHEL 5.x does have magic.h, but it does not define all expected symbols. In
+particular, the NO_CHECK symbols were only added in file 4.20 and RHEL 5.x
+is using 4.17.
+
+Add substitute defines to allow continued usage of magic but without the
+requested exclude checks.
+
+Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+---
+ lib/support/plausible.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/lib/support/plausible.c b/lib/support/plausible.c
+index 6f0c4bc..0636061 100644
+--- a/lib/support/plausible.c
++++ b/lib/support/plausible.c
+@@ -43,6 +43,17 @@ static const char *(*dl_magic_file)(magic_t, const char *);
+ static int (*dl_magic_load)(magic_t, const char *);
+ static void (*dl_magic_close)(magic_t);
+ 
++/*
++ * NO_CHECK functionality was only added in file 4.20.
++ * Older systems like RHEL 5.x still have file 4.17
++ */
++#ifndef MAGIC_NO_CHECK_COMPRESS
++#define MAGIC_NO_CHECK_COMPRESS 0x0001000
++#endif
++#ifndef MAGIC_NO_CHECK_ELF
++#define MAGIC_NO_CHECK_ELF 0x0010000
++#endif
++
+ #ifdef HAVE_DLOPEN
+ #include <dlfcn.h>
+ 
+-- 
+2.1.4
+
-- 
2.1.4

^ permalink raw reply related

* [PATCH 3/3] vhost_net: tx support batching
From: Jason Wang @ 2016-11-09  7:38 UTC (permalink / raw)
  To: mst, netdev, linux-kernel; +Cc: Jason Wang
In-Reply-To: <1478677113-13126-1-git-send-email-jasowang@redhat.com>

This patch tries to utilize tuntap rx batching by peeking the tx
virtqueue during transmission, if there's more available buffers in
the virtqueue, set MSG_MORE flag for a hint for tuntap to batch the
packets. The maximum number of batched tx packets were specified
through a module parameter: tx_bached.

When use 16 as tx_batched:

Pktgen test shows 16% on tx pps in guest.
Netperf test does not show obvious regression.

For safety, 1 were used as the default value for tx_batched.

Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 drivers/vhost/net.c   | 15 ++++++++++++++-
 drivers/vhost/vhost.c |  1 +
 drivers/vhost/vhost.h |  1 +
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 5dc128a..51c378e 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -35,6 +35,10 @@ module_param(experimental_zcopytx, int, 0444);
 MODULE_PARM_DESC(experimental_zcopytx, "Enable Zero Copy TX;"
 		                       " 1 -Enable; 0 - Disable");
 
+static int tx_batched = 1;
+module_param(tx_batched, int, 0444);
+MODULE_PARM_DESC(tx_batched, "Number of patches batched in TX");
+
 /* Max number of bytes transferred before requeueing the job.
  * Using this limit prevents one virtqueue from starving others. */
 #define VHOST_NET_WEIGHT 0x80000
@@ -454,6 +458,16 @@ static void handle_tx(struct vhost_net *net)
 			msg.msg_control = NULL;
 			ubufs = NULL;
 		}
+		total_len += len;
+		if (vq->delayed < tx_batched &&
+		    total_len < VHOST_NET_WEIGHT &&
+		    !vhost_vq_avail_empty(&net->dev, vq)) {
+			vq->delayed++;
+			msg.msg_flags |= MSG_MORE;
+		} else {
+			vq->delayed = 0;
+			msg.msg_flags &= ~MSG_MORE;
+		}
 		/* TODO: Check specific error and bomb out unless ENOBUFS? */
 		err = sock->ops->sendmsg(sock, &msg, len);
 		if (unlikely(err < 0)) {
@@ -472,7 +486,6 @@ static void handle_tx(struct vhost_net *net)
 			vhost_add_used_and_signal(&net->dev, vq, head, 0);
 		else
 			vhost_zerocopy_signal_used(net, vq);
-		total_len += len;
 		vhost_net_tx_packet(net);
 		if (unlikely(total_len >= VHOST_NET_WEIGHT)) {
 			vhost_poll_queue(&vq->poll);
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index fdf4cdf..bc362c7 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -311,6 +311,7 @@ static void vhost_vq_reset(struct vhost_dev *dev,
 	vq->busyloop_timeout = 0;
 	vq->umem = NULL;
 	vq->iotlb = NULL;
+	vq->delayed = 0;
 }
 
 static int vhost_worker(void *data)
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index 78f3c5f..9f81a94 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -141,6 +141,7 @@ struct vhost_virtqueue {
 	bool user_be;
 #endif
 	u32 busyloop_timeout;
+	int delayed;
 };
 
 struct vhost_msg_node {
-- 
2.7.4

^ permalink raw reply related


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.