Push to branch refs/heads/master: 8c49eaa0ab9c3d3444051fff34ca88f1a4062c08 --> 7089db84e356562f8ba737c29e472cc42d530dbc
diff --git a/CREDITS b/CREDITS index c5626bf..c585607 100644 --- a/CREDITS +++ b/CREDITS @@ -2478,11 +2478,12 @@ S: D-90453 Nuernberg S: Germany N: Arnaldo Carvalho de Melo -E: a...@kernel.org +E: a...@ghostprotocols.net E: arnaldo.m...@gmail.com E: a...@redhat.com +W: http://oops.ghostprotocols.net:81/blog/ P: 1024D/9224DF01 D5DF E3BB E3C8 BCBB F8AD 841A B6AB 4681 9224 DF01 -D: tools/, IPX, LLC, DCCP, cyc2x, wl3501_cs, net/ hacks +D: IPX, LLC, DCCP, cyc2x, wl3501_cs, net/ hacks S: Brazil N: Karsten Merker diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX index 1e889d5..b7bd6c9 100644 --- a/Documentation/filesystems/00-INDEX +++ b/Documentation/filesystems/00-INDEX @@ -147,12 +147,9 @@ vfat.txt - info on using the VFAT filesystem used in Windows NT and Windows 95. vfs.txt - overview of the Virtual File System. -wrapfs.txt - - info and mount options for the stackable wrapper file system xfs-delayed-logging-design.txt - info on the XFS Delayed Logging Design. xfs-self-describing-metadata.txt - info on XFS Self Describing Metadata. - - overview of the Virtual File System xfs.txt - info and mount options for the XFS filesystem. diff --git a/Documentation/filesystems/wrapfs.txt b/Documentation/filesystems/wrapfs.txt deleted file mode 100644 index daa313b..0000000 --- a/Documentation/filesystems/wrapfs.txt +++ /dev/null @@ -1,172 +0,0 @@ -Wrapfs: a null-layer (aka wrapper) stackable file system - -Maintainer: Erez Zadok <ezk AT cs DOT stonybrook DOT edu> -Web Site: <http://wrapfs.filesystems.org/> - ------------------------------------------------------------------------------- -MOTIVATION: - -Wrapfs is a small null-layer stackable file system, similar to BSD's Nullfs. -Wrapfs is small, under 1,800 lines of code. Compare that to, say, eCryptfs -(in mainline since 2.6.19) and Unionfs, each of which are over 10,000 LoC. -As such, Wrapfs is simple, easy to read and understand, and very easy to -code-review. Wrapfs is useful for several reasons: - -1. Many people like to experiment with in-kernel file system ideas. Wrapfs - is an ideal small template that one can modify to incrementally create - new file system functionalities. - -2. As a platform to test and debug generic stacking problems in other Linux - stackable file systems (e.g., eCryptfs) more easily. - -3. As a way to test VFS enhancements to better support stacking in Linux. - -4. Wrapfs is also a very useful instructional tool, often used as a starting - point for course assignments, for people who want a small example of how - the Linux VFS works, or for those who want to learn how to write new - Linux file systems. - -5. As an alternative to bind mounts. Wrapfs acts similarly to BSD's - loopback mount file system (lofs). - -Various versions of Wrapfs appeared as part of the "fistgen" package since -1994, and have been used by numerous users world-wide. This latest version -was rewritten entirely from scratch in 2010 and had supported every kernel -as of 2.6.32. All versions of wrapfs have been thoroughly tested using LTP, -FSX, racer, and other test-suites. Wrapfs code uses the latest VFS API -changes of the corresponding kernel. For a more detailed history of Wrapfs, -and list of most of its known users, see the section marked "HISTORY" below. - ------------------------------------------------------------------------------- -OPERATION: - -This is a brief description of how Wrapfs operates. For more information, -see the full paper published in Linux Expo 1999, titled "A Stackable File -System Interface For Linux": - - <http://www.fsl.cs.sunysb.edu/docs/linux-stacking/linux.pdf> - -The basic function of a stackable file system is to pass an operation and -its arguments to the lower-level file system. For every VFS object (inode, -dentry, file, superblock, etc.), Wrapfs keeps a one-to-one mapping of a -Wrapfs-level object to the lower one. We call the Wrapfs object the "upper" -one, and the one below we call the "lower" one. Wrapfs stores these -mappings as simple pointers inside the private field of the existing VFS -objects (e.g., dentry->d_fsdata, sb->s_fs_info, and a container for inodes). - -There are two kinds of stackable operations: those that create new VFS -objects and those that don't. - -The following distilled code snippet shows a method which doesn't create a -new object. The method just has to pass it to the lower layer and propagate -any errors back up the VFS: - -int wrapfs_unlink(struct inode *dir, struct dentry *dentry) -{ - int err; - struct inode *lower_dir; - struct dentry *lower_dentry; - lower_dir = get_lower_inode(dir); - lower_dentry = get_lower_dentry(dentry); - err = lower_dir->i_op->unlink(lower_dir, lower_dentry); - return err; -} - -The following code snippet shows a method which creates a new object. After -a lower object gets created, Wrapfs has to also create its own object, and -make the pointer connections between the upper and lower objects (the latter -is done via a helper routine called "interpose"): - -int wrapfs_create(struct inode *dir, struct dentry *dentry, int mode) -{ - int err; - struct dentry *lower_dentry; - struct inode *lower_dir; - lower_dir = wrapfs_lower_inode(dir); - lower_dentry = wrapfs_lower_dentry(dentry); - err = vfs_create(lower_dir, lower_dentry, mode); - if (!err) - err = wrapfs_interpose(dentry, dir->i_sb); - return err; -} - -The wrapfs_unlink code snippet above can be easily modified to change the -behavior of unlink(2). For example, if an ->unlink operation is changed to -->rename, this could become the basis for an "undo" file system; or if the -lower_dentry's name gets encrypted before calling the lower ->unlink, this -could be part of an encryption file system. - ------------------------------------------------------------------------------- -USAGE: - -First, you have to have some pre-existing directory already mounted from any -other file system, say /some/lower/path. Then, to mount wrapfs in -/mnt/wrapfs, on that lower directory, issue this command: - -# mount -t wrapfs /some/lower/path /mnt/wrapfs - -To access the files via Wrapfs, use the mount point /mnt/wrapfs. - ------------------------------------------------------------------------------- -CAVEATS: - -Stacking on NFS. Wrapfs has been tested with LTP, racer, fsx, parallel -compile, and more. It's been tested on top of ext2, ext3, xfs, reiserfs, -and tmpfs -- and passed all tests. However, on top of nfs3, wrapfs has to -treat silly-deleted files as if they don't exist: in ->unlink, if we try to -vfs_unlink an NFS silly-deleted file, NFS returns EBUSY; so we simply ignore -it and return 0 (success) to the VFS. NFS will delete this file later on -anyway. As the VFS also has special handling for silly-deleted files, this -isn't unusual. A cleaner way to handle this in the future is if the VFS -were to handle silly-deleted (aka "delayed-delete") files entirely at the -VFS. - ------------------------------------------------------------------------------- -HISTORY: - -Wrapfs was developed initially in 1994 for Linux 2.1, as part of Erez -Zadok's graduate work at Columbia University. It was designed to be a -flexible null-layer, pass-through, stackable file system, from which other -file systems would be developed and even instantiated automatically using a -high-level language. One of the first file systems developed from Wrapfs -was a simple encryption file system called Cryptfs (eCryptfs is based on -Cryptfs). Other examples include Gzipfs, a stackable compression file -system, and Unionfs, a stackable unification file system. Wrapfs was -integrated into a larger package called fistgen (see www.filesystems.org), -and ported to FreeBSD and Solaris. Wrapfs and fistgen continued to be -maintained for newer versions of kernels, but remained largely standalone -until recently: this release of Wrapfs for Linux represents a clean version -written from scratch. - -Over the past 15+ years, versions of Wrapfs had been used by many users and -companies. At one point or another, the following groups have used stacking -code based on Wrapfs. - -1. PROJECTS: eCryptfs, Unionfs, mini_fo, Aufs, FindFS, StoreCompress, - TestFS, ToPAS, and MFS. - -2. COMPANIES AND RESEARCH LABS: Bell Labs's Plan 9 group, EMC, - Hewlett-Packard, IBM Research Almaden, IBM Research Austin, Red Hat, - SuSE, Sun Microsystems, Veritas, Booyaka, CalSoft (India), Computer Farm, - Deutsche Bank (Germany), DreamWorks LLC, Eli Lilly and Company, FAME - Information Services, GMX AG (Germany), IBM global services (India), IDA - Center for Communications Research, Indra Networks, Inc., Kavi - Corporation, Mendepie, Mitsubishi Electric (Japan), Mobile-Mind, Monster - Labs, Morning Network (Russia), NeST Technologies, Packet General - Networks, Inc., Outstep Technologies, Reflective Systems Group, River - Styx Internet, SARAI Net, Saint-Petersburg Official Web Site (Russia), - Shadow Island Games, TISCover (Germany), Trymedia Systems, Uber Admin, - Videsh Sanchar Nigam Limited (India), Wanadoo (France), and iNsu - Innovations. - -3. UNIVERSITIES: Georgia Institute of Technology, Stanford University, UC - Berkeley, UCLA, University of Maryland, College Park, University of - Michigan, Ben Gurion University (Israel), Clarkson University, Clemson - University, Deutsches Elektronen Synchrotron (Germany), Electronics and - Telecommunications Research Institute (South Korea), Indian Institute of - Technology (India), National Taiwan University, Pune University (India), - The College of William \& Mary, Trinity College (Ireland), Universitaet - Frankfurt am Main (Germany), University Hospital Olomouc (Czech - Republic), and University of Salermo (Italy). - ------------------------------------------------------------------------------- diff --git a/Documentation/media/uapi/v4l/pixfmt-007.rst b/Documentation/media/uapi/v4l/pixfmt-007.rst index 95a23a2..44bb5a7 100644 --- a/Documentation/media/uapi/v4l/pixfmt-007.rst +++ b/Documentation/media/uapi/v4l/pixfmt-007.rst @@ -211,13 +211,7 @@ Colorspace sRGB (V4L2_COLORSPACE_SRGB) The :ref:`srgb` standard defines the colorspace used by most webcams and computer graphics. The default transfer function is ``V4L2_XFER_FUNC_SRGB``. The default Y'CbCr encoding is -``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is limited range. - -Note that the :ref:`sycc` standard specifies full range quantization, -however all current capture hardware supported by the kernel convert -R'G'B' to limited range Y'CbCr. So choosing full range as the default -would break how applications interpret the quantization range. - +``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is full range. The chromaticities of the primary colors and the white reference are: @@ -282,7 +276,7 @@ the following ``V4L2_YCBCR_ENC_601`` encoding as defined by :ref:`sycc`: Y' is clamped to the range [0â¦1] and Cb and Cr are clamped to the range [-0.5â¦0.5]. This transform is identical to one defined in SMPTE -170M/BT.601. The Y'CbCr quantization is limited range. +170M/BT.601. The Y'CbCr quantization is full range. .. _col-adobergb: @@ -294,15 +288,10 @@ The :ref:`adobergb` standard defines the colorspace used by computer graphics that use the AdobeRGB colorspace. This is also known as the :ref:`oprgb` standard. The default transfer function is ``V4L2_XFER_FUNC_ADOBERGB``. The default Y'CbCr encoding is -``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is limited -range. - -Note that the :ref:`oprgb` standard specifies full range quantization, -however all current capture hardware supported by the kernel convert -R'G'B' to limited range Y'CbCr. So choosing full range as the default -would break how applications interpret the quantization range. +``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is full +range. The chromaticities of the primary colors and the white reference +are: -The chromaticities of the primary colors and the white reference are: .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| @@ -355,7 +344,7 @@ the following ``V4L2_YCBCR_ENC_601`` encoding: Y' is clamped to the range [0â¦1] and Cb and Cr are clamped to the range [-0.5â¦0.5]. This transform is identical to one defined in SMPTE -170M/BT.601. The Y'CbCr quantization is limited range. +170M/BT.601. The Y'CbCr quantization is full range. .. _col-bt2020: diff --git a/MAINTAINERS b/MAINTAINERS index 7ef616a..107c10e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -877,8 +877,8 @@ S: Odd fixes F: drivers/hwmon/applesmc.c APPLETALK NETWORK LAYER -L: net...@vger.kernel.org -S: Odd fixes +M: Arnaldo Carvalho de Melo <a...@ghostprotocols.net> +S: Maintained F: drivers/net/appletalk/ F: net/appletalk/ @@ -6727,8 +6727,9 @@ S: Odd Fixes F: drivers/tty/ipwireless/ IPX NETWORK LAYER +M: Arnaldo Carvalho de Melo <a...@ghostprotocols.net> L: net...@vger.kernel.org -S: Odd fixes +S: Maintained F: include/net/ipx.h F: include/uapi/linux/ipx.h F: net/ipx/ @@ -7500,8 +7501,8 @@ S: Maintained F: drivers/misc/lkdtm* LLC (802.2) -L: net...@vger.kernel.org -S: Odd fixes +M: Arnaldo Carvalho de Melo <a...@ghostprotocols.net> +S: Maintained F: include/linux/llc.h F: include/uapi/linux/llc.h F: include/net/llc* @@ -13372,8 +13373,10 @@ S: Maintained F: drivers/input/misc/wistron_btns.c WL3501 WIRELESS PCMCIA CARD DRIVER +M: Arnaldo Carvalho de Melo <a...@ghostprotocols.net> L: linux-wirel...@vger.kernel.org -S: Odd fixes +W: http://oops.ghostprotocols.net:81/blog +S: Maintained F: drivers/net/wireless/wl3501* WOLFSON MICROELECTRONICS DRIVERS @@ -13422,15 +13425,6 @@ F: include/linux/workqueue.h F: kernel/workqueue.c F: Documentation/core-api/workqueue.rst -WRAP FILE SYSTEM -M: Erez Zadok <e...@cs.sunysb.edu> -L: wra...@filesystems.org -W: http://wrapfs.filesystems.org/ -T: git git://git.fsl.cs.sunysb.edu/wrapfs-latest.git -S: Maintained -F: Documentation/filesystems/wrapfs.txt -F: fs/wrapfs/ - X-POWERS MULTIFUNCTION PMIC DEVICE DRIVERS M: Chen-Yu Tsai <w...@csie.org> L: linux-ker...@vger.kernel.org diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 8e15880..93abf8a 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c @@ -347,8 +347,7 @@ early_param("disable_radix", parse_disable_radix); void __init mmu_early_init_devtree(void) { /* Disable radix mode based on kernel command line. */ - /* We don't yet have the machinery to do radix as a guest. */ - if (disable_radix || !(mfmsr() & MSR_HV)) + if (disable_radix) cur_cpu_spec->mmu_features &= ~MMU_FTR_TYPE_RADIX; if (early_radix_enabled()) diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 838f07e..c73a6fc 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -3758,7 +3758,7 @@ static void cfq_init_cfqq(struct cfq_data *cfqd, struct cfq_queue *cfqq, } #ifdef CONFIG_CFQ_GROUP_IOSCHED -static bool check_blkcg_changed(struct cfq_io_cq *cic, struct bio *bio) +static void check_blkcg_changed(struct cfq_io_cq *cic, struct bio *bio) { struct cfq_data *cfqd = cic_to_cfqd(cic); struct cfq_queue *cfqq; @@ -3775,7 +3775,15 @@ static bool check_blkcg_changed(struct cfq_io_cq *cic, struct bio *bio) * spuriously on a newly created cic but there's no harm. */ if (unlikely(!cfqd) || likely(cic->blkcg_serial_nr == serial_nr)) - return nonroot_cg; + return; + + /* + * If we have a non-root cgroup, we can depend on that to + * do proper throttling of writes. Turn off wbt for that + * case, if it was enabled by default. + */ + if (nonroot_cg) + wbt_disable_default(cfqd->queue); /* * Drop reference to queues. New queues will be assigned in new @@ -3796,13 +3804,9 @@ static bool check_blkcg_changed(struct cfq_io_cq *cic, struct bio *bio) } cic->blkcg_serial_nr = serial_nr; - return nonroot_cg; } #else -static inline bool check_blkcg_changed(struct cfq_io_cq *cic, struct bio *bio) -{ - return false; -} +static inline void check_blkcg_changed(struct cfq_io_cq *cic, struct bio *bio) { } #endif /* CONFIG_CFQ_GROUP_IOSCHED */ static struct cfq_queue ** @@ -4444,12 +4448,11 @@ cfq_set_request(struct request_queue *q, struct request *rq, struct bio *bio, const int rw = rq_data_dir(rq); const bool is_sync = rq_is_sync(rq); struct cfq_queue *cfqq; - bool disable_wbt; spin_lock_irq(q->queue_lock); check_ioprio_changed(cic, bio); - disable_wbt = check_blkcg_changed(cic, bio); + check_blkcg_changed(cic, bio); new_queue: cfqq = cic_to_cfqq(cic, is_sync); if (!cfqq || cfqq == &cfqd->oom_cfqq) { @@ -4485,10 +4488,6 @@ new_queue: rq->elv.priv[0] = cfqq; rq->elv.priv[1] = cfqq->cfqg; spin_unlock_irq(q->queue_lock); - - if (disable_wbt) - wbt_disable_default(q); - return 0; } diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index f59771d..aa64448 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -1817,7 +1817,7 @@ int drm_dp_update_payload_part1(struct drm_dp_mst_topology_mgr *mgr) mgr->payloads[i].vcpi = req_payload.vcpi; } else if (mgr->payloads[i].num_slots) { mgr->payloads[i].num_slots = 0; - drm_dp_destroy_payload_step1(mgr, port, mgr->payloads[i].vcpi, &mgr->payloads[i]); + drm_dp_destroy_payload_step1(mgr, port, port->vcpi.vcpi, &mgr->payloads[i]); req_payload.payload_state = mgr->payloads[i].payload_state; mgr->payloads[i].start_slot = 0; } diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c index 4a4f953..fb16070 100644 --- a/drivers/gpu/drm/radeon/radeon_cursor.c +++ b/drivers/gpu/drm/radeon/radeon_cursor.c @@ -205,8 +205,8 @@ static int radeon_cursor_move_locked(struct drm_crtc *crtc, int x, int y) } if (x <= (crtc->x - w) || y <= (crtc->y - radeon_crtc->cursor_height) || - x >= (crtc->x + crtc->mode.hdisplay) || - y >= (crtc->y + crtc->mode.vdisplay)) + x >= (crtc->x + crtc->mode.crtc_hdisplay) || + y >= (crtc->y + crtc->mode.crtc_vdisplay)) goto out_of_bounds; x += xorigin; diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c index e9db857..6d81c56 100644 --- a/drivers/i2c/busses/i2c-designware-core.c +++ b/drivers/i2c/busses/i2c-designware-core.c @@ -475,27 +475,29 @@ static int i2c_dw_wait_bus_not_busy(struct dw_i2c_dev *dev) static void i2c_dw_xfer_init(struct dw_i2c_dev *dev) { struct i2c_msg *msgs = dev->msgs; - u32 ic_con, ic_tar = 0; + u32 ic_tar = 0; /* Disable the adapter */ __i2c_dw_enable_and_wait(dev, false); /* if the slave address is ten bit address, enable 10BITADDR */ - ic_con = dw_readl(dev, DW_IC_CON); - if (msgs[dev->msg_write_idx].flags & I2C_M_TEN) { - ic_con |= DW_IC_CON_10BITADDR_MASTER; + if (dev->dynamic_tar_update_enabled) { /* * If I2C_DYNAMIC_TAR_UPDATE is set, the 10-bit addressing - * mode has to be enabled via bit 12 of IC_TAR register. - * We set it always as I2C_DYNAMIC_TAR_UPDATE can't be - * detected from registers. + * mode has to be enabled via bit 12 of IC_TAR register, + * otherwise bit 4 of IC_CON is used. */ - ic_tar = DW_IC_TAR_10BITADDR_MASTER; + if (msgs[dev->msg_write_idx].flags & I2C_M_TEN) + ic_tar = DW_IC_TAR_10BITADDR_MASTER; } else { - ic_con &= ~DW_IC_CON_10BITADDR_MASTER; - } + u32 ic_con = dw_readl(dev, DW_IC_CON); - dw_writel(dev, ic_con, DW_IC_CON); + if (msgs[dev->msg_write_idx].flags & I2C_M_TEN) + ic_con |= DW_IC_CON_10BITADDR_MASTER; + else + ic_con &= ~DW_IC_CON_10BITADDR_MASTER; + dw_writel(dev, ic_con, DW_IC_CON); + } /* * Set the slave (target) address and enable 10-bit addressing mode @@ -961,6 +963,7 @@ int i2c_dw_probe(struct dw_i2c_dev *dev) { struct i2c_adapter *adap = &dev->adapter; int r; + u32 reg; init_completion(&dev->cmd_complete); @@ -968,6 +971,26 @@ int i2c_dw_probe(struct dw_i2c_dev *dev) if (r) return r; + r = i2c_dw_acquire_lock(dev); + if (r) + return r; + + /* + * Test if dynamic TAR update is enabled in this controller by writing + * to IC_10BITADDR_MASTER field in IC_CON: when it is enabled this + * field is read-only so it should not succeed + */ + reg = dw_readl(dev, DW_IC_CON); + dw_writel(dev, reg ^ DW_IC_CON_10BITADDR_MASTER, DW_IC_CON); + + if ((dw_readl(dev, DW_IC_CON) & DW_IC_CON_10BITADDR_MASTER) == + (reg & DW_IC_CON_10BITADDR_MASTER)) { + dev->dynamic_tar_update_enabled = true; + dev_dbg(dev->dev, "Dynamic TAR update enabled"); + } + + i2c_dw_release_lock(dev); + snprintf(adap->name, sizeof(adap->name), "Synopsys DesignWare I2C adapter"); adap->retries = 3; diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h index c1db3a5..26250b4 100644 --- a/drivers/i2c/busses/i2c-designware-core.h +++ b/drivers/i2c/busses/i2c-designware-core.h @@ -125,6 +125,7 @@ struct dw_i2c_dev { int (*acquire_lock)(struct dw_i2c_dev *dev); void (*release_lock)(struct dw_i2c_dev *dev); bool pm_runtime_disabled; + bool dynamic_tar_update_enabled; }; #define ACCESS_SWAP 0x00000001 diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c index 1e1d0ad..fa598f7 100644 --- a/drivers/input/mouse/elan_i2c_core.c +++ b/drivers/input/mouse/elan_i2c_core.c @@ -1231,7 +1231,6 @@ static const struct acpi_device_id elan_acpi_id[] = { { "ELAN0000", 0 }, { "ELAN0100", 0 }, { "ELAN0600", 0 }, - { "ELAN0605", 0 }, { "ELAN1000", 0 }, { } }; diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c index ccda41c..87a6b65 100644 --- a/drivers/media/cec/cec-adap.c +++ b/drivers/media/cec/cec-adap.c @@ -612,7 +612,8 @@ int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg, } memset(msg->msg + msg->len, 0, sizeof(msg->msg) - msg->len); if (msg->len == 1) { - if (cec_msg_destination(msg) == 0xf) { + if (cec_msg_initiator(msg) != 0xf || + cec_msg_destination(msg) == 0xf) { dprintk(1, "cec_transmit_msg: invalid poll message\n"); return -EINVAL; } @@ -637,7 +638,7 @@ int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg, dprintk(1, "cec_transmit_msg: destination is the adapter itself\n"); return -EINVAL; } - if (msg->len > 1 && adap->is_configured && + if (cec_msg_initiator(msg) != 0xf && !cec_has_log_addr(adap, cec_msg_initiator(msg))) { dprintk(1, "cec_transmit_msg: initiator has unknown logical address %d\n", cec_msg_initiator(msg)); @@ -1071,7 +1072,7 @@ static int cec_config_log_addr(struct cec_adapter *adap, /* Send poll message */ msg.len = 1; - msg.msg[0] = (log_addr << 4) | log_addr; + msg.msg[0] = 0xf0 | log_addr; err = cec_transmit_msg_fh(adap, &msg, NULL, true); /* diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c index 8c1f926..a4dcaec 100644 --- a/drivers/media/usb/siano/smsusb.c +++ b/drivers/media/usb/siano/smsusb.c @@ -218,30 +218,22 @@ static int smsusb_start_streaming(struct smsusb_device_t *dev) static int smsusb_sendrequest(void *context, void *buffer, size_t size) { struct smsusb_device_t *dev = (struct smsusb_device_t *) context; - struct sms_msg_hdr *phdr; - int dummy, ret; + struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) buffer; + int dummy; if (dev->state != SMSUSB_ACTIVE) { pr_debug("Device not active yet\n"); return -ENOENT; } - phdr = kmalloc(size, GFP_KERNEL); - if (!phdr) - return -ENOMEM; - memcpy(phdr, buffer, size); - pr_debug("sending %s(%d) size: %d\n", smscore_translate_msg(phdr->msg_type), phdr->msg_type, phdr->msg_length); smsendian_handle_tx_message((struct sms_msg_data *) phdr); - smsendian_handle_message_header((struct sms_msg_hdr *)phdr); - ret = usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2), - phdr, size, &dummy, 1000); - - kfree(phdr); - return ret; + smsendian_handle_message_header((struct sms_msg_hdr *)buffer); + return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2), + buffer, size, &dummy, 1000); } static char *smsusb1_fw_lkup[] = { diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 0fccca0..b61b52f9 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1706,10 +1706,10 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, err = mmc_select_hs400(card); if (err) goto free_card; - } else { + } else if (mmc_card_hs(card)) { /* Select the desired bus width optionally */ err = mmc_select_bus_width(card); - if (err > 0 && mmc_card_hs(card)) { + if (err > 0) { err = mmc_select_hs_ddr(card); if (err) goto free_card; diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 8be7034..38160c2 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -2910,7 +2910,6 @@ static void set_multicast_list(struct net_device *ndev) struct netdev_hw_addr *ha; unsigned int i, bit, data, crc, tmp; unsigned char hash; - unsigned int hash_high = 0, hash_low = 0; if (ndev->flags & IFF_PROMISC) { tmp = readl(fep->hwp + FEC_R_CNTRL); @@ -2933,7 +2932,11 @@ static void set_multicast_list(struct net_device *ndev) return; } - /* Add the addresses in hash register */ + /* Clear filter and add the addresses in hash register + */ + writel(0, fep->hwp + FEC_GRP_HASH_TABLE_HIGH); + writel(0, fep->hwp + FEC_GRP_HASH_TABLE_LOW); + netdev_for_each_mc_addr(ha, ndev) { /* calculate crc32 value of mac address */ crc = 0xffffffff; @@ -2951,14 +2954,16 @@ static void set_multicast_list(struct net_device *ndev) */ hash = (crc >> (32 - FEC_HASH_BITS)) & 0x3f; - if (hash > 31) - hash_high |= 1 << (hash - 32); - else - hash_low |= 1 << hash; + if (hash > 31) { + tmp = readl(fep->hwp + FEC_GRP_HASH_TABLE_HIGH); + tmp |= 1 << (hash - 32); + writel(tmp, fep->hwp + FEC_GRP_HASH_TABLE_HIGH); + } else { + tmp = readl(fep->hwp + FEC_GRP_HASH_TABLE_LOW); + tmp |= 1 << hash; + writel(tmp, fep->hwp + FEC_GRP_HASH_TABLE_LOW); + } } - - writel(hash_high, fep->hwp + FEC_GRP_HASH_TABLE_HIGH); - writel(hash_low, fep->hwp + FEC_GRP_HASH_TABLE_LOW); } /* Set a MAC change in hardware. */ diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index a07b8d7..c125966 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -189,10 +189,9 @@ static int alloc_long_term_buff(struct ibmvnic_adapter *adapter, } ltb->map_id = adapter->map_id; adapter->map_id++; - - init_completion(&adapter->fw_done); send_request_map(adapter, ltb->addr, ltb->size, ltb->map_id); + init_completion(&adapter->fw_done); wait_for_completion(&adapter->fw_done); return 0; } @@ -506,7 +505,7 @@ rx_pool_alloc_failed: adapter->rx_pool = NULL; rx_pool_arr_alloc_failed: for (i = 0; i < adapter->req_rx_queues; i++) - napi_disable(&adapter->napi[i]); + napi_enable(&adapter->napi[i]); alloc_napi_failed: return -ENOMEM; } @@ -1122,10 +1121,10 @@ static void ibmvnic_get_ethtool_stats(struct net_device *dev, crq.request_statistics.ioba = cpu_to_be32(adapter->stats_token); crq.request_statistics.len = cpu_to_be32(sizeof(struct ibmvnic_statistics)); + ibmvnic_send_crq(adapter, &crq); /* Wait for data to be written */ init_completion(&adapter->stats_done); - ibmvnic_send_crq(adapter, &crq); wait_for_completion(&adapter->stats_done); for (i = 0; i < ARRAY_SIZE(ibmvnic_stats); i++) @@ -1497,7 +1496,7 @@ static void init_sub_crqs(struct ibmvnic_adapter *adapter, int retry) adapter->req_rx_queues = adapter->opt_rx_comp_queues; adapter->req_rx_add_queues = adapter->max_rx_add_queues; - adapter->req_mtu = adapter->netdev->mtu + ETH_HLEN; + adapter->req_mtu = adapter->max_mtu; } total_queues = adapter->req_tx_queues + adapter->req_rx_queues; @@ -2186,12 +2185,12 @@ static void handle_error_info_rsp(union ibmvnic_crq *crq, if (!found) { dev_err(dev, "Couldn't find error id %x\n", - be32_to_cpu(crq->request_error_rsp.error_id)); + crq->request_error_rsp.error_id); return; } dev_err(dev, "Detailed info for error id %x:", - be32_to_cpu(crq->request_error_rsp.error_id)); + crq->request_error_rsp.error_id); for (i = 0; i < error_buff->len; i++) { pr_cont("%02x", (int)error_buff->buff[i]); @@ -2270,8 +2269,8 @@ static void handle_error_indication(union ibmvnic_crq *crq, dev_err(dev, "Firmware reports %serror id %x, cause %d\n", crq->error_indication. flags & IBMVNIC_FATAL_ERROR ? "FATAL " : "", - be32_to_cpu(crq->error_indication.error_id), - be16_to_cpu(crq->error_indication.error_cause)); + crq->error_indication.error_id, + crq->error_indication.error_cause); error_buff = kmalloc(sizeof(*error_buff), GFP_ATOMIC); if (!error_buff) @@ -2389,10 +2388,10 @@ static void handle_request_cap_rsp(union ibmvnic_crq *crq, case PARTIALSUCCESS: dev_info(dev, "req=%lld, rsp=%ld in %s queue, retrying.\n", *req_value, - (long int)be64_to_cpu(crq->request_capability_rsp. + (long int)be32_to_cpu(crq->request_capability_rsp. number), name); release_sub_crqs_no_irqs(adapter); - *req_value = be64_to_cpu(crq->request_capability_rsp.number); + *req_value = be32_to_cpu(crq->request_capability_rsp.number); init_sub_crqs(adapter, 1); return; default: @@ -2627,12 +2626,12 @@ static void handle_query_cap_rsp(union ibmvnic_crq *crq, break; case MIN_MTU: adapter->min_mtu = be64_to_cpu(crq->query_capability.number); - netdev->min_mtu = adapter->min_mtu - ETH_HLEN; + netdev->min_mtu = adapter->min_mtu; netdev_dbg(netdev, "min_mtu = %lld\n", adapter->min_mtu); break; case MAX_MTU: adapter->max_mtu = be64_to_cpu(crq->query_capability.number); - netdev->max_mtu = adapter->max_mtu - ETH_HLEN; + netdev->max_mtu = adapter->max_mtu; netdev_dbg(netdev, "max_mtu = %lld\n", adapter->max_mtu); break; case MAX_MULTICAST_FILTERS: @@ -2800,9 +2799,9 @@ static ssize_t trace_read(struct file *file, char __user *user_buf, size_t len, crq.collect_fw_trace.correlator = adapter->ras_comps[num].correlator; crq.collect_fw_trace.ioba = cpu_to_be32(trace_tok); crq.collect_fw_trace.len = adapter->ras_comps[num].trace_buff_size; + ibmvnic_send_crq(adapter, &crq); init_completion(&adapter->fw_done); - ibmvnic_send_crq(adapter, &crq); wait_for_completion(&adapter->fw_done); if (*ppos + len > be32_to_cpu(adapter->ras_comps[num].trace_buff_size)) @@ -3582,9 +3581,9 @@ static int ibmvnic_dump_show(struct seq_file *seq, void *v) memset(&crq, 0, sizeof(crq)); crq.request_dump_size.first = IBMVNIC_CRQ_CMD; crq.request_dump_size.cmd = REQUEST_DUMP_SIZE; + ibmvnic_send_crq(adapter, &crq); init_completion(&adapter->fw_done); - ibmvnic_send_crq(adapter, &crq); wait_for_completion(&adapter->fw_done); seq_write(seq, adapter->dump_data, adapter->dump_data_size); @@ -3630,8 +3629,8 @@ static void handle_crq_init_rsp(struct work_struct *work) } } - reinit_completion(&adapter->init_done); send_version_xchg(adapter); + reinit_completion(&adapter->init_done); if (!wait_for_completion_timeout(&adapter->init_done, timeout)) { dev_err(dev, "Passive init timeout\n"); goto task_failed; @@ -3641,9 +3640,9 @@ static void handle_crq_init_rsp(struct work_struct *work) if (adapter->renegotiate) { adapter->renegotiate = false; release_sub_crqs_no_irqs(adapter); + send_cap_queries(adapter); reinit_completion(&adapter->init_done); - send_cap_queries(adapter); if (!wait_for_completion_timeout(&adapter->init_done, timeout)) { dev_err(dev, "Passive init timeout\n"); @@ -3657,7 +3656,9 @@ static void handle_crq_init_rsp(struct work_struct *work) goto task_failed; netdev->real_num_tx_queues = adapter->req_tx_queues; - netdev->mtu = adapter->req_mtu - ETH_HLEN; + netdev->mtu = adapter->req_mtu; + netdev->min_mtu = adapter->min_mtu; + netdev->max_mtu = adapter->max_mtu; if (adapter->failover) { adapter->failover = false; @@ -3771,9 +3772,9 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id) adapter->debugfs_dump = ent; } } + ibmvnic_send_crq_init(adapter); init_completion(&adapter->init_done); - ibmvnic_send_crq_init(adapter); if (!wait_for_completion_timeout(&adapter->init_done, timeout)) return 0; @@ -3781,9 +3782,9 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id) if (adapter->renegotiate) { adapter->renegotiate = false; release_sub_crqs_no_irqs(adapter); + send_cap_queries(adapter); reinit_completion(&adapter->init_done); - send_cap_queries(adapter); if (!wait_for_completion_timeout(&adapter->init_done, timeout)) return 0; @@ -3797,7 +3798,7 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id) } netdev->real_num_tx_queues = adapter->req_tx_queues; - netdev->mtu = adapter->req_mtu - ETH_HLEN; + netdev->mtu = adapter->req_mtu; rc = register_netdev(netdev); if (rc) { diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index 2ebbe80..c5282b6 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -1087,14 +1087,10 @@ int mlx5e_stats_flower(struct mlx5e_priv *priv, mlx5_fc_query_cached(counter, &bytes, &packets, &lastuse); - preempt_disable(); - tcf_exts_to_list(f->exts, &actions); list_for_each_entry(a, &actions, list) tcf_action_stats_update(a, bytes, packets, lastuse); - preempt_enable(); - return 0; } diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 6508822..b203143 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -3160,7 +3160,7 @@ static int cpsw_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct net_device *ndev = platform_get_drvdata(pdev); - struct cpsw_common *cpsw = ndev_to_cpsw(ndev); + struct cpsw_common *cpsw = netdev_priv(ndev); /* Select default pin state */ pinctrl_pm_select_default_state(dev); diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c index aa02a03..93dc10b 100644 --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c @@ -100,14 +100,6 @@ /* BUFFER_ALIGN(adr) calculates the number of bytes to the next alignment. */ #define BUFFER_ALIGN(adr) ((ALIGNMENT - ((u32) adr)) % ALIGNMENT) -#ifdef __BIG_ENDIAN -#define xemaclite_readl ioread32be -#define xemaclite_writel iowrite32be -#else -#define xemaclite_readl ioread32 -#define xemaclite_writel iowrite32 -#endif - /** * struct net_local - Our private per device data * @ndev: instance of the network device @@ -164,15 +156,15 @@ static void xemaclite_enable_interrupts(struct net_local *drvdata) u32 reg_data; /* Enable the Tx interrupts for the first Buffer */ - reg_data = xemaclite_readl(drvdata->base_addr + XEL_TSR_OFFSET); - xemaclite_writel(reg_data | XEL_TSR_XMIT_IE_MASK, - drvdata->base_addr + XEL_TSR_OFFSET); + reg_data = __raw_readl(drvdata->base_addr + XEL_TSR_OFFSET); + __raw_writel(reg_data | XEL_TSR_XMIT_IE_MASK, + drvdata->base_addr + XEL_TSR_OFFSET); /* Enable the Rx interrupts for the first buffer */ - xemaclite_writel(XEL_RSR_RECV_IE_MASK, drvdata->base_addr + XEL_RSR_OFFSET); + __raw_writel(XEL_RSR_RECV_IE_MASK, drvdata->base_addr + XEL_RSR_OFFSET); /* Enable the Global Interrupt Enable */ - xemaclite_writel(XEL_GIER_GIE_MASK, drvdata->base_addr + XEL_GIER_OFFSET); + __raw_writel(XEL_GIER_GIE_MASK, drvdata->base_addr + XEL_GIER_OFFSET); } /** @@ -187,17 +179,17 @@ static void xemaclite_disable_interrupts(struct net_local *drvdata) u32 reg_data; /* Disable the Global Interrupt Enable */ - xemaclite_writel(XEL_GIER_GIE_MASK, drvdata->base_addr + XEL_GIER_OFFSET); + __raw_writel(XEL_GIER_GIE_MASK, drvdata->base_addr + XEL_GIER_OFFSET); /* Disable the Tx interrupts for the first buffer */ - reg_data = xemaclite_readl(drvdata->base_addr + XEL_TSR_OFFSET); - xemaclite_writel(reg_data & (~XEL_TSR_XMIT_IE_MASK), - drvdata->base_addr + XEL_TSR_OFFSET); + reg_data = __raw_readl(drvdata->base_addr + XEL_TSR_OFFSET); + __raw_writel(reg_data & (~XEL_TSR_XMIT_IE_MASK), + drvdata->base_addr + XEL_TSR_OFFSET); /* Disable the Rx interrupts for the first buffer */ - reg_data = xemaclite_readl(drvdata->base_addr + XEL_RSR_OFFSET); - xemaclite_writel(reg_data & (~XEL_RSR_RECV_IE_MASK), - drvdata->base_addr + XEL_RSR_OFFSET); + reg_data = __raw_readl(drvdata->base_addr + XEL_RSR_OFFSET); + __raw_writel(reg_data & (~XEL_RSR_RECV_IE_MASK), + drvdata->base_addr + XEL_RSR_OFFSET); } /** @@ -329,7 +321,7 @@ static int xemaclite_send_data(struct net_local *drvdata, u8 *data, byte_count = ETH_FRAME_LEN; /* Check if the expected buffer is available */ - reg_data = xemaclite_readl(addr + XEL_TSR_OFFSET); + reg_data = __raw_readl(addr + XEL_TSR_OFFSET); if ((reg_data & (XEL_TSR_XMIT_BUSY_MASK | XEL_TSR_XMIT_ACTIVE_MASK)) == 0) { @@ -342,7 +334,7 @@ static int xemaclite_send_data(struct net_local *drvdata, u8 *data, addr = (void __iomem __force *)((u32 __force)addr ^ XEL_BUFFER_OFFSET); - reg_data = xemaclite_readl(addr + XEL_TSR_OFFSET); + reg_data = __raw_readl(addr + XEL_TSR_OFFSET); if ((reg_data & (XEL_TSR_XMIT_BUSY_MASK | XEL_TSR_XMIT_ACTIVE_MASK)) != 0) @@ -353,16 +345,16 @@ static int xemaclite_send_data(struct net_local *drvdata, u8 *data, /* Write the frame to the buffer */ xemaclite_aligned_write(data, (u32 __force *) addr, byte_count); - xemaclite_writel((byte_count & XEL_TPLR_LENGTH_MASK), - addr + XEL_TPLR_OFFSET); + __raw_writel((byte_count & XEL_TPLR_LENGTH_MASK), + addr + XEL_TPLR_OFFSET); /* Update the Tx Status Register to indicate that there is a * frame to send. Set the XEL_TSR_XMIT_ACTIVE_MASK flag which
_______________________________________________ unionfs-cvs mailing list: http://unionfs.filesystems.org/ unionfs-cvs@fsl.cs.sunysb.edu http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs