linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.16-rc1] ide-scsi: fix for IDE probe/remove ops changes
@ 2006-01-21 20:39 Mikael Pettersson
  0 siblings, 0 replies; only message in thread
From: Mikael Pettersson @ 2006-01-21 20:39 UTC (permalink / raw)
  To: linux-ide, linux-kernel, linux-scsi

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 <mikpe@csd.uu.se>

 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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-01-21 20:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-21 20:39 [PATCH 2.6.16-rc1] ide-scsi: fix for IDE probe/remove ops changes Mikael Pettersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).