FAILED: patch "[PATCH] s390/dasd: Re-initialize RCD buffer with "V1.0" before every" failed to apply to 7.3-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 7.3-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-7.3.y
git checkout FETCH_HEAD
git cherry-pick -x 25cdc1f63227a1ea69a1ec823a8a860e33299169
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026112513-parasite-blouse-1597@gregkh' --subject-prefix 'PATCH 7.3.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 25cdc1f63227a1ea69a1ec823a8a860e33299169 Mon Sep 17 00:00:00 2001
From: Stefan Haberland <[email protected]>
Date: Thu, 12 Nov 2026 11:26:06 +0100
Subject: [PATCH] s390/dasd: Re-initialize RCD buffer with "V1.0" before every
start
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Under z/VM the Read Configuration Data (RCD) buffer has to start with EBCDIC "V1.0" to request the virtual device SNEQ that carries the minidisk UIT. The request and the response share the same buffer:
CP evaluates the magic on the way out and the RCD data is written into the same buffer on the way back.
The magic is only written when the request is built and again in read_conf_cb() when the original request fails.
Several restart paths do not run that callback:
- ERP use the same buffer and if the same error occurs again, the ERP restarts the existing ERP request;
if a different error occurs, it adds another ERP request. Neither re-initializes the magic.
- Terminated (timed out) ERP requests, killed requests and requests requeued after the last path was gone are restarted without it.
- dasd_sleep_on_immediately() overwrites cqr->callback, so read_conf_cb() never ran for dasd_eckd_read_conf_immediately(), and its fastpath retries in dasd_int_handler() do not call a callback either.
If such a restart succeeds, z/VM omits the virtual device SNEQ, the UID of that path is built without the UIT and the paths are reported as "Not all channel paths lead to the same device" although they lead to the same minidisk.
Every start of a request, whatever path led to it, goes through dasd_start_IO(). Add an optional prepare_io function to the request that dasd_start_IO() calls before every start of the request and of its ERP requests, and use it to write the magic for RCD requests.
The ERP handling stays unchanged. read_conf_cb() is no longer needed and is removed, which also gets rid of its memset() that only cleared a single byte.
drivers/s390/block/dasd.c +1 -0
@@ -1396,6 +1396,7 @@ int dasd_start_IO(struct dasd_ccw_req *cqr) cqr->status =DASD_CQR_ERROR ;return -EIO ; } +dasd_start_IO_prepare (cqr); cqr->startclk =get_tod_clock (); cqr->starttime = jiffies; cqr->retries--;
drivers/s390/block/dasd_eckd.c +18 -34
85 lines not on this page · raw message
drivers/s390/block/dasd_int.h +15 -0
@@ -147,6 +147,8 @@ struct dasd_ccw_req {void *data;/* pointer to data area */ struct irb irb;/* device status in case of an error */ struct dasd_ccw_req *refers;/* ERP-chain queueing. */ +/* optional prepare function called before every start_io, must not sleep */ +void (*prepare_io)(struct dasd_ccw_req *cqr);void *function;/* originating ERP action */ void *mem_chunk;
@@ -892,6 +894,19 @@ static inline void *dasd_get_callback_data(struct dasd_ccw_req *cqr)return cqr->callback_data; } +/* +* Walk down the ERP chain to the original CQR and call its +* prepare_io function if set. +*/ +static inline void dasd_start_IO_prepare (struct dasd_ccw_req *cqr) +{ +/* ERP requests use the prepare function of the original request */ +while (cqr->refers) + cqr = cqr->refers; +if (cqr->prepare_io) + cqr->prepare_io (cqr); +} +static inline bool dasd_req_conflict (struct dasd_ccw_req *cqr1,struct dasd_ccw_req *cqr2) {
Sasha Levin
maintainerPATCH 1/2 s390/dasd: Fix typo 'immediatly' -> 'immediately'
From: Stefan Haberland <[email protected]>
[ Upstream commit ae6f19236b5ae4eef4df2780d51bee19add0eba8 ]
Fix typo in function name dasd_sleep_on_immediatly().
Stable-dep-of: 25cdc1f63227 ("s390/dasd: Re-initialize RCD buffer with "V1.0" before every start")
--- drivers/s390/block/dasd.c | 4 ++-- drivers/s390/block/dasd_alias.c | 2 +- drivers/s390/block/dasd_eckd.c | 14 +++++++------- drivers/s390/block/dasd_int.h | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-)
drivers/s390/block/dasd.c +2 -2
@@ -2576,7 +2576,7 @@ static inline int _dasd_term_running_cqr(struct dasd_device *device)return rc; } -int dasd_sleep_on_immediatly (struct dasd_ccw_req *cqr) +int dasd_sleep_on_immediately (struct dasd_ccw_req *cqr) {struct dasd_device *device;int rc;
@@ -2628,7 +2628,7 @@ int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr)return rc; } -EXPORT_SYMBOL (dasd_sleep_on_immediatly); +EXPORT_SYMBOL (dasd_sleep_on_immediately);/* * Cancels a request that was started with dasd_sleep_on_req.
drivers/s390/block/dasd_alias.c +1 -1
@@ -750,7 +750,7 @@ static int reset_summary_unit_check(struct alias_lcu *lcu, cqr->buildclk =get_tod_clock (); cqr->status =DASD_CQR_FILLED ; - rc =dasd_sleep_on_immediatly (cqr); + rc =dasd_sleep_on_immediately (cqr);return rc; }
drivers/s390/block/dasd_eckd.c +7 -7
@@ -922,7 +922,7 @@ static int dasd_eckd_read_conf_immediately(struct dasd_device *device,set_bit (DASD_CQR_ALLOW_SLOCK , &cqr->flags); cqr->retries =5 ; cqr->callback = read_conf_cb; - rc =dasd_sleep_on_immediatly (cqr); + rc =dasd_sleep_on_immediately (cqr);return rc; }
@@ -6009,7 +6009,7 @@ __context_unsafe(/* Conditional locking */) cqr->buildclk =get_tod_clock (); cqr->status =DASD_CQR_FILLED ; - rc =dasd_sleep_on_immediatly (cqr); + rc =dasd_sleep_on_immediately (cqr);if (!rc)clear_bit (DASD_FLAG_IS_RESERVED , &device->flags);
@@ -6065,7 +6065,7 @@ __context_unsafe(/* Conditional locking */) cqr->buildclk =get_tod_clock (); cqr->status =DASD_CQR_FILLED ; - rc =dasd_sleep_on_immediatly (cqr); + rc =dasd_sleep_on_immediately (cqr);if (!rc)set_bit (DASD_FLAG_IS_RESERVED , &device->flags);
@@ -6120,7 +6120,7 @@ __context_unsafe(/* Conditional locking */) cqr->buildclk =get_tod_clock (); cqr->status =DASD_CQR_FILLED ; - rc =dasd_sleep_on_immediatly (cqr); + rc =dasd_sleep_on_immediately (cqr);if (!rc)set_bit (DASD_FLAG_IS_RESERVED , &device->flags);
@@ -6184,7 +6184,7 @@ __context_unsafe(/* Conditional locking */) cqr->status =DASD_CQR_FILLED ; cqr->lpm = usrparm.path_mask; - rc =dasd_sleep_on_immediatly (cqr); + rc =dasd_sleep_on_immediately (cqr);/* verify that I/O processing didn't modify the path mask */ if (!rc && usrparm.path_mask && (cqr->lpm != usrparm.path_mask)) rc = -EIO ;
@@ -6816,7 +6816,7 @@ static int dasd_eckd_read_message_buffer(struct dasd_device *device, cqr->block =NULL ; cqr->expires =10 *HZ ;set_bit (DASD_CQR_VERIFY_PATH , &cqr->flags); -/* dasd_sleep_on_immediatly does not do complex error +/* dasd_sleep_on_immediately does not do complex error * recovery so clear erp flag and set retry counter to * do basic erp */ clear_bit (DASD_CQR_FLAGS_USE_ERP , &cqr->flags);
@@ -6848,7 +6848,7 @@ static int dasd_eckd_read_message_buffer(struct dasd_device *device, cqr->buildclk =get_tod_clock (); cqr->status =DASD_CQR_FILLED ; - rc =dasd_sleep_on_immediatly (cqr); + rc =dasd_sleep_on_immediately (cqr);if (rc ==0 ) { prssdp = (struct dasd_psf_prssd_data *) cqr->data; message_buf = (struct dasd_rssd_messages *)
drivers/s390/block/dasd_int.h +1 -1
@@ -998,7 +998,7 @@ void dasd_schedule_device_bh(struct dasd_device *);void dasd_schedule_block_bh (struct dasd_block *);int dasd_sleep_on (struct dasd_ccw_req *);int dasd_sleep_on_queue (struct list_head *); -int dasd_sleep_on_immediatly (struct dasd_ccw_req *); +int dasd_sleep_on_immediately (struct dasd_ccw_req *);int dasd_sleep_on_queue_interruptible (struct list_head *);int dasd_sleep_on_interruptible (struct dasd_ccw_req *);void dasd_device_set_timer (struct dasd_device *,int );
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 2/2 s390/dasd: Re-initialize RCD buffer with "V1.0" before every start
From: Stefan Haberland <[email protected]>
[ Upstream commit 25cdc1f63227a1ea69a1ec823a8a860e33299169 ]
Under z/VM the Read Configuration Data (RCD) buffer has to start with EBCDIC "V1.0" to request the virtual device SNEQ that carries the minidisk UIT. The request and the response share the same buffer:
CP evaluates the magic on the way out and the RCD data is written into the same buffer on the way back.
The magic is only written when the request is built and again in read_conf_cb() when the original request fails.
Several restart paths do not run that callback:
- ERP use the same buffer and if the same error occurs again, the ERP restarts the existing ERP request;
if a different error occurs, it adds another ERP request. Neither re-initializes the magic.
- Terminated (timed out) ERP requests, killed requests and requests requeued after the last path was gone are restarted without it.
- dasd_sleep_on_immediately() overwrites cqr->callback, so read_conf_cb() never ran for dasd_eckd_read_conf_immediately(), and its fastpath retries in dasd_int_handler() do not call a callback either.
If such a restart succeeds, z/VM omits the virtual device SNEQ, the UID of that path is built without the UIT and the paths are reported as "Not all channel paths lead to the same device" although they lead to the same minidisk.
Every start of a request, whatever path led to it, goes through dasd_start_IO(). Add an optional prepare_io function to the request that dasd_start_IO() calls before every start of the request and of its ERP requests, and use it to write the magic for RCD requests.
The ERP handling stays unchanged. read_conf_cb() is no longer needed and is removed, which also gets rid of its memset() that only cleared a single byte.
--- drivers/s390/block/dasd.c | 1 + drivers/s390/block/dasd_eckd.c | 52 ++++++++++++---------------------- drivers/s390/block/dasd_int.h | 15 ++++++++++ 3 files changed, 34 insertions(+), 34 deletions(-)
drivers/s390/block/dasd.c +1 -0
@@ -1396,6 +1396,7 @@ int dasd_start_IO(struct dasd_ccw_req *cqr) cqr->status =DASD_CQR_ERROR ;return -EIO ; } +dasd_start_IO_prepare (cqr); cqr->startclk =get_tod_clock (); cqr->starttime = jiffies; cqr->retries--;
drivers/s390/block/dasd_eckd.c +18 -34
85 lines not on this page · raw message
drivers/s390/block/dasd_int.h +15 -0
@@ -147,6 +147,8 @@ struct dasd_ccw_req {void *data;/* pointer to data area */ struct irb irb;/* device status in case of an error */ struct dasd_ccw_req *refers;/* ERP-chain queueing. */ +/* optional prepare function called before every start_io, must not sleep */ +void (*prepare_io)(struct dasd_ccw_req *cqr);void *function;/* originating ERP action */ void *mem_chunk;
@@ -892,6 +894,19 @@ static inline void *dasd_get_callback_data(struct dasd_ccw_req *cqr)return cqr->callback_data; } +/* +* Walk down the ERP chain to the original CQR and call its +* prepare_io function if set. +*/ +static inline void dasd_start_IO_prepare (struct dasd_ccw_req *cqr) +{ +/* ERP requests use the prepare function of the original request */ +while (cqr->refers) + cqr = cqr->refers; +if (cqr->prepare_io) + cqr->prepare_io (cqr); +} +static inline bool dasd_req_conflict (struct dasd_ccw_req *cqr1,struct dasd_ccw_req *cqr2) {
Signature · 1 line
2.53.0