aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_eh.h (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2010-12-21[SCSI] mpt2sas: Bump version 07.100.00.00Kashyap, Desai1-2/+2
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] mpt2sas: Debug string changes from target to device.Kashyap, Desai1-2/+2
Changing debug print to correct string. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] mpt2sas: Sanity check for phy count is added using max phy countKashyap, Desai1-4/+8
Fix oops loading driver when there is direct attached SEP device The driver set max phys count to the value reported in sas iounit page zero. However this page doesn't take into account additional virutal phys. When sas topology event arrives, the phy count is larger than expected, and the driver accesses memory array beyond the end of allocated space, then oops. Manufacturing page 8 contains the info on direct attached phys. For this fix will making sure that sas topology event is not processing phys greater than the expected phy count. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] mpt2sas: change queue depth with reason argument more appropriatelyKashyap, Desai1-11/+26
change_queue_depth callback API changed The change_queue_depth callback changed where there is now an additional parameter called reason, with SCSI_QDEPTH_DEFAULT, SCSI_QDEPTH_QFULL, and SCSI_QDEPTH_RAMP_UP codes. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] mpt2sas: Remove code for TASK_SET_FULL from driver.Kashyap, Desai2-92/+0
remove support for MPI2_EVENT_TASK_SET_FULL This event is obsoleted, so this processing of this event needs to be removed from the driver. The controller firmware is going to handle TASK_SET_FULL, the driver doesn't need to do anything. Even though we are removing the EVENT handling, the behavour has not changed between driver versions becuase fimrware will still be handling queue throttling, and retrying of commands when the target device queues are full. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] mpt2sas: MPI 2.0 Header updatedKashyap, Desai8-18/+95
MPI2 Rev header files. 1) Removed Task Set Full Event. Modified description of Disable SCSI Initiator Task Set Full Handling bit in the Flags field of IO Unit Page 1. Modified the descriptions for the three queue depth fields in SAS IO Unit Page 1. (2) Added new value for the Current Operation bits of the Flags field in the RAID Volume Indicator Structure to indicate that the Make Data Consistent operation is running. (3) Added a value of 0x6 to various SAS link rate fields to indicate an attached PHY that is not using any commonly supported settings. (4) Added Volume Not Consistent bit to the VolumeStatusFlags field of RAID Volume Page 0. (5) Added a new value for the IncompatibleReason field of RAID Physical Disk Page 0 to indicate an incompatible media type. (6) Added Diagnostic Data Upload tool for the Toolbox Request. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] mpt2sas: Modify code to support Expander switchKashyap, Desai3-124/+206
Issue : Switch swap doesn't work when device missing delay is enabled. (1) add support to individually add and remove phys to and from existing ports. This replaces the routine _transport_delete_duplicate_port. (2) _scsih_sas_host_refresh - was modified to change the link rate from zero to 1.5 GB rate when the firmware reports there is an attached device with zero link. (3) add new function mpt2sas_device_remove, this is wrapper function deletes some redundant code through out driver by combining into one subrountine (4) two subroutines were modified so the sas_device, raid_device, and port lists are traversed once when objects are deleted from the list. Previously it was looping back each time an object was deleted from the list. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] mpt2sas: Create a pool of chain buffer instead of dedicated per IOsKashyap, Desai3-43/+119
Create a pool of chain buffers, instead of dedicated per IO: This enahancment is to address memory allocation failure when asking for more than 2300 IOs per host. There is just not enough contiquious DMA physical memory to make one single allocation to hold both message frames and chain buffers when asking for more than 2300 request. In order to address this problem we will have to allocate memory for each chain buffer in a seperate individual memory allocation, placing each chain element of 128 bytes onto a pool of available chains, which can be shared amoung all request. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] mpt2sas: Added loadtime para for IOMissingDelay and DMDKashyap, Desai1-0/+100
Ability to override/set the ReportDeviceMissingDelay and IODeviceMissingDelay from driver: Add new command line option missing_delay, this is an array, where the first element is the device missing delay, and the second element is io missing delay. The driver will program sas iounit page 1 with the new setting when the driver loads. This is programmed to the current and persistent configuration page so this takes immediately, as will be sticky across host reboots. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] mpt2sas: Added sanity check for cb_idx and smid access.Kashyap, Desai2-1/+9
Sometime it is seen that controller firmware returns an invalid system message id (smid). the oops is occurring becuase mpt_callbacks pointer is referenced to either null or invalid virtual address. this is due to cb_idx set incorrectly from routine _base_get_cb_idx. the cb_idx was set incorrectly becuase there is no check to make sure smid is less than maxiumum anticapted smid. to fix this issue, we add a check in _base_get_cb_idx to make sure smid is not greater than ioc->hba_queue_depth. in addition, a similar check was added to make sure the reply address was less than the largest anticapated address. Newer firmware has sovled this issue, however it good to have this sanity check. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] mpt2sas: Removed compiler warnnings when logging is disabledKashyap, Desai2-2/+3
The compiler throws warning messages while compiling without CONFIG_SCSI_MPT2SAS_LOGGING. Set proper ifdef for CONFIG_SCSI_MPT2SAS_LOGGING to avoid warnnings. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] lpfc 8.3.19: Update lpfc driver version to 8.3.19James Smart1-1/+1
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] lpfc 8.3.19: Change heartbeat to default to disabledJames Smart1-2/+2
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] lpfc 8.3.19: Added support for ELS RRQ commandJames Smart13-20/+803
Added support for ELS RRQ command - Add new routine lpfc_set_rrq_active() to track XRI qualifier state. - Add new module parameter lpfc_enable_rrq to control RRQ operation. - Add logic to ELS RRQ completion handler and xri qualifier timeout to clear XRI qualifier state. - Use OX_ID from XRI_ABORTED_CQE for RRQ payload. - Tie abort and XRI_ABORTED_CQE andler to RRQ generation. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] lpfc 8.3.19: Add SLI4 FC Discovery supportJames Smart14-382/+516
Add SLI4 FC Discovery support - Replace READ_LA and READ_LA64 with READ_TOPOLOGY mailbox command. - Converted the old READ_LA structure to use bf_set/get instead of bit fields. - Rename HBA_FCOE_SUPPORT flag to HBA_FCOE_MODE. Flag now indicates function is running as SLI-4 FC or FCoE port. Make sure flag reset each time READ_REV completed as it can dynamically change. - Removed BDE union in the READ_TOPOLOGY mailbox command and added a define to define the ALPA MAP SIZE. Added FC Code for async events. - Added code to support new 16G link speed. - Define new set of values to keep track of valid user settable link speeds. - Used new link speed definitions to define link speed max and bitmap. - Redefined FDMI Port sppeds to be hax values and added the 16G value. - Added new CQE trailer code for FC Events. - Add lpfc_issue_init_vfi and lpfc_init_vfi_cmpl routines. - Replace many calls to the initial_flogi routine with lpfc_issue_init_vfi. - Add vp and vpi fields to the INIT_VFI mailbox command. - Addapt lpfc_hba_init_link routine for SLI4 use. - Use lpfc_hba_init_link call from lpfc_sli4_hba_setup. - Add a check for FC mode to register the FCFI before init link. - Convert lpfc_sli4_init_vpi to be called without a vpi (get it from vport). Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] lpfc 8.3.19: Add latest SLI4 Hardware initialization supportJames Smart3-33/+149
- Add the Lancer FC and FCoE PCI IDs - Add new SLI4 INTF register definitions - Implement new SLI4 doorbell register Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] lpfc 8.3.19: Fix critical errors and crashesJames Smart6-14/+99
Fix critical errors and crashes - Replace LOF_SECURITY with LOG_SECURITY - When calculating diag test memory size, use full size with header. - Return LS_RJT with status=UNSUPPORTED on unrecognized ELS's - Correct NULL pointer dereference when lpfc_create_vport_work_array() returns NULL. - Added code to handle CVL when port is in LPFC_VPORT_FAILED state. - In lpfc_do_scr_ns_plogi, check the nodelist for FDMI_DID and reuse the resource. - Check for generic request 64 and calculate the sgl offset for the request and reply sgls, also calculate the xmit length using only the request bde. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] fix id computation in scsi_eh_target_reset()James Bottomley1-36/+25
The current code in scsi_eh_target_reset() has an off by one error that actually sends spurious extra resets. Since there's no real need to reset the targets in numerical order, simply chunk up the command recovery list doing target resets and pulling matching targets out of the list (that also makes the loop O(N) instead of O(N^2). [mike christie found and fixed a list_splice -> list_splice_init problem] Reported-by: Hillf Danton<dhillf@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] ipr: fix mailbox register definition and add a delay before readingWayne Boyer2-6/+43
The definition for the mailbox register for new adapters was incorrect. The value has been updated to the correct offset. After an adapter reset, the mailbox register on the new adapters takes a number of seconds to stabilize. A delay has been added before reading the register. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] ipr: fix lun assignment and comparisonWayne Boyer1-4/+3
The lun value was not getting set up correctly for all devices attached to the new 64 bit adapters. The fix is to move the logic to earlier in the ipr_init_res_entry routine such that the value does get set correctly for all devices. Then the ipr_is_same_device comparison function was using the wrong lun value in the logic for the new adapters. Change this to use the correct lun value. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] Retrieve the Caching mode pageLuben Tuikov1-16/+47
Some kernel transport drivers unconditionally disable retrieval of the Caching mode page. One such for example is the BBB/CBI transport over USB.  Such a restraint is too harsh as some devices do support the Caching mode page. Unconditionally enabling the retrieval of this mode page over those transports at their transport code level may result in some devices failing and becoming unusable. This patch implements a method of retrieving the Caching mode page without unconditionally enabling it in the transports which unconditionally disable it. The idea is to ask for all supported pages, page code 0x3F, and then search for the Caching mode page in the mode parameter data returned. The sd driver already asks for all the mode pages supported by the attached device by setting the page code to 0x3F in order to find out if the media is write protected by reading the WP bit in the Device Specific Parameter field. It then attempts to retrieve only the Caching mode page by setting the page code to 8 and actually attempting to retrieve it if and only if the transport allows it. The method implemented here is that if the transport doesn't allow retrieval of the Caching mode page and the device is not RBC, then we ask for all pages supported by setting the page code to 0x3F (similarly to how the WP bit is retrieved above), and then we search for the Caching mode page in the mode parameter data returned. With this patch, devices over SATA, report this (no change): Oct 22 18:45:58 localhost kernel: sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB) Oct 22 18:45:58 localhost kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0 Oct 22 18:45:58 localhost kernel: sd 0:0:0:0: [sda] Write Protect is off Oct 22 18:45:58 localhost kernel: sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 Oct 22 18:45:58 localhost kernel: sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA Smart devices report their Caching mode page. This is a change where we'd previously see the kernel making assumption about the device's cache being write-through: Oct 22 18:45:58 localhost kernel: sd 6:0:0:0: Attached scsi generic sg2 type 0 Oct 22 18:45:58 localhost kernel: sd 6:0:0:0: [sdb] 610472646 4096-byte logical blocks: (2.50 TB/2.27 TiB) Oct 22 18:45:58 localhost kernel: sd 6:0:0:0: [sdb] Write Protect is off Oct 22 18:45:58 localhost kernel: sd 6:0:0:0: [sdb] Mode Sense: 47 00 10 08 Oct 22 18:45:58 localhost kernel: sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, supports DPO and FUA And "dumb" devices over BBB, are correctly shown not to support reporting the Caching mode page: Oct 22 18:49:06 localhost kernel: sd 7:0:0:0: [sdc] 15663104 512-byte logical blocks: (8.01 GB/7.46 GiB) Oct 22 18:49:06 localhost kernel: sd 7:0:0:0: [sdc] Write Protect is off Oct 22 18:49:06 localhost kernel: sd 7:0:0:0: [sdc] Mode Sense: 23 00 00 00 Oct 22 18:49:06 localhost kernel: sd 7:0:0:0: [sdc] No Caching mode page present Oct 22 18:49:06 localhost kernel: sd 7:0:0:0: [sdc] Assuming drive cache: write through Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] libsas: fix definition of wideport, include local sas addressDan Williams2-5/+15
To date libsas has only looked at the attached sas address when determining the formation of wide ports. The specification and some hardware expects that phys with different addresses will not form a wide port unless the local peer phys also match each other. Introduce a flag to select stricter behavior at sas_register_ha() time. The flag can be dropped once it is known that all libsas users expect the same behavior. Current drivers just initialize this field to zero and get the traditional behavior. Reported-by: Patrick Thomson <patrick.s.thomson@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] sd: improve logic and efficiecy of media-change detectionAlan Stern1-7/+20
This patch (as1415) improves the formerly incomprehensible logic in sd_media_changed() (the current code refers to "changed" as a state, whereas in fact it is a relation between two states). It also adds a big comment so that everyone can understand what is really going on. The patch also improves efficiency by not reporting a media change when no medium was ever present. If no medium was present the last time we checked and there's still no medium, it's not necessary to tell the caller that a change occurred. Doing so merely causes the caller to attempt to revalidate a non-existent disk, which is a waste of time. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] fix up documentation for change in ->queuecommand to lockless callingJames Bottomley1-28/+31
The current doc still says we call it with the host lock held, which is going to cause confusion. Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-20[SCSI] bfa: rename log_level to bfa_log_levelJing Huang9-46/+47
Rename log_level to bfa_log_level to make the global variable more bfa specific and avoid clashes with other drivers which was causing a build failure. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-15Linux 2.6.37-rc6Linus Torvalds1-1/+1
2010-12-15xen: Provide a variant of __RING_SIZE() that is an integer constant expressionJeremy Fitzhardinge3-5/+12
Without this, gcc 4.5 won't compile xen-netfront and xen-blkfront, where this is being used to specify array sizes. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: David Miller <davem@davemloft.net> Cc: Stable Kernel <stable@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-15MAINTAINERS: update MSM git treeDaniel Walker1-1/+1
The MSM main git tree has changed over to this new address. Signed-off-by: Daniel Walker <dwalker@codeaurora.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-15install_special_mapping skips security_file_mmap check.Tavis Ormandy2-4/+17
The install_special_mapping routine (used, for example, to setup the vdso) skips the security check before insert_vm_struct, allowing a local attacker to bypass the mmap_min_addr security restriction by limiting the available pages for special mappings. bprm_mm_init() also skips the check, and although I don't think this can be used to bypass any restrictions, I don't see any reason not to have the security check. $ uname -m x86_64 $ cat /proc/sys/vm/mmap_min_addr 65536 $ cat install_special_mapping.s section .bss resb BSS_SIZE section .text global _start _start: mov eax, __NR_pause int 0x80 $ nasm -D__NR_pause=29 -DBSS_SIZE=0xfffed000 -f elf -o install_special_mapping.o install_special_mapping.s $ ld -m elf_i386 -Ttext=0x10000 -Tbss=0x11000 -o install_special_mapping install_special_mapping.o $ ./install_special_mapping & [1] 14303 $ cat /proc/14303/maps 0000f000-00010000 r-xp 00000000 00:00 0 [vdso] 00010000-00011000 r-xp 00001000 00:19 2453665 /home/taviso/install_special_mapping 00011000-ffffe000 rwxp 00000000 00:00 0 [stack] It's worth noting that Red Hat are shipping with mmap_min_addr set to 4096. Signed-off-by: Tavis Ormandy <taviso@google.com> Acked-by: Kees Cook <kees@ubuntu.com> Acked-by: Robert Swiecki <swiecki@google.com> [ Changed to not drop the error code - akpm ] Reviewed-by: James Morris <jmorris@namei.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-15crypto: ghash-intel - ghash-clmulni-intel_glue needs err.hRandy Dunlap1-0/+1
Add missing header file: arch/x86/crypto/ghash-clmulni-intel_glue.c:256: error: implicit declaration of function 'IS_ERR' arch/x86/crypto/ghash-clmulni-intel_glue.c:257: error: implicit declaration of function 'PTR_ERR' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2010-12-14dw_spi: Fix missing final read in some polling situationsMajor Lee1-0/+5
There is a possibility that the last word of a transaction will be lost if data is not ready. Re-read in poll_transfer() to solve this issue when poll_mode is enabled. Verified on SPI touch screen device. Signed-off-by: Major Lee <major_lee@wistron.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-14i2c_intel_mid: Fix slash in sysfs nameAlan Cox1-1/+1
This gets caught by the new sanity check code. Instead of the slash use a different symbol. This was originally found by Major Lee who proposed a rather more complex patch which changed the name according to the chip type. On the basis that we are in a late -rc and making Linus grumpy isn't always a good idea (however fun) this is a simple alternative. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-14ext4: fix typo which broke '..' detection in ext4_find_entry()Aaro Koskinen1-1/+1
There should be a check for the NUL character instead of '0'. Fortunately the only thing that cares about this is NFS serving, which is why we didn't notice this in the merge window testing. Reported-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-12-14ARM: 6535/1: V6 MPCore v6_dma_inv_range and v6_dma_flush_range RWFO fixValentine Barshak1-8/+20
Cache ownership must be acquired by reading/writing data from the cache line to make cache operation have the desired effect on the SMP MPCore CPU. However, the ownership is never acquired in the v6_dma_inv_range function when cleaning the first line and flushing the last one, in case the address is not aligned to D_CACHE_LINE_SIZE boundary. Fix this by reading/writing data if needed, before performing cache operations. While at it, fix v6_dma_flush_range to prevent RWFO outside the buffer. Cc: stable@kernel.org Signed-off-by: Valentine Barshak <vbarshak@mvista.com> Signed-off-by: George G. Davis <gdavis@mvista.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-14ARM: 6534/1: Make CONFIG_FPE_NWFPE depend on !CONFIG_THUMB2_KERNELDave Martin1-1/+1
Because the nwfpe support is unlikely to be used on new platforms and requires CONFIG_OABI_COMPAT, which is not generally used with ARMv7+, we shouldn't expect to build nwfpe support into a Thumb-2 kernel. At present, nwfpe contains assembly code which isn't Thumb-2 compatible, and for now it doesn't appear useful to port this code. All ARMv7-A/R platforms necessarily have VFPv3 hardware floating- point natively, making emulation unnecessary. Signed-off-by: Dave Martin <dave.martin@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-14ARM: 6533/1: Thumb-2: Make CONFIG_THUMB2_KERNEL depend on !CPU_V6Dave Martin1-1/+1
This makes sense, because Thumb-2 code can't execute on plain ARMv6 processors. This will avoid accidentally configuring a broken kernel where the config otherwise would allow multiple architecture versions to coexist in the same kernel. Not adding !CPU_V5 etc., because the chance of anyone trying to put v5 and v7 in the same kernel is low, and I'm not aware of any mach which can do this. These could be added later if it matters. Note that the rules may need to be refined if support for the ARM1156J(F)-S processor is later added to the kernel, since this processor supports the rare ARMv6T2 extensions, which add support for Thumb-2 and a few other ARMv7 features. Signed-off-by: Dave Martin <dave.martin@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-14Change bcmring Maintainer list.Jiandong Zheng1-2/+2
I am Jiandong Zheng working on BCMRING in Broadcom Canada Ltd. I am replacing Leo Chen (leochen@broadcom.com) as "ARM/BCMRING ARM ARCHITECTURE" and "ARM/BCMRING MTD NAND DRIVER" maintainer from Broadcom as he is no longer the maintainer of these components. Signed-off-by: Jiandong Zheng <jdzheng@broadcom.com> Acked-by: Scott Branden <sbranden@broadcom.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-14ext4: Turn off multiple page-io submission by defaultTheodore Ts'o3-3/+17
Jon Nelson has found a test case which causes postgresql to fail with the error: psql:t.sql:4: ERROR: invalid page header in block 38269 of relation base/16384/16581 Under memory pressure, it looks like part of a file can end up getting replaced by zero's. Until we can figure out the cause, we'll roll back the change and use block_write_full_page() instead of ext4_bio_write_page(). The new, more efficient writing function can be used via the mount option mblk_io_submit, so we can test and fix the new page I/O code. To reproduce the problem, install postgres 8.4 or 9.0, and pin enough memory such that the system just at the end of triggering writeback before running the following sql script: begin; create temporary table foo as select x as a, ARRAY[x] as b FROM generate_series(1, 10000000 ) AS x; create index foo_a_idx on foo (a); create index foo_b_idx on foo USING GIN (b); rollback; If the temporary table is created on a hard drive partition which is encrypted using dm_crypt, then under memory pressure, approximately 30-40% of the time, pgsql will issue the above failure. This patch should fix this problem, and the problem will come back if the file system is mounted with the mblk_io_submit mount option. Reported-by: Jon Nelson <jnelson@jamponi.net> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-12-14workqueue: It is likely that WORKER_NOT_RUNNING is trueSteven Rostedt1-2/+2
Running the annotate branch profiler on three boxes, including my main box that runs firefox, evolution, xchat, and is part of the distcc farm, showed this with the likelys in the workqueue code: correct incorrect % Function File Line ------- --------- - -------- ---- ---- 96 996253 99 wq_worker_sleeping workqueue.c 703 96 996247 99 wq_worker_waking_up workqueue.c 677 The likely()s in this case were assuming that WORKER_NOT_RUNNING will most likely be false. But this is not the case. The reason is (and shown by adding trace_printks and testing it) that most of the time WORKER_PREP is set. In worker_thread() we have: worker_clr_flags(worker, WORKER_PREP); [ do work stuff ] worker_set_flags(worker, WORKER_PREP, false); (that 'false' means not to wake up an idle worker) The wq_worker_sleeping() is called from schedule when a worker thread is putting itself to sleep. Which happens most of the time outside of that [ do work stuff ]. The wq_worker_waking_up is called by the wakeup worker code, which is also callod outside that [ do work stuff ]. Thus, the likely and unlikely used by those two functions are actually backwards. Remove the annotation and let gcc figure it out. Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Tejun Heo <tj@kernel.org>
2010-12-14MAINTAINERS: Add workqueue entryTejun Heo1-0/+9
Signed-off-by: Tejun Heo <tj@kernel.org>
2010-12-14fbdev: Fix fb_find_nearest_mode refresh comparisonAndrew Kephart1-0/+1
Refresh rate nearness is not calculated or reset when nearest resolution changes. This patch resets the refresh rate differential measurement whenever a new nearest resolution is discovered. This fixes two error cases; first, wherein the first mode's refresh rate differential is never calculated and second, when the closest refresh rate from a previous nearest resolution is erroneously preserved. Signed-off-by: Andrew Kephart <andrew.kephart@alereon.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-14sh: wire up accept4 syscall (non-multiplexed path)Carmelo AMOROSO2-1/+3
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-14dmaengine: at_hdmac: fix buffer transfer size specificationNicolas Ferre1-1/+1
Buffer transfer size is the number of transfers to be performed in relation with the width of the _source_ interface. So in the DMA_FROM_DEVICE case, it should be the register width that should be taken into account. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-12-13kgdboc,input: Fix regression with keyboard release key and early debuggingJason Wessel1-1/+2
The commit 111c182340cd22e238ab1cc6564df336c6ebd7cb (kgdboc: reset input devices (keyboards) when exiting debugger) introduced a regression in early debugging such that you get a kernel oops on continue (with the go command) if you boot a kernel with: earlyprintk=vga ekgdboc=kbd kgdbwait The restore kgdboc_restore_input() routine schedules work for the purpose of sending key release events for any keys that were in the depressed state prior to entering the kernel debugger. A simple fix to the crash is to not invoke the schedule_work() if the kernel system_state is anything other than SYSTEM_RUNNING. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Sergei Shtylyov <sshtylyov@mvista.com>
2010-12-13ACPI / PM: Do not save/restore NVS on Sony Vaio VGN-NW130DRafael J. Wysocki1-0/+8
The saving of the NVS memory area during suspend and restoring it during resume causes problems to appear on Sony Vaio VGN-NW130D, so blacklist that machine to avoid those problems. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=23002 Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Reported-and-tested-by: Adriano <adriano.vilela@yahoo.com> Signed-off-by: Len Brown <len.brown@intel.com>
2010-12-13Btrfs: prevent RAID level downgrades when space is lowChris Mason1-1/+19
The extent allocator has code that allows us to fill allocations from any available block group, even if it doesn't match the raid level we've requested. This was put in because adding a new drive to a filesystem made with the default mkfs options actually upgrades the metadata from single spindle dup to full RAID1. But, the code also allows us to allocate from a raid0 chunk when we really want a raid1 or raid10 chunk. This can cause big trouble because mkfs creates a small (4MB) raid0 chunk for data and metadata which then goes unused for raid1/raid10 installs. The allocator will happily wander in and allocate from that chunk when things get tight, which is not correct. The fix here is to make sure that we provide duplication when the caller has asked for it. It does all the dups to be any raid level, which preserves the dup->raid1 upgrade abilities. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2010-12-13Btrfs: account for missing devices in RAID allocation profilesChris Mason3-3/+36
When we mount in RAID degraded mode without adding a new device to replace the failed one, we can end up using the wrong RAID flags for allocations. This results in strange combinations of block groups (raid1 in a raid10 filesystem) and corruptions when we try to allocate blocks from single spindle chunks on drives that are actually missing. The first device has two small 4MB chunks in it that mkfs creates and these are usually unused in a raid1 or raid10 setup. But, in -o degraded, the allocator will fall back to these because the mask of desired raid groups isn't correct. The fix here is to count the missing devices as we build up the list of devices in the system. This count is used when picking the raid level to make sure we continue using the same levels that were in place before we lost a drive. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2010-12-13fsldma: fix issue of slow dmaForrest Shi2-3/+12
Fixed fsl dma slow issue by initializing dma mode register with bandwidth control. It boosts dma performance and should works with 85xx board. Signed-off-by: Forrest Shi <b29237@freescale.com> Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-12-13Btrfs: EIO when we fail to read tree rootsChris Mason1-1/+4
If we just get a plain IO error when we read tree roots, the code wasn't properly sending that error up the chain. This allowed mounts to continue when they should failed, and allowed operations on partially setup root structs. The end result was usually oopsen on spinlocks that hadn't been spun up correctly. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2010-12-13hwmon: (ltc4215) make sysfs file match the alarm causeIra W. Snyder1-2/+2
The ltc4215 driver used the chip's "power good" status bit to provide the power1_alarm file. This is wrong: the chip is really reporting the status of one of the monitored voltages. Change the sysfs file from power1_alarm to in2_min_alarm instead. This matches the voltage that the chip is raising an alarm for. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>