1
0

scsi: qla2xxx: Add LR distance support from nvram bit

Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Joe Carnuccio
2017-08-23 15:05:17 -07:00
committed by Martin K. Petersen
parent 92d4408e34
commit 1f4c7c380b
3 changed files with 61 additions and 28 deletions

View File

@@ -1699,6 +1699,15 @@ struct access_chip_rsp_84xx {
#define FAC_OPT_CMD_UNLOCK_SEMAPHORE 0x04
#define FAC_OPT_CMD_GET_SECTOR_SIZE 0x05
/* enhanced features bit definitions */
#define NEF_LR_DIST_ENABLE BIT_0
/* LR Distance bit positions */
#define LR_DIST_NV_POS 2
#define LR_DIST_FW_POS 12
#define LR_DIST_FW_SHIFT (LR_DIST_FW_POS - LR_DIST_NV_POS)
#define LR_DIST_FW_FIELD(x) ((x) << LR_DIST_FW_SHIFT & 0xf000)
struct nvram_81xx {
/* NVRAM header. */
uint8_t id[4];
@@ -1841,16 +1850,13 @@ struct nvram_81xx {
uint8_t reserved_21[16];
uint16_t reserved_22[3];
/*
* BIT 0 = Extended BB credits for LR
* BIT 1 = Virtual Fabric Enable
* BIT 2 = Enhanced Features Unused
* BIT 3-7 = Enhanced Features Reserved
/* Offset 406 (0x196) Enhanced Features
* BIT 0 = Extended BB credits for LR
* BIT 1 = Virtual Fabric Enable
* BIT 2-5 = Distance Support if BIT 0 is on
* BIT 6-15 = Unused
*/
/* Enhanced Features */
uint8_t enhanced_features;
uint8_t reserved_23;
uint16_t enhanced_features;
uint16_t reserved_24[4];
/* Offset 416. */