]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
cxlflash: Add device dependent flags
authorUma Krishnan <ukrishn@linux.vnet.ibm.com>
Wed, 15 Jun 2016 23:49:38 +0000 (18:49 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 13 Jul 2016 03:16:31 +0000 (23:16 -0400)
Device dependent flags are needed to support functions that are specific
to a particular device.

One such case is - some CXL Flash cards need to be notified of device
shutdown. For other CXL devices, this feature does not prove to be
useful yet. Such distinct features need to be identified in the driver
to bypass or invoke specific functionality.

In this patch, a member 'flags' has been added to device dependent
values. These flags will be used and expanded in the future to support
various device specific functions.

Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Acked-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/cxlflash/main.c
drivers/scsi/cxlflash/main.h

index f1f977f83e176f1b42f3a90c414c587fd8a3f6bd..e027fa0fe430e278e289c5f8964daec65314e998 100644 (file)
@@ -2333,8 +2333,10 @@ static struct scsi_host_template driver_template = {
 /*
  * Device dependent values
  */
-static struct dev_dependent_vals dev_corsa_vals = { CXLFLASH_MAX_SECTORS };
-static struct dev_dependent_vals dev_flash_gt_vals = { CXLFLASH_MAX_SECTORS };
+static struct dev_dependent_vals dev_corsa_vals = { CXLFLASH_MAX_SECTORS,
+                                       0ULL };
+static struct dev_dependent_vals dev_flash_gt_vals = { CXLFLASH_MAX_SECTORS,
+                                       0ULL };
 
 /*
  * PCI device binding table
index eb9d8f730b38ec34e86c777d560f3762b48bf3d5..029f51743a24871f826cfa378e6b953d5e662db2 100644 (file)
@@ -88,6 +88,7 @@ enum undo_level {
 
 struct dev_dependent_vals {
        u64 max_sectors;
+       u64 flags;
 };
 
 struct asyc_intr_info {