diff --git a/[refs] b/[refs] index d3939694df26..baedd277c9cc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e0ae23550ffd3bfe319fa66879779be1a9a4a155 +refs/heads/master: 2a792058c3aaf5fb806e09a456e25b9f4f748dd1 diff --git a/trunk/Documentation/scsi/ChangeLog.megaraid_sas b/trunk/Documentation/scsi/ChangeLog.megaraid_sas deleted file mode 100644 index f8c16cbf56ba..000000000000 --- a/trunk/Documentation/scsi/ChangeLog.megaraid_sas +++ /dev/null @@ -1,24 +0,0 @@ -1 Release Date : Mon Jan 23 14:09:01 PST 2006 - Sumant Patro -2 Current Version : 00.00.02.02 -3 Older Version : 00.00.02.01 - -i. New template defined to represent each family of controllers (identified by processor used). - The template will have defintions that will be initialised to appropritae values for a specific family of controllers. The template definition has four function pointers. During driver initialisation the function pointers will be set based on the controller family type. This change is done to support new controllers that has different processors and thus different register set. - - -Sumant Patro - -1 Release Date : Mon Dec 19 14:36:26 PST 2005 - Sumant Patro -2 Current Version : 00.00.02.00-rc4 -3 Older Version : 00.00.02.01 - -i. Code reorganized to remove code duplication in megasas_build_cmd. - - "There's a lot of duplicate code megasas_build_cmd. Move that out of the different codepathes and merge the reminder of megasas_build_cmd into megasas_queue_command" - - - Christoph Hellwig - -ii. Defined MEGASAS_IOC_FIRMWARE32 for code paths that handles 32 bit applications in 64 bit systems. - - "MEGASAS_IOC_FIRMWARE can't be redefined if CONFIG_COMPAT is set, we need to define a MEGASAS_IOC_FIRMWARE32 define so native binaries continue to work" - - - Christoph Hellwig diff --git a/trunk/Documentation/scsi/aic79xx.txt b/trunk/Documentation/scsi/aic79xx.txt index 382b439b439e..0aeef740a95a 100644 --- a/trunk/Documentation/scsi/aic79xx.txt +++ b/trunk/Documentation/scsi/aic79xx.txt @@ -1,5 +1,5 @@ ==================================================================== -= Adaptec Ultra320 Family Manager Set = += Adaptec Ultra320 Family Manager Set v1.3.11 = = = = README for = = The Linux Operating System = @@ -63,11 +63,6 @@ The following information is available in this file: 68-pin) 2. Version History - 3.0 (December 1st, 2005) - - Updated driver to use SCSI transport class infrastructure - - Upported sequencer and core fixes from adaptec released - version 2.0.15 of the driver. - 1.3.11 (July 11, 2003) - Fix several deadlock issues. - Add 29320ALP and 39320B Id's. @@ -199,7 +194,7 @@ The following information is available in this file: supported) - Support for the PCI-X standard up to 133MHz - Support for the PCI v2.2 standard - - Domain Validation + - Domain Validation 2.2. Operating System Support: - Redhat Linux 7.2, 7.3, 8.0, Advanced Server 2.1 @@ -416,53 +411,77 @@ The following information is available in this file: http://www.adaptec.com. -5. Adaptec Customer Support +5. Contacting Adaptec A Technical Support Identification (TSID) Number is required for Adaptec technical support. - The 12-digit TSID can be found on the white barcode-type label - included inside the box with your product. The TSID helps us + included inside the box with your product. The TSID helps us provide more efficient service by accurately identifying your product and support status. - Support Options - Search the Adaptec Support Knowledgebase (ASK) at http://ask.adaptec.com for articles, troubleshooting tips, and - frequently asked questions about your product. + frequently asked questions for your product. - For support via Email, submit your question to Adaptec's - Technical Support Specialists at http://ask.adaptec.com/. + Technical Support Specialists at http://ask.adaptec.com. North America - - Visit our Web site at http://www.adaptec.com/. - - For information about Adaptec's support options, call - 408-957-2550, 24 hours a day, 7 days a week. - - To speak with a Technical Support Specialist, - * For hardware products, call 408-934-7274, - Monday to Friday, 3:00 am to 5:00 pm, PDT. - * For RAID and Fibre Channel products, call 321-207-2000, - Monday to Friday, 3:00 am to 5:00 pm, PDT. - To expedite your service, have your computer with you. - - To order Adaptec products, including accessories and cables, - call 408-957-7274. To order cables online go to - http://www.adaptec.com/buy-cables/. + - Visit our Web site at http://www.adaptec.com. + - To speak with a Fibre Channel/RAID/External Storage Technical + Support Specialist, call 1-321-207-2000, + Hours: Monday-Friday, 3:00 A.M. to 5:00 P.M., PST. + (Not open on holidays) + - For Technical Support in all other technologies including + SCSI, call 1-408-934-7274, + Hours: Monday-Friday, 6:00 A.M. to 5:00 P.M., PST. + (Not open on holidays) + - For after hours support, call 1-800-416-8066 ($99/call, + $149/call on holidays) + - To order Adaptec products including software and cables, call + 1-800-442-7274 or 1-408-957-7274. You can also visit our + online store at http://www.adaptecstore.com Europe - - Visit our Web site at http://www.adaptec-europe.com/. - - To speak with a Technical Support Specialist, call, or email, - * German: +49 89 4366 5522, Monday-Friday, 9:00-17:00 CET, - http://ask-de.adaptec.com/. - * French: +49 89 4366 5533, Monday-Friday, 9:00-17:00 CET, - http://ask-fr.adaptec.com/. - * English: +49 89 4366 5544, Monday-Friday, 9:00-17:00 GMT, - http://ask.adaptec.com/. - - You can order Adaptec cables online at - http://www.adaptec.com/buy-cables/. + - Visit our Web site at http://www.adaptec-europe.com. + - English and French: To speak with a Technical Support + Specialist, call one of the following numbers: + - English: +32-2-352-3470 + - French: +32-2-352-3460 + Hours: Monday-Thursday, 10:00 to 12:30, 13:30 to 17:30 CET + Friday, 10:00 to 12:30, 13:30 to 16:30 CET + - German: To speak with a Technical Support Specialist, + call +49-89-456-40660 + Hours: Monday-Thursday, 09:30 to 12:30, 13:30 to 16:30 CET + Friday, 09:30 to 12:30, 13:30 to 15:00 CET + - To order Adaptec products, including accessories and cables: + - UK: +0800-96-65-26 or fax +0800-731-02-95 + - Other European countries: +32-11-300-379 + + Australia and New Zealand + - Visit our Web site at http://www.adaptec.com.au. + - To speak with a Technical Support Specialist, call + +612-9416-0698 + Hours: Monday-Friday, 10:00 A.M. to 4:30 P.M., EAT + (Not open on holidays) Japan - - Visit our web site at http://www.adaptec.co.jp/. - To speak with a Technical Support Specialist, call - +81 3 5308 6120, Monday-Friday, 9:00 a.m. to 12:00 p.m., - 1:00 p.m. to 6:00 p.m. + +81-3-5308-6120 + Hours: Monday-Friday, 9:00 a.m. to 12:00 p.m., 1:00 p.m. to + 6:00 p.m. TSC + + Hong Kong and China + - To speak with a Technical Support Specialist, call + +852-2869-7200 + Hours: Monday-Friday, 10:00 to 17:00. + - Fax Technical Support at +852-2869-7100. + + Singapore + - To speak with a Technical Support Specialist, call + +65-245-7470 + Hours: Monday-Friday, 10:00 to 17:00. + - Fax Technical Support at +852-2869-7100 ------------------------------------------------------------------- /* diff --git a/trunk/Documentation/scsi/aic7xxx.txt b/trunk/Documentation/scsi/aic7xxx.txt index 3481fcded4c2..47e74ddc4bc9 100644 --- a/trunk/Documentation/scsi/aic7xxx.txt +++ b/trunk/Documentation/scsi/aic7xxx.txt @@ -309,57 +309,81 @@ The following information is available in this file: ----------------------------------------------------------------- Example: - 'options aic7xxx aic7xxx=verbose,no_probe,tag_info:{{},{,,10}},seltime:1' + 'options aic7xxx aic7xxx=verbose,no_probe,tag_info:{{},{,,10}},seltime:1" enables verbose logging, Disable EISA/VLB probing, and set tag depth on Controller 1/Target 2 to 10 tags. -4. Adaptec Customer Support +3. Contacting Adaptec A Technical Support Identification (TSID) Number is required for Adaptec technical support. - The 12-digit TSID can be found on the white barcode-type label - included inside the box with your product. The TSID helps us + included inside the box with your product. The TSID helps us provide more efficient service by accurately identifying your product and support status. - Support Options - Search the Adaptec Support Knowledgebase (ASK) at http://ask.adaptec.com for articles, troubleshooting tips, and - frequently asked questions about your product. + frequently asked questions for your product. - For support via Email, submit your question to Adaptec's - Technical Support Specialists at http://ask.adaptec.com/. + Technical Support Specialists at http://ask.adaptec.com. North America - - Visit our Web site at http://www.adaptec.com/. - - For information about Adaptec's support options, call - 408-957-2550, 24 hours a day, 7 days a week. - - To speak with a Technical Support Specialist, - * For hardware products, call 408-934-7274, - Monday to Friday, 3:00 am to 5:00 pm, PDT. - * For RAID and Fibre Channel products, call 321-207-2000, - Monday to Friday, 3:00 am to 5:00 pm, PDT. - To expedite your service, have your computer with you. - - To order Adaptec products, including accessories and cables, - call 408-957-7274. To order cables online go to - http://www.adaptec.com/buy-cables/. + - Visit our Web site at http://www.adaptec.com. + - To speak with a Fibre Channel/RAID/External Storage Technical + Support Specialist, call 1-321-207-2000, + Hours: Monday-Friday, 3:00 A.M. to 5:00 P.M., PST. + (Not open on holidays) + - For Technical Support in all other technologies including + SCSI, call 1-408-934-7274, + Hours: Monday-Friday, 6:00 A.M. to 5:00 P.M., PST. + (Not open on holidays) + - For after hours support, call 1-800-416-8066 ($99/call, + $149/call on holidays) + - To order Adaptec products including software and cables, call + 1-800-442-7274 or 1-408-957-7274. You can also visit our + online store at http://www.adaptecstore.com Europe - - Visit our Web site at http://www.adaptec-europe.com/. - - To speak with a Technical Support Specialist, call, or email, - * German: +49 89 4366 5522, Monday-Friday, 9:00-17:00 CET, - http://ask-de.adaptec.com/. - * French: +49 89 4366 5533, Monday-Friday, 9:00-17:00 CET, - http://ask-fr.adaptec.com/. - * English: +49 89 4366 5544, Monday-Friday, 9:00-17:00 GMT, - http://ask.adaptec.com/. - - You can order Adaptec cables online at - http://www.adaptec.com/buy-cables/. + - Visit our Web site at http://www.adaptec-europe.com. + - English and French: To speak with a Technical Support + Specialist, call one of the following numbers: + - English: +32-2-352-3470 + - French: +32-2-352-3460 + Hours: Monday-Thursday, 10:00 to 12:30, 13:30 to 17:30 CET + Friday, 10:00 to 12:30, 13:30 to 16:30 CET + - German: To speak with a Technical Support Specialist, + call +49-89-456-40660 + Hours: Monday-Thursday, 09:30 to 12:30, 13:30 to 16:30 CET + Friday, 09:30 to 12:30, 13:30 to 15:00 CET + - To order Adaptec products, including accessories and cables: + - UK: +0800-96-65-26 or fax +0800-731-02-95 + - Other European countries: +32-11-300-379 + + Australia and New Zealand + - Visit our Web site at http://www.adaptec.com.au. + - To speak with a Technical Support Specialist, call + +612-9416-0698 + Hours: Monday-Friday, 10:00 A.M. to 4:30 P.M., EAT + (Not open on holidays) Japan - - Visit our web site at http://www.adaptec.co.jp/. - To speak with a Technical Support Specialist, call - +81 3 5308 6120, Monday-Friday, 9:00 a.m. to 12:00 p.m., - 1:00 p.m. to 6:00 p.m. + +81-3-5308-6120 + Hours: Monday-Friday, 9:00 a.m. to 12:00 p.m., 1:00 p.m. to + 6:00 p.m. TSC + + Hong Kong and China + - To speak with a Technical Support Specialist, call + +852-2869-7200 + Hours: Monday-Friday, 10:00 to 17:00. + - Fax Technical Support at +852-2869-7100. + + Singapore + - To speak with a Technical Support Specialist, call + +65-245-7470 + Hours: Monday-Friday, 10:00 to 17:00. + - Fax Technical Support at +852-2869-7100 ------------------------------------------------------------------- /* diff --git a/trunk/arch/arm/configs/bast_defconfig b/trunk/arch/arm/configs/bast_defconfig index 4a8564f386af..6886001b5366 100644 --- a/trunk/arch/arm/configs/bast_defconfig +++ b/trunk/arch/arm/configs/bast_defconfig @@ -14,7 +14,8 @@ CONFIG_GENERIC_IOMAP=y # Code maturity level options # CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y +# CONFIG_CLEAN_COMPILE is not set +CONFIG_BROKEN=y CONFIG_BROKEN_ON_SMP=y # @@ -359,6 +360,7 @@ CONFIG_BLK_DEV_IDE_BAST=y # # IEEE 1394 (FireWire) support # +# CONFIG_IEEE1394 is not set # # I2O device support @@ -779,6 +781,7 @@ CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set # CONFIG_TMPFS is not set +# CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y diff --git a/trunk/arch/arm/configs/collie_defconfig b/trunk/arch/arm/configs/collie_defconfig index c9aa878e610a..15468a0cf70e 100644 --- a/trunk/arch/arm/configs/collie_defconfig +++ b/trunk/arch/arm/configs/collie_defconfig @@ -13,7 +13,8 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y # Code maturity level options # CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y +# CONFIG_CLEAN_COMPILE is not set +CONFIG_BROKEN=y CONFIG_BROKEN_ON_SMP=y CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 @@ -307,7 +308,9 @@ CONFIG_MTD_CFI_I2=y # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set CONFIG_MTD_OBSOLETE_CHIPS=y +# CONFIG_MTD_AMDSTD is not set CONFIG_MTD_SHARP=y +# CONFIG_MTD_JEDEC is not set # # Mapping drivers for chip access @@ -393,6 +396,7 @@ CONFIG_ATA_OVER_ETH=m # # IEEE 1394 (FireWire) support # +# CONFIG_IEEE1394 is not set # # I2O device support @@ -737,6 +741,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" CONFIG_PROC_FS=y CONFIG_SYSFS=y CONFIG_TMPFS=y +# CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y # CONFIG_RELAYFS_FS is not set diff --git a/trunk/arch/arm/configs/s3c2410_defconfig b/trunk/arch/arm/configs/s3c2410_defconfig index 1964ccd8a71f..33f31080a98c 100644 --- a/trunk/arch/arm/configs/s3c2410_defconfig +++ b/trunk/arch/arm/configs/s3c2410_defconfig @@ -13,7 +13,8 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y # Code maturity level options # CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y +# CONFIG_CLEAN_COMPILE is not set +CONFIG_BROKEN=y CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 @@ -472,6 +473,7 @@ CONFIG_BLK_DEV_IDE_BAST=y # # IEEE 1394 (FireWire) support # +# CONFIG_IEEE1394 is not set # # I2O device support @@ -894,6 +896,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" CONFIG_PROC_FS=y CONFIG_SYSFS=y # CONFIG_TMPFS is not set +# CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y # CONFIG_RELAYFS_FS is not set diff --git a/trunk/arch/arm/kernel/calls.S b/trunk/arch/arm/kernel/calls.S index d058e7c12568..75e6f9a94713 100644 --- a/trunk/arch/arm/kernel/calls.S +++ b/trunk/arch/arm/kernel/calls.S @@ -7,334 +7,337 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * This file is included thrice in entry-common.S + * This file is included twice in entry-common.S */ -/* 0 */ CALL(sys_restart_syscall) - CALL(sys_exit) - CALL(sys_fork_wrapper) - CALL(sys_read) - CALL(sys_write) -/* 5 */ CALL(sys_open) - CALL(sys_close) - CALL(sys_ni_syscall) /* was sys_waitpid */ - CALL(sys_creat) - CALL(sys_link) -/* 10 */ CALL(sys_unlink) - CALL(sys_execve_wrapper) - CALL(sys_chdir) - CALL(OBSOLETE(sys_time)) /* used by libc4 */ - CALL(sys_mknod) -/* 15 */ CALL(sys_chmod) - CALL(sys_lchown16) - CALL(sys_ni_syscall) /* was sys_break */ - CALL(sys_ni_syscall) /* was sys_stat */ - CALL(sys_lseek) -/* 20 */ CALL(sys_getpid) - CALL(sys_mount) - CALL(OBSOLETE(sys_oldumount)) /* used by libc4 */ - CALL(sys_setuid16) - CALL(sys_getuid16) -/* 25 */ CALL(OBSOLETE(sys_stime)) - CALL(sys_ptrace) - CALL(OBSOLETE(sys_alarm)) /* used by libc4 */ - CALL(sys_ni_syscall) /* was sys_fstat */ - CALL(sys_pause) -/* 30 */ CALL(OBSOLETE(sys_utime)) /* used by libc4 */ - CALL(sys_ni_syscall) /* was sys_stty */ - CALL(sys_ni_syscall) /* was sys_getty */ - CALL(sys_access) - CALL(sys_nice) -/* 35 */ CALL(sys_ni_syscall) /* was sys_ftime */ - CALL(sys_sync) - CALL(sys_kill) - CALL(sys_rename) - CALL(sys_mkdir) -/* 40 */ CALL(sys_rmdir) - CALL(sys_dup) - CALL(sys_pipe) - CALL(sys_times) - CALL(sys_ni_syscall) /* was sys_prof */ -/* 45 */ CALL(sys_brk) - CALL(sys_setgid16) - CALL(sys_getgid16) - CALL(sys_ni_syscall) /* was sys_signal */ - CALL(sys_geteuid16) -/* 50 */ CALL(sys_getegid16) - CALL(sys_acct) - CALL(sys_umount) - CALL(sys_ni_syscall) /* was sys_lock */ - CALL(sys_ioctl) -/* 55 */ CALL(sys_fcntl) - CALL(sys_ni_syscall) /* was sys_mpx */ - CALL(sys_setpgid) - CALL(sys_ni_syscall) /* was sys_ulimit */ - CALL(sys_ni_syscall) /* was sys_olduname */ -/* 60 */ CALL(sys_umask) - CALL(sys_chroot) - CALL(sys_ustat) - CALL(sys_dup2) - CALL(sys_getppid) -/* 65 */ CALL(sys_getpgrp) - CALL(sys_setsid) - CALL(sys_sigaction) - CALL(sys_ni_syscall) /* was sys_sgetmask */ - CALL(sys_ni_syscall) /* was sys_ssetmask */ -/* 70 */ CALL(sys_setreuid16) - CALL(sys_setregid16) - CALL(sys_sigsuspend_wrapper) - CALL(sys_sigpending) - CALL(sys_sethostname) -/* 75 */ CALL(sys_setrlimit) - CALL(OBSOLETE(sys_old_getrlimit)) /* used by libc4 */ - CALL(sys_getrusage) - CALL(sys_gettimeofday) - CALL(sys_settimeofday) -/* 80 */ CALL(sys_getgroups16) - CALL(sys_setgroups16) - CALL(OBSOLETE(old_select)) /* used by libc4 */ - CALL(sys_symlink) - CALL(sys_ni_syscall) /* was sys_lstat */ -/* 85 */ CALL(sys_readlink) - CALL(sys_uselib) - CALL(sys_swapon) - CALL(sys_reboot) - CALL(OBSOLETE(old_readdir)) /* used by libc4 */ -/* 90 */ CALL(OBSOLETE(old_mmap)) /* used by libc4 */ - CALL(sys_munmap) - CALL(sys_truncate) - CALL(sys_ftruncate) - CALL(sys_fchmod) -/* 95 */ CALL(sys_fchown16) - CALL(sys_getpriority) - CALL(sys_setpriority) - CALL(sys_ni_syscall) /* was sys_profil */ - CALL(sys_statfs) -/* 100 */ CALL(sys_fstatfs) - CALL(sys_ni_syscall) - CALL(OBSOLETE(sys_socketcall)) - CALL(sys_syslog) - CALL(sys_setitimer) -/* 105 */ CALL(sys_getitimer) - CALL(sys_newstat) - CALL(sys_newlstat) - CALL(sys_newfstat) - CALL(sys_ni_syscall) /* was sys_uname */ -/* 110 */ CALL(sys_ni_syscall) /* was sys_iopl */ - CALL(sys_vhangup) - CALL(sys_ni_syscall) - CALL(OBSOLETE(sys_syscall)) /* call a syscall */ - CALL(sys_wait4) -/* 115 */ CALL(sys_swapoff) - CALL(sys_sysinfo) - CALL(OBSOLETE(ABI(sys_ipc, sys_oabi_ipc))) - CALL(sys_fsync) - CALL(sys_sigreturn_wrapper) -/* 120 */ CALL(sys_clone_wrapper) - CALL(sys_setdomainname) - CALL(sys_newuname) - CALL(sys_ni_syscall) - CALL(sys_adjtimex) -/* 125 */ CALL(sys_mprotect) - CALL(sys_sigprocmask) - CALL(sys_ni_syscall) /* was sys_create_module */ - CALL(sys_init_module) - CALL(sys_delete_module) -/* 130 */ CALL(sys_ni_syscall) /* was sys_get_kernel_syms */ - CALL(sys_quotactl) - CALL(sys_getpgid) - CALL(sys_fchdir) - CALL(sys_bdflush) -/* 135 */ CALL(sys_sysfs) - CALL(sys_personality) - CALL(sys_ni_syscall) /* CALL(_sys_afs_syscall) */ - CALL(sys_setfsuid16) - CALL(sys_setfsgid16) -/* 140 */ CALL(sys_llseek) - CALL(sys_getdents) - CALL(sys_select) - CALL(sys_flock) - CALL(sys_msync) -/* 145 */ CALL(sys_readv) - CALL(sys_writev) - CALL(sys_getsid) - CALL(sys_fdatasync) - CALL(sys_sysctl) -/* 150 */ CALL(sys_mlock) - CALL(sys_munlock) - CALL(sys_mlockall) - CALL(sys_munlockall) - CALL(sys_sched_setparam) -/* 155 */ CALL(sys_sched_getparam) - CALL(sys_sched_setscheduler) - CALL(sys_sched_getscheduler) - CALL(sys_sched_yield) - CALL(sys_sched_get_priority_max) -/* 160 */ CALL(sys_sched_get_priority_min) - CALL(sys_sched_rr_get_interval) - CALL(sys_nanosleep) - CALL(sys_arm_mremap) - CALL(sys_setresuid16) -/* 165 */ CALL(sys_getresuid16) - CALL(sys_ni_syscall) - CALL(sys_ni_syscall) /* was sys_query_module */ - CALL(sys_poll) - CALL(sys_nfsservctl) -/* 170 */ CALL(sys_setresgid16) - CALL(sys_getresgid16) - CALL(sys_prctl) - CALL(sys_rt_sigreturn_wrapper) - CALL(sys_rt_sigaction) -/* 175 */ CALL(sys_rt_sigprocmask) - CALL(sys_rt_sigpending) - CALL(sys_rt_sigtimedwait) - CALL(sys_rt_sigqueueinfo) - CALL(sys_rt_sigsuspend_wrapper) -/* 180 */ CALL(ABI(sys_pread64, sys_oabi_pread64)) - CALL(ABI(sys_pwrite64, sys_oabi_pwrite64)) - CALL(sys_chown16) - CALL(sys_getcwd) - CALL(sys_capget) -/* 185 */ CALL(sys_capset) - CALL(sys_sigaltstack_wrapper) - CALL(sys_sendfile) - CALL(sys_ni_syscall) - CALL(sys_ni_syscall) -/* 190 */ CALL(sys_vfork_wrapper) - CALL(sys_getrlimit) - CALL(sys_mmap2) - CALL(ABI(sys_truncate64, sys_oabi_truncate64)) - CALL(ABI(sys_ftruncate64, sys_oabi_ftruncate64)) -/* 195 */ CALL(ABI(sys_stat64, sys_oabi_stat64)) - CALL(ABI(sys_lstat64, sys_oabi_lstat64)) - CALL(ABI(sys_fstat64, sys_oabi_fstat64)) - CALL(sys_lchown) - CALL(sys_getuid) -/* 200 */ CALL(sys_getgid) - CALL(sys_geteuid) - CALL(sys_getegid) - CALL(sys_setreuid) - CALL(sys_setregid) -/* 205 */ CALL(sys_getgroups) - CALL(sys_setgroups) - CALL(sys_fchown) - CALL(sys_setresuid) - CALL(sys_getresuid) -/* 210 */ CALL(sys_setresgid) - CALL(sys_getresgid) - CALL(sys_chown) - CALL(sys_setuid) - CALL(sys_setgid) -/* 215 */ CALL(sys_setfsuid) - CALL(sys_setfsgid) - CALL(sys_getdents64) - CALL(sys_pivot_root) - CALL(sys_mincore) -/* 220 */ CALL(sys_madvise) - CALL(ABI(sys_fcntl64, sys_oabi_fcntl64)) - CALL(sys_ni_syscall) /* TUX */ - CALL(sys_ni_syscall) - CALL(sys_gettid) -/* 225 */ CALL(ABI(sys_readahead, sys_oabi_readahead)) - CALL(sys_setxattr) - CALL(sys_lsetxattr) - CALL(sys_fsetxattr) - CALL(sys_getxattr) -/* 230 */ CALL(sys_lgetxattr) - CALL(sys_fgetxattr) - CALL(sys_listxattr) - CALL(sys_llistxattr) - CALL(sys_flistxattr) -/* 235 */ CALL(sys_removexattr) - CALL(sys_lremovexattr) - CALL(sys_fremovexattr) - CALL(sys_tkill) - CALL(sys_sendfile64) -/* 240 */ CALL(sys_futex) - CALL(sys_sched_setaffinity) - CALL(sys_sched_getaffinity) - CALL(sys_io_setup) - CALL(sys_io_destroy) -/* 245 */ CALL(sys_io_getevents) - CALL(sys_io_submit) - CALL(sys_io_cancel) - CALL(sys_exit_group) - CALL(sys_lookup_dcookie) -/* 250 */ CALL(sys_epoll_create) - CALL(ABI(sys_epoll_ctl, sys_oabi_epoll_ctl)) - CALL(ABI(sys_epoll_wait, sys_oabi_epoll_wait)) - CALL(sys_remap_file_pages) - CALL(sys_ni_syscall) /* sys_set_thread_area */ -/* 255 */ CALL(sys_ni_syscall) /* sys_get_thread_area */ - CALL(sys_set_tid_address) - CALL(sys_timer_create) - CALL(sys_timer_settime) - CALL(sys_timer_gettime) -/* 260 */ CALL(sys_timer_getoverrun) - CALL(sys_timer_delete) - CALL(sys_clock_settime) - CALL(sys_clock_gettime) - CALL(sys_clock_getres) -/* 265 */ CALL(sys_clock_nanosleep) - CALL(sys_statfs64_wrapper) - CALL(sys_fstatfs64_wrapper) - CALL(sys_tgkill) - CALL(sys_utimes) -/* 270 */ CALL(sys_arm_fadvise64_64) - CALL(sys_pciconfig_iobase) - CALL(sys_pciconfig_read) - CALL(sys_pciconfig_write) - CALL(sys_mq_open) -/* 275 */ CALL(sys_mq_unlink) - CALL(sys_mq_timedsend) - CALL(sys_mq_timedreceive) - CALL(sys_mq_notify) - CALL(sys_mq_getsetattr) -/* 280 */ CALL(sys_waitid) - CALL(sys_socket) - CALL(sys_bind) - CALL(sys_connect) - CALL(sys_listen) -/* 285 */ CALL(sys_accept) - CALL(sys_getsockname) - CALL(sys_getpeername) - CALL(sys_socketpair) - CALL(sys_send) -/* 290 */ CALL(sys_sendto) - CALL(sys_recv) - CALL(sys_recvfrom) - CALL(sys_shutdown) - CALL(sys_setsockopt) -/* 295 */ CALL(sys_getsockopt) - CALL(sys_sendmsg) - CALL(sys_recvmsg) - CALL(ABI(sys_semop, sys_oabi_semop)) - CALL(sys_semget) -/* 300 */ CALL(sys_semctl) - CALL(sys_msgsnd) - CALL(sys_msgrcv) - CALL(sys_msgget) - CALL(sys_msgctl) -/* 305 */ CALL(sys_shmat) - CALL(sys_shmdt) - CALL(sys_shmget) - CALL(sys_shmctl) - CALL(sys_add_key) -/* 310 */ CALL(sys_request_key) - CALL(sys_keyctl) - CALL(ABI(sys_semtimedop, sys_oabi_semtimedop)) -/* vserver */ CALL(sys_ni_syscall) - CALL(sys_ioprio_set) -/* 315 */ CALL(sys_ioprio_get) - CALL(sys_inotify_init) - CALL(sys_inotify_add_watch) - CALL(sys_inotify_rm_watch) - CALL(sys_mbind) -/* 320 */ CALL(sys_get_mempolicy) - CALL(sys_set_mempolicy) -#ifndef syscalls_counted -.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls -#define syscalls_counted +#ifndef NR_syscalls +#define NR_syscalls 328 +#else + +100: +/* 0 */ .long sys_restart_syscall + .long sys_exit + .long sys_fork_wrapper + .long sys_read + .long sys_write +/* 5 */ .long sys_open + .long sys_close + .long sys_ni_syscall /* was sys_waitpid */ + .long sys_creat + .long sys_link +/* 10 */ .long sys_unlink + .long sys_execve_wrapper + .long sys_chdir + .long OBSOLETE(sys_time) /* used by libc4 */ + .long sys_mknod +/* 15 */ .long sys_chmod + .long sys_lchown16 + .long sys_ni_syscall /* was sys_break */ + .long sys_ni_syscall /* was sys_stat */ + .long sys_lseek +/* 20 */ .long sys_getpid + .long sys_mount + .long OBSOLETE(sys_oldumount) /* used by libc4 */ + .long sys_setuid16 + .long sys_getuid16 +/* 25 */ .long OBSOLETE(sys_stime) + .long sys_ptrace + .long OBSOLETE(sys_alarm) /* used by libc4 */ + .long sys_ni_syscall /* was sys_fstat */ + .long sys_pause +/* 30 */ .long OBSOLETE(sys_utime) /* used by libc4 */ + .long sys_ni_syscall /* was sys_stty */ + .long sys_ni_syscall /* was sys_getty */ + .long sys_access + .long sys_nice +/* 35 */ .long sys_ni_syscall /* was sys_ftime */ + .long sys_sync + .long sys_kill + .long sys_rename + .long sys_mkdir +/* 40 */ .long sys_rmdir + .long sys_dup + .long sys_pipe + .long sys_times + .long sys_ni_syscall /* was sys_prof */ +/* 45 */ .long sys_brk + .long sys_setgid16 + .long sys_getgid16 + .long sys_ni_syscall /* was sys_signal */ + .long sys_geteuid16 +/* 50 */ .long sys_getegid16 + .long sys_acct + .long sys_umount + .long sys_ni_syscall /* was sys_lock */ + .long sys_ioctl +/* 55 */ .long sys_fcntl + .long sys_ni_syscall /* was sys_mpx */ + .long sys_setpgid + .long sys_ni_syscall /* was sys_ulimit */ + .long sys_ni_syscall /* was sys_olduname */ +/* 60 */ .long sys_umask + .long sys_chroot + .long sys_ustat + .long sys_dup2 + .long sys_getppid +/* 65 */ .long sys_getpgrp + .long sys_setsid + .long sys_sigaction + .long sys_ni_syscall /* was sys_sgetmask */ + .long sys_ni_syscall /* was sys_ssetmask */ +/* 70 */ .long sys_setreuid16 + .long sys_setregid16 + .long sys_sigsuspend_wrapper + .long sys_sigpending + .long sys_sethostname +/* 75 */ .long sys_setrlimit + .long OBSOLETE(sys_old_getrlimit) /* used by libc4 */ + .long sys_getrusage + .long sys_gettimeofday + .long sys_settimeofday +/* 80 */ .long sys_getgroups16 + .long sys_setgroups16 + .long OBSOLETE(old_select) /* used by libc4 */ + .long sys_symlink + .long sys_ni_syscall /* was sys_lstat */ +/* 85 */ .long sys_readlink + .long sys_uselib + .long sys_swapon + .long sys_reboot + .long OBSOLETE(old_readdir) /* used by libc4 */ +/* 90 */ .long OBSOLETE(old_mmap) /* used by libc4 */ + .long sys_munmap + .long sys_truncate + .long sys_ftruncate + .long sys_fchmod +/* 95 */ .long sys_fchown16 + .long sys_getpriority + .long sys_setpriority + .long sys_ni_syscall /* was sys_profil */ + .long sys_statfs +/* 100 */ .long sys_fstatfs + .long sys_ni_syscall + .long OBSOLETE(sys_socketcall) + .long sys_syslog + .long sys_setitimer +/* 105 */ .long sys_getitimer + .long sys_newstat + .long sys_newlstat + .long sys_newfstat + .long sys_ni_syscall /* was sys_uname */ +/* 110 */ .long sys_ni_syscall /* was sys_iopl */ + .long sys_vhangup + .long sys_ni_syscall + .long OBSOLETE(sys_syscall) /* call a syscall */ + .long sys_wait4 +/* 115 */ .long sys_swapoff + .long sys_sysinfo + .long OBSOLETE(ABI(sys_ipc, sys_oabi_ipc)) + .long sys_fsync + .long sys_sigreturn_wrapper +/* 120 */ .long sys_clone_wrapper + .long sys_setdomainname + .long sys_newuname + .long sys_ni_syscall + .long sys_adjtimex +/* 125 */ .long sys_mprotect + .long sys_sigprocmask + .long sys_ni_syscall /* was sys_create_module */ + .long sys_init_module + .long sys_delete_module +/* 130 */ .long sys_ni_syscall /* was sys_get_kernel_syms */ + .long sys_quotactl + .long sys_getpgid + .long sys_fchdir + .long sys_bdflush +/* 135 */ .long sys_sysfs + .long sys_personality + .long sys_ni_syscall /* .long _sys_afs_syscall */ + .long sys_setfsuid16 + .long sys_setfsgid16 +/* 140 */ .long sys_llseek + .long sys_getdents + .long sys_select + .long sys_flock + .long sys_msync +/* 145 */ .long sys_readv + .long sys_writev + .long sys_getsid + .long sys_fdatasync + .long sys_sysctl +/* 150 */ .long sys_mlock + .long sys_munlock + .long sys_mlockall + .long sys_munlockall + .long sys_sched_setparam +/* 155 */ .long sys_sched_getparam + .long sys_sched_setscheduler + .long sys_sched_getscheduler + .long sys_sched_yield + .long sys_sched_get_priority_max +/* 160 */ .long sys_sched_get_priority_min + .long sys_sched_rr_get_interval + .long sys_nanosleep + .long sys_arm_mremap + .long sys_setresuid16 +/* 165 */ .long sys_getresuid16 + .long sys_ni_syscall + .long sys_ni_syscall /* was sys_query_module */ + .long sys_poll + .long sys_nfsservctl +/* 170 */ .long sys_setresgid16 + .long sys_getresgid16 + .long sys_prctl + .long sys_rt_sigreturn_wrapper + .long sys_rt_sigaction +/* 175 */ .long sys_rt_sigprocmask + .long sys_rt_sigpending + .long sys_rt_sigtimedwait + .long sys_rt_sigqueueinfo + .long sys_rt_sigsuspend_wrapper +/* 180 */ .long ABI(sys_pread64, sys_oabi_pread64) + .long ABI(sys_pwrite64, sys_oabi_pwrite64) + .long sys_chown16 + .long sys_getcwd + .long sys_capget +/* 185 */ .long sys_capset + .long sys_sigaltstack_wrapper + .long sys_sendfile + .long sys_ni_syscall + .long sys_ni_syscall +/* 190 */ .long sys_vfork_wrapper + .long sys_getrlimit + .long sys_mmap2 + .long ABI(sys_truncate64, sys_oabi_truncate64) + .long ABI(sys_ftruncate64, sys_oabi_ftruncate64) +/* 195 */ .long ABI(sys_stat64, sys_oabi_stat64) + .long ABI(sys_lstat64, sys_oabi_lstat64) + .long ABI(sys_fstat64, sys_oabi_fstat64) + .long sys_lchown + .long sys_getuid +/* 200 */ .long sys_getgid + .long sys_geteuid + .long sys_getegid + .long sys_setreuid + .long sys_setregid +/* 205 */ .long sys_getgroups + .long sys_setgroups + .long sys_fchown + .long sys_setresuid + .long sys_getresuid +/* 210 */ .long sys_setresgid + .long sys_getresgid + .long sys_chown + .long sys_setuid + .long sys_setgid +/* 215 */ .long sys_setfsuid + .long sys_setfsgid + .long sys_getdents64 + .long sys_pivot_root + .long sys_mincore +/* 220 */ .long sys_madvise + .long ABI(sys_fcntl64, sys_oabi_fcntl64) + .long sys_ni_syscall /* TUX */ + .long sys_ni_syscall + .long sys_gettid +/* 225 */ .long ABI(sys_readahead, sys_oabi_readahead) + .long sys_setxattr + .long sys_lsetxattr + .long sys_fsetxattr + .long sys_getxattr +/* 230 */ .long sys_lgetxattr + .long sys_fgetxattr + .long sys_listxattr + .long sys_llistxattr + .long sys_flistxattr +/* 235 */ .long sys_removexattr + .long sys_lremovexattr + .long sys_fremovexattr + .long sys_tkill + .long sys_sendfile64 +/* 240 */ .long sys_futex + .long sys_sched_setaffinity + .long sys_sched_getaffinity + .long sys_io_setup + .long sys_io_destroy +/* 245 */ .long sys_io_getevents + .long sys_io_submit + .long sys_io_cancel + .long sys_exit_group + .long sys_lookup_dcookie +/* 250 */ .long sys_epoll_create + .long ABI(sys_epoll_ctl, sys_oabi_epoll_ctl) + .long ABI(sys_epoll_wait, sys_oabi_epoll_wait) + .long sys_remap_file_pages + .long sys_ni_syscall /* sys_set_thread_area */ +/* 255 */ .long sys_ni_syscall /* sys_get_thread_area */ + .long sys_set_tid_address + .long sys_timer_create + .long sys_timer_settime + .long sys_timer_gettime +/* 260 */ .long sys_timer_getoverrun + .long sys_timer_delete + .long sys_clock_settime + .long sys_clock_gettime + .long sys_clock_getres +/* 265 */ .long sys_clock_nanosleep + .long sys_statfs64_wrapper + .long sys_fstatfs64_wrapper + .long sys_tgkill + .long sys_utimes +/* 270 */ .long sys_arm_fadvise64_64 + .long sys_pciconfig_iobase + .long sys_pciconfig_read + .long sys_pciconfig_write + .long sys_mq_open +/* 275 */ .long sys_mq_unlink + .long sys_mq_timedsend + .long sys_mq_timedreceive + .long sys_mq_notify + .long sys_mq_getsetattr +/* 280 */ .long sys_waitid + .long sys_socket + .long sys_bind + .long sys_connect + .long sys_listen +/* 285 */ .long sys_accept + .long sys_getsockname + .long sys_getpeername + .long sys_socketpair + .long sys_send +/* 290 */ .long sys_sendto + .long sys_recv + .long sys_recvfrom + .long sys_shutdown + .long sys_setsockopt +/* 295 */ .long sys_getsockopt + .long sys_sendmsg + .long sys_recvmsg + .long ABI(sys_semop, sys_oabi_semop) + .long sys_semget +/* 300 */ .long sys_semctl + .long sys_msgsnd + .long sys_msgrcv + .long sys_msgget + .long sys_msgctl +/* 305 */ .long sys_shmat + .long sys_shmdt + .long sys_shmget + .long sys_shmctl + .long sys_add_key +/* 310 */ .long sys_request_key + .long sys_keyctl + .long ABI(sys_semtimedop, sys_oabi_semtimedop) +/* vserver */ .long sys_ni_syscall + .long sys_ioprio_set +/* 315 */ .long sys_ioprio_get + .long sys_inotify_init + .long sys_inotify_add_watch + .long sys_inotify_rm_watch + .long sys_mbind +/* 320 */ .long sys_get_mempolicy + .long sys_set_mempolicy + + .rept NR_syscalls - (. - 100b) / 4 + .long sys_ni_syscall + .endr #endif -.rept syscalls_padding - CALL(sys_ni_syscall) -.endr diff --git a/trunk/arch/arm/kernel/entry-common.S b/trunk/arch/arm/kernel/entry-common.S index dbcb11a31f78..2b92ce85f97f 100644 --- a/trunk/arch/arm/kernel/entry-common.S +++ b/trunk/arch/arm/kernel/entry-common.S @@ -87,11 +87,7 @@ ENTRY(ret_from_fork) b ret_slow_syscall - .equ NR_syscalls,0 -#define CALL(x) .equ NR_syscalls,NR_syscalls+1 #include "calls.S" -#undef CALL -#define CALL(x) .long x /*============================================================================= * SWI handler diff --git a/trunk/arch/arm/mach-integrator/integrator_cp.c b/trunk/arch/arm/mach-integrator/integrator_cp.c index a0724f2b24ce..31820170f306 100644 --- a/trunk/arch/arm/mach-integrator/integrator_cp.c +++ b/trunk/arch/arm/mach-integrator/integrator_cp.c @@ -469,9 +469,7 @@ static void cp_clcd_enable(struct clcd_fb *fb) if (fb->fb.var.bits_per_pixel <= 8) val = CM_CTRL_LCDMUXSEL_VGA_8421BPP; else if (fb->fb.var.bits_per_pixel <= 16) - val = CM_CTRL_LCDMUXSEL_VGA_16BPP - | CM_CTRL_LCDEN0 | CM_CTRL_LCDEN1 - | CM_CTRL_STATIC1 | CM_CTRL_STATIC2; + val = CM_CTRL_LCDMUXSEL_VGA_16BPP; else val = 0; /* no idea for this, don't trust the docs */ diff --git a/trunk/arch/arm/mach-s3c2410/cpu.h b/trunk/arch/arm/mach-s3c2410/cpu.h index fc1067783f6d..9cbe5eef492b 100644 --- a/trunk/arch/arm/mach-s3c2410/cpu.h +++ b/trunk/arch/arm/mach-s3c2410/cpu.h @@ -17,12 +17,11 @@ * 14-Jan-2005 BJD Added s3c24xx_init_clocks() call * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} & IODESC_ENT * 14-Mar-2005 BJD Updated for __iomem - * 15-Jan-2006 LCVR Updated S3C2410_PA_##x to new S3C24XX_PA_##x macro */ /* todo - fix when rmk changes iodescs to use `void __iomem *` */ -#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } +#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C2410_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } #ifndef MHZ #define MHZ (1000*1000) diff --git a/trunk/arch/arm/mach-s3c2410/devs.c b/trunk/arch/arm/mach-s3c2410/devs.c index b8d994a24d1c..f58406e6ef5a 100644 --- a/trunk/arch/arm/mach-s3c2410/devs.c +++ b/trunk/arch/arm/mach-s3c2410/devs.c @@ -10,7 +10,6 @@ * published by the Free Software Foundation. * * Modifications: - * 15-Jan-2006 LCVR Using S3C24XX_PA_##x macro for common S3C24XX devices * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv * 29-Aug-2004 BJD Added timers 0 through 3 @@ -47,8 +46,8 @@ struct platform_device *s3c24xx_uart_devs[3]; static struct resource s3c_usb_resource[] = { [0] = { - .start = S3C24XX_PA_USBHOST, - .end = S3C24XX_PA_USBHOST + S3C24XX_SZ_USBHOST - 1, + .start = S3C2410_PA_USBHOST, + .end = S3C2410_PA_USBHOST + S3C24XX_SZ_USBHOST - 1, .flags = IORESOURCE_MEM, }, [1] = { @@ -77,8 +76,8 @@ EXPORT_SYMBOL(s3c_device_usb); static struct resource s3c_lcd_resource[] = { [0] = { - .start = S3C24XX_PA_LCD, - .end = S3C24XX_PA_LCD + S3C24XX_SZ_LCD - 1, + .start = S3C2410_PA_LCD, + .end = S3C2410_PA_LCD + S3C24XX_SZ_LCD - 1, .flags = IORESOURCE_MEM, }, [1] = { @@ -140,8 +139,8 @@ EXPORT_SYMBOL(s3c_device_nand); static struct resource s3c_usbgadget_resource[] = { [0] = { - .start = S3C24XX_PA_USBDEV, - .end = S3C24XX_PA_USBDEV + S3C24XX_SZ_USBDEV - 1, + .start = S3C2410_PA_USBDEV, + .end = S3C2410_PA_USBDEV + S3C24XX_SZ_USBDEV - 1, .flags = IORESOURCE_MEM, }, [1] = { @@ -165,8 +164,8 @@ EXPORT_SYMBOL(s3c_device_usbgadget); static struct resource s3c_wdt_resource[] = { [0] = { - .start = S3C24XX_PA_WATCHDOG, - .end = S3C24XX_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG - 1, + .start = S3C2410_PA_WATCHDOG, + .end = S3C2410_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG - 1, .flags = IORESOURCE_MEM, }, [1] = { @@ -190,8 +189,8 @@ EXPORT_SYMBOL(s3c_device_wdt); static struct resource s3c_i2c_resource[] = { [0] = { - .start = S3C24XX_PA_IIC, - .end = S3C24XX_PA_IIC + S3C24XX_SZ_IIC - 1, + .start = S3C2410_PA_IIC, + .end = S3C2410_PA_IIC + S3C24XX_SZ_IIC - 1, .flags = IORESOURCE_MEM, }, [1] = { @@ -215,8 +214,8 @@ EXPORT_SYMBOL(s3c_device_i2c); static struct resource s3c_iis_resource[] = { [0] = { - .start = S3C24XX_PA_IIS, - .end = S3C24XX_PA_IIS + S3C24XX_SZ_IIS -1, + .start = S3C2410_PA_IIS, + .end = S3C2410_PA_IIS + S3C24XX_SZ_IIS -1, .flags = IORESOURCE_MEM, } }; @@ -240,8 +239,8 @@ EXPORT_SYMBOL(s3c_device_iis); static struct resource s3c_rtc_resource[] = { [0] = { - .start = S3C24XX_PA_RTC, - .end = S3C24XX_PA_RTC + 0xff, + .start = S3C2410_PA_RTC, + .end = S3C2410_PA_RTC + 0xff, .flags = IORESOURCE_MEM, }, [1] = { @@ -269,8 +268,8 @@ EXPORT_SYMBOL(s3c_device_rtc); static struct resource s3c_adc_resource[] = { [0] = { - .start = S3C24XX_PA_ADC, - .end = S3C24XX_PA_ADC + S3C24XX_SZ_ADC - 1, + .start = S3C2410_PA_ADC, + .end = S3C2410_PA_ADC + S3C24XX_SZ_ADC - 1, .flags = IORESOURCE_MEM, }, [1] = { @@ -317,8 +316,8 @@ EXPORT_SYMBOL(s3c_device_sdi); static struct resource s3c_spi0_resource[] = { [0] = { - .start = S3C24XX_PA_SPI, - .end = S3C24XX_PA_SPI + 0x1f, + .start = S3C2410_PA_SPI, + .end = S3C2410_PA_SPI + 0x1f, .flags = IORESOURCE_MEM, }, [1] = { @@ -342,8 +341,8 @@ EXPORT_SYMBOL(s3c_device_spi0); static struct resource s3c_spi1_resource[] = { [0] = { - .start = S3C24XX_PA_SPI + 0x20, - .end = S3C24XX_PA_SPI + 0x20 + 0x1f, + .start = S3C2410_PA_SPI + 0x20, + .end = S3C2410_PA_SPI + 0x20 + 0x1f, .flags = IORESOURCE_MEM, }, [1] = { @@ -367,8 +366,8 @@ EXPORT_SYMBOL(s3c_device_spi1); static struct resource s3c_timer0_resource[] = { [0] = { - .start = S3C24XX_PA_TIMER + 0x0C, - .end = S3C24XX_PA_TIMER + 0x0C + 0xB, + .start = S3C2410_PA_TIMER + 0x0C, + .end = S3C2410_PA_TIMER + 0x0C + 0xB, .flags = IORESOURCE_MEM, }, [1] = { @@ -392,8 +391,8 @@ EXPORT_SYMBOL(s3c_device_timer0); static struct resource s3c_timer1_resource[] = { [0] = { - .start = S3C24XX_PA_TIMER + 0x18, - .end = S3C24XX_PA_TIMER + 0x23, + .start = S3C2410_PA_TIMER + 0x18, + .end = S3C2410_PA_TIMER + 0x23, .flags = IORESOURCE_MEM, }, [1] = { @@ -417,8 +416,8 @@ EXPORT_SYMBOL(s3c_device_timer1); static struct resource s3c_timer2_resource[] = { [0] = { - .start = S3C24XX_PA_TIMER + 0x24, - .end = S3C24XX_PA_TIMER + 0x2F, + .start = S3C2410_PA_TIMER + 0x24, + .end = S3C2410_PA_TIMER + 0x2F, .flags = IORESOURCE_MEM, }, [1] = { @@ -442,8 +441,8 @@ EXPORT_SYMBOL(s3c_device_timer2); static struct resource s3c_timer3_resource[] = { [0] = { - .start = S3C24XX_PA_TIMER + 0x30, - .end = S3C24XX_PA_TIMER + 0x3B, + .start = S3C2410_PA_TIMER + 0x30, + .end = S3C2410_PA_TIMER + 0x3B, .flags = IORESOURCE_MEM, }, [1] = { diff --git a/trunk/arch/arm/mach-s3c2410/dma.c b/trunk/arch/arm/mach-s3c2410/dma.c index 4dbd8e758ea6..65feaf20d23e 100644 --- a/trunk/arch/arm/mach-s3c2410/dma.c +++ b/trunk/arch/arm/mach-s3c2410/dma.c @@ -1152,7 +1152,7 @@ static int __init s3c2410_init_dma(void) printk("S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics\n"); - dma_base = ioremap(S3C24XX_PA_DMA, 0x200); + dma_base = ioremap(S3C2410_PA_DMA, 0x200); if (dma_base == NULL) { printk(KERN_ERR "dma failed to remap register block\n"); return -ENOMEM; diff --git a/trunk/arch/arm/mach-s3c2410/sleep.S b/trunk/arch/arm/mach-s3c2410/sleep.S index e9a055b779b7..61768dac7fee 100644 --- a/trunk/arch/arm/mach-s3c2410/sleep.S +++ b/trunk/arch/arm/mach-s3c2410/sleep.S @@ -133,12 +133,12 @@ ENTRY(s3c2410_cpu_resume) @@ load UART to allow us to print the two characters for @@ resume debug - mov r2, #S3C24XX_PA_UART & 0xff000000 - orr r2, r2, #S3C24XX_PA_UART & 0xff000 + mov r2, #S3C2410_PA_UART & 0xff000000 + orr r2, r2, #S3C2410_PA_UART & 0xff000 #if 0 /* SMDK2440 LED set */ - mov r14, #S3C24XX_PA_GPIO + mov r14, #S3C2410_PA_GPIO ldr r12, [ r14, #0x54 ] bic r12, r12, #3<<4 orr r12, r12, #1<<7 diff --git a/trunk/arch/arm/mm/ioremap.c b/trunk/arch/arm/mm/ioremap.c index da9b35974118..de3ce1eec2ec 100644 --- a/trunk/arch/arm/mm/ioremap.c +++ b/trunk/arch/arm/mm/ioremap.c @@ -142,7 +142,7 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, return NULL; addr = (unsigned long)area->addr; if (remap_area_pages(addr, pfn, size, flags)) { - vfree((void *)addr); + vfree(addr); return NULL; } return (void __iomem *) (offset + (char *)addr); diff --git a/trunk/arch/arm/mm/mm-armv.c b/trunk/arch/arm/mm/mm-armv.c index ef8d30a185a9..d0245a31d4dd 100644 --- a/trunk/arch/arm/mm/mm-armv.c +++ b/trunk/arch/arm/mm/mm-armv.c @@ -343,12 +343,6 @@ static struct mem_types mem_types[] __initdata = { PMD_SECT_AP_WRITE | PMD_SECT_BUFFERABLE | PMD_SECT_TEX(1), .domain = DOMAIN_IO, - }, - [MT_NONSHARED_DEVICE] = { - .prot_l1 = PMD_TYPE_TABLE, - .prot_sect = PMD_TYPE_SECT | PMD_SECT_NONSHARED_DEV | - PMD_SECT_AP_WRITE, - .domain = DOMAIN_IO, } }; diff --git a/trunk/arch/ia64/kernel/mca_asm.S b/trunk/arch/ia64/kernel/mca_asm.S index 403a80a58c13..60a464bfd9e2 100644 --- a/trunk/arch/ia64/kernel/mca_asm.S +++ b/trunk/arch/ia64/kernel/mca_asm.S @@ -512,7 +512,7 @@ ia64_state_save: st8 [temp1]=r12 // os_status, default is cold boot mov r6=IA64_MCA_SAME_CONTEXT ;; - st8 [temp1]=r6 // context, default is same context + st8 [temp2]=r6 // context, default is same context // Save the pt_regs data that is not in minstate. The previous code // left regs at sos. diff --git a/trunk/arch/powerpc/platforms/powermac/feature.c b/trunk/arch/powerpc/platforms/powermac/feature.c index 2296f3d46ca8..558dd0692092 100644 --- a/trunk/arch/powerpc/platforms/powermac/feature.c +++ b/trunk/arch/powerpc/platforms/powermac/feature.c @@ -910,18 +910,16 @@ core99_gmac_phy_reset(struct device_node *node, long param, long value) macio->type != macio_intrepid) return -ENODEV; - printk(KERN_DEBUG "Hard reset of PHY chip ...\n"); - LOCK(flags); MACIO_OUT8(KL_GPIO_ETH_PHY_RESET, KEYLARGO_GPIO_OUTPUT_ENABLE); (void)MACIO_IN8(KL_GPIO_ETH_PHY_RESET); UNLOCK(flags); - msleep(10); + mdelay(10); LOCK(flags); MACIO_OUT8(KL_GPIO_ETH_PHY_RESET, /*KEYLARGO_GPIO_OUTPUT_ENABLE | */ KEYLARGO_GPIO_OUTOUT_DATA); UNLOCK(flags); - msleep(10); + mdelay(10); return 0; } diff --git a/trunk/arch/ppc/syslib/mv64x60.c b/trunk/arch/ppc/syslib/mv64x60.c index 1f01b7e2376b..94ea346b7b4b 100644 --- a/trunk/arch/ppc/syslib/mv64x60.c +++ b/trunk/arch/ppc/syslib/mv64x60.c @@ -313,7 +313,7 @@ static struct platform_device mpsc1_device = { }; #endif -#if defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE) +#ifdef CONFIG_MV643XX_ETH static struct resource mv64x60_eth_shared_resources[] = { [0] = { .name = "ethernet shared base", @@ -456,7 +456,7 @@ static struct platform_device *mv64x60_pd_devs[] __initdata = { &mpsc0_device, &mpsc1_device, #endif -#if defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE) +#ifdef CONFIG_MV643XX_ETH &mv64x60_eth_shared_device, #endif #ifdef CONFIG_MV643XX_ETH_0 diff --git a/trunk/arch/sparc/kernel/entry.S b/trunk/arch/sparc/kernel/entry.S index 267ec8f6fb58..c51d08d218ef 100644 --- a/trunk/arch/sparc/kernel/entry.S +++ b/trunk/arch/sparc/kernel/entry.S @@ -38,7 +38,7 @@ #define curptr g6 -#define NR_SYSCALLS 299 /* Each OS is different... */ +#define NR_SYSCALLS 284 /* Each OS is different... */ /* These are just handy. */ #define _SV save %sp, -STACKFRAME_SZ, %sp diff --git a/trunk/arch/sparc/math-emu/math.c b/trunk/arch/sparc/math-emu/math.c index 8613b3eb877c..be2c80932e26 100644 --- a/trunk/arch/sparc/math-emu/math.c +++ b/trunk/arch/sparc/math-emu/math.c @@ -323,6 +323,11 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs) case FMOVS: case FABSS: case FNEGS: TYPE(2,1,0,1,0,0,0); break; + default: +#ifdef DEBUG_MATHEMU + printk("unknown FPop1: %03lx\n",(insn>>5)&0x1ff); +#endif + break; } } else if ((insn & 0xc1f80000) == 0x81a80000) /* FPOP2 */ { switch ((insn >> 5) & 0x1ff) { @@ -332,6 +337,11 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs) case FCMPED: TYPE(3,0,0,2,1,2,1); break; case FCMPQ: TYPE(3,0,0,3,1,3,1); break; case FCMPEQ: TYPE(3,0,0,3,1,3,1); break; + default: +#ifdef DEBUG_MATHEMU + printk("unknown FPop2: %03lx\n",(insn>>5)&0x1ff); +#endif + break; } } diff --git a/trunk/arch/sparc64/kernel/entry.S b/trunk/arch/sparc64/kernel/entry.S index 12911e7463f2..e50e56e4ab61 100644 --- a/trunk/arch/sparc64/kernel/entry.S +++ b/trunk/arch/sparc64/kernel/entry.S @@ -25,7 +25,7 @@ #define curptr g6 -#define NR_SYSCALLS 299 /* Each OS is different... */ +#define NR_SYSCALLS 284 /* Each OS is different... */ .text .align 32 diff --git a/trunk/arch/sparc64/kernel/sys32.S b/trunk/arch/sparc64/kernel/sys32.S index 60b59375aa78..9cd272ac3ac1 100644 --- a/trunk/arch/sparc64/kernel/sys32.S +++ b/trunk/arch/sparc64/kernel/sys32.S @@ -84,6 +84,7 @@ SIGN2(sys32_fadvise64_64, compat_sys_fadvise64_64, %o0, %o5) SIGN2(sys32_bdflush, sys_bdflush, %o0, %o1) SIGN1(sys32_mlockall, sys_mlockall, %o0) SIGN1(sys32_nfsservctl, compat_sys_nfsservctl, %o0) +SIGN1(sys32_clock_settime, compat_sys_clock_settime, %o1) SIGN1(sys32_clock_nanosleep, compat_sys_clock_nanosleep, %o1) SIGN1(sys32_timer_settime, compat_sys_timer_settime, %o1) SIGN1(sys32_io_submit, compat_sys_io_submit, %o1) diff --git a/trunk/arch/sparc64/kernel/systbls.S b/trunk/arch/sparc64/kernel/systbls.S index 2881faf36635..bf0fc5bfbfbe 100644 --- a/trunk/arch/sparc64/kernel/systbls.S +++ b/trunk/arch/sparc64/kernel/systbls.S @@ -71,7 +71,7 @@ sys_call_table32: /*240*/ .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler .word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep /*250*/ .word sys32_mremap, sys32_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl - .word sys_ni_syscall, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep + .word sys_ni_syscall, sys32_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep /*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy /*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink diff --git a/trunk/block/elevator.c b/trunk/block/elevator.c index 96a61e029ce5..c9f424d5399c 100644 --- a/trunk/block/elevator.c +++ b/trunk/block/elevator.c @@ -139,16 +139,35 @@ static int elevator_attach(request_queue_t *q, struct elevator_type *e, static char chosen_elevator[16]; -static int __init elevator_setup(char *str) +static void elevator_setup_default(void) { + struct elevator_type *e; + + /* + * If default has not been set, use the compiled-in selection. + */ + if (!chosen_elevator[0]) + strcpy(chosen_elevator, CONFIG_DEFAULT_IOSCHED); + /* * Be backwards-compatible with previous kernels, so users * won't get the wrong elevator. */ - if (!strcmp(str, "as")) + if (!strcmp(chosen_elevator, "as")) strcpy(chosen_elevator, "anticipatory"); + + /* + * If the given scheduler is not available, fall back to the default + */ + if ((e = elevator_find(chosen_elevator))) + elevator_put(e); else - strncpy(chosen_elevator, str, sizeof(chosen_elevator) - 1); + strcpy(chosen_elevator, CONFIG_DEFAULT_IOSCHED); +} + +static int __init elevator_setup(char *str) +{ + strncpy(chosen_elevator, str, sizeof(chosen_elevator) - 1); return 0; } @@ -165,16 +184,14 @@ int elevator_init(request_queue_t *q, char *name) q->end_sector = 0; q->boundary_rq = NULL; - if (name && !(e = elevator_get(name))) - return -EINVAL; + elevator_setup_default(); - if (!e && *chosen_elevator && !(e = elevator_get(chosen_elevator))) - printk("I/O scheduler %s not found\n", chosen_elevator); + if (!name) + name = chosen_elevator; - if (!e && !(e = elevator_get(CONFIG_DEFAULT_IOSCHED))) { - printk("Default I/O scheduler not found, using no-op\n"); - e = elevator_get("noop"); - } + e = elevator_get(name); + if (!e) + return -EINVAL; eq = kmalloc(sizeof(struct elevator_queue), GFP_KERNEL); if (!eq) { @@ -652,10 +669,8 @@ int elv_register(struct elevator_type *e) spin_unlock_irq(&elv_list_lock); printk(KERN_INFO "io scheduler %s registered", e->elevator_name); - if (!strcmp(e->elevator_name, chosen_elevator) || - (!*chosen_elevator && - !strcmp(e->elevator_name, CONFIG_DEFAULT_IOSCHED))) - printk(" (default)"); + if (!strcmp(e->elevator_name, chosen_elevator)) + printk(" (default)"); printk("\n"); return 0; } diff --git a/trunk/block/ll_rw_blk.c b/trunk/block/ll_rw_blk.c index d38b4afa37ef..8e27d0ab0d7c 100644 --- a/trunk/block/ll_rw_blk.c +++ b/trunk/block/ll_rw_blk.c @@ -304,7 +304,6 @@ static inline void rq_init(request_queue_t *q, struct request *rq) * blk_queue_ordered - does this queue support ordered writes * @q: the request queue * @ordered: one of QUEUE_ORDERED_* - * @prepare_flush_fn: rq setup helper for cache flush ordered writes * * Description: * For journalled file systems, doing ordered writes on a commit @@ -333,7 +332,6 @@ int blk_queue_ordered(request_queue_t *q, unsigned ordered, return -EINVAL; } - q->ordered = ordered; q->next_ordered = ordered; q->prepare_flush_fn = prepare_flush_fn; @@ -664,7 +662,7 @@ EXPORT_SYMBOL(blk_queue_bounce_limit); * Enables a low level driver to set an upper limit on the size of * received requests. **/ -void blk_queue_max_sectors(request_queue_t *q, unsigned int max_sectors) +void blk_queue_max_sectors(request_queue_t *q, unsigned short max_sectors) { if ((max_sectors << 9) < PAGE_CACHE_SIZE) { max_sectors = 1 << (PAGE_CACHE_SHIFT - 9); @@ -2634,7 +2632,6 @@ EXPORT_SYMBOL(blk_put_request); /** * blk_end_sync_rq - executes a completion event on a request * @rq: request to complete - * @error: end io status of the request */ void blk_end_sync_rq(struct request *rq, int error) { @@ -3156,7 +3153,7 @@ static int __end_that_request_first(struct request *req, int uptodate, if (blk_fs_request(req) && req->rq_disk) { const int rw = rq_data_dir(req); - disk_stat_add(req->rq_disk, sectors[rw], nr_bytes >> 9); + __disk_stat_add(req->rq_disk, sectors[rw], nr_bytes >> 9); } total_bytes = bio_nbytes = 0; diff --git a/trunk/drivers/input/touchscreen/ads7846.c b/trunk/drivers/input/touchscreen/ads7846.c index b45a45ca7cc9..dd8c6a9ffc76 100644 --- a/trunk/drivers/input/touchscreen/ads7846.c +++ b/trunk/drivers/input/touchscreen/ads7846.c @@ -29,6 +29,9 @@ #ifdef CONFIG_ARCH_OMAP #include #endif + +#else +#define set_irq_type(irq,type) do{}while(0) #endif @@ -506,14 +509,14 @@ static int __devinit ads7846_probe(struct spi_device *spi) ts->msg.complete = ads7846_rx; ts->msg.context = ts; - if (request_irq(spi->irq, ads7846_irq, - SA_SAMPLE_RANDOM | SA_TRIGGER_FALLING, - spi->dev.bus_id, ts)) { + if (request_irq(spi->irq, ads7846_irq, SA_SAMPLE_RANDOM, + spi->dev.bus_id, ts)) { dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq); input_unregister_device(&ts->input); kfree(ts); return -EBUSY; } + set_irq_type(spi->irq, IRQT_FALLING); dev_info(&spi->dev, "touchscreen, irq %d\n", spi->irq); diff --git a/trunk/drivers/message/fusion/Makefile b/trunk/drivers/message/fusion/Makefile index 33ace373241c..8a2e2657f4c2 100644 --- a/trunk/drivers/message/fusion/Makefile +++ b/trunk/drivers/message/fusion/Makefile @@ -29,8 +29,6 @@ # For mptctl: #CFLAGS_mptctl.o += -DMPT_DEBUG_IOCTL # -# For mptfc: -#CFLAGS_mptfc.o += -DMPT_DEBUG_FC #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC diff --git a/trunk/drivers/message/fusion/mptbase.c b/trunk/drivers/message/fusion/mptbase.c index 9a2c7605d49c..d890b2b8a93e 100644 --- a/trunk/drivers/message/fusion/mptbase.c +++ b/trunk/drivers/message/fusion/mptbase.c @@ -81,10 +81,6 @@ MODULE_LICENSE("GPL"); /* * cmd line parameters */ -static int mpt_msi_enable; -module_param(mpt_msi_enable, int, 0); -MODULE_PARM_DESC(mpt_msi_enable, " MSI Support Enable (default=0)"); - #ifdef MFCNT static int mfcounter = 0; #define PRINT_MF_COUNT 20000 @@ -178,7 +174,7 @@ static void mpt_get_fw_exp_ver(char *buf, MPT_ADAPTER *ioc); static int ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *evReply, int *evHandlers); static void mpt_sp_ioc_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf); static void mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info); -static void mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info); +static void mpt_sp_log_info(MPT_ADAPTER *ioc, u32 log_info); static void mpt_sas_log_info(MPT_ADAPTER *ioc, u32 log_info); /* module entry point */ @@ -317,7 +313,7 @@ mpt_reply(MPT_ADAPTER *ioc, u32 pa) if (ioc->bus_type == FC) mpt_fc_log_info(ioc, log_info); else if (ioc->bus_type == SPI) - mpt_spi_log_info(ioc, log_info); + mpt_sp_log_info(ioc, log_info); else if (ioc->bus_type == SAS) mpt_sas_log_info(ioc, log_info); } @@ -1448,9 +1444,6 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) ioc->pci_irq = -1; if (pdev->irq) { - if (mpt_msi_enable && !pci_enable_msi(pdev)) - printk(MYIOC_s_INFO_FMT "PCI-MSI enabled\n", ioc->name); - r = request_irq(pdev->irq, mpt_interrupt, SA_SHIRQ, ioc->name, ioc); if (r < 0) { @@ -1490,10 +1483,6 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) list_del(&ioc->list); free_irq(ioc->pci_irq, ioc); - if (mpt_msi_enable) - pci_disable_msi(pdev); - if (ioc->alt_ioc) - ioc->alt_ioc->alt_ioc = NULL; iounmap(mem); kfree(ioc); pci_set_drvdata(pdev, NULL); @@ -2147,8 +2136,6 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc) if (ioc->pci_irq != -1) { free_irq(ioc->pci_irq, ioc); - if (mpt_msi_enable) - pci_disable_msi(ioc->pcidev); ioc->pci_irq = -1; } @@ -2170,10 +2157,6 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc) sz_last = ioc->alloc_total; dprintk((KERN_INFO MYNAM ": %s: free'd %d of %d bytes\n", ioc->name, sz_first-sz_last+(int)sizeof(*ioc), sz_first)); - - if (ioc->alt_ioc) - ioc->alt_ioc->alt_ioc = NULL; - kfree(ioc); } @@ -2787,16 +2770,13 @@ SendPortEnable(MPT_ADAPTER *ioc, int portnum, int sleepFlag) /* RAID FW may take a long time to enable */ - if (((ioc->facts.ProductID & MPI_FW_HEADER_PID_PROD_MASK) - > MPI_FW_HEADER_PID_PROD_TARGET_SCSI) || - (ioc->bus_type == SAS)) { - rc = mpt_handshake_req_reply_wait(ioc, req_sz, - (u32*)&port_enable, reply_sz, (u16*)&reply_buf, - 300 /*seconds*/, sleepFlag); + if ( (ioc->facts.ProductID & MPI_FW_HEADER_PID_PROD_MASK) + > MPI_FW_HEADER_PID_PROD_TARGET_SCSI ) { + rc = mpt_handshake_req_reply_wait(ioc, req_sz, (u32*)&port_enable, + reply_sz, (u16*)&reply_buf, 300 /*seconds*/, sleepFlag); } else { - rc = mpt_handshake_req_reply_wait(ioc, req_sz, - (u32*)&port_enable, reply_sz, (u16*)&reply_buf, - 30 /*seconds*/, sleepFlag); + rc = mpt_handshake_req_reply_wait(ioc, req_sz, (u32*)&port_enable, + reply_sz, (u16*)&reply_buf, 30 /*seconds*/, sleepFlag); } return rc; } @@ -4406,138 +4386,6 @@ mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode) return 0; } -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - -static void -mptbase_raid_process_event_data(MPT_ADAPTER *ioc, - MpiEventDataRaid_t * pRaidEventData) -{ - int volume; - int reason; - int disk; - int status; - int flags; - int state; - - volume = pRaidEventData->VolumeID; - reason = pRaidEventData->ReasonCode; - disk = pRaidEventData->PhysDiskNum; - status = le32_to_cpu(pRaidEventData->SettingsStatus); - flags = (status >> 0) & 0xff; - state = (status >> 8) & 0xff; - - if (reason == MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED) { - return; - } - - if ((reason >= MPI_EVENT_RAID_RC_PHYSDISK_CREATED && - reason <= MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED) || - (reason == MPI_EVENT_RAID_RC_SMART_DATA)) { - printk(MYIOC_s_INFO_FMT "RAID STATUS CHANGE for PhysDisk %d\n", - ioc->name, disk); - } else { - printk(MYIOC_s_INFO_FMT "RAID STATUS CHANGE for VolumeID %d\n", - ioc->name, volume); - } - - switch(reason) { - case MPI_EVENT_RAID_RC_VOLUME_CREATED: - printk(MYIOC_s_INFO_FMT " volume has been created\n", - ioc->name); - break; - - case MPI_EVENT_RAID_RC_VOLUME_DELETED: - - printk(MYIOC_s_INFO_FMT " volume has been deleted\n", - ioc->name); - break; - - case MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED: - printk(MYIOC_s_INFO_FMT " volume settings have been changed\n", - ioc->name); - break; - - case MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED: - printk(MYIOC_s_INFO_FMT " volume is now %s%s%s%s\n", - ioc->name, - state == MPI_RAIDVOL0_STATUS_STATE_OPTIMAL - ? "optimal" - : state == MPI_RAIDVOL0_STATUS_STATE_DEGRADED - ? "degraded" - : state == MPI_RAIDVOL0_STATUS_STATE_FAILED - ? "failed" - : "state unknown", - flags & MPI_RAIDVOL0_STATUS_FLAG_ENABLED - ? ", enabled" : "", - flags & MPI_RAIDVOL0_STATUS_FLAG_QUIESCED - ? ", quiesced" : "", - flags & MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS - ? ", resync in progress" : "" ); - break; - - case MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED: - printk(MYIOC_s_INFO_FMT " volume membership of PhysDisk %d has changed\n", - ioc->name, disk); - break; - - case MPI_EVENT_RAID_RC_PHYSDISK_CREATED: - printk(MYIOC_s_INFO_FMT " PhysDisk has been created\n", - ioc->name); - break; - - case MPI_EVENT_RAID_RC_PHYSDISK_DELETED: - printk(MYIOC_s_INFO_FMT " PhysDisk has been deleted\n", - ioc->name); - break; - - case MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED: - printk(MYIOC_s_INFO_FMT " PhysDisk settings have been changed\n", - ioc->name); - break; - - case MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED: - printk(MYIOC_s_INFO_FMT " PhysDisk is now %s%s%s\n", - ioc->name, - state == MPI_PHYSDISK0_STATUS_ONLINE - ? "online" - : state == MPI_PHYSDISK0_STATUS_MISSING - ? "missing" - : state == MPI_PHYSDISK0_STATUS_NOT_COMPATIBLE - ? "not compatible" - : state == MPI_PHYSDISK0_STATUS_FAILED - ? "failed" - : state == MPI_PHYSDISK0_STATUS_INITIALIZING - ? "initializing" - : state == MPI_PHYSDISK0_STATUS_OFFLINE_REQUESTED - ? "offline requested" - : state == MPI_PHYSDISK0_STATUS_FAILED_REQUESTED - ? "failed requested" - : state == MPI_PHYSDISK0_STATUS_OTHER_OFFLINE - ? "offline" - : "state unknown", - flags & MPI_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC - ? ", out of sync" : "", - flags & MPI_PHYSDISK0_STATUS_FLAG_QUIESCED - ? ", quiesced" : "" ); - break; - - case MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED: - printk(MYIOC_s_INFO_FMT " Domain Validation needed for PhysDisk %d\n", - ioc->name, disk); - break; - - case MPI_EVENT_RAID_RC_SMART_DATA: - printk(MYIOC_s_INFO_FMT " SMART data received, ASC/ASCQ = %02xh/%02xh\n", - ioc->name, pRaidEventData->ASC, pRaidEventData->ASCQ); - break; - - case MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED: - printk(MYIOC_s_INFO_FMT " replacement of PhysDisk %d has started\n", - ioc->name, disk); - break; - } -} - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /* * GetIoUnitPage2 - Retrieve BIOS version and boot order information. @@ -4750,14 +4598,6 @@ mpt_GetScsiPortSettings(MPT_ADAPTER *ioc, int portnum) SCSIPortPage2_t *pPP2 = (SCSIPortPage2_t *) pbuf; MpiDeviceInfo_t *pdevice = NULL; - /* - * Save "Set to Avoid SCSI Bus Resets" flag - */ - ioc->spi_data.bus_reset = - (le32_to_cpu(pPP2->PortFlags) & - MPI_SCSIPORTPAGE2_PORT_FLAGS_AVOID_SCSI_RESET) ? - 0 : 1 ; - /* Save the Port Page 2 data * (reformat into a 32bit quantity) */ @@ -6127,10 +5967,6 @@ ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply } } break; - case MPI_EVENT_INTEGRATED_RAID: - mptbase_raid_process_event_data(ioc, - (MpiEventDataRaid_t *)pEventReply->Data); - break; default: break; } @@ -6210,7 +6046,7 @@ mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info) /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /* - * mpt_spi_log_info - Log information returned from SCSI Parallel IOC. + * mpt_sp_log_info - Log information returned from SCSI Parallel IOC. * @ioc: Pointer to MPT_ADAPTER structure * @mr: Pointer to MPT reply frame * @log_info: U32 LogInfo word from the IOC @@ -6218,7 +6054,7 @@ mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info) * Refer to lsi/sp_log.h. */ static void -mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info) +mpt_sp_log_info(MPT_ADAPTER *ioc, u32 log_info) { u32 info = log_info & 0x00FF0000; char *desc = "unknown"; diff --git a/trunk/drivers/message/fusion/mptbase.h b/trunk/drivers/message/fusion/mptbase.h index ea2649ecad1f..47053ac65068 100644 --- a/trunk/drivers/message/fusion/mptbase.h +++ b/trunk/drivers/message/fusion/mptbase.h @@ -76,8 +76,8 @@ #define COPYRIGHT "Copyright (c) 1999-2005 " MODULEAUTHOR #endif -#define MPT_LINUX_VERSION_COMMON "3.03.07" -#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.03.07" +#define MPT_LINUX_VERSION_COMMON "3.03.06" +#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.03.06" #define WHAT_MAGIC_STRING "@" "(" "#" ")" #define show_mptmod_ver(s,ver) \ @@ -123,7 +123,7 @@ #define MPT_MAX_FRAME_SIZE 128 #define MPT_DEFAULT_FRAME_SIZE 128 -#define MPT_REPLY_FRAME_SIZE 0x50 /* Must be a multiple of 8 */ +#define MPT_REPLY_FRAME_SIZE 0x40 /* Must be a multiple of 8 */ #define MPT_SG_REQ_128_SCALE 1 #define MPT_SG_REQ_96_SCALE 2 @@ -510,10 +510,9 @@ struct mptfc_rport_info { struct list_head list; struct fc_rport *rport; - struct scsi_target *starget; + VirtDevice *vdev; FCDevicePage0_t pg0; u8 flags; - u8 remap_needed; }; /* @@ -632,7 +631,6 @@ typedef struct _MPT_ADAPTER struct mutex sas_topology_mutex; MPT_SAS_MGMT sas_mgmt; int num_ports; - struct work_struct mptscsih_persistTask; struct list_head fc_rports; spinlock_t fc_rport_lock; /* list and ri flags */ @@ -805,12 +803,6 @@ typedef struct _mpt_sge { #define dreplyprintk(x) #endif -#ifdef DMPT_DEBUG_FC -#define dfcprintk(x) printk x -#else -#define dfcprintk(x) -#endif - #ifdef MPT_DEBUG_TM #define dtmprintk(x) printk x #define DBG_DUMP_TM_REQUEST_FRAME(mfp) \ diff --git a/trunk/drivers/message/fusion/mptfc.c b/trunk/drivers/message/fusion/mptfc.c index c3a3499bce2a..b102c7666d0e 100644 --- a/trunk/drivers/message/fusion/mptfc.c +++ b/trunk/drivers/message/fusion/mptfc.c @@ -93,11 +93,10 @@ static int mptfcDoneCtx = -1; static int mptfcTaskCtx = -1; static int mptfcInternalCtx = -1; /* Used only for internal commands */ -static int mptfc_target_alloc(struct scsi_target *starget); -static int mptfc_slave_alloc(struct scsi_device *sdev); +int mptfc_slave_alloc(struct scsi_device *device); static int mptfc_qcmd(struct scsi_cmnd *SCpnt, - void (*done)(struct scsi_cmnd *)); -static void mptfc_target_destroy(struct scsi_target *starget); + void (*done)(struct scsi_cmnd *)); + static void mptfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout); static void __devexit mptfc_remove(struct pci_dev *pdev); @@ -108,10 +107,10 @@ static struct scsi_host_template mptfc_driver_template = { .name = "MPT FC Host", .info = mptscsih_info, .queuecommand = mptfc_qcmd, - .target_alloc = mptfc_target_alloc, + .target_alloc = mptscsih_target_alloc, .slave_alloc = mptfc_slave_alloc, .slave_configure = mptscsih_slave_configure, - .target_destroy = mptfc_target_destroy, + .target_destroy = mptscsih_target_destroy, .slave_destroy = mptscsih_slave_destroy, .change_queue_depth = mptscsih_change_queue_depth, .eh_abort_handler = mptscsih_abort, @@ -348,34 +347,15 @@ mptfc_generate_rport_ids(FCDevicePage0_t *pg0, struct fc_rport_identifiers *rid) return 0; } -static void -mptfc_remap_sdev(struct scsi_device *sdev, void *arg) -{ - VirtDevice *vdev; - VirtTarget *vtarget; - struct scsi_target *starget; - - starget = scsi_target(sdev); - if (starget->hostdata == arg) { - vtarget = arg; - vdev = sdev->hostdata; - if (vdev) { - vdev->bus_id = vtarget->bus_id; - vdev->target_id = vtarget->target_id; - } - } -} - static void mptfc_register_dev(MPT_ADAPTER *ioc, int channel, FCDevicePage0_t *pg0) { struct fc_rport_identifiers rport_ids; struct fc_rport *rport; struct mptfc_rport_info *ri; - int new_ri = 1; - u64 pn; + int match = 0; + u64 port_name; unsigned long flags; - VirtTarget *vtarget; if (mptfc_generate_rport_ids(pg0, &rport_ids) < 0) return; @@ -383,14 +363,14 @@ mptfc_register_dev(MPT_ADAPTER *ioc, int channel, FCDevicePage0_t *pg0) /* scan list looking for a match */ spin_lock_irqsave(&ioc->fc_rport_lock, flags); list_for_each_entry(ri, &ioc->fc_rports, list) { - pn = (u64)ri->pg0.WWPN.High << 32 | (u64)ri->pg0.WWPN.Low; - if (pn == rport_ids.port_name) { /* match */ + port_name = (u64)ri->pg0.WWPN.High << 32 | (u64)ri->pg0.WWPN.Low; + if (port_name == rport_ids.port_name) { /* match */ list_move_tail(&ri->list, &ioc->fc_rports); - new_ri = 0; + match = 1; break; } } - if (new_ri) { /* allocate one */ + if (!match) { /* allocate one */ spin_unlock_irqrestore(&ioc->fc_rport_lock, flags); ri = kzalloc(sizeof(struct mptfc_rport_info), GFP_KERNEL); if (!ri) @@ -402,43 +382,40 @@ mptfc_register_dev(MPT_ADAPTER *ioc, int channel, FCDevicePage0_t *pg0) ri->pg0 = *pg0; /* add/update pg0 data */ ri->flags &= ~MPT_RPORT_INFO_FLAGS_MISSING; - /* MPT_RPORT_INFO_FLAGS_REGISTERED - rport not previously deleted */ if (!(ri->flags & MPT_RPORT_INFO_FLAGS_REGISTERED)) { ri->flags |= MPT_RPORT_INFO_FLAGS_REGISTERED; spin_unlock_irqrestore(&ioc->fc_rport_lock, flags); - rport = fc_remote_port_add(ioc->sh, channel, &rport_ids); + rport = fc_remote_port_add(ioc->sh,channel, &rport_ids); spin_lock_irqsave(&ioc->fc_rport_lock, flags); if (rport) { - ri->rport = rport; - if (new_ri) /* may have been reset by user */ - rport->dev_loss_tmo = mptfc_dev_loss_tmo; - *((struct mptfc_rport_info **)rport->dd_data) = ri; + if (*((struct mptfc_rport_info **)rport->dd_data) != ri) { + ri->flags &= ~MPT_RPORT_INFO_FLAGS_MAPPED_VDEV; + ri->vdev = NULL; + ri->rport = rport; + *((struct mptfc_rport_info **)rport->dd_data) = ri; + } + rport->dev_loss_tmo = mptfc_dev_loss_tmo; /* * if already mapped, remap here. If not mapped, - * target_alloc will allocate vtarget and map, - * slave_alloc will fill in vdev from vtarget. + * slave_alloc will allocate vdev and map */ - if (ri->starget) { - vtarget = ri->starget->hostdata; - if (vtarget) { - vtarget->target_id = pg0->CurrentTargetID; - vtarget->bus_id = pg0->CurrentBus; - starget_for_each_device(ri->starget, - vtarget,mptfc_remap_sdev); - } - ri->remap_needed = 0; + if (ri->flags & MPT_RPORT_INFO_FLAGS_MAPPED_VDEV) { + ri->vdev->target_id = ri->pg0.CurrentTargetID; + ri->vdev->bus_id = ri->pg0.CurrentBus; + ri->vdev->vtarget->target_id = ri->vdev->target_id; + ri->vdev->vtarget->bus_id = ri->vdev->bus_id; } - dfcprintk ((MYIOC_s_INFO_FMT - "mptfc_reg_dev.%d: %x, %llx / %llx, tid %d, " + #ifdef MPT_DEBUG + printk ("mptfc_reg_dev.%d: %x, %llx / %llx, tid %d, " "rport tid %d, tmo %d\n", - ioc->name, - oc->sh->host_no, + ioc->sh->host_no, pg0->PortIdentifier, pg0->WWNN, pg0->WWPN, pg0->CurrentTargetID, ri->rport->scsi_target_id, - ri->rport->dev_loss_tmo)); + ri->rport->dev_loss_tmo); + #endif } else { list_del(&ri->list); kfree(ri); @@ -449,65 +426,6 @@ mptfc_register_dev(MPT_ADAPTER *ioc, int channel, FCDevicePage0_t *pg0) } -/* - * OS entry point to allow for host driver to free allocated memory - * Called if no device present or device being unloaded - */ -static void -mptfc_target_destroy(struct scsi_target *starget) -{ - struct fc_rport *rport; - struct mptfc_rport_info *ri; - - rport = starget_to_rport(starget); - if (rport) { - ri = *((struct mptfc_rport_info **)rport->dd_data); - if (ri) /* better be! */ - ri->starget = NULL; - } - if (starget->hostdata) - kfree(starget->hostdata); - starget->hostdata = NULL; -} - -/* - * OS entry point to allow host driver to alloc memory - * for each scsi target. Called once per device the bus scan. - * Return non-zero if allocation fails. - */ -static int -mptfc_target_alloc(struct scsi_target *starget) -{ - VirtTarget *vtarget; - struct fc_rport *rport; - struct mptfc_rport_info *ri; - int rc; - - vtarget = kzalloc(sizeof(VirtTarget), GFP_KERNEL); - if (!vtarget) - return -ENOMEM; - starget->hostdata = vtarget; - - rc = -ENODEV; - rport = starget_to_rport(starget); - if (rport) { - ri = *((struct mptfc_rport_info **)rport->dd_data); - if (ri) { /* better be! */ - vtarget->target_id = ri->pg0.CurrentTargetID; - vtarget->bus_id = ri->pg0.CurrentBus; - ri->starget = starget; - ri->remap_needed = 0; - rc = 0; - } - } - if (rc != 0) { - kfree(vtarget); - starget->hostdata = NULL; - } - - return rc; -} - /* * OS entry point to allow host driver to alloc memory * for each scsi device. Called once per device the bus scan. @@ -522,6 +440,7 @@ mptfc_slave_alloc(struct scsi_device *sdev) VirtDevice *vdev; struct scsi_target *starget; struct fc_rport *rport; + struct mptfc_rport_info *ri; unsigned long flags; @@ -532,44 +451,55 @@ mptfc_slave_alloc(struct scsi_device *sdev) hd = (MPT_SCSI_HOST *)sdev->host->hostdata; - vdev = kzalloc(sizeof(VirtDevice), GFP_KERNEL); + vdev = kmalloc(sizeof(VirtDevice), GFP_KERNEL); if (!vdev) { printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n", hd->ioc->name, sizeof(VirtDevice)); return -ENOMEM; } + memset(vdev, 0, sizeof(VirtDevice)); spin_lock_irqsave(&hd->ioc->fc_rport_lock,flags); + if (!(ri = *((struct mptfc_rport_info **)rport->dd_data))) { + spin_unlock_irqrestore(&hd->ioc->fc_rport_lock,flags); + kfree(vdev); + return -ENODEV; + } + sdev->hostdata = vdev; starget = scsi_target(sdev); vtarget = starget->hostdata; - if (vtarget->num_luns == 0) { - vtarget->ioc_id = hd->ioc->id; vtarget->tflags = MPT_TARGET_FLAGS_Q_YES | MPT_TARGET_FLAGS_VALID_INQUIRY; hd->Targets[sdev->id] = vtarget; } + vtarget->target_id = vdev->target_id; + vtarget->bus_id = vdev->bus_id; + vdev->vtarget = vtarget; vdev->ioc_id = hd->ioc->id; vdev->lun = sdev->lun; - vdev->target_id = vtarget->target_id; - vdev->bus_id = vtarget->bus_id; + vdev->target_id = ri->pg0.CurrentTargetID; + vdev->bus_id = ri->pg0.CurrentBus; + + ri->flags |= MPT_RPORT_INFO_FLAGS_MAPPED_VDEV; + ri->vdev = vdev; spin_unlock_irqrestore(&hd->ioc->fc_rport_lock,flags); vtarget->num_luns++; - dfcprintk ((MYIOC_s_INFO_FMT - "mptfc_slv_alloc.%d: num_luns %d, sdev.id %d, " +#ifdef MPT_DEBUG + printk ("mptfc_slv_alloc.%d: num_luns %d, sdev.id %d, " "CurrentTargetID %d, %x %llx %llx\n", - ioc->name, - sdev->host->host_no, - vtarget->num_luns, - sdev->id, ri->pg0.CurrentTargetID, - ri->pg0.PortIdentifier, ri->pg0.WWPN, ri->pg0.WWNN)); + sdev->host->host_no, + vtarget->num_luns, + sdev->id, ri->pg0.CurrentTargetID, + ri->pg0.PortIdentifier, ri->pg0.WWPN, ri->pg0.WWNN); +#endif return 0; } @@ -577,7 +507,6 @@ mptfc_slave_alloc(struct scsi_device *sdev) static int mptfc_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) { - struct mptfc_rport_info *ri; struct fc_rport *rport = starget_to_rport(scsi_target(SCpnt->device)); int err; @@ -587,10 +516,6 @@ mptfc_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) done(SCpnt); return 0; } - ri = *((struct mptfc_rport_info **)rport->dd_data); - if (unlikely(ri->remap_needed)) - return SCSI_MLQUEUE_HOST_BUSY; - return mptscsih_qcmd(SCpnt,done); } @@ -666,20 +591,16 @@ mptfc_rescan_devices(void *arg) ri->flags &= ~(MPT_RPORT_INFO_FLAGS_REGISTERED| MPT_RPORT_INFO_FLAGS_MISSING); - ri->remap_needed = 1; fc_remote_port_delete(ri->rport); /* * remote port not really deleted 'cause * binding is by WWPN and driver only - * registers FCP_TARGETs but cannot trust - * data structures. + * registers FCP_TARGETs */ - ri->rport = NULL; - dfcprintk ((MYIOC_s_INFO_FMT - "mptfc_rescan.%d: %llx deleted\n", - ioc->name, - ioc->sh->host_no, - ri->pg0.WWPN)); + #ifdef MPT_DEBUG + printk ("mptfc_rescan.%d: %llx deleted\n", + ioc->sh->host_no, ri->pg0.WWPN); + #endif } } spin_unlock_irqrestore(&ioc->fc_rport_lock,flags); @@ -951,8 +872,9 @@ mptfc_init(void) } error = pci_register_driver(&mptfc_driver); - if (error) + if (error) { fc_release_transport(mptfc_transport_template); + } return error; } @@ -963,8 +885,7 @@ mptfc_init(void) * @pdev: Pointer to pci_dev structure * */ -static void __devexit -mptfc_remove(struct pci_dev *pdev) +static void __devexit mptfc_remove(struct pci_dev *pdev) { MPT_ADAPTER *ioc = pci_get_drvdata(pdev); struct mptfc_rport_info *p, *n; diff --git a/trunk/drivers/message/fusion/mptsas.c b/trunk/drivers/message/fusion/mptsas.c index 2512d0e6155e..5a06d8d8694e 100644 --- a/trunk/drivers/message/fusion/mptsas.c +++ b/trunk/drivers/message/fusion/mptsas.c @@ -89,8 +89,6 @@ static int mptsasMgmtCtx = -1; enum mptsas_hotplug_action { MPTSAS_ADD_DEVICE, MPTSAS_DEL_DEVICE, - MPTSAS_ADD_RAID, - MPTSAS_DEL_RAID, }; struct mptsas_hotplug_event { @@ -116,7 +114,6 @@ struct mptsas_hotplug_event { struct mptsas_devinfo { u16 handle; /* unique id to address this device */ - u16 handle_parent; /* unique id to address parent device */ u8 phy_id; /* phy number of parent device */ u8 port_id; /* sas physical port this device is assoc'd with */ @@ -304,8 +301,9 @@ mptsas_slave_alloc(struct scsi_device *sdev) } mutex_unlock(&hd->ioc->sas_topology_mutex); + printk("No matching SAS device found!!\n"); kfree(vdev); - return -ENXIO; + return -ENODEV; out: vtarget->ioc_id = vdev->ioc_id; @@ -323,7 +321,6 @@ mptsas_slave_destroy(struct scsi_device *sdev) struct sas_rphy *rphy; struct mptsas_portinfo *p; int i; - VirtDevice *vdev; /* * Handle hotplug removal case. @@ -347,29 +344,8 @@ mptsas_slave_destroy(struct scsi_device *sdev) out: mutex_unlock(&hd->ioc->sas_topology_mutex); /* - * Issue target reset to flush firmware outstanding commands. + * TODO: Issue target reset to flush firmware outstanding commands. */ - vdev = sdev->hostdata; - if (vdev->configured_lun){ - if (mptscsih_TMHandler(hd, - MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET, - vdev->bus_id, - vdev->target_id, - 0, 0, 5 /* 5 second timeout */) - < 0){ - - /* The TM request failed! - * Fatal error case. - */ - printk(MYIOC_s_WARN_FMT - "Error processing TaskMgmt id=%d TARGET_RESET\n", - hd->ioc->name, - vdev->target_id); - - hd->tmPending = 0; - hd->tmState = TM_STATE_NONE; - } - } mptscsih_slave_destroy(sdev); } @@ -738,7 +714,6 @@ mptsas_sas_device_pg0(MPT_ADAPTER *ioc, struct mptsas_devinfo *device_info, mptsas_print_device_pg0(buffer); device_info->handle = le16_to_cpu(buffer->DevHandle); - device_info->handle_parent = le16_to_cpu(buffer->ParentDevHandle); device_info->phy_id = buffer->PhyNum; device_info->port_id = buffer->PhysicalPort; device_info->id = buffer->TargetID; @@ -888,26 +863,6 @@ mptsas_sas_expander_pg1(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info, return error; } -/* - * Returns true if there is a scsi end device - */ -static inline int -mptsas_is_end_device(struct mptsas_devinfo * attached) -{ - if ((attached->handle) && - (attached->device_info & - MPI_SAS_DEVICE_INFO_END_DEVICE) && - ((attached->device_info & - MPI_SAS_DEVICE_INFO_SSP_TARGET) | - (attached->device_info & - MPI_SAS_DEVICE_INFO_STP_TARGET) | - (attached->device_info & - MPI_SAS_DEVICE_INFO_SATA_DEVICE))) - return 1; - else - return 0; -} - static void mptsas_parse_device_info(struct sas_identify *identify, struct mptsas_devinfo *device_info) @@ -1272,7 +1227,7 @@ mptsas_find_phyinfo_by_parent(MPT_ADAPTER *ioc, u16 parent_handle, u8 phy_id) } static struct mptsas_phyinfo * -mptsas_find_phyinfo_by_target(MPT_ADAPTER *ioc, u32 id) +mptsas_find_phyinfo_by_handle(MPT_ADAPTER *ioc, u16 handle) { struct mptsas_portinfo *port_info; struct mptsas_phyinfo *phy_info = NULL; @@ -1284,12 +1239,12 @@ mptsas_find_phyinfo_by_target(MPT_ADAPTER *ioc, u32 id) */ mutex_lock(&ioc->sas_topology_mutex); list_for_each_entry(port_info, &ioc->sas_topology, list) { - for (i = 0; i < port_info->num_phys; i++) - if (mptsas_is_end_device(&port_info->phy_info[i].attached)) - if (port_info->phy_info[i].attached.id == id) { - phy_info = &port_info->phy_info[i]; - break; - } + for (i = 0; i < port_info->num_phys; i++) { + if (port_info->phy_info[i].attached.handle == handle) { + phy_info = &port_info->phy_info[i]; + break; + } + } } mutex_unlock(&ioc->sas_topology_mutex); @@ -1303,58 +1258,36 @@ mptsas_hotplug_work(void *arg) MPT_ADAPTER *ioc = ev->ioc; struct mptsas_phyinfo *phy_info; struct sas_rphy *rphy; - struct scsi_device *sdev; char *ds = NULL; - struct mptsas_devinfo sas_device; + + if (ev->device_info & MPI_SAS_DEVICE_INFO_SSP_TARGET) + ds = "ssp"; + if (ev->device_info & MPI_SAS_DEVICE_INFO_STP_TARGET) + ds = "stp"; + if (ev->device_info & MPI_SAS_DEVICE_INFO_SATA_DEVICE) + ds = "sata"; switch (ev->event_type) { case MPTSAS_DEL_DEVICE: + printk(MYIOC_s_INFO_FMT + "removing %s device, channel %d, id %d, phy %d\n", + ioc->name, ds, ev->channel, ev->id, ev->phy_id); - phy_info = mptsas_find_phyinfo_by_target(ioc, ev->id); + phy_info = mptsas_find_phyinfo_by_handle(ioc, ev->handle); if (!phy_info) { printk("mptsas: remove event for non-existant PHY.\n"); break; } - if (phy_info->attached.device_info & MPI_SAS_DEVICE_INFO_SSP_TARGET) - ds = "ssp"; - if (phy_info->attached.device_info & MPI_SAS_DEVICE_INFO_STP_TARGET) - ds = "stp"; - if (phy_info->attached.device_info & MPI_SAS_DEVICE_INFO_SATA_DEVICE) - ds = "sata"; - - printk(MYIOC_s_INFO_FMT - "removing %s device, channel %d, id %d, phy %d\n", - ioc->name, ds, ev->channel, ev->id, phy_info->phy_id); - if (phy_info->rphy) { sas_rphy_delete(phy_info->rphy); phy_info->rphy = NULL; } break; case MPTSAS_ADD_DEVICE: - - /* - * When there is no sas address, - * RAID volumes are being deleted, - * and hidden phy disk are being added. - * We don't know the SAS data yet, - * so lookup sas device page to get - * pertaining info - */ - if (!ev->sas_address) { - if (mptsas_sas_device_pg0(ioc, - &sas_device, ev->id, - (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID << - MPI_SAS_DEVICE_PGAD_FORM_SHIFT))) - break; - ev->handle = sas_device.handle; - ev->parent_handle = sas_device.handle_parent; - ev->channel = sas_device.channel; - ev->phy_id = sas_device.phy_id; - ev->sas_address = sas_device.sas_address; - ev->device_info = sas_device.device_info; - } + printk(MYIOC_s_INFO_FMT + "attaching %s device, channel %d, id %d, phy %d\n", + ioc->name, ds, ev->channel, ev->id, ev->phy_id); phy_info = mptsas_find_phyinfo_by_parent(ioc, ev->parent_handle, ev->phy_id); @@ -1377,23 +1310,10 @@ mptsas_hotplug_work(void *arg) phy_info->attached.sas_address = ev->sas_address; phy_info->attached.device_info = ev->device_info; - if (phy_info->attached.device_info & MPI_SAS_DEVICE_INFO_SSP_TARGET) - ds = "ssp"; - if (phy_info->attached.device_info & MPI_SAS_DEVICE_INFO_STP_TARGET) - ds = "stp"; - if (phy_info->attached.device_info & MPI_SAS_DEVICE_INFO_SATA_DEVICE) - ds = "sata"; - - printk(MYIOC_s_INFO_FMT - "attaching %s device, channel %d, id %d, phy %d\n", - ioc->name, ds, ev->channel, ev->id, ev->phy_id); - - rphy = sas_rphy_alloc(phy_info->phy); if (!rphy) break; /* non-fatal: an rphy can be added later */ - rphy->scsi_target_id = phy_info->attached.id; mptsas_parse_device_info(&rphy->identify, &phy_info->attached); if (sas_rphy_add(rphy)) { sas_rphy_free(rphy); @@ -1402,40 +1322,6 @@ mptsas_hotplug_work(void *arg) phy_info->rphy = rphy; break; - case MPTSAS_ADD_RAID: - sdev = scsi_device_lookup( - ioc->sh, - ioc->num_ports, - ev->id, - 0); - if (sdev) { - scsi_device_put(sdev); - break; - } - printk(MYIOC_s_INFO_FMT - "attaching device, channel %d, id %d\n", - ioc->name, ioc->num_ports, ev->id); - scsi_add_device(ioc->sh, - ioc->num_ports, - ev->id, - 0); - mpt_findImVolumes(ioc); - break; - case MPTSAS_DEL_RAID: - sdev = scsi_device_lookup( - ioc->sh, - ioc->num_ports, - ev->id, - 0); - if (!sdev) - break; - printk(MYIOC_s_INFO_FMT - "removing device, channel %d, id %d\n", - ioc->name, ioc->num_ports, ev->id); - scsi_remove_device(sdev); - scsi_device_put(sdev); - mpt_findImVolumes(ioc); - break; } kfree(ev); @@ -1486,94 +1372,23 @@ mptscsih_send_sas_event(MPT_ADAPTER *ioc, schedule_work(&ev->work); } -static void -mptscsih_send_raid_event(MPT_ADAPTER *ioc, - EVENT_DATA_RAID *raid_event_data) -{ - struct mptsas_hotplug_event *ev; - RAID_VOL0_STATUS * volumeStatus; - - if (ioc->bus_type != SAS) - return; - - ev = kmalloc(sizeof(*ev), GFP_ATOMIC); - if (!ev) { - printk(KERN_WARNING "mptsas: lost hotplug event\n"); - return; - } - - memset(ev,0,sizeof(struct mptsas_hotplug_event)); - INIT_WORK(&ev->work, mptsas_hotplug_work, ev); - ev->ioc = ioc; - ev->id = raid_event_data->VolumeID; - - switch (raid_event_data->ReasonCode) { - case MPI_EVENT_RAID_RC_PHYSDISK_DELETED: - ev->event_type = MPTSAS_ADD_DEVICE; - break; - case MPI_EVENT_RAID_RC_PHYSDISK_CREATED: - ev->event_type = MPTSAS_DEL_DEVICE; - break; - case MPI_EVENT_RAID_RC_VOLUME_DELETED: - ev->event_type = MPTSAS_DEL_RAID; - break; - case MPI_EVENT_RAID_RC_VOLUME_CREATED: - ev->event_type = MPTSAS_ADD_RAID; - break; - case MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED: - volumeStatus = (RAID_VOL0_STATUS *) & - raid_event_data->SettingsStatus; - ev->event_type = (volumeStatus->State == - MPI_RAIDVOL0_STATUS_STATE_FAILED) ? - MPTSAS_DEL_RAID : MPTSAS_ADD_RAID; - break; - default: - break; - } - schedule_work(&ev->work); -} - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/* work queue thread to clear the persitency table */ -static void -mptscsih_sas_persist_clear_table(void * arg) -{ - MPT_ADAPTER *ioc = (MPT_ADAPTER *)arg; - - mptbase_sas_persist_operation(ioc, MPI_SAS_OP_CLEAR_NOT_PRESENT); -} - static int mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply) { - int rc=1; u8 event = le32_to_cpu(reply->Event) & 0xFF; if (!ioc->sh) - goto out; + return 1; switch (event) { case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE: mptscsih_send_sas_event(ioc, (EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *)reply->Data); - break; - case MPI_EVENT_INTEGRATED_RAID: - mptscsih_send_raid_event(ioc, - (EVENT_DATA_RAID *)reply->Data); - break; - case MPI_EVENT_PERSISTENT_TABLE_FULL: - INIT_WORK(&ioc->mptscsih_persistTask, - mptscsih_sas_persist_clear_table, - (void *)ioc); - schedule_work(&ioc->mptscsih_persistTask); - break; + return 1; /* currently means nothing really */ + default: - rc = mptscsih_event_process(ioc, reply); - break; + return mptscsih_event_process(ioc, reply); } - out: - - return rc; } static int diff --git a/trunk/drivers/message/fusion/mptscsih.c b/trunk/drivers/message/fusion/mptscsih.c index 05789e505464..cdac5578fdf2 100644 --- a/trunk/drivers/message/fusion/mptscsih.c +++ b/trunk/drivers/message/fusion/mptscsih.c @@ -144,6 +144,7 @@ static int mptscsih_tm_pending_wait(MPT_SCSI_HOST * hd); static int mptscsih_tm_wait_for_completion(MPT_SCSI_HOST * hd, ulong timeout ); static u32 SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc); +static int mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout); static int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout); int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset); @@ -158,9 +159,11 @@ static int mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd, int target_id, int bus); int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); static int mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTERNAL_CMD *iocmd); static void mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, VirtDevice *vdevice); -static void mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtDevice *vdevice); +static void mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtTarget *vtarget); static int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id); +static struct work_struct mptscsih_persistTask; + #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION static int mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 action, INTERNAL_CMD *io); static void mptscsih_domainValidation(void *hd); @@ -560,24 +563,11 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) MPT_SCSI_HOST *hd; SCSIIORequest_t *pScsiReq; SCSIIOReply_t *pScsiReply; - u16 req_idx, req_idx_MR; + u16 req_idx; hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); - req_idx_MR = (mr != NULL) ? - le16_to_cpu(mr->u.frame.hwhdr.msgctxu.fld.req_idx) : req_idx; - if ((req_idx != req_idx_MR) || - (mf->u.frame.linkage.arg1 == 0xdeadbeaf)) { - printk(MYIOC_s_ERR_FMT "Received a mf that was already freed\n", - ioc->name); - printk (MYIOC_s_ERR_FMT - "req_idx=%x req_idx_MR=%x mf=%p mr=%p sc=%p\n", - ioc->name, req_idx, req_idx_MR, mf, mr, - hd->ScsiLookup[req_idx_MR]); - return 0; - } - sc = hd->ScsiLookup[req_idx]; if (sc == NULL) { MPIHeader_t *hdr = (MPIHeader_t *)mf; @@ -740,8 +730,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) break; - case MPI_IOCSTATUS_SCSI_DATA_OVERRUN: /* 0x0044 */ - sc->resid=0; case MPI_IOCSTATUS_SCSI_RECOVERED_ERROR: /* 0x0040 */ case MPI_IOCSTATUS_SUCCESS: /* 0x0000 */ if (scsi_status == MPI_SCSI_STATUS_BUSY) @@ -801,6 +789,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) case MPI_IOCSTATUS_INSUFFICIENT_RESOURCES: /* 0x0006 */ case MPI_IOCSTATUS_INVALID_FIELD: /* 0x0007 */ case MPI_IOCSTATUS_INVALID_STATE: /* 0x0008 */ + case MPI_IOCSTATUS_SCSI_DATA_OVERRUN: /* 0x0044 */ case MPI_IOCSTATUS_SCSI_IO_DATA_ERROR: /* 0x0046 */ case MPI_IOCSTATUS_SCSI_TASK_MGMT_FAILED: /* 0x004A */ default: @@ -1541,7 +1530,7 @@ mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx) * * Returns 0 for SUCCESS or -1 if FAILED. */ -int +static int mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout) { MPT_ADAPTER *ioc; @@ -1732,20 +1721,6 @@ mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun return retval; } -static int -mptscsih_get_tm_timeout(MPT_ADAPTER *ioc) -{ - switch (ioc->bus_type) { - case FC: - return 40; - case SAS: - return 10; - case SPI: - default: - return 2; - } -} - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /** * mptscsih_abort - Abort linux scsi_cmnd routine, new_eh variant @@ -1817,7 +1792,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt) vdev = SCpnt->device->hostdata; retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK, vdev->bus_id, vdev->target_id, vdev->lun, - ctx2abort, mptscsih_get_tm_timeout(ioc)); + ctx2abort, 2 /* 2 second timeout */); printk (KERN_WARNING MYNAM ": %s: task abort: %s (sc=%p)\n", hd->ioc->name, @@ -1868,7 +1843,7 @@ mptscsih_dev_reset(struct scsi_cmnd * SCpnt) vdev = SCpnt->device->hostdata; retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET, vdev->bus_id, vdev->target_id, - 0, 0, mptscsih_get_tm_timeout(hd->ioc)); + 0, 0, 5 /* 5 second timeout */); printk (KERN_WARNING MYNAM ": %s: target reset: %s (sc=%p)\n", hd->ioc->name, @@ -1918,7 +1893,7 @@ mptscsih_bus_reset(struct scsi_cmnd * SCpnt) vdev = SCpnt->device->hostdata; retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS, - vdev->bus_id, 0, 0, 0, mptscsih_get_tm_timeout(hd->ioc)); + vdev->bus_id, 0, 0, 0, 5 /* 5 second timeout */); printk (KERN_WARNING MYNAM ": %s: bus reset: %s (sc=%p)\n", hd->ioc->name, @@ -2040,42 +2015,6 @@ mptscsih_tm_wait_for_completion(MPT_SCSI_HOST * hd, ulong timeout ) return status; } -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -static void -mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code) -{ - char *desc; - - switch (response_code) { - case MPI_SCSITASKMGMT_RSP_TM_COMPLETE: - desc = "The task completed."; - break; - case MPI_SCSITASKMGMT_RSP_INVALID_FRAME: - desc = "The IOC received an invalid frame status."; - break; - case MPI_SCSITASKMGMT_RSP_TM_NOT_SUPPORTED: - desc = "The task type is not supported."; - break; - case MPI_SCSITASKMGMT_RSP_TM_FAILED: - desc = "The requested task failed."; - break; - case MPI_SCSITASKMGMT_RSP_TM_SUCCEEDED: - desc = "The task completed successfully."; - break; - case MPI_SCSITASKMGMT_RSP_TM_INVALID_LUN: - desc = "The LUN request is invalid."; - break; - case MPI_SCSITASKMGMT_RSP_IO_QUEUED_ON_IOC: - desc = "The task is in the IOC queue and has not been sent to target."; - break; - default: - desc = "unknown"; - break; - } - printk(MYIOC_s_INFO_FMT "Response Code(0x%08x): F/W: %s\n", - ioc->name, response_code, desc); -} - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /** * mptscsih_taskmgmt_complete - Registered with Fusion MPT base driver @@ -2125,11 +2064,6 @@ mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *m /* Figure out if this was ABORT_TASK, TARGET_RESET, or BUS_RESET! */ tmType = pScsiTmReq->TaskType; - if (ioc->facts.MsgVersion >= MPI_VERSION_01_05 && - pScsiTmReply->ResponseCode) - mptscsih_taskmgmt_response_code(ioc, - pScsiTmReply->ResponseCode); - dtmprintk((MYIOC_s_WARN_FMT " TaskType = %d, TerminationCount=%d\n", ioc->name, tmType, le32_to_cpu(pScsiTmReply->TerminationCount))); DBG_DUMP_TM_REPLY_FRAME((u32 *)pScsiTmReply); @@ -2321,7 +2255,7 @@ mptscsih_slave_destroy(struct scsi_device *sdev) vtarget->luns[0] &= ~(1 << vdevice->lun); vtarget->num_luns--; if (vtarget->num_luns == 0) { - mptscsih_negotiate_to_asyn_narrow(hd, vdevice); + mptscsih_negotiate_to_asyn_narrow(hd, vtarget); if (hd->ioc->bus_type == SPI) { if (mptscsih_is_phys_disk(hd->ioc, vtarget->target_id)) { hd->ioc->spi_data.forceDv |= MPT_SCSICFG_RELOAD_IOC_PG3; @@ -2650,6 +2584,16 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) return 1; /* currently means nothing really */ } +/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ +/* work queue thread to clear the persitency table */ +static void +mptscsih_sas_persist_clear_table(void * arg) +{ + MPT_ADAPTER *ioc = (MPT_ADAPTER *)arg; + + mptbase_sas_persist_operation(ioc, MPI_SAS_OP_CLEAR_NOT_PRESENT); +} + /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) @@ -2712,6 +2656,13 @@ mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) break; } + /* Persistent table is full. */ + case MPI_EVENT_PERSISTENT_TABLE_FULL: + INIT_WORK(&mptscsih_persistTask, + mptscsih_sas_persist_clear_table,(void *)ioc); + schedule_work(&mptscsih_persistTask); + break; + case MPI_EVENT_NONE: /* 00 */ case MPI_EVENT_LOG_DATA: /* 01 */ case MPI_EVENT_STATE_CHANGE: /* 02 */ @@ -3912,9 +3863,8 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTERNAL_CMD *io) * */ static void -mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtDevice *vdevice) +mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtTarget *vtarget) { - VirtTarget *vtarget = vdevice->vtarget; MPT_ADAPTER *ioc= hd->ioc; SCSIDevicePage1_t *pcfg1Data; CONFIGPARMS cfg; @@ -3924,8 +3874,7 @@ mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtDevice *vdevice) int requested, configuration, data,i; u8 flags, factor; - if ((ioc->bus_type != SPI) || - (!vdevice->configured_lun)) + if (ioc->bus_type != SPI) return; if (!ioc->spi_data.sdp1length) @@ -3961,7 +3910,7 @@ mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtDevice *vdevice) } mptscsih_setDevicePage1Flags(0, MPT_ASYNC, 0, &requested, &configuration, flags); - dnegoprintk(("nego asyn narrow: id=%d width=0 factor=MPT_ASYNC " + dnegoprintk(("syncronize cache: id=%d width=0 factor=MPT_ASYNC " "offset=0 negoFlags=%x request=%x config=%x\n", id, flags, requested, configuration)); pcfg1Data->RequestedParameters = cpu_to_le32(requested); @@ -3974,7 +3923,7 @@ mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtDevice *vdevice) flags = vtarget->negoFlags; mptscsih_setDevicePage1Flags(0, MPT_ASYNC, 0, &requested, &configuration, flags); - dnegoprintk(("nego asyn narrow: id=%d width=0 factor=MPT_ASYNC " + dnegoprintk(("syncronize cache: id=%d width=0 factor=MPT_ASYNC " "offset=0 negoFlags=%x request=%x config=%x\n", vtarget->target_id, flags, requested, configuration)); pcfg1Data->RequestedParameters = cpu_to_le32(requested); @@ -5671,6 +5620,5 @@ EXPORT_SYMBOL(mptscsih_event_process); EXPORT_SYMBOL(mptscsih_ioc_reset); EXPORT_SYMBOL(mptscsih_change_queue_depth); EXPORT_SYMBOL(mptscsih_timer_expired); -EXPORT_SYMBOL(mptscsih_TMHandler); /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ diff --git a/trunk/drivers/message/fusion/mptscsih.h b/trunk/drivers/message/fusion/mptscsih.h index 44b248d51ea3..d3cba12f4bd9 100644 --- a/trunk/drivers/message/fusion/mptscsih.h +++ b/trunk/drivers/message/fusion/mptscsih.h @@ -108,4 +108,3 @@ extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pE extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset); extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth); extern void mptscsih_timer_expired(unsigned long data); -extern int mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout); diff --git a/trunk/drivers/message/fusion/mptspi.c b/trunk/drivers/message/fusion/mptspi.c index f148dfa39117..7dce29277cb7 100644 --- a/trunk/drivers/message/fusion/mptspi.c +++ b/trunk/drivers/message/fusion/mptspi.c @@ -384,14 +384,6 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id) goto out_mptspi_probe; } - /* - * issue internal bus reset - */ - if (ioc->spi_data.bus_reset) - mptscsih_TMHandler(hd, - MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS, - 0, 0, 0, 0, 5); - scsi_scan_host(sh); return 0; @@ -453,7 +445,7 @@ static void __exit mptspi_exit(void) { pci_unregister_driver(&mptspi_driver); - + mpt_reset_deregister(mptspiDoneCtx); dprintk((KERN_INFO MYNAM ": Deregistered for IOC reset notifications\n")); diff --git a/trunk/drivers/misc/ibmasm/uart.c b/trunk/drivers/misc/ibmasm/uart.c index 9783caf49696..7e98434cfa37 100644 --- a/trunk/drivers/misc/ibmasm/uart.c +++ b/trunk/drivers/misc/ibmasm/uart.c @@ -50,7 +50,7 @@ void ibmasm_register_uart(struct service_processor *sp) memset(&uport, 0, sizeof(struct uart_port)); uport.irq = sp->irq; uport.uartclk = 3686400; - uport.flags = UPF_SHARE_IRQ; + uport.flags = UPF_AUTOPROBE | UPF_SHARE_IRQ; uport.iotype = UPIO_MEM; uport.membase = iomem_base; diff --git a/trunk/drivers/net/Kconfig b/trunk/drivers/net/Kconfig index 6a6a08441804..626508afe1b1 100644 --- a/trunk/drivers/net/Kconfig +++ b/trunk/drivers/net/Kconfig @@ -2034,28 +2034,13 @@ config SKGE It does not support the link failover and network management features that "portable" vendor supplied sk98lin driver does. - This driver supports adapters based on the original Yukon chipset: - Marvell 88E8001, Belkin F5D5005, CNet GigaCard, DLink DGE-530T, - Linksys EG1032/EG1064, 3Com 3C940/3C940B, SysKonnect SK-9871/9872. - - It does not support the newer Yukon2 chipset: a separate driver, - sky2, is provided for Yukon2-based adapters. - - To compile this driver as a module, choose M here: the module - will be called skge. This is recommended. config SKY2 tristate "SysKonnect Yukon2 support (EXPERIMENTAL)" depends on PCI && EXPERIMENTAL select CRC32 ---help--- - This driver supports Gigabit Ethernet adapters based on the the - Marvell Yukon 2 chipset: - Marvell 88E8021/88E8022/88E8035/88E8036/88E8038/88E8050/88E8052/ - 88E8053/88E8055/88E8061/88E8062, SysKonnect SK-9E21D/SK-9S21 - - This driver does not support the original Yukon chipset: a seperate - driver, skge, is provided for Yukon-based adapters. + This driver support the Marvell Yukon 2 Gigabit Ethernet adapter. To compile this driver as a module, choose M here: the module will be called sky2. This is recommended. @@ -2065,15 +2050,8 @@ config SK98LIN depends on PCI ---help--- Say Y here if you have a Marvell Yukon or SysKonnect SK-98xx/SK-95xx - compliant Gigabit Ethernet Adapter. - - This driver supports the original Yukon chipset. A cleaner driver is - also available (skge) which seems to work better than this one. - - This driver does not support the newer Yukon2 chipset. A seperate - driver, sky2, is provided to support Yukon2-based adapters. - - The following adapters are supported by this driver: + compliant Gigabit Ethernet Adapter. The following adapters are supported + by this driver: - 3Com 3C940 Gigabit LOM Ethernet Adapter - 3Com 3C941 Gigabit LOM Ethernet Adapter - Allied Telesyn AT-2970LX Gigabit Ethernet Adapter diff --git a/trunk/drivers/net/acenic.c b/trunk/drivers/net/acenic.c index b508812e97ac..b8953de5664a 100644 --- a/trunk/drivers/net/acenic.c +++ b/trunk/drivers/net/acenic.c @@ -1002,8 +1002,6 @@ static int __devinit ace_init(struct net_device *dev) mac1 = 0; for(i = 0; i < 4; i++) { - int tmp; - mac1 = mac1 << 8; tmp = read_eeprom_byte(dev, 0x8c+i); if (tmp < 0) { @@ -1014,8 +1012,6 @@ static int __devinit ace_init(struct net_device *dev) } mac2 = 0; for(i = 4; i < 8; i++) { - int tmp; - mac2 = mac2 << 8; tmp = read_eeprom_byte(dev, 0x8c+i); if (tmp < 0) { diff --git a/trunk/drivers/net/b44.c b/trunk/drivers/net/b44.c index c3267e4e1bb0..df9d6e80c4f2 100644 --- a/trunk/drivers/net/b44.c +++ b/trunk/drivers/net/b44.c @@ -1399,6 +1399,7 @@ static int b44_open(struct net_device *dev) b44_init_rings(bp); b44_init_hw(bp); + netif_carrier_off(dev); b44_check_phy(bp); err = request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev); @@ -1463,7 +1464,7 @@ static int b44_close(struct net_device *dev) #endif b44_halt(bp); b44_free_rings(bp); - netif_carrier_off(dev); + netif_carrier_off(bp->dev); spin_unlock_irq(&bp->lock); @@ -1999,8 +2000,6 @@ static int __devinit b44_init_one(struct pci_dev *pdev, dev->irq = pdev->irq; SET_ETHTOOL_OPS(dev, &b44_ethtool_ops); - netif_carrier_off(dev); - err = b44_get_invariants(bp); if (err) { printk(KERN_ERR PFX "Problem fetching invariants of chip, " diff --git a/trunk/drivers/net/bonding/bond_main.c b/trunk/drivers/net/bonding/bond_main.c index 4ff006c37626..2582d98ef5c3 100644 --- a/trunk/drivers/net/bonding/bond_main.c +++ b/trunk/drivers/net/bonding/bond_main.c @@ -576,7 +576,7 @@ static int bond_update_speed_duplex(struct slave *slave) slave->duplex = DUPLEX_FULL; if (slave_dev->ethtool_ops) { - int res; + u32 res; if (!slave_dev->ethtool_ops->get_settings) { return -1; diff --git a/trunk/drivers/net/mv643xx_eth.c b/trunk/drivers/net/mv643xx_eth.c index 7ef4b0434a3f..40ae36b20c9d 100644 --- a/trunk/drivers/net/mv643xx_eth.c +++ b/trunk/drivers/net/mv643xx_eth.c @@ -444,7 +444,6 @@ static int mv643xx_eth_receive_queue(struct net_device *dev) netif_rx(skb); #endif } - dev->last_rx = jiffies; } return received_packets; @@ -462,7 +461,7 @@ static int mv643xx_eth_receive_queue(struct net_device *dev) */ static irqreturn_t mv643xx_eth_int_handler(int irq, void *dev_id, - struct pt_regs *regs) + struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; struct mv643xx_private *mp = netdev_priv(dev); @@ -1048,15 +1047,16 @@ static int mv643xx_poll(struct net_device *dev, int *budget) static inline unsigned int has_tiny_unaligned_frags(struct sk_buff *skb) { - unsigned int frag; - skb_frag_t *fragp; + unsigned int frag; + skb_frag_t *fragp; - for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) { - fragp = &skb_shinfo(skb)->frags[frag]; - if (fragp->size <= 8 && fragp->page_offset & 0x7) - return 1; - } - return 0; + for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) { + fragp = &skb_shinfo(skb)->frags[frag]; + if (fragp->size <= 8 && fragp->page_offset & 0x7) + return 1; + + } + return 0; } @@ -2137,26 +2137,26 @@ static void eth_port_set_multicast_list(struct net_device *dev) */ if ((dev->flags & IFF_PROMISC) || (dev->flags & IFF_ALLMULTI)) { for (table_index = 0; table_index <= 0xFC; table_index += 4) { - /* Set all entries in DA filter special multicast - * table (Ex_dFSMT) - * Set for ETH_Q0 for now - * Bits - * 0 Accept=1, Drop=0 - * 3-1 Queue ETH_Q0=0 - * 7-4 Reserved = 0; - */ - mv_write(MV643XX_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101); - - /* Set all entries in DA filter other multicast - * table (Ex_dFOMT) - * Set for ETH_Q0 for now - * Bits - * 0 Accept=1, Drop=0 - * 3-1 Queue ETH_Q0=0 - * 7-4 Reserved = 0; - */ - mv_write(MV643XX_ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101); - } + /* Set all entries in DA filter special multicast + * table (Ex_dFSMT) + * Set for ETH_Q0 for now + * Bits + * 0 Accept=1, Drop=0 + * 3-1 Queue ETH_Q0=0 + * 7-4 Reserved = 0; + */ + mv_write(MV643XX_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101); + + /* Set all entries in DA filter other multicast + * table (Ex_dFOMT) + * Set for ETH_Q0 for now + * Bits + * 0 Accept=1, Drop=0 + * 3-1 Queue ETH_Q0=0 + * 7-4 Reserved = 0; + */ + mv_write(MV643XX_ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101); + } return; } @@ -2617,6 +2617,7 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp, struct eth_tx_desc *current_descriptor; struct eth_tx_desc *first_descriptor; u32 command; + unsigned long flags; /* Do not process Tx ring in case of Tx ring resource error */ if (mp->tx_resource_err) @@ -2633,6 +2634,8 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp, return ETH_ERROR; } + spin_lock_irqsave(&mp->lock, flags); + mp->tx_ring_skbs++; BUG_ON(mp->tx_ring_skbs > mp->tx_ring_size); @@ -2682,11 +2685,15 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp, mp->tx_resource_err = 1; mp->tx_curr_desc_q = tx_first_desc; + spin_unlock_irqrestore(&mp->lock, flags); + return ETH_QUEUE_LAST_RESOURCE; } mp->tx_curr_desc_q = tx_next_desc; + spin_unlock_irqrestore(&mp->lock, flags); + return ETH_OK; } #else @@ -2697,11 +2704,14 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp, int tx_desc_used; struct eth_tx_desc *current_descriptor; unsigned int command_status; + unsigned long flags; /* Do not process Tx ring in case of Tx ring resource error */ if (mp->tx_resource_err) return ETH_QUEUE_FULL; + spin_lock_irqsave(&mp->lock, flags); + mp->tx_ring_skbs++; BUG_ON(mp->tx_ring_skbs > mp->tx_ring_size); @@ -2732,9 +2742,12 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp, /* Check for ring index overlap in the Tx desc ring */ if (tx_desc_curr == tx_desc_used) { mp->tx_resource_err = 1; + + spin_unlock_irqrestore(&mp->lock, flags); return ETH_QUEUE_LAST_RESOURCE; } + spin_unlock_irqrestore(&mp->lock, flags); return ETH_OK; } #endif @@ -2885,10 +2898,8 @@ static ETH_FUNC_RET_STATUS eth_port_receive(struct mv643xx_private *mp, p_pkt_info->return_info = mp->rx_skb[rx_curr_desc]; p_pkt_info->l4i_chk = p_rx_desc->buf_size; - /* - * Clean the return info field to indicate that the - * packet has been moved to the upper layers - */ + /* Clean the return info field to indicate that the packet has been */ + /* moved to the upper layers */ mp->rx_skb[rx_curr_desc] = NULL; /* Update current index in data structure */ @@ -2969,7 +2980,7 @@ struct mv643xx_stats { }; #define MV643XX_STAT(m) sizeof(((struct mv643xx_private *)0)->m), \ - offsetof(struct mv643xx_private, m) + offsetof(struct mv643xx_private, m) static const struct mv643xx_stats mv643xx_gstrings_stats[] = { { "rx_packets", MV643XX_STAT(stats.rx_packets) }, @@ -3120,8 +3131,9 @@ mv643xx_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) return 0; } -static void mv643xx_get_drvinfo(struct net_device *netdev, - struct ethtool_drvinfo *drvinfo) +static void +mv643xx_get_drvinfo(struct net_device *netdev, + struct ethtool_drvinfo *drvinfo) { strncpy(drvinfo->driver, mv643xx_driver_name, 32); strncpy(drvinfo->version, mv643xx_driver_version, 32); @@ -3130,37 +3142,39 @@ static void mv643xx_get_drvinfo(struct net_device *netdev, drvinfo->n_stats = MV643XX_STATS_LEN; } -static int mv643xx_get_stats_count(struct net_device *netdev) +static int +mv643xx_get_stats_count(struct net_device *netdev) { return MV643XX_STATS_LEN; } -static void mv643xx_get_ethtool_stats(struct net_device *netdev, - struct ethtool_stats *stats, uint64_t *data) +static void +mv643xx_get_ethtool_stats(struct net_device *netdev, + struct ethtool_stats *stats, uint64_t *data) { struct mv643xx_private *mp = netdev->priv; int i; eth_update_mib_counters(mp); - for (i = 0; i < MV643XX_STATS_LEN; i++) { + for(i = 0; i < MV643XX_STATS_LEN; i++) { char *p = (char *)mp+mv643xx_gstrings_stats[i].stat_offset; - data[i] = (mv643xx_gstrings_stats[i].sizeof_stat == + data[i] = (mv643xx_gstrings_stats[i].sizeof_stat == sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p; } } -static void mv643xx_get_strings(struct net_device *netdev, uint32_t stringset, - uint8_t *data) +static void +mv643xx_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data) { int i; switch(stringset) { case ETH_SS_STATS: for (i=0; i < MV643XX_STATS_LEN; i++) { - memcpy(data + i * ETH_GSTRING_LEN, - mv643xx_gstrings_stats[i].stat_string, - ETH_GSTRING_LEN); + memcpy(data + i * ETH_GSTRING_LEN, + mv643xx_gstrings_stats[i].stat_string, + ETH_GSTRING_LEN); } break; } diff --git a/trunk/drivers/net/s2io.c b/trunk/drivers/net/s2io.c index 49b597cbc19a..89c46787676c 100644 --- a/trunk/drivers/net/s2io.c +++ b/trunk/drivers/net/s2io.c @@ -3586,7 +3586,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) txdp->Buffer_Pointer = (u64) pci_map_page (sp->pdev, frag->page, frag->page_offset, frag->size, PCI_DMA_TODEVICE); - txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size); + txdp->Control_1 |= TXD_BUFFER0_SIZE(frag->size); if (skb_shinfo(skb)->ufo_size) txdp->Control_1 |= TXD_UFO_EN; } diff --git a/trunk/drivers/net/sungem.c b/trunk/drivers/net/sungem.c index 55f3b856236e..28ce47a02408 100644 --- a/trunk/drivers/net/sungem.c +++ b/trunk/drivers/net/sungem.c @@ -1653,40 +1653,36 @@ static void gem_init_rings(struct gem *gp) /* Init PHY interface and start link poll state machine */ static void gem_init_phy(struct gem *gp) { - u32 mif_cfg; + u32 mifcfg; /* Revert MIF CFG setting done on stop_phy */ - mif_cfg = readl(gp->regs + MIF_CFG); - mif_cfg &= ~(MIF_CFG_PSELECT|MIF_CFG_POLL|MIF_CFG_BBMODE|MIF_CFG_MDI1); - mif_cfg |= MIF_CFG_MDI0; - writel(mif_cfg, gp->regs + MIF_CFG); - writel(PCS_DMODE_MGM, gp->regs + PCS_DMODE); - writel(MAC_XIFCFG_OE, gp->regs + MAC_XIFCFG); + mifcfg = readl(gp->regs + MIF_CFG); + mifcfg &= ~MIF_CFG_BBMODE; + writel(mifcfg, gp->regs + MIF_CFG); if (gp->pdev->vendor == PCI_VENDOR_ID_APPLE) { int i; - u16 ctrl; + /* Those delay sucks, the HW seem to love them though, I'll + * serisouly consider breaking some locks here to be able + * to schedule instead + */ + for (i = 0; i < 3; i++) { #ifdef CONFIG_PPC_PMAC - pmac_call_feature(PMAC_FTR_GMAC_PHY_RESET, gp->of_node, 0, 0); + pmac_call_feature(PMAC_FTR_GMAC_PHY_RESET, gp->of_node, 0, 0); + msleep(20); #endif - - /* Some PHYs used by apple have problem getting back - * to us, we do an additional reset here - */ - phy_write(gp, MII_BMCR, BMCR_RESET); - for (i = 0; i < 50; i++) { - if ((phy_read(gp, MII_BMCR) & BMCR_RESET) == 0) + /* Some PHYs used by apple have problem getting back to us, + * we do an additional reset here + */ + phy_write(gp, MII_BMCR, BMCR_RESET); + msleep(20); + if (phy_read(gp, MII_BMCR) != 0xffff) break; - msleep(10); + if (i == 2) + printk(KERN_WARNING "%s: GMAC PHY not responding !\n", + gp->dev->name); } - if (i == 50) - printk(KERN_WARNING "%s: GMAC PHY not responding !\n", - gp->dev->name); - /* Make sure isolate is off */ - ctrl = phy_read(gp, MII_BMCR); - if (ctrl & BMCR_ISOLATE) - phy_write(gp, MII_BMCR, ctrl & ~BMCR_ISOLATE); } if (gp->pdev->vendor == PCI_VENDOR_ID_SUN && @@ -2123,7 +2119,7 @@ static void gem_reinit_chip(struct gem *gp) /* Must be invoked with no lock held. */ static void gem_stop_phy(struct gem *gp, int wol) { - u32 mif_cfg; + u32 mifcfg; unsigned long flags; /* Let the chip settle down a bit, it seems that helps @@ -2134,9 +2130,9 @@ static void gem_stop_phy(struct gem *gp, int wol) /* Make sure we aren't polling PHY status change. We * don't currently use that feature though */ - mif_cfg = readl(gp->regs + MIF_CFG); - mif_cfg &= ~MIF_CFG_POLL; - writel(mif_cfg, gp->regs + MIF_CFG); + mifcfg = readl(gp->regs + MIF_CFG); + mifcfg &= ~MIF_CFG_POLL; + writel(mifcfg, gp->regs + MIF_CFG); if (wol && gp->has_wol) { unsigned char *e = &gp->dev->dev_addr[0]; @@ -2186,8 +2182,7 @@ static void gem_stop_phy(struct gem *gp, int wol) /* According to Apple, we must set the MDIO pins to this begnign * state or we may 1) eat more current, 2) damage some PHYs */ - mif_cfg = 0; - writel(mif_cfg | MIF_CFG_BBMODE, gp->regs + MIF_CFG); + writel(mifcfg | MIF_CFG_BBMODE, gp->regs + MIF_CFG); writel(0, gp->regs + MIF_BBCLK); writel(0, gp->regs + MIF_BBDATA); writel(0, gp->regs + MIF_BBOENAB); diff --git a/trunk/drivers/net/wireless/hostap/Kconfig b/trunk/drivers/net/wireless/hostap/Kconfig index 308f773ad566..c8f6286dd35f 100644 --- a/trunk/drivers/net/wireless/hostap/Kconfig +++ b/trunk/drivers/net/wireless/hostap/Kconfig @@ -75,7 +75,7 @@ config HOSTAP_PCI config HOSTAP_CS tristate "Host AP driver for Prism2/2.5/3 PC Cards" - depends on PCMCIA && HOSTAP + depends on PCMCIA!=n && HOSTAP ---help--- Host AP driver's version for Prism2/2.5/3 PC Cards. diff --git a/trunk/drivers/net/wireless/ipw2100.c b/trunk/drivers/net/wireless/ipw2100.c index 6290c9f7e939..8bf02763b5c7 100644 --- a/trunk/drivers/net/wireless/ipw2100.c +++ b/trunk/drivers/net/wireless/ipw2100.c @@ -2201,17 +2201,6 @@ static int ipw2100_alloc_skb(struct ipw2100_priv *priv, #define SEARCH_SNAPSHOT 1 #define SNAPSHOT_ADDR(ofs) (priv->snapshot[((ofs) >> 12) & 0xff] + ((ofs) & 0xfff)) -static void ipw2100_snapshot_free(struct ipw2100_priv *priv) -{ - int i; - if (!priv->snapshot[0]) - return; - for (i = 0; i < 0x30; i++) - kfree(priv->snapshot[i]); - priv->snapshot[0] = NULL; -} - -#ifdef CONFIG_IPW2100_DEBUG_C3 static int ipw2100_snapshot_alloc(struct ipw2100_priv *priv) { int i; @@ -2232,6 +2221,16 @@ static int ipw2100_snapshot_alloc(struct ipw2100_priv *priv) return 1; } +static void ipw2100_snapshot_free(struct ipw2100_priv *priv) +{ + int i; + if (!priv->snapshot[0]) + return; + for (i = 0; i < 0x30; i++) + kfree(priv->snapshot[i]); + priv->snapshot[0] = NULL; +} + static u32 ipw2100_match_buf(struct ipw2100_priv *priv, u8 * in_buf, size_t len, int mode) { @@ -2270,7 +2269,6 @@ static u32 ipw2100_match_buf(struct ipw2100_priv *priv, u8 * in_buf, return ret; } -#endif /* * @@ -7114,17 +7112,11 @@ static int ipw2100_wx_set_txpow(struct net_device *dev, { struct ipw2100_priv *priv = ieee80211_priv(dev); int err = 0, value; - - if (ipw_radio_kill_sw(priv, wrqu->txpower.disabled)) - return -EINPROGRESS; if (priv->ieee->iw_mode != IW_MODE_ADHOC) - return 0; - - if ((wrqu->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM) return -EINVAL; - if (wrqu->txpower.fixed == 0) + if (wrqu->txpower.disabled == 1 || wrqu->txpower.fixed == 0) value = IPW_TX_POWER_DEFAULT; else { if (wrqu->txpower.value < IPW_TX_POWER_MIN_DBM || @@ -7159,19 +7151,24 @@ static int ipw2100_wx_get_txpow(struct net_device *dev, struct ipw2100_priv *priv = ieee80211_priv(dev); - wrqu->txpower.disabled = (priv->status & STATUS_RF_KILL_MASK) ? 1 : 0; + if (priv->ieee->iw_mode != IW_MODE_ADHOC) { + wrqu->power.disabled = 1; + return 0; + } if (priv->tx_power == IPW_TX_POWER_DEFAULT) { - wrqu->txpower.fixed = 0; - wrqu->txpower.value = IPW_TX_POWER_MAX_DBM; + wrqu->power.fixed = 0; + wrqu->power.value = IPW_TX_POWER_MAX_DBM; + wrqu->power.disabled = 1; } else { - wrqu->txpower.fixed = 1; - wrqu->txpower.value = priv->tx_power; + wrqu->power.disabled = 0; + wrqu->power.fixed = 1; + wrqu->power.value = priv->tx_power; } - wrqu->txpower.flags = IW_TXPOW_DBM; + wrqu->power.flags = IW_TXPOW_DBM; - IPW_DEBUG_WX("GET TX Power -> %d \n", wrqu->txpower.value); + IPW_DEBUG_WX("GET TX Power -> %d \n", wrqu->power.value); return 0; } diff --git a/trunk/drivers/net/wireless/ipw2200.c b/trunk/drivers/net/wireless/ipw2200.c index 916b24c544e2..4c28e332ecc3 100644 --- a/trunk/drivers/net/wireless/ipw2200.c +++ b/trunk/drivers/net/wireless/ipw2200.c @@ -8012,10 +8012,6 @@ static int ipw_sw_reset(struct ipw_priv *priv, int init) else IPW_DEBUG_INFO("Auto adhoc creation disabled.\n"); - priv->config &= ~CFG_STATIC_ESSID; - priv->essid_len = 0; - memset(priv->essid, 0, IW_ESSID_MAX_SIZE); - if (disable) { priv->status |= STATUS_RF_KILL_SW; IPW_DEBUG_INFO("Radio disabled.\n"); @@ -11039,6 +11035,7 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) net_dev->set_multicast_list = ipw_net_set_multicast_list; net_dev->set_mac_address = ipw_net_set_mac_address; priv->wireless_data.spy_data = &priv->ieee->spy_data; + priv->wireless_data.ieee80211 = priv->ieee; net_dev->wireless_data = &priv->wireless_data; net_dev->wireless_handlers = &ipw_wx_handler_def; net_dev->ethtool_ops = &ipw_ethtool_ops; @@ -11124,8 +11121,8 @@ static void ipw_pci_remove(struct pci_dev *pdev) /* Free MAC hash list for ADHOC */ for (i = 0; i < IPW_IBSS_MAC_HASH_SIZE; i++) { list_for_each_safe(p, q, &priv->ibss_mac_hash[i]) { - list_del(p); kfree(list_entry(p, struct ipw_ibss_seq, list)); + list_del(p); } } diff --git a/trunk/drivers/net/wireless/orinoco_cs.c b/trunk/drivers/net/wireless/orinoco_cs.c index 3c128b692bce..b664708481cc 100644 --- a/trunk/drivers/net/wireless/orinoco_cs.c +++ b/trunk/drivers/net/wireless/orinoco_cs.c @@ -261,13 +261,13 @@ orinoco_cs_config(dev_link_t *link) /* Note that the CIS values need to be rescaled */ if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) { if (conf.Vcc != cfg->vcc.param[CISTPL_POWER_VNOM] / 10000) { - DEBUG(2, "orinoco_cs_config: Vcc mismatch (conf.Vcc = %d, cfg CIS = %d)\n", conf.Vcc, cfg->vcc.param[CISTPL_POWER_VNOM] / 10000); + DEBUG(2, "orinoco_cs_config: Vcc mismatch (conf.Vcc = %d, CIS = %d)\n", conf.Vcc, cfg->vcc.param[CISTPL_POWER_VNOM] / 10000); if (!ignore_cis_vcc) goto next_entry; } } else if (dflt.vcc.present & (1 << CISTPL_POWER_VNOM)) { if (conf.Vcc != dflt.vcc.param[CISTPL_POWER_VNOM] / 10000) { - DEBUG(2, "orinoco_cs_config: Vcc mismatch (conf.Vcc = %d, dflt CIS = %d)\n", conf.Vcc, dflt.vcc.param[CISTPL_POWER_VNOM] / 10000); + DEBUG(2, "orinoco_cs_config: Vcc mismatch (conf.Vcc = %d, CIS = %d)\n", conf.Vcc, dflt.vcc.param[CISTPL_POWER_VNOM] / 10000); if(!ignore_cis_vcc) goto next_entry; } diff --git a/trunk/drivers/pci/msi.c b/trunk/drivers/pci/msi.c index 8e1ba0b7a8e4..202b7507a357 100644 --- a/trunk/drivers/pci/msi.c +++ b/trunk/drivers/pci/msi.c @@ -416,9 +416,7 @@ static void attach_msi_entry(struct msi_desc *entry, int vector) static void irq_handler_init(int cap_id, int pos, int mask) { - unsigned long flags; - - spin_lock_irqsave(&irq_desc[pos].lock, flags); + spin_lock(&irq_desc[pos].lock); if (cap_id == PCI_CAP_ID_MSIX) irq_desc[pos].handler = &msix_irq_type; else { @@ -427,7 +425,7 @@ static void irq_handler_init(int cap_id, int pos, int mask) else irq_desc[pos].handler = &msi_irq_w_maskbit_type; } - spin_unlock_irqrestore(&irq_desc[pos].lock, flags); + spin_unlock(&irq_desc[pos].lock); } static void enable_msi_mode(struct pci_dev *dev, int pos, int type) diff --git a/trunk/drivers/scsi/aic7xxx/Kconfig.aic79xx b/trunk/drivers/scsi/aic7xxx/Kconfig.aic79xx index 7955ebe8e1e8..69ed77fcb71f 100644 --- a/trunk/drivers/scsi/aic7xxx/Kconfig.aic79xx +++ b/trunk/drivers/scsi/aic7xxx/Kconfig.aic79xx @@ -37,13 +37,13 @@ config AIC79XX_CMDS_PER_DEVICE config AIC79XX_RESET_DELAY_MS int "Initial bus reset delay in milli-seconds" depends on SCSI_AIC79XX - default "5000" + default "15000" ---help--- The number of milliseconds to delay after an initial bus reset. The bus settle delay following all error recovery actions is dictated by the SCSI layer and is not affected by this value. - Default: 5000 (5 seconds) + Default: 15000 (15 seconds) config AIC79XX_BUILD_FIRMWARE bool "Build Adapter Firmware with Kernel Build" diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx.h b/trunk/drivers/scsi/aic7xxx/aic79xx.h index 1d11f7e77564..2cfdbef447db 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx.h +++ b/trunk/drivers/scsi/aic7xxx/aic79xx.h @@ -37,7 +37,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#109 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#108 $ * * $FreeBSD$ */ @@ -222,7 +222,6 @@ typedef enum { typedef enum { AHD_FENONE = 0x00000, AHD_WIDE = 0x00001,/* Wide Channel */ - AHD_AIC79XXB_SLOWCRC = 0x00002,/* SLOWCRC bit should be set */ AHD_MULTI_FUNC = 0x00100,/* Multi-Function/Channel Device */ AHD_TARGETMODE = 0x01000,/* Has tested target mode support */ AHD_MULTIROLE = 0x02000,/* Space for two roles at a time */ diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx.reg b/trunk/drivers/scsi/aic7xxx/aic79xx.reg index be14e2ecb8f7..3a3204703b15 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx.reg +++ b/trunk/drivers/scsi/aic7xxx/aic79xx.reg @@ -1,7 +1,7 @@ /* * Aic79xx register and scratch ram definitions. * - * Copyright (c) 1994-2001, 2004 Justin T. Gibbs. + * Copyright (c) 1994-2001 Justin T. Gibbs. * Copyright (c) 2000-2002 Adaptec Inc. * All rights reserved. * @@ -39,7 +39,7 @@ * * $FreeBSD$ */ -VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#77 $" +VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#76 $" /* * This file is processed by the aic7xxx_asm utility for use in assembling @@ -3715,9 +3715,8 @@ scratch_ram { SEQ_FLAGS2 { size 1 - field PENDING_MK_MESSAGE 0x01 - field TARGET_MSG_PENDING 0x02 - field SELECTOUT_QFROZEN 0x04 + field TARGET_MSG_PENDING 0x02 + field SELECTOUT_QFROZEN 0x04 } ALLOCFIFO_SCBPTR { @@ -3778,26 +3777,6 @@ scratch_ram { CMDSIZE_TABLE { size 8 } - /* - * When an SCB with the MK_MESSAGE flag is - * queued to the controller, it cannot enter - * the waiting for selection list until the - * selections for any previously queued - * commands to that target complete. During - * the wait, the MK_MESSAGE SCB is queued - * here. - */ - MK_MESSAGE_SCB { - size 2 - } - /* - * Saved SCSIID of MK_MESSAGE_SCB to avoid - * an extra SCBPTR operation when deciding - * if the MK_MESSAGE_SCB can be run. - */ - MK_MESSAGE_SCSIID { - size 1 - } } /************************* Hardware SCB Definition ****************************/ diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx.seq b/trunk/drivers/scsi/aic7xxx/aic79xx.seq index 58bc17591b54..bef1f9d369b6 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx.seq +++ b/trunk/drivers/scsi/aic7xxx/aic79xx.seq @@ -1,7 +1,7 @@ /* * Adaptec U320 device driver firmware for Linux and FreeBSD. * - * Copyright (c) 1994-2001, 2004 Justin T. Gibbs. + * Copyright (c) 1994-2001 Justin T. Gibbs. * Copyright (c) 2000-2002 Adaptec Inc. * All rights reserved. * @@ -40,7 +40,7 @@ * $FreeBSD$ */ -VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#120 $" +VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#119 $" PATCH_ARG_LIST = "struct ahd_softc *ahd" PREFIX = "ahd_" @@ -110,8 +110,10 @@ check_waiting_list: * one last time. */ test SSTAT0, SELDO jnz select_out; +END_CRITICAL; call start_selection; idle_loop_checkbus: +BEGIN_CRITICAL; test SSTAT0, SELDO jnz select_out; END_CRITICAL; test SSTAT0, SELDI jnz select_in; @@ -292,6 +294,7 @@ fetch_new_scb_inprog: test CCSCBCTL, ARRDONE jz return; fetch_new_scb_done: and CCSCBCTL, ~(CCARREN|CCSCBEN); + bmov REG0, SCBPTR, 2; clr A; add CMDS_PENDING, 1; adc CMDS_PENDING[1], A; @@ -313,117 +316,43 @@ fetch_new_scb_done: clr SCB_FIFO_USE_COUNT; /* Update the next SCB address to download. */ bmov NEXT_QUEUED_SCB_ADDR, SCB_NEXT_SCB_BUSADDR, 4; - /* - * NULL out the SCB links since these fields - * occupy the same location as SCB_NEXT_SCB_BUSADDR. - */ mvi SCB_NEXT[1], SCB_LIST_NULL; mvi SCB_NEXT2[1], SCB_LIST_NULL; /* Increment our position in the QINFIFO. */ mov NONE, SNSCB_QOFF; - /* - * Save SCBID of this SCB in REG0 since - * SCBPTR will be clobbered during target - * list updates. We also record the SCB's - * flags so that we can refer to them even - * after SCBPTR has been changed. - */ - bmov REG0, SCBPTR, 2; - mov A, SCB_CONTROL; - - /* - * Find the tail SCB of the execution queue - * for this target. + * SCBs that want to send messages are always + * queued independently. This ensures that they + * are at the head of the SCB list to select out + * to a target and we will see the MK_MESSAGE flag. */ + test SCB_CONTROL, MK_MESSAGE jnz first_new_target_scb; shr SINDEX, 3, SCB_SCSIID; and SINDEX, ~0x1; mvi SINDEX[1], (WAITING_SCB_TAILS >> 8); bmov DINDEX, SINDEX, 2; bmov SCBPTR, SINDIR, 2; - - /* - * Update the tail to point to the new SCB. - */ bmov DINDIR, REG0, 2; - - /* - * If the queue was empty, queue this SCB as - * the first for this target. - */ cmp SCBPTR[1], SCB_LIST_NULL je first_new_target_scb; - - /* - * SCBs that want to send messages must always be - * at the head of their per-target queue so that - * ATN can be asserted even if the current - * negotiation agreement is packetized. If the - * target queue is empty, the SCB can be queued - * immediately. If the queue is not empty, we must - * wait for it to empty before entering this SCB - * into the waiting for selection queue. Otherwise - * our batching and round-robin selection scheme - * could allow commands to be queued out of order. - * To simplify the implementation, we stop pulling - * new commands from the host until the MK_MESSAGE - * SCB can be queued to the waiting for selection - * list. - */ - test A, MK_MESSAGE jz batch_scb; - - /* - * If the last SCB is also a MK_MESSAGE SCB, then - * order is preserved even if we batch. - */ - test SCB_CONTROL, MK_MESSAGE jz batch_scb; - - /* - * Defer this SCB and stop fetching new SCBs until - * it can be queued. Since the SCB_SCSIID of the - * tail SCB must be the same as that of the newly - * queued SCB, there is no need to restore the SCBID - * here. - */ - or SEQ_FLAGS2, PENDING_MK_MESSAGE; - bmov MK_MESSAGE_SCB, REG0, 2; - mov MK_MESSAGE_SCSIID, SCB_SCSIID ret; - -batch_scb: - /* - * Otherwise just update the previous tail SCB to - * point to the new tail. - */ bmov SCB_NEXT, REG0, 2 ret; - first_new_target_scb: - /* - * Append SCB to the tail of the waiting for - * selection list. - */ cmp WAITING_TID_HEAD[1], SCB_LIST_NULL je first_new_scb; bmov SCBPTR, WAITING_TID_TAIL, 2; bmov SCB_NEXT2, REG0, 2; bmov WAITING_TID_TAIL, REG0, 2 ret; first_new_scb: - /* - * Whole list is empty, so the head of - * the list must be initialized too. - */ bmov WAITING_TID_HEAD, REG0, 2; bmov WAITING_TID_TAIL, REG0, 2 ret; END_CRITICAL; scbdma_idle: /* - * Don't bother downloading new SCBs to execute - * if select-outs are currently frozen or we have - * a MK_MESSAGE SCB waiting to enter the queue. + * Give precedence to downloading new SCBs to execute + * unless select-outs are currently frozen. */ - test SEQ_FLAGS2, SELECTOUT_QFROZEN|PENDING_MK_MESSAGE - jnz scbdma_no_new_scbs; + test SEQ_FLAGS2, SELECTOUT_QFROZEN jnz . + 2; BEGIN_CRITICAL; test QOFF_CTLSTA, NEW_SCB_AVAIL jnz fetch_new_scb; -scbdma_no_new_scbs: cmp COMPLETE_DMA_SCB_HEAD[1], SCB_LIST_NULL jne dma_complete_scb; cmp COMPLETE_SCB_HEAD[1], SCB_LIST_NULL je return; /* FALLTHROUGH */ @@ -742,41 +671,27 @@ curscb_ww_done: } /* - * The whole list made it. Clear our tail pointer to indicate - * that the per-target selection queue is now empty. + * Requeue any SCBs not sent, to the tail of the waiting Q. */ - cmp SCB_NEXT[1], SCB_LIST_NULL je select_out_clear_tail; + cmp SCB_NEXT[1], SCB_LIST_NULL je select_out_list_done; /* - * Requeue any SCBs not sent, to the tail of the waiting Q. * We know that neither the per-TID list nor the list of - * TIDs is empty. Use this knowledge to our advantage and - * queue the remainder to the tail of the global execution - * queue. + * TIDs is empty. Use this knowledge to our advantage. */ bmov REG0, SCB_NEXT, 2; -select_out_queue_remainder: bmov SCBPTR, WAITING_TID_TAIL, 2; bmov SCB_NEXT2, REG0, 2; bmov WAITING_TID_TAIL, REG0, 2; jmp select_out_inc_tid_q; -select_out_clear_tail: - /* - * Queue any pending MK_MESSAGE SCB for this target now - * that the queue is empty. - */ - test SEQ_FLAGS2, PENDING_MK_MESSAGE jz select_out_no_mk_message_scb; - mov A, MK_MESSAGE_SCSIID; - cmp SCB_SCSIID, A jne select_out_no_mk_message_scb; - and SEQ_FLAGS2, ~PENDING_MK_MESSAGE; - bmov REG0, MK_MESSAGE_SCB, 2; - jmp select_out_queue_remainder; - -select_out_no_mk_message_scb: +select_out_list_done: /* - * Clear this target's execution tail and increment the queue. + * The whole list made it. Just clear our TID's tail pointer + * unless we were queued independently due to our need to + * send a message. */ + test SCB_CONTROL, MK_MESSAGE jnz select_out_inc_tid_q; shr DINDEX, 3, SCB_SCSIID; or DINDEX, 1; /* Want only the second byte */ mvi DINDEX[1], ((WAITING_SCB_TAILS) >> 8); @@ -788,8 +703,8 @@ select_out_inc_tid_q: mvi WAITING_TID_TAIL[1], SCB_LIST_NULL; bmov SCBPTR, CURRSCB, 2; mvi CLRSINT0, CLRSELDO; - test LQOSTAT2, LQOPHACHGOUTPKT jnz unexpected_nonpkt_mode_cleared; - test LQOSTAT1, LQOPHACHGINPKT jnz unexpected_nonpkt_mode_cleared; + test LQOSTAT2, LQOPHACHGOUTPKT jnz unexpected_nonpkt_phase; + test LQOSTAT1, LQOPHACHGINPKT jnz unexpected_nonpkt_phase; /* * If this is a packetized connection, return to our @@ -2212,18 +2127,6 @@ SET_DST_MODE M_DFF0; mvi DFFSXFRCTL, CLRCHN; unexpected_nonpkt_mode_cleared: mvi CLRSINT2, CLRNONPACKREQ; - if ((ahd->bugs & AHD_BUSFREEREV_BUG) != 0) { - /* - * Test to ensure that the bus has not - * already gone free prior to clearing - * any stale busfree status. This avoids - * a window whereby a busfree just after - * a selection could be missed. - */ - test SCSISIGI, BSYI jz . + 2; - mvi CLRSINT1,CLRBUSFREE; - or SIMODE1, ENBUSFREE; - } test SCSIPHASE, ~(MSG_IN_PHASE|MSG_OUT_PHASE) jnz illegal_phase; SET_SEQINTCODE(ENTERING_NONPACK) jmp ITloop; diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx_core.c b/trunk/drivers/scsi/aic7xxx/aic79xx_core.c index 342f77966a5b..db8f5ce99ee3 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx_core.c +++ b/trunk/drivers/scsi/aic7xxx/aic79xx_core.c @@ -37,7 +37,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#250 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#247 $ */ #ifdef __linux__ @@ -197,8 +197,7 @@ static int ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel, int lun, u_int tag, role_t role, uint32_t status, ahd_search_action action, - u_int *list_head, u_int *list_tail, - u_int tid); + u_int *list_head, u_int tid); static void ahd_stitch_tid_list(struct ahd_softc *ahd, u_int tid_prev, u_int tid_cur, u_int tid_next); @@ -1661,8 +1660,7 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat) * so just clear the error. */ ahd_outb(ahd, CLRLQIINT1, CLRLQICRCI_NLQ); - } else if ((status & BUSFREE) != 0 - || (lqistat1 & LQOBUSFREE) != 0) { + } else if ((status & BUSFREE) != 0) { u_int lqostat1; int restart; int clear_fifo; @@ -2027,6 +2025,10 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime) u_int waiting_t; u_int next; + if ((busfreetime & BUSFREE_LQO) == 0) + printf("%s: Warning, BUSFREE time is 0x%x. " + "Expected BUSFREE_LQO.\n", + ahd_name(ahd), busfreetime); /* * The LQO manager detected an unexpected busfree * either: @@ -2249,14 +2251,8 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) struct ahd_tmode_tstate *tstate; /* - * PPR Rejected. - * - * If the previous negotiation was packetized, - * this could be because the device has been - * reset without our knowledge. Force our - * current negotiation to async and retry the - * negotiation. Otherwise retry the command - * with non-ppr negotiation. + * PPR Rejected. Try non-ppr negotiation + * and retry command. */ #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) @@ -2265,34 +2261,11 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) tinfo = ahd_fetch_transinfo(ahd, devinfo.channel, devinfo.our_scsiid, devinfo.target, &tstate); - if ((tinfo->curr.ppr_options & MSG_EXT_PPR_IU_REQ)!=0) { - ahd_set_width(ahd, &devinfo, - MSG_EXT_WDTR_BUS_8_BIT, - AHD_TRANS_CUR, - /*paused*/TRUE); - ahd_set_syncrate(ahd, &devinfo, - /*period*/0, /*offset*/0, - /*ppr_options*/0, - AHD_TRANS_CUR, - /*paused*/TRUE); - /* - * The expect PPR busfree handler below - * will effect the retry and necessary - * abort. - */ - } else { - tinfo->curr.transport_version = 2; - tinfo->goal.transport_version = 2; - tinfo->goal.ppr_options = 0; - /* - * Remove any SCBs in the waiting for selection - * queue that may also be for this target so - * that command ordering is preserved. - */ - ahd_freeze_devq(ahd, scb); - ahd_qinfifo_requeue_tail(ahd, scb); - printerror = 0; - } + tinfo->curr.transport_version = 2; + tinfo->goal.transport_version = 2; + tinfo->goal.ppr_options = 0; + ahd_qinfifo_requeue_tail(ahd, scb); + printerror = 0; } else if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_WDTR, FALSE) && ppr_busfree == 0) { /* @@ -2307,12 +2280,6 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) MSG_EXT_WDTR_BUS_8_BIT, AHD_TRANS_CUR|AHD_TRANS_GOAL, /*paused*/TRUE); - /* - * Remove any SCBs in the waiting for selection - * queue that may also be for this target so that - * command ordering is preserved. - */ - ahd_freeze_devq(ahd, scb); ahd_qinfifo_requeue_tail(ahd, scb); printerror = 0; } else if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_SDTR, FALSE) @@ -2330,12 +2297,6 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) /*ppr_options*/0, AHD_TRANS_CUR|AHD_TRANS_GOAL, /*paused*/TRUE); - /* - * Remove any SCBs in the waiting for selection - * queue that may also be for this target so that - * command ordering is preserved. - */ - ahd_freeze_devq(ahd, scb); ahd_qinfifo_requeue_tail(ahd, scb); printerror = 0; } else if ((ahd->msg_flags & MSG_FLAG_EXPECT_IDE_BUSFREE) != 0 @@ -2408,14 +2369,14 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) */ printf("%s: ", ahd_name(ahd)); } + if (lastphase != P_BUSFREE) + ahd_force_renegotiation(ahd, &devinfo); printf("Unexpected busfree %s, %d SCBs aborted, " "PRGMCNT == 0x%x\n", ahd_lookup_phase_entry(lastphase)->phasemsg, aborted, ahd_inw(ahd, PRGMCNT)); ahd_dump_card_state(ahd); - if (lastphase != P_BUSFREE) - ahd_force_renegotiation(ahd, &devinfo); } /* Always restart the sequencer. */ return (1); @@ -3331,15 +3292,6 @@ ahd_update_neg_table(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, if (tinfo->width == MSG_EXT_WDTR_BUS_16_BIT) con_opts |= WIDEXFER; - /* - * Slow down our CRC interval to be - * compatible with packetized U320 devices - * that can't handle a CRC at full speed - */ - if (ahd->features & AHD_AIC79XXB_SLOWCRC) { - con_opts |= ENSLOWCRC; - } - /* * During packetized transfers, the target will * give us the oportunity to send command packets @@ -3363,6 +3315,7 @@ ahd_update_pending_scbs(struct ahd_softc *ahd) { struct scb *pending_scb; int pending_scb_count; + u_int scb_tag; int paused; u_int saved_scbptr; ahd_mode_state saved_modes; @@ -3380,6 +3333,7 @@ ahd_update_pending_scbs(struct ahd_softc *ahd) pending_scb_count = 0; LIST_FOREACH(pending_scb, &ahd->pending_scbs, pending_links) { struct ahd_devinfo devinfo; + struct hardware_scb *pending_hscb; struct ahd_initiator_tinfo *tinfo; struct ahd_tmode_tstate *tstate; @@ -3387,10 +3341,11 @@ ahd_update_pending_scbs(struct ahd_softc *ahd) tinfo = ahd_fetch_transinfo(ahd, devinfo.channel, devinfo.our_scsiid, devinfo.target, &tstate); + pending_hscb = pending_scb->hscb; if ((tstate->auto_negotiate & devinfo.target_mask) == 0 && (pending_scb->flags & SCB_AUTO_NEGOTIATE) != 0) { pending_scb->flags &= ~SCB_AUTO_NEGOTIATE; - pending_scb->hscb->control &= ~MK_MESSAGE; + pending_hscb->control &= ~MK_MESSAGE; } ahd_sync_scb(ahd, pending_scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); @@ -3422,15 +3377,18 @@ ahd_update_pending_scbs(struct ahd_softc *ahd) ahd_outb(ahd, SCSISEQ0, ahd_inb(ahd, SCSISEQ0) & ~ENSELO); saved_scbptr = ahd_get_scbptr(ahd); /* Ensure that the hscbs down on the card match the new information */ - LIST_FOREACH(pending_scb, &ahd->pending_scbs, pending_links) { - u_int scb_tag; + for (scb_tag = 0; scb_tag < ahd->scb_data.maxhscbs; scb_tag++) { + struct hardware_scb *pending_hscb; u_int control; - scb_tag = SCB_GET_TAG(pending_scb); + pending_scb = ahd_lookup_scb(ahd, scb_tag); + if (pending_scb == NULL) + continue; ahd_set_scbptr(ahd, scb_tag); + pending_hscb = pending_scb->hscb; control = ahd_inb_scbram(ahd, SCB_CONTROL); control &= ~MK_MESSAGE; - control |= pending_scb->hscb->control & MK_MESSAGE; + control |= pending_hscb->control & MK_MESSAGE; ahd_outb(ahd, SCB_CONTROL, control); } ahd_set_scbptr(ahd, saved_scbptr); @@ -6542,14 +6500,13 @@ ahd_chip_init(struct ahd_softc *ahd) | ENLQIOVERI_LQ|ENLQIOVERI_NLQ); ahd_outb(ahd, LQOMODE0, ENLQOATNLQ|ENLQOATNPKT|ENLQOTCRC); /* - * We choose to have the sequencer catch LQOPHCHGINPKT errors - * manually for the command phase at the start of a packetized - * selection case. ENLQOBUSFREE should be made redundant by - * the BUSFREE interrupt, but it seems that some LQOBUSFREE - * events fail to assert the BUSFREE interrupt so we must - * also enable LQOBUSFREE interrupts. + * An interrupt from LQOBUSFREE is made redundant by the + * BUSFREE interrupt. We choose to have the sequencer catch + * LQOPHCHGINPKT errors manually for the command phase at the + * start of a packetized selection case. + ahd_outb(ahd, LQOMODE1, ENLQOBUSFREE|ENLQOPHACHGINPKT); */ - ahd_outb(ahd, LQOMODE1, ENLQOBUSFREE); + ahd_outb(ahd, LQOMODE1, 0); /* * Setup sequencer interrupt handlers. @@ -6660,8 +6617,6 @@ ahd_chip_init(struct ahd_softc *ahd) /* We don't have any waiting selections */ ahd_outw(ahd, WAITING_TID_HEAD, SCB_LIST_NULL); ahd_outw(ahd, WAITING_TID_TAIL, SCB_LIST_NULL); - ahd_outw(ahd, MK_MESSAGE_SCB, SCB_LIST_NULL); - ahd_outw(ahd, MK_MESSAGE_SCSIID, 0xFF); for (i = 0; i < AHD_NUM_TARGETS; i++) ahd_outw(ahd, WAITING_SCB_TAILS + (2 * i), SCB_LIST_NULL); @@ -6749,18 +6704,6 @@ ahd_chip_init(struct ahd_softc *ahd) ahd_loadseq(ahd); ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI); - - if (ahd->features & AHD_AIC79XXB_SLOWCRC) { - u_int negodat3 = ahd_inb(ahd, NEGCONOPTS); - - negodat3 |= ENSLOWCRC; - ahd_outb(ahd, NEGCONOPTS, negodat3); - negodat3 = ahd_inb(ahd, NEGCONOPTS); - if (!(negodat3 & ENSLOWCRC)) - printf("aic79xx: failed to set the SLOWCRC bit\n"); - else - printf("aic79xx: SLOWCRC bit set\n"); - } } /* @@ -7317,28 +7260,12 @@ ahd_reset_cmds_pending(struct ahd_softc *ahd) ahd->flags &= ~AHD_UPDATE_PEND_CMDS; } -void -ahd_done_with_status(struct ahd_softc *ahd, struct scb *scb, uint32_t status) -{ - cam_status ostat; - cam_status cstat; - - ostat = ahd_get_transaction_status(scb); - if (ostat == CAM_REQ_INPROG) - ahd_set_transaction_status(scb, status); - cstat = ahd_get_transaction_status(scb); - if (cstat != CAM_REQ_CMP) - ahd_freeze_scb(scb); - ahd_done(ahd, scb); -} - int ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, int lun, u_int tag, role_t role, uint32_t status, ahd_search_action action) { struct scb *scb; - struct scb *mk_msg_scb; struct scb *prev_scb; ahd_mode_state saved_modes; u_int qinstart; @@ -7347,7 +7274,6 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, u_int tid_next; u_int tid_prev; u_int scbid; - u_int seq_flags2; u_int savedscbptr; uint32_t busaddr; int found; @@ -7403,10 +7329,23 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, found++; switch (action) { case SEARCH_COMPLETE: + { + cam_status ostat; + cam_status cstat; + + ostat = ahd_get_transaction_status(scb); + if (ostat == CAM_REQ_INPROG) + ahd_set_transaction_status(scb, + status); + cstat = ahd_get_transaction_status(scb); + if (cstat != CAM_REQ_CMP) + ahd_freeze_scb(scb); if ((scb->flags & SCB_ACTIVE) == 0) printf("Inactive SCB in qinfifo\n"); - ahd_done_with_status(ahd, scb, status); + ahd_done(ahd, scb); + /* FALLTHROUGH */ + } case SEARCH_REMOVE: break; case SEARCH_PRINT: @@ -7436,24 +7375,21 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, * looking for matches. */ ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI); - seq_flags2 = ahd_inb(ahd, SEQ_FLAGS2); - if ((seq_flags2 & PENDING_MK_MESSAGE) != 0) { - scbid = ahd_inw(ahd, MK_MESSAGE_SCB); - mk_msg_scb = ahd_lookup_scb(ahd, scbid); - } else - mk_msg_scb = NULL; savedscbptr = ahd_get_scbptr(ahd); tid_next = ahd_inw(ahd, WAITING_TID_HEAD); tid_prev = SCB_LIST_NULL; targets = 0; for (scbid = tid_next; !SCBID_IS_NULL(scbid); scbid = tid_next) { u_int tid_head; - u_int tid_tail; + /* + * We limit based on the number of SCBs since + * MK_MESSAGE SCBs are not in the per-tid lists. + */ targets++; - if (targets > AHD_NUM_TARGETS) + if (targets > AHD_SCB_MAX) { panic("TID LIST LOOP"); - + } if (scbid >= ahd->scb_data.numscbs) { printf("%s: Waiting TID List inconsistency. " "SCB index == 0x%x, yet numscbs == 0x%x.", @@ -7483,71 +7419,8 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, tid_head = scbid; found += ahd_search_scb_list(ahd, target, channel, lun, tag, role, status, - action, &tid_head, &tid_tail, + action, &tid_head, SCB_GET_TARGET(ahd, scb)); - /* - * Check any MK_MESSAGE SCB that is still waiting to - * enter this target's waiting for selection queue. - */ - if (mk_msg_scb != NULL - && ahd_match_scb(ahd, mk_msg_scb, target, channel, - lun, tag, role)) { - - /* - * We found an scb that needs to be acted on. - */ - found++; - switch (action) { - case SEARCH_COMPLETE: - if ((mk_msg_scb->flags & SCB_ACTIVE) == 0) - printf("Inactive SCB pending MK_MSG\n"); - ahd_done_with_status(ahd, mk_msg_scb, status); - /* FALLTHROUGH */ - case SEARCH_REMOVE: - { - u_int tail_offset; - - printf("Removing MK_MSG scb\n"); - - /* - * Reset our tail to the tail of the - * main per-target list. - */ - tail_offset = WAITING_SCB_TAILS - + (2 * SCB_GET_TARGET(ahd, mk_msg_scb)); - ahd_outw(ahd, tail_offset, tid_tail); - - seq_flags2 &= ~PENDING_MK_MESSAGE; - ahd_outb(ahd, SEQ_FLAGS2, seq_flags2); - ahd_outw(ahd, CMDS_PENDING, - ahd_inw(ahd, CMDS_PENDING)-1); - mk_msg_scb = NULL; - break; - } - case SEARCH_PRINT: - printf(" 0x%x", SCB_GET_TAG(scb)); - /* FALLTHROUGH */ - case SEARCH_COUNT: - break; - } - } - - if (mk_msg_scb != NULL - && SCBID_IS_NULL(tid_head) - && ahd_match_scb(ahd, scb, target, channel, CAM_LUN_WILDCARD, - SCB_LIST_NULL, ROLE_UNKNOWN)) { - - /* - * When removing the last SCB for a target - * queue with a pending MK_MESSAGE scb, we - * must queue the MK_MESSAGE scb. - */ - printf("Queueing mk_msg_scb\n"); - tid_head = ahd_inw(ahd, MK_MESSAGE_SCB); - seq_flags2 &= ~PENDING_MK_MESSAGE; - ahd_outb(ahd, SEQ_FLAGS2, seq_flags2); - mk_msg_scb = NULL; - } if (tid_head != scbid) ahd_stitch_tid_list(ahd, tid_prev, tid_head, tid_next); if (!SCBID_IS_NULL(tid_head)) @@ -7555,8 +7428,6 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, if (action == SEARCH_PRINT) printf(")\n"); } - - /* Restore saved state. */ ahd_set_scbptr(ahd, savedscbptr); ahd_restore_modes(ahd, saved_modes); return (found); @@ -7565,8 +7436,7 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, static int ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel, int lun, u_int tag, role_t role, uint32_t status, - ahd_search_action action, u_int *list_head, - u_int *list_tail, u_int tid) + ahd_search_action action, u_int *list_head, u_int tid) { struct scb *scb; u_int scbid; @@ -7578,7 +7448,6 @@ ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel, found = 0; prev = SCB_LIST_NULL; next = *list_head; - *list_tail = SCB_LIST_NULL; for (scbid = next; !SCBID_IS_NULL(scbid); scbid = next) { if (scbid >= ahd->scb_data.numscbs) { printf("%s:SCB List inconsistency. " @@ -7594,7 +7463,6 @@ ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel, panic("Waiting List traversal\n"); } ahd_set_scbptr(ahd, scbid); - *list_tail = scbid; next = ahd_inw_scbram(ahd, SCB_NEXT); if (ahd_match_scb(ahd, scb, target, channel, lun, SCB_LIST_NULL, role) == 0) { @@ -7604,14 +7472,24 @@ ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel, found++; switch (action) { case SEARCH_COMPLETE: + { + cam_status ostat; + cam_status cstat; + + ostat = ahd_get_transaction_status(scb); + if (ostat == CAM_REQ_INPROG) + ahd_set_transaction_status(scb, status); + cstat = ahd_get_transaction_status(scb); + if (cstat != CAM_REQ_CMP) + ahd_freeze_scb(scb); if ((scb->flags & SCB_ACTIVE) == 0) printf("Inactive SCB in Waiting List\n"); - ahd_done_with_status(ahd, scb, status); + ahd_done(ahd, scb); /* FALLTHROUGH */ + } case SEARCH_REMOVE: ahd_rem_wscb(ahd, scbid, prev, next, tid); - *list_tail = prev; - if (SCBID_IS_NULL(prev)) + if (prev == SCB_LIST_NULL) *list_head = next; break; case SEARCH_PRINT: @@ -7680,17 +7558,14 @@ ahd_rem_wscb(struct ahd_softc *ahd, u_int scbid, } /* - * SCBs that have MK_MESSAGE set in them may - * cause the tail pointer to be updated without - * setting the next pointer of the previous tail. - * Only clear the tail if the removed SCB was - * the tail. + * SCBs that had MK_MESSAGE set in them will not + * be queued to the per-target lists, so don't + * blindly clear the tail pointer. */ tail_offset = WAITING_SCB_TAILS + (2 * tid); if (SCBID_IS_NULL(next) && ahd_inw(ahd, tail_offset) == scbid) ahd_outw(ahd, tail_offset, prev); - ahd_add_scb_to_free_list(ahd, scbid); return (next); } @@ -8273,6 +8148,11 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb) ahd_setup_data_scb(ahd, scb); scb->flags |= SCB_SENSE; ahd_queue_scb(ahd, scb); + /* + * Ensure we have enough time to actually + * retrieve the sense. + */ + ahd_scb_timer_reset(scb, 5 * 1000000); break; } case SCSI_STATUS_OK: @@ -8913,9 +8793,6 @@ ahd_dump_card_state(struct ahd_softc *ahd) * Mode independent registers. */ cur_col = 0; - ahd_intstat_print(ahd_inb(ahd, INTSTAT), &cur_col, 50); - ahd_seloid_print(ahd_inb(ahd, SELOID), &cur_col, 50); - ahd_selid_print(ahd_inb(ahd, SELID), &cur_col, 50); ahd_hs_mailbox_print(ahd_inb(ahd, LOCAL_HS_MAILBOX), &cur_col, 50); ahd_intctl_print(ahd_inb(ahd, INTCTL), &cur_col, 50); ahd_seqintstat_print(ahd_inb(ahd, SEQINTSTAT), &cur_col, 50); @@ -8931,12 +8808,6 @@ ahd_dump_card_state(struct ahd_softc *ahd) ahd_seqintctl_print(ahd_inb(ahd, SEQINTCTL), &cur_col, 50); ahd_seq_flags_print(ahd_inb(ahd, SEQ_FLAGS), &cur_col, 50); ahd_seq_flags2_print(ahd_inb(ahd, SEQ_FLAGS2), &cur_col, 50); - ahd_qfreeze_count_print(ahd_inw(ahd, QFREEZE_COUNT), &cur_col, 50); - ahd_kernel_qfreeze_count_print(ahd_inw(ahd, KERNEL_QFREEZE_COUNT), - &cur_col, 50); - ahd_mk_message_scb_print(ahd_inw(ahd, MK_MESSAGE_SCB), &cur_col, 50); - ahd_mk_message_scsiid_print(ahd_inb(ahd, MK_MESSAGE_SCSIID), - &cur_col, 50); ahd_sstat0_print(ahd_inb(ahd, SSTAT0), &cur_col, 50); ahd_sstat1_print(ahd_inb(ahd, SSTAT1), &cur_col, 50); ahd_sstat2_print(ahd_inb(ahd, SSTAT2), &cur_col, 50); @@ -9044,7 +8915,7 @@ ahd_dump_card_state(struct ahd_softc *ahd) ahd_set_modes(ahd, AHD_MODE_DFF0 + i, AHD_MODE_DFF0 + i); fifo_scbptr = ahd_get_scbptr(ahd); - printf("\n\n%s: FIFO%d %s, LONGJMP == 0x%x, SCB 0x%x\n", + printf("\n%s: FIFO%d %s, LONGJMP == 0x%x, SCB 0x%x\n", ahd_name(ahd), i, (dffstat & (FIFO0FREE << i)) ? "Free" : "Active", ahd_inw(ahd, LONGJMP_ADDR), fifo_scbptr); @@ -9099,9 +8970,6 @@ ahd_dump_card_state(struct ahd_softc *ahd) printf("%s: OS_SPACE_CNT = 0x%x MAXCMDCNT = 0x%x\n", ahd_name(ahd), ahd_inb(ahd, OS_SPACE_CNT), ahd_inb(ahd, MAXCMDCNT)); - printf("%s: SAVED_SCSIID = 0x%x SAVED_LUN = 0x%x\n", - ahd_name(ahd), ahd_inb(ahd, SAVED_SCSIID), - ahd_inb(ahd, SAVED_LUN)); ahd_simode0_print(ahd_inb(ahd, SIMODE0), &cur_col, 50); printf("\n"); ahd_set_modes(ahd, AHD_MODE_CCHAN, AHD_MODE_CCHAN); diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx_inline.h b/trunk/drivers/scsi/aic7xxx/aic79xx_inline.h index 8ad3ce945b9e..91c4f7f484b1 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx_inline.h +++ b/trunk/drivers/scsi/aic7xxx/aic79xx_inline.h @@ -37,7 +37,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#59 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#58 $ * * $FreeBSD$ */ @@ -804,10 +804,9 @@ ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb) uint64_t host_dataptr; host_dataptr = ahd_le64toh(scb->hscb->dataptr); - printf("%s: Queueing SCB %d:0x%x bus addr 0x%x - 0x%x%x/0x%x\n", + printf("%s: Queueing SCB 0x%x bus addr 0x%x - 0x%x%x/0x%x\n", ahd_name(ahd), - SCB_GET_TAG(scb), scb->hscb->scsiid, - ahd_le32toh(scb->hscb->hscb_busaddr), + SCB_GET_TAG(scb), ahd_le32toh(scb->hscb->hscb_busaddr), (u_int)((host_dataptr >> 32) & 0xFFFFFFFF), (u_int)(host_dataptr & 0xFFFFFFFF), ahd_le32toh(scb->hscb->datacnt)); diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx_osm.c b/trunk/drivers/scsi/aic7xxx/aic79xx_osm.c index 7254ea535a16..2567e29960bd 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/trunk/drivers/scsi/aic7xxx/aic79xx_osm.c @@ -314,21 +314,6 @@ static uint32_t aic79xx_seltime; */ uint32_t aic79xx_periodic_otag; -/* Some storage boxes are using an LSI chip which has a bug making it - * impossible to use aic79xx Rev B chip in 320 speeds. The following - * storage boxes have been reported to be buggy: - * EonStor 3U 16-Bay: U16U-G3A3 - * EonStor 2U 12-Bay: U12U-G3A3 - * SentinelRAID: 2500F R5 / R6 - * SentinelRAID: 2500F R1 - * SentinelRAID: 2500F/1500F - * SentinelRAID: 150F - * - * To get around this LSI bug, you can set your board to 160 mode - * or you can enable the SLOWCRC bit. - */ -uint32_t aic79xx_slowcrc; - /* * Module information and settable options. */ @@ -358,7 +343,6 @@ MODULE_PARM_DESC(aic79xx, " amplitude: Set the signal amplitude (0-7).\n" " seltime: Selection Timeout:\n" " (0/256ms,1/128ms,2/64ms,3/32ms)\n" -" slowcrc Turn on the SLOWCRC bit (Rev B only)\n" "\n" " Sample /etc/modprobe.conf line:\n" " Enable verbose logging\n" @@ -1019,7 +1003,6 @@ aic79xx_setup(char *s) { "slewrate", NULL }, { "precomp", NULL }, { "amplitude", NULL }, - { "slowcrc", &aic79xx_slowcrc }, }; end = strchr(s, '\0'); @@ -1089,6 +1072,7 @@ ahd_linux_register_host(struct ahd_softc *ahd, struct scsi_host_template *templa return (ENOMEM); *((struct ahd_softc **)host->hostdata) = ahd; + ahd_lock(ahd, &s); ahd->platform_data->host = host; host->can_queue = AHD_MAX_QUEUE; host->cmd_per_lun = 2; @@ -1099,9 +1083,7 @@ ahd_linux_register_host(struct ahd_softc *ahd, struct scsi_host_template *templa host->max_lun = AHD_NUM_LUNS; host->max_channel = 0; host->sg_tablesize = AHD_NSEG; - ahd_lock(ahd, &s); ahd_set_unit(ahd, ahd_linux_unit++); - ahd_unlock(ahd, &s); sprintf(buf, "scsi%d", host->host_no); new_name = malloc(strlen(buf) + 1, M_DEVBUF, M_NOWAIT); if (new_name != NULL) { @@ -1111,6 +1093,7 @@ ahd_linux_register_host(struct ahd_softc *ahd, struct scsi_host_template *templa host->unique_id = ahd->unit; ahd_linux_initialize_scsi_bus(ahd); ahd_intr_enable(ahd, TRUE); + ahd_unlock(ahd, &s); host->transportt = ahd_linux_transport_template; @@ -1144,7 +1127,6 @@ ahd_linux_initialize_scsi_bus(struct ahd_softc *ahd) { u_int target_id; u_int numtarg; - unsigned long s; target_id = 0; numtarg = 0; @@ -1157,8 +1139,6 @@ ahd_linux_initialize_scsi_bus(struct ahd_softc *ahd) else numtarg = (ahd->features & AHD_WIDE) ? 16 : 8; - ahd_lock(ahd, &s); - /* * Force negotiation to async for all targets that * will not see an initial bus reset. @@ -1175,12 +1155,16 @@ ahd_linux_initialize_scsi_bus(struct ahd_softc *ahd) ahd_update_neg_request(ahd, &devinfo, tstate, tinfo, AHD_NEG_ALWAYS); } - ahd_unlock(ahd, &s); /* Give the bus some time to recover */ if ((ahd->flags & AHD_RESET_BUS_A) != 0) { ahd_freeze_simq(ahd); - msleep(AIC79XX_RESET_DELAY); - ahd_release_simq(ahd); + init_timer(&ahd->platform_data->reset_timer); + ahd->platform_data->reset_timer.data = (u_long)ahd; + ahd->platform_data->reset_timer.expires = + jiffies + (AIC79XX_RESET_DELAY * HZ)/1000; + ahd->platform_data->reset_timer.function = + (ahd_linux_callback_t *)ahd_release_simq; + add_timer(&ahd->platform_data->reset_timer); } } @@ -2049,9 +2033,6 @@ ahd_linux_sem_timeout(u_long arg) void ahd_freeze_simq(struct ahd_softc *ahd) { - unsigned long s; - - ahd_lock(ahd, &s); ahd->platform_data->qfrozen++; if (ahd->platform_data->qfrozen == 1) { scsi_block_requests(ahd->platform_data->host); @@ -2059,7 +2040,6 @@ ahd_freeze_simq(struct ahd_softc *ahd) CAM_LUN_WILDCARD, SCB_LIST_NULL, ROLE_INITIATOR, CAM_REQUEUE_REQ); } - ahd_unlock(ahd, &s); } void @@ -2364,9 +2344,8 @@ ahd_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) ahd_name(ahd), dev->active); retval = FAILED; } - } else - ahd_unlock(ahd, &flags); - + } + ahd_unlock(ahd, &flags); return (retval); } diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx_osm.h b/trunk/drivers/scsi/aic7xxx/aic79xx_osm.h index 9cb101345107..cb74fccc8100 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx_osm.h +++ b/trunk/drivers/scsi/aic7xxx/aic79xx_osm.h @@ -36,7 +36,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#166 $ + * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#137 $ * */ #ifndef _AIC79XX_LINUX_H_ @@ -228,6 +228,7 @@ typedef struct timer_list ahd_timer_t; typedef void ahd_linux_callback_t (u_long); static __inline void ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_callback_t *func, void *arg); +static __inline void ahd_scb_timer_reset(struct scb *scb, u_int usec); static __inline void ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_callback_t *func, void *arg) @@ -242,6 +243,12 @@ ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_callback_t *func, void *arg) add_timer(timer); } +static __inline void +ahd_scb_timer_reset(struct scb *scb, u_int usec) +{ + mod_timer(&scb->io_ctx->eh_timeout, jiffies + (usec * HZ)/1000000); +} + /***************************** SMP support ************************************/ #include @@ -382,6 +389,7 @@ struct ahd_platform_data { spinlock_t spin_lock; u_int qfrozen; + struct timer_list reset_timer; struct semaphore eh_sem; struct Scsi_Host *host; /* pointer to scsi host */ #define AHD_LINUX_NOIRQ ((uint32_t)~0) diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/trunk/drivers/scsi/aic7xxx/aic79xx_osm_pci.c index ebbf7e4ff4cc..bf360ae021ab 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx_osm_pci.c +++ b/trunk/drivers/scsi/aic7xxx/aic79xx_osm_pci.c @@ -220,10 +220,10 @@ ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd, u_long *base, *base2 = pci_resource_start(ahd->dev_softc, 3); if (*base == 0 || *base2 == 0) return (ENOMEM); - if (!request_region(*base, 256, "aic79xx")) + if (request_region(*base, 256, "aic79xx") == 0) return (ENOMEM); - if (!request_region(*base2, 256, "aic79xx")) { - release_region(*base, 256); + if (request_region(*base2, 256, "aic79xx") == 0) { + release_region(*base2, 256); return (ENOMEM); } return (0); @@ -237,7 +237,7 @@ ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd, u_long start; u_long base_page; u_long base_offset; - int error = 0; + int error; if (aic79xx_allow_memio == 0) return (ENOMEM); @@ -245,15 +245,16 @@ ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd, if ((ahd->bugs & AHD_PCIX_MMAPIO_BUG) != 0) return (ENOMEM); + error = 0; start = pci_resource_start(ahd->dev_softc, 1); base_page = start & PAGE_MASK; base_offset = start - base_page; if (start != 0) { *bus_addr = start; - if (!request_mem_region(start, 0x1000, "aic79xx")) + if (request_mem_region(start, 0x1000, "aic79xx") == 0) error = ENOMEM; - if (!error) { - *maddr = ioremap_nocache(base_page, base_offset + 512); + if (error == 0) { + *maddr = ioremap_nocache(base_page, base_offset + 256); if (*maddr == NULL) { error = ENOMEM; release_mem_region(start, 0x1000); @@ -343,7 +344,7 @@ ahd_pci_map_int(struct ahd_softc *ahd) error = request_irq(ahd->dev_softc->irq, ahd_linux_isr, SA_SHIRQ, "aic79xx", ahd); - if (!error) + if (error == 0) ahd->platform_data->irq = ahd->dev_softc->irq; return (-error); diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx_pci.c b/trunk/drivers/scsi/aic7xxx/aic79xx_pci.c index 757242e522c2..196a6344b037 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx_pci.c +++ b/trunk/drivers/scsi/aic7xxx/aic79xx_pci.c @@ -38,7 +38,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#92 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#89 $ */ #ifdef __linux__ @@ -950,19 +950,12 @@ ahd_aic790X_setup(struct ahd_softc *ahd) if ((ahd->flags & AHD_HP_BOARD) == 0) AHD_SET_SLEWRATE(ahd, AHD_SLEWRATE_DEF_REVA); } else { - /* This is revision B and newer. */ - extern uint32_t aic79xx_slowcrc; u_int devconfig1; ahd->features |= AHD_RTI|AHD_NEW_IOCELL_OPTS - | AHD_NEW_DFCNTRL_OPTS|AHD_FAST_CDB_DELIVERY - | AHD_BUSFREEREV_BUG; + | AHD_NEW_DFCNTRL_OPTS|AHD_FAST_CDB_DELIVERY; ahd->bugs |= AHD_LQOOVERRUN_BUG|AHD_EARLY_REQ_BUG; - /* If the user requested the the SLOWCRC bit to be set. */ - if (aic79xx_slowcrc) - ahd->features |= AHD_AIC79XXB_SLOWCRC; - /* * Some issues have been resolved in the 7901B. */ diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped b/trunk/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped index 2068e00d2c75..8763b158856b 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped +++ b/trunk/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped @@ -2,8 +2,8 @@ * DO NOT EDIT - This file is automatically generated * from the following source files: * - * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#120 $ - * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#77 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#119 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#76 $ */ typedef int (ahd_reg_print_t)(u_int, u_int *, u_int); typedef struct ahd_reg_parse_entry { @@ -2203,20 +2203,6 @@ ahd_reg_print_t ahd_cmdsize_table_print; ahd_print_register(NULL, 0, "CMDSIZE_TABLE", 0x158, regvalue, cur_col, wrap) #endif -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_mk_message_scb_print; -#else -#define ahd_mk_message_scb_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "MK_MESSAGE_SCB", 0x160, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_mk_message_scsiid_print; -#else -#define ahd_mk_message_scsiid_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "MK_MESSAGE_SCSIID", 0x162, regvalue, cur_col, wrap) -#endif - #if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_scb_base_print; #else @@ -3652,7 +3638,6 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print; #define SEQ_FLAGS2 0x14d #define SELECTOUT_QFROZEN 0x04 #define TARGET_MSG_PENDING 0x02 -#define PENDING_MK_MESSAGE 0x01 #define ALLOCFIFO_SCBPTR 0x14e @@ -3670,10 +3655,6 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print; #define CMDSIZE_TABLE 0x158 -#define MK_MESSAGE_SCB 0x160 - -#define MK_MESSAGE_SCSIID 0x162 - #define SCB_BASE 0x180 #define SCB_RESIDUAL_DATACNT 0x180 @@ -3819,5 +3800,5 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print; /* Exported Labels */ -#define LABEL_seq_isr 0x28f -#define LABEL_timer_isr 0x28b +#define LABEL_seq_isr 0x285 +#define LABEL_timer_isr 0x281 diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped b/trunk/drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped index db38a61a8cb4..a4137c985376 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped +++ b/trunk/drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped @@ -2,8 +2,8 @@ * DO NOT EDIT - This file is automatically generated * from the following source files: * - * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#120 $ - * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#77 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#118 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#75 $ */ #include "aic79xx_osm.h" @@ -3382,7 +3382,6 @@ ahd_initiator_tag_print(u_int regvalue, u_int *cur_col, u_int wrap) } static ahd_reg_parse_entry_t SEQ_FLAGS2_parse_table[] = { - { "PENDING_MK_MESSAGE", 0x01, 0x01 }, { "TARGET_MSG_PENDING", 0x02, 0x02 }, { "SELECTOUT_QFROZEN", 0x04, 0x04 } }; @@ -3390,7 +3389,7 @@ static ahd_reg_parse_entry_t SEQ_FLAGS2_parse_table[] = { int ahd_seq_flags2_print(u_int regvalue, u_int *cur_col, u_int wrap) { - return (ahd_print_register(SEQ_FLAGS2_parse_table, 3, "SEQ_FLAGS2", + return (ahd_print_register(SEQ_FLAGS2_parse_table, 2, "SEQ_FLAGS2", 0x14d, regvalue, cur_col, wrap)); } @@ -3450,20 +3449,6 @@ ahd_cmdsize_table_print(u_int regvalue, u_int *cur_col, u_int wrap) 0x158, regvalue, cur_col, wrap)); } -int -ahd_mk_message_scb_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(NULL, 0, "MK_MESSAGE_SCB", - 0x160, regvalue, cur_col, wrap)); -} - -int -ahd_mk_message_scsiid_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(NULL, 0, "MK_MESSAGE_SCSIID", - 0x162, regvalue, cur_col, wrap)); -} - int ahd_scb_base_print(u_int regvalue, u_int *cur_col, u_int wrap) { diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped b/trunk/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped index 11bed07e90b7..b1e5365be230 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped +++ b/trunk/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped @@ -2,17 +2,17 @@ * DO NOT EDIT - This file is automatically generated * from the following source files: * - * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#120 $ - * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#77 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#119 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#76 $ */ static uint8_t seqprog[] = { 0xff, 0x02, 0x06, 0x78, - 0x00, 0xea, 0x6e, 0x59, + 0x00, 0xea, 0x64, 0x59, 0x01, 0xea, 0x04, 0x30, 0xff, 0x04, 0x0c, 0x78, - 0x19, 0xea, 0x6e, 0x59, + 0x19, 0xea, 0x64, 0x59, 0x19, 0xea, 0x04, 0x00, - 0x33, 0xea, 0x68, 0x59, + 0x33, 0xea, 0x5e, 0x59, 0x33, 0xea, 0x00, 0x00, 0x60, 0x3a, 0x3a, 0x68, 0x04, 0x4d, 0x35, 0x78, @@ -33,15 +33,15 @@ static uint8_t seqprog[] = { 0xff, 0xea, 0x62, 0x02, 0x00, 0xe2, 0x3a, 0x40, 0xff, 0x21, 0x3b, 0x70, - 0x40, 0x4b, 0xb4, 0x69, - 0x00, 0xe2, 0x72, 0x59, - 0x40, 0x4b, 0xb4, 0x69, - 0x20, 0x4b, 0xa0, 0x69, + 0x40, 0x4b, 0xaa, 0x69, + 0x00, 0xe2, 0x68, 0x59, + 0x40, 0x4b, 0xaa, 0x69, + 0x20, 0x4b, 0x96, 0x69, 0xfc, 0x42, 0x44, 0x78, 0x10, 0x40, 0x44, 0x78, - 0x00, 0xe2, 0x10, 0x5e, + 0x00, 0xe2, 0xfc, 0x5d, 0x20, 0x4d, 0x48, 0x78, - 0x00, 0xe2, 0x10, 0x5e, + 0x00, 0xe2, 0xfc, 0x5d, 0x30, 0x3f, 0xc0, 0x09, 0x30, 0xe0, 0x50, 0x60, 0x7f, 0x4a, 0x94, 0x08, @@ -51,7 +51,7 @@ static uint8_t seqprog[] = { 0x00, 0xe2, 0x76, 0x58, 0x00, 0xe2, 0x86, 0x58, 0x00, 0xe2, 0x06, 0x40, - 0x33, 0xea, 0x68, 0x59, + 0x33, 0xea, 0x5e, 0x59, 0x33, 0xea, 0x00, 0x00, 0x01, 0x52, 0x84, 0x78, 0x02, 0x58, 0x50, 0x31, @@ -59,26 +59,26 @@ static uint8_t seqprog[] = { 0xff, 0x97, 0x6f, 0x78, 0x50, 0x4b, 0x6a, 0x68, 0xbf, 0x3a, 0x74, 0x08, - 0x14, 0xea, 0x6e, 0x59, + 0x14, 0xea, 0x64, 0x59, 0x14, 0xea, 0x04, 0x00, 0x08, 0x92, 0x25, 0x03, 0xff, 0x90, 0x5f, 0x68, - 0x00, 0xe2, 0x8a, 0x5b, + 0x00, 0xe2, 0x76, 0x5b, 0x00, 0xe2, 0x5e, 0x40, - 0x00, 0xea, 0x68, 0x59, + 0x00, 0xea, 0x5e, 0x59, 0x01, 0xea, 0x00, 0x30, 0x80, 0xf9, 0x7e, 0x68, - 0x00, 0xe2, 0x66, 0x59, - 0x11, 0xea, 0x68, 0x59, + 0x00, 0xe2, 0x5c, 0x59, + 0x11, 0xea, 0x5e, 0x59, 0x11, 0xea, 0x00, 0x00, - 0x80, 0xf9, 0x66, 0x79, + 0x80, 0xf9, 0x5c, 0x79, 0xff, 0xea, 0xd4, 0x0d, - 0x22, 0xea, 0x68, 0x59, + 0x22, 0xea, 0x5e, 0x59, 0x22, 0xea, 0x00, 0x00, 0x10, 0x16, 0x90, 0x78, 0x10, 0x16, 0x2c, 0x00, 0x01, 0x0b, 0xae, 0x32, - 0x18, 0xad, 0x1c, 0x79, + 0x18, 0xad, 0x12, 0x79, 0x04, 0xad, 0xdc, 0x68, 0x80, 0xad, 0x84, 0x78, 0x10, 0xad, 0xaa, 0x78, @@ -118,6 +118,7 @@ static uint8_t seqprog[] = { 0x80, 0x18, 0x30, 0x04, 0x40, 0xad, 0x84, 0x78, 0xe7, 0xad, 0x5a, 0x09, + 0x02, 0xa8, 0x40, 0x31, 0xff, 0xea, 0xc0, 0x09, 0x01, 0x54, 0xa9, 0x1a, 0x00, 0x55, 0xab, 0x22, @@ -127,30 +128,24 @@ static uint8_t seqprog[] = { 0xff, 0xea, 0x5a, 0x03, 0xff, 0xea, 0x5e, 0x03, 0x01, 0x10, 0xd4, 0x31, - 0x02, 0xa8, 0x40, 0x31, - 0x01, 0x92, 0xc1, 0x31, + 0x10, 0x92, 0x07, 0x69, 0x3d, 0x93, 0xc5, 0x29, 0xfe, 0xe2, 0xc4, 0x09, 0x01, 0xea, 0xc6, 0x01, 0x02, 0xe2, 0xc8, 0x31, 0x02, 0xec, 0x50, 0x31, 0x02, 0xa0, 0xda, 0x31, - 0xff, 0xa9, 0x10, 0x71, - 0x10, 0xe0, 0x0e, 0x79, - 0x10, 0x92, 0x0f, 0x79, - 0x01, 0x4d, 0x9b, 0x02, - 0x02, 0xa0, 0xc0, 0x32, - 0x01, 0x93, 0xc5, 0x36, + 0xff, 0xa9, 0x06, 0x71, 0x02, 0xa0, 0x58, 0x37, - 0xff, 0x21, 0x19, 0x71, + 0xff, 0x21, 0x0f, 0x71, 0x02, 0x22, 0x51, 0x31, 0x02, 0xa0, 0x5c, 0x33, 0x02, 0xa0, 0x44, 0x36, 0x02, 0xa0, 0x40, 0x32, 0x02, 0xa0, 0x44, 0x36, - 0x05, 0x4d, 0x21, 0x69, - 0x40, 0x16, 0x52, 0x69, - 0xff, 0x2d, 0x57, 0x61, + 0x04, 0x4d, 0x17, 0x69, + 0x40, 0x16, 0x48, 0x69, + 0xff, 0x2d, 0x4d, 0x61, 0xff, 0x29, 0x85, 0x70, 0x02, 0x28, 0x55, 0x32, 0x01, 0xea, 0x5a, 0x01, @@ -164,22 +159,22 @@ static uint8_t seqprog[] = { 0x01, 0x56, 0xad, 0x1a, 0xff, 0x54, 0xa9, 0x1a, 0xff, 0x55, 0xab, 0x22, - 0xff, 0x8d, 0x4b, 0x71, - 0x80, 0xac, 0x4a, 0x71, - 0x20, 0x16, 0x4a, 0x69, + 0xff, 0x8d, 0x41, 0x71, + 0x80, 0xac, 0x40, 0x71, + 0x20, 0x16, 0x40, 0x69, 0x00, 0xac, 0xc4, 0x19, - 0x07, 0xe2, 0x4a, 0xf9, + 0x07, 0xe2, 0x40, 0xf9, 0x02, 0x8c, 0x51, 0x31, - 0x00, 0xe2, 0x2e, 0x41, + 0x00, 0xe2, 0x24, 0x41, 0x01, 0xac, 0x08, 0x31, 0x09, 0xea, 0x5a, 0x01, 0x02, 0x8c, 0x51, 0x32, 0xff, 0xea, 0x1a, 0x07, 0x04, 0x24, 0xf9, 0x30, - 0x1d, 0xea, 0x5c, 0x41, + 0x1d, 0xea, 0x52, 0x41, 0x02, 0x2c, 0x51, 0x31, 0x04, 0xa8, 0xf9, 0x30, - 0x19, 0xea, 0x5c, 0x41, + 0x19, 0xea, 0x52, 0x41, 0x06, 0xea, 0x08, 0x81, 0x01, 0xe2, 0x5a, 0x35, 0x02, 0xf2, 0xf0, 0x31, @@ -195,27 +190,27 @@ static uint8_t seqprog[] = { 0x02, 0x20, 0xb9, 0x30, 0x02, 0x20, 0x51, 0x31, 0x4c, 0x93, 0xd7, 0x28, - 0x10, 0x92, 0x81, 0x79, + 0x10, 0x92, 0x77, 0x79, 0x01, 0x6b, 0xc0, 0x30, 0x02, 0x64, 0xc8, 0x00, 0x40, 0x3a, 0x74, 0x04, 0x00, 0xe2, 0x76, 0x58, - 0x33, 0xea, 0x68, 0x59, + 0x33, 0xea, 0x5e, 0x59, 0x33, 0xea, 0x00, 0x00, 0x30, 0x3f, 0xc0, 0x09, - 0x30, 0xe0, 0x82, 0x61, - 0x20, 0x3f, 0x98, 0x69, - 0x10, 0x3f, 0x82, 0x79, + 0x30, 0xe0, 0x78, 0x61, + 0x20, 0x3f, 0x8e, 0x69, + 0x10, 0x3f, 0x78, 0x79, 0x02, 0xea, 0x7e, 0x00, - 0x00, 0xea, 0x68, 0x59, + 0x00, 0xea, 0x5e, 0x59, 0x01, 0xea, 0x00, 0x30, 0x02, 0x4e, 0x51, 0x35, 0x01, 0xea, 0x7e, 0x00, - 0x11, 0xea, 0x68, 0x59, + 0x11, 0xea, 0x5e, 0x59, 0x11, 0xea, 0x00, 0x00, 0x02, 0x4e, 0x51, 0x35, 0xc0, 0x4a, 0x94, 0x00, - 0x04, 0x41, 0xa6, 0x79, + 0x04, 0x41, 0x9c, 0x79, 0x08, 0xea, 0x98, 0x00, 0x08, 0x57, 0xae, 0x00, 0x08, 0x3c, 0x78, 0x00, @@ -223,12 +218,12 @@ static uint8_t seqprog[] = { 0x0f, 0x67, 0xc0, 0x09, 0x00, 0x3a, 0x75, 0x02, 0x20, 0xea, 0x96, 0x00, - 0x00, 0xe2, 0x28, 0x42, + 0x00, 0xe2, 0x14, 0x42, 0xc0, 0x4a, 0x94, 0x00, - 0x40, 0x3a, 0xd2, 0x69, + 0x40, 0x3a, 0xc8, 0x69, 0x02, 0x55, 0x06, 0x68, - 0x02, 0x56, 0xd2, 0x69, - 0xff, 0x5b, 0xd2, 0x61, + 0x02, 0x56, 0xc8, 0x69, + 0xff, 0x5b, 0xc8, 0x61, 0x02, 0x20, 0x51, 0x31, 0x80, 0xea, 0xb2, 0x01, 0x44, 0xea, 0x00, 0x00, @@ -236,45 +231,40 @@ static uint8_t seqprog[] = { 0x33, 0xea, 0x00, 0x00, 0xff, 0xea, 0xb2, 0x09, 0xff, 0xe0, 0xc0, 0x19, - 0xff, 0xe0, 0xd4, 0x79, + 0xff, 0xe0, 0xca, 0x79, 0x02, 0xac, 0x51, 0x31, - 0x00, 0xe2, 0xca, 0x41, + 0x00, 0xe2, 0xc0, 0x41, 0x02, 0x5e, 0x50, 0x31, 0x02, 0xa8, 0xb8, 0x30, 0x02, 0x5c, 0x50, 0x31, - 0xff, 0xad, 0xe5, 0x71, + 0xff, 0xad, 0xdb, 0x71, 0x02, 0xac, 0x41, 0x31, 0x02, 0x22, 0x51, 0x31, 0x02, 0xa0, 0x5c, 0x33, 0x02, 0xa0, 0x44, 0x32, - 0x00, 0xe2, 0xf8, 0x41, - 0x01, 0x4d, 0xf1, 0x79, - 0x01, 0x62, 0xc1, 0x31, - 0x00, 0x93, 0xf1, 0x61, - 0xfe, 0x4d, 0x9b, 0x0a, - 0x02, 0x60, 0x41, 0x31, - 0x00, 0xe2, 0xdc, 0x41, + 0x00, 0xe2, 0xe4, 0x41, + 0x10, 0x92, 0xe5, 0x69, 0x3d, 0x93, 0xc9, 0x29, 0x01, 0xe4, 0xc8, 0x01, 0x01, 0xea, 0xca, 0x01, 0xff, 0xea, 0xda, 0x01, 0x02, 0x20, 0x51, 0x31, 0x02, 0xae, 0x41, 0x32, - 0xff, 0x21, 0x01, 0x62, + 0xff, 0x21, 0xed, 0x61, 0xff, 0xea, 0x46, 0x02, 0x02, 0x5c, 0x50, 0x31, 0x40, 0xea, 0x96, 0x00, - 0x02, 0x56, 0x20, 0x6e, - 0x01, 0x55, 0x20, 0x6e, - 0x10, 0x92, 0x0d, 0x7a, - 0x10, 0x40, 0x16, 0x6a, - 0x01, 0x56, 0x16, 0x7a, + 0x02, 0x56, 0x04, 0x6e, + 0x01, 0x55, 0x04, 0x6e, + 0x10, 0x92, 0xf9, 0x79, + 0x10, 0x40, 0x02, 0x6a, + 0x01, 0x56, 0x02, 0x7a, 0xff, 0x97, 0x07, 0x78, - 0x13, 0xea, 0x6e, 0x59, + 0x13, 0xea, 0x64, 0x59, 0x13, 0xea, 0x04, 0x00, 0x00, 0xe2, 0x06, 0x40, 0xbf, 0x3a, 0x74, 0x08, - 0x04, 0x41, 0x1c, 0x7a, + 0x04, 0x41, 0x08, 0x7a, 0x08, 0xea, 0x98, 0x00, 0x08, 0x57, 0xae, 0x00, 0x01, 0x93, 0x75, 0x32, @@ -282,108 +272,108 @@ static uint8_t seqprog[] = { 0x40, 0xea, 0x72, 0x02, 0x08, 0x3c, 0x78, 0x00, 0x80, 0xea, 0x6e, 0x02, - 0x00, 0xe2, 0xf6, 0x5b, + 0x00, 0xe2, 0xe2, 0x5b, 0x01, 0x3c, 0xc1, 0x31, - 0x9f, 0xe0, 0x98, 0x7c, - 0x80, 0xe0, 0x3c, 0x72, - 0xa0, 0xe0, 0x78, 0x72, - 0xc0, 0xe0, 0x6e, 0x72, - 0xe0, 0xe0, 0xa8, 0x72, - 0x01, 0xea, 0x6e, 0x59, + 0x9f, 0xe0, 0x84, 0x7c, + 0x80, 0xe0, 0x28, 0x72, + 0xa0, 0xe0, 0x64, 0x72, + 0xc0, 0xe0, 0x5a, 0x72, + 0xe0, 0xe0, 0x94, 0x72, + 0x01, 0xea, 0x64, 0x59, 0x01, 0xea, 0x04, 0x00, - 0x00, 0xe2, 0x28, 0x42, - 0x80, 0x39, 0x43, 0x7a, - 0x03, 0xea, 0x6e, 0x59, + 0x00, 0xe2, 0x14, 0x42, + 0x80, 0x39, 0x2f, 0x7a, + 0x03, 0xea, 0x64, 0x59, 0x03, 0xea, 0x04, 0x00, - 0xee, 0x00, 0x4a, 0x6a, + 0xee, 0x00, 0x36, 0x6a, 0x05, 0xea, 0xb4, 0x00, - 0x33, 0xea, 0x68, 0x59, + 0x33, 0xea, 0x5e, 0x59, 0x33, 0xea, 0x00, 0x00, 0x02, 0xa8, 0x9c, 0x32, - 0x00, 0xe2, 0x88, 0x59, + 0x00, 0xe2, 0x7e, 0x59, 0xef, 0x96, 0xd5, 0x19, - 0x00, 0xe2, 0x5a, 0x52, + 0x00, 0xe2, 0x46, 0x52, 0x09, 0x80, 0xe1, 0x30, 0x02, 0xea, 0x36, 0x00, 0xa8, 0xea, 0x32, 0x00, - 0x00, 0xe2, 0x60, 0x42, + 0x00, 0xe2, 0x4c, 0x42, 0x01, 0x96, 0xd1, 0x30, 0x10, 0x80, 0x89, 0x31, 0x20, 0xea, 0x32, 0x00, 0xbf, 0x39, 0x73, 0x0a, - 0x10, 0x4c, 0x6a, 0x6a, - 0x20, 0x19, 0x62, 0x6a, - 0x20, 0x19, 0x66, 0x6a, - 0x02, 0x4d, 0x28, 0x6a, + 0x10, 0x4c, 0x56, 0x6a, + 0x20, 0x19, 0x4e, 0x6a, + 0x20, 0x19, 0x52, 0x6a, + 0x02, 0x4d, 0x14, 0x6a, 0x40, 0x39, 0x73, 0x02, - 0x00, 0xe2, 0x28, 0x42, - 0x80, 0x39, 0xe9, 0x6a, + 0x00, 0xe2, 0x14, 0x42, + 0x80, 0x39, 0xd5, 0x6a, 0x01, 0x44, 0x10, 0x33, 0x08, 0x92, 0x25, 0x03, - 0x00, 0xe2, 0x28, 0x42, + 0x00, 0xe2, 0x14, 0x42, 0x10, 0xea, 0x80, 0x00, 0x01, 0x37, 0xc5, 0x31, - 0x80, 0xe2, 0x94, 0x62, - 0x10, 0x92, 0xb9, 0x6a, + 0x80, 0xe2, 0x80, 0x62, + 0x10, 0x92, 0xa5, 0x6a, 0xc0, 0x94, 0xc5, 0x01, - 0x40, 0x92, 0x85, 0x6a, + 0x40, 0x92, 0x71, 0x6a, 0xbf, 0xe2, 0xc4, 0x09, - 0x20, 0x92, 0x99, 0x7a, + 0x20, 0x92, 0x85, 0x7a, 0x01, 0xe2, 0x88, 0x30, - 0x00, 0xe2, 0xf6, 0x5b, - 0xa0, 0x3c, 0xa1, 0x62, + 0x00, 0xe2, 0xe2, 0x5b, + 0xa0, 0x3c, 0x8d, 0x62, 0x23, 0x92, 0x89, 0x08, - 0x00, 0xe2, 0xf6, 0x5b, - 0xa0, 0x3c, 0xa1, 0x62, - 0x00, 0xa8, 0x98, 0x42, - 0xff, 0xe2, 0x98, 0x62, - 0x00, 0xe2, 0xb8, 0x42, + 0x00, 0xe2, 0xe2, 0x5b, + 0xa0, 0x3c, 0x8d, 0x62, + 0x00, 0xa8, 0x84, 0x42, + 0xff, 0xe2, 0x84, 0x62, + 0x00, 0xe2, 0xa4, 0x42, 0x40, 0xea, 0x98, 0x00, 0x01, 0xe2, 0x88, 0x30, - 0x00, 0xe2, 0xf6, 0x5b, - 0xa0, 0x3c, 0x77, 0x72, + 0x00, 0xe2, 0xe2, 0x5b, + 0xa0, 0x3c, 0x63, 0x72, 0x40, 0xea, 0x98, 0x00, 0x01, 0x37, 0x95, 0x32, 0x08, 0xea, 0x6e, 0x02, - 0x00, 0xe2, 0x28, 0x42, - 0xe0, 0xea, 0x12, 0x5c, - 0x80, 0xe0, 0xf4, 0x6a, - 0x04, 0xe0, 0xa6, 0x73, - 0x02, 0xe0, 0xd8, 0x73, - 0x00, 0xea, 0x52, 0x73, - 0x03, 0xe0, 0xe8, 0x73, - 0x23, 0xe0, 0xca, 0x72, - 0x08, 0xe0, 0xf0, 0x72, - 0x00, 0xe2, 0xf6, 0x5b, - 0x07, 0xea, 0x6e, 0x59, + 0x00, 0xe2, 0x14, 0x42, + 0xe0, 0xea, 0xfe, 0x5b, + 0x80, 0xe0, 0xe0, 0x6a, + 0x04, 0xe0, 0x92, 0x73, + 0x02, 0xe0, 0xc4, 0x73, + 0x00, 0xea, 0x3e, 0x73, + 0x03, 0xe0, 0xd4, 0x73, + 0x23, 0xe0, 0xb6, 0x72, + 0x08, 0xe0, 0xdc, 0x72, + 0x00, 0xe2, 0xe2, 0x5b, + 0x07, 0xea, 0x64, 0x59, 0x07, 0xea, 0x04, 0x00, - 0x08, 0x48, 0x29, 0x72, - 0x04, 0x48, 0xc7, 0x62, + 0x08, 0x48, 0x15, 0x72, + 0x04, 0x48, 0xb3, 0x62, 0x01, 0x49, 0x89, 0x30, - 0x00, 0xe2, 0xb8, 0x42, + 0x00, 0xe2, 0xa4, 0x42, 0x01, 0x44, 0xd4, 0x31, - 0x00, 0xe2, 0xb8, 0x42, + 0x00, 0xe2, 0xa4, 0x42, 0x01, 0x00, 0x6c, 0x32, - 0x33, 0xea, 0x68, 0x59, + 0x33, 0xea, 0x5e, 0x59, 0x33, 0xea, 0x00, 0x00, 0x4c, 0x3a, 0xc1, 0x28, 0x01, 0x64, 0xc0, 0x31, - 0x00, 0x36, 0x69, 0x59, + 0x00, 0x36, 0x5f, 0x59, 0x01, 0x36, 0x01, 0x30, - 0x01, 0xe0, 0xee, 0x7a, - 0xa0, 0xea, 0x08, 0x5c, - 0x01, 0xa0, 0xee, 0x62, - 0x01, 0x84, 0xe3, 0x7a, - 0x01, 0x95, 0xf1, 0x6a, - 0x05, 0xea, 0x6e, 0x59, + 0x01, 0xe0, 0xda, 0x7a, + 0xa0, 0xea, 0xf4, 0x5b, + 0x01, 0xa0, 0xda, 0x62, + 0x01, 0x84, 0xcf, 0x7a, + 0x01, 0x95, 0xdd, 0x6a, + 0x05, 0xea, 0x64, 0x59, 0x05, 0xea, 0x04, 0x00, - 0x00, 0xe2, 0xf0, 0x42, - 0x03, 0xea, 0x6e, 0x59, + 0x00, 0xe2, 0xdc, 0x42, + 0x03, 0xea, 0x64, 0x59, 0x03, 0xea, 0x04, 0x00, - 0x00, 0xe2, 0xf0, 0x42, - 0x07, 0xea, 0x1a, 0x5c, + 0x00, 0xe2, 0xdc, 0x42, + 0x07, 0xea, 0x06, 0x5c, 0x01, 0x44, 0xd4, 0x31, - 0x00, 0xe2, 0x28, 0x42, + 0x00, 0xe2, 0x14, 0x42, 0x3f, 0xe0, 0x76, 0x0a, 0xc0, 0x3a, 0xc1, 0x09, 0x00, 0x3b, 0x51, 0x01, @@ -394,54 +384,54 @@ static uint8_t seqprog[] = { 0x01, 0xea, 0xc6, 0x01, 0x02, 0xe2, 0xc8, 0x31, 0x02, 0xec, 0x40, 0x31, - 0xff, 0xa1, 0x10, 0x73, + 0xff, 0xa1, 0xfc, 0x72, 0x02, 0xe8, 0xda, 0x31, 0x02, 0xa0, 0x50, 0x31, - 0x00, 0xe2, 0x32, 0x43, + 0x00, 0xe2, 0x1e, 0x43, 0x80, 0x39, 0x73, 0x02, 0x01, 0x44, 0xd4, 0x31, - 0x00, 0xe2, 0xf6, 0x5b, + 0x00, 0xe2, 0xe2, 0x5b, 0x01, 0x39, 0x73, 0x02, - 0xe0, 0x3c, 0x4d, 0x63, + 0xe0, 0x3c, 0x39, 0x63, 0x02, 0x39, 0x73, 0x02, - 0x20, 0x46, 0x46, 0x63, + 0x20, 0x46, 0x32, 0x63, 0xff, 0xea, 0x52, 0x09, - 0xa8, 0xea, 0x08, 0x5c, - 0x04, 0x92, 0x2d, 0x7b, + 0xa8, 0xea, 0xf4, 0x5b, + 0x04, 0x92, 0x19, 0x7b, 0x01, 0x3a, 0xc1, 0x31, - 0x00, 0x93, 0x2d, 0x63, + 0x00, 0x93, 0x19, 0x63, 0x01, 0x3b, 0xc1, 0x31, - 0x00, 0x94, 0x37, 0x73, + 0x00, 0x94, 0x23, 0x73, 0x01, 0xa9, 0x52, 0x11, - 0xff, 0xa9, 0x22, 0x6b, - 0x00, 0xe2, 0x46, 0x43, + 0xff, 0xa9, 0x0e, 0x6b, + 0x00, 0xe2, 0x32, 0x43, 0x10, 0x39, 0x73, 0x02, - 0x04, 0x92, 0x47, 0x7b, + 0x04, 0x92, 0x33, 0x7b, 0xfb, 0x92, 0x25, 0x0b, 0xff, 0xea, 0x72, 0x0a, - 0x01, 0xa4, 0x41, 0x6b, + 0x01, 0xa4, 0x2d, 0x6b, 0x02, 0xa8, 0x9c, 0x32, - 0x00, 0xe2, 0x88, 0x59, - 0x10, 0x92, 0xf1, 0x7a, - 0xff, 0xea, 0x1a, 0x5c, - 0x00, 0xe2, 0xf0, 0x42, - 0x04, 0xea, 0x6e, 0x59, + 0x00, 0xe2, 0x7e, 0x59, + 0x10, 0x92, 0xdd, 0x7a, + 0xff, 0xea, 0x06, 0x5c, + 0x00, 0xe2, 0xdc, 0x42, + 0x04, 0xea, 0x64, 0x59, 0x04, 0xea, 0x04, 0x00, - 0x00, 0xe2, 0xf0, 0x42, - 0x04, 0xea, 0x6e, 0x59, + 0x00, 0xe2, 0xdc, 0x42, + 0x04, 0xea, 0x64, 0x59, 0x04, 0xea, 0x04, 0x00, - 0x00, 0xe2, 0x28, 0x42, - 0x08, 0x92, 0xe9, 0x7a, - 0xc0, 0x39, 0x5d, 0x7b, - 0x80, 0x39, 0xe9, 0x6a, - 0xff, 0x88, 0x5d, 0x6b, - 0x40, 0x39, 0xe9, 0x6a, - 0x10, 0x92, 0x63, 0x7b, - 0x0a, 0xea, 0x6e, 0x59, + 0x00, 0xe2, 0x14, 0x42, + 0x08, 0x92, 0xd5, 0x7a, + 0xc0, 0x39, 0x49, 0x7b, + 0x80, 0x39, 0xd5, 0x6a, + 0xff, 0x88, 0x49, 0x6b, + 0x40, 0x39, 0xd5, 0x6a, + 0x10, 0x92, 0x4f, 0x7b, + 0x0a, 0xea, 0x64, 0x59, 0x0a, 0xea, 0x04, 0x00, - 0x00, 0xe2, 0x82, 0x5b, - 0x00, 0xe2, 0xc2, 0x43, - 0x50, 0x4b, 0x6a, 0x6b, + 0x00, 0xe2, 0x6e, 0x5b, + 0x00, 0xe2, 0xae, 0x43, + 0x50, 0x4b, 0x56, 0x6b, 0xbf, 0x3a, 0x74, 0x08, 0x01, 0xe0, 0xf4, 0x31, 0xff, 0xea, 0xc0, 0x09, @@ -451,31 +441,31 @@ static uint8_t seqprog[] = { 0x01, 0xfa, 0xc0, 0x35, 0x02, 0xa8, 0x90, 0x32, 0x02, 0xea, 0xb4, 0x00, - 0x33, 0xea, 0x68, 0x59, + 0x33, 0xea, 0x5e, 0x59, 0x33, 0xea, 0x00, 0x00, 0x02, 0x48, 0x51, 0x31, 0xff, 0x90, 0x85, 0x68, - 0xff, 0x88, 0x8f, 0x6b, - 0x01, 0xa4, 0x8b, 0x6b, - 0x02, 0xa4, 0x93, 0x6b, - 0x01, 0x84, 0x93, 0x7b, + 0xff, 0x88, 0x7b, 0x6b, + 0x01, 0xa4, 0x77, 0x6b, + 0x02, 0xa4, 0x7f, 0x6b, + 0x01, 0x84, 0x7f, 0x7b, 0x02, 0x28, 0x19, 0x33, 0x02, 0xa8, 0x50, 0x36, - 0xff, 0x88, 0x93, 0x73, - 0x00, 0xe2, 0x66, 0x5b, + 0xff, 0x88, 0x7f, 0x73, + 0x00, 0xe2, 0x52, 0x5b, 0x02, 0xa8, 0x20, 0x33, 0x04, 0xa4, 0x49, 0x03, 0xff, 0xea, 0x1a, 0x03, - 0xff, 0x2d, 0x9f, 0x63, + 0xff, 0x2d, 0x8b, 0x63, 0x02, 0xa8, 0x58, 0x32, 0x02, 0xa8, 0x5c, 0x36, 0x02, 0xa8, 0x40, 0x31, 0x02, 0x2e, 0x51, 0x31, 0x02, 0xa0, 0x18, 0x33, 0x02, 0xa0, 0x5c, 0x36, - 0xc0, 0x39, 0xe9, 0x6a, + 0xc0, 0x39, 0xd5, 0x6a, 0x04, 0x92, 0x25, 0x03, - 0x20, 0x92, 0xc3, 0x6b, + 0x20, 0x92, 0xaf, 0x6b, 0x02, 0xa8, 0x40, 0x31, 0xc0, 0x3a, 0xc1, 0x09, 0x00, 0x3b, 0x51, 0x01, @@ -490,60 +480,60 @@ static uint8_t seqprog[] = { 0xf7, 0x57, 0xae, 0x08, 0x08, 0xea, 0x98, 0x00, 0x01, 0x44, 0xd4, 0x31, - 0xee, 0x00, 0xcc, 0x6b, + 0xee, 0x00, 0xb8, 0x6b, 0x02, 0xea, 0xb4, 0x00, 0xc0, 0xea, 0x72, 0x02, - 0x09, 0x4c, 0xce, 0x7b, + 0x09, 0x4c, 0xba, 0x7b, 0x01, 0xea, 0x78, 0x02, 0x08, 0x4c, 0x06, 0x68, - 0x0b, 0xea, 0x6e, 0x59, + 0x0b, 0xea, 0x64, 0x59, 0x0b, 0xea, 0x04, 0x00, 0x01, 0x44, 0xd4, 0x31, - 0x20, 0x39, 0x29, 0x7a, - 0x00, 0xe2, 0xe0, 0x5b, - 0x00, 0xe2, 0x28, 0x42, - 0x01, 0x84, 0xe5, 0x7b, + 0x20, 0x39, 0x15, 0x7a, + 0x00, 0xe2, 0xcc, 0x5b, + 0x00, 0xe2, 0x14, 0x42, + 0x01, 0x84, 0xd1, 0x7b, 0x01, 0xa4, 0x49, 0x07, 0x08, 0x60, 0x30, 0x33, 0x08, 0x80, 0x41, 0x37, 0xdf, 0x39, 0x73, 0x0a, - 0xee, 0x00, 0xf2, 0x6b, + 0xee, 0x00, 0xde, 0x6b, 0x05, 0xea, 0xb4, 0x00, - 0x33, 0xea, 0x68, 0x59, + 0x33, 0xea, 0x5e, 0x59, 0x33, 0xea, 0x00, 0x00, - 0x00, 0xe2, 0x88, 0x59, - 0x00, 0xe2, 0xf0, 0x42, - 0xff, 0x42, 0x02, 0x6c, - 0x01, 0x41, 0xf6, 0x6b, - 0x02, 0x41, 0xf6, 0x7b, - 0xff, 0x42, 0x02, 0x6c, - 0x01, 0x41, 0xf6, 0x6b, - 0x02, 0x41, 0xf6, 0x7b, - 0xff, 0x42, 0x02, 0x7c, - 0x04, 0x4c, 0xf6, 0x6b, + 0x00, 0xe2, 0x7e, 0x59, + 0x00, 0xe2, 0xdc, 0x42, + 0xff, 0x42, 0xee, 0x6b, + 0x01, 0x41, 0xe2, 0x6b, + 0x02, 0x41, 0xe2, 0x7b, + 0xff, 0x42, 0xee, 0x6b, + 0x01, 0x41, 0xe2, 0x6b, + 0x02, 0x41, 0xe2, 0x7b, + 0xff, 0x42, 0xee, 0x7b, + 0x04, 0x4c, 0xe2, 0x6b, 0xe0, 0x41, 0x78, 0x0e, 0x01, 0x44, 0xd4, 0x31, - 0xff, 0x42, 0x0a, 0x7c, - 0x04, 0x4c, 0x0a, 0x6c, + 0xff, 0x42, 0xf6, 0x7b, + 0x04, 0x4c, 0xf6, 0x6b, 0xe0, 0x41, 0x78, 0x0a, - 0xe0, 0x3c, 0x29, 0x62, + 0xe0, 0x3c, 0x15, 0x62, 0xff, 0xea, 0xca, 0x09, 0x01, 0xe2, 0xc8, 0x31, 0x01, 0x46, 0xda, 0x35, 0x01, 0x44, 0xd4, 0x35, 0x10, 0xea, 0x80, 0x00, 0x01, 0xe2, 0x6e, 0x36, - 0x04, 0xa6, 0x22, 0x7c, + 0x04, 0xa6, 0x0e, 0x7c, 0xff, 0xea, 0x5a, 0x09, 0xff, 0xea, 0x4c, 0x0d, - 0x01, 0xa6, 0x4e, 0x6c, + 0x01, 0xa6, 0x3a, 0x6c, 0x10, 0xad, 0x84, 0x78, - 0x80, 0xad, 0x46, 0x6c, + 0x80, 0xad, 0x32, 0x6c, 0x08, 0xad, 0x84, 0x68, - 0x20, 0x19, 0x3a, 0x7c, + 0x20, 0x19, 0x26, 0x7c, 0x80, 0xea, 0xb2, 0x01, 0x11, 0x00, 0x00, 0x10, - 0x02, 0xa6, 0x36, 0x7c, + 0x02, 0xa6, 0x22, 0x7c, 0xff, 0xea, 0xb2, 0x0d, 0x11, 0x00, 0x00, 0x10, 0xff, 0xea, 0xb2, 0x09, @@ -571,7 +561,7 @@ static uint8_t seqprog[] = { 0x00, 0x86, 0x0d, 0x23, 0x00, 0x87, 0x0f, 0x23, 0x01, 0x84, 0xc5, 0x31, - 0x80, 0x83, 0x71, 0x7c, + 0x80, 0x83, 0x5d, 0x7c, 0x02, 0xe2, 0xc4, 0x01, 0xff, 0xea, 0x4c, 0x09, 0x01, 0xe2, 0x36, 0x30, @@ -582,75 +572,75 @@ static uint8_t seqprog[] = { 0xfe, 0xa6, 0x4c, 0x0d, 0x0b, 0x98, 0xe1, 0x30, 0xfd, 0xa4, 0x49, 0x09, - 0x80, 0xa3, 0x85, 0x7c, + 0x80, 0xa3, 0x71, 0x7c, 0x02, 0xa4, 0x48, 0x01, 0x01, 0xa4, 0x36, 0x30, 0xa8, 0xea, 0x32, 0x00, 0xfd, 0xa4, 0x49, 0x0b, 0x05, 0xa3, 0x07, 0x33, - 0x80, 0x83, 0x91, 0x6c, + 0x80, 0x83, 0x7d, 0x6c, 0x02, 0xea, 0x4c, 0x05, 0xff, 0xea, 0x4c, 0x0d, - 0x00, 0xe2, 0x60, 0x59, - 0x02, 0xa6, 0x24, 0x6c, + 0x00, 0xe2, 0x56, 0x59, + 0x02, 0xa6, 0x10, 0x6c, 0x80, 0xf9, 0xf2, 0x05, - 0xc0, 0x39, 0x9f, 0x7c, - 0x03, 0xea, 0x6e, 0x59, + 0xc0, 0x39, 0x8b, 0x7c, + 0x03, 0xea, 0x64, 0x59, 0x03, 0xea, 0x04, 0x00, - 0x20, 0x39, 0xc3, 0x7c, - 0x01, 0x84, 0xa9, 0x6c, - 0x06, 0xea, 0x6e, 0x59, + 0x20, 0x39, 0xaf, 0x7c, + 0x01, 0x84, 0x95, 0x6c, + 0x06, 0xea, 0x64, 0x59, 0x06, 0xea, 0x04, 0x00, - 0x00, 0xe2, 0xc6, 0x44, + 0x00, 0xe2, 0xb2, 0x44, 0x01, 0x00, 0x6c, 0x32, - 0xee, 0x00, 0xb2, 0x6c, + 0xee, 0x00, 0x9e, 0x6c, 0x05, 0xea, 0xb4, 0x00, - 0x33, 0xea, 0x68, 0x59, + 0x33, 0xea, 0x5e, 0x59, 0x33, 0xea, 0x00, 0x00, 0x80, 0x3d, 0x7a, 0x00, - 0xfc, 0x42, 0xb4, 0x7c, + 0xfc, 0x42, 0xa0, 0x7c, 0x7f, 0x3d, 0x7a, 0x08, - 0x00, 0x36, 0x69, 0x59, + 0x00, 0x36, 0x5f, 0x59, 0x01, 0x36, 0x01, 0x30, - 0x09, 0xea, 0x6e, 0x59, + 0x09, 0xea, 0x64, 0x59, 0x09, 0xea, 0x04, 0x00, - 0x00, 0xe2, 0x28, 0x42, - 0x01, 0xa4, 0xa9, 0x6c, - 0x00, 0xe2, 0x7c, 0x5c, + 0x00, 0xe2, 0x14, 0x42, + 0x01, 0xa4, 0x95, 0x6c, + 0x00, 0xe2, 0x68, 0x5c, 0x20, 0x39, 0x73, 0x02, 0x01, 0x00, 0x6c, 0x32, - 0x02, 0xa6, 0xce, 0x7c, - 0x00, 0xe2, 0x92, 0x5c, + 0x02, 0xa6, 0xba, 0x7c, + 0x00, 0xe2, 0x7e, 0x5c, 0x00, 0xe2, 0x76, 0x58, 0x00, 0xe2, 0x86, 0x58, 0x00, 0xe2, 0x5a, 0x58, - 0x00, 0x36, 0x69, 0x59, + 0x00, 0x36, 0x5f, 0x59, 0x01, 0x36, 0x01, 0x30, - 0x20, 0x19, 0xce, 0x6c, - 0x00, 0xe2, 0xfe, 0x5c, - 0x04, 0x19, 0xe8, 0x6c, + 0x20, 0x19, 0xba, 0x6c, + 0x00, 0xe2, 0xea, 0x5c, + 0x04, 0x19, 0xd4, 0x6c, 0x02, 0x19, 0x32, 0x00, - 0x01, 0x84, 0xe9, 0x7c, - 0x01, 0x1b, 0xe2, 0x7c, - 0x01, 0x1a, 0xe8, 0x6c, - 0x00, 0xe2, 0x98, 0x44, - 0x80, 0x4b, 0xee, 0x6c, - 0x01, 0x4c, 0xea, 0x7c, - 0x03, 0x42, 0x98, 0x6c, - 0x00, 0xe2, 0x1e, 0x5c, + 0x01, 0x84, 0xd5, 0x7c, + 0x01, 0x1b, 0xce, 0x7c, + 0x01, 0x1a, 0xd4, 0x6c, + 0x00, 0xe2, 0x84, 0x44, + 0x80, 0x4b, 0xda, 0x6c, + 0x01, 0x4c, 0xd6, 0x7c, + 0x03, 0x42, 0x84, 0x6c, + 0x00, 0xe2, 0x0a, 0x5c, 0x80, 0xf9, 0xf2, 0x01, - 0x04, 0x39, 0x29, 0x7a, - 0x00, 0xe2, 0x28, 0x42, - 0x08, 0x5d, 0x06, 0x6d, + 0x04, 0x39, 0x15, 0x7a, + 0x00, 0xe2, 0x14, 0x42, + 0x08, 0x5d, 0xf2, 0x6c, 0x00, 0xe2, 0x76, 0x58, - 0x00, 0x36, 0x69, 0x59, + 0x00, 0x36, 0x5f, 0x59, 0x01, 0x36, 0x01, 0x30, - 0x02, 0x1b, 0xf6, 0x7c, - 0x08, 0x5d, 0x04, 0x7d, + 0x02, 0x1b, 0xe2, 0x7c, + 0x08, 0x5d, 0xf0, 0x7c, 0x03, 0x68, 0x00, 0x37, 0x01, 0x84, 0x09, 0x07, - 0x80, 0x1b, 0x10, 0x7d, - 0x80, 0x84, 0x11, 0x6d, + 0x80, 0x1b, 0xfc, 0x7c, + 0x80, 0x84, 0xfd, 0x6c, 0xff, 0x85, 0x0b, 0x1b, 0xff, 0x86, 0x0d, 0x23, 0xff, 0x87, 0x0f, 0x23, @@ -662,164 +652,161 @@ static uint8_t seqprog[] = { 0xf9, 0xd9, 0xb2, 0x0d, 0x01, 0xd9, 0xb2, 0x05, 0x01, 0x52, 0x48, 0x31, - 0x20, 0xa4, 0x3a, 0x7d, - 0x20, 0x5b, 0x3a, 0x7d, - 0x80, 0xf9, 0x48, 0x7d, + 0x20, 0xa4, 0x26, 0x7d, + 0x20, 0x5b, 0x26, 0x7d, + 0x80, 0xf9, 0x34, 0x7d, 0x02, 0xea, 0xb4, 0x00, 0x11, 0x00, 0x00, 0x10, - 0x04, 0x19, 0x54, 0x7d, + 0x04, 0x19, 0x40, 0x7d, 0xdf, 0x19, 0x32, 0x08, - 0x60, 0x5b, 0x54, 0x6d, - 0x01, 0x4c, 0x2e, 0x7d, + 0x60, 0x5b, 0x40, 0x6d, + 0x01, 0x4c, 0x1a, 0x7d, 0x20, 0x19, 0x32, 0x00, 0x01, 0xd9, 0xb2, 0x05, 0x02, 0xea, 0xb4, 0x00, 0x01, 0xd9, 0xb2, 0x05, - 0x10, 0x5b, 0x4c, 0x6d, - 0x08, 0x5b, 0x56, 0x6d, - 0x20, 0x5b, 0x46, 0x6d, - 0x02, 0x5b, 0x76, 0x6d, - 0x0e, 0xea, 0x6e, 0x59, + 0x10, 0x5b, 0x38, 0x6d, + 0x08, 0x5b, 0x42, 0x6d, + 0x20, 0x5b, 0x32, 0x6d, + 0x02, 0x5b, 0x62, 0x6d, + 0x0e, 0xea, 0x64, 0x59, 0x0e, 0xea, 0x04, 0x00, - 0x80, 0xf9, 0x36, 0x6d, + 0x80, 0xf9, 0x22, 0x6d, 0xdf, 0x5c, 0xb8, 0x08, 0x01, 0xd9, 0xb2, 0x05, - 0x01, 0xa4, 0x37, 0x6e, - 0x00, 0xe2, 0x7c, 0x5c, - 0x00, 0xe2, 0x80, 0x5d, + 0x01, 0xa4, 0x1d, 0x6e, + 0x00, 0xe2, 0x68, 0x5c, + 0x00, 0xe2, 0x6c, 0x5d, 0x01, 0x90, 0x21, 0x1b, 0x01, 0xd9, 0xb2, 0x05, - 0x00, 0xe2, 0x66, 0x5b, + 0x00, 0xe2, 0x52, 0x5b, 0xf3, 0x96, 0xd5, 0x19, - 0x00, 0xe2, 0x64, 0x55, - 0x80, 0x96, 0x65, 0x6d, - 0x0f, 0xea, 0x6e, 0x59, + 0x00, 0xe2, 0x50, 0x55, + 0x80, 0x96, 0x51, 0x6d, + 0x0f, 0xea, 0x64, 0x59, 0x0f, 0xea, 0x04, 0x00, - 0x00, 0xe2, 0x6c, 0x45, + 0x00, 0xe2, 0x58, 0x45, 0x04, 0x8c, 0xe1, 0x30, 0x01, 0xea, 0xf2, 0x00, 0x02, 0xea, 0x36, 0x00, 0xa8, 0xea, 0x32, 0x00, - 0xff, 0x97, 0x73, 0x7d, - 0x14, 0xea, 0x6e, 0x59, + 0xff, 0x97, 0x5f, 0x7d, + 0x14, 0xea, 0x64, 0x59, 0x14, 0xea, 0x04, 0x00, - 0x00, 0xe2, 0xe2, 0x5d, + 0x00, 0xe2, 0xce, 0x5d, 0x01, 0xd9, 0xb2, 0x05, 0x09, 0x80, 0xe1, 0x30, 0x02, 0xea, 0x36, 0x00, 0xa8, 0xea, 0x32, 0x00, - 0x00, 0xe2, 0xda, 0x5d, + 0x00, 0xe2, 0xc6, 0x5d, 0x01, 0xd9, 0xb2, 0x05, - 0x02, 0xa6, 0x90, 0x7d, - 0x00, 0xe2, 0x60, 0x59, - 0x20, 0x5b, 0x9e, 0x6d, - 0xfc, 0x42, 0x8a, 0x7d, - 0x10, 0x40, 0x8c, 0x6d, - 0x20, 0x4d, 0x8e, 0x7d, - 0x08, 0x5d, 0x9e, 0x6d, - 0x02, 0xa6, 0x24, 0x6c, - 0x00, 0xe2, 0x60, 0x59, - 0x20, 0x5b, 0x9e, 0x6d, - 0x01, 0x1b, 0xbe, 0x6d, - 0xfc, 0x42, 0x9a, 0x7d, - 0x10, 0x40, 0x9c, 0x6d, + 0x02, 0xa6, 0x7c, 0x7d, + 0x00, 0xe2, 0x56, 0x59, + 0x20, 0x5b, 0x8a, 0x6d, + 0xfc, 0x42, 0x76, 0x7d, + 0x10, 0x40, 0x78, 0x6d, + 0x20, 0x4d, 0x7a, 0x7d, + 0x08, 0x5d, 0x8a, 0x6d, + 0x02, 0xa6, 0x10, 0x6c, + 0x00, 0xe2, 0x56, 0x59, + 0x20, 0x5b, 0x8a, 0x6d, + 0x01, 0x1b, 0xaa, 0x6d, + 0xfc, 0x42, 0x86, 0x7d, + 0x10, 0x40, 0x88, 0x6d, 0x20, 0x4d, 0x84, 0x78, 0x08, 0x5d, 0x84, 0x78, 0x02, 0x19, 0x32, 0x00, 0x01, 0x5b, 0x40, 0x31, - 0x00, 0xe2, 0xfe, 0x5c, - 0x00, 0xe2, 0xe0, 0x5b, + 0x00, 0xe2, 0xea, 0x5c, + 0x00, 0xe2, 0xcc, 0x5b, 0x20, 0xea, 0xb6, 0x00, - 0x00, 0xe2, 0x1e, 0x5c, + 0x00, 0xe2, 0x0a, 0x5c, 0x20, 0x5c, 0xb8, 0x00, - 0x04, 0x19, 0xb4, 0x6d, - 0x01, 0x1a, 0xb4, 0x6d, - 0x00, 0xe2, 0x60, 0x59, + 0x04, 0x19, 0xa0, 0x6d, + 0x01, 0x1a, 0xa0, 0x6d, + 0x00, 0xe2, 0x56, 0x59, 0x01, 0x1a, 0x84, 0x78, 0x80, 0xf9, 0xf2, 0x01, - 0x20, 0xa0, 0x18, 0x7e, + 0x20, 0xa0, 0x04, 0x7e, 0xff, 0x90, 0x21, 0x1b, - 0x08, 0x92, 0x77, 0x6b, + 0x08, 0x92, 0x63, 0x6b, 0x02, 0xea, 0xb4, 0x04, 0x01, 0xa4, 0x49, 0x03, - 0x40, 0x5b, 0xce, 0x6d, - 0x00, 0xe2, 0x60, 0x59, - 0x40, 0x5b, 0xce, 0x6d, - 0x04, 0x5d, 0x38, 0x7e, - 0x01, 0x1a, 0x38, 0x7e, + 0x40, 0x5b, 0xba, 0x6d, + 0x00, 0xe2, 0x56, 0x59, + 0x40, 0x5b, 0xba, 0x6d, + 0x04, 0x5d, 0x1e, 0x7e, + 0x01, 0x1a, 0x1e, 0x7e, 0x20, 0x4d, 0x84, 0x78, - 0x40, 0x5b, 0x18, 0x7e, - 0x04, 0x5d, 0x38, 0x7e, - 0x01, 0x1a, 0x38, 0x7e, + 0x40, 0x5b, 0x04, 0x7e, + 0x04, 0x5d, 0x1e, 0x7e, + 0x01, 0x1a, 0x1e, 0x7e, 0x80, 0xf9, 0xf2, 0x01, 0xff, 0x90, 0x21, 0x1b, - 0x08, 0x92, 0x77, 0x6b, + 0x08, 0x92, 0x63, 0x6b, 0x02, 0xea, 0xb4, 0x04, - 0x00, 0xe2, 0x60, 0x59, + 0x00, 0xe2, 0x56, 0x59, 0x01, 0x1b, 0x84, 0x78, 0x80, 0xf9, 0xf2, 0x01, 0x02, 0xea, 0xb4, 0x04, - 0x00, 0xe2, 0x60, 0x59, - 0x01, 0x1b, 0xf6, 0x6d, - 0x40, 0x5b, 0x04, 0x7e, - 0x01, 0x1b, 0xf6, 0x6d, + 0x00, 0xe2, 0x56, 0x59, + 0x01, 0x1b, 0xe2, 0x6d, + 0x40, 0x5b, 0xf0, 0x7d, + 0x01, 0x1b, 0xe2, 0x6d, 0x02, 0x19, 0x32, 0x00, 0x01, 0x1a, 0x84, 0x78, 0x80, 0xf9, 0xf2, 0x01, 0xff, 0xea, 0x10, 0x03, 0x08, 0x92, 0x25, 0x03, - 0x00, 0xe2, 0x76, 0x43, - 0x01, 0x1a, 0x00, 0x7e, - 0x40, 0x5b, 0xfc, 0x7d, - 0x01, 0x1a, 0xea, 0x6d, + 0x00, 0xe2, 0x62, 0x43, + 0x01, 0x1a, 0xec, 0x7d, + 0x40, 0x5b, 0xe8, 0x7d, + 0x01, 0x1a, 0xd6, 0x6d, 0xfc, 0x42, 0x84, 0x78, - 0x01, 0x1a, 0x04, 0x6e, - 0x10, 0xea, 0x6e, 0x59, + 0x01, 0x1a, 0xf0, 0x6d, + 0x10, 0xea, 0x64, 0x59, 0x10, 0xea, 0x04, 0x00, 0xfc, 0x42, 0x84, 0x78, - 0x10, 0x40, 0x0a, 0x6e, + 0x10, 0x40, 0xf6, 0x6d, 0x20, 0x4d, 0x84, 0x78, - 0x40, 0x5b, 0xea, 0x6d, + 0x40, 0x5b, 0xd6, 0x6d, 0x01, 0x1a, 0x84, 0x78, 0x01, 0x90, 0x21, 0x1b, 0x30, 0x3f, 0xc0, 0x09, 0x30, 0xe0, 0x84, 0x60, 0x40, 0x4b, 0x84, 0x68, 0xff, 0xea, 0x52, 0x01, - 0xee, 0x00, 0x20, 0x6e, + 0xee, 0x00, 0x0c, 0x6e, 0x80, 0xf9, 0xf2, 0x01, 0xff, 0x90, 0x21, 0x1b, 0x02, 0xea, 0xb4, 0x00, 0x20, 0xea, 0x9a, 0x00, - 0x04, 0x41, 0x26, 0x7e, - 0x08, 0xea, 0x98, 0x00, - 0x08, 0x57, 0xae, 0x00, - 0xf3, 0x42, 0x30, 0x6e, - 0x12, 0xea, 0x6e, 0x59, + 0xf3, 0x42, 0x16, 0x6e, + 0x12, 0xea, 0x64, 0x59, 0x12, 0xea, 0x04, 0x00, - 0x00, 0xe2, 0x28, 0x42, - 0x0d, 0xea, 0x6e, 0x59, + 0x00, 0xe2, 0x14, 0x42, + 0x0d, 0xea, 0x64, 0x59, 0x0d, 0xea, 0x04, 0x00, - 0x00, 0xe2, 0x28, 0x42, + 0x00, 0xe2, 0x14, 0x42, 0x01, 0x90, 0x21, 0x1b, - 0x11, 0xea, 0x6e, 0x59, + 0x11, 0xea, 0x64, 0x59, 0x11, 0xea, 0x04, 0x00, - 0x00, 0xe2, 0x66, 0x5b, + 0x00, 0xe2, 0x52, 0x5b, 0x08, 0x5a, 0xb4, 0x00, - 0x00, 0xe2, 0x5e, 0x5e, + 0x00, 0xe2, 0x44, 0x5e, 0xa8, 0xea, 0x32, 0x00, - 0x00, 0xe2, 0x60, 0x59, - 0x80, 0x1a, 0x4c, 0x7e, - 0x00, 0xe2, 0x5e, 0x5e, + 0x00, 0xe2, 0x56, 0x59, + 0x80, 0x1a, 0x32, 0x7e, + 0x00, 0xe2, 0x44, 0x5e, 0x80, 0x19, 0x32, 0x00, - 0x40, 0x5b, 0x52, 0x6e, - 0x08, 0x5a, 0x52, 0x7e, + 0x40, 0x5b, 0x38, 0x6e, + 0x08, 0x5a, 0x38, 0x7e, 0x20, 0x4d, 0x84, 0x78, 0x02, 0x84, 0x09, 0x03, - 0x40, 0x5b, 0x18, 0x7e, + 0x40, 0x5b, 0x04, 0x7e, 0xff, 0x90, 0x21, 0x1b, 0x80, 0xf9, 0xf2, 0x01, - 0x08, 0x92, 0x77, 0x6b, + 0x08, 0x92, 0x63, 0x6b, 0x02, 0xea, 0xb4, 0x04, 0x01, 0x40, 0xe1, 0x30, 0x05, 0x41, 0xe3, 0x98, @@ -1052,138 +1039,138 @@ static struct patch { { ahd_patch0_func, 64, 1, 1 }, { ahd_patch2_func, 67, 1, 2 }, { ahd_patch0_func, 68, 1, 1 }, - { ahd_patch4_func, 115, 1, 1 }, - { ahd_patch2_func, 180, 3, 1 }, - { ahd_patch1_func, 183, 2, 1 }, - { ahd_patch5_func, 185, 1, 1 }, - { ahd_patch2_func, 194, 1, 2 }, - { ahd_patch0_func, 195, 1, 1 }, - { ahd_patch6_func, 196, 2, 2 }, - { ahd_patch0_func, 198, 6, 3 }, - { ahd_patch2_func, 201, 1, 2 }, - { ahd_patch0_func, 202, 1, 1 }, - { ahd_patch2_func, 205, 1, 2 }, - { ahd_patch0_func, 206, 1, 1 }, - { ahd_patch3_func, 208, 1, 1 }, - { ahd_patch7_func, 209, 3, 1 }, - { ahd_patch3_func, 218, 1, 1 }, - { ahd_patch5_func, 219, 16, 2 }, - { ahd_patch0_func, 235, 1, 1 }, - { ahd_patch8_func, 260, 2, 1 }, - { ahd_patch1_func, 264, 1, 2 }, - { ahd_patch0_func, 265, 1, 1 }, - { ahd_patch7_func, 268, 3, 1 }, - { ahd_patch1_func, 283, 1, 2 }, - { ahd_patch0_func, 284, 1, 1 }, - { ahd_patch1_func, 287, 1, 2 }, - { ahd_patch0_func, 288, 1, 1 }, - { ahd_patch2_func, 291, 1, 2 }, - { ahd_patch0_func, 292, 1, 1 }, - { ahd_patch9_func, 305, 2, 2 }, - { ahd_patch0_func, 307, 1, 1 }, - { ahd_patch1_func, 349, 1, 2 }, - { ahd_patch0_func, 350, 1, 1 }, - { ahd_patch2_func, 358, 1, 2 }, - { ahd_patch0_func, 359, 1, 1 }, - { ahd_patch2_func, 362, 1, 2 }, + { ahd_patch4_func, 116, 1, 1 }, + { ahd_patch2_func, 175, 3, 1 }, + { ahd_patch1_func, 178, 2, 1 }, + { ahd_patch5_func, 180, 1, 1 }, + { ahd_patch2_func, 189, 1, 2 }, + { ahd_patch0_func, 190, 1, 1 }, + { ahd_patch6_func, 191, 2, 2 }, + { ahd_patch0_func, 193, 6, 3 }, + { ahd_patch2_func, 196, 1, 2 }, + { ahd_patch0_func, 197, 1, 1 }, + { ahd_patch2_func, 200, 1, 2 }, + { ahd_patch0_func, 201, 1, 1 }, + { ahd_patch3_func, 203, 1, 1 }, + { ahd_patch7_func, 204, 3, 1 }, + { ahd_patch3_func, 213, 1, 1 }, + { ahd_patch5_func, 214, 16, 2 }, + { ahd_patch0_func, 230, 1, 1 }, + { ahd_patch8_func, 250, 2, 1 }, + { ahd_patch1_func, 254, 1, 2 }, + { ahd_patch0_func, 255, 1, 1 }, + { ahd_patch7_func, 258, 3, 1 }, + { ahd_patch1_func, 273, 1, 2 }, + { ahd_patch0_func, 274, 1, 1 }, + { ahd_patch1_func, 277, 1, 2 }, + { ahd_patch0_func, 278, 1, 1 }, + { ahd_patch2_func, 281, 1, 2 }, + { ahd_patch0_func, 282, 1, 1 }, + { ahd_patch9_func, 295, 2, 2 }, + { ahd_patch0_func, 297, 1, 1 }, + { ahd_patch1_func, 339, 1, 2 }, + { ahd_patch0_func, 340, 1, 1 }, + { ahd_patch2_func, 348, 1, 2 }, + { ahd_patch0_func, 349, 1, 1 }, + { ahd_patch2_func, 352, 1, 2 }, + { ahd_patch0_func, 353, 1, 1 }, + { ahd_patch1_func, 359, 1, 2 }, + { ahd_patch0_func, 360, 1, 1 }, + { ahd_patch1_func, 362, 1, 2 }, { ahd_patch0_func, 363, 1, 1 }, - { ahd_patch1_func, 369, 1, 2 }, - { ahd_patch0_func, 370, 1, 1 }, - { ahd_patch1_func, 372, 1, 2 }, - { ahd_patch0_func, 373, 1, 1 }, - { ahd_patch10_func, 392, 1, 1 }, - { ahd_patch10_func, 395, 1, 1 }, - { ahd_patch10_func, 397, 1, 1 }, - { ahd_patch10_func, 409, 1, 1 }, - { ahd_patch1_func, 419, 1, 2 }, - { ahd_patch0_func, 420, 1, 1 }, - { ahd_patch1_func, 422, 1, 2 }, - { ahd_patch0_func, 423, 1, 1 }, - { ahd_patch1_func, 431, 1, 2 }, - { ahd_patch0_func, 432, 1, 1 }, - { ahd_patch2_func, 445, 1, 2 }, - { ahd_patch0_func, 446, 1, 1 }, - { ahd_patch11_func, 482, 1, 1 }, - { ahd_patch1_func, 490, 1, 2 }, - { ahd_patch0_func, 491, 1, 1 }, - { ahd_patch2_func, 503, 1, 2 }, - { ahd_patch0_func, 504, 1, 1 }, - { ahd_patch12_func, 507, 6, 2 }, - { ahd_patch0_func, 513, 1, 1 }, - { ahd_patch13_func, 534, 7, 1 }, - { ahd_patch14_func, 543, 1, 1 }, - { ahd_patch15_func, 552, 1, 1 }, - { ahd_patch16_func, 553, 1, 2 }, - { ahd_patch0_func, 554, 1, 1 }, - { ahd_patch17_func, 557, 1, 1 }, - { ahd_patch16_func, 558, 1, 1 }, - { ahd_patch18_func, 569, 1, 2 }, - { ahd_patch0_func, 570, 1, 1 }, - { ahd_patch1_func, 589, 1, 2 }, + { ahd_patch10_func, 382, 1, 1 }, + { ahd_patch10_func, 385, 1, 1 }, + { ahd_patch10_func, 387, 1, 1 }, + { ahd_patch10_func, 399, 1, 1 }, + { ahd_patch1_func, 409, 1, 2 }, + { ahd_patch0_func, 410, 1, 1 }, + { ahd_patch1_func, 412, 1, 2 }, + { ahd_patch0_func, 413, 1, 1 }, + { ahd_patch1_func, 421, 1, 2 }, + { ahd_patch0_func, 422, 1, 1 }, + { ahd_patch2_func, 435, 1, 2 }, + { ahd_patch0_func, 436, 1, 1 }, + { ahd_patch11_func, 472, 1, 1 }, + { ahd_patch1_func, 480, 1, 2 }, + { ahd_patch0_func, 481, 1, 1 }, + { ahd_patch2_func, 493, 1, 2 }, + { ahd_patch0_func, 494, 1, 1 }, + { ahd_patch12_func, 497, 6, 2 }, + { ahd_patch0_func, 503, 1, 1 }, + { ahd_patch13_func, 524, 7, 1 }, + { ahd_patch14_func, 533, 1, 1 }, + { ahd_patch15_func, 542, 1, 1 }, + { ahd_patch16_func, 543, 1, 2 }, + { ahd_patch0_func, 544, 1, 1 }, + { ahd_patch17_func, 547, 1, 1 }, + { ahd_patch16_func, 548, 1, 1 }, + { ahd_patch18_func, 559, 1, 2 }, + { ahd_patch0_func, 560, 1, 1 }, + { ahd_patch1_func, 579, 1, 2 }, + { ahd_patch0_func, 580, 1, 1 }, + { ahd_patch1_func, 583, 1, 2 }, + { ahd_patch0_func, 584, 1, 1 }, + { ahd_patch2_func, 589, 1, 2 }, { ahd_patch0_func, 590, 1, 1 }, - { ahd_patch1_func, 593, 1, 2 }, - { ahd_patch0_func, 594, 1, 1 }, - { ahd_patch2_func, 599, 1, 2 }, - { ahd_patch0_func, 600, 1, 1 }, - { ahd_patch2_func, 604, 1, 2 }, - { ahd_patch0_func, 605, 1, 1 }, - { ahd_patch1_func, 606, 1, 2 }, - { ahd_patch0_func, 607, 1, 1 }, - { ahd_patch2_func, 618, 1, 2 }, - { ahd_patch0_func, 619, 1, 1 }, - { ahd_patch19_func, 623, 1, 1 }, - { ahd_patch20_func, 628, 1, 1 }, - { ahd_patch21_func, 629, 2, 1 }, - { ahd_patch20_func, 633, 1, 2 }, - { ahd_patch0_func, 634, 1, 1 }, - { ahd_patch2_func, 637, 1, 2 }, - { ahd_patch0_func, 638, 1, 1 }, - { ahd_patch2_func, 653, 1, 2 }, - { ahd_patch0_func, 654, 1, 1 }, - { ahd_patch13_func, 655, 14, 1 }, - { ahd_patch1_func, 673, 1, 2 }, - { ahd_patch0_func, 674, 1, 1 }, - { ahd_patch13_func, 675, 1, 1 }, - { ahd_patch1_func, 687, 1, 2 }, - { ahd_patch0_func, 688, 1, 1 }, - { ahd_patch1_func, 695, 1, 2 }, - { ahd_patch0_func, 696, 1, 1 }, - { ahd_patch19_func, 719, 1, 1 }, - { ahd_patch19_func, 757, 1, 1 }, - { ahd_patch1_func, 768, 1, 2 }, - { ahd_patch0_func, 769, 1, 1 }, - { ahd_patch7_func, 785, 3, 1 }, - { ahd_patch1_func, 789, 1, 2 }, - { ahd_patch0_func, 790, 1, 1 }, - { ahd_patch1_func, 792, 1, 2 }, - { ahd_patch0_func, 793, 1, 1 }, - { ahd_patch1_func, 796, 1, 2 }, - { ahd_patch0_func, 797, 1, 1 }, - { ahd_patch22_func, 799, 1, 2 }, - { ahd_patch0_func, 800, 2, 1 }, - { ahd_patch23_func, 803, 4, 2 }, - { ahd_patch0_func, 807, 1, 1 }, - { ahd_patch23_func, 815, 11, 1 } + { ahd_patch2_func, 594, 1, 2 }, + { ahd_patch0_func, 595, 1, 1 }, + { ahd_patch1_func, 596, 1, 2 }, + { ahd_patch0_func, 597, 1, 1 }, + { ahd_patch2_func, 608, 1, 2 }, + { ahd_patch0_func, 609, 1, 1 }, + { ahd_patch19_func, 613, 1, 1 }, + { ahd_patch20_func, 618, 1, 1 }, + { ahd_patch21_func, 619, 2, 1 }, + { ahd_patch20_func, 623, 1, 2 }, + { ahd_patch0_func, 624, 1, 1 }, + { ahd_patch2_func, 627, 1, 2 }, + { ahd_patch0_func, 628, 1, 1 }, + { ahd_patch2_func, 643, 1, 2 }, + { ahd_patch0_func, 644, 1, 1 }, + { ahd_patch13_func, 645, 14, 1 }, + { ahd_patch1_func, 663, 1, 2 }, + { ahd_patch0_func, 664, 1, 1 }, + { ahd_patch13_func, 665, 1, 1 }, + { ahd_patch1_func, 677, 1, 2 }, + { ahd_patch0_func, 678, 1, 1 }, + { ahd_patch1_func, 685, 1, 2 }, + { ahd_patch0_func, 686, 1, 1 }, + { ahd_patch19_func, 709, 1, 1 }, + { ahd_patch19_func, 747, 1, 1 }, + { ahd_patch1_func, 758, 1, 2 }, + { ahd_patch0_func, 759, 1, 1 }, + { ahd_patch1_func, 776, 1, 2 }, + { ahd_patch0_func, 777, 1, 1 }, + { ahd_patch1_func, 779, 1, 2 }, + { ahd_patch0_func, 780, 1, 1 }, + { ahd_patch1_func, 783, 1, 2 }, + { ahd_patch0_func, 784, 1, 1 }, + { ahd_patch22_func, 786, 1, 2 }, + { ahd_patch0_func, 787, 2, 1 }, + { ahd_patch23_func, 790, 4, 2 }, + { ahd_patch0_func, 794, 1, 1 }, + { ahd_patch23_func, 802, 11, 1 } }; static struct cs { uint16_t begin; uint16_t end; } critical_sections[] = { - { 17, 30 }, + { 17, 28 }, + { 29, 30 }, { 47, 58 }, { 61, 63 }, { 65, 66 }, { 72, 92 }, - { 110, 142 }, - { 143, 180 }, - { 185, 193 }, - { 218, 274 }, - { 435, 443 }, - { 453, 455 }, - { 458, 467 }, - { 719, 749 }, - { 759, 763 } + { 110, 137 }, + { 138, 175 }, + { 180, 188 }, + { 213, 264 }, + { 425, 433 }, + { 443, 445 }, + { 448, 457 }, + { 709, 739 }, + { 749, 753 } }; static const int num_critical_sections = sizeof(critical_sections) diff --git a/trunk/drivers/scsi/aic7xxx/aicasm/aicasm.c b/trunk/drivers/scsi/aic7xxx/aicasm/aicasm.c index 924102720b14..f936b691232f 100644 --- a/trunk/drivers/scsi/aic7xxx/aicasm/aicasm.c +++ b/trunk/drivers/scsi/aic7xxx/aicasm/aicasm.c @@ -37,7 +37,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm.c#23 $ + * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm.c#22 $ * * $FreeBSD$ */ @@ -609,10 +609,10 @@ output_listing(char *ifilename) while (line < cur_instr->srcline) { fgets(buf, sizeof(buf), ifile); - fprintf(listfile, " \t%s", buf); + fprintf(listfile, "\t\t%s", buf); line++; } - fprintf(listfile, "%04x %02x%02x%02x%02x", instrptr, + fprintf(listfile, "%03x %02x%02x%02x%02x", instrptr, #ifdef __LITTLE_ENDIAN cur_instr->format.bytes[0], cur_instr->format.bytes[1], @@ -624,23 +624,14 @@ output_listing(char *ifilename) cur_instr->format.bytes[1], cur_instr->format.bytes[0]); #endif - /* - * Macro expansions can cause several instructions - * to be output for a single source line. Only - * advance the line once in these cases. - */ - if (line == cur_instr->srcline) { - fgets(buf, sizeof(buf), ifile); - fprintf(listfile, "\t%s", buf); - line++; - } else { - fprintf(listfile, "\n"); - } + fgets(buf, sizeof(buf), ifile); + fprintf(listfile, "\t%s", buf); + line++; instrptr++; } /* Dump the remainder of the file */ while(fgets(buf, sizeof(buf), ifile) != NULL) - fprintf(listfile, " %s", buf); + fprintf(listfile, "\t\t%s", buf); fclose(ifile); } diff --git a/trunk/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y b/trunk/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y index c328596def3c..67e046d96625 100644 --- a/trunk/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y +++ b/trunk/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y @@ -38,7 +38,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_gram.y#30 $ + * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_gram.y#29 $ * * $FreeBSD$ */ @@ -157,8 +157,6 @@ static int is_download_const(expression_t *immed); %token T_END_CS -%token T_PAD_PAGE - %token T_FIELD %token T_ENUM @@ -191,10 +189,6 @@ static int is_download_const(expression_t *immed); %token T_OR -/* 16 bit extensions */ -%token T_OR16 T_AND16 T_XOR16 T_ADD16 -%token T_ADC16 T_MVI16 T_TEST16 T_CMP16 T_CMPXCHG - %token T_RET %token T_NOP @@ -213,7 +207,7 @@ static int is_download_const(expression_t *immed); %type expression immediate immediate_or_a -%type export ret f1_opcode f2_opcode f4_opcode jmp_jc_jnc_call jz_jnz je_jne +%type export ret f1_opcode f2_opcode jmp_jc_jnc_call jz_jnz je_jne %type mode_value mode_list macro_arglist @@ -1310,15 +1304,6 @@ f2_opcode: | T_ROR { $$ = AIC_OP_ROR; } ; -f4_opcode: - T_OR16 { $$ = AIC_OP_OR16; } -| T_AND16 { $$ = AIC_OP_AND16; } -| T_XOR16 { $$ = AIC_OP_XOR16; } -| T_ADD16 { $$ = AIC_OP_ADD16; } -| T_ADC16 { $$ = AIC_OP_ADC16; } -| T_MVI16 { $$ = AIC_OP_MVI16; } -; - code: f2_opcode destination ',' expression opt_source ret ';' { diff --git a/trunk/drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h b/trunk/drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h index 9df9e2ce3538..e64f802bbaaa 100644 --- a/trunk/drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h +++ b/trunk/drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h @@ -37,14 +37,13 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_insformat.h#12 $ + * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_insformat.h#11 $ * * $FreeBSD$ */ #include -/* 8bit ALU logic operations */ struct ins_format1 { #ifdef __LITTLE_ENDIAN uint32_t immediate : 8, @@ -63,7 +62,6 @@ struct ins_format1 { #endif }; -/* 8bit ALU shift/rotate operations */ struct ins_format2 { #ifdef __LITTLE_ENDIAN uint32_t shift_control : 8, @@ -82,7 +80,6 @@ struct ins_format2 { #endif }; -/* 8bit branch control operations */ struct ins_format3 { #ifdef __LITTLE_ENDIAN uint32_t immediate : 8, @@ -99,68 +96,10 @@ struct ins_format3 { #endif }; -/* 16bit ALU logic operations */ -struct ins_format4 { -#ifdef __LITTLE_ENDIAN - uint32_t opcode_ext : 8, - source : 9, - destination : 9, - ret : 1, - opcode : 4, - parity : 1; -#else - uint32_t parity : 1, - opcode : 4, - ret : 1, - destination : 9, - source : 9, - opcode_ext : 8; -#endif -}; - -/* 16bit branch control operations */ -struct ins_format5 { -#ifdef __LITTLE_ENDIAN - uint32_t opcode_ext : 8, - source : 9, - address : 10, - opcode : 4, - parity : 1; -#else - uint32_t parity : 1, - opcode : 4, - address : 10, - source : 9, - opcode_ext : 8; -#endif -}; - -/* Far branch operations */ -struct ins_format6 { -#ifdef __LITTLE_ENDIAN - uint32_t page : 3, - opcode_ext : 5, - source : 9, - address : 10, - opcode : 4, - parity : 1; -#else - uint32_t parity : 1, - opcode : 4, - address : 10, - source : 9, - opcode_ext : 5, - page : 3; -#endif -}; - union ins_formats { struct ins_format1 format1; struct ins_format2 format2; struct ins_format3 format3; - struct ins_format4 format4; - struct ins_format5 format5; - struct ins_format6 format6; uint8_t bytes[4]; uint32_t integer; }; @@ -179,8 +118,6 @@ struct instruction { #define AIC_OP_ROL 0x5 #define AIC_OP_BMOV 0x6 -#define AIC_OP_MVI16 0x7 - #define AIC_OP_JMP 0x8 #define AIC_OP_JC 0x9 #define AIC_OP_JNC 0xa @@ -194,26 +131,3 @@ struct instruction { #define AIC_OP_SHL 0x10 #define AIC_OP_SHR 0x20 #define AIC_OP_ROR 0x30 - -/* 16bit Ops. Low byte main opcode. High byte extended opcode. */ -#define AIC_OP_OR16 0x8005 -#define AIC_OP_AND16 0x8105 -#define AIC_OP_XOR16 0x8205 -#define AIC_OP_ADD16 0x8305 -#define AIC_OP_ADC16 0x8405 -#define AIC_OP_JNE16 0x8805 -#define AIC_OP_JNZ16 0x8905 -#define AIC_OP_JE16 0x8C05 -#define AIC_OP_JZ16 0x8B05 -#define AIC_OP_JMP16 0x9005 -#define AIC_OP_JC16 0x9105 -#define AIC_OP_JNC16 0x9205 -#define AIC_OP_CALL16 0x9305 -#define AIC_OP_CALL16 0x9305 - -/* Page extension is low three bits of second opcode byte. */ -#define AIC_OP_JMPF 0xA005 -#define AIC_OP_CALLF 0xB005 -#define AIC_OP_JCF 0xC005 -#define AIC_OP_JNCF 0xD005 -#define AIC_OP_CMPXCHG 0xE005 diff --git a/trunk/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l b/trunk/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l index 7c3983f868a9..45c0b233d0bc 100644 --- a/trunk/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l +++ b/trunk/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l @@ -38,7 +38,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_scan.l#20 $ + * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_scan.l#19 $ * * $FreeBSD$ */ @@ -132,7 +132,7 @@ if[ \t]*\( { *string_buf_ptr++ = *yptr++; } } -else { return T_ELSE; } + VERSION { return T_VERSION; } PREFIX { return T_PREFIX; } PATCH_ARG_LIST { return T_PATCH_ARG_LIST; } @@ -173,6 +173,10 @@ RW|RO|WO { yylval.value = WO; return T_MODE; } +BEGIN_CRITICAL { return T_BEGIN_CS; } +END_CRITICAL { return T_END_CS; } +SET_SRC_MODE { return T_SET_SRC_MODE; } +SET_DST_MODE { return T_SET_DST_MODE; } field { return T_FIELD; } enum { return T_ENUM; } mask { return T_MASK; } @@ -188,13 +192,6 @@ none { return T_NONE; } sindex { return T_SINDEX; } A { return T_A; } - /* Instruction Formatting */ -PAD_PAGE { return T_PAD_PAGE; } -BEGIN_CRITICAL { return T_BEGIN_CS; } -END_CRITICAL { return T_END_CS; } -SET_SRC_MODE { return T_SET_SRC_MODE; } -SET_DST_MODE { return T_SET_DST_MODE; } - /* Opcodes */ shl { return T_SHL; } shr { return T_SHR; } @@ -226,17 +223,7 @@ and { return T_AND; } or { return T_OR; } ret { return T_RET; } nop { return T_NOP; } - - /* ARP2 16bit extensions */ -or16 { return T_OR16; } -and16 { return T_AND16; } -xor16 { return T_XOR16; } -add16 { return T_ADD16; } -adc16 { return T_ADC16; } -mvi16 { return T_MVI16; } -test16 { return T_TEST16; } -cmp16 { return T_CMP16; } -cmpxchg { return T_CMPXCHG; } +else { return T_ELSE; } /* Allowed Symbols */ \<\< { return T_EXPR_LSHIFT; } diff --git a/trunk/drivers/scsi/dc395x.c b/trunk/drivers/scsi/dc395x.c index cbf825263f3b..c8a32cf47d73 100644 --- a/trunk/drivers/scsi/dc395x.c +++ b/trunk/drivers/scsi/dc395x.c @@ -246,7 +246,6 @@ struct ScsiReqBlk { * total_xfer_length in xferred. These values are restored in * pci_unmap_srb_sense. This is the only place xferred is used. */ - unsigned char *virt_addr_req; /* Saved virtual address of the request buffer */ u32 xferred; /* Saved copy of total_xfer_length */ u16 state; @@ -2018,7 +2017,7 @@ static void sg_update_list(struct ScsiReqBlk *srb, u32 left) sg_verify_length(srb); /* we need the corresponding virtual address */ - if (!segment || (srb->flag & AUTO_REQSENSE)) { + if (!segment) { srb->virt_addr += xferred; return; } @@ -3319,7 +3318,6 @@ static void pci_unmap_srb_sense(struct AdapterCtlBlk *acb, srb->segment_x[DC395x_MAX_SG_LISTENTRY - 1].address; srb->segment_x[0].length = srb->segment_x[DC395x_MAX_SG_LISTENTRY - 1].length; - srb->virt_addr = srb->virt_addr_req; } @@ -3713,8 +3711,6 @@ static void request_sense(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb, srb->xferred = srb->total_xfer_length; /* srb->segment_x : a one entry of S/G list table */ srb->total_xfer_length = sizeof(cmd->sense_buffer); - srb->virt_addr_req = srb->virt_addr; - srb->virt_addr = cmd->sense_buffer; srb->segment_x[0].length = sizeof(cmd->sense_buffer); /* Map sense buffer */ srb->segment_x[0].address = diff --git a/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c b/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c index eaefeddb2b4a..822b9fa706f3 100644 --- a/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c @@ -87,7 +87,7 @@ static int max_channel = 3; static int init_timeout = 5; static int max_requests = 50; -#define IBMVSCSI_VERSION "1.5.8" +#define IBMVSCSI_VERSION "1.5.7" MODULE_DESCRIPTION("IBM Virtual SCSI"); MODULE_AUTHOR("Dave Boutcher"); @@ -534,6 +534,7 @@ static int map_data_for_srp_cmd(struct scsi_cmnd *cmd, static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, struct ibmvscsi_host_data *hostdata) { + struct scsi_cmnd *cmnd; u64 *crq_as_u64 = (u64 *) &evt_struct->crq; int rc; @@ -543,8 +544,19 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, * can handle more requests (can_queue) when we actually can't */ if ((evt_struct->crq.format == VIOSRP_SRP_FORMAT) && - (atomic_dec_if_positive(&hostdata->request_limit) < 0)) - goto send_error; + (atomic_dec_if_positive(&hostdata->request_limit) < 0)) { + /* See if the adapter is disabled */ + if (atomic_read(&hostdata->request_limit) < 0) + goto send_error; + + printk(KERN_WARNING + "ibmvscsi: Warning, request_limit exceeded\n"); + unmap_cmd_data(&evt_struct->iu.srp.cmd, + evt_struct, + hostdata->dev); + free_event_struct(&hostdata->pool, evt_struct); + return SCSI_MLQUEUE_HOST_BUSY; + } /* Copy the IU into the transfer area */ *evt_struct->xfer_iu = evt_struct->iu; @@ -560,7 +572,7 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, ibmvscsi_send_crq(hostdata, crq_as_u64[0], crq_as_u64[1])) != 0) { list_del(&evt_struct->list); - printk(KERN_ERR "ibmvscsi: send error %d\n", + printk(KERN_ERR "ibmvscsi: failed to send event struct rc %d\n", rc); goto send_error; } @@ -570,8 +582,14 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, send_error: unmap_cmd_data(&evt_struct->iu.srp.cmd, evt_struct, hostdata->dev); + if ((cmnd = evt_struct->cmnd) != NULL) { + cmnd->result = DID_ERROR << 16; + evt_struct->cmnd_done(cmnd); + } else if (evt_struct->done) + evt_struct->done(evt_struct); + free_event_struct(&hostdata->pool, evt_struct); - return SCSI_MLQUEUE_HOST_BUSY; + return 0; } /** @@ -784,8 +802,7 @@ static void login_rsp(struct srp_event_struct *evt_struct) case SRP_LOGIN_RSP_TYPE: /* it worked! */ break; case SRP_LOGIN_REJ_TYPE: /* refused! */ - printk(KERN_INFO "ibmvscsi: SRP_LOGIN_REJ reason %u\n", - evt_struct->xfer_iu->srp.login_rej.reason); + printk(KERN_INFO "ibmvscsi: SRP_LOGIN_REQ rejected\n"); /* Login failed. */ atomic_set(&hostdata->request_limit, -1); return; @@ -817,9 +834,6 @@ static void login_rsp(struct srp_event_struct *evt_struct) return; } - /* If we had any pending I/Os, kick them */ - scsi_unblock_requests(hostdata->host); - send_mad_adapter_info(hostdata); return; } @@ -848,7 +862,6 @@ static int send_srp_login(struct ibmvscsi_host_data *hostdata) init_timeout * HZ); login = &evt_struct->iu.srp.login_req; - memset(login, 0x00, sizeof(struct srp_login_req)); login->type = SRP_LOGIN_REQ_TYPE; login->max_requested_initiator_to_target_iulen = sizeof(union srp_iu); login->required_buffer_formats = 0x0006; @@ -1109,7 +1122,7 @@ static int ibmvscsi_eh_device_reset_handler(struct scsi_cmnd *cmd) * purge_requests: Our virtual adapter just shut down. purge any sent requests * @hostdata: the adapter */ -static void purge_requests(struct ibmvscsi_host_data *hostdata, int error_code) +static void purge_requests(struct ibmvscsi_host_data *hostdata) { struct srp_event_struct *tmp_evt, *pos; unsigned long flags; @@ -1118,7 +1131,7 @@ static void purge_requests(struct ibmvscsi_host_data *hostdata, int error_code) list_for_each_entry_safe(tmp_evt, pos, &hostdata->sent, list) { list_del(&tmp_evt->list); if (tmp_evt->cmnd) { - tmp_evt->cmnd->result = (error_code << 16); + tmp_evt->cmnd->result = (DID_ERROR << 16); unmap_cmd_data(&tmp_evt->iu.srp.cmd, tmp_evt, tmp_evt->hostdata->dev); @@ -1173,30 +1186,12 @@ void ibmvscsi_handle_crq(struct viosrp_crq *crq, printk(KERN_ERR "ibmvscsi: unknown crq message type\n"); } return; - case 0xFF: /* Hypervisor telling us the connection is closed */ - scsi_block_requests(hostdata->host); - if (crq->format == 0x06) { - /* We need to re-setup the interpartition connection */ - printk(KERN_INFO - "ibmvscsi: Re-enabling adapter!\n"); - purge_requests(hostdata, DID_REQUEUE); - if (ibmvscsi_reenable_crq_queue(&hostdata->queue, - hostdata) == 0) - if (ibmvscsi_send_crq(hostdata, - 0xC001000000000000LL, 0)) - printk(KERN_ERR - "ibmvscsi: transmit error after" - " enable\n"); - } else { - printk(KERN_INFO - "ibmvscsi: Virtual adapter failed rc %d!\n", - crq->format); + case 0xFF: /* Hypervisor telling us the connection is closed */ + printk(KERN_INFO "ibmvscsi: Virtual adapter failed!\n"); - atomic_set(&hostdata->request_limit, -1); - purge_requests(hostdata, DID_ERROR); - ibmvscsi_reset_crq_queue(&hostdata->queue, hostdata); - } - scsi_unblock_requests(hostdata->host); + atomic_set(&hostdata->request_limit, -1); + purge_requests(hostdata); + ibmvscsi_reset_crq_queue(&hostdata->queue, hostdata); return; case 0x80: /* real payload */ break; diff --git a/trunk/drivers/scsi/ibmvscsi/ibmvscsi.h b/trunk/drivers/scsi/ibmvscsi/ibmvscsi.h index 4550d71e4744..5b0edd1f1921 100644 --- a/trunk/drivers/scsi/ibmvscsi/ibmvscsi.h +++ b/trunk/drivers/scsi/ibmvscsi/ibmvscsi.h @@ -103,9 +103,6 @@ void ibmvscsi_release_crq_queue(struct crq_queue *queue, int ibmvscsi_reset_crq_queue(struct crq_queue *queue, struct ibmvscsi_host_data *hostdata); -int ibmvscsi_reenable_crq_queue(struct crq_queue *queue, - struct ibmvscsi_host_data *hostdata); - void ibmvscsi_handle_crq(struct viosrp_crq *crq, struct ibmvscsi_host_data *hostdata); int ibmvscsi_send_crq(struct ibmvscsi_host_data *hostdata, diff --git a/trunk/drivers/scsi/ibmvscsi/iseries_vscsi.c b/trunk/drivers/scsi/ibmvscsi/iseries_vscsi.c index 7eed0b098171..ce15d9e39621 100644 --- a/trunk/drivers/scsi/ibmvscsi/iseries_vscsi.c +++ b/trunk/drivers/scsi/ibmvscsi/iseries_vscsi.c @@ -123,19 +123,6 @@ int ibmvscsi_reset_crq_queue(struct crq_queue *queue, return 0; } -/** - * reenable_crq_queue: - reenables a crq after a failure - * @queue: crq_queue to initialize and register - * @hostdata: ibmvscsi_host_data of host - * - * no-op for iSeries - */ -int ibmvscsi_reenable_crq_queue(struct crq_queue *queue, - struct ibmvscsi_host_data *hostdata) -{ - return 0; -} - /** * ibmvscsi_send_crq: - Send a CRQ * @hostdata: the adapter diff --git a/trunk/drivers/scsi/ibmvscsi/rpa_vscsi.c b/trunk/drivers/scsi/ibmvscsi/rpa_vscsi.c index f47dd87c05e7..75db2f5c545e 100644 --- a/trunk/drivers/scsi/ibmvscsi/rpa_vscsi.c +++ b/trunk/drivers/scsi/ibmvscsi/rpa_vscsi.c @@ -280,28 +280,6 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue, return -1; } -/** - * reenable_crq_queue: - reenables a crq after - * @queue: crq_queue to initialize and register - * @hostdata: ibmvscsi_host_data of host - * - */ -int ibmvscsi_reenable_crq_queue(struct crq_queue *queue, - struct ibmvscsi_host_data *hostdata) -{ - int rc; - struct vio_dev *vdev = to_vio_dev(hostdata->dev); - - /* Re-enable the CRQ */ - do { - rc = plpar_hcall_norets(H_ENABLE_CRQ, vdev->unit_address); - } while ((rc == H_InProgress) || (rc == H_Busy) || (H_isLongBusy(rc))); - - if (rc) - printk(KERN_ERR "ibmvscsi: Error %d enabling adapter\n", rc); - return rc; -} - /** * reset_crq_queue: - resets a crq after a failure * @queue: crq_queue to initialize and register diff --git a/trunk/drivers/scsi/ips.c b/trunk/drivers/scsi/ips.c index 86c546164da9..e5e1ca44e1ee 100644 --- a/trunk/drivers/scsi/ips.c +++ b/trunk/drivers/scsi/ips.c @@ -3499,7 +3499,6 @@ ips_map_status(ips_ha_t * ha, ips_scb_t * scb, ips_stat_t * sp) int device_error; uint32_t transfer_len; IPS_DCDB_TABLE_TAPE *tapeDCDB; - IPS_SCSI_INQ_DATA inquiryData; METHOD_TRACE("ips_map_status", 1); @@ -3558,13 +3557,13 @@ ips_map_status(ips_ha_t * ha, ips_scb_t * scb, ips_stat_t * sp) errcode = DID_OK; /* Restrict access to physical DASD */ - if (scb->scsi_cmd->cmnd[0] == INQUIRY) { - ips_scmd_buf_read(scb->scsi_cmd, - &inquiryData, sizeof (inquiryData)); - if ((inquiryData.DeviceType & 0x1f) == TYPE_DISK) { - errcode = DID_TIME_OUT; - break; - } + if ((scb->scsi_cmd->cmnd[0] == INQUIRY) && + ((((char *) scb->scsi_cmd-> + buffer)[0] & 0x1f) == TYPE_DISK)) { + /* underflow -- no error */ + /* restrict access to physical DASD */ + errcode = DID_TIME_OUT; + break; } } else errcode = DID_ERROR; @@ -4136,7 +4135,6 @@ ips_chkstatus(ips_ha_t * ha, IPS_STATUS * pstatus) uint8_t basic_status; uint8_t ext_status; int errcode; - IPS_SCSI_INQ_DATA inquiryData; METHOD_TRACE("ips_chkstatus", 1); @@ -4257,11 +4255,11 @@ ips_chkstatus(ips_ha_t * ha, IPS_STATUS * pstatus) scb->scsi_cmd->result = errcode << 16; } else { /* bus == 0 */ /* restrict access to physical drives */ - if (scb->scsi_cmd->cmnd[0] == INQUIRY) { - ips_scmd_buf_read(scb->scsi_cmd, - &inquiryData, sizeof (inquiryData)); - if ((inquiryData.DeviceType & 0x1f) == TYPE_DISK) - scb->scsi_cmd->result = DID_TIME_OUT << 16; + if ((scb->scsi_cmd->cmnd[0] == INQUIRY) && + ((((char *) scb->scsi_cmd->buffer)[0] & 0x1f) == + TYPE_DISK)) { + + scb->scsi_cmd->result = DID_TIME_OUT << 16; } } /* else */ } else { /* recovered error / success */ @@ -5014,7 +5012,7 @@ ips_init_copperhead(ips_ha_t * ha) break; /* Delay for 1 Second */ - msleep(IPS_ONE_SEC); + MDELAY(IPS_ONE_SEC); } if (j >= 45) @@ -5040,7 +5038,7 @@ ips_init_copperhead(ips_ha_t * ha) break; /* Delay for 1 Second */ - msleep(IPS_ONE_SEC); + MDELAY(IPS_ONE_SEC); } if (j >= 240) @@ -5058,7 +5056,7 @@ ips_init_copperhead(ips_ha_t * ha) break; /* Delay for 1 Second */ - msleep(IPS_ONE_SEC); + MDELAY(IPS_ONE_SEC); } if (i >= 240) @@ -5108,7 +5106,7 @@ ips_init_copperhead_memio(ips_ha_t * ha) break; /* Delay for 1 Second */ - msleep(IPS_ONE_SEC); + MDELAY(IPS_ONE_SEC); } if (j >= 45) @@ -5134,7 +5132,7 @@ ips_init_copperhead_memio(ips_ha_t * ha) break; /* Delay for 1 Second */ - msleep(IPS_ONE_SEC); + MDELAY(IPS_ONE_SEC); } if (j >= 240) @@ -5152,7 +5150,7 @@ ips_init_copperhead_memio(ips_ha_t * ha) break; /* Delay for 1 Second */ - msleep(IPS_ONE_SEC); + MDELAY(IPS_ONE_SEC); } if (i >= 240) @@ -5204,7 +5202,7 @@ ips_init_morpheus(ips_ha_t * ha) break; /* Delay for 1 Second */ - msleep(IPS_ONE_SEC); + MDELAY(IPS_ONE_SEC); } if (i >= 45) { @@ -5230,7 +5228,7 @@ ips_init_morpheus(ips_ha_t * ha) if (Post != 0x4F00) break; /* Delay for 1 Second */ - msleep(IPS_ONE_SEC); + MDELAY(IPS_ONE_SEC); } if (i >= 120) { @@ -5260,7 +5258,7 @@ ips_init_morpheus(ips_ha_t * ha) break; /* Delay for 1 Second */ - msleep(IPS_ONE_SEC); + MDELAY(IPS_ONE_SEC); } if (i >= 240) { @@ -5320,12 +5318,12 @@ ips_reset_copperhead(ips_ha_t * ha) outb(IPS_BIT_RST, ha->io_addr + IPS_REG_SCPR); /* Delay for 1 Second */ - msleep(IPS_ONE_SEC); + MDELAY(IPS_ONE_SEC); outb(0, ha->io_addr + IPS_REG_SCPR); /* Delay for 1 Second */ - msleep(IPS_ONE_SEC); + MDELAY(IPS_ONE_SEC); if ((*ha->func.init) (ha)) break; @@ -5365,12 +5363,12 @@ ips_reset_copperhead_memio(ips_ha_t * ha) writeb(IPS_BIT_RST, ha->mem_ptr + IPS_REG_SCPR); /* Delay for 1 Second */ - msleep(IPS_ONE_SEC); + MDELAY(IPS_ONE_SEC); writeb(0, ha->mem_ptr + IPS_REG_SCPR); /* Delay for 1 Second */ - msleep(IPS_ONE_SEC); + MDELAY(IPS_ONE_SEC); if ((*ha->func.init) (ha)) break; @@ -5411,7 +5409,7 @@ ips_reset_morpheus(ips_ha_t * ha) writel(0x80000000, ha->mem_ptr + IPS_REG_I960_IDR); /* Delay for 5 Seconds */ - msleep(5 * IPS_ONE_SEC); + MDELAY(5 * IPS_ONE_SEC); /* Do a PCI config read to wait for adapter */ pci_read_config_byte(ha->pcidev, 4, &junk); diff --git a/trunk/drivers/scsi/libata-scsi.c b/trunk/drivers/scsi/libata-scsi.c index 07b1e7cc61df..cfbceb504718 100644 --- a/trunk/drivers/scsi/libata-scsi.c +++ b/trunk/drivers/scsi/libata-scsi.c @@ -1700,31 +1700,6 @@ static unsigned int ata_msense_rw_recovery(u8 **ptr_io, const u8 *last) return sizeof(def_rw_recovery_mpage); } -/* - * We can turn this into a real blacklist if it's needed, for now just - * blacklist any Maxtor BANC1G10 revision firmware - */ -static int ata_dev_supports_fua(u16 *id) -{ - unsigned char model[41], fw[9]; - - if (!ata_id_has_fua(id)) - return 0; - - model[40] = '\0'; - fw[8] = '\0'; - - ata_dev_id_string(id, model, ATA_ID_PROD_OFS, sizeof(model) - 1); - ata_dev_id_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw) - 1); - - if (strncmp(model, "Maxtor", 6)) - return 1; - if (strncmp(fw, "BANC1G10", 8)) - return 1; - - return 0; /* blacklisted */ -} - /** * ata_scsiop_mode_sense - Simulate MODE SENSE 6, 10 commands * @args: device IDENTIFY data / SCSI command of interest. @@ -1822,7 +1797,7 @@ unsigned int ata_scsiop_mode_sense(struct ata_scsi_args *args, u8 *rbuf, return 0; dpofua = 0; - if (ata_dev_supports_fua(args->id) && dev->flags & ATA_DFLAG_LBA48 && + if (ata_id_has_fua(args->id) && dev->flags & ATA_DFLAG_LBA48 && (!(dev->flags & ATA_DFLAG_PIO) || dev->multi_count)) dpofua = 1 << 4; diff --git a/trunk/drivers/scsi/megaraid/megaraid_sas.c b/trunk/drivers/scsi/megaraid/megaraid_sas.c index a487f414960e..511ed52a5807 100644 --- a/trunk/drivers/scsi/megaraid/megaraid_sas.c +++ b/trunk/drivers/scsi/megaraid/megaraid_sas.c @@ -10,7 +10,7 @@ * 2 of the License, or (at your option) any later version. * * FILE : megaraid_sas.c - * Version : v00.00.02.02 + * Version : v00.00.02.00-rc4 * * Authors: * Sreenivas Bagalkote @@ -55,13 +55,13 @@ static struct pci_device_id megasas_pci_table[] = { { PCI_VENDOR_ID_LSI_LOGIC, - PCI_DEVICE_ID_LSI_SAS1064R, // xscale IOP + PCI_DEVICE_ID_LSI_SAS1064R, PCI_ANY_ID, PCI_ANY_ID, }, { PCI_VENDOR_ID_DELL, - PCI_DEVICE_ID_DELL_PERC5, // xscale IOP + PCI_DEVICE_ID_DELL_PERC5, PCI_ANY_ID, PCI_ANY_ID, }, @@ -119,18 +119,12 @@ megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd) spin_unlock_irqrestore(&instance->cmd_pool_lock, flags); } - -/** -* The following functions are defined for xscale -* (deviceid : 1064R, PERC5) controllers -*/ - /** - * megasas_enable_intr_xscale - Enables interrupts + * megasas_enable_intr - Enables interrupts * @regs: MFI register set */ static inline void -megasas_enable_intr_xscale(struct megasas_register_set __iomem * regs) +megasas_enable_intr(struct megasas_register_set __iomem * regs) { writel(1, &(regs)->outbound_intr_mask); @@ -138,66 +132,6 @@ megasas_enable_intr_xscale(struct megasas_register_set __iomem * regs) readl(®s->outbound_intr_mask); } -/** - * megasas_read_fw_status_reg_xscale - returns the current FW status value - * @regs: MFI register set - */ -static u32 -megasas_read_fw_status_reg_xscale(struct megasas_register_set __iomem * regs) -{ - return readl(&(regs)->outbound_msg_0); -} -/** - * megasas_clear_interrupt_xscale - Check & clear interrupt - * @regs: MFI register set - */ -static int -megasas_clear_intr_xscale(struct megasas_register_set __iomem * regs) -{ - u32 status; - /* - * Check if it is our interrupt - */ - status = readl(®s->outbound_intr_status); - - if (!(status & MFI_OB_INTR_STATUS_MASK)) { - return 1; - } - - /* - * Clear the interrupt by writing back the same value - */ - writel(status, ®s->outbound_intr_status); - - return 0; -} - -/** - * megasas_fire_cmd_xscale - Sends command to the FW - * @frame_phys_addr : Physical address of cmd - * @frame_count : Number of frames for the command - * @regs : MFI register set - */ -static inline void -megasas_fire_cmd_xscale(dma_addr_t frame_phys_addr,u32 frame_count, struct megasas_register_set __iomem *regs) -{ - writel((frame_phys_addr >> 3)|(frame_count), - &(regs)->inbound_queue_port); -} - -static struct megasas_instance_template megasas_instance_template_xscale = { - - .fire_cmd = megasas_fire_cmd_xscale, - .enable_intr = megasas_enable_intr_xscale, - .clear_intr = megasas_clear_intr_xscale, - .read_fw_status_reg = megasas_read_fw_status_reg_xscale, -}; - -/** -* This is the end of set of functions & definitions specific -* to xscale (deviceid : 1064R, PERC5) controllers -*/ - /** * megasas_disable_intr - Disables interrupts * @regs: MFI register set @@ -205,7 +139,7 @@ static struct megasas_instance_template megasas_instance_template_xscale = { static inline void megasas_disable_intr(struct megasas_register_set __iomem * regs) { - u32 mask = 0x1f; + u32 mask = readl(®s->outbound_intr_mask) & (~0x00000001); writel(mask, ®s->outbound_intr_mask); /* Dummy readl to force pci flush */ @@ -233,7 +167,8 @@ megasas_issue_polled(struct megasas_instance *instance, struct megasas_cmd *cmd) /* * Issue the frame using inbound queue port */ - instance->instancet->fire_cmd(cmd->frame_phys_addr ,0,instance->reg_set); + writel(cmd->frame_phys_addr >> 3, + &instance->reg_set->inbound_queue_port); /* * Wait for cmd_status to change @@ -263,7 +198,8 @@ megasas_issue_blocked_cmd(struct megasas_instance *instance, { cmd->cmd_status = ENODATA; - instance->instancet->fire_cmd(cmd->frame_phys_addr ,0,instance->reg_set); + writel(cmd->frame_phys_addr >> 3, + &instance->reg_set->inbound_queue_port); wait_event(instance->int_cmd_wait_q, (cmd->cmd_status != ENODATA)); @@ -306,7 +242,8 @@ megasas_issue_blocked_abort_cmd(struct megasas_instance *instance, cmd->sync_cmd = 1; cmd->cmd_status = 0xFF; - instance->instancet->fire_cmd(cmd->frame_phys_addr ,0,instance->reg_set); + writel(cmd->frame_phys_addr >> 3, + &instance->reg_set->inbound_queue_port); /* * Wait for this cmd to complete @@ -621,29 +558,112 @@ megasas_build_ldio(struct megasas_instance *instance, struct scsi_cmnd *scp, } /** - * megasas_is_ldio - Checks if the cmd is for logical drive - * @scmd: SCSI command - * - * Called by megasas_queue_command to find out if the command to be queued - * is a logical drive command + * megasas_build_cmd - Prepares a command packet + * @instance: Adapter soft state + * @scp: SCSI command + * @frame_count: [OUT] Number of frames used to prepare this command */ -static inline int megasas_is_ldio(struct scsi_cmnd *cmd) +static struct megasas_cmd *megasas_build_cmd(struct megasas_instance + *instance, + struct scsi_cmnd *scp, + int *frame_count) { - if (!MEGASAS_IS_LOGICAL(cmd)) - return 0; - switch (cmd->cmnd[0]) { - case READ_10: - case WRITE_10: - case READ_12: - case WRITE_12: - case READ_6: - case WRITE_6: - case READ_16: - case WRITE_16: - return 1; - default: - return 0; + u32 logical_cmd; + struct megasas_cmd *cmd; + + /* + * Find out if this is logical or physical drive command. + */ + logical_cmd = MEGASAS_IS_LOGICAL(scp); + + /* + * Logical drive command + */ + if (logical_cmd) { + + if (scp->device->id >= MEGASAS_MAX_LD) { + scp->result = DID_BAD_TARGET << 16; + return NULL; + } + + switch (scp->cmnd[0]) { + + case READ_10: + case WRITE_10: + case READ_12: + case WRITE_12: + case READ_6: + case WRITE_6: + case READ_16: + case WRITE_16: + /* + * Fail for LUN > 0 + */ + if (scp->device->lun) { + scp->result = DID_BAD_TARGET << 16; + return NULL; + } + + cmd = megasas_get_cmd(instance); + + if (!cmd) { + scp->result = DID_IMM_RETRY << 16; + return NULL; + } + + *frame_count = megasas_build_ldio(instance, scp, cmd); + + if (!(*frame_count)) { + megasas_return_cmd(instance, cmd); + return NULL; + } + + return cmd; + + default: + /* + * Fail for LUN > 0 + */ + if (scp->device->lun) { + scp->result = DID_BAD_TARGET << 16; + return NULL; + } + + cmd = megasas_get_cmd(instance); + + if (!cmd) { + scp->result = DID_IMM_RETRY << 16; + return NULL; + } + + *frame_count = megasas_build_dcdb(instance, scp, cmd); + + if (!(*frame_count)) { + megasas_return_cmd(instance, cmd); + return NULL; + } + + return cmd; + } + } else { + cmd = megasas_get_cmd(instance); + + if (!cmd) { + scp->result = DID_IMM_RETRY << 16; + return NULL; + } + + *frame_count = megasas_build_dcdb(instance, scp, cmd); + + if (!(*frame_count)) { + megasas_return_cmd(instance, cmd); + return NULL; + } + + return cmd; } + + return NULL; } /** @@ -664,26 +684,12 @@ megasas_queue_command(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd *)) scmd->scsi_done = done; scmd->result = 0; - if (MEGASAS_IS_LOGICAL(scmd) && - (scmd->device->id >= MEGASAS_MAX_LD || scmd->device->lun)) { - scmd->result = DID_BAD_TARGET << 16; - goto out_done; - } - - cmd = megasas_get_cmd(instance); - if (!cmd) - return SCSI_MLQUEUE_HOST_BUSY; - - /* - * Logical drive command - */ - if (megasas_is_ldio(scmd)) - frame_count = megasas_build_ldio(instance, scmd, cmd); - else - frame_count = megasas_build_dcdb(instance, scmd, cmd); + cmd = megasas_build_cmd(instance, scmd, &frame_count); - if (!frame_count) - goto out_return_cmd; + if (!cmd) { + done(scmd); + return 0; + } cmd->scmd = scmd; scmd->SCp.ptr = (char *)cmd; @@ -696,15 +702,10 @@ megasas_queue_command(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd *)) instance->fw_outstanding++; spin_unlock_irqrestore(&instance->instance_lock, flags); - instance->instancet->fire_cmd(cmd->frame_phys_addr ,cmd->frame_count-1,instance->reg_set); + writel(((cmd->frame_phys_addr >> 3) | (cmd->frame_count - 1)), + &instance->reg_set->inbound_queue_port); return 0; - - out_return_cmd: - megasas_return_cmd(instance, cmd); - out_done: - done(scmd); - return 0; } /** @@ -1107,6 +1108,7 @@ megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd, static int megasas_deplete_reply_queue(struct megasas_instance *instance, u8 alt_status) { + u32 status; u32 producer; u32 consumer; u32 context; @@ -1114,10 +1116,17 @@ megasas_deplete_reply_queue(struct megasas_instance *instance, u8 alt_status) /* * Check if it is our interrupt - * Clear the interrupt */ - if(instance->instancet->clear_intr(instance->reg_set)) + status = readl(&instance->reg_set->outbound_intr_status); + + if (!(status & MFI_OB_INTR_STATUS_MASK)) { return IRQ_NONE; + } + + /* + * Clear the interrupt by writing back the same value + */ + writel(status, &instance->reg_set->outbound_intr_status); producer = *instance->producer; consumer = *instance->consumer; @@ -1151,7 +1160,7 @@ static irqreturn_t megasas_isr(int irq, void *devp, struct pt_regs *regs) /** * megasas_transition_to_ready - Move the FW to READY state - * @instance: Adapter soft state + * @reg_set: MFI register set * * During the initialization, FW passes can potentially be in any one of * several possible states. If the FW in operational, waiting-for-handshake @@ -1159,14 +1168,14 @@ static irqreturn_t megasas_isr(int irq, void *devp, struct pt_regs *regs) * has to wait for the ready state. */ static int -megasas_transition_to_ready(struct megasas_instance* instance) +megasas_transition_to_ready(struct megasas_register_set __iomem * reg_set) { int i; u8 max_wait; u32 fw_state; u32 cur_state; - fw_state = instance->instancet->read_fw_status_reg(instance->reg_set) & MFI_STATE_MASK; + fw_state = readl(®_set->outbound_msg_0) & MFI_STATE_MASK; while (fw_state != MFI_STATE_READY) { @@ -1184,7 +1193,7 @@ megasas_transition_to_ready(struct megasas_instance* instance) * Set the CLR bit in inbound doorbell */ writel(MFI_INIT_CLEAR_HANDSHAKE, - &instance->reg_set->inbound_doorbell); + ®_set->inbound_doorbell); max_wait = 2; cur_state = MFI_STATE_WAIT_HANDSHAKE; @@ -1194,8 +1203,8 @@ megasas_transition_to_ready(struct megasas_instance* instance) /* * Bring it to READY state; assuming max wait 2 secs */ - megasas_disable_intr(instance->reg_set); - writel(MFI_INIT_READY, &instance->reg_set->inbound_doorbell); + megasas_disable_intr(reg_set); + writel(MFI_INIT_READY, ®_set->inbound_doorbell); max_wait = 10; cur_state = MFI_STATE_OPERATIONAL; @@ -1244,8 +1253,8 @@ megasas_transition_to_ready(struct megasas_instance* instance) * The cur_state should not last for more than max_wait secs */ for (i = 0; i < (max_wait * 1000); i++) { - fw_state = instance->instancet->read_fw_status_reg(instance->reg_set) & - MFI_STATE_MASK ; + fw_state = MFI_STATE_MASK & + readl(®_set->outbound_msg_0); if (fw_state == cur_state) { msleep(1); @@ -1607,20 +1616,18 @@ static int megasas_init_mfi(struct megasas_instance *instance) reg_set = instance->reg_set; - instance->instancet = &megasas_instance_template_xscale; - /* * We expect the FW state to be READY */ - if (megasas_transition_to_ready(instance)) + if (megasas_transition_to_ready(instance->reg_set)) goto fail_ready_state; /* * Get various operational parameters from status register */ - instance->max_fw_cmds = instance->instancet->read_fw_status_reg(reg_set) & 0x00FFFF; - instance->max_num_sge = (instance->instancet->read_fw_status_reg(reg_set) & 0xFF0000) >> - 0x10; + instance->max_fw_cmds = readl(®_set->outbound_msg_0) & 0x00FFFF; + instance->max_num_sge = (readl(®_set->outbound_msg_0) & 0xFF0000) >> + 0x10; /* * Create a pool of commands */ @@ -1929,7 +1936,8 @@ megasas_register_aen(struct megasas_instance *instance, u32 seq_num, /* * Issue the aen registration frame */ - instance->instancet->fire_cmd(cmd->frame_phys_addr ,0,instance->reg_set); + writel(cmd->frame_phys_addr >> 3, + &instance->reg_set->inbound_queue_port); return 0; } @@ -2118,7 +2126,7 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) goto fail_irq; } - instance->instancet->enable_intr(instance->reg_set); + megasas_enable_intr(instance->reg_set); /* * Store instance in PCI softstate @@ -2673,8 +2681,9 @@ megasas_mgmt_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { switch (cmd) { - case MEGASAS_IOC_FIRMWARE32: - return megasas_mgmt_compat_ioctl_fw(file, arg); + case MEGASAS_IOC_FIRMWARE:{ + return megasas_mgmt_compat_ioctl_fw(file, arg); + } case MEGASAS_IOC_GET_AEN: return megasas_mgmt_ioctl_aen(file, arg); } diff --git a/trunk/drivers/scsi/megaraid/megaraid_sas.h b/trunk/drivers/scsi/megaraid/megaraid_sas.h index d6d166c0663f..eaec9d531424 100644 --- a/trunk/drivers/scsi/megaraid/megaraid_sas.h +++ b/trunk/drivers/scsi/megaraid/megaraid_sas.h @@ -18,9 +18,10 @@ /** * MegaRAID SAS Driver meta data */ -#define MEGASAS_VERSION "00.00.02.02" -#define MEGASAS_RELDATE "Jan 23, 2006" -#define MEGASAS_EXT_VERSION "Mon Jan 23 14:09:01 PST 2006" +#define MEGASAS_VERSION "00.00.02.00-rc4" +#define MEGASAS_RELDATE "Sep 16, 2005" +#define MEGASAS_EXT_VERSION "Fri Sep 16 12:37:08 EDT 2005" + /* * ===================================== * MegaRAID SAS MFI firmware definitions @@ -1012,16 +1013,6 @@ struct megasas_evt_detail { } __attribute__ ((packed)); - struct megasas_instance_template { - void (*fire_cmd)(dma_addr_t ,u32 ,struct megasas_register_set __iomem *); - - void (*enable_intr)(struct megasas_register_set __iomem *) ; - - int (*clear_intr)(struct megasas_register_set __iomem *); - - u32 (*read_fw_status_reg)(struct megasas_register_set __iomem *); - }; - struct megasas_instance { u32 *producer; @@ -1065,8 +1056,6 @@ struct megasas_instance { u32 fw_outstanding; u32 hw_crit_error; spinlock_t instance_lock; - - struct megasas_instance_template *instancet; }; #define MEGASAS_IS_LOGICAL(scp) \ @@ -1136,10 +1125,11 @@ struct compat_megasas_iocpacket { struct compat_iovec sgl[MAX_IOCTL_SGE]; } __attribute__ ((packed)); +#define MEGASAS_IOC_FIRMWARE _IOWR('M', 1, struct compat_megasas_iocpacket) +#else +#define MEGASAS_IOC_FIRMWARE _IOWR('M', 1, struct megasas_iocpacket) #endif -#define MEGASAS_IOC_FIRMWARE _IOWR('M', 1, struct megasas_iocpacket) -#define MEGASAS_IOC_FIRMWARE32 _IOWR('M', 1, struct compat_megasas_iocpacket) #define MEGASAS_IOC_GET_AEN _IOW('M', 3, struct megasas_aen) struct megasas_mgmt_info { diff --git a/trunk/drivers/scsi/qla1280.c b/trunk/drivers/scsi/qla1280.c index e0230249fa0f..0878f95b5449 100644 --- a/trunk/drivers/scsi/qla1280.c +++ b/trunk/drivers/scsi/qla1280.c @@ -17,11 +17,9 @@ * General Public License for more details. * ******************************************************************************/ -#define QLA1280_VERSION "3.26" +#define QLA1280_VERSION "3.25" /***************************************************************************** Revision History: - Rev 3.26, January 16, 2006 Jes Sorensen - - Ditch all < 2.6 support Rev 3.25.1, February 10, 2005 Christoph Hellwig - use pci_map_single to map non-S/G requests - remove qla1280_proc_info @@ -358,18 +356,25 @@ #include #include +#if LINUX_VERSION_CODE >= 0x020545 #include #include #include #include #include +#else +#include +#include "scsi.h" +#include +#include "sd.h" +#endif #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2) #include #endif -#if LINUX_VERSION_CODE < 0x020600 -#error "Kernels older than 2.6.0 are no longer supported" +#if LINUX_VERSION_CODE < 0x020407 +#error "Kernels older than 2.4.7 are no longer supported" #endif @@ -436,6 +441,52 @@ #define NVRAM_DELAY() udelay(500) /* 2 microseconds */ +#if LINUX_VERSION_CODE < 0x020500 +#define HOST_LOCK &io_request_lock +#define irqreturn_t void +#define IRQ_RETVAL(foo) +#define MSG_ORDERED_TAG 1 + +#define DMA_BIDIRECTIONAL SCSI_DATA_UNKNOWN +#define DMA_TO_DEVICE SCSI_DATA_WRITE +#define DMA_FROM_DEVICE SCSI_DATA_READ +#define DMA_NONE SCSI_DATA_NONE + +#ifndef HAVE_SECTOR_T +typedef unsigned int sector_t; +#endif + +static inline void +scsi_adjust_queue_depth(struct scsi_device *device, int tag, int depth) +{ + if (tag) { + device->tagged_queue = tag; + device->current_tag = 0; + } + device->queue_depth = depth; +} +static inline struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *t, size_t s) +{ + return scsi_register(t, s); +} +static inline void scsi_host_put(struct Scsi_Host *h) +{ + scsi_unregister(h); +} +#else +#define HOST_LOCK ha->host->host_lock +#endif +#if LINUX_VERSION_CODE < 0x020600 +#define DEV_SIMPLE_TAGS(device) device->tagged_queue +/* + * Hack around that qla1280_remove_one is called from + * qla1280_release in 2.4 + */ +#undef __devexit +#define __devexit +#else +#define DEV_SIMPLE_TAGS(device) device->simple_tags +#endif #if defined(__ia64__) && !defined(ia64_platform_is) #define ia64_platform_is(foo) (!strcmp(x, platform_name)) #endif @@ -455,6 +506,9 @@ static void qla1280_remove_one(struct pci_dev *); * QLogic Driver Support Function Prototypes. */ static void qla1280_done(struct scsi_qla_host *); +#if LINUX_VERSION_CODE < 0x020545 +static void qla1280_get_target_options(struct scsi_cmnd *, struct scsi_qla_host *); +#endif static int qla1280_get_token(char *); static int qla1280_setup(char *s) __init; @@ -556,7 +610,11 @@ __setup("qla1280=", qla1280_setup); #define CMD_SNSLEN(Cmnd) sizeof(Cmnd->sense_buffer) #define CMD_RESULT(Cmnd) Cmnd->result #define CMD_HANDLE(Cmnd) Cmnd->host_scribble +#if LINUX_VERSION_CODE < 0x020545 +#define CMD_REQUEST(Cmnd) Cmnd->request.cmd +#else #define CMD_REQUEST(Cmnd) Cmnd->request->cmd +#endif #define CMD_HOST(Cmnd) Cmnd->device->host #define SCSI_BUS_32(Cmnd) Cmnd->device->channel @@ -1006,10 +1064,10 @@ qla1280_error_action(struct scsi_cmnd *cmd, enum action action) add_timer(&timer); /* wait for the action to complete (or the timer to expire) */ - spin_unlock_irq(ha->host->host_lock); + spin_unlock_irq(HOST_LOCK); wait_for_completion(&wait); del_timer_sync(&timer); - spin_lock_irq(ha->host->host_lock); + spin_lock_irq(HOST_LOCK); sp->wait = NULL; /* the only action we might get a fail for is abort */ @@ -1115,6 +1173,96 @@ qla1280_biosparam(struct scsi_device *sdev, struct block_device *bdev, return 0; } +#if LINUX_VERSION_CODE < 0x020600 +static int +qla1280_detect(struct scsi_host_template *template) +{ + struct pci_device_id *id = &qla1280_pci_tbl[0]; + struct pci_dev *pdev = NULL; + int num_hosts = 0; + + if (sizeof(struct srb) > sizeof(Scsi_Pointer)) { + printk(KERN_WARNING + "qla1280: struct srb too big, aborting\n"); + return 0; + } + + if ((DMA_BIDIRECTIONAL != PCI_DMA_BIDIRECTIONAL) || + (DMA_TO_DEVICE != PCI_DMA_TODEVICE) || + (DMA_FROM_DEVICE != PCI_DMA_FROMDEVICE) || + (DMA_NONE != PCI_DMA_NONE)) { + printk(KERN_WARNING + "qla1280: dma direction bits don't match\n"); + return 0; + } + +#ifdef MODULE + /* + * If we are called as a module, the qla1280 pointer may not be null + * and it would point to our bootup string, just like on the lilo + * command line. IF not NULL, then process this config string with + * qla1280_setup + * + * Boot time Options + * To add options at boot time add a line to your lilo.conf file like: + * append="qla1280=verbose,max_tags:{{255,255,255,255},{255,255,255,255}}" + * which will result in the first four devices on the first two + * controllers being set to a tagged queue depth of 32. + */ + if (qla1280) + qla1280_setup(qla1280); +#endif + + /* First Initialize QLA12160 on PCI Bus 1 Dev 2 */ + while ((pdev = pci_find_device(id->vendor, id->device, pdev))) { + if (pdev->bus->number == 1 && PCI_SLOT(pdev->devfn) == 2) { + if (!qla1280_probe_one(pdev, id)) + num_hosts++; + } + } + + pdev = NULL; + /* Try and find each different type of adapter we support */ + for (id = &qla1280_pci_tbl[0]; id->device; id++) { + while ((pdev = pci_find_device(id->vendor, id->device, pdev))) { + /* + * skip QLA12160 already initialized on + * PCI Bus 1 Dev 2 since we already initialized + * and presented it + */ + if (id->device == PCI_DEVICE_ID_QLOGIC_ISP12160 && + pdev->bus->number == 1 && + PCI_SLOT(pdev->devfn) == 2) + continue; + + if (!qla1280_probe_one(pdev, id)) + num_hosts++; + } + } + + return num_hosts; +} + +/* + * This looks a bit ugly as we could just pass down host to + * qla1280_remove_one, but I want to keep qla1280_release purely a wrapper + * around pci_driver::remove as used from 2.6 onwards. + */ +static int +qla1280_release(struct Scsi_Host *host) +{ + struct scsi_qla_host *ha = (struct scsi_qla_host *)host->hostdata; + + qla1280_remove_one(ha->pdev); + return 0; +} + +static int +qla1280_biosparam_old(Disk * disk, kdev_t dev, int geom[]) +{ + return qla1280_biosparam(disk->device, NULL, disk->capacity, geom); +} +#endif /* disable risc and host interrupts */ static inline void @@ -1147,7 +1295,7 @@ qla1280_intr_handler(int irq, void *dev_id, struct pt_regs *regs) ENTER_INTR ("qla1280_intr_handler"); ha = (struct scsi_qla_host *)dev_id; - spin_lock(ha->host->host_lock); + spin_lock(HOST_LOCK); ha->isr_count++; reg = ha->iobase; @@ -1163,7 +1311,7 @@ qla1280_intr_handler(int irq, void *dev_id, struct pt_regs *regs) if (!list_empty(&ha->done_q)) qla1280_done(ha); - spin_unlock(ha->host->host_lock); + spin_unlock(HOST_LOCK); qla1280_enable_intrs(ha); @@ -1263,9 +1411,11 @@ qla1280_slave_configure(struct scsi_device *device) scsi_adjust_queue_depth(device, 0, default_depth); } +#if LINUX_VERSION_CODE > 0x020500 nv->bus[bus].target[target].parameter.enable_sync = device->sdtr; nv->bus[bus].target[target].parameter.enable_wide = device->wdtr; nv->bus[bus].target[target].ppr_1x160.flags.enable_ppr = device->ppr; +#endif if (driver_setup.no_sync || (driver_setup.sync_mask && @@ -1282,14 +1432,38 @@ qla1280_slave_configure(struct scsi_device *device) nv->bus[bus].target[target].ppr_1x160.flags.enable_ppr = 0; } - spin_lock_irqsave(ha->host->host_lock, flags); + spin_lock_irqsave(HOST_LOCK, flags); if (nv->bus[bus].target[target].parameter.enable_sync) status = qla1280_set_target_parameters(ha, bus, target); qla1280_get_target_parameters(ha, device); - spin_unlock_irqrestore(ha->host->host_lock, flags); + spin_unlock_irqrestore(HOST_LOCK, flags); return status; } +#if LINUX_VERSION_CODE < 0x020545 +/************************************************************************** + * qla1280_select_queue_depth + * + * Sets the queue depth for each SCSI device hanging off the input + * host adapter. We use a queue depth of 2 for devices that do not + * support tagged queueing. + **************************************************************************/ +static void +qla1280_select_queue_depth(struct Scsi_Host *host, struct scsi_device *sdev_q) +{ + struct scsi_qla_host *ha = (struct scsi_qla_host *)host->hostdata; + struct scsi_device *sdev; + + ENTER("qla1280_select_queue_depth"); + for (sdev = sdev_q; sdev; sdev = sdev->next) + if (sdev->host == host) + qla1280_slave_configure(sdev); + + if (sdev_q) + qla1280_check_for_dead_scsi_bus(ha, sdev_q->channel); + LEAVE("qla1280_select_queue_depth"); +} +#endif /* * qla1280_done @@ -1349,6 +1523,10 @@ qla1280_done(struct scsi_qla_host *ha) CMD_HANDLE(sp->cmd) = (unsigned char *)INVALID_HANDLE; ha->actthreads--; +#if LINUX_VERSION_CODE < 0x020500 + if (cmd->cmnd[0] == INQUIRY) + qla1280_get_target_options(cmd, ha); +#endif (*(cmd)->scsi_done)(cmd); if(sp->wait != NULL) @@ -1477,7 +1655,9 @@ qla1280_initialize_adapter(struct scsi_qla_host *ha) struct device_reg __iomem *reg; int status; int bus; +#if LINUX_VERSION_CODE > 0x020500 unsigned long flags; +#endif ENTER("qla1280_initialize_adapter"); @@ -1515,12 +1695,15 @@ qla1280_initialize_adapter(struct scsi_qla_host *ha) "NVRAM\n"); } +#if LINUX_VERSION_CODE >= 0x020500 /* * It's necessary to grab the spin here as qla1280_mailbox_command * needs to be able to drop the lock unconditionally to wait * for completion. + * In 2.4 ->detect is called with the io_request_lock held. */ - spin_lock_irqsave(ha->host->host_lock, flags); + spin_lock_irqsave(HOST_LOCK, flags); +#endif status = qla1280_load_firmware(ha); if (status) { @@ -1552,8 +1735,9 @@ qla1280_initialize_adapter(struct scsi_qla_host *ha) ha->flags.online = 1; out: - spin_unlock_irqrestore(ha->host->host_lock, flags); - +#if LINUX_VERSION_CODE >= 0x020500 + spin_unlock_irqrestore(HOST_LOCK, flags); +#endif if (status) dprintk(2, "qla1280_initialize_adapter: **** FAILED ****\n"); @@ -2466,14 +2650,14 @@ qla1280_mailbox_command(struct scsi_qla_host *ha, uint8_t mr, uint16_t *mb) timer.function = qla1280_mailbox_timeout; add_timer(&timer); - spin_unlock_irq(ha->host->host_lock); + spin_unlock_irq(HOST_LOCK); WRT_REG_WORD(®->host_cmd, HC_SET_HOST_INT); data = qla1280_debounce_register(®->istatus); wait_for_completion(&wait); del_timer_sync(&timer); - spin_lock_irq(ha->host->host_lock); + spin_lock_irq(HOST_LOCK); ha->mailbox_wait = NULL; @@ -2586,9 +2770,9 @@ qla1280_bus_reset(struct scsi_qla_host *ha, int bus) ha->bus_settings[bus].scsi_bus_dead = 1; ha->bus_settings[bus].failed_reset_count++; } else { - spin_unlock_irq(ha->host->host_lock); + spin_unlock_irq(HOST_LOCK); ssleep(reset_delay); - spin_lock_irq(ha->host->host_lock); + spin_lock_irq(HOST_LOCK); ha->bus_settings[bus].scsi_bus_dead = 0; ha->bus_settings[bus].failed_reset_count = 0; @@ -2894,7 +3078,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) (SCSI_TCN_32(cmd) | BIT_7) : SCSI_TCN_32(cmd); /* Enable simple tag queuing if device supports it. */ - if (cmd->device->simple_tags) + if (DEV_SIMPLE_TAGS(cmd->device)) pkt->control_flags |= cpu_to_le16(BIT_3); /* Load SCSI command packet. */ @@ -3193,7 +3377,7 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) (SCSI_TCN_32(cmd) | BIT_7) : SCSI_TCN_32(cmd); /* Enable simple tag queuing if device supports it. */ - if (cmd->device->simple_tags) + if (DEV_SIMPLE_TAGS(cmd->device)) pkt->control_flags |= cpu_to_le16(BIT_3); /* Load SCSI command packet. */ @@ -3705,6 +3889,50 @@ qla1280_rst_aen(struct scsi_qla_host *ha) } +#if LINUX_VERSION_CODE < 0x020500 +/* + * + */ +static void +qla1280_get_target_options(struct scsi_cmnd *cmd, struct scsi_qla_host *ha) +{ + unsigned char *result; + struct nvram *n; + int bus, target, lun; + + bus = SCSI_BUS_32(cmd); + target = SCSI_TCN_32(cmd); + lun = SCSI_LUN_32(cmd); + + /* + * Make sure to not touch anything if someone is using the + * sg interface. + */ + if (cmd->use_sg || (CMD_RESULT(cmd) >> 16) != DID_OK || lun) + return; + + result = cmd->request_buffer; + n = &ha->nvram; + + n->bus[bus].target[target].parameter.enable_wide = 0; + n->bus[bus].target[target].parameter.enable_sync = 0; + n->bus[bus].target[target].ppr_1x160.flags.enable_ppr = 0; + + if (result[7] & 0x60) + n->bus[bus].target[target].parameter.enable_wide = 1; + if (result[7] & 0x10) + n->bus[bus].target[target].parameter.enable_sync = 1; + if ((result[2] >= 3) && (result[4] + 5 > 56) && + (result[56] & 0x4)) + n->bus[bus].target[target].ppr_1x160.flags.enable_ppr = 1; + + dprintk(2, "get_target_options(): wide %i, sync %i, ppr %i\n", + n->bus[bus].target[target].parameter.enable_wide, + n->bus[bus].target[target].parameter.enable_sync, + n->bus[bus].target[target].ppr_1x160.flags.enable_ppr); +} +#endif + /* * qla1280_status_entry * Processes received ISP status entry. @@ -4043,7 +4271,7 @@ qla1280_get_target_parameters(struct scsi_qla_host *ha, } else printk(" Async"); - if (device->simple_tags) + if (DEV_SIMPLE_TAGS(device)) printk(", Tagged queuing: depth %d", device->queue_depth); printk("\n"); } @@ -4257,7 +4485,7 @@ qla1280_get_token(char *str) return ret; } - +#if LINUX_VERSION_CODE >= 0x020600 static struct scsi_host_template qla1280_driver_template = { .module = THIS_MODULE, .proc_name = "qla1280", @@ -4276,7 +4504,27 @@ static struct scsi_host_template qla1280_driver_template = { .cmd_per_lun = 1, .use_clustering = ENABLE_CLUSTERING, }; - +#else +static struct scsi_host_template qla1280_driver_template = { + .proc_name = "qla1280", + .name = "Qlogic ISP 1280/12160", + .detect = qla1280_detect, + .release = qla1280_release, + .info = qla1280_info, + .queuecommand = qla1280_queuecommand, + .eh_abort_handler = qla1280_eh_abort, + .eh_device_reset_handler= qla1280_eh_device_reset, + .eh_bus_reset_handler = qla1280_eh_bus_reset, + .eh_host_reset_handler = qla1280_eh_adapter_reset, + .bios_param = qla1280_biosparam_old, + .can_queue = 0xfffff, + .this_id = -1, + .sg_tablesize = SG_ALL, + .cmd_per_lun = 1, + .use_clustering = ENABLE_CLUSTERING, + .use_new_eh_code = 1, +}; +#endif static int __devinit qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) @@ -4367,6 +4615,10 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) host->max_sectors = 1024; host->unique_id = host->host_no; +#if LINUX_VERSION_CODE < 0x020545 + host->select_queue_depths = qla1280_select_queue_depth; +#endif + error = -ENODEV; #if MEMORY_MAPPED_IO @@ -4414,15 +4666,21 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) pci_set_drvdata(pdev, host); +#if LINUX_VERSION_CODE >= 0x020600 error = scsi_add_host(host, &pdev->dev); if (error) goto error_disable_adapter; scsi_scan_host(host); +#else + scsi_set_pci_device(host, pdev); +#endif return 0; +#if LINUX_VERSION_CODE >= 0x020600 error_disable_adapter: qla1280_disable_intrs(ha); +#endif error_free_irq: free_irq(pdev->irq, ha); error_release_region: @@ -4454,7 +4712,9 @@ qla1280_remove_one(struct pci_dev *pdev) struct Scsi_Host *host = pci_get_drvdata(pdev); struct scsi_qla_host *ha = (struct scsi_qla_host *)host->hostdata; +#if LINUX_VERSION_CODE >= 0x020600 scsi_remove_host(host); +#endif qla1280_disable_intrs(ha); @@ -4478,6 +4738,7 @@ qla1280_remove_one(struct pci_dev *pdev) scsi_host_put(host); } +#if LINUX_VERSION_CODE >= 0x020600 static struct pci_driver qla1280_pci_driver = { .name = "qla1280", .id_table = qla1280_pci_tbl, @@ -4523,6 +4784,10 @@ qla1280_exit(void) module_init(qla1280_init); module_exit(qla1280_exit); +#else +# define driver_template qla1280_driver_template +# include "scsi_module.c" +#endif MODULE_AUTHOR("Qlogic & Jes Sorensen"); MODULE_DESCRIPTION("Qlogic ISP SCSI (qla1x80/qla1x160) driver"); diff --git a/trunk/drivers/scsi/qla2xxx/qla_def.h b/trunk/drivers/scsi/qla2xxx/qla_def.h index bad066e5772a..79d8a914f9d0 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_def.h +++ b/trunk/drivers/scsi/qla2xxx/qla_def.h @@ -1680,8 +1680,7 @@ typedef struct fc_port { uint8_t mp_byte; /* multi-path byte (not used) */ uint8_t cur_path; /* current path id */ - spinlock_t rport_lock; - struct fc_rport *rport, *drport; + struct fc_rport *rport; u32 supported_classes; struct work_struct rport_add_work; struct work_struct rport_del_work; @@ -2271,7 +2270,6 @@ typedef struct scsi_qla_host { #define LOOP_RESET_NEEDED 24 #define BEACON_BLINK_NEEDED 25 #define REGISTER_FDMI_NEEDED 26 -#define FCPORT_UPDATE_NEEDED 27 uint32_t device_flags; #define DFLG_LOCAL_DEVICES BIT_0 diff --git a/trunk/drivers/scsi/qla2xxx/qla_gbl.h b/trunk/drivers/scsi/qla2xxx/qla_gbl.h index 35266bd5d538..32be4c14cccb 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_gbl.h +++ b/trunk/drivers/scsi/qla2xxx/qla_gbl.h @@ -47,11 +47,9 @@ extern int qla2x00_local_device_login(scsi_qla_host_t *, uint16_t); extern void qla2x00_restart_queues(scsi_qla_host_t *, uint8_t); extern void qla2x00_rescan_fcports(scsi_qla_host_t *); -extern void qla2x00_update_fcports(scsi_qla_host_t *); extern int qla2x00_abort_isp(scsi_qla_host_t *); -extern void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *); extern void qla2x00_reg_remote_port(scsi_qla_host_t *, fc_port_t *); /* @@ -72,8 +70,8 @@ extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *); extern void qla2x00_cmd_timeout(srb_t *); -extern void qla2x00_mark_device_lost(scsi_qla_host_t *, fc_port_t *, int, int); -extern void qla2x00_mark_all_devices_lost(scsi_qla_host_t *, int); +extern void qla2x00_mark_device_lost(scsi_qla_host_t *, fc_port_t *, int); +extern void qla2x00_mark_all_devices_lost(scsi_qla_host_t *); extern void qla2x00_blink_led(scsi_qla_host_t *); diff --git a/trunk/drivers/scsi/qla2xxx/qla_init.c b/trunk/drivers/scsi/qla2xxx/qla_init.c index e67bb0997818..a91fea69ad63 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_init.c +++ b/trunk/drivers/scsi/qla2xxx/qla_init.c @@ -32,6 +32,7 @@ static int qla2x00_fw_ready(scsi_qla_host_t *); static int qla2x00_configure_hba(scsi_qla_host_t *); static int qla2x00_configure_loop(scsi_qla_host_t *); static int qla2x00_configure_local_loop(scsi_qla_host_t *); +static void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *); static int qla2x00_configure_fabric(scsi_qla_host_t *); static int qla2x00_find_all_fabric_devs(scsi_qla_host_t *, struct list_head *); static int qla2x00_device_resync(scsi_qla_host_t *); @@ -1687,16 +1688,10 @@ static void qla2x00_rport_del(void *data) { fc_port_t *fcport = data; - struct fc_rport *rport; - unsigned long flags; - - spin_lock_irqsave(&fcport->rport_lock, flags); - rport = fcport->drport; - fcport->drport = NULL; - spin_unlock_irqrestore(&fcport->rport_lock, flags); - if (rport) - fc_remote_port_delete(rport); + if (fcport->rport) + fc_remote_port_delete(fcport->rport); + fcport->rport = NULL; } /** @@ -1724,7 +1719,6 @@ qla2x00_alloc_fcport(scsi_qla_host_t *ha, gfp_t flags) atomic_set(&fcport->state, FCS_UNCONFIGURED); fcport->flags = FCF_RLC_SUPPORT; fcport->supported_classes = FC_COS_UNSPECIFIED; - spin_lock_init(&fcport->rport_lock); INIT_WORK(&fcport->rport_add_work, qla2x00_rport_add, fcport); INIT_WORK(&fcport->rport_del_work, qla2x00_rport_del, fcport); @@ -2014,7 +2008,7 @@ qla2x00_probe_for_all_luns(scsi_qla_host_t *ha) { fc_port_t *fcport; - qla2x00_mark_all_devices_lost(ha, 0); + qla2x00_mark_all_devices_lost(ha); list_for_each_entry(fcport, &ha->fcports, list) { if (fcport->port_type != FCT_TARGET) continue; @@ -2038,9 +2032,13 @@ qla2x00_probe_for_all_luns(scsi_qla_host_t *ha) * Context: * Kernel context. */ -void +static void qla2x00_update_fcport(scsi_qla_host_t *ha, fc_port_t *fcport) { + uint16_t index; + unsigned long flags; + srb_t *sp; + fcport->ha = ha; fcport->login_retry = 0; fcport->port_login_retry_count = ha->port_down_retry_count * @@ -2049,6 +2047,28 @@ qla2x00_update_fcport(scsi_qla_host_t *ha, fc_port_t *fcport) PORT_RETRY_TIME); fcport->flags &= ~FCF_LOGIN_NEEDED; + /* + * Check for outstanding cmd on tape Bypass LUN discovery if active + * command on tape. + */ + if (fcport->flags & FCF_TAPE_PRESENT) { + spin_lock_irqsave(&ha->hardware_lock, flags); + for (index = 1; index < MAX_OUTSTANDING_COMMANDS; index++) { + fc_port_t *sfcp; + + if ((sp = ha->outstanding_cmds[index]) != 0) { + sfcp = sp->fcport; + if (sfcp == fcport) { + atomic_set(&fcport->state, FCS_ONLINE); + spin_unlock_irqrestore( + &ha->hardware_lock, flags); + return; + } + } + } + spin_unlock_irqrestore(&ha->hardware_lock, flags); + } + if (fcport->port_type == FCT_INITIATOR || fcport->port_type == FCT_BROADCAST) fcport->device_type = TYPE_PROCESSOR; @@ -2064,29 +2084,24 @@ qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport) { struct fc_rport_identifiers rport_ids; struct fc_rport *rport; - unsigned long flags; - if (fcport->drport) - qla2x00_rport_del(fcport); - if (fcport->rport) - return; + if (fcport->rport) { + fc_remote_port_delete(fcport->rport); + fcport->rport = NULL; + } rport_ids.node_name = wwn_to_u64(fcport->node_name); rport_ids.port_name = wwn_to_u64(fcport->port_name); rport_ids.port_id = fcport->d_id.b.domain << 16 | fcport->d_id.b.area << 8 | fcport->d_id.b.al_pa; rport_ids.roles = FC_RPORT_ROLE_UNKNOWN; - rport = fc_remote_port_add(ha->host, 0, &rport_ids); + fcport->rport = rport = fc_remote_port_add(ha->host, 0, &rport_ids); if (!rport) { qla_printk(KERN_WARNING, ha, "Unable to allocate fc remote port!\n"); return; } - spin_lock_irqsave(&fcport->rport_lock, flags); - fcport->rport = rport; *((fc_port_t **)rport->dd_data) = fcport; - spin_unlock_irqrestore(&fcport->rport_lock, flags); - rport->supported_classes = fcport->supported_classes; rport_ids.roles = FC_RPORT_ROLE_UNKNOWN; @@ -2202,11 +2217,12 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha) if (atomic_read(&fcport->state) == FCS_DEVICE_LOST) { qla2x00_mark_device_lost(ha, fcport, - ql2xplogiabsentdevice, 0); + ql2xplogiabsentdevice); if (fcport->loop_id != FC_NO_LOOP_ID && (fcport->flags & FCF_TAPE_PRESENT) == 0 && fcport->port_type != FCT_INITIATOR && fcport->port_type != FCT_BROADCAST) { + ha->isp_ops.fabric_logout(ha, fcport->loop_id, fcport->d_id.b.domain, @@ -2678,8 +2694,7 @@ qla2x00_device_resync(scsi_qla_host_t *ha) if (atomic_read(&fcport->state) == FCS_ONLINE) { if (format != 3 || fcport->port_type != FCT_INITIATOR) { - qla2x00_mark_device_lost(ha, fcport, - 0, 0); + qla2x00_mark_device_lost(ha, fcport, 0); } } fcport->flags &= ~FCF_FARP_DONE; @@ -2726,7 +2741,8 @@ qla2x00_fabric_dev_login(scsi_qla_host_t *ha, fc_port_t *fcport, ha->isp_ops.fabric_logout(ha, fcport->loop_id, fcport->d_id.b.domain, fcport->d_id.b.area, fcport->d_id.b.al_pa); - qla2x00_mark_device_lost(ha, fcport, 1, 0); + qla2x00_mark_device_lost(ha, fcport, 1); + } else { qla2x00_update_fcport(ha, fcport); } @@ -2839,7 +2855,7 @@ qla2x00_fabric_login(scsi_qla_host_t *ha, fc_port_t *fcport, ha->isp_ops.fabric_logout(ha, fcport->loop_id, fcport->d_id.b.domain, fcport->d_id.b.area, fcport->d_id.b.al_pa); - qla2x00_mark_device_lost(ha, fcport, 1, 0); + qla2x00_mark_device_lost(ha, fcport, 1); rval = 1; break; @@ -2974,17 +2990,6 @@ qla2x00_rescan_fcports(scsi_qla_host_t *ha) qla2x00_probe_for_all_luns(ha); } -void -qla2x00_update_fcports(scsi_qla_host_t *ha) -{ - fc_port_t *fcport; - - /* Go with deferred removal of rport references. */ - list_for_each_entry(fcport, &ha->fcports, list) - if (fcport->drport) - qla2x00_rport_del(fcport); -} - /* * qla2x00_abort_isp * Resets ISP and aborts all outstanding commands. @@ -3014,7 +3019,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); if (atomic_read(&ha->loop_state) != LOOP_DOWN) { atomic_set(&ha->loop_state, LOOP_DOWN); - qla2x00_mark_all_devices_lost(ha, 0); + qla2x00_mark_all_devices_lost(ha); } else { if (!atomic_read(&ha->loop_down_timer)) atomic_set(&ha->loop_down_timer, diff --git a/trunk/drivers/scsi/qla2xxx/qla_isr.c b/trunk/drivers/scsi/qla2xxx/qla_isr.c index 71a46fcee8cc..f63af081d4ff 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_isr.c +++ b/trunk/drivers/scsi/qla2xxx/qla_isr.c @@ -389,7 +389,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) if (atomic_read(&ha->loop_state) != LOOP_DOWN) { atomic_set(&ha->loop_state, LOOP_DOWN); atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); - qla2x00_mark_all_devices_lost(ha, 1); + qla2x00_mark_all_devices_lost(ha); } set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags); @@ -432,7 +432,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) atomic_set(&ha->loop_state, LOOP_DOWN); atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); ha->device_flags |= DFLG_NO_CABLE; - qla2x00_mark_all_devices_lost(ha, 1); + qla2x00_mark_all_devices_lost(ha); } ha->flags.management_server_logged_in = 0; @@ -453,7 +453,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) if (atomic_read(&ha->loop_state) != LOOP_DOWN) { atomic_set(&ha->loop_state, LOOP_DOWN); atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); - qla2x00_mark_all_devices_lost(ha, 1); + qla2x00_mark_all_devices_lost(ha); } set_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); @@ -482,7 +482,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) if (!atomic_read(&ha->loop_down_timer)) atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); - qla2x00_mark_all_devices_lost(ha, 1); + qla2x00_mark_all_devices_lost(ha); } if (!(test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags))) { @@ -506,7 +506,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) if (!atomic_read(&ha->loop_down_timer)) atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); - qla2x00_mark_all_devices_lost(ha, 1); + qla2x00_mark_all_devices_lost(ha); } set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags); @@ -580,7 +580,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) */ atomic_set(&ha->loop_state, LOOP_UP); - qla2x00_mark_all_devices_lost(ha, 1); + qla2x00_mark_all_devices_lost(ha); ha->flags.rscn_queue_overflow = 1; @@ -1091,7 +1091,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) cp->result = DID_BUS_BUSY << 16; if (atomic_read(&fcport->state) == FCS_ONLINE) { - qla2x00_mark_device_lost(ha, fcport, 1, 1); + qla2x00_mark_device_lost(ha, fcport, 1); } break; @@ -1135,7 +1135,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) /* Check to see if logout occurred. */ if ((le16_to_cpu(sts->status_flags) & SF_LOGOUT_SENT)) - qla2x00_mark_device_lost(ha, fcport, 1, 1); + qla2x00_mark_device_lost(ha, fcport, 1); break; case CS_QUEUE_FULL: diff --git a/trunk/drivers/scsi/qla2xxx/qla_os.c b/trunk/drivers/scsi/qla2xxx/qla_os.c index 5866a7c706a8..4916847d84ec 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_os.c +++ b/trunk/drivers/scsi/qla2xxx/qla_os.c @@ -756,7 +756,7 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd) if (ret == SUCCESS) { if (fcport->flags & FC_FABRIC_DEVICE) { ha->isp_ops.fabric_logout(ha, fcport->loop_id); - qla2x00_mark_device_lost(ha, fcport, 0, 0); + qla2x00_mark_device_lost(ha, fcport); } } #endif @@ -1642,31 +1642,6 @@ qla2x00_free_device(scsi_qla_host_t *ha) pci_disable_device(ha->pdev); } -static inline void -qla2x00_schedule_rport_del(struct scsi_qla_host *ha, fc_port_t *fcport, - int defer) -{ - unsigned long flags; - struct fc_rport *rport; - - if (!fcport->rport) - return; - - rport = fcport->rport; - if (defer) { - spin_lock_irqsave(&fcport->rport_lock, flags); - fcport->drport = rport; - fcport->rport = NULL; - spin_unlock_irqrestore(&fcport->rport_lock, flags); - set_bit(FCPORT_UPDATE_NEEDED, &ha->dpc_flags); - } else { - spin_lock_irqsave(&fcport->rport_lock, flags); - fcport->rport = NULL; - spin_unlock_irqrestore(&fcport->rport_lock, flags); - fc_remote_port_delete(rport); - } -} - /* * qla2x00_mark_device_lost Updates fcport state when device goes offline. * @@ -1677,10 +1652,10 @@ qla2x00_schedule_rport_del(struct scsi_qla_host *ha, fc_port_t *fcport, * Context: */ void qla2x00_mark_device_lost(scsi_qla_host_t *ha, fc_port_t *fcport, - int do_login, int defer) + int do_login) { - if (atomic_read(&fcport->state) == FCS_ONLINE) - qla2x00_schedule_rport_del(ha, fcport, defer); + if (atomic_read(&fcport->state) == FCS_ONLINE && fcport->rport) + schedule_work(&fcport->rport_del_work); /* * We may need to retry the login, so don't change the state of the @@ -1727,7 +1702,7 @@ void qla2x00_mark_device_lost(scsi_qla_host_t *ha, fc_port_t *fcport, * Context: */ void -qla2x00_mark_all_devices_lost(scsi_qla_host_t *ha, int defer) +qla2x00_mark_all_devices_lost(scsi_qla_host_t *ha) { fc_port_t *fcport; @@ -1741,13 +1716,10 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *ha, int defer) */ if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD) continue; - if (atomic_read(&fcport->state) == FCS_ONLINE) - qla2x00_schedule_rport_del(ha, fcport, defer); + if (atomic_read(&fcport->state) == FCS_ONLINE && fcport->rport) + schedule_work(&fcport->rport_del_work); atomic_set(&fcport->state, FCS_DEVICE_LOST); } - - if (defer && ha->dpc_wait && !ha->dpc_active) - up(ha->dpc_wait); } /* @@ -2189,9 +2161,6 @@ qla2x00_do_dpc(void *data) ha->host_no)); } - if (test_and_clear_bit(FCPORT_UPDATE_NEEDED, &ha->dpc_flags)) - qla2x00_update_fcports(ha); - if (test_and_clear_bit(LOOP_RESET_NEEDED, &ha->dpc_flags)) { DEBUG(printk("scsi(%ld): dpc: sched loop_reset()\n", ha->host_no)); @@ -2250,8 +2219,13 @@ qla2x00_do_dpc(void *data) DEBUG(printk("scsi(%ld): port login OK: logged in ID 0x%x\n", ha->host_no, fcport->loop_id)); - qla2x00_update_fcport(ha, - fcport); + fcport->port_login_retry_count = + ha->port_down_retry_count * PORT_RETRY_TIME; + atomic_set(&fcport->state, FCS_ONLINE); + atomic_set(&fcport->port_down_timer, + ha->port_down_retry_count * PORT_RETRY_TIME); + + fcport->login_retry = 0; } else if (status == 1) { set_bit(RELOGIN_NEEDED, &ha->dpc_flags); /* retry the login again */ @@ -2495,7 +2469,6 @@ qla2x00_timer(scsi_qla_host_t *ha) if ((test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || test_bit(LOOP_RESET_NEEDED, &ha->dpc_flags) || - test_bit(FCPORT_UPDATE_NEEDED, &ha->dpc_flags) || start_dpc || test_bit(LOGIN_RETRY_NEEDED, &ha->dpc_flags) || test_bit(RESET_MARKER_NEEDED, &ha->dpc_flags) || diff --git a/trunk/drivers/scsi/scsi_error.c b/trunk/drivers/scsi/scsi_error.c index 5cc97b721661..a2333d2c7af0 100644 --- a/trunk/drivers/scsi/scsi_error.c +++ b/trunk/drivers/scsi/scsi_error.c @@ -1350,7 +1350,7 @@ static void scsi_eh_lock_door(struct scsi_device *sdev) cmnd[4] = SCSI_REMOVAL_PREVENT; cmnd[5] = 0; - scsi_execute_async(sdev, cmnd, 6, DMA_NONE, NULL, 0, 0, 10 * HZ, + scsi_execute_async(sdev, cmnd, DMA_NONE, NULL, 0, 0, 10 * HZ, 5, NULL, NULL, GFP_KERNEL); } diff --git a/trunk/drivers/scsi/scsi_lib.c b/trunk/drivers/scsi/scsi_lib.c index 4a602853a98e..3574ba935af8 100644 --- a/trunk/drivers/scsi/scsi_lib.c +++ b/trunk/drivers/scsi/scsi_lib.c @@ -436,7 +436,6 @@ static int scsi_req_map_sg(struct request *rq, struct scatterlist *sgl, * scsi_execute_async - insert request * @sdev: scsi device * @cmd: scsi command - * @cmd_len: length of scsi cdb * @data_direction: data direction * @buffer: data buffer (this can be a kernel buffer or scatterlist) * @bufflen: len of buffer @@ -446,7 +445,7 @@ static int scsi_req_map_sg(struct request *rq, struct scatterlist *sgl, * @flags: or into request flags **/ int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, - int cmd_len, int data_direction, void *buffer, unsigned bufflen, + int data_direction, void *buffer, unsigned bufflen, int use_sg, int timeout, int retries, void *privdata, void (*done)(void *, char *, int, int), gfp_t gfp) { @@ -473,7 +472,7 @@ int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, if (err) goto free_req; - req->cmd_len = cmd_len; + req->cmd_len = COMMAND_SIZE(cmd[0]); memcpy(req->cmd, cmd, req->cmd_len); req->sense = sioc->sense; req->sense_len = 0; diff --git a/trunk/drivers/scsi/scsi_transport_sas.c b/trunk/drivers/scsi/scsi_transport_sas.c index 210dab5879fa..a3e0b7bc2d7b 100644 --- a/trunk/drivers/scsi/scsi_transport_sas.c +++ b/trunk/drivers/scsi/scsi_transport_sas.c @@ -377,7 +377,7 @@ static void sas_phy_release(struct device *dev) /** * sas_phy_alloc -- allocates and initialize a SAS PHY structure * @parent: Parent device - * @number: Phy index + * @number: Port number * * Allocates an SAS PHY structure. It will be added in the device tree * below the device specified by @parent, which has to be either a Scsi_Host @@ -595,8 +595,8 @@ struct sas_rphy *sas_rphy_alloc(struct sas_phy *parent) device_initialize(&rphy->dev); rphy->dev.parent = get_device(&parent->dev); rphy->dev.release = sas_rphy_release; - sprintf(rphy->dev.bus_id, "rphy-%d:%d-%d", - shost->host_no, parent->port_identifier, parent->number); + sprintf(rphy->dev.bus_id, "rphy-%d:%d", + shost->host_no, parent->number); transport_setup_device(&rphy->dev); return rphy; diff --git a/trunk/drivers/scsi/sg.c b/trunk/drivers/scsi/sg.c index 7d0700091f3d..78aad9582bcf 100644 --- a/trunk/drivers/scsi/sg.c +++ b/trunk/drivers/scsi/sg.c @@ -741,7 +741,7 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp, hp->duration = jiffies_to_msecs(jiffies); /* Now send everything of to mid-level. The next time we hear about this packet is when sg_cmd_done() is called (i.e. a callback). */ - if (scsi_execute_async(sdp->device, cmnd, hp->cmd_len, data_dir, srp->data.buffer, + if (scsi_execute_async(sdp->device, cmnd, data_dir, srp->data.buffer, hp->dxfer_len, srp->data.k_use_sg, timeout, SG_DEFAULT_RETRIES, srp, sg_cmd_done, GFP_ATOMIC)) { diff --git a/trunk/drivers/scsi/st.c b/trunk/drivers/scsi/st.c index 7f96f33c1bb1..13b1d3aac265 100644 --- a/trunk/drivers/scsi/st.c +++ b/trunk/drivers/scsi/st.c @@ -508,7 +508,7 @@ st_do_scsi(struct st_request * SRpnt, struct scsi_tape * STp, unsigned char *cmd STp->buffer->cmdstat.have_sense = 0; STp->buffer->syscall_result = 0; - if (scsi_execute_async(STp->device, cmd, COMMAND_SIZE(cmd[0]), direction, + if (scsi_execute_async(STp->device, cmd, direction, &((STp->buffer)->sg[0]), bytes, (STp->buffer)->sg_segs, timeout, retries, SRpnt, st_sleep_done, GFP_KERNEL)) { /* could not allocate the buffer or request was too large */ diff --git a/trunk/drivers/serial/21285.c b/trunk/drivers/serial/21285.c index 7aef7518b0d1..221999bcf8fe 100644 --- a/trunk/drivers/serial/21285.c +++ b/trunk/drivers/serial/21285.c @@ -366,7 +366,7 @@ static struct uart_port serial21285_port = { .irq = NO_IRQ, .fifosize = 16, .ops = &serial21285_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, }; static void serial21285_setup_ports(void) diff --git a/trunk/drivers/serial/8250.c b/trunk/drivers/serial/8250.c index 179c1f065e60..bc36edff2058 100644 --- a/trunk/drivers/serial/8250.c +++ b/trunk/drivers/serial/8250.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -2025,6 +2026,12 @@ static void serial8250_config_port(struct uart_port *port, int flags) int probeflags = PROBE_ANY; int ret; + /* + * Don't probe for MCA ports on non-MCA machines. + */ + if (up->port.flags & UPF_BOOT_ONLYMCA && !MCA_bus) + return; + /* * Find the region that we can probe for. This in turn * tells us whether we can probe for the type of port. @@ -2157,7 +2164,7 @@ serial8250_register_ports(struct uart_driver *drv, struct device *dev) /* * Wait for transmitter & holding register to empty */ -static inline void wait_for_xmitr(struct uart_8250_port *up, int bits) +static inline void wait_for_xmitr(struct uart_8250_port *up) { unsigned int status, tmout = 10000; @@ -2171,7 +2178,7 @@ static inline void wait_for_xmitr(struct uart_8250_port *up, int bits) if (--tmout == 0) break; udelay(1); - } while ((status & bits) != bits); + } while ((status & BOTH_EMPTY) != BOTH_EMPTY); /* Wait up to 1s for flow control if necessary */ if (up->port.flags & UPF_CONS_FLOW) { @@ -2211,7 +2218,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) * Now, do each character */ for (i = 0; i < count; i++, s++) { - wait_for_xmitr(up, UART_LSR_THRE); + wait_for_xmitr(up); /* * Send the character out. @@ -2219,7 +2226,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) */ serial_out(up, UART_TX, *s); if (*s == 10) { - wait_for_xmitr(up, UART_LSR_THRE); + wait_for_xmitr(up); serial_out(up, UART_TX, 13); } } @@ -2228,8 +2235,8 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) * Finally, wait for transmitter to become empty * and restore the IER */ - wait_for_xmitr(up, BOTH_EMPTY); - serial_out(up, UART_IER, ier | UART_IER_THRI); + wait_for_xmitr(up); + serial_out(up, UART_IER, ier); } static int serial8250_console_setup(struct console *co, char *options) diff --git a/trunk/drivers/serial/Kconfig b/trunk/drivers/serial/Kconfig index 0d38f0f2ae29..9fd1925de361 100644 --- a/trunk/drivers/serial/Kconfig +++ b/trunk/drivers/serial/Kconfig @@ -23,7 +23,7 @@ config SERIAL_8250 work.) To compile this driver as a module, choose M here: the - module will be called 8250. + module will be called serial. [WARNING: Do not compile this driver as a module if you are using non-standard serial ports, since the configuration information will be lost when the driver is unloaded. This limitation may be lifted diff --git a/trunk/drivers/serial/amba-pl010.c b/trunk/drivers/serial/amba-pl010.c index 429de2723a1c..3490022e9fdc 100644 --- a/trunk/drivers/serial/amba-pl010.c +++ b/trunk/drivers/serial/amba-pl010.c @@ -566,7 +566,7 @@ static struct uart_amba_port amba_ports[UART_NR] = { .uartclk = 14745600, .fifosize = 16, .ops = &amba_pl010_pops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 0, }, .dtr_mask = 1 << 5, @@ -581,7 +581,7 @@ static struct uart_amba_port amba_ports[UART_NR] = { .uartclk = 14745600, .fifosize = 16, .ops = &amba_pl010_pops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 1, }, .dtr_mask = 1 << 7, diff --git a/trunk/drivers/serial/clps711x.c b/trunk/drivers/serial/clps711x.c index ce7b2e4ecd17..8ef999481f93 100644 --- a/trunk/drivers/serial/clps711x.c +++ b/trunk/drivers/serial/clps711x.c @@ -410,7 +410,7 @@ static struct uart_port clps711x_ports[UART_NR] = { .fifosize = 16, .ops = &clps711x_pops, .line = 0, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, }, { .iobase = SYSCON2, @@ -419,7 +419,7 @@ static struct uart_port clps711x_ports[UART_NR] = { .fifosize = 16, .ops = &clps711x_pops, .line = 1, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, } }; diff --git a/trunk/drivers/serial/imx.c b/trunk/drivers/serial/imx.c index 858048efe1ed..587cc6a95114 100644 --- a/trunk/drivers/serial/imx.c +++ b/trunk/drivers/serial/imx.c @@ -402,10 +402,10 @@ static int imx_startup(struct uart_port *port) DRIVER_NAME, sport); if (retval) goto error_out2; - retval = request_irq(sport->rtsirq, imx_rtsint, - SA_TRIGGER_FALLING | SA_TRIGGER_RISING, + retval = request_irq(sport->rtsirq, imx_rtsint, 0, DRIVER_NAME, sport); if (retval) goto error_out3; + set_irq_type(sport->rtsirq, IRQT_BOTHEDGE); /* * Finally, clear and enable interrupts @@ -674,7 +674,7 @@ static struct imx_port imx_ports[] = { .irq = UART1_MINT_RX, .uartclk = 16000000, .fifosize = 8, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .ops = &imx_pops, .line = 0, }, @@ -690,7 +690,7 @@ static struct imx_port imx_ports[] = { .irq = UART2_MINT_RX, .uartclk = 16000000, .fifosize = 8, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .ops = &imx_pops, .line = 1, }, diff --git a/trunk/drivers/serial/s3c2410.c b/trunk/drivers/serial/s3c2410.c index 0a2dd6c5b95f..eb4883efb7c6 100644 --- a/trunk/drivers/serial/s3c2410.c +++ b/trunk/drivers/serial/s3c2410.c @@ -1060,7 +1060,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, dbg("resource %p (%lx..%lx)\n", res, res->start, res->end); port->mapbase = res->start; - port->membase = S3C24XX_VA_UART + (res->start - S3C24XX_PA_UART); + port->membase = S3C24XX_VA_UART + (res->start - S3C2410_PA_UART); port->irq = platform_get_irq(platdev, 0); ourport->clk = clk_get(&platdev->dev, "uart"); diff --git a/trunk/drivers/serial/sa1100.c b/trunk/drivers/serial/sa1100.c index ff7b60b4de37..1bd93168f504 100644 --- a/trunk/drivers/serial/sa1100.c +++ b/trunk/drivers/serial/sa1100.c @@ -665,21 +665,21 @@ void __init sa1100_register_uart(int idx, int port) sa1100_ports[idx].port.membase = (void __iomem *)&Ser1UTCR0; sa1100_ports[idx].port.mapbase = _Ser1UTCR0; sa1100_ports[idx].port.irq = IRQ_Ser1UART; - sa1100_ports[idx].port.flags = UPF_BOOT_AUTOCONF; + sa1100_ports[idx].port.flags = ASYNC_BOOT_AUTOCONF; break; case 2: sa1100_ports[idx].port.membase = (void __iomem *)&Ser2UTCR0; sa1100_ports[idx].port.mapbase = _Ser2UTCR0; sa1100_ports[idx].port.irq = IRQ_Ser2ICP; - sa1100_ports[idx].port.flags = UPF_BOOT_AUTOCONF; + sa1100_ports[idx].port.flags = ASYNC_BOOT_AUTOCONF; break; case 3: sa1100_ports[idx].port.membase = (void __iomem *)&Ser3UTCR0; sa1100_ports[idx].port.mapbase = _Ser3UTCR0; sa1100_ports[idx].port.irq = IRQ_Ser3UART; - sa1100_ports[idx].port.flags = UPF_BOOT_AUTOCONF; + sa1100_ports[idx].port.flags = ASYNC_BOOT_AUTOCONF; break; default: diff --git a/trunk/drivers/serial/serial_core.c b/trunk/drivers/serial/serial_core.c index 0717abfdae06..943770470b9d 100644 --- a/trunk/drivers/serial/serial_core.c +++ b/trunk/drivers/serial/serial_core.c @@ -332,7 +332,7 @@ uart_get_baud_rate(struct uart_port *port, struct termios *termios, struct termios *old, unsigned int min, unsigned int max) { unsigned int try, baud, altbaud = 38400; - upf_t flags = port->flags & UPF_SPD_MASK; + unsigned int flags = port->flags & UPF_SPD_MASK; if (flags == UPF_SPD_HI) altbaud = 57600; @@ -615,9 +615,8 @@ static int uart_set_info(struct uart_state *state, struct serial_struct new_serial; struct uart_port *port = state->port; unsigned long new_port; - unsigned int change_irq, change_port, closing_wait; + unsigned int change_irq, change_port, old_flags, closing_wait; unsigned int old_custom_divisor, close_delay; - upf_t old_flags, new_flags; int retval = 0; if (copy_from_user(&new_serial, newinfo, sizeof(new_serial))) @@ -656,7 +655,6 @@ static int uart_set_info(struct uart_state *state, new_serial.type != port->type; old_flags = port->flags; - new_flags = new_serial.flags; old_custom_divisor = port->custom_divisor; if (!capable(CAP_SYS_ADMIN)) { @@ -666,10 +664,10 @@ static int uart_set_info(struct uart_state *state, (close_delay != state->close_delay) || (closing_wait != state->closing_wait) || (new_serial.xmit_fifo_size != port->fifosize) || - (((new_flags ^ old_flags) & ~UPF_USR_MASK) != 0)) + (((new_serial.flags ^ old_flags) & ~UPF_USR_MASK) != 0)) goto exit; port->flags = ((port->flags & ~UPF_USR_MASK) | - (new_flags & UPF_USR_MASK)); + (new_serial.flags & UPF_USR_MASK)); port->custom_divisor = new_serial.custom_divisor; goto check_and_exit; } @@ -766,7 +764,7 @@ static int uart_set_info(struct uart_state *state, port->irq = new_serial.irq; port->uartclk = new_serial.baud_base * 16; port->flags = (port->flags & ~UPF_CHANGE_MASK) | - (new_flags & UPF_CHANGE_MASK); + (new_serial.flags & UPF_CHANGE_MASK); port->custom_divisor = new_serial.custom_divisor; state->close_delay = close_delay; state->closing_wait = closing_wait; @@ -1872,7 +1870,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port) mutex_lock(&state->mutex); if (state->info && state->info->flags & UIF_INITIALIZED) { - const struct uart_ops *ops = port->ops; + struct uart_ops *ops = port->ops; spin_lock_irq(&port->lock); ops->stop_tx(port); @@ -1934,7 +1932,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port) } if (state->info && state->info->flags & UIF_INITIALIZED) { - const struct uart_ops *ops = port->ops; + struct uart_ops *ops = port->ops; int ret; ops->set_mctrl(port, 0); diff --git a/trunk/drivers/serial/serial_lh7a40x.c b/trunk/drivers/serial/serial_lh7a40x.c index d0490f67f597..d4a1f0e798c1 100644 --- a/trunk/drivers/serial/serial_lh7a40x.c +++ b/trunk/drivers/serial/serial_lh7a40x.c @@ -506,7 +506,7 @@ static struct uart_port_lh7a40x lh7a40x_ports[DEV_NR] = { .uartclk = 14745600/2, .fifosize = 16, .ops = &lh7a40x_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 0, }, }, @@ -519,7 +519,7 @@ static struct uart_port_lh7a40x lh7a40x_ports[DEV_NR] = { .uartclk = 14745600/2, .fifosize = 16, .ops = &lh7a40x_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 1, }, }, @@ -532,7 +532,7 @@ static struct uart_port_lh7a40x lh7a40x_ports[DEV_NR] = { .uartclk = 14745600/2, .fifosize = 16, .ops = &lh7a40x_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 2, }, }, diff --git a/trunk/drivers/serial/sh-sci.c b/trunk/drivers/serial/sh-sci.c index 0111206327ca..a9e070759628 100644 --- a/trunk/drivers/serial/sh-sci.c +++ b/trunk/drivers/serial/sh-sci.c @@ -1113,10 +1113,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0xfffffe80, .mapbase = 0xfffffe80, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 25, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 0, }, .type = PORT_SCI, @@ -1128,10 +1128,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)SCIF0, .mapbase = SCIF0, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 55, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 0, }, .type = PORT_SCIF, @@ -1142,10 +1142,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)SCIF2, .mapbase = SCIF2, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 59, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 1, }, .type = PORT_SCIF, @@ -1157,10 +1157,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0xfffffe80, .mapbase = 0xfffffe80, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 25, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 0, }, .type = PORT_SCI, @@ -1171,10 +1171,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0xa4000150, .mapbase = 0xa4000150, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 59, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 1, }, .type = PORT_SCIF, @@ -1185,10 +1185,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0xa4000140, .mapbase = 0xa4000140, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 55, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 2, }, .type = PORT_IRDA, @@ -1200,10 +1200,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0xA4430000, .mapbase = 0xA4430000, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 25, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 0, }, .type = PORT_SCIF, @@ -1215,10 +1215,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0xffe00000, .mapbase = 0xffe00000, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 25, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 0, }, .type = PORT_SCIF, @@ -1230,10 +1230,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0xffe80000, .mapbase = 0xffe80000, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 43, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 0, }, .type = PORT_SCIF, @@ -1245,10 +1245,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0xffe00000, .mapbase = 0xffe00000, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 25, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 0, }, .type = PORT_SCI, @@ -1259,10 +1259,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0xffe80000, .mapbase = 0xffe80000, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 43, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 1, }, .type = PORT_SCIF, @@ -1274,10 +1274,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0xfe600000, .mapbase = 0xfe600000, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 55, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 0, }, .type = PORT_SCIF, @@ -1288,10 +1288,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0xfe610000, .mapbase = 0xfe610000, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 75, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 1, }, .type = PORT_SCIF, @@ -1302,10 +1302,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0xfe620000, .mapbase = 0xfe620000, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 79, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 2, }, .type = PORT_SCIF, @@ -1317,10 +1317,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0xffe80000, .mapbase = 0xffe80000, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 43, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 0, }, .type = PORT_SCIF, @@ -1332,10 +1332,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0xffe00000, .mapbase = 0xffe00000, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 26, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 0, }, .type = PORT_SCIF, @@ -1346,10 +1346,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0xffe80000, .mapbase = 0xffe80000, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 43, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 1, }, .type = PORT_SCIF, @@ -1359,10 +1359,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { #elif defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103) { .port = { - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 42, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 0, }, .type = PORT_SCIF, @@ -1374,10 +1374,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0x00ffffb0, .mapbase = 0x00ffffb0, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 54, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 0, }, .type = PORT_SCI, @@ -1388,10 +1388,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0x00ffffb8, .mapbase = 0x00ffffb8, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 58, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 1, }, .type = PORT_SCI, @@ -1402,10 +1402,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0x00ffffc0, .mapbase = 0x00ffffc0, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 62, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 2, }, .type = PORT_SCI, @@ -1417,10 +1417,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0x00ffff78, .mapbase = 0x00ffff78, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 90, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 0, }, .type = PORT_SCI, @@ -1431,10 +1431,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0x00ffff80, .mapbase = 0x00ffff80, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 94, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 1, }, .type = PORT_SCI, @@ -1445,10 +1445,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = { .port = { .membase = (void *)0x00ffff88, .mapbase = 0x00ffff88, - .iotype = UPIO_MEM, + .iotype = SERIAL_IO_MEM, .irq = 98, .ops = &sci_uart_ops, - .flags = UPF_BOOT_AUTOCONF, + .flags = ASYNC_BOOT_AUTOCONF, .line = 2, }, .type = PORT_SCI, diff --git a/trunk/drivers/serial/sunsu.c b/trunk/drivers/serial/sunsu.c index bc67442c6b4c..9a3665b34d97 100644 --- a/trunk/drivers/serial/sunsu.c +++ b/trunk/drivers/serial/sunsu.c @@ -669,7 +669,7 @@ static int sunsu_startup(struct uart_port *port) * if it is, then bail out, because there's likely no UART * here. */ - if (!(up->port.flags & UPF_BUGGY_UART) && + if (!(up->port.flags & ASYNC_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; @@ -707,7 +707,7 @@ static int sunsu_startup(struct uart_port *port) up->ier = UART_IER_RLSI | UART_IER_RDI; serial_outp(up, UART_IER, up->ier); - if (up->port.flags & UPF_FOURPORT) { + if (up->port.flags & ASYNC_FOURPORT) { unsigned int icp; /* * Enable interrupts on the AST Fourport board @@ -740,7 +740,7 @@ static void sunsu_shutdown(struct uart_port *port) serial_outp(up, UART_IER, 0); spin_lock_irqsave(&up->port.lock, flags); - if (up->port.flags & UPF_FOURPORT) { + if (up->port.flags & ASYNC_FOURPORT) { /* reset interrupts on the AST Fourport board */ inb((up->port.iobase & 0xfe0) | 0x1f); up->port.mctrl |= TIOCM_OUT1; @@ -1132,7 +1132,7 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up) spin_lock_irqsave(&up->port.lock, flags); - if (!(up->port.flags & UPF_BUGGY_UART)) { + if (!(up->port.flags & ASYNC_BUGGY_UART)) { /* * Do a simple existence test first; if we fail this, there's * no point trying anything else. @@ -1170,7 +1170,7 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up) * manufacturer would be stupid enough to design a board * that conflicts with COM 1-4 --- we hope! */ - if (!(up->port.flags & UPF_SKIP_TEST)) { + if (!(up->port.flags & ASYNC_SKIP_TEST)) { serial_outp(up, UART_MCR, UART_MCR_LOOP | 0x0A); status1 = serial_inp(up, UART_MSR) & 0xF0; serial_outp(up, UART_MCR, save_mcr); @@ -1371,7 +1371,7 @@ static __inline__ void wait_for_xmitr(struct uart_sunsu_port *up) } while ((status & BOTH_EMPTY) != BOTH_EMPTY); /* Wait up to 1s for flow control if necessary */ - if (up->port.flags & UPF_CONS_FLOW) { + if (up->port.flags & ASYNC_CONS_FLOW) { tmout = 1000000; while (--tmout && ((serial_in(up, UART_MSR) & UART_MSR_CTS) == 0)) @@ -1513,7 +1513,7 @@ static int __init sunsu_serial_init(void) up->su_type == SU_PORT_KBD) continue; - up->port.flags |= UPF_BOOT_AUTOCONF; + up->port.flags |= ASYNC_BOOT_AUTOCONF; up->port.type = PORT_UNKNOWN; up->port.uartclk = (SU_BASE_BAUD * 16); diff --git a/trunk/drivers/video/amba-clcd.c b/trunk/drivers/video/amba-clcd.c index 6761b68c35e9..b2187175d03f 100644 --- a/trunk/drivers/video/amba-clcd.c +++ b/trunk/drivers/video/amba-clcd.c @@ -116,10 +116,9 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var) int ret = 0; memset(&var->transp, 0, sizeof(var->transp)); - - var->red.msb_right = 0; - var->green.msb_right = 0; - var->blue.msb_right = 0; + memset(&var->red, 0, sizeof(var->red)); + memset(&var->green, 0, sizeof(var->green)); + memset(&var->blue, 0, sizeof(var->blue)); switch (var->bits_per_pixel) { case 1: @@ -134,20 +133,34 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var) var->blue.offset = 0; break; case 16: - var->red.length = 5; - var->blue.length = 5; - /* - * Green length can be 5 or 6 depending whether - * we're operating in RGB555 or RGB565 mode. - */ - if (var->green.length != 5 && var->green.length != 6) - var->green.length = 6; + var->red.length = 5; + var->green.length = 6; + var->blue.length = 5; + if (fb->panel->cntl & CNTL_BGR) { + var->red.offset = 11; + var->green.offset = 5; + var->blue.offset = 0; + } else { + var->red.offset = 0; + var->green.offset = 5; + var->blue.offset = 11; + } break; case 32: if (fb->panel->cntl & CNTL_LCDTFT) { var->red.length = 8; var->green.length = 8; var->blue.length = 8; + + if (fb->panel->cntl & CNTL_BGR) { + var->red.offset = 16; + var->green.offset = 8; + var->blue.offset = 0; + } else { + var->red.offset = 0; + var->green.offset = 8; + var->blue.offset = 16; + } break; } default: @@ -155,23 +168,6 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var) break; } - /* - * >= 16bpp displays have separate colour component bitfields - * encoded in the pixel data. Calculate their position from - * the bitfield length defined above. - */ - if (ret == 0 && var->bits_per_pixel >= 16) { - if (fb->panel->cntl & CNTL_BGR) { - var->blue.offset = 0; - var->green.offset = var->blue.offset + var->blue.length; - var->red.offset = var->green.offset + var->green.length; - } else { - var->red.offset = 0; - var->green.offset = var->red.offset + var->red.length; - var->blue.offset = var->green.offset + var->green.length; - } - } - return ret; } diff --git a/trunk/fs/bio.c b/trunk/fs/bio.c index 1f3bb501c262..bbc442b8c867 100644 --- a/trunk/fs/bio.c +++ b/trunk/fs/bio.c @@ -411,7 +411,6 @@ static int __bio_add_page(request_queue_t *q, struct bio *bio, struct page /** * bio_add_pc_page - attempt to add page to bio - * @q: the target queue * @bio: destination bio * @page: page to add * @len: vec entry length diff --git a/trunk/include/asm-arm/arch-s3c2410/debug-macro.S b/trunk/include/asm-arm/arch-s3c2410/debug-macro.S index 5f8223e700d3..abfbe45cd17c 100644 --- a/trunk/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/trunk/include/asm-arm/arch-s3c2410/debug-macro.S @@ -25,7 +25,7 @@ .macro addruart, rx mrc p15, 0, \rx, c1, c0 tst \rx, #1 - ldreq \rx, = S3C24XX_PA_UART + ldreq \rx, = S3C2410_PA_UART ldrne \rx, = S3C24XX_VA_UART #if CONFIG_DEBUG_S3C2410_UART != 0 add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C2410_UART) @@ -44,7 +44,7 @@ 1003: mrc p15, 0, \rd, c1, c0 tst \rd, #1 - addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) + addeq \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART) addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) bic \rd, \rd, #0xff000 ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] @@ -75,7 +75,7 @@ 1003: mrc p15, 0, \rd, c1, c0 tst \rd, #1 - addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) + addeq \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART) addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) bic \rd, \rd, #0xff000 ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] diff --git a/trunk/include/asm-arm/arch-s3c2410/map.h b/trunk/include/asm-arm/arch-s3c2410/map.h index c380d264a847..1833ea5c4220 100644 --- a/trunk/include/asm-arm/arch-s3c2410/map.h +++ b/trunk/include/asm-arm/arch-s3c2410/map.h @@ -14,7 +14,6 @@ * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out * 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv * 10-Mar-2005 LCVR Added support to S3C2400, changed {VA,SZ} names - * 15-Jan-2006 LCVR Added S3C24XX_PA macros for common S3C24XX resources */ #ifndef __ASM_ARCH_MAP_H @@ -189,42 +188,5 @@ #define S3C2400_SDRAM_PA (S3C2400_CS6) -/* Use a single interface for common resources between S3C24XX cpus */ - -#ifdef CONFIG_CPU_S3C2400 -#define S3C24XX_PA_IRQ S3C2400_PA_IRQ -#define S3C24XX_PA_MEMCTRL S3C2400_PA_MEMCTRL -#define S3C24XX_PA_USBHOST S3C2400_PA_USBHOST -#define S3C24XX_PA_DMA S3C2400_PA_DMA -#define S3C24XX_PA_CLKPWR S3C2400_PA_CLKPWR -#define S3C24XX_PA_LCD S3C2400_PA_LCD -#define S3C24XX_PA_UART S3C2400_PA_UART -#define S3C24XX_PA_TIMER S3C2400_PA_TIMER -#define S3C24XX_PA_USBDEV S3C2400_PA_USBDEV -#define S3C24XX_PA_WATCHDOG S3C2400_PA_WATCHDOG -#define S3C24XX_PA_IIC S3C2400_PA_IIC -#define S3C24XX_PA_IIS S3C2400_PA_IIS -#define S3C24XX_PA_GPIO S3C2400_PA_GPIO -#define S3C24XX_PA_RTC S3C2400_PA_RTC -#define S3C24XX_PA_ADC S3C2400_PA_ADC -#define S3C24XX_PA_SPI S3C2400_PA_SPI -#else -#define S3C24XX_PA_IRQ S3C2410_PA_IRQ -#define S3C24XX_PA_MEMCTRL S3C2410_PA_MEMCTRL -#define S3C24XX_PA_USBHOST S3C2410_PA_USBHOST -#define S3C24XX_PA_DMA S3C2410_PA_DMA -#define S3C24XX_PA_CLKPWR S3C2410_PA_CLKPWR -#define S3C24XX_PA_LCD S3C2410_PA_LCD -#define S3C24XX_PA_UART S3C2410_PA_UART -#define S3C24XX_PA_TIMER S3C2410_PA_TIMER -#define S3C24XX_PA_USBDEV S3C2410_PA_USBDEV -#define S3C24XX_PA_WATCHDOG S3C2410_PA_WATCHDOG -#define S3C24XX_PA_IIC S3C2410_PA_IIC -#define S3C24XX_PA_IIS S3C2410_PA_IIS -#define S3C24XX_PA_GPIO S3C2410_PA_GPIO -#define S3C24XX_PA_RTC S3C2410_PA_RTC -#define S3C24XX_PA_ADC S3C2410_PA_ADC -#define S3C24XX_PA_SPI S3C2410_PA_SPI -#endif #endif /* __ASM_ARCH_MAP_H */ diff --git a/trunk/include/asm-arm/arch-s3c2410/regs-serial.h b/trunk/include/asm-arm/arch-s3c2410/regs-serial.h index 83b01254c4ac..ce1bbbaad6d3 100644 --- a/trunk/include/asm-arm/arch-s3c2410/regs-serial.h +++ b/trunk/include/asm-arm/arch-s3c2410/regs-serial.h @@ -39,9 +39,9 @@ #define S3C24XX_VA_UART1 (S3C24XX_VA_UART + 0x4000 ) #define S3C24XX_VA_UART2 (S3C24XX_VA_UART + 0x8000 ) -#define S3C2410_PA_UART0 (S3C24XX_PA_UART) -#define S3C2410_PA_UART1 (S3C24XX_PA_UART + 0x4000 ) -#define S3C2410_PA_UART2 (S3C24XX_PA_UART + 0x8000 ) +#define S3C2410_PA_UART0 (S3C2410_PA_UART) +#define S3C2410_PA_UART1 (S3C2410_PA_UART + 0x4000 ) +#define S3C2410_PA_UART2 (S3C2410_PA_UART + 0x8000 ) #define S3C2410_URXH (0x24) #define S3C2410_UTXH (0x20) diff --git a/trunk/include/asm-arm/arch-s3c2410/uncompress.h b/trunk/include/asm-arm/arch-s3c2410/uncompress.h index 4367ec054b51..ddd1578a7ee0 100644 --- a/trunk/include/asm-arm/arch-s3c2410/uncompress.h +++ b/trunk/include/asm-arm/arch-s3c2410/uncompress.h @@ -35,13 +35,13 @@ #undef S3C2410_GPIOREG #undef S3C2410_WDOGREG -#define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x))) -#define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x))) +#define S3C2410_GPIOREG(x) ((S3C2410_PA_GPIO + (x))) +#define S3C2410_WDOGREG(x) ((S3C2410_PA_WATCHDOG + (x))) /* how many bytes we allow into the FIFO at a time in FIFO mode */ #define FIFO_MAX (14) -#define uart_base S3C24XX_PA_UART + (0x4000*CONFIG_S3C2410_LOWLEVEL_UART_PORT) +#define uart_base S3C2410_PA_UART + (0x4000*CONFIG_S3C2410_LOWLEVEL_UART_PORT) static __inline__ void uart_wr(unsigned int reg, unsigned int val) diff --git a/trunk/include/asm-arm/mach/map.h b/trunk/include/asm-arm/mach/map.h index e8ea67c97c73..3351b77fab36 100644 --- a/trunk/include/asm-arm/mach/map.h +++ b/trunk/include/asm-arm/mach/map.h @@ -26,7 +26,6 @@ struct meminfo; #define MT_MEMORY 5 #define MT_ROM 6 #define MT_IXP2000_DEVICE 7 -#define MT_NONSHARED_DEVICE 8 extern void create_memmap_holes(struct meminfo *); extern void memtable_init(struct meminfo *); diff --git a/trunk/include/asm-arm/pgtable.h b/trunk/include/asm-arm/pgtable.h index 70e00d08345e..5a0d19b466b0 100644 --- a/trunk/include/asm-arm/pgtable.h +++ b/trunk/include/asm-arm/pgtable.h @@ -168,7 +168,6 @@ extern void __pgd_error(const char *file, int line, unsigned long val); #define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) #define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE) #define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) -#define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2)) /* * - coarse table (not used) diff --git a/trunk/include/asm-sparc64/spinlock.h b/trunk/include/asm-sparc64/spinlock.h index 508c416e9d6a..ec85d12d73b9 100644 --- a/trunk/include/asm-sparc64/spinlock.h +++ b/trunk/include/asm-sparc64/spinlock.h @@ -131,28 +131,6 @@ static void inline __read_lock(raw_rwlock_t *lock) : "memory"); } -static int inline __read_trylock(raw_rwlock_t *lock) -{ - int tmp1, tmp2; - - __asm__ __volatile__ ( -"1: ldsw [%2], %0\n" -" brlz,a,pn %0, 2f\n" -" mov 0, %0\n" -" add %0, 1, %1\n" -" cas [%2], %0, %1\n" -" cmp %0, %1\n" -" membar #StoreLoad | #StoreStore\n" -" bne,pn %%icc, 1b\n" -" mov 1, %0\n" -"2:" - : "=&r" (tmp1), "=&r" (tmp2) - : "r" (lock) - : "memory"); - - return tmp1; -} - static void inline __read_unlock(raw_rwlock_t *lock) { unsigned long tmp1, tmp2; @@ -233,12 +211,12 @@ static int inline __write_trylock(raw_rwlock_t *lock) } #define __raw_read_lock(p) __read_lock(p) -#define __raw_read_trylock(p) __read_trylock(p) #define __raw_read_unlock(p) __read_unlock(p) #define __raw_write_lock(p) __write_lock(p) #define __raw_write_unlock(p) __write_unlock(p) #define __raw_write_trylock(p) __write_trylock(p) +#define __raw_read_trylock(lock) generic__raw_read_trylock(lock) #define __raw_read_can_lock(rw) (!((rw)->lock & 0x80000000UL)) #define __raw_write_can_lock(rw) (!(rw)->lock) diff --git a/trunk/include/linux/blkdev.h b/trunk/include/linux/blkdev.h index 860e7a485a5f..02a585faa62c 100644 --- a/trunk/include/linux/blkdev.h +++ b/trunk/include/linux/blkdev.h @@ -392,8 +392,8 @@ struct request_queue unsigned int nr_congestion_off; unsigned int nr_batching; - unsigned int max_sectors; - unsigned int max_hw_sectors; + unsigned short max_sectors; + unsigned short max_hw_sectors; unsigned short max_phys_segments; unsigned short max_hw_segments; unsigned short hardsect_size; @@ -697,7 +697,7 @@ extern request_queue_t *blk_init_queue(request_fn_proc *, spinlock_t *); extern void blk_cleanup_queue(request_queue_t *); extern void blk_queue_make_request(request_queue_t *, make_request_fn *); extern void blk_queue_bounce_limit(request_queue_t *, u64); -extern void blk_queue_max_sectors(request_queue_t *, unsigned int); +extern void blk_queue_max_sectors(request_queue_t *, unsigned short); extern void blk_queue_max_phys_segments(request_queue_t *, unsigned short); extern void blk_queue_max_hw_segments(request_queue_t *, unsigned short); extern void blk_queue_max_segment_size(request_queue_t *, unsigned int); diff --git a/trunk/include/linux/netfilter/x_tables.h b/trunk/include/linux/netfilter/x_tables.h index 6500d4e59d46..59ff6c430cf6 100644 --- a/trunk/include/linux/netfilter/x_tables.h +++ b/trunk/include/linux/netfilter/x_tables.h @@ -19,21 +19,7 @@ struct xt_get_revision /* For standard target */ #define XT_RETURN (-NF_REPEAT - 1) -/* this is a dummy structure to find out the alignment requirement for a struct - * containing all the fundamental data types that are used in ipt_entry, - * ip6t_entry and arpt_entry. This sucks, and it is a hack. It will be my - * personal pleasure to remove it -HW - */ -struct _xt_align -{ - u_int8_t u8; - u_int16_t u16; - u_int32_t u32; - u_int64_t u64; -}; - -#define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) \ - & ~(__alignof__(struct _xt_align)-1)) +#define XT_ALIGN(s) (((s) + (__alignof__(u_int64_t)-1)) & ~(__alignof__(u_int64_t)-1)) /* Standard return verdict, or do jump. */ #define XT_STANDARD_TARGET "" diff --git a/trunk/include/linux/serial_8250.h b/trunk/include/linux/serial_8250.h index 73b464f0926a..cee302aefdb7 100644 --- a/trunk/include/linux/serial_8250.h +++ b/trunk/include/linux/serial_8250.h @@ -26,7 +26,7 @@ struct plat_serial8250_port { unsigned char regshift; /* register shift */ unsigned char iotype; /* UPIO_* */ unsigned char hub6; - upf_t flags; /* UPF_* flags */ + unsigned int flags; /* UPF_* flags */ }; /* diff --git a/trunk/include/linux/serial_core.h b/trunk/include/linux/serial_core.h index 4041122dabfc..ec351005bf9d 100644 --- a/trunk/include/linux/serial_core.h +++ b/trunk/include/linux/serial_core.h @@ -203,8 +203,6 @@ struct uart_icount { __u32 buf_overrun; }; -typedef unsigned int __bitwise__ upf_t; - struct uart_port { spinlock_t lock; /* port lock */ unsigned int iobase; /* in/out[bwl] */ @@ -232,34 +230,36 @@ struct uart_port { unsigned long sysrq; /* sysrq timeout */ #endif - upf_t flags; - -#define UPF_FOURPORT ((__force upf_t) (1 << 1)) -#define UPF_SAK ((__force upf_t) (1 << 2)) -#define UPF_SPD_MASK ((__force upf_t) (0x1030)) -#define UPF_SPD_HI ((__force upf_t) (0x0010)) -#define UPF_SPD_VHI ((__force upf_t) (0x0020)) -#define UPF_SPD_CUST ((__force upf_t) (0x0030)) -#define UPF_SPD_SHI ((__force upf_t) (0x1000)) -#define UPF_SPD_WARP ((__force upf_t) (0x1010)) -#define UPF_SKIP_TEST ((__force upf_t) (1 << 6)) -#define UPF_AUTO_IRQ ((__force upf_t) (1 << 7)) -#define UPF_HARDPPS_CD ((__force upf_t) (1 << 11)) -#define UPF_LOW_LATENCY ((__force upf_t) (1 << 13)) -#define UPF_BUGGY_UART ((__force upf_t) (1 << 14)) -#define UPF_MAGIC_MULTIPLIER ((__force upf_t) (1 << 16)) -#define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) -#define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) -#define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28)) -#define UPF_IOREMAP ((__force upf_t) (1 << 31)) - -#define UPF_CHANGE_MASK ((__force upf_t) (0x17fff)) -#define UPF_USR_MASK ((__force upf_t) (UPF_SPD_MASK|UPF_LOW_LATENCY)) + unsigned int flags; + +#define UPF_FOURPORT (1 << 1) +#define UPF_SAK (1 << 2) +#define UPF_SPD_MASK (0x1030) +#define UPF_SPD_HI (0x0010) +#define UPF_SPD_VHI (0x0020) +#define UPF_SPD_CUST (0x0030) +#define UPF_SPD_SHI (0x1000) +#define UPF_SPD_WARP (0x1010) +#define UPF_SKIP_TEST (1 << 6) +#define UPF_AUTO_IRQ (1 << 7) +#define UPF_HARDPPS_CD (1 << 11) +#define UPF_LOW_LATENCY (1 << 13) +#define UPF_BUGGY_UART (1 << 14) +#define UPF_AUTOPROBE (1 << 15) +#define UPF_MAGIC_MULTIPLIER (1 << 16) +#define UPF_BOOT_ONLYMCA (1 << 22) +#define UPF_CONS_FLOW (1 << 23) +#define UPF_SHARE_IRQ (1 << 24) +#define UPF_BOOT_AUTOCONF (1 << 28) +#define UPF_IOREMAP (1 << 31) + +#define UPF_CHANGE_MASK (0x17fff) +#define UPF_USR_MASK (UPF_SPD_MASK|UPF_LOW_LATENCY) unsigned int mctrl; /* current modem ctrl settings */ unsigned int timeout; /* character-based timeout */ unsigned int type; /* port type */ - const struct uart_ops *ops; + struct uart_ops *ops; unsigned int custom_divisor; unsigned int line; /* port index */ unsigned long mapbase; /* for ioremap */ @@ -289,9 +289,6 @@ struct uart_state { }; #define UART_XMIT_SIZE PAGE_SIZE - -typedef unsigned int __bitwise__ uif_t; - /* * This is the state information which is only valid when the port * is open; it may be freed by the core driver once the device has @@ -301,16 +298,17 @@ typedef unsigned int __bitwise__ uif_t; struct uart_info { struct tty_struct *tty; struct circ_buf xmit; - uif_t flags; + unsigned int flags; /* - * Definitions for info->flags. These are _private_ to serial_core, and - * are specific to this structure. They may be queried by low level drivers. + * These are the flags that specific to info->flags, and reflect our + * internal state. They can not be accessed via port->flags. Low + * level drivers must not change these, but may query them instead. */ -#define UIF_CHECK_CD ((__force uif_t) (1 << 25)) -#define UIF_CTS_FLOW ((__force uif_t) (1 << 26)) -#define UIF_NORMAL_ACTIVE ((__force uif_t) (1 << 29)) -#define UIF_INITIALIZED ((__force uif_t) (1 << 31)) +#define UIF_CHECK_CD (1 << 25) +#define UIF_CTS_FLOW (1 << 26) +#define UIF_NORMAL_ACTIVE (1 << 29) +#define UIF_INITIALIZED (1 << 31) int blocked_open; @@ -432,7 +430,7 @@ static inline int uart_handle_break(struct uart_port *port) port->sysrq = 0; } #endif - if (port->flags & UPF_SAK) + if (info->flags & UPF_SAK) do_SAK(info->tty); return 0; } diff --git a/trunk/include/net/ieee80211.h b/trunk/include/net/ieee80211.h index 9a92aef8b0b2..df05f468fa5c 100644 --- a/trunk/include/net/ieee80211.h +++ b/trunk/include/net/ieee80211.h @@ -803,9 +803,9 @@ enum ieee80211_state { #define IEEE80211_24GHZ_MAX_CHANNEL 14 #define IEEE80211_24GHZ_CHANNELS 14 -#define IEEE80211_52GHZ_MIN_CHANNEL 34 +#define IEEE80211_52GHZ_MIN_CHANNEL 36 #define IEEE80211_52GHZ_MAX_CHANNEL 165 -#define IEEE80211_52GHZ_CHANNELS 131 +#define IEEE80211_52GHZ_CHANNELS 32 enum { IEEE80211_CH_PASSIVE_ONLY = (1 << 0), diff --git a/trunk/include/scsi/scsi_device.h b/trunk/include/scsi/scsi_device.h index 290e3b4d2aec..e94ca4d36035 100644 --- a/trunk/include/scsi/scsi_device.h +++ b/trunk/include/scsi/scsi_device.h @@ -275,7 +275,7 @@ extern int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd, int data_direction, void *buffer, unsigned bufflen, struct scsi_sense_hdr *, int timeout, int retries); extern int scsi_execute_async(struct scsi_device *sdev, - const unsigned char *cmd, int cmd_len, int data_direction, + const unsigned char *cmd, int data_direction, void *buffer, unsigned bufflen, int use_sg, int timeout, int retries, void *privdata, void (*done)(void *, char *, int, int), diff --git a/trunk/include/scsi/scsi_host.h b/trunk/include/scsi/scsi_host.h index 827992949c4b..467274a764d1 100644 --- a/trunk/include/scsi/scsi_host.h +++ b/trunk/include/scsi/scsi_host.h @@ -554,6 +554,7 @@ struct Scsi_Host { /* * ordered write support */ + unsigned ordered_flush:1; unsigned ordered_tag:1; /* diff --git a/trunk/kernel/rcutorture.c b/trunk/kernel/rcutorture.c index 7712912dbc84..773219907dd8 100644 --- a/trunk/kernel/rcutorture.c +++ b/trunk/kernel/rcutorture.c @@ -114,16 +114,16 @@ rcu_torture_alloc(void) { struct list_head *p; - spin_lock_bh(&rcu_torture_lock); + spin_lock(&rcu_torture_lock); if (list_empty(&rcu_torture_freelist)) { atomic_inc(&n_rcu_torture_alloc_fail); - spin_unlock_bh(&rcu_torture_lock); + spin_unlock(&rcu_torture_lock); return NULL; } atomic_inc(&n_rcu_torture_alloc); p = rcu_torture_freelist.next; list_del_init(p); - spin_unlock_bh(&rcu_torture_lock); + spin_unlock(&rcu_torture_lock); return container_of(p, struct rcu_torture, rtort_free); } @@ -134,9 +134,9 @@ static void rcu_torture_free(struct rcu_torture *p) { atomic_inc(&n_rcu_torture_free); - spin_lock_bh(&rcu_torture_lock); + spin_lock(&rcu_torture_lock); list_add_tail(&p->rtort_free, &rcu_torture_freelist); - spin_unlock_bh(&rcu_torture_lock); + spin_unlock(&rcu_torture_lock); } static void diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index ec7fd9cee306..3ee2ae45125f 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -5141,7 +5141,7 @@ static void init_sched_build_groups(struct sched_group groups[], cpumask_t span, #define SEARCH_SCOPE 2 #define MIN_CACHE_SIZE (64*1024U) #define DEFAULT_CACHE_SIZE (5*1024*1024U) -#define ITERATIONS 1 +#define ITERATIONS 2 #define SIZE_THRESH 130 #define COST_THRESH 130 @@ -5480,9 +5480,9 @@ static unsigned long long measure_migration_cost(int cpu1, int cpu2) break; } /* - * Increase the cachesize in 10% steps: + * Increase the cachesize in 5% steps: */ - size = size * 10 / 9; + size = size * 20 / 19; } if (migration_debug) diff --git a/trunk/kernel/time.c b/trunk/kernel/time.c index 1f23e683d6aa..7477b1d2079e 100644 --- a/trunk/kernel/time.c +++ b/trunk/kernel/time.c @@ -155,7 +155,7 @@ int do_sys_settimeofday(struct timespec *tv, struct timezone *tz) static int firsttime = 1; int error = 0; - if (tv && !timespec_valid(tv)) + if (!timespec_valid(tv)) return -EINVAL; error = security_settime(tv, tz); diff --git a/trunk/kernel/user.c b/trunk/kernel/user.c index d1ae2349347e..89e562feb1b1 100644 --- a/trunk/kernel/user.c +++ b/trunk/kernel/user.c @@ -13,7 +13,6 @@ #include #include #include -#include /* * UID task count cache, to get fast user lookup in "alloc_uid" @@ -28,12 +27,6 @@ static kmem_cache_t *uid_cachep; static struct list_head uidhash_table[UIDHASH_SZ]; - -/* - * The uidhash_lock is mostly taken from process context, but it is - * occasionally also taken from softirq/tasklet context, when - * task-structs get RCU-freed. Hence all locking must be softirq-safe. - */ static DEFINE_SPINLOCK(uidhash_lock); struct user_struct root_user = { @@ -90,15 +83,14 @@ struct user_struct *find_user(uid_t uid) { struct user_struct *ret; - spin_lock_bh(&uidhash_lock); + spin_lock(&uidhash_lock); ret = uid_hash_find(uid, uidhashentry(uid)); - spin_unlock_bh(&uidhash_lock); + spin_unlock(&uidhash_lock); return ret; } void free_uid(struct user_struct *up) { - local_bh_disable(); if (up && atomic_dec_and_lock(&up->__count, &uidhash_lock)) { uid_hash_remove(up); key_put(up->uid_keyring); @@ -106,7 +98,6 @@ void free_uid(struct user_struct *up) kmem_cache_free(uid_cachep, up); spin_unlock(&uidhash_lock); } - local_bh_enable(); } struct user_struct * alloc_uid(uid_t uid) @@ -114,9 +105,9 @@ struct user_struct * alloc_uid(uid_t uid) struct list_head *hashent = uidhashentry(uid); struct user_struct *up; - spin_lock_bh(&uidhash_lock); + spin_lock(&uidhash_lock); up = uid_hash_find(uid, hashent); - spin_unlock_bh(&uidhash_lock); + spin_unlock(&uidhash_lock); if (!up) { struct user_struct *new; @@ -146,7 +137,7 @@ struct user_struct * alloc_uid(uid_t uid) * Before adding this, check whether we raced * on adding the same user already.. */ - spin_lock_bh(&uidhash_lock); + spin_lock(&uidhash_lock); up = uid_hash_find(uid, hashent); if (up) { key_put(new->uid_keyring); @@ -156,7 +147,7 @@ struct user_struct * alloc_uid(uid_t uid) uid_hash_insert(new, hashent); up = new; } - spin_unlock_bh(&uidhash_lock); + spin_unlock(&uidhash_lock); } return up; @@ -192,9 +183,9 @@ static int __init uid_cache_init(void) INIT_LIST_HEAD(uidhash_table + n); /* Insert the root user immediately (init already runs as root) */ - spin_lock_bh(&uidhash_lock); + spin_lock(&uidhash_lock); uid_hash_insert(&root_user, uidhashentry(0)); - spin_unlock_bh(&uidhash_lock); + spin_unlock(&uidhash_lock); return 0; } diff --git a/trunk/net/core/dev.c b/trunk/net/core/dev.c index ffb82073056e..fd070a098f20 100644 --- a/trunk/net/core/dev.c +++ b/trunk/net/core/dev.c @@ -2543,14 +2543,13 @@ int dev_ioctl(unsigned int cmd, void __user *arg) case SIOCBONDENSLAVE: case SIOCBONDRELEASE: case SIOCBONDSETHWADDR: + case SIOCBONDSLAVEINFOQUERY: + case SIOCBONDINFOQUERY: case SIOCBONDCHANGEACTIVE: case SIOCBRADDIF: case SIOCBRDELIF: if (!capable(CAP_NET_ADMIN)) return -EPERM; - /* fall through */ - case SIOCBONDSLAVEINFOQUERY: - case SIOCBONDINFOQUERY: dev_load(ifr.ifr_name); rtnl_lock(); ret = dev_ifsioc(&ifr, cmd); diff --git a/trunk/net/core/filter.c b/trunk/net/core/filter.c index 93fbd01d2259..9540946a48f3 100644 --- a/trunk/net/core/filter.c +++ b/trunk/net/core/filter.c @@ -64,7 +64,7 @@ static inline void *load_pointer(struct sk_buff *skb, int k, } /** - * sk_run_filter - run a filter on a socket + * sk_run_filter - run a filter on a socket * @skb: buffer to run the filter on * @filter: filter to apply * @flen: length of filter @@ -78,8 +78,8 @@ unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int { struct sock_filter *fentry; /* We walk down these */ void *ptr; - u32 A = 0; /* Accumulator */ - u32 X = 0; /* Index Register */ + u32 A = 0; /* Accumulator */ + u32 X = 0; /* Index Register */ u32 mem[BPF_MEMWORDS]; /* Scratch Memory Store */ u32 tmp; int k; diff --git a/trunk/net/core/skbuff.c b/trunk/net/core/skbuff.c index 6766f118f070..d0732e9c8560 100644 --- a/trunk/net/core/skbuff.c +++ b/trunk/net/core/skbuff.c @@ -135,15 +135,13 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here) struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, int fclone) { - kmem_cache_t *cache; struct skb_shared_info *shinfo; struct sk_buff *skb; u8 *data; - cache = fclone ? skbuff_fclone_cache : skbuff_head_cache; - /* Get the HEAD */ - skb = kmem_cache_alloc(cache, gfp_mask & ~__GFP_DMA); + skb = kmem_cache_alloc(fclone ? skbuff_fclone_cache : skbuff_head_cache, + gfp_mask & ~__GFP_DMA); if (!skb) goto out; @@ -182,7 +180,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, out: return skb; nodata: - kmem_cache_free(cache, skb); + kmem_cache_free(skbuff_head_cache, skb); skb = NULL; goto out; } diff --git a/trunk/net/ieee80211/ieee80211_rx.c b/trunk/net/ieee80211/ieee80211_rx.c index 960aa78cdb97..7a121802faa9 100644 --- a/trunk/net/ieee80211/ieee80211_rx.c +++ b/trunk/net/ieee80211/ieee80211_rx.c @@ -350,7 +350,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, u8 src[ETH_ALEN]; struct ieee80211_crypt_data *crypt = NULL; int keyidx = 0; - int can_be_decrypted = 0; hdr = (struct ieee80211_hdr_4addr *)skb->data; stats = &ieee->stats; @@ -411,23 +410,12 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, return 1; } - can_be_decrypted = (is_multicast_ether_addr(hdr->addr1) || - is_broadcast_ether_addr(hdr->addr2)) ? - ieee->host_mc_decrypt : ieee->host_decrypt; - - if (can_be_decrypted) { + if (is_multicast_ether_addr(hdr->addr1) + ? ieee->host_mc_decrypt : ieee->host_decrypt) { int idx = 0; - if (skb->len >= hdrlen + 3) { - /* Top two-bits of byte 3 are the key index */ + if (skb->len >= hdrlen + 3) idx = skb->data[hdrlen + 3] >> 6; - } - - /* ieee->crypt[] is WEP_KEY (4) in length. Given that idx - * is only allowed 2-bits of storage, no value of idx can - * be provided via above code that would result in idx - * being out of range */ crypt = ieee->crypt[idx]; - #ifdef NOT_YET sta = NULL; @@ -565,7 +553,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, /* skb: hdr + (possibly fragmented, possibly encrypted) payload */ - if ((fc & IEEE80211_FCTL_PROTECTED) && can_be_decrypted && + if (ieee->host_decrypt && (fc & IEEE80211_FCTL_PROTECTED) && (keyidx = ieee80211_rx_frame_decrypt(ieee, skb, crypt)) < 0) goto rx_dropped; @@ -629,7 +617,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, /* skb: hdr + (possible reassembled) full MSDU payload; possibly still * encrypted/authenticated */ - if ((fc & IEEE80211_FCTL_PROTECTED) && can_be_decrypted && + if (ieee->host_decrypt && (fc & IEEE80211_FCTL_PROTECTED) && ieee80211_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt)) goto rx_dropped; @@ -1451,7 +1439,7 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee, break; case IEEE80211_STYPE_PROBE_REQ: - IEEE80211_DEBUG_MGMT("received auth (%d)\n", + IEEE80211_DEBUG_MGMT("recieved auth (%d)\n", WLAN_FC_GET_STYPE(le16_to_cpu (header->frame_ctl))); @@ -1485,7 +1473,7 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee, break; case IEEE80211_STYPE_AUTH: - IEEE80211_DEBUG_MGMT("received auth (%d)\n", + IEEE80211_DEBUG_MGMT("recieved auth (%d)\n", WLAN_FC_GET_STYPE(le16_to_cpu (header->frame_ctl))); diff --git a/trunk/net/ieee80211/ieee80211_wx.c b/trunk/net/ieee80211/ieee80211_wx.c index f87c6b89f845..23e1630f50b7 100644 --- a/trunk/net/ieee80211/ieee80211_wx.c +++ b/trunk/net/ieee80211/ieee80211_wx.c @@ -232,18 +232,15 @@ static char *ipw2100_translate_scan(struct ieee80211_device *ieee, return start; } -#define SCAN_ITEM_SIZE 128 - int ieee80211_wx_get_scan(struct ieee80211_device *ieee, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct ieee80211_network *network; unsigned long flags; - int err = 0; char *ev = extra; - char *stop = ev + wrqu->data.length; + char *stop = ev + IW_SCAN_MAX_DATA; int i = 0; IEEE80211_DEBUG_WX("Getting scan\n"); @@ -252,11 +249,6 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee, list_for_each_entry(network, &ieee->network_list, list) { i++; - if (stop - ev < SCAN_ITEM_SIZE) { - err = -E2BIG; - break; - } - if (ieee->scan_age == 0 || time_after(network->last_scanned + ieee->scan_age, jiffies)) ev = ipw2100_translate_scan(ieee, ev, stop, network); @@ -278,7 +270,7 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee, IEEE80211_DEBUG_WX("exit: %d networks returned.\n", i); - return err; + return 0; } int ieee80211_wx_set_encode(struct ieee80211_device *ieee, diff --git a/trunk/net/ipv4/igmp.c b/trunk/net/ipv4/igmp.c index 0b4e95f93dad..d8ce7133cd8f 100644 --- a/trunk/net/ipv4/igmp.c +++ b/trunk/net/ipv4/igmp.c @@ -970,7 +970,7 @@ int igmp_rcv(struct sk_buff *skb) case IGMP_MTRACE_RESP: break; default: - break; + NETDEBUG(KERN_DEBUG "New IGMP type=%d, why we do not know about it?\n", ih->type); } drop: diff --git a/trunk/net/ipv4/tcp_htcp.c b/trunk/net/ipv4/tcp_htcp.c index 128de4d7c0b7..3284cfb993e6 100644 --- a/trunk/net/ipv4/tcp_htcp.c +++ b/trunk/net/ipv4/tcp_htcp.c @@ -230,6 +230,7 @@ static void htcp_cong_avoid(struct sock *sk, u32 ack, u32 rtt, if (tp->snd_cwnd < tp->snd_cwnd_clamp) tp->snd_cwnd++; tp->snd_cwnd_cnt = 0; + ca->ccount++; } } } diff --git a/trunk/net/ipv6/mcast.c b/trunk/net/ipv6/mcast.c index 4420948a1bfe..6c05c7978bef 100644 --- a/trunk/net/ipv6/mcast.c +++ b/trunk/net/ipv6/mcast.c @@ -1252,7 +1252,8 @@ int igmp6_event_query(struct sk_buff *skb) } } else { for (ma = idev->mc_list; ma; ma=ma->next) { - if (!ipv6_addr_equal(group, &ma->mca_addr)) + if (group_type != IPV6_ADDR_ANY && + !ipv6_addr_equal(group, &ma->mca_addr)) continue; spin_lock_bh(&ma->mca_lock); if (ma->mca_flags & MAF_TIMER_RUNNING) { @@ -1267,10 +1268,11 @@ int igmp6_event_query(struct sk_buff *skb) ma->mca_flags &= ~MAF_GSQUERY; } if (!(ma->mca_flags & MAF_GSQUERY) || - mld_marksources(ma, ntohs(mlh2->nsrcs), mlh2->srcs)) + mld_marksources(ma, ntohs(mlh2->nsrcs), mlh2->srcs)) igmp6_group_queried(ma, max_delay); spin_unlock_bh(&ma->mca_lock); - break; + if (group_type != IPV6_ADDR_ANY) + break; } } read_unlock_bh(&idev->lock); @@ -1349,7 +1351,7 @@ static int is_in(struct ifmcaddr6 *pmc, struct ip6_sf_list *psf, int type, * in all filters */ if (psf->sf_count[MCAST_INCLUDE]) - return type == MLD2_MODE_IS_INCLUDE; + return 0; return pmc->mca_sfcount[MCAST_EXCLUDE] == psf->sf_count[MCAST_EXCLUDE]; } @@ -1964,7 +1966,7 @@ static void sf_markstate(struct ifmcaddr6 *pmc) static int sf_setstate(struct ifmcaddr6 *pmc) { - struct ip6_sf_list *psf, *dpsf; + struct ip6_sf_list *psf; int mca_xcount = pmc->mca_sfcount[MCAST_EXCLUDE]; int qrv = pmc->idev->mc_qrv; int new_in, rv; @@ -1976,48 +1978,8 @@ static int sf_setstate(struct ifmcaddr6 *pmc) !psf->sf_count[MCAST_INCLUDE]; } else new_in = psf->sf_count[MCAST_INCLUDE] != 0; - if (new_in) { - if (!psf->sf_oldin) { - struct ip6_sf_list *prev = 0; - - for (dpsf=pmc->mca_tomb; dpsf; - dpsf=dpsf->sf_next) { - if (ipv6_addr_equal(&dpsf->sf_addr, - &psf->sf_addr)) - break; - prev = dpsf; - } - if (dpsf) { - if (prev) - prev->sf_next = dpsf->sf_next; - else - pmc->mca_tomb = dpsf->sf_next; - kfree(dpsf); - } - psf->sf_crcount = qrv; - rv++; - } - } else if (psf->sf_oldin) { - psf->sf_crcount = 0; - /* - * add or update "delete" records if an active filter - * is now inactive - */ - for (dpsf=pmc->mca_tomb; dpsf; dpsf=dpsf->sf_next) - if (ipv6_addr_equal(&dpsf->sf_addr, - &psf->sf_addr)) - break; - if (!dpsf) { - dpsf = (struct ip6_sf_list *) - kmalloc(sizeof(*dpsf), GFP_ATOMIC); - if (!dpsf) - continue; - *dpsf = *psf; - /* pmc->mca_lock held by callers */ - dpsf->sf_next = pmc->mca_tomb; - pmc->mca_tomb = dpsf; - } - dpsf->sf_crcount = qrv; + if (new_in != psf->sf_oldin) { + psf->sf_crcount = qrv; rv++; } } diff --git a/trunk/net/key/af_key.c b/trunk/net/key/af_key.c index ae86d237a456..43f1ce74187d 100644 --- a/trunk/net/key/af_key.c +++ b/trunk/net/key/af_key.c @@ -1620,7 +1620,6 @@ static int key_notify_sa_flush(struct km_event *c) return -ENOBUFS; hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); hdr->sadb_msg_satype = pfkey_proto2satype(c->data.proto); - hdr->sadb_msg_type = SADB_FLUSH; hdr->sadb_msg_seq = c->seq; hdr->sadb_msg_pid = c->pid; hdr->sadb_msg_version = PF_KEY_V2; @@ -2386,7 +2385,6 @@ static int key_notify_policy_flush(struct km_event *c) if (!skb_out) return -ENOBUFS; hdr = (struct sadb_msg *) skb_put(skb_out, sizeof(struct sadb_msg)); - hdr->sadb_msg_type = SADB_X_SPDFLUSH; hdr->sadb_msg_seq = c->seq; hdr->sadb_msg_pid = c->pid; hdr->sadb_msg_version = PF_KEY_V2; diff --git a/trunk/net/packet/af_packet.c b/trunk/net/packet/af_packet.c index 9db7dbdb16e6..ee93abc71cb8 100644 --- a/trunk/net/packet/af_packet.c +++ b/trunk/net/packet/af_packet.c @@ -365,7 +365,7 @@ static int packet_sendmsg_spkt(struct kiocb *iocb, struct socket *sock, */ err = -EMSGSIZE; - if (len > dev->mtu + dev->hard_header_len) + if(len>dev->mtu+dev->hard_header_len) goto out_unlock; err = -ENOBUFS; @@ -935,7 +935,7 @@ static int packet_bind_spkt(struct socket *sock, struct sockaddr *uaddr, int add * Check legality */ - if (addr_len != sizeof(struct sockaddr)) + if(addr_len!=sizeof(struct sockaddr)) return -EINVAL; strlcpy(name,uaddr->sa_data,sizeof(name)); @@ -1092,7 +1092,7 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock, * retries. */ - if (skb == NULL) + if(skb==NULL) goto out; /* @@ -1392,8 +1392,8 @@ static int packet_getsockopt(struct socket *sock, int level, int optname, if (level != SOL_PACKET) return -ENOPROTOOPT; - if (get_user(len, optlen)) - return -EFAULT; + if (get_user(len,optlen)) + return -EFAULT; if (len < 0) return -EINVAL; @@ -1419,9 +1419,9 @@ static int packet_getsockopt(struct socket *sock, int level, int optname, return -ENOPROTOOPT; } - if (put_user(len, optlen)) - return -EFAULT; - return 0; + if (put_user(len, optlen)) + return -EFAULT; + return 0; } diff --git a/trunk/net/sctp/sm_statefuns.c b/trunk/net/sctp/sm_statefuns.c index 2b9a832b29a7..71c9a961c321 100644 --- a/trunk/net/sctp/sm_statefuns.c +++ b/trunk/net/sctp/sm_statefuns.c @@ -884,7 +884,7 @@ sctp_disposition_t sctp_sf_sendbeat_8_3(const struct sctp_endpoint *ep, { struct sctp_transport *transport = (struct sctp_transport *) arg; - if (asoc->overall_error_count >= asoc->max_retrans) { + if (asoc->overall_error_count > asoc->max_retrans) { /* CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */ sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, SCTP_U32(SCTP_ERROR_NO_ERROR)); @@ -2122,7 +2122,7 @@ static sctp_disposition_t sctp_sf_do_5_2_6_stale(const struct sctp_endpoint *ep, struct sctp_bind_addr *bp; int attempts = asoc->init_err_counter + 1; - if (attempts > asoc->max_init_attempts) { + if (attempts >= asoc->max_init_attempts) { sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED, SCTP_U32(SCTP_ERROR_STALE_COOKIE)); return SCTP_DISPOSITION_DELETE_TCB; @@ -4640,7 +4640,7 @@ sctp_disposition_t sctp_sf_t1_init_timer_expire(const struct sctp_endpoint *ep, SCTP_DEBUG_PRINTK("Timer T1 expired (INIT).\n"); - if (attempts <= asoc->max_init_attempts) { + if (attempts < asoc->max_init_attempts) { bp = (struct sctp_bind_addr *) &asoc->base.bind_addr; repl = sctp_make_init(asoc, bp, GFP_ATOMIC, 0); if (!repl) @@ -4697,7 +4697,7 @@ sctp_disposition_t sctp_sf_t1_cookie_timer_expire(const struct sctp_endpoint *ep SCTP_DEBUG_PRINTK("Timer T1 expired (COOKIE-ECHO).\n"); - if (attempts <= asoc->max_init_attempts) { + if (attempts < asoc->max_init_attempts) { repl = sctp_make_cookie_echo(asoc, NULL); if (!repl) return SCTP_DISPOSITION_NOMEM; diff --git a/trunk/net/sctp/socket.c b/trunk/net/sctp/socket.c index 0ea947eb6813..fb1821d9f338 100644 --- a/trunk/net/sctp/socket.c +++ b/trunk/net/sctp/socket.c @@ -5426,7 +5426,7 @@ static int sctp_wait_for_connect(struct sctp_association *asoc, long *timeo_p) return err; do_error: - if (asoc->init_err_counter + 1 > asoc->max_init_attempts) + if (asoc->init_err_counter + 1 >= asoc->max_init_attempts) err = -ETIMEDOUT; else err = -ECONNREFUSED; diff --git a/trunk/security/seclvl.c b/trunk/security/seclvl.c index 8529ea6f7aa8..1caac0164643 100644 --- a/trunk/security/seclvl.c +++ b/trunk/security/seclvl.c @@ -368,8 +368,8 @@ static int seclvl_capable(struct task_struct *tsk, int cap) */ static int seclvl_settime(struct timespec *tv, struct timezone *tz) { - if (tv && seclvl > 1) { - struct timespec now; + struct timespec now; + if (seclvl > 1) { now = current_kernel_time(); if (tv->tv_sec < now.tv_sec || (tv->tv_sec == now.tv_sec && tv->tv_nsec < now.tv_nsec)) {