[PATCH 4/4] target: remove ->get_device_rev

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

 



Now that the reservations and ALUA code have been cleaned up there is no need
for the get_device_rev method, as we only need the standards revision in the
inquiry data, where we can hardcode it.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>

---
 drivers/target/target_core_device.c  |    2 --
 drivers/target/target_core_file.c    |    1 -
 drivers/target/target_core_iblock.c  |    1 -
 drivers/target/target_core_pscsi.c   |   13 -------------
 drivers/target/target_core_rd.c      |    1 -
 drivers/target/target_core_sbc.c     |    6 ------
 drivers/target/target_core_spc.c     |    2 +-
 include/target/target_core_backend.h |    1 -
 8 files changed, 1 insertion(+), 26 deletions(-)

Index: lio-core/drivers/target/target_core_device.c
===================================================================
--- lio-core.orig/drivers/target/target_core_device.c	2012-10-08 09:34:44.843344820 -0700
+++ lio-core/drivers/target/target_core_device.c	2012-10-08 09:35:33.111584168 -0700
@@ -1347,8 +1347,6 @@ static void scsi_dump_inquiry(struct se_
 
 	device_type = dev->transport->get_device_type(dev);
 	pr_debug("  Type:   %s ", scsi_device_type(device_type));
-	pr_debug("                 ANSI SCSI revision: %02x\n",
-				dev->transport->get_device_rev(dev));
 }
 
 struct se_device *target_alloc_device(struct se_hba *hba, const char *name)
Index: lio-core/drivers/target/target_core_file.c
===================================================================
--- lio-core.orig/drivers/target/target_core_file.c	2012-10-08 09:34:44.843344820 -0700
+++ lio-core/drivers/target/target_core_file.c	2012-10-08 09:36:53.891984733 -0700
@@ -534,7 +534,6 @@ static struct se_subsystem_api fileio_te
 	.parse_cdb		= fd_parse_cdb,
 	.set_configfs_dev_params = fd_set_configfs_dev_params,
 	.show_configfs_dev_params = fd_show_configfs_dev_params,
-	.get_device_rev		= sbc_get_device_rev,
 	.get_device_type	= sbc_get_device_type,
 	.get_blocks		= fd_get_blocks,
 };
Index: lio-core/drivers/target/target_core_iblock.c
===================================================================
--- lio-core.orig/drivers/target/target_core_iblock.c	2012-10-08 09:34:44.843344820 -0700
+++ lio-core/drivers/target/target_core_iblock.c	2012-10-08 09:36:58.916009642 -0700
@@ -734,7 +734,6 @@ static struct se_subsystem_api iblock_te
 	.parse_cdb		= iblock_parse_cdb,
 	.set_configfs_dev_params = iblock_set_configfs_dev_params,
 	.show_configfs_dev_params = iblock_show_configfs_dev_params,
-	.get_device_rev		= sbc_get_device_rev,
 	.get_device_type	= sbc_get_device_type,
 	.get_blocks		= iblock_get_blocks,
 };
Index: lio-core/drivers/target/target_core_pscsi.c
===================================================================
--- lio-core.orig/drivers/target/target_core_pscsi.c	2012-10-08 09:34:44.843344820 -0700
+++ lio-core/drivers/target/target_core_pscsi.c	2012-10-08 09:37:14.204085459 -0700
@@ -1106,18 +1106,6 @@ fail:
 	return -ENOMEM;
 }
 
-/*	pscsi_get_device_rev():
- *
- *
- */
-static u32 pscsi_get_device_rev(struct se_device *dev)
-{
-	struct pscsi_dev_virt *pdv = PSCSI_DEV(dev);
-	struct scsi_device *sd = pdv->pdv_sd;
-
-	return (sd->scsi_level - 1) ? sd->scsi_level - 1 : 1;
-}
-
 /*	pscsi_get_device_type():
  *
  *
@@ -1187,7 +1175,6 @@ static struct se_subsystem_api pscsi_tem
 	.parse_cdb		= pscsi_parse_cdb,
 	.set_configfs_dev_params = pscsi_set_configfs_dev_params,
 	.show_configfs_dev_params = pscsi_show_configfs_dev_params,
-	.get_device_rev		= pscsi_get_device_rev,
 	.get_device_type	= pscsi_get_device_type,
 	.get_blocks		= pscsi_get_blocks,
 };
Index: lio-core/drivers/target/target_core_rd.c
===================================================================
--- lio-core.orig/drivers/target/target_core_rd.c	2012-10-08 09:34:44.843344820 -0700
+++ lio-core/drivers/target/target_core_rd.c	2012-10-08 09:37:03.604032884 -0700
@@ -449,7 +449,6 @@ static struct se_subsystem_api rd_mcp_te
 	.parse_cdb		= rd_parse_cdb,
 	.set_configfs_dev_params = rd_set_configfs_dev_params,
 	.show_configfs_dev_params = rd_show_configfs_dev_params,
-	.get_device_rev		= sbc_get_device_rev,
 	.get_device_type	= sbc_get_device_type,
 	.get_blocks		= rd_get_blocks,
 };
Index: lio-core/drivers/target/target_core_sbc.c
===================================================================
--- lio-core.orig/drivers/target/target_core_sbc.c	2012-10-08 09:34:44.843344820 -0700
+++ lio-core/drivers/target/target_core_sbc.c	2012-10-08 09:36:33.555883901 -0700
@@ -586,12 +586,6 @@ out_invalid_cdb_field:
 }
 EXPORT_SYMBOL(sbc_parse_cdb);
 
-u32 sbc_get_device_rev(struct se_device *dev)
-{
-	return SCSI_SPC_2; /* Returns SPC-3 in Initiator Data */
-}
-EXPORT_SYMBOL(sbc_get_device_rev);
-
 u32 sbc_get_device_type(struct se_device *dev)
 {
 	return TYPE_DISK;
Index: lio-core/drivers/target/target_core_spc.c
===================================================================
--- lio-core.orig/drivers/target/target_core_spc.c	2012-10-08 09:34:44.843344820 -0700
+++ lio-core/drivers/target/target_core_spc.c	2012-10-08 09:36:26.883850807 -0700
@@ -78,7 +78,7 @@ static int spc_emulate_inquiry_std(struc
 	if (dev->transport->get_device_type(dev) == TYPE_TAPE)
 		buf[1] = 0x80;
 
-	buf[2] = dev->transport->get_device_rev(dev);
+	buf[2] = 0x05; /* SPC-3 */
 
 	/*
 	 * NORMACA and HISUP = 0, RESPONSE DATA FORMAT = 2
Index: lio-core/include/target/target_core_backend.h
===================================================================
--- lio-core.orig/include/target/target_core_backend.h	2012-10-08 09:34:44.843344820 -0700
+++ lio-core/include/target/target_core_backend.h	2012-10-08 09:37:49.084258426 -0700
@@ -32,7 +32,6 @@ struct se_subsystem_api {
 				   unsigned char *);
 
 	int (*parse_cdb)(struct se_cmd *cmd);
-	u32 (*get_device_rev)(struct se_device *);
 	u32 (*get_device_type)(struct se_device *);
 	sector_t (*get_blocks)(struct se_device *);
 	unsigned char *(*get_sense_buffer)(struct se_cmd *);

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux