PATCH: support for IDE devices in ide-scsi with devfs

PATCH: support for IDE devices in ide-scsi with devfs

Post by Borsenkow Andre » Sat, 23 Mar 2002 04:00:12



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

        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;


  */
 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;

        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);
 }


        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

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

PATCH: support for IDE devices in ide-scsi with devfs

Post by Andre Hedric » Sat, 23 Mar 2002 18:40:07


Thankyou sir I have been working towards that direction, but glad and
happy you have assisted !

Cheers,

Andre Hedrick
LAD Storage Consulting Group


> 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

>    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;

>  /*

>   */
>  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;

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

>    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

> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. How to set hdparms for ide-scsi devices on devfs?

workaround - before ide-scsi is loaded in boot sequence
(finding is left as an exercise to the reader :) do:

modprobe ide-cd
hdparm -u 1 -d 1 /dev/xxx
rmmod ide-cd

might have to do near top of /etc/rc.d/rc.sysinit under redhat,
but this is good since problems will happen before root filesystem
is remounted read-write, so any problems with hdparm settings
won't mess up disk.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Doesn't like my keyboard

3. PROBLEM: bad device file for cdrom while using devfs and ide-scsi

4. setup signature not found on diskless client

5. How to set hdparms for ide-scsi devices on devfs?

6. help! booting in loop

7. Needed patch to build ide-scsi with new IDE -ac merge

8. 18GB HDD on SUN Solaris 2.4 ???

9. 2.5.1-pre2 compile error in ide-scsi.o ide-scsi.c

10. Disabling DMA for ide-scsi on devfs

11. 2.4.17,2.4.18 ide-scsi+usb-storage+devfs Oops

12. Does the 1.3.57 Developmental Kernel support IDE Devices on the 3rd IDE Port

13. IDE status errors (IDE/SCSI conflict or buggy ide driver?)