From 1d2874de809a14e6780246b99a18bbc0fc0a8f2a Mon Sep 17 00:00:00 2001 From: Joe Carnuccio Date: Tue, 24 Mar 2009 09:08:06 -0700 Subject: [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 Signed-off-by: James Bottomley --- drivers/scsi/qla2xxx/qla_init.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'drivers/scsi/qla2xxx/qla_init.c') diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 0febfa648c34..c37888e8747d 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -1032,6 +1032,21 @@ qla2x00_setup_chip(scsi_qla_host_t *vha) spin_unlock_irqrestore(&ha->hardware_lock, flags); } + if (rval == QLA_SUCCESS && IS_FAC_REQUIRED(ha)) { + uint32_t size; + + rval = qla81xx_fac_get_sector_size(vha, &size); + if (rval == QLA_SUCCESS) { + ha->flags.fac_supported = 1; + ha->fdt_block_size = size << 2; + } else { + qla_printk(KERN_ERR, ha, + "Unsupported FAC firmware (%d.%02d.%02d).\n", + ha->fw_major_version, ha->fw_minor_version, + ha->fw_subminor_version); + } + } + if (rval) { DEBUG2_3(printk("scsi(%ld): Setup chip **** FAILED ****.\n", vha->host_no)); -- cgit v1.2.2