From: Linus Torvalds Date: Wed, 6 Dec 2006 00:09:46 +0000 (-0800) Subject: Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 X-Git-Tag: v2.6.20-rc1~15^2~9^2~1 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=ec0bf39a471bf6fcd01def2bd677128cea940b73;hp=-c;p=powerpc.git Merge /pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 * 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 ... --- ec0bf39a471bf6fcd01def2bd677128cea940b73 diff --combined Documentation/kernel-parameters.txt index 15e4fed127,9913f06766..2e1898e4e8 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@@ -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) @@@ -1416,6 -1419,11 +1416,11 @@@ 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 index 5493c2fbba,dcd9c71fe8..b3e210723a --- a/block/scsi_ioctl.c +++ b/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]; @@@ -257,6 -258,30 +257,6 @@@ 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 */ @@@ -269,6 -294,7 +269,6 @@@ 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 @@@ -277,37 -303,12 +277,37 @@@ 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; @@@ -338,7 -339,7 +338,7 @@@ 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 index adb8eb4f5f,5a88fa0b2f..bbf521cbc5 --- a/drivers/scsi/ncr53c8xx.c +++ b/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) @@@ -641,6 -643,13 +643,13 @@@ #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:" @@@ -660,12 -669,6 +669,6 @@@ #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; @@@ -682,7 -685,6 +685,6 @@@ return 0; } - static int __init sym53c8xx__setup(char *str) { #ifdef SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT @@@ -804,6 -806,7 +806,7 @@@ #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 @@@ -1498,7 -1501,7 +1501,7 @@@ ** 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 index 1d77b63c5e,29f6e1af1b..44b2f82a6e --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@@ -35,7 -35,6 +35,7 @@@ #include #include #include +#include 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_ */