* PATCH: support for IDE devices in ide-scsi with devfs
@ 2002-03-21 18:54 Borsenkow Andrej
2002-03-22 9:23 ` Andre Hedrick
0 siblings, 1 reply; 2+ messages in thread
From: Borsenkow Andrej @ 2002-03-21 18:54 UTC (permalink / raw)
To: devfs mailing list, linux-kernel list
Currently using ide-scsi with devfs does not allow you to use hdparm
interface because no IDE nodes (block devices) are created. The patch
adds this.
Related patch for devfsd that creates old compatibility links is going
to devfs list. I do not think spcial new compatibility links are needed.
-andrej
--- linux-2.4.18-4mdk/drivers/scsi/ide-scsi.c.orig Tue Mar 5 06:08:04 2002
+++ linux-2.4.18-4mdk/drivers/scsi/ide-scsi.c Thu Mar 21 21:21:31 2002
@@ -95,6 +95,7 @@
unsigned long flags; /* Status/Action flags */
unsigned long transform; /* SCSI cmd translation layer */
unsigned long log; /* log flags */
+ devfs_handle_t de; /* pointer to IDE device */
} idescsi_scsi_t;
/*
@@ -502,6 +503,8 @@
*/
static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi, int id)
{
+ int minor = (drive->select.b.unit) << PARTN_BITS;
+
DRIVER(drive)->busy++;
idescsi_drives[id] = drive;
drive->driver_data = scsi;
@@ -516,6 +519,10 @@
set_bit(IDESCSI_LOG_CMD, &scsi->log);
#endif /* IDESCSI_DEBUG_LOG */
idescsi_add_settings(drive);
+ scsi->de = devfs_register(drive->de, "generic", DEVFS_FL_DEFAULT,
+ HWIF(drive)->major, minor,
+ S_IFBLK | S_IRUSR | S_IWUSR,
+ ide_fops, NULL);
}
static int idescsi_cleanup (ide_drive_t *drive)
@@ -524,6 +531,8 @@
if (ide_unregister_subdriver (drive))
return 1;
+ if (scsi->de)
+ devfs_unregister(scsi->de);
drive->driver_data = NULL;
kfree (scsi);
return 0;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH: support for IDE devices in ide-scsi with devfs
2002-03-21 18:54 PATCH: support for IDE devices in ide-scsi with devfs Borsenkow Andrej
@ 2002-03-22 9:23 ` Andre Hedrick
0 siblings, 0 replies; 2+ messages in thread
From: Andre Hedrick @ 2002-03-22 9:23 UTC (permalink / raw)
To: Borsenkow Andrej; +Cc: devfs mailing list, linux-kernel list
Thankyou sir I have been working towards that direction, but glad and
happy you have assisted !
Cheers,
Andre Hedrick
LAD Storage Consulting Group
On 21 Mar 2002, Borsenkow Andrej wrote:
> Currently using ide-scsi with devfs does not allow you to use hdparm
> interface because no IDE nodes (block devices) are created. The patch
> adds this.
>
> Related patch for devfsd that creates old compatibility links is going
> to devfs list. I do not think spcial new compatibility links are needed.
>
> -andrej
>
> --- linux-2.4.18-4mdk/drivers/scsi/ide-scsi.c.orig Tue Mar 5 06:08:04 2002
> +++ linux-2.4.18-4mdk/drivers/scsi/ide-scsi.c Thu Mar 21 21:21:31 2002
> @@ -95,6 +95,7 @@
> unsigned long flags; /* Status/Action flags */
> unsigned long transform; /* SCSI cmd translation layer */
> unsigned long log; /* log flags */
> + devfs_handle_t de; /* pointer to IDE device */
> } idescsi_scsi_t;
>
> /*
> @@ -502,6 +503,8 @@
> */
> static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi, int id)
> {
> + int minor = (drive->select.b.unit) << PARTN_BITS;
> +
> DRIVER(drive)->busy++;
> idescsi_drives[id] = drive;
> drive->driver_data = scsi;
> @@ -516,6 +519,10 @@
> set_bit(IDESCSI_LOG_CMD, &scsi->log);
> #endif /* IDESCSI_DEBUG_LOG */
> idescsi_add_settings(drive);
> + scsi->de = devfs_register(drive->de, "generic", DEVFS_FL_DEFAULT,
> + HWIF(drive)->major, minor,
> + S_IFBLK | S_IRUSR | S_IWUSR,
> + ide_fops, NULL);
> }
>
> static int idescsi_cleanup (ide_drive_t *drive)
> @@ -524,6 +531,8 @@
>
> if (ide_unregister_subdriver (drive))
> return 1;
> + if (scsi->de)
> + devfs_unregister(scsi->de);
> drive->driver_data = NULL;
> kfree (scsi);
> return 0;
>
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-03-22 9:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-21 18:54 PATCH: support for IDE devices in ide-scsi with devfs Borsenkow Andrej
2002-03-22 9:23 ` Andre Hedrick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®