From: Daniel Drake <dsd@gentoo.org>
To: Jens Axboe <axboe@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Permit READ_BUFFER_CAPACITY in SG_IO command table
Date: Thu, 4 Nov 2004 05:35:42 +0800 [thread overview]
Message-ID: <200411040535.42286.dsd@gentoo.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 366 bytes --]
Hi,
While burning CD's on 2.6.9 with cdrdao, I noticed it complaining repeatedly:
ERROR: Read buffer capacity failed.
It tries to read the buffer capacity (MMC command 0x5c) in order to produce a
percentage reading of how full the buffer is.
This patch permits the READ_BUFFER_CAPACITY command again. Please apply.
Signed-off-by: Daniel Drake <dsd@gentoo.org>
[-- Attachment #2: scsi_ioctl-permit-read-buffer-capacity.patch --]
[-- Type: text/x-diff, Size: 1142 bytes --]
diff -X dontdiff -urNp linux-2.6.9-gentoo-r2/drivers/block/scsi_ioctl.c linux-dsd/drivers/block/scsi_ioctl.c
--- linux-2.6.9-gentoo-r2/drivers/block/scsi_ioctl.c 2004-11-03 21:26:28.000000000 +0000
+++ linux-dsd/drivers/block/scsi_ioctl.c 2004-11-03 22:05:07.635578808 +0000
@@ -139,6 +139,7 @@ static int verify_command(struct file *f
safe_for_read(GPCMD_PAUSE_RESUME),
/* CD/DVD data reading */
+ safe_for_read(GPCMD_READ_BUFFER_CAPACITY),
safe_for_read(GPCMD_READ_CD),
safe_for_read(GPCMD_READ_CD_MSF),
safe_for_read(GPCMD_READ_DISC_INFO),
diff -X dontdiff -urNp linux-2.6.9-gentoo-r2/include/linux/cdrom.h linux-dsd/include/linux/cdrom.h
--- linux-2.6.9-gentoo-r2/include/linux/cdrom.h 2004-11-03 17:08:47.000000000 +0000
+++ linux-dsd/include/linux/cdrom.h 2004-11-03 22:01:15.858814232 +0000
@@ -452,6 +452,7 @@ struct cdrom_generic_command
#define GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1e
#define GPCMD_READ_10 0x28
#define GPCMD_READ_12 0xa8
+#define GPCMD_READ_BUFFER_CAPACITY 0x5c
#define GPCMD_READ_CDVD_CAPACITY 0x25
#define GPCMD_READ_CD 0xbe
#define GPCMD_READ_CD_MSF 0xb9
next reply other threads:[~2004-11-03 21:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-03 21:35 Daniel Drake [this message]
2004-11-04 9:21 ` [PATCH] Permit READ_BUFFER_CAPACITY in SG_IO command table Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200411040535.42286.dsd@gentoo.org \
--to=dsd@gentoo.org \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox