Merge branch 'master' of /pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 into for-40...
Nicholas Bellinger [Fri, 20 May 2011 02:16:55 +0000 (02:16 +0000)]
1  2 
MAINTAINERS
drivers/scsi/mpt2sas/mpt2sas_ctl.c
drivers/scsi/scsi_transport_fc.c

diff --combined MAINTAINERS
@@@ -151,7 -151,6 +151,7 @@@ S: Maintaine
  F:    drivers/net/hamradio/6pack.c
  
  8169 10/100/1000 GIGABIT ETHERNET DRIVER
 +M:    Realtek linux nic maintainers <nic_swsd@realtek.com>
  M:    Francois Romieu <romieu@fr.zoreil.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
@@@ -1032,13 -1031,12 +1032,13 @@@ W:   http://www.fluff.org/ben/linux
  S:    Maintained
  F:    arch/arm/mach-s3c64xx/
  
 -ARM/S5P ARM ARCHITECTURES
 +ARM/S5P EXYNOS ARM ARCHITECTURES
  M:    Kukjin Kim <kgene.kim@samsung.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-s5p*/
 +F:    arch/arm/mach-exynos*/
  
  ARM/SAMSUNG MOBILE MACHINE SUPPORT
  M:    Kyungmin Park <kyungmin.park@samsung.com>
@@@ -2809,7 -2807,7 +2809,7 @@@ GPIO SUBSYSTE
  M:    Grant Likely <grant.likely@secretlab.ca>
  S:    Maintained
  T:    git git://git.secretlab.ca/git/linux-2.6.git
 -F:    Documentation/gpio/gpio.txt
 +F:    Documentation/gpio.txt
  F:    drivers/gpio/
  F:    include/linux/gpio*
  
@@@ -5397,7 -5395,7 +5397,7 @@@ F:      drivers/media/video/*7146
  F:    include/media/*7146*
  
  SAMSUNG AUDIO (ASoC) DRIVERS
 -M:    Jassi Brar <jassi.brar@samsung.com>
 +M:    Jassi Brar <jassisinghbrar@gmail.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  S:    Supported
  F:    sound/soc/samsung
@@@ -5598,9 -5596,9 +5598,9 @@@ F:      include/linux/ata.
  F:    include/linux/libata.h
  
  SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER
- M:    Jayamohan Kallickal <jayamohank@serverengines.com>
+ M:    Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
  L:    linux-scsi@vger.kernel.org
- W:    http://www.serverengines.com
+ W:    http://www.emulex.com
  S:    Supported
  F:    drivers/scsi/be2iscsi/
  
@@@ -6556,7 -6554,7 +6556,7 @@@ S:      Maintaine
  F:    drivers/usb/host/uhci*
  
  USB "USBNET" DRIVER FRAMEWORK
 -M:    David Brownell <dbrownell@users.sourceforge.net>
 +M:    Oliver Neukum <oneukum@suse.de>
  L:    netdev@vger.kernel.org
  W:    http://www.linux-usb.org/usbnet
  S:    Maintained
@@@ -6922,18 -6920,6 +6922,18 @@@ T:    git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    drivers/platform/x86
  
 +XEN HYPERVISOR INTERFACE
 +M:    Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
 +M:    Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
 +L:    xen-devel@lists.xensource.com (moderated for non-subscribers)
 +L:    virtualization@lists.linux-foundation.org
 +S:    Supported
 +F:    arch/x86/xen/
 +F:    drivers/*/xen-*front.c
 +F:    drivers/xen/
 +F:    arch/x86/include/asm/xen/
 +F:    include/xen/
 +
  XEN NETWORK BACKEND DRIVER
  M:    Ian Campbell <ian.campbell@citrix.com>
  L:    xen-devel@lists.xensource.com (moderated for non-subscribers)
@@@ -6955,6 -6941,18 +6955,6 @@@ S:     Supporte
  F:    arch/x86/xen/*swiotlb*
  F:    drivers/xen/*swiotlb*
  
 -XEN HYPERVISOR INTERFACE
 -M:    Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
 -M:    Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
 -L:    xen-devel@lists.xensource.com (moderated for non-subscribers)
 -L:    virtualization@lists.linux-foundation.org
 -S:    Supported
 -F:    arch/x86/xen/
 -F:    drivers/*/xen-*front.c
 -F:    drivers/xen/
 -F:    arch/x86/include/asm/xen/
 -F:    include/xen/
 -
  XFS FILESYSTEM
  P:    Silicon Graphics Inc
  M:    Alex Elder <aelder@sgi.com>
