From 694ad207c1d5b0db6e1ae3910c7b4b02928ad4d9 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Fri, 31 Oct 2008 00:07:23 +0100 Subject: [PATCH] --- yaml --- r: 119059 b: refs/heads/master c: 7d672cd7506165818aacf97fdc448cffc72bde37 h: refs/heads/master i: 119057: 43299b101a676950a6c8d4508b665bcf6769ddd9 119055: c04ef020c50d12e3f84bfff563618f86e8aecda6 v: v3 --- [refs] | 2 +- trunk/Documentation/00-INDEX | 42 +++- trunk/Documentation/{PCI => }/MSI-HOWTO.txt | 0 trunk/Documentation/PCI/00-INDEX | 2 - .../{blockdev => }/README.DAC960 | 0 .../{serial => }/README.cycladesZ | 0 trunk/Documentation/blockdev/00-INDEX | 16 -- trunk/Documentation/{blockdev => }/cciss.txt | 0 .../Documentation/{serial => }/computone.txt | 2 +- .../Documentation/{blockdev => }/cpqarray.txt | 0 trunk/Documentation/{serial => }/digiepca.txt | 0 trunk/Documentation/{blockdev => }/floppy.txt | 0 .../Documentation/{serial => }/hayes-esp.txt | 0 .../{ioctl => }/ioctl-number.txt | 0 trunk/Documentation/ioctl/00-INDEX | 10 - trunk/Documentation/kernel-parameters.txt | 24 +- trunk/Documentation/{serial => }/moxa-smartio | 0 trunk/Documentation/{blockdev => }/nbd.txt | 0 trunk/Documentation/{blockdev => }/paride.txt | 0 .../Documentation/{blockdev => }/ramdisk.txt | 0 trunk/Documentation/{serial => }/riscom8.txt | 0 trunk/Documentation/{serial => }/rocket.txt | 0 trunk/Documentation/serial/00-INDEX | 24 -- .../Documentation/{serial => }/specialix.txt | 0 trunk/Documentation/{serial => }/stallion.txt | 0 trunk/Documentation/{serial => }/sx.txt | 0 trunk/Documentation/{serial => }/tty.txt | 0 trunk/Makefile | 2 +- trunk/arch/arm/include/asm/dma-mapping.h | 13 +- trunk/arch/arm/include/asm/mach/map.h | 13 +- .../arm/mach-clps711x/include/mach/hardware.h | 22 ++ trunk/arch/arm/mach-clps7500/core.c | 6 +- .../arm/mach-clps7500/include/mach/hardware.h | 6 +- .../arch/arm/mach-h720x/include/mach/boards.h | 6 +- .../mach-integrator/include/mach/platform.h | 19 +- trunk/arch/arm/mach-realview/clock.c | 2 +- .../arm/mach-realview/include/mach/platform.h | 19 +- trunk/arch/arm/mach-versatile/clock.c | 2 +- .../mach-versatile/include/mach/platform.h | 18 +- trunk/arch/arm/mm/cache-feroceon-l2.c | 4 +- trunk/arch/arm/mm/mmu.c | 6 - trunk/arch/arm/plat-iop/setup.c | 5 +- trunk/arch/m68k/kernel/ints.c | 2 +- trunk/arch/parisc/include/asm/smp.h | 2 + trunk/arch/s390/kernel/entry.S | 20 +- trunk/arch/s390/kernel/entry64.S | 11 +- trunk/arch/s390/kernel/process.c | 3 - trunk/arch/s390/kernel/setup.c | 4 +- trunk/arch/s390/kernel/sys_s390.c | 2 +- trunk/arch/s390/kernel/topology.c | 11 +- trunk/arch/sh/include/asm/io.h | 4 - trunk/arch/sh/include/asm/pgtable.h | 6 - trunk/arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 6 +- trunk/arch/sh/kernel/early_printk.c | 3 +- trunk/arch/sh/kernel/timers/timer-tmu.c | 2 +- trunk/arch/sh/lib/copy_page.S | 11 +- trunk/arch/sh/mm/Makefile_32 | 2 +- trunk/arch/sh/mm/Makefile_64 | 2 +- trunk/arch/sh/mm/init.c | 12 +- trunk/arch/sh/mm/mmap.c | 31 --- trunk/arch/sh/mm/pg-sh4.c | 17 -- trunk/arch/x86/include/asm/iommu.h | 1 + trunk/arch/x86/kernel/early-quirks.c | 18 ++ trunk/drivers/ata/libata-sff.c | 13 +- trunk/drivers/block/Kconfig | 29 ++- trunk/drivers/block/floppy.c | 2 +- trunk/drivers/block/ub.c | 20 +- trunk/drivers/char/Kconfig | 24 +- trunk/drivers/char/specialix.c | 2 +- trunk/drivers/hid/hidraw.c | 30 +-- trunk/drivers/hwmon/lis3lv02d.c | 1 + trunk/drivers/i2c/busses/i2c-sh_mobile.c | 3 +- trunk/drivers/ide/ide-cs.c | 1 - trunk/drivers/md/dm-mpath.c | 8 +- trunk/drivers/md/dm-raid1.c | 1 - trunk/drivers/md/dm-stripe.c | 4 +- trunk/drivers/md/dm.c | 34 +-- trunk/drivers/media/video/tvaudio.c | 231 +++++++----------- trunk/drivers/misc/c2port/core.c | 1 - trunk/drivers/mtd/maps/cdb89712.c | 13 +- trunk/drivers/mtd/maps/h720x-flash.c | 6 +- trunk/drivers/net/usb/asix.c | 4 - trunk/drivers/pci/pci-acpi.c | 15 +- trunk/drivers/pcmcia/cistpl.c | 3 +- trunk/drivers/pcmcia/cs.c | 14 +- trunk/drivers/pcmcia/ds.c | 11 +- trunk/drivers/pcmcia/pcmcia_resource.c | 3 +- trunk/drivers/pcmcia/rsrc_nonstatic.c | 6 +- trunk/drivers/s390/block/dasd.c | 5 - trunk/drivers/s390/char/sclp_cmd.c | 3 - trunk/drivers/s390/cio/device.c | 4 - trunk/drivers/s390/kvm/kvm_virtio.c | 4 +- trunk/drivers/s390/scsi/zfcp_aux.c | 3 +- trunk/drivers/s390/scsi/zfcp_ccw.c | 4 +- trunk/drivers/s390/scsi/zfcp_dbf.c | 42 ++-- trunk/drivers/s390/scsi/zfcp_dbf.h | 8 +- trunk/drivers/s390/scsi/zfcp_erp.c | 1 - trunk/drivers/s390/scsi/zfcp_fsf.c | 23 +- trunk/drivers/s390/scsi/zfcp_scsi.c | 12 +- trunk/drivers/scsi/dpt_i2o.c | 4 +- trunk/drivers/scsi/megaraid.c | 11 +- trunk/drivers/scsi/megaraid.h | 2 +- trunk/drivers/scsi/qla2xxx/qla_def.h | 1 + trunk/drivers/scsi/qla2xxx/qla_init.c | 26 +- trunk/drivers/scsi/qla2xxx/qla_mbx.c | 2 +- trunk/drivers/scsi/qla2xxx/qla_os.c | 1 - trunk/drivers/scsi/qla2xxx/qla_sup.c | 19 +- trunk/drivers/scsi/qla2xxx/qla_version.h | 2 +- trunk/drivers/scsi/scsi_error.c | 5 +- trunk/drivers/serial/sh-sci.c | 22 +- trunk/drivers/serial/sh-sci.h | 16 +- trunk/drivers/usb/class/cdc-acm.c | 9 +- trunk/drivers/usb/core/message.c | 1 - trunk/drivers/usb/core/sysfs.c | 2 +- trunk/drivers/usb/core/urb.c | 4 +- trunk/drivers/usb/gadget/f_acm.c | 4 - trunk/drivers/usb/host/Kconfig | 23 +- trunk/drivers/usb/host/ehci-hcd.c | 25 +- trunk/drivers/usb/host/ehci-ps3.c | 1 - trunk/drivers/usb/host/ehci-sched.c | 4 +- trunk/drivers/usb/host/isp1760-if.c | 22 +- trunk/drivers/usb/host/ohci-ps3.c | 3 +- trunk/drivers/usb/host/r8a66597-hcd.c | 5 +- trunk/drivers/usb/misc/sisusbvga/sisusb.c | 1 - trunk/drivers/usb/misc/vstusb.c | 2 +- trunk/drivers/usb/musb/musb_core.c | 6 +- trunk/drivers/usb/musb/musb_debug.h | 4 +- trunk/drivers/usb/musb/musb_host.c | 159 +++++------- trunk/drivers/usb/musb/musb_host.h | 1 - trunk/drivers/usb/musb/omap2430.c | 2 - trunk/drivers/usb/musb/tusb6010.c | 2 +- trunk/drivers/usb/serial/cp2101.c | 2 - trunk/drivers/usb/serial/option.c | 6 - trunk/drivers/usb/storage/Kconfig | 4 +- trunk/drivers/usb/storage/unusual_devs.h | 22 -- trunk/fs/dlm/lockspace.c | 2 +- trunk/fs/inotify.c | 150 +----------- trunk/include/linux/inotify.h | 11 - trunk/include/linux/kernel.h | 42 ++-- trunk/include/linux/serial_core.h | 3 - trunk/include/linux/slab.h | 28 --- trunk/include/linux/usb.h | 2 - trunk/init/Kconfig | 6 +- trunk/kernel/audit_tree.c | 91 +++---- trunk/kernel/auditfilter.c | 14 +- trunk/kernel/exit.c | 9 + trunk/kernel/fork.c | 11 - trunk/mm/vmscan.c | 35 +++ trunk/net/9p/Kconfig | 10 +- 149 files changed, 740 insertions(+), 1122 deletions(-) rename trunk/Documentation/{PCI => }/MSI-HOWTO.txt (100%) rename trunk/Documentation/{blockdev => }/README.DAC960 (100%) rename trunk/Documentation/{serial => }/README.cycladesZ (100%) delete mode 100644 trunk/Documentation/blockdev/00-INDEX rename trunk/Documentation/{blockdev => }/cciss.txt (100%) rename trunk/Documentation/{serial => }/computone.txt (99%) rename trunk/Documentation/{blockdev => }/cpqarray.txt (100%) rename trunk/Documentation/{serial => }/digiepca.txt (100%) rename trunk/Documentation/{blockdev => }/floppy.txt (100%) rename trunk/Documentation/{serial => }/hayes-esp.txt (100%) rename trunk/Documentation/{ioctl => }/ioctl-number.txt (100%) delete mode 100644 trunk/Documentation/ioctl/00-INDEX rename trunk/Documentation/{serial => }/moxa-smartio (100%) rename trunk/Documentation/{blockdev => }/nbd.txt (100%) rename trunk/Documentation/{blockdev => }/paride.txt (100%) rename trunk/Documentation/{blockdev => }/ramdisk.txt (100%) rename trunk/Documentation/{serial => }/riscom8.txt (100%) rename trunk/Documentation/{serial => }/rocket.txt (100%) delete mode 100644 trunk/Documentation/serial/00-INDEX rename trunk/Documentation/{serial => }/specialix.txt (100%) rename trunk/Documentation/{serial => }/stallion.txt (100%) rename trunk/Documentation/{serial => }/sx.txt (100%) rename trunk/Documentation/{serial => }/tty.txt (100%) delete mode 100644 trunk/arch/sh/mm/mmap.c diff --git a/[refs] b/[refs] index 392e6182954a..7977d43556a4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d659fc14cbd39fef625072819c6968044975fda7 +refs/heads/master: 7d672cd7506165818aacf97fdc448cffc72bde37 diff --git a/trunk/Documentation/00-INDEX b/trunk/Documentation/00-INDEX index 2a39aeba1464..50f99eab0e1f 100644 --- a/trunk/Documentation/00-INDEX +++ b/trunk/Documentation/00-INDEX @@ -42,8 +42,14 @@ IRQ.txt - description of what an IRQ is. ManagementStyle - how to (attempt to) manage kernel hackers. +MSI-HOWTO.txt + - the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ. RCU/ - directory with info on RCU (read-copy update). +README.DAC960 + - info on Mylex DAC960/DAC1100 PCI RAID Controller Driver for Linux. +README.cycladesZ + - info on Cyclades-Z firmware loading. SAK.txt - info on Secure Attention Keys. SM501.txt @@ -80,16 +86,20 @@ blackfin/ - directory with documentation for the Blackfin arch. block/ - info on the Block I/O (BIO) layer. -blockdev/ - - info on block devices & drivers cachetlb.txt - describes the cache/TLB flushing interfaces Linux uses. +cciss.txt + - info, major/minor #'s for Compaq's SMART Array Controllers. cdrom/ - directory with information on the CD-ROM drivers that Linux has. +computone.txt + - info on Computone Intelliport II/Plus Multiport Serial Driver. connector/ - docs on the netlink based userspace<->kernel space communication mod. console/ - documentation on Linux console drivers. +cpqarray.txt + - info on using Compaq's SMART2 Intelligent Disk Array Controllers. cpu-freq/ - info on CPU frequency and voltage scaling. cpu-hotplug.txt @@ -116,6 +126,8 @@ device-mapper/ - directory with info on Device Mapper. devices.txt - plain ASCII listing of all the nodes in /dev/ with major minor #'s. +digiepca.txt + - info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards. dontdiff - file containing a list of files that should never be diff'ed. driver-model/ @@ -140,10 +152,14 @@ filesystems/ - info on the vfs and the various filesystems that Linux supports. firmware_class/ - request_firmware() hotplug interface info. +floppy.txt + - notes and driver options for the floppy disk driver. frv/ - Fujitsu FR-V Linux documentation. gpio.txt - overview of GPIO (General Purpose Input/Output) access conventions. +hayes-esp.txt + - info on using the Hayes ESP serial driver. highuid.txt - notes on the change from 16 bit to 32 bit user/group IDs. timers/ @@ -170,6 +186,8 @@ io_ordering.txt - info on ordering I/O writes to memory-mapped addresses. ioctl/ - directory with documents describing various IOCTL calls. +ioctl-number.txt + - how to implement and register device/driver ioctl calls. iostats.txt - info on I/O statistics Linux kernel provides. irqflags-tracing.txt @@ -232,10 +250,14 @@ mips/ - directory with info about Linux on MIPS architecture. mono.txt - how to execute Mono-based .NET binaries with the help of BINFMT_MISC. +moxa-smartio + - file with info on installing/using Moxa multiport serial driver. mutex-design.txt - info on the generic mutex subsystem. namespaces/ - directory with various information about namespaces +nbd.txt + - info on a TCP implementation of a network block device. netlabel/ - directory with information on the NetLabel subsystem. networking/ @@ -248,6 +270,8 @@ numastat.txt - info on how to read Numa policy hit/miss statistics in sysfs. oops-tracing.txt - how to decode those nasty internal kernel error dump messages. +paride.txt + - information about the parallel port IDE subsystem. parisc/ - directory with info on using Linux on PA-RISC architecture. parport.txt @@ -270,12 +294,18 @@ printk-formats.txt - how to get printk format specifiers right prio_tree.txt - info on radix-priority-search-tree use for indexing vmas. +ramdisk.txt + - short guide on how to set up and use the RAM disk. rbtree.txt - info on what red-black trees are and what they are for. +riscom8.txt + - notes on using the RISCom/8 multi-port serial driver. robust-futex-ABI.txt - documentation of the robust futex ABI. robust-futexes.txt - a description of what robust futexes are. +rocket.txt + - info on the Comtrol RocketPort multiport serial driver. rt-mutex-design.txt - description of the RealTime mutex implementation design. rt-mutex.txt @@ -304,6 +334,8 @@ sparc/ - directory with info on using Linux on Sparc architecture. sparse.txt - info on how to obtain and use the sparse tool for typechecking. +specialix.txt + - info on hardware/driver for specialix IO8+ multiport serial card. spi/ - overview of Linux kernel Serial Peripheral Interface (SPI) support. spinlocks.txt @@ -312,10 +344,14 @@ stable_api_nonsense.txt - info on why the kernel does not have a stable in-kernel api or abi. stable_kernel_rules.txt - rules and procedures for the -stable kernel releases. +stallion.txt + - info on using the Stallion multiport serial driver. svga.txt - short guide on selecting video modes at boot via VGA BIOS. sysfs-rules.txt - How not to use sysfs. +sx.txt + - info on the Specialix SX/SI multiport serial driver. sysctl/ - directory with info on the /proc/sys/* files. sysrq.txt @@ -324,6 +360,8 @@ telephony/ - directory with info on telephony (e.g. voice over IP) support. time_interpolators.txt - info on time interpolators. +tty.txt + - guide to the locking policies of the tty layer. uml/ - directory with information about User Mode Linux. unicode.txt diff --git a/trunk/Documentation/PCI/MSI-HOWTO.txt b/trunk/Documentation/MSI-HOWTO.txt similarity index 100% rename from trunk/Documentation/PCI/MSI-HOWTO.txt rename to trunk/Documentation/MSI-HOWTO.txt diff --git a/trunk/Documentation/PCI/00-INDEX b/trunk/Documentation/PCI/00-INDEX index 812b17fe3ed0..49f43946c6b6 100644 --- a/trunk/Documentation/PCI/00-INDEX +++ b/trunk/Documentation/PCI/00-INDEX @@ -1,7 +1,5 @@ 00-INDEX - this file -MSI-HOWTO.txt - - the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ. PCI-DMA-mapping.txt - info for PCI drivers using DMA portably across all platforms PCIEBUS-HOWTO.txt diff --git a/trunk/Documentation/blockdev/README.DAC960 b/trunk/Documentation/README.DAC960 similarity index 100% rename from trunk/Documentation/blockdev/README.DAC960 rename to trunk/Documentation/README.DAC960 diff --git a/trunk/Documentation/serial/README.cycladesZ b/trunk/Documentation/README.cycladesZ similarity index 100% rename from trunk/Documentation/serial/README.cycladesZ rename to trunk/Documentation/README.cycladesZ diff --git a/trunk/Documentation/blockdev/00-INDEX b/trunk/Documentation/blockdev/00-INDEX deleted file mode 100644 index 86f054c47013..000000000000 --- a/trunk/Documentation/blockdev/00-INDEX +++ /dev/null @@ -1,16 +0,0 @@ -00-INDEX - - this file -README.DAC960 - - info on Mylex DAC960/DAC1100 PCI RAID Controller Driver for Linux. -cciss.txt - - info, major/minor #'s for Compaq's SMART Array Controllers. -cpqarray.txt - - info on using Compaq's SMART2 Intelligent Disk Array Controllers. -floppy.txt - - notes and driver options for the floppy disk driver. -nbd.txt - - info on a TCP implementation of a network block device. -paride.txt - - information about the parallel port IDE subsystem. -ramdisk.txt - - short guide on how to set up and use the RAM disk. diff --git a/trunk/Documentation/blockdev/cciss.txt b/trunk/Documentation/cciss.txt similarity index 100% rename from trunk/Documentation/blockdev/cciss.txt rename to trunk/Documentation/cciss.txt diff --git a/trunk/Documentation/serial/computone.txt b/trunk/Documentation/computone.txt similarity index 99% rename from trunk/Documentation/serial/computone.txt rename to trunk/Documentation/computone.txt index c57ea4781e5d..5e2a0c76bfa0 100644 --- a/trunk/Documentation/serial/computone.txt +++ b/trunk/Documentation/computone.txt @@ -247,7 +247,7 @@ shar archive to make it easier to extract the script from the documentation. To create the ip2mkdev shell script change to a convenient directory (/tmp works just fine) and run the following command: - unshar Documentation/serial/computone.txt + unshar Documentation/computone.txt (This file) You should now have a file ip2mkdev in your current working directory with diff --git a/trunk/Documentation/blockdev/cpqarray.txt b/trunk/Documentation/cpqarray.txt similarity index 100% rename from trunk/Documentation/blockdev/cpqarray.txt rename to trunk/Documentation/cpqarray.txt diff --git a/trunk/Documentation/serial/digiepca.txt b/trunk/Documentation/digiepca.txt similarity index 100% rename from trunk/Documentation/serial/digiepca.txt rename to trunk/Documentation/digiepca.txt diff --git a/trunk/Documentation/blockdev/floppy.txt b/trunk/Documentation/floppy.txt similarity index 100% rename from trunk/Documentation/blockdev/floppy.txt rename to trunk/Documentation/floppy.txt diff --git a/trunk/Documentation/serial/hayes-esp.txt b/trunk/Documentation/hayes-esp.txt similarity index 100% rename from trunk/Documentation/serial/hayes-esp.txt rename to trunk/Documentation/hayes-esp.txt diff --git a/trunk/Documentation/ioctl/ioctl-number.txt b/trunk/Documentation/ioctl-number.txt similarity index 100% rename from trunk/Documentation/ioctl/ioctl-number.txt rename to trunk/Documentation/ioctl-number.txt diff --git a/trunk/Documentation/ioctl/00-INDEX b/trunk/Documentation/ioctl/00-INDEX deleted file mode 100644 index d2fe4d4729ef..000000000000 --- a/trunk/Documentation/ioctl/00-INDEX +++ /dev/null @@ -1,10 +0,0 @@ -00-INDEX - - this file -cdrom.txt - - summary of CDROM ioctl calls -hdio.txt - - summary of HDIO_ ioctl calls -ioctl-decoding.txt - - how to decode the bits of an IOCTL code -ioctl-number.txt - - how to implement and register device/driver ioctl calls diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt index 9fa6508892c2..c600c4ffc657 100644 --- a/trunk/Documentation/kernel-parameters.txt +++ b/trunk/Documentation/kernel-parameters.txt @@ -629,7 +629,7 @@ and is between 256 and 4096 characters. It is defined in the file digiepca= [HW,SERIAL] See drivers/char/README.epca and - Documentation/serial/digiepca.txt. + Documentation/digiepca.txt. disable_mtrr_cleanup [X86] enable_mtrr_cleanup [X86] @@ -740,7 +740,7 @@ and is between 256 and 4096 characters. It is defined in the file See header of drivers/scsi/fdomain.c. floppy= [HW] - See Documentation/blockdev/floppy.txt. + See Documentation/floppy.txt. force_pal_cache_flush [IA-64] Avoid check_sal_cache_flush which may hang on @@ -1101,7 +1101,7 @@ and is between 256 and 4096 characters. It is defined in the file the same attribute, the last one is used. load_ramdisk= [RAM] List of ramdisks to load from floppy - See Documentation/blockdev/ramdisk.txt. + See Documentation/ramdisk.txt. lockd.nlm_grace_period=P [NFS] Assign grace period. Format: @@ -1596,7 +1596,7 @@ and is between 256 and 4096 characters. It is defined in the file pcd. [PARIDE] See header of drivers/block/paride/pcd.c. - See also Documentation/blockdev/paride.txt. + See also Documentation/paride.txt. pci=option[,option...] [PCI] various PCI subsystem options: off [X86] don't probe for the PCI bus @@ -1697,7 +1697,7 @@ and is between 256 and 4096 characters. It is defined in the file pcmv= [HW,PCMCIA] BadgePAD 4 pd. [PARIDE] - See Documentation/blockdev/paride.txt. + See Documentation/paride.txt. pdcchassis= [PARISC,HW] Disable/Enable PDC Chassis Status codes at boot time. @@ -1705,10 +1705,10 @@ and is between 256 and 4096 characters. It is defined in the file See arch/parisc/kernel/pdc_chassis.c pf. [PARIDE] - See Documentation/blockdev/paride.txt. + See Documentation/paride.txt. pg. [PARIDE] - See Documentation/blockdev/paride.txt. + See Documentation/paride.txt. pirq= [SMP,APIC] Manual mp-table setup See Documentation/x86/i386/IO-APIC.txt. @@ -1778,7 +1778,7 @@ and is between 256 and 4096 characters. It is defined in the file prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk before loading. - See Documentation/blockdev/ramdisk.txt. + See Documentation/ramdisk.txt. psmouse.proto= [HW,MOUSE] Highest PS2 mouse protocol extension to probe for; one of (bare|imps|exps|lifebook|any). @@ -1798,7 +1798,7 @@ and is between 256 and 4096 characters. It is defined in the file ,,,,, pt. [PARIDE] - See Documentation/blockdev/paride.txt. + See Documentation/paride.txt. pty.legacy_count= [KNL] Number of legacy pty's. Overwrites compiled-in @@ -1812,10 +1812,10 @@ and is between 256 and 4096 characters. It is defined in the file See Documentation/md.txt. ramdisk_blocksize= [RAM] - See Documentation/blockdev/ramdisk.txt. + See Documentation/ramdisk.txt. ramdisk_size= [RAM] Sizes of RAM disks in kilobytes - See Documentation/blockdev/ramdisk.txt. + See Documentation/ramdisk.txt. rcupdate.blimit= [KNL,BOOT] Set maximum number of finished RCU callbacks to process @@ -2147,7 +2147,7 @@ and is between 256 and 4096 characters. It is defined in the file See Documentation/sonypi.txt specialix= [HW,SERIAL] Specialix multi-serial port adapter - See Documentation/serial/specialix.txt. + See Documentation/specialix.txt. spia_io_base= [HW,MTD] spia_fio_base= diff --git a/trunk/Documentation/serial/moxa-smartio b/trunk/Documentation/moxa-smartio similarity index 100% rename from trunk/Documentation/serial/moxa-smartio rename to trunk/Documentation/moxa-smartio diff --git a/trunk/Documentation/blockdev/nbd.txt b/trunk/Documentation/nbd.txt similarity index 100% rename from trunk/Documentation/blockdev/nbd.txt rename to trunk/Documentation/nbd.txt diff --git a/trunk/Documentation/blockdev/paride.txt b/trunk/Documentation/paride.txt similarity index 100% rename from trunk/Documentation/blockdev/paride.txt rename to trunk/Documentation/paride.txt diff --git a/trunk/Documentation/blockdev/ramdisk.txt b/trunk/Documentation/ramdisk.txt similarity index 100% rename from trunk/Documentation/blockdev/ramdisk.txt rename to trunk/Documentation/ramdisk.txt diff --git a/trunk/Documentation/serial/riscom8.txt b/trunk/Documentation/riscom8.txt similarity index 100% rename from trunk/Documentation/serial/riscom8.txt rename to trunk/Documentation/riscom8.txt diff --git a/trunk/Documentation/serial/rocket.txt b/trunk/Documentation/rocket.txt similarity index 100% rename from trunk/Documentation/serial/rocket.txt rename to trunk/Documentation/rocket.txt diff --git a/trunk/Documentation/serial/00-INDEX b/trunk/Documentation/serial/00-INDEX deleted file mode 100644 index 07dcdb0d2a36..000000000000 --- a/trunk/Documentation/serial/00-INDEX +++ /dev/null @@ -1,24 +0,0 @@ -00-INDEX - - this file. -README.cycladesZ - - info on Cyclades-Z firmware loading. -computone.txt - - info on Computone Intelliport II/Plus Multiport Serial Driver. -digiepca.txt - - info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards. -hayes-esp.txt - - info on using the Hayes ESP serial driver. -moxa-smartio - - file with info on installing/using Moxa multiport serial driver. -riscom8.txt - - notes on using the RISCom/8 multi-port serial driver. -rocket.txt - - info on the Comtrol RocketPort multiport serial driver. -specialix.txt - - info on hardware/driver for specialix IO8+ multiport serial card. -stallion.txt - - info on using the Stallion multiport serial driver. -sx.txt - - info on the Specialix SX/SI multiport serial driver. -tty.txt - - guide to the locking policies of the tty layer. diff --git a/trunk/Documentation/serial/specialix.txt b/trunk/Documentation/specialix.txt similarity index 100% rename from trunk/Documentation/serial/specialix.txt rename to trunk/Documentation/specialix.txt diff --git a/trunk/Documentation/serial/stallion.txt b/trunk/Documentation/stallion.txt similarity index 100% rename from trunk/Documentation/serial/stallion.txt rename to trunk/Documentation/stallion.txt diff --git a/trunk/Documentation/serial/sx.txt b/trunk/Documentation/sx.txt similarity index 100% rename from trunk/Documentation/serial/sx.txt rename to trunk/Documentation/sx.txt diff --git a/trunk/Documentation/serial/tty.txt b/trunk/Documentation/tty.txt similarity index 100% rename from trunk/Documentation/serial/tty.txt rename to trunk/Documentation/tty.txt diff --git a/trunk/Makefile b/trunk/Makefile index a9ae5dc0aa16..7f9ff9bf1544 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 28 -EXTRAVERSION = -rc5 +EXTRAVERSION = -rc4 NAME = Killer Bat of Doom # *DOCUMENTATION* diff --git a/trunk/arch/arm/include/asm/dma-mapping.h b/trunk/arch/arm/include/asm/dma-mapping.h index 4ed149cbb32a..1cb8602dd9d5 100644 --- a/trunk/arch/arm/include/asm/dma-mapping.h +++ b/trunk/arch/arm/include/asm/dma-mapping.h @@ -256,17 +256,8 @@ int dmabounce_sync_for_cpu(struct device *, dma_addr_t, unsigned long, int dmabounce_sync_for_device(struct device *, dma_addr_t, unsigned long, size_t, enum dma_data_direction); #else -static inline int dmabounce_sync_for_cpu(struct device *d, dma_addr_t addr, - unsigned long offset, size_t size, enum dma_data_direction dir) -{ - return 1; -} - -static inline int dmabounce_sync_for_device(struct device *d, dma_addr_t addr, - unsigned long offset, size_t size, enum dma_data_direction dir) -{ - return 1; -} +#define dmabounce_sync_for_cpu(dev,dma,off,sz,dir) (1) +#define dmabounce_sync_for_device(dev,dma,off,sz,dir) (1) /** diff --git a/trunk/arch/arm/include/asm/mach/map.h b/trunk/arch/arm/include/asm/mach/map.h index 39d949b63e80..cb1139ac1943 100644 --- a/trunk/arch/arm/include/asm/mach/map.h +++ b/trunk/arch/arm/include/asm/mach/map.h @@ -19,13 +19,12 @@ struct map_desc { }; /* types 0-3 are defined in asm/io.h */ -#define MT_UNCACHED 4 -#define MT_CACHECLEAN 5 -#define MT_MINICLEAN 6 -#define MT_LOW_VECTORS 7 -#define MT_HIGH_VECTORS 8 -#define MT_MEMORY 9 -#define MT_ROM 10 +#define MT_CACHECLEAN 4 +#define MT_MINICLEAN 5 +#define MT_LOW_VECTORS 6 +#define MT_HIGH_VECTORS 7 +#define MT_MEMORY 8 +#define MT_ROM 9 #ifdef CONFIG_MMU extern void iotable_init(struct map_desc *, int); diff --git a/trunk/arch/arm/mach-clps711x/include/mach/hardware.h b/trunk/arch/arm/mach-clps711x/include/mach/hardware.h index b3ebe9e4871f..4c3e101b96c9 100644 --- a/trunk/arch/arm/mach-clps711x/include/mach/hardware.h +++ b/trunk/arch/arm/mach-clps711x/include/mach/hardware.h @@ -94,6 +94,20 @@ #include #include +/* dynamic ioremap() areas */ +#define FLASH_START 0x00000000 +#define FLASH_SIZE 0x800000 +#define FLASH_WIDTH 4 + +#define SRAM_START 0x60000000 +#define SRAM_SIZE 0xc000 +#define SRAM_WIDTH 4 + +#define BOOTROM_START 0x70000000 +#define BOOTROM_SIZE 0x80 +#define BOOTROM_WIDTH 4 + + /* static cdb89712_map_io() areas */ #define REGISTER_START 0x80000000 #define REGISTER_SIZE 0x4000 @@ -184,6 +198,14 @@ #define CEIVA_FLASH_SIZE 0x100000 #define CEIVA_FLASH_WIDTH 2 +#define SRAM_START 0x60000000 +#define SRAM_SIZE 0xc000 +#define SRAM_WIDTH 4 + +#define BOOTROM_START 0x70000000 +#define BOOTROM_SIZE 0x80 +#define BOOTROM_WIDTH 4 + /* * SED1355 LCD controller */ diff --git a/trunk/arch/arm/mach-clps7500/core.c b/trunk/arch/arm/mach-clps7500/core.c index 7e247c04d41c..c3a33b8a5aac 100644 --- a/trunk/arch/arm/mach-clps7500/core.c +++ b/trunk/arch/arm/mach-clps7500/core.c @@ -275,9 +275,9 @@ static struct map_desc cl7500_io_desc[] __initdata = { .length = ISA_SIZE, .type = MT_DEVICE }, { /* Flash */ - .virtual = CLPS7500_FLASH_BASE, - .pfn = __phys_to_pfn(CLPS7500_FLASH_START), - .length = CLPS7500_FLASH_SIZE, + .virtual = FLASH_BASE, + .pfn = __phys_to_pfn(FLASH_START), + .length = FLASH_SIZE, .type = MT_DEVICE }, { /* LED */ .virtual = LED_BASE, diff --git a/trunk/arch/arm/mach-clps7500/include/mach/hardware.h b/trunk/arch/arm/mach-clps7500/include/mach/hardware.h index a6ad1d44badf..d66578a3371c 100644 --- a/trunk/arch/arm/mach-clps7500/include/mach/hardware.h +++ b/trunk/arch/arm/mach-clps7500/include/mach/hardware.h @@ -39,9 +39,9 @@ #define ISA_SIZE 0x00010000 #define ISA_BASE 0xe1000000 -#define CLPS7500_FLASH_START 0x01000000 /* XXX */ -#define CLPS7500_FLASH_SIZE 0x01000000 -#define CLPS7500_FLASH_BASE 0xe2000000 +#define FLASH_START 0x01000000 /* XXX */ +#define FLASH_SIZE 0x01000000 +#define FLASH_BASE 0xe2000000 #define LED_START 0x0302B000 #define LED_SIZE 0x00001000 diff --git a/trunk/arch/arm/mach-h720x/include/mach/boards.h b/trunk/arch/arm/mach-h720x/include/mach/boards.h index 38b8e0d61fbf..079b279e1242 100644 --- a/trunk/arch/arm/mach-h720x/include/mach/boards.h +++ b/trunk/arch/arm/mach-h720x/include/mach/boards.h @@ -19,9 +19,9 @@ #ifdef CONFIG_ARCH_H7202 /* FLASH */ -#define H720X_FLASH_VIRT 0xd0000000 -#define H720X_FLASH_PHYS 0x00000000 -#define H720X_FLASH_SIZE 0x02000000 +#define FLASH_VIRT 0xd0000000 +#define FLASH_PHYS 0x00000000 +#define FLASH_SIZE 0x02000000 /* onboard LAN controller */ # define ETH0_PHYS 0x08000000 diff --git a/trunk/arch/arm/mach-integrator/include/mach/platform.h b/trunk/arch/arm/mach-integrator/include/mach/platform.h index e00a2624f269..028b87839c0f 100644 --- a/trunk/arch/arm/mach-integrator/include/mach/platform.h +++ b/trunk/arch/arm/mach-integrator/include/mach/platform.h @@ -407,11 +407,28 @@ */ #define uHAL_MEMORY_SIZE INTEGRATOR_SSRAM_SIZE +/* + * Application Flash + * + */ +#define FLASH_BASE INTEGRATOR_FLASH_BASE +#define FLASH_SIZE INTEGRATOR_FLASH_SIZE +#define FLASH_END (FLASH_BASE + FLASH_SIZE - 1) +#define FLASH_BLOCK_SIZE SZ_128K + +/* + * Boot Flash + * + */ +#define EPROM_BASE INTEGRATOR_BOOT_ROM_HI +#define EPROM_SIZE INTEGRATOR_BOOT_ROM_SIZE +#define EPROM_END (EPROM_BASE + EPROM_SIZE - 1) + /* * Clean base - dummy * */ -#define CLEAN_BASE INTEGRATOR_BOOT_ROM_HI +#define CLEAN_BASE EPROM_BASE /* * Timer definitions diff --git a/trunk/arch/arm/mach-realview/clock.c b/trunk/arch/arm/mach-realview/clock.c index 3347c4236a60..3e706c57833a 100644 --- a/trunk/arch/arm/mach-realview/clock.c +++ b/trunk/arch/arm/mach-realview/clock.c @@ -104,7 +104,7 @@ static struct clk uart_clk = { static struct clk mmci_clk = { .name = "MCLK", - .rate = 24000000, + .rate = 33000000, }; int clk_register(struct clk *clk) diff --git a/trunk/arch/arm/mach-realview/include/mach/platform.h b/trunk/arch/arm/mach-realview/include/mach/platform.h index 793a3a332712..4034b54950c2 100644 --- a/trunk/arch/arm/mach-realview/include/mach/platform.h +++ b/trunk/arch/arm/mach-realview/include/mach/platform.h @@ -238,11 +238,28 @@ #define REALVIEW_INTREG_OFFSET 0x8 /* Interrupt control */ #define REALVIEW_DECODE_OFFSET 0xC /* Fitted logic modules */ +/* + * Application Flash + * + */ +#define FLASH_BASE REALVIEW_FLASH_BASE +#define FLASH_SIZE REALVIEW_FLASH_SIZE +#define FLASH_END (FLASH_BASE + FLASH_SIZE - 1) +#define FLASH_BLOCK_SIZE SZ_128K + +/* + * Boot Flash + * + */ +#define EPROM_BASE REALVIEW_BOOT_ROM_HI +#define EPROM_SIZE REALVIEW_BOOT_ROM_SIZE +#define EPROM_END (EPROM_BASE + EPROM_SIZE - 1) + /* * Clean base - dummy * */ -#define CLEAN_BASE REALVIEW_BOOT_ROM_HI +#define CLEAN_BASE EPROM_BASE /* * System controller bit assignment diff --git a/trunk/arch/arm/mach-versatile/clock.c b/trunk/arch/arm/mach-versatile/clock.c index 58937f1fb38c..9336508ec0b2 100644 --- a/trunk/arch/arm/mach-versatile/clock.c +++ b/trunk/arch/arm/mach-versatile/clock.c @@ -105,7 +105,7 @@ static struct clk uart_clk = { static struct clk mmci_clk = { .name = "MCLK", - .rate = 24000000, + .rate = 33000000, }; int clk_register(struct clk *clk) diff --git a/trunk/arch/arm/mach-versatile/include/mach/platform.h b/trunk/arch/arm/mach-versatile/include/mach/platform.h index f91ba930ca8a..27cbe6a3f220 100644 --- a/trunk/arch/arm/mach-versatile/include/mach/platform.h +++ b/trunk/arch/arm/mach-versatile/include/mach/platform.h @@ -436,12 +436,28 @@ #define SIC_INTMASK_PCI1 (1 << SIC_INT_PCI1) #define SIC_INTMASK_PCI2 (1 << SIC_INT_PCI2) #define SIC_INTMASK_PCI3 (1 << SIC_INT_PCI3) +/* + * Application Flash + * + */ +#define FLASH_BASE VERSATILE_FLASH_BASE +#define FLASH_SIZE VERSATILE_FLASH_SIZE +#define FLASH_END (FLASH_BASE + FLASH_SIZE - 1) +#define FLASH_BLOCK_SIZE SZ_128K + +/* + * Boot Flash + * + */ +#define EPROM_BASE VERSATILE_BOOT_ROM_HI +#define EPROM_SIZE VERSATILE_BOOT_ROM_SIZE +#define EPROM_END (EPROM_BASE + EPROM_SIZE - 1) /* * Clean base - dummy * */ -#define CLEAN_BASE VERSATILE_BOOT_ROM_HI +#define CLEAN_BASE EPROM_BASE /* * System controller bit assignment diff --git a/trunk/arch/arm/mm/cache-feroceon-l2.c b/trunk/arch/arm/mm/cache-feroceon-l2.c index 80cd207cbaea..13cdae8b0d44 100644 --- a/trunk/arch/arm/mm/cache-feroceon-l2.c +++ b/trunk/arch/arm/mm/cache-feroceon-l2.c @@ -150,7 +150,7 @@ static void feroceon_l2_inv_range(unsigned long start, unsigned long end) /* * Clean and invalidate partial last cache line. */ - if (start < end && end & (CACHE_LINE_SIZE - 1)) { + if (end & (CACHE_LINE_SIZE - 1)) { l2_clean_inv_pa(end & ~(CACHE_LINE_SIZE - 1)); end &= ~(CACHE_LINE_SIZE - 1); } @@ -158,7 +158,7 @@ static void feroceon_l2_inv_range(unsigned long start, unsigned long end) /* * Invalidate all full cache lines between 'start' and 'end'. */ - while (start < end) { + while (start != end) { unsigned long range_end = calc_range_end(start, end); l2_inv_pa_range(start, range_end - CACHE_LINE_SIZE); start = range_end; diff --git a/trunk/arch/arm/mm/mmu.c b/trunk/arch/arm/mm/mmu.c index 7f36c825718d..e63db11f16a8 100644 --- a/trunk/arch/arm/mm/mmu.c +++ b/trunk/arch/arm/mm/mmu.c @@ -208,12 +208,6 @@ static struct mem_type mem_types[] = { .prot_sect = PROT_SECT_DEVICE, .domain = DOMAIN_IO, }, - [MT_UNCACHED] = { - .prot_pte = PROT_PTE_DEVICE, - .prot_l1 = PMD_TYPE_TABLE, - .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, - .domain = DOMAIN_IO, - }, [MT_CACHECLEAN] = { .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, .domain = DOMAIN_KERNEL, diff --git a/trunk/arch/arm/plat-iop/setup.c b/trunk/arch/arm/plat-iop/setup.c index 9e573e78176a..4689db638e95 100644 --- a/trunk/arch/arm/plat-iop/setup.c +++ b/trunk/arch/arm/plat-iop/setup.c @@ -16,15 +16,14 @@ #include /* - * Standard IO mapping for all IOP3xx based systems. Note that - * the IOP3xx OCCDR must be mapped uncached and unbuffered. + * Standard IO mapping for all IOP3xx based systems */ static struct map_desc iop3xx_std_desc[] __initdata = { { /* mem mapped registers */ .virtual = IOP3XX_PERIPHERAL_VIRT_BASE, .pfn = __phys_to_pfn(IOP3XX_PERIPHERAL_PHYS_BASE), .length = IOP3XX_PERIPHERAL_SIZE, - .type = MT_UNCACHED, + .type = MT_DEVICE, }, { /* PCI IO space */ .virtual = IOP3XX_PCI_LOWER_IO_VA, .pfn = __phys_to_pfn(IOP3XX_PCI_LOWER_IO_PA), diff --git a/trunk/arch/m68k/kernel/ints.c b/trunk/arch/m68k/kernel/ints.c index 761ee0440c99..7e8a0d394e61 100644 --- a/trunk/arch/m68k/kernel/ints.c +++ b/trunk/arch/m68k/kernel/ints.c @@ -133,7 +133,7 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, { int i; - BUG_ON(IRQ_USER + cnt > NR_IRQS); + BUG_ON(IRQ_USER + cnt >= NR_IRQS); m68k_first_user_vec = vec; for (i = 0; i < cnt; i++) irq_controller[IRQ_USER + i] = &user_irq_controller; diff --git a/trunk/arch/parisc/include/asm/smp.h b/trunk/arch/parisc/include/asm/smp.h index 409e698f4361..398cdbaf4e54 100644 --- a/trunk/arch/parisc/include/asm/smp.h +++ b/trunk/arch/parisc/include/asm/smp.h @@ -44,6 +44,8 @@ extern void arch_send_call_function_ipi(cpumask_t mask); #define PROC_CHANGE_PENALTY 15 /* Schedule penalty */ +extern unsigned long cpu_present_mask; + #define raw_smp_processor_id() (current_thread_info()->cpu) #else /* CONFIG_SMP */ diff --git a/trunk/arch/s390/kernel/entry.S b/trunk/arch/s390/kernel/entry.S index 08844fc24a2e..ed500ef799b7 100644 --- a/trunk/arch/s390/kernel/entry.S +++ b/trunk/arch/s390/kernel/entry.S @@ -61,25 +61,22 @@ STACK_SIZE = 1 << STACK_SHIFT #ifdef CONFIG_TRACE_IRQFLAGS .macro TRACE_IRQS_ON - basr %r2,%r0 - l %r1,BASED(.Ltrace_irq_on_caller) + l %r1,BASED(.Ltrace_irq_on) basr %r14,%r1 .endm .macro TRACE_IRQS_OFF - basr %r2,%r0 - l %r1,BASED(.Ltrace_irq_off_caller) + l %r1,BASED(.Ltrace_irq_off) basr %r14,%r1 .endm .macro TRACE_IRQS_CHECK - basr %r2,%r0 tm SP_PSW(%r15),0x03 # irqs enabled? jz 0f - l %r1,BASED(.Ltrace_irq_on_caller) + l %r1,BASED(.Ltrace_irq_on) basr %r14,%r1 j 1f -0: l %r1,BASED(.Ltrace_irq_off_caller) +0: l %r1,BASED(.Ltrace_irq_off) basr %r14,%r1 1: .endm @@ -1116,12 +1113,9 @@ cleanup_io_leave_insn: .Lschedtail: .long schedule_tail .Lsysc_table: .long sys_call_table #ifdef CONFIG_TRACE_IRQFLAGS -.Ltrace_irq_on_caller: - .long trace_hardirqs_on_caller -.Ltrace_irq_off_caller: - .long trace_hardirqs_off_caller -#endif -#ifdef CONFIG_LOCKDEP +.Ltrace_irq_on: .long trace_hardirqs_on +.Ltrace_irq_off: + .long trace_hardirqs_off .Llockdep_sys_exit: .long lockdep_sys_exit #endif diff --git a/trunk/arch/s390/kernel/entry64.S b/trunk/arch/s390/kernel/entry64.S index 41aca06682aa..d7ce150453f2 100644 --- a/trunk/arch/s390/kernel/entry64.S +++ b/trunk/arch/s390/kernel/entry64.S @@ -61,22 +61,19 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED | \ #ifdef CONFIG_TRACE_IRQFLAGS .macro TRACE_IRQS_ON - basr %r2,%r0 - brasl %r14,trace_hardirqs_on_caller + brasl %r14,trace_hardirqs_on .endm .macro TRACE_IRQS_OFF - basr %r2,%r0 - brasl %r14,trace_hardirqs_off_caller + brasl %r14,trace_hardirqs_off .endm .macro TRACE_IRQS_CHECK - basr %r2,%r0 tm SP_PSW(%r15),0x03 # irqs enabled? jz 0f - brasl %r14,trace_hardirqs_on_caller + brasl %r14,trace_hardirqs_on j 1f -0: brasl %r14,trace_hardirqs_off_caller +0: brasl %r14,trace_hardirqs_off 1: .endm #else diff --git a/trunk/arch/s390/kernel/process.c b/trunk/arch/s390/kernel/process.c index 04f8c67a6101..3e2c05cb6a87 100644 --- a/trunk/arch/s390/kernel/process.c +++ b/trunk/arch/s390/kernel/process.c @@ -136,12 +136,9 @@ static void default_idle(void) return; } trace_hardirqs_on(); - /* Don't trace preempt off for idle. */ - stop_critical_timings(); /* Wait for external, I/O or machine check interrupt. */ __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_IO | PSW_MASK_EXT); - start_critical_timings(); } void cpu_idle(void) diff --git a/trunk/arch/s390/kernel/setup.c b/trunk/arch/s390/kernel/setup.c index 400b040df7fa..62122bad1e33 100644 --- a/trunk/arch/s390/kernel/setup.c +++ b/trunk/arch/s390/kernel/setup.c @@ -604,13 +604,13 @@ setup_memory(void) if (memory_chunk[i].type != CHUNK_READ_WRITE) continue; start_chunk = PFN_DOWN(memory_chunk[i].addr); - end_chunk = start_chunk + PFN_DOWN(memory_chunk[i].size); + end_chunk = start_chunk + PFN_DOWN(memory_chunk[i].size) - 1; end_chunk = min(end_chunk, end_pfn); if (start_chunk >= end_chunk) continue; add_active_range(0, start_chunk, end_chunk); pfn = max(start_chunk, start_pfn); - for (; pfn < end_chunk; pfn++) + for (; pfn <= end_chunk; pfn++) page_set_storage_key(PFN_PHYS(pfn), PAGE_DEFAULT_KEY); } diff --git a/trunk/arch/s390/kernel/sys_s390.c b/trunk/arch/s390/kernel/sys_s390.c index 4fe952e557ac..5fdb799062b7 100644 --- a/trunk/arch/s390/kernel/sys_s390.c +++ b/trunk/arch/s390/kernel/sys_s390.c @@ -198,7 +198,7 @@ asmlinkage long s390x_newuname(struct new_utsname __user *name) { int ret = sys_newuname(name); - if (personality(current->personality) == PER_LINUX32 && !ret) { + if (current->personality == PER_LINUX32 && !ret) { ret = copy_to_user(name->machine, "s390\0\0\0\0", 8); if (ret) ret = -EFAULT; } diff --git a/trunk/arch/s390/kernel/topology.c b/trunk/arch/s390/kernel/topology.c index a947899dcba1..632b13e10053 100644 --- a/trunk/arch/s390/kernel/topology.c +++ b/trunk/arch/s390/kernel/topology.c @@ -65,21 +65,18 @@ static int machine_has_topology_irq; static struct timer_list topology_timer; static void set_topology_timer(void); static DECLARE_WORK(topology_work, topology_work_fn); -/* topology_lock protects the core linked list */ -static DEFINE_SPINLOCK(topology_lock); cpumask_t cpu_core_map[NR_CPUS]; cpumask_t cpu_coregroup_map(unsigned int cpu) { struct core_info *core = &core_info; - unsigned long flags; cpumask_t mask; cpus_clear(mask); if (!machine_has_topology) return cpu_present_map; - spin_lock_irqsave(&topology_lock, flags); + mutex_lock(&smp_cpu_state_mutex); while (core) { if (cpu_isset(cpu, core->mask)) { mask = core->mask; @@ -87,7 +84,7 @@ cpumask_t cpu_coregroup_map(unsigned int cpu) } core = core->next; } - spin_unlock_irqrestore(&topology_lock, flags); + mutex_unlock(&smp_cpu_state_mutex); if (cpus_empty(mask)) mask = cpumask_of_cpu(cpu); return mask; @@ -136,7 +133,7 @@ static void tl_to_cores(struct tl_info *info) union tl_entry *tle, *end; struct core_info *core = &core_info; - spin_lock_irq(&topology_lock); + mutex_lock(&smp_cpu_state_mutex); clear_cores(); tle = info->tle; end = (union tl_entry *)((unsigned long)info + info->length); @@ -160,7 +157,7 @@ static void tl_to_cores(struct tl_info *info) } tle = next_tle(tle); } - spin_unlock_irq(&topology_lock); + mutex_unlock(&smp_cpu_state_mutex); } static void topology_update_polarization_simple(void) diff --git a/trunk/arch/sh/include/asm/io.h b/trunk/arch/sh/include/asm/io.h index 65eaae34e753..436c28539577 100644 --- a/trunk/arch/sh/include/asm/io.h +++ b/trunk/arch/sh/include/asm/io.h @@ -293,10 +293,6 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) */ #define xlate_dev_kmem_ptr(p) p -#define ARCH_HAS_VALID_PHYS_ADDR_RANGE -int valid_phys_addr_range(unsigned long addr, size_t size); -int valid_mmap_phys_addr_range(unsigned long pfn, size_t size); - #endif /* __KERNEL__ */ #endif /* __ASM_SH_IO_H */ diff --git a/trunk/arch/sh/include/asm/pgtable.h b/trunk/arch/sh/include/asm/pgtable.h index b517ae08b9c0..52220d70a096 100644 --- a/trunk/arch/sh/include/asm/pgtable.h +++ b/trunk/arch/sh/include/asm/pgtable.h @@ -148,12 +148,6 @@ extern void paging_init(void); extern void page_table_range_init(unsigned long start, unsigned long end, pgd_t *pgd); -#if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_CPU_SH4) && defined(CONFIG_MMU) -extern void kmap_coherent_init(void); -#else -#define kmap_coherent_init() do { } while (0) -#endif - #include #endif /* __ASM_SH_PGTABLE_H */ diff --git a/trunk/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/trunk/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 6d9e6972cfc9..a7412cede534 100644 --- a/trunk/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/trunk/arch/sh/kernel/cpu/sh4a/setup-sh7723.c @@ -119,17 +119,17 @@ static struct plat_sci_port sci_platform_data[] = { },{ .mapbase = 0xa4e30000, .flags = UPF_BOOT_AUTOCONF, - .type = PORT_SCIFA, + .type = PORT_SCI, .irqs = { 56, 56, 56, 56 }, },{ .mapbase = 0xa4e40000, .flags = UPF_BOOT_AUTOCONF, - .type = PORT_SCIFA, + .type = PORT_SCI, .irqs = { 88, 88, 88, 88 }, },{ .mapbase = 0xa4e50000, .flags = UPF_BOOT_AUTOCONF, - .type = PORT_SCIFA, + .type = PORT_SCI, .irqs = { 109, 109, 109, 109 }, }, { .flags = 0, diff --git a/trunk/arch/sh/kernel/early_printk.c b/trunk/arch/sh/kernel/early_printk.c index a952dcf9999d..6b7d166694e2 100644 --- a/trunk/arch/sh/kernel/early_printk.c +++ b/trunk/arch/sh/kernel/early_printk.c @@ -75,7 +75,6 @@ static struct console bios_console = { #endif static struct uart_port scif_port = { - .type = PORT_SCIF, .mapbase = CONFIG_EARLY_SCIF_CONSOLE_PORT, .membase = (char __iomem *)CONFIG_EARLY_SCIF_CONSOLE_PORT, }; @@ -85,9 +84,9 @@ static void scif_sercon_putc(int c) while (((sci_in(&scif_port, SCFDR) & EPK_FIFO_BITS) >= EPK_FIFO_SIZE)) ; + sci_out(&scif_port, SCxTDR, c); sci_in(&scif_port, SCxSR); sci_out(&scif_port, SCxSR, 0xf3 & ~(0x20 | 0x40)); - sci_out(&scif_port, SCxTDR, c); while ((sci_in(&scif_port, SCxSR) & 0x40) == 0) ; diff --git a/trunk/arch/sh/kernel/timers/timer-tmu.c b/trunk/arch/sh/kernel/timers/timer-tmu.c index 3c61ddd4d43e..aaaf90d06b85 100644 --- a/trunk/arch/sh/kernel/timers/timer-tmu.c +++ b/trunk/arch/sh/kernel/timers/timer-tmu.c @@ -120,7 +120,7 @@ static void tmu_set_mode(enum clock_event_mode mode, { switch (mode) { case CLOCK_EVT_MODE_PERIODIC: - ctrl_outl(tmu_latest_interval[TMU0], TMU0_TCOR); + ctrl_outl(ctrl_inl(TMU0_TCNT), TMU0_TCOR); break; case CLOCK_EVT_MODE_ONESHOT: ctrl_outl(0, TMU0_TCOR); diff --git a/trunk/arch/sh/lib/copy_page.S b/trunk/arch/sh/lib/copy_page.S index 43de7e8e4e17..5d12e657be34 100644 --- a/trunk/arch/sh/lib/copy_page.S +++ b/trunk/arch/sh/lib/copy_page.S @@ -80,11 +80,6 @@ ENTRY(copy_page) .section __ex_table, "a"; \ .long 9999b, 6000f ; \ .previous -#define EX_NO_POP(...) \ - 9999: __VA_ARGS__ ; \ - .section __ex_table, "a"; \ - .long 9999b, 6005f ; \ - .previous ENTRY(__copy_user) ! Check if small number of bytes mov #11,r0 @@ -144,9 +139,9 @@ EX( mov.b r1,@r4 ) bt 1f 2: -EX_NO_POP( mov.b @r5+,r0 ) +EX( mov.b @r5+,r0 ) dt r6 -EX_NO_POP( mov.b r0,@r4 ) +EX( mov.b r0,@r4 ) bf/s 2b add #1,r4 @@ -155,7 +150,7 @@ EX_NO_POP( mov.b r0,@r4 ) # Exception handler: .section .fixup, "ax" -6005: +6000: mov.l 8000f,r1 mov r3,r0 jmp @r1 diff --git a/trunk/arch/sh/mm/Makefile_32 b/trunk/arch/sh/mm/Makefile_32 index f066e76da204..70e0906023cc 100644 --- a/trunk/arch/sh/mm/Makefile_32 +++ b/trunk/arch/sh/mm/Makefile_32 @@ -2,7 +2,7 @@ # Makefile for the Linux SuperH-specific parts of the memory manager. # -obj-y := init.o extable_32.o consistent.o mmap.o +obj-y := init.o extable_32.o consistent.o ifndef CONFIG_CACHE_OFF cache-$(CONFIG_CPU_SH2) := cache-sh2.o diff --git a/trunk/arch/sh/mm/Makefile_64 b/trunk/arch/sh/mm/Makefile_64 index 9481d0f54efd..0d92a8a3ac9a 100644 --- a/trunk/arch/sh/mm/Makefile_64 +++ b/trunk/arch/sh/mm/Makefile_64 @@ -2,7 +2,7 @@ # Makefile for the Linux SuperH-specific parts of the memory manager. # -obj-y := init.o consistent.o mmap.o +obj-y := init.o consistent.o mmu-y := tlb-nommu.o pg-nommu.o extable_32.o mmu-$(CONFIG_MMU) := fault_64.o ioremap_64.o tlbflush_64.o tlb-sh5.o \ diff --git a/trunk/arch/sh/mm/init.c b/trunk/arch/sh/mm/init.c index 6cbef8caeb56..4abf00031dae 100644 --- a/trunk/arch/sh/mm/init.c +++ b/trunk/arch/sh/mm/init.c @@ -137,7 +137,6 @@ void __init page_table_range_init(unsigned long start, unsigned long end, void __init paging_init(void) { unsigned long max_zone_pfns[MAX_NR_ZONES]; - unsigned long vaddr; int nid; /* We don't need to map the kernel through the TLB, as @@ -149,15 +148,10 @@ void __init paging_init(void) * check for a null value. */ set_TTB(swapper_pg_dir); - /* - * Populate the relevant portions of swapper_pg_dir so that + /* Populate the relevant portions of swapper_pg_dir so that * we can use the fixmap entries without calling kmalloc. - * pte's will be filled in by __set_fixmap(). - */ - vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK; - page_table_range_init(vaddr, 0, swapper_pg_dir); - - kmap_coherent_init(); + * pte's will be filled in by __set_fixmap(). */ + page_table_range_init(FIXADDR_START, FIXADDR_TOP, swapper_pg_dir); memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); diff --git a/trunk/arch/sh/mm/mmap.c b/trunk/arch/sh/mm/mmap.c deleted file mode 100644 index 8837d511710a..000000000000 --- a/trunk/arch/sh/mm/mmap.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * arch/sh/mm/mmap.c - * - * Copyright (C) 2008 Paul Mundt - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - */ -#include -#include -#include - -/* - * You really shouldn't be using read() or write() on /dev/mem. This - * might go away in the future. - */ -int valid_phys_addr_range(unsigned long addr, size_t count) -{ - if (addr < __MEMORY_START) - return 0; - if (addr + count > __pa(high_memory)) - return 0; - - return 1; -} - -int valid_mmap_phys_addr_range(unsigned long pfn, size_t size) -{ - return 1; -} diff --git a/trunk/arch/sh/mm/pg-sh4.c b/trunk/arch/sh/mm/pg-sh4.c index 2fe14da1f839..38870e0fc182 100644 --- a/trunk/arch/sh/mm/pg-sh4.c +++ b/trunk/arch/sh/mm/pg-sh4.c @@ -7,7 +7,6 @@ * Released under the terms of the GNU GPL v2.0. */ #include -#include #include #include #include @@ -17,20 +16,6 @@ #define CACHE_ALIAS (current_cpu_data.dcache.alias_mask) -#define kmap_get_fixmap_pte(vaddr) \ - pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr)), (vaddr)) - -static pte_t *kmap_coherent_pte; - -void __init kmap_coherent_init(void) -{ - unsigned long vaddr; - - /* cache the first coherent kmap pte */ - vaddr = __fix_to_virt(FIX_CMAP_BEGIN); - kmap_coherent_pte = kmap_get_fixmap_pte(vaddr); -} - static inline void *kmap_coherent(struct page *page, unsigned long addr) { enum fixed_addresses idx; @@ -49,8 +34,6 @@ static inline void *kmap_coherent(struct page *page, unsigned long addr) update_mmu_cache(NULL, vaddr, pte); - set_pte(kmap_coherent_pte - (FIX_CMAP_END - idx), pte); - return (void *)vaddr; } diff --git a/trunk/arch/x86/include/asm/iommu.h b/trunk/arch/x86/include/asm/iommu.h index 0b500c5b6446..e4a552d44465 100644 --- a/trunk/arch/x86/include/asm/iommu.h +++ b/trunk/arch/x86/include/asm/iommu.h @@ -6,6 +6,7 @@ extern void no_iommu_init(void); extern struct dma_mapping_ops nommu_dma_ops; extern int force_iommu, no_iommu; extern int iommu_detected; +extern int dmar_disabled; extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len); diff --git a/trunk/arch/x86/kernel/early-quirks.c b/trunk/arch/x86/kernel/early-quirks.c index 1b894b72c0f5..3ce029ffaa55 100644 --- a/trunk/arch/x86/kernel/early-quirks.c +++ b/trunk/arch/x86/kernel/early-quirks.c @@ -188,6 +188,20 @@ static void __init ati_bugs_contd(int num, int slot, int func) } #endif +#ifdef CONFIG_DMAR +static void __init intel_g33_dmar(int num, int slot, int func) +{ + struct acpi_table_header *dmar_tbl; + acpi_status status; + + status = acpi_get_table(ACPI_SIG_DMAR, 0, &dmar_tbl); + if (ACPI_SUCCESS(status)) { + printk(KERN_INFO "BIOS BUG: DMAR advertised on Intel G31/G33 chipset -- ignoring\n"); + dmar_disabled = 1; + } +} +#endif + #define QFLAG_APPLY_ONCE 0x1 #define QFLAG_APPLIED 0x2 #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED) @@ -211,6 +225,10 @@ static struct chipset early_qrk[] __initdata = { PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs }, { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd }, +#ifdef CONFIG_DMAR + { PCI_VENDOR_ID_INTEL, 0x29c0, + PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, intel_g33_dmar }, +#endif {} }; diff --git a/trunk/drivers/ata/libata-sff.c b/trunk/drivers/ata/libata-sff.c index 9033d164c4ec..4b4739486327 100644 --- a/trunk/drivers/ata/libata-sff.c +++ b/trunk/drivers/ata/libata-sff.c @@ -1227,19 +1227,10 @@ int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, /* ATA PIO protocol */ if (unlikely((status & ATA_DRQ) == 0)) { /* handle BSY=0, DRQ=0 as error */ - if (likely(status & (ATA_ERR | ATA_DF))) { + if (likely(status & (ATA_ERR | ATA_DF))) /* device stops HSM for abort/error */ qc->err_mask |= AC_ERR_DEV; - - /* If diagnostic failed and this is - * IDENTIFY, it's likely a phantom - * device. Mark hint. - */ - if (qc->dev->horkage & - ATA_HORKAGE_DIAGNOSTIC) - qc->err_mask |= - AC_ERR_NODEV_HINT; - } else { + else { /* HSM violation. Let EH handle this. * Phantom devices also trigger this * condition. Mark hint. diff --git a/trunk/drivers/block/Kconfig b/trunk/drivers/block/Kconfig index 0344a8a8321d..61ad8d639ba3 100644 --- a/trunk/drivers/block/Kconfig +++ b/trunk/drivers/block/Kconfig @@ -21,8 +21,7 @@ config BLK_DEV_FD ---help--- If you want to use the floppy disk drive(s) of your PC under Linux, say Y. Information about this driver, especially important for IBM - Thinkpad users, is contained in - . + Thinkpad users, is contained in . That file also contains the location of the Floppy driver FAQ as well as location of the fdutils package used to configure additional parameters of the driver at run time. @@ -77,7 +76,7 @@ config PARIDE your computer's parallel port. Most of them are actually IDE devices using a parallel port IDE adapter. This option enables the PARIDE subsystem which contains drivers for many of these external drives. - Read for more information. + Read for more information. If you have said Y to the "Parallel-port support" configuration option, you may share a single port between your printer and other @@ -115,9 +114,9 @@ config BLK_CPQ_DA help This is the driver for Compaq Smart Array controllers. Everyone using these boards should say Y here. See the file - for the current list of - boards supported by this driver, and for further information on the - use of this driver. + for the current list of boards + supported by this driver, and for further information on the use of + this driver. config BLK_CPQ_CISS_DA tristate "Compaq Smart Array 5xxx support" @@ -125,7 +124,7 @@ config BLK_CPQ_CISS_DA help This is the driver for Compaq Smart Array 5xxx controllers. Everyone using these boards should say Y here. - See for the current list of + See for the current list of boards supported by this driver, and for further information on the use of this driver. @@ -136,7 +135,7 @@ config CISS_SCSI_TAPE help When enabled (Y), this option allows SCSI tape drives and SCSI medium changers (tape robots) to be accessed via a Compaq 5xxx array - controller. (See for more details.) + controller. (See for more details.) "SCSI support" and "SCSI tape support" must also be enabled for this option to work. @@ -150,8 +149,8 @@ config BLK_DEV_DAC960 help This driver adds support for the Mylex DAC960, AcceleRAID, and eXtremeRAID PCI RAID controllers. See the file - for further information - about this driver. + for further information about + this driver. To compile this driver as a module, choose M here: the module will be called DAC960. @@ -279,9 +278,9 @@ config BLK_DEV_NBD userland (making server and client physically the same computer, communicating using the loopback network device). - Read for more information, - especially about where to find the server code, which runs in user - space and does not need special kernel support. + Read for more information, especially + about where to find the server code, which runs in user space and + does not need special kernel support. Note that this has nothing to do with the network file systems NFS or Coda; you can say N here even if you intend to use NFS or Coda. @@ -322,8 +321,8 @@ config BLK_DEV_RAM store a copy of a minimal root file system off of a floppy into RAM during the initial install of Linux. - Note that the kernel command line option "ramdisk=XX" is now obsolete. - For details, read . + Note that the kernel command line option "ramdisk=XX" is now + obsolete. For details, read . To compile this driver as a module, choose M here: the module will be called rd. diff --git a/trunk/drivers/block/floppy.c b/trunk/drivers/block/floppy.c index cf29cc4e6ab7..14db747a636e 100644 --- a/trunk/drivers/block/floppy.c +++ b/trunk/drivers/block/floppy.c @@ -4124,7 +4124,7 @@ static int __init floppy_setup(char *str) printk("\n"); } else DPRINT("botched floppy option\n"); - DPRINT("Read Documentation/blockdev/floppy.txt\n"); + DPRINT("Read Documentation/floppy.txt\n"); return 0; } diff --git a/trunk/drivers/block/ub.c b/trunk/drivers/block/ub.c index 048d71d244d7..fccac18d3111 100644 --- a/trunk/drivers/block/ub.c +++ b/trunk/drivers/block/ub.c @@ -1546,6 +1546,8 @@ static void ub_top_sense_done(struct ub_dev *sc, struct ub_scsi_cmd *scmd) /* * Reset management + * XXX Move usb_reset_device to khubd. Hogging kevent is not a good thing. + * XXX Make usb_sync_reset asynchronous. */ static void ub_reset_enter(struct ub_dev *sc, int try) @@ -1630,22 +1632,6 @@ static void ub_reset_task(struct work_struct *work) spin_unlock_irqrestore(sc->lock, flags); } -/* - * XXX Reset brackets are too much hassle to implement, so just stub them - * in order to prevent forced unbinding (which deadlocks solid when our - * ->disconnect method waits for the reset to complete and this kills keventd). - * - * XXX Tell Alan to move usb_unlock_device inside of usb_reset_device, - * or else the post_reset is invoked, and restats I/O on a locked device. - */ -static int ub_pre_reset(struct usb_interface *iface) { - return 0; -} - -static int ub_post_reset(struct usb_interface *iface) { - return 0; -} - /* * This is called from a process context. */ @@ -2460,8 +2446,6 @@ static struct usb_driver ub_driver = { .probe = ub_probe, .disconnect = ub_disconnect, .id_table = ub_usb_ids, - .pre_reset = ub_pre_reset, - .post_reset = ub_post_reset, }; static int __init ub_init(void) diff --git a/trunk/drivers/char/Kconfig b/trunk/drivers/char/Kconfig index 43d6ba83a191..43b35d0369d6 100644 --- a/trunk/drivers/char/Kconfig +++ b/trunk/drivers/char/Kconfig @@ -124,7 +124,7 @@ config COMPUTONE which give you many serial ports. You would need something like this to connect more than two modems to your Linux box, for instance in order to become a dial-in server. If you have a card like that, say - Y here and read . + Y here and read . To compile this driver as module, choose M here: the module will be called ip2. @@ -136,7 +136,7 @@ config ROCKETPORT This driver supports Comtrol RocketPort and RocketModem PCI boards. These boards provide 2, 4, 8, 16, or 32 high-speed serial ports or modems. For information about the RocketPort/RocketModem boards - and this driver read . + and this driver read . To compile this driver as a module, choose M here: the module will be called rocket. @@ -154,7 +154,7 @@ config CYCLADES your Linux box, for instance in order to become a dial-in server. For information about the Cyclades-Z card, read - . + . To compile this driver as a module, choose M here: the module will be called cyclades. @@ -183,7 +183,7 @@ config DIGIEPCA box, for instance in order to become a dial-in server. This driver supports the original PC (ISA) boards as well as PCI, and EISA. If you have a card like this, say Y here and read the file - . + . To compile this driver as a module, choose M here: the module will be called epca. @@ -289,7 +289,7 @@ config RISCOM8 which gives you many serial ports. You would need something like this to connect more than two modems to your Linux box, for instance in order to become a dial-in server. If you have a card like that, - say Y here and read the file . + say Y here and read the file . Also it's possible to say M here and compile this driver as kernel loadable module; the module will be called riscom8. @@ -304,8 +304,8 @@ config SPECIALIX your Linux box, for instance in order to become a dial-in server. If you have a card like that, say Y here and read the file - . Also it's possible to say - M here and compile this driver as kernel loadable module which will be + . Also it's possible to say M here + and compile this driver as kernel loadable module which will be called specialix. config SX @@ -313,7 +313,7 @@ config SX depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA) help This is a driver for the SX and SI multiport serial cards. - Please read the file for details. + Please read the file for details. This driver can only be built as a module ( = code which can be inserted in and removed from the running kernel whenever you want). @@ -344,8 +344,8 @@ config STALDRV like this to connect more than two modems to your Linux box, for instance in order to become a dial-in server. If you say Y here, you will be asked for your specific card model in the next - questions. Make sure to read - in this case. If you have never heard about all this, it's safe to + questions. Make sure to read in + this case. If you have never heard about all this, it's safe to say N. config STALLION @@ -354,7 +354,7 @@ config STALLION help If you have an EasyIO or EasyConnection 8/32 multiport Stallion card, then this is for you; say Y. Make sure to read - . + . To compile this driver as a module, choose M here: the module will be called stallion. @@ -365,7 +365,7 @@ config ISTALLION help If you have an EasyConnection 8/64, ONboard, Brumby or Stallion serial multiport card, say Y here. Make sure to read - . + . To compile this driver as a module, choose M here: the module will be called istallion. diff --git a/trunk/drivers/char/specialix.c b/trunk/drivers/char/specialix.c index a16b94f12eb2..242fd46fda22 100644 --- a/trunk/drivers/char/specialix.c +++ b/trunk/drivers/char/specialix.c @@ -72,7 +72,7 @@ /* * There is a bunch of documentation about the card, jumpers, config * settings, restrictions, cables, device names and numbers in - * Documentation/serial/specialix.txt + * Documentation/specialix.txt */ #include diff --git a/trunk/drivers/hid/hidraw.c b/trunk/drivers/hid/hidraw.c index 894d52e05bf9..7685ae6808c4 100644 --- a/trunk/drivers/hid/hidraw.c +++ b/trunk/drivers/hid/hidraw.c @@ -38,7 +38,7 @@ static int hidraw_major; static struct cdev hidraw_cdev; static struct class *hidraw_class; static struct hidraw *hidraw_table[HIDRAW_MAX_DEVICES]; -static DEFINE_SPINLOCK(minors_lock); +static DEFINE_MUTEX(minors_lock); static ssize_t hidraw_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) { @@ -159,13 +159,13 @@ static int hidraw_open(struct inode *inode, struct file *file) struct hidraw_list *list; int err = 0; - lock_kernel(); if (!(list = kzalloc(sizeof(struct hidraw_list), GFP_KERNEL))) { err = -ENOMEM; goto out; } - spin_lock(&minors_lock); + lock_kernel(); + mutex_lock(&minors_lock); if (!hidraw_table[minor]) { printk(KERN_EMERG "hidraw device with minor %d doesn't exist\n", minor); @@ -180,13 +180,16 @@ static int hidraw_open(struct inode *inode, struct file *file) file->private_data = list; dev = hidraw_table[minor]; - if (!dev->open++) - dev->hid->ll_driver->open(dev->hid); + if (!dev->open++) { + err = dev->hid->ll_driver->open(dev->hid); + if (err < 0) + dev->open--; + } out_unlock: - spin_unlock(&minors_lock); -out: + mutex_unlock(&minors_lock); unlock_kernel(); +out: return err; } @@ -310,7 +313,7 @@ int hidraw_connect(struct hid_device *hid) result = -EINVAL; - spin_lock(&minors_lock); + mutex_lock(&minors_lock); for (minor = 0; minor < HIDRAW_MAX_DEVICES; minor++) { if (hidraw_table[minor]) @@ -320,9 +323,8 @@ int hidraw_connect(struct hid_device *hid) break; } - spin_unlock(&minors_lock); - if (result) { + mutex_unlock(&minors_lock); kfree(dev); goto out; } @@ -331,14 +333,14 @@ int hidraw_connect(struct hid_device *hid) NULL, "%s%d", "hidraw", minor); if (IS_ERR(dev->dev)) { - spin_lock(&minors_lock); hidraw_table[minor] = NULL; - spin_unlock(&minors_lock); + mutex_unlock(&minors_lock); result = PTR_ERR(dev->dev); kfree(dev); goto out; } + mutex_unlock(&minors_lock); init_waitqueue_head(&dev->wait); INIT_LIST_HEAD(&dev->list); @@ -360,9 +362,9 @@ void hidraw_disconnect(struct hid_device *hid) hidraw->exist = 0; - spin_lock(&minors_lock); + mutex_lock(&minors_lock); hidraw_table[hidraw->minor] = NULL; - spin_unlock(&minors_lock); + mutex_unlock(&minors_lock); device_destroy(hidraw_class, MKDEV(hidraw_major, hidraw->minor)); diff --git a/trunk/drivers/hwmon/lis3lv02d.c b/trunk/drivers/hwmon/lis3lv02d.c index c002144c76bc..752b5c44df9c 100644 --- a/trunk/drivers/hwmon/lis3lv02d.c +++ b/trunk/drivers/hwmon/lis3lv02d.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/i2c/busses/i2c-sh_mobile.c b/trunk/drivers/i2c/busses/i2c-sh_mobile.c index 3384a717fec0..640cbb237328 100644 --- a/trunk/drivers/i2c/busses/i2c-sh_mobile.c +++ b/trunk/drivers/i2c/busses/i2c-sh_mobile.c @@ -318,8 +318,7 @@ static int sh_mobile_i2c_isr_rx(struct sh_mobile_i2c_data *pd) } else data = i2c_op(pd, OP_RX, 0); - if (real_pos >= 0) - pd->msg->buf[real_pos] = data; + pd->msg->buf[real_pos] = data; } while (0); pd->pos++; diff --git a/trunk/drivers/ide/ide-cs.c b/trunk/drivers/ide/ide-cs.c index f50210fe558f..cb199c815b53 100644 --- a/trunk/drivers/ide/ide-cs.c +++ b/trunk/drivers/ide/ide-cs.c @@ -444,7 +444,6 @@ static struct pcmcia_device_id ide_ids[] = { PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209), PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e), PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6), - PCMCIA_DEVICE_PROD_ID2("Flash Card", 0x5a362506), PCMCIA_DEVICE_NULL, }; MODULE_DEVICE_TABLE(pcmcia, ide_ids); diff --git a/trunk/drivers/md/dm-mpath.c b/trunk/drivers/md/dm-mpath.c index 3d7f4923cd13..4840733cd903 100644 --- a/trunk/drivers/md/dm-mpath.c +++ b/trunk/drivers/md/dm-mpath.c @@ -441,13 +441,13 @@ static void process_queued_ios(struct work_struct *work) __choose_pgpath(m); pgpath = m->current_pgpath; + m->pgpath_to_activate = m->current_pgpath; if ((pgpath && !m->queue_io) || (!pgpath && !m->queue_if_no_path)) must_queue = 0; - if (m->pg_init_required && !m->pg_init_in_progress && pgpath) { - m->pgpath_to_activate = pgpath; + if (m->pg_init_required && !m->pg_init_in_progress) { m->pg_init_count++; m->pg_init_required = 0; m->pg_init_in_progress = 1; @@ -708,10 +708,6 @@ static int parse_hw_handler(struct arg_set *as, struct multipath *m) m->hw_handler_name = NULL; return -EINVAL; } - - if (hw_argc > 1) - DMWARN("Ignoring user-specified arguments for " - "hardware handler \"%s\"", m->hw_handler_name); consume(as, hw_argc - 1); return 0; diff --git a/trunk/drivers/md/dm-raid1.c b/trunk/drivers/md/dm-raid1.c index ec43f9fa4b2a..9d7b53ed75b2 100644 --- a/trunk/drivers/md/dm-raid1.c +++ b/trunk/drivers/md/dm-raid1.c @@ -1032,7 +1032,6 @@ static void mirror_dtr(struct dm_target *ti) del_timer_sync(&ms->timer); flush_workqueue(ms->kmirrord_wq); - flush_scheduled_work(); dm_kcopyd_client_destroy(ms->kcopyd_client); destroy_workqueue(ms->kmirrord_wq); free_context(ms, ti, ms->nr_mirrors); diff --git a/trunk/drivers/md/dm-stripe.c b/trunk/drivers/md/dm-stripe.c index 9e4ef88d421e..a2d068dbe9e2 100644 --- a/trunk/drivers/md/dm-stripe.c +++ b/trunk/drivers/md/dm-stripe.c @@ -320,10 +320,8 @@ int __init dm_stripe_init(void) int r; r = dm_register_target(&stripe_target); - if (r < 0) { + if (r < 0) DMWARN("target registration failed"); - return r; - } kstriped = create_singlethread_workqueue("kstriped"); if (!kstriped) { diff --git a/trunk/drivers/md/dm.c b/trunk/drivers/md/dm.c index c99e4728ff41..6963ad148408 100644 --- a/trunk/drivers/md/dm.c +++ b/trunk/drivers/md/dm.c @@ -375,7 +375,7 @@ static void start_io_acct(struct dm_io *io) dm_disk(md)->part0.in_flight = atomic_inc_return(&md->pending); } -static void end_io_acct(struct dm_io *io) +static int end_io_acct(struct dm_io *io) { struct mapped_device *md = io->md; struct bio *bio = io->bio; @@ -391,9 +391,7 @@ static void end_io_acct(struct dm_io *io) dm_disk(md)->part0.in_flight = pending = atomic_dec_return(&md->pending); - /* nudge anyone waiting on suspend queue */ - if (!pending) - wake_up(&md->wait); + return !pending; } /* @@ -501,7 +499,9 @@ static void dec_pending(struct dm_io *io, int error) spin_unlock_irqrestore(&io->md->pushback_lock, flags); } - end_io_acct(io); + if (end_io_acct(io)) + /* nudge anyone waiting on suspend queue */ + wake_up(&io->md->wait); if (io->error != DM_ENDIO_REQUEUE) { blk_add_trace_bio(io->md->queue, io->bio, @@ -937,24 +937,16 @@ static void dm_unplug_all(struct request_queue *q) static int dm_any_congested(void *congested_data, int bdi_bits) { - int r = bdi_bits; - struct mapped_device *md = congested_data; - struct dm_table *map; - - atomic_inc(&md->pending); - - if (!test_bit(DMF_BLOCK_IO, &md->flags)) { - map = dm_get_table(md); - if (map) { - r = dm_table_any_congested(map, bdi_bits); - dm_table_put(map); - } - } + int r; + struct mapped_device *md = (struct mapped_device *) congested_data; + struct dm_table *map = dm_get_table(md); - if (!atomic_dec_return(&md->pending)) - /* nudge anyone waiting on suspend queue */ - wake_up(&md->wait); + if (!map || test_bit(DMF_BLOCK_IO, &md->flags)) + r = bdi_bits; + else + r = dm_table_any_congested(map, bdi_bits); + dm_table_put(map); return r; } diff --git a/trunk/drivers/media/video/tvaudio.c b/trunk/drivers/media/video/tvaudio.c index 3720f0e03a16..b59e47272abf 100644 --- a/trunk/drivers/media/video/tvaudio.c +++ b/trunk/drivers/media/video/tvaudio.c @@ -1,5 +1,5 @@ /* - * Driver for simple i2c audio chips. + * experimental driver for simple i2c audio chips. * * Copyright (c) 2000 Gerd Knorr * based on code by: @@ -7,10 +7,6 @@ * Steve VanDeBogart (vandebo@uclink.berkeley.edu) * Greg Alexander (galexand@acm.org) * - * Copyright(c) 2005-2008 Mauro Carvalho Chehab - * - Some cleanups, code fixes, etc - * - Convert it to V4L2 API - * * This code is placed under the terms of the GNU General Public License * * OPTIONS: @@ -34,7 +30,6 @@ #include #include -#include #include #include @@ -63,6 +58,7 @@ typedef int (*checkit)(struct CHIPSTATE*); typedef int (*initialize)(struct CHIPSTATE*); typedef int (*getmode)(struct CHIPSTATE*); typedef void (*setmode)(struct CHIPSTATE*, int mode); +typedef void (*checkmode)(struct CHIPSTATE*); /* i2c command */ typedef struct AUDIOCMD { @@ -83,7 +79,6 @@ struct CHIPDESC { #define CHIP_HAS_VOLUME 1 #define CHIP_HAS_BASSTREBLE 2 #define CHIP_HAS_INPUTSEL 4 -#define CHIP_NEED_CHECKMODE 8 /* various i2c command sequences */ audiocmd init; @@ -101,20 +96,23 @@ struct CHIPDESC { getmode getmode; setmode setmode; + /* check / autoswitch audio after channel switches */ + checkmode checkmode; + /* input switch register + values for v4l inputs */ int inputreg; int inputmap[4]; int inputmute; int inputmask; }; +static struct CHIPDESC chiplist[]; /* current state of the chip */ struct CHIPSTATE { struct i2c_client *c; - /* chip-specific description - should point to - an entry at CHIPDESC table */ - struct CHIPDESC *desc; + /* index into CHIPDESC array */ + int type; /* shadow register set */ audiocmd shadow; @@ -154,7 +152,7 @@ static int chip_write(struct CHIPSTATE *chip, int subaddr, int val) { unsigned char buffer[2]; - if (subaddr < 0) { + if (-1 == subaddr) { v4l_dbg(1, debug, chip->c, "%s: chip_write: 0x%x\n", chip->c->name, val); chip->shadow.bytes[1] = val; @@ -165,13 +163,6 @@ static int chip_write(struct CHIPSTATE *chip, int subaddr, int val) return -1; } } else { - if (subaddr + 1 >= ARRAY_SIZE(chip->shadow.bytes)) { - v4l_info(chip->c, - "Tried to access a non-existent register: %d\n", - subaddr); - return -EINVAL; - } - v4l_dbg(1, debug, chip->c, "%s: chip_write: reg%d=0x%x\n", chip->c->name, subaddr, val); chip->shadow.bytes[subaddr+1] = val; @@ -186,20 +177,12 @@ static int chip_write(struct CHIPSTATE *chip, int subaddr, int val) return 0; } -static int chip_write_masked(struct CHIPSTATE *chip, - int subaddr, int val, int mask) +static int chip_write_masked(struct CHIPSTATE *chip, int subaddr, int val, int mask) { if (mask != 0) { - if (subaddr < 0) { + if (-1 == subaddr) { val = (chip->shadow.bytes[1] & ~mask) | (val & mask); } else { - if (subaddr + 1 >= ARRAY_SIZE(chip->shadow.bytes)) { - v4l_info(chip->c, - "Tried to access a non-existent register: %d\n", - subaddr); - return -EINVAL; - } - val = (chip->shadow.bytes[subaddr+1] & ~mask) | (val & mask); } } @@ -245,15 +228,6 @@ static int chip_cmd(struct CHIPSTATE *chip, char *name, audiocmd *cmd) if (0 == cmd->count) return 0; - if (cmd->count + cmd->bytes[0] - 1 >= ARRAY_SIZE(chip->shadow.bytes)) { - v4l_info(chip->c, - "Tried to access a non-existent register range: %d to %d\n", - cmd->bytes[0] + 1, cmd->bytes[0] + cmd->count - 1); - return -EINVAL; - } - - /* FIXME: it seems that the shadow bytes are wrong bellow !*/ - /* update our shadow register set; print bytes if (debug > 0) */ v4l_dbg(1, debug, chip->c, "%s: chip_cmd(%s): reg=%d, data:", chip->c->name, name,cmd->bytes[0]); @@ -289,8 +263,7 @@ static void chip_thread_wake(unsigned long data) static int chip_thread(void *data) { struct CHIPSTATE *chip = data; - struct CHIPDESC *desc = chip->desc; - int mode; + struct CHIPDESC *desc = chiplist + chip->type; v4l_dbg(1, debug, chip->c, "%s: thread started\n", chip->c->name); set_freezable(); @@ -309,26 +282,7 @@ static int chip_thread(void *data) continue; /* have a look what's going on */ - mode = desc->getmode(chip); - if (mode == chip->prevmode) - continue; - - /* chip detected a new audio mode - set it */ - v4l_dbg(1, debug, chip->c, "%s: thread checkmode\n", - chip->c->name); - - chip->prevmode = mode; - - if (mode & V4L2_TUNER_MODE_STEREO) - desc->setmode(chip, V4L2_TUNER_MODE_STEREO); - if (mode & V4L2_TUNER_MODE_LANG1_LANG2) - desc->setmode(chip, V4L2_TUNER_MODE_STEREO); - else if (mode & V4L2_TUNER_MODE_LANG1) - desc->setmode(chip, V4L2_TUNER_MODE_LANG1); - else if (mode & V4L2_TUNER_MODE_LANG2) - desc->setmode(chip, V4L2_TUNER_MODE_LANG2); - else - desc->setmode(chip, V4L2_TUNER_MODE_MONO); + desc->checkmode(chip); /* schedule next check */ mod_timer(&chip->wt, jiffies+msecs_to_jiffies(2000)); @@ -338,6 +292,29 @@ static int chip_thread(void *data) return 0; } +static void generic_checkmode(struct CHIPSTATE *chip) +{ + struct CHIPDESC *desc = chiplist + chip->type; + int mode = desc->getmode(chip); + + if (mode == chip->prevmode) + return; + + v4l_dbg(1, debug, chip->c, "%s: thread checkmode\n", chip->c->name); + chip->prevmode = mode; + + if (mode & V4L2_TUNER_MODE_STEREO) + desc->setmode(chip,V4L2_TUNER_MODE_STEREO); + if (mode & V4L2_TUNER_MODE_LANG1_LANG2) + desc->setmode(chip,V4L2_TUNER_MODE_STEREO); + else if (mode & V4L2_TUNER_MODE_LANG1) + desc->setmode(chip,V4L2_TUNER_MODE_LANG1); + else if (mode & V4L2_TUNER_MODE_LANG2) + desc->setmode(chip,V4L2_TUNER_MODE_LANG2); + else + desc->setmode(chip,V4L2_TUNER_MODE_MONO); +} + /* ---------------------------------------------------------------------- */ /* audio chip descriptions - defines+functions for tda9840 */ @@ -800,7 +777,7 @@ static struct tda9874a_MODES { char *name; audiocmd cmd; } tda9874a_modelist[9] = { - { "A2, B/G", /* default */ + { "A2, B/G", { 9, { TDA9874A_C1FRA, 0x72,0x95,0x55, 0x77,0xA0,0x00, 0x00,0x00 }} }, { "A2, M (Korea)", { 9, { TDA9874A_C1FRA, 0x5D,0xC0,0x00, 0x62,0x6A,0xAA, 0x20,0x22 }} }, @@ -814,7 +791,7 @@ static struct tda9874a_MODES { { 9, { TDA9874A_C1FRA, 0x7D,0x00,0x00, 0x88,0x8A,0xAA, 0x08,0x33 }} }, { "NICAM, B/G", { 9, { TDA9874A_C1FRA, 0x72,0x95,0x55, 0x79,0xEA,0xAA, 0x08,0x33 }} }, - { "NICAM, D/K", + { "NICAM, D/K", /* default */ { 9, { TDA9874A_C1FRA, 0x87,0x6A,0xAA, 0x79,0xEA,0xAA, 0x08,0x33 }} }, { "NICAM, L", { 9, { TDA9874A_C1FRA, 0x87,0x6A,0xAA, 0x79,0xEA,0xAA, 0x09,0x33 }} } @@ -1004,7 +981,7 @@ static int tda9874a_initialize(struct CHIPSTATE *chip) { if (tda9874a_SIF > 2) tda9874a_SIF = 1; - if (tda9874a_STD >= ARRAY_SIZE(tda9874a_modelist)) + if (tda9874a_STD > 8) tda9874a_STD = 0; if(tda9874a_AMSEL > 1) tda9874a_AMSEL = 0; @@ -1112,7 +1089,7 @@ static int tda8425_shift12(int val) { return (val >> 12) | 0xf0; } static int tda8425_initialize(struct CHIPSTATE *chip) { - struct CHIPDESC *desc = chip->desc; + struct CHIPDESC *desc = chiplist + chip->type; int inputmap[4] = { /* tuner */ TDA8425_S1_CH2, /* radio */ TDA8425_S1_CH1, /* extern */ TDA8425_S1_CH1, /* intern */ TDA8425_S1_OFF}; @@ -1282,28 +1259,27 @@ static struct CHIPDESC chiplist[] = { .addr_lo = I2C_ADDR_TDA9840 >> 1, .addr_hi = I2C_ADDR_TDA9840 >> 1, .registers = 5, - .flags = CHIP_NEED_CHECKMODE, - /* callbacks */ .checkit = tda9840_checkit, .getmode = tda9840_getmode, .setmode = tda9840_setmode, + .checkmode = generic_checkmode, .init = { 2, { TDA9840_TEST, TDA9840_TEST_INT1SN /* ,TDA9840_SW, TDA9840_MONO */} } }, { .name = "tda9873h", + .checkit = tda9873_checkit, .insmodopt = &tda9873, .addr_lo = I2C_ADDR_TDA985x_L >> 1, .addr_hi = I2C_ADDR_TDA985x_H >> 1, .registers = 3, - .flags = CHIP_HAS_INPUTSEL | CHIP_NEED_CHECKMODE, + .flags = CHIP_HAS_INPUTSEL, - /* callbacks */ - .checkit = tda9873_checkit, .getmode = tda9873_getmode, .setmode = tda9873_setmode, + .checkmode = generic_checkmode, .init = { 4, { TDA9873_SW, 0xa4, 0x06, 0x03 } }, .inputreg = TDA9873_SW, @@ -1314,16 +1290,15 @@ static struct CHIPDESC chiplist[] = { }, { .name = "tda9874h/a", + .checkit = tda9874a_checkit, + .initialize = tda9874a_initialize, .insmodopt = &tda9874a, .addr_lo = I2C_ADDR_TDA9874 >> 1, .addr_hi = I2C_ADDR_TDA9874 >> 1, - .flags = CHIP_NEED_CHECKMODE, - /* callbacks */ - .initialize = tda9874a_initialize, - .checkit = tda9874a_checkit, .getmode = tda9874a_getmode, .setmode = tda9874a_setmode, + .checkmode = generic_checkmode, }, { .name = "tda9850", @@ -1349,11 +1324,10 @@ static struct CHIPDESC chiplist[] = { .rightreg = TDA9855_VR, .bassreg = TDA9855_BA, .treblereg = TDA9855_TR, - - /* callbacks */ .volfunc = tda9855_volume, .bassfunc = tda9855_bass, .treblefunc = tda9855_treble, + .getmode = tda985x_getmode, .setmode = tda985x_setmode, @@ -1374,8 +1348,6 @@ static struct CHIPDESC chiplist[] = { .rightreg = TEA6300_VL, .bassreg = TEA6300_BA, .treblereg = TEA6300_TR, - - /* callbacks */ .volfunc = tea6300_shift10, .bassfunc = tea6300_shift12, .treblefunc = tea6300_shift12, @@ -1386,6 +1358,7 @@ static struct CHIPDESC chiplist[] = { }, { .name = "tea6320", + .initialize = tea6320_initialize, .insmodopt = &tea6320, .addr_lo = I2C_ADDR_TEA6300 >> 1, .addr_hi = I2C_ADDR_TEA6300 >> 1, @@ -1396,9 +1369,6 @@ static struct CHIPDESC chiplist[] = { .rightreg = TEA6320_V, .bassreg = TEA6320_BA, .treblereg = TEA6320_TR, - - /* callbacks */ - .initialize = tea6320_initialize, .volfunc = tea6320_volume, .bassfunc = tea6320_shift11, .treblefunc = tea6320_shift11, @@ -1431,18 +1401,16 @@ static struct CHIPDESC chiplist[] = { .rightreg = TDA8425_VR, .bassreg = TDA8425_BA, .treblereg = TDA8425_TR, - - /* callbacks */ - .initialize = tda8425_initialize, .volfunc = tda8425_shift10, .bassfunc = tda8425_shift12, .treblefunc = tda8425_shift12, - .setmode = tda8425_setmode, .inputreg = TDA8425_S1, .inputmap = { TDA8425_S1_CH1, TDA8425_S1_CH1, TDA8425_S1_CH1 }, .inputmute = TDA8425_S1_OFF, + .setmode = tda8425_setmode, + .initialize = tda8425_initialize, }, { .name = "pic16c54 (PV951)", @@ -1466,11 +1434,10 @@ static struct CHIPDESC chiplist[] = { .addr_lo = I2C_ADDR_TDA9840 >> 1, .addr_hi = I2C_ADDR_TDA9840 >> 1, .registers = 2, - .flags = CHIP_NEED_CHECKMODE, - /* callbacks */ .getmode = ta8874z_getmode, .setmode = ta8874z_setmode, + .checkmode = generic_checkmode, .init = {2, { TA8874Z_MONO_SET, TA8874Z_SEPARATION_DEFAULT}}, }, @@ -1514,7 +1481,6 @@ static int chip_probe(struct i2c_client *client, const struct i2c_device_id *id) } if (desc->name == NULL) { v4l_dbg(1, debug, client, "no matching chip description found\n"); - kfree(chip); return -EIO; } v4l_info(client, "%s found @ 0x%x (%s)\n", desc->name, client->addr<<1, client->adapter->name); @@ -1528,7 +1494,7 @@ static int chip_probe(struct i2c_client *client, const struct i2c_device_id *id) /* fill required data structures */ if (!id) strlcpy(client->name, desc->name, I2C_NAME_SIZE); - chip->desc = desc; + chip->type = desc-chiplist; chip->shadow.count = desc->registers+1; chip->prevmode = -1; chip->audmode = V4L2_TUNER_MODE_LANG1; @@ -1540,49 +1506,20 @@ static int chip_probe(struct i2c_client *client, const struct i2c_device_id *id) chip_cmd(chip,"init",&desc->init); if (desc->flags & CHIP_HAS_VOLUME) { - if (!desc->volfunc) { - /* This shouldn't be happen. Warn user, but keep working - without volume controls - */ - v4l_info(chip->c, "volume callback undefined!\n"); - desc->flags &= ~CHIP_HAS_VOLUME; - } else { - chip->left = desc->leftinit ? desc->leftinit : 65535; - chip->right = desc->rightinit ? desc->rightinit : 65535; - chip_write(chip, desc->leftreg, - desc->volfunc(chip->left)); - chip_write(chip, desc->rightreg, - desc->volfunc(chip->right)); - } + chip->left = desc->leftinit ? desc->leftinit : 65535; + chip->right = desc->rightinit ? desc->rightinit : 65535; + chip_write(chip,desc->leftreg,desc->volfunc(chip->left)); + chip_write(chip,desc->rightreg,desc->volfunc(chip->right)); } if (desc->flags & CHIP_HAS_BASSTREBLE) { - if (!desc->bassfunc || !desc->treblefunc) { - /* This shouldn't be happen. Warn user, but keep working - without bass/treble controls - */ - v4l_info(chip->c, "bass/treble callbacks undefined!\n"); - desc->flags &= ~CHIP_HAS_BASSTREBLE; - } else { - chip->treble = desc->trebleinit ? - desc->trebleinit : 32768; - chip->bass = desc->bassinit ? - desc->bassinit : 32768; - chip_write(chip, desc->bassreg, - desc->bassfunc(chip->bass)); - chip_write(chip, desc->treblereg, - desc->treblefunc(chip->treble)); - } + chip->treble = desc->trebleinit ? desc->trebleinit : 32768; + chip->bass = desc->bassinit ? desc->bassinit : 32768; + chip_write(chip,desc->bassreg,desc->bassfunc(chip->bass)); + chip_write(chip,desc->treblereg,desc->treblefunc(chip->treble)); } chip->thread = NULL; - if (desc->flags & CHIP_NEED_CHECKMODE) { - if (!desc->getmode || !desc->setmode) { - /* This shouldn't be happen. Warn user, but keep working - without kthread - */ - v4l_info(chip->c, "set/get mode callbacks undefined!\n"); - return 0; - } + if (desc->checkmode) { /* start async thread */ init_timer(&chip->wt); chip->wt.function = chip_thread_wake; @@ -1615,7 +1552,7 @@ static int chip_remove(struct i2c_client *client) static int tvaudio_get_ctrl(struct CHIPSTATE *chip, struct v4l2_control *ctrl) { - struct CHIPDESC *desc = chip->desc; + struct CHIPDESC *desc = chiplist + chip->type; switch (ctrl->id) { case V4L2_CID_AUDIO_MUTE: @@ -1639,13 +1576,13 @@ static int tvaudio_get_ctrl(struct CHIPSTATE *chip, return 0; } case V4L2_CID_AUDIO_BASS: - if (!(desc->flags & CHIP_HAS_BASSTREBLE)) + if (desc->flags & CHIP_HAS_BASSTREBLE) break; ctrl->value = chip->bass; return 0; case V4L2_CID_AUDIO_TREBLE: - if (!(desc->flags & CHIP_HAS_BASSTREBLE)) - break; + if (desc->flags & CHIP_HAS_BASSTREBLE) + return -EINVAL; ctrl->value = chip->treble; return 0; } @@ -1655,7 +1592,7 @@ static int tvaudio_get_ctrl(struct CHIPSTATE *chip, static int tvaudio_set_ctrl(struct CHIPSTATE *chip, struct v4l2_control *ctrl) { - struct CHIPDESC *desc = chip->desc; + struct CHIPDESC *desc = chiplist + chip->type; switch (ctrl->id) { case V4L2_CID_AUDIO_MUTE: @@ -1705,15 +1642,16 @@ static int tvaudio_set_ctrl(struct CHIPSTATE *chip, return 0; } case V4L2_CID_AUDIO_BASS: - if (!(desc->flags & CHIP_HAS_BASSTREBLE)) + if (desc->flags & CHIP_HAS_BASSTREBLE) break; chip->bass = ctrl->value; chip_write(chip,desc->bassreg,desc->bassfunc(chip->bass)); return 0; case V4L2_CID_AUDIO_TREBLE: - if (!(desc->flags & CHIP_HAS_BASSTREBLE)) - break; + if (desc->flags & CHIP_HAS_BASSTREBLE) + return -EINVAL; + chip->treble = ctrl->value; chip_write(chip,desc->treblereg,desc->treblefunc(chip->treble)); @@ -1730,12 +1668,9 @@ static int chip_command(struct i2c_client *client, unsigned int cmd, void *arg) { struct CHIPSTATE *chip = i2c_get_clientdata(client); - struct CHIPDESC *desc = chip->desc; + struct CHIPDESC *desc = chiplist + chip->type; - if (debug > 0) { - v4l_i2c_print_ioctl(chip->c, cmd); - printk("\n"); - } + v4l_dbg(1, debug, chip->c, "%s: chip_command 0x%x\n", chip->c->name, cmd); switch (cmd) { case AUDC_SET_RADIO: @@ -1760,7 +1695,7 @@ static int chip_command(struct i2c_client *client, break; case V4L2_CID_AUDIO_BASS: case V4L2_CID_AUDIO_TREBLE: - if (!(desc->flags & CHIP_HAS_BASSTREBLE)) + if (desc->flags & CHIP_HAS_BASSTREBLE) return -EINVAL; break; default: @@ -1857,20 +1792,12 @@ static int chip_command(struct i2c_client *client, break; case VIDIOC_S_FREQUENCY: chip->mode = 0; /* automatic */ - - /* For chips that provide getmode and setmode, and doesn't - automatically follows the stereo carrier, a kthread is - created to set the audio standard. In this case, when then - the video channel is changed, tvaudio starts on MONO mode. - After waiting for 2 seconds, the kernel thread is called, - to follow whatever audio standard is pointed by the - audio carrier. - */ - if (chip->thread) { + if (desc->checkmode && desc->setmode) { desc->setmode(chip,V4L2_TUNER_MODE_MONO); if (chip->prevmode != V4L2_TUNER_MODE_MONO) chip->prevmode = -1; /* reset previous mode */ mod_timer(&chip->wt, jiffies+msecs_to_jiffies(2000)); + /* the thread will call checkmode() later */ } break; @@ -1909,3 +1836,9 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .legacy_probe = chip_legacy_probe, .id_table = chip_id, }; + +/* + * Local variables: + * c-basic-offset: 8 + * End: + */ diff --git a/trunk/drivers/misc/c2port/core.c b/trunk/drivers/misc/c2port/core.c index 0207dd59090d..976b35d1d035 100644 --- a/trunk/drivers/misc/c2port/core.c +++ b/trunk/drivers/misc/c2port/core.c @@ -18,7 +18,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/mtd/maps/cdb89712.c b/trunk/drivers/mtd/maps/cdb89712.c index 8d92d8db9a98..e5059aa3c724 100644 --- a/trunk/drivers/mtd/maps/cdb89712.c +++ b/trunk/drivers/mtd/maps/cdb89712.c @@ -14,18 +14,7 @@ #include #include -/* dynamic ioremap() areas */ -#define FLASH_START 0x00000000 -#define FLASH_SIZE 0x800000 -#define FLASH_WIDTH 4 - -#define SRAM_START 0x60000000 -#define SRAM_SIZE 0xc000 -#define SRAM_WIDTH 4 - -#define BOOTROM_START 0x70000000 -#define BOOTROM_SIZE 0x80 -#define BOOTROM_WIDTH 4 + static struct mtd_info *flash_mtd; diff --git a/trunk/drivers/mtd/maps/h720x-flash.c b/trunk/drivers/mtd/maps/h720x-flash.c index 3b959fad1c4e..35fef655ccc4 100644 --- a/trunk/drivers/mtd/maps/h720x-flash.c +++ b/trunk/drivers/mtd/maps/h720x-flash.c @@ -24,8 +24,8 @@ static struct mtd_info *mymtd; static struct map_info h720x_map = { .name = "H720X", .bankwidth = 4, - .size = H720X_FLASH_SIZE, - .phys = H720X_FLASH_PHYS, + .size = FLASH_SIZE, + .phys = FLASH_PHYS, }; static struct mtd_partition h720x_partitions[] = { @@ -70,7 +70,7 @@ int __init h720x_mtd_init(void) char *part_type = NULL; - h720x_map.virt = ioremap(h720x_map.phys, h720x_map.size); + h720x_map.virt = ioremap(FLASH_PHYS, FLASH_SIZE); if (!h720x_map.virt) { printk(KERN_ERR "H720x-MTD: ioremap failed\n"); diff --git a/trunk/drivers/net/usb/asix.c b/trunk/drivers/net/usb/asix.c index e12cdb4543b4..37ecf845edfe 100644 --- a/trunk/drivers/net/usb/asix.c +++ b/trunk/drivers/net/usb/asix.c @@ -1444,10 +1444,6 @@ static const struct usb_device_id products [] = { // Apple USB Ethernet Adapter USB_DEVICE(0x05ac, 0x1402), .driver_info = (unsigned long) &ax88772_info, -}, { - // Cables-to-Go USB Ethernet Adapter - USB_DEVICE(0x0b95, 0x772a), - .driver_info = (unsigned long) &ax88772_info, }, { }, // END }; diff --git a/trunk/drivers/pci/pci-acpi.c b/trunk/drivers/pci/pci-acpi.c index ae5ec76dca77..b3a63edb6901 100644 --- a/trunk/drivers/pci/pci-acpi.c +++ b/trunk/drivers/pci/pci-acpi.c @@ -63,7 +63,7 @@ static acpi_status acpi_run_osc(acpi_handle handle, union acpi_object in_params[4]; struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL}; union acpi_object *out_obj; - u32 errors, flags = osc_args->capbuf[OSC_QUERY_TYPE]; + u32 osc_dw0, flags = osc_args->capbuf[OSC_QUERY_TYPE]; /* Setting up input parameters */ input.count = 4; @@ -92,16 +92,15 @@ static acpi_status acpi_run_osc(acpi_handle handle, status = AE_TYPE; goto out_kfree; } - /* Need to ignore the bit0 in result code */ - errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0); - if (errors) { - if (errors & OSC_REQUEST_ERROR) + osc_dw0 = *((u32 *)out_obj->buffer.pointer); + if (osc_dw0) { + if (osc_dw0 & OSC_REQUEST_ERROR) printk(KERN_DEBUG "_OSC request fails\n"); - if (errors & OSC_INVALID_UUID_ERROR) + if (osc_dw0 & OSC_INVALID_UUID_ERROR) printk(KERN_DEBUG "_OSC invalid UUID\n"); - if (errors & OSC_INVALID_REVISION_ERROR) + if (osc_dw0 & OSC_INVALID_REVISION_ERROR) printk(KERN_DEBUG "_OSC invalid revision\n"); - if (errors & OSC_CAPABILITIES_MASK_ERROR) { + if (osc_dw0 & OSC_CAPABILITIES_MASK_ERROR) { if (flags & OSC_QUERY_ENABLE) goto out_success; printk(KERN_DEBUG "_OSC FW not grant req. control\n"); diff --git a/trunk/drivers/pcmcia/cistpl.c b/trunk/drivers/pcmcia/cistpl.c index 4a110b7b2673..dcce9f5d8465 100644 --- a/trunk/drivers/pcmcia/cistpl.c +++ b/trunk/drivers/pcmcia/cistpl.c @@ -351,11 +351,10 @@ int verify_cis_cache(struct pcmcia_socket *s) char *buf; buf = kmalloc(256, GFP_KERNEL); - if (buf == NULL) { + if (buf == NULL) dev_printk(KERN_WARNING, &s->dev, "no memory for verifying CIS\n"); return -ENOMEM; - } list_for_each_entry(cis, &s->cis_cache, node) { int len = cis->len; diff --git a/trunk/drivers/pcmcia/cs.c b/trunk/drivers/pcmcia/cs.c index 0660ad182589..c68c5d338285 100644 --- a/trunk/drivers/pcmcia/cs.c +++ b/trunk/drivers/pcmcia/cs.c @@ -186,6 +186,12 @@ int pcmcia_register_socket(struct pcmcia_socket *socket) spin_lock_init(&socket->lock); + if (socket->resource_ops->init) { + ret = socket->resource_ops->init(socket); + if (ret) + return (ret); + } + /* try to obtain a socket number [yes, it gets ugly if we * register more than 2^sizeof(unsigned int) pcmcia * sockets... but the socket number is deprecated @@ -220,7 +226,7 @@ int pcmcia_register_socket(struct pcmcia_socket *socket) /* set proper values in socket->dev */ dev_set_drvdata(&socket->dev, socket); socket->dev.class = &pcmcia_socket_class; - dev_set_name(&socket->dev, "pcmcia_socket%u", socket->sock); + snprintf(socket->dev.bus_id, BUS_ID_SIZE, "pcmcia_socket%u", socket->sock); /* base address = 0, map = 0 */ socket->cis_mem.flags = 0; @@ -233,12 +239,6 @@ int pcmcia_register_socket(struct pcmcia_socket *socket) mutex_init(&socket->skt_mutex); spin_lock_init(&socket->thread_lock); - if (socket->resource_ops->init) { - ret = socket->resource_ops->init(socket); - if (ret) - goto err; - } - tsk = kthread_run(pccardd, socket, "pccardd"); if (IS_ERR(tsk)) { ret = PTR_ERR(tsk); diff --git a/trunk/drivers/pcmcia/ds.c b/trunk/drivers/pcmcia/ds.c index 47cab31ff6e4..795660255490 100644 --- a/trunk/drivers/pcmcia/ds.c +++ b/trunk/drivers/pcmcia/ds.c @@ -622,6 +622,7 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f { struct pcmcia_device *p_dev, *tmp_dev; unsigned long flags; + int bus_id_len; s = pcmcia_get_socket(s); if (!s) @@ -649,12 +650,12 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f /* by default don't allow DMA */ p_dev->dma_mask = DMA_MASK_NONE; p_dev->dev.dma_mask = &p_dev->dma_mask; - dev_set_name(&p_dev->dev, "%d.%d", p_dev->socket->sock, p_dev->device_no); - if (!dev_name(&p_dev->dev)) - goto err_free; - p_dev->devname = kasprintf(GFP_KERNEL, "pcmcia%s", dev_name(&p_dev->dev)); + bus_id_len = sprintf (p_dev->dev.bus_id, "%d.%d", p_dev->socket->sock, p_dev->device_no); + + p_dev->devname = kmalloc(6 + bus_id_len + 1, GFP_KERNEL); if (!p_dev->devname) goto err_free; + sprintf (p_dev->devname, "pcmcia%s", p_dev->dev.bus_id); ds_dev_dbg(3, &p_dev->dev, "devname is %s\n", p_dev->devname); spin_lock_irqsave(&pcmcia_dev_list_lock, flags); @@ -667,8 +668,6 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f list_for_each_entry(tmp_dev, &s->devices_list, socket_device_list) if (p_dev->func == tmp_dev->func) { p_dev->function_config = tmp_dev->function_config; - p_dev->io = tmp_dev->io; - p_dev->irq = tmp_dev->irq; kref_get(&p_dev->function_config->ref); } diff --git a/trunk/drivers/pcmcia/pcmcia_resource.c b/trunk/drivers/pcmcia/pcmcia_resource.c index f5d0ba8e22d5..76d4a98f0955 100644 --- a/trunk/drivers/pcmcia/pcmcia_resource.c +++ b/trunk/drivers/pcmcia/pcmcia_resource.c @@ -302,10 +302,9 @@ int pcmcia_modify_configuration(struct pcmcia_device *p_dev, /* We only allow changing Vpp1 and Vpp2 to the same value */ if ((mod->Attributes & CONF_VPP1_CHANGE_VALID) && (mod->Attributes & CONF_VPP2_CHANGE_VALID)) { - if (mod->Vpp1 != mod->Vpp2) { + if (mod->Vpp1 != mod->Vpp2) ds_dbg(s, 0, "Vpp1 and Vpp2 must be the same\n"); return -EINVAL; - } s->socket.Vpp = mod->Vpp1; if (s->ops->set_socket(s, &s->socket)) { dev_printk(KERN_WARNING, &s->dev, diff --git a/trunk/drivers/pcmcia/rsrc_nonstatic.c b/trunk/drivers/pcmcia/rsrc_nonstatic.c index 9ca22c7aafb2..17f4ecf1c0c5 100644 --- a/trunk/drivers/pcmcia/rsrc_nonstatic.c +++ b/trunk/drivers/pcmcia/rsrc_nonstatic.c @@ -71,7 +71,7 @@ static DEFINE_MUTEX(rsrc_mutex); ======================================================================*/ static struct resource * -make_resource(resource_size_t b, resource_size_t n, int flags, const char *name) +make_resource(resource_size_t b, resource_size_t n, int flags, char *name) { struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL); @@ -624,7 +624,7 @@ static int nonstatic_adjust_io_region(struct resource *res, unsigned long r_star static struct resource *nonstatic_find_io_region(unsigned long base, int num, unsigned long align, struct pcmcia_socket *s) { - struct resource *res = make_resource(0, num, IORESOURCE_IO, dev_name(&s->dev)); + struct resource *res = make_resource(0, num, IORESOURCE_IO, s->dev.bus_id); struct socket_data *s_data = s->resource_data; struct pcmcia_align_data data; unsigned long min = base; @@ -658,7 +658,7 @@ static struct resource *nonstatic_find_io_region(unsigned long base, int num, static struct resource * nonstatic_find_mem_region(u_long base, u_long num, u_long align, int low, struct pcmcia_socket *s) { - struct resource *res = make_resource(0, num, IORESOURCE_MEM, dev_name(&s->dev)); + struct resource *res = make_resource(0, num, IORESOURCE_MEM, s->dev.bus_id); struct socket_data *s_data = s->resource_data; struct pcmcia_align_data data; unsigned long min, max; diff --git a/trunk/drivers/s390/block/dasd.c b/trunk/drivers/s390/block/dasd.c index 363bd1303d21..4b76fca64a6f 100644 --- a/trunk/drivers/s390/block/dasd.c +++ b/trunk/drivers/s390/block/dasd.c @@ -1746,11 +1746,6 @@ static void __dasd_process_block_ccw_queue(struct dasd_block *block, goto restart; } - /* log sense for fatal error */ - if (cqr->status == DASD_CQR_FAILED) { - dasd_log_sense(cqr, &cqr->irb); - } - /* First of all call extended error reporting. */ if (dasd_eer_enabled(base) && cqr->status == DASD_CQR_FAILED) { diff --git a/trunk/drivers/s390/char/sclp_cmd.c b/trunk/drivers/s390/char/sclp_cmd.c index ec9c0bcf66ee..eb5f1b8bc57f 100644 --- a/trunk/drivers/s390/char/sclp_cmd.c +++ b/trunk/drivers/s390/char/sclp_cmd.c @@ -324,9 +324,6 @@ static int do_assign_storage(sclp_cmdw_t cmd, u16 rn) case 0x0120: break; default: - pr_warning("assign storage failed (cmd=0x%08x, " - "response=0x%04x, rn=0x%04x)\n", cmd, - sccb->header.response_code, rn); rc = -EIO; break; } diff --git a/trunk/drivers/s390/cio/device.c b/trunk/drivers/s390/cio/device.c index 4e4008325e28..4e78c82194b4 100644 --- a/trunk/drivers/s390/cio/device.c +++ b/trunk/drivers/s390/cio/device.c @@ -874,15 +874,11 @@ void ccw_device_move_to_orphanage(struct work_struct *work) replacing_cdev = get_disc_ccwdev_by_dev_id(&dev_id, cdev); if (replacing_cdev) { sch_attach_disconnected_device(sch, replacing_cdev); - /* Release reference from get_disc_ccwdev_by_dev_id() */ - put_device(&cdev->dev); return; } replacing_cdev = get_orphaned_ccwdev_by_dev_id(css, &dev_id); if (replacing_cdev) { sch_attach_orphaned_device(sch, replacing_cdev); - /* Release reference from get_orphaned_ccwdev_by_dev_id() */ - put_device(&cdev->dev); return; } sch_create_and_recog_new_device(sch); diff --git a/trunk/drivers/s390/kvm/kvm_virtio.c b/trunk/drivers/s390/kvm/kvm_virtio.c index 3d442444c618..ff4a6931bb8e 100644 --- a/trunk/drivers/s390/kvm/kvm_virtio.c +++ b/trunk/drivers/s390/kvm/kvm_virtio.c @@ -322,13 +322,13 @@ static int __init kvm_devices_init(void) return rc; } - rc = vmem_add_mapping(real_memory_size, PAGE_SIZE); + rc = vmem_add_mapping(PFN_PHYS(max_pfn), PAGE_SIZE); if (rc) { s390_root_dev_unregister(kvm_root); return rc; } - kvm_devices = (void *) real_memory_size; + kvm_devices = (void *) PFN_PHYS(max_pfn); ctl_set_bit(0, 9); register_external_interrupt(0x2603, kvm_extint_handler); diff --git a/trunk/drivers/s390/scsi/zfcp_aux.c b/trunk/drivers/s390/scsi/zfcp_aux.c index 3d4e3e3f3fc0..3b56220fb900 100644 --- a/trunk/drivers/s390/scsi/zfcp_aux.c +++ b/trunk/drivers/s390/scsi/zfcp_aux.c @@ -610,8 +610,7 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn, atomic_set_mask(status | ZFCP_STATUS_COMMON_REMOVE, &port->status); atomic_set(&port->refcount, 0); - dev_set_name(&port->sysfs_device, "0x%016llx", - (unsigned long long)wwpn); + dev_set_name(&port->sysfs_device, "0x%016llx", wwpn); port->sysfs_device.parent = &adapter->ccw_device->dev; port->sysfs_device.release = zfcp_sysfs_port_release; diff --git a/trunk/drivers/s390/scsi/zfcp_ccw.c b/trunk/drivers/s390/scsi/zfcp_ccw.c index 951a8d409d1d..b04038c74786 100644 --- a/trunk/drivers/s390/scsi/zfcp_ccw.c +++ b/trunk/drivers/s390/scsi/zfcp_ccw.c @@ -116,9 +116,7 @@ static int zfcp_ccw_set_online(struct ccw_device *ccw_device) zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85, NULL); zfcp_erp_wait(adapter); - up(&zfcp_data.config_sema); - flush_work(&adapter->scan_work); - return 0; + goto out; out_scsi_register: zfcp_erp_thread_kill(adapter); diff --git a/trunk/drivers/s390/scsi/zfcp_dbf.c b/trunk/drivers/s390/scsi/zfcp_dbf.c index 31012d58cfb7..060f5f2352ec 100644 --- a/trunk/drivers/s390/scsi/zfcp_dbf.c +++ b/trunk/drivers/s390/scsi/zfcp_dbf.c @@ -30,7 +30,7 @@ static void zfcp_dbf_hexdump(debug_info_t *dbf, void *to, int to_len, dump->offset = offset; dump->size = min(from_len - offset, room); memcpy(dump->data, from + offset, dump->size); - debug_event(dbf, level, dump, dump->size + sizeof(*dump)); + debug_event(dbf, level, dump, dump->size); } } @@ -108,7 +108,7 @@ static int zfcp_dbf_view_header(debug_info_t *id, struct debug_view *view, t.tv_sec, t.tv_nsec); zfcp_dbf_out(&p, "cpu", "%02i", entry->id.fields.cpuid); } else { - zfcp_dbf_outd(&p, "", dump->data, dump->size, dump->offset, + zfcp_dbf_outd(&p, NULL, dump->data, dump->size, dump->offset, dump->total_size); if ((dump->offset + dump->size) == dump->total_size) p += sprintf(p, "\n"); @@ -366,7 +366,6 @@ static void zfcp_hba_dbf_view_response(char **p, break; zfcp_dbf_out(p, "scsi_cmnd", "0x%0Lx", r->u.fcp.cmnd); zfcp_dbf_out(p, "scsi_serial", "0x%016Lx", r->u.fcp.serial); - p += sprintf(*p, "\n"); break; case FSF_QTCB_OPEN_PORT_WITH_DID: @@ -466,8 +465,7 @@ static int zfcp_hba_dbf_view_format(debug_info_t *id, struct debug_view *view, else if (strncmp(r->tag, "berr", ZFCP_DBF_TAG_SIZE) == 0) zfcp_hba_dbf_view_berr(&p, &r->u.berr); - if (strncmp(r->tag, "resp", ZFCP_DBF_TAG_SIZE) != 0) - p += sprintf(p, "\n"); + p += sprintf(p, "\n"); return p - out_buf; } @@ -882,7 +880,6 @@ void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req) struct ct_hdr *hdr = sg_virt(ct->req); struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; struct zfcp_san_dbf_record_ct_request *oct = &r->u.ct_req; - int level = 3; unsigned long flags; spin_lock_irqsave(&adapter->san_dbf_lock, flags); @@ -899,10 +896,9 @@ void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req) oct->options = hdr->options; oct->max_res_size = hdr->max_res_size; oct->len = min((int)ct->req->length - (int)sizeof(struct ct_hdr), - ZFCP_DBF_SAN_MAX_PAYLOAD); - debug_event(adapter->san_dbf, level, r, sizeof(*r)); - zfcp_dbf_hexdump(adapter->san_dbf, r, sizeof(*r), level, - (void *)hdr + sizeof(struct ct_hdr), oct->len); + ZFCP_DBF_CT_PAYLOAD); + memcpy(oct->payload, (void *)hdr + sizeof(struct ct_hdr), oct->len); + debug_event(adapter->san_dbf, 3, r, sizeof(*r)); spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); } @@ -918,7 +914,6 @@ void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req) struct ct_hdr *hdr = sg_virt(ct->resp); struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; struct zfcp_san_dbf_record_ct_response *rct = &r->u.ct_resp; - int level = 3; unsigned long flags; spin_lock_irqsave(&adapter->san_dbf_lock, flags); @@ -934,10 +929,9 @@ void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req) rct->expl = hdr->reason_code_expl; rct->vendor_unique = hdr->vendor_unique; rct->len = min((int)ct->resp->length - (int)sizeof(struct ct_hdr), - ZFCP_DBF_SAN_MAX_PAYLOAD); - debug_event(adapter->san_dbf, level, r, sizeof(*r)); - zfcp_dbf_hexdump(adapter->san_dbf, r, sizeof(*r), level, - (void *)hdr + sizeof(struct ct_hdr), rct->len); + ZFCP_DBF_CT_PAYLOAD); + memcpy(rct->payload, (void *)hdr + sizeof(struct ct_hdr), rct->len); + debug_event(adapter->san_dbf, 3, r, sizeof(*r)); spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); } @@ -960,7 +954,7 @@ static void zfcp_san_dbf_event_els(const char *tag, int level, rec->u.els.ls_code = ls_code; debug_event(adapter->san_dbf, level, rec, sizeof(*rec)); zfcp_dbf_hexdump(adapter->san_dbf, rec, sizeof(*rec), level, - buffer, min(buflen, ZFCP_DBF_SAN_MAX_PAYLOAD)); + buffer, min(buflen, ZFCP_DBF_ELS_MAX_PAYLOAD)); spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); } @@ -1014,6 +1008,8 @@ static int zfcp_san_dbf_view_format(debug_info_t *id, struct debug_view *view, char *out_buf, const char *in_buf) { struct zfcp_san_dbf_record *r = (struct zfcp_san_dbf_record *)in_buf; + char *buffer = NULL; + int buflen = 0, total = 0; char *p = out_buf; if (strncmp(r->tag, "dump", ZFCP_DBF_TAG_SIZE) == 0) @@ -1033,6 +1029,9 @@ static int zfcp_san_dbf_view_format(debug_info_t *id, struct debug_view *view, zfcp_dbf_out(&p, "gs_subtype", "0x%02x", ct->gs_subtype); zfcp_dbf_out(&p, "options", "0x%02x", ct->options); zfcp_dbf_out(&p, "max_res_size", "0x%04x", ct->max_res_size); + total = ct->len; + buffer = ct->payload; + buflen = min(total, ZFCP_DBF_CT_PAYLOAD); } else if (strncmp(r->tag, "rctc", ZFCP_DBF_TAG_SIZE) == 0) { struct zfcp_san_dbf_record_ct_response *ct = &r->u.ct_resp; zfcp_dbf_out(&p, "cmd_rsp_code", "0x%04x", ct->cmd_rsp_code); @@ -1040,12 +1039,23 @@ static int zfcp_san_dbf_view_format(debug_info_t *id, struct debug_view *view, zfcp_dbf_out(&p, "reason_code", "0x%02x", ct->reason_code); zfcp_dbf_out(&p, "reason_code_expl", "0x%02x", ct->expl); zfcp_dbf_out(&p, "vendor_unique", "0x%02x", ct->vendor_unique); + total = ct->len; + buffer = ct->payload; + buflen = min(total, ZFCP_DBF_CT_PAYLOAD); } else if (strncmp(r->tag, "oels", ZFCP_DBF_TAG_SIZE) == 0 || strncmp(r->tag, "rels", ZFCP_DBF_TAG_SIZE) == 0 || strncmp(r->tag, "iels", ZFCP_DBF_TAG_SIZE) == 0) { struct zfcp_san_dbf_record_els *els = &r->u.els; zfcp_dbf_out(&p, "ls_code", "0x%02x", els->ls_code); + total = els->len; + buffer = els->payload; + buflen = min(total, ZFCP_DBF_ELS_PAYLOAD); } + + zfcp_dbf_outd(&p, "payload", buffer, buflen, 0, total); + if (buflen == total) + p += sprintf(p, "\n"); + return p - out_buf; } diff --git a/trunk/drivers/s390/scsi/zfcp_dbf.h b/trunk/drivers/s390/scsi/zfcp_dbf.h index 5d6b2dff855b..e8f450801fea 100644 --- a/trunk/drivers/s390/scsi/zfcp_dbf.h +++ b/trunk/drivers/s390/scsi/zfcp_dbf.h @@ -163,6 +163,8 @@ struct zfcp_san_dbf_record_ct_request { u8 options; u16 max_res_size; u32 len; +#define ZFCP_DBF_CT_PAYLOAD 24 + u8 payload[ZFCP_DBF_CT_PAYLOAD]; } __attribute__ ((packed)); struct zfcp_san_dbf_record_ct_response { @@ -172,11 +174,15 @@ struct zfcp_san_dbf_record_ct_response { u8 expl; u8 vendor_unique; u32 len; + u8 payload[ZFCP_DBF_CT_PAYLOAD]; } __attribute__ ((packed)); struct zfcp_san_dbf_record_els { u8 ls_code; u32 len; +#define ZFCP_DBF_ELS_PAYLOAD 32 +#define ZFCP_DBF_ELS_MAX_PAYLOAD 1024 + u8 payload[ZFCP_DBF_ELS_PAYLOAD]; } __attribute__ ((packed)); struct zfcp_san_dbf_record { @@ -190,8 +196,6 @@ struct zfcp_san_dbf_record { struct zfcp_san_dbf_record_ct_response ct_resp; struct zfcp_san_dbf_record_els els; } u; -#define ZFCP_DBF_SAN_MAX_PAYLOAD 1024 - u8 payload[32]; } __attribute__ ((packed)); struct zfcp_scsi_dbf_record { diff --git a/trunk/drivers/s390/scsi/zfcp_erp.c b/trunk/drivers/s390/scsi/zfcp_erp.c index 35364f64da7f..9040f738ff33 100644 --- a/trunk/drivers/s390/scsi/zfcp_erp.c +++ b/trunk/drivers/s390/scsi/zfcp_erp.c @@ -472,7 +472,6 @@ static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act) ZFCP_STATUS_ERP_TIMEDOUT)) { act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; zfcp_rec_dbf_event_action(142, act); - act->fsf_req->erp_action = NULL; } if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) zfcp_rec_dbf_event_action(143, act); diff --git a/trunk/drivers/s390/scsi/zfcp_fsf.c b/trunk/drivers/s390/scsi/zfcp_fsf.c index d024442ee128..5ae1d497e5ed 100644 --- a/trunk/drivers/s390/scsi/zfcp_fsf.c +++ b/trunk/drivers/s390/scsi/zfcp_fsf.c @@ -683,7 +683,6 @@ static struct zfcp_fsf_req *zfcp_fsf_alloc_noqtcb(mempool_t *pool) if (!req) return NULL; memset(req, 0, sizeof(*req)); - req->pool = pool; return req; } @@ -770,24 +769,28 @@ static struct zfcp_fsf_req *zfcp_fsf_req_create(struct zfcp_adapter *adapter, static int zfcp_fsf_req_send(struct zfcp_fsf_req *req) { struct zfcp_adapter *adapter = req->adapter; - unsigned long flags; + struct zfcp_qdio_queue *req_q = &adapter->req_q; int idx; /* put allocated FSF request into hash table */ - spin_lock_irqsave(&adapter->req_list_lock, flags); + spin_lock(&adapter->req_list_lock); idx = zfcp_reqlist_hash(req->req_id); list_add_tail(&req->list, &adapter->req_list[idx]); - spin_unlock_irqrestore(&adapter->req_list_lock, flags); + spin_unlock(&adapter->req_list_lock); - req->qdio_outb_usage = atomic_read(&adapter->req_q.count); + req->qdio_outb_usage = atomic_read(&req_q->count); req->issued = get_clock(); if (zfcp_qdio_send(req)) { + /* Queues are down..... */ del_timer(&req->timer); - spin_lock_irqsave(&adapter->req_list_lock, flags); - /* lookup request again, list might have changed */ - if (zfcp_reqlist_find_safe(adapter, req)) - zfcp_reqlist_remove(adapter, req); - spin_unlock_irqrestore(&adapter->req_list_lock, flags); + spin_lock(&adapter->req_list_lock); + zfcp_reqlist_remove(adapter, req); + spin_unlock(&adapter->req_list_lock); + /* undo changes in request queue made for this request */ + atomic_add(req->sbal_number, &req_q->count); + req_q->first -= req->sbal_number; + req_q->first += QDIO_MAX_BUFFERS_PER_Q; + req_q->first %= QDIO_MAX_BUFFERS_PER_Q; /* wrap */ zfcp_erp_adapter_reopen(adapter, 0, 116, req); return -EIO; } diff --git a/trunk/drivers/s390/scsi/zfcp_scsi.c b/trunk/drivers/s390/scsi/zfcp_scsi.c index e46fd3e9f68f..ca8f85f3dad4 100644 --- a/trunk/drivers/s390/scsi/zfcp_scsi.c +++ b/trunk/drivers/s390/scsi/zfcp_scsi.c @@ -24,10 +24,14 @@ char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *fcp_rsp_iu) static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) { struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; - atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status); - unit->device = NULL; - zfcp_erp_unit_failed(unit, 12, NULL); - zfcp_unit_put(unit); + WARN_ON(!unit); + if (unit) { + atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status); + sdpnt->hostdata = NULL; + unit->device = NULL; + zfcp_erp_unit_failed(unit, 12, NULL); + zfcp_unit_put(unit); + } } static int zfcp_scsi_slave_configure(struct scsi_device *sdp) diff --git a/trunk/drivers/scsi/dpt_i2o.c b/trunk/drivers/scsi/dpt_i2o.c index 6194ed5d02c4..8aba4fdfb522 100644 --- a/trunk/drivers/scsi/dpt_i2o.c +++ b/trunk/drivers/scsi/dpt_i2o.c @@ -2445,7 +2445,7 @@ static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd) hba_status = detailed_status >> 8; // calculate resid for sg - scsi_set_resid(cmd, scsi_bufflen(cmd) - readl(reply+20)); + scsi_set_resid(cmd, scsi_bufflen(cmd) - readl(reply+5)); pHba = (adpt_hba*) cmd->device->host->hostdata[0]; @@ -2456,7 +2456,7 @@ static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd) case I2O_SCSI_DSC_SUCCESS: cmd->result = (DID_OK << 16); // handle underflow - if (readl(reply+20) < cmd->underflow) { + if(readl(reply+5) < cmd->underflow ) { cmd->result = (DID_ERROR <<16); printk(KERN_WARNING"%s: SCSI CMD underflow\n",pHba->name); } diff --git a/trunk/drivers/scsi/megaraid.c b/trunk/drivers/scsi/megaraid.c index 7dc62deb4087..28c9da7d4a5c 100644 --- a/trunk/drivers/scsi/megaraid.c +++ b/trunk/drivers/scsi/megaraid.c @@ -4402,10 +4402,6 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru) scb_t *scb; int rval; - scmd = scsi_allocate_command(GFP_KERNEL); - if (!scmd) - return -ENOMEM; - /* * The internal commands share one command id and hence are * serialized. This is so because we want to reserve maximum number of @@ -4416,11 +4412,12 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru) scb = &adapter->int_scb; memset(scb, 0, sizeof(scb_t)); + scmd = &adapter->int_scmd; + memset(scmd, 0, sizeof(Scsi_Cmnd)); + sdev = kzalloc(sizeof(struct scsi_device), GFP_KERNEL); scmd->device = sdev; - memset(adapter->int_cdb, 0, sizeof(adapter->int_cdb)); - scmd->cmnd = adapter->int_cdb; scmd->device->host = adapter->host; scmd->host_scribble = (void *)scb; scmd->cmnd[0] = MEGA_INTERNAL_CMD; @@ -4459,8 +4456,6 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru) mutex_unlock(&adapter->int_mtx); - scsi_free_command(GFP_KERNEL, scmd); - return rval; } diff --git a/trunk/drivers/scsi/megaraid.h b/trunk/drivers/scsi/megaraid.h index 795201fa0b48..ee70bd4ae4ba 100644 --- a/trunk/drivers/scsi/megaraid.h +++ b/trunk/drivers/scsi/megaraid.h @@ -888,8 +888,8 @@ typedef struct { u8 sglen; /* f/w supported scatter-gather list length */ - unsigned char int_cdb[MAX_COMMAND_SIZE]; scb_t int_scb; + Scsi_Cmnd int_scmd; struct mutex int_mtx; /* To synchronize the internal commands */ struct completion int_waitq; /* wait queue for internal diff --git a/trunk/drivers/scsi/qla2xxx/qla_def.h b/trunk/drivers/scsi/qla2xxx/qla_def.h index b97194096d8e..f25f41a499e5 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_def.h +++ b/trunk/drivers/scsi/qla2xxx/qla_def.h @@ -2547,6 +2547,7 @@ typedef struct scsi_qla_host { uint8_t fcode_revision[16]; uint32_t fw_revision[4]; + uint16_t fdt_odd_index; uint32_t fdt_wrt_disable; uint32_t fdt_erase_cmd; uint32_t fdt_block_size; diff --git a/trunk/drivers/scsi/qla2xxx/qla_init.c b/trunk/drivers/scsi/qla2xxx/qla_init.c index 4218f20f5ed5..a470f2d3270d 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_init.c +++ b/trunk/drivers/scsi/qla2xxx/qla_init.c @@ -140,6 +140,7 @@ int qla2100_pci_config(scsi_qla_host_t *ha) { uint16_t w; + uint32_t d; unsigned long flags; struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; @@ -150,7 +151,10 @@ qla2100_pci_config(scsi_qla_host_t *ha) w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); pci_write_config_word(ha->pdev, PCI_COMMAND, w); - pci_disable_rom(ha->pdev); + /* Reset expansion ROM address decode enable */ + pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); + d &= ~PCI_ROM_ADDRESS_ENABLE; + pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); /* Get PCI bus information. */ spin_lock_irqsave(&ha->hardware_lock, flags); @@ -170,6 +174,7 @@ int qla2300_pci_config(scsi_qla_host_t *ha) { uint16_t w; + uint32_t d; unsigned long flags = 0; uint32_t cnt; struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; @@ -231,7 +236,10 @@ qla2300_pci_config(scsi_qla_host_t *ha) pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80); - pci_disable_rom(ha->pdev); + /* Reset expansion ROM address decode enable */ + pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); + d &= ~PCI_ROM_ADDRESS_ENABLE; + pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); /* Get PCI bus information. */ spin_lock_irqsave(&ha->hardware_lock, flags); @@ -251,6 +259,7 @@ int qla24xx_pci_config(scsi_qla_host_t *ha) { uint16_t w; + uint32_t d; unsigned long flags = 0; struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; @@ -272,7 +281,10 @@ qla24xx_pci_config(scsi_qla_host_t *ha) if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) pcie_set_readrq(ha->pdev, 2048); - pci_disable_rom(ha->pdev); + /* Reset expansion ROM address decode enable */ + pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); + d &= ~PCI_ROM_ADDRESS_ENABLE; + pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); ha->chip_revision = ha->pdev->revision; @@ -294,6 +306,7 @@ int qla25xx_pci_config(scsi_qla_host_t *ha) { uint16_t w; + uint32_t d; pci_set_master(ha->pdev); pci_try_set_mwi(ha->pdev); @@ -307,7 +320,10 @@ qla25xx_pci_config(scsi_qla_host_t *ha) if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) pcie_set_readrq(ha->pdev, 2048); - pci_disable_rom(ha->pdev); + /* Reset expansion ROM address decode enable */ + pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); + d &= ~PCI_ROM_ADDRESS_ENABLE; + pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); ha->chip_revision = ha->pdev->revision; @@ -964,6 +980,7 @@ qla2x00_setup_chip(scsi_qla_host_t *ha) &ha->fw_minor_version, &ha->fw_subminor_version, &ha->fw_attributes, &ha->fw_memory_size); + qla2x00_resize_request_q(ha); ha->flags.npiv_supported = 0; if ((IS_QLA24XX(ha) || IS_QLA25XX(ha) || IS_QLA84XX(ha)) && @@ -975,7 +992,6 @@ qla2x00_setup_chip(scsi_qla_host_t *ha) ha->max_npiv_vports = MIN_MULTI_ID_FABRIC - 1; } - qla2x00_resize_request_q(ha); if (ql2xallocfwdump) qla2x00_alloc_fw_dump(ha); diff --git a/trunk/drivers/scsi/qla2xxx/qla_mbx.c b/trunk/drivers/scsi/qla2xxx/qla_mbx.c index 3402746ec128..36bc6851e23d 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_mbx.c +++ b/trunk/drivers/scsi/qla2xxx/qla_mbx.c @@ -1964,7 +1964,7 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *ha, uint16_t *cur_xchg_cnt, *cur_iocb_cnt = mcp->mb[7]; if (orig_iocb_cnt) *orig_iocb_cnt = mcp->mb[10]; - if (ha->flags.npiv_supported && max_npiv_vports) + if (max_npiv_vports) *max_npiv_vports = mcp->mb[11]; } diff --git a/trunk/drivers/scsi/qla2xxx/qla_os.c b/trunk/drivers/scsi/qla2xxx/qla_os.c index 35567203ef61..21dd182ad512 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_os.c +++ b/trunk/drivers/scsi/qla2xxx/qla_os.c @@ -728,7 +728,6 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) if (ha->isp_ops->abort_command(ha, sp)) { DEBUG2(printk("%s(%ld): abort_command " "mbx failed.\n", __func__, ha->host_no)); - ret = FAILED; } else { DEBUG3(printk("%s(%ld): abort_command " "mbx success.\n", __func__, ha->host_no)); diff --git a/trunk/drivers/scsi/qla2xxx/qla_sup.c b/trunk/drivers/scsi/qla2xxx/qla_sup.c index e4af678eb2d6..90a13211717f 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_sup.c +++ b/trunk/drivers/scsi/qla2xxx/qla_sup.c @@ -722,7 +722,6 @@ qla2xxx_get_flt_info(scsi_qla_host_t *ha, uint32_t flt_addr) static void qla2xxx_get_fdt_info(scsi_qla_host_t *ha) { -#define FLASH_BLK_SIZE_4K 0x1000 #define FLASH_BLK_SIZE_32K 0x8000 #define FLASH_BLK_SIZE_64K 0x10000 const char *loc, *locations[] = { "MID", "FDT" }; @@ -756,6 +755,7 @@ qla2xxx_get_fdt_info(scsi_qla_host_t *ha) loc = locations[1]; mid = le16_to_cpu(fdt->man_id); fid = le16_to_cpu(fdt->id); + ha->fdt_odd_index = mid == 0x1f; ha->fdt_wrt_disable = fdt->wrt_disable_bits; ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0300 | fdt->erase_cmd); ha->fdt_block_size = le32_to_cpu(fdt->block_size); @@ -788,7 +788,8 @@ qla2xxx_get_fdt_info(scsi_qla_host_t *ha) ha->fdt_block_size = FLASH_BLK_SIZE_64K; break; case 0x1f: /* Atmel 26DF081A. */ - ha->fdt_block_size = FLASH_BLK_SIZE_4K; + ha->fdt_odd_index = 1; + ha->fdt_block_size = FLASH_BLK_SIZE_64K; ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0320); ha->fdt_unprotect_sec_cmd = flash_conf_to_access_addr(0x0339); ha->fdt_protect_sec_cmd = flash_conf_to_access_addr(0x0336); @@ -800,9 +801,9 @@ qla2xxx_get_fdt_info(scsi_qla_host_t *ha) } done: DEBUG2(qla_printk(KERN_DEBUG, ha, "FDT[%s]: (0x%x/0x%x) erase=0x%x " - "pro=%x upro=%x wrtd=0x%x blk=0x%x.\n", loc, mid, fid, + "pro=%x upro=%x idx=%d wrtd=0x%x blk=0x%x.\n", loc, mid, fid, ha->fdt_erase_cmd, ha->fdt_protect_sec_cmd, - ha->fdt_unprotect_sec_cmd, ha->fdt_wrt_disable, + ha->fdt_unprotect_sec_cmd, ha->fdt_odd_index, ha->fdt_wrt_disable, ha->fdt_block_size)); } @@ -986,9 +987,13 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr, qla24xx_unprotect_flash(ha); for (liter = 0; liter < dwords; liter++, faddr++, dwptr++) { - - findex = faddr; - fdata = (findex & sec_mask) << 2; + if (ha->fdt_odd_index) { + findex = faddr << 2; + fdata = findex & sec_mask; + } else { + findex = faddr; + fdata = (findex & sec_mask) << 2; + } /* Are we at the beginning of a sector? */ if ((findex & rest_addr) == 0) { diff --git a/trunk/drivers/scsi/qla2xxx/qla_version.h b/trunk/drivers/scsi/qla2xxx/qla_version.h index eea6720adf16..be5e299df528 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_version.h +++ b/trunk/drivers/scsi/qla2xxx/qla_version.h @@ -7,7 +7,7 @@ /* * Driver version */ -#define QLA2XXX_VERSION "8.02.01-k9" +#define QLA2XXX_VERSION "8.02.01-k8" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 2 diff --git a/trunk/drivers/scsi/scsi_error.c b/trunk/drivers/scsi/scsi_error.c index 386361778ebb..94ed262bdf0c 100644 --- a/trunk/drivers/scsi/scsi_error.c +++ b/trunk/drivers/scsi/scsi_error.c @@ -1340,10 +1340,9 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd) * LLD/transport was disrupted during processing of the IO. * The transport class is now blocked/blocking, * and the transport will decide what to do with the IO - * based on its timers and recovery capablilities if - * there are enough retries. + * based on its timers and recovery capablilities. */ - goto maybe_retry; + return ADD_TO_MLQUEUE; case DID_TRANSPORT_FAILFAST: /* * The transport decided to failfast the IO (most likely diff --git a/trunk/drivers/serial/sh-sci.c b/trunk/drivers/serial/sh-sci.c index 165fc010978c..5c0f32c7fbf6 100644 --- a/trunk/drivers/serial/sh-sci.c +++ b/trunk/drivers/serial/sh-sci.c @@ -144,9 +144,9 @@ static void put_char(struct uart_port *port, char c) status = sci_in(port, SCxSR); } while (!(status & SCxSR_TDxE(port))); + sci_out(port, SCxTDR, c); sci_in(port, SCxSR); /* Dummy read */ sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port)); - sci_out(port, SCxTDR, c); spin_unlock_irqrestore(&port->lock, flags); } @@ -478,10 +478,10 @@ static void sci_transmit_chars(struct uart_port *port) return; } - if (port->type == PORT_SCI) - count = sci_txroom(port); - else + if (port->type == PORT_SCIF) count = scif_txroom(port); + else + count = sci_txroom(port); do { unsigned char c; @@ -510,7 +510,7 @@ static void sci_transmit_chars(struct uart_port *port) } else { ctrl = sci_in(port, SCSCR); - if (port->type != PORT_SCI) { + if (port->type == PORT_SCIF) { sci_in(port, SCxSR); /* Dummy read */ sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port)); } @@ -536,10 +536,10 @@ static inline void sci_receive_chars(struct uart_port *port) return; while (1) { - if (port->type == PORT_SCI) - count = sci_rxroom(port); - else + if (port->type == PORT_SCIF) count = scif_rxroom(port); + else + count = sci_rxroom(port); /* Don't copy more bytes than there is room for in the buffer */ count = tty_buffer_request_room(tty, count); @@ -714,7 +714,7 @@ static inline int sci_handle_breaks(struct uart_port *port) #if defined(SCIF_ORER) /* XXX: Handle SCIF overrun error */ - if (port->type != PORT_SCI && (sci_in(port, SCLSR) & SCIF_ORER) != 0) { + if (port->type == PORT_SCIF && (sci_in(port, SCLSR) & SCIF_ORER) != 0) { sci_out(port, SCLSR, 0); if (tty_insert_flip_char(tty, 0, TTY_OVERRUN)) { copied++; @@ -1042,7 +1042,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios, sci_out(port, SCSCR, 0x00); /* TE=0, RE=0, CKE1=0 */ - if (port->type != PORT_SCI) + if (port->type == PORT_SCIF) sci_out(port, SCFCR, SCFCR_RFRST | SCFCR_TFRST); smr_val = sci_in(port, SCSMR) & 3; @@ -1085,7 +1085,6 @@ static const char *sci_type(struct uart_port *port) case PORT_SCI: return "sci"; case PORT_SCIF: return "scif"; case PORT_IRDA: return "irda"; - case PORT_SCIFA: return "scifa"; } return NULL; @@ -1113,7 +1112,6 @@ static void sci_config_port(struct uart_port *port, int flags) s->init_pins = sci_init_pins_sci; break; case PORT_SCIF: - case PORT_SCIFA: s->init_pins = sci_init_pins_scif; break; case PORT_IRDA: diff --git a/trunk/drivers/serial/sh-sci.h b/trunk/drivers/serial/sh-sci.h index 9f33b064172e..6163a45f968f 100644 --- a/trunk/drivers/serial/sh-sci.h +++ b/trunk/drivers/serial/sh-sci.h @@ -289,18 +289,18 @@ #define CPU_SCIx_FNS(name, sci_offset, sci_size, scif_offset, scif_size)\ static inline unsigned int sci_##name##_in(struct uart_port *port) \ { \ - if (port->type == PORT_SCIF) { \ - SCI_IN(scif_size, scif_offset) \ - } else { /* PORT_SCI or PORT_SCIFA */ \ - SCI_IN(sci_size, sci_offset); \ + if (port->type == PORT_SCI) { \ + SCI_IN(sci_size, sci_offset) \ + } else { \ + SCI_IN(scif_size, scif_offset); \ } \ } \ static inline void sci_##name##_out(struct uart_port *port, unsigned int value) \ { \ - if (port->type == PORT_SCIF) { \ - SCI_OUT(scif_size, scif_offset, value) \ - } else { /* PORT_SCI or PORT_SCIFA */ \ - SCI_OUT(sci_size, sci_offset, value); \ + if (port->type == PORT_SCI) { \ + SCI_OUT(sci_size, sci_offset, value) \ + } else { \ + SCI_OUT(scif_size, scif_offset, value); \ } \ } diff --git a/trunk/drivers/usb/class/cdc-acm.c b/trunk/drivers/usb/class/cdc-acm.c index d50a99f70aee..20104443081a 100644 --- a/trunk/drivers/usb/class/cdc-acm.c +++ b/trunk/drivers/usb/class/cdc-acm.c @@ -158,12 +158,16 @@ static int acm_wb_is_avail(struct acm *acm) } /* - * Finish write. Caller must hold acm->write_lock + * Finish write. */ static void acm_write_done(struct acm *acm, struct acm_wb *wb) { + unsigned long flags; + + spin_lock_irqsave(&acm->write_lock, flags); wb->use = 0; acm->transmitting--; + spin_unlock_irqrestore(&acm->write_lock, flags); } /* @@ -478,7 +482,6 @@ static void acm_write_bulk(struct urb *urb) { struct acm_wb *wb = urb->context; struct acm *acm = wb->instance; - unsigned long flags; if (verbose || urb->status || (urb->actual_length != urb->transfer_buffer_length)) @@ -487,9 +490,7 @@ static void acm_write_bulk(struct urb *urb) urb->transfer_buffer_length, urb->status); - spin_lock_irqsave(&acm->write_lock, flags); acm_write_done(acm, wb); - spin_unlock_irqrestore(&acm->write_lock, flags); if (ACM_READY(acm)) schedule_work(&acm->work); else diff --git a/trunk/drivers/usb/core/message.c b/trunk/drivers/usb/core/message.c index 6d1048faf08e..887738577b28 100644 --- a/trunk/drivers/usb/core/message.c +++ b/trunk/drivers/usb/core/message.c @@ -1091,7 +1091,6 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0) continue; dev_dbg(&dev->dev, "unregistering interface %s\n", dev_name(&interface->dev)); - interface->unregistering = 1; usb_remove_sysfs_intf_files(interface); device_del(&interface->dev); } diff --git a/trunk/drivers/usb/core/sysfs.c b/trunk/drivers/usb/core/sysfs.c index 4fb65fdc9dc3..f66fba11fbd5 100644 --- a/trunk/drivers/usb/core/sysfs.c +++ b/trunk/drivers/usb/core/sysfs.c @@ -840,7 +840,7 @@ int usb_create_sysfs_intf_files(struct usb_interface *intf) struct usb_host_interface *alt = intf->cur_altsetting; int retval; - if (intf->sysfs_files_created || intf->unregistering) + if (intf->sysfs_files_created) return 0; /* The interface string may be present in some altsettings diff --git a/trunk/drivers/usb/core/urb.c b/trunk/drivers/usb/core/urb.c index 1f68af9db3f7..4342bd9c3bb6 100644 --- a/trunk/drivers/usb/core/urb.c +++ b/trunk/drivers/usb/core/urb.c @@ -85,8 +85,8 @@ EXPORT_SYMBOL_GPL(usb_alloc_urb); * Must be called when a user of a urb is finished with it. When the last user * of the urb calls this function, the memory of the urb is freed. * - * Note: The transfer buffer associated with the urb is not freed unless the - * URB_FREE_BUFFER transfer flag is set. + * Note: The transfer buffer associated with the urb is not freed, that must be + * done elsewhere. */ void usb_free_urb(struct urb *urb) { diff --git a/trunk/drivers/usb/gadget/f_acm.c b/trunk/drivers/usb/gadget/f_acm.c index c1d34df0b157..5ee1590b8e9c 100644 --- a/trunk/drivers/usb/gadget/f_acm.c +++ b/trunk/drivers/usb/gadget/f_acm.c @@ -463,11 +463,7 @@ static int acm_cdc_notify(struct f_acm *acm, u8 type, u16 value, notify->wLength = cpu_to_le16(length); memcpy(buf, data, length); - /* ep_queue() can complete immediately if it fills the fifo... */ - spin_unlock(&acm->lock); status = usb_ep_queue(ep, req, GFP_ATOMIC); - spin_lock(&acm->lock); - if (status < 0) { ERROR(acm->port.func.config->cdev, "acm ttyGS%d can't notify serial state, %d\n", diff --git a/trunk/drivers/usb/host/Kconfig b/trunk/drivers/usb/host/Kconfig index f3a75a929e0a..56f592dc0b36 100644 --- a/trunk/drivers/usb/host/Kconfig +++ b/trunk/drivers/usb/host/Kconfig @@ -110,18 +110,29 @@ config USB_ISP116X_HCD config USB_ISP1760_HCD tristate "ISP 1760 HCD support" - depends on USB && EXPERIMENTAL && (PCI || PPC_OF) + depends on USB && EXPERIMENTAL ---help--- The ISP1760 chip is a USB 2.0 host controller. This driver does not support isochronous transfers or OTG. - This USB controller is usually attached to a non-DMA-Master - capable bus. NXP's eval kit brings this chip on PCI card - where the chip itself is behind a PLB to simulate such - a bus. To compile this driver as a module, choose M here: the - module will be called isp1760. + module will be called isp1760-hcd. + +config USB_ISP1760_PCI + bool "Support for the PCI bus" + depends on USB_ISP1760_HCD && PCI + ---help--- + Enables support for the device present on the PCI bus. + This should only be required if you happen to have the eval kit from + NXP and you are going to test it. + +config USB_ISP1760_OF + bool "Support for the OF platform bus" + depends on USB_ISP1760_HCD && PPC_OF + ---help--- + Enables support for the device present on the PowerPC + OpenFirmware platform bus. config USB_OHCI_HCD tristate "OHCI HCD support" diff --git a/trunk/drivers/usb/host/ehci-hcd.c b/trunk/drivers/usb/host/ehci-hcd.c index 4725d15d096f..15a803b206b8 100644 --- a/trunk/drivers/usb/host/ehci-hcd.c +++ b/trunk/drivers/usb/host/ehci-hcd.c @@ -643,7 +643,7 @@ static int ehci_run (struct usb_hcd *hcd) static irqreturn_t ehci_irq (struct usb_hcd *hcd) { struct ehci_hcd *ehci = hcd_to_ehci (hcd); - u32 status, masked_status, pcd_status = 0, cmd; + u32 status, pcd_status = 0, cmd; int bh; spin_lock (&ehci->lock); @@ -656,14 +656,14 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) goto dead; } - masked_status = status & INTR_MASK; - if (!masked_status) { /* irq sharing? */ + status &= INTR_MASK; + if (!status) { /* irq sharing? */ spin_unlock(&ehci->lock); return IRQ_NONE; } /* clear (just) interrupts */ - ehci_writel(ehci, masked_status, &ehci->regs->status); + ehci_writel(ehci, status, &ehci->regs->status); cmd = ehci_readl(ehci, &ehci->regs->command); bh = 0; @@ -734,17 +734,18 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) /* PCI errors [4.15.2.4] */ if (unlikely ((status & STS_FATAL) != 0)) { - ehci_err(ehci, "fatal error\n"); dbg_cmd(ehci, "fatal", cmd); dbg_status(ehci, "fatal", status); - ehci_halt(ehci); + if (status & STS_HALT) { + ehci_err (ehci, "fatal error\n"); dead: - ehci_reset(ehci); - ehci_writel(ehci, 0, &ehci->regs->configured_flag); - /* generic layer kills/unlinks all urbs, then - * uses ehci_stop to clean up the rest - */ - bh = 1; + ehci_reset (ehci); + ehci_writel(ehci, 0, &ehci->regs->configured_flag); + /* generic layer kills/unlinks all urbs, then + * uses ehci_stop to clean up the rest + */ + bh = 1; + } } if (bh) diff --git a/trunk/drivers/usb/host/ehci-ps3.c b/trunk/drivers/usb/host/ehci-ps3.c index 9c9da35abc6c..0eba894bcb01 100644 --- a/trunk/drivers/usb/host/ehci-ps3.c +++ b/trunk/drivers/usb/host/ehci-ps3.c @@ -205,7 +205,6 @@ static int ps3_ehci_remove(struct ps3_system_bus_device *dev) tmp = hcd->irq; - ehci_shutdown(hcd); usb_remove_hcd(hcd); ps3_system_bus_set_driver_data(dev, NULL); diff --git a/trunk/drivers/usb/host/ehci-sched.c b/trunk/drivers/usb/host/ehci-sched.c index a081ee65bde6..4a0c5a78b2ed 100644 --- a/trunk/drivers/usb/host/ehci-sched.c +++ b/trunk/drivers/usb/host/ehci-sched.c @@ -918,7 +918,7 @@ iso_stream_init ( */ stream->usecs = HS_USECS_ISO (maxp); bandwidth = stream->usecs * 8; - bandwidth /= interval; + bandwidth /= 1 << (interval - 1); } else { u32 addr; @@ -951,7 +951,7 @@ iso_stream_init ( } else stream->raw_mask = smask_out [hs_transfers - 1]; bandwidth = stream->usecs + stream->c_usecs; - bandwidth /= interval << 3; + bandwidth /= 1 << (interval + 2); /* stream->splits gets created from raw_mask later */ stream->address = cpu_to_hc32(ehci, addr); diff --git a/trunk/drivers/usb/host/isp1760-if.c b/trunk/drivers/usb/host/isp1760-if.c index b87ca7cf4b37..af849f596135 100644 --- a/trunk/drivers/usb/host/isp1760-if.c +++ b/trunk/drivers/usb/host/isp1760-if.c @@ -14,16 +14,16 @@ #include "../core/hcd.h" #include "isp1760-hcd.h" -#ifdef CONFIG_PPC_OF +#ifdef CONFIG_USB_ISP1760_OF #include #include #endif -#ifdef CONFIG_PCI +#ifdef CONFIG_USB_ISP1760_PCI #include #endif -#ifdef CONFIG_PPC_OF +#ifdef CONFIG_USB_ISP1760_OF static int of_isp1760_probe(struct of_device *dev, const struct of_device_id *match) { @@ -128,7 +128,7 @@ static struct of_platform_driver isp1760_of_driver = { }; #endif -#ifdef CONFIG_PCI +#ifdef CONFIG_USB_ISP1760_PCI static u32 nxp_pci_io_base; static u32 iolength; static u32 pci_mem_phy0; @@ -288,28 +288,28 @@ static struct pci_driver isp1761_pci_driver = { static int __init isp1760_init(void) { - int ret; + int ret = -ENODEV; init_kmem_once(); -#ifdef CONFIG_PPC_OF +#ifdef CONFIG_USB_ISP1760_OF ret = of_register_platform_driver(&isp1760_of_driver); if (ret) { deinit_kmem_cache(); return ret; } #endif -#ifdef CONFIG_PCI +#ifdef CONFIG_USB_ISP1760_PCI ret = pci_register_driver(&isp1761_pci_driver); if (ret) goto unreg_of; #endif return ret; -#ifdef CONFIG_PCI +#ifdef CONFIG_USB_ISP1760_PCI unreg_of: #endif -#ifdef CONFIG_PPC_OF +#ifdef CONFIG_USB_ISP1760_OF of_unregister_platform_driver(&isp1760_of_driver); #endif deinit_kmem_cache(); @@ -319,10 +319,10 @@ module_init(isp1760_init); static void __exit isp1760_exit(void) { -#ifdef CONFIG_PPC_OF +#ifdef CONFIG_USB_ISP1760_OF of_unregister_platform_driver(&isp1760_of_driver); #endif -#ifdef CONFIG_PCI +#ifdef CONFIG_USB_ISP1760_PCI pci_unregister_driver(&isp1761_pci_driver); #endif deinit_kmem_cache(); diff --git a/trunk/drivers/usb/host/ohci-ps3.c b/trunk/drivers/usb/host/ohci-ps3.c index 3c1a3b5f89f1..2089d8a46c4b 100644 --- a/trunk/drivers/usb/host/ohci-ps3.c +++ b/trunk/drivers/usb/host/ohci-ps3.c @@ -192,7 +192,7 @@ static int ps3_ohci_probe(struct ps3_system_bus_device *dev) return result; } -static int ps3_ohci_remove(struct ps3_system_bus_device *dev) +static int ps3_ohci_remove (struct ps3_system_bus_device *dev) { unsigned int tmp; struct usb_hcd *hcd = @@ -205,7 +205,6 @@ static int ps3_ohci_remove(struct ps3_system_bus_device *dev) tmp = hcd->irq; - ohci_shutdown(hcd); usb_remove_hcd(hcd); ps3_system_bus_set_driver_data(dev, NULL); diff --git a/trunk/drivers/usb/host/r8a66597-hcd.c b/trunk/drivers/usb/host/r8a66597-hcd.c index 2376f24f3c83..c18d8790c410 100644 --- a/trunk/drivers/usb/host/r8a66597-hcd.c +++ b/trunk/drivers/usb/host/r8a66597-hcd.c @@ -1763,12 +1763,11 @@ static void r8a66597_timer(unsigned long _r8a66597) { struct r8a66597 *r8a66597 = (struct r8a66597 *)_r8a66597; unsigned long flags; - int port; spin_lock_irqsave(&r8a66597->lock, flags); - for (port = 0; port < R8A66597_MAX_ROOT_HUB; port++) - r8a66597_root_hub_control(r8a66597, port); + r8a66597_root_hub_control(r8a66597, 0); + r8a66597_root_hub_control(r8a66597, 1); spin_unlock_irqrestore(&r8a66597->lock, flags); } diff --git a/trunk/drivers/usb/misc/sisusbvga/sisusb.c b/trunk/drivers/usb/misc/sisusbvga/sisusb.c index b4ec716de7da..69c34a58e205 100644 --- a/trunk/drivers/usb/misc/sisusbvga/sisusb.c +++ b/trunk/drivers/usb/misc/sisusbvga/sisusb.c @@ -3270,7 +3270,6 @@ static struct usb_device_id sisusb_table [] = { { USB_DEVICE(0x0711, 0x0900) }, { USB_DEVICE(0x0711, 0x0901) }, { USB_DEVICE(0x0711, 0x0902) }, - { USB_DEVICE(0x0711, 0x0903) }, { USB_DEVICE(0x0711, 0x0918) }, { USB_DEVICE(0x182d, 0x021c) }, { USB_DEVICE(0x182d, 0x0269) }, diff --git a/trunk/drivers/usb/misc/vstusb.c b/trunk/drivers/usb/misc/vstusb.c index 63dff9ba73c5..8648470c81ca 100644 --- a/trunk/drivers/usb/misc/vstusb.c +++ b/trunk/drivers/usb/misc/vstusb.c @@ -620,7 +620,7 @@ static long vstusb_ioctl(struct file *file, unsigned int cmd, unsigned long arg) __func__); retval = -EFAULT; } else { - dev_dbg(&dev->dev, "%s: recv %zd bytes from pipe %d\n", + dev_dbg(&dev->dev, "%s: recv %d bytes from pipe %d\n", __func__, usb_data.count, usb_data.pipe); } diff --git a/trunk/drivers/usb/musb/musb_core.c b/trunk/drivers/usb/musb/musb_core.c index 5280dba9b1fb..4a35745b30be 100644 --- a/trunk/drivers/usb/musb/musb_core.c +++ b/trunk/drivers/usb/musb/musb_core.c @@ -114,8 +114,8 @@ -unsigned musb_debug; -module_param(musb_debug, uint, S_IRUGO | S_IWUSR); +unsigned debug; +module_param(debug, uint, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(debug, "Debug message level. Default = 0"); #define DRIVER_AUTHOR "Mentor Graphics, Texas Instruments, Nokia" @@ -2248,7 +2248,7 @@ static int __init musb_init(void) "host" #endif ", debug=%d\n", - musb_driver_name, musb_debug); + musb_driver_name, debug); return platform_driver_probe(&musb_driver, musb_probe); } diff --git a/trunk/drivers/usb/musb/musb_debug.h b/trunk/drivers/usb/musb/musb_debug.h index 9fc1db44c72c..4d2794441b15 100644 --- a/trunk/drivers/usb/musb/musb_debug.h +++ b/trunk/drivers/usb/musb/musb_debug.h @@ -48,11 +48,11 @@ __func__, __LINE__ , ## args); \ } } while (0) -extern unsigned musb_debug; +extern unsigned debug; static inline int _dbg_level(unsigned l) { - return musb_debug >= l; + return debug >= l; } #define DBG(level, fmt, args...) xprintk(level, KERN_DEBUG, fmt, ## args) diff --git a/trunk/drivers/usb/musb/musb_host.c b/trunk/drivers/usb/musb/musb_host.c index e45e70bcc5e2..3133990f04ec 100644 --- a/trunk/drivers/usb/musb/musb_host.c +++ b/trunk/drivers/usb/musb/musb_host.c @@ -378,19 +378,6 @@ musb_giveback(struct musb_qh *qh, struct urb *urb, int status) switch (qh->type) { - case USB_ENDPOINT_XFER_CONTROL: - case USB_ENDPOINT_XFER_BULK: - /* fifo policy for these lists, except that NAKing - * should rotate a qh to the end (for fairness). - */ - if (qh->mux == 1) { - head = qh->ring.prev; - list_del(&qh->ring); - kfree(qh); - qh = first_qh(head); - break; - } - case USB_ENDPOINT_XFER_ISOC: case USB_ENDPOINT_XFER_INT: /* this is where periodic bandwidth should be @@ -401,6 +388,17 @@ musb_giveback(struct musb_qh *qh, struct urb *urb, int status) kfree(qh); qh = NULL; break; + + case USB_ENDPOINT_XFER_CONTROL: + case USB_ENDPOINT_XFER_BULK: + /* fifo policy for these lists, except that NAKing + * should rotate a qh to the end (for fairness). + */ + head = qh->ring.prev; + list_del(&qh->ring); + kfree(qh); + qh = first_qh(head); + break; } } return qh; @@ -1509,29 +1507,10 @@ void musb_host_rx(struct musb *musb, u8 epnum) musb_writew(hw_ep->regs, MUSB_RXCSR, val); #ifdef CONFIG_USB_INVENTRA_DMA - if (usb_pipeisoc(pipe)) { - struct usb_iso_packet_descriptor *d; - - d = urb->iso_frame_desc + qh->iso_idx; - d->actual_length = xfer_len; - - /* even if there was an error, we did the dma - * for iso_frame_desc->length - */ - if (d->status != EILSEQ && d->status != -EOVERFLOW) - d->status = 0; - - if (++qh->iso_idx >= urb->number_of_packets) - done = true; - else - done = false; - - } else { /* done if urb buffer is full or short packet is recd */ done = (urb->actual_length + xfer_len >= urb->transfer_buffer_length || dma->actual_len < qh->maxpacket); - } /* send IN token for next packet, without AUTOREQ */ if (!done) { @@ -1568,8 +1547,7 @@ void musb_host_rx(struct musb *musb, u8 epnum) if (dma) { struct dma_controller *c; u16 rx_count; - int ret, length; - dma_addr_t buf; + int ret; rx_count = musb_readw(epio, MUSB_RXCOUNT); @@ -1582,35 +1560,6 @@ void musb_host_rx(struct musb *musb, u8 epnum) c = musb->dma_controller; - if (usb_pipeisoc(pipe)) { - int status = 0; - struct usb_iso_packet_descriptor *d; - - d = urb->iso_frame_desc + qh->iso_idx; - - if (iso_err) { - status = -EILSEQ; - urb->error_count++; - } - if (rx_count > d->length) { - if (status == 0) { - status = -EOVERFLOW; - urb->error_count++; - } - DBG(2, "** OVERFLOW %d into %d\n",\ - rx_count, d->length); - - length = d->length; - } else - length = rx_count; - d->status = status; - buf = urb->transfer_dma + d->offset; - } else { - length = rx_count; - buf = urb->transfer_dma + - urb->actual_length; - } - dma->desired_mode = 0; #ifdef USE_MODE1 /* because of the issue below, mode 1 will @@ -1622,12 +1571,6 @@ void musb_host_rx(struct musb *musb, u8 epnum) urb->actual_length) > qh->maxpacket) dma->desired_mode = 1; - if (rx_count < hw_ep->max_packet_sz_rx) { - length = rx_count; - dma->bDesiredMode = 0; - } else { - length = urb->transfer_buffer_length; - } #endif /* Disadvantage of using mode 1: @@ -1665,7 +1608,12 @@ void musb_host_rx(struct musb *musb, u8 epnum) */ ret = c->channel_program( dma, qh->maxpacket, - dma->desired_mode, buf, length); + dma->desired_mode, + urb->transfer_dma + + urb->actual_length, + (dma->desired_mode == 0) + ? rx_count + : urb->transfer_buffer_length); if (!ret) { c->channel_release(dma); @@ -1683,6 +1631,19 @@ void musb_host_rx(struct musb *musb, u8 epnum) } } + if (dma && usb_pipeisoc(pipe)) { + struct usb_iso_packet_descriptor *d; + int iso_stat = status; + + d = urb->iso_frame_desc + qh->iso_idx; + d->actual_length += xfer_len; + if (iso_err) { + iso_stat = -EILSEQ; + urb->error_count++; + } + d->status = iso_stat; + } + finish: urb->actual_length += xfer_len; qh->offset += xfer_len; @@ -1710,9 +1671,22 @@ static int musb_schedule( struct list_head *head = NULL; /* use fixed hardware for control and bulk */ - if (qh->type == USB_ENDPOINT_XFER_CONTROL) { + switch (qh->type) { + case USB_ENDPOINT_XFER_CONTROL: head = &musb->control; hw_ep = musb->control_ep; + break; + case USB_ENDPOINT_XFER_BULK: + hw_ep = musb->bulk_ep; + if (is_in) + head = &musb->in_bulk; + else + head = &musb->out_bulk; + break; + } + if (head) { + idle = list_empty(head); + list_add_tail(&qh->ring, head); goto success; } @@ -1751,34 +1725,19 @@ static int musb_schedule( else diff = hw_ep->max_packet_sz_tx - qh->maxpacket; - if (diff >= 0 && best_diff > diff) { + if (diff > 0 && best_diff > diff) { best_diff = diff; best_end = epnum; } } - /* use bulk reserved ep1 if no other ep is free */ - if (best_end > 0 && qh->type == USB_ENDPOINT_XFER_BULK) { - hw_ep = musb->bulk_ep; - if (is_in) - head = &musb->in_bulk; - else - head = &musb->out_bulk; - goto success; - } else if (best_end < 0) { + if (best_end < 0) return -ENOSPC; - } idle = 1; - qh->mux = 0; hw_ep = musb->endpoints + best_end; musb->periodic[best_end] = qh; DBG(4, "qh %p periodic slot %d\n", qh, best_end); success: - if (head) { - idle = list_empty(head); - list_add_tail(&qh->ring, head); - qh->mux = 1; - } qh->hw_ep = hw_ep; qh->hep->hcpriv = qh; if (idle) @@ -2056,13 +2015,11 @@ static int musb_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) sched = &musb->control; break; case USB_ENDPOINT_XFER_BULK: - if (qh->mux == 1) { - if (usb_pipein(urb->pipe)) - sched = &musb->in_bulk; - else - sched = &musb->out_bulk; - break; - } + if (usb_pipein(urb->pipe)) + sched = &musb->in_bulk; + else + sched = &musb->out_bulk; + break; default: /* REVISIT when we get a schedule tree, periodic * transfers won't always be at the head of a @@ -2110,13 +2067,11 @@ musb_h_disable(struct usb_hcd *hcd, struct usb_host_endpoint *hep) sched = &musb->control; break; case USB_ENDPOINT_XFER_BULK: - if (qh->mux == 1) { - if (is_in) - sched = &musb->in_bulk; - else - sched = &musb->out_bulk; - break; - } + if (is_in) + sched = &musb->in_bulk; + else + sched = &musb->out_bulk; + break; default: /* REVISIT when we get a schedule tree, periodic transfers * won't always be at the head of a singleton queue... diff --git a/trunk/drivers/usb/musb/musb_host.h b/trunk/drivers/usb/musb/musb_host.h index 0b7fbcd21963..77bcdb9d5b32 100644 --- a/trunk/drivers/usb/musb/musb_host.h +++ b/trunk/drivers/usb/musb/musb_host.h @@ -53,7 +53,6 @@ struct musb_qh { struct list_head ring; /* of musb_qh */ /* struct musb_qh *next; */ /* for periodic tree */ - u8 mux; /* qh multiplexed to hw_ep */ unsigned offset; /* in urb->transfer_buffer */ unsigned segsize; /* current xfer fragment */ diff --git a/trunk/drivers/usb/musb/omap2430.c b/trunk/drivers/usb/musb/omap2430.c index ce6c162920f7..9d2dcb121c5e 100644 --- a/trunk/drivers/usb/musb/omap2430.c +++ b/trunk/drivers/usb/musb/omap2430.c @@ -53,9 +53,7 @@ static void musb_do_idle(unsigned long _musb) { struct musb *musb = (void *)_musb; unsigned long flags; -#ifdef CONFIG_USB_MUSB_HDRC_HCD u8 power; -#endif u8 devctl; devctl = musb_readb(musb->mregs, MUSB_DEVCTL); diff --git a/trunk/drivers/usb/musb/tusb6010.c b/trunk/drivers/usb/musb/tusb6010.c index ee8fca92a4ac..b73b036f3d77 100644 --- a/trunk/drivers/usb/musb/tusb6010.c +++ b/trunk/drivers/usb/musb/tusb6010.c @@ -605,7 +605,7 @@ void musb_platform_set_mode(struct musb *musb, u8 musb_mode) if (musb->board_mode != MUSB_OTG) { ERR("Changing mode currently only supported in OTG mode\n"); - return -EINVAL; + return; } otg_stat = musb_readl(tbase, TUSB_DEV_OTG_STAT); diff --git a/trunk/drivers/usb/serial/cp2101.c b/trunk/drivers/usb/serial/cp2101.c index 9035d7256b03..8008d0bc80ad 100644 --- a/trunk/drivers/usb/serial/cp2101.c +++ b/trunk/drivers/usb/serial/cp2101.c @@ -67,7 +67,6 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x10C4, 0x800A) }, /* SPORTident BSM7-D-USB main station */ { USB_DEVICE(0x10C4, 0x803B) }, /* Pololu USB-serial converter */ { USB_DEVICE(0x10C4, 0x8053) }, /* Enfora EDG1228 */ - { USB_DEVICE(0x10C4, 0x8054) }, /* Enfora GSM2228 */ { USB_DEVICE(0x10C4, 0x8066) }, /* Argussoft In-System Programmer */ { USB_DEVICE(0x10C4, 0x807A) }, /* Crumb128 board */ { USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */ @@ -86,7 +85,6 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */ { USB_DEVICE(0x10c4, 0x8293) }, /* Telegesys ETRX2USB */ { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */ - { USB_DEVICE(0x10C4, 0x83A8) }, /* Amber Wireless AMB2560 */ { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ { USB_DEVICE(0x10C4, 0xF001) }, /* Elan Digital Systems USBscope50 */ diff --git a/trunk/drivers/usb/serial/option.c b/trunk/drivers/usb/serial/option.c index 6fa1ec441b61..bd07eaa300b9 100644 --- a/trunk/drivers/usb/serial/option.c +++ b/trunk/drivers/usb/serial/option.c @@ -160,11 +160,6 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po #define NOVATELWIRELESS_VENDOR_ID 0x1410 -/* YISO PRODUCTS */ - -#define YISO_VENDOR_ID 0x0EAB -#define YISO_PRODUCT_U893 0xC893 - /* MERLIN EVDO PRODUCTS */ #define NOVATELWIRELESS_PRODUCT_V640 0x1100 #define NOVATELWIRELESS_PRODUCT_V620 0x1110 @@ -413,7 +408,6 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) }, { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) }, - { USB_DEVICE(YISO_VENDOR_ID, YISO_PRODUCT_U893) }, { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1004) }, diff --git a/trunk/drivers/usb/storage/Kconfig b/trunk/drivers/usb/storage/Kconfig index c68b738900bd..3d9249632ae1 100644 --- a/trunk/drivers/usb/storage/Kconfig +++ b/trunk/drivers/usb/storage/Kconfig @@ -2,8 +2,8 @@ # USB Storage driver configuration # -comment "NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;" -comment "see USB_STORAGE Help for more information" +comment "NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'" +comment "may also be needed; see USB_STORAGE Help for more information" depends on USB config USB_STORAGE diff --git a/trunk/drivers/usb/storage/unusual_devs.h b/trunk/drivers/usb/storage/unusual_devs.h index d4e5fc86e43c..fb9e20e624c1 100644 --- a/trunk/drivers/usb/storage/unusual_devs.h +++ b/trunk/drivers/usb/storage/unusual_devs.h @@ -253,14 +253,6 @@ UNUSUAL_DEV( 0x0421, 0x006a, 0x0000, 0x0591, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), -/* Submitted by Ricky Wong Yung Fei */ -/* Nokia 7610 Supernova - Too many sectors reported in usb storage mode */ -UNUSUAL_DEV( 0x0421, 0x00f5, 0x0000, 0x0470, - "Nokia", - "7610 Supernova", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_FIX_CAPACITY ), - /* Reported by Olaf Hering from novell bug #105878 */ UNUSUAL_DEV( 0x0424, 0x0fdc, 0x0210, 0x0210, "SMSC", @@ -426,13 +418,6 @@ UNUSUAL_DEV( 0x04b0, 0x0417, 0x0100, 0x0100, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), -/* Reported by paul ready */ -UNUSUAL_DEV( 0x04b0, 0x0419, 0x0100, 0x0200, - "NIKON", - "NIKON DSC D300", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_FIX_CAPACITY), - /* Reported by Doug Maxey (dwm@austin.ibm.com) */ UNUSUAL_DEV( 0x04b3, 0x4001, 0x0110, 0x0110, "IBM", @@ -1273,13 +1258,6 @@ UNUSUAL_DEV( 0x0839, 0x000a, 0x0001, 0x0001, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY), -/* Reported by Luciano Rocha */ -UNUSUAL_DEV( 0x0840, 0x0082, 0x0001, 0x0001, - "Argosy", - "Storage", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_FIX_CAPACITY), - /* Entry and supporting patch by Theodore Kilgore . * Flag will support Bulk devices which use a standards-violating 32-byte * Command Block Wrapper. Here, the "DC2MEGA" cameras (several brands) with diff --git a/trunk/fs/dlm/lockspace.c b/trunk/fs/dlm/lockspace.c index 8d86b7960f0d..d910501de6d2 100644 --- a/trunk/fs/dlm/lockspace.c +++ b/trunk/fs/dlm/lockspace.c @@ -812,7 +812,7 @@ int dlm_release_lockspace(void *lockspace, int force) error = release_lockspace(ls, force); if (!error) ls_count--; - if (!ls_count) + else if (!ls_count) threads_stop(); mutex_unlock(&ls_lock); diff --git a/trunk/fs/inotify.c b/trunk/fs/inotify.c index 7bbed1b89825..690e72595e6e 100644 --- a/trunk/fs/inotify.c +++ b/trunk/fs/inotify.c @@ -106,20 +106,6 @@ void get_inotify_watch(struct inotify_watch *watch) } EXPORT_SYMBOL_GPL(get_inotify_watch); -int pin_inotify_watch(struct inotify_watch *watch) -{ - struct super_block *sb = watch->inode->i_sb; - spin_lock(&sb_lock); - if (sb->s_count >= S_BIAS) { - atomic_inc(&sb->s_active); - spin_unlock(&sb_lock); - atomic_inc(&watch->count); - return 1; - } - spin_unlock(&sb_lock); - return 0; -} - /** * put_inotify_watch - decrements the ref count on a given watch. cleans up * watch references if the count reaches zero. inotify_watch is freed by @@ -138,13 +124,6 @@ void put_inotify_watch(struct inotify_watch *watch) } EXPORT_SYMBOL_GPL(put_inotify_watch); -void unpin_inotify_watch(struct inotify_watch *watch) -{ - struct super_block *sb = watch->inode->i_sb; - put_inotify_watch(watch); - deactivate_super(sb); -} - /* * inotify_handle_get_wd - returns the next WD for use by the given handle * @@ -500,112 +479,6 @@ void inotify_init_watch(struct inotify_watch *watch) } EXPORT_SYMBOL_GPL(inotify_init_watch); -/* - * Watch removals suck violently. To kick the watch out we need (in this - * order) inode->inotify_mutex and ih->mutex. That's fine if we have - * a hold on inode; however, for all other cases we need to make damn sure - * we don't race with umount. We can *NOT* just grab a reference to a - * watch - inotify_unmount_inodes() will happily sail past it and we'll end - * with reference to inode potentially outliving its superblock. Ideally - * we just want to grab an active reference to superblock if we can; that - * will make sure we won't go into inotify_umount_inodes() until we are - * done. Cleanup is just deactivate_super(). However, that leaves a messy - * case - what if we *are* racing with umount() and active references to - * superblock can't be acquired anymore? We can bump ->s_count, grab - * ->s_umount, which will almost certainly wait until the superblock is shut - * down and the watch in question is pining for fjords. That's fine, but - * there is a problem - we might have hit the window between ->s_active - * getting to 0 / ->s_count - below S_BIAS (i.e. the moment when superblock - * is past the point of no return and is heading for shutdown) and the - * moment when deactivate_super() acquires ->s_umount. We could just do - * drop_super() yield() and retry, but that's rather antisocial and this - * stuff is luser-triggerable. OTOH, having grabbed ->s_umount and having - * found that we'd got there first (i.e. that ->s_root is non-NULL) we know - * that we won't race with inotify_umount_inodes(). So we could grab a - * reference to watch and do the rest as above, just with drop_super() instead - * of deactivate_super(), right? Wrong. We had to drop ih->mutex before we - * could grab ->s_umount. So the watch could've been gone already. - * - * That still can be dealt with - we need to save watch->wd, do idr_find() - * and compare its result with our pointer. If they match, we either have - * the damn thing still alive or we'd lost not one but two races at once, - * the watch had been killed and a new one got created with the same ->wd - * at the same address. That couldn't have happened in inotify_destroy(), - * but inotify_rm_wd() could run into that. Still, "new one got created" - * is not a problem - we have every right to kill it or leave it alone, - * whatever's more convenient. - * - * So we can use idr_find(...) == watch && watch->inode->i_sb == sb as - * "grab it and kill it" check. If it's been our original watch, we are - * fine, if it's a newcomer - nevermind, just pretend that we'd won the - * race and kill the fscker anyway; we are safe since we know that its - * superblock won't be going away. - * - * And yes, this is far beyond mere "not very pretty"; so's the entire - * concept of inotify to start with. - */ - -/** - * pin_to_kill - pin the watch down for removal - * @ih: inotify handle - * @watch: watch to kill - * - * Called with ih->mutex held, drops it. Possible return values: - * 0 - nothing to do, it has died - * 1 - remove it, drop the reference and deactivate_super() - * 2 - remove it, drop the reference and drop_super(); we tried hard to avoid - * that variant, since it involved a lot of PITA, but that's the best that - * could've been done. - */ -static int pin_to_kill(struct inotify_handle *ih, struct inotify_watch *watch) -{ - struct super_block *sb = watch->inode->i_sb; - s32 wd = watch->wd; - - spin_lock(&sb_lock); - if (sb->s_count >= S_BIAS) { - atomic_inc(&sb->s_active); - spin_unlock(&sb_lock); - get_inotify_watch(watch); - mutex_unlock(&ih->mutex); - return 1; /* the best outcome */ - } - sb->s_count++; - spin_unlock(&sb_lock); - mutex_unlock(&ih->mutex); /* can't grab ->s_umount under it */ - down_read(&sb->s_umount); - if (likely(!sb->s_root)) { - /* fs is already shut down; the watch is dead */ - drop_super(sb); - return 0; - } - /* raced with the final deactivate_super() */ - mutex_lock(&ih->mutex); - if (idr_find(&ih->idr, wd) != watch || watch->inode->i_sb != sb) { - /* the watch is dead */ - mutex_unlock(&ih->mutex); - drop_super(sb); - return 0; - } - /* still alive or freed and reused with the same sb and wd; kill */ - get_inotify_watch(watch); - mutex_unlock(&ih->mutex); - return 2; -} - -static void unpin_and_kill(struct inotify_watch *watch, int how) -{ - struct super_block *sb = watch->inode->i_sb; - put_inotify_watch(watch); - switch (how) { - case 1: - deactivate_super(sb); - break; - case 2: - drop_super(sb); - } -} - /** * inotify_destroy - clean up and destroy an inotify instance * @ih: inotify handle @@ -617,15 +490,11 @@ void inotify_destroy(struct inotify_handle *ih) * pretty. We cannot do a simple iteration over the list, because we * do not know the inode until we iterate to the watch. But we need to * hold inode->inotify_mutex before ih->mutex. The following works. - * - * AV: it had to become even uglier to start working ;-/ */ while (1) { struct inotify_watch *watch; struct list_head *watches; - struct super_block *sb; struct inode *inode; - int how; mutex_lock(&ih->mutex); watches = &ih->watches; @@ -634,10 +503,8 @@ void inotify_destroy(struct inotify_handle *ih) break; } watch = list_first_entry(watches, struct inotify_watch, h_list); - sb = watch->inode->i_sb; - how = pin_to_kill(ih, watch); - if (!how) - continue; + get_inotify_watch(watch); + mutex_unlock(&ih->mutex); inode = watch->inode; mutex_lock(&inode->inotify_mutex); @@ -651,7 +518,7 @@ void inotify_destroy(struct inotify_handle *ih) mutex_unlock(&ih->mutex); mutex_unlock(&inode->inotify_mutex); - unpin_and_kill(watch, how); + put_inotify_watch(watch); } /* free this handle: the put matching the get in inotify_init() */ @@ -852,9 +719,7 @@ void inotify_evict_watch(struct inotify_watch *watch) int inotify_rm_wd(struct inotify_handle *ih, u32 wd) { struct inotify_watch *watch; - struct super_block *sb; struct inode *inode; - int how; mutex_lock(&ih->mutex); watch = idr_find(&ih->idr, wd); @@ -862,12 +727,9 @@ int inotify_rm_wd(struct inotify_handle *ih, u32 wd) mutex_unlock(&ih->mutex); return -EINVAL; } - sb = watch->inode->i_sb; - how = pin_to_kill(ih, watch); - if (!how) - return 0; - + get_inotify_watch(watch); inode = watch->inode; + mutex_unlock(&ih->mutex); mutex_lock(&inode->inotify_mutex); mutex_lock(&ih->mutex); @@ -878,7 +740,7 @@ int inotify_rm_wd(struct inotify_handle *ih, u32 wd) mutex_unlock(&ih->mutex); mutex_unlock(&inode->inotify_mutex); - unpin_and_kill(watch, how); + put_inotify_watch(watch); return 0; } diff --git a/trunk/include/linux/inotify.h b/trunk/include/linux/inotify.h index 37ea2894b3c0..bd578578a8b9 100644 --- a/trunk/include/linux/inotify.h +++ b/trunk/include/linux/inotify.h @@ -134,8 +134,6 @@ extern void inotify_remove_watch_locked(struct inotify_handle *, struct inotify_watch *); extern void get_inotify_watch(struct inotify_watch *); extern void put_inotify_watch(struct inotify_watch *); -extern int pin_inotify_watch(struct inotify_watch *); -extern void unpin_inotify_watch(struct inotify_watch *); #else @@ -230,15 +228,6 @@ static inline void put_inotify_watch(struct inotify_watch *watch) { } -extern inline int pin_inotify_watch(struct inotify_watch *watch) -{ - return 0; -} - -extern inline void unpin_inotify_watch(struct inotify_watch *watch) -{ -} - #endif /* CONFIG_INOTIFY */ #endif /* __KERNEL __ */ diff --git a/trunk/include/linux/kernel.h b/trunk/include/linux/kernel.h index dc7e0d0a6474..fba141d3ca07 100644 --- a/trunk/include/linux/kernel.h +++ b/trunk/include/linux/kernel.h @@ -318,36 +318,32 @@ static inline char *pack_hex_byte(char *buf, u8 byte) return buf; } -#ifndef pr_fmt -#define pr_fmt(fmt) fmt -#endif - -#define pr_emerg(fmt, ...) \ - printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) -#define pr_alert(fmt, ...) \ - printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) -#define pr_crit(fmt, ...) \ - printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) -#define pr_err(fmt, ...) \ - printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) -#define pr_warning(fmt, ...) \ - printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) -#define pr_notice(fmt, ...) \ - printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) -#define pr_info(fmt, ...) \ - printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) +#define pr_emerg(fmt, arg...) \ + printk(KERN_EMERG fmt, ##arg) +#define pr_alert(fmt, arg...) \ + printk(KERN_ALERT fmt, ##arg) +#define pr_crit(fmt, arg...) \ + printk(KERN_CRIT fmt, ##arg) +#define pr_err(fmt, arg...) \ + printk(KERN_ERR fmt, ##arg) +#define pr_warning(fmt, arg...) \ + printk(KERN_WARNING fmt, ##arg) +#define pr_notice(fmt, arg...) \ + printk(KERN_NOTICE fmt, ##arg) +#define pr_info(fmt, arg...) \ + printk(KERN_INFO fmt, ##arg) /* If you are writing a driver, please use dev_dbg instead */ #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) #define pr_debug(fmt, ...) do { \ - dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ + dynamic_pr_debug(fmt, ##__VA_ARGS__); \ } while (0) #elif defined(DEBUG) -#define pr_debug(fmt, ...) \ - printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) +#define pr_debug(fmt, arg...) \ + printk(KERN_DEBUG fmt, ##arg) #else -#define pr_debug(fmt, ...) \ - ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) +#define pr_debug(fmt, arg...) \ + ({ if (0) printk(KERN_DEBUG fmt, ##arg); 0; }) #endif /* diff --git a/trunk/include/linux/serial_core.h b/trunk/include/linux/serial_core.h index 4e4f1277f3bf..e27f216361fc 100644 --- a/trunk/include/linux/serial_core.h +++ b/trunk/include/linux/serial_core.h @@ -155,9 +155,6 @@ #define PORT_SC26XX 82 -/* SH-SCI */ -#define PORT_SCIFA 83 - #ifdef __KERNEL__ #include diff --git a/trunk/include/linux/slab.h b/trunk/include/linux/slab.h index 000da12b5cf0..ba965c84ae06 100644 --- a/trunk/include/linux/slab.h +++ b/trunk/include/linux/slab.h @@ -23,34 +23,6 @@ #define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */ #define SLAB_STORE_USER 0x00010000UL /* DEBUG: Store the last owner for bug hunting */ #define SLAB_PANIC 0x00040000UL /* Panic if kmem_cache_create() fails */ -/* - * SLAB_DESTROY_BY_RCU - **WARNING** READ THIS! - * - * This delays freeing the SLAB page by a grace period, it does _NOT_ - * delay object freeing. This means that if you do kmem_cache_free() - * that memory location is free to be reused at any time. Thus it may - * be possible to see another object there in the same RCU grace period. - * - * This feature only ensures the memory location backing the object - * stays valid, the trick to using this is relying on an independent - * object validation pass. Something like: - * - * rcu_read_lock() - * again: - * obj = lockless_lookup(key); - * if (obj) { - * if (!try_get_ref(obj)) // might fail for free objects - * goto again; - * - * if (obj->key != key) { // not the object we expected - * put_ref(obj); - * goto again; - * } - * } - * rcu_read_unlock(); - * - * See also the comment on struct slab_rcu in mm/slab.c. - */ #define SLAB_DESTROY_BY_RCU 0x00080000UL /* Defer freeing slabs to RCU */ #define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */ #define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */ diff --git a/trunk/include/linux/usb.h b/trunk/include/linux/usb.h index f72aa51f7bcd..8fa973bede5e 100644 --- a/trunk/include/linux/usb.h +++ b/trunk/include/linux/usb.h @@ -108,7 +108,6 @@ enum usb_interface_condition { * (in probe()), bound to a driver, or unbinding (in disconnect()) * @is_active: flag set when the interface is bound and not suspended. * @sysfs_files_created: sysfs attributes exist - * @unregistering: flag set when the interface is being unregistered * @needs_remote_wakeup: flag set when the driver requires remote-wakeup * capability during autosuspend. * @needs_altsetting0: flag set when a set-interface request for altsetting 0 @@ -164,7 +163,6 @@ struct usb_interface { enum usb_interface_condition condition; /* state of binding */ unsigned is_active:1; /* the interface is not suspended */ unsigned sysfs_files_created:1; /* the sysfs attributes exist */ - unsigned unregistering:1; /* unregistration is in progress */ unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */ unsigned needs_binding:1; /* needs delayed unbind/rebind */ diff --git a/trunk/init/Kconfig b/trunk/init/Kconfig index 226da2733c1e..86b00c53fade 100644 --- a/trunk/init/Kconfig +++ b/trunk/init/Kconfig @@ -771,7 +771,8 @@ config SLAB help The regular slab allocator that is established and known to work well in all environments. It organizes cache hot objects in - per cpu and per node queues. + per cpu and per node queues. SLAB is the default choice for + a slab allocator. config SLUB bool "SLUB (Unqueued Allocator)" @@ -780,8 +781,7 @@ config SLUB instead of managing queues of cached objects (SLAB approach). Per cpu caching is realized using slabs of objects instead of queues of objects. SLUB can use memory efficiently - and has enhanced diagnostics. SLUB is the default choice for - a slab allocator. + and has enhanced diagnostics. config SLOB depends on EMBEDDED diff --git a/trunk/kernel/audit_tree.c b/trunk/kernel/audit_tree.c index 8b509441f49a..8ba0e0d934f2 100644 --- a/trunk/kernel/audit_tree.c +++ b/trunk/kernel/audit_tree.c @@ -24,7 +24,6 @@ struct audit_chunk { struct list_head trees; /* with root here */ int dead; int count; - atomic_long_t refs; struct rcu_head head; struct node { struct list_head list; @@ -57,8 +56,7 @@ static LIST_HEAD(prune_list); * tree is refcounted; one reference for "some rules on rules_list refer to * it", one for each chunk with pointer to it. * - * chunk is refcounted by embedded inotify_watch + .refs (non-zero refcount - * of watch contributes 1 to .refs). + * chunk is refcounted by embedded inotify_watch. * * node.index allows to get from node.list to containing chunk. * MSB of that sucker is stolen to mark taggings that we might have to @@ -123,7 +121,6 @@ static struct audit_chunk *alloc_chunk(int count) INIT_LIST_HEAD(&chunk->hash); INIT_LIST_HEAD(&chunk->trees); chunk->count = count; - atomic_long_set(&chunk->refs, 1); for (i = 0; i < count; i++) { INIT_LIST_HEAD(&chunk->owners[i].list); chunk->owners[i].index = i; @@ -132,8 +129,9 @@ static struct audit_chunk *alloc_chunk(int count) return chunk; } -static void free_chunk(struct audit_chunk *chunk) +static void __free_chunk(struct rcu_head *rcu) { + struct audit_chunk *chunk = container_of(rcu, struct audit_chunk, head); int i; for (i = 0; i < chunk->count; i++) { @@ -143,16 +141,14 @@ static void free_chunk(struct audit_chunk *chunk) kfree(chunk); } -void audit_put_chunk(struct audit_chunk *chunk) +static inline void free_chunk(struct audit_chunk *chunk) { - if (atomic_long_dec_and_test(&chunk->refs)) - free_chunk(chunk); + call_rcu(&chunk->head, __free_chunk); } -static void __put_chunk(struct rcu_head *rcu) +void audit_put_chunk(struct audit_chunk *chunk) { - struct audit_chunk *chunk = container_of(rcu, struct audit_chunk, head); - audit_put_chunk(chunk); + put_inotify_watch(&chunk->watch); } enum {HASH_SIZE = 128}; @@ -180,7 +176,7 @@ struct audit_chunk *audit_tree_lookup(const struct inode *inode) list_for_each_entry_rcu(p, list, hash) { if (p->watch.inode == inode) { - atomic_long_inc(&p->refs); + get_inotify_watch(&p->watch); return p; } } @@ -198,49 +194,17 @@ int audit_tree_match(struct audit_chunk *chunk, struct audit_tree *tree) /* tagging and untagging inodes with trees */ -static struct audit_chunk *find_chunk(struct node *p) -{ - int index = p->index & ~(1U<<31); - p -= index; - return container_of(p, struct audit_chunk, owners[0]); -} - -static void untag_chunk(struct node *p) +static void untag_chunk(struct audit_chunk *chunk, struct node *p) { - struct audit_chunk *chunk = find_chunk(p); struct audit_chunk *new; struct audit_tree *owner; int size = chunk->count - 1; int i, j; - if (!pin_inotify_watch(&chunk->watch)) { - /* - * Filesystem is shutting down; all watches are getting - * evicted, just take it off the node list for this - * tree and let the eviction logics take care of the - * rest. - */ - owner = p->owner; - if (owner->root == chunk) { - list_del_init(&owner->same_root); - owner->root = NULL; - } - list_del_init(&p->list); - p->owner = NULL; - put_tree(owner); - return; - } - - spin_unlock(&hash_lock); - - /* - * pin_inotify_watch() succeeded, so the watch won't go away - * from under us. - */ mutex_lock(&chunk->watch.inode->inotify_mutex); if (chunk->dead) { mutex_unlock(&chunk->watch.inode->inotify_mutex); - goto out; + return; } owner = p->owner; @@ -257,7 +221,7 @@ static void untag_chunk(struct node *p) inotify_evict_watch(&chunk->watch); mutex_unlock(&chunk->watch.inode->inotify_mutex); put_inotify_watch(&chunk->watch); - goto out; + return; } new = alloc_chunk(size); @@ -299,7 +263,7 @@ static void untag_chunk(struct node *p) inotify_evict_watch(&chunk->watch); mutex_unlock(&chunk->watch.inode->inotify_mutex); put_inotify_watch(&chunk->watch); - goto out; + return; Fallback: // do the best we can @@ -313,9 +277,6 @@ static void untag_chunk(struct node *p) put_tree(owner); spin_unlock(&hash_lock); mutex_unlock(&chunk->watch.inode->inotify_mutex); -out: - unpin_inotify_watch(&chunk->watch); - spin_lock(&hash_lock); } static int create_chunk(struct inode *inode, struct audit_tree *tree) @@ -426,6 +387,13 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree) return 0; } +static struct audit_chunk *find_chunk(struct node *p) +{ + int index = p->index & ~(1U<<31); + p -= index; + return container_of(p, struct audit_chunk, owners[0]); +} + static void kill_rules(struct audit_tree *tree) { struct audit_krule *rule, *next; @@ -463,10 +431,17 @@ static void prune_one(struct audit_tree *victim) spin_lock(&hash_lock); while (!list_empty(&victim->chunks)) { struct node *p; + struct audit_chunk *chunk; p = list_entry(victim->chunks.next, struct node, list); + chunk = find_chunk(p); + get_inotify_watch(&chunk->watch); + spin_unlock(&hash_lock); + + untag_chunk(chunk, p); - untag_chunk(p); + put_inotify_watch(&chunk->watch); + spin_lock(&hash_lock); } spin_unlock(&hash_lock); put_tree(victim); @@ -494,6 +469,7 @@ static void trim_marked(struct audit_tree *tree) while (!list_empty(&tree->chunks)) { struct node *node; + struct audit_chunk *chunk; node = list_entry(tree->chunks.next, struct node, list); @@ -501,7 +477,14 @@ static void trim_marked(struct audit_tree *tree) if (!(node->index & (1U<<31))) break; - untag_chunk(node); + chunk = find_chunk(node); + get_inotify_watch(&chunk->watch); + spin_unlock(&hash_lock); + + untag_chunk(chunk, node); + + put_inotify_watch(&chunk->watch); + spin_lock(&hash_lock); } if (!tree->root && !tree->goner) { tree->goner = 1; @@ -895,7 +878,7 @@ static void handle_event(struct inotify_watch *watch, u32 wd, u32 mask, static void destroy_watch(struct inotify_watch *watch) { struct audit_chunk *chunk = container_of(watch, struct audit_chunk, watch); - call_rcu(&chunk->head, __put_chunk); + free_chunk(chunk); } static const struct inotify_operations rtree_inotify_ops = { diff --git a/trunk/kernel/auditfilter.c b/trunk/kernel/auditfilter.c index 9fd85a4640a0..b7d354e2b0ef 100644 --- a/trunk/kernel/auditfilter.c +++ b/trunk/kernel/auditfilter.c @@ -1094,8 +1094,8 @@ static void audit_inotify_unregister(struct list_head *in_list) list_for_each_entry_safe(p, n, in_list, ilist) { list_del(&p->ilist); inotify_rm_watch(audit_ih, &p->wdata); - /* the unpin matching the pin in audit_do_del_rule() */ - unpin_inotify_watch(&p->wdata); + /* the put matching the get in audit_do_del_rule() */ + put_inotify_watch(&p->wdata); } } @@ -1389,13 +1389,9 @@ static inline int audit_del_rule(struct audit_entry *entry, /* Put parent on the inotify un-registration * list. Grab a reference before releasing * audit_filter_mutex, to be released in - * audit_inotify_unregister(). - * If filesystem is going away, just leave - * the sucker alone, eviction will take - * care of it. - */ - if (pin_inotify_watch(&parent->wdata)) - list_add(&parent->ilist, &inotify_list); + * audit_inotify_unregister(). */ + list_add(&parent->ilist, &inotify_list); + get_inotify_watch(&parent->wdata); } } } diff --git a/trunk/kernel/exit.c b/trunk/kernel/exit.c index 2d8be7ebb0f7..ae2b92be5fae 100644 --- a/trunk/kernel/exit.c +++ b/trunk/kernel/exit.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include /* for audit_free() */ #include @@ -1058,6 +1059,14 @@ NORET_TYPE void do_exit(long code) exit_itimers(tsk->signal); } acct_collect(code, group_dead); +#ifdef CONFIG_FUTEX + if (unlikely(tsk->robust_list)) + exit_robust_list(tsk); +#ifdef CONFIG_COMPAT + if (unlikely(tsk->compat_robust_list)) + compat_exit_robust_list(tsk); +#endif +#endif if (group_dead) tty_audit_exit(); if (unlikely(tsk->audit_context)) diff --git a/trunk/kernel/fork.c b/trunk/kernel/fork.c index 2a372a0e206f..f6083561dfe0 100644 --- a/trunk/kernel/fork.c +++ b/trunk/kernel/fork.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -520,16 +519,6 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm) { struct completion *vfork_done = tsk->vfork_done; - /* Get rid of any futexes when releasing the mm */ -#ifdef CONFIG_FUTEX - if (unlikely(tsk->robust_list)) - exit_robust_list(tsk); -#ifdef CONFIG_COMPAT - if (unlikely(tsk->compat_robust_list)) - compat_exit_robust_list(tsk); -#endif -#endif - /* Get rid of any cached register state */ deactivate_mm(tsk, mm); diff --git a/trunk/mm/vmscan.c b/trunk/mm/vmscan.c index c141b3e78071..3b5860294bb6 100644 --- a/trunk/mm/vmscan.c +++ b/trunk/mm/vmscan.c @@ -2368,6 +2368,39 @@ int page_evictable(struct page *page, struct vm_area_struct *vma) return 1; } +static void show_page_path(struct page *page) +{ + char buf[256]; + if (page_is_file_cache(page)) { + struct address_space *mapping = page->mapping; + struct dentry *dentry; + pgoff_t pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); + + spin_lock(&mapping->i_mmap_lock); + dentry = d_find_alias(mapping->host); + printk(KERN_INFO "rescued: %s %lu\n", + dentry_path(dentry, buf, 256), pgoff); + spin_unlock(&mapping->i_mmap_lock); + } else { +#if defined(CONFIG_MM_OWNER) && defined(CONFIG_MMU) + struct anon_vma *anon_vma; + struct vm_area_struct *vma; + + anon_vma = page_lock_anon_vma(page); + if (!anon_vma) + return; + + list_for_each_entry(vma, &anon_vma->head, anon_vma_node) { + printk(KERN_INFO "rescued: anon %s\n", + vma->vm_mm->owner->comm); + break; + } + page_unlock_anon_vma(anon_vma); +#endif + } +} + + /** * check_move_unevictable_page - check page for evictability and move to appropriate zone lru list * @page: page to check evictability and move to appropriate lru list @@ -2388,6 +2421,8 @@ static void check_move_unevictable_page(struct page *page, struct zone *zone) if (page_evictable(page, NULL)) { enum lru_list l = LRU_INACTIVE_ANON + page_is_file_cache(page); + show_page_path(page); + __dec_zone_state(zone, NR_UNEVICTABLE); list_move(&page->lru, &zone->lru[l].list); __inc_zone_state(zone, NR_INACTIVE_ANON + l); diff --git a/trunk/net/9p/Kconfig b/trunk/net/9p/Kconfig index 0663f99e977a..c42c0c400bf9 100644 --- a/trunk/net/9p/Kconfig +++ b/trunk/net/9p/Kconfig @@ -13,24 +13,22 @@ menuconfig NET_9P If unsure, say N. -if NET_9P - config NET_9P_VIRTIO - depends on EXPERIMENTAL && VIRTIO + depends on NET_9P && EXPERIMENTAL && VIRTIO tristate "9P Virtio Transport (Experimental)" help This builds support for a transports between guest partitions and a host partition. config NET_9P_RDMA - depends on INET && INFINIBAND && EXPERIMENTAL + depends on NET_9P && INFINIBAND && EXPERIMENTAL tristate "9P RDMA Transport (Experimental)" help - This builds support for an RDMA transport. + This builds support for a RDMA transport. config NET_9P_DEBUG bool "Debug information" + depends on NET_9P help Say Y if you want the 9P subsystem to log debug information. -endif