Linux 3.14.64
Greg KH
maintainerI'm announcing the release of the 3.14.64 kernel.
All users of the 3.14 kernel series must upgrade.
The updated 3.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.14.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/mips/kernel/traps.c | 13 - arch/x86/ia32/ia32entry.S | 1 arch/x86/kernel/acpi/sleep.c | 7 drivers/ata/libata-scsi.c | 11 - drivers/edac/edac_mc_sysfs.c | 18 + drivers/gpu/drm/ast/ast_main.c | 2 drivers/infiniband/ulp/isert/ib_isert.c | 19 + drivers/infiniband/ulp/srpt/ib_srpt.c | 9 drivers/iommu/amd_iommu_init.c | 34 ++- drivers/mtd/ubi/upd.c | 2 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 16 + drivers/target/iscsi/iscsi_target.c | 13 + drivers/target/iscsi/iscsi_target_configfs.c | 8 drivers/target/iscsi/iscsi_target_util.c | 4 drivers/target/iscsi/iscsi_target_util.h | 1 drivers/target/loopback/tcm_loop.c | 6 drivers/target/sbp/sbp_target.c | 6 drivers/target/target_core_configfs.c | 4 drivers/target/target_core_device.c | 43 ++++ drivers/target/target_core_file.c | 29 -- drivers/target/target_core_iblock.c | 56 +---- drivers/target/target_core_tmr.c | 150 ++++++++++---- drivers/target/target_core_transport.c | 289 +++++++++++++++++++-------- drivers/target/tcm_fc/tcm_fc.h | 1 drivers/target/tcm_fc/tfc_cmd.c | 5 drivers/target/tcm_fc/tfc_conf.c | 1 drivers/usb/chipidea/otg.c | 2 drivers/usb/gadget/tcm_usb_gadget.c | 6 drivers/usb/serial/cp210x.c | 1 drivers/usb/serial/option.c | 5 drivers/vhost/scsi.c | 6 fs/bio.c | 9 fs/cifs/cifssmb.c | 21 + fs/cifs/smb2pdu.c | 24 +- fs/jffs2/README.Locking | 5 fs/jffs2/build.c | 75 +++++-- fs/jffs2/file.c | 39 +-- fs/jffs2/gc.c | 17 - fs/jffs2/nodelist.h | 6 fs/locks.c | 51 ++-- include/linux/ata.h | 4 include/linux/libata.h | 2 include/target/iscsi/iscsi_transport.h | 1 include/target/target_core_backend.h | 4 include/target/target_core_base.h | 4 include/target/target_core_fabric.h | 1 sound/core/control_compat.c | 90 ++++++-- sound/core/rawmidi_compat.c | 53 ++++ sound/core/seq/oss/seq_oss.c | 2 sound/core/seq/oss/seq_oss_device.h | 1 sound/core/seq/oss/seq_oss_init.c | 17 - sound/core/timer_compat.c | 18 + sound/pci/rme9652/hdsp.c | 4 sound/pci/rme9652/hdspm.c | 16 + 55 files changed, 878 insertions(+), 356 deletions(-)
Alex Leung (1):
target: Fix Task Aborted Status (TAS) handling
Andy Lutomirski (1):
x86/entry/compat: Add missing CLAC to entry_INT80_32
Arnd Bergmann (1):
libata: fix HDIO_GET_32BIT ioctl
Borislav Petkov (1):
EDAC, mc_sysfs: Fix freeing bus' name
Daniele Palmas (1):
USB: serial: option: add support for Telit LE922 PID 0x1045
David Woodhouse (2):
jffs2: Fix page lock / f->sem deadlock Fix directory hardlinks from deleted directories
Greg Kroah-Hartman (1):
Linux 3.14.64
Hannes Reinecke (1):
bio: return EINTR if copying to user space got interrupted
Harvey Hunt (1):
libata: Align ata_device's id on a cacheline
Jeff Layton (1):
locks: fix unlock when fcntl_setlk races with a close
Justin Maggard (1):
cifs: fix out-of-bounds access in lease parsing
Maciej W. Rozycki (1):
MIPS: traps: Fix SIGFPE information leak from do_ov' and do_trap_or_bp'
Mike Christie (1):
target: Fix WRITE_SAME/DISCARD conversion to linux 512b sectors
Nicholas Bellinger (6):
target: Add TFO->abort_task for aborted task resources release
target: Fix LUN_RESET active TMR descriptor handling
target: Fix LUN_RESET active I/O handling for ACK_KREF
target: Fix TAS handling for multi-session se_node_acls
target: Fix remote-port TMR ABORT + se_cmd fabric stop
target: Fix race with SCF_SEND_DELAYED_TAS handling
Pavel Shilovsky (1):
CIFS: Fix SMB2+ interim response processing for read requests
Peter Chen (1):
usb: chipidea: otg: change workqueue ci_otg as freezable
Richard Weinberger (1):
ubi: Fix out of bounds write in volume update code
Suravee Suthikulpanit (1):
iommu/amd: Fix boot warning when device 00:00.0 is not iommu covered
Takashi Iwai (8):
ALSA: ctl: Fix ioctls for X32 ABI
ALSA: rawmidi: Fix ioctls X32 ABI
ALSA: timer: Fix ioctls for X32 ABI
ALSA: seq: oss: Don't drain at closing a client
ALSA: hdspm: Fix wrong boolean ctl value accesses
ALSA: hdsp: Fix wrong boolean ctl value accesses
ALSA: hdspm: Fix zero-division
ALSA: timer: Fix broken compat timer user status ioctl
Thomas Betker (1):
Revert "jffs2: Fix lock acquisition order bug in jffs2_write_begin"
Timothy Pearson (1):
drm/ast: Fix incorrect register check for DRAM width
Todd E Brandt (1):
PM / sleep / x86: Fix crash on graph trace through x86 suspend
Vittorio Alfieri (1):
USB: cp210x: Add ID for Parrot NMEA GPS Flight Recorder
Yegor Yefremov (1):
USB: serial: option: add support for Quectel UC20
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 14 -SUBLEVEL = 63 +SUBLEVEL = 64 EXTRAVERSION = NAME = Remembering Coco
arch/mips/kernel/traps.c +6 -7
@@ -688,15 +688,15 @@ static int simulate_sync(struct pt_regs *regs, unsigned int opcode) asmlinkage void do_ov(struct pt_regs *regs) {enum ctx_state prev_state; -siginfo_t info; +siginfo_t info = { + .si_signo =SIGFPE , + .si_code =FPE_INTOVF , + .si_addr = (void __user *)regs->cp0_epc, + }; prev_state =exception_enter ();die_if_kernel ("Integer overflow" , regs); - info.si_code =FPE_INTOVF ; - info.si_signo =SIGFPE ; - info.si_errno =0 ; - info.si_addr = (void __user *) regs->cp0_epc;force_sig_info (SIGFPE , &info, current);exception_exit (prev_state); }
@@ -797,7 +797,7 @@ out:static void do_trap_or_bp (struct pt_regs *regs,unsigned int code,const char *str) { -siginfo_t info; +siginfo_t info = {0 };char b[40 ];#ifdef CONFIG_KGDB_LOW_LEVEL_TRAP
@@ -825,7 +825,6 @@ static void do_trap_or_bp(struct pt_regs *regs, unsigned int code,else info.si_code =FPE_INTOVF ; info.si_signo =SIGFPE ; - info.si_errno =0 ; info.si_addr = (void __user *) regs->cp0_epc;force_sig_info (SIGFPE , &info, current);break ;
arch/x86/ia32/ia32entry.S +1 -0
@@ -422,6 +422,7 @@ ENTRY(ia32_syscall) /*CFI_REL_OFFSET cs,CS-RIP*/ CFI_REL_OFFSET rip,RIP-RIP PARAVIRT_ADJUST_EXCEPTION_FRAME + ASM_CLAC /* Do this early to minimize exposure */ SWAPGS /* * No need to follow this irqs on/off section: the syscall
arch/x86/kernel/acpi/sleep.c +7 -0
@@ -16,6 +16,7 @@#include <asm/cacheflush.h> #include <asm/realmode.h> +#include <linux/ftrace.h> #include "../../realmode/rm/wakeup.h" #include "sleep.h"
@@ -107,7 +108,13 @@ int x86_acpi_suspend_lowlevel(void) saved_magic =0x123456789abcdef0L ;#endif /* CONFIG_64BIT */ +/* +* Pause/unpause graph tracing around do_suspend_lowlevel as it has +* inconsistent call/return info after it jumps to the wakeup vector. +*/ +pause_graph_tracing ();do_suspend_lowlevel (); +unpause_graph_tracing ();return 0 ; }
drivers/ata/libata-scsi.c +5 -6
@@ -674,19 +674,18 @@ static int ata_ioc32(struct ata_port *ap)int ata_sas_scsi_ioctl (struct ata_port *ap,struct scsi_device *scsidev,int cmd,void __user *arg) { -int val = -EINVAL , rc = -EINVAL ; +unsigned long val; +int rc = -EINVAL ;unsigned long flags;switch (cmd) { -case ATA_IOC_GET_IO32 : +case HDIO_GET_32BIT :spin_lock_irqsave (ap->lock, flags); val =ata_ioc32 (ap);spin_unlock_irqrestore (ap->lock, flags); -if (copy_to_user (arg, &val,1 )) -return -EFAULT ; -return 0 ; +return put_user (val, (unsigned long __user *)arg); -case ATA_IOC_SET_IO32 : +case HDIO_SET_32BIT : val = (unsigned long ) arg; rc =0 ;spin_lock_irqsave (ap->lock, flags);
drivers/edac/edac_mc_sysfs.c +13 -5
@@ -973,21 +973,26 @@ nomem:*/ int edac_create_sysfs_mci_device (struct mem_ctl_info *mci) { +char *name;int i, err;/* * The memory controller needs its own bus, in order to avoid * namespace conflicts at /sys/bus/edac. */ - mci->bus->name =kasprintf (GFP_KERNEL ,"mc%d" , mci->mc_idx); -if (!mci->bus->name) + name =kasprintf (GFP_KERNEL ,"mc%d" , mci->mc_idx); +if (!name)return -ENOMEM ; + mci->bus->name = name; +edac_dbg (0 ,"creating bus %s\n" , mci->bus->name); err =bus_register (mci->bus); -if (err <0 ) +if (err <0 ) { +kfree (name);return err; + }/* get the /sys/devices/system/edac subsys reference */ mci->dev.type = &mci_attr_type;
@@ -1071,7 +1076,8 @@ fail: fail2:device_unregister (&mci->dev);bus_unregister (mci->bus); -kfree (mci->bus->name); +kfree (name); +return err; }
@@ -1102,10 +1108,12 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)void edac_unregister_sysfs (struct mem_ctl_info *mci) { +const char *name = mci->bus->name; +edac_dbg (1 ,"Unregistering device %s\n" ,dev_name (&mci->dev));device_unregister (&mci->dev);bus_unregister (mci->bus); -kfree (mci->bus->name); +kfree (name); }static void mc_attr_release (struct device *dev)
drivers/gpu/drm/ast/ast_main.c +1 -1
@@ -124,7 +124,7 @@ static int ast_get_dram_info(struct drm_device *dev) }while (ast_read32 (ast,0x10000 ) !=0x01 ); data =ast_read32 (ast,0x10004 ); -if (data &0x400 ) +if (data &0x40 ) ast->dram_bus_width =16 ;else ast->dram_bus_width =32 ;
drivers/infiniband/ulp/isert/ib_isert.c +19 -0
@@ -2071,6 +2071,24 @@ isert_put_response(struct iscsi_conn *conn, struct iscsi_cmd *cmd)return isert_post_response (isert_conn, isert_cmd); } +static void +isert_aborted_task (struct iscsi_conn *conn,struct iscsi_cmd *cmd) +{ +struct isert_cmd *isert_cmd =iscsit_priv_cmd (cmd); +struct isert_conn *isert_conn = (struct isert_conn *)conn->context; +struct isert_device *device = isert_conn->conn_device; + +spin_lock_bh (&conn->cmd_lock); +if (!list_empty (&cmd->i_conn_node)) +list_del_init (&cmd->i_conn_node); +spin_unlock_bh (&conn->cmd_lock); + +if (cmd->data_direction ==DMA_TO_DEVICE ) +iscsit_stop_dataout_timer (cmd); + + device->unreg_rdma_mem (isert_cmd, isert_conn); +} +static int isert_put_nopin (struct iscsi_cmd *cmd,struct iscsi_conn *conn,bool nopout_response)
@@ -2999,6 +3017,7 @@ static struct iscsit_transport iser_target_transport = { .iscsit_get_dataout = isert_get_dataout, .iscsit_queue_data_in = isert_put_datain, .iscsit_queue_status = isert_put_response, + .iscsit_aborted_task = isert_aborted_task, };static int __init isert_init (void )
drivers/infiniband/ulp/srpt/ib_srpt.c +9 -0
@@ -3093,6 +3093,14 @@ static void srpt_queue_tm_rsp(struct se_cmd *cmd)srpt_queue_response (cmd); } +static void srpt_aborted_task (struct se_cmd *cmd) +{ +struct srpt_send_ioctx *ioctx =container_of (cmd, + struct srpt_send_ioctx, cmd); + +srpt_unmap_sg_to_ib_sge (ioctx->ch, ioctx); +} +static int srpt_queue_status (struct se_cmd *cmd) {struct srpt_send_ioctx *ioctx;
@@ -3940,6 +3948,7 @@ static struct target_core_fabric_ops srpt_template = { .queue_data_in = srpt_queue_data_in, .queue_status = srpt_queue_status, .queue_tm_rsp = srpt_queue_tm_rsp, + .aborted_task = srpt_aborted_task,/* * Setup function pointers for generic logic in * target_core_fabric_configfs.c
drivers/iommu/amd_iommu_init.c +22 -12
@@ -226,6 +226,10 @@ static enum iommu_init_state init_state = IOMMU_START_STATE;static int amd_iommu_enable_interrupts (void );static int __init iommu_go_to_state (enum iommu_init_state state); +static int iommu_pc_get_set_reg_val (struct amd_iommu *iommu, +u8 bank,u8 cntr,u8 fxn, +u64 *value,bool is_write); +static inline void update_last_devid (u16 devid) {if (devid > amd_iommu_last_bdf)
@@ -1182,8 +1186,8 @@ static void init_iommu_perf_ctr(struct amd_iommu *iommu) amd_iommu_pc_present = true;/* Check if the performance counters can be written to */ -if ((0 !=amd_iommu_pc_get_set_reg_val (0 ,0 ,0 ,0 , &val, true)) || - (0 !=amd_iommu_pc_get_set_reg_val (0 ,0 ,0 ,0 , &val2, false)) || +if ((0 !=iommu_pc_get_set_reg_val (iommu,0 ,0 ,0 , &val, true)) || + (0 !=iommu_pc_get_set_reg_val (iommu,0 ,0 ,0 , &val2, false)) || (val != val2)) {pr_err ("AMD-Vi: Unable to write to IOMMU perf counter.\n" ); amd_iommu_pc_present = false;
@@ -2314,22 +2318,15 @@ u8 amd_iommu_pc_get_max_counters(u16 devid) }EXPORT_SYMBOL (amd_iommu_pc_get_max_counters); -int amd_iommu_pc_get_set_reg_val (u16 devid,u8 bank,u8 cntr,u8 fxn, +static int iommu_pc_get_set_reg_val (struct amd_iommu *iommu, +u8 bank,u8 cntr,u8 fxn,u64 *value,bool is_write) { -struct amd_iommu *iommu;u32 offset;u32 max_offset_lim; -/* Make sure the IOMMU PC resource is available */ -if (!amd_iommu_pc_present) -return -ENODEV ; - -/* Locate the iommu associated with the device ID */ - iommu = amd_iommu_rlookup_table[devid]; -/* Check for valid iommu and pc register indexing */ -if (WARN_ON ((iommu ==NULL ) || (fxn >0x28 ) || (fxn &7 ))) +if (WARN_ON ((fxn >0x28 ) || (fxn &7 )))return -ENODEV ; offset = (u32)(((0x40 |bank) <<12 ) | (cntr <<8 ) | fxn);
@@ -2353,3 +2350,16 @@ int amd_iommu_pc_get_set_reg_val(u16 devid, u8 bank, u8 cntr, u8 fxn,return 0 ; }EXPORT_SYMBOL (amd_iommu_pc_get_set_reg_val); + +int amd_iommu_pc_get_set_reg_val (u16 devid,u8 bank,u8 cntr,u8 fxn, +u64 *value,bool is_write) +{ +struct amd_iommu *iommu = amd_iommu_rlookup_table[devid]; + +/* Make sure the IOMMU PC resource is available */ +if (!amd_iommu_pc_present || iommu ==NULL ) +return -ENODEV ; + +return iommu_pc_get_set_reg_val (iommu, bank, cntr, fxn, + value, is_write); +}
drivers/mtd/ubi/upd.c +1 -1
@@ -193,7 +193,7 @@ int ubi_start_leb_change(struct ubi_device *ubi, struct ubi_volume *vol, vol->changing_leb =1 ; vol->ch_lnum = req->lnum; - vol->upd_buf =vmalloc (req->bytes); + vol->upd_buf =vmalloc (ALIGN ((int )req->bytes, ubi->min_io_size));if (!vol->upd_buf)return -ENOMEM ;
drivers/scsi/qla2xxx/tcm_qla2xxx.c +16 -0
@@ -684,6 +684,20 @@ static void tcm_qla2xxx_queue_tm_rsp(struct se_cmd *se_cmd)qlt_xmit_tm_rsp (mcmd); } +static void tcm_qla2xxx_aborted_task (struct se_cmd *se_cmd) +{ +struct qla_tgt_cmd *cmd =container_of (se_cmd, + struct qla_tgt_cmd, se_cmd); +struct scsi_qla_host *vha = cmd->vha; +struct qla_hw_data *ha = vha->hw; + +if (!cmd->sg_mapped) +return ; + +pci_unmap_sg (ha->pdev, cmd->sg, cmd->sg_cnt, cmd->dma_data_direction); + cmd->sg_mapped =0 ; +} +/* Local pointer to allocated TCM configfs fabric module */ struct target_fabric_configfs *tcm_qla2xxx_fabric_configfs;struct target_fabric_configfs *tcm_qla2xxx_npiv_fabric_configfs;
@@ -1886,6 +1900,7 @@ static struct target_core_fabric_ops tcm_qla2xxx_ops = { .queue_data_in = tcm_qla2xxx_queue_data_in, .queue_status = tcm_qla2xxx_queue_status, .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp, + .aborted_task = tcm_qla2xxx_aborted_task,/* * Setup function pointers for generic logic in * target_core_fabric_configfs.c
@@ -1935,6 +1950,7 @@ static struct target_core_fabric_ops tcm_qla2xxx_npiv_ops = { .queue_data_in = tcm_qla2xxx_queue_data_in, .queue_status = tcm_qla2xxx_queue_status, .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp, + .aborted_task = tcm_qla2xxx_aborted_task,/* * Setup function pointers for generic logic in * target_core_fabric_configfs.c
drivers/target/iscsi/iscsi_target.c +13 -0
@@ -500,6 +500,18 @@ static int iscsit_queue_rsp(struct iscsi_conn *conn, struct iscsi_cmd *cmd)return 0 ; } +static void iscsit_aborted_task (struct iscsi_conn *conn,struct iscsi_cmd *cmd) +{ +bool scsi_cmd = (cmd->iscsi_opcode ==ISCSI_OP_SCSI_CMD ); + +spin_lock_bh (&conn->cmd_lock); +if (!list_empty (&cmd->i_conn_node)) +list_del_init (&cmd->i_conn_node); +spin_unlock_bh (&conn->cmd_lock); + +__iscsit_free_cmd (cmd, scsi_cmd, true); +} +static struct iscsit_transport iscsi_target_transport = { .name ="iSCSI/TCP" , .transport_type =ISCSI_TCP ,
@@ -514,6 +526,7 @@ static struct iscsit_transport iscsi_target_transport = { .iscsit_response_queue = iscsit_response_queue, .iscsit_queue_data_in = iscsit_queue_rsp, .iscsit_queue_status = iscsit_queue_rsp, + .iscsit_aborted_task = iscsit_aborted_task, };static int __init iscsi_target_init_module (void )
drivers/target/iscsi/iscsi_target_configfs.c +8 -0
@@ -1815,6 +1815,13 @@ static void lio_queue_tm_rsp(struct se_cmd *se_cmd)iscsit_add_cmd_to_response_queue (cmd, cmd->conn, cmd->i_state); } +static void lio_aborted_task (struct se_cmd *se_cmd) +{ + struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); + + cmd->conn->conn_transport->iscsit_aborted_task (cmd->conn, cmd); +} +static char *lio_tpg_get_endpoint_wwn (struct se_portal_group *se_tpg) {struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr;
@@ -2013,6 +2020,7 @@ int iscsi_target_register_configfs(void) fabric->tf_ops.queue_data_in = &lio_queue_data_in; fabric->tf_ops.queue_status = &lio_queue_status; fabric->tf_ops.queue_tm_rsp = &lio_queue_tm_rsp; + fabric->tf_ops.aborted_task = &lio_aborted_task;/* * Setup function pointers for generic logic in target_core_fabric_configfs.c */
drivers/target/iscsi/iscsi_target_util.c +2 -2
@@ -705,8 +705,8 @@ void iscsit_release_cmd(struct iscsi_cmd *cmd) }EXPORT_SYMBOL (iscsit_release_cmd); -static void __iscsit_free_cmd (struct iscsi_cmd *cmd,bool scsi_cmd, -bool check_queues) +void __iscsit_free_cmd (struct iscsi_cmd *cmd,bool scsi_cmd, +bool check_queues) {struct iscsi_conn *conn = cmd->conn;
drivers/target/iscsi/iscsi_target_util.h +1 -0
@@ -30,6 +30,7 @@ extern void iscsit_remove_cmd_from_tx_queues(struct iscsi_cmd *, struct iscsi_coextern bool iscsit_conn_all_queues_empty (struct iscsi_conn *);extern void iscsit_free_queue_reqs_for_conn (struct iscsi_conn *);extern void iscsit_release_cmd (struct iscsi_cmd *); +extern void __iscsit_free_cmd (struct iscsi_cmd *,bool ,bool );extern void iscsit_free_cmd (struct iscsi_cmd *,bool );extern int iscsit_check_session_usage_count (struct iscsi_session *);extern void iscsit_dec_session_usage_count (struct iscsi_session *);
drivers/target/loopback/tcm_loop.c +6 -0
@@ -892,6 +892,11 @@ static void tcm_loop_queue_tm_rsp(struct se_cmd *se_cmd)wake_up (&tl_tmr->tl_tmr_wait); } +static void tcm_loop_aborted_task (struct se_cmd *se_cmd) +{ +return ; +} +static char *tcm_loop_dump_proto_id (struct tcm_loop_hba *tl_hba) {switch (tl_hba->tl_proto_id) {
@@ -1456,6 +1461,7 @@ static int tcm_loop_register_configfs(void) fabric->tf_ops.queue_data_in = &tcm_loop_queue_data_in; fabric->tf_ops.queue_status = &tcm_loop_queue_status; fabric->tf_ops.queue_tm_rsp = &tcm_loop_queue_tm_rsp; + fabric->tf_ops.aborted_task = &tcm_loop_aborted_task;/* * Setup function pointers for generic logic in target_core_fabric_configfs.c
drivers/target/sbp/sbp_target.c +6 -0
@@ -1846,6 +1846,11 @@ static void sbp_queue_tm_rsp(struct se_cmd *se_cmd) { } +static void sbp_aborted_task (struct se_cmd *se_cmd) +{ +return ; +} +static int sbp_check_stop_free (struct se_cmd *se_cmd) { struct sbp_target_request *req = container_of(se_cmd,
@@ -2526,6 +2531,7 @@ static struct target_core_fabric_ops sbp_ops = { .queue_data_in = sbp_queue_data_in, .queue_status = sbp_queue_status, .queue_tm_rsp = sbp_queue_tm_rsp, + .aborted_task = sbp_aborted_task, .check_stop_free = sbp_check_stop_free, .fabric_make_wwn = sbp_make_tport,
drivers/target/target_core_configfs.c +4 -0
@@ -457,6 +457,10 @@ static int target_fabric_tf_ops_check(pr_err ("Missing tfo->queue_tm_rsp()\n" );return -EINVAL ; } +if (!tfo->aborted_task) { +pr_err ("Missing tfo->aborted_task()\n" ); +return -EINVAL ; + }/* * We at least require tfo->fabric_make_wwn(), tfo->fabric_drop_wwn() * tfo->fabric_make_tpg() and tfo->fabric_drop_tpg() in
drivers/target/target_core_device.c +43 -0
49 lines not on this page · raw message
drivers/target/target_core_file.c +9 -20
@@ -164,25 +164,11 @@ static int fd_configure_device(struct se_device *dev)" block_device blocks: %llu logical_block_size: %d\n" , dev_size,div_u64 (dev_size, fd_dev->fd_block_size), fd_dev->fd_block_size); -/* -* Check if the underlying struct block_device request_queue supports -* the QUEUE_FLAG_DISCARD bit for UNMAP/WRITE_SAME in SCSI + TRIM -* in ATA and we need to set TPE=1 -*/ -if (blk_queue_discard (q)) { - dev->dev_attrib.max_unmap_lba_count = - q->limits.max_discard_sectors; -/* -* Currently hardcoded to 1 in Linux/SCSI code.. -*/ - dev->dev_attrib.max_unmap_block_desc_count =1 ; - dev->dev_attrib.unmap_granularity = - q->limits.discard_granularity >>9 ; - dev->dev_attrib.unmap_granularity_alignment = - q->limits.discard_alignment; + +if (target_configure_unmap_from_queue (&dev->dev_attrib, q, + fd_dev->fd_block_size))pr_debug ("IFILE: BLOCK Discard support available," -" disabled by default\n" ); - } +" disabled by default\n" );/* * Enable write same emulation for IBLOCK and use 0xFFFF as * the smaller WRITE_SAME(10) only has a two-byte block count.
@@ -545,9 +531,12 @@ fd_do_unmap(struct se_cmd *cmd, void *priv, sector_t lba, sector_t nolb)if (S_ISBLK (inode->i_mode)) {/* The backend is block device, use discard */ struct block_device *bdev = inode->i_bdev; +struct se_device *dev = cmd->se_dev; - ret =blkdev_issue_discard (bdev, lba, - nolb,GFP_KERNEL ,0 ); + ret =blkdev_issue_discard (bdev, +target_to_linux_sector (dev, lba), +target_to_linux_sector (dev, nolb), +GFP_KERNEL ,0 );if (ret <0 ) {pr_warn ("FILEIO: blkdev_issue_discard() failed: %d\n" , ret);
drivers/target/target_core_iblock.c +14 -42
94 lines not on this page · raw message
drivers/target/target_core_tmr.c +109 -41
269 lines not on this page · raw message
drivers/target/target_core_transport.c +208 -81
512 lines not on this page · raw message
drivers/target/tcm_fc/tcm_fc.h +1 -0
@@ -163,6 +163,7 @@ int ft_write_pending_status(struct se_cmd *);u32 ft_get_task_tag (struct se_cmd *);int ft_get_cmd_state (struct se_cmd *);void ft_queue_tm_resp (struct se_cmd *); +void ft_aborted_task (struct se_cmd *);/* * other internal functions.
drivers/target/tcm_fc/tfc_cmd.c +5 -0
@@ -426,6 +426,11 @@ void ft_queue_tm_resp(struct se_cmd *se_cmd)ft_send_resp_code (cmd, code); } +void ft_aborted_task (struct se_cmd *se_cmd) +{ +return ; +} +static void ft_send_work (struct work_struct *work);/*
drivers/target/tcm_fc/tfc_conf.c +1 -0
@@ -536,6 +536,7 @@ static struct target_core_fabric_ops ft_fabric_ops = { .queue_data_in = ft_queue_data_in, .queue_status = ft_queue_status, .queue_tm_rsp = ft_queue_tm_resp, + .aborted_task = ft_aborted_task,/* * Setup function pointers for generic logic in * target_core_fabric_configfs.c
drivers/usb/chipidea/otg.c +1 -1
@@ -96,7 +96,7 @@ static void ci_otg_work(struct work_struct *work)int ci_hdrc_otg_init (struct ci_hdrc *ci) {INIT_WORK (&ci->work, ci_otg_work); - ci->wq =create_singlethread_workqueue ("ci_otg" ); + ci->wq =create_freezable_workqueue ("ci_otg" );if (!ci->wq) {dev_err (ci->dev,"can't create workqueue\n" );return -ENODEV ;
drivers/usb/gadget/tcm_usb_gadget.c +6 -0
@@ -1471,6 +1471,11 @@ static void usbg_queue_tm_rsp(struct se_cmd *se_cmd) { } +static void usbg_aborted_task (struct se_cmd *se_cmd) +{ +return ; +} +static const char *usbg_check_wwn (const char *name) {const char *n;
@@ -1897,6 +1902,7 @@ static struct target_core_fabric_ops usbg_ops = { .queue_data_in = usbg_send_read_response, .queue_status = usbg_send_status_response, .queue_tm_rsp = usbg_queue_tm_rsp, + .aborted_task = usbg_aborted_task, .check_stop_free = usbg_check_stop_free, .fabric_make_wwn = usbg_make_tport,
drivers/usb/serial/cp210x.c +1 -0
@@ -164,6 +164,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x18EF, 0xE025) }, /* ELV Marble Sound Board 1 */ { USB_DEVICE(0x1901, 0x0190) }, /* GE B850 CP2105 Recorder interface */ { USB_DEVICE(0x1901, 0x0193) }, /* GE B650 CP2104 PMC interface */ + { USB_DEVICE(0x19CF, 0x3000) }, /* Parrot NMEA GPS Flight Recorder */ { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */ { USB_DEVICE(0x1BA4, 0x0002) }, /* Silicon Labs 358x factory default */
drivers/usb/serial/option.c +5 -0
@@ -271,6 +271,7 @@ static void option_instat_callback(struct urb *urb);#define TELIT_PRODUCT_UE910_V2 0x1012#define TELIT_PRODUCT_LE922_USBCFG0 0x1042#define TELIT_PRODUCT_LE922_USBCFG3 0x1043 +#define TELIT_PRODUCT_LE922_USBCFG5 0x1045#define TELIT_PRODUCT_LE920 0x1200#define TELIT_PRODUCT_LE910 0x1201
@@ -1140,6 +1141,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9003), /* Quectel UC20 */ + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003),
@@ -1191,6 +1194,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg0 }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG3), .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG5, 0xff), + .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg0 }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910), .driver_info = (kernel_ulong_t)&telit_le910_blacklist }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920),
drivers/vhost/scsi.c +6 -0
@@ -539,6 +539,11 @@ static void tcm_vhost_queue_tm_rsp(struct se_cmd *se_cmd)return ; } +static void tcm_vhost_aborted_task (struct se_cmd *se_cmd) +{ +return ; +} +static void tcm_vhost_free_evt (struct vhost_scsi *vs,struct tcm_vhost_evt *evt) { vs->vs_events_nr--;
@@ -2173,6 +2178,7 @@ static struct target_core_fabric_ops tcm_vhost_ops = { .queue_data_in = tcm_vhost_queue_data_in, .queue_status = tcm_vhost_queue_status, .queue_tm_rsp = tcm_vhost_queue_tm_rsp, + .aborted_task = tcm_vhost_aborted_task,/* * Setup callers for generic logic in target_core_fabric_configfs.c */
fs/bio.c +6 -3
@@ -1096,9 +1096,12 @@ int bio_uncopy_user(struct bio *bio) ret =__bio_copy_iov (bio, bmd->sgvecs, bmd->nr_sgvecs,bio_data_dir (bio) ==READ ,0 , bmd->is_our_pages); - else if (bmd->is_our_pages) - bio_for_each_segment_all(bvec, bio, i) - __free_page(bvec->bv_page); + else { + ret = -EINTR ; +if (bmd->is_our_pages) +bio_for_each_segment_all (bvec, bio, i) +__free_page (bvec->bv_page); + } }kfree (bmd);bio_put (bio);
fs/cifs/cifssmb.c +18 -3
@@ -1399,11 +1399,10 @@ openRetry:* current bigbuf. */ static int -cifs_readv_discard (struct TCP_Server_Info *server,struct mid_q_entry *mid) +discard_remaining_data (struct TCP_Server_Info *server) {unsigned int rfclen =get_rfc1002_length (server->smallbuf);int remaining = rfclen +4 - server->total_read; -struct cifs_readdata *rdata = mid->callback_data;while (remaining >0 ) {int length;
@@ -1417,10 +1416,20 @@ cifs_readv_discard(struct TCP_Server_Info *server, struct mid_q_entry *mid) remaining -= length; } -dequeue_mid (mid, rdata->result);return 0 ; } +static int +cifs_readv_discard (struct TCP_Server_Info *server,struct mid_q_entry *mid) +{ +int length; +struct cifs_readdata *rdata = mid->callback_data; + + length =discard_remaining_data (server); +dequeue_mid (mid, rdata->result); +return length; +} +int cifs_readv_receive (struct TCP_Server_Info *server,struct mid_q_entry *mid) {
@@ -1449,6 +1458,12 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)return length; server->total_read += length; +if (server->ops->is_status_pending && + server->ops->is_status_pending (buf, server,0 )) { +discard_remaining_data (server); +return -1 ; + } +/* Was the SMB read successful? */ rdata->result = server->ops->map_error (buf, false);if (rdata->result !=0 ) {
fs/cifs/smb2pdu.c +14 -10
@@ -1004,21 +1004,25 @@ parse_lease_state(struct TCP_Server_Info *server, struct smb2_create_rsp *rsp, {char *data_offset;struct create_context *cc; -unsigned int next =0 ; +unsigned int next; +unsigned int remaining;char *name; data_offset = (char *)rsp +4 +le32_to_cpu (rsp->CreateContextsOffset); + remaining =le32_to_cpu (rsp->CreateContextsLength); cc = (struct create_context *)data_offset; -do { - cc = (struct create_context *)((char *)cc + next); +while (remaining >=sizeof (struct create_context )) { name =le16_to_cpu (cc->NameOffset) + (char *)cc; -if (le16_to_cpu (cc->NameLength) !=4 || -strncmp (name,"RqLs" ,4 )) { - next =le32_to_cpu (cc->Next); -continue ; - } -return server->ops->parse_lease_buf (cc, epoch); - }while (next !=0 ); +if (le16_to_cpu (cc->NameLength) ==4 && +strncmp (name,"RqLs" ,4 ) ==0 ) +return server->ops->parse_lease_buf (cc, epoch); + + next =le32_to_cpu (cc->Next); +if (!next) +break ; + remaining -= next; + cc = (struct create_context *)((char *)cc + next); + }return 0 ; }
fs/jffs2/README.Locking +1 -4
@@ -2,10 +2,6 @@ JFFS2 LOCKING DOCUMENTATION --------------------------- -At least theoretically, JFFS2 does not require the Big Kernel Lock -(BKL), which was always helpfully obtained for it by Linux 2.4 VFS -code. It has its own locking, as described below. - This document attempts to describe the existing locking rules for JFFS2. It is not expected to remain perfectly up to date, but ought to be fairly close.
@@ -69,6 +65,7 @@ Ordering constraints: any f->sem held. 2. Never attempt to lock two file mutexes in one thread. No ordering rules have been made for doing so. + 3. Never lock a page cache page with f->sem held. erase_completion_lock spinlock
fs/jffs2/build.c +57 -18
121 lines not on this page · raw message
fs/jffs2/file.c +18 -21
@@ -139,39 +139,33 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,struct page *pg;struct inode *inode = mapping->host;struct jffs2_inode_info *f =JFFS2_INODE_INFO (inode); -struct jffs2_sb_info *c =JFFS2_SB_INFO (inode->i_sb); -struct jffs2_raw_inode ri; -uint32_t alloc_len =0 ;pgoff_t index = pos >>PAGE_CACHE_SHIFT ;uint32_t pageofs = index <<PAGE_CACHE_SHIFT ;int ret =0 ; -jffs2_dbg (1 ,"%s()\n" , __func__); - -if (pageofs > inode->i_size) { - ret =jffs2_reserve_space (c,sizeof (ri), &alloc_len, -ALLOC_NORMAL ,JFFS2_SUMMARY_INODE_SIZE ); -if (ret) -return ret; - } - -mutex_lock (&f->sem); pg =grab_cache_page_write_begin (mapping, index, flags); -if (!pg) { -if (alloc_len) -jffs2_complete_reservation (c); -mutex_unlock (&f->sem); +if (!pg)return -ENOMEM ; - } *pagep = pg; -if (alloc_len) { +jffs2_dbg (1 ,"%s()\n" , __func__); + +if (pageofs > inode->i_size) {/* Make new hole frag from old EOF to new page */ +struct jffs2_sb_info *c =JFFS2_SB_INFO (inode->i_sb); +struct jffs2_raw_inode ri;struct jffs2_full_dnode *fn; +uint32_t alloc_len;jffs2_dbg (1 ,"Writing new hole frag 0x%x-0x%x between current EOF and new page\n" , (unsigned int )inode->i_size, pageofs); + ret =jffs2_reserve_space (c,sizeof (ri), &alloc_len, +ALLOC_NORMAL ,JFFS2_SUMMARY_INODE_SIZE ); +if (ret) + goto out_page; + +mutex_lock (&f->sem);memset (&ri,0 ,sizeof (ri)); ri.magic =cpu_to_je16 (JFFS2_MAGIC_BITMASK );
@@ -198,6 +192,7 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,if (IS_ERR (fn)) { ret =PTR_ERR (fn);jffs2_complete_reservation (c); +mutex_unlock (&f->sem); goto out_page; } ret =jffs2_add_full_dnode_to_inode (c, f, fn);
@@ -212,10 +207,12 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,jffs2_mark_node_obsolete (c, fn->raw);jffs2_free_full_dnode (fn);jffs2_complete_reservation (c); +mutex_unlock (&f->sem); goto out_page; }jffs2_complete_reservation (c); inode->i_size = pageofs; +mutex_unlock (&f->sem); }/*
@@ -224,18 +221,18 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,* case of a short-copy. */ if (!PageUptodate (pg)) { +mutex_lock (&f->sem); ret =jffs2_do_readpage_nolock (inode, pg); +mutex_unlock (&f->sem);if (ret) goto out_page; } -mutex_unlock (&f->sem);jffs2_dbg (1 ,"end write_begin(). pg->flags %lx\n" , pg->flags);return ret; out_page:unlock_page (pg);page_cache_release (pg); -mutex_unlock (&f->sem);return ret; }
fs/jffs2/gc.c +10 -7
@@ -1296,14 +1296,17 @@ static int jffs2_garbage_collect_dnode(struct jffs2_sb_info *c, struct jffs2_eraBUG_ON (start > orig_start); } -/* First, use readpage() to read the appropriate page into the page cache */ -/* Q: What happens if we actually try to GC the _same_ page for which commit_write() -* triggered garbage collection in the first place? -* A: I _think_ it's OK. read_cache_page shouldn't deadlock, we'll write out the -* page OK. We'll actually write it out again in commit_write, which is a little -* suboptimal, but at least we're correct. -*/ +/* The rules state that we must obtain the page lock *before* f->sem, so +* drop f->sem temporarily. Since we also hold c->alloc_sem, nothing's +* actually going to *change* so we're safe; we only allow reading. +* +* It is important to note that jffs2_write_begin() will ensure that its +* page is marked Uptodate before allocating space. That means that if we +* end up here trying to GC the *same* page that jffs2_write_begin() is +* trying to write out, read_cache_page() will not deadlock. */ +mutex_unlock (&f->sem); pg_ptr =jffs2_gc_fetch_page (c, f, start, &pg); +mutex_lock (&f->sem);if (IS_ERR (pg_ptr)) { pr_warn("read_cache_page() returned error: %ld\n",
fs/jffs2/nodelist.h +5 -1
@@ -194,6 +194,7 @@ struct jffs2_inode_cache {#define INO_STATE_CLEARING 6/* In clear_inode() */ #define INO_FLAGS_XATTR_CHECKED 0x01/* has no duplicate xattr_ref */ +#define INO_FLAGS_IS_DIR 0x02/* is a directory */ #define RAWNODE_CLASS_INODE_CACHE 0#define RAWNODE_CLASS_XATTR_DATUM 1
@@ -249,7 +250,10 @@ struct jffs2_readinode_infostruct jffs2_full_dirent { -struct jffs2_raw_node_ref *raw; +union { +struct jffs2_raw_node_ref *raw; +struct jffs2_inode_cache *ic;/* Just during part of build */ + };struct jffs2_full_dirent *next;uint32_t version;uint32_t ino;/* == zero for unlink */
fs/locks.c +30 -21
77 lines not on this page · raw message
include/linux/ata.h +2 -2
@@ -484,8 +484,8 @@ enum ata_tf_protocols { };enum ata_ioctls { -ATA_IOC_GET_IO32 =0x309 , -ATA_IOC_SET_IO32 =0x324 , +ATA_IOC_GET_IO32 =0x309 ,/* HDIO_GET_32BIT */ +ATA_IOC_SET_IO32 =0x324 ,/* HDIO_SET_32BIT */ };/* core structures */
include/linux/libata.h +1 -1
@@ -712,7 +712,7 @@ struct ata_device {union {u16 id[ATA_ID_WORDS ];/* IDENTIFY xxx DEVICE data */ u32 gscr[SATA_PMP_GSCR_DWORDS ];/* PMP GSCR block */ - }; + }____cacheline_aligned ;/* DEVSLP Timing Variables from Identify Device Data Log */ u8 devslp_timing[ATA_LOG_DEVSLP_SIZE ];
include/target/iscsi/iscsi_transport.h +1 -0
@@ -21,6 +21,7 @@ struct iscsit_transport {int (*iscsit_get_dataout)(struct iscsi_conn *,struct iscsi_cmd *,bool );int (*iscsit_queue_data_in)(struct iscsi_conn *,struct iscsi_cmd *);int (*iscsit_queue_status)(struct iscsi_conn *,struct iscsi_cmd *); +void (*iscsit_aborted_task)(struct iscsi_conn *,struct iscsi_cmd *); };static inline void *iscsit_priv_cmd (struct iscsi_cmd *cmd)
include/target/target_core_backend.h +4 -0
@@ -94,4 +94,8 @@ sense_reason_t transport_generic_map_mem_to_cmd(struct se_cmd *,void array_free (void *array,int n); +sector_t target_to_linux_sector (struct se_device *dev,sector_t lb); +bool target_configure_unmap_from_queue (struct se_dev_attrib *attrib, +struct request_queue *q,int block_size); +#endif /* TARGET_CORE_BACKEND_H */
include/target/target_core_base.h +3 -1
@@ -162,7 +162,7 @@ enum se_cmd_flags_table {SCF_SENT_CHECK_CONDITION =0x00000800 ,SCF_OVERFLOW_BIT =0x00001000 ,SCF_UNDERFLOW_BIT =0x00002000 , -SCF_SENT_DELAYED_TAS =0x00004000 , +SCF_SEND_DELAYED_TAS =0x00004000 ,SCF_ALUA_NON_OPTIMIZED =0x00008000 ,SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC =0x00020000 , SCF_ACK_KREF = 0x00040000,
@@ -528,6 +528,8 @@ struct se_cmd {#define CMD_T_DEV_ACTIVE (1 << 7)#define CMD_T_REQUEST_STOP (1 << 8)#define CMD_T_BUSY (1 << 9) +#define CMD_T_TAS (1 << 10) +#define CMD_T_FABRIC_STOP (1 << 11)spinlock_t t_state_lock;struct completion t_transport_stop_comp;
include/target/target_core_fabric.h +1 -0
@@ -62,6 +62,7 @@ struct target_core_fabric_ops {int (*queue_data_in)(struct se_cmd *);int (*queue_status)(struct se_cmd *);void (*queue_tm_rsp)(struct se_cmd *); +void (*aborted_task)(struct se_cmd *);/* * fabric module calls for target_core_fabric_configfs.c */
sound/core/control_compat.c +74 -16
186 lines not on this page · raw message
sound/core/rawmidi_compat.c +53 -0
68 lines not on this page · raw message
sound/core/seq/oss/seq_oss.c +0 -2
@@ -150,8 +150,6 @@ odev_release(struct inode *inode, struct file *file)if ((dp = file->private_data) ==NULL )return 0 ; -snd_seq_oss_drain_write (dp); -mutex_lock (®ister_mutex);snd_seq_oss_release (dp);mutex_unlock (®ister_mutex);
sound/core/seq/oss/seq_oss_device.h +0 -1
@@ -131,7 +131,6 @@ int snd_seq_oss_write(struct seq_oss_devinfo *dp, const char __user *buf, int counsigned int snd_seq_oss_poll (struct seq_oss_devinfo *dp,struct file *file,poll_table * wait);void snd_seq_oss_reset (struct seq_oss_devinfo *dp); -void snd_seq_oss_drain_write (struct seq_oss_devinfo *dp);/* */ void snd_seq_oss_process_queue (struct seq_oss_devinfo *dp,abstime_t time);
sound/core/seq/oss/seq_oss_init.c +0 -17
@@ -457,23 +457,6 @@ snd_seq_oss_release(struct seq_oss_devinfo *dp)/* -* Wait until the queue is empty (if we don't have nonblock) -*/ -void -snd_seq_oss_drain_write (struct seq_oss_devinfo *dp) -{ -if (! dp->timer->running) -return ; -if (is_write_mode (dp->file_mode) && !is_nonblock_mode (dp->file_mode) && - dp->writeq) { -debug_printk (("syncing..\n" )); -while (snd_seq_oss_writeq_sync (dp->writeq)) - ; - } -} - - -/* * reset sequencer devices */ void
sound/core/timer_compat.c +16 -2
@@ -70,13 +70,14 @@ static int snd_timer_user_status_compat(struct file *file, struct snd_timer_status32 __user *_status) {struct snd_timer_user *tu; -struct snd_timer_status status; +struct snd_timer_status32 status; tu = file->private_data;if (snd_BUG_ON (!tu->timeri))return -ENXIO ;memset (&status,0 ,sizeof (status)); - status.tstamp = tu->tstamp; + status.tstamp.tv_sec = tu->tstamp.tv_sec; + status.tstamp.tv_nsec = tu->tstamp.tv_nsec; status.resolution =snd_timer_resolution (tu->timeri); status.lost = tu->timeri->lost; status.overrun = tu->overrun;
@@ -88,12 +89,21 @@ static int snd_timer_user_status_compat(struct file *file,return 0 ; } +#ifdef CONFIG_X86_X32 +/* X32 ABI has the same struct as x86-64 */ +#define snd_timer_user_status_x32 (file, s) \ + snd_timer_user_status(file, s) +#endif /* CONFIG_X86_X32 */ +/* */ enum { SNDRV_TIMER_IOCTL_INFO32 = _IOR('T', 0x11, struct snd_timer_info32), SNDRV_TIMER_IOCTL_STATUS32 = _IOW('T', 0x14, struct snd_timer_status32), +#ifdef CONFIG_X86_X32 + SNDRV_TIMER_IOCTL_STATUS_X32 = _IOW('T', 0x14, struct snd_timer_status), +#endif /* CONFIG_X86_X32 */ };static long snd_timer_user_ioctl_compat (struct file *file,unsigned int cmd,unsigned long arg)
@@ -122,6 +132,10 @@ static long snd_timer_user_ioctl_compat(struct file *file, unsigned int cmd, unsreturn snd_timer_user_info_compat (file, argp);case SNDRV_TIMER_IOCTL_STATUS32 :return snd_timer_user_status_compat (file, argp); +#ifdef CONFIG_X86_X32 +case SNDRV_TIMER_IOCTL_STATUS_X32 : +return snd_timer_user_status_x32 (file, argp); +#endif /* CONFIG_X86_X32 */ }return -ENOIOCTLCMD ; }
sound/pci/rme9652/hdsp.c +2 -2
@@ -2917,7 +2917,7 @@ static int snd_hdsp_get_dds_offset(struct snd_kcontrol *kcontrol, struct snd_ctl {struct hdsp *hdsp =snd_kcontrol_chip (kcontrol); - ucontrol->value.enumerated.item[0 ] =hdsp_dds_offset (hdsp); + ucontrol->value.integer.value[0 ] =hdsp_dds_offset (hdsp);return 0 ; }
@@ -2929,7 +2929,7 @@ static int snd_hdsp_put_dds_offset(struct snd_kcontrol *kcontrol, struct snd_ctlif (!snd_hdsp_use_is_exclusive (hdsp))return -EBUSY ; - val = ucontrol->value.enumerated.item[0 ]; + val = ucontrol->value.integer.value[0 ];spin_lock_irq (&hdsp->lock);if (val !=hdsp_dds_offset (hdsp)) change = (hdsp_set_dds_offset (hdsp, val) ==0 ) ?1 :0 ;
sound/pci/rme9652/hdspm.c +12 -4
@@ -1602,6 +1602,9 @@ static void hdspm_set_dds_value(struct hdspm *hdspm, int rate) {u64 n; +if (snd_BUG_ON (rate <=0 )) +return ; +if (rate >=112000 ) rate /=4 ;else if (rate >=56000 )
@@ -2224,6 +2227,8 @@ static int hdspm_get_system_sample_rate(struct hdspm *hdspm) }else {/* slave mode, return external sample rate */ rate =hdspm_external_sample_rate (hdspm); +if (!rate) + rate = hdspm->system_sample_rate; } }
@@ -2269,8 +2274,11 @@ static int snd_hdspm_put_system_sample_rate(struct snd_kcontrol *kcontrol, ucontrol) {struct hdspm *hdspm =snd_kcontrol_chip (kcontrol); +int rate = ucontrol->value.integer.value[0 ]; -hdspm_set_dds_value (hdspm, ucontrol->value.enumerated.item[0 ]); +if (rate <27000 || rate >207000 ) +return -EINVAL ; +hdspm_set_dds_value (hdspm, ucontrol->value.integer.value[0 ]);return 0 ; }
@@ -4469,7 +4477,7 @@ static int snd_hdspm_get_tco_word_term(struct snd_kcontrol *kcontrol, {struct hdspm *hdspm =snd_kcontrol_chip (kcontrol); - ucontrol->value.enumerated.item[0 ] = hdspm->tco->term; + ucontrol->value.integer.value[0 ] = hdspm->tco->term;return 0 ; }
@@ -4480,8 +4488,8 @@ static int snd_hdspm_put_tco_word_term(struct snd_kcontrol *kcontrol, {struct hdspm *hdspm =snd_kcontrol_chip (kcontrol); -if (hdspm->tco->term != ucontrol->value.enumerated.item[0 ]) { - hdspm->tco->term = ucontrol->value.enumerated.item[0 ]; +if (hdspm->tco->term != ucontrol->value.integer.value[0 ]) { + hdspm->tco->term = ucontrol->value.integer.value[0 ];hdspm_tco_write (hdspm);