diff mbox

[v2,6/6] cxlflash: Enable device id for future IBM CXL adapter

Message ID 1450127263-48261-1-git-send-email-ukrishn@linux.vnet.ibm.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Uma Krishnan Dec. 14, 2015, 9:07 p.m. UTC
From: Manoj Kumar <manoj@linux.vnet.ibm.com>

This drop enables a future card with a device id
of 0x0600 to be recognized by the cxlflash driver.

As per the design, the Accelerator Function Unit (AFU)
for this new IBM CXL Flash Adapter retains the same
host interface as the previous generation. For the early
prototypes of the new card, the driver with this change
behaves exactly as the driver prior to this behaved with
the earlier generation card. Therefore, no card specific
programming has been added. These card specific changes
can be staged in later if needed.

Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
---
 drivers/scsi/cxlflash/main.c | 3 +++
 drivers/scsi/cxlflash/main.h | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

Comments

Andrew Donnellan Dec. 15, 2015, 3:11 a.m. UTC | #1
On 15/12/15 08:07, Uma Krishnan wrote:
> From: Manoj Kumar <manoj@linux.vnet.ibm.com>
>
> This drop enables a future card with a device id
> of 0x0600 to be recognized by the cxlflash driver.

If you do a V3 - this could be better worded in the imperative mood as: 
"Add a new device ID (0x0600) for a future IBM CXL Flash Adapter card."

>
> As per the design, the Accelerator Function Unit (AFU)
> for this new IBM CXL Flash Adapter retains the same
> host interface as the previous generation. For the early
> prototypes of the new card, the driver with this change
> behaves exactly as the driver prior to this behaved with
> the earlier generation card. Therefore, no card specific
> programming has been added. These card specific changes
> can be staged in later if needed.
>
> Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>
> Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>

Assuming that the final card won't break in a particularly nasty way in 
the absence of later code changes, all looks good.

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
diff mbox

Patch

diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
index 30542ca..f6d90ce 100644
--- a/drivers/scsi/cxlflash/main.c
+++ b/drivers/scsi/cxlflash/main.c
@@ -2309,6 +2309,7 @@  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 };
 
 /*
  * PCI device binding table
@@ -2316,6 +2317,8 @@  static struct dev_dependent_vals dev_corsa_vals = { CXLFLASH_MAX_SECTORS };
 static struct pci_device_id cxlflash_pci_table[] = {
 	{PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CORSA,
 	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, (kernel_ulong_t)&dev_corsa_vals},
+	{PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_FLASH_GT,
+	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, (kernel_ulong_t)&dev_flash_gt_vals},
 	{}
 };
 
diff --git a/drivers/scsi/cxlflash/main.h b/drivers/scsi/cxlflash/main.h
index 7e2d0e1..0faed42 100644
--- a/drivers/scsi/cxlflash/main.h
+++ b/drivers/scsi/cxlflash/main.h
@@ -23,8 +23,8 @@ 
 #define CXLFLASH_NAME		"cxlflash"
 #define CXLFLASH_ADAPTER_NAME	"IBM POWER CXL Flash Adapter"
 
-#define PCI_DEVICE_ID_IBM_CORSA	0x04F0
-#define CXLFLASH_SUBS_DEV_ID	0x04F0
+#define PCI_DEVICE_ID_IBM_CORSA		0x04F0
+#define PCI_DEVICE_ID_IBM_FLASH_GT	0x0600
 
 /* Since there is only one target, make it 0 */
 #define CXLFLASH_TARGET		0