Re: [PATCH 0/4] bug fixes in ntb_hw_amd and ntb_perf

2019-02-15 Thread Allen Hubbe
r XLAT registers > NTB: ntb_perf: Clear stale values in doorbell and command SPAD > register > NTB: ntb_hw_amd: set peer limit register This series, Acked-by: Allen Hubbe > > drivers/ntb/hw/amd/ntb_hw_amd.c | 8 > drivers/ntb/test/ntb_perf.c | 14 +++-

Re: [PATCH] ntb: ntb_transport: Mark expected switch fall-throughs

2018-10-05 Thread Allen Hubbe
("Missing break in switch") > Signed-off-by: Gustavo A. R. Silva Acked-by: Allen Hubbe > --- > drivers/ntb/ntb_transport.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c > index 9398959..c643b9c 10

Re: [PATCH v2 4/8] NTB: ntb_pingpong: Choose doorbells based on port number

2018-07-24 Thread Allen Hubbe
and touch all the drivers again for this. It can be addressed when there is renued interest in making things work more than one peer. This patch, and the others in this series: Acked-by: Allen Hubbe

Re: [PATCH v2 4/8] NTB: ntb_pingpong: Choose doorbells based on port number

2018-07-24 Thread Allen Hubbe
On Mon, Jul 23, 2018 at 12:08 PM Logan Gunthorpe wrote: > I don't think you'll ever have a case where two peers have the same > index, as the index is really an abstract concept the hardware doesn't > really know about. That is the point of index, that there should never be two peers with the sam

Re: [PATCH v2 4/8] NTB: ntb_pingpong: Choose doorbells based on port number

2018-07-23 Thread Allen Hubbe
On Fri, Jul 20, 2018 at 2:00 PM Logan Gunthorpe wrote: > > This commit fixes pingpong support for existing drivers that do not > implement ntb_default_port_number() and ntb_default_peer_port_number(). > This is required for hardware (like the crosslink topology of > switchtec) which cannot assign

Re: [PATCH 0/8] Fix breakage caused by the NTB multi-port patchset

2018-06-09 Thread Allen Hubbe
n't require one more memory window than number of peers > NTB: perf: Fix support for hardware that doesn't have port numbers > NTB: perf: Fix race condition when run with ntb_test > NTB: ntb_test: Fix bug when counting remote files Thanks Logan. Series: Acked-by: Allen Hubb

[PATCH] MAINTAINERS: NTB: Update contact info

2017-12-12 Thread Allen Hubbe
I am no longer employed by Dell EMC. For the purposes of NTB driver development and maintenance, please contact me via my personal email. Signed-off-by: Allen Hubbe Signed-off-by: Allen Hubbe --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b

RE: [PATCH 2/2] ntb_hw_switchtec: Check for alignment of the buffer in mw_set_trans()

2017-12-11 Thread Allen Hubbe
From: Logan Gunthorpe > On 11/12/17 12:17 PM, Allen Hubbe wrote: > >> mw_get_align doesn't communicate the fact that the buffer has to be > >> aligned by its size. > > > > Is that not the purpose of the addr_align out parameter of > > ntb_mw_get_a

RE: [PATCH 2/2] ntb_hw_switchtec: Check for alignment of the buffer in mw_set_trans()

2017-12-11 Thread Allen Hubbe
From: Logan Gunthorpe > mw_get_align doesn't communicate the fact that the buffer has to be > aligned by its size. Is that not the purpose of the addr_align out parameter of ntb_mw_get_align()? > It may also be that all hardware does not have this > restriction (ie. if the hardware adds to the b

RE: [PATCH 2/2] ntb_hw_switchtec: Check for alignment of the buffer in mw_set_trans()

2017-12-11 Thread Allen Hubbe
From: Logan Gunthorpe > With Switchtec hardware, the buffer used for a memory window must be > aligned to its size (the hardware only replaces the lower bits). In > certain circumstances dma_alloc_coherent() will not provide a buffer > that adheres to this requirement like when using the CMA and >

RE: [PATCH 1/2] ntb_transport: Fix bug with max_mw_size parameter

2017-12-11 Thread Allen Hubbe
tx_size in > ntb_transport_init_queue(). > > Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers") > Signed-off-by: Logan Gunthorpe > Cc: Jon Mason > Cc: Dave Jiang > Cc: Allen Hubbe Acked-by: Allen Hubbe > --- > drivers/ntb/ntb_transport

RE: [PATCH v2 00/15] NTB: Add full multi-port API support to the test drivers

2017-12-04 Thread Allen Hubbe
presentation of the patch set, nothing looks obviously wrong. You should probably also seek Dave's ack on at least ntb_perf. Acked-by: Allen Hubbe > Serge Semin (15): > NTB: Rename NTB messaging API methods > NTB: Set dma mask and dma coherent mask to NTB devices > NTB: F

RE: [PATCH v3 14/16] switchtec_ntb: implement scratchpad registers

2017-08-02 Thread Allen Hubbe
From: Logan Gunthorpe > On 01/08/17 01:10 PM, Jon Mason wrote: > > It would probaly be better if I remarked about the SPADs in the actual > > patch about the SPADS :) > > > > The whole point of using the SPADs in the NTB driver was to workaround > > the problems establishing a connection between th

RE: [PATCH v3 00/16] Switchtec NTB Support

2017-07-26 Thread Allen Hubbe
From: Logan Gunthorpe > Changes since v2: > > - Reordered the ntb_test link patch per Allen > - Removed an extra call to switchtec_ntb_init_mw > - Fixed a typo in the switchtec.txt documentation. Patches 5..16 (also 5 [was 6], and 14, objections notwithstanding): Acked-

RE: [PATCH v2 00/16] Switchtec NTB Support

2017-07-18 Thread Allen Hubbe
request_module() call such that the NTB module is automatically > loaded when appropriate hardware exists. Patches 5..16: Acked-by: Allen Hubbe Should the order of 6 and 7 be swapped? While I still have some objections to this series, we have already been over them, and I won't let t

RE: [PATCH v4 4/5] ntb: ntb_hw_intel: use io-64-nonatomic instead of in-driver hacks

2017-07-18 Thread Allen Hubbe
From: Logan Gunthorpe > Now that ioread64 and iowrite64 are available in io-64-nonatomic, > we can remove the hack at the top of ntb_hw_intel.c and replace it > with an include. > > Signed-off-by: Logan Gunthorpe > Cc: Jon Mason > Cc: Allen Hubbe > Acked-by: Dave Jiang

RE: [PATCH 06/16] ntb: add check and comment for link up to mw_count and mw_get_align

2017-06-29 Thread Allen Hubbe
Let me try that again... From: Hubbe, Allen > From: Logan Gunthorpe > > On 6/29/2017 2:13 PM, Allen Hubbe wrote: > > > Unfortunately, it is to work around hardware errata. That is not so > > > trivial to fix. > > > > Can you describe more what the

RE: [PATCH 06/16] ntb: add check and comment for link up to mw_count and mw_get_align

2017-06-29 Thread Allen Hubbe
From: Logan Gunthorpe > On 6/29/2017 12:11 PM, Allen Hubbe wrote: > > Nak. This breaks a work around for stability issues on some hardware. I > > am ok with changing the > comment to say, this is only supported when called after link up. I would > still like to allow th

RE: [PATCH 06/16] ntb: add check and comment for link up to mw_count and mw_get_align

2017-06-29 Thread Allen Hubbe
From: Logan Gunthorpe > This patch adds a comment and a check to the ntb_mw_get_align and > ntb_mw_count functions so that they always fail if the function is > called before the link is up. > > This is to prevent accidental mis-use in clients that are testing > on hardware that this doesn't matte

RE: [PATCH 05/16] ntb: ensure ntb_mw_get_align is only called when the link is up

2017-06-29 Thread Allen Hubbe
It also tweaks > ntb_tool so that peer_mw_trans will print zero if it is run before > the link goes up. > > Signed-off-by: Logan Gunthorpe Acked-by: Allen Hubbe > --- > drivers/ntb/ntb_transport.c | 20 ++-- > drivers/ntb/test/ntb_perf.c | 18 +--

RE: [PATCH 12/16] switchtec_ntb: add link management

2017-06-29 Thread Allen Hubbe
From: Logan Gunthorpe > switchtec_ntb checks for a link by looking at the shared memory > window. If the magic number is correct and the otherside indicates > their link is enabled then we take the link to be up. > > Whenever we change our local link status we send a msg to the > otherside to chec

RE: [PATCH 14/16] switchtec_ntb: implement scratchpad registers

2017-06-29 Thread Allen Hubbe
From: Logan Gunthorpe > Seeing there is no dedicated hardware for this, we simply add > these as entries in the shared memory window. Thus, we could support > any number of them but 128 seems like enough, for now. Scratchpads are not natively supported by this hardware, - but the hardware does na

RE: [PATCH] ntb: use correct mw_count function in ntb_tool and ntb_transport

2017-06-27 Thread Allen Hubbe
his will matter for any future driver with asymetric memory window > counts. > > Signed-off-by: Logan Gunthorpe > Cc: Jon Mason > Cc: Dave Jiang > Cc: Allen Hubbe > Cc: Serge Semin Acked-by: Allen Hubbe > --- > > Hi Guys, > > I caught this issue while finis

RE: New NTB API Issue

2017-06-23 Thread Allen Hubbe
From: Logan Gunthorpe > But any translation can be > programmed by any peer. That doesn't seem safe. Even though it can be done as you say, would it not be better to have each specific translation under the control of exactly one driver? If drivers can reach across and set the translation of a

RE: New NTB API Issue

2017-06-23 Thread Allen Hubbe
From: Logan Gunthorpe > Hey, > > Thanks Serge for the detailed explanation. This is pretty much exactly > as I had thought it should be interpreted. My only problem remains that > my hardware can't provide ntb_mw_get_align until the port it is asking > about has configured itself. The easiest way

RE: New NTB API Issue

2017-06-23 Thread Allen Hubbe
From: Logan Gunthorpe > On 23/06/17 07:18 AM, Allen Hubbe wrote: > > By "remote" do you mean the source or destination of a write? > > Look at how these calls are used in ntb_transport and ntb_perf: > > They both call ntb_peer_mw_get_addr to get the size of the BA

RE: New NTB API Issue

2017-06-23 Thread Allen Hubbe
From: Logan Gunthorpe > On 6/22/2017 4:42 PM, Allen Hubbe wrote: > > From: Logan Gunthorpe > >> Any thoughts on changing the semantics of mw_get_align so it must be > >> called with the link up? > > > > The intention of these is that these calls return inf

RE: New NTB API Issue

2017-06-22 Thread Allen Hubbe
From: Logan Gunthorpe > Any thoughts on changing the semantics of mw_get_align so it must be > called with the link up? The intention of these is that these calls return information from the local port. The calls themselves don't reach across the link to the peer, but the information returned f

RE: New NTB API Issue

2017-06-22 Thread Allen Hubbe
From: Logan Gunthorpe > On 6/22/2017 12:32 PM, Allen Hubbe wrote: > > From: Logan Gunthorpe > >> 2) The changes to the Intel and AMD driver for mw_get_align sets > >> *max_size to the local pci resource size. (Thus making the assumption > >> that the local is

RE: New NTB API Issue

2017-06-22 Thread Allen Hubbe
From: Logan Gunthorpe > Hey Guys, > > I've run into some subtle issues with the new API: > > It has to do with splitting mw_get_range into mw_get_align and > peer_mw_get_addr. > > The original mw_get_range returned the size of the /local/ memory > window's size, address and alignment requirement

RE: [RFC PATCH 00/13] Switchtec NTB Support

2017-06-16 Thread Allen Hubbe
From: Logan Gunthorpe > On 16/06/17 09:34 AM, Allen Hubbe wrote: > > In code review, I really only have found minor nits. Overall, the driver > > looks good. > > Great, thanks for such a quick review! > > > In switchtec_ntb_part_op, there is a delay of up to 50s (

RE: [RFC PATCH 00/13] Switchtec NTB Support

2017-06-16 Thread Allen Hubbe
From: Logan Gunthorpe > On 16/06/17 07:53 AM, Allen Hubbe wrote: > > See what is staged in https://github.com/jonmason/ntb.git ntb-next, with > > the addition of multi-peer > support by Serge. It would be good at this stage to understand whether the > api changes there wou

RE: [RFC PATCH 00/13] Switchtec NTB Support

2017-06-16 Thread Allen Hubbe
From: Logan Gunthorpe > Hi, > > This patchset implements Non-Transparent Bridge (NTB) support for the > Microsemi Switchtec series of switches. We're looking for some > review from the community at this point but hope to get it upstreamed > for v4.14. > > Switchtec NTB support is configured over

RE: [BUG] ntb: Sleep in interrupt handling

2017-06-01 Thread Allen Hubbe
From: Jia-Ju Bai > According to ntb_transport.c, the driver may sleep in interrupt handling. > The function call path is: > ntb_transport_rxc_db (tasklet_init indicates it handles interrupt) >ntb_process_rxc > ntb_async_rx >ntb_async_rx_submit > schedule_timeout --> may s

RE: [PATCH v3] NTB: Add IDT 89HPESxNTx PCIe-switches support

2017-02-24 Thread Allen Hubbe
From: Serge Semin > IDT 89HPESxNTx device series is PCIe-switches, which support ... > Signed-off-by: Serge Semin Acked-by: Allen Hubbe With minor comments. Please include my Ack if you send v4. > +static u32 idt_nt_read(struct idt_ntb_dev *ndev, const unsigne

RE: [PATCH v2] NTB: Add IDT 89HPESxNTx PCIe-switches support

2017-02-21 Thread Allen Hubbe
From: Serge Semin > +/* > + * idt_nt_write() - PCI configuration space registers write method > + * @ndev:IDT NTB hardware driver descriptor > + * @reg: Register to write data to > + * @data:Value to write to the register > + * > + * WARNING! IDT PCIe-switch registers are all Little end

RE: [PATCH] NTB: Add IDT 89HPESxNTx PCIe-switches support

2017-02-02 Thread Allen Hubbe
From: Serge Semin > +static void idt_nt_write(struct idt_ntb_dev *ndev, > + const unsigned int reg, const u32 data) > +{ > + /* > + * It's obvious bug to request a register exceeding the maximum possible > + * value as well as to have it unaligned. > + */ > +

RE: [PATCH v3 9/9] NTB: Add ntb.h comments

2016-12-13 Thread Allen Hubbe
From: Serge Semin > Signed-off-by: Serge Semin Acked-by: Allen Hubbe > --- > include/linux/ntb.h | 19 --- > 1 file changed, 12 insertions(+), 7 deletions(-) > > diff --git a/include/linux/ntb.h b/include/linux/ntb.h > index 6d46179..dab0a1b 100644 > -

RE: [PATCH v3 9/9] NTB: Add ntb.h comments

2016-12-13 Thread Allen Hubbe
From: Serge Semin > Signed-off-by: Serge Semin > --- > include/linux/ntb.h | 19 --- > 1 file changed, 12 insertions(+), 7 deletions(-) > > diff --git a/include/linux/ntb.h b/include/linux/ntb.h > index 6d46179..dab0a1b 100644 > --- a/include/linux/ntb.h > +++ b/include/linux/ntb

RE: [PATCH v3 5/9] NTB: Alter Scratchpads API to support multi-ports devices

2016-12-13 Thread Allen Hubbe
g API methods are now made optional. > > Signed-off-by: Serge Semin Acked-by: Allen Hubbe > --- > drivers/ntb/hw/amd/ntb_hw_amd.c | 14 +++ > drivers/ntb/hw/intel/ntb_hw_intel.c | 14 +++ > drivers/ntb/ntb_transport.c | 17 - > drive

RE: [PATCH v3 4/9] NTB: Alter MW API to support multi-ports devices

2016-12-13 Thread Allen Hubbe
_mw_clear_trans(pidx, widx); - clear the translation address of an > outbound memory window > > Signed-off-by: Serge Semin Acked-by: Allen Hubbe > --- > drivers/ntb/hw/amd/ntb_hw_amd.c | 68 +--- > drivers/ntb/hw/intel/ntb_hw_intel.c | 90 > d

RE: [PATCH v3 1/9] NTB: Make link-state API being declared first

2016-12-13 Thread Allen Hubbe
From: Serge Semin > Since link operations are usually performed before memory window access > operations, it's logically better to declare link-related API before any > of MW/Doorbell/Scratchpad methods. > > Signed-off-by: Serge Semin Acked-by: Allen Hubbe > --- >

RE: [PATCH v3 2/9] NTB: Add indexed ports NTB API

2016-12-13 Thread Allen Hubbe
#x27;t need to implement it. > > Signed-off-by: Serge Semin Acked-by: Allen Hubbe > --- > drivers/ntb/ntb.c | 54 ++ > drivers/ntb/ntb_transport.c | 6 ++ > drivers/ntb/test/ntb_perf.c | 4 ++ > drivers/ntb/test/ntb_pingpong.c | 6 ++ >

RE: [PATCH v2 9/9] NTB: Add ntb.h comments

2016-12-12 Thread Allen Hubbe
From: Serge Semin > > Signed-off-by: Serge Semin > > --- > include/linux/ntb.h | 17 +++-- > 1 file changed, 11 insertions(+), 6 deletions(-) > > diff --git a/include/linux/ntb.h b/include/linux/ntb.h > index fe0437c..c5a369c 100644 > --- a/include/linux/ntb.h > +++ b/include/linux

RE: [PATCH v2 7/9] NTB: Add new Memory Windows API documentation

2016-12-12 Thread Allen Hubbe
From: Serge Semin > Since the new API slightly changes the way a typical NTB client driver > works, the documentation file needs to be appropriately updated. > > Signed-off-by: Serge Semin Acked-by: Allen Hubbe > > --- > Docum

RE: [PATCH v2 8/9] NTB: Add PCIe Gen4 link speed

2016-12-12 Thread Allen Hubbe
From: Serge Semin > > Signed-off-by: Serge Semin Acked-by: Allen Hubbe > > --- > include/linux/ntb.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/linux/ntb.h b/include/linux/ntb.h > index 90746df..fe0437c 100644 > --- a/include/linux/ntb

RE: [PATCH v2 6/9] NTB: Add Messaging NTB API

2016-12-12 Thread Allen Hubbe
age registers, so s/hadrware/hardware/ > this API is made optional. > > Signed-off-by: Serge Semin Acked-by: Allen Hubbe > > --- > drivers/ntb/ntb.c | 13 > include/linux/ntb.h | 205 > > 2 files chan

RE: [PATCH v2 5/9] NTB: Alter Scratchpads API to support multi-ports devices

2016-12-12 Thread Allen Hubbe
From: Serge Semin > Even though there is no any real NTB hardware, which would have both more > than two ports and Scratchpad registers, it is logically correct to have > Scratchpad API accepting a peer port index as well. Intel/AMD drivers utilize > Primary and Secondary topology to split Scratch

RE: [PATCH v2 4/9] NTB: Alter MW API to support multi-ports devices

2016-12-12 Thread Allen Hubbe
From: Serge Semin > Multi-port NTB devices permit to share a memory between all accessible peers. > Memory Windows API is altered to correspondingly initialize and map memory > windows for such devices: > ntb_mw_count(pidx); - number of inbound memory windows, which can be > allocated > for share

RE: [PATCH v2 1/9] NTB: Make link-state API being declared first

2016-12-12 Thread Allen Hubbe
From: Serge Semin > Since link operations are usually performed before memory window access > operations, it's logically better to declared link-related API before any > other methods. Additionally it's good practice for readability to declare > NTB device callback methods of hadrware drivers with

RE: [PATCH v2 3/9] NTB: Alter link-state API to support multi-port devices

2016-12-12 Thread Allen Hubbe
l device and possible peers. > > Signed-off-by: Serge Semin Acked-by: Allen Hubbe > > --- > drivers/ntb/hw/amd/ntb_hw_amd.c | 2 +- > drivers/ntb/hw/intel/ntb_hw_intel.c | 2 +- > include/linux/ntb.h | 31 --- > 3

RE: [PATCH v2 2/9] NTB: Add indexed ports NTB API

2016-12-12 Thread Allen Hubbe
From: Serge Semin > There are some NTB hardware, which can combine more than just two domains > over NTB. For instance, some IDT PCIe-switches can have NTB-functions > activated on more than two-ports. The different domains are distinguished > by ports they are connected to. So the new port-relate

RE: [PATCH 10/22] NTB Intel: Add port-related NTB API callback methods

2016-12-07 Thread Allen Hubbe
From: Serge Semin > This needs an actual commit message. > Signed-off-by: Serge Semin > > --- > drivers/ntb/hw/intel/ntb_hw_intel.c | 195 > +--- > drivers/ntb/hw/intel/ntb_hw_intel.h | 10 ++ > 2 files changed, 124 insertions(+), 81 deletions(-) > > diff --g

RE: [PATCH 02/22] NTB: Add peer indexed ports NTB API

2016-12-07 Thread Allen Hubbe
From: Allen Hubbe > From: Serge Semin > > Add new port-index NTB API. Additionally lets get rid of Primary and > > Secondary topologies, since port-number can be effectively used instead. > > Split into two patches please. > > I see no harm to the TOPO changes,

RE: [PATCH 02/22] NTB: Add peer indexed ports NTB API

2016-12-03 Thread Allen Hubbe
From: Serge Semin > Add new port-index NTB API. Additionally lets get rid of Primary and > Secondary topologies, since port-number can be effectively used instead. Split into two patches please. I see no harm to the TOPO changes, though I wonder if they are necessary. > Signed-off-by: Serge Semi

RE: [PATCH 06/22] NTB: Slightly alter link state NTB API

2016-12-03 Thread Allen Hubbe
From: Serge Semin > Some minor changes of link state NTB API. Particularly link_is_up() > method from now shall return a bitfield of link states for all accessible > port indexes. Looks good. I plan to ack. See comment on ntb_link_enable. > > Signed-off-by: Serge Semin > > --- > include/li

RE: [PATCH 03/22] NTB: Alter NTB API to support both inbound and outbound MW based interfaces

2016-12-03 Thread Allen Hubbe
From: Serge Semin > Alter NTB API to support inbound and outbound MW based interfaces. > Additionally I made it supporting multi-port devices as well. Useful > infographics is added right before MW API is declared. It shall help to > better understand how the new API really works and how it can be

RE: [PATCH 08/22] NTB: Add T-Platforms copyrights to NTB API

2016-12-03 Thread Allen Hubbe
> From: Serge Semin > > Signed-off-by: Serge Semin This patch has no comment, but instead... This can be squashed with your first commit of significant changes to each file. > > --- > drivers/ntb/ntb.c | 2 ++ > include/linux/ntb.h | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git

RE: [PATCH 04/22] NTB: Add messaging NTB API

2016-12-03 Thread Allen Hubbe
From: Serge Semin > IDT PCIe-switches have message registers to communicate with peer devices. > This patch adds new NTB API callback methods, which can be used to utilize > these registers functionality. > Please split: add msg api; make spads optional. See comments below on ntb_dev_ops_is_val

RE: [PATCH 07/22] NTB: Fix a few ntb.h issues

2016-12-03 Thread Allen Hubbe
From: Serge Semin > Fix some minor issues found in ntb.h file. > "Fix a few issues" is not a descriptive commit title or message. Please split: add NTB_SPEED_GEN4, ntb.h comments. Changes look good and I will ack. > Signed-off-by: Serge Semin > > --- > include/linux/ntb.h | 18

RE: [PATCH 01/22] NTB: Move link state API being first in sources

2016-12-03 Thread Allen Hubbe
From: Serge Semin > Since link operations are usually performed before memory window access > operations, it's logically better to declared link-related API before any > other methods. Additionally it's good practice for readability to declare > NTB device callback methods of hadrware drivers with

RE: [PATCH 05/22] NTB: Alter Scratchpads NTB API to support multi-ports interface

2016-12-03 Thread Allen Hubbe
From: Serge Semin > Even though there is no any real NTB hardware, which would have both more > than two ports and Scratchpad registers, it is logically correct to have > Scratchpad API accepting a peer port index as well. Intel/AMD drivers used > to utilize Primary and Secondary topology to split

RE: [PATCH v2 1/3] ntb: Add asynchronous devices support to NTB-bus interface

2016-08-19 Thread Allen Hubbe
From: Serge Semin > 3) IDT driver redevelopment will take a lot of time, since I don't have much > free time to > do it. It may be half of year or even more. > > From my side, such an improvement will significantly complicate the NTB > Kernel API. Since > you are the subsystem maintainer it's yo

RE: [PATCH v2 1/3] ntb: Add asynchronous devices support to NTB-bus interface

2016-08-08 Thread Allen Hubbe
asynchronous as well, although > they don't > support messaging so Scratchpads can be used to send a data to a peer. > Finally the > switches of the second group lack of ability to initialize BARs translated > base address of > peers due to the race condition I des

RE: [PATCH] NTB: ntb_hw_intel: Fix typo in module parameter descriptions

2016-08-08 Thread Allen Hubbe
From: Wei Yongjun > Fix typo in module parameter descriptions. > > Signed-off-by: Wei Yongjun Acked-by: Allen Hubbe > --- > drivers/ntb/hw/intel/ntb_hw_intel.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/ntb/hw/i

RE: [PATCH] ntb_pingpong: Fix db_init parameter description

2016-08-08 Thread Allen Hubbe
From: Wei Yongjun > Fix 'db_init' parameter description. > > Signed-off-by: Wei Yongjun Acked-by: Allen Hubbe > --- > drivers/ntb/test/ntb_pingpong.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/ntb/test/ntb_pingpong.c

RE: [PATCH v2 1/3] ntb: Add asynchronous devices support to NTB-bus interface

2016-08-05 Thread Allen Hubbe
From: Serge Semin > Currently supported AMD and Intel Non-transparent PCIe-bridges are synchronous > devices, so translated base address of memory windows can be direcly written > to peer registers. But there are some IDT PCIe-switches which implement > complex interfaces using Lookup Tables of tra

RE: [PATCH 0807/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Allen Hubbe
From: Baole Ni > diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c > b/drivers/ntb/hw/intel/ntb_hw_intel.c > index 40d04ef..7aa1faa 100644 > --- a/drivers/ntb/hw/intel/ntb_hw_intel.c > +++ b/drivers/ntb/hw/intel/ntb_hw_intel.c > @@ -92,56 +92,56 @@ static const struct file_operations > intel_ntb_d

Re: [PATCH] checkpatch: fix perl warning about unescaped brace

2016-07-29 Thread Allen Hubbe
On Fri, Jul 29, 2016 at 7:57 PM, Allen Hubbe wrote: > On Fri, Jul 29, 2016 at 7:06 PM, Joe Perches wrote: >> On Fri, 2016-07-29 at 18:27 -0400, Allen Hubbe wrote: >>> Perl warns: >>> >>> Unescaped left brace in regex is deprecated, passed through in r

Re: [PATCH] checkpatch: fix perl warning about unescaped brace

2016-07-29 Thread Allen Hubbe
l 29, 2016 at 7:06 PM, Joe Perches wrote: > On Fri, 2016-07-29 at 18:27 -0400, Allen Hubbe wrote: >> Perl warns: >> >> Unescaped left brace in regex is deprecated, passed through in regex >> >> This is explained under "Quantifiers" in perl doc: >&g

[PATCH] checkpatch: if no filenames then read stdin

2016-07-29 Thread Allen Hubbe
If no filenames are given, then read the patch from stdin. Signed-off-by: Allen Hubbe --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 90e1edc8dd42..b0659f1e9b09 100755 --- a/scripts

[PATCH] checkpatch: fix perl warning about unescaped brace

2016-07-29 Thread Allen Hubbe
nclosing them within square brackets ("[{]" ). This change will allow for future syntax extensions (like making the lower bound of a quantifier optional), and better error checking of quantifiers.) Signed-off-by: Allen Hubbe --- scripts/checkpatch.pl | 10 +- 1 file changed

Re: [PATCH] checkpatch: check signoff when reading stdin

2016-07-29 Thread Allen Hubbe
On Wed, Jul 27, 2016 at 8:41 PM, Joe Perches wrote: > I think this is not a great idea because the most likely > use case is piping git diff output ala: > > $ git diff | ./scripts/checkpatch.pl - Thanks for the review. Has v2 addressed your concern?

RE: [PATCH v2 0/3] ntb: Asynchronous NTB devices support

2016-07-28 Thread Allen Hubbe
From: Serge Semin > Please, find the general patchset description in the cover letter of the first > patchset (see the very first message in thread). > > Changes in v2: > - Fix sparc64 compilation warning in drivers/ntb/hw/idt/ntb_hw_idt.c : >warning: right shift count >= width of type > - F

[PATCH v2] checkpatch: check signoff when reading stdin

2016-07-27 Thread Allen Hubbe
le problems" instead of "Your patch has style problems." git show --pretty=email | scripts/checkpatch.pl /dev/stdin Signed-off-by: Allen Hubbe --- scripts/checkpatch.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/check

[PATCH] checkpatch: check signoff when reading stdin

2016-07-27 Thread Allen Hubbe
tdin This change causes checkpatch to check for a missing signoff line, even if the filename is '-', as in the first variation of the command. Signed-off-by: Allen Hubbe --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch

RE: [PATCH v5 06/10] ntb_tool: Postpone memory window initialization for the user

2016-06-20 Thread Allen Hubbe
er_mw*' file is > only created once the memory window translation is setup by the user. > > Additionally, it was noticed that the read and write functions for the > 'peer_mw*' files should have checked for a NULL pointer. > > Signed-off-by: Logan Guntho

RE: [PATCH v4 07/10] ntb_tool: Add link status and files to debugfs

2016-06-16 Thread Allen Hubbe
he user writes a 1, it will > block until the link is up. If the user writes a 0, it will block until > the link is down. > > Signed-off-by: Logan Gunthorpe Acked-by: Allen Hubbe > --- > drivers/ntb/test/ntb_tool.c | 92 > + &g

RE: [PATCH v4 09/10] ntb_test: Add a selftest script for the NTB subsystem

2016-06-16 Thread Allen Hubbe
ntb_perf tests... > Running local perf test without DMA > 0: copied 536870912 bytes in 164453 usecs, 3264 MBytes/s > Passed > Running remote perf test without DMA > 0: copied 536870912 bytes in 164453 usecs, 3264 MBytes/s > Passed > > Signed-off-by: Logan Guntho

RE: [PATCH v3 09/10] ntb_test: Add a selftest script for the NTB subsystem

2016-06-15 Thread Allen Hubbe
From: Logan Gunthorpe > On 15/06/16 03:49 PM, Allen Hubbe wrote: > >> +function link_test() > >> +{ > >> + LOC=$1 > >> + REM=$2 > >> + EXP=0 > >> + > >> + echo "Running link tests on: $(basename $LOC) / $(basename $REM)&

RE: [PATCH v3 06/10] ntb_tool: Postpone memory window initialization for the user

2016-06-15 Thread Allen Hubbe
er_mw*' file is > only created once the memory window translation is setup by the user. > > Additionally, it was noticed that the read and write functions for the > 'peer_mw*' files should have checked for a NULL pointer. > > Signed-off-by: Logan Gunthorpe Acked-

RE: [PATCH v3 09/10] ntb_test: Add a selftest script for the NTB subsystem

2016-06-15 Thread Allen Hubbe
ntb_perf tests... > Running local perf test without DMA > 0: copied 536870912 bytes in 164453 usecs, 3264 MBytes/s > Passed > Running remote perf test without DMA > 0: copied 536870912 bytes in 164453 usecs, 3264 MBytes/s > Passed > > Signed-off-by: Logan Gunthorp

RE: [PATCH v3 07/10] ntb_tool: Add link status and files to debugfs

2016-06-15 Thread Allen Hubbe
he user writes a 1, it will > block until the link is up. If the user writes a 0, it will block until > the link is down. > > Signed-off-by: Logan Gunthorpe Acked-by: Allen Hubbe > --- > drivers/ntb/test/ntb_tool.c | 89 > + &g

RE: [PATCH v3 08/10] ntb_pingpong: Add a debugfs file to get the ping count

2016-06-15 Thread Allen Hubbe
can be cleared by writing a zero. > > Signed-off-by: Logan Gunthorpe Acked-by: Allen Hubbe > --- > drivers/ntb/test/ntb_pingpong.c | 62 > - > 1 file changed, 61 insertions(+), 1 deletion(-) > > diff --git a/drivers/ntb/test/ntb_

RE: [PATCH v2 6/8] ntb_tool: Add link status and files to debugfs

2016-06-15 Thread Allen Hubbe
From: Logan Gunthorpe > On 14/06/16 03:46 PM, Allen Hubbe wrote: > > The ntb_tool is intended to be a simple low level access to the ntb.h api. > > As much as > possible, I think ntb_tool should directly expose the ntb.h api through > debugfs, and not > invent highe

RE: [PATCH v2 6/8] ntb_tool: Add link status and files to debugfs

2016-06-14 Thread Allen Hubbe
From: Logan Gunthorpe > On 14/06/16 01:33 PM, Allen Hubbe wrote: > >> diff --git a/drivers/ntb/test/ntb_tool.c b/drivers/ntb/test/ntb_tool.c > >> index cba31fd..9bebd0d 100644 > >> --- a/drivers/ntb/test/ntb_tool.c > >> +++ b/drivers/ntb/test/ntb_tool.c >

RE: [PATCH v2 6/8] ntb_tool: Add link status and files to debugfs

2016-06-14 Thread Allen Hubbe
From: Logan Gunthorpe > In order to more successfully script with ntb_tool it's useful to > have a link file to check the link status so that the script > doesn't use the other files until the link is up. > > This commit adds a 'link' file to the debugfs directory which reads a > boolean (Y or N)

RE: [PATCH 6/8] ntb_tool: Add link status file to debugfs

2016-06-14 Thread Allen Hubbe
From: Logan Gunthorpe > On 14/06/16 09:45 AM, Allen Hubbe wrote: > > > > Feel free to disregard my suggestion above. I hope my comment has not cost > > you too much > time. > > > > The way you have written it already, and used it in the self-tes

RE: [PATCH 8/8] ntb_test: Add a selftest script for the NTB subsystem

2016-06-14 Thread Allen Hubbe
From: Logan Gunthorpe > This script automates testing doorbells, scratchpads and memory windows > for an NTB device. It can be run locally, with the NTB looped > back to the same host or use SSH to remotely control the second host. > > In the single host case, the script just needs to be passed tw

RE: [PATCH 6/8] ntb_tool: Add link status file to debugfs

2016-06-14 Thread Allen Hubbe
From: Allen Hubbe > On Sat, Jun 11, 2016 at 11:28 AM, Logan Gunthorpe wrote: > > Hey Allen, > > > > Thanks for the feedback it's a bit more complicated but I don't object to > > that. I'll work something up on Monday. > > > > I was trying to a

Re: [PATCH 6/8] ntb_tool: Add link status file to debugfs

2016-06-11 Thread Allen Hubbe
you say the > module should still enable the link when it's installed? Or would we have > the user explicitly have to enable the link before using it? I would vote to keep the current behavior and enable the link when the module loads. > > Thanks, > > Logan > > > On 10/0

Re: [PATCH 7/8] ntb_pingpong: Add a debugfs file to get the ping count

2016-06-10 Thread Allen Hubbe
On Fri, Jun 10, 2016 at 6:54 PM, Logan Gunthorpe wrote: > This commit adds a debugfs 'count' file to ntb_pingpong. This is so > testing with ntb_pingpong can be automated beyond just checking the > logs for pong messages. > > The count file returns a number which increments every pong. The > count

Re: [PATCH 5/8] ntb_tool: BUG: Ensure the buffer size is large enough to return all spads

2016-06-10 Thread Allen Hubbe
e It could be marginally better if there was an explanation to accompany the magic number 15, but it's not a big deal. One might guess it has something to do with the expected length of the formatted string. Acked-by: Allen Hubbe > --- > drivers/ntb/test/ntb_tool.c | 5 +++-- > 1 fil

Re: [PATCH 6/8] ntb_tool: Add link status file to debugfs

2016-06-10 Thread Allen Hubbe
On Fri, Jun 10, 2016 at 6:54 PM, Logan Gunthorpe wrote: > In order to more successfully script with ntb_tool it's useful to > have a link file to check the link status so that the script > doesn't use the other files until the link is up. > > This commit adds a 'link' file to the debugfs directory

RE: [PATCH] documentation: ntb.txt correct grammar "however"

2016-06-06 Thread Allen Hubbe
From: Austin S. Hemmelgarn > On 2016-06-04 21:36, Ken Moffat wrote: > > On Sat, Jun 04, 2016 at 03:34:01PM -0400, Justin Keller wrote: > >> Correct the grammar around the word however. > >> -besides Netdev, however no other applications have yet been written. > >> +besides Netdev; however, no othe

RE: [PATCH 3/3] ntb_tool: Add memory window debug support

2016-06-03 Thread Allen Hubbe
his was on my wish list. Acked-by: Allen Hubbe > --- > drivers/ntb/test/ntb_tool.c | 258 > +++- > 1 file changed, 257 insertions(+), 1 deletion(-) > > diff --git a/drivers/ntb/test/ntb_tool.c b/drivers/ntb/test/ntb_tool.c > index 209e

Re: [PATCH] ntb_tool: Fix infinite loop bug when writing spad/peer_spad file

2016-05-28 Thread Allen Hubbe
t immediately obvious but 'pos' was not incrementing the > buffer, so after reading the second pair of values, 'pos' would once > again be 3 and it would re-read the second pair of values ad infinitum. > > Signed-off-by: Logan Gunthorpe Good catch. Thanks L

RE: drivers/ntb/hw/amd/ntb_hw_amd.c:367:29: sparse: cast removes address space of expression

2016-03-21 Thread Allen Hubbe
> >> drivers/ntb/hw/amd/ntb_hw_amd.c:367:29: sparse: cast removes address space > >> of > expression >drivers/ntb/hw/amd/ntb_hw_amd.c:427:31: sparse: cast removes address space > of > expression >360static int amd_ntb_peer_db_addr(struct ntb_dev *ntb, >361

RE: [PATCH V5 1/1] NTB: Add support for AMD PCI-Express Non-Transparent Bridge

2016-01-20 Thread Allen Hubbe
From: Yu, Xiangliang [mailto:xiangliang...@amd.com] > > > Signed-off-by: Jon Mason > > > Signed-off-by: Allen Hubbe > > > > NO. > > Ok, I'll change it if you doesn't want to change it. Nah, just remember it for next time... I'm satisfied

RE: [PATCH V5 1/1] NTB: Add support for AMD PCI-Express Non-Transparent Bridge

2016-01-20 Thread Allen Hubbe
NTB device has 3 > memory windows, 16 doorbell, 16 scratch-pad registers, and supports > up to 16 PCIe lanes running a Gen3 speeds. > > Signed-off-by: Xiangliang Yu > Signed-off-by: Jon Mason > Signed-off-by: Allen Hubbe NO. > + /* set and

  1   2   >