The open_for_audio and open_for_data copies are bitrotten in different
ways already and will need to update the autoclose logic in both.
Signed-off-by: Michal Suchanek
---
drivers/cdrom/cdrom.c | 96 +++
1 file changed, 34 insertions(+), 62 deletions
error when it detects the tray is
blocked. At worst the wait can be interrupted by the user.
Also wait for the drive to become ready once the tray closes.
Signed-off-by: Michal Suchanek
---
v2:
- check drive_status exists before using it
- rename tray_close -> cdrom_tray_close
- also wait
mount
or dd which has no business knowing which devices are CD-roms and where
the autoclose setting is in the kernel.
Michal Suchanek (8):
cdrom: add poll_event_interruptible
cdrom: factor out common open_for_* code
cdrom: wait for the tray to close
cdrom: separate autoclose into an IOCTL
-by: Michal Suchanek
---
Documentation/filesystems/locking.rst | 2 ++
fs/block_dev.c| 21 +
include/linux/blkdev.h| 1 +
3 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/Documentation/filesystems/locking.rst
b
This IOCTL will be used internally by the sr driver but there is no
reason to not document it for userspace.
Signed-off-by: Michal Suchanek
---
Documentation/ioctl/cdrom.rst | 25 +
1 file changed, 25 insertions(+)
diff --git a/Documentation/ioctl/cdrom.rst b
Add convenience macro for polling an event that does not have a
waitqueue.
Signed-off-by: Michal Suchanek
---
drivers/cdrom/cdrom.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index ac42ae4651ce..2ad6b73482fe 100644
--- a
door_open is interpreted as open tray. This is fine so long as tray_move
would close the tray when requested or report an error which never
happens on VMware ESXi servers (5.5 and 6.5 tested).
This is a popular virtualization platform so a workaround is worthwhile.
Signed-off-by: Michal Suchanek
-
Use the autoclose IOCLT provided by cdrom driver to wait for drive to
close in open_finish, and attempt to open once more after the door
closes.
Signed-off-by: Michal Suchanek
---
drivers/scsi/sr.c | 54 ---
1 file changed, 42 insertions(+), 12
: Michal Suchanek
---
drivers/cdrom/cdrom.c | 83 +-
include/uapi/linux/cdrom.h | 1 +
2 files changed, 48 insertions(+), 36 deletions(-)
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index c0fc9a02b70c..bd8813b5afdb 100644
--- a/drivers/cdrom
CDS_DRIVE_NOT_READY is used for the state in which CDROM is 'becoming
ready' (typically analyzing the disc) but also as the fallback when
nothing else applies. Introduce CDS_DRIVE_ERROR for the fallback case.
Signed-off-by: Michal Suchanek
---
Documentation/cdrom/cdrom-standa
Add convenience macro for polling an event that does not have a
waitqueue.
Signed-off-by: Michal Suchanek
---
include/linux/delay.h | 12
1 file changed, 12 insertions(+)
diff --git a/include/linux/delay.h b/include/linux/delay.h
index b78bab4395d8..3ae9fa395628 100644
--- a
reports an error when it detects
the tray is blocked. At worst the wait can be interrupted by user.
Signed-off-by: Michal Suchanek
---
v2:
- check drive_status exists before using it
- rename tray_close -> cdrom_tray_close
---
drivers/cdrom/cdrom.c | 21 +++--
1 file changed,
CDS_DRIVE_NOT_READY is used for the state in which CDROM is 'becoming
ready' (typically analyzing the disc) but also as the fallback when
nothing else applies. Introduce CDS_DRIVE_ERROR for the fallback case.
Signed-off-by: Michal Suchanek
---
drivers/block/paride/pcd.c | 2 +-
dri
When the drive closes it can take tens of seconds until the disc is
analyzed. Wait for the drive to become ready or report an error.
Signed-off-by: Michal Suchanek
---
drivers/cdrom/cdrom.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom
The open_for_audio and open_for_data copies are bitrotten in different
ways already and will need to update the autoclose logic in both.
Signed-off-by: Michal Suchanek
---
drivers/cdrom/cdrom.c | 100 ++
1 file changed, 36 insertions(+), 64
ate from the harware specific
drivers.
First time I did not get any feedback for the patches. I found a defect in
tray_close - it used status function without checking it exists. So resending
with the defect corrected.
Michal Suchanek (6):
delay: add poll_event_interruptible
cdrom: factor out co
tate which is knowledge that never leaves the
hardware-specific driver and is passed neither to userspace nor the generic
cdrom driver.
So this patchset fixes the kernel autoclose implementation in cdrom.c and to
do so reports the "drive becoming ready" state from the harware speci
Signed-off-by: Michal Suchanek
---
Documentation/admin-guide/kernel-parameters.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.rst
b/Documentation/admin-guide/kernel-parameters.rst
index b2598cc9834c..722d3f771924 100644
Signed-off-by: Michal Suchanek
---
Documentation/powerpc/firmware-assisted-dump.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/powerpc/firmware-assisted-dump.txt
b/Documentation/powerpc/firmware-assisted-dump.txt
index 2df88524d2c7..5705f55ffae4 100644
Signed-off-by: Michal Suchanek
---
Documentation/admin-guide/kernel-parameters.rst | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.rst
b/Documentation/admin-guide/kernel-parameters.rst
index 722d3f771924..1f9837266417 100644
: Michal Suchanek
---
lib/cmdline.c | 29 -
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/lib/cmdline.c b/lib/cmdline.c
index d98bdc017545..c5335a79a177 100644
--- a/lib/cmdline.c
+++ b/lib/cmdline.c
@@ -191,34 +191,45 @@ bool parse_option_str(const char
Signed-off-by: Michal Suchanek
---
arch/powerpc/kernel/fadump.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 1678d99ea835..275ea42a27d5 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
.
Signed-off-by: Michal Suchanek
---
lib/cmdline.c | 41 -
1 file changed, 20 insertions(+), 21 deletions(-)
diff --git a/lib/cmdline.c b/lib/cmdline.c
index 6d398a8b63fc..d98bdc017545 100644
--- a/lib/cmdline.c
+++ b/lib/cmdline.c
@@ -193,30 +193,36 @@ bool
Remove quotes from argument value only if there is qoute on both sides.
Signed-off-by: Michal Suchanek
---
lib/cmdline.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/lib/cmdline.c b/lib/cmdline.c
index 171c19b6888e..6d398a8b63fc 100644
--- a/lib/cmdline.c
+++ b
With the introduction of 'fadump_extra_args=' parameter to pass additional
parameters to fadump (capture) kernel, update documentation about it.
Signed-off-by: Hari Bathini
Signed-off-by: Michal Suchanek
---
Documentation/powerpc/firmware-assisted-dump.txt | 20 ++
The fadump parameter processing re-does the logic of next_arg quote
stripping to determine where the argument ends. Pass pointer to the
current and next argument instead to make this more robust.
Signed-off-by: Michal Suchanek
---
rebase on master
split off changes to fadump.c
add pointer to
Signed-off-by: Michal Suchanek
---
arch/powerpc/kernel/fadump.c | 47
1 file changed, 13 insertions(+), 34 deletions(-)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 8778e1cc0380..1678d99ea835 100644
--- a/arch
Signed-off-by: Michal Suchanek
---
arch/powerpc/kernel/fadump.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 0e08f1a80af2..b214c1e333dd 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc
d-off-by: Hari Bathini
Signed-off-by: Michal Suchanek
---
Changes from v6:
Correct and simplify quote handling. Ideally I would like to extend
parse_args to give the length of the original quoted value to callback.
However, parse_args removes at most one doubel-quote from the start and
one from the
ichael Ellerman
Signed-off-by: Hari Bathini
Signed-off-by: Michal Suchanek
---
Changes from v6:
Correct and simplify quote handling. Ideally I would like to extend
parse_args to give the length of the original quoted value to callback.
However, parse_args removes at most one doubel-quote from the
Remove quotes from argument value only if there is qoute on both sides.
Signed-off-by: Michal Suchanek
---
arch/powerpc/kernel/fadump.c | 6 ++
lib/cmdline.c| 7 ++-
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/kernel/fadump.c b/arch
From: Hari Bathini
With the introduction of 'fadump_extra_args=' parameter to pass additional
parameters to fadump (capture) kernel, update documentation about it.
Signed-off-by: Hari Bathini
Signed-off-by: Michal Suchanek
---
Documentation/powerpc/firmware-assisted-dum
The fadump parameter processing re-does the logic of next_arg quote
stripping to determine where the argument ends. Pass pointer to the
next argument instead to make this more robust.
Signed-off-by: Michal Suchanek
---
arch/powerpc/kernel/fadump.c | 13 +
arch/powerpc/mm
With the introduction of 'fadump_append=' parameter to pass additional
parameters to fadump (capture) kernel, update documentation about it.
Signed-off-by: Hari Bathini
Signed-off-by: Michal Suchanek
---
Documentation/powerpc/firmware-assisted-dump.txt | 8 +++-
1 file
able=memory and numa=off, to disable unwarranted
resources/subsystems.
Also, ensure the log "Firmware-assisted dump is active" is printed early
in the boot process to put the subsequent fadump messages in context.
Suggested-by: Michael Ellerman
Signed-off-by: Hari Bathini
Signed-o
35 matches
Mail list logo