[PATCH 2.6.16-rc1] ide-scsi: fix for IDE probe/remove ops changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kernel 2.6.16-rc1 broke the ide-scsi driver: ide-scsi loads but
fails to find any devices to bind to. It also triggers a message
"Driver 'ide-scsi' needs updating - please use bus_type methods"
from the driver core.

The IDE core in 2.6.16-rc1 changed the location of an IDE driver's
->probe()/->remove()/->shutdown() methods: they are now in the
ide_driver_t struct not in the gen_driver sub-struct. drivers/ide/
was updated for this change but ide-scsi.c wasn't. Hence the breakage.

This patch repairs ide-scsi and also eliminates the driver core warning.
Please apply before 2.6.16 final.

Signed-off-by: Mikael Pettersson <[email protected]>

 drivers/scsi/ide-scsi.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff -rupN linux-2.6.16-rc1/drivers/scsi/ide-scsi.c linux-2.6.16-rc1.ide-scsi-probe-fix/drivers/scsi/ide-scsi.c
--- linux-2.6.16-rc1/drivers/scsi/ide-scsi.c	2006-01-21 20:27:04.000000000 +0100
+++ linux-2.6.16-rc1.ide-scsi-probe-fix/drivers/scsi/ide-scsi.c	2006-01-21 21:04:53.000000000 +0100
@@ -751,9 +751,8 @@ static void idescsi_setup (ide_drive_t *
 	idescsi_add_settings(drive);
 }
 
-static int ide_scsi_remove(struct device *dev)
+static void ide_scsi_remove(ide_drive_t *drive)
 {
-	ide_drive_t *drive = to_ide_device(dev);
 	struct Scsi_Host *scsihost = drive->driver_data;
 	struct ide_scsi_obj *scsi = scsihost_to_idescsi(scsihost);
 	struct gendisk *g = scsi->disk;
@@ -768,11 +767,9 @@ static int ide_scsi_remove(struct device
 
 	scsi_remove_host(scsihost);
 	ide_scsi_put(scsi);
-
-	return 0;
 }
 
-static int ide_scsi_probe(struct device *);
+static int ide_scsi_probe(ide_drive_t *);
 
 #ifdef CONFIG_PROC_FS
 static ide_proc_entry_t idescsi_proc[] = {
@@ -788,9 +785,9 @@ static ide_driver_t idescsi_driver = {
 		.owner		= THIS_MODULE,
 		.name		= "ide-scsi",
 		.bus		= &ide_bus_type,
-		.probe		= ide_scsi_probe,
-		.remove		= ide_scsi_remove,
 	},
+	.probe			= ide_scsi_probe,
+	.remove			= ide_scsi_remove,
 	.version		= IDESCSI_VERSION,
 	.media			= ide_scsi,
 	.supports_dsc_overlap	= 0,
@@ -1119,9 +1116,8 @@ static struct scsi_host_template idescsi
 	.proc_name		= "ide-scsi",
 };
 
-static int ide_scsi_probe(struct device *dev)
+static int ide_scsi_probe(ide_drive_t *drive)
 {
-	ide_drive_t *drive = to_ide_device(dev);
 	idescsi_scsi_t *idescsi;
 	struct Scsi_Host *host;
 	struct gendisk *g;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux