As the function is responsible for executing the individual steps supplied
in the steps argument, execute_steps is a more descriptive name than the
rather generic next.
Signed-off-by: David Kozub
Reviewed-by: Scott Bauer
Reviewed-by: Christoph Hellwig
Reviewed-by: Jon Derrick
---
block/sed
Every step ends by calling cmd_finalize (via finalize_and_send)
yet every step adds the token OPAL_ENDLIST on its own. Moving
this into cmd_finalize decreases code duplication.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed-off-by: Jonas Rabenstein
Reviewed-by: Scott Bauer
From: Jonas Rabenstein
Add function address (and if available its symbol) to the message if a
step function fails.
Signed-off-by: Jonas Rabenstein
Signed-off-by: David Kozub
Reviewed-by: Scott Bauer
Reviewed-by: Christoph Hellwig
Reviewed-by: Jon Derrick fn(dev, step->d
Replace integer literals by Opal tokens defined in opal_proto.h where
possible.
Signed-off-by: David Kozub
---
block/sed-opal.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 5395ab1c5248..be0d633783c8 100644
Signed-off-by: David Kozub
Reviewed-by: Scott Bauer
Reviewed-by: Christoph Hellwig
Reviewed-by: Jon Derrick
---
block/sed-opal.c | 22 ++
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 1f246200b574..ad66d1dc725a
Originally each of the opal functions that call next include
opal_discovery0 in the array of steps. This is superfluous and
can be done always inside next.
Signed-off-by: David Kozub
---
block/sed-opal.c | 75 +++-
1 file changed, 42 insertions(+), 33
Define OPAL_LIFECYCLE token and use it instead of literals in
get_lsp_lifecycle.
Signed-off-by: David Kozub
---
block/opal_proto.h | 2 ++
block/sed-opal.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/block/opal_proto.h b/block/opal_proto.h
index e20be8258854
before return it would become
a dangling pointer. When the steps are passed as argument this
becomes easier to see and more difficult to misuse.
Signed-off-by: David Kozub
---
block/sed-opal.c | 158 +--
1 file changed, 69 insertions(+), 89 deletions
Instead of having multiple places defining the same argument list to get
a specific column of a sed-opal table, provide a generic version and
call it from those functions.
Co-authored-by: David Kozub
Signed-off-by: Jonas Rabenstein
Signed-off-by: David Kozub
Reviewed-by: Scott Bauer
Reviewed
response_get_token had already been in place, its functionality had
been duplicated within response_get_{u64,bytestring} with the same error
handling. Unify the handling by reusing response_get_token within the
other functions.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed
IOC_OPAL_ENABLE_DISABLE_MBR but this is typically used only once when
setting up an Opal drive.
Signed-off-by: David Kozub
Acked-by: Jon Derrick
---
block/sed-opal.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index e0de4dd448b3
response_get_{string,u64} include error handling for argument resp being
NULL but response_get_token does not handle this.
Make all three of response_get_{string,u64,token} handle NULL resp in
the same way.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed-off-by: Jonas
ps://lore.kernel.org/lkml/20190204150415.go31...@infradead.org/
[3]
https://lore.kernel.org/lkml/alpine.lrh.2.21.1902072247060.29...@linux.fjfi.cvut.cz/
[4] https://lore.kernel.org/lkml/20190204145244.gj31...@infradead.org/
David Kozub (12):
block: sed-opal: fix IOC_OPAL_ENABLE_DISABLE_MBR
block
This should make no change in functionality.
The formatting changes were triggered by checkpatch.pl.
Signed-off-by: David Kozub
Reviewed-by: Scott Bauer
Reviewed-by: Jon Derrick
---
block/sed-opal.c | 18 ++
include/uapi/linux/sed-opal.h | 2 +-
2 files changed
cmd_start and cmd_finalize respectively and thus must not be
additionally added.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed-off-by: Jonas Rabenstein
Reviewed-by: Scott Bauer
Reviewed-by: Christoph Hellwig
Acked-by: Jon Derrick
---
block/sed-opal.c | 228
From: Jonas Rabenstein
Also the values of OPAL_UID_LENGTH and OPAL_METHOD_LENGTH are the same,
it is weird to use OPAL_UID_LENGTH for the definition of the methods.
Signed-off-by: Jonas Rabenstein
Signed-off-by: David Kozub
Reviewed-by: Scott Bauer
Reviewed-by: Christoph Hellwig
Reviewed-by
From: Jonas Rabenstein
All add_token_* functions have a common set of conditions that have to
be checked. Use a common function for those checks in order to avoid
different behaviour as well as code duplication.
Co-authored-by: David Kozub
Signed-off-by: Jonas Rabenstein
Signed-off-by: David
On Sun, 10 Feb 2019, Scott Bauer wrote:
On Fri, Feb 08, 2019 at 12:44:14AM +, Derrick, Jonathan wrote:
On Thu, 2019-02-07 at 23:56 +0100, David Kozub wrote:
On Mon, 4 Feb 2019, Christoph Hellwig wrote:
static int opal_enable_disable_shadow_mbr(struct opal_dev *dev
On Fri, 8 Feb 2019, Derrick, Jonathan wrote:
On Fri, 2019-02-01 at 21:50 +0100, David Kozub wrote:
From: Jonas Rabenstein
Check whether the shadow mbr does fit in the provided space on the
target. Also a proper firmware should handle this case and return an
error we may prevent problems or
On Fri, 8 Feb 2019, Derrick, Jonathan wrote:
On Mon, 2019-02-04 at 23:44 +0100, David Kozub wrote:
On Mon, 4 Feb 2019, Christoph Hellwig wrote:
+ /* first do a discovery0 */
+ error = opal_discovery0_step(dev);
+ for (state = 0; !error && state < n_s
On Mon, 4 Feb 2019, Christoph Hellwig wrote:
On Fri, Feb 01, 2019 at 09:50:17PM +0100, David Kozub wrote:
From: Jonas Rabenstein
Enable users to mark the shadow mbr as done without completely
deactivating the shadow mbr feature. This may be useful on reboots,
when the power to the disk is
On Mon, 4 Feb 2019, Christoph Hellwig wrote:
On Fri, Feb 01, 2019 at 09:50:07PM +0100, David Kozub wrote:
This patch series extends SED OPAL support: it adds IOCTL for setting the shadow
MBR done flag which can be useful for unlocking an OPAL disk on boot and it adds
IOCTL for writing to the
On Mon, 4 Feb 2019, Christoph Hellwig wrote:
+ /* first do a discovery0 */
+ error = opal_discovery0_step(dev);
+ for (state = 0; !error && state < n_steps; state++)
+ error = execute_step(dev, &steps[state], state);
+
+ /*
+* For each OPAL command
On Mon, 4 Feb 2019, Christoph Hellwig wrote:
On Fri, Feb 01, 2019 at 09:50:10PM +0100, David Kozub wrote:
From: Jonas Rabenstein
All add_token_* functions have a common set of conditions that have to
be checked. Use a common function for those checks in order to avoid
different behaviour as
On Mon, 4 Feb 2019, Christoph Hellwig wrote:
On Fri, Feb 01, 2019 at 09:50:08PM +0100, David Kozub wrote:
This should make no change in functionality.
The formatting changes were triggered by checkpatch.pl.
Signed-off-by: David Kozub
Reviewed-by: Scott Bauer
---
block/sed-opal.c | 19
As the function is responsible for executing the individual steps supplied
in the steps argument, execute_steps is a more descriptive name than the
rather generic next.
Signed-off-by: David Kozub
Reviewed-by: Scott Bauer
---
block/sed-opal.c | 37 +++--
1 file
On Fri, 1 Feb 2019, David Kozub wrote:
This patch series extends SED OPAL support: it adds IOCTL for setting the shadow
MBR done flag which can be useful for unlocking an OPAL disk on boot and it adds
IOCTL for writing to the shadow MBR. Also included are some minor fixes and
improvements
As the function is responsible for executing the individual steps supplied
in the steps argument, execute_steps is a more descriptive name than the
rather generic next.
Signed-off-by: David Kozub
Reviewed-by: Scott Bauer
---
block/sed-opal.c | 37 +++--
1 file
Originally each of the opal functions that call next include
opal_discovery0 in the array of steps. This is superfluous and
can be done always inside next.
Signed-off-by: David Kozub
Reviewed-by: Scott Bauer
---
block/sed-opal.c | 89 +++-
1 file
From: Jonas Rabenstein
Check whether the shadow mbr does fit in the provided space on the
target. Also a proper firmware should handle this case and return an
error we may prevent problems or even damage with crappy firmwares.
Signed-off-by: Jonas Rabenstein
Reviewed-by: Scott Bauer
---
block
From: Jonas Rabenstein
Add function address (and if available its symbol) to the message if a
step function fails.
Signed-off-by: Jonas Rabenstein
Reviewed-by: Scott Bauer
---
block/sed-opal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/sed-opal.c b/block/sed
From: Jonas Rabenstein
All add_token_* functions have a common set of conditions that have to
be checked. Use a common function for those checks in order to avoid
different behaviour as well as code duplication.
Co-authored-by: David Kozub
Signed-off-by: Jonas Rabenstein
Signed-off-by: David
From: Jonas Rabenstein
Split the header generation from the (normal) memcpy part if a
bytestring is copied into the command buffer. This allows in-place
generation of the bytestring content. For example, copy_from_user may be
used without an intermediate buffer.
Signed-off-by: Jonas Rabenstein
before return it would become
a dangling pointer. When the steps are passed as argument this
becomes easier to see and more difficult to misuse.
Signed-off-by: David Kozub
Reviewed-by: Scott Bauer
---
block/sed-opal.c | 142 ---
1 file changed, 61
From: Jonas Rabenstein
Instead of having multiple places defining the same argument list to get
a specific column of a sed-opal table, provide a generic version and
call it from those functions.
Signed-off-by: Jonas Rabenstein
Reviewed-by: Scott Bauer
---
block/opal_proto.h | 2 +
block/sed
From: Jonas Rabenstein
Enable users to mark the shadow mbr as done without completely
deactivating the shadow mbr feature. This may be useful on reboots,
when the power to the disk is not disconnected in between and the shadow
mbr stores the required boot files. Of course, this saves also the
(fe
Kozub
Signed-off-by: Jonas Rabenstein
Signed-off-by: David Kozub
Reviewed-by: Scott Bauer
---
block/sed-opal.c | 89 ++-
include/linux/sed-opal.h | 1 +
include/uapi/linux/sed-opal.h | 8
3 files changed, 97 insertions(+), 1 deletion(-)
diff
cmd_start and cmd_finalize respectively and thus must not be
additionally added.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed-off-by: Jonas Rabenstein
Reviewed-by: Scott Bauer
---
block/sed-opal.c | 228 ++-
1 file changed, 69
response_get_{string,u64} include error handling for argument resp being
NULL but response_get_token does not handle this.
Make all three of response_get_{string,u64,token} handle NULL resp in
the same way.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed-off-by: Jonas
response_get_token had already been in place, its functionality had
been duplicated within response_get_{u64,bytestring} with the same error
handling. Unify the handling by reusing response_get_token within the
other functions.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed
Every step ends by calling cmd_finalize (via finalize_and_send)
yet every step adds the token OPAL_ENDLIST on its own. Moving
this into cmd_finalize decreases code duplication.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed-off-by: Jonas Rabenstein
Reviewed-by: Scott Bauer
From: Jonas Rabenstein
Also the values of OPAL_UID_LENGTH and OPAL_METHOD_LENGTH are the same,
it is weird to use OPAL_UID_LENGTH for the definition of the methods.
Signed-off-by: Jonas Rabenstein
Reviewed-by: Scott Bauer
---
block/sed-opal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
This should make no change in functionality.
The formatting changes were triggered by checkpatch.pl.
Signed-off-by: David Kozub
Reviewed-by: Scott Bauer
---
block/sed-opal.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/block/sed-opal.c b/block/sed
21149@hacktheplanet/
David Kozub (8):
block: sed-opal: fix typos and formatting
block: sed-opal: close parameter list in cmd_finalize
block: sed-opal: unify cmd start
block: sed-opal: unify error handling of responses
block: sed-opal: reuse response_get_token to decrease code duplication
On Sun, 27 Jan 2019, Scott Bauer wrote:
On Tue, Jan 22, 2019 at 11:31:31PM +0100, David Kozub wrote:
David Kozub (8):
block: sed-opal: fix typos and formatting
block: sed-opal: close parameter list in cmd_finalize
block: sed-opal: unify cmd start
block: sed-opal: unify error handling
As the function is responsible for executing the individual steps supplied
in the steps argument, execute_steps is a more descriptive name than the
rather generic next.
Signed-off-by: David Kozub
---
block/sed-opal.c | 37 +++--
1 file changed, 19 insertions
As the function is responsible for executing the individual steps supplied
in the steps argument, execute_steps is a more descriptive name than the
rather generic next.
Signed-off-by: David Kozub
---
block/sed-opal.c | 37 +++--
1 file changed, 19 insertions
response_get_{string,u64} include error handling for argument resp being
NULL but response_get_token does not handle this.
Make all three of response_get_{string,u64,token} handle NULL resp in
the same way.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed-off-by: Jonas
Originally each of the opal functions that call next include
opal_discovery0 in the array of steps. This is superfluous and
can be done always inside next.
Signed-off-by: David Kozub
---
block/sed-opal.c | 89 +++-
1 file changed, 43 insertions(+), 46
This should make no change in functionality.
The formatting changes were triggered by checkpatch.pl.
Signed-off-by: David Kozub
---
block/sed-opal.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index e0de4dd448b3
From: Jonas Rabenstein
Split the header generation from the (normal) memcpy part if a
bytestring is copied into the command buffer. This allows in-place
generation of the bytestring content. For example, copy_from_user may be
used without an intermediate buffer.
Signed-off-by: Jonas Rabenstein
before return it would become
a dangling pointer. When the steps are passed as argument this
becomes easier to see and more difficult to misuse.
Signed-off-by: David Kozub
---
block/sed-opal.c | 142 ---
1 file changed, 61 insertions(+), 81 deletions
From: Jonas Rabenstein
Add function address (and if available its symbol) to the message if a
step function fails.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 1332547e5a99
From: Jonas Rabenstein
Enable users to mark the shadow mbr as done without completely
deactivating the shadow mbr feature. This may be useful on reboots,
when the power to the disk is not disconnected in between and the shadow
mbr stores the required boot files. Of course, this saves also the
(fe
Every step ends by calling cmd_finalize (via finalize_and_send)
yet every step adds the token OPAL_ENDLIST on its own. Moving
this into cmd_finalize decreases code duplication.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c
response_get_token had already been in place, its functionality had
been duplicated within response_get_{u64,bytestring} with the same error
handling. Unify the handling by reusing response_get_token within the
other functions.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed
From: Jonas Rabenstein
Instead of having multiple places defining the same argument list to get
a specific column of a sed-opal table, provide a generic version and
call it from those functions.
Signed-off-by: Jonas Rabenstein
---
block/opal_proto.h | 2 +
block/sed-opal.c | 132 ++
cmd_start and cmd_finalize respectively and thus must not be
additionally added.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 228 ++-
1 file changed, 69 insertions(+), 159 deletions
Kozub
Signed-off-by: Jonas Rabenstein
Signed-off-by: David Kozub
---
block/sed-opal.c | 89 ++-
include/linux/sed-opal.h | 1 +
include/uapi/linux/sed-opal.h | 8
3 files changed, 97 insertions(+), 1 deletion(-)
diff --git a/block/sed-opal.c
From: Jonas Rabenstein
Check whether the shadow mbr does fit in the provided space on the
target. Also a proper firmware should handle this case and return an
error we may prevent problems or even damage with crappy firmwares.
Signed-off-by: Jonas Rabenstein
---
block/opal_proto.h | 16 +++
From: Jonas Rabenstein
All add_token_* functions have a common set of conditions that have to
be checked. Use a common function for those checks in order to avoid
different behaviour as well as code duplication.
Co-authored-by: David Kozub
Signed-off-by: Jonas Rabenstein
Signed-off-by: David
From: Jonas Rabenstein
Also the values of OPAL_UID_LENGTH and OPAL_METHOD_LENGTH are the same,
it is weird to use OPAL_UID_LENGTH for the definition of the methods.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/se
tried to do a more thorough testing, esp. with things like
wrong passwords/invalid values. I did not observe any crash or unexpected
behavior.
David Kozub (8):
block: sed-opal: fix typos and formatting
block: sed-opal: close parameter list in cmd_finalize
block: sed-opal: unify cmd start
On Sat, 19 Jan 2019, Scott Bauer wrote:
On Thu, Jan 17, 2019 at 09:31:55PM +, David Kozub wrote:
- for (state = 0; !error && state < n_steps; state++) {
- step = &steps[state];
-
- error = step->fn(dev, step->data);
-
On Sat, 19 Jan 2019, Scott Bauer wrote:
On Thu, Jan 17, 2019 at 09:31:51PM +, David Kozub wrote:
+static int write_shadow_mbr(struct opal_dev *dev, void *data)
+{
+ struct opal_shadow_mbr *shadow = data;
+ const u8 __user *src;
+ u8 *dst;
+ size_t off = 0
From: Jonas Rabenstein
Split the header generation from the (normal) memcpy part if a
bytestring is copied into the command buffer. This allows in-place
generation of the bytestring content. For example, copy_from_user may be
used without an intermediate buffer.
Signed-off-by: Jonas Rabenstein
response_get_{string,u64} include error handling for argument resp being
NULL but response_get_token does not handle this.
Make all three of response_get_{string,u64,token} handle NULL resp in
the same way.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed-off-by: Jonas
From: Jonas Rabenstein
Enable users to mark the shadow mbr as done without completely
deactivating the shadow mbr feature. This may be useful on reboots,
when the power to the disk is not disconnected in between and the shadow
mbr stores the required boot files. Of course, this saves also the
(fe
From: Jonas Rabenstein
Check whether the shadow mbr does fit in the provided space on the
target. Also a proper firmware should handle this case and return an
error we may prevent problems or even damage with crappy firmwares.
Signed-off-by: Jonas Rabenstein
---
block/opal_proto.h | 16 +++
From: Jonas Rabenstein
Instead of having multiple places defining the same argument list to get
a specific column of a sed-opal table, provide a generic version and
call it from those functions.
Signed-off-by: Jonas Rabenstein
---
block/opal_proto.h | 2 +
block/sed-opal.c | 132 ++
As the function is responsible for executing the individual steps supplied
in the steps argument, execute_steps is a more descriptive name than the
rather generic next.
Signed-off-by: David Kozub
---
block/sed-opal.c | 37 +++--
1 file changed, 19 insertions
before return it would become
a dangling pointer. When the steps are passed as argument this
becomes easier to see and more difficult to misuse.
Signed-off-by: David Kozub
---
block/sed-opal.c | 142 ---
1 file changed, 61 insertions(+), 81 deletions
Originally each of the opal functions that call next include
opal_discovery0 in the array of steps. This is superfluous and
can be done always inside next.
Signed-off-by: David Kozub
---
block/sed-opal.c | 88 +++-
1 file changed, 42 insertions(+), 46
Kozub
Signed-off-by: Jonas Rabenstein
Signed-off-by: David Kozub
---
block/sed-opal.c | 88 ++-
include/linux/sed-opal.h | 1 +
include/uapi/linux/sed-opal.h | 8
3 files changed, 96 insertions(+), 1 deletion(-)
diff --git a/block/sed-opal.c
From: Jonas Rabenstein
Add function address (and if available its symbol) to the message if a
step function fails.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 1332547e5a99
response_get_token had already been in place, its functionality had
been duplicated within response_get_{u64,bytestring} with the same error
handling. Unify the handling by reusing response_get_token within the
other functions.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed
cmd_start and cmd_finalize respectively and thus must not be
additionally added.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 228 ++-
1 file changed, 69 insertions(+), 159 deletions
From: Jonas Rabenstein
All add_token_* functions have a common set of conditions that have to
be checked. Use a common function for those checks in order to avoid
different behaviour as well as code duplication.
Co-authored-by: David Kozub
Signed-off-by: Jonas Rabenstein
Signed-off-by: David
From: Jonas Rabenstein
Also the values of OPAL_UID_LENGTH and OPAL_METHOD_LENGTH are the same,
it is weird to use OPAL_UID_LENGTH for the definition of the methods.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/se
This should make no change in functionality.
The formatting changes were triggered by checkpatch.pl.
Signed-off-by: David Kozub
---
block/sed-opal.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index e0de4dd448b3
Every step ends by calling cmd_finalize (via finalize_and_send)
yet every step adds the token OPAL_ENDLIST on its own. Moving
this into cmd_finalize decreases code duplication.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c
logize for the noise.
[1]
https://lore.kernel.org/lkml/cover.1521482295.git.jonas.rabenst...@studium.uni-erlangen.de/
[2]
https://lore.kernel.org/lkml/20180405203443.ye4gnw5aey2exlkn@sbauer-Z170X-UD5/
[3] https://github.com/ghostav/sed-opal-temp
David Kozub (8):
block: sed-opal: fix typos and
On Thu, 17 Jan 2019, Christoph Hellwig wrote:
the way the series appear looks odd, because it wasn't threaded or
even ordered, and the patches from Jonas seem to have been sent out
by you under his name. Can you resend them carefully threaded, all
mails from you with the additional from header
Every step ends by calling cmd_finalize (via finalize_and_send)
yet every step adds the token OPAL_ENDLIST on its own. Moving
this into cmd_finalize decreases code duplication.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c
response_get_{string,u64} include error handling for argument resp being
NULL but response_get_token does not handle this.
Make all three of response_get_{string,u64,token} handle NULL resp in
the same way.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed-off-by: Jonas
Originally each of the opal functions that call next include
opal_discovery0 in the array of steps. This is superfluous and
can be done always inside next.
Signed-off-by: David Kozub
---
block/sed-opal.c | 88 +++-
1 file changed, 42 insertions(+), 46
This should make no change in functionality.
The formatting changes were triggered by checkpatch.pl.
Signed-off-by: David Kozub
---
block/sed-opal.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index e0de4dd448b3
cmd_start and cmd_finalize respectively and thus must not be
additionally added.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 228 ++-
1 file changed, 69 insertions(+), 159 deletions
m.uni-erlangen.de/
[2]
https://lore.kernel.org/lkml/20180405203443.ye4gnw5aey2exlkn@sbauer-Z170X-UD5/
[3] https://github.com/ghostav/sed-opal-temp
David Kozub (8):
block: sed-opal: fix typos and formatting
block: sed-opal: close parameter list in cmd_finalize
block: sed-opal: unify cmd start
response_get_token had already been in place, its functionality had
been duplicated within response_get_{u64,bytestring} with the same error
handling. Unify the handling by reusing response_get_token within the
other functions.
Co-authored-by: Jonas Rabenstein
Signed-off-by: David Kozub
Signed
before return it would become
a dangling pointer. When the steps are passed as argument this
becomes easier to see and more difficult to misuse.
Signed-off-by: David Kozub
---
block/sed-opal.c | 142 ---
1 file changed, 61 insertions(+), 81 deletions
On Fri, 20 Oct 2017, Daniel Lezcano wrote:
On 20/10/2017 09:49, David Kozub wrote:
On Fri, 20 Oct 2017, Daniel Lezcano wrote:
On 20/10/2017 00:25, Thomas Gleixner wrote:
On Fri, 20 Oct 2017, Daniel Lezcano wrote:
On 19/10/2017 22:57, David Kozub wrote:
This solves a BUG on ALIX 2c3 where
Commit-ID: eb39a7c0355393c5a8d930f342ad7a6231b552c4
Gitweb: https://git.kernel.org/tip/eb39a7c0355393c5a8d930f342ad7a6231b552c4
Author: David Kozub
AuthorDate: Thu, 19 Oct 2017 22:57:02 +0200
Committer: Thomas Gleixner
CommitDate: Fri, 20 Oct 2017 13:41:52 +0200
clockevents/drivers
detached state. If the interrupt hits while the device is in detached
state it passes the safe guard and dereferences the event handler call
back which is NULL.
Add the missing state check.
Suggested-by: Thomas Gleixner
Signed-off-by: David Kozub
---
Changes in v2:
- Use commit message suggested by
On Fri, 20 Oct 2017, Daniel Lezcano wrote:
On 20/10/2017 00:25, Thomas Gleixner wrote:
On Fri, 20 Oct 2017, Daniel Lezcano wrote:
On 19/10/2017 22:57, David Kozub wrote:
This solves a BUG on ALIX 2c3 where mfgpt_tick is called before
clockevents_config_and_register returns. This caused
On Fri, 20 Oct 2017, Thomas Gleixner wrote:
On Thu, 19 Oct 2017, David Kozub wrote:
This solves a BUG on ALIX 2c3 where mfgpt_tick is called before
clockevents_config_and_register returns. This caused mfgpt_tick to call a
null function pointer.
Thanks to Daniel Lezcano and Thomas Gleixner
Signed-off-by: David Kozub
---
drivers/clocksource/cs5535-clockevt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/cs5535-clockevt.c
b/drivers/clocksource/cs5535-clockevt.c
index a1df588343f2..56100506b933 100644
--- a/drivers/clocksource/cs5535-clockevt.c
On Mon, 16 Oct 2017, Thomas Gleixner wrote:
On Thu, 12 Oct 2017, David Kozub wrote:
On Thu, 12 Oct 2017, Thomas Gleixner wrote:
On Thu, 12 Oct 2017, Daniel Lezcano wrote:
The real question is why
/* Set the clock scale and enable the event mode for CMP2 */
val = MFGPT_SCALE
On Thu, 12 Oct 2017, Thomas Gleixner wrote:
On Thu, 12 Oct 2017, Daniel Lezcano wrote:
On 11/10/2017 22:48, David Kozub wrote:
[ ... ]
+ disable_timer(timer);
+ cs5535_mfgpt_write(timer, MFGPT_REG_COUNTER, 0);
+
/* Set up the IRQ on the MFGPT side */
if
On Wed, 11 Oct 2017, Daniel Lezcano wrote:
On 10/10/2017 23:19, David Kozub wrote:
On Tue, 10 Oct 2017, Daniel Lezcano wrote:
On 09/10/2017 21:33, David Kozub wrote:
On Mon, 9 Oct 2017, Daniel Lezcano wrote:
On 07/10/2017 23:26, David Kozub wrote:
Hi all,
booting up kernel 4.14-rc3 with
1 - 100 of 103 matches
Mail list logo