diff options
author | Santosh Vernekar <santosh.vernekar@qlogic.com> | 2010-03-19 19:59:16 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-03-27 15:11:29 -0400 |
commit | cad454b12a23c24fd7f409402cf51434655e76c1 (patch) | |
tree | 4cf65ae456d4afab9491492ca1343d3a86167c06 /drivers/scsi | |
parent | d88a714bfefa7aed7b9cb6c3721707fcd056b472 (diff) |
[SCSI] qla2xxx: Honour "Extended BB credits" bit for CNAs.
We now enable/disable "Additional Receive Credits" in f/w based on nvram
parameter "Extended_BB_Credits" bit (i.e. Enhanced-Features: at offset 0x196).
This is applicable only for GEN2 CNAs.
Signed-off-by: Santosh Vernekar <santosh.vernekar@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_fw.h | 18 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 8 |
2 files changed, 22 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h index cebf4f1bb7d9..42c5587cc50c 100644 --- a/drivers/scsi/qla2xxx/qla_fw.h +++ b/drivers/scsi/qla2xxx/qla_fw.h | |||
@@ -1592,10 +1592,22 @@ struct nvram_81xx { | |||
1592 | 1592 | ||
1593 | /* Offset 384. */ | 1593 | /* Offset 384. */ |
1594 | uint8_t reserved_21[16]; | 1594 | uint8_t reserved_21[16]; |
1595 | uint16_t reserved_22[8]; | 1595 | uint16_t reserved_22[3]; |
1596 | |||
1597 | /* | ||
1598 | * BIT 0 = Extended BB credits for LR | ||
1599 | * BIT 1 = Virtual Fabric Enable | ||
1600 | * BIT 2 = Enhanced Features Unused | ||
1601 | * BIT 3-7 = Enhanced Features Reserved | ||
1602 | */ | ||
1603 | /* Enhanced Features */ | ||
1604 | uint8_t enhanced_features; | ||
1605 | |||
1606 | uint8_t reserved_23; | ||
1607 | uint16_t reserved_24[4]; | ||
1596 | 1608 | ||
1597 | /* Offset 416. */ | 1609 | /* Offset 416. */ |
1598 | uint16_t reserved_23[32]; | 1610 | uint16_t reserved_25[32]; |
1599 | 1611 | ||
1600 | /* Offset 480. */ | 1612 | /* Offset 480. */ |
1601 | uint8_t model_name[16]; | 1613 | uint8_t model_name[16]; |
@@ -1603,7 +1615,7 @@ struct nvram_81xx { | |||
1603 | /* Offset 496. */ | 1615 | /* Offset 496. */ |
1604 | uint16_t feature_mask_l; | 1616 | uint16_t feature_mask_l; |
1605 | uint16_t feature_mask_h; | 1617 | uint16_t feature_mask_h; |
1606 | uint16_t reserved_24[2]; | 1618 | uint16_t reserved_26[2]; |
1607 | 1619 | ||
1608 | uint16_t subsystem_vendor_id; | 1620 | uint16_t subsystem_vendor_id; |
1609 | uint16_t subsystem_device_id; | 1621 | uint16_t subsystem_device_id; |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 6e53bdbb1da8..3ba9a2b56556 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -339,6 +339,7 @@ qla2x00_load_ram(scsi_qla_host_t *vha, dma_addr_t req_dma, uint32_t risc_addr, | |||
339 | return rval; | 339 | return rval; |
340 | } | 340 | } |
341 | 341 | ||
342 | #define EXTENDED_BB_CREDITS BIT_0 | ||
342 | /* | 343 | /* |
343 | * qla2x00_execute_fw | 344 | * qla2x00_execute_fw |
344 | * Start adapter firmware. | 345 | * Start adapter firmware. |
@@ -371,7 +372,12 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr) | |||
371 | mcp->mb[1] = MSW(risc_addr); | 372 | mcp->mb[1] = MSW(risc_addr); |
372 | mcp->mb[2] = LSW(risc_addr); | 373 | mcp->mb[2] = LSW(risc_addr); |
373 | mcp->mb[3] = 0; | 374 | mcp->mb[3] = 0; |
374 | mcp->mb[4] = 0; | 375 | if (IS_QLA81XX(ha)) { |
376 | struct nvram_81xx *nv = ha->nvram; | ||
377 | mcp->mb[4] = (nv->enhanced_features & | ||
378 | EXTENDED_BB_CREDITS); | ||
379 | } else | ||
380 | mcp->mb[4] = 0; | ||
375 | mcp->out_mb |= MBX_4|MBX_3|MBX_2|MBX_1; | 381 | mcp->out_mb |= MBX_4|MBX_3|MBX_2|MBX_1; |
376 | mcp->in_mb |= MBX_1; | 382 | mcp->in_mb |= MBX_1; |
377 | } else { | 383 | } else { |