Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
authorLinus Torvalds <torvalds@woody.osdl.org>
Wed, 6 Dec 2006 00:09:46 +0000 (16:09 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Wed, 6 Dec 2006 00:09:46 +0000 (16:09 -0800)
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (73 commits)
  [SCSI] aic79xx: Add ASC-29320LPE ids to driver
  [SCSI] stex: version update
  [SCSI] stex: change wait loop code
  [SCSI] stex: add new device type support
  [SCSI] stex: update device id info
  [SCSI] stex: adjust default queue length
  [SCSI] stex: add value check in hard reset routine
  [SCSI] stex: fix controller_info command handling
  [SCSI] stex: fix biosparam calculation
  [SCSI] megaraid: fix MMIO casts
  [SCSI] tgt: fix undefined flush_dcache_page() problem
  [SCSI] libsas: better error handling in sas_expander.c
  [SCSI] lpfc 8.1.11 : Change version number to 8.1.11
  [SCSI] lpfc 8.1.11 : Misc Fixes
  [SCSI] lpfc 8.1.11 : Add soft_wwnn sysfs attribute, rename soft_wwn_enable
  [SCSI] lpfc 8.1.11 : Removed decoding of PCI Subsystem Id
  [SCSI] lpfc 8.1.11 : Add MSI (Message Signalled Interrupts) support
  [SCSI] lpfc 8.1.11 : Adjust LOG_FCP logging
  [SCSI] lpfc 8.1.11 : Fix Memory leaks
  [SCSI] lpfc 8.1.11 : Fix lpfc_multi_ring_support
  ...

1  2 
Documentation/kernel-parameters.txt
block/scsi_ioctl.c
drivers/scsi/ncr53c8xx.c
include/scsi/libsas.h

@@@ -557,6 -557,9 +557,6 @@@ and is between 256 and 4096 characters
        floppy=         [HW]
                        See Documentation/floppy.txt.
  
 -      ftape=          [HW] Floppy Tape subsystem debugging options.
 -                      See Documentation/ftape.txt.
 -
        gamecon.map[2|3]=
                        [HW,JOY] Multisystem joystick and NES/SNES/PSX pad
                        support via parallel port (up to 5 devices per port)
  
        scsi_logging=   [SCSI]
  
+       scsi_mod.scan=  [SCSI] sync (default) scans SCSI busses as they are
+                       discovered.  async scans them in kernel threads,
+                       allowing boot to proceed.  none ignores them, expecting
+                       user space to do the scan.
        selinux         [SELINUX] Disable or enable SELinux at boot time.
                        Format: { "0" | "1" }
                        See security/selinux/Kconfig help text.
diff --combined block/scsi_ioctl.c
@@@ -226,6 -226,7 +226,6 @@@ static int sg_io(struct file *file, req
        unsigned long start_time;
        int writing = 0, ret = 0;
        struct request *rq;
 -      struct bio *bio;
        char sense[SCSI_SENSE_BUFFERSIZE];
        unsigned char cmd[BLK_MAX_CDB];
  
        if (!rq)
                return -ENOMEM;
  
 -      if (hdr->iovec_count) {
 -              const int size = sizeof(struct sg_iovec) * hdr->iovec_count;
 -              struct sg_iovec *iov;
 -
 -              iov = kmalloc(size, GFP_KERNEL);
 -              if (!iov) {
 -                      ret = -ENOMEM;
 -                      goto out;
 -              }
 -
 -              if (copy_from_user(iov, hdr->dxferp, size)) {
 -                      kfree(iov);
 -                      ret = -EFAULT;
 -                      goto out;
 -              }
 -
 -              ret = blk_rq_map_user_iov(q, rq, iov, hdr->iovec_count);
 -              kfree(iov);
 -      } else if (hdr->dxfer_len)
 -              ret = blk_rq_map_user(q, rq, hdr->dxferp, hdr->dxfer_len);
 -
 -      if (ret)
 -              goto out;
 -
        /*
         * fill in request structure
         */
        rq->sense_len = 0;
  
        rq->cmd_type = REQ_TYPE_BLOCK_PC;
 -      bio = rq->bio;
  
        /*
         * bounce this after holding a reference to the original bio, it's
        if (rq->bio)
                blk_queue_bounce(q, &rq->bio);
  
-       rq->timeout = (hdr->timeout * HZ) / 1000;
+       rq->timeout = jiffies_to_msecs(hdr->timeout);
        if (!rq->timeout)
                rq->timeout = q->sg_timeout;
        if (!rq->timeout)
                rq->timeout = BLK_DEFAULT_TIMEOUT;
  
 +      if (hdr->iovec_count) {
 +              const int size = sizeof(struct sg_iovec) * hdr->iovec_count;
 +              struct sg_iovec *iov;
 +
 +              iov = kmalloc(size, GFP_KERNEL);
 +              if (!iov) {
 +                      ret = -ENOMEM;
 +                      goto out;
 +              }
 +
 +              if (copy_from_user(iov, hdr->dxferp, size)) {
 +                      kfree(iov);
 +                      ret = -EFAULT;
 +                      goto out;
 +              }
 +
 +              ret = blk_rq_map_user_iov(q, rq, iov, hdr->iovec_count,
 +                                        hdr->dxfer_len);
 +              kfree(iov);
 +      } else if (hdr->dxfer_len)
 +              ret = blk_rq_map_user(q, rq, hdr->dxferp, hdr->dxfer_len);
 +
 +      if (ret)
 +              goto out;
 +
        rq->retries = 0;
  
        start_time = jiffies;
                        hdr->sb_len_wr = len;
        }
  
 -      if (blk_rq_unmap_user(bio, hdr->dxfer_len))
 +      if (blk_rq_unmap_user(rq))
                ret = -EFAULT;
  
        /* may not have succeeded, but output values written to control
diff --combined drivers/scsi/ncr53c8xx.c
@@@ -185,7 -185,7 +185,7 @@@ static inline struct list_head *ncr_lis
  **    power of 2 cache line size.
  **    Enhanced in linux-2.3.44 to provide a memory pool 
  **    per pcidev to support dynamic dma mapping. (I would 
 -**    have preferred a real bus astraction, btw).
 +**    have preferred a real bus abstraction, btw).
  **
  **==========================================================
  */
@@@ -589,10 -589,12 +589,12 @@@ static int __map_scsi_sg_data(struct de
  static struct ncr_driver_setup
        driver_setup                    = SCSI_NCR_DRIVER_SETUP;
  
+ #ifndef MODULE
  #ifdef        SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT
  static struct ncr_driver_setup
        driver_safe_setup __initdata    = SCSI_NCR_DRIVER_SAFE_SETUP;
  #endif
+ #endif /* !MODULE */
  
  #define initverbose (driver_setup.verbose)
  #define bootverbose (np->verbose)
  #define OPT_IARB              26
  #endif
  
+ #ifdef MODULE
+ #define       ARG_SEP ' '
+ #else
+ #define       ARG_SEP ','
+ #endif
+ #ifndef MODULE
  static char setup_token[] __initdata = 
        "tags:"   "mpar:"
        "spar:"   "disc:"
  #endif
        ;       /* DONNOT REMOVE THIS ';' */
  
- #ifdef MODULE
- #define       ARG_SEP ' '
- #else
- #define       ARG_SEP ','
- #endif
  static int __init get_setup_token(char *p)
  {
        char *cur = setup_token;
        return 0;
  }
  
  static int __init sym53c8xx__setup(char *str)
  {
  #ifdef SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT
  #endif /* SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT */
        return 1;
  }
+ #endif /* !MODULE */
  
  /*===================================================================
  **
@@@ -1438,7 -1441,7 +1441,7 @@@ struct head 
  **    The first four bytes (scr_st[4]) are used inside the script by 
  **    "COPY" commands.
  **    Because source and destination must have the same alignment
 -**    in a DWORD, the fields HAVE to be at the choosen offsets.
 +**    in a DWORD, the fields HAVE to be at the chosen offsets.
  **            xerr_st         0       (0x34)  scratcha
  **            sync_st         1       (0x05)  sxfer
  **            wide_st         3       (0x03)  scntl3
  **    the DSA (data structure address) register points
  **    to this substructure of the ccb.
  **    This substructure contains the header with
 -**    the script-processor-changable data and
 +**    the script-processor-changeable data and
  **    data blocks for the indirect move commands.
  **
  **----------------------------------------------------------
@@@ -5107,7 -5110,7 +5110,7 @@@ void ncr_complete (struct ncb *np, stru
  
  /*
  **    This CCB has been skipped by the NCR.
 -**    Queue it in the correponding unit queue.
 +**    Queue it in the corresponding unit queue.
  */
  static void ncr_ccb_skipped(struct ncb *np, struct ccb *cp)
  {
@@@ -5896,8 -5899,8 +5899,8 @@@ static void ncr_log_hard_error(struct n
  **
  **    In normal cases, interrupt conditions occur one at a 
  **    time. The ncr is able to stack in some extra registers 
 -**    other interrupts that will occurs after the first one.
 -**    But severall interrupts may occur at the same time.
 +**    other interrupts that will occur after the first one.
 +**    But, several interrupts may occur at the same time.
  **
  **    We probably should only try to deal with the normal 
  **    case, but it seems that multiple interrupts occur in 
@@@ -6796,7 -6799,7 +6799,7 @@@ void ncr_int_sir (struct ncb *np
  **    The host status field is set to HS_NEGOTIATE to mark this
  **    situation.
  **
 -**    If the target doesn't answer this message immidiately
 +**    If the target doesn't answer this message immediately
  **    (as required by the standard), the SIR_NEGO_FAIL interrupt
  **    will be raised eventually.
  **    The handler removes the HS_NEGOTIATE status, and sets the
@@@ -8321,12 -8324,12 +8324,12 @@@ char *ncr53c8xx;     /* command line passe
  module_param(ncr53c8xx, charp, 0);
  #endif
  
+ #ifndef MODULE
  static int __init ncr53c8xx_setup(char *str)
  {
        return sym53c8xx__setup(str);
  }
  
- #ifndef MODULE
  __setup("ncr53c8xx=", ncr53c8xx_setup);
  #endif
  
diff --combined include/scsi/libsas.h
@@@ -35,7 -35,6 +35,7 @@@
  #include <scsi/scsi_device.h>
  #include <scsi/scsi_cmnd.h>
  #include <scsi/scsi_transport_sas.h>
 +#include <asm/scatterlist.h>
  
  struct block_device;
  
@@@ -339,6 -338,8 +339,8 @@@ struct sas_ha_struct 
        void (*notify_phy_event)(struct asd_sas_phy *, enum phy_event);
  
        void *lldd_ha;            /* not touched by sas class code */
+       struct list_head eh_done_q;
  };
  
  #define SHOST_TO_SAS_HA(_shost) (*(struct sas_ha_struct **)(_shost)->hostdata)
@@@ -527,13 -528,16 +529,16 @@@ struct sas_task 
  
        void   *lldd_task;        /* for use by LLDDs */
        void   *uldd_task;
+       struct work_struct abort_work;
  };
  
  
  
- #define SAS_TASK_STATE_PENDING  1
- #define SAS_TASK_STATE_DONE     2
- #define SAS_TASK_STATE_ABORTED  4
+ #define SAS_TASK_STATE_PENDING      1
+ #define SAS_TASK_STATE_DONE         2
+ #define SAS_TASK_STATE_ABORTED      4
+ #define SAS_TASK_INITIATOR_ABORTED  8
  
  static inline struct sas_task *sas_alloc_task(gfp_t flags)
  {
@@@ -593,6 -597,7 +598,7 @@@ struct sas_domain_function_template 
  extern int sas_register_ha(struct sas_ha_struct *);
  extern int sas_unregister_ha(struct sas_ha_struct *);
  
+ int sas_phy_reset(struct sas_phy *phy, int hard_reset);
  extern int sas_queuecommand(struct scsi_cmnd *,
                     void (*scsi_done)(struct scsi_cmnd *));
  extern int sas_target_alloc(struct scsi_target *);
@@@ -625,4 -630,6 +631,6 @@@ void sas_unregister_dev(struct domain_d
  
  void sas_init_dev(struct domain_device *);
  
+ void sas_task_abort(struct sas_task *task);
  #endif /* _SASLIB_H_ */