]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Aug 2010 19:34:34 +0000 (12:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Aug 2010 19:34:34 +0000 (12:34 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (28 commits)
  [SCSI] qla4xxx: fix compilation warning
  [SCSI] make error handling more robust in the face of reservations
  [SCSI] tgt: fix warning
  [SCSI] drivers/message/fusion: Adjust confusing if indentation
  [SCSI] Return NEEDS_RETRY for eh commands with status BUSY
  [SCSI] ibmvfc: Driver version 1.0.9
  [SCSI] ibmvfc: Fix terminate_rport_io
  [SCSI] ibmvfc: Fix rport add/delete race resulting in oops
  [SCSI] lpfc 8.3.16: Change LPFC driver version to 8.3.16
  [SCSI] lpfc 8.3.16: FCoE Discovery and Failover Fixes
  [SCSI] lpfc 8.3.16: SLI Additions, updates, and code cleanup
  [SCSI] pm8001: introduce missing kfree
  [SCSI] qla4xxx: Update driver version to 5.02.00-k3
  [SCSI] qla4xxx: Added AER support for ISP82xx
  [SCSI] qla4xxx: Handle outstanding mbx cmds on hung f/w scenarios
  [SCSI] qla4xxx: updated mbx_sys_info struct to sync with FW 4.6.x
  [SCSI] qla4xxx: clear AF_DPC_SCHEDULED flage when exit from do_dpc
  [SCSI] qla4xxx: Stop firmware before doing init firmware.
  [SCSI] qla4xxx: Use the correct request queue.
  [SCSI] qla4xxx: set correct value in sess->recovery_tmo
  ...

1  2 
drivers/firmware/Kconfig
drivers/message/fusion/mptbase.c
drivers/scsi/Kconfig
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/scsi_error.c

diff --combined drivers/firmware/Kconfig
index d4ed8e98edf7b23fb9fd676c92ecfe3bb14c9e3c,f7cff381a4b88977262f95ea8823cff2db2cdae2..280c9b5ad9e375afafd3116cc75d8b6fc3eb12fd
@@@ -122,18 -122,10 +122,10 @@@ config ISCSI_IBFT_FIN
          is necessary for iSCSI Boot Firmware Table Attributes module to work
          properly.
  
- config ISCSI_BOOT_SYSFS
-       tristate "iSCSI Boot Sysfs Interface"
-       default n
-       help
-         This option enables support for exposing iSCSI boot information
-         via sysfs to userspace. If you wish to export this information,
-         say Y. Otherwise, say N.
  config ISCSI_IBFT
        tristate "iSCSI Boot Firmware Table Attributes module"
        select ISCSI_BOOT_SYSFS
 -      depends on ISCSI_IBFT_FIND
 +      depends on ISCSI_IBFT_FIND && SCSI
        default n
        help
          This option enables support for detection and exposing of iSCSI
index b8f1719d7c0259d39e5700bbe7ae249a46d14e4b,667d132730723585bdeaa0b68f3405dc6cf079a5..c425681a1503d0f476192434b731bdc753a674a3
@@@ -50,7 -50,6 +50,7 @@@
  #include <linux/module.h>
  #include <linux/errno.h>
  #include <linux/init.h>
 +#include <linux/seq_file.h>
  #include <linux/slab.h>
  #include <linux/types.h>
  #include <linux/pci.h>
@@@ -110,7 -109,8 +110,7 @@@ MODULE_PARM_DESC(mpt_debug_level, " deb
  
  int mpt_fwfault_debug;
  EXPORT_SYMBOL(mpt_fwfault_debug);
 -module_param_call(mpt_fwfault_debug, param_set_int, param_get_int,
 -        &mpt_fwfault_debug, 0600);
 +module_param(mpt_fwfault_debug, int, 0600);
  MODULE_PARM_DESC(mpt_fwfault_debug, "Enable detection of Firmware fault"
        " and halt Firmware on fault - (default=0)");
  
@@@ -200,9 -200,12 +200,9 @@@ static int        mpt_host_page_access_control
  static int    mpt_host_page_alloc(MPT_ADAPTER *ioc, pIOCInit_t ioc_init);
  
  #ifdef CONFIG_PROC_FS
 -static int    procmpt_summary_read(char *buf, char **start, off_t offset,
 -                              int request, int *eof, void *data);
 -static int    procmpt_version_read(char *buf, char **start, off_t offset,
 -                              int request, int *eof, void *data);
 -static int    procmpt_iocinfo_read(char *buf, char **start, off_t offset,
 -                              int request, int *eof, void *data);
 +static const struct file_operations mpt_summary_proc_fops;
 +static const struct file_operations mpt_version_proc_fops;
 +static const struct file_operations mpt_iocinfo_proc_fops;
  #endif
  static void   mpt_get_fw_exp_ver(char *buf, MPT_ADAPTER *ioc);
  
@@@ -1722,7 -1725,7 +1722,7 @@@ mpt_attach(struct pci_dev *pdev, const 
        u8               pcixcmd;
        static int       mpt_ids = 0;
  #ifdef CONFIG_PROC_FS
 -      struct proc_dir_entry *dent, *ent;
 +      struct proc_dir_entry *dent;
  #endif
  
        ioc = kzalloc(sizeof(MPT_ADAPTER), GFP_ATOMIC);
         */
        dent = proc_mkdir(ioc->name, mpt_proc_root_dir);
        if (dent) {
 -              ent = create_proc_entry("info", S_IFREG|S_IRUGO, dent);
 -              if (ent) {
 -                      ent->read_proc = procmpt_iocinfo_read;
 -                      ent->data = ioc;
 -              }
 -              ent = create_proc_entry("summary", S_IFREG|S_IRUGO, dent);
 -              if (ent) {
 -                      ent->read_proc = procmpt_summary_read;
 -                      ent->data = ioc;
 -              }
 +              proc_create_data("info", S_IRUGO, dent, &mpt_iocinfo_proc_fops, ioc);
 +              proc_create_data("summary", S_IRUGO, dent, &mpt_summary_proc_fops, ioc);
        }
  #endif
  
@@@ -6535,12 -6546,20 +6535,12 @@@ mpt_ioc_reset(MPT_ADAPTER *ioc, int res
  static int
  procmpt_create(void)
  {
 -      struct proc_dir_entry   *ent;
 -
        mpt_proc_root_dir = proc_mkdir(MPT_PROCFS_MPTBASEDIR, NULL);
        if (mpt_proc_root_dir == NULL)
                return -ENOTDIR;
  
 -      ent = create_proc_entry("summary", S_IFREG|S_IRUGO, mpt_proc_root_dir);
 -      if (ent)
 -              ent->read_proc = procmpt_summary_read;
 -
 -      ent = create_proc_entry("version", S_IFREG|S_IRUGO, mpt_proc_root_dir);
 -      if (ent)
 -              ent->read_proc = procmpt_version_read;
 -
 +      proc_create("summary", S_IRUGO, mpt_proc_root_dir, &mpt_summary_proc_fops);
 +      proc_create("version", S_IRUGO, mpt_proc_root_dir, &mpt_version_proc_fops);
        return 0;
  }
  
@@@ -6560,46 -6579,70 +6560,46 @@@ procmpt_destroy(void
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  /**
 - *    procmpt_summary_read - Handle read request of a summary file
 - *    @buf: Pointer to area to write information
 - *    @start: Pointer to start pointer
 - *    @offset: Offset to start writing
 - *    @request: Amount of read data requested
 - *    @eof: Pointer to EOF integer
 - *    @data: Pointer
 - *
   *    Handles read request from /proc/mpt/summary or /proc/mpt/iocN/summary.
 - *    Returns number of characters written to process performing the read.
   */
 -static int
 -procmpt_summary_read(char *buf, char **start, off_t offset, int request, int *eof, void *data)
 -{
 -      MPT_ADAPTER *ioc;
 -      char *out = buf;
 -      int len;
 +static void seq_mpt_print_ioc_summary(MPT_ADAPTER *ioc, struct seq_file *m, int showlan);
  
 -      if (data) {
 -              int more = 0;
 -
 -              ioc = data;
 -              mpt_print_ioc_summary(ioc, out, &more, 0, 1);
 +static int mpt_summary_proc_show(struct seq_file *m, void *v)
 +{
 +      MPT_ADAPTER *ioc = m->private;
  
 -              out += more;
 +      if (ioc) {
 +              seq_mpt_print_ioc_summary(ioc, m, 1);
        } else {
                list_for_each_entry(ioc, &ioc_list, list) {
 -                      int     more = 0;
 -
 -                      mpt_print_ioc_summary(ioc, out, &more, 0, 1);
 -
 -                      out += more;
 -                      if ((out-buf) >= request)
 -                              break;
 +                      seq_mpt_print_ioc_summary(ioc, m, 1);
                }
        }
  
 -      len = out - buf;
 +      return 0;
 +}
  
 -      MPT_PROC_READ_RETURN(buf,start,offset,request,eof,len);
 +static int mpt_summary_proc_open(struct inode *inode, struct file *file)
 +{
 +      return single_open(file, mpt_summary_proc_show, PDE(inode)->data);
  }
  
 -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 -/**
 - *    procmpt_version_read - Handle read request from /proc/mpt/version.
 - *    @buf: Pointer to area to write information
 - *    @start: Pointer to start pointer
 - *    @offset: Offset to start writing
 - *    @request: Amount of read data requested
 - *    @eof: Pointer to EOF integer
 - *    @data: Pointer
 - *
 - *    Returns number of characters written to process performing the read.
 - */
 -static int
 -procmpt_version_read(char *buf, char **start, off_t offset, int request, int *eof, void *data)
 +static const struct file_operations mpt_summary_proc_fops = {
 +      .owner          = THIS_MODULE,
 +      .open           = mpt_summary_proc_open,
 +      .read           = seq_read,
 +      .llseek         = seq_lseek,
 +      .release        = single_release,
 +};
 +
 +static int mpt_version_proc_show(struct seq_file *m, void *v)
  {
        u8       cb_idx;
        int      scsi, fc, sas, lan, ctl, targ, dmp;
        char    *drvname;
 -      int      len;
  
 -      len = sprintf(buf, "%s-%s\n", "mptlinux", MPT_LINUX_VERSION_COMMON);
 -      len += sprintf(buf+len, "  Fusion MPT base driver\n");
 +      seq_printf(m, "%s-%s\n", "mptlinux", MPT_LINUX_VERSION_COMMON);
 +      seq_printf(m, "  Fusion MPT base driver\n");
  
        scsi = fc = sas = lan = ctl = targ = dmp = 0;
        for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) {
                        }
  
                        if (drvname)
 -                              len += sprintf(buf+len, "  Fusion MPT %s driver\n", drvname);
 +                              seq_printf(m, "  Fusion MPT %s driver\n", drvname);
                }
        }
  
 -      MPT_PROC_READ_RETURN(buf,start,offset,request,eof,len);
 +      return 0;
  }
  
 -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 -/**
 - *    procmpt_iocinfo_read - Handle read request from /proc/mpt/iocN/info.
 - *    @buf: Pointer to area to write information
 - *    @start: Pointer to start pointer
 - *    @offset: Offset to start writing
 - *    @request: Amount of read data requested
 - *    @eof: Pointer to EOF integer
 - *    @data: Pointer
 - *
 - *    Returns number of characters written to process performing the read.
 - */
 -static int
 -procmpt_iocinfo_read(char *buf, char **start, off_t offset, int request, int *eof, void *data)
 +static int mpt_version_proc_open(struct inode *inode, struct file *file)
 +{
 +      return single_open(file, mpt_version_proc_show, NULL);
 +}
 +
 +static const struct file_operations mpt_version_proc_fops = {
 +      .owner          = THIS_MODULE,
 +      .open           = mpt_version_proc_open,
 +      .read           = seq_read,
 +      .llseek         = seq_lseek,
 +      .release        = single_release,
 +};
 +
 +static int mpt_iocinfo_proc_show(struct seq_file *m, void *v)
  {
 -      MPT_ADAPTER     *ioc = data;
 -      int              len;
 +      MPT_ADAPTER     *ioc = m->private;
        char             expVer[32];
        int              sz;
        int              p;
  
        mpt_get_fw_exp_ver(expVer, ioc);
  
 -      len = sprintf(buf, "%s:", ioc->name);
 +      seq_printf(m, "%s:", ioc->name);
        if (ioc->facts.Flags & MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT)
 -              len += sprintf(buf+len, "  (f/w download boot flag set)");
 +              seq_printf(m, "  (f/w download boot flag set)");
  //    if (ioc->facts.IOCExceptions & MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL)
 -//            len += sprintf(buf+len, "  CONFIG_CHECKSUM_FAIL!");
 +//            seq_printf(m, "  CONFIG_CHECKSUM_FAIL!");
  
 -      len += sprintf(buf+len, "\n  ProductID = 0x%04x (%s)\n",
 +      seq_printf(m, "\n  ProductID = 0x%04x (%s)\n",
                        ioc->facts.ProductID,
                        ioc->prod_name);
 -      len += sprintf(buf+len, "  FWVersion = 0x%08x%s", ioc->facts.FWVersion.Word, expVer);
 +      seq_printf(m, "  FWVersion = 0x%08x%s", ioc->facts.FWVersion.Word, expVer);
        if (ioc->facts.FWImageSize)
 -              len += sprintf(buf+len, " (fw_size=%d)", ioc->facts.FWImageSize);
 -      len += sprintf(buf+len, "\n  MsgVersion = 0x%04x\n", ioc->facts.MsgVersion);
 -      len += sprintf(buf+len, "  FirstWhoInit = 0x%02x\n", ioc->FirstWhoInit);
 -      len += sprintf(buf+len, "  EventState = 0x%02x\n", ioc->facts.EventState);
 +              seq_printf(m, " (fw_size=%d)", ioc->facts.FWImageSize);
 +      seq_printf(m, "\n  MsgVersion = 0x%04x\n", ioc->facts.MsgVersion);
 +      seq_printf(m, "  FirstWhoInit = 0x%02x\n", ioc->FirstWhoInit);
 +      seq_printf(m, "  EventState = 0x%02x\n", ioc->facts.EventState);
  
 -      len += sprintf(buf+len, "  CurrentHostMfaHighAddr = 0x%08x\n",
 +      seq_printf(m, "  CurrentHostMfaHighAddr = 0x%08x\n",
                        ioc->facts.CurrentHostMfaHighAddr);
 -      len += sprintf(buf+len, "  CurrentSenseBufferHighAddr = 0x%08x\n",
 +      seq_printf(m, "  CurrentSenseBufferHighAddr = 0x%08x\n",
                        ioc->facts.CurrentSenseBufferHighAddr);
  
 -      len += sprintf(buf+len, "  MaxChainDepth = 0x%02x frames\n", ioc->facts.MaxChainDepth);
 -      len += sprintf(buf+len, "  MinBlockSize = 0x%02x bytes\n", 4*ioc->facts.BlockSize);
 +      seq_printf(m, "  MaxChainDepth = 0x%02x frames\n", ioc->facts.MaxChainDepth);
 +      seq_printf(m, "  MinBlockSize = 0x%02x bytes\n", 4*ioc->facts.BlockSize);
  
 -      len += sprintf(buf+len, "  RequestFrames @ 0x%p (Dma @ 0x%p)\n",
 +      seq_printf(m, "  RequestFrames @ 0x%p (Dma @ 0x%p)\n",
                                        (void *)ioc->req_frames, (void *)(ulong)ioc->req_frames_dma);
        /*
         *  Rounding UP to nearest 4-kB boundary here...
         */
        sz = (ioc->req_sz * ioc->req_depth) + 128;
        sz = ((sz + 0x1000UL - 1UL) / 0x1000) * 0x1000;
 -      len += sprintf(buf+len, "    {CurReqSz=%d} x {CurReqDepth=%d} = %d bytes ^= 0x%x\n",
 +      seq_printf(m, "    {CurReqSz=%d} x {CurReqDepth=%d} = %d bytes ^= 0x%x\n",
                                        ioc->req_sz, ioc->req_depth, ioc->req_sz*ioc->req_depth, sz);
 -      len += sprintf(buf+len, "    {MaxReqSz=%d}   {MaxReqDepth=%d}\n",
 +      seq_printf(m, "    {MaxReqSz=%d}   {MaxReqDepth=%d}\n",
                                        4*ioc->facts.RequestFrameSize,
                                        ioc->facts.GlobalCredits);
  
 -      len += sprintf(buf+len, "  Frames   @ 0x%p (Dma @ 0x%p)\n",
 +      seq_printf(m, "  Frames   @ 0x%p (Dma @ 0x%p)\n",
                                        (void *)ioc->alloc, (void *)(ulong)ioc->alloc_dma);
        sz = (ioc->reply_sz * ioc->reply_depth) + 128;
 -      len += sprintf(buf+len, "    {CurRepSz=%d} x {CurRepDepth=%d} = %d bytes ^= 0x%x\n",
 +      seq_printf(m, "    {CurRepSz=%d} x {CurRepDepth=%d} = %d bytes ^= 0x%x\n",
                                        ioc->reply_sz, ioc->reply_depth, ioc->reply_sz*ioc->reply_depth, sz);
 -      len += sprintf(buf+len, "    {MaxRepSz=%d}   {MaxRepDepth=%d}\n",
 +      seq_printf(m, "    {MaxRepSz=%d}   {MaxRepDepth=%d}\n",
                                        ioc->facts.CurReplyFrameSize,
                                        ioc->facts.ReplyQueueDepth);
  
 -      len += sprintf(buf+len, "  MaxDevices = %d\n",
 +      seq_printf(m, "  MaxDevices = %d\n",
                        (ioc->facts.MaxDevices==0) ? 255 : ioc->facts.MaxDevices);
 -      len += sprintf(buf+len, "  MaxBuses = %d\n", ioc->facts.MaxBuses);
 +      seq_printf(m, "  MaxBuses = %d\n", ioc->facts.MaxBuses);
  
        /* per-port info */
        for (p=0; p < ioc->facts.NumberOfPorts; p++) {
 -              len += sprintf(buf+len, "  PortNumber = %d (of %d)\n",
 +              seq_printf(m, "  PortNumber = %d (of %d)\n",
                                p+1,
                                ioc->facts.NumberOfPorts);
                if (ioc->bus_type == FC) {
                        if (ioc->pfacts[p].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN) {
                                u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow;
 -                              len += sprintf(buf+len, "    LanAddr = %02X:%02X:%02X:%02X:%02X:%02X\n",
 +                              seq_printf(m, "    LanAddr = %02X:%02X:%02X:%02X:%02X:%02X\n",
                                                a[5], a[4], a[3], a[2], a[1], a[0]);
                        }
 -                      len += sprintf(buf+len, "    WWN = %08X%08X:%08X%08X\n",
 +                      seq_printf(m, "    WWN = %08X%08X:%08X%08X\n",
                                        ioc->fc_port_page0[p].WWNN.High,
                                        ioc->fc_port_page0[p].WWNN.Low,
                                        ioc->fc_port_page0[p].WWPN.High,
                }
        }
  
 -      MPT_PROC_READ_RETURN(buf,start,offset,request,eof,len);
 +      return 0;
  }
  
 +static int mpt_iocinfo_proc_open(struct inode *inode, struct file *file)
 +{
 +      return single_open(file, mpt_iocinfo_proc_show, PDE(inode)->data);
 +}
 +
 +static const struct file_operations mpt_iocinfo_proc_fops = {
 +      .owner          = THIS_MODULE,
 +      .open           = mpt_iocinfo_proc_open,
 +      .read           = seq_read,
 +      .llseek         = seq_lseek,
 +      .release        = single_release,
 +};
  #endif                /* CONFIG_PROC_FS } */
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@@ -6805,39 -6837,6 +6805,39 @@@ mpt_print_ioc_summary(MPT_ADAPTER *ioc
  
        *size = y;
  }
 +
 +static void seq_mpt_print_ioc_summary(MPT_ADAPTER *ioc, struct seq_file *m, int showlan)
 +{
 +      char expVer[32];
 +
 +      mpt_get_fw_exp_ver(expVer, ioc);
 +
 +      /*
 +       *  Shorter summary of attached ioc's...
 +       */
 +      seq_printf(m, "%s: %s, %s%08xh%s, Ports=%d, MaxQ=%d",
 +                      ioc->name,
 +                      ioc->prod_name,
 +                      MPT_FW_REV_MAGIC_ID_STRING,     /* "FwRev=" or somesuch */
 +                      ioc->facts.FWVersion.Word,
 +                      expVer,
 +                      ioc->facts.NumberOfPorts,
 +                      ioc->req_depth);
 +
 +      if (showlan && (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN)) {
 +              u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow;
 +              seq_printf(m, ", LanAddr=%02X:%02X:%02X:%02X:%02X:%02X",
 +                      a[5], a[4], a[3], a[2], a[1], a[0]);
 +      }
 +
 +      seq_printf(m, ", IRQ=%d", ioc->pci_irq);
 +
 +      if (!ioc->active)
 +              seq_printf(m, " (disabled)");
 +
 +      seq_putc(m, '\n');
 +}
 +
  /**
   *    mpt_set_taskmgmt_in_progress_flag - set flags associated with task management
   *    @ioc: Pointer to MPT_ADAPTER structure
@@@ -6923,6 -6922,7 +6923,6 @@@ EXPORT_SYMBOL(mpt_halt_firmware)
   *    mpt_SoftResetHandler - Issues a less expensive reset
   *    @ioc: Pointer to MPT_ADAPTER structure
   *    @sleepFlag: Indicates if sleep or schedule must be called.
 -
   *
   *    Returns 0 for SUCCESS or -1 if FAILED.
   *
@@@ -7067,6 -7067,7 +7067,6 @@@ mpt_SoftResetHandler(MPT_ADAPTER *ioc, 
   *    mpt_Soft_Hard_ResetHandler - Try less expensive reset
   *    @ioc: Pointer to MPT_ADAPTER structure
   *    @sleepFlag: Indicates if sleep or schedule must be called.
 -
   *
   *    Returns 0 for SUCCESS or -1 if FAILED.
   *    Try for softreset first, only if it fails go for expensive
@@@ -8049,7 -8050,7 +8049,7 @@@ union loginfo_type 
                        code_desc = ir_code_str[sas_loginfo.dw.code];
                        if (sas_loginfo.dw.subcode >=
                            ARRAY_SIZE(raid_sub_code_str))
-                       break;
+                               break;
                        if (sas_loginfo.dw.code == 0)
                                sub_code_desc =
                                    raid_sub_code_str[sas_loginfo.dw.subcode];
diff --combined drivers/scsi/Kconfig
index 6466231f338bdb95ef147a64f478bd8857b05535,a479b3b7ea907d53458de9f3f0df101e7d5a2714..bbf91aec64f555e532919f680a4702c99fcfd9b2
@@@ -370,6 -370,14 +370,14 @@@ config ISCSI_TC
  
         http://open-iscsi.org
  
+ config ISCSI_BOOT_SYSFS
+       tristate "iSCSI Boot Sysfs Interface"
+       default n
+       help
+         This option enables support for exposing iSCSI boot information
+         via sysfs to userspace. If you wish to export this information,
+         say Y. Otherwise, say N.
  source "drivers/scsi/cxgb3i/Kconfig"
  source "drivers/scsi/bnx2i/Kconfig"
  source "drivers/scsi/be2iscsi/Kconfig"
@@@ -1853,7 -1861,7 +1861,7 @@@ config ZFCP_DI
  
  config SCSI_PMCRAID
        tristate "PMC SIERRA Linux MaxRAID adapter support"
 -      depends on PCI && SCSI
 +      depends on PCI && SCSI && NET
        ---help---
          This driver supports the PMC SIERRA MaxRAID adapters.
  
index ad05b266e9501c4ab5f77084a3ff46f3e604cc53,fac26e4445f963a7b87d6d3d07993e9766131c62..23ce4570833588a2e645f9d64760e3676284d883
@@@ -25,7 -25,6 +25,7 @@@
  #include <linux/interrupt.h>
  #include <linux/aer.h>
  #include <linux/gfp.h>
 +#include <linux/kernel.h>
  
  #include <scsi/scsi.h>
  #include <scsi/scsi_device.h>
@@@ -1239,6 -1238,44 +1239,44 @@@ lpfc_poll_store(struct device *dev, str
        return strlen(buf);
  }
  
+ /**
+  * lpfc_fips_level_show - Return the current FIPS level for the HBA
+  * @dev: class unused variable.
+  * @attr: device attribute, not used.
+  * @buf: on return contains the module description text.
+  *
+  * Returns: size of formatted string.
+  **/
+ static ssize_t
+ lpfc_fips_level_show(struct device *dev,  struct device_attribute *attr,
+                    char *buf)
+ {
+       struct Scsi_Host  *shost = class_to_shost(dev);
+       struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
+       struct lpfc_hba   *phba = vport->phba;
+       return snprintf(buf, PAGE_SIZE, "%d\n", phba->fips_level);
+ }
+ /**
+  * lpfc_fips_rev_show - Return the FIPS Spec revision for the HBA
+  * @dev: class unused variable.
+  * @attr: device attribute, not used.
+  * @buf: on return contains the module description text.
+  *
+  * Returns: size of formatted string.
+  **/
+ static ssize_t
+ lpfc_fips_rev_show(struct device *dev,  struct device_attribute *attr,
+                  char *buf)
+ {
+       struct Scsi_Host  *shost = class_to_shost(dev);
+       struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
+       struct lpfc_hba   *phba = vport->phba;
+       return snprintf(buf, PAGE_SIZE, "%d\n", phba->fips_spec_rev);
+ }
  /**
   * lpfc_param_show - Return a cfg attribute value in decimal
   *
@@@ -1677,6 -1714,8 +1715,8 @@@ static DEVICE_ATTR(max_xri, S_IRUGO, lp
  static DEVICE_ATTR(used_xri, S_IRUGO, lpfc_used_xri_show, NULL);
  static DEVICE_ATTR(npiv_info, S_IRUGO, lpfc_npiv_info_show, NULL);
  static DEVICE_ATTR(lpfc_temp_sensor, S_IRUGO, lpfc_temp_sensor_show, NULL);
+ static DEVICE_ATTR(lpfc_fips_level, S_IRUGO, lpfc_fips_level_show, NULL);
+ static DEVICE_ATTR(lpfc_fips_rev, S_IRUGO, lpfc_fips_rev_show, NULL);
  
  
  static char *lpfc_soft_wwn_key = "C99G71SL8032A";
@@@ -1796,11 -1835,12 +1836,11 @@@ lpfc_soft_wwpn_store(struct device *dev
  
        /* Validate and store the new name */
        for (i=0, j=0; i < 16; i++) {
 -              if ((*buf >= 'a') && (*buf <= 'f'))
 -                      j = ((j << 4) | ((*buf++ -'a') + 10));
 -              else if ((*buf >= 'A') && (*buf <= 'F'))
 -                      j = ((j << 4) | ((*buf++ -'A') + 10));
 -              else if ((*buf >= '0') && (*buf <= '9'))
 -                      j = ((j << 4) | (*buf++ -'0'));
 +              int value;
 +
 +              value = hex_to_bin(*buf++);
 +              if (value >= 0)
 +                      j = (j << 4) | value;
                else
                        return -EINVAL;
                if (i % 2) {
@@@ -1888,11 -1928,12 +1928,11 @@@ lpfc_soft_wwnn_store(struct device *dev
  
        /* Validate and store the new name */
        for (i=0, j=0; i < 16; i++) {
 -              if ((*buf >= 'a') && (*buf <= 'f'))
 -                      j = ((j << 4) | ((*buf++ -'a') + 10));
 -              else if ((*buf >= 'A') && (*buf <= 'F'))
 -                      j = ((j << 4) | ((*buf++ -'A') + 10));
 -              else if ((*buf >= '0') && (*buf <= '9'))
 -                      j = ((j << 4) | (*buf++ -'0'));
 +              int value;
 +
 +              value = hex_to_bin(*buf++);
 +              if (value >= 0)
 +                      j = (j << 4) | value;
                else
                        return -EINVAL;
                if (i % 2) {
@@@ -2777,6 -2818,7 +2817,6 @@@ static struct bin_attribute sysfs_drvr_
        .attr = {
                .name = "lpfc_drvr_stat_data",
                .mode = S_IRUSR,
 -              .owner = THIS_MODULE,
        },
        .size = LPFC_MAX_TARGET * MAX_STAT_DATA_SIZE_PER_TARGET,
        .read = sysfs_drvr_stat_data_read,
@@@ -3278,7 -3320,7 +3318,7 @@@ LPFC_ATTR_R(enable_bg, 0, 0, 1, "Enabl
  #     - Default will result in registering capabilities for all profiles.
  #
  */
- unsigned int lpfc_prot_mask =   SHOST_DIX_TYPE0_PROTECTION;
+ unsigned int lpfc_prot_mask = SHOST_DIF_TYPE1_PROTECTION;
  
  module_param(lpfc_prot_mask, uint, 0);
  MODULE_PARM_DESC(lpfc_prot_mask, "host protection mask");
@@@ -3383,6 -3425,8 +3423,8 @@@ struct device_attribute *lpfc_hba_attrs
        &dev_attr_iocb_hw,
        &dev_attr_txq_hw,
        &dev_attr_txcmplq_hw,
+       &dev_attr_lpfc_fips_level,
+       &dev_attr_lpfc_fips_rev,
        NULL,
  };
  
@@@ -3409,6 -3453,8 +3451,8 @@@ struct device_attribute *lpfc_vport_att
        &dev_attr_lpfc_max_scsicmpl_time,
        &dev_attr_lpfc_stat_data_ctrl,
        &dev_attr_lpfc_static_vport,
+       &dev_attr_lpfc_fips_level,
+       &dev_attr_lpfc_fips_rev,
        NULL,
  };
  
index bbbc186dbc1a413f0ef0e77c07710fa11bfb03e6,0bd88381c1e1d10f3402eaa8c62ab04e7f63b66b..1de30eb83bb097664056209ec6d06a470385b76d
@@@ -320,7 -320,7 +320,7 @@@ static int scsi_check_sense(struct scsi
                                    "changed. The Linux SCSI layer does not "
                                    "automatically adjust these parameters.\n");
  
 -              if (blk_barrier_rq(scmd->request))
 +              if (scmd->request->cmd_flags & REQ_HARDBARRIER)
                        /*
                         * barrier requests should always retry on UA
                         * otherwise block will get a spurious error
@@@ -473,14 -473,17 +473,17 @@@ static int scsi_eh_completed_normally(s
                 */
                return SUCCESS;
        case RESERVATION_CONFLICT:
-               /*
-                * let issuer deal with this, it could be just fine
-                */
-               return SUCCESS;
+               if (scmd->cmnd[0] == TEST_UNIT_READY)
+                       /* it is a success, we probed the device and
+                        * found it */
+                       return SUCCESS;
+               /* otherwise, we failed to send the command */
+               return FAILED;
        case QUEUE_FULL:
                scsi_handle_queue_full(scmd->device);
                /* fall through */
        case BUSY:
+               return NEEDS_RETRY;
        default:
                return FAILED;
        }
@@@ -1331,16 -1334,16 +1334,16 @@@ int scsi_noretry_cmd(struct scsi_cmnd *
        case DID_OK:
                break;
        case DID_BUS_BUSY:
 -              return blk_failfast_transport(scmd->request);
 +              return (scmd->request->cmd_flags & REQ_FAILFAST_TRANSPORT);
        case DID_PARITY:
 -              return blk_failfast_dev(scmd->request);
 +              return (scmd->request->cmd_flags & REQ_FAILFAST_DEV);
        case DID_ERROR:
                if (msg_byte(scmd->result) == COMMAND_COMPLETE &&
                    status_byte(scmd->result) == RESERVATION_CONFLICT)
                        return 0;
                /* fall through */
        case DID_SOFT_ERROR:
 -              return blk_failfast_driver(scmd->request);
 +              return (scmd->request->cmd_flags & REQ_FAILFAST_DRIVER);
        }
  
        switch (status_byte(scmd->result)) {
                 * assume caller has checked sense and determinted
                 * the check condition was retryable.
                 */
 -              return blk_failfast_dev(scmd->request);
 +              if (scmd->request->cmd_flags & REQ_FAILFAST_DEV ||
 +                  scmd->request->cmd_type == REQ_TYPE_BLOCK_PC)
 +                      return 1;
        }
  
        return 0;