diff --git a/[refs] b/[refs] index 32502aa0363b..af055e7beb80 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2e824ad59f678a1ff920144fda9b7dd0815fc010 +refs/heads/master: 16252da654800461e0e1c32697cb59f4cda15aa9 diff --git a/trunk/Documentation/00-INDEX b/trunk/Documentation/00-INDEX index c3014df066c4..299615d821ac 100644 --- a/trunk/Documentation/00-INDEX +++ b/trunk/Documentation/00-INDEX @@ -262,8 +262,6 @@ mtrr.txt - how to use PPro Memory Type Range Registers to increase performance. 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/ diff --git a/trunk/Documentation/DocBook/Makefile b/trunk/Documentation/DocBook/Makefile index 4953bc258729..054a7ecf64c6 100644 --- a/trunk/Documentation/DocBook/Makefile +++ b/trunk/Documentation/DocBook/Makefile @@ -11,7 +11,7 @@ DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \ procfs-guide.xml writing_usb_driver.xml \ kernel-api.xml filesystems.xml lsm.xml usb.xml \ gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ - genericirq.xml s390-drivers.xml uio-howto.xml + genericirq.xml s390-drivers.xml ### # The build process is as follows (targets): diff --git a/trunk/Documentation/DocBook/uio-howto.tmpl b/trunk/Documentation/DocBook/uio-howto.tmpl index fdd7f4f887b7..c119484258b8 100644 --- a/trunk/Documentation/DocBook/uio-howto.tmpl +++ b/trunk/Documentation/DocBook/uio-howto.tmpl @@ -29,12 +29,6 @@ - - 0.4 - 2007-11-26 - hjk - Removed section about uio_dummy. - 0.3 2007-04-29 @@ -100,26 +94,6 @@ interested in translating it, please email me user space. This simplifies development and reduces the risk of serious bugs within a kernel module. - - Please note that UIO is not an universal driver interface. Devices - that are already handled well by other kernel subsystems (like - networking or serial or USB) are no candidates for an UIO driver. - Hardware that is ideally suited for an UIO driver fulfills all of - the following: - - - - The device has memory that can be mapped. The device can be - controlled completely by writing to this memory. - - - The device usually generates interrupts. - - - The device does not fit into one of the standard kernel - subsystems. - - @@ -200,9 +174,8 @@ interested in translating it, please email me For cards that don't generate interrupts but need to be polled, there is the possibility to set up a timer that triggers the interrupt handler at configurable time intervals. - This interrupt simulation is done by calling - uio_event_notify() - from the timer's event handler. + See drivers/uio/uio_dummy.c for an + example of this technique. @@ -290,11 +263,63 @@ offset = N * getpagesize(); + + +Using uio_dummy + + Well, there is no real use for uio_dummy. Its only purpose is + to test most parts of the UIO system (everything except + hardware interrupts), and to serve as an example for the + kernel module that you will have to write yourself. + + + +What uio_dummy does + + The kernel module uio_dummy.ko creates a + device that uses a timer to generate periodic interrupts. The + interrupt handler does nothing but increment a counter. The + driver adds two custom attributes, count + and freq, that appear under + /sys/devices/platform/uio_dummy/. + + + + The attribute count can be read and + written. The associated file + /sys/devices/platform/uio_dummy/count + appears as a normal text file and contains the total number of + timer interrupts. If you look at it (e.g. using + cat), you'll notice it is slowly counting + up. + + + + The attribute freq can be read and written. + The content of + /sys/devices/platform/uio_dummy/freq + represents the number of system timer ticks between two timer + interrupts. The default value of freq is + the value of the kernel variable HZ, which + gives you an interval of one second. Lower values will + increase the frequency. Try the following: + + +cd /sys/devices/platform/uio_dummy/ +echo 100 > freq + + + Use cat count to see how the interrupt + frequency changes. + + + + Writing your own kernel module - Please have a look at uio_cif.c as an + Please have a look at uio_dummy.c as an example. The following paragraphs explain the different sections of this file. @@ -329,8 +354,9 @@ See the description below for details. interrupt, it's your modules task to determine the irq number during initialization. If you don't have a hardware generated interrupt but want to trigger the interrupt handler in some other way, set -irq to UIO_IRQ_CUSTOM. -If you had no interrupt at all, you could set +irq to UIO_IRQ_CUSTOM. The +uio_dummy module does this as it triggers the event mechanism in a timer +routine. If you had no interrupt at all, you could set irq to UIO_IRQ_NONE, though this rarely makes sense. diff --git a/trunk/Documentation/namespaces/compatibility-list.txt b/trunk/Documentation/namespaces/compatibility-list.txt deleted file mode 100644 index defc5589bfcd..000000000000 --- a/trunk/Documentation/namespaces/compatibility-list.txt +++ /dev/null @@ -1,39 +0,0 @@ - Namespaces compatibility list - -This document contains the information about the problems user -may have when creating tasks living in different namespaces. - -Here's the summary. This matrix shows the known problems, that -occur when tasks share some namespace (the columns) while living -in different other namespaces (the rows): - - UTS IPC VFS PID User Net -UTS X -IPC X 1 -VFS X -PID 1 1 X -User 2 2 X -Net X - -1. Both the IPC and the PID namespaces provide IDs to address - object inside the kernel. E.g. semaphore with IPCID or - process group with pid. - - In both cases, tasks shouldn't try exposing this ID to some - other task living in a different namespace via a shared filesystem - or IPC shmem/message. The fact is that this ID is only valid - within the namespace it was obtained in and may refer to some - other object in another namespace. - -2. Intentionally, two equal user IDs in different user namespaces - should not be equal from the VFS point of view. In other - words, user 10 in one user namespace shouldn't have the same - access permissions to files, belonging to user 10 in another - namespace. - - The same is true for the IPC namespaces being shared - two users - from different user namespaces should not access the same IPC objects - even having equal UIDs. - - But currently this is not so. - diff --git a/trunk/Documentation/tty.txt b/trunk/Documentation/tty.txt index 8e65c4498c52..048a8762cfb5 100644 --- a/trunk/Documentation/tty.txt +++ b/trunk/Documentation/tty.txt @@ -132,14 +132,6 @@ set_termios() Notify the tty driver that the device's termios tty->termios. Previous settings should be passed in the "old" argument. - The API is defined such that the driver should return - the actual modes selected. This means that the - driver function is responsible for modifying any - bits in the request it cannot fulfill to indicate - the actual modes being used. A device with no - hardware capability for change (eg a USB dongle or - virtual port) can provide NULL for this method. - throttle() Notify the tty driver that input buffers for the line discipline are close to full, and it should somehow signal that no more characters should be diff --git a/trunk/Documentation/usb/power-management.txt b/trunk/Documentation/usb/power-management.txt index b2fc4d4a9917..97842deec471 100644 --- a/trunk/Documentation/usb/power-management.txt +++ b/trunk/Documentation/usb/power-management.txt @@ -278,14 +278,6 @@ optional. The methods' jobs are quite simple: (although the interfaces will be in the same altsettings as before the suspend). -If the device is disconnected or powered down while it is suspended, -the disconnect method will be called instead of the resume or -reset_resume method. This is also quite likely to happen when -waking up from hibernation, as many systems do not maintain suspend -current to the USB host controllers during hibernation. (It's -possible to work around the hibernation-forces-disconnect problem by -using the USB Persist facility.) - The reset_resume method is used by the USB Persist facility (see Documentation/usb/persist.txt) and it can also be used under certain circumstances when CONFIG_USB_PERSIST is not enabled. Currently, if a diff --git a/trunk/Documentation/x86_64/uefi.txt b/trunk/Documentation/x86_64/uefi.txt deleted file mode 100644 index 91a98edfb588..000000000000 --- a/trunk/Documentation/x86_64/uefi.txt +++ /dev/null @@ -1,29 +0,0 @@ -General note on [U]EFI x86_64 support -------------------------------------- - -The nomenclature EFI and UEFI are used interchangeably in this document. - -Although the tools below are _not_ needed for building the kernel, -the needed bootloader support and associated tools for x86_64 platforms -with EFI firmware and specifications are listed below. - -1. UEFI specification: http://www.uefi.org - -2. Booting Linux kernel on UEFI x86_64 platform requires bootloader - support. Elilo with x86_64 support can be used. - -3. x86_64 platform with EFI/UEFI firmware. - -Mechanics: ---------- -- Build the kernel with the following configuration. - CONFIG_FB_EFI=y - CONFIG_FRAMEBUFFER_CONSOLE=y -- Create a VFAT partition on the disk -- Copy the following to the VFAT partition: - elilo bootloader with x86_64 support, elilo configuration file, - kernel image built in first step and corresponding - initrd. Instructions on building elilo and its dependencies - can be found in the elilo sourceforge project. -- Boot to EFI shell and invoke elilo choosing the kernel image built - in first step. diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index ac425b5b4a40..f5bd9bab7ed6 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -323,7 +323,8 @@ S: Maintained ALCATEL SPEEDTOUCH USB DRIVER P: Duncan Sands M: duncan.sands@free.fr -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net W: http://www.linux-usb.org/SpeedTouch/ S: Maintained @@ -1042,7 +1043,7 @@ S: Maintained CIRRUS LOGIC EP93XX OHCI USB HOST DRIVER P: Lennert Buytenhek M: kernel@wantstofly.org -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net S: Maintained CIRRUS LOGIC CS4280/CS461x SOUNDDRIVER @@ -1551,7 +1552,7 @@ S: Maintained FREESCALE HIGHSPEED USB DEVICE DRIVER P: Li Yang M: leoli@freescale.com -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: linuxppc-dev@ozlabs.org S: Maintained @@ -2110,14 +2111,6 @@ L: irda-users@lists.sourceforge.net (subscribers-only) W: http://irda.sourceforge.net/ S: Maintained -ISCSI -P: Mike Christie -M: michaelc@cs.wisc.edu -L: open-iscsi@googlegroups.com -W: www.open-iscsi.org -T: git kernel.org:/pub/scm/linux/kernel/mnc/linux-2.6-iscsi.git -S: Maintained - ISAPNP P: Jaroslav Kysela M: perex@perex.cz @@ -3817,20 +3810,22 @@ S: Maintained USB ACM DRIVER P: Oliver Neukum M: oliver@neukum.name -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB BLOCK DRIVER (UB ub) P: Pete Zaitcev M: zaitcev@redhat.com L: linux-kernel@vger.kernel.org -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net S: Supported USB CDC ETHERNET DRIVER P: Greg Kroah-Hartman M: greg@kroah.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained W: http://www.kroah.com/linux-usb/ @@ -3844,13 +3839,13 @@ S: Maintained USB EHCI DRIVER P: David Brownell M: dbrownell@users.sourceforge.net -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net S: Odd Fixes USB ET61X[12]51 DRIVER P: Luca Risolia M: luca.risolia@studio.unibo.it -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: video4linux-list@redhat.com W: http://www.linux-projects.org S: Maintained @@ -3858,33 +3853,41 @@ S: Maintained USB GADGET/PERIPHERAL SUBSYSTEM P: David Brownell M: dbrownell@users.sourceforge.net -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net W: http://www.linux-usb.org/gadget S: Maintained USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REMOTE CONTROLS, ...) P: Jiri Kosina M: jkosina@suse.cz -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net T: git kernel.org:/pub/scm/linux/kernel/git/jikos/hid.git S: Maintained +USB HUB DRIVER +P: Johannes Erdfelt +M: johannes@erdfelt.com +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net +S: Maintained + USB ISP116X DRIVER P: Olav Kongas M: ok@artecdesign.ee -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB KAWASAKI LSI DRIVER P: Oliver Neukum M: oliver@neukum.name -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB MASS STORAGE DRIVER P: Matthew Dharm M: mdharm-usb@one-eyed-alien.net -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net L: usb-storage@lists.one-eyed-alien.net S: Maintained W: http://www.one-eyed-alien.net/~mdharm/linux-usb/ @@ -3892,26 +3895,28 @@ W: http://www.one-eyed-alien.net/~mdharm/linux-usb/ USB OHCI DRIVER P: David Brownell M: dbrownell@users.sourceforge.net -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Odd Fixes USB OPTION-CARD DRIVER P: Matthias Urlichs M: smurf@smurf.noris.de -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB OV511 DRIVER P: Mark McClelland M: mmcclell@bigfoot.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net W: http://alpha.dyndns.org/ov511/ S: Maintained USB PEGASUS DRIVER P: Petko Manolov M: petkan@users.sourceforge.net -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: netdev@vger.kernel.org W: http://pegasus2.sourceforge.net/ S: Maintained @@ -3919,13 +3924,14 @@ S: Maintained USB PRINTER DRIVER (usblp) P: Pete Zaitcev M: zaitcev@redhat.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Supported USB RTL8150 DRIVER P: Petko Manolov M: petkan@users.sourceforge.net -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: netdev@vger.kernel.org W: http://pegasus2.sourceforge.net/ S: Maintained @@ -3933,7 +3939,8 @@ S: Maintained USB SE401 DRIVER P: Jeroen Vreeken M: pe1rxq@amsat.org -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net W: http://www.chello.nl/~j.vreeken/se401/ S: Maintained @@ -3947,59 +3954,72 @@ USB SERIAL DIGI ACCELEPORT DRIVER P: Peter Berger and Al Borchers M: pberger@brimson.com M: alborchers@steinerpoint.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB SERIAL DRIVER P: Greg Kroah-Hartman M: gregkh@suse.de -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Supported USB SERIAL BELKIN F5U103 DRIVER P: William Greathouse M: wgreathouse@smva.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB SERIAL CYPRESS M8 DRIVER P: Lonnie Mendez M: dignome@gmail.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained W: http://geocities.com/i0xox0i W: http://firstlight.net/cvs +USB SERIAL CYBERJACK PINPAD/E-COM DRIVER +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net +S: Maintained + USB AUERSWALD DRIVER P: Wolfgang Muees M: wolfgang@iksw-muees.de -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB SERIAL EMPEG EMPEG-CAR MARK I/II DRIVER P: Gary Brubaker M: xavyer@ix.netcom.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB SERIAL KEYSPAN DRIVER P: Greg Kroah-Hartman M: greg@kroah.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net W: http://www.kroah.com/linux/ S: Maintained USB SERIAL WHITEHEAT DRIVER P: Support Department M: support@connecttech.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net W: http://www.connecttech.com S: Supported USB SN9C1xx DRIVER P: Luca Risolia M: luca.risolia@studio.unibo.it -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: video4linux-list@redhat.com W: http://www.linux-projects.org S: Maintained @@ -4007,7 +4027,8 @@ S: Maintained USB SUBSYSTEM P: Greg Kroah-Hartman M: gregkh@suse.de -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net W: http://www.linux-usb.org T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ S: Supported @@ -4015,7 +4036,8 @@ S: Supported USB UHCI DRIVER P: Alan Stern M: stern@rowland.harvard.edu -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB "USBNET" DRIVER FRAMEWORK @@ -4028,7 +4050,7 @@ S: Maintained USB W996[87]CF DRIVER P: Luca Risolia M: luca.risolia@studio.unibo.it -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: video4linux-list@redhat.com W: http://www.linux-projects.org S: Maintained @@ -4036,7 +4058,7 @@ S: Maintained USB ZC0301 DRIVER P: Luca Risolia M: luca.risolia@studio.unibo.it -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: video4linux-list@redhat.com W: http://www.linux-projects.org S: Maintained @@ -4044,14 +4066,15 @@ S: Maintained USB ZD1201 DRIVER P: Jeroen Vreeken M: pe1rxq@amsat.org -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net W: http://linux-lc100020.sourceforge.net S: Maintained USB ZR364XX DRIVER P: Antoine Jacquet M: royale@zerezo.com -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: video4linux-list@redhat.com W: http://royale.zerezo.com/zr364xx/ S: Maintained diff --git a/trunk/arch/frv/kernel/break.S b/trunk/arch/frv/kernel/break.S index bd0bdf908d93..dac4a5f68c2e 100644 --- a/trunk/arch/frv/kernel/break.S +++ b/trunk/arch/frv/kernel/break.S @@ -63,7 +63,7 @@ __break_trace_through_exceptions: # entry point for Break Exceptions/Interrupts # ############################################################################### - .section .text.break + .text .balign 4 .globl __entry_break __entry_break: diff --git a/trunk/arch/frv/kernel/entry.S b/trunk/arch/frv/kernel/entry.S index f926c7094776..1e74f3c5cee2 100644 --- a/trunk/arch/frv/kernel/entry.S +++ b/trunk/arch/frv/kernel/entry.S @@ -38,7 +38,7 @@ #define nr_syscalls ((syscall_table_size)/4) - .section .text.entry + .text .balign 4 .macro LEDS val diff --git a/trunk/arch/frv/kernel/vmlinux.lds.S b/trunk/arch/frv/kernel/vmlinux.lds.S index a17a81d58bf6..3b71e0c86399 100644 --- a/trunk/arch/frv/kernel/vmlinux.lds.S +++ b/trunk/arch/frv/kernel/vmlinux.lds.S @@ -76,12 +76,6 @@ SECTIONS *(.data.init_task) } - . = ALIGN(4096); - .data.page_aligned : { *(.data.idt) } - - . = ALIGN(L1_CACHE_BYTES); - .data.cacheline_aligned : { *(.data.cacheline_aligned) } - .trap : { /* trap table management - read entry-table.S before modifying */ . = ALIGN(8192); @@ -92,25 +86,28 @@ SECTIONS *(.trap.break) } + . = ALIGN(4096); + .data.page_aligned : { *(.data.idt) } + + . = ALIGN(L1_CACHE_BYTES); + .data.cacheline_aligned : { *(.data.cacheline_aligned) } + /* Text and read-only data */ . = ALIGN(4); _text = .; _stext = .; .text : { - *(.text.start) - *(.text.entry) - *(.text.break) - *(.text.tlbmiss) - TEXT_TEXT - SCHED_TEXT - LOCK_TEXT -#ifdef CONFIG_DEBUG_INFO *( + .text.start .text.* +#ifdef CONFIG_DEBUG_INFO .init.text .exit.text .exitcall.exit - ) #endif + ) + TEXT_TEXT + SCHED_TEXT + LOCK_TEXT *(.fixup) *(.gnu.warning) *(.exitcall.exit) diff --git a/trunk/arch/frv/mm/tlb-miss.S b/trunk/arch/frv/mm/tlb-miss.S index 07643482cad2..04da67468378 100644 --- a/trunk/arch/frv/mm/tlb-miss.S +++ b/trunk/arch/frv/mm/tlb-miss.S @@ -16,7 +16,7 @@ #include #include - .section .text.tlbmiss + .section .text .balign 4 .globl __entry_insn_mmu_miss diff --git a/trunk/arch/mips/sgi-ip22/ip22-setup.c b/trunk/arch/mips/sgi-ip22/ip22-setup.c index 5f389ee26fca..174f09e42f6b 100644 --- a/trunk/arch/mips/sgi-ip22/ip22-setup.c +++ b/trunk/arch/mips/sgi-ip22/ip22-setup.c @@ -31,6 +31,25 @@ unsigned long sgi_gfxaddr; EXPORT_SYMBOL_GPL(sgi_gfxaddr); +/* + * Stop-A is originally a Sun thing that isn't standard on IP22 so to avoid + * accidents it's disabled by default on IP22. + * + * FIXME: provide a mechanism to change the value of stop_a_enabled. + */ +int stop_a_enabled; + +void ip22_do_break(void) +{ + if (!stop_a_enabled) + return; + + printk("\n"); + ArcEnterInteractiveMode(); +} + +EXPORT_SYMBOL(ip22_do_break); + extern void ip22_be_init(void) __init; void __init plat_mem_setup(void) diff --git a/trunk/arch/powerpc/Kconfig b/trunk/arch/powerpc/Kconfig index 232c298c933f..18f397ca05ef 100644 --- a/trunk/arch/powerpc/Kconfig +++ b/trunk/arch/powerpc/Kconfig @@ -187,11 +187,6 @@ config FORCE_MAX_ZONEORDER default "9" if PPC_64K_PAGES default "13" -config HUGETLB_PAGE_SIZE_VARIABLE - bool - depends on HUGETLB_PAGE - default y - config MATH_EMULATION bool "Math emulation" depends on 4xx || 8xx || E200 || PPC_MPC832x || E500 diff --git a/trunk/arch/um/Makefile b/trunk/arch/um/Makefile index ba6813a4aa37..31999bc1c8a4 100644 --- a/trunk/arch/um/Makefile +++ b/trunk/arch/um/Makefile @@ -168,7 +168,7 @@ ifneq ($(KBUILD_SRC),) $(Q)mkdir -p $(objtree)/include/asm-um $(Q)ln -fsn $(srctree)/include/asm-$(HEADER_ARCH) include/asm-um/arch else - $(Q)cd $(TOPDIR)/include/asm-um && ln -fsn ../asm-$(HEADER_ARCH) arch + $(Q)cd $(TOPDIR)/include/asm-um && ln -fsn ../asm-$(SUBARCH) arch endif $(objtree)/$(ARCH_DIR)/include: diff --git a/trunk/arch/um/drivers/ubd_kern.c b/trunk/arch/um/drivers/ubd_kern.c index b1a77b11f089..7e6cdde62ead 100644 --- a/trunk/arch/um/drivers/ubd_kern.c +++ b/trunk/arch/um/drivers/ubd_kern.c @@ -1128,7 +1128,6 @@ static void do_ubd_request(struct request_queue *q) "errno = %d\n", -n); else if(list_empty(&dev->restart)) list_add(&dev->restart, &restart); - kfree(io_req); return; } diff --git a/trunk/arch/um/os-Linux/time.c b/trunk/arch/um/os-Linux/time.c index ef02d941c2ad..e34e1effe0f5 100644 --- a/trunk/arch/um/os-Linux/time.c +++ b/trunk/arch/um/os-Linux/time.c @@ -59,7 +59,7 @@ long long disable_timer(void) { struct itimerval time = ((struct itimerval) { { 0, 0 }, { 0, 0 } }); - if (setitimer(ITIMER_VIRTUAL, &time, &time) < 0) + if(setitimer(ITIMER_VIRTUAL, &time, &time) < 0) printk(UM_KERN_ERR "disable_timer - setitimer failed, " "errno = %d\n", errno); @@ -74,61 +74,13 @@ long long os_nsecs(void) return timeval_to_ns(&tv); } -#ifdef UML_CONFIG_NO_HZ -static int after_sleep_interval(struct timespec *ts) -{ -} -#else -static inline long long timespec_to_us(const struct timespec *ts) -{ - return ((long long) ts->tv_sec * UM_USEC_PER_SEC) + - ts->tv_nsec / UM_NSEC_PER_USEC; -} - -static int after_sleep_interval(struct timespec *ts) -{ - int usec = UM_USEC_PER_SEC / UM_HZ; - long long start_usecs = timespec_to_us(ts); - struct timeval tv; - struct itimerval interval; - - /* - * It seems that rounding can increase the value returned from - * setitimer to larger than the one passed in. Over time, - * this will cause the remaining time to be greater than the - * tick interval. If this happens, then just reduce the first - * tick to the interval value. - */ - if (start_usecs > usec) - start_usecs = usec; - tv = ((struct timeval) { .tv_sec = start_usecs / UM_USEC_PER_SEC, - .tv_usec = start_usecs % UM_USEC_PER_SEC }); - interval = ((struct itimerval) { { 0, usec }, tv }); - - if (setitimer(ITIMER_VIRTUAL, &interval, NULL) == -1) - return -errno; - - return 0; -} -#endif - extern void alarm_handler(int sig, struct sigcontext *sc); void idle_sleep(unsigned long long nsecs) { - struct timespec ts; - - /* - * nsecs can come in as zero, in which case, this starts a - * busy loop. To prevent this, reset nsecs to the tick - * interval if it is zero. - */ - if (nsecs == 0) - nsecs = UM_NSEC_PER_SEC / UM_HZ; - ts = ((struct timespec) { .tv_sec = nsecs / UM_NSEC_PER_SEC, - .tv_nsec = nsecs % UM_NSEC_PER_SEC }); + struct timespec ts = { .tv_sec = nsecs / UM_NSEC_PER_SEC, + .tv_nsec = nsecs % UM_NSEC_PER_SEC }; if (nanosleep(&ts, &ts) == 0) alarm_handler(SIGVTALRM, NULL); - after_sleep_interval(&ts); } diff --git a/trunk/arch/x86/boot/header.S b/trunk/arch/x86/boot/header.S index 6ef5a060fa11..4cc5b0411db5 100644 --- a/trunk/arch/x86/boot/header.S +++ b/trunk/arch/x86/boot/header.S @@ -236,39 +236,30 @@ start_of_setup: movw %ax, %es cld -# Apparently some ancient versions of LILO invoked the kernel -# with %ss != %ds, which happened to work by accident for the -# old code. If the CAN_USE_HEAP flag is set in loadflags, or -# %ss != %ds, then adjust the stack pointer. +# Apparently some ancient versions of LILO invoked the kernel with %ss != %ds, +# which happened to work by accident for the old code. Recalculate the stack +# pointer if %ss is invalid. Otherwise leave it alone, LOADLIN sets up the +# stack behind its own code, so we can't blindly put it directly past the heap. - # Smallest possible stack we can tolerate - movw $(_end+STACK_SIZE), %cx - - movw heap_end_ptr, %dx - addw $512, %dx - jnc 1f - xorw %dx, %dx # Wraparound - whole segment available -1: testb $CAN_USE_HEAP, loadflags - jnz 2f - - # No CAN_USE_HEAP movw %ss, %dx cmpw %ax, %dx # %ds == %ss? movw %sp, %dx - # If so, assume %sp is reasonably set, otherwise use - # the smallest possible stack. - jne 4f # -> Smallest possible stack... + je 2f # -> assume %sp is reasonably set + + # Invalid %ss, make up a new stack + movw $_end, %dx + testb $CAN_USE_HEAP, loadflags + jz 1f + movw heap_end_ptr, %dx +1: addw $STACK_SIZE, %dx + jnc 2f + xorw %dx, %dx # Prevent wraparound - # Make sure the stack is at least minimum size. Take a value - # of zero to mean "full segment." -2: +2: # Now %dx should point to the end of our stack space andw $~3, %dx # dword align (might as well...) jnz 3f movw $0xfffc, %dx # Make sure we're not zero -3: cmpw %cx, %dx - jnb 5f -4: movw %cx, %dx # Minimum value we can possibly use -5: movw %ax, %ss +3: movw %ax, %ss movzwl %dx, %esp # Clear upper half of %esp sti # Now we should have a working stack diff --git a/trunk/arch/x86/kernel/paravirt_32.c b/trunk/arch/x86/kernel/paravirt_32.c index f5000799f8ef..6a80d67c2121 100644 --- a/trunk/arch/x86/kernel/paravirt_32.c +++ b/trunk/arch/x86/kernel/paravirt_32.c @@ -465,8 +465,8 @@ struct pv_mmu_ops pv_mmu_ops = { }; EXPORT_SYMBOL_GPL(pv_time_ops); -EXPORT_SYMBOL (pv_cpu_ops); -EXPORT_SYMBOL (pv_mmu_ops); +EXPORT_SYMBOL_GPL(pv_cpu_ops); +EXPORT_SYMBOL_GPL(pv_mmu_ops); EXPORT_SYMBOL_GPL(pv_apic_ops); EXPORT_SYMBOL_GPL(pv_info); EXPORT_SYMBOL (pv_irq_ops); diff --git a/trunk/arch/x86/lguest/Kconfig b/trunk/arch/x86/lguest/Kconfig index 19626ace0f50..c4dffbeea5e1 100644 --- a/trunk/arch/x86/lguest/Kconfig +++ b/trunk/arch/x86/lguest/Kconfig @@ -2,7 +2,6 @@ config LGUEST_GUEST bool "Lguest guest support" select PARAVIRT depends on !X86_PAE - depends on !(X86_VISWS || X86_VOYAGER) select VIRTIO select VIRTIO_RING select VIRTIO_CONSOLE diff --git a/trunk/arch/x86/mm/init_64.c b/trunk/arch/x86/mm/init_64.c index 0f9c8c890658..a7308b2cd058 100644 --- a/trunk/arch/x86/mm/init_64.c +++ b/trunk/arch/x86/mm/init_64.c @@ -345,7 +345,7 @@ static void __init find_early_table_space(unsigned long end) /* Setup the direct mapping of the physical memory at PAGE_OFFSET. This runs before bootmem is initialized and gets pages directly from the physical memory. To access them they are temporarily mapped. */ -void __init_refok init_memory_mapping(unsigned long start, unsigned long end) +void __meminit init_memory_mapping(unsigned long start, unsigned long end) { unsigned long next; diff --git a/trunk/arch/x86/xen/mmu.c b/trunk/arch/x86/xen/mmu.c index 0ac6c5dc49ba..b2e32f9d0071 100644 --- a/trunk/arch/x86/xen/mmu.c +++ b/trunk/arch/x86/xen/mmu.c @@ -244,8 +244,6 @@ pte_t xen_make_pte(unsigned long long pte) if (pte & 1) pte = phys_to_machine(XPADDR(pte)).maddr; - pte &= ~_PAGE_PCD; - return (pte_t){ pte, pte >> 32 }; } @@ -293,8 +291,6 @@ pte_t xen_make_pte(unsigned long pte) if (pte & _PAGE_PRESENT) pte = phys_to_machine(XPADDR(pte)).maddr; - pte &= ~_PAGE_PCD; - return (pte_t){ pte }; } diff --git a/trunk/drivers/acpi/processor_core.c b/trunk/drivers/acpi/processor_core.c index e48ee4f8749f..015689d295c7 100644 --- a/trunk/drivers/acpi/processor_core.c +++ b/trunk/drivers/acpi/processor_core.c @@ -494,7 +494,7 @@ static int get_cpu_id(acpi_handle handle, u32 acpi_id) if (apic_id == -1) return apic_id; - for_each_possible_cpu(i) { + for (i = 0; i < NR_CPUS; ++i) { if (cpu_physical_id(i) == apic_id) return i; } @@ -632,7 +632,7 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device) return 0; } - BUG_ON((pr->id >= nr_cpu_ids) || (pr->id < 0)); + BUG_ON((pr->id >= NR_CPUS) || (pr->id < 0)); /* * Buggy BIOS check @@ -774,7 +774,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type) pr = acpi_driver_data(device); - if (pr->id >= nr_cpu_ids) { + if (pr->id >= NR_CPUS) { kfree(pr); return 0; } @@ -845,7 +845,7 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device) if (!pr) return -ENODEV; - if ((pr->id >= 0) && (pr->id < nr_cpu_ids)) { + if ((pr->id >= 0) && (pr->id < NR_CPUS)) { kobject_uevent(&(*device)->dev.kobj, KOBJ_ONLINE); } return 0; @@ -883,13 +883,13 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) break; } - if (pr->id >= 0 && (pr->id < nr_cpu_ids)) { + if (pr->id >= 0 && (pr->id < NR_CPUS)) { kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); break; } result = acpi_processor_start(device); - if ((!result) && ((pr->id >= 0) && (pr->id < nr_cpu_ids))) { + if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) { kobject_uevent(&device->dev.kobj, KOBJ_ONLINE); } else { printk(KERN_ERR PREFIX "Device [%s] failed to start\n", @@ -912,7 +912,7 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) return; } - if ((pr->id < nr_cpu_ids) && (cpu_present(pr->id))) + if ((pr->id < NR_CPUS) && (cpu_present(pr->id))) kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); break; default: diff --git a/trunk/drivers/base/core.c b/trunk/drivers/base/core.c index 2683eac30c68..3f4d6aa13990 100644 --- a/trunk/drivers/base/core.c +++ b/trunk/drivers/base/core.c @@ -770,10 +770,9 @@ int device_add(struct device *dev) error = device_add_attrs(dev); if (error) goto AttrsError; - error = dpm_sysfs_add(dev); + error = device_pm_add(dev); if (error) goto PMError; - device_pm_add(dev); error = bus_add_device(dev); if (error) goto BusError; @@ -798,7 +797,6 @@ int device_add(struct device *dev) return error; BusError: device_pm_remove(dev); - dpm_sysfs_remove(dev); PMError: if (dev->bus) blocking_notifier_call_chain(&dev->bus->bus_notifier, diff --git a/trunk/drivers/base/power/Makefile b/trunk/drivers/base/power/Makefile index 44504e6618fb..a803733c839e 100644 --- a/trunk/drivers/base/power/Makefile +++ b/trunk/drivers/base/power/Makefile @@ -1,6 +1,5 @@ obj-y := shutdown.o -obj-$(CONFIG_PM) += sysfs.o -obj-$(CONFIG_PM_SLEEP) += main.o +obj-$(CONFIG_PM_SLEEP) += main.o sysfs.o obj-$(CONFIG_PM_TRACE) += trace.o ifeq ($(CONFIG_DEBUG_DRIVER),y) diff --git a/trunk/drivers/base/power/main.c b/trunk/drivers/base/power/main.c index 691ffb64cc37..0ab4ab21f564 100644 --- a/trunk/drivers/base/power/main.c +++ b/trunk/drivers/base/power/main.c @@ -38,14 +38,20 @@ static DEFINE_MUTEX(dpm_list_mtx); int (*platform_enable_wakeup)(struct device *dev, int is_on); -void device_pm_add(struct device *dev) +int device_pm_add(struct device *dev) { + int error; + pr_debug("PM: Adding info for %s:%s\n", dev->bus ? dev->bus->name : "No Bus", kobject_name(&dev->kobj)); mutex_lock(&dpm_list_mtx); list_add_tail(&dev->power.entry, &dpm_active); + error = dpm_sysfs_add(dev); + if (error) + list_del(&dev->power.entry); mutex_unlock(&dpm_list_mtx); + return error; } void device_pm_remove(struct device *dev) diff --git a/trunk/drivers/base/power/power.h b/trunk/drivers/base/power/power.h index 379da4e958e0..5c4efd493fa5 100644 --- a/trunk/drivers/base/power/power.h +++ b/trunk/drivers/base/power/power.h @@ -13,29 +13,14 @@ extern void device_shutdown(void); extern struct list_head dpm_active; /* The active device list */ -static inline struct device *to_device(struct list_head *entry) +static inline struct device * to_device(struct list_head * entry) { return container_of(entry, struct device, power.entry); } -extern void device_pm_add(struct device *); +extern int device_pm_add(struct device *); extern void device_pm_remove(struct device *); -#else /* CONFIG_PM_SLEEP */ - - -static inline void device_pm_add(struct device *dev) -{ -} - -static inline void device_pm_remove(struct device *dev) -{ -} - -#endif - -#ifdef CONFIG_PM - /* * sysfs.c */ @@ -43,15 +28,16 @@ static inline void device_pm_remove(struct device *dev) extern int dpm_sysfs_add(struct device *); extern void dpm_sysfs_remove(struct device *); -#else /* CONFIG_PM */ +#else /* CONFIG_PM_SLEEP */ + -static inline int dpm_sysfs_add(struct device *dev) +static inline int device_pm_add(struct device * dev) { return 0; } - -static inline void dpm_sysfs_remove(struct device *dev) +static inline void device_pm_remove(struct device * dev) { + } #endif diff --git a/trunk/drivers/char/Kconfig b/trunk/drivers/char/Kconfig index a509b8d79781..bf18d757b876 100644 --- a/trunk/drivers/char/Kconfig +++ b/trunk/drivers/char/Kconfig @@ -457,7 +457,7 @@ config LEGACY_PTYS config LEGACY_PTY_COUNT int "Maximum number of legacy PTY in use" depends on LEGACY_PTYS - range 0 256 + range 1 256 default "256" ---help--- The maximum number of legacy PTYs that can be used at any one time. diff --git a/trunk/drivers/char/tpm/tpm_tis.c b/trunk/drivers/char/tpm/tpm_tis.c index 81503d94fecc..fd771a4d6d18 100644 --- a/trunk/drivers/char/tpm/tpm_tis.c +++ b/trunk/drivers/char/tpm/tpm_tis.c @@ -450,11 +450,6 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, goto out_err; } - if (request_locality(chip, 0) != 0) { - rc = -ENODEV; - goto out_err; - } - vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0)); /* Default timeouts */ @@ -492,6 +487,11 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, if (intfcaps & TPM_INTF_DATA_AVAIL_INT) dev_dbg(dev, "\tData Avail Int Support\n"); + if (request_locality(chip, 0) != 0) { + rc = -ENODEV; + goto out_err; + } + /* INTERRUPT Setup */ init_waitqueue_head(&chip->vendor.read_queue); init_waitqueue_head(&chip->vendor.int_queue); diff --git a/trunk/drivers/dma/Kconfig b/trunk/drivers/dma/Kconfig index c46b7c219ee9..6a7d25fc2470 100644 --- a/trunk/drivers/dma/Kconfig +++ b/trunk/drivers/dma/Kconfig @@ -3,13 +3,11 @@ # menuconfig DMADEVICES - bool "DMA Engine support" + bool "DMA Offload Engine support" depends on (PCI && X86) || ARCH_IOP32X || ARCH_IOP33X || ARCH_IOP13XX help - DMA engines can do asynchronous data transfers without - involving the host CPU. Currently, this framework can be - used to offload memory copies in the network stack and - RAID operations in the MD driver. + Intel(R) offload engines enable offloading memory copies in the + network stack and RAID operations in the MD driver. if DMADEVICES diff --git a/trunk/drivers/isdn/hisax/hfcscard.c b/trunk/drivers/isdn/hisax/hfcscard.c index 909d6709ec16..57670dc5034d 100644 --- a/trunk/drivers/isdn/hisax/hfcscard.c +++ b/trunk/drivers/isdn/hisax/hfcscard.c @@ -118,7 +118,8 @@ hfcs_card_msg(struct IsdnCardState *cs, int mt, void *arg) return(0); case CARD_INIT: delay = (75*HZ)/100 +1; - mod_timer(&cs->hw.hfcD.timer, jiffies + delay); + cs->hw.hfcD.timer.expires = jiffies + delay; + add_timer(&cs->hw.hfcD.timer); spin_lock_irqsave(&cs->lock, flags); reset_hfcs(cs); init2bds0(cs); diff --git a/trunk/drivers/mfd/sm501.c b/trunk/drivers/mfd/sm501.c index afd82966f9a0..8135e4c3bf47 100644 --- a/trunk/drivers/mfd/sm501.c +++ b/trunk/drivers/mfd/sm501.c @@ -156,7 +156,7 @@ static void sm501_dump_clk(struct sm501_devdata *sm) dev_dbg(sm->dev, "PM0[%c]: " "P2 %ld.%ld MHz (%ld), V2 %ld.%ld (%ld), " - "M %ld.%ld (%ld), MX1 %ld.%ld (%ld)\n", +x "M %ld.%ld (%ld), MX1 %ld.%ld (%ld)\n", (pmc & 3 ) == 0 ? '*' : '-', fmt_freq(decode_div(pll2, pm0, 24, 1<<29, 31, px_div)), fmt_freq(decode_div(pll2, pm0, 16, 1<<20, 15, misc_div)), diff --git a/trunk/drivers/mmc/card/sdio_uart.c b/trunk/drivers/mmc/card/sdio_uart.c index eeea84c309e6..d552de683110 100644 --- a/trunk/drivers/mmc/card/sdio_uart.c +++ b/trunk/drivers/mmc/card/sdio_uart.c @@ -386,7 +386,7 @@ static void sdio_uart_stop_rx(struct sdio_uart_port *port) sdio_out(port, UART_IER, port->ier); } -static void sdio_uart_receive_chars(struct sdio_uart_port *port, unsigned int *status) +static void sdio_uart_receive_chars(struct sdio_uart_port *port, int *status) { struct tty_struct *tty = port->tty; unsigned int ch, flag; diff --git a/trunk/drivers/pci/hotplug/acpiphp.h b/trunk/drivers/pci/hotplug/acpiphp.h index 1ef417cca2db..f6cc0c5b5657 100644 --- a/trunk/drivers/pci/hotplug/acpiphp.h +++ b/trunk/drivers/pci/hotplug/acpiphp.h @@ -66,7 +66,7 @@ struct slot { char name[SLOT_NAME_SIZE]; }; -/* +/** * struct acpiphp_bridge - PCI bridge information * * for each bridge device in ACPI namespace @@ -97,7 +97,7 @@ struct acpiphp_bridge { }; -/* +/** * struct acpiphp_slot - PCI slot information * * PCI slot information for each *physical* PCI slot @@ -118,7 +118,7 @@ struct acpiphp_slot { }; -/* +/** * struct acpiphp_func - PCI function information * * PCI function information for each object in ACPI namespace @@ -137,7 +137,7 @@ struct acpiphp_func { u32 flags; /* see below */ }; -/* +/** * struct acpiphp_attention_info - device specific attention registration * * ACPI has no generic method of setting/getting attention status diff --git a/trunk/drivers/pci/hotplug/acpiphp_core.c b/trunk/drivers/pci/hotplug/acpiphp_core.c index c8c263875c21..a0ca63adad5a 100644 --- a/trunk/drivers/pci/hotplug/acpiphp_core.c +++ b/trunk/drivers/pci/hotplug/acpiphp_core.c @@ -91,10 +91,10 @@ static struct hotplug_slot_ops acpi_hotplug_slot_ops = { * acpiphp_register_attention - set attention LED callback * @info: must be completely filled with LED callbacks * - * Description: This is used to register a hardware specific ACPI + * Description: this is used to register a hardware specific ACPI * driver that manipulates the attention LED. All the fields in * info must be set. - */ + **/ int acpiphp_register_attention(struct acpiphp_attention_info *info) { int retval = -EINVAL; @@ -112,10 +112,10 @@ int acpiphp_register_attention(struct acpiphp_attention_info *info) * acpiphp_unregister_attention - unset attention LED callback * @info: must match the pointer used to register * - * Description: This is used to un-register a hardware specific acpi + * Description: this is used to un-register a hardware specific acpi * driver that manipulates the attention LED. The pointer to the * info struct must be the same as the one used to set it. - */ + **/ int acpiphp_unregister_attention(struct acpiphp_attention_info *info) { int retval = -EINVAL; @@ -133,6 +133,7 @@ int acpiphp_unregister_attention(struct acpiphp_attention_info *info) * @hotplug_slot: slot to enable * * Actual tasks are done in acpiphp_enable_slot() + * */ static int enable_slot(struct hotplug_slot *hotplug_slot) { @@ -150,6 +151,7 @@ static int enable_slot(struct hotplug_slot *hotplug_slot) * @hotplug_slot: slot to disable * * Actual tasks are done in acpiphp_disable_slot() + * */ static int disable_slot(struct hotplug_slot *hotplug_slot) { @@ -166,15 +168,15 @@ static int disable_slot(struct hotplug_slot *hotplug_slot) } -/** - * set_attention_status - set attention LED + /** + * set_attention_status - set attention LED * @hotplug_slot: slot to set attention LED on * @status: value to set attention LED to (0 or 1) * * attention status LED, so we use a callback that * was registered with us. This allows hardware specific * ACPI implementations to blink the light for us. - */ + **/ static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 status) { int retval = -ENODEV; @@ -197,6 +199,7 @@ static int disable_slot(struct hotplug_slot *hotplug_slot) * * Some platforms may not implement _STA method properly. * In that case, the value returned may not be reliable. + * */ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value) { @@ -210,7 +213,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value) } -/** + /** * get_attention_status - get attention LED status * @hotplug_slot: slot to get status from * @value: returns with value of attention LED @@ -218,8 +221,8 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value) * ACPI doesn't have known method to determine the state * of the attention status LED, so we use a callback that * was registered with us. This allows hardware specific - * ACPI implementations to determine its state. - */ + * ACPI implementations to determine its state + **/ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value) { int retval = -EINVAL; @@ -241,7 +244,8 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value) * @value: pointer to store status * * ACPI doesn't provide any formal means to access latch status. - * Instead, we fake latch status from _STA. + * Instead, we fake latch status from _STA + * */ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value) { @@ -261,7 +265,8 @@ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value) * @value: pointer to store status * * ACPI doesn't provide any formal means to access adapter status. - * Instead, we fake adapter status from _STA. + * Instead, we fake adapter status from _STA + * */ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value) { diff --git a/trunk/drivers/pci/hotplug/acpiphp_glue.c b/trunk/drivers/pci/hotplug/acpiphp_glue.c index ff1b1c71291a..1e125b56c9a9 100644 --- a/trunk/drivers/pci/hotplug/acpiphp_glue.c +++ b/trunk/drivers/pci/hotplug/acpiphp_glue.c @@ -82,6 +82,7 @@ static void handle_hotplug_event_func(acpi_handle handle, u32 type, void *contex * 2. has _PS0 method * 3. has _PS3 method * 4. .. + * */ static int is_ejectable(acpi_handle handle) { @@ -985,8 +986,10 @@ static int power_off_slot(struct acpiphp_slot *slot) /** - * acpiphp_max_busnr - return the highest reserved bus number under the given bus. + * acpiphp_max_busnr - return the highest reserved bus number under + * the given bus. * @bus: bus to start search with + * */ static unsigned char acpiphp_max_busnr(struct pci_bus *bus) { @@ -1015,6 +1018,7 @@ static unsigned char acpiphp_max_busnr(struct pci_bus *bus) /** * acpiphp_bus_add - add a new bus to acpi subsystem * @func: acpiphp_func of the bridge + * */ static int acpiphp_bus_add(struct acpiphp_func *func) { @@ -1059,6 +1063,7 @@ static int acpiphp_bus_add(struct acpiphp_func *func) /** * acpiphp_bus_trim - trim a bus from acpi subsystem * @handle: handle to acpi namespace + * */ static int acpiphp_bus_trim(acpi_handle handle) { @@ -1084,6 +1089,7 @@ static int acpiphp_bus_trim(acpi_handle handle) * * This function should be called per *physical slot*, * not per each slot object in ACPI namespace. + * */ static int enable_device(struct acpiphp_slot *slot) { @@ -1179,7 +1185,6 @@ static void disable_bridges(struct pci_bus *bus) /** * disable_device - disable a slot - * @slot: ACPI PHP slot */ static int disable_device(struct acpiphp_slot *slot) { @@ -1235,15 +1240,14 @@ static int disable_device(struct acpiphp_slot *slot) /** * get_slot_status - get ACPI slot status - * @slot: ACPI PHP slot * - * If a slot has _STA for each function and if any one of them - * returned non-zero status, return it. + * if a slot has _STA for each function and if any one of them + * returned non-zero status, return it * - * If a slot doesn't have _STA and if any one of its functions' - * configuration space is configured, return 0x0f as a _STA. + * if a slot doesn't have _STA and if any one of its functions' + * configuration space is configured, return 0x0f as a _STA * - * Otherwise return 0. + * otherwise return 0 */ static unsigned int get_slot_status(struct acpiphp_slot *slot) { @@ -1277,7 +1281,6 @@ static unsigned int get_slot_status(struct acpiphp_slot *slot) /** * acpiphp_eject_slot - physically eject the slot - * @slot: ACPI PHP slot */ int acpiphp_eject_slot(struct acpiphp_slot *slot) { @@ -1311,7 +1314,6 @@ int acpiphp_eject_slot(struct acpiphp_slot *slot) /** * acpiphp_check_bridge - re-enumerate devices - * @bridge: where to begin re-enumeration * * Iterate over all slots under this bridge and make sure that if a * card is present they are enabled, and if not they are disabled. @@ -1536,11 +1538,13 @@ check_sub_bridges(acpi_handle handle, u32 lvl, void *context, void **rv) /** * handle_hotplug_event_bridge - handle ACPI event on bridges + * * @handle: Notify()'ed acpi_handle * @type: Notify code * @context: pointer to acpiphp_bridge structure * - * Handles ACPI event notification on {host,p2p} bridges. + * handles ACPI event notification on {host,p2p} bridges + * */ static void handle_hotplug_event_bridge(acpi_handle handle, u32 type, void *context) { @@ -1630,11 +1634,13 @@ static void handle_hotplug_event_bridge(acpi_handle handle, u32 type, void *cont /** * handle_hotplug_event_func - handle ACPI event on functions (i.e. slots) + * * @handle: Notify()'ed acpi_handle * @type: Notify code * @context: pointer to acpiphp_func structure * - * Handles ACPI event notification on slots. + * handles ACPI event notification on slots + * */ static void handle_hotplug_event_func(acpi_handle handle, u32 type, void *context) { @@ -1699,6 +1705,7 @@ static struct acpi_pci_driver acpi_pci_hp_driver = { /** * acpiphp_glue_init - initializes all PCI hotplug - ACPI glue data structures + * */ int __init acpiphp_glue_init(void) { @@ -1719,7 +1726,7 @@ int __init acpiphp_glue_init(void) /** * acpiphp_glue_exit - terminates all PCI hotplug - ACPI glue data structures * - * This function frees all data allocated in acpiphp_glue_init(). + * This function frees all data allocated in acpiphp_glue_init() */ void acpiphp_glue_exit(void) { @@ -1753,6 +1760,7 @@ int __init acpiphp_get_num_slots(void) * acpiphp_for_each_slot - call function for each slot * @fn: callback function * @data: context to be passed to callback function + * */ static int acpiphp_for_each_slot(acpiphp_callback fn, void *data) { @@ -1778,7 +1786,6 @@ static int acpiphp_for_each_slot(acpiphp_callback fn, void *data) /** * acpiphp_enable_slot - power on slot - * @slot: ACPI PHP slot */ int acpiphp_enable_slot(struct acpiphp_slot *slot) { @@ -1808,7 +1815,6 @@ int acpiphp_enable_slot(struct acpiphp_slot *slot) /** * acpiphp_disable_slot - power off slot - * @slot: ACPI PHP slot */ int acpiphp_disable_slot(struct acpiphp_slot *slot) { diff --git a/trunk/drivers/pci/hotplug/acpiphp_ibm.c b/trunk/drivers/pci/hotplug/acpiphp_ibm.c index 47d26b65e99a..56829f82be4a 100644 --- a/trunk/drivers/pci/hotplug/acpiphp_ibm.c +++ b/trunk/drivers/pci/hotplug/acpiphp_ibm.c @@ -134,11 +134,11 @@ static struct acpiphp_attention_info ibm_attention_info = * ibm_slot_from_id - workaround for bad ibm hardware * @id: the slot number that linux refers to the slot by * - * Description: This method returns the aCPI slot descriptor + * Description: this method returns the aCPI slot descriptor * corresponding to the Linux slot number. This descriptor * has info about the aPCI slot id and attention status. * This descriptor must be freed using kfree when done. - */ + **/ static union apci_descriptor *ibm_slot_from_id(int id) { int ind = 0, size; @@ -173,9 +173,9 @@ static union apci_descriptor *ibm_slot_from_id(int id) * @slot: the hotplug_slot to work with * @status: what to set the LED to (0 or 1) * - * Description: This method is registered with the acpiphp module as a - * callback to do the device specific task of setting the LED status. - */ + * Description: this method is registered with the acpiphp module as a + * callback to do the device specific task of setting the LED status + **/ static int ibm_set_attention_status(struct hotplug_slot *slot, u8 status) { union acpi_object args[2]; @@ -213,13 +213,13 @@ static int ibm_set_attention_status(struct hotplug_slot *slot, u8 status) * @slot: the hotplug_slot to work with * @status: returns what the LED is set to (0 or 1) * - * Description: This method is registered with the acpiphp module as a - * callback to do the device specific task of getting the LED status. + * Description: this method is registered with the acpiphp module as a + * callback to do the device specific task of getting the LED status * * Because there is no direct method of getting the LED status directly * from an ACPI call, we read the aPCI table and parse out our * slot descriptor to read the status from that. - */ + **/ static int ibm_get_attention_status(struct hotplug_slot *slot, u8 *status) { union apci_descriptor *ibm_slot; @@ -245,8 +245,8 @@ static int ibm_get_attention_status(struct hotplug_slot *slot, u8 *status) * @event: the event info (device specific) * @context: passed context (our notification struct) * - * Description: This method is registered as a callback with the ACPI - * subsystem it is called when this device has an event to notify the OS of. + * Description: this method is registered as a callback with the ACPI + * subsystem it is called when this device has an event to notify the OS of * * The events actually come from the device as two events that get * synthesized into one event with data by this function. The event @@ -256,7 +256,7 @@ static int ibm_get_attention_status(struct hotplug_slot *slot, u8 *status) * From section 5.6.2.2 of the ACPI 2.0 spec, I understand that the OSPM will * only re-enable the interrupt that causes this event AFTER this method * has returned, thereby enforcing serial access for the notification struct. - */ + **/ static void ibm_handle_events(acpi_handle handle, u32 event, void *context) { u8 detail = event & 0x0f; @@ -279,16 +279,16 @@ static void ibm_handle_events(acpi_handle handle, u32 event, void *context) * ibm_get_table_from_acpi - reads the APLS buffer from ACPI * @bufp: address to pointer to allocate for the table * - * Description: This method reads the APLS buffer in from ACPI and + * Description: this method reads the APLS buffer in from ACPI and * stores the "stripped" table into a single buffer - * it allocates and passes the address back in bufp. + * it allocates and passes the address back in bufp * * If NULL is passed in as buffer, this method only calculates * the size of the table and returns that without filling - * in the buffer. + * in the buffer * - * Returns < 0 on error or the size of the table on success. - */ + * returns < 0 on error or the size of the table on success + **/ static int ibm_get_table_from_acpi(char **bufp) { union acpi_object *package; @@ -349,18 +349,17 @@ static int ibm_get_table_from_acpi(char **bufp) /** * ibm_read_apci_table - callback for the sysfs apci_table file * @kobj: the kobject this binary attribute is a part of - * @bin_attr: struct bin_attribute for this file * @buffer: the kernel space buffer to fill * @pos: the offset into the file * @size: the number of bytes requested * - * Description: Gets registered with sysfs as the reader callback - * to be executed when /sys/bus/pci/slots/apci_table gets read. + * Description: gets registered with sysfs as the reader callback + * to be executed when /sys/bus/pci/slots/apci_table gets read * * Since we don't get notified on open and close for this file, * things get really tricky here... - * our solution is to only allow reading the table in all at once. - */ + * our solution is to only allow reading the table in all at once + **/ static ssize_t ibm_read_apci_table(struct kobject *kobj, struct bin_attribute *bin_attr, char *buffer, loff_t pos, size_t size) @@ -386,10 +385,10 @@ static ssize_t ibm_read_apci_table(struct kobject *kobj, * @context: a pointer to our handle to fill when we find the device * @rv: a return value to fill if desired * - * Description: Used as a callback when calling acpi_walk_namespace + * Description: used as a callback when calling acpi_walk_namespace * to find our device. When this method returns non-zero - * acpi_walk_namespace quits its search and returns our value. - */ + * acpi_walk_namespace quits its search and returns our value + **/ static acpi_status __init ibm_find_acpi_device(acpi_handle handle, u32 lvl, void *context, void **rv) { diff --git a/trunk/drivers/pci/hotplug/cpqphp_core.c b/trunk/drivers/pci/hotplug/cpqphp_core.c index 74178875b949..a96b739b2d35 100644 --- a/trunk/drivers/pci/hotplug/cpqphp_core.c +++ b/trunk/drivers/pci/hotplug/cpqphp_core.c @@ -117,10 +117,12 @@ static inline int is_slot66mhz(struct slot *slot) /** * detect_SMBIOS_pointer - find the System Management BIOS Table in mem region. + * * @begin: begin pointer for region to be scanned. * @end: end pointer for region to be scanned. * - * Returns pointer to the head of the SMBIOS tables (or %NULL). + * Returns pointer to the head of the SMBIOS tables (or NULL) + * */ static void __iomem * detect_SMBIOS_pointer(void __iomem *begin, void __iomem *end) { @@ -155,9 +157,9 @@ static void __iomem * detect_SMBIOS_pointer(void __iomem *begin, void __iomem *e /** * init_SERR - Initializes the per slot SERR generation. - * @ctrl: controller to use * * For unexpected switch opens + * */ static int init_SERR(struct controller * ctrl) { @@ -222,15 +224,14 @@ static int pci_print_IRQ_route (void) /** * get_subsequent_smbios_entry: get the next entry from bios table. - * @smbios_start: where to start in the SMBIOS table - * @smbios_table: location of the SMBIOS table - * @curr: %NULL or pointer to previously returned structure * - * Gets the first entry if previous == NULL; - * otherwise, returns the next entry. - * Uses global SMBIOS Table pointer. + * Gets the first entry if previous == NULL + * Otherwise, returns the next entry + * Uses global SMBIOS Table pointer * - * Returns a pointer to an SMBIOS structure or NULL if none found. + * @curr: %NULL or pointer to previously returned structure + * + * returns a pointer to an SMBIOS structure or NULL if none found */ static void __iomem *get_subsequent_smbios_entry(void __iomem *smbios_start, void __iomem *smbios_table, @@ -271,18 +272,17 @@ static void __iomem *get_subsequent_smbios_entry(void __iomem *smbios_start, /** - * get_SMBIOS_entry - return the requested SMBIOS entry or %NULL - * @smbios_start: where to start in the SMBIOS table - * @smbios_table: location of the SMBIOS table - * @type: SMBIOS structure type to be returned + * get_SMBIOS_entry + * + * @type:SMBIOS structure type to be returned * @previous: %NULL or pointer to previously returned structure * - * Gets the first entry of the specified type if previous == %NULL; + * Gets the first entry of the specified type if previous == NULL * Otherwise, returns the next entry of the given type. - * Uses global SMBIOS Table pointer. - * Uses get_subsequent_smbios_entry. + * Uses global SMBIOS Table pointer + * Uses get_subsequent_smbios_entry * - * Returns a pointer to an SMBIOS structure or %NULL if none found. + * returns a pointer to an SMBIOS structure or %NULL if none found */ static void __iomem *get_SMBIOS_entry(void __iomem *smbios_start, void __iomem *smbios_table, @@ -581,9 +581,7 @@ get_slot_mapping(struct pci_bus *bus, u8 bus_num, u8 dev_num, u8 *slot) /** * cpqhp_set_attention_status - Turns the Amber LED for a slot on or off - * @ctrl: struct controller to use - * @func: PCI device/function info - * @status: LED control flag: 1 = LED on, 0 = LED off + * */ static int cpqhp_set_attention_status(struct controller *ctrl, struct pci_func *func, @@ -623,8 +621,7 @@ cpqhp_set_attention_status(struct controller *ctrl, struct pci_func *func, /** * set_attention_status - Turns the Amber LED for a slot on or off - * @hotplug_slot: slot to change LED on - * @status: LED control flag + * */ static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 status) { diff --git a/trunk/drivers/pci/hotplug/cpqphp_ctrl.c b/trunk/drivers/pci/hotplug/cpqphp_ctrl.c index 4018420c6f95..856d57b4d604 100644 --- a/trunk/drivers/pci/hotplug/cpqphp_ctrl.c +++ b/trunk/drivers/pci/hotplug/cpqphp_ctrl.c @@ -123,7 +123,7 @@ static u8 handle_switch_change(u8 change, struct controller * ctrl) } /** - * cpqhp_find_slot - find the struct slot of given device + * cpqhp_find_slot: find the struct slot of given device * @ctrl: scan lots of this controller * @device: the device id to find */ @@ -305,8 +305,9 @@ static u8 handle_power_fault(u8 change, struct controller * ctrl) /** - * sort_by_size - sort nodes on the list by their length, smallest first. + * sort_by_size: sort nodes on the list by their length, smallest first. * @head: list to sort + * */ static int sort_by_size(struct pci_resource **head) { @@ -353,8 +354,9 @@ static int sort_by_size(struct pci_resource **head) /** - * sort_by_max_size - sort nodes on the list by their length, largest first. + * sort_by_max_size: sort nodes on the list by their length, largest first. * @head: list to sort + * */ static int sort_by_max_size(struct pci_resource **head) { @@ -401,10 +403,8 @@ static int sort_by_max_size(struct pci_resource **head) /** - * do_pre_bridge_resource_split - find node of resources that are unused - * @head: new list head - * @orig_head: original list head - * @alignment: max node size (?) + * do_pre_bridge_resource_split: find node of resources that are unused + * */ static struct pci_resource *do_pre_bridge_resource_split(struct pci_resource **head, struct pci_resource **orig_head, u32 alignment) @@ -477,9 +477,8 @@ static struct pci_resource *do_pre_bridge_resource_split(struct pci_resource **h /** - * do_bridge_resource_split - find one node of resources that aren't in use - * @head: list head - * @alignment: max node size (?) + * do_bridge_resource_split: find one node of resources that aren't in use + * */ static struct pci_resource *do_bridge_resource_split(struct pci_resource **head, u32 alignment) { @@ -526,13 +525,14 @@ static struct pci_resource *do_bridge_resource_split(struct pci_resource **head, /** - * get_io_resource - find first node of given size not in ISA aliasing window. + * get_io_resource: find first node of given size not in ISA aliasing window. * @head: list to search * @size: size of node to find, must be a power of two. * - * Description: This function sorts the resource list by size and then returns + * Description: this function sorts the resource list by size and then returns * returns the first node of "size" length that is not in the ISA aliasing * window. If it finds a node larger than "size" it will split it up. + * */ static struct pci_resource *get_io_resource(struct pci_resource **head, u32 size) { @@ -620,7 +620,7 @@ static struct pci_resource *get_io_resource(struct pci_resource **head, u32 size /** - * get_max_resource - get largest node which has at least the given size. + * get_max_resource: get largest node which has at least the given size. * @head: the list to search the node in * @size: the minimum size of the node to find * @@ -712,7 +712,7 @@ static struct pci_resource *get_max_resource(struct pci_resource **head, u32 siz /** - * get_resource - find resource of given size and split up larger ones. + * get_resource: find resource of given size and split up larger ones. * @head: the list to search for resources * @size: the size limit to use * @@ -804,14 +804,14 @@ static struct pci_resource *get_resource(struct pci_resource **head, u32 size) /** - * cpqhp_resource_sort_and_combine - sort nodes by base addresses and clean up + * cpqhp_resource_sort_and_combine: sort nodes by base addresses and clean up. * @head: the list to sort and clean up * * Description: Sorts all of the nodes in the list in ascending order by * their base addresses. Also does garbage collection by * combining adjacent nodes. * - * Returns %0 if success. + * returns 0 if success */ int cpqhp_resource_sort_and_combine(struct pci_resource **head) { @@ -951,9 +951,9 @@ irqreturn_t cpqhp_ctrl_intr(int IRQ, void *data) /** * cpqhp_slot_create - Creates a node and adds it to the proper bus. - * @busnumber: bus where new node is to be located + * @busnumber - bus where new node is to be located * - * Returns pointer to the new node or %NULL if unsuccessful. + * Returns pointer to the new node or NULL if unsuccessful */ struct pci_func *cpqhp_slot_create(u8 busnumber) { @@ -986,7 +986,7 @@ struct pci_func *cpqhp_slot_create(u8 busnumber) * slot_remove - Removes a node from the linked list of slots. * @old_slot: slot to remove * - * Returns %0 if successful, !0 otherwise. + * Returns 0 if successful, !0 otherwise. */ static int slot_remove(struct pci_func * old_slot) { @@ -1026,7 +1026,7 @@ static int slot_remove(struct pci_func * old_slot) * bridge_slot_remove - Removes a node from the linked list of slots. * @bridge: bridge to remove * - * Returns %0 if successful, !0 otherwise. + * Returns 0 if successful, !0 otherwise. */ static int bridge_slot_remove(struct pci_func *bridge) { @@ -1071,7 +1071,7 @@ static int bridge_slot_remove(struct pci_func *bridge) * cpqhp_slot_find - Looks for a node by bus, and device, multiple functions accessed * @bus: bus to find * @device: device to find - * @index: is %0 for first function found, %1 for the second... + * @index: is 0 for first function found, 1 for the second... * * Returns pointer to the node if successful, %NULL otherwise. */ @@ -1115,13 +1115,16 @@ static int is_bridge(struct pci_func * func) /** - * set_controller_speed - set the frequency and/or mode of a specific controller segment. + * set_controller_speed - set the frequency and/or mode of a specific + * controller segment. + * * @ctrl: controller to change frequency/mode for. * @adapter_speed: the speed of the adapter we want to match. * @hp_slot: the slot number where the adapter is installed. * - * Returns %0 if we successfully change frequency and/or mode to match the + * Returns 0 if we successfully change frequency and/or mode to match the * adapter speed. + * */ static u8 set_controller_speed(struct controller *ctrl, u8 adapter_speed, u8 hp_slot) { @@ -1250,14 +1253,13 @@ static u8 set_controller_speed(struct controller *ctrl, u8 adapter_speed, u8 hp_ /** * board_replaced - Called after a board has been replaced in the system. - * @func: PCI device/function information - * @ctrl: hotplug controller * - * This is only used if we don't have resources for hot add. - * Turns power on for the board. - * Checks to see if board is the same. - * If board is same, reconfigures it. + * This is only used if we don't have resources for hot add + * Turns power on for the board + * Checks to see if board is the same + * If board is same, reconfigures it * If board isn't same, turns it back off. + * */ static u32 board_replaced(struct pci_func *func, struct controller *ctrl) { @@ -1401,11 +1403,10 @@ static u32 board_replaced(struct pci_func *func, struct controller *ctrl) /** * board_added - Called after a board has been added to the system. - * @func: PCI device/function info - * @ctrl: hotplug controller * - * Turns power on for the board. - * Configures board. + * Turns power on for the board + * Configures board + * */ static u32 board_added(struct pci_func *func, struct controller *ctrl) { @@ -1606,10 +1607,8 @@ static u32 board_added(struct pci_func *func, struct controller *ctrl) /** - * remove_board - Turns off slot and LEDs - * @func: PCI device/function info - * @replace_flag: whether replacing or adding a new device - * @ctrl: target controller + * remove_board - Turns off slot and LED's + * */ static u32 remove_board(struct pci_func * func, u32 replace_flag, struct controller * ctrl) { @@ -1903,11 +1902,11 @@ static void interrupt_event_handler(struct controller *ctrl) /** - * cpqhp_pushbutton_thread - handle pushbutton events - * @slot: target slot (struct) + * cpqhp_pushbutton_thread * - * Scheduled procedure to handle blocking stuff for the pushbuttons. + * Scheduled procedure to handle blocking stuff for the pushbuttons * Handles all pending events and exits. + * */ void cpqhp_pushbutton_thread(unsigned long slot) { @@ -2138,10 +2137,9 @@ int cpqhp_process_SS(struct controller *ctrl, struct pci_func *func) } /** - * switch_leds - switch the leds, go from one site to the other. + * switch_leds: switch the leds, go from one site to the other. * @ctrl: controller to use * @num_of_slots: number of slots to use - * @work_LED: LED control value * @direction: 1 to start from the left side, 0 to start right. */ static void switch_leds(struct controller *ctrl, const int num_of_slots, @@ -2167,11 +2165,11 @@ static void switch_leds(struct controller *ctrl, const int num_of_slots, } /** - * cpqhp_hardware_test - runs hardware tests - * @ctrl: target controller - * @test_num: the number written to the "test" file in sysfs. + * hardware_test - runs hardware tests * * For hot plug ctrl folks to play with. + * test_num is the number written to the "test" file in sysfs + * */ int cpqhp_hardware_test(struct controller *ctrl, int test_num) { @@ -2251,12 +2249,14 @@ int cpqhp_hardware_test(struct controller *ctrl, int test_num) /** * configure_new_device - Configures the PCI header information of one board. + * * @ctrl: pointer to controller structure * @func: pointer to function structure * @behind_bridge: 1 if this is a recursive call, 0 if not * @resources: pointer to set of resource lists * - * Returns 0 if success. + * Returns 0 if success + * */ static u32 configure_new_device(struct controller * ctrl, struct pci_func * func, u8 behind_bridge, struct resource_lists * resources) @@ -2346,13 +2346,15 @@ static u32 configure_new_device(struct controller * ctrl, struct pci_func * func /** * configure_new_function - Configures the PCI header information of one device + * * @ctrl: pointer to controller structure * @func: pointer to function structure * @behind_bridge: 1 if this is a recursive call, 0 if not * @resources: pointer to set of resource lists * * Calls itself recursively for bridged devices. - * Returns 0 if success. + * Returns 0 if success + * */ static int configure_new_function(struct controller *ctrl, struct pci_func *func, u8 behind_bridge, diff --git a/trunk/drivers/pci/hotplug/fakephp.c b/trunk/drivers/pci/hotplug/fakephp.c index d7a293e3faf5..027f6865d7e3 100644 --- a/trunk/drivers/pci/hotplug/fakephp.c +++ b/trunk/drivers/pci/hotplug/fakephp.c @@ -165,11 +165,11 @@ static void remove_slot(struct dummy_slot *dslot) } /** - * pci_rescan_slot - Rescan slot - * @temp: Device template. Should be set: bus and devfn. + * Rescan slot. + * Tries hard not to re-enable already existing devices + * also handles scanning of subfunctions * - * Tries hard not to re-enable already existing devices; - * also handles scanning of subfunctions. + * @param temp Device template. Should be set: bus and devfn. */ static void pci_rescan_slot(struct pci_dev *temp) { @@ -229,10 +229,10 @@ static void pci_rescan_slot(struct pci_dev *temp) /** - * pci_rescan_bus - Rescan PCI bus - * @bus: the PCI bus to rescan + * Rescan PCI bus. + * call pci_rescan_slot for each possible function of the bus * - * Call pci_rescan_slot for each possible function of the bus. + * @param bus */ static void pci_rescan_bus(const struct pci_bus *bus) { diff --git a/trunk/drivers/pci/hotplug/pciehp_ctrl.c b/trunk/drivers/pci/hotplug/pciehp_ctrl.c index f1e0966cee95..c8cb49c5a752 100644 --- a/trunk/drivers/pci/hotplug/pciehp_ctrl.c +++ b/trunk/drivers/pci/hotplug/pciehp_ctrl.c @@ -208,10 +208,10 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot) /** * board_added - Called after a board has been added to the system. - * @p_slot: &slot where board is added * - * Turns power on for the board. - * Configures board. + * Turns power on for the board + * Configures board + * */ static int board_added(struct slot *p_slot) { @@ -276,8 +276,8 @@ static int board_added(struct slot *p_slot) } /** - * remove_board - Turns off slot and LEDs - * @p_slot: slot where board is being removed + * remove_board - Turns off slot and LED's + * */ static int remove_board(struct slot *p_slot) { @@ -319,11 +319,11 @@ struct power_work_info { }; /** - * pciehp_power_thread - handle pushbutton events - * @work: &struct work_struct describing work to be done + * pciehp_pushbutton_thread * - * Scheduled procedure to handle blocking stuff for the pushbuttons. + * Scheduled procedure to handle blocking stuff for the pushbuttons * Handles all pending events and exits. + * */ static void pciehp_power_thread(struct work_struct *work) { diff --git a/trunk/drivers/pci/hotplug/rpadlpar_core.c b/trunk/drivers/pci/hotplug/rpadlpar_core.c index b169b0e2647f..deb6b5e35feb 100644 --- a/trunk/drivers/pci/hotplug/rpadlpar_core.c +++ b/trunk/drivers/pci/hotplug/rpadlpar_core.c @@ -100,7 +100,6 @@ static struct device_node *find_dlpar_node(char *drc_name, int *node_type) /** * find_php_slot - return hotplug slot structure for device node - * @dn: target &device_node * * This routine will return the hotplug slot structure * for a given device node. Note that built-in PCI slots @@ -294,8 +293,9 @@ static int dlpar_add_vio_slot(char *drc_name, struct device_node *dn) * dlpar_add_slot - DLPAR add an I/O Slot * @drc_name: drc-name of newly added slot * - * Make the hotplug module and the kernel aware of a newly added I/O Slot. - * Return Codes: + * Make the hotplug module and the kernel aware + * of a newly added I/O Slot. + * Return Codes - * 0 Success * -ENODEV Not a valid drc_name * -EINVAL Slot already added @@ -339,9 +339,9 @@ int dlpar_add_slot(char *drc_name) /** * dlpar_remove_vio_slot - DLPAR remove a virtual I/O Slot * @drc_name: drc-name of newly added slot - * @dn: &device_node * - * Remove the kernel and hotplug representations of an I/O Slot. + * Remove the kernel and hotplug representations + * of an I/O Slot. * Return Codes: * 0 Success * -EINVAL Vio dev doesn't exist @@ -359,11 +359,11 @@ static int dlpar_remove_vio_slot(char *drc_name, struct device_node *dn) } /** - * dlpar_remove_pci_slot - DLPAR remove a PCI I/O Slot + * dlpar_remove_slot - DLPAR remove a PCI I/O Slot * @drc_name: drc-name of newly added slot - * @dn: &device_node * - * Remove the kernel and hotplug representations of a PCI I/O Slot. + * Remove the kernel and hotplug representations + * of a PCI I/O Slot. * Return Codes: * 0 Success * -ENODEV Not a valid drc_name @@ -405,7 +405,8 @@ int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn) * dlpar_remove_slot - DLPAR remove an I/O Slot * @drc_name: drc-name of newly added slot * - * Remove the kernel and hotplug representations of an I/O Slot. + * Remove the kernel and hotplug representations + * of an I/O Slot. * Return Codes: * 0 Success * -ENODEV Not a valid drc_name diff --git a/trunk/drivers/pci/hotplug/rpaphp_core.c b/trunk/drivers/pci/hotplug/rpaphp_core.c index 58f1a9927709..458c08ef2654 100644 --- a/trunk/drivers/pci/hotplug/rpaphp_core.c +++ b/trunk/drivers/pci/hotplug/rpaphp_core.c @@ -54,12 +54,10 @@ module_param(debug, bool, 0644); /** * set_attention_status - set attention LED - * @hotplug_slot: target &hotplug_slot - * @value: LED control value - * * echo 0 > attention -- set LED OFF * echo 1 > attention -- set LED ON * echo 2 > attention -- set LED ID(identify, light is blinking) + * */ static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value) { @@ -101,8 +99,6 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 * value) /** * get_attention_status - get attention LED status - * @hotplug_slot: slot to get status - * @value: pointer to store status */ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 * value) { @@ -258,11 +254,6 @@ static int is_php_type(char *drc_type) /** * is_php_dn() - return 1 if this is a hotpluggable pci slot, else 0 - * @dn: target &device_node - * @indexes: passed to get_children_props() - * @names: passed to get_children_props() - * @types: returned from get_children_props() - * @power_domains: * * This routine will return true only if the device node is * a hotpluggable slot. This routine will return false @@ -288,7 +279,7 @@ static int is_php_dn(struct device_node *dn, const int **indexes, /** * rpaphp_add_slot -- declare a hotplug slot to the hotplug subsystem. - * @dn: device node of slot + * @dn device node of slot * * This subroutine will register a hotplugable slot with the * PCI hotplug infrastructure. This routine is typicaly called @@ -300,7 +291,7 @@ static int is_php_dn(struct device_node *dn, const int **indexes, * routine will just return without doing anything, since embedded * slots cannot be hotplugged. * - * To remove a slot, it suffices to call rpaphp_deregister_slot(). + * To remove a slot, it suffices to call rpaphp_deregister_slot() */ int rpaphp_add_slot(struct device_node *dn) { diff --git a/trunk/drivers/pci/hotplug/rpaphp_pci.c b/trunk/drivers/pci/hotplug/rpaphp_pci.c index 0de84533cd80..54ca8650d511 100644 --- a/trunk/drivers/pci/hotplug/rpaphp_pci.c +++ b/trunk/drivers/pci/hotplug/rpaphp_pci.c @@ -79,7 +79,6 @@ static void set_slot_name(struct slot *slot) /** * rpaphp_enable_slot - record slot state, config pci device - * @slot: target &slot * * Initialize values in the slot, and the hotplug_slot info * structures to indicate if there is a pci card plugged into diff --git a/trunk/drivers/pci/hotplug/shpchp_ctrl.c b/trunk/drivers/pci/hotplug/shpchp_ctrl.c index eb5cac6f08ae..d2fc35598cdd 100644 --- a/trunk/drivers/pci/hotplug/shpchp_ctrl.c +++ b/trunk/drivers/pci/hotplug/shpchp_ctrl.c @@ -231,10 +231,10 @@ static int fix_bus_speed(struct controller *ctrl, struct slot *pslot, /** * board_added - Called after a board has been added to the system. - * @p_slot: target &slot * - * Turns power on for the board. - * Configures board. + * Turns power on for the board + * Configures board + * */ static int board_added(struct slot *p_slot) { @@ -350,8 +350,8 @@ static int board_added(struct slot *p_slot) /** - * remove_board - Turns off slot and LEDs - * @p_slot: target &slot + * remove_board - Turns off slot and LED's + * */ static int remove_board(struct slot *p_slot) { @@ -397,11 +397,11 @@ struct pushbutton_work_info { }; /** - * shpchp_pushbutton_thread - handle pushbutton events - * @work: &struct work_struct to be handled + * shpchp_pushbutton_thread * - * Scheduled procedure to handle blocking stuff for the pushbuttons. + * Scheduled procedure to handle blocking stuff for the pushbuttons * Handles all pending events and exits. + * */ static void shpchp_pushbutton_thread(struct work_struct *work) { diff --git a/trunk/drivers/pci/pci-sysfs.c b/trunk/drivers/pci/pci-sysfs.c index 7d1877341aad..1b7b2812bf2d 100644 --- a/trunk/drivers/pci/pci-sysfs.c +++ b/trunk/drivers/pci/pci-sysfs.c @@ -702,10 +702,8 @@ static int __init pci_sysfs_init(void) sysfs_initialized = 1; for_each_pci_dev(pdev) { retval = pci_create_sysfs_dev_files(pdev); - if (retval) { - pci_dev_put(pdev); + if (retval) return retval; - } } return 0; diff --git a/trunk/drivers/pci/pcie/aer/aerdrv_core.c b/trunk/drivers/pci/pcie/aer/aerdrv_core.c index 3c0d8d138f5a..92a8469b21ba 100644 --- a/trunk/drivers/pci/pcie/aer/aerdrv_core.c +++ b/trunk/drivers/pci/pcie/aer/aerdrv_core.c @@ -168,11 +168,11 @@ static int find_device_iter(struct device *device, void *data) /** * find_source_device - search through device hierarchy for source device - * @parent: pointer to Root Port pci_dev data structure + * @p_dev: pointer to Root Port pci_dev data structure * @id: device ID of agent who sends an error message to this Root Port * * Invoked when error is detected at the Root Port. - */ + **/ static struct device* find_source_device(struct pci_dev *parent, u16 id) { struct pci_dev *dev = parent; @@ -286,15 +286,14 @@ static void report_resume(struct pci_dev *dev, void *data) /** * broadcast_error_message - handle message broadcast to downstream drivers - * @dev: pointer to from where in a hierarchy message is broadcasted down + * @device: pointer to from where in a hierarchy message is broadcasted down + * @api: callback to be broadcasted * @state: error state - * @error_mesg: message to print - * @cb: callback to be broadcasted * * Invoked during error recovery process. Once being invoked, the content * of error severity will be broadcasted to all downstream drivers in a * hierarchy in question. - */ + **/ static pci_ers_result_t broadcast_error_message(struct pci_dev *dev, enum pci_channel_state state, char *error_mesg, @@ -429,7 +428,7 @@ static pci_ers_result_t reset_link(struct pcie_device *aerdev, * Invoked when an error is nonfatal/fatal. Once being invoked, broadcast * error detected message to all downstream drivers within a hierarchy in * question and return the returned code. - */ + **/ static pci_ers_result_t do_recovery(struct pcie_device *aerdev, struct pci_dev *dev, int severity) @@ -489,7 +488,7 @@ static pci_ers_result_t do_recovery(struct pcie_device *aerdev, * @info: comprehensive error information * * Invoked when an error being detected by Root Port. - */ + **/ static void handle_error_source(struct pcie_device * aerdev, struct pci_dev *dev, struct aer_err_info info) @@ -522,7 +521,7 @@ static void handle_error_source(struct pcie_device * aerdev, * @rpc: pointer to a Root Port data structure * * Invoked when PCIE bus loads AER service driver. - */ + **/ void aer_enable_rootport(struct aer_rpc *rpc) { struct pci_dev *pdev = rpc->rpd->port; @@ -570,7 +569,7 @@ void aer_enable_rootport(struct aer_rpc *rpc) * @rpc: pointer to a Root Port data structure * * Invoked when PCIE bus unloads AER service driver. - */ + **/ static void disable_root_aer(struct aer_rpc *rpc) { struct pci_dev *pdev = rpc->rpd->port; @@ -591,7 +590,7 @@ static void disable_root_aer(struct aer_rpc *rpc) * @rpc: pointer to the root port which holds an error * * Invoked by DPC handler to consume an error. - */ + **/ static struct aer_err_source* get_e_source(struct aer_rpc *rpc) { struct aer_err_source *e_source; @@ -656,7 +655,7 @@ static int get_device_error_info(struct pci_dev *dev, struct aer_err_info *info) * aer_isr_one_error - consume an error detected by root port * @p_device: pointer to error root port service device * @e_src: pointer to an error source - */ + **/ static void aer_isr_one_error(struct pcie_device *p_device, struct aer_err_source *e_src) { @@ -707,7 +706,7 @@ static void aer_isr_one_error(struct pcie_device *p_device, * @work: definition of this work item * * Invoked, as DPC, when root port records new detected error - */ + **/ void aer_isr(struct work_struct *work) { struct aer_rpc *rpc = container_of(work, struct aer_rpc, dpc_handler); @@ -730,7 +729,7 @@ void aer_isr(struct work_struct *work) * @rpc: pointer to a root port device being deleted * * Invoked when AER service unloaded on a specific Root Port - */ + **/ void aer_delete_rootport(struct aer_rpc *rpc) { /* Disable root port AER itself */ @@ -744,7 +743,7 @@ void aer_delete_rootport(struct aer_rpc *rpc) * @dev: pointer to AER pcie device * * Invoked when AER service driver is loaded. - */ + **/ int aer_init(struct pcie_device *dev) { if (aer_osc_setup(dev) && !forceload) diff --git a/trunk/drivers/pci/pcie/portdrv_pci.c b/trunk/drivers/pci/pcie/portdrv_pci.c index 26057f98f72e..df383645e366 100644 --- a/trunk/drivers/pci/pcie/portdrv_pci.c +++ b/trunk/drivers/pci/pcie/portdrv_pci.c @@ -217,7 +217,7 @@ static int slot_reset_iter(struct device *device, void *data) static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) { - pci_ers_result_t status = PCI_ERS_RESULT_NONE; + pci_ers_result_t status; int retval; /* If fatal, restore cfg space for possible link reset at upstream */ diff --git a/trunk/drivers/pnp/pnpacpi/rsparser.c b/trunk/drivers/pnp/pnpacpi/rsparser.c index 3c5eb374adf8..11adab13f2b7 100644 --- a/trunk/drivers/pnp/pnpacpi/rsparser.c +++ b/trunk/drivers/pnp/pnpacpi/rsparser.c @@ -83,11 +83,9 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, while (!(res->irq_resource[i].flags & IORESOURCE_UNSET) && i < PNP_MAX_IRQ) i++; - if (i >= PNP_MAX_IRQ) { - printk(KERN_ERR "pnpacpi: exceeded the max number of IRQ " - "resources: %d \n", PNP_MAX_IRQ); + if (i >= PNP_MAX_IRQ) return; - } + /* * in IO-APIC mode, use overrided attribute. Two reasons: * 1. BIOS bug in DSDT @@ -183,9 +181,6 @@ static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res, } res->dma_resource[i].start = dma; res->dma_resource[i].end = dma; - } else { - printk(KERN_ERR "pnpacpi: exceeded the max number of DMA " - "resources: %d \n", PNP_MAX_DMA); } } @@ -207,9 +202,6 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res, } res->port_resource[i].start = io; res->port_resource[i].end = io + len - 1; - } else { - printk(KERN_ERR "pnpacpi: exceeded the max number of IO " - "resources: %d \n", PNP_MAX_PORT); } } @@ -233,9 +225,6 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res, res->mem_resource[i].start = mem; res->mem_resource[i].end = mem + len - 1; - } else { - printk(KERN_ERR "pnpacpi: exceeded the max number of mem " - "resources: %d\n", PNP_MAX_MEM); } } diff --git a/trunk/drivers/pnp/resource.c b/trunk/drivers/pnp/resource.c index e50ebcffb962..41d73a5e9312 100644 --- a/trunk/drivers/pnp/resource.c +++ b/trunk/drivers/pnp/resource.c @@ -367,10 +367,8 @@ int pnp_check_irq(struct pnp_dev *dev, int idx) { struct pci_dev *pci = NULL; for_each_pci_dev(pci) { - if (pci->irq == *irq) { - pci_dev_put(pci); + if (pci->irq == *irq) return 0; - } } } #endif diff --git a/trunk/drivers/ps3/Makefile b/trunk/drivers/ps3/Makefile index 1f5a2d33bf5b..746031de2195 100644 --- a/trunk/drivers/ps3/Makefile +++ b/trunk/drivers/ps3/Makefile @@ -1,6 +1,6 @@ -obj-$(CONFIG_PS3_VUART) += ps3-vuart.o +obj-$(CONFIG_PS3_VUART) += vuart.o obj-$(CONFIG_PS3_PS3AV) += ps3av_mod.o ps3av_mod-objs += ps3av.o ps3av_cmd.o obj-$(CONFIG_PPC_PS3) += sys-manager-core.o -obj-$(CONFIG_PS3_SYS_MANAGER) += ps3-sys-manager.o +obj-$(CONFIG_PS3_SYS_MANAGER) += sys-manager.o obj-$(CONFIG_PS3_STORAGE) += ps3stor_lib.o diff --git a/trunk/drivers/ps3/ps3-sys-manager.c b/trunk/drivers/ps3/sys-manager.c similarity index 100% rename from trunk/drivers/ps3/ps3-sys-manager.c rename to trunk/drivers/ps3/sys-manager.c diff --git a/trunk/drivers/ps3/ps3-vuart.c b/trunk/drivers/ps3/vuart.c similarity index 100% rename from trunk/drivers/ps3/ps3-vuart.c rename to trunk/drivers/ps3/vuart.c diff --git a/trunk/drivers/rtc/interface.c b/trunk/drivers/rtc/interface.c index a4f56e95cf96..de0da545c7a1 100644 --- a/trunk/drivers/rtc/interface.c +++ b/trunk/drivers/rtc/interface.c @@ -293,7 +293,7 @@ int rtc_irq_register(struct rtc_device *rtc, struct rtc_task *task) return -EINVAL; /* Cannot register while the char dev is in use */ - if (test_and_set_bit(RTC_DEV_BUSY, &rtc->flags)) + if (!(mutex_trylock(&rtc->char_lock))) return -EBUSY; spin_lock_irq(&rtc->irq_task_lock); @@ -303,7 +303,7 @@ int rtc_irq_register(struct rtc_device *rtc, struct rtc_task *task) } spin_unlock_irq(&rtc->irq_task_lock); - clear_bit(RTC_DEV_BUSY, &rtc->flags); + mutex_unlock(&rtc->char_lock); return retval; } diff --git a/trunk/drivers/rtc/rtc-dev.c b/trunk/drivers/rtc/rtc-dev.c index ae1bf177d625..814583bd2fe7 100644 --- a/trunk/drivers/rtc/rtc-dev.c +++ b/trunk/drivers/rtc/rtc-dev.c @@ -26,7 +26,10 @@ static int rtc_dev_open(struct inode *inode, struct file *file) struct rtc_device, char_dev); const struct rtc_class_ops *ops = rtc->ops; - if (test_and_set_bit(RTC_DEV_BUSY, &rtc->flags)) + /* We keep the lock as long as the device is in use + * and return immediately if busy + */ + if (!(mutex_trylock(&rtc->char_lock))) return -EBUSY; file->private_data = rtc; @@ -40,8 +43,8 @@ static int rtc_dev_open(struct inode *inode, struct file *file) return 0; } - /* something has gone wrong */ - clear_bit(RTC_DEV_BUSY, &rtc->flags); + /* something has gone wrong, release the lock */ + mutex_unlock(&rtc->char_lock); return err; } @@ -402,7 +405,7 @@ static int rtc_dev_release(struct inode *inode, struct file *file) if (rtc->ops->release) rtc->ops->release(rtc->dev.parent); - clear_bit(RTC_DEV_BUSY, &rtc->flags); + mutex_unlock(&rtc->char_lock); return 0; } @@ -437,6 +440,7 @@ void rtc_dev_prepare(struct rtc_device *rtc) rtc->dev.devt = MKDEV(MAJOR(rtc_devt), rtc->id); + mutex_init(&rtc->char_lock); #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL INIT_WORK(&rtc->uie_task, rtc_uie_task); setup_timer(&rtc->uie_timer, rtc_uie_timer, (unsigned long)rtc); diff --git a/trunk/drivers/scsi/zorro7xx.c b/trunk/drivers/scsi/zorro7xx.c index 64d40a2d4d4d..ac67394c7373 100644 --- a/trunk/drivers/scsi/zorro7xx.c +++ b/trunk/drivers/scsi/zorro7xx.c @@ -13,10 +13,7 @@ #include #include #include - -#include #include - #include #include diff --git a/trunk/drivers/serial/ip22zilog.c b/trunk/drivers/serial/ip22zilog.c index 9c95bc0398ad..f3257f708ef9 100644 --- a/trunk/drivers/serial/ip22zilog.c +++ b/trunk/drivers/serial/ip22zilog.c @@ -45,6 +45,8 @@ #include "ip22zilog.h" +void ip22_do_break(void); + /* * On IP22 we need to delay after register accesses but we do not need to * flush writes. @@ -79,9 +81,12 @@ struct uart_ip22zilog_port { #define IP22ZILOG_FLAG_REGS_HELD 0x00000040 #define IP22ZILOG_FLAG_TX_STOPPED 0x00000080 #define IP22ZILOG_FLAG_TX_ACTIVE 0x00000100 -#define IP22ZILOG_FLAG_RESET_DONE 0x00000200 - unsigned int tty_break; + unsigned int cflag; + + /* L1-A keyboard break state. */ + int kbd_id; + int l1_down; unsigned char parity_mask; unsigned char prev_status; @@ -245,26 +250,13 @@ static void ip22zilog_maybe_update_regs(struct uart_ip22zilog_port *up, } } -#define Rx_BRK 0x0100 /* BREAK event software flag. */ -#define Rx_SYS 0x0200 /* SysRq event software flag. */ - -static struct tty_struct *ip22zilog_receive_chars(struct uart_ip22zilog_port *up, - struct zilog_channel *channel) +static void ip22zilog_receive_chars(struct uart_ip22zilog_port *up, + struct zilog_channel *channel) { - struct tty_struct *tty; - unsigned char ch, flag; - unsigned int r1; - - tty = NULL; - if (up->port.info != NULL && - up->port.info->tty != NULL) - tty = up->port.info->tty; + struct tty_struct *tty = up->port.info->tty; /* XXX info==NULL? */ - for (;;) { - ch = readb(&channel->control); - ZSDELAY(); - if (!(ch & Rx_CH_AV)) - break; + while (1) { + unsigned char ch, r1, flag; r1 = read_zsreg(channel, R1); if (r1 & (PAR_ERR | Rx_OVR | CRC_ERR)) { @@ -273,26 +265,43 @@ static struct tty_struct *ip22zilog_receive_chars(struct uart_ip22zilog_port *up ZS_WSYNC(channel); } + ch = readb(&channel->control); + ZSDELAY(); + + /* This funny hack depends upon BRK_ABRT not interfering + * with the other bits we care about in R1. + */ + if (ch & BRK_ABRT) + r1 |= BRK_ABRT; + ch = readb(&channel->data); ZSDELAY(); ch &= up->parity_mask; - /* Handle the null char got when BREAK is removed. */ - if (!ch) - r1 |= up->tty_break; + if (ZS_IS_CONS(up) && (r1 & BRK_ABRT)) { + /* Wait for BREAK to deassert to avoid potentially + * confusing the PROM. + */ + while (1) { + ch = readb(&channel->control); + ZSDELAY(); + if (!(ch & BRK_ABRT)) + break; + } + ip22_do_break(); + return; + } /* A real serial line, record the character and status. */ flag = TTY_NORMAL; up->port.icount.rx++; - if (r1 & (PAR_ERR | Rx_OVR | CRC_ERR | Rx_SYS | Rx_BRK)) { - up->tty_break = 0; - - if (r1 & (Rx_SYS | Rx_BRK)) { - up->port.icount.brk++; - if (r1 & Rx_SYS) - continue; + if (r1 & (BRK_ABRT | PAR_ERR | Rx_OVR | CRC_ERR)) { + if (r1 & BRK_ABRT) { r1 &= ~(PAR_ERR | CRC_ERR); + up->port.icount.brk++; + if (uart_handle_break(&up->port)) + goto next_char; } else if (r1 & PAR_ERR) up->port.icount.parity++; @@ -301,21 +310,30 @@ static struct tty_struct *ip22zilog_receive_chars(struct uart_ip22zilog_port *up if (r1 & Rx_OVR) up->port.icount.overrun++; r1 &= up->port.read_status_mask; - if (r1 & Rx_BRK) + if (r1 & BRK_ABRT) flag = TTY_BREAK; else if (r1 & PAR_ERR) flag = TTY_PARITY; else if (r1 & CRC_ERR) flag = TTY_FRAME; } - if (uart_handle_sysrq_char(&up->port, ch)) - continue; + goto next_char; - if (tty) - uart_insert_char(&up->port, r1, Rx_OVR, ch, flag); + if (up->port.ignore_status_mask == 0xff || + (r1 & up->port.ignore_status_mask) == 0) + tty_insert_flip_char(tty, ch, flag); + + if (r1 & Rx_OVR) + tty_insert_flip_char(tty, 0, TTY_OVERRUN); + next_char: + ch = readb(&channel->control); + ZSDELAY(); + if (!(ch & Rx_CH_AV)) + break; } - return tty; + + tty_flip_buffer_push(tty); } static void ip22zilog_status_handle(struct uart_ip22zilog_port *up, @@ -330,15 +348,6 @@ static void ip22zilog_status_handle(struct uart_ip22zilog_port *up, ZSDELAY(); ZS_WSYNC(channel); - if (up->curregs[R15] & BRKIE) { - if ((status & BRK_ABRT) && !(up->prev_status & BRK_ABRT)) { - if (uart_handle_break(&up->port)) - up->tty_break = Rx_SYS; - else - up->tty_break = Rx_BRK; - } - } - if (ZS_WANTS_MODEM_STATUS(up)) { if (status & SYNC) up->port.icount.dsr++; @@ -347,10 +356,10 @@ static void ip22zilog_status_handle(struct uart_ip22zilog_port *up, * But it does not tell us which bit has changed, we have to keep * track of this ourselves. */ - if ((status ^ up->prev_status) ^ DCD) + if ((status & DCD) ^ up->prev_status) uart_handle_dcd_change(&up->port, (status & DCD)); - if ((status ^ up->prev_status) ^ CTS) + if ((status & CTS) ^ up->prev_status) uart_handle_cts_change(&up->port, (status & CTS)); @@ -438,21 +447,19 @@ static irqreturn_t ip22zilog_interrupt(int irq, void *dev_id) while (up) { struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(&up->port); - struct tty_struct *tty; unsigned char r3; spin_lock(&up->port.lock); r3 = read_zsreg(channel, R3); /* Channel A */ - tty = NULL; if (r3 & (CHAEXT | CHATxIP | CHARxIP)) { writeb(RES_H_IUS, &channel->control); ZSDELAY(); ZS_WSYNC(channel); if (r3 & CHARxIP) - tty = ip22zilog_receive_chars(up, channel); + ip22zilog_receive_chars(up, channel); if (r3 & CHAEXT) ip22zilog_status_handle(up, channel); if (r3 & CHATxIP) @@ -460,22 +467,18 @@ static irqreturn_t ip22zilog_interrupt(int irq, void *dev_id) } spin_unlock(&up->port.lock); - if (tty) - tty_flip_buffer_push(tty); - /* Channel B */ up = up->next; channel = ZILOG_CHANNEL_FROM_PORT(&up->port); spin_lock(&up->port.lock); - tty = NULL; if (r3 & (CHBEXT | CHBTxIP | CHBRxIP)) { writeb(RES_H_IUS, &channel->control); ZSDELAY(); ZS_WSYNC(channel); if (r3 & CHBRxIP) - tty = ip22zilog_receive_chars(up, channel); + ip22zilog_receive_chars(up, channel); if (r3 & CHBEXT) ip22zilog_status_handle(up, channel); if (r3 & CHBTxIP) @@ -483,9 +486,6 @@ static irqreturn_t ip22zilog_interrupt(int irq, void *dev_id) } spin_unlock(&up->port.lock); - if (tty) - tty_flip_buffer_push(tty); - up = up->next; } @@ -681,46 +681,11 @@ static void ip22zilog_break_ctl(struct uart_port *port, int break_state) spin_unlock_irqrestore(&port->lock, flags); } -static void __ip22zilog_reset(struct uart_ip22zilog_port *up) -{ - struct zilog_channel *channel; - int i; - - if (up->flags & IP22ZILOG_FLAG_RESET_DONE) - return; - - /* Let pending transmits finish. */ - channel = ZILOG_CHANNEL_FROM_PORT(&up->port); - for (i = 0; i < 1000; i++) { - unsigned char stat = read_zsreg(channel, R1); - if (stat & ALL_SNT) - break; - udelay(100); - } - - if (!ZS_IS_CHANNEL_A(up)) { - up++; - channel = ZILOG_CHANNEL_FROM_PORT(&up->port); - } - write_zsreg(channel, R9, FHWRES); - ZSDELAY_LONG(); - (void) read_zsreg(channel, R0); - - up->flags |= IP22ZILOG_FLAG_RESET_DONE; - up->next->flags |= IP22ZILOG_FLAG_RESET_DONE; -} - static void __ip22zilog_startup(struct uart_ip22zilog_port *up) { struct zilog_channel *channel; channel = ZILOG_CHANNEL_FROM_PORT(&up->port); - - __ip22zilog_reset(up); - - __load_zsregs(channel, up->curregs); - /* set master interrupt enable */ - write_zsreg(channel, R9, up->curregs[R9]); up->prev_status = readb(&channel->control); /* Enable receiver and transmitter. */ @@ -894,6 +859,8 @@ ip22zilog_set_termios(struct uart_port *port, struct ktermios *termios, else up->flags &= ~IP22ZILOG_FLAG_MODEM_STATUS; + up->cflag = termios->c_cflag; + ip22zilog_maybe_update_regs(up, ZILOG_CHANNEL_FROM_PORT(port)); uart_update_timeout(port, termios->c_cflag, baud); @@ -1025,29 +992,74 @@ ip22zilog_console_write(struct console *con, const char *s, unsigned int count) spin_unlock_irqrestore(&up->port.lock, flags); } +void +ip22serial_console_termios(struct console *con, char *options) +{ + int baud = 9600, bits = 8, cflag; + int parity = 'n'; + int flow = 'n'; + + if (options) + uart_parse_options(options, &baud, &parity, &bits, &flow); + + cflag = CREAD | HUPCL | CLOCAL; + + switch (baud) { + case 150: cflag |= B150; break; + case 300: cflag |= B300; break; + case 600: cflag |= B600; break; + case 1200: cflag |= B1200; break; + case 2400: cflag |= B2400; break; + case 4800: cflag |= B4800; break; + case 9600: cflag |= B9600; break; + case 19200: cflag |= B19200; break; + case 38400: cflag |= B38400; break; + default: baud = 9600; cflag |= B9600; break; + } + + con->cflag = cflag | CS8; /* 8N1 */ + + uart_update_timeout(&ip22zilog_port_table[con->index].port, cflag, baud); +} + static int __init ip22zilog_console_setup(struct console *con, char *options) { struct uart_ip22zilog_port *up = &ip22zilog_port_table[con->index]; unsigned long flags; - int baud = 9600, bits = 8; - int parity = 'n'; - int flow = 'n'; + int baud, brg; - up->flags |= IP22ZILOG_FLAG_IS_CONS; + printk("Console: ttyS%d (IP22-Zilog)\n", con->index); - printk(KERN_INFO "Console: ttyS%d (IP22-Zilog)\n", con->index); + /* Get firmware console settings. */ + ip22serial_console_termios(con, options); + + /* Firmware console speed is limited to 150-->38400 baud so + * this hackish cflag thing is OK. + */ + switch (con->cflag & CBAUD) { + case B150: baud = 150; break; + case B300: baud = 300; break; + case B600: baud = 600; break; + case B1200: baud = 1200; break; + case B2400: baud = 2400; break; + case B4800: baud = 4800; break; + default: case B9600: baud = 9600; break; + case B19200: baud = 19200; break; + case B38400: baud = 38400; break; + }; + + brg = BPS_TO_BRG(baud, ZS_CLOCK / ZS_CLOCK_DIVISOR); spin_lock_irqsave(&up->port.lock, flags); - up->curregs[R15] |= BRKIE; + up->curregs[R15] = BRKIE; + ip22zilog_convert_to_zs(up, con->cflag, 0, brg); __ip22zilog_startup(up); spin_unlock_irqrestore(&up->port.lock, flags); - if (options) - uart_parse_options(options, &baud, &parity, &bits, &flow); - return uart_set_options(&up->port, con, baud, parity, bits, flow); + return 0; } static struct uart_driver ip22zilog_reg; @@ -1128,10 +1140,25 @@ static void __init ip22zilog_prepare(void) up[(chip * 2) + 1].port.line = (chip * 2) + 1; up[(chip * 2) + 1].flags |= IP22ZILOG_FLAG_IS_CHANNEL_A; } +} + +static void __init ip22zilog_init_hw(void) +{ + int i; + + for (i = 0; i < NUM_CHANNELS; i++) { + struct uart_ip22zilog_port *up = &ip22zilog_port_table[i]; + struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(&up->port); + unsigned long flags; + int baud, brg; - for (channel = 0; channel < NUM_CHANNELS; channel++) { - struct uart_ip22zilog_port *up = &ip22zilog_port_table[channel]; - int brg; + spin_lock_irqsave(&up->port.lock, flags); + + if (ZS_IS_CHANNEL_A(up)) { + write_zsreg(channel, R9, FHWRES); + ZSDELAY_LONG(); + (void) read_zsreg(channel, R0); + } /* Normal serial TTY. */ up->parity_mask = 0xff; @@ -1142,10 +1169,16 @@ static void __init ip22zilog_prepare(void) up->curregs[R9] = NV | MIE; up->curregs[R10] = NRZ; up->curregs[R11] = TCBR | RCBR; - brg = BPS_TO_BRG(9600, ZS_CLOCK / ZS_CLOCK_DIVISOR); + baud = 9600; + brg = BPS_TO_BRG(baud, ZS_CLOCK / ZS_CLOCK_DIVISOR); up->curregs[R12] = (brg & 0xff); up->curregs[R13] = (brg >> 8) & 0xff; up->curregs[R14] = BRENAB; + __load_zsregs(channel, up->curregs); + /* set master interrupt enable */ + write_zsreg(channel, R9, up->curregs[R9]); + + spin_unlock_irqrestore(&up->port.lock, flags); } } @@ -1162,6 +1195,8 @@ static int __init ip22zilog_ports_init(void) panic("IP22-Zilog: Unable to register zs interrupt handler.\n"); } + ip22zilog_init_hw(); + ret = uart_register_driver(&ip22zilog_reg); if (ret == 0) { int i; diff --git a/trunk/drivers/spi/atmel_spi.c b/trunk/drivers/spi/atmel_spi.c index ff6a14bf1280..0d342dcdd302 100644 --- a/trunk/drivers/spi/atmel_spi.c +++ b/trunk/drivers/spi/atmel_spi.c @@ -497,7 +497,7 @@ static int atmel_spi_setup(struct spi_device *spi) /* chipselect must have been muxed as GPIO (e.g. in board setup) */ npcs_pin = (unsigned int)spi->controller_data; if (!spi->controller_state) { - ret = gpio_request(npcs_pin, spi->dev.bus_id); + ret = gpio_request(npcs_pin, "spi_npcs"); if (ret) return ret; spi->controller_state = (void *)npcs_pin; diff --git a/trunk/drivers/spi/spi_s3c24xx_gpio.c b/trunk/drivers/spi/spi_s3c24xx_gpio.c index 109d82c1abc0..0fa25e2e80fe 100644 --- a/trunk/drivers/spi/spi_s3c24xx_gpio.c +++ b/trunk/drivers/spi/spi_s3c24xx_gpio.c @@ -96,7 +96,6 @@ static void s3c2410_spigpio_chipselect(struct spi_device *dev, int value) static int s3c2410_spigpio_probe(struct platform_device *dev) { - struct s3c2410_spigpio_info *info; struct spi_master *master; struct s3c2410_spigpio *sp; int ret; @@ -114,11 +113,10 @@ static int s3c2410_spigpio_probe(struct platform_device *dev) platform_set_drvdata(dev, sp); /* copy in the plkatform data */ - info = sp->info = dev->dev.platform_data; + sp->info = dev->dev.platform_data; /* setup spi bitbang adaptor */ sp->bitbang.master = spi_master_get(master); - sp->bitbang.master->bus_num = info->bus_num; sp->bitbang.chipselect = s3c2410_spigpio_chipselect; sp->bitbang.txrx_word[SPI_MODE_0] = s3c2410_spigpio_txrx_mode0; @@ -126,18 +124,13 @@ static int s3c2410_spigpio_probe(struct platform_device *dev) sp->bitbang.txrx_word[SPI_MODE_2] = s3c2410_spigpio_txrx_mode2; sp->bitbang.txrx_word[SPI_MODE_3] = s3c2410_spigpio_txrx_mode3; - /* set state of spi pins, always assume that the clock is - * available, but do check the MOSI and MISO. */ - s3c2410_gpio_setpin(info->pin_clk, 0); - s3c2410_gpio_cfgpin(info->pin_clk, S3C2410_GPIO_OUTPUT); + /* set state of spi pins */ + s3c2410_gpio_setpin(sp->info->pin_clk, 0); + s3c2410_gpio_setpin(sp->info->pin_mosi, 0); - if (info->pin_mosi < S3C2410_GPH10) { - s3c2410_gpio_setpin(info->pin_mosi, 0); - s3c2410_gpio_cfgpin(info->pin_mosi, S3C2410_GPIO_OUTPUT); - } - - if (info->pin_miso != S3C2410_GPA0 && info->pin_miso < S3C2410_GPH10) - s3c2410_gpio_cfgpin(info->pin_miso, S3C2410_GPIO_INPUT); + s3c2410_gpio_cfgpin(sp->info->pin_clk, S3C2410_GPIO_OUTPUT); + s3c2410_gpio_cfgpin(sp->info->pin_mosi, S3C2410_GPIO_OUTPUT); + s3c2410_gpio_cfgpin(sp->info->pin_miso, S3C2410_GPIO_INPUT); ret = spi_bitbang_start(&sp->bitbang); if (ret) diff --git a/trunk/drivers/usb/README b/trunk/drivers/usb/README index 284f46b3e1cc..3c8434128554 100644 --- a/trunk/drivers/usb/README +++ b/trunk/drivers/usb/README @@ -39,12 +39,12 @@ first subdirectory in the list below that it fits into. image/ - This is for still image drivers, like scanners or digital cameras. -../input/ - This is for any driver that uses the input subsystem, +input/ - This is for any driver that uses the input subsystem, like keyboard, mice, touchscreens, tablets, etc. -../media/ - This is for multimedia drivers, like video cameras, +media/ - This is for multimedia drivers, like video cameras, radios, and any other drivers that talk to the v4l subsystem. -../net/ - This is for network drivers. +net/ - This is for network drivers. serial/ - This is for USB to serial drivers. storage/ - This is for USB mass-storage drivers. class/ - This is for all USB device drivers that do not fit diff --git a/trunk/drivers/usb/core/driver.c b/trunk/drivers/usb/core/driver.c index c51f8e9312e0..8586817698ad 100644 --- a/trunk/drivers/usb/core/driver.c +++ b/trunk/drivers/usb/core/driver.c @@ -585,6 +585,9 @@ static int usb_uevent(struct device *dev, struct kobj_uevent_env *env) { struct usb_device *usb_dev; + if (!dev) + return -ENODEV; + /* driver is often null here; dev_dbg() would oops */ pr_debug ("usb %s: uevent\n", dev->bus_id); @@ -628,6 +631,14 @@ static int usb_uevent(struct device *dev, struct kobj_uevent_env *env) usb_dev->descriptor.bDeviceProtocol)) return -ENOMEM; + if (add_uevent_var(env, "BUSNUM=%03d", + usb_dev->bus->busnum)) + return -ENOMEM; + + if (add_uevent_var(env, "DEVNUM=%03d", + usb_dev->devnum)) + return -ENOMEM; + return 0; } diff --git a/trunk/drivers/usb/core/hcd.c b/trunk/drivers/usb/core/hcd.c index d5ed3fa9e304..fea8256a18d6 100644 --- a/trunk/drivers/usb/core/hcd.c +++ b/trunk/drivers/usb/core/hcd.c @@ -1311,8 +1311,8 @@ void usb_hcd_flush_endpoint(struct usb_device *udev, hcd = bus_to_hcd(udev->bus); /* No more submits can occur */ - spin_lock_irq(&hcd_urb_list_lock); rescan: + spin_lock_irq(&hcd_urb_list_lock); list_for_each_entry (urb, &ep->urb_list, urb_list) { int is_in; @@ -1345,7 +1345,6 @@ void usb_hcd_flush_endpoint(struct usb_device *udev, usb_put_urb (urb); /* list contents may have changed */ - spin_lock(&hcd_urb_list_lock); goto rescan; } spin_unlock_irq(&hcd_urb_list_lock); diff --git a/trunk/drivers/usb/core/hub.c b/trunk/drivers/usb/core/hub.c index 13b326a13377..036c3dea855e 100644 --- a/trunk/drivers/usb/core/hub.c +++ b/trunk/drivers/usb/core/hub.c @@ -335,7 +335,7 @@ static void kick_khubd(struct usb_hub *hub) to_usb_interface(hub->intfdev)->pm_usage_cnt = 1; spin_lock_irqsave(&hub_event_lock, flags); - if (!hub->disconnected && list_empty(&hub->event_list)) { + if (!hub->disconnected & list_empty(&hub->event_list)) { list_add_tail(&hub->event_list, &hub_event_list); wake_up(&khubd_wait); } diff --git a/trunk/drivers/usb/core/message.c b/trunk/drivers/usb/core/message.c index fcd40ecbeecc..316a746e0080 100644 --- a/trunk/drivers/usb/core/message.c +++ b/trunk/drivers/usb/core/message.c @@ -1172,6 +1172,7 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate) struct usb_host_interface *alt; int ret; int manual = 0; + int changed; if (dev->state == USB_STATE_SUSPENDED) return -EHOSTUNREACH; @@ -1211,7 +1212,8 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate) */ /* prevent submissions using previous endpoint settings */ - if (iface->cur_altsetting != alt && device_is_registered(&iface->dev)) + changed = (iface->cur_altsetting != alt); + if (changed && device_is_registered(&iface->dev)) usb_remove_sysfs_intf_files(iface); usb_disable_interface(dev, iface); @@ -1248,7 +1250,7 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate) * (Likewise, EP0 never "halts" on well designed devices.) */ usb_enable_interface(dev, iface); - if (device_is_registered(&iface->dev)) + if (changed && device_is_registered(&iface->dev)) usb_create_sysfs_intf_files(iface); return 0; @@ -1346,10 +1348,34 @@ static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env) struct usb_interface *intf; struct usb_host_interface *alt; + if (!dev) + return -ENODEV; + + /* driver is often null here; dev_dbg() would oops */ + pr_debug ("usb %s: uevent\n", dev->bus_id); + intf = to_usb_interface(dev); usb_dev = interface_to_usbdev(intf); alt = intf->cur_altsetting; +#ifdef CONFIG_USB_DEVICEFS + if (add_uevent_var(env, "DEVICE=/proc/bus/usb/%03d/%03d", + usb_dev->bus->busnum, usb_dev->devnum)) + return -ENOMEM; +#endif + + if (add_uevent_var(env, "PRODUCT=%x/%x/%x", + le16_to_cpu(usb_dev->descriptor.idVendor), + le16_to_cpu(usb_dev->descriptor.idProduct), + le16_to_cpu(usb_dev->descriptor.bcdDevice))) + return -ENOMEM; + + if (add_uevent_var(env, "TYPE=%d/%d/%d", + usb_dev->descriptor.bDeviceClass, + usb_dev->descriptor.bDeviceSubClass, + usb_dev->descriptor.bDeviceProtocol)) + return -ENOMEM; + if (add_uevent_var(env, "INTERFACE=%d/%d/%d", alt->desc.bInterfaceClass, alt->desc.bInterfaceSubClass, @@ -1615,6 +1641,12 @@ int usb_set_configuration(struct usb_device *dev, int configuration) intf->dev.bus_id, ret); continue; } + + /* The driver's probe method can call usb_set_interface(), + * which would mean the interface's sysfs files are already + * created. Just in case, we'll remove them first. + */ + usb_remove_sysfs_intf_files(intf); usb_create_sysfs_intf_files(intf); } diff --git a/trunk/drivers/usb/core/sysfs.c b/trunk/drivers/usb/core/sysfs.c index 32bd130b1eed..b04afd06e502 100644 --- a/trunk/drivers/usb/core/sysfs.c +++ b/trunk/drivers/usb/core/sysfs.c @@ -735,8 +735,6 @@ 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) - return 0; retval = sysfs_create_group(&dev->kobj, &intf_attr_grp); if (retval) return retval; @@ -748,7 +746,6 @@ int usb_create_sysfs_intf_files(struct usb_interface *intf) if (intf->intf_assoc) retval = sysfs_create_group(&dev->kobj, &intf_assoc_attr_grp); usb_create_intf_ep_files(intf, udev); - intf->sysfs_files_created = 1; return 0; } @@ -756,11 +753,8 @@ void usb_remove_sysfs_intf_files(struct usb_interface *intf) { struct device *dev = &intf->dev; - if (!intf->sysfs_files_created) - return; usb_remove_intf_ep_files(intf); device_remove_file(dev, &dev_attr_interface); sysfs_remove_group(&dev->kobj, &intf_attr_grp); sysfs_remove_group(&intf->dev.kobj, &intf_assoc_attr_grp); - intf->sysfs_files_created = 0; } diff --git a/trunk/drivers/usb/core/usb.c b/trunk/drivers/usb/core/usb.c index 8f142370103d..c4a6f1095b8b 100644 --- a/trunk/drivers/usb/core/usb.c +++ b/trunk/drivers/usb/core/usb.c @@ -192,34 +192,9 @@ static void usb_release_dev(struct device *dev) kfree(udev); } -#ifdef CONFIG_HOTPLUG -static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env) -{ - struct usb_device *usb_dev; - - usb_dev = to_usb_device(dev); - - if (add_uevent_var(env, "BUSNUM=%03d", usb_dev->bus->busnum)) - return -ENOMEM; - - if (add_uevent_var(env, "DEVNUM=%03d", usb_dev->devnum)) - return -ENOMEM; - - return 0; -} - -#else - -static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env) -{ - return -ENODEV; -} -#endif /* CONFIG_HOTPLUG */ - struct device_type usb_device_type = { .name = "usb_device", .release = usb_release_dev, - .uevent = usb_dev_uevent, }; #ifdef CONFIG_PM diff --git a/trunk/drivers/usb/gadget/omap_udc.c b/trunk/drivers/usb/gadget/omap_udc.c index d377154658b5..87c4f50dfb61 100644 --- a/trunk/drivers/usb/gadget/omap_udc.c +++ b/trunk/drivers/usb/gadget/omap_udc.c @@ -1241,14 +1241,14 @@ static void pullup_enable(struct omap_udc *udc) udc->gadget.dev.parent->power.power_state = PMSG_ON; udc->gadget.dev.power.power_state = PMSG_ON; UDC_SYSCON1_REG |= UDC_PULLUP_EN; - if (!gadget_is_otg(&udc->gadget) && !cpu_is_omap15xx()) + if (!gadget_is_otg(udc->gadget) && !cpu_is_omap15xx()) OTG_CTRL_REG |= OTG_BSESSVLD; UDC_IRQ_EN_REG = UDC_DS_CHG_IE; } static void pullup_disable(struct omap_udc *udc) { - if (!gadget_is_otg(&udc->gadget) && !cpu_is_omap15xx()) + if (!gadget_is_otg(udc->gadget) && !cpu_is_omap15xx()) OTG_CTRL_REG &= ~OTG_BSESSVLD; UDC_IRQ_EN_REG = UDC_DS_CHG_IE; UDC_SYSCON1_REG &= ~UDC_PULLUP_EN; @@ -1386,7 +1386,7 @@ static void update_otg(struct omap_udc *udc) { u16 devstat; - if (!gadget_is_otg(&udc->gadget)) + if (!gadget_is_otg(udc->gadget)) return; if (OTG_CTRL_REG & OTG_ID) diff --git a/trunk/drivers/usb/gadget/s3c2410_udc.c b/trunk/drivers/usb/gadget/s3c2410_udc.c index 4ce050c3d13f..e3e90f8a75e7 100644 --- a/trunk/drivers/usb/gadget/s3c2410_udc.c +++ b/trunk/drivers/usb/gadget/s3c2410_udc.c @@ -52,10 +52,10 @@ #include #include +#include #include - -#include -#include +#include +#include #include @@ -1511,11 +1511,7 @@ static irqreturn_t s3c2410_udc_vbus_irq(int irq, void *_dev) unsigned int value; dprintk(DEBUG_NORMAL, "%s()\n", __func__); - - /* some cpus cannot read from an line configured to IRQ! */ - s3c2410_gpio_cfgpin(udc_info->vbus_pin, S3C2410_GPIO_INPUT); value = s3c2410_gpio_getpin(udc_info->vbus_pin); - s3c2410_gpio_cfgpin(udc_info->vbus_pin, S3C2410_GPIO_SFN2); if (udc_info->vbus_pin_inverted) value = !value; @@ -1876,9 +1872,9 @@ static int s3c2410_udc_probe(struct platform_device *pdev) if (udc_info && udc_info->vbus_pin > 0) { irq = s3c2410_gpio_getirq(udc_info->vbus_pin); retval = request_irq(irq, s3c2410_udc_vbus_irq, - IRQF_DISABLED | IRQF_TRIGGER_RISING - | IRQF_TRIGGER_FALLING | IRQF_SHARED, - gadget_name, udc); + IRQF_DISABLED | IRQF_TRIGGER_RISING + | IRQF_TRIGGER_FALLING, + gadget_name, udc); if (retval != 0) { dev_err(dev, "can't get vbus irq %i, err %d\n", diff --git a/trunk/drivers/usb/host/Kconfig b/trunk/drivers/usb/host/Kconfig index 49a91c5ee51b..177e78ed241b 100644 --- a/trunk/drivers/usb/host/Kconfig +++ b/trunk/drivers/usb/host/Kconfig @@ -156,7 +156,7 @@ config USB_OHCI_HCD_PCI config USB_OHCI_HCD_SSB bool "OHCI support for Broadcom SSB OHCI core" - depends on USB_OHCI_HCD && (SSB = y || SSB = USB_OHCI_HCD) && EXPERIMENTAL + depends on USB_OHCI_HCD && (SSB = y || SSB = CONFIG_USB_OHCI_HCD) && EXPERIMENTAL default n ---help--- Support for the Sonics Silicon Backplane (SSB) attached diff --git a/trunk/drivers/usb/host/ehci-hcd.c b/trunk/drivers/usb/host/ehci-hcd.c index 5f2d74ed5ad7..c1514442883e 100644 --- a/trunk/drivers/usb/host/ehci-hcd.c +++ b/trunk/drivers/usb/host/ehci-hcd.c @@ -575,15 +575,12 @@ static int ehci_run (struct usb_hcd *hcd) * from the companions to the EHCI controller. If any of the * companions are in the middle of a port reset at the time, it * could cause trouble. Write-locking ehci_cf_port_reset_rwsem - * guarantees that no resets are in progress. After we set CF, - * a short delay lets the hardware catch up; new resets shouldn't - * be started before the port switching actions could complete. + * guarantees that no resets are in progress. */ down_write(&ehci_cf_port_reset_rwsem); hcd->state = HC_STATE_RUNNING; ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag); ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */ - msleep(5); up_write(&ehci_cf_port_reset_rwsem); temp = HC_VERSION(ehci_readl(ehci, &ehci->caps->hc_capbase)); diff --git a/trunk/drivers/usb/image/microtek.c b/trunk/drivers/usb/image/microtek.c index bc207e3c21f5..91e999c9f680 100644 --- a/trunk/drivers/usb/image/microtek.c +++ b/trunk/drivers/usb/image/microtek.c @@ -819,7 +819,7 @@ static int mts_usb_probe(struct usb_interface *intf, goto out_kfree2; new_desc->host->hostdata[0] = (unsigned long)new_desc; - if (scsi_add_host(new_desc->host, &dev->dev)) { + if (scsi_add_host(new_desc->host, NULL)) { err_retval = -EIO; goto out_host_put; } diff --git a/trunk/drivers/usb/misc/adutux.c b/trunk/drivers/usb/misc/adutux.c index 5a2c44e4c1f7..c567aa7a41ea 100644 --- a/trunk/drivers/usb/misc/adutux.c +++ b/trunk/drivers/usb/misc/adutux.c @@ -79,22 +79,12 @@ MODULE_DEVICE_TABLE(usb, device_table); #define COMMAND_TIMEOUT (2*HZ) /* 60 second timeout for a command */ -/* - * The locking scheme is a vanilla 3-lock: - * adu_device.buflock: A spinlock, covers what IRQs touch. - * adutux_mutex: A Static lock to cover open_count. It would also cover - * any globals, but we don't have them in 2.6. - * adu_device.mtx: A mutex to hold across sleepers like copy_from_user. - * It covers all of adu_device, except the open_count - * and what .buflock covers. - */ - /* Structure to hold all of our device specific stuff */ struct adu_device { - struct mutex mtx; + struct mutex mtx; /* locks this structure */ struct usb_device* udev; /* save off the usb device pointer */ struct usb_interface* interface; - unsigned int minor; /* the starting minor number for this device */ + unsigned char minor; /* the starting minor number for this device */ char serial_number[8]; int open_count; /* number of times this port has been opened */ @@ -117,11 +107,8 @@ struct adu_device { char* interrupt_out_buffer; struct usb_endpoint_descriptor* interrupt_out_endpoint; struct urb* interrupt_out_urb; - int out_urb_finished; }; -static DEFINE_MUTEX(adutux_mutex); - static struct usb_driver adu_driver; static void adu_debug_data(int level, const char *function, int size, @@ -145,31 +132,27 @@ static void adu_debug_data(int level, const char *function, int size, */ static void adu_abort_transfers(struct adu_device *dev) { - unsigned long flags; - dbg(2," %s : enter", __FUNCTION__); + if (dev == NULL) { + dbg(1," %s : dev is null", __FUNCTION__); + goto exit; + } + if (dev->udev == NULL) { dbg(1," %s : udev is null", __FUNCTION__); goto exit; } - /* shutdown transfer */ + dbg(2," %s : udev state %d", __FUNCTION__, dev->udev->state); + if (dev->udev->state == USB_STATE_NOTATTACHED) { + dbg(1," %s : udev is not attached", __FUNCTION__); + goto exit; + } - /* XXX Anchor these instead */ - spin_lock_irqsave(&dev->buflock, flags); - if (!dev->read_urb_finished) { - spin_unlock_irqrestore(&dev->buflock, flags); - usb_kill_urb(dev->interrupt_in_urb); - } else - spin_unlock_irqrestore(&dev->buflock, flags); - - spin_lock_irqsave(&dev->buflock, flags); - if (!dev->out_urb_finished) { - spin_unlock_irqrestore(&dev->buflock, flags); - usb_kill_urb(dev->interrupt_out_urb); - } else - spin_unlock_irqrestore(&dev->buflock, flags); + /* shutdown transfer */ + usb_unlink_urb(dev->interrupt_in_urb); + usb_unlink_urb(dev->interrupt_out_urb); exit: dbg(2," %s : leave", __FUNCTION__); @@ -179,6 +162,8 @@ static void adu_delete(struct adu_device *dev) { dbg(2, "%s enter", __FUNCTION__); + adu_abort_transfers(dev); + /* free data structures */ usb_free_urb(dev->interrupt_in_urb); usb_free_urb(dev->interrupt_out_urb); @@ -254,10 +239,7 @@ static void adu_interrupt_out_callback(struct urb *urb) goto exit; } - spin_lock(&dev->buflock); - dev->out_urb_finished = 1; - wake_up(&dev->write_wait); - spin_unlock(&dev->buflock); + wake_up_interruptible(&dev->write_wait); exit: adu_debug_data(5, __FUNCTION__, urb->actual_length, @@ -270,17 +252,12 @@ static int adu_open(struct inode *inode, struct file *file) struct adu_device *dev = NULL; struct usb_interface *interface; int subminor; - int retval; + int retval = 0; dbg(2,"%s : enter", __FUNCTION__); subminor = iminor(inode); - if ((retval = mutex_lock_interruptible(&adutux_mutex))) { - dbg(2, "%s : mutex lock failed", __FUNCTION__); - goto exit_no_lock; - } - interface = usb_find_interface(&adu_driver, subminor); if (!interface) { err("%s - error, can't find device for minor %d", @@ -290,54 +267,54 @@ static int adu_open(struct inode *inode, struct file *file) } dev = usb_get_intfdata(interface); - if (!dev || !dev->udev) { + if (!dev) { retval = -ENODEV; goto exit_no_device; } - /* check that nobody else is using the device */ - if (dev->open_count) { - retval = -EBUSY; + /* lock this device */ + if ((retval = mutex_lock_interruptible(&dev->mtx))) { + dbg(2, "%s : mutex lock failed", __FUNCTION__); goto exit_no_device; } + /* increment our usage count for the device */ ++dev->open_count; dbg(2,"%s : open count %d", __FUNCTION__, dev->open_count); /* save device in the file's private structure */ file->private_data = dev; - /* initialize in direction */ - dev->read_buffer_length = 0; - - /* fixup first read by having urb waiting for it */ - usb_fill_int_urb(dev->interrupt_in_urb,dev->udev, - usb_rcvintpipe(dev->udev, - dev->interrupt_in_endpoint->bEndpointAddress), - dev->interrupt_in_buffer, - le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize), - adu_interrupt_in_callback, dev, - dev->interrupt_in_endpoint->bInterval); - dev->read_urb_finished = 0; - if (usb_submit_urb(dev->interrupt_in_urb, GFP_KERNEL)) - dev->read_urb_finished = 1; - /* we ignore failure */ - /* end of fixup for first read */ + if (dev->open_count == 1) { + /* initialize in direction */ + dev->read_buffer_length = 0; - /* initialize out direction */ - dev->out_urb_finished = 1; - - retval = 0; + /* fixup first read by having urb waiting for it */ + usb_fill_int_urb(dev->interrupt_in_urb,dev->udev, + usb_rcvintpipe(dev->udev, + dev->interrupt_in_endpoint->bEndpointAddress), + dev->interrupt_in_buffer, + le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize), + adu_interrupt_in_callback, dev, + dev->interrupt_in_endpoint->bInterval); + /* dev->interrupt_in_urb->transfer_flags |= URB_ASYNC_UNLINK; */ + dev->read_urb_finished = 0; + retval = usb_submit_urb(dev->interrupt_in_urb, GFP_KERNEL); + if (retval) + --dev->open_count; + } + mutex_unlock(&dev->mtx); exit_no_device: - mutex_unlock(&adutux_mutex); -exit_no_lock: dbg(2,"%s : leave, return value %d ", __FUNCTION__, retval); + return retval; } -static void adu_release_internal(struct adu_device *dev) +static int adu_release_internal(struct adu_device *dev) { + int retval = 0; + dbg(2," %s : enter", __FUNCTION__); /* decrement our usage count for the device */ @@ -349,11 +326,12 @@ static void adu_release_internal(struct adu_device *dev) } dbg(2," %s : leave", __FUNCTION__); + return retval; } static int adu_release(struct inode *inode, struct file *file) { - struct adu_device *dev; + struct adu_device *dev = NULL; int retval = 0; dbg(2," %s : enter", __FUNCTION__); @@ -365,13 +343,15 @@ static int adu_release(struct inode *inode, struct file *file) } dev = file->private_data; + if (dev == NULL) { dbg(1," %s : object is NULL", __FUNCTION__); retval = -ENODEV; goto exit; } - mutex_lock(&adutux_mutex); /* not interruptible */ + /* lock our device */ + mutex_lock(&dev->mtx); /* not interruptible */ if (dev->open_count <= 0) { dbg(1," %s : device not opened", __FUNCTION__); @@ -379,15 +359,19 @@ static int adu_release(struct inode *inode, struct file *file) goto exit; } - adu_release_internal(dev); if (dev->udev == NULL) { /* the device was unplugged before the file was released */ - if (!dev->open_count) /* ... and we're the last user */ - adu_delete(dev); + mutex_unlock(&dev->mtx); + adu_delete(dev); + dev = NULL; + } else { + /* do the work */ + retval = adu_release_internal(dev); } exit: - mutex_unlock(&adutux_mutex); + if (dev) + mutex_unlock(&dev->mtx); dbg(2," %s : leave, return value %d", __FUNCTION__, retval); return retval; } @@ -409,12 +393,12 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, dev = file->private_data; dbg(2," %s : dev=%p", __FUNCTION__, dev); - + /* lock this object */ if (mutex_lock_interruptible(&dev->mtx)) return -ERESTARTSYS; /* verify that the device wasn't unplugged */ - if (dev->udev == NULL) { + if (dev->udev == NULL || dev->minor == 0) { retval = -ENODEV; err("No device or device unplugged %d", retval); goto exit; @@ -468,7 +452,7 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, should_submit = 1; } else { /* even the primary was empty - we may need to do IO */ - if (!dev->read_urb_finished) { + if (dev->interrupt_in_urb->status == -EINPROGRESS) { /* somebody is doing IO */ spin_unlock_irqrestore(&dev->buflock, flags); dbg(2," %s : submitted already", __FUNCTION__); @@ -476,7 +460,6 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, /* we must initiate input */ dbg(2," %s : initiate input", __FUNCTION__); dev->read_urb_finished = 0; - spin_unlock_irqrestore(&dev->buflock, flags); usb_fill_int_urb(dev->interrupt_in_urb,dev->udev, usb_rcvintpipe(dev->udev, @@ -486,12 +469,15 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, adu_interrupt_in_callback, dev, dev->interrupt_in_endpoint->bInterval); - retval = usb_submit_urb(dev->interrupt_in_urb, GFP_KERNEL); - if (retval) { - dev->read_urb_finished = 1; + retval = usb_submit_urb(dev->interrupt_in_urb, GFP_ATOMIC); + if (!retval) { + spin_unlock_irqrestore(&dev->buflock, flags); + dbg(2," %s : submitted OK", __FUNCTION__); + } else { if (retval == -ENOMEM) { retval = bytes_read ? bytes_read : -ENOMEM; } + spin_unlock_irqrestore(&dev->buflock, flags); dbg(2," %s : submit failed", __FUNCTION__); goto exit; } @@ -500,14 +486,10 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, /* we wait for I/O to complete */ set_current_state(TASK_INTERRUPTIBLE); add_wait_queue(&dev->read_wait, &wait); - spin_lock_irqsave(&dev->buflock, flags); - if (!dev->read_urb_finished) { - spin_unlock_irqrestore(&dev->buflock, flags); + if (!dev->read_urb_finished) timeout = schedule_timeout(COMMAND_TIMEOUT); - } else { - spin_unlock_irqrestore(&dev->buflock, flags); + else set_current_state(TASK_RUNNING); - } remove_wait_queue(&dev->read_wait, &wait); if (timeout <= 0) { @@ -527,23 +509,19 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, retval = bytes_read; /* if the primary buffer is empty then use it */ - spin_lock_irqsave(&dev->buflock, flags); - if (should_submit && dev->read_urb_finished) { - dev->read_urb_finished = 0; - spin_unlock_irqrestore(&dev->buflock, flags); + if (should_submit && !dev->interrupt_in_urb->status==-EINPROGRESS) { usb_fill_int_urb(dev->interrupt_in_urb,dev->udev, usb_rcvintpipe(dev->udev, dev->interrupt_in_endpoint->bEndpointAddress), - dev->interrupt_in_buffer, - le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize), - adu_interrupt_in_callback, - dev, - dev->interrupt_in_endpoint->bInterval); - if (usb_submit_urb(dev->interrupt_in_urb, GFP_KERNEL) != 0) - dev->read_urb_finished = 1; + dev->interrupt_in_buffer, + le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize), + adu_interrupt_in_callback, + dev, + dev->interrupt_in_endpoint->bInterval); + /* dev->interrupt_in_urb->transfer_flags |= URB_ASYNC_UNLINK; */ + dev->read_urb_finished = 0; + usb_submit_urb(dev->interrupt_in_urb, GFP_KERNEL); /* we ignore failure */ - } else { - spin_unlock_irqrestore(&dev->buflock, flags); } exit: @@ -557,24 +535,24 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, static ssize_t adu_write(struct file *file, const __user char *buffer, size_t count, loff_t *ppos) { - DECLARE_WAITQUEUE(waita, current); struct adu_device *dev; size_t bytes_written = 0; size_t bytes_to_write; size_t buffer_size; - unsigned long flags; int retval; + int timeout = 0; dbg(2," %s : enter, count = %Zd", __FUNCTION__, count); dev = file->private_data; + /* lock this object */ retval = mutex_lock_interruptible(&dev->mtx); if (retval) goto exit_nolock; /* verify that the device wasn't unplugged */ - if (dev->udev == NULL) { + if (dev->udev == NULL || dev->minor == 0) { retval = -ENODEV; err("No device or device unplugged %d", retval); goto exit; @@ -586,37 +564,42 @@ static ssize_t adu_write(struct file *file, const __user char *buffer, goto exit; } + while (count > 0) { - add_wait_queue(&dev->write_wait, &waita); - set_current_state(TASK_INTERRUPTIBLE); - spin_lock_irqsave(&dev->buflock, flags); - if (!dev->out_urb_finished) { - spin_unlock_irqrestore(&dev->buflock, flags); + if (dev->interrupt_out_urb->status == -EINPROGRESS) { + timeout = COMMAND_TIMEOUT; - mutex_unlock(&dev->mtx); - if (signal_pending(current)) { + while (timeout > 0) { + if (signal_pending(current)) { dbg(1," %s : interrupted", __FUNCTION__); - set_current_state(TASK_RUNNING); retval = -EINTR; - goto exit_onqueue; - } - if (schedule_timeout(COMMAND_TIMEOUT) == 0) { - dbg(1, "%s - command timed out.", __FUNCTION__); - retval = -ETIMEDOUT; - goto exit_onqueue; + goto exit; } - remove_wait_queue(&dev->write_wait, &waita); + mutex_unlock(&dev->mtx); + timeout = interruptible_sleep_on_timeout(&dev->write_wait, timeout); retval = mutex_lock_interruptible(&dev->mtx); if (retval) { retval = bytes_written ? bytes_written : retval; goto exit_nolock; } + if (timeout > 0) { + break; + } + dbg(1," %s : interrupted timeout: %d", __FUNCTION__, timeout); + } + + + dbg(1," %s : final timeout: %d", __FUNCTION__, timeout); + + if (timeout == 0) { + dbg(1, "%s - command timed out.", __FUNCTION__); + retval = -ETIMEDOUT; + goto exit; + } + + dbg(4," %s : in progress, count = %Zd", __FUNCTION__, count); - dbg(4," %s : in progress, count = %Zd", __FUNCTION__, count); } else { - spin_unlock_irqrestore(&dev->buflock, flags); - set_current_state(TASK_RUNNING); - remove_wait_queue(&dev->write_wait, &waita); dbg(4," %s : sending, count = %Zd", __FUNCTION__, count); /* write the data into interrupt_out_buffer from userspace */ @@ -639,12 +622,11 @@ static ssize_t adu_write(struct file *file, const __user char *buffer, bytes_to_write, adu_interrupt_out_callback, dev, - dev->interrupt_out_endpoint->bInterval); + dev->interrupt_in_endpoint->bInterval); + /* dev->interrupt_in_urb->transfer_flags |= URB_ASYNC_UNLINK; */ dev->interrupt_out_urb->actual_length = bytes_to_write; - dev->out_urb_finished = 0; retval = usb_submit_urb(dev->interrupt_out_urb, GFP_KERNEL); if (retval < 0) { - dev->out_urb_finished = 1; err("Couldn't submit interrupt_out_urb %d", retval); goto exit; } @@ -655,17 +637,16 @@ static ssize_t adu_write(struct file *file, const __user char *buffer, bytes_written += bytes_to_write; } } - mutex_unlock(&dev->mtx); - return bytes_written; + + retval = bytes_written; exit: + /* unlock the device */ mutex_unlock(&dev->mtx); exit_nolock: + dbg(2," %s : leave, return value %d", __FUNCTION__, retval); - return retval; -exit_onqueue: - remove_wait_queue(&dev->write_wait, &waita); return retval; } @@ -850,22 +831,25 @@ static void adu_disconnect(struct usb_interface *interface) dbg(2," %s : enter", __FUNCTION__); dev = usb_get_intfdata(interface); + usb_set_intfdata(interface, NULL); - mutex_lock(&dev->mtx); /* not interruptible */ - dev->udev = NULL; /* poison */ minor = dev->minor; + + /* give back our minor */ usb_deregister_dev(interface, &adu_class); - mutex_unlock(&dev->mtx); + dev->minor = 0; - mutex_lock(&adutux_mutex); - usb_set_intfdata(interface, NULL); + mutex_lock(&dev->mtx); /* not interruptible */ /* if the device is not opened, then we clean up right now */ dbg(2," %s : open count %d", __FUNCTION__, dev->open_count); - if (!dev->open_count) + if (!dev->open_count) { + mutex_unlock(&dev->mtx); adu_delete(dev); - - mutex_unlock(&adutux_mutex); + } else { + dev->udev = NULL; + mutex_unlock(&dev->mtx); + } dev_info(&interface->dev, "ADU device adutux%d now disconnected\n", (minor - ADU_MINOR_BASE)); diff --git a/trunk/drivers/usb/misc/usbled.c b/trunk/drivers/usb/misc/usbled.c index 06cb71942dc7..49c5c5c4c431 100644 --- a/trunk/drivers/usb/misc/usbled.c +++ b/trunk/drivers/usb/misc/usbled.c @@ -144,14 +144,12 @@ static void led_disconnect(struct usb_interface *interface) struct usb_led *dev; dev = usb_get_intfdata (interface); + usb_set_intfdata (interface, NULL); device_remove_file(&interface->dev, &dev_attr_blue); device_remove_file(&interface->dev, &dev_attr_red); device_remove_file(&interface->dev, &dev_attr_green); - /* first remove the files, then set the pointer to NULL */ - usb_set_intfdata (interface, NULL); - usb_put_dev(dev->udev); kfree(dev); diff --git a/trunk/drivers/usb/serial/generic.c b/trunk/drivers/usb/serial/generic.c index d41531139c55..9eb4a65ee4d9 100644 --- a/trunk/drivers/usb/serial/generic.c +++ b/trunk/drivers/usb/serial/generic.c @@ -327,7 +327,6 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb) struct usb_serial_port *port = (struct usb_serial_port *)urb->context; unsigned char *data = urb->transfer_buffer; int status = urb->status; - unsigned long flags; dbg("%s - port %d", __FUNCTION__, port->number); @@ -340,11 +339,11 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb) usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); /* Throttle the device if requested by tty */ - spin_lock_irqsave(&port->lock, flags); + spin_lock(&port->lock); if (!(port->throttled = port->throttle_req)) /* Handle data and continue reading from device */ flush_and_resubmit_read_urb(port); - spin_unlock_irqrestore(&port->lock, flags); + spin_unlock(&port->lock); } EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback); diff --git a/trunk/drivers/usb/serial/keyspan.c b/trunk/drivers/usb/serial/keyspan.c index feba9679ace8..1f7ab15df36d 100644 --- a/trunk/drivers/usb/serial/keyspan.c +++ b/trunk/drivers/usb/serial/keyspan.c @@ -1215,14 +1215,12 @@ static int keyspan_chars_in_buffer (struct usb_serial_port *port) static int keyspan_open (struct usb_serial_port *port, struct file *filp) { - struct keyspan_port_private *p_priv; - struct keyspan_serial_private *s_priv; - struct usb_serial *serial = port->serial; + struct keyspan_port_private *p_priv; + struct keyspan_serial_private *s_priv; + struct usb_serial *serial = port->serial; const struct keyspan_device_details *d_details; int i, err; - int baud_rate, device_port; struct urb *urb; - unsigned int cflag; s_priv = usb_get_serial_data(serial); p_priv = usb_get_serial_port_data(port); @@ -1265,30 +1263,6 @@ static int keyspan_open (struct usb_serial_port *port, struct file *filp) /* usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe), 0); */ } - /* get the terminal config for the setup message now so we don't - * need to send 2 of them */ - - cflag = port->tty->termios->c_cflag; - device_port = port->number - port->serial->minor; - - /* Baud rate calculation takes baud rate as an integer - so other rates can be generated if desired. */ - baud_rate = tty_get_baud_rate(port->tty); - /* If no match or invalid, leave as default */ - if (baud_rate >= 0 - && d_details->calculate_baud_rate(baud_rate, d_details->baudclk, - NULL, NULL, NULL, device_port) == KEYSPAN_BAUD_RATE_OK) { - p_priv->baud = baud_rate; - } - - /* set CTS/RTS handshake etc. */ - p_priv->cflag = cflag; - p_priv->flow_control = (cflag & CRTSCTS)? flow_cts: flow_none; - - keyspan_send_setup(port, 1); - //mdelay(100); - //keyspan_set_termios(port, NULL); - return (0); } diff --git a/trunk/drivers/usb/serial/mos7840.c b/trunk/drivers/usb/serial/mos7840.c index c29c91271133..a5ced7e08cbf 100644 --- a/trunk/drivers/usb/serial/mos7840.c +++ b/trunk/drivers/usb/serial/mos7840.c @@ -2711,7 +2711,7 @@ static int mos7840_startup(struct usb_serial *serial) status = mos7840_set_reg_sync(serial->port[0], ZLP_REG5, Data); if (status < 0) { dbg("Writing ZLP_REG5 failed status-0x%x\n", status); - goto error; + return -1; } else dbg("ZLP_REG5 Writing success status%d\n", status); diff --git a/trunk/drivers/usb/serial/pl2303.c b/trunk/drivers/usb/serial/pl2303.c index cf8add91de05..2cd3f1d4b687 100644 --- a/trunk/drivers/usb/serial/pl2303.c +++ b/trunk/drivers/usb/serial/pl2303.c @@ -86,7 +86,6 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(ALCOR_VENDOR_ID, ALCOR_PRODUCT_ID) }, { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ID) }, { USB_DEVICE(WS002IN_VENDOR_ID, WS002IN_PRODUCT_ID) }, - { USB_DEVICE(COREGA_VENDOR_ID, COREGA_PRODUCT_ID) }, { } /* Terminating entry */ }; diff --git a/trunk/drivers/usb/serial/pl2303.h b/trunk/drivers/usb/serial/pl2303.h index d31f5d299989..ed603e3decd6 100644 --- a/trunk/drivers/usb/serial/pl2303.h +++ b/trunk/drivers/usb/serial/pl2303.h @@ -104,6 +104,3 @@ #define WS002IN_VENDOR_ID 0x11f6 #define WS002IN_PRODUCT_ID 0x2001 -/* Corega CG-USBRS232R Serial Adapter */ -#define COREGA_VENDOR_ID 0x07aa -#define COREGA_PRODUCT_ID 0x002a diff --git a/trunk/drivers/usb/serial/sierra.c b/trunk/drivers/usb/serial/sierra.c index 605ebccdcd51..833f6e1e3721 100644 --- a/trunk/drivers/usb/serial/sierra.c +++ b/trunk/drivers/usb/serial/sierra.c @@ -136,8 +136,6 @@ static struct usb_device_id id_table_3port [] = { { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0220) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0220) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ diff --git a/trunk/drivers/usb/storage/scsiglue.c b/trunk/drivers/usb/storage/scsiglue.c index 836a34ae6ec6..1ba19eaa1970 100644 --- a/trunk/drivers/usb/storage/scsiglue.c +++ b/trunk/drivers/usb/storage/scsiglue.c @@ -177,10 +177,6 @@ static int slave_configure(struct scsi_device *sdev) * is an occasional series of retries that will all fail. */ sdev->retry_hwerror = 1; - /* USB disks should allow restart. Some drives spin down - * automatically, requiring a START-STOP UNIT command. */ - sdev->allow_restart = 1; - } else { /* Non-disk-type devices don't need to blacklist any pages diff --git a/trunk/drivers/usb/storage/unusual_devs.h b/trunk/drivers/usb/storage/unusual_devs.h index 2c27721bd259..22ab2380367d 100644 --- a/trunk/drivers/usb/storage/unusual_devs.h +++ b/trunk/drivers/usb/storage/unusual_devs.h @@ -342,11 +342,11 @@ UNUSUAL_DEV( 0x04b0, 0x040d, 0x0100, 0x0100, US_FL_FIX_CAPACITY), /* Reported by Graber and Mike Pagano */ -UNUSUAL_DEV( 0x04b0, 0x040f, 0x0100, 0x0200, - "NIKON", - "NIKON DSC D200", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_FIX_CAPACITY), +UNUSUAL_DEV( 0x04b0, 0x040f, 0x0200, 0x0200, + "NIKON", + "NIKON DSC D200", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_FIX_CAPACITY), /* Reported by Emil Larsson */ UNUSUAL_DEV( 0x04b0, 0x0411, 0x0100, 0x0101, @@ -731,13 +731,6 @@ UNUSUAL_DEV( 0x0584, 0x0008, 0x0102, 0x0102, US_SC_SCSI, US_PR_ALAUDA, init_alauda, 0 ), #endif -/* Reported by RTE */ -UNUSUAL_DEV( 0x058f, 0x6387, 0x0141, 0x0141, - "JetFlash", - "TS1GJF2A/120", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_MAX_SECTORS_64 ), - /* Fabrizio Fellini */ UNUSUAL_DEV( 0x0595, 0x4343, 0x0000, 0x2210, "Fujifilm", diff --git a/trunk/drivers/video/Kconfig b/trunk/drivers/video/Kconfig index 5b3dbcfcda48..7d86e9eae915 100644 --- a/trunk/drivers/video/Kconfig +++ b/trunk/drivers/video/Kconfig @@ -641,17 +641,6 @@ config FB_VESA You will get a boot time penguin logo at no additional cost. Please read . If unsure, say Y. -config FB_EFI - bool "EFI-based Framebuffer Support" - depends on (FB = y) && X86 - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - help - This is the EFI frame buffer device driver. If the firmware on - your platform is UEFI2.0, select Y to add support for - Graphics Output Protocol for early console messages to appear. - config FB_IMAC bool "Intel-based Macintosh Framebuffer Support" depends on (FB = y) && X86 && EFI diff --git a/trunk/drivers/video/Makefile b/trunk/drivers/video/Makefile index 83e02b3429b6..59d6c45a910d 100644 --- a/trunk/drivers/video/Makefile +++ b/trunk/drivers/video/Makefile @@ -118,7 +118,6 @@ obj-$(CONFIG_FB_OMAP) += omap/ obj-$(CONFIG_FB_UVESA) += uvesafb.o obj-$(CONFIG_FB_VESA) += vesafb.o obj-$(CONFIG_FB_IMAC) += imacfb.o -obj-$(CONFIG_FB_EFI) += efifb.o obj-$(CONFIG_FB_VGA16) += vga16fb.o obj-$(CONFIG_FB_OF) += offb.o obj-$(CONFIG_FB_BF54X_LQ043) += bf54x-lq043fb.o diff --git a/trunk/drivers/video/atmel_lcdfb.c b/trunk/drivers/video/atmel_lcdfb.c index 11a3a222dfc3..235b618b4117 100644 --- a/trunk/drivers/video/atmel_lcdfb.c +++ b/trunk/drivers/video/atmel_lcdfb.c @@ -268,10 +268,6 @@ static int atmel_lcdfb_set_par(struct fb_info *info) /* Turn off the LCD controller and the DMA controller */ lcdc_writel(sinfo, ATMEL_LCDC_PWRCON, sinfo->guard_time << ATMEL_LCDC_GUARDT_OFFSET); - /* Wait for the LCDC core to become idle */ - while (lcdc_readl(sinfo, ATMEL_LCDC_PWRCON) & ATMEL_LCDC_BUSY) - msleep(10); - lcdc_writel(sinfo, ATMEL_LCDC_DMACON, 0); if (info->var.bits_per_pixel == 1) diff --git a/trunk/drivers/video/efifb.c b/trunk/drivers/video/efifb.c deleted file mode 100644 index bd779ae44b1e..000000000000 --- a/trunk/drivers/video/efifb.c +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Framebuffer driver for EFI/UEFI based system - * - * (c) 2006 Edgar Hucek - * Original efi driver written by Gerd Knorr - * - */ - -#include -#include -#include -#include -#include -#include - -#include