This is the 4.9.238 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl92IrYACgkQONu9yGCS aT6rKw//XUQo2gUBArRiFngKRL2sexHJkfQ44Q1UFBDC68dUUqgJpMFJq7hOFGFI tj2Jz0Jfps7gNshmZ7DDTJx3nTHIqRQL8Z/6FnVZ54gmUf+LlXDdbEaFTSx5n6Mj 7TvbijAtpW2uBPfvSDE+0o9mq+dOzqFtsaL2snJrYYf0Um8dXIWFfQAs+vemS8dv 7dVQOO9bB5xbNcq/1yqrWQwcux5q86D/U6dSTHPukQ5SjvGcH/0tVb9VYz9UOcZX 6PHBws9j3dvjShkEEEM3tBcQ7bNBRRyLrG+nALv9A0QSbZJKjw9G4Qa2tkWxD+uI 95WXhuqxyAFCDIy8ZE9QiuYhntdM3p5l4wY5bGKaPhFBSNMvyEFawBECJKNcvFNx QJ3KS2KPm38RgmZC2QuPW69WMM7uWliw3kTOmeJf+xgS6LVBBsSTukL14/PmIvoC sq9Y5M7xZDEkbakncEc+bIvIcNYfe/MJYpQSZhz4kl9xaFIaILaDYrGMIZxoBT6E C1JFwtJhJAJCwj7jgEo1cg9Ck/v7Y/Zk8ezcNR7XhjGigMrITG20hcDZNLfmsdij HiroGlmCaseOVCdYV6+0AyjW6+PUsBHjuzTdC9LdK2bkOu0+eeSyfY18CcWMmzsU 3V52Vkkc+SsUqWQyVAxP2gXElhMkAXbdl0HvtJkKRrWiEqXNQ6k= =n+/5 -----END PGP SIGNATURE----- Merge 4.9.238 into android-4.9-q Changes in 4.9.238 af_key: pfkey_dump needs parameter validation KVM: fix memory leak in kvm_io_bus_unregister_dev() kprobes: fix kill kprobe which has been marked as gone RDMA/ucma: ucma_context reference leak in error path mtd: Fix comparison in map_word_andequal() hdlc_ppp: add range checks in ppp_cp_parse_cr() ip: fix tos reflection in ack and reset packets tipc: use skb_unshare() instead in tipc_buf_append() bnxt_en: Protect bnxt_set_eee() and bnxt_set_pauseparam() with mutex. net: phy: Avoid NPD upon phy_detach() when driver is unbound net/hsr: Check skb_put_padto() return value net: add __must_check to skb_put_padto() serial: 8250: Avoid error message on reprobe scsi: aacraid: fix illegal IO beyond last LBA m68k: q40: Fix info-leak in rtc_ioctl gma/gma500: fix a memory disclosure bug due to uninitialized bytes ASoC: kirkwood: fix IRQ error handling ALSA: usb-audio: Add delay quirk for H570e USB headsets PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out clk/ti/adpll: allocate room for terminating null mtd: cfi_cmdset_0002: don't free cfi->cfiq in error path of cfi_amdstd_setup() mfd: mfd-core: Protect against NULL call-back function pointer tracing: Adding NULL checks for trace_array descriptor pointer bcache: fix a lost wake-up problem caused by mca_cannibalize_lock RDMA/i40iw: Fix potential use after free xfs: fix attr leaf header freemap.size underflow RDMA/iw_cgxb4: Fix an error handling path in 'c4iw_connect()' debugfs: Fix !DEBUG_FS debugfs_create_automount CIFS: Properly process SMB3 lease breaks kernel/sys.c: avoid copying possible padding bytes in copy_to_user neigh_stat_seq_next() should increase position index rt_cpu_seq_next should increase position index seqlock: Require WRITE_ONCE surrounding raw_seqcount_barrier media: ti-vpe: cal: Restrict DMA to avoid memory corruption ACPI: EC: Reference count query handlers under lock dmaengine: zynqmp_dma: fix burst length configuration tracing: Set kernel_stack's caller size properly ar5523: Add USB ID of SMCWUSBT-G2 wireless adapter Bluetooth: Fix refcount use-after-free issue mm: pagewalk: fix termination condition in walk_pte_range() Bluetooth: prefetch channel before killing sock KVM: fix overflow of zero page refcount with ksm running ALSA: hda: Clear RIRB status before reading WP skbuff: fix a data race in skb_queue_len() audit: CONFIG_CHANGE don't log internal bookkeeping as an event selinux: sel_avc_get_stat_idx should increase position index scsi: lpfc: Fix RQ buffer leakage when no IOCBs available scsi: lpfc: Fix coverity errors in fmdi attribute handling drm/omap: fix possible object reference leak RDMA/rxe: Fix configuration of atomic queue pair attributes KVM: x86: fix incorrect comparison in trace event x86/pkeys: Add check for pkey "overflow" bpf: Remove recursion prevention from rcu free callback dmaengine: tegra-apb: Prevent race conditions on channel's freeing media: go7007: Fix URB type for interrupt handling Bluetooth: guard against controllers sending zero'd events timekeeping: Prevent 32bit truncation in scale64_check_overflow() drm/amdgpu: increase atombios cmd timeout Bluetooth: L2CAP: handle l2cap config request during open state media: tda10071: fix unsigned sign extension overflow xfs: don't ever return a stale pointer from __xfs_dir3_free_read tpm: ibmvtpm: Wait for buffer to be set before proceeding tracing: Use address-of operator on section symbols serial: 8250_port: Don't service RX FIFO if throttled serial: 8250_omap: Fix sleeping function called from invalid context during probe serial: 8250: 8250_omap: Terminate DMA before pushing data on RX timeout cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_work_fn tools: gpio-hammer: Avoid potential overflow in main SUNRPC: Fix a potential buffer overflow in 'svc_print_xprts()' svcrdma: Fix leak of transport addresses ubifs: Fix out-of-bounds memory access caused by abnormal value of node_len ALSA: usb-audio: Fix case when USB MIDI interface has more than one extra endpoint descriptor mm/filemap.c: clear page error before actual read mm/mmap.c: initialize align_offset explicitly for vm_unmapped_area KVM: Remove CREATE_IRQCHIP/SET_PIT2 race bdev: Reduce time holding bd_mutex in sync in blkdev_close() drivers: char: tlclk.c: Avoid data race between init and interrupt handler dt-bindings: sound: wm8994: Correct required supplies based on actual implementaion atm: fix a memory leak of vcc->user_back phy: samsung: s5pv210-usb2: Add delay after reset Bluetooth: Handle Inquiry Cancel error after Inquiry Complete USB: EHCI: ehci-mv: fix error handling in mv_ehci_probe() tty: serial: samsung: Correct clock selection logic ALSA: hda: Fix potential race in unsol event handler fuse: don't check refcount after stealing page USB: EHCI: ehci-mv: fix less than zero comparison of an unsigned int e1000: Do not perform reset in reset_task if we are already down printk: handle blank console arguments passed in. btrfs: don't force read-only after error in drop snapshot vfio/pci: fix memory leaks of eventfd ctx perf util: Fix memory leak of prefix_if_not_in perf kcore_copy: Fix module map when there are no modules loaded mtd: rawnand: omap_elm: Fix runtime PM imbalance on error ceph: fix potential race in ceph_check_caps mtd: parser: cmdline: Support MTD names containing one or more colons x86/speculation/mds: Mark mds_user_clear_cpu_buffers() __always_inline vfio/pci: Clear error and request eventfd ctx after releasing cifs: Fix double add page to memcg when cifs_readpages selftests/x86/syscall_nt: Clear weird flags after each test vfio/pci: fix racy on error and request eventfd ctx s390/init: add missing __init annotations i2c: core: Call i2c_acpi_install_space_handler() before i2c_acpi_register_devices() objtool: Fix noreturn detection for ignored functions ieee802154/adf7242: check status of adf7242_read_reg clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init() mwifiex: Increase AES key storage size to 256 bits batman-adv: bla: fix type misuse for backbone_gw hash indexing atm: eni: fix the missed pci_disable_device() for eni_init_one() batman-adv: mcast/TT: fix wrongly dropped or rerouted packets mac802154: tx: fix use-after-free batman-adv: Add missing include for in_interrupt() batman-adv: mcast: fix duplicate mcast packets in BLA backbone from mesh ALSA: asihpi: fix iounmap in error handler MIPS: Add the missing 'CPU_1074K' into __get_cpu_type() kprobes: Fix to check probe enabled before disarm_kprobe_ftrace() lib/string.c: implement stpcpy ata: define AC_ERR_OK ata: make qc_prep return ata_completion_errors ata: sata_mv, avoid trigerrable BUG_ON Linux 4.9.238 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I799877db3bc49e473bbc023ab948cd241755beff
This commit is contained in:
commit
495d499ce7
139 changed files with 894 additions and 463 deletions
|
|
@ -324,7 +324,7 @@ Many legacy IDE drivers use ata_bmdma_status() as the bmdma_status() hook.
|
|||
|
||||
<sect2><title>High-level taskfile hooks</title>
|
||||
<programlisting>
|
||||
void (*qc_prep) (struct ata_queued_cmd *qc);
|
||||
enum ata_completion_errors (*qc_prep) (struct ata_queued_cmd *qc);
|
||||
int (*qc_issue) (struct ata_queued_cmd *qc);
|
||||
</programlisting>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,15 @@ Required properties:
|
|||
- #gpio-cells : Must be 2. The first cell is the pin number and the
|
||||
second cell is used to specify optional parameters (currently unused).
|
||||
|
||||
- AVDD2-supply, DBVDD1-supply, DBVDD2-supply, DBVDD3-supply, CPVDD-supply,
|
||||
SPKVDD1-supply, SPKVDD2-supply : power supplies for the device, as covered
|
||||
in Documentation/devicetree/bindings/regulator/regulator.txt
|
||||
- power supplies for the device, as covered in
|
||||
Documentation/devicetree/bindings/regulator/regulator.txt, depending
|
||||
on compatible:
|
||||
- for wlf,wm1811 and wlf,wm8958:
|
||||
AVDD1-supply, AVDD2-supply, DBVDD1-supply, DBVDD2-supply, DBVDD3-supply,
|
||||
DCVDD-supply, CPVDD-supply, SPKVDD1-supply, SPKVDD2-supply
|
||||
- for wlf,wm8994:
|
||||
AVDD1-supply, AVDD2-supply, DBVDD-supply, DCVDD-supply, CPVDD-supply,
|
||||
SPKVDD1-supply, SPKVDD2-supply
|
||||
|
||||
Optional properties:
|
||||
|
||||
|
|
@ -68,11 +74,11 @@ codec: wm8994@1a {
|
|||
|
||||
lineout1-se;
|
||||
|
||||
AVDD1-supply = <®ulator>;
|
||||
AVDD2-supply = <®ulator>;
|
||||
CPVDD-supply = <®ulator>;
|
||||
DBVDD1-supply = <®ulator>;
|
||||
DBVDD2-supply = <®ulator>;
|
||||
DBVDD3-supply = <®ulator>;
|
||||
DBVDD-supply = <®ulator>;
|
||||
DCVDD-supply = <®ulator>;
|
||||
SPKVDD1-supply = <®ulator>;
|
||||
SPKVDD2-supply = <®ulator>;
|
||||
};
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -1,6 +1,6 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 237
|
||||
SUBLEVEL = 238
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
|
|
|||
|
|
@ -303,6 +303,7 @@ static int q40_get_rtc_pll(struct rtc_pll_info *pll)
|
|||
{
|
||||
int tmp = Q40_RTC_CTRL;
|
||||
|
||||
pll->pll_ctrl = 0;
|
||||
pll->pll_value = tmp & Q40_RTC_PLL_MASK;
|
||||
if (tmp & Q40_RTC_PLL_SIGN)
|
||||
pll->pll_value = -pll->pll_value;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ static inline int __pure __get_cpu_type(const int cpu_type)
|
|||
case CPU_34K:
|
||||
case CPU_1004K:
|
||||
case CPU_74K:
|
||||
case CPU_1074K:
|
||||
case CPU_M14KC:
|
||||
case CPU_M14KEC:
|
||||
case CPU_INTERAPTIV:
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ static struct notifier_block kdump_mem_nb = {
|
|||
/*
|
||||
* Make sure that the area behind memory_end is protected
|
||||
*/
|
||||
static void reserve_memory_end(void)
|
||||
static void __init reserve_memory_end(void)
|
||||
{
|
||||
#ifdef CONFIG_CRASH_DUMP
|
||||
if (ipl_info.type == IPL_TYPE_FCP_DUMP &&
|
||||
|
|
@ -547,7 +547,7 @@ static void reserve_memory_end(void)
|
|||
/*
|
||||
* Make sure that oldmem, where the dump is stored, is protected
|
||||
*/
|
||||
static void reserve_oldmem(void)
|
||||
static void __init reserve_oldmem(void)
|
||||
{
|
||||
#ifdef CONFIG_CRASH_DUMP
|
||||
if (OLDMEM_BASE)
|
||||
|
|
@ -559,7 +559,7 @@ static void reserve_oldmem(void)
|
|||
/*
|
||||
* Make sure that oldmem, where the dump is stored, is protected
|
||||
*/
|
||||
static void remove_oldmem(void)
|
||||
static void __init remove_oldmem(void)
|
||||
{
|
||||
#ifdef CONFIG_CRASH_DUMP
|
||||
if (OLDMEM_BASE)
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ DECLARE_STATIC_KEY_FALSE(mds_idle_clear);
|
|||
* combination with microcode which triggers a CPU buffer flush when the
|
||||
* instruction is executed.
|
||||
*/
|
||||
static inline void mds_clear_cpu_buffers(void)
|
||||
static __always_inline void mds_clear_cpu_buffers(void)
|
||||
{
|
||||
static const u16 ds = __KERNEL_DS;
|
||||
|
||||
|
|
@ -342,7 +342,7 @@ static inline void mds_clear_cpu_buffers(void)
|
|||
*
|
||||
* Clear CPU buffers if the corresponding static key is enabled
|
||||
*/
|
||||
static inline void mds_user_clear_cpu_buffers(void)
|
||||
static __always_inline void mds_user_clear_cpu_buffers(void)
|
||||
{
|
||||
if (static_branch_likely(&mds_user_clear))
|
||||
mds_clear_cpu_buffers();
|
||||
|
|
|
|||
|
|
@ -3,6 +3,11 @@
|
|||
|
||||
#define ARCH_DEFAULT_PKEY 0
|
||||
|
||||
/*
|
||||
* If more than 16 keys are ever supported, a thorough audit
|
||||
* will be necessary to ensure that the types that store key
|
||||
* numbers and masks have sufficient capacity.
|
||||
*/
|
||||
#define arch_max_pkey() (boot_cpu_has(X86_FEATURE_OSPKE) ? 16 : 1)
|
||||
|
||||
extern int arch_set_user_pkey_access(struct task_struct *tsk, int pkey,
|
||||
|
|
|
|||
|
|
@ -871,8 +871,6 @@ const void *get_xsave_field_ptr(int xsave_state)
|
|||
|
||||
#ifdef CONFIG_ARCH_HAS_PKEYS
|
||||
|
||||
#define NR_VALID_PKRU_BITS (CONFIG_NR_PROTECTION_KEYS * 2)
|
||||
#define PKRU_VALID_MASK (NR_VALID_PKRU_BITS - 1)
|
||||
/*
|
||||
* This will go out and modify PKRU register to set the access
|
||||
* rights for @pkey to @init_val.
|
||||
|
|
@ -891,6 +889,13 @@ int arch_set_user_pkey_access(struct task_struct *tsk, int pkey,
|
|||
if (!boot_cpu_has(X86_FEATURE_OSPKE))
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* This code should only be called with valid 'pkey'
|
||||
* values originating from in-kernel users. Complain
|
||||
* if a bad value is observed.
|
||||
*/
|
||||
WARN_ON_ONCE(pkey >= arch_max_pkey());
|
||||
|
||||
/* Set the bits we need in PKRU: */
|
||||
if (init_val & PKEY_DISABLE_ACCESS)
|
||||
new_pkru_bits |= PKRU_AD_BIT;
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ TRACE_EVENT(
|
|||
/* These depend on page entry type, so compute them now. */
|
||||
__field(bool, r)
|
||||
__field(bool, x)
|
||||
__field(u8, u)
|
||||
__field(signed char, u)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
|
|
|
|||
|
|
@ -4263,10 +4263,13 @@ long kvm_arch_vm_ioctl(struct file *filp,
|
|||
r = -EFAULT;
|
||||
if (copy_from_user(&u.ps, argp, sizeof u.ps))
|
||||
goto out;
|
||||
mutex_lock(&kvm->lock);
|
||||
r = -ENXIO;
|
||||
if (!kvm->arch.vpit)
|
||||
goto out;
|
||||
goto set_pit_out;
|
||||
r = kvm_vm_ioctl_set_pit(kvm, &u.ps);
|
||||
set_pit_out:
|
||||
mutex_unlock(&kvm->lock);
|
||||
break;
|
||||
}
|
||||
case KVM_GET_PIT2: {
|
||||
|
|
@ -4286,10 +4289,13 @@ long kvm_arch_vm_ioctl(struct file *filp,
|
|||
r = -EFAULT;
|
||||
if (copy_from_user(&u.ps2, argp, sizeof(u.ps2)))
|
||||
goto out;
|
||||
mutex_lock(&kvm->lock);
|
||||
r = -ENXIO;
|
||||
if (!kvm->arch.vpit)
|
||||
goto out;
|
||||
goto set_pit2_out;
|
||||
r = kvm_vm_ioctl_set_pit2(kvm, &u.ps2);
|
||||
set_pit2_out:
|
||||
mutex_unlock(&kvm->lock);
|
||||
break;
|
||||
}
|
||||
case KVM_REINJECT_CONTROL: {
|
||||
|
|
|
|||
|
|
@ -1049,29 +1049,21 @@ void acpi_ec_unblock_transactions(void)
|
|||
/* --------------------------------------------------------------------------
|
||||
Event Management
|
||||
-------------------------------------------------------------------------- */
|
||||
static struct acpi_ec_query_handler *
|
||||
acpi_ec_get_query_handler(struct acpi_ec_query_handler *handler)
|
||||
{
|
||||
if (handler)
|
||||
kref_get(&handler->kref);
|
||||
return handler;
|
||||
}
|
||||
|
||||
static struct acpi_ec_query_handler *
|
||||
acpi_ec_get_query_handler_by_value(struct acpi_ec *ec, u8 value)
|
||||
{
|
||||
struct acpi_ec_query_handler *handler;
|
||||
bool found = false;
|
||||
|
||||
mutex_lock(&ec->mutex);
|
||||
list_for_each_entry(handler, &ec->list, node) {
|
||||
if (value == handler->query_bit) {
|
||||
found = true;
|
||||
break;
|
||||
kref_get(&handler->kref);
|
||||
mutex_unlock(&ec->mutex);
|
||||
return handler;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&ec->mutex);
|
||||
return found ? acpi_ec_get_query_handler(handler) : NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void acpi_ec_query_handler_release(struct kref *kref)
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ struct acard_sg {
|
|||
__le32 size; /* bit 31 (EOT) max==0x10000 (64k) */
|
||||
};
|
||||
|
||||
static void acard_ahci_qc_prep(struct ata_queued_cmd *qc);
|
||||
static enum ata_completion_errors acard_ahci_qc_prep(struct ata_queued_cmd *qc);
|
||||
static bool acard_ahci_qc_fill_rtf(struct ata_queued_cmd *qc);
|
||||
static int acard_ahci_port_start(struct ata_port *ap);
|
||||
static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
|
||||
|
|
@ -257,7 +257,7 @@ static unsigned int acard_ahci_fill_sg(struct ata_queued_cmd *qc, void *cmd_tbl)
|
|||
return si;
|
||||
}
|
||||
|
||||
static void acard_ahci_qc_prep(struct ata_queued_cmd *qc)
|
||||
static enum ata_completion_errors acard_ahci_qc_prep(struct ata_queued_cmd *qc)
|
||||
{
|
||||
struct ata_port *ap = qc->ap;
|
||||
struct ahci_port_priv *pp = ap->private_data;
|
||||
|
|
@ -295,6 +295,8 @@ static void acard_ahci_qc_prep(struct ata_queued_cmd *qc)
|
|||
opts |= AHCI_CMD_ATAPI | AHCI_CMD_PREFETCH;
|
||||
|
||||
ahci_fill_cmd_slot(pp, qc->tag, opts);
|
||||
|
||||
return AC_ERR_OK;
|
||||
}
|
||||
|
||||
static bool acard_ahci_qc_fill_rtf(struct ata_queued_cmd *qc)
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ static int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
|
|||
static bool ahci_qc_fill_rtf(struct ata_queued_cmd *qc);
|
||||
static int ahci_port_start(struct ata_port *ap);
|
||||
static void ahci_port_stop(struct ata_port *ap);
|
||||
static void ahci_qc_prep(struct ata_queued_cmd *qc);
|
||||
static enum ata_completion_errors ahci_qc_prep(struct ata_queued_cmd *qc);
|
||||
static int ahci_pmp_qc_defer(struct ata_queued_cmd *qc);
|
||||
static void ahci_freeze(struct ata_port *ap);
|
||||
static void ahci_thaw(struct ata_port *ap);
|
||||
|
|
@ -1607,7 +1607,7 @@ static int ahci_pmp_qc_defer(struct ata_queued_cmd *qc)
|
|||
return sata_pmp_qc_defer_cmd_switch(qc);
|
||||
}
|
||||
|
||||
static void ahci_qc_prep(struct ata_queued_cmd *qc)
|
||||
static enum ata_completion_errors ahci_qc_prep(struct ata_queued_cmd *qc)
|
||||
{
|
||||
struct ata_port *ap = qc->ap;
|
||||
struct ahci_port_priv *pp = ap->private_data;
|
||||
|
|
@ -1643,6 +1643,8 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc)
|
|||
opts |= AHCI_CMD_ATAPI | AHCI_CMD_PREFETCH;
|
||||
|
||||
ahci_fill_cmd_slot(pp, qc->tag, opts);
|
||||
|
||||
return AC_ERR_OK;
|
||||
}
|
||||
|
||||
static void ahci_fbs_dec_intr(struct ata_port *ap)
|
||||
|
|
|
|||
|
|
@ -4895,7 +4895,10 @@ int ata_std_qc_defer(struct ata_queued_cmd *qc)
|
|||
return ATA_DEFER_LINK;
|
||||
}
|
||||
|
||||
void ata_noop_qc_prep(struct ata_queued_cmd *qc) { }
|
||||
enum ata_completion_errors ata_noop_qc_prep(struct ata_queued_cmd *qc)
|
||||
{
|
||||
return AC_ERR_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* ata_sg_init - Associate command with scatter-gather table.
|
||||
|
|
@ -5313,7 +5316,9 @@ void ata_qc_issue(struct ata_queued_cmd *qc)
|
|||
return;
|
||||
}
|
||||
|
||||
ap->ops->qc_prep(qc);
|
||||
qc->err_mask |= ap->ops->qc_prep(qc);
|
||||
if (unlikely(qc->err_mask))
|
||||
goto err;
|
||||
trace_ata_qc_issue(qc);
|
||||
qc->err_mask |= ap->ops->qc_issue(qc);
|
||||
if (unlikely(qc->err_mask))
|
||||
|
|
|
|||
|
|
@ -2742,12 +2742,14 @@ static void ata_bmdma_fill_sg_dumb(struct ata_queued_cmd *qc)
|
|||
* LOCKING:
|
||||
* spin_lock_irqsave(host lock)
|
||||
*/
|
||||
void ata_bmdma_qc_prep(struct ata_queued_cmd *qc)
|
||||
enum ata_completion_errors ata_bmdma_qc_prep(struct ata_queued_cmd *qc)
|
||||
{
|
||||
if (!(qc->flags & ATA_QCFLAG_DMAMAP))
|
||||
return;
|
||||
return AC_ERR_OK;
|
||||
|
||||
ata_bmdma_fill_sg(qc);
|
||||
|
||||
return AC_ERR_OK;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ata_bmdma_qc_prep);
|
||||
|
||||
|
|
@ -2760,12 +2762,14 @@ EXPORT_SYMBOL_GPL(ata_bmdma_qc_prep);
|
|||
* LOCKING:
|
||||
* spin_lock_irqsave(host lock)
|
||||
*/
|
||||
void ata_bmdma_dumb_qc_prep(struct ata_queued_cmd *qc)
|
||||
enum ata_completion_errors ata_bmdma_dumb_qc_prep(struct ata_queued_cmd *qc)
|
||||
{
|
||||
if (!(qc->flags & ATA_QCFLAG_DMAMAP))
|
||||
return;
|
||||
return AC_ERR_OK;
|
||||
|
||||
ata_bmdma_fill_sg_dumb(qc);
|
||||
|
||||
return AC_ERR_OK;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ata_bmdma_dumb_qc_prep);
|
||||
|
||||
|
|
|
|||
|
|
@ -507,7 +507,7 @@ static int pata_macio_cable_detect(struct ata_port *ap)
|
|||
return ATA_CBL_PATA40;
|
||||
}
|
||||
|
||||
static void pata_macio_qc_prep(struct ata_queued_cmd *qc)
|
||||
static enum ata_completion_errors pata_macio_qc_prep(struct ata_queued_cmd *qc)
|
||||
{
|
||||
unsigned int write = (qc->tf.flags & ATA_TFLAG_WRITE);
|
||||
struct ata_port *ap = qc->ap;
|
||||
|
|
@ -520,7 +520,7 @@ static void pata_macio_qc_prep(struct ata_queued_cmd *qc)
|
|||
__func__, qc, qc->flags, write, qc->dev->devno);
|
||||
|
||||
if (!(qc->flags & ATA_QCFLAG_DMAMAP))
|
||||
return;
|
||||
return AC_ERR_OK;
|
||||
|
||||
table = (struct dbdma_cmd *) priv->dma_table_cpu;
|
||||
|
||||
|
|
@ -565,6 +565,8 @@ static void pata_macio_qc_prep(struct ata_queued_cmd *qc)
|
|||
table->command = cpu_to_le16(DBDMA_STOP);
|
||||
|
||||
dev_dbgdma(priv->dev, "%s: %d DMA list entries\n", __func__, pi);
|
||||
|
||||
return AC_ERR_OK;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -59,25 +59,27 @@ static void pxa_ata_dma_irq(void *d)
|
|||
/*
|
||||
* Prepare taskfile for submission.
|
||||
*/
|
||||
static void pxa_qc_prep(struct ata_queued_cmd *qc)
|
||||
static enum ata_completion_errors pxa_qc_prep(struct ata_queued_cmd *qc)
|
||||
{
|
||||
struct pata_pxa_data *pd = qc->ap->private_data;
|
||||
struct dma_async_tx_descriptor *tx;
|
||||
enum dma_transfer_direction dir;
|
||||
|
||||
if (!(qc->flags & ATA_QCFLAG_DMAMAP))
|
||||
return;
|
||||
return AC_ERR_OK;
|
||||
|
||||
dir = (qc->dma_dir == DMA_TO_DEVICE ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM);
|
||||
tx = dmaengine_prep_slave_sg(pd->dma_chan, qc->sg, qc->n_elem, dir,
|
||||
DMA_PREP_INTERRUPT);
|
||||
if (!tx) {
|
||||
ata_dev_err(qc->dev, "prep_slave_sg() failed\n");
|
||||
return;
|
||||
return AC_ERR_OK;
|
||||
}
|
||||
tx->callback = pxa_ata_dma_irq;
|
||||
tx->callback_param = pd;
|
||||
pd->dma_cookie = dmaengine_submit(tx);
|
||||
|
||||
return AC_ERR_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ static int adma_ata_init_one(struct pci_dev *pdev,
|
|||
const struct pci_device_id *ent);
|
||||
static int adma_port_start(struct ata_port *ap);
|
||||
static void adma_port_stop(struct ata_port *ap);
|
||||
static void adma_qc_prep(struct ata_queued_cmd *qc);
|
||||
static enum ata_completion_errors adma_qc_prep(struct ata_queued_cmd *qc);
|
||||
static unsigned int adma_qc_issue(struct ata_queued_cmd *qc);
|
||||
static int adma_check_atapi_dma(struct ata_queued_cmd *qc);
|
||||
static void adma_freeze(struct ata_port *ap);
|
||||
|
|
@ -311,7 +311,7 @@ static int adma_fill_sg(struct ata_queued_cmd *qc)
|
|||
return i;
|
||||
}
|
||||
|
||||
static void adma_qc_prep(struct ata_queued_cmd *qc)
|
||||
static enum ata_completion_errors adma_qc_prep(struct ata_queued_cmd *qc)
|
||||
{
|
||||
struct adma_port_priv *pp = qc->ap->private_data;
|
||||
u8 *buf = pp->pkt;
|
||||
|
|
@ -322,7 +322,7 @@ static void adma_qc_prep(struct ata_queued_cmd *qc)
|
|||
|
||||
adma_enter_reg_mode(qc->ap);
|
||||
if (qc->tf.protocol != ATA_PROT_DMA)
|
||||
return;
|
||||
return AC_ERR_OK;
|
||||
|
||||
buf[i++] = 0; /* Response flags */
|
||||
buf[i++] = 0; /* reserved */
|
||||
|
|
@ -387,6 +387,7 @@ static void adma_qc_prep(struct ata_queued_cmd *qc)
|
|||
printk("%s\n", obuf);
|
||||
}
|
||||
#endif
|
||||
return AC_ERR_OK;
|
||||
}
|
||||
|
||||
static inline void adma_packet_start(struct ata_queued_cmd *qc)
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc,
|
|||
return num_prde;
|
||||
}
|
||||
|
||||
static void sata_fsl_qc_prep(struct ata_queued_cmd *qc)
|
||||
static enum ata_completion_errors sata_fsl_qc_prep(struct ata_queued_cmd *qc)
|
||||
{
|
||||
struct ata_port *ap = qc->ap;
|
||||
struct sata_fsl_port_priv *pp = ap->private_data;
|
||||
|
|
@ -559,6 +559,8 @@ static void sata_fsl_qc_prep(struct ata_queued_cmd *qc)
|
|||
|
||||
VPRINTK("SATA FSL : xx_qc_prep, di = 0x%x, ttl = %d, num_prde = %d\n",
|
||||
desc_info, ttl_dwords, num_prde);
|
||||
|
||||
return AC_ERR_OK;
|
||||
}
|
||||
|
||||
static unsigned int sata_fsl_qc_issue(struct ata_queued_cmd *qc)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue