From: Christoph Hellwig <hch@lst.de>
To: andre@linux-ide.org
Cc: linux-kernel@vger.kernel.org
Subject: [RFC] remove IDESCSI_SG_TRANSFORM (compile fix)
Date: Fri, 29 Nov 2002 23:53:53 +0100 [thread overview]
Message-ID: <20021129235353.A13377@lst.de> (raw)
In the current 2.5 scsi-misc tree Scsi_Device_Template.tag is gone.
ide-scsi is still using it in should_transform() to decide whether
to test IDESCSI_SG_TRANSFORM or IDESCSI_TRANSFORM.
The obvious compile fix is to just kill that check, which makes
IDESCSI_SG_TRANSFORM superflous. Of course the question remains
what the actual point of IDESCSI_SG_TRANSFORM was and if we still
need it.
--- 1.17/drivers/scsi/ide-scsi.c Mon Nov 18 08:10:40 2002
+++ edited/drivers/scsi/ide-scsi.c Fri Nov 29 23:14:21 2002
@@ -82,7 +82,6 @@
* SCSI command transformation layer
*/
#define IDESCSI_TRANSFORM 0 /* Enable/Disable transformation */
-#define IDESCSI_SG_TRANSFORM 1 /* /dev/sg transformation */
/*
* Log flags
@@ -532,7 +531,6 @@
if (drive->id && (drive->id->config & 0x0060) == 0x20)
set_bit (IDESCSI_DRQ_INTERRUPT, &scsi->flags);
set_bit(IDESCSI_TRANSFORM, &scsi->transform);
- clear_bit(IDESCSI_SG_TRANSFORM, &scsi->transform);
#if IDESCSI_DEBUG_LOG
set_bit(IDESCSI_LOG_CMD, &scsi->log);
#endif /* IDESCSI_DEBUG_LOG */
@@ -666,22 +664,6 @@
return "SCSI host adapter emulation for IDE ATAPI devices";
}
-int idescsi_ioctl (Scsi_Device *dev, int cmd, void *arg)
-{
- ide_drive_t *drive = idescsi_drives[dev->id];
- idescsi_scsi_t *scsi = drive->driver_data;
-
- if (cmd == SG_SET_TRANSFORM) {
- if (arg)
- set_bit(IDESCSI_SG_TRANSFORM, &scsi->transform);
- else
- clear_bit(IDESCSI_SG_TRANSFORM, &scsi->transform);
- return 0;
- } else if (cmd == SG_GET_TRANSFORM)
- return put_user(test_bit(IDESCSI_SG_TRANSFORM, &scsi->transform), (int *) arg);
- return -EINVAL;
-}
-
static inline struct bio *idescsi_kmalloc_bio (int count)
{
struct bio *bh, *bhp, *first_bh;
@@ -760,13 +742,7 @@
static inline int should_transform(ide_drive_t *drive, Scsi_Cmnd *cmd)
{
idescsi_scsi_t *scsi = drive->driver_data;
- struct gendisk *disk = cmd->request->rq_disk;
- if (disk) {
- struct Scsi_Device_Template **p = disk->private_data;
- if (strcmp((*p)->tag, "sg") == 0)
- return test_bit(IDESCSI_SG_TRANSFORM, &scsi->transform);
- }
return test_bit(IDESCSI_TRANSFORM, &scsi->transform);
}
@@ -864,7 +840,6 @@
.detect = idescsi_detect,
.release = idescsi_release,
.info = idescsi_info,
- .ioctl = idescsi_ioctl,
.queuecommand = idescsi_queue,
.bios_param = idescsi_bios,
.can_queue = 10,
next reply other threads:[~2002-11-29 22:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-29 22:53 Christoph Hellwig [this message]
2002-11-30 0:44 ` [RFC] remove IDESCSI_SG_TRANSFORM (compile fix) Mike Anderson
2002-12-02 17:21 ` Christoph Hellwig
2002-12-02 22:22 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2002-12-03 7:20 Douglas Gilbert
2002-12-03 8:13 ` Douglas Gilbert
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=20021129235353.A13377@lst.de \
--to=hch@lst.de \
--cc=andre@linux-ide.org \
--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 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.