Define new a type: uc_string_id for easier string
handling and less casting. Reduce number or string
copies in price of a dynamic allocation.
Signed-off-by: Tomas Winkler
---
drivers/scsi/ufs/ufs-sysfs.c | 20 ++---
drivers/scsi/ufs/ufs.h | 2 +-
drivers/scsi/ufs/ufshcd.c| 164
Add /* fallthrough */ annotation, to eliminate compilation warning:
warning: this statement may fall through [-Wimplicit-fallthrough=]
Signed-off-by: Tomas Winkler
---
drivers/scsi/ufs/ufshcd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs
/ufshcd.c:356:9:expected void const *buf
drivers/scsi/ufs/ufshcd.c:356:9:got void [noderef] *mmio_base
Signed-off-by: Tomas Winkler
---
drivers/scsi/ufs/ufs-qcom.c | 21 ++---
drivers/scsi/ufs/ufshcd.c | 35 ---
drivers/scsi/ufs/ufshcd.h
IS_ERR and ERR_PTR already forcefully cast their argument,
hence there is no need for additional (complex) casting.
Signed-off-by: Tomas Winkler
---
drivers/scsi/ufs/ufshcd-pltfrm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b
Fix compilation warning
drivers/scsi/ufs/ufshcd.c:7645:13: warning: comparison of unsigned
expression < 0 is always false [-Wtype-limits]
if ((value < UFS_PM_LVL_0) || (value >= UFS_PM_LVL_MAX))
Signed-off-by: Tomas Winkler
---
drivers/scsi/ufs/ufshcd.c | 2 +-
1 file changed, 1
-by: Tomas Winkler
---
drivers/scsi/ufs/ufs.h| 12
drivers/scsi/ufs/ufs_quirks.h | 28 ++--
drivers/scsi/ufs/ufshcd.c | 40 +++-
3 files changed, 37 insertions(+), 43 deletions(-)
diff --git a/drivers/scsi/ufs
Fix the following compilation warning:
drivers/scsi/ufs/ufshcd.c:2076:5: warning: no previous prototype for
‘ufshcd_query_descriptor_retry’ [-Wmissing-prototypes]
Also do not export the function, it should not be used out of ufs
context.
Signed-off-by: Tomas Winkler
---
drivers/scsi/ufs
Unexport ufshcd_read_device_desc and ufshcd_read_string_desc
there is no really possibility to calling them directly
outside of UFS context.
Signed-off-by: Tomas Winkler
---
drivers/scsi/ufs/ufshcd.c | 9 -
drivers/scsi/ufs/ufshcd.h | 7 ---
2 files changed, 4 insertions(+), 12
Reading big endian value from a buffer requires explicit cast.
Fix sparse warning:
drivers/scsi/ufs/ufshcd.c:4825:24: warning: cast to restricted __be16
Signed-off-by: Tomas Winkler
---
drivers/scsi/ufs/ufshcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi
V2: resend
V3: add more verbose description
V4: resend
V5: adjust date and kernel version
V6: adjust date and kernel version
V7: adjust date and kernel version
Signed-off-by: Tomas Winkler
---
Documentation/ABI/testing/sysfs-class-rpmb | 20
MAINTAINERS
Documentation
4. Addional small fixes described in individual patches.
Tomas Winkler (11):
rpmb: add Replay Protected Memory Block (RPMB) subsystem
rpmb: enable emmc specific read data fixup
rpmb: add sysfs-class ABI documentation
char: rpmb: add device attributes
char: rpmb: provide a user
short workflow description in the commit message
V3: commit message fix
V4: resend
V5: add rpmb sequence interface.
V6: 1. More info in the commit message
2. Define simulation device type
V7: resend
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
MAINTAINERS
For eMMC the block count of the RPMB read operation is not indicated in
the original RPMB Data Read Request packet.
This might be different then the implementation of other protocol
standards.
This patch implements a fixup for this behavior.
V6: new in the series
V7: resend
Signed-off-by: Tomas
dress should be set in the result frame.
4. Remove platform device
5. Update the commit message
V7: Resend.
Signed-off-by: Tomas Winkler
---
drivers/char/rpmb/Kconfig| 17 +
drivers/char/rpmb/Makefile | 1 +
drivers/char/rpmb/rpmb_sim.c
pointer.
2. Fix possible macro side-effect due to macro argument reuse.
Signed-off-by: Tomas Winkler
---
Documentation/ioctl/ioctl-number.txt | 1 +
MAINTAINERS | 1 +
drivers/char/rpmb/Kconfig| 7 +
drivers/char/rpmb/Makefile | 1 +
drivers
Maj
V5: update date and kernel version
V6: 1. Add simulation device type
2. Update date and kernel version
3. Use binary attribute for id
4. use simple sprintf instead of scnprintf
5. Add more verbose documenation
V7: resend
Signed-off-by: Tomas Winkler
---
Documentation/ABI
Add rpmb documentatin in sphinx format.
V7: new in the series
Signed-off-by: Tomas Winkler
---
Documentation/index.rst | 1 +
Documentation/rpmb/conf.py | 5 ++
Documentation/rpmb/index.rst | 18 ++
Documentation/rpmb/introduction.rst
commands.
V2: resend
V3: resend
V4: Kconfig: use select RPMB to ensure valid configuration
V5: Revamp code using new sequence command.
V6: Resend
V7: Resend
Signed-off-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
---
drivers/scsi/ufs/Kconfig | 1 +
drivers/scsi/ufs/ufshcd.c | 183
Retrieve maximum number of RPMB frames that can be
in a single request.
Currently the limitations is provided only for writes
via reliable_wr_cnt API.
V7: New in the series
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
drivers/scsi/ufs/ufs.h| 6 ++
drivers/scsi
: Revamp code using new sequence command
Support for 8K packets in e.MMC v5.1
V6: Resend.
V7: Resend.
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
drivers/mmc/card/Kconfig | 1 +
drivers/mmc/card/block.c | 258 ++-
2 files changed
instead of macro for rw blocking wrapper
Signed-off-by: Tomas Winkler
---
MAINTAINERS |1 +
tools/Makefile| 14 +-
tools/rpmb/.gitignore |2 +
tools/rpmb/Makefile | 34 ++
tools/rpmb/rpmb.c | 1035 +
5 files changed
For eMMC the block count of the RPMB read operation is not indicated in
the original RPMB Data Read Request packet.
This might be different then the implementation of other protocol
standards.
This patch implements a fixup for this behavior.
Signed-off-by: Tomas Winkler
---
V6: new in the
Register eMMC RPMB partition with the RPMB subsystem and provide
implementation for the RPMB access operations abstracting
actual multi step process.
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
V2: resend
V3: commit message fix
V4: Kconfig: use select RPMB to ensure valid
Add simple RPMB host testing tool. It can be used
to program key, write and read data block, and retrieve
write counter.
Signed-off-by: Tomas Winkler
---
V2: resend
V3: fix missing objtool
V4: add verbose option
V5: 1. Adjust to the new API.
2. Exercise both request and sequence ioctls.
V6
-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
V2: added short workflow description in the commit message
V3: commit message fix
V4: resend
V5: add rpmb sequence interface.
V6: 1. More info in the commit message
2. Define simulation device type
MAINTAINERS| 7
commands.
Signed-off-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
---
V2: resend
V3: resend
V4: Kconfig: use select RPMB to ensure valid configuration
V5: Revamp code using new sequence command.
V5: resend
drivers/scsi/ufs/Kconfig | 1 +
drivers/scsi/ufs/ufshcd.c | 183
for easier adjusting of the applications that
use MMC_IOC_MULTI_CMD ioctl.
Signed-off-by: Tomas Winkler
---
V2: use memdup_user
V3: commit message fix
V4: resend
V5: 1. Add RPMB_IOC_SEQ_CMD API.
2. Export uapi rpmb.h header
V6: 1. remove #include
2. Add ioctl documentation
Documentation
Signed-off-by: Tomas Winkler
---
V2: resend
V3: add more verbose description
V4: resend
V5: adjust date and kernel version
V6: adjust date and kernel version
Documentation/ABI/testing/sysfs-class-rpmb | 20
MAINTAINERS| 1 +
2 files changed
Add attribute type that displays underlay storage type technology
EMMC, UFS, and attribute id, that displays underlay storage device id.
For EMMC this would be content of CID and for UFS serial number from
the device descriptor.
Signed-off-by: Tomas Winkler
---
V2: resend
V3: set kernel version
dress should be set in the result frame.
4. Remove platform device
5. Update the commit message
Signed-off-by: Tomas Winkler
---
drivers/char/rpmb/Kconfig| 17 +
drivers/char/rpmb/Makefile | 1 +
drivers/char/rpmb/rpmb_sim.c | 744 +++
3
/ directory that exercises
these interfaces and a simulation device that implements the device part.
The code is also available from:
https://github.com/tomasbw/linux-mei.git rpmb
Tomas Winkler (9):
rpmb: add Replay Protected Memory Block (RPMB) subsystem
rpmb: enable emmc specific read data
commands.
Signed-off-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
---
V2: resend
V3: resend
V4: Kconfig: use select RPMB to ensure valid configuration
V5: Revamp code using new sequence command.
drivers/scsi/ufs/Kconfig | 1 +
drivers/scsi/ufs/ufshcd.c | 183
Register eMMC RPMB partition with the RPMB subsystem and provide
implementation for the RPMB access operations abstracting
actual multi step process.
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
V2: resend
V3: commit message fix
V4: Kconfig: use select RPMB to ensure valid
interfaces and a simulation device that implements the device part.
Tomas Winkler (8):
rpmb: add Replay Protected Memory Block (RPMB) subsystem
char: rpmb: add sysfs-class ABI documentation
char: rpmb: add device attributes
char: rpmb: provide a user space interface
char: rpmb: add RPMB
Signed-off-by: Tomas Winkler
---
V2: resend
V3: add more verbose description
V4: resend
V5: adjust date and kernel version
Documentation/ABI/testing/sysfs-class-rpmb | 20
MAINTAINERS| 1 +
2 files changed, 21 insertions(+)
create mode
Add simple RPMB host testing tool. It can be used
to program key, write and read data block, and retrieve
write counter.
Signed-off-by: Tomas Winkler
---
V2: resend
V3: fix missing objtool
V4: add verbose option
V5: 1. Adjust to the new API.
2. Exercise both request and sequence ioctls
This is a simple platform device used for testing
the RPMB subsystem.
The module currently supports two configuration options:
1. max_wr_blks: for specifying max blocks that can be written
in a single command
2. daunits: used to set storage capacity in 128K units.
Signed-off-by: Tomas Winkler
for easier adjusting of the applications that
use MMC_IOC_MULTI_CMD ioctl.
Signed-off-by: Tomas Winkler
---
V2: use memdup_user
V3: commit message fix
V4: resend
V5: 1. Add RPMB_IOC_SEQ_CMD API.
2. Export uapi rpmb.h header
Documentation/ioctl/ioctl-number.txt | 1 +
MAINTAINERS
Add attribute type that displays underlay storage type technology
EMMC, UFS, and attribute id, that displays underlay storage device id.
For EMMC this would be content of CID and for UFS serial number from
the device descriptor.
Signed-off-by: Tomas Winkler
---
V2: resend
V3: set kernel version
enables sending sequence of RPMB
standard frames.
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
V2: added short workflow description in the commit message
V3: commit message fix
V4: resend
V5: add rpmb sequence interface.
MAINTAINERS| 7 +
drivers/char
On Wed, Jun 22, 2016 at 3:25 PM, Arnd Bergmann wrote:
> On Wednesday, June 22, 2016 2:44:21 PM CEST Tomas Winkler wrote:
>> >
>> > There are more than 20 files that have the statement: case cpu_to_...
>> > Sparse complains about: case __builtin_bswap, not ab
On Wed, Jun 22, 2016 at 1:25 PM, Levy, Amir (Jer)
wrote:
> On 2016-06-22 Arnd Bergmann wrote:
>> On Wednesday, June 22, 2016 11:24:50 AM CEST Tomas Winkler wrote:
>> > On Tue, Jun 21, 2016 at 12:02 PM, Tomas Winkler
>> wrote:
>> > > On Tue, May 3, 2016
On Tue, Jun 21, 2016 at 12:02 PM, Tomas Winkler wrote:
> On Tue, May 3, 2016 at 9:36 AM, Arnd Bergmann wrote:
>> On Monday 02 May 2016 16:32:25 Andrew Morton wrote:
>>> On Tue, 03 May 2016 01:10:16 +0200 Arnd Bergmann wrote:
>>>
>>> > On Monday 0
On Tue, May 3, 2016 at 9:36 AM, Arnd Bergmann wrote:
> On Monday 02 May 2016 16:32:25 Andrew Morton wrote:
>> On Tue, 03 May 2016 01:10:16 +0200 Arnd Bergmann wrote:
>>
>> > On Monday 02 May 2016 16:02:18 Andrew Morton wrote:
>> > > On Mon, 02 May 2016 23:48:19 +0200 Arnd Bergmann wrote:
>> > >
IOCTL command similar to the one provided by
mmc/ioctl. h
This API may help applications such as
https://android.googlesource.com/trusty/app/storage/
To be obliviose to the underlaying HW storage technology.
There is a sample tool under tools/rpmb/ directory that exercises
this interface.
Tomas
W-LUN (UFS) with the RPMB layer providing an implementation
for send_rpmb_req() handler.
V2: added short workflow description in the commit message
V3: commit message fix
V4: resend
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
MAINTAINERS| 7 +
drivers
The user space API is achieved via single synchronous IOCTL.
The request is submitted in in_frames_ptr pointer and received
in out_frames_ptr.
V2: use memdup_user
V3: commit message fix
V4: resend
Signed-off-by: Tomas Winkler
---
Documentation/ioctl/ioctl-number.txt | 1 +
MAINTAINERS
is set automatically
V3: 1. Add shutdown handler (similar to ufshcd)
2. Commit message fix
V4: use select RPMB to ensure valid configuration
Signed-off-by: Tomas Winkler
---
drivers/char/rpmb/Kconfig| 10 +
drivers/char/rpmb/Makefile | 1 +
drivers/char/rpmb/rpmb_sim.c | 589
version to 4.8
Signed-off-by: Tomas Winkler
---
Documentation/ABI/testing/sysfs-class-rpmb | 24 +++
drivers/char/rpmb/core.c | 64 ++
2 files changed, 88 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-class-rpmb
b/Documentation/ABI
V2: resend
V3: add more verbose description
V4: update kernel version to 4.8
Signed-off-by: Tomas Winkler
---
Documentation/ABI/testing/sysfs-class-rpmb | 20
MAINTAINERS| 1 +
2 files changed, 21 insertions(+)
create mode 100644
Add simple RPMB host testing tool. It can be used
to program key, write and read data block, and retrieve
write counter.
V2: resend
V3: fix missing objtool
V4: add verbose option
Signed-off-by: Tomas Winkler
---
MAINTAINERS | 1 +
tools/Makefile| 14 +-
tools/rpmb
-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
drivers/mmc/card/Kconfig | 1 +
drivers/mmc/card/block.c | 292 +++
2 files changed, 293 insertions(+)
diff --git a/drivers/mmc/card/Kconfig b/drivers/mmc/card/Kconfig
index 5562308699bc
commands.
V2: resend
V3: resend
V4: Kconfig: use select RPMB to ensure valid configuration
Signed-off-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
---
drivers/scsi/ufs/Kconfig | 1 +
drivers/scsi/ufs/ufshcd.c | 219 ++
drivers/scsi/ufs/ufshcd.h
;scsi: ufs: add retry for query descriptors")'
Signed-off-by: Tomas Winkler
---
drivers/scsi/ufs/ufshcd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index f8fa72c31a9d..629140c11be6 100644
--- a/drivers/sc
Signed-off-by: Tomas Winkler
---
V2: resend
Documentation/ABI/testing/sysfs-class-rpmb | 15 +++
MAINTAINERS| 1 +
2 files changed, 16 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-class-rpmb
diff --git a/Documentation/ABI/testing
(ufs) with the RPMB layer providing an implementation
for send_rpmb_req() handler.
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
V2: added short workflow description in the commit message
MAINTAINERS| 7 +
drivers/char/Kconfig | 2 +
drivers/char
Add attribute type that displays underlay storage type technology
EMMC, UFS, and attribute id, that displays underlay storage device id.
For EMMC this would be content of CID and for UFS serial number from
the device descriptor
Signed-off-by: Tomas Winkler
---
V2: resend
Documentation/ABI
The user space API is achieved via single synchronous IOCTL.
The request is submitted in_frames_ptr pointer and received
in out_frames_ptr.
Signed-off-by: Tomas Winkler
---
V2: use memdup_user
Documentation/ioctl/ioctl-number.txt | 1 +
MAINTAINERS | 1 +
drivers
Register eMMC rpmb partition with the rpmb subsystem and provide
implementation for the RPMB access operations abstracting
actual multi step process.
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
V2: resend
drivers/mmc/card/block.c | 289
Add simple RPMB host testing tool. It can be used
to program key, write and read data block, and retrieve
write counter.
Signed-off-by: Tomas Winkler
---
V2: resend
MAINTAINERS | 1 +
tools/Makefile| 16 +-
tools/rpmb/.gitignore | 2 +
tools/rpmb/Makefile | 32
This is simple platform device for used for testing
rpmb subystem.
The module currently suppot two configuration options
1.max_wr_blks: for specifying max blocks that can be written
in a single command and.
2. daunits: used to set storage capacity in 128K units.
Signed-off-by: Tomas Winkler
commands.
Signed-off-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
---
V2: resend
drivers/scsi/ufs/ufshcd.c | 219 ++
drivers/scsi/ufs/ufshcd.h | 2 +
2 files changed, 221 insertions(+)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs
IOCTL command similar to the one provided by
mmc/ioctl. h
There is a sample tool under tools/rpmb/ directory that exercises
this interface.
Tomas Winkler (8):
rpmb: add Replay Protected Memory Block (RPMB) subsystem
char: rpmb: add sysfs-class ABI documentation
char: rpmb: add device attributes
Add attribute type that displays underlay storage type technology
EMMC, UFS, and attribute id, that displays underlay storage device id.
For EMMC this would be content of CID and for UFS serial number from
the device descriptor
Signed-off-by: Tomas Winkler
---
Documentation/ABI/testing/sysfs
Register eMMC rpmb partition with the rpmb subsystem and provide
implementation for the RPMB access operations abstracting
actual multi step process.
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
drivers/mmc/card/block.c | 289
Add simple RPMB host testing tool. It can be used
to program key, write and read data block, and retrieve
write counter.
Signed-off-by: Tomas Winkler
---
MAINTAINERS | 1 +
tools/Makefile| 16 +-
tools/rpmb/.gitignore | 2 +
tools/rpmb/Makefile | 32 ++
tools/rpmb
class_interface_register ().
A parallel user space API is provided via /dev/rpmbX character
device with a single IOCTL command similar to the one provided by
mmc/ioctl. h
There is a sample tool under tools/rpmb/ directory that exercises
this interface.
Tomas Winkler (8):
rpmb: add Replay Protected Memory Block (RPMB
The user space API is achieved via single synchronous IOCTL.
The request is submitted in_frames_ptr pointer and received
in out_frames_ptr.
Signed-off-by: Tomas Winkler
---
Documentation/ioctl/ioctl-number.txt | 1 +
MAINTAINERS | 1 +
drivers/char/rpmb/Kconfig
Signed-off-by: Tomas Winkler
---
Documentation/ABI/testing/sysfs-class-rpmb | 15 +++
MAINTAINERS| 1 +
2 files changed, 16 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-class-rpmb
diff --git a/Documentation/ABI/testing/sysfs
commands.
Signed-off-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
---
drivers/scsi/ufs/ufshcd.c | 219 ++
drivers/scsi/ufs/ufshcd.h | 2 +
2 files changed, 221 insertions(+)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index
class_interface_register ().
A storage device registers its RPMB hardware (emmc) partition or
RPMB W-LUN (ufs) with the RPMB layer providing an implementation
for send_rpmb_req() handler.
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
MAINTAINERS| 7 +
drivers/char
This is simple platform device for used for testing
rpmb subystem.
The module currently suppot two configuration options
1.max_wr_blks: for specifying max blocks that can be written
in a single command and.
2. daunits: used to set storage capacity in 128K units.
Signed-off-by: Tomas Winkler
QUERY_DESC_GEOMETRY_MAZ_SIZE
QUERY_DESC_GEOMETRY_MAX_SIZE
Signed-off-by: Tomas Winkler
---
drivers/scsi/ufs/ufs.h| 2 +-
drivers/scsi/ufs/ufshcd.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
index 42c459a9d3fe
Signed-off-by: Tomas Winkler
---
drivers/scsi/ufs/ufshcd.c | 4 ++--
drivers/scsi/ufs/ufshcd.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index a44153401aee..07f1fa438fec 100644
--- a/drivers/scsi/ufs/ufshcd.c
use SCSI_W_LUN_REPORT_LUNS from scsi.h instead of localy defined
SAM2_WLUN_REPORT_LUNS
Signed-off-by: Tomas Winkler
Acked-by: Douglas Gilbert
---
drivers/scsi/scsi_debug.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi
Signed-off-by: Tomas Winkler
Acked-by: Douglas Gilbert
---
drivers/scsi/scsi_debug.c | 10 +++---
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index bbe04dae040c..e2c509e39765 100644
--- a/drivers/scsi/scsi_debug.c
+++ b
The use case to report 'REPORT LUNS WLUN' described
in scsi_debug documentation didn't work because:
scsi_scan_host_selected() checks for:
lun < shost->max_lun
To fix this we set:
max_lun = SCSI_W_LUN_REPORT_LUNS + 1;
Signed-off-by: Tomas Winkler
Acke
The function should never be called with cmnd NULL so
put a fat WARN there.
Fix also smatch wraning:
schedule_resp() warn: variable dereferenced before check 'cmnd'
Cc: Douglas Gilbert
Signed-off-by: Tomas Winkler
Acked-by: Douglas Gilbert
---
drivers/scsi/scsi_debug.c | 13 ++
Use pr_fmt with both module name and __func__
Also drop few bare printk leftovers
The log format should stay pretty much intact
Signed-off-by: Tomas Winkler
Acked-by: Douglas Gilbert
---
drivers/scsi/scsi_debug.c | 118 +-
1 file changed, 53
fixes warning:
warning: no previous prototype for ‘dump_sector’
Signed-off-by: Tomas Winkler
Acked-by: Douglas Gilbert
---
drivers/scsi/scsi_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index e2c509e39765
Fixes the following warning
In function ‘resp_requests’:
drivers/scsi//scsi_debug.c:1432:15: warning: variable ‘want_dsense’ set
but not used [-Wunused-but-set-variable]
bool dsense, want_dsense;
Signed-off-by: Tomas Winkler
---
drivers/scsi/scsi_debug.c | 3 +--
1 file changed, 1 insertion
To add wlun during probe, call sdebug_register_w_lun(WLUN);
prior to setting max luns
hpnt->max_lun = sdebug_max_luns();
Cc: Douglas Gilbert
Signed-off-by: Tomas Winkler
---
drivers/scsi/scsi_debug.c | 105 --
1 file changed, 82 insertions(+),
Add ufs wluns: ufs, boot, and rpmb
enabled by boolean ufs module parameter.
Cc: Douglas Gilbert
Signed-off-by: Tomas Winkler
---
drivers/scsi/scsi_debug.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 5d1bb12adc43
Cc: Christoph Hellwig
Cc: Douglas Gilbert
Signed-off-by: Tomas Winkler
---
drivers/scsi/scsi_debug.c | 24 ++--
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 079934c8698e..0825c0a62a33 100644
Add setters and getters for host data of scsi_device
and scsi_target in spirit of dev_set/get_drvdata
Cc: Christoph Hellwig
Cc: Douglas Gilbert
Signed-off-by: Tomas Winkler
---
include/scsi/scsi_device.h | 21 +
1 file changed, 21 insertions(+)
diff --git a/include/scsi
1. Remove duplicated boundary checks which simplify
the fill-in loop
2. Use more of scsi generic API
Cc: Douglas Gilbert
Signed-off-by: Tomas Winkler
---
V2: keep alloc_len < 4 as required by SPC-4 and newer
drivers/scsi/scsi_debug.c | 119 +-
1. Fix the error check: the alloc length should be > 16
and not > 4
2. Remove duplicated boundary checks which simplify
the fill-in loop
3. Use more of scsi generic API
Signed-off-by: Tomas Winkler
---
drivers/scsi/scsi_debug.c | 119 +-
The function should never be called with cmnd NULL so
put a fat WARN there.
Fix also smatch wraning:
schedule_resp() warn: variable dereferenced before check 'cmnd'
Cc: Douglas Gilbert
Signed-off-by: Tomas Winkler
---
V2: 1. Actually drop struct scsi_device *sdp = cmnd->device;
The use case to report 'REPORT LUNS WLUN' described
in scsi_debug documentation didn't work because:
scsi_scan_host_selected() checks for:
lun < shost->max_lun
To fix this we set:
max_lun = SCSI_W_LUN_REPORT_LUNS + 1;
Signed-off-by: Tomas Winkler
---
driv
The function should never be called with cmnd NULL so
put a fat WARN there.
Fix also smatch wraning:
schedule_resp() warn: variable dereferenced before check 'cmnd'
Signed-off-by: Tomas Winkler
---
drivers/scsi/scsi_debug.c | 11 +--
1 file changed, 9 insertions(+), 2 deletion
I did some minor code cleanups while playing with
scsi_debug module
Tomas Winkler (4):
scsi_debug: define pr_fmt() for consistent logging
scsi_debug: use SCSI_W_LUN_REPORT_LUNS instead of
SAM2_WLUN_REPORT_LUNS;
scsi_debug: vfree is null safe so drop the check
scsi_debug: make
use SCSI_W_LUN_REPORT_LUNS from scsi.h instead of localy defined
SAM2_WLUN_REPORT_LUNS
Signed-off-by: Tomas Winkler
---
drivers/scsi/scsi_debug.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index
fixes warning:
warning: no previous prototype for ‘dump_sector’
Signed-off-by: Tomas Winkler
---
drivers/scsi/scsi_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 80410f9588ba..ccbe1282e975 100644
--- a
Use pr_fmt with both module name and __func__
Also drop few bare printk leftovers
The log format should stay pretty much intact
Signed-off-by: Tomas Winkler
---
drivers/scsi/scsi_debug.c | 118 +-
1 file changed, 53 insertions(+), 65 deletions
Signed-off-by: Tomas Winkler
---
drivers/scsi/scsi_debug.c | 10 +++---
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 11774cd1741a..80410f9588ba 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
On Wed, Feb 18, 2015 at 7:38 PM, David Milburn wrote:
> On 02/18/2015 07:22 AM, Tomas Winkler wrote:
>>
>> reference count warning when removing scsi_debug device
>>
>> ARNING: CPU: 2 PID: 16732 at kernel/module.c:954 module_put+0xc9/0xd0()
>> [150550.9180
reference count warning when removing scsi_debug device
ARNING: CPU: 2 PID: 16732 at kernel/module.c:954 module_put+0xc9/0xd0()
[150550.918033] Modules linked in: scsi_debug(-) pci_stub vboxpci(O)
vboxnetadp(O) vboxnetflt(O) vboxdrv(O) nfsv3 rfcomm bnep bluetooth
rpcsec_gss_krb5 nfsv4 hid_generic
Can you be more specific about Linux programming API
Thanks
On Mon, Dec 15, 2014 at 6:19 AM, Kyuho Choi wrote:
> As i know, SECURITY PROTOCOL IN/OUT are support RPMB access for UFS.
>
> On 12/14/14, Tomas Winkler wrote:
>> Hi, sorry fore a newbie question.
>> What is the
Hi, sorry fore a newbie question.
What is the current interface for accessing rpmb LUN in a UFS devices.
For emmc one need to issue a raw mmc ioctl command MMC_IOC_CMD.
Thanks
Tomas
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger
99 matches
Mail list logo