Age | Commit message (Collapse) | Author |
|
The ring logic of the NTB receive buffer/transmit memory window requires
there to be at least 2 payload sized allotments. For the minimal size
case, split the buffer into two and set the transport_mtu to the
appropriate size.
Signed-off-by: Jon Mason <jon.mason@intel.com>
|
|
If the NTB link toggles, the driver could stop receiving due to the
tx_index not being set to 0 on the transmitting size on a link-up event.
This is due to the driver expecting the incoming data to start at the
beginning of the receive buffer and not at a random place.
Signed-off-by: Jon Mason <jon.mason@intel.com>
|
|
Each link-up will allocate a new NTB receive buffer when the NTB
properties are negotiated with the remote system. These allocations did
not check for existing buffers and thus did not free them. Now, the
driver will check for an existing buffer and free it if not of the
correct size, before trying to alloc a new one.
Signed-off-by: Jon Mason <jon.mason@intel.com>
|
|
64bit BAR sizes are permissible with an NTB device. To support them
various modifications and clean-ups were required, most significantly
using 2 32bit scratch pad registers for each BAR.
Also, modify the driver to allow more than 2 Memory Windows.
Signed-off-by: Jon Mason <jon.mason@intel.com>
|
|
->remote_rx_info and ->rx_info are struct ntb_rx_info pointers. If we
add sizeof(struct ntb_rx_info) then it goes too far.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jon Mason <jon.mason@intel.com>
|
|
These tests are off by one. If "mw" is equal to NTB_NUM_MW then we
would go beyond the end of the ndev->mw[] array.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jon Mason <jon.mason@intel.com>
|
|
Correct instances of variable dereferencing before checking its value on
the functions exported to the client drivers. Also, add sanity checks
for all exported functions.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jon Mason <jon.mason@intel.com>
|
|
Address the sparse warnings and resulting fallout
Signed-off-by: Jon Mason <jon.mason@intel.com>
|
|
Atomic readq and writeq do not exist by default on some 32bit
architectures, thus causing compile errors due to non-existent symbols.
Since NTB has not been tested 32bit, disable x86_32 support until such
time as this and any other issues can be properly discovered.
Signed-off-by: Jon Mason <jon.mason@intel.com>
|
|
Update NTB netdev version to 0.7
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Improve driver logging to be more helpful
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
There is a race between disabling and enabling the tx queue, resulting
in tx timeouts. Since all the tx timeout does is re-enable the tx
queue, simple remove the start/stop of the queue and the tx timeout
routine.
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
If ntb_netdev is unable to pass a new skb to the ntb transport for
future rx packets, it should free the newly alloc'ed skb in the error
case. Found by Kernel memory leak detector.
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Remove init/exit from probe/remove routines to correct warnings of
"Section mismatch".
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Update NTB version to 0.25
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
If the NTB client driver enqueues the maximum number of rx buffers, it
will not be able to re-enqueue another in its callback handler due to a
lack of free entries. This can be avoided by adding the current entry
to the free queue prior to calling the client callback handler. With
this change, ntb_netdev will no longer encounter a rx error on its first
packet.
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
CPU reads across NTB are slow(er) and can hang the local system if an
ECC error is encountered on the remote. To work around the need for a
read, have the remote side write its current position in the rx buffer
to the local system's buffer and use that to see if there is room when
transmitting.
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Correct gcc warning of using too much stack debugfs_read. This is done
by kmallocing the buffer instead of using the char array on stack.
Also, shrinking the buffer to something closer to what is currently
being used.
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Whitespace cleanups found via `indent`
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Declare ntb_bus_type static to remove it from name space, and remove
unused ntb_get_max_spads function. Found via `make namespacecheck`.
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Use simple_open for debugfs instead of recreating it in the NTB driver.
Caught by coccicheck.
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Move all cancel_delayed_work_sync to a work thread to prevent sleeping
in interrupt context (when the NTB link goes down). Caught via
'Sleep inside atomic section checking'
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Since it is possible for the memory windows on the two NTB connected
systems to be different sizes, the divergent sizes must be accounted for
in the segmentation of the MW's on each side. Create separate size
variables and initialization as necessary.
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
mmiowb is not sufficient to flush the data and is causing data
corruption. Change to wmb and the data corruption is no more.
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Attempts to probe client ntb drivers without ntb hardware present will
result in null pointer dereference due to the lack of the ntb bus device
being registers. Check to see if this is the case, and fail all calls
by the clients registering their drivers.
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
These are now gone from the kernel, so remove them from the newly-added
drivers before they start to cause build errors for people.
Cc: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
A virtual ethernet device that uses the NTB transport API to
send/receive data.
Signed-off-by: Jon Mason <jon.mason@intel.com>
Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus
connecting 2 systems, providing electrical isolation between the two subsystems.
A non-transparent bridge is functionally similar to a transparent bridge except
that both sides of the bridge have their own independent address domains. The
host on one side of the bridge will not have the visibility of the complete
memory or I/O space on the other side of the bridge. To communicate across the
non-transparent bridge, each NTB endpoint has one (or more) apertures exposed to
the local system. Writes to these apertures are mirrored to memory on the
remote system. Communications can also occur through the use of doorbell
registers that initiate interrupts to the alternate domain, and scratch-pad
registers accessible from both sides.
The NTB device driver is needed to configure these memory windows, doorbell, and
scratch-pad registers as well as use them in such a way as they can be turned
into a viable communication channel to the remote system. ntb_hw.[ch]
determines the usage model (NTB to NTB or NTB to Root Port) and abstracts away
the underlying hardware to provide access and a common interface to the doorbell
registers, scratch pads, and memory windows. These hardware interfaces are
exported so that other, non-mainlined kernel drivers can access these.
ntb_transport.[ch] also uses the exported interfaces in ntb_hw.[ch] to setup a
communication channel(s) and provide a reliable way of transferring data from
one side to the other, which it then exports so that "client" drivers can access
them. These client drivers are used to provide a standard kernel interface
(i.e., Ethernet device) to NTB, such that Linux can transfer data from one
system to the other in a standard way.
Signed-off-by: Jon Mason <jon.mason@intel.com>
Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
We don't have 'expand' in our userspace so we need to accomplish the
same thing using 'sed', which we do have.
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
CFLAGS was previously hard coded to contain "-I/usr/include/slang" to
work with hosts that have "/usr/include/slang/slang.h" as well as hosts
that have "/usr/include/slang.h". This path can cause compile warnings
like:
cc1: warning: '/usr/include/slang' doesn't exists.
or
cc1: warning: include location "/usr/include/slang" is unsafe for
cross-compilation [-Wpoison-system-directories]
Then in some cases warnings become errors if WERROR is enabled hence
build errors.
To fix this issue, we can use -idirafter to downgrade the priority of the
default hard coded path. We can also make the slang include directory
a variable, to allow the user to specify SLANG_INC and set their own
include location. And add a '=' prefix to indicate better
compatibility with sysroot/cross compile cases.
Signed-off-by: Liang Li <liang.li@windriver.com>
|
|
Allow Python.h to find the definitions it needs on mips i.e. get rid
of the error: "_ABIN32" is not defined.
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
|
|
Otherwise we get the sysroot path appended to the build path, not what
we want.
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
|
|
If libperl isn't found, display a message to that effect along with
some hints on how to fix it.
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
|
|
Python has build flags available via pkg-config, use those at
build-time instead.
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
|
|
Large parts of perf use bool variables and assignments.
Rather than depending on transient includes, we force it
by including <stdbool.h> directly in perf.h
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Introduce the ability to limit the limit the uptime of a kernel.
When enabled, these options set a maximum uptime on the kernel, and
(optionally) trigger a clean reboot at expiration.
This functionality may appear to be very close to the softdog watchdog
implementation. It is. But can't be the softdog for several reasons:
- The soft watchdog should be available while this functionality is active
- The duration range is different between this and the softdog. The
timeout available here is potentially quite a bit longer.
- At expiration, there are different expiration requirements and actions.
- This functionality is specific to a particular use case and should
not impact mainline functionality
To cleanly restart the kernel after one minute of uptime, the following
config items would be required:
CONFIG_UPTIME_LIMITED_KERNEL=y
CONFIG_UPTIME_LIMIT_DURATION=1
CONFIG_UPTIME_LIMIT_KERNEL_REBOOT=y
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
This patch adds a new flag field 'FAT_NO_83NAME' for FAT files. When
this flag is set on an 8.3 FAT entry, both the MSDOS and VFAT
filesystems will skip the entry. For MSDOS this makes the file
inaccessible. For VFAT it makes the file only accessible by the long
filename.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
|
|
When this option is enabled this will refuse to create new files with
long names. Accessing existing files with long names will continue to
work.
File names to be created must conform to the 8.3 format. Mixed case is
not allowed in either the prefix or the suffix.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
|
|
This patch adds a new config option VFAT_FS_NO_DUALNAMES. When
VFAT_FS_NO_DUALNAMES is enabled, VFAT will never create a file with
both a long and a short filename. If a long filename is needed, then
dummy bytes are stored in the 8.3 entry, and the 8.3 entry is marked
as having no short name using the FAT_NO_83NAME flag.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
|
|
Importing yaffs2 from:
git://www.aleph1.co.uk/yaffs2
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
It is sometimes useful to have a secondary script call the
gen_initramfs_list.sh script. This allows special interpretation
of the initramfs root filesystem or other manipulations to be
injected.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
This is required to avoid warnings like
util/include/linux/compiler.h:8:0: error: "__attribute_const__" redefined [-Werror]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
When jiffies wraps, it must be larger than the value of "updated".
The solution will enhance the condition of "time_after".
Signed-off-by: Li Wang <li.wang@windriver.com>
|
|
From fedora kernel:
commit 6f3e186bc7721c5b24ad90d4a751cccfccd445e6
Author: Josh Boyer <jwboyer@redhat.com>
Date: Fri Aug 5 08:47:23 2011 -0400
Add patch to fix 32bit EFI service mapping (rhbz 726701)
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
|
|
Some variants of gcc 4.5 have issues with -Os and will
throw:
cc1: error: Do not use -Os option if --enable-target-optspace is not set.
-Os is not required to build a valid boot environment,
so the easiest solution is to simply remove the boot
flag.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Some boards need a smaller size here for
performance reasons, so let's make the value
configurable for those boards.
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
|
|
If a root filesystem is generated as non-root, one of
the tell tale signs is /dev/console not being a character
file. To save a whole class of questions, let's just test
for the condition and let the user know.
Signed-off-by: Richard Laroque <rlarocqu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
To an end user who doesn't really know linux that well, a
message like:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
may just look like cryptic computer speak indicating some
deep and complex problem, instead of the reality that they
have a simple local configuration problem. Ideally it would
be nice to not use the misleading "panic" at all, but since
various panic notifiers are historically expecting to be
called when there is no valid rootfs, we can't change that.
So instead, this tries to make it 100% clear to folks of
any background that it is an end user configuration issue.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
|