public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block scsi_ioctl.c lk 2.5.66
@ 2003-03-26 10:02 Douglas Gilbert
  0 siblings, 0 replies; only message in thread
From: Douglas Gilbert @ 2003-03-26 10:02 UTC (permalink / raw)
  To: linux-scsi

[-- 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))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-26 10:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-26 10:02 [PATCH] block scsi_ioctl.c lk 2.5.66 Douglas Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox