aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-05-02USB: s3c-hsotg: Fix stall condition processingAnton Tikhomirov1-31/+111
The following should be done for requests after endpoint stall condition is cleared: 1) 'in progress' request (if any) should be completed since Tx FIFO was flushed; 2) next request from queue (if any) should be started. This commit does that. Additionally set/clear stall condition code is fixed. Signed-off-by: Anton Tikhomirov <[email protected]> Reviewed-by: Kyoungil Kim<[email protected]> Cc: Ben Dooks <[email protected]> Signed-off-by: Kukjin Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-02USB: s3c-hsotg: Fix control request processingAnton Tikhomirov1-8/+9
UDC driver does not need to generate reply to host if request is delivered to gadget. This is gadget's responsibility. This commit fixes that. Signed-off-by: Anton Tikhomirov <[email protected]> Reviewed-by: Kyoungil Kim<[email protected]> Cc: Ben Dooks <[email protected]> Signed-off-by: Kukjin Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-02USB: s3c-hsotg: Fix interrupt cleaning codeAnton Tikhomirov1-38/+20
This commit does the following: 1) clears all pending interrupts before unmasking; 2) clears interrupts as soon as possible to avoid missing next coming that may occur during handling; 3) removes ineffective interrupt cleaning code. Signed-off-by: Anton Tikhomirov <[email protected]> Reviewed-by: Kyoungil Kim<[email protected]> Cc: Ben Dooks <[email protected]> Signed-off-by: Kukjin Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-02USB: s3c-hsotg: Fix core resetAnton Tikhomirov1-5/+2
This patch fixes code responsible for core reset. Signed-off-by: Anton Tikhomirov <[email protected]> Reviewed-by: Kyoungil Kim<[email protected]> Cc: Ben Dooks <[email protected]> Signed-off-by: Kukjin Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-02USB: extend ehci-fsl and fsl_udc_core driver for OTG operationAnatolij Gustschin6-15/+213
Signed-off-by: Anatolij Gustschin <[email protected]> Cc: Li Yang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-02USB: add Freescale USB OTG Transceiver driverLi Yang6-0/+2088
Slightly reworked and cleaned up driver from Freescale LTIB for MPC5121E. The driver has been ported to the current kernel, proc interface "/proc/driver/fsl_usb2_otg" has been replaced by sysfs interface. Signed-off-by: Li Yang <[email protected]> Signed-off-by: Anatolij Gustschin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-02USB: fsl_udc_core: support device mode of MPC5121E DR USB ControllerAnatolij Gustschin2-31/+112
Extend the FSL UDC driver to support MPC5121E DR USB Controller operation in device mode. Add MPC5121E specific init/uninit at probe and remove and isolate system interface register accesses when running on MPC5121E SoC, as these registers are not available on this platform. This patch relies on previous patch for supporting big endian registers and descriptors access in the FSL UDC driver. Additionally support endpoint FIFO status operation by providing appropriate callback in endpoint ops structure. Also flush cache for the req buffer used for GetStatus reply. Without this, the correct reply to an endpoint GetStatus is written to 'req', but doesn't make it out to the USB bus since the buffer hasn't been flushed. This would cause the USBCV Halt Endpoint test to fail (according to changelog in Freescale LTIB driver code). Signed-off-by: Anatolij Gustschin <[email protected]> Cc: Li Yang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-02USB: fsl_udc_core: prepare for SoCs with BE registers and descriptorsAnatolij Gustschin2-25/+100
On some SoCs, the USB controller registers and descriptors can be big or little endian, depending on the version of the chip. In order to be able to run the same kernel binary on different versions of an SoC, the BE/LE decision must be made at run time. Provide appropriate register and descriptor accessors which are configurable at run time using the configuration flags from fsl_usb2_platform_data data structure. This is in preparation for adding support for MPC5121E DR USB2 Controller to the FSL UDC driver. Signed-off-by: Anatolij Gustschin <[email protected]> Cc: Li Yang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-02USB: fix build of FSL MPH DR OF platform driverAnatolij Gustschin1-0/+1
When only FSL USB gadget driver is selected in the kernel configuration the MPH DR OF driver for creation of FSL USB platform devices from device tree won't be built. As a result no USB platform devices for MPH DR USB controller will be created at run time and no probing will be done in the fsl_udc_core driver. Add an entry to the Makefile to build the MPH DR OF platform driver if CONFIG_USB_FSL_MPH_DR_OF is defined. Signed-off-by: Anatolij Gustschin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-02USB: ehci-fsl: add MPC5121E specific suspend and resumeAnatolij Gustschin3-0/+172
Signed-off-by: Anatolij Gustschin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-02xhci 1.0: Set transfer burst last packet count field.Sarah Sharp2-1/+41
The xHCI 1.0 specification defines a new isochronous TRB field, called transfer burst last packet count (TBLPC). This field defines the number of packets in the last "burst" of packets in a TD. Only SuperSpeed endpoints can handle more than one burst, so this is set to the number for packets in a TD for all non-SuperSpeed devices (minus one, since the field is zero based). This patch should have no effect on host controllers that don't advertise the xHCI 1.0 (0x100) version number in their hci_version field. Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02xhci 1.0: Set transfer burst count field.Sarah Sharp2-1/+27
The xHCI 1.0 specification adds a new field to the fourth dword in an isochronous TRB: the transfer burst count (TBC). This field is only non-zero for SuperSpeed devices. Each SS endpoint sets the bMaxBurst field in the SuperSpeed endpoint companion descriptor, which indicates how many max-packet-sized "bursts" it can handle in one service interval. The device driver may choose to burst less max packet sized chunks each service interval (which is defined by one TD). The xHCI driver indicates to the host controller how many bursts it needs to schedule through the transfer burst count field. This patch will only effect xHCI hosts that advertise 1.0 support (0x100) in the HCI version field of their capabilities register. Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02xhci 1.0: Update TD size field format.Sarah Sharp1-6/+70
The xHCI 1.0 specification changes the format of the TD size field in Normal and Isochronous TRBs. The field in control TRBs is still set to reserved zero. Instead of representing the number of bytes left to transfer in the TD (including the current TRB's buffer), it now represents the number of packets left to transfer (*not* including this TRB). See section 4.11.2.4 of the xHCI 1.0 specification for details. The math is basically copied straight from there. Create a new function, xhci_v1_0_td_remainder(), that should be called for all xHCI 1.0 host controllers. The field location and maximum value is still the same, so reuse the old function, xhci_td_remainder(), to handle the bit shifting. Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02xhci 1.0: Only interrupt on short packet for IN EPs.Sarah Sharp1-21/+24
It doesn't make sense to set the interrupt on short packet (TRB_ISP) flag for TRBs queued to endpoints that only receive packets from the host controller (i.e. OUT endpoints). Packets can only be short when they are sent from a USB device. Plus, the xHCI 1.0 specification forbids setting the flag for anything but IN endpoints. While we're at it, remove some of my snide remarks about the inefficiency of event data TRBs. Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02xhci: Remove sparse warning about cmd_status.Sarah Sharp1-2/+2
Sparse complains about the arguments to xhci_evaluate_context_result() and xhci_configure_endpoint_result(): CHECK drivers/usb/host/xhci.c drivers/usb/host/xhci.c:1647:53: warning: incorrect type in argument 3 (different signedness) drivers/usb/host/xhci.c:1647:53: expected int *cmd_status drivers/usb/host/xhci.c:1647:53: got unsigned int [usertype] *[assigned] cmd_status drivers/usb/host/xhci.c:1648:50: warning: incorrect type in argument 3 (different signedness) drivers/usb/host/xhci.c:1648:50: expected int *cmd_status drivers/usb/host/xhci.c:1648:50: got unsigned int [usertype] *[assigned] cmd_status The command status is taken from the command completion event TRB, and will always be a positive number. Change the signature of xhci_evaluate_context_result() and xhci_configure_endpoint_result() to take a u32 for cmd_status. Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02usbcore: warm reset USB3 port in SS.Inactive stateAndiry Xu1-0/+46
Some USB3.0 devices go to SS.Inactive state when hot plug to USB3 ports. Warm reset the port to transition it to U0 state. This patch fixes the issue that Kingston USB3.0 flash drive can not be recognized when hot plug to USB3 port. Signed-off-by: Andiry Xu <[email protected]> Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02usbcore: Refine USB3.0 device suspend and resumeAndiry Xu2-41/+41
In the past, we use USB2.0 request to suspend and resume a USB3.0 device. Actually, USB3.0 hub does not support Set/Clear PORT_SUSPEND request, instead, it uses Set PORT_LINK_STATE request. This patch makes USB3.0 device suspend/resume comply with USB3.0 specification. This patch fixes the issue that USB3.0 device can not be suspended when connected to a USB3.0 external hub. Signed-off-by: Andiry Xu <[email protected]> Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02xHCI: report USB3.0 portstatus comply with USB3.0 specificationAndiry Xu2-27/+66
USB3.0 specification has different wPortStatus and wPortChange definitions from USB2.0 specification. Since USB3 root hub and USB2 root hub are split now and USB3 hub only has USB3 protocol ports, we should modify the portstatus and portchange report of USB3 ports to comply with USB3.0 specification. Signed-off-by: Andiry Xu <[email protected]> Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02xHCI: Set link state supportAndiry Xu1-0/+41
This patch adds support for Set Port Feature(PORT_LINK_STATE) request. The most significant byte (bits 15..8) of the wIndex field specifies the U state the host software wants to put the link connected to the port into. This request is only valid when the PORT_ENABLE bit is set and the PORT_LINK_STATE should not be above value '5' (Rx.Detect). This request will be later used to replace the set/clear suspend USB3 protocol ports in hub driver. Signed-off-by: Andiry Xu <[email protected]> Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02xHCI: Clear link state change supportAndiry Xu1-0/+5
This patch adds support for Clear Port Feature(C_PORT_LINK_STATE) request from usbcore. Signed-off-by: Andiry Xu <[email protected]> Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02xHCI: warm reset supportAndiry Xu1-0/+11
This patch adds warm reset support to xhci hub control. It handles Set Port Feature(BH_PORT_RESET) and Clear Port Feature (C_BH_PORT_RESET) request from usbcore. Note warm reset is called BH reset some places in USB3.0 specification. Signed-off-by: Andiry Xu <[email protected]> Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02usb/ch9: use proper endianess for wBytesPerIntervalSebastian Andrzej Siewior3-3/+3
while going through Tatyana's changes for the gadget framework I noticed that this type is not defined as __le16. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02xhci: Remove recursive call to xhci_handle_eventMatt Evans1-7/+11
Make the caller loop while there are events to handle, instead. Signed-off-by: Matt Evans <[email protected]> Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02xhci: Add an assertion to check for virt_dev=0 bug.Matt Evans1-0/+11
During a "plug-unplug" stress test on an NEC xHCI card, a null pointer dereference was observed. xhci_address_device() dereferenced a null virt_dev (possibly an erroneous udev->slot_id?); this patch adds a WARN_ON & message to aid debug if it can be recreated. Signed-off-by: Matt Evans <[email protected]> Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02xhci: Add rmb() between reading event validity & event data access.Matt Evans1-0/+5
On weakly-ordered systems, the reading of an event's content must occur after reading the event's validity. Signed-off-by: Matt Evans <[email protected]> Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02xhci: Make xHCI driver endian-safeMatt Evans6-341/+360
This patch changes the struct members defining access to xHCI device-visible memory to use __le32/__le64 where appropriate, and then adds swaps where required. Checked with sparse that all accesses are correct. MMIO accesses use readl/writel so already are performed LE, but prototypes now reflect this with __le*. There were a couple of (debug) instances of DMA pointers being truncated to 32bits which have been fixed too. Signed-off-by: Matt Evans <[email protected]> Signed-off-by: Sarah Sharp <[email protected]>
2011-05-02usb: factor out state_string() on otg driversAnatolij Gustschin4-60/+42
Provide common otg_state_string() and use it in drivers. Signed-off-by: Anatolij Gustschin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-02usb/usbtest: fix test10 on superpseedSebastian Andrzej Siewior1-0/+2
dummy_hcd + g_zero: |./testusb -a -s 1024 -v 1024 -t 10 | usbtest 2-1:3.0: subtest 14 error, status 0 with patch: ./testusb -a -t 10 |unknown speed /proc/bus/usb/001/002 | dummy_udc dummy_udc: disabled ep-a | dummy_udc dummy_udc: disabled ep-b | dummy_udc dummy_udc: enabled ep-a (ep1in-bulk) maxpacket 1024 | dummy_udc dummy_udc: enabled ep-b (ep2out-bulk) maxpacket 1024 | zero gadget: source/sink enabled | usbtest 1-1:3.0: TEST 10: queue 32 control calls, 1000 times | dummy_hcd dummy_hcd: timer fired with no URBs pending? |/proc/bus/usb/001/002 test 10, 0.022370 secs Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-02usb/usbtest: print super on super speedSebastian Andrzej Siewior1-0/+3
Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-02sysctl: net: call unregister_net_sysctl_table where neededLucian Adrian Grijincu2-2/+2
ctl_table_headers registered with register_net_sysctl_table should have been unregistered with the equivalent unregister_net_sysctl_table Signed-off-by: Lucian Adrian Grijincu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-02Revert: veth: remove unneeded ifname code from veth_newlink()Jiri Pirko1-0/+12
84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743 ("veth: remove unneeded ifname code from veth_newlink()") caused regression on veth creation. This patch reverts the original one. Reported-by: Michał Mirosław <[email protected]> Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-02smsc95xx: fix reset checkRabin Vincent1-1/+1
The reset loop check should check the MII_BMCR register value for BMCR_RESET rather than for MII_BMCR (the register address, which also happens to be zero). Signed-off-by: Rabin Vincent <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-02tg3: Fix failure to enable WoL by default when possibleRafael J. Wysocki1-2/+6
tg3 is supposed to enable WoL by default on adapters which support that, but it fails to do so unless the adapter's /sys/devices/.../power/wakeup file contains 'enabled' during the initialization of the adapter. Fix that by making tg3 use device_set_wakeup_enable() to enable wakeup automatically whenever WoL should be enabled by default. Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-02networking: inappropriate ioctl operation should return ENOTTYLifeng Sun1-3/+3
ioctl() calls against a socket with an inappropriate ioctl operation are incorrectly returning EINVAL rather than ENOTTY: [ENOTTY] Inappropriate I/O control operation. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=33992 Signed-off-by: Lifeng Sun <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-02x86, reboot: Fix relocations in reboot_32.SH. Peter Anvin1-6/+6
The use of base for %ebx in this file is arbitrary, *except* that we also use it to compute the real-mode segment. Therefore, make it so that r_base really is the true address to which %ebx points. This resolves kernel bugzilla 33302. Reported-and-tested-by: Alexey Zaytsev <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]> Link: http://lkml.kernel.org/n/[email protected]
2011-05-02amd8111e: trivial typo spelling: Negotitate -> NegotiateJoe Perches1-1/+1
Signed-off-by: Joe Perches <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-02firewire: Fix for broken configrom updates in quick successionB.J. Buchalter1-14/+25
Current implementation of ohci_set_config_rom() uses a deferred bus reset via fw_schedule_bus_reset(). If clients add multiple unit descriptors to the config_rom in quick succession, the deferred bus reset may not have fired before succeeding update requests have come in. This can lead to an incorrect partial update of the config_rom for both addition and removal of config_rom descriptors, as the ohci_set_config_rom() routine will return -EBUSY if a previous pending update has not been completed yet; the requested update just gets dropped on the floor. This patch recognizes that the "in-flight" update can be modified until it has been processed by the bus-reset, and the locking in the bus_reset_tasklet ensures that the update is done atomically with respect to modifications made by ohci_set_config_rom(). The -EBUSY error case is simply removed. [Stefan R: The bug always existed at least theoretically. But it became easy to trigger since 2.6.36 commit 02d37bed188c "firewire: core: integrate software-forced bus resets with bus management" which introduced long mandatory delays between janitorial bus resets.] Signed-off-by: Benjamin Buchalter <[email protected]> Signed-off-by: Stefan Richter <[email protected]> (trivial style changes) Cc: <[email protected]> # 2.6.36.y and newer
2011-05-02xen: mask_rw_pte mark RO all pagetable pages up to pgt_buf_topStefano Stabellini1-1/+1
mask_rw_pte is currently checking if a pfn is a pagetable page if it falls in the range pgt_buf_start - pgt_buf_end but that is incorrect because pgt_buf_end is a moving target: pgt_buf_top is the real boundary. Acked-by: "H. Peter Anvin" <[email protected]> Signed-off-by: Stefano Stabellini <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
2011-05-02xen/mmu: Add workaround "x86-64, mm: Put early page table high"Konrad Rzeszutek Wilk1-0/+123
As a consequence of the commit: commit 4b239f458c229de044d6905c2b0f9fe16ed9e01e Author: Yinghai Lu <[email protected]> Date: Fri Dec 17 16:58:28 2010 -0800 x86-64, mm: Put early page table high it causes the Linux kernel to crash under Xen: mapping kernel into physical memory Xen: setup ISA identity maps about to get started... (XEN) mm.c:2466:d0 Bad type (saw 7400000000000001 != exp 1000000000000000) for mfn b1d89 (pfn bacf7) (XEN) mm.c:3027:d0 Error while pinning mfn b1d89 (XEN) traps.c:481:d0 Unhandled invalid opcode fault/trap [#6] on VCPU 0 [ec=0000] (XEN) domain_crash_sync called from entry.S (XEN) Domain 0 (vcpu#0) crashed on cpu#0: ... The reason is that at some point init_memory_mapping is going to reach the pagetable pages area and map those pages too (mapping them as normal memory that falls in the range of addresses passed to init_memory_mapping as argument). Some of those pages are already pagetable pages (they are in the range pgt_buf_start-pgt_buf_end) therefore they are going to be mapped RO and everything is fine. Some of these pages are not pagetable pages yet (they fall in the range pgt_buf_end-pgt_buf_top; for example the page at pgt_buf_end) so they are going to be mapped RW. When these pages become pagetable pages and are hooked into the pagetable, xen will find that the guest has already a RW mapping of them somewhere and fail the operation. The reason Xen requires pagetables to be RO is that the hypervisor needs to verify that the pagetables are valid before using them. The validation operations are called "pinning" (more details in arch/x86/xen/mmu.c). In order to fix the issue we mark all the pages in the entire range pgt_buf_start-pgt_buf_top as RO, however when the pagetable allocation is completed only the range pgt_buf_start-pgt_buf_end is reserved by init_memory_mapping. Hence the kernel is going to crash as soon as one of the pages in the range pgt_buf_end-pgt_buf_top is reused (b/c those ranges are RO). For this reason, this function is introduced which is called _after_ the init_memory_mapping has completed (in a perfect world we would call this function from init_memory_mapping, but lets ignore that). Because we are called _after_ init_memory_mapping the pgt_buf_[start, end,top] have all changed to new values (b/c another init_memory_mapping is called). Hence, the first time we enter this function, we save away the pgt_buf_start value and update the pgt_buf_[end,top]. When we detect that the "old" pgt_buf_start through pgt_buf_end PFNs have been reserved (so memblock_x86_reserve_range has been called), we immediately set out to RW the "old" pgt_buf_end through pgt_buf_top. And then we update those "old" pgt_buf_[end|top] with the new ones so that we can redo this on the next pagetable. Acked-by: "H. Peter Anvin" <[email protected]> Reviewed-by: Jeremy Fitzhardinge <[email protected]> [v1: Updated with Jeremy's comments] [v2: Added the crash output] Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
2011-05-02Merge branch 'master' of ↵David S. Miller5-17/+47
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
2011-05-02Merge branch 'for-linus' of git://git.infradead.org/ubifs-2.6Linus Torvalds3-37/+16
* 'for-linus' of git://git.infradead.org/ubifs-2.6: UBIFS: seek journal heads to the latest bud in replay UBIFS: do not free write-buffers when in R/O mode
2011-05-02Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds20-353/+528
* 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm: (47 commits) CLKDEV: Fix clkdev return value for NULL clk case ARM: 6891/1: prevent heap corruption in OABI semtimedop ARM: kprobes: Tidy-up kprobes-decode.c ARM: kprobes: Add emulation of hint instructions like NOP and WFI ARM: kprobes: Add emulation of SBFX, UBFX, BFI and BFC instructions ARM: kprobes: Add emulation of MOVW and MOVT instructions ARM: kprobes: Reject probing of undefined data processing instructions ARM: kprobes: Remove redundant code in space_1111 ARM: kprobes: Fix emulation of PLD instructions ARM: kprobes: Reject probing of SETEND instructions ARM: kprobes: Consolidate stub decoding functions ARM: kprobes: Reject probing of all coprocessor instructions ARM: kprobes: Fix emulation of USAD8 instructions ARM: kprobes: Fix emulation of SMUAD, SMUSD and SMMUL instructions ARM: kprobes: Fix emulation of SXTB16, SXTB, SXTH, UXTB16, UXTB and UXTH instructions ARM: kprobes: Reject probing of undefined media instructions ARM: kprobes: Add emulation of RBIT instruction ARM: kprobes: Reject probing of LDRB instructions which load PC ARM: kprobes: Fix emulation of LDRD and STRD instructions ARM: kprobes: Reject probing of LDR/STR instructions which update PC unpredictably ...
2011-05-02genirq: Fix typo CONFIG_GENIRC_IRQ_SHOW_LEVELGeert Uytterhoeven1-1/+1
commit ab7798ffcf98b11a9525cf65bacdae3fd58d357f ("genirq: Expand generic show_interrupts()") added the Kconfig option GENERIC_IRQ_SHOW_LEVEL to accomodate PowerPC, but this doesn't actually enable the functionality due to a typo in the #ifdef check. Signed-off-by: Geert Uytterhoeven <[email protected]> Cc: Linux/PPC Development <[email protected]> Link: http://lkml.kernel.org/r/%3Calpine.DEB.2.00.1104302251370.19068%40ayla.of.borg%3E Signed-off-by: Thomas Gleixner <[email protected]>
2011-05-02UBIFS: seek journal heads to the latest bud in replayArtem Bityutskiy1-6/+12
This is the second fix of the following symptom: UBIFS error (pid 34456): could not find an empty LEB which sometimes happens after power cuts when we mount the file-system - UBIFS refuses it with the above error message which comes from the 'ubifs_rcvry_gc_commit()' function. I can reproduce this using the integck test with the UBIFS power cut emulation enabled. Analysis of the problem. Currently UBIFS replay seeks the journal heads to the last _replayed_ bud. But the buds are replayed out-of-order, so the replay basically seeks journal heads to the "random" bud belonging to this head, and not to the _last_ one. The result of this is that the GC head may be seeked to a full LEB with no free space, or very little free space. And 'ubifs_rcvry_gc_commit()' tries to find a fully or mostly dirty LEB to match the current GC head (because we need to garbage-collect that dirty LEB at one go, because we do not have @c->gc_lnum). So 'ubifs_find_dirty_leb()' fails and we fall back to finding an empty LEB and also fail. As a result - recovery fails and mounting fails. This patch teaches the replay to initialize the GC heads exactly to the latest buds, i.e. the buds which have the largest sequence number in corresponding log reference nodes. Signed-off-by: Artem Bityutskiy <[email protected]> Cc: [email protected]
2011-05-02UBIFS: do not free write-buffers when in R/O modeArtem Bityutskiy2-31/+4
Currently UBIFS has a small optimization - it frees write-buffers when it is re-mounted from R/W mode to R/O mode. Of course, when it is mounted R/O, it does not allocate write-buffers as well. This optimization is nice but it leads to subtle problems and complications in recovery, which I can reproduce using the integck test. The symptoms are that after a power cut the file-system cannot be mounted if we first mount it R/O, and then re-mount R/W - 'ubifs_rcvry_gc_commit()' prints: UBIFS error (pid 34456): could not find an empty LEB Analysis of the problem. When mounting R/W, the reply process sets journal heads to buds [1], but when mounting R/O - it does not do this, because the write-buffers are not allocated. So 'ubifs_rcvry_gc_commit()' works completely differently for the same file-system but for the following 2 cases: 1. mounting R/W after a power cut and recover 2. mounting R/O after a power cut, re-mounting R/W and run deferred recovery In the former case, we have journal heads seeked to the a bud, in the latter case, they are non-seeked (wbuf->lnum == -1). So in the latter case we do not try to recover the GC LEB by garbage-collecting to the GC head, but we just try to find an empty LEB, and there may be no empty LEBs, so we just fail. On the other hand, in the former case (mount R/W), we are able to make a GC LEB (@c->gc_lnum) by garbage-collecting. Thus, let's remove this small nice optimization and always allocate write-buffers. This should not make too big difference - we have only 3 of them, each of max. write unit size, which is usually 2KiB. So this is about 6KiB of RAM for the typical case, and only when mounted R/O. [1]: Note, currently the replay process is setting (seeking) the journal heads to _some_ buds, not necessarily to the buds which had been the journal heads before the power cut happened. This will be fixed separately. Signed-off-by: Artem Bityutskiy <[email protected]> Cc: [email protected]
2011-05-02Merge branch 'for-linus' of ↵Linus Torvalds5-25/+27
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Fix Realtek's chained fixup checks Revert "ALSA: hda - Fix pin-config of Gigabyte mobo" ALSA: HDA: Fix automute for Gateway NV79 ALSA: hda: add beep quirk for Realtek 0x1043:831a ALSA: usb-audio - Terratec Aureon 7.1 USB ID as C-Media cm6206 quirks ALSA: hda - VIA: Fix notify_aa_path_ctls() invalid issue. ALSA - au88x0 - Add buffer bytes constraints
2011-05-02Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6Linus Torvalds4-4/+4
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: [S390] irqstats: fix counting of pfault, dasd diag and virtio irqs [S390] prng: fix pointer arithmetic
2011-05-02Merge branch 'hwmon-for-linus' of ↵Linus Torvalds1-2/+1
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging: hwmon: (twl4030-madc-hwmon) Return proper error if hwmon_device_register fails
2011-05-02Merge branch 'i2c-for-linus' of ↵Linus Torvalds3-17/+19
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: i2c-parport: Fix adapter list handling i2c-i801: Move device ID definitions to driver
2011-05-02XZ decompressor: Fix decoding of empty LZMA2 streamsLasse Collin1-3/+3
The old code considered valid empty LZMA2 streams to be corrupt. Note that a typical empty .xz file has no LZMA2 data at all, and thus most .xz files having no uncompressed data are handled correctly even without this fix. Signed-off-by: Lasse Collin <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>