--- /dev/null
+Subject: Update Emulex lpfc driver to 8.2.8.9
+From: Jamie Wellnitz <jamie.wellnitz@emulex.com>
+Date: Wed Dec 3 09:06:44 2008 +0100:
+References: bnc#420767
+
+Changes from 8.2.8.7 to 8.2.8.9:
+
+* Changed version number to 8.2.8.9
+* Remove unused defines from lpfc_auth_access.h
+* Fix firmware dump on CNAs (CR 86157)
+* Changed version number to 8.2.8.8
+* Fixed wrong number of bytes copied reported to applications (CR 85743)
+* Fixed potential spin_lock problem when HBA is in MSI-X mode
+
+Signed-off-by: Jamie Wellnitz <jamie.wellnitz@emulex.com>
+Signed-off-by: Hannes Reinecke <hare@suse.de>
+
+diff --git a/drivers/scsi/lpfc/lpfc_auth_access.h b/drivers/scsi/lpfc/lpfc_auth_access.h
+index be7525f..0aadcd3 100644
+--- a/drivers/scsi/lpfc/lpfc_auth_access.h
++++ b/drivers/scsi/lpfc/lpfc_auth_access.h
+@@ -1,7 +1,7 @@
+ /*******************************************************************
+ * This file is part of the Emulex Linux Device Driver for *
+ * Fibre Channel Host Bus Adapters. *
+- * Copyright (C) 2006-2007 Emulex. All rights reserved. *
++ * Copyright (C) 2006-2008 Emulex. All rights reserved. *
+ * EMULEX and SLI are trademarks of Emulex. *
+ * www.emulex.com *
+ * *
+@@ -18,26 +18,6 @@
+ * included with this package. *
+ *******************************************************************/
+
+-#define to_fc_internal(tmpl) container_of(tmpl, struct fc_internal, t)
+-
+-/* scsi_nl_hdr->version value */
+-#define SCSI_NL_VERSION 1
+-
+-/* scsi_nl_hdr->magic value */
+-#define SCSI_NL_MAGIC 0xA1B2
+-
+-/* scsi_nl_hdr->transport value */
+-#define SCSI_NL_TRANSPORT 0
+-#define SCSI_NL_TRANSPORT_FC 1
+-#define SCSI_NL_MAX_TRANSPORTS 2
+-
+-#define FC_NL_GROUP_CNT 0
+-
+- /* Note: when specifying vendor_id to fc_host_post_vendor_event()
+- * be sure to read the Vendor Type and ID formatting requirements
+- * specified in scsi_netlink.h
+- */
+-
+ #define FC_SC_REQ_TIMEOUT (60*HZ)
+
+ enum fc_sc_service_state {
+diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c
+index 84619ed..b5c7876 100644
+--- a/drivers/scsi/lpfc/lpfc_mbox.c
++++ b/drivers/scsi/lpfc/lpfc_mbox.c
+@@ -1349,10 +1349,12 @@ lpfc_mbox_get(struct lpfc_hba * phba)
+ void
+ lpfc_mbox_cmpl_put(struct lpfc_hba * phba, LPFC_MBOXQ_t * mbq)
+ {
++ unsigned long iflag;
++
+ /* This function expects to be called from interrupt context */
+- spin_lock(&phba->hbalock);
++ spin_lock_irqsave(&phba->hbalock, iflag);
+ list_add_tail(&mbq->list, &phba->sli.mboxq_cmpl);
+- spin_unlock(&phba->hbalock);
++ spin_unlock_irqrestore(&phba->hbalock, iflag);
+ return;
+ }
+
+diff --git a/drivers/scsi/lpfc/lpfc_menlo.c b/drivers/scsi/lpfc/lpfc_menlo.c
+index 4f3b332..12fd7fe 100644
+--- a/drivers/scsi/lpfc/lpfc_menlo.c
++++ b/drivers/scsi/lpfc/lpfc_menlo.c
+@@ -1064,13 +1064,22 @@ lpfc_menlo_read(struct lpfc_hba *phba, char *buf, loff_t off, size_t count,
+ }
+ genreq->offset += count;
+
+-
+- if (genreq->offset >= sysfs_menlo->cmdhdr.rspsize) {
++ if (genreq->offset >= (genreq->rspiocbq->iocb.un.ulpWord[0] &
++ 0x00ffffff)) {
+ lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC,
+- "1222 menlo_read: done off %d rc=%d"
+- " cnt %d rsp_code %x\n",
+- (int)off, rc, (int)count,*((uint32_t *)buf));
+- rc = count;
++ "1222 menlo_read: done off %d genoff:%d rspsz:%d "
++ "rc=%d cnt %d rsp_code %x Word0:%x\n",
++ (int)off, (int)genreq->offset,
++ sysfs_menlo->cmdhdr.rspsize, rc, (int)count,
++ *((uint32_t *)buf),
++ genreq->rspiocbq->iocb.un.ulpWord[0]);
++
++ if ((genreq->rspiocbq->iocb.un.ulpWord[0] & 0x00ffffff)
++ < sysfs_menlo->cmdhdr.rspsize)
++ rc = (genreq->rspiocbq->iocb.un.ulpWord[0] & 0x00ffffff)
++ + count - genreq->offset;
++ else
++ rc = count;
+ goto lpfc_menlo_read_err_exit;
+ }
+
+diff --git a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h
+index 16626a5..26f6760 100644
+--- a/drivers/scsi/lpfc/lpfc_version.h
++++ b/drivers/scsi/lpfc/lpfc_version.h
+@@ -18,7 +18,7 @@
+ * included with this package. *
+ *******************************************************************/
+
+-#define LPFC_DRIVER_VERSION "8.2.8.7"
++#define LPFC_DRIVER_VERSION "8.2.8.9"
+
+ #define LPFC_DRIVER_NAME "lpfc"
+ #define LPFC_SP_DRIVER_HANDLER_NAME "lpfc:sp"