From: Douglas Gilbert <dougg@torque.net>
To: Kai.Makisara@kolumbus.fi
Cc: osst@riede.org, linux-scsi@vger.kernel.org
Subject: [PATCH] st.c for GET_IDLUN 2.6.6-rc2
Date: Sun, 25 Apr 2004 18:40:43 +1000 [thread overview]
Message-ID: <408B798B.50005@torque.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
Kai,
A little more testing of st's SG_IO ioctl turned up a
small problem.
This is the corresponding patch that was applied to the
sd driver when it received the block layer SG_IO ioctl.
For least surprise of lk 2.4 utilities that use the
SCSI_IOCTL_GET_IDLUN and SCSI_IOCTL_GET_BUS_NUMBER
ioctls (e.g. sg_map) it is better to return the correct
values rather than 0.
BTW Does cdrecord correctly distinguish between 2
(non-scsi) ATAPI cd writers on the same system in
lk 2.6 ?
Doug Gilbert
[-- Attachment #2: st266rc2.diff --]
[-- Type: text/plain, Size: 629 bytes --]
--- linux/drivers/scsi/st.c 2004-04-05 20:49:34.000000000 +1000
+++ linux/drivers/scsi/st.c266rc2id 2004-04-25 18:13:50.272071680 +1000
@@ -3402,11 +3402,17 @@
goto out;
}
up(&STp->lock);
- i = scsi_cmd_ioctl(STp->disk, cmd_in, arg);
- if (i != -ENOTTY)
- return i;
- else
- return scsi_ioctl(STp->device, cmd_in, (void *) arg);
+ switch (cmd_in) {
+ case SCSI_IOCTL_GET_IDLUN:
+ case SCSI_IOCTL_GET_BUS_NUMBER:
+ break;
+ default:
+ i = scsi_cmd_ioctl(STp->disk, cmd_in, arg);
+ if (i != -ENOTTY)
+ return i;
+ break;
+ }
+ return scsi_ioctl(STp->device, cmd_in, (void *) arg);
out:
up(&STp->lock);
next reply other threads:[~2004-04-25 8:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-25 8:40 Douglas Gilbert [this message]
2004-04-25 9:06 ` [PATCH] st.c for GET_IDLUN 2.6.6-rc2 Kai Makisara
2004-04-26 0:48 ` Douglas Gilbert
2004-04-26 16:12 ` Kai Makisara
2004-04-28 3:42 ` Douglas Gilbert
2004-04-28 15:21 ` Kai Makisara
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=408B798B.50005@torque.net \
--to=dougg@torque.net \
--cc=Kai.Makisara@kolumbus.fi \
--cc=linux-scsi@vger.kernel.org \
--cc=osst@riede.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