On 8/27/19 11:28 PM, James Smart wrote:
Capturing and downloading dif command data and dif data was done a
dozen years ago and no longer being used. Also creates a potential
security hole.
Remove the debugfs buffer for dif debugging.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
CC:
On 8/27/19 11:28 PM, James Smart wrote:
Raise the config max for lpfc_fcp_mq_threshold variable to 256.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
CC: Hannes Reinecke
---
Martin, this fix applies 5.3/scsi-fixes patch:
scsi: lpfc: Mitigate high memory pre-allocation by SCSI-MQ
Hello,
Someone posted a bug report for UFS on an sdm850 tablet:
https://bugzilla.kernel.org/show_bug.cgi?id=204685
If I'm reading the boot logs right, this board is EFI rather than DT.
(Lee: EFI on qcom is one of your areas, right?
The UFSHC driver is DT-aware, but is it EFI-aware?)
[0.0
On Wed 28 Aug 02:09 PDT 2019, Marc Gonzalez wrote:
> Hello,
>
> Someone posted a bug report for UFS on an sdm850 tablet:
> https://bugzilla.kernel.org/show_bug.cgi?id=204685
>
> If I'm reading the boot logs right, this board is EFI rather than DT.
It's UEFI-based and Linux will either operate b
The 12.4.0.0 patch that merged WQ/CQ pairs into single per-cpu pair
contained a bug: a local variable was set to the queue pair by index.
This should have allowed the local variable to be natively used.
Instead, the code reused the index relative to the local variable,
obtaining a random pointer va
The biggest single item in the sg_request object is the sense
buffer array which is SCSI_SENSE_BUFFERSIZE bytes long. That
constant started out at 18 bytes 20 years ago and is 96 bytes
now and might grow in the future. On the other hand the sense
buffer is only used by a small number of SCSI comman
The existing ioctl(SG_GET_SCSI_ID) fills a object of type
struct sg_scsi_id whose last field is int unused[2]. Add
an anonymous union with u8 scsi_lun[8] sharing those last
8 bytes. This patch will place the current device's full
LUN in the scsi_lun array using T10's preferred LUN
format (i.e. an a
Now that the sg version 4 interface is supported:
- with ioctl(SG_IO) for synchronous/blocking use
- with ioctl(SG_IOSUBMIT) and ioctl(SG_IORECEIVE) for
async/non-blocking use
Plus new ioctl(SG_IOSUBMIT_V3) and ioctl(SG_IORECEIVE_V3)
potentially replace write() and read() for the sg
version
Add sg_allow_if_err_recover() to do checks common to several entry
points. Replace retval with either res or ret. Rename
sg_finish_rem_req() to sg_finish_scsi_blk_rq(). Rename
sg_new_write() to sg_submit(). Other cleanups triggered by
checkpatch.pl .
Reviewed-by: Hannes Reinecke
Signed-off-by: Do
Duplicate the semantics of 'cat /proc/scsi/sg/debug' on
'cat /sys/kernel/debug/scsi_generic/snapshot'. Make code
that generates the snapshot conditional on either
CONFIG_SCSI_PROC_FS or CONFIG_DEBUG_FS being defined.
Also add snapshot_devs which can be written with a list of
comma separated intege
Remove the fixed size array of 16 request elements per file
descriptor and replace with two linked lists per file descriptor.
One list is for active commands, the other list is a free list.
sg_request objects are now kept, available for re-use, until
their owning file descriptor is closed. The sg_r
Move main entry point functions around so submission code comes
before completion code. Prior to this, the driver used the
traditional open(), close(), read(), write(), ioctl() ordering
however in this case that places completion code (i.e.
sg_read()) before submission code (i.e. sg_write()). The m
Add ioctl(SG_IOSUBMIT_V3) and ioctl(SG_IORECEIVE_V3). These ioctls
are meant to be (almost) drop-in replacements for the write()/read()
async version 3 interface. They only accept the version 3 interface.
See the webpage at: http://sg.danny.cz/sg/sg_v40.html
specifically the table in the section t
The internal struct sg_comm_wr_t was added when the number of
arguments to sg_common_write() became excessive. Expand this idea
so multiple calls to sg_fetch_cmnd() can be deferred until a
scsi_request object is ready to receive the command. This saves
a 252 byte stack allocation on every submit pa
Since the version 2 driver, the state of the driver can be found
with 'cat /proc/scsi/sg/debug'. As the driver becomes more
threaded and IO faster (e.g. scsi_debug with a command timer
of 5 microseconds), the existing state dump can become
misleading as the state can change during the "snapshot". T
Add support for the sg v4 interface based on struct sg_io_v4 found
in include/uapi/linux/bsg.h and only previously supported by the
bsg driver. Add ioctl(SG_IOSUBMIT) and ioctl(SG_IORECEIVE) for
async (non-blocking) usage of the sg v4 interface. Do not accept
the v3 interface with these ioctls. Do
In the case of sg_wait_open_event() which calls mutex_unlock on
sdp->open_rel_lock and later calls mutex_lock on the same
lock; this macro is needed to stop sparse complaining. In
other cases it is a reminder to the coder (a precondition).
Signed-off-by: Douglas Gilbert
---
drivers/scsi/sg.c | 7
Move user interface part of scsi/sg.h into the new header file:
include/uapi/scsi/sg.h . Since scsi/sg.h includes the new header,
other code including scsi/sg.h should not be impacted.
Reviewed-by: Hannes Reinecke
Reported-by: kbuild test robot
Signed-off-by: Douglas Gilbert
---
include/scsi/s
This patchset extends the SCSI generic (sg) driver found in
lk 5.3 . The sg driver has a version number which is visible
via ioctl(SG_GET_VERSION_NUM) and is bumped from 3.5.36 to
4.0.03 by this patchset. The additions and changes are
described in some detail in this long webpage:
http://sg.da
Replace SCSI_LOG_TIMEOUT macros with SG_LOG macros across the driver.
The definition of SG_LOG calls SCSI_LOG_TIMEOUT if given and derived
pointers are non-zero, calls pr_info otherwise. SG_LOGS additionally
prints the sg device name and the thread id. The thread id is very
useful, even in single t
Track the number of submitted and waiting (for read/receive)
requests on each file descriptor with two atomic integers.
This speeds sg_poll() and ioctl(SG_GET_NUM_WAITING) which
are oft used with the asynchronous (non-blocking) interfaces.
Reviewed-by: Hannes Reinecke
Signed-off-by: Douglas Gilbe
Since access_ok() has lost it direction (3rd) parameter there
seems to be no benefit in calling access_ok() before
__copy_{to|from}_user(). Simplify code by using the variant of
these functions that do not start with "__".
Signed-off-by: Douglas Gilbert
---
drivers/scsi/sg.c | 85 +++
Introduce bitops in sg_device to replace an atomic, a bool and a
char. That char (sgdebug) had been reduced to only two states.
Add some associated macros to make the code a little clearer.
Signed-off-by: Douglas Gilbert
---
drivers/scsi/sg.c | 104 +++---
Typedefs for structure types are discouraged so those structures
that are private to the driver have had their typedefs removed.
This also means that most "camel" type variable names (i.e. mixed
case) have been removed.
Reviewed-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
Signed-off-by:
Move the procfs related file_operations and seq_operations
definitions toward the end of the source file to minimize the
need for foward declarations of the functions they name.
Signed-off-by: Douglas Gilbert
---
drivers/scsi/sg.c | 133 +-
1 file chan
Should generate one log message per kernel run when the write()
system call is used with the sg interface version 3. Due to
security concerns suggest that they use ioctl(SG_SUBMIT_v3)
instead.
Sg interface version 1 or 2 based code may also be calling
write() in this context. There is no easy solu
Re-arrange code in sg_poll(). Rename sg_read_oxfer() to
sg_rd_append(). In sg_start_req() rename rw to r0w.
Plus associated changes demanded by checkpatch.pl
Reviewed-by: Hannes Reinecke
Signed-off-by: Douglas Gilbert
---
drivers/scsi/sg.c | 65 ++-
1
Convert sg_device::open_cnt into an atomic. Also rename
sg_tablesize into the more descriptive max_sgat_elems.
Reviewed-by: Hannes Reinecke
Signed-off-by: Douglas Gilbert
---
drivers/scsi/sg.c | 39 ---
1 file changed, 20 insertions(+), 19 deletions(-)
diff
28 matches
Mail list logo