/***********************************************************************/ /** AudioScience HPI driver Copyright (C) 1997-2011 AudioScience Inc. This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation; This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA \file Functions for reading DSP code to load into DSP */ /***********************************************************************/ #ifndef _HPIDSPCD_H_ #define _HPIDSPCD_H_ #include "hpi_internal.h" /** Header structure for dsp firmware file This structure must match that used in s2bin.c for generation of asidsp.bin */ /*#ifndef DISABLE_PRAGMA_PACK1 */ /*#pragma pack(push, 1) */ /*#endif */ struct code_header { /** Size in bytes including header */ u32 size; /** File type tag "CODE" == 0x45444F43 */ u32 type; /** Adapter model number */ u32 adapter; /** Firmware version*/ u32 version; /** Data checksum */ u32 checksum; }; /*#ifndef DISABLE_PRAGMA_PACK1 */ /*#pragma pack(pop) */ /*#endif */ /*? Don't need the pragmas? */ compile_time_assert((sizeof(struct code_header) == 20), code_header_size); /** Descriptor for dspcode from firmware loader */ struct dsp_code { /** copy of file header */ struct code_header header; /** Expected number of words in the whole dsp code,INCL header */ u32 block_length; /** Number of words read so far */ u32 word_count; /** internal state of DSP code reader */ struct dsp_code_private *pvt; }; /** Prepare *psDspCode to refer to the requested adapter's firmware. Code file name is obtained from HpiOs_GetDspCodePath \return 0 for success, or error code if requested code is not available */ short hpi_dsp_code_open( /** Code identifier, usually adapter family */ u32 adapter, void *pci_dev, /** Pointer to DSP code control structure */ struct dsp_code *ps_dsp_code, /** Pointer to dword to receive OS specific error code */ u32 *pos_error_code); /** Close the DSP code file */ void hpi_dsp_code_close(struct dsp_code *ps_dsp_code); /** Rewind to the beginning of the DSP code file (for verify) */ void hpi_dsp_code_rewind(struct dsp_code *ps_dsp_code); /** Read one word from the dsp code file \return 0 for success, or error code if eof, or block length exceeded */ short hpi_dsp_code_read_word(struct dsp_code *ps_dsp_code, /**< DSP code descriptor */ u32 *pword /**< Where to store the read word */ ); /** Get a block of dsp code into an internal buffer, and provide a pointer to that buffer. (If dsp code is already an array in memory, it is referenced, not copied.) \return Error if requested number of words are not available */ short hpi_dsp_code_read_block(size_t words_requested, struct dsp_code *ps_dsp_code, /* Pointer to store (Pointer to code buffer) */ u32 **ppblock); #endif move&id=396bf4cd835e62d70fad4a03a8963e61f19021f2'>aw2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-06 14:16:23 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-06 14:16:23 -0800
commit396bf4cd835e62d70fad4a03a8963e61f19021f2 (patch)
tree79ac8f33554260fea1a8d43e6f8c4c5460115f45 /sound/pci/aw2
parentd5adbfcd5f7bcc6fa58a41c5c5ada0e5c826ce2c (diff)
parent7c2cf1c4615cc2f576d0604406cdf0065f00b83b (diff)
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: - use-after-free in algif_aead - modular aesni regression when pcbc is modular but absent - bug causing IO page faults in ccp - double list add in ccp - NULL pointer dereference in qat (two patches) - panic in chcr - NULL pointer dereference in chcr - out-of-bound access in chcr * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: chcr - Fix key length for RFC4106 crypto: algif_aead - Fix kernel panic on list_del crypto: aesni - Fix failure when pcbc module is absent crypto: ccp - Fix double add when creating new DMA command crypto: ccp - Fix DMA operations when IOMMU is enabled crypto: chcr - Check device is allocated before use crypto: chcr - Fix panic on dma_unmap_sg crypto: qat - zero esram only for DH85x devices crypto: qat - fix bar discovery for c62x
Diffstat (limited to 'sound/pci/aw2')
8/0x4d0 kthread+0x101/0x140 and this patch purely papers over the issue by adding a NULL pointer check and a WARN_ON_ONCE() to avoid the oops that would then generally make the machine unresponsive. Other callers of i915_gem_object_to_ggtt() seem to also check for the returned pointer being NULL and warn about it, so this clearly has happened before in other places. [ Reported it originally to the i915 developers on Jan 8, applying the ugly workaround on my own now after triggering the problem for the second time with no feedback. This is likely to be the same bug reported as https://bugs.freedesktop.org/show_bug.cgi?id=98829 https://bugs.freedesktop.org/show_bug.cgi?id=99134 which has a patch for the underlying problem, but it hasn't gotten to me, so I'm applying the workaround. ] Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Imre Deak <imre.deak@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound/aoa/fabrics/layout.c')