Skip to contentSkip to conversation

- mptfusion - convert to new change_queue_depth API

PATCH New Moore, Eric Dean 1 participant 1 message Jun 24, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 - mptfusion - convert to new change_queue_depth API

Convert driver to use new change_queue_depth API.

drivers/message/fusion/mptfc.c +1 -14
diff -uarN b/drivers/message/fusion/mptfc.c a/drivers/message/fusion/mptfc.c
@@ -83,19 +83,6 @@
 static int	mptfcTaskCtx = -1;
 static int	mptfcInternalCtx = -1; /* Used only for internal commands */
 
-static struct device_attribute mptfc_queue_depth_attr = {
-	.attr = {
-		.name = 	"queue_depth",
-		.mode =		S_IWUSR,
-	},
-	.store = mptscsih_store_queue_depth,
-};
-
-static struct device_attribute *mptfc_dev_attrs[] = {
-	&mptfc_queue_depth_attr,
-	NULL,
-};
-
 static struct scsi_host_template mptfc_driver_template = {
 	.proc_name			= "mptfc",
 	.proc_info			= mptscsih_proc_info,
@@ -105,6 +92,7 @@
 	.slave_alloc			= mptscsih_slave_alloc,
 	.slave_configure		= mptscsih_slave_configure,
 	.slave_destroy			= mptscsih_slave_destroy,
+	.change_queue_depth 		= mptscsih_change_queue_depth,
 	.eh_abort_handler		= mptscsih_abort,
 	.eh_device_reset_handler	= mptscsih_dev_reset,
 	.eh_bus_reset_handler		= mptscsih_bus_reset,
@@ -116,7 +104,6 @@
 	.max_sectors			= 8192,
 	.cmd_per_lun			= 7,
 	.use_clustering			= ENABLE_CLUSTERING,
-	.sdev_attrs			= mptfc_dev_attrs,
 };
 
 /****************************************************************************
drivers/message/fusion/mptscsih.c +21 -26

83 lines not on this page · raw message

drivers/message/fusion/mptscsih.h +1 -1
diff -uarN b/drivers/message/fusion/mptscsih.h a/drivers/message/fusion/mptscsih.h
@@ -103,5 +103,5 @@
 extern int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
 extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply);
 extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset);
-extern ssize_t mptscsih_store_queue_depth(struct device *dev, const char *buf, size_t count);
+extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth);
 extern void mptscsih_timer_expired(unsigned long data);
drivers/message/fusion/mptspi.c +1 -14
diff -uarN b/drivers/message/fusion/mptspi.c a/drivers/message/fusion/mptspi.c
@@ -102,19 +102,6 @@
 static int	mptspiTaskCtx = -1;
 static int	mptspiInternalCtx = -1; /* Used only for internal commands */
 
-static struct device_attribute mptspi_queue_depth_attr = {
-	.attr = {
-		.name = 	"queue_depth",
-		.mode =		S_IWUSR,
-	},
-	.store = mptscsih_store_queue_depth,
-};
-
-static struct device_attribute *mptspi_dev_attrs[] = {
-	&mptspi_queue_depth_attr,
-	NULL,
-};
-
 static struct scsi_host_template mptspi_driver_template = {
 	.proc_name			= "mptspi",
 	.proc_info			= mptscsih_proc_info,
@@ -124,6 +111,7 @@
 	.slave_alloc			= mptscsih_slave_alloc,
 	.slave_configure		= mptscsih_slave_configure,
 	.slave_destroy			= mptscsih_slave_destroy,
+	.change_queue_depth 		= mptscsih_change_queue_depth,
 	.eh_abort_handler		= mptscsih_abort,
 	.eh_device_reset_handler	= mptscsih_dev_reset,
 	.eh_bus_reset_handler		= mptscsih_bus_reset,
@@ -135,7 +123,6 @@
 	.max_sectors			= 8192,
 	.cmd_per_lun			= 7,
 	.use_clustering			= ENABLE_CLUSTERING,
-	.sdev_attrs			= mptspi_dev_attrs,
 };