linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] ipr: Fix HDIO_GET_IDENTITY oops for SATA devices
@ 2008-06-02 14:20 Brian King
  0 siblings, 0 replies; 14+ messages in thread
From: Brian King @ 2008-06-02 14:20 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, thlin, linux-ide, brking, miltonm


Currently, ipr does not support HDIO_GET_IDENTITY to SATA devices.
An oops occurs if userspace attempts to send the command. Since hald
issues the command, ensure we fail the ioctl in ipr. This is a
temporary solution to the oops. Once the ipr libata EH conversion
is upstream, ipr will fully support HDIO_GET_IDENTITY.

Tested-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---

 linux-2.6-bjking1/drivers/scsi/ipr.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff -puN drivers/scsi/ipr.c~ipr_sata_no_identify drivers/scsi/ipr.c
--- linux-2.6/drivers/scsi/ipr.c~ipr_sata_no_identify	2008-06-02 08:46:19.000000000 -0500
+++ linux-2.6-bjking1/drivers/scsi/ipr.c	2008-06-02 08:46:19.000000000 -0500
@@ -71,6 +71,7 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/libata.h>
+#include <linux/hdreg.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/processor.h>
@@ -4913,8 +4914,11 @@ static int ipr_ioctl(struct scsi_device 
 	struct ipr_resource_entry *res;
 
 	res = (struct ipr_resource_entry *)sdev->hostdata;
-	if (res && ipr_is_gata(res))
+	if (res && ipr_is_gata(res)) {
+		if (cmd == HDIO_GET_IDENTITY)
+			return -ENOTTY;
 		return ata_scsi_ioctl(sdev, cmd, arg);
+	}
 
 	return -EINVAL;
 }
_

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH 1/1] ipr: Fix HDIO_GET_IDENTITY oops for SATA devices
@ 2008-06-02 14:20 Brian King
  0 siblings, 0 replies; 14+ messages in thread
From: Brian King @ 2008-06-02 14:20 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, thlin, linux-ide, brking, miltonm


Currently, ipr does not support HDIO_GET_IDENTITY to SATA devices.
An oops occurs if userspace attempts to send the command. Since hald
issues the command, ensure we fail the ioctl in ipr. This is a
temporary solution to the oops. Once the ipr libata EH conversion
is upstream, ipr will fully support HDIO_GET_IDENTITY.

Tested-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---

 linux-2.6-bjking1/drivers/scsi/ipr.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff -puN drivers/scsi/ipr.c~ipr_sata_no_identify drivers/scsi/ipr.c
--- linux-2.6/drivers/scsi/ipr.c~ipr_sata_no_identify	2008-06-02 08:46:19.000000000 -0500
+++ linux-2.6-bjking1/drivers/scsi/ipr.c	2008-06-02 08:46:19.000000000 -0500
@@ -71,6 +71,7 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/libata.h>
+#include <linux/hdreg.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/processor.h>
@@ -4913,8 +4914,11 @@ static int ipr_ioctl(struct scsi_device 
 	struct ipr_resource_entry *res;
 
 	res = (struct ipr_resource_entry *)sdev->hostdata;
-	if (res && ipr_is_gata(res))
+	if (res && ipr_is_gata(res)) {
+		if (cmd == HDIO_GET_IDENTITY)
+			return -ENOTTY;
 		return ata_scsi_ioctl(sdev, cmd, arg);
+	}
 
 	return -EINVAL;
 }
_

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-06-02 20:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <12124164141515-patch-mail.ibm.com>
2008-06-02 16:08 ` [PATCH 1/1] ipr: Fix HDIO_GET_IDENTITY oops for SATA devices Jeff Garzik
2008-06-02 16:27   ` Brian King
2008-06-02 16:45     ` James Bottomley
2008-06-02 17:43       ` Jeff Garzik
2008-06-02 17:57         ` James Bottomley
2008-06-02 18:11           ` Jeff Garzik
2008-06-02 18:51             ` Brian King
2008-06-02 18:54               ` Jeff Garzik
2008-06-02 19:39                 ` James Bottomley
2008-06-02 20:27                   ` Brian King
2008-06-02 19:35             ` James Bottomley
2008-06-02 19:53               ` Alan Cox
2008-06-02 14:20 Brian King
  -- strict thread matches above, loose matches on Subject: below --
2008-06-02 14:20 Brian King

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