On Sat, Feb 24, 2018 at 11:30 PM, James Smart wrote:
> writeq() is not present on all 32-bit architectures.
>
> When 32-bit, use writel()
>
> Signed-off-by: Dick Kennedy
> Signed-off-by: James Smart
> ---
> drivers/scsi/lpfc/lpfc_sli.c | 5 +
> 1 file changed, 5 insertions(+)
>
> diff --git
BUG: unable to handle kernel NULL pointer dereference at 0100
[ 985.596918] IP: _raw_spin_lock_bh+0x17/0x30
[ 985.601581] PGD 0 P4D 0
[ 985.604405] Oops: 0002 [#1] SMP
:
[ 985.704533] CPU: 16 PID: 1156 Comm: qedi_thread/16 Not tainted 4.16.0-rc2 #1
[ 985.712397] Hardware name: Del
On Sun, Feb 25, 2018 at 11:02 AM, Johannes Thumshirn wrote:
> Arnd Bergmann writes:
>> 32-bit architectures generally cannot use writeq(), so we now get a build
>> failure for the lpfc driver:
>>
>> drivers/scsi/lpfc/lpfc_sli.c: In function 'lpfc_sli4_wq_put':
>> drivers/scsi/lpfc/lpfc_sli.c:145:
A bugfix I did caused a build regression in some other randconfig
builds in a rare combination of options:
In file included from drivers/scsi/qedi/qedi_fw.c:16:
drivers/scsi/qedi/qedi_gbl.h:26:38: error: array type has incomplete element
type 'struct qedi_debugfs_ops'
extern const struct qedi_de
Hi Tejun,
Sorry for my late reply as i have a vacation last week.
在 2018/2/13 22:27, Tejun Heo 写道:
Hello,
On Tue, Feb 13, 2018 at 09:44:53AM +0800, chenxiang (M) wrote:
For those drivers using libsas, i think they have the same issue.
It takes about 1 minute to
recover but actually device is
Hi,
On Fri, Feb 23, 2018 at 04:46:30PM +0100, Natanael Copa wrote:
> On Thu, 22 Feb 2018 11:30:20 -0800
> Bart Van Assche wrote:
>
> > Avoid that the recently introduced call_rcu() call in the SCSI core
> > triggers a double call_rcu() call.
>
> This patch also prevents my machine from hanging.
this document include SCSI disk and SCSI device parameters, add
cache_type firstly, other parameters will be added later.
Signed-off-by: Weiping Zhang
---
Documentation/scsi/sd-parameters.txt | 23 +++
1 file changed, 23 insertions(+)
create mode 100644 Documentation/scsi/sd
The firmware event workqueue should not be marked as WQ_MEM_RECLAIM
as it's doesn't need to make forward progress under memory pressure.
In the current state it will result in a deadlock if the device had been
forcefully removed.
Cc: Sreekanth Reddy
Cc: Suganath Prabu Subramani
Signed-off-by: Ha
On 2018-02-26 02:25 AM, Hannes Reinecke wrote:
On 02/25/2018 07:29 PM, Douglas Gilbert wrote:
The SCSI PRE-FETCH (10 or 16) command is present both on hard disks
and some SSDs. It is useful when the address of the next block(s) to
be read is known but it is not following the LBA of the current R
On Thu, Feb 22, 2018 at 04:20:10PM -0600, Uma Krishnan wrote:
> This patch series adds OpenCXL support to the cxlflash driver. With
> this support, new devices using the OpenCXL transport will be supported
> by the cxlflash driver along with the existing CXL devices. An effort is
> made to keep thi
On Mon, 2018-02-26 at 17:37 +0800, chenxiang (M) wrote:
> When i have a test on kernel 4.16-rc1, find a issue: running IO on SATA disk,
> then disable the disk through
> sysfs interface(echo 0 > /sys/class/sas_phy/phy-1:0:0/enable), IO will hang
> and never enter SCSI EH. The issue
> appears ever
On 2018-02-26 02:39 AM, Hannes Reinecke wrote:
When converting __scsi_error_from_host_byte() to BLK_STS error codes
the case DID_OK was forgotten, resulting in it always returning
an error.
Fixes: 2a842acab109 ("block: introduce new block status code type")
Cc: Doug Gilbert
Signed-off-by: Hanne
On 2/26/2018 12:36 AM, Arnd Bergmann wrote:
Unfortunately, this is still broken on all big-endian architectures. You could
use __raw_writeq() here to fix it, or change the if() clause at the beginning
to include '!IS_ENABLED(CONFIG_CPU_BIG_ENDIAN)' to avoid that.
Arnd
Please explain
This patch started as an attempt to fix the erroneous handling of
CONDITION MET, a relatively rare special case. A solution meant adding
another special case to the already complicated scsi_io_completion()
function. To better understand that function the author found it
useful to refactor the funct
On Mon, Feb 26, 2018 at 6:01 PM, James Smart wrote:
>
>
> On 2/26/2018 12:36 AM, Arnd Bergmann wrote:
>>
>> Unfortunately, this is still broken on all big-endian architectures. You
>> could
>> use __raw_writeq() here to fix it, or change the if() clause at the
>> beginning
>> to include '!IS_ENABL
On 2/26/2018 12:04 PM, Arnd Bergmann wrote:
For the endianess, the key to understanding this is that readl/writel and
readq/writeq follow the convention of accessing data as little-endian because
that is what 99% of MMIO accesses on PCI are: you have a 32-bit or 64-bit
register value that gets co
This patch series adds OCXL support to the cxlflash driver. With this
support, new devices using the OCXL transport will be supported by the
cxlflash driver along with the existing CXL devices. An effort is made
to keep this transport specific function independent of the existing
core driver that c
The number of interrupts requested for user contexts are stored in the
context specific structures and utilized to manage the interrupts. For the
master contexts, this number is only used once and therefore not saved.
To prepare for future commits where the number of interrupts will be
required in
From: "Matthew R. Ochs"
The SISLite specification originally defined the context control
register with a single field of bits to represent the LISN and
also stipulated that the register reset value be 0. The cxlflash
driver took advantage of this when programming the LISN for the
master contexts
Checkpatch throws a warning when the argument identifier names are not
included in the function definitions.
To avoid these warnings, argument identifiers are added in the existing
function definitions.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxlflash/backend.h |
Add initial infrastructure to support a new cxlflash transport, OCXL.
Claim a dependency on OCXL and add a new file, ocxl_hw.c, which will host
the backend routines that are specific to OCXL.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxlflash/Kconfig | 2 +-
dri
When an adapter is initialized, transport specific configuration and MMIO
mapping details need to be saved. For CXL, this data is managed by the
underlying kernel module. To maintain a separation between the cxlflash
core and underlying transports, introduce a new structure to store data
specific t
Per the OCXL specification, the underlying host can have multiple AFUs
per function with each function supporting its own configuration. The host
function configuration is read on the initialization path to evaluate the
number of functions present and identify the features and configuration of
the
The host AFU configuration is read on the initialization path to identify
the features and configuration of the AFU. This data is cached for use in
later configuration steps.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxlflash/ocxl_hw.c | 34 +
The OCXL specification supports distributing acTags amongst different
AFUs and functions on the link. As cxlflash devices are expected to only
support a single AFU and function, the entire range that was assigned to
the function is also assigned to the AFU.
Signed-off-by: Uma Krishnan
Acked-by: M
The OCXL specification supports distributing acTags amongst different
AFUs and functions on the link. The platform-specific acTag range for the
link is obtained using the OCXL provider services and then assigned to the
host function based on implementation. For cxlflash devices only a single
functi
Add support to create and release the adapter contexts for OCXL and
provide means to specify certain contexts as a master.
The existing cxlflash core has a design requirement that each host will
have a single host context available by default. To satisfy this
requirement, one host adapter context
A range of PASIDs are used as identifiers for the adapter contexts. These
contexts may be destroyed and created randomly. Use an IDR to keep track
of contexts that are in use and assign a unique identifier to new ones.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxlfl
Provide means to obtain the process element of an adapter context as well
as locate an adapter context by file.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxlflash/ocxl_hw.c | 26 ++
1 file changed, 26 insertions(+)
diff --git a/drivers/scsi/
Allocate a file descriptor for an adapter context when requested. In order
to allocate inodes for the file descriptors, a pseudo filesystem is created
and used.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxlflash/ocxl_hw.c | 200 ++
Per the OCXL specification, the maximum PASID supported by the AFU is
indicated by a field within the configuration space. Similar to acTags,
implementations can choose to use any sub-range of PASID within their
assigned range. For cxlflash, the entire range is used.
Signed-off-by: Uma Krishnan
A
Once the context is started, the assigned MMIO space can be mapped
and unmapped. Provide means to map and unmap the context MMIO space.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxlflash/ocxl_hw.c | 24
1 file changed, 24 insertions(+)
diff
After reading and modifying the function configuration, setup the OCXL
link using the OCXL provider services. The link is released when the
adapter is unconfigured.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxlflash/ocxl_hw.c | 25 ++---
drivers/
As part of the context lifecycle, the associated process element within
the Shared Process Area (SPA) of the link must be updated. Each process
is defined by various parameters (pid, tid, PASID mm) that are stored in
the SPA upon starting a context and invalidated when a context is stopped.
Use th
The first function of the link needs to configure the transaction layer
between the host and device. This is accomplished by a call to the OCXL
provider services.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxlflash/ocxl_hw.c | 10 ++
1 file changed, 10 insert
Once the adapter context is created, it needs to be started by assigning
the MMIO space for the context and by enabling the process element in the
link. This commit adds the skeleton for starting the context and assigns
the context specific MMIO space. Master contexts have access to the global
MMIO
On a PERST, the AFU image can be reloaded or left intact. Provide means to
set this image reload policy.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxlflash/ocxl_hw.c | 13 +
drivers/scsi/cxlflash/ocxl_hw.h | 1 +
2 files changed, 14 insertions(+)
diff
Use the PCI VPD services to support reading the VPD data of the
underlying adapter.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxlflash/ocxl_hw.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi/cxlfl
When the AFU is configured, the global and per process MMIO regions
are presented by the configuration space. Save these regions and
map the global MMIO region that is used to access all of the control
and provisioning data in the AFU.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
d
The AFU should be enabled following a successful configuration and
disabled near the end of the cleanup path.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxlflash/ocxl_hw.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/
User contexts request interrupts and are started using the "start work"
interface. Populate the start_work() fop to allocate and map interrupts
before starting the user context. As part of starting the context, update
the user process identification logic to properly derive the data required
by the
The cxlflash userspace API requires that users be able to poll the adapter
context for any pending events or interrupts from the AFU. Support polling
on various events by implementing the AFU poll fop using a waitqueue.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxlf
Add support to map and unmap the irq space and manage irq registrations
with the kernel for each allocated AFU interrupt. Also support mapping
the physical trigger page to obtain an effective address that will be
provided to the cxlflash core in a future commit.
Signed-off-by: Uma Krishnan
Acked-
Add support to allocate and free AFU interrupts using the OCXL provider
services. The trigger page returned upon successful allocation will be
mapped and exposed to the cxlflash core in a future commit.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxlflash/ocxl_hw.c |
The cxlflash userspace API requires that users be able to read the adapter
context for any pending events or interrupts from the AFU. Support reading
various events by implementing the AFU read fop to copy out event data.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cx
OCXL requires that AFUs use an opaque object handle to represent
an AFU interrupt. The specification does not provide a common means
to communicate the object handle to the AFU - each AFU must define
this within the AFU specification. To support this model, the object
handle must be passed back to
The cxlflash userspace API requires that users be able to mmap and release
the adapter context. Support mapping by implementing the AFU mmap fop to
map the context MMIO space and install the corresponding page table entry
upon page fault. Similarly, implement the AFU release fop to terminate and
cl
The cxlflash core fop API requires a way to invoke the fault and release
handlers of underlying transports using their native file-based APIs. This
provides the core with the ability to insert selectively itself into the
processing stream of these operations for cleanup. Implement these two
fops to
In order to protect the OCXL hardware contexts from getting clobbered,
a simple state machine is added to indicate when a context is in open,
close or start state. The expected states are validated throughout the
code to prevent illegal operations on a context. A mutex is added to
protect writes to
The SISLite specification has been updated for OCXL to support
communicating data to generate AFU interrupts to the AFU. This includes
a new capability bit that is advertised for OCXL AFUs and new registers
to hold the object handle and translation PASID of each interrupt. For
Power, the object han
While enabling a context on the link, a predefined callback can be
registered with the OCXL provider services to be notified on translation
errors. These errors can in turn be passed back to the user on a read
operation.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxl
Similar to user contexts, master contexts also require that the per-context
LISN registers be programmed for certain AFUs. The mapped trigger page is
obtained from underlying transport and registered with AFU for each master
context.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
dri
The cxlflash core driver resets the AFU when the master contexts are
created in the initialization or recovery paths. Today, the OCXL
provider service to perform this operation is pending implementation.
To avoid a crash due to a missing fop, log an error once and return
success to continue with ex
This commit enables the OCXL operations for the OCXL devices.
Signed-off-by: Uma Krishnan
Acked-by: Matthew R. Ochs
---
drivers/scsi/cxlflash/main.c | 9 +++--
drivers/scsi/cxlflash/main.h | 1 +
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/cxlflash/main.c b/d
The SISLite specification has been updated to define new synchronous
interrupt status bits. These bits are set by the AFU when a given PASID or
EA is bad and a synchronous interrupt is triggered.
The SISLite header file is updated to support these new bits. Note that
there are also some formatting
Because of the shifting around of code in qla2x00_probe_one recently,
failures during adapter initialization can lead to problems, i.e. NULL
pointer crashes and doubly freed data structures which cause eventual
panics.
To address these problems, I tested all early probe exit points (and
debugged t
在 2018/2/26 23:25, Bart Van Assche 写道:
On Mon, 2018-02-26 at 17:37 +0800, chenxiang (M) wrote:
When i have a test on kernel 4.16-rc1, find a issue: running IO on SATA disk,
then disable the disk through
sysfs interface(echo 0 > /sys/class/sas_phy/phy-1:0:0/enable), IO will hang and
never ent
Martin,
> Introduce a new blist flag that indicates the device may return certain
> sense code/ASC/ASCQ combinations that indicate different treatment than
> normal. In particular, some devices need unconditional retry (aka
> ADD_TO_MLQUEUE) under certain conditions; otherwise path failures may b
On Mon, 2018-02-26 at 15:58 +0800, Jianchao Wang wrote:
> In scsi core, __scsi_queue_insert should just put request back on
> the queue and retry using the same command as before. However, for
> blk-mq, scsi_mq_requeue_cmd is employed here which will unprepare
> the request. To align with the seman
Doug,
> I checked the code for the ABORTED COMMAND asc=0x10 case. That is a
> bunch of Protection Information errors which retrying would be
> pointless. And the existing code does check for that just before the
> new check for BLIST_ABORTED_CMD_QUIRK. The PI check has the cryptic
> comment /* DI
Hi Bart
Thanks for your kindly response.
On 02/27/2018 11:08 AM, Bart Van Assche wrote:
> On Mon, 2018-02-26 at 15:58 +0800, Jianchao Wang wrote:
>> In scsi core, __scsi_queue_insert should just put request back on
>> the queue and retry using the same command as before. However, for
>> blk-mq, s
On Tue, 2018-02-27 at 11:28 +0800, jianchao.wang wrote:
> If that is true, what if aacraid driver uses block legacy instead of blk-mq ?
> w/ blk-mq disabled, __scsi_queue_insert just requeue the request with
> blk_requeue_request.
>
> __scsi_queue_insert
> ...
> if (q->mq_ops) {
>
Hi Bart
Thanks for your kindly response.
On 02/27/2018 11:41 AM, Bart Van Assche wrote:
> On Tue, 2018-02-27 at 11:28 +0800, jianchao.wang wrote:
>> If that is true, what if aacraid driver uses block legacy instead of blk-mq ?
>> w/ blk-mq disabled, __scsi_queue_insert just requeue the request wi
> -Original Message-
> From: Martin K. Petersen [mailto:martin.peter...@oracle.com]
> Sent: Thursday, February 22, 2018 9:52 AM
> To: Shivasharan S
> Cc: linux-scsi@vger.kernel.org; kashyap.de...@broadcom.com;
> sumit.sax...@broadcom.com
> Subject: Re: [PATCH] megaraid_sas: Re-enable WRITE
On Tue, 2018-02-27 at 12:00 +0800, jianchao.wang wrote:
> On the other hand, this patch is to align the actions between blk-mq and block
> legacy code in __scsi_queue_insert.
Hello Jianchao,
Since the legacy SCSI core unpreps an reprepares a request when requeuing it I
think your patch does not a
Hi Bart
Thanks for your kindly response.
On 02/27/2018 01:12 PM, Bart Van Assche wrote:
> On Tue, 2018-02-27 at 12:00 +0800, jianchao.wang wrote:
>> On the other hand, this patch is to align the actions between blk-mq and
>> block
>> legacy code in __scsi_queue_insert.
>
> Hello Jianchao,
>
>
On 2018-02-09 10:29, Rob Herring wrote:
On Mon, Feb 05, 2018 at 08:02:07PM +0800, Can Guo wrote:
From: Gilad Broner
Different platforms may have different number of lanes for the UFS
link.
Add parameter to device tree specifying how many lanes should be
configured for the UFS link. And don't
From: Gilad Broner
Different platforms may have different number of lanes for the UFS Tx/Rx
links. Add parameter to device tree specifying how many lanes should be
configured for the UFS Tx/Rx links. And don't print err message for clocks
that are optional, this leads to unnecessary confusion abo
When ata device doing EH, some commands still attached with tasks are not
passed to libata when abort failed or recover failed, so libata did not
handle these commands. After these commands done, sas task is freed, but
ata qc is not freed. This will cause ata qc leak and trigger a warning
like belo
We've got a kernel panic when using sata disk with sas controller:
[115946.152283] Unable to handle kernel NULL pointer dereference at virtual
address 07d8
[115946.223963] CPU: 0 PID: 22175 Comm: kworker/0:1 Tainted: GW OEL
4.14.0 #1
[115946.232925] Workqueue: events ata_scsi_hotpl
70 matches
Mail list logo