Skip to content

Commit

Permalink
cxlflash: Add device dependent flags
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uma Krishnan authored and Martin K. Petersen committed Jul 13, 2016
1 parent f411396 commit 96e1b66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/scsi/cxlflash/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions drivers/scsi/cxlflash/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ enum undo_level {

struct dev_dependent_vals {
u64 max_sectors;
u64 flags;
};

struct asyc_intr_info {
Expand Down

0 comments on commit 96e1b66

Please sign in to comment.