@@@ -688,13 -688,6 +688,13 @@@ _ctl_do_mpt_command(struct MPT2SAS_ADAP
                goto out;
        }
  
 +      /* Check for overflow and wraparound */
 +      if (karg.data_sge_offset * 4 > ioc->request_sz ||
 +          karg.data_sge_offset > (UINT_MAX / 4)) {
 +              ret = -EINVAL;
 +              goto out;
 +      }
 +
        /* copy in request message frame from user */
        if (copy_from_user(mpi_request, mf, karg.data_sge_offset*4)) {
                printk(KERN_ERR "failure at %s:%d/%s()!\n", __FILE__, __LINE__,
@@@ -1041,7 -1034,10 +1041,10 @@@ _ctl_getiocinfo(void __user *arg
            __func__));
  
        memset(&karg, 0 , sizeof(karg));
-       karg.adapter_type = MPT2_IOCTL_INTERFACE_SAS2;
+       if (ioc->is_warpdrive)
+               karg.adapter_type = MPT2_IOCTL_INTERFACE_SAS2_SSS6200;
+       else
+               karg.adapter_type = MPT2_IOCTL_INTERFACE_SAS2;
        if (ioc->pfacts)
                karg.port_number = ioc->pfacts[0].PortNumber;
        pci_read_config_byte(ioc->pdev, PCI_CLASS_REVISION, &revision);
@@@ -1970,7 -1966,7 +1973,7 @@@ _ctl_diag_read_buffer(void __user *arg
        Mpi2DiagBufferPostReply_t *mpi_reply;
        int rc, i;
        u8 buffer_type;
 -      unsigned long timeleft;
 +      unsigned long timeleft, request_size, copy_size;
        u16 smid;
        u16 ioc_status;
        u8 issue_reset = 0;
                return -ENOMEM;
        }
  
 +      request_size = ioc->diag_buffer_sz[buffer_type];
 +
        if ((karg.starting_offset % 4) || (karg.bytes_to_read % 4)) {
                printk(MPT2SAS_ERR_FMT "%s: either the starting_offset "
                    "or bytes_to_read are not 4 byte aligned\n", ioc->name,
                return -EINVAL;
        }
  
 +      if (karg.starting_offset > request_size)
 +              return -EINVAL;
 +
        diag_data = (void *)(request_data + karg.starting_offset);
        dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: diag_buffer(%p), "
            "offset(%d), sz(%d)\n", ioc->name, __func__,
            diag_data, karg.starting_offset, karg.bytes_to_read));
  
 +      /* Truncate data on requests that are too large */
 +      if ((diag_data + karg.bytes_to_read < diag_data) ||
 +          (diag_data + karg.bytes_to_read > request_data + request_size))
 +              copy_size = request_size - karg.starting_offset;
 +      else
 +              copy_size = karg.bytes_to_read;
 +
        if (copy_to_user((void __user *)uarg->diagnostic_data,
 -          diag_data, karg.bytes_to_read)) {
 +          diag_data, copy_size)) {
                printk(MPT2SAS_ERR_FMT "%s: Unable to write "
                    "mpt_diag_read_buffer_t data @ %p\n", ioc->name,
                    __func__, diag_data);
@@@ -422,8 -422,7 +422,7 @@@ static int fc_host_setup(struct transpo
  
        snprintf(fc_host->work_q_name, sizeof(fc_host->work_q_name),
                 "fc_wq_%d", shost->host_no);
-       fc_host->work_q = create_singlethread_workqueue(
-                                       fc_host->work_q_name);
+       fc_host->work_q = alloc_workqueue(fc_host->work_q_name, 0, 0);
        if (!fc_host->work_q)
                return -ENOMEM;
  
        snprintf(fc_host->devloss_work_q_name,
                 sizeof(fc_host->devloss_work_q_name),
                 "fc_dl_%d", shost->host_no);
-       fc_host->devloss_work_q = create_singlethread_workqueue(
-                                       fc_host->devloss_work_q_name);
+       fc_host->devloss_work_q =
+                       alloc_workqueue(fc_host->devloss_work_q_name, 0, 0);
        if (!fc_host->devloss_work_q) {
                destroy_workqueue(fc_host->work_q);
                fc_host->work_q = NULL;
@@@ -2489,6 -2488,8 +2488,8 @@@ fc_rport_final_delete(struct work_struc
        unsigned long flags;
        int do_callback = 0;
  
+       fc_terminate_rport_io(rport);
        /*
         * if a scan is pending, flush the SCSI Host work_q so that
         * that we can reclaim the rport scan work element.
        if (rport->flags & FC_RPORT_SCAN_PENDING)
                scsi_flush_work(shost);
  
-       fc_terminate_rport_io(rport);
        /*
         * Cancel any outstanding timers. These should really exist
         * only when rmmod'ing the LLDD and we're asking for
@@@ -3816,17 -3815,28 +3815,17 @@@ fail_host_msg
  static void
  fc_bsg_goose_queue(struct fc_rport *rport)
  {
        if (!rport->rqst_q)
                return;
  
 +      /*
 +       * This get/put dance makes no sense
 +       */
        get_device(&rport->dev);
 -
 -      spin_lock_irqsave(rport->rqst_q->queue_lock, flags);
 -      flagset = test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags) &&
 -                !test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags);
 -      if (flagset)
 -              queue_flag_set(QUEUE_FLAG_REENTER, rport->rqst_q);
 -      __blk_run_queue(rport->rqst_q, false);
 -      if (flagset)
 -              queue_flag_clear(QUEUE_FLAG_REENTER, rport->rqst_q);
 -      spin_unlock_irqrestore(rport->rqst_q->queue_lock, flags);
 -
 +      blk_run_queue_async(rport->rqst_q);
        put_device(&rport->dev);
  }
  
 -
  /**
   * fc_bsg_rport_dispatch - process rport bsg requests and dispatch to LLDD
   * @q:                rport request queue