aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2007-11-29S3C24XX: ensure we only configure valid GPIOsBen Dooks1-7/+13
If we specify an GPIO which cannot be used for the purpose, then assume that the GPIO is not to be used and do not try and configure it. This can be the case where the SPI bus is TX only. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29termios: document callback more clearlyAlan Cox1-0/+8
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29TPM: fix TIS device driver locality requestMarcel Selhorst1-5/+5
During the initialization of the TPM TIS driver, the necessary locality has to be requested earlier in the init-process. Depending on the used TPM chip, this leads to wrong information. For example: Lenovo X61s with Atmel TPM: tpm_tis 00:0a: 1.2 TPM (device-id 0xFFFF, rev-id 255) But correct is: tpm_tis 00:0c: 1.2 TPM (device-id 0x3203, rev-id 9) This short patch fixes this issue. Signed-off-by: Marcel Selhorst <tpm@selhorst.net> Cc: Kylene Jo Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29proc: remove races from proc_id_readdir()Eric W. Biederman1-23/+28
Oleg noticed that the call of task_pid_nr_ns() in proc_pid_readdir is racy with respect to tasks exiting. After a bit of examination it also appears that the call itself is completely unnecessary. So to fix the problem this patch modifies next_tgid() to return both a tgid and the task struct in question. A structure is introduced to return these values because it is slightly cleaner and easier to optimize, and the resulting code is a little shorter. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29wait_task_stopped(): don't use task_pid_nr_ns() locklessOleg Nesterov1-5/+4
wait_task_stopped(WNOWAIT) does task_pid_nr_ns() without tasklist/rcu lock, we can read an already freed memory. Use the cached pid_t value. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Looks-good-to: Roland McGrath <roland@redhat.com> Acked-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29proc: fix NULL ->i_fop oopsAlexey Dobriyan3-40/+1
proc_kill_inodes() can clear ->i_fop in the middle of vfs_readdir resulting in NULL dereference during "file->f_op->readdir(file, buf, filler)". The solution is to remove proc_kill_inodes() completely: a) we don't have tricky modules implementing their tricky readdir hooks which could keeping this revoke from hell. b) In a situation when module is gone but PDE still alive, standard readdir will return only "." and "..", because pde->next was cleared by remove_proc_entry(). c) the race proc_kill_inode() destined to prevent is not completely fixed, just race window made smaller, because vfs_readdir() is run without sb_lock held and without file_list_lock held. Effectively, ->i_fop is cleared at random moment, which can't fix properly anything. BUG: unable to handle kernel NULL pointer dereference at virtual address 00000018 printing eip: c1061205 *pdpt = 0000000005b22001 *pde = 0000000000000000 Oops: 0000 [#1] PREEMPT SMP Modules linked in: foo af_packet ipv6 cpufreq_ondemand loop serio_raw sr_mod k8temp cdrom hwmon amd_rng Pid: 2033, comm: find Not tainted (2.6.24-rc1-b1d08ac064268d0ae2281e98bf5e82627e0f0c56 #2) EIP: 0060:[<c1061205>] EFLAGS: 00010246 CPU: 0 EIP is at vfs_readdir+0x47/0x74 EAX: c6b6a780 EBX: 00000000 ECX: c1061040 EDX: c5decf94 ESI: c6b6a780 EDI: fffffffe EBP: c9797c54 ESP: c5decf78 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 Process find (pid: 2033, ti=c5dec000 task=c64bba90 task.ti=c5dec000) Stack: c5decf94 c1061040 fffffff7 0805ffbc 00000000 c6b6a780 c1061295 0805ffbc 00000000 00000400 00000000 00000004 0805ffbc 4588eff4 c5dec000 c10026ba 00000004 0805ffbc 00000400 0805ffbc 4588eff4 bfdc6c70 000000dc 0000007b Call Trace: [<c1061040>] filldir64+0x0/0xc5 [<c1061295>] sys_getdents64+0x63/0xa5 [<c10026ba>] sysenter_past_esp+0x5f/0x85 ======================= Code: 49 83 78 18 00 74 43 8d 6b 74 bf fe ff ff ff 89 e8 e8 b8 c0 12 00 f6 83 2c 01 00 00 10 75 22 8b 5e 10 8b 4c 24 04 89 f0 8b 14 24 <ff> 53 18 f6 46 1a 04 89 c7 75 0b 8b 56 0c 8b 46 08 e8 c8 66 00 EIP: [<c1061205>] vfs_readdir+0x47/0x74 SS:ESP 0068:c5decf78 hch: "Nice, getting rid of this is a very good step formwards. Unfortunately we have another copy of this junk in security/selinux/selinuxfs.c:sel_remove_entries() which would need the same treatment." Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Acked-by: Christoph Hellwig <hch@infradead.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: James Morris <jmorris@namei.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29PNP: increase the maximum number of resourcesZhao Yakui2-4/+15
On some systems the number of resources(IO,MEM) returnedy by PNP device is greater than the PNP constant, for example motherboard devices. It brings that some resources can't be reserved and resource confilicts. This will cause PCI resources are assigned wrongly in some systems, and cause hang. This is a regression since we deleted ACPI motherboard driver and use PNP system driver. [akpm@linux-foundation.org: fix text and coding-style a bit] Signed-off-by: Li Shaohua <shaohua.li@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Thomas Renninger <trenn@suse.de> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29xen: mask _PAGE_PCD from ptesJeremy Fitzhardinge1-0/+4
_PAGE_PCD maps a page with caching disabled, which is typically used for mapping harware registers. Xen never allows it to be set on a mapping, and unprivileged guests never need it since they can't see the real underlying hardware. However, some uncached mappings are made early when probing the (non-existent) APIC, and its OK to mask off the PCD flag in these cases. This became necessary because Xen started checking for this bit, rather than silently masking it off. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29UML: build fixWANG Cong1-1/+1
include/asm-um/arch points to the non-existed include/asm-i386 directory. Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Cc: Jeff Dike <jdike@karaya.com> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29Fix boot problem with iSeries lacking hugepage supportMel Gorman2-2/+26
Ordinarily the size of a pageblock is determined at compile-time based on the hugepage size. On PPC64, the hugepage size is determined at runtime based on what is supported by the machine. With legacy machines such as iSeries that do not support hugepages, HPAGE_SHIFT is 0. This results in pageblock_order being set to -PAGE_SHIFT and a crash results shortly afterwards. This patch adds a function to select a sensible value for pageblock order by default when HUGETLB_PAGE_SIZE_VARIABLE is set. It checks that HPAGE_SHIFT is a sensible value before using the hugepage size; if it is not MAX_ORDER-1 is used. This is a fix for 2.6.24. Credit goes to Stephen Rothwell for identifying the bug and testing candidate patches. Additional credit goes to Andy Whitcroft for spotting a problem with respects to IA-64 before releasing. Additional credit to David Gibson for testing with the libhugetlbfs test suite. Signed-off-by: Mel Gorman <mel@csn.ul.ie> Tested-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29ps3fb: video memory size cleanupsGeert Uytterhoeven1-2/+9
- Limit video memory size to avoid crossing a 256 MiB boundary in IOIF space. - Pass the actual amount of video memory used to lv1_gpu_memory_allocate(). Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29ps3: prefix all ps3-specific kernel modules with `ps3-'Geert Uytterhoeven3-2/+2
- vuart.ko -> ps3-vuart.ko - sys-manager.ko -> ps3-sys-manager.ko Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29atmel_spi: label GPIOs betterDavid Brownell1-1/+1
Make the atmel_spi driver label GPIOs according to the device for which they're acting as a chipselect. This way the debugfs dump of gpio state is more informative. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29update checkpatch.pl to version 0.12Andy Whitcroft1-108/+287
This version brings a new terse output mode as well as many improvements to the unary detection and bare type regcognition. It also brings the usual updates for false positives, though these seem to be slowing markedly now that the unary detector is no longer just putting its finger in the air and guessing. Of note: - new --terse mode producing a single line per report - loosening of the block brace checks - new checks for enum/union/struch brace placements - hugely expanded "bare type" detection - checks for inline usage - better handling of already open comment blocks - handle patches which introduce or remove lines without newlines Andy Whitcroft (19): Version: 0.12 style fixes as spotted by checkpatch add a --terse options of a single line of output per report block brace checks should only apply for single line blocks all new bare type detector check spacing for open braces with enum, union and struct check for LINUX_VERSION_CODE macros definition bracketing checks need to ignore -ve context clean up the mail-back mode, -q et al expand possible type matching to declarations allow const and sparse annotations on possible types handle possible types as regular types everywhere prefer plain inline over __inline__ and __inline all new open comment detection fix up conditional extraction for if assignment checks add const to the possible type matcher unary checks: a for loop is a conditional too possible types: detect function pointer definitions handle missind newlines at end of file, report addition Signed-off-by: Andy Whitcroft <apw@shadowen.org> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-28pci hotplug: kernel-doc fixesRandy Dunlap12-169/+169
acpiphp.h: not using kernel-doc, so change /** to /* acpiphp_core.c: lots of kernel-doc cleanups acpiphp_glue.c: lots of kernel-doc cleanups acpiphp_ibm.c: lots of kernel-doc cleanups cpqphp_core.c: lots of kernel-doc cleanups cpqphp_ctrl.c: lots of kernel-doc cleanups fakephp.c: correct kernel-doc notation pciehp_ctrl.c: correct kernel-doc notation rpadlpar_core.c: correct function names & kernel-doc notation rpaphp_core.c: correct kernel-doc notation shpchp_ctrl.c: correct kernel-doc notation Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Kristen Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28pci-aer: fix kernel-doc mistakesRandy Dunlap1-14/+15
Fix kernel-doc parameter names and ending block comments (change **/ to */). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Linas Vepstas <linas@linas.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28PCI: drivers/pci/pci-sysfs.c: Add missing pci_dev_putJulia Lawall1-1/+3
There should be a pci_dev_put when breaking out of a loop that iterates over calls to pci_get_device and similar functions. This was fixed using the following semantic patch. // <smpl> @@ identifier d; type T; expression e; iterator for_each_pci_dev; @@ T *d; ... for_each_pci_dev(d) {... when != pci_dev_put(d) when != e = d ( return d; | + pci_dev_put(d); ? return ...; ) ...} // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28PCI: pcie portdriver: initialize returned valueLinas Vepstas1-1/+1
The pcie protdrv status can be returned uninitialized, if there are no children under a device. This leads to bad responses downstream. Fix this. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: s3c2410 gadget: ensure vbus pin in input mode during readBen Dooks1-0/+4
Some CPUs in the S3C24XX series do not support readback of the value of a pin when the pin has been configured to an IRQ. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: s3c2410 gadget: allow sharing of vbus irqBen Dooks1-3/+3
If another driver wants to claim the vbus pin, say to notify the user of an connect/disconnect then allow the IRQ to be shared by specifiying IRQ_SHARED in the flags. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: s3c2410 gadget: Header move fixupsBen Dooks1-3/+3
Fixup the fallout from the arch moves earlier in the kernel series. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Acked-by: David Brownell <dbrownell@users.sourceforge.net>
2007-11-28USB: usb-storage: unusual_devs entry for JetFlash TS1GJF2AAlan Stern1-0/+7
This patch (as1018) adds an unusual_devs entry for the JetFlash TS1GJF2A. This device doesn't like read requests for more than 188 sectors. Setting max_sectors down to 64 is overkill, but at least it will work without errors. For the torturous debugging history, see this thread: http://marc.info/?t=118745764700005&r=1&w=2 Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: fix up EHCI startup synchronizationDavid Brownell1-1/+4
A recent patch added software synchronization during EHCI startup, so ports aren't switched away from the companion controllers after resets have started. This patch adds a short delay letting hardware finish that port switching before any new resets begin ... so both ends of that hardware race window are closed. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Dave Miller <davem@davemloft.net> Cc: Dely Sy <dely.l.sy@intel.com> Cc: stable <stable@kernel.org> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: make the microtek driver and HAL cooperateOliver Neukum1-1/+1
to make HAL like the microtek driver's devices the parent must be correctly set. Signed-off-by: Oliver Neukum <oneukum@suse.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: uevent environment key fixAlan Stern3-35/+25
This patch (as1010) was written by both Kay Sievers and me. It solves the problem of duplicated keys in USB uevent structures by refactoring the uevent subroutines, taking advantage of the way the hotplug core calls uevent handlers for the device's bus and for the device's type. Keys needed for both USB-device and USB-interface events are added in usb_uevent(), which is the bus handler. Keys appropriate only for USB-device or USB-interface events are added in usb_dev_uevent() or usb_if_uevent() respectively, the type handlers. In addition, unnecessary tests for NULL pointers are removed as are duplicated debugging log statements. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: keep track of whether interface sysfs files existAlan Stern3-10/+9
This patch (as1009) solves the problem of multiple registrations for USB sysfs files in a more satisfying way than the existing code. It simply adds a flag to keep track of whether or not the files have been created; that way the files can be created or removed as needed. Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
2007-11-28USB: sierra: new product idagilmore@wirelessbeehive.com1-0/+2
Per the maintainer of the usbserial/sierra.c driver, the patch below adds a new id to the list of supported cards for the sierra driver. Tested and working for me on Fedora 8, kernel 2.6.23 and on the more recent sierra.c available in http://www.sierrawireless.com/resources/support/Software/Linux/v.1.2.6b(kernel2.6.21).zip Hardware is a MiniPCI card in a Lenovo T61p. Signed-off-by: Andrew Gilmore <agilmore@wirelessbeehive.com> Cc: Kevin Lloyd <linux@sierrawireless.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB HCD: avoid duplicate local_irq_disable()Alan Stern1-1/+2
Arnd Bergmann wrote: usb_hcd_flush_endpoint() has a retry loop that starts with a spin_lock_irq(), but only gives up the spinlock, not the irq_disable before jumping to the rescan label. Alan Stern: I agree with your sentiment, but it would be better to solve this problem without using local_irq_disable(). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: mailing lists have changedGreg Kroah-Hartman1-59/+35
The linux-usb-devel and linux-usb-users are now hosted in the same list at vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: remove USB HUB entry from MAINTAINERSDavid Brownell1-7/+0
Digging through old mail, I found a note about needing to remove the separate entry for the USB HUB driver. It's not been separable from usbcore (host side!) since quite early in the 2.4 kernel series. And Johanness certainly isn't involved with it any more. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: fix directory references in usb/READMEDirk Hohndel1-3/+3
Another one in the "ok, this is trivial to fix" list... :-) [PATCH] fix directory references in usb/README Signed-off-by: Dirk Hohndel <hohndel@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: add support for an older firmware revision for the Nikon D200Mike Pagano1-5/+5
This is a resubmission of the patch to upgrade the unusual_devs.h file to support an older firmware revision of the Nikon D200. This patch includes the requested /proc/bus/usb/devices information. T: Bus=01 Lev=01 Prnt=01 Port=09 Cnt=02 Dev#= 6 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=04b0 ProdID=040f Rev= 1.00 S: Manufacturer=NIKON S: Product=NIKON DSC D200 S: SerialNumber=0000000 C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Mike Pagano <mpagano@gentoo.org> Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: FIx locks and urb->status in adutux (updated)Pete Zaitcev1-123/+139
Two main issues fixed here are: - An improper use of in-struct lock to protect an open count - Use of urb status for -EINPROGRESS Also, along the way: - Change usb_unlink_urb to usb_kill_urb. Apparently there's no need to use usb_unlink_urb whatsoever in this driver, and the old use of usb_kill_urb was outright racy (it unlinked and immediately freed). - Fix indentation in adu_write. Looks like it was damaged by a script. - Vitaly wants -EBUSY on multiply opens. - bInterval was taken from a wrong endpoint. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com> Tested-by: Vitaliy Ivanov <vitalivanov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: power-management documenation updateAlan Stern1-0/+8
This patch (as1014) was partly written by Tilman Schmidt. It clarifies the USB power-management documentation by explaining that when a disconnect occurs, a suspend method call might not be followed by either a resume or a reset_resume call. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: Fix signr comment in usbdevice_fs.hPhil Endecott1-1/+2
This trivial documentation patch corrects a comment in usbdevice_fs.h; it previously suggested that the signal would only be sent on error, but I am told that it is sent on both successful and unsuccessful completion, and that zero indicates that no signal should be sent. Signed-off-by: Phil Endecott <spam_from_usb_devel@chezphil.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28usbserial: fix inconsistent lock stateBorislav Petkov1-2/+3
In commit acd2a847e7fee7df11817f67dba75a2802793e5d usb_serial_generic_write() disables interrupts when taking &port->lock which is also taken in usb_serial_generic_read_bulk_callback() resulting in an inconsistent lock state due to the latter not disabling interrupts on the local cpu. Fix that by disabling interrupts in the latter call site also. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: fix usbled disconnect read race #2Oliver Neukum1-1/+3
usbled has a race where show methods for attributes in sysfs can follow a NULL pointer during disconnect. The correct ordering fixes it. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: free memory when writing fails in usb/serial/mos7840.cRoel Kluin1-1/+1
Free buffer when writing ZLP_REG5 failed Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: Fix priority mistakes in drivers/usb/core/hub.cRoel Kluin1-1/+1
Fixes priority mistakes similar to '!x & y' Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28usb-storage: always set the allow_restart flagMauro Carvalho Chehab1-0/+4
This patch (as1000) sets the SCSI allow_restart flag for USB disk devices. In theory this should never hurt, and there definitely are devices out there (such as the Seagate 250-GB external drive) which need the flag to be set. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: pl2303: add support for Corega CG-USBRS232RMagnus Damm2-0/+4
pl2303: add support for Corega CG-USBRS232R This patch adds support for Corega CG-USBRS232R Serial Adapters. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: omap_udc build fixDavid Brownell1-3/+3
This fixes some build errors ... unclear how this got past earlier tests. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: fix USB_OHCI_HCD_SSB dependenciesAdrian Bunk1-1/+1
This patch fixes a bug introduced by commit b22817b3c81cdb18ffe3d2debfee968731a8b5f4. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Michael Buesch <mb@bu3sch.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28sysfs: fix off-by-one error in fill_read_buffer()Miao Xie1-1/+5
I found that there is a off-by-one problem in the following code. Version: 2.6.24-rc2 File: fs/sysfs/file.c:118-122 Function: fill_read_buffer -------------------------------------------------------------------- count = ops->show(kobj, attr_sd->s_attr.attr, buffer->page); sysfs_put_active_two(attr_sd); BUG_ON(count > (ssize_t)PAGE_SIZE); -------------------------------------------------------------------- Because according to the specification of the sysfs and the implement of the show methods, the show methods return the number of bytes which would be generated for the given input, excluding the trailing null.So if the return value of the show methods equals PAGE_SIZE - 1, the buffer is full in fact. And if the return value equals PAGE_SIZE, the resulting string was already truncated,or buffer overflow occurred. This patch fixes an off-by-one error in fill_read_buffer. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Tejun Heo <teheo@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28kobject: two typo fixesJohannes Berg1-2/+2
This fixes two typos from commit 34358c26a2c96b2a068dc44e0ac602106a466bce. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28UIO: add UIO documentation target to DocBook MakefileHans J Koch1-1/+1
Add the DocBook documentation for the Userspace I/O framework to the Makefile. Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: Hans J Koch <hjk@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28UIO: fix up the UIO documentationHans J Koch1-58/+32
Remove references to the old uio_dummy demo module from UIO documentation. Add a small paragraph to make it clearer that UIO is not a universal driver interface. Signed-off-by: Hans J Koch <hjk@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28create /sys/.../power when CONFIG_PM is setDaniel Drake4-16/+27
The CONFIG_SUSPEND changes in 2.6.23 caused a regression under certain configuration conditions (SUSPEND=n, USB_AUTOSUSPEND=y) where all USB device attributes in sysfs (idVendor, idProduct, ...) silently disappeared, causing udev breakage and more. The cause of this is that the /sys/.../power subdirectory is now only created when CONFIG_PM_SLEEP is set, however, it should be created whenever CONFIG_PM is set to handle the above situation. The following patch fixes the regression. Signed-off-by: Daniel Drake <dsd@gentoo.org> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: stable <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28allow LEGACY_PTYS to be set to 0Kay Sievers1-1/+1
The count of legacy pty devices can be set by a kernel commandline parameter. For the distro kernel, we would like to disable all pty's by default, but keep the opportunity to request devices on the kernel commandline. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Acked-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28prep_zero_page: remove bogus BUG_ONHugh Dickins1-1/+0
2.6.11 gave __GFP_ZERO's prep_zero_page a bogus "highmem may have to wait" assertion. Presumably added under the misconception that clear_highpage uses nonatomic kmap; but then and now it uses kmap_atomic, so no problem. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>