aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_fw.h
diff options
context:
space:
mode:
authorJoe Carnuccio <joe.carnuccio@qlogic.com>2009-03-24 12:08:06 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-04-03 10:22:48 -0400
commit1d2874de809a14e6780246b99a18bbc0fc0a8f2a (patch)
tree0f9dc305dc6f802c27bcef6edc607832864b7687 /drivers/scsi/qla2xxx/qla_fw.h
parentb9978769877c6c90c8d6777df13b9ae427af40b7 (diff)
[SCSI] qla2xxx: Add Flash-Access-Control support for recent ISPs.
Given the low-level interface varies from one flash-part manufacturer to the next, the Flash-Access-Control (FAC) mailbox command makes the specific flash type transparent to the driver by encapsulating a basic set of accessor and update routines. Use these new routines where applicable by querying FAC opcode get-sector-size at init-time. Additional cleanups and Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_fw.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_fw.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
index 05cf8380a486..98301931772a 100644
--- a/drivers/scsi/qla2xxx/qla_fw.h
+++ b/drivers/scsi/qla2xxx/qla_fw.h
@@ -1403,6 +1403,20 @@ struct access_chip_rsp_84xx {
1403#define MBA_IDC_TIME_EXT 0x8102 1403#define MBA_IDC_TIME_EXT 0x8102
1404 1404
1405#define MBC_IDC_ACK 0x101 1405#define MBC_IDC_ACK 0x101
1406#define MBC_FLASH_ACCESS_CTRL 0x3e /* Control flash access. */
1407
1408/* Flash access control option field bit definitions */
1409#define FAC_OPT_FORCE_SEMAPHORE BIT_15
1410#define FAC_OPT_REQUESTOR_ID BIT_14
1411#define FAC_OPT_CMD_SUBCODE 0xff
1412
1413/* Flash access control command subcodes */
1414#define FAC_OPT_CMD_WRITE_PROTECT 0x00
1415#define FAC_OPT_CMD_WRITE_ENABLE 0x01
1416#define FAC_OPT_CMD_ERASE_SECTOR 0x02
1417#define FAC_OPT_CMD_LOCK_SEMAPHORE 0x03
1418#define FAC_OPT_CMD_UNLOCK_SEMAPHORE 0x04
1419#define FAC_OPT_CMD_GET_SECTOR_SIZE 0x05
1406 1420
1407struct nvram_81xx { 1421struct nvram_81xx {
1408 /* NVRAM header. */ 1422 /* NVRAM header. */