summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-06-01ASoC: Intel: byt/hsw: Add missing kthread_stop to error/cleanup pathImre Deak2-5/+12
Baytrail and Haswell SST IPC don't stop the kernel thread in error and cleanup path thus leaving orphan kernel thread behind in such a case. Also while at it, fix one error path in sst-haswell-ipc.c that doesn't free hsw->msg. [Jarkko: I edited the commit log a little] Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01ASoC: Intel: Add Baytrail byt-max98090 machine driverJarkko Nikula4-0/+215
Add machine driver and ACPI probing for Baytrail SST with MAX98090 codec. Jack detect code from Kevin Strasser <kevin.strasser@intel.com>, GPIO resolving from Mika Westerberg <mika.westerberg@linux.intel.com> and fixes and cleanups from Liam Girdwood <liam.r.girdwood@linux.intel.com>. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: Intel: avoid format string leak to thread nameKees Cook2-2/+2
This makes sure a format string can never get processed into the worker thread name from the device name. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-19ASoC: Intel: Fix pcm stream context restore crashKevin Strasser1-1/+3
In some cases the pcm stream is closed while context has been scheduled to be restored, causing a null pointer deref panic. Cancel work to ensure stream does not get freed while work is still active/pending. Also, restoring the pcm context can be safely skipped after the stream has been stopped. Check if pcm stream is still running before restoring stream context to help pending work finish more quickly in stream close path. Signed-off-by: Kevin Strasser <kevin.strasser@intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-16ASoC: Intel: remove codec memeber from codec structsVinod Koul3-7/+0
As we already have a memeber struct snd_sst_params.codec to fill this. so removing duplicate instance Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-16ASoC: Intel: add drain_notify supportVinod Koul2-0/+13
This patch adds the support to implement drain_notify in Intels mfld driver Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-16ASoC: Intel: Revert "rename pcm dias to media dai"Vinod Koul1-19/+19
This reverts commit 0cac6fc3eb5218fe40d1c2910abc643ab21d9f19. This comiit was dropped from rev2 and would not be required as it renames the platform ops as well which is not required. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-15ASoC: Intel: Fix simultaneous Baytrail SST capture and playbackJarkko Nikula1-1/+1
I managed to drop a change to stream ID setting from commit 49fee1781634 ("ASoC: Intel: Only export one Baytrail DAI") leading to non-working simultaneous capture-playback since after one DAI conversion rtd->cpu_dai->id + 1 will be the same for both playback and capture. Use substream->stream + 1 like it was in original Liam's patch. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-14ASoC: Intel: Only export one Baytrail DAILiam Girdwood2-18/+3
We don't need more than one DAI for Baytrail SST. Usage becomes also more straightforward by grouping playback and capture streams under the same PCM device. [Jarkko: I made Liam's sst-baytrail-pcm.c change a few lines smaller and squashed together with my byt-rt5640.c change] Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-14ASoC: Intel: Make Baytrail PCM data per stream rather than per DAI deviceLiam Girdwood1-8/+8
Prepare for single Baytrail DAI playback/capture link by accessing PCM data using stream ID instead of rtd->dev. Now rtd->dev is unique for playback and capture since they are exported as separate DAIs but not once converted to single DAI. [Jarkko: Separated from another commit with updated commit log] Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-13Merge branch 'fix/intel' of ↵Mark Brown11-62/+129
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel Conflicts: sound/soc/intel/sst-baytrail-dsp.c
2014-05-13ASoC: Intel: Fix Baytrail SST DSP firmware loadingJarkko Nikula1-1/+1
Commit 10df350977b1 ("ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled.") caused following regression in Baytrail SST: baytrail-pcm-audio baytrail-pcm-audio: error: DMA alloc failed baytrail-pcm-audio baytrail-pcm-audio: error: failed to load firmware Fix this by calling dma_coerce_mask_and_coherent() in sst_byt_init() with the same dma_dev device what is now used in sst_fw_new() when allocating the DMA buffer. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-13ASoC: Intel: Use ACPI device for Baytrail PCM buffer allocationJarkko Nikula1-5/+3
This follows the same idea than commit 10df350977b1 ("ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled.") by using only ACPI device for all DMA allocations. Since DMA masking is already done in firmware loading it can be removed from here. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12ASoC: Intel: Allow byt-5640 machine driver and SST core go to suspendJarkko Nikula1-2/+12
Since there is no support for compressed audio in Baytrail ADSP firmware there is no need to leave it on during suspend since ALSA PCM buffers are too small for leaving ADSP on for playing or recording. Implement PM callbacks to Baytrail byt-rt5640.c machine driver that call snd_soc_suspend and snd_soc_resume functions and unset the ignore_suspend fields in DAI links. This makes soc-core and ALSA core gracefully suspend and resume active stream and call sst_byt_pcm_trigger() during suspend-resume cycle. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12ASoC: Intel: Add Baytrail suspend/resume supportLiam Girdwood3-1/+179
Add suspend and resume support to Baytrail SST DSP. This is implemented by unloading firmware modules and putting DSP into reset prior suspend and restarting DSP again in normal boot state after resume. Context restore for running streams is implemented by scheduling a work from sst_byt_pcm_trigger() that will allocate a stream with existing parameters and start it from last known buffer position before suspend. [Jarkko: Squashed together 5 WIP patches from Liam and 1 from me] Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12ASoC: Intel: Allow Rx/Tx message list can be cleared prior to suspendLiam Girdwood1-0/+18
Suspend/resume requires reloading FW to boot state so we need to also make sure that the driver matches the FW state at boot. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12ASoC: Intel: Move Baytrail extended fw address saving to sst_byt_boot()Jarkko Nikula1-7/+7
We have to save the physical address of extended firmware block in the beginning of mailbox every time when we boot the DSP firmware since that mailbox address is re-used after DSP firmware is running. Otherwise DSP firmware will get bogus extended firmware block address during next DSP boot. Currently this is not problem but becomes when DSP runtime rebooting is implemented. Prepare for that by moving extended firmware address saving from sst_byt_init() to sst_byt_boot(). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12ASoC: Intel: Pass stream start position to sst_byt_stream_start()Jarkko Nikula3-4/+6
Stream start position will be needed in resume code. Prepare for it by adding start offset argument to sst_byt_stream_start(). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12ASoC: Intel: Simplify Baytrail stream control IPC constructionJarkko Nikula1-19/+15
Baytrail ADSP stream IPC simplifies a little by moving IPC_IA_START_STREAM construction and sending directly into sst_byt_stream_start() from sst_byt_stream_operations(). This is because IPC_IA_START_STREAM is only stream IPC with extra message data so this move saves a few code lines. Main motivation for this is to prepare for passing stream start position to sst_byt_stream_start() which will be needed in resume code. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12ASoC: Intel: Sample Baytrail DSP DMA pointer only after each periodJarkko Nikula1-13/+13
This is for preparing suspend/resume support but can give also more safeguard against concurrent timestamp structure access between DSP firmware and host. Now DSP DMA pointer is sampled in each pcm pointer callback in sst_byt_pcm_pointer() but that is unneeded since DSP updates the timestamp period basis and can potentially be racy if sst_byt_pcm_pointer() is called when DSP is updating the timestamp. By taking DSP DMA pointer only after period elapsed IPC messages in byt_notify_pointer() and returning stored hw pointer in sst_byt_pcm_pointer() there is less risk for concurrent access. The same stored hw pointer can be also used in suspend/resume code for restarting the stream at the same position. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-09ASoC: Intel: Build Medfield compressed opsMark Brown1-1/+1
Since commit 4b68b4e1c564 (ASoC: Intel: split the pcm and compress to different files) the compressed ops haven't been built causing link failures on allyesconfig and making the driver unbuildable. Add the object to the Makefile to fix that. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by Vinod Koul <vinod.koul@intel.com>
2014-05-08ASoC: Intel: rename pcm dias to media daiVinod Koul1-19/+19
this is for further updates to driver which supports DPCM :) Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08ASoC: Intel: remove unused sst-mfld platform daisVinod Koul1-30/+0
With DPCM we have media dai used and no seperate headset and speaker dai so remove the speaker dai The vibra is no longer supported thru audio, so remove Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08ASoC: Intel: split the pcm and compress to different filesVinod Koul3-200/+232
For manging them and adding support for more platforms Code move only Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08ASoC: Intel: mark sst_set_stream_status as non staticVinod Koul2-1/+2
as this will be used in compressed split file in subsequent patch Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08ASoc: Intel: rename sst-mfld-platform.cVinod Koul2-1/+1
to sst-mfld-platform-pcm.c so that we can split pcm and compress to different files for upcoming changes to support more platforms Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08ASoC: Intel: remove FSF snail mail addressVinod Koul3-16/+0
As this address can move Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08ASoC: Intel: move component registration blobVinod Koul1-4/+5
to the place near it is used Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08ASoC: Intel: Add support to unload/reload firmware modules.Liam Girdwood2-0/+40
Add some SST API calls to unload and reload firmware modules. This can be used by PM code to restore state and also allow modular FW to unload and release memory blocks. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-07ASoC: Intel: Fix block offset calculations.Liam Girdwood1-5/+3
Block offset calculations are done in the contiguous allocator so are not required here. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05ASoC: Intel: Fix check for pdata usage before dereference.Liam Girdwood1-1/+3
This patch fixes the following dereference check ordering. sound/soc/intel/sst-haswell-pcm.c:749 hsw_pcm_probe() warn: variable dereferenced before check 'pdata' (see line 746) git remote add asoc git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git git remote update asoc git checkout 0b708c87f66a15190fb43661c2320fd48c4dc6c8 vim +/pdata +749 sound/soc/intel/sst-haswell-pcm.c a4b12990 Mark Brown 2014-03-12 740 }; a4b12990 Mark Brown 2014-03-12 741 a4b12990 Mark Brown 2014-03-12 742 static int hsw_pcm_probe(struct snd_soc_platform *platform) a4b12990 Mark Brown 2014-03-12 743 { a4b12990 Mark Brown 2014-03-12 744 struct sst_pdata *pdata = dev_get_platdata(platform->dev); a4b12990 Mark Brown 2014-03-12 745 struct hsw_priv_data *priv_data; 0b708c87 Liam Girdwood 2014-05-02 @746 struct device *dma_dev = pdata->dma_dev; 0b708c87 Liam Girdwood 2014-05-02 747 int i, ret = 0; a4b12990 Mark Brown 2014-03-12 748 a4b12990 Mark Brown 2014-03-12 @749 if (!pdata) a4b12990 Mark Brown 2014-03-12 750 return -ENODEV; a4b12990 Mark Brown 2014-03-12 751 a4b12990 Mark Brown 2014-03-12 752 priv_data = devm_kzalloc(platform->dev, sizeof(*priv_data), GFP_KERNEL); Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02ASoC: Intel: Fix stream position pointer.Liam Girdwood3-7/+29
Read the stream offset and presentation position from DSP memory rather than using the old estimated position. This fixes timing issues with pulseaudio. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02ASoC: Intel: Fix allow hw_params to be called more than once.Liam Girdwood1-0/+28
hw_params() can be called multiple times. Make sure we release the DSP stream that was allocated on previous hw_params() calls before allocating a new DSP stream. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled.Liam Girdwood7-15/+12
The Intel IOMMU requires that the ACPI device is used to allocate all DMA memory buffers. This means we need to pass the DMA device pointer into child component devices that allocate DMA memory. We also only set the DMA mask for the ACPI device now instead of for each component device. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02ASoC: Intel: Fix Haswell/Broadwell DSP page table creation.Liam Girdwood1-27/+31
Fix page table creation on Haswell and Broadwell to remove unsafe virt_to_phys mappings and use more portable SG buffer. Use audio buffer APIs to allocate DMA buffers. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02ASoC: Intel: Fix allocated block list usage when adding blocks.Liam Girdwood1-0/+3
Make sure we add the allocated blocks to the modules list of blocks. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02ASoC: Intel: Fix block allocation so we only allocate blocks once.Liam Girdwood1-4/+0
Make sure we dont alloc blocks twice with requests spanning more than one block. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-24ASoC: Intel: Cancel hsw_notification_work before freeing the streamJarkko Nikula1-0/+1
I suppose there is a possibility that hsw_notification_work() may run after sst_hsw_stream_free() which can lead to a kernel crash since struct sst_hsw_stream is freed at that point and stream = container_of(work, struct sst_hsw_stream, notify_work) is not valid when hsw_notification_work() is run. Reported-by: Derek Basehore <dbasehore@chromium.org> Reported-by: Wenkai Du <wenkai.du@intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-23ASoC: Intel: Fix audio crash due to race condition in stream deletionWenkai Du2-0/+16
There is a race between sst_byt_stream_free() and sst_byt_get_stream() if sst_byt_get_stream() called from sst_byt_irq_thread() context is accessing the byt->stream_list while a stream is deleted from the list. A stream is added to byt->stream_list in sst_byt_stream_new() and deleted in sst_byt_stream_free(). sst_byt_get_stream() is always protected by sst->spinlock, but the stream addition and deletion are not protected. The patch adds spinlock to both stream addition and deletion. [Jarkko: Same fix added to sst-haswell-ipc.c too] Signed-off-by: Wenkai Du <wenkai.du@intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-22ASoC: Intel: Fix audio crash due to negative address offsetWenkai Du1-1/+1
There were occasional ADSP crash during reboot testing: [ 11.883364] BUG: unable to handle kernel paging request at ffffc90121700000 [ 11.883380] IP: [<ffffffffc024d8bc>] sst_module_insert_fixed_block+0x24f/0x26d [snd_soc_sst_dsp] [ 11.883397] PGD 7800b067 PUD 0 [ 11.883405] Oops: 0002 [#1] SMP [ 11.886418] gsmi: Log Shutdown Reason 0x03 The virtual address, ffffc90121700000, was out of range. The virtual address is calculated by adding LPE base address with an offset: sst_memcpy32(dsp->addr.lpe + data->offset, data->data, data->size); The offset is calculated in sst_byt_parse_module, by subtraction of two virtual addresses dsp->addr.fw_ext and dsp->addr.lpe: block_data.offset = block->ram_offset + (dsp->addr.fw_ext - dsp->addr.lpe); These virtual addresses are assigned by kernel from ioremap: sst->addr.lpe = ioremap(pdata->lpe_base, pdata->lpe_size); sst->addr.fw_ext = ioremap(pdata->fw_base, pdata->fw_size); In current driver code, offset is defined as unsigned int32: struct sst_module_data { ... u32 offset; /* offset in FW file */ }; Most of the time kernel assigned virtual addresses with addr.fw_ext greater than addr.lpe. But sometimes it was the other way round. Fix the problem by declaring offset as signed int32_t. Signed-off-by: Wenkai Du <wenkai.du@intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18ASoC: Intel: Fix incorrect sizeof() in sst_hsw_stream_get_volume()Christian Engelmayer1-1/+2
Fix an incorrect sizeof() usage in sst_hsw_stream_get_volume(). sst_dsp_read() is called to read into a variable of type u32, but is passed sizeof(u32 *) for argument 'size_t bytes'. Detected by Coverity: CID 1195260. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18ASoC: Intel: some incorrect sizeof() usagesDan Carpenter1-2/+2
The intent was to say "sizeof(*pos)" and not "sizeof(pos)". The sizeof(*pos) is 8 bytes so the bug won't show up on 64 bit systems. The sizeof(*dx) is 172 bytes so that will be a bugfix. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-15ASoC: Intel: Fix a self assignment in sst_mem_block_alloc_scratch()Christian Engelmayer1-3/+1
Remove a self assignment in sst_mem_block_alloc_scratch(). When calculating buffer sizes there is no need for statements without effect. Detected by Coverity: CID 1195249. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-15ASoC: Intel: Fix incorrect sizeof() in sst_hsw_stream_get_volume()Christian Engelmayer1-1/+2
Fix an incorrect sizeof() usage in sst_hsw_stream_get_volume(). sst_dsp_read() is called to read into a variable of type u32, but is passed sizeof(u32 *) for argument 'size_t bytes'. Detected by Coverity: CID 1195260. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-13Linux 3.15-rc1v3.15-rc1Linus Torvalds1-2/+2
2014-04-13mm: Initialize error in shmem_file_aio_read()Geert Uytterhoeven1-1/+1
Some versions of gcc even warn about it: mm/shmem.c: In function ‘shmem_file_aio_read’: mm/shmem.c:1414: warning: ‘error’ may be used uninitialized in this function If the loop is aborted during the first iteration by one of the two first break statements, error will be uninitialized. Introduced by commit 6e58e79db8a1 ("introduce copy_page_to_iter, kill loop over iovec in generic_file_aio_read()"). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-13cifs: Use min_t() when comparing "size_t" and "unsigned long"Geert Uytterhoeven1-1/+1
On 32 bit, size_t is "unsigned int", not "unsigned long", causing the following warning when comparing with PAGE_SIZE, which is always "unsigned long": fs/cifs/file.c: In function ‘cifs_readdata_to_iov’: fs/cifs/file.c:2757: warning: comparison of distinct pointer types lacks a cast Introduced by commit 7f25bba819a3 ("cifs_iovec_read: keep iov_iter between the calls of cifs_readdata_to_iov()"), which changed the signedness of "remaining" and the code from min_t() to min(). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-13Merge branch 'slab/next' of ↵Linus Torvalds5-84/+128
git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux Pull slab changes from Pekka Enberg: "The biggest change is byte-sized freelist indices which reduces slab freelist memory usage: https://lkml.org/lkml/2013/12/2/64" * 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux: mm: slab/slub: use page->list consistently instead of page->lru mm/slab.c: cleanup outdated comments and unify variables naming slab: fix wrongly used macro slub: fix high order page allocation problem with __GFP_NOFAIL slab: Make allocations with GFP_ZERO slightly more efficient slab: make more slab management structure off the slab slab: introduce byte sized index for the freelist of a slab slab: restrict the number of objects in a slab slab: introduce helper functions to get/set free object slab: factor out calculate nr objects in cache_estimate
2014-04-12Merge branch 'misc' of ↵Linus Torvalds6-120/+196
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull misc kbuild changes from Michal Marek: "Here is the non-critical part of kbuild: - One bogus coccinelle check removed, one check fixed not to suggest the obsolete PTR_RET macro - scripts/tags.sh does not index the generated *.mod.c files - new objdiff tool to list differences between two versions of an object file - A fix for scripts/bootgraph.pl" * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: scripts/coccinelle: Use PTR_ERR_OR_ZERO scripts/bootgraph.pl: Add graphic header scripts: objdiff: detect object code changes between two commits Coccicheck: Remove memcpy to struct assignment test scripts/tags.sh: Ignore *.mod.c
2014-04-12sym53c8xx_2: Set DID_REQUEUE return code when aborting squeueMikulas Patocka1-0/+4
This patch fixes I/O errors with the sym53c8xx_2 driver when the disk returns QUEUE FULL status. When the controller encounters an error (including QUEUE FULL or BUSY status), it aborts all not yet submitted requests in the function sym_dequeue_from_squeue. This function aborts them with DID_SOFT_ERROR. If the disk has full tag queue, the request that caused the overflow is aborted with QUEUE FULL status (and the scsi midlayer properly retries it until it is accepted by the disk), but the sym53c8xx_2 driver aborts the following requests with DID_SOFT_ERROR --- for them, the midlayer does just a few retries and then signals the error up to sd. The result is that disk returning QUEUE FULL causes request failures. The error was reproduced on 53c895 with COMPAQ BD03685A24 disk (rebranded ST336607LC) with command queue 48 or 64 tags. The disk has 64 tags, but under some access patterns it return QUEUE FULL when there are less than 64 pending tags. The SCSI specification allows returning QUEUE FULL anytime and it is up to the host to retry. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: Matthew Wilcox <matthew@wil.cx> Cc: James Bottomley <JBottomley@Parallels.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>