From: Douglas Gilbert <dougg@torque.net>
To: linux-scsi@vger.kernel.org
Subject: [PATCH] block scsi_ioctl.c lk 2.5.66
Date: Wed, 26 Mar 2003 20:02:12 +1000 [thread overview]
Message-ID: <3E817AA4.6020402@torque.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 272 bytes --]
Changelog:
- extends block SCSI_IOCTL_SEND_COMMAND timeout on
SEND DIAGNOSTIC to the same as FORMAT (i.e. 2 hours)
- makes SCSI_IOCTL_SEND_COMMAND return SCSI status
(rather than EIO) for compatibility
- make do_blk_rq() a static function
Doug Gilbert
[-- Attachment #2: blk_scsi_ioctl_2566.diff --]
[-- Type: text/plain, Size: 862 bytes --]
--- linux/drivers/block/scsi_ioctl.c 2003-03-05 21:01:14.000000000 +1000
+++ linux/drivers/block/scsi_ioctl.c2566dpg 2003-03-26 19:44:50.000000000 +1000
@@ -45,7 +45,8 @@
#define SCSI_SENSE_BUFFERSIZE 64
#endif
-int blk_do_rq(request_queue_t *q, struct block_device *bdev, struct request *rq)
+static int blk_do_rq(request_queue_t *q, struct block_device *bdev,
+ struct request *rq)
{
DECLARE_COMPLETION(wait);
int err = 0;
@@ -368,6 +369,7 @@
goto error;
switch (opcode) {
+ case SEND_DIAGNOSTIC:
case FORMAT_UNIT:
rq->timeout = FORMAT_UNIT_TIMEOUT;
break;
@@ -398,7 +400,8 @@
if (in_len)
rq->flags |= REQ_RW;
- err = blk_do_rq(q, bdev, rq);
+ blk_do_rq(q, bdev, rq);
+ err = rq->errors & 0xff; /* only 8 bit SCSI status */
if (err) {
if (rq->sense_len)
if (copy_to_user(sic->data, rq->sense, rq->sense_len))
reply other threads:[~2003-03-26 10:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3E817AA4.6020402@torque.net \
--to=dougg@torque.net \
--cc=linux-scsi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.