--- /dev/null
+From: Andrew Vasquez <andrew.vasquez@qlogic.com>
+Subject: Update qla2xxx to 8.02.01-k9
+References: bnc#439208
+Patch-Mainline: 2.6.28
+
+Since our last resync of SLES11 patches, We've since pushed upstream
+another round of updates which we'd like pulled into the SLES11 tree.
+
+Here's the upstream pull request:
+
+ [PATCH 0/5] qla2xxx: fixes for 2.6.28 [8.02.01-k9].
+ http://article.gmane.org/gmane.linux.scsi/45496
+
+through the following commits:
+
+ qla2xxx: Correct Atmel flash-part handling.
+ qla2xxx: Use pci_disable_rom() to manipulate PCI config space.
+ qla2xxx: Do not honour max_vports from firmware for 2G ISPs and below.
+ qla2xxx: Return a FAILED status when abort mailbox-command fails.
+ qla2xxx: Update version number to 8.02.01-k9.
+
+there's actually only 4 of the 5 which are applicable or SLES11:
+
+ qla2xxx: Correct Atmel flash-part handling.
+ http://article.gmane.org/gmane.linux.scsi/45495
+
+ qla2xxx: Do not honour max_vports from firmware for 2G ISPs and below.
+ http://article.gmane.org/gmane.linux.scsi/45498
+
+ qla2xxx: Return a FAILED status when abort mailbox-command fails.
+ http://article.gmane.org/gmane.linux.scsi/45494
+
+ qla2xxx: Update version number to 8.02.01-k9.
+ http://article.gmane.org/gmane.linux.scsi/45499
+
+Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
+Signed-off-by: Hannes Reinecke <hare@suse.de>
+
+diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
+index ab802e9..a45e333 100644
+--- a/drivers/scsi/qla2xxx/qla_def.h
++++ b/drivers/scsi/qla2xxx/qla_def.h
+@@ -2548,7 +2548,6 @@ typedef struct scsi_qla_host {
+ uint8_t fcode_revision[16];
+ uint32_t fw_revision[4];
+
+- uint16_t fdt_odd_index;
+ uint32_t fdt_wrt_disable;
+ uint32_t fdt_erase_cmd;
+ uint32_t fdt_block_size;
+diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
+index a470f2d..ad2dd8c 100644
+--- a/drivers/scsi/qla2xxx/qla_init.c
++++ b/drivers/scsi/qla2xxx/qla_init.c
+@@ -980,7 +980,6 @@ qla2x00_setup_chip(scsi_qla_host_t *ha)
+ &ha->fw_minor_version,
+ &ha->fw_subminor_version,
+ &ha->fw_attributes, &ha->fw_memory_size);
+- qla2x00_resize_request_q(ha);
+ ha->flags.npiv_supported = 0;
+ if ((IS_QLA24XX(ha) || IS_QLA25XX(ha) ||
+ IS_QLA84XX(ha)) &&
+@@ -992,6 +991,7 @@ qla2x00_setup_chip(scsi_qla_host_t *ha)
+ ha->max_npiv_vports =
+ MIN_MULTI_ID_FABRIC - 1;
+ }
++ qla2x00_resize_request_q(ha);
+
+ if (ql2xallocfwdump)
+ qla2x00_alloc_fw_dump(ha);
+diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
+index 36bc685..3402746 100644
+--- a/drivers/scsi/qla2xxx/qla_mbx.c
++++ b/drivers/scsi/qla2xxx/qla_mbx.c
+@@ -1964,7 +1964,7 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *ha, uint16_t *cur_xchg_cnt,
+ *cur_iocb_cnt = mcp->mb[7];
+ if (orig_iocb_cnt)
+ *orig_iocb_cnt = mcp->mb[10];
+- if (max_npiv_vports)
++ if (ha->flags.npiv_supported && max_npiv_vports)
+ *max_npiv_vports = mcp->mb[11];
+ }
+
+diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
+index 2aed472..4774acb 100644
+--- a/drivers/scsi/qla2xxx/qla_os.c
++++ b/drivers/scsi/qla2xxx/qla_os.c
+@@ -728,6 +728,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
+ if (ha->isp_ops->abort_command(ha, sp)) {
+ DEBUG2(printk("%s(%ld): abort_command "
+ "mbx failed.\n", __func__, ha->host_no));
++ ret = FAILED;
+ } else {
+ DEBUG3(printk("%s(%ld): abort_command "
+ "mbx success.\n", __func__, ha->host_no));
+diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
+index e2432ef..6729a39 100644
+--- a/drivers/scsi/qla2xxx/qla_sup.c
++++ b/drivers/scsi/qla2xxx/qla_sup.c
+@@ -722,6 +722,7 @@ done:
+ static void
+ qla2xxx_get_fdt_info(scsi_qla_host_t *ha)
+ {
++#define FLASH_BLK_SIZE_4K 0x1000
+ #define FLASH_BLK_SIZE_32K 0x8000
+ #define FLASH_BLK_SIZE_64K 0x10000
+ const char *loc, *locations[] = { "MID", "FDT" };
+@@ -755,7 +756,6 @@ qla2xxx_get_fdt_info(scsi_qla_host_t *ha)
+ loc = locations[1];
+ mid = le16_to_cpu(fdt->man_id);
+ fid = le16_to_cpu(fdt->id);
+- ha->fdt_odd_index = mid == 0x1f;
+ ha->fdt_wrt_disable = fdt->wrt_disable_bits;
+ ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0300 | fdt->erase_cmd);
+ ha->fdt_block_size = le32_to_cpu(fdt->block_size);
+@@ -788,8 +788,7 @@ no_flash_data:
+ ha->fdt_block_size = FLASH_BLK_SIZE_64K;
+ break;
+ case 0x1f: /* Atmel 26DF081A. */
+- ha->fdt_odd_index = 1;
+- ha->fdt_block_size = FLASH_BLK_SIZE_64K;
++ ha->fdt_block_size = FLASH_BLK_SIZE_4K;
+ ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0320);
+ ha->fdt_unprotect_sec_cmd = flash_conf_to_access_addr(0x0339);
+ ha->fdt_protect_sec_cmd = flash_conf_to_access_addr(0x0336);
+@@ -801,9 +800,9 @@ no_flash_data:
+ }
+ done:
+ DEBUG2(qla_printk(KERN_DEBUG, ha, "FDT[%s]: (0x%x/0x%x) erase=0x%x "
+- "pro=%x upro=%x idx=%d wrtd=0x%x blk=0x%x.\n", loc, mid, fid,
++ "pro=%x upro=%x wrtd=0x%x blk=0x%x.\n", loc, mid, fid,
+ ha->fdt_erase_cmd, ha->fdt_protect_sec_cmd,
+- ha->fdt_unprotect_sec_cmd, ha->fdt_odd_index, ha->fdt_wrt_disable,
++ ha->fdt_unprotect_sec_cmd, ha->fdt_wrt_disable,
+ ha->fdt_block_size));
+ }
+
+@@ -985,13 +984,9 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr,
+ qla24xx_unprotect_flash(ha);
+
+ for (liter = 0; liter < dwords; liter++, faddr++, dwptr++) {
+- if (ha->fdt_odd_index) {
+- findex = faddr << 2;
+- fdata = findex & sec_mask;
+- } else {
+- findex = faddr;
+- fdata = (findex & sec_mask) << 2;
+- }
++
++ findex = faddr;
++ fdata = (findex & sec_mask) << 2;
+
+ /* Are we at the beginning of a sector? */
+ if ((findex & rest_addr) == 0) {
+diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h
+index be5e299..eea6720 100644
+--- a/drivers/scsi/qla2xxx/qla_version.h
++++ b/drivers/scsi/qla2xxx/qla_version.h
+@@ -7,7 +7,7 @@
+ /*
+ * Driver version
+ */
+-#define QLA2XXX_VERSION "8.02.01-k8"
++#define QLA2XXX_VERSION "8.02.01-k9"
+
+ #define QLA_DRIVER_MAJOR_VER 8
+ #define QLA_DRIVER_MINOR_VER 2