Linux 3.0.11
I'm announcing the release of the 3.0.11 kernel.
All users of the 3.0 kernel series must upgrade.
The updated 3.0.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.0.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/arm/kernel/head.S | 2 drivers/base/core.c | 3 + drivers/base/node.c | 14 +++-- drivers/gpu/drm/i915/i915_drv.h | 1 drivers/gpu/drm/i915/i915_reg.h | 9 +++ drivers/gpu/drm/i915/i915_suspend.c | 2 drivers/gpu/drm/i915/intel_display.c | 42 +++++++++++++++-- drivers/media/video/saa7164/saa7164-cards.c | 66 ++++++++++++++++++++++++++++ drivers/media/video/saa7164/saa7164-dvb.c | 1 drivers/media/video/saa7164/saa7164.h | 1 drivers/misc/Kconfig | 15 +++--- drivers/misc/pch_phub.c | 22 ++++++++- drivers/misc/spear13xx_pcie_gadget.c | 2 drivers/net/wireless/libertas/if_spi.c | 1 drivers/net/wireless/rt2x00/rt2x00.h | 1 drivers/net/wireless/rt2x00/rt2x00dev.c | 22 ++++++++- drivers/scsi/aacraid/linit.c | 4 + drivers/scsi/hpsa.c | 5 ++ drivers/scsi/scsi_scan.c | 6 -- drivers/tty/hvc/hvc_dcc.c | 2 drivers/tty/serial/Kconfig | 14 ++--- drivers/tty/serial/pch_uart.c | 13 ++++- drivers/tty/tty_ldisc.c | 30 +++++++++--- drivers/usb/class/cdc-acm.c | 8 ++- drivers/usb/core/hub.c | 6 ++ drivers/usb/core/quirks.c | 27 +++++++++++ drivers/usb/host/ehci-sched.c | 15 ++++-- drivers/usb/host/pci-quirks.c | 7 +- drivers/usb/host/xhci-mem.c | 5 -- drivers/usb/host/xhci-ring.c | 13 ++--- drivers/usb/host/xhci.c | 34 +++++++------- drivers/usb/serial/ark3116.c | 10 ++-- drivers/usb/serial/ftdi_sio.c | 14 ++++- drivers/usb/serial/option.c | 23 +++++++++ drivers/usb/serial/pl2303.c | 1 drivers/usb/serial/pl2303.h | 4 - drivers/usb/storage/protocol.c | 7 +- fs/nfs/dir.c | 2 fs/nfs/file.c | 32 +++++++++++++ fs/nfs/inode.c | 2 fs/nfs/nfs3proc.c | 1 fs/nfs/nfs4proc.c | 1 fs/nfs/proc.c | 1 fs/xfs/linux-2.6/xfs_buf.h | 1 fs/xfs/linux-2.6/xfs_file.c | 34 +++++++++++--- fs/xfs/linux-2.6/xfs_iops.c | 16 +++++- fs/xfs/linux-2.6/xfs_super.c | 34 +++----------- fs/xfs/quota/xfs_qm.c | 3 - fs/xfs/xfs_buf_item.c | 1 fs/xfs/xfs_mount.c | 29 ++++-------- fs/xfs/xfs_vnodeops.c | 14 ++++- include/linux/nfs_fs.h | 3 + include/linux/nfs_xdr.h | 1 kernel/irq/spurious.c | 2 net/ipv6/ip6_tunnel.c | 8 ++- net/mac80211/rx.c | 9 ++- net/mac80211/util.c | 4 + net/wireless/nl80211.c | 3 - net/wireless/reg.c | 3 + 60 files changed, 487 insertions(+), 171 deletions(-)
Adam Jackson (1):
drm/i915/pch: Save/restore PCH_PORT_HOTPLUG across suspend
Alan Stern (3):
USB: XHCI: resume root hubs when the controller resumes
USB: workaround for bug in old version of GCC
usb-storage: Accept 8020i-protocol commands longer than 12 bytes
Andrew Worsley (1):
USB: Fix Corruption issue in USB ftdi driver ftdi_sio.c
Axel Lin (1):
pcie-gadget-spear: Add "platform:" prefix for platform modalias
Bart Hartgers (1):
USB: ark3116 initialisation fix
Carlos Maiolino (1):
xfs: Fix possible memory corruption in xfs_readlink
Catalin Marinas (1):
ARM: 7150/1: Allow kernel unaligned accesses on ARMv6+ processors
Christoph Hellwig (5):
xfs: fix error handling for synchronous writes
xfs: fix xfs_mark_inode_dirty during umount
xfs: avoid direct I/O write vs buffered I/O race
xfs: fix buffer flushing during unmount
xfs: fix ->write_inode return values
Claudio Scordino (1):
drivers/base/node.c: fix compilation error with older versions of gcc
Dave Chinner (1):
xfs: dont serialise direct IO reads on page cache
Don Zickus (2):
usb, xhci: Clear warm reset change event during init usb, xhci: fix lockdep warning on endpoint timeout
Edward Donovan (1):
genirq: Fix irqfixup, irqpoll regression
Ferenc Wagner (1):
USB: option: add PID of Huawei E173s 3G modem
Gertjan van Wingerde (1):
rt2x00: Fix sleep-while-atomic bug in powersaving code.
Greg Kroah-Hartman (1):
Linux 3.0.11
Havard Skinnemoen (1):
USB: cdc-acm: Fix disconnect() vs close() race
James Bottomley (1):
fix WARNING: at drivers/scsi/scsi_lib.c:1704
Jeff Layton (1):
nfs: when attempting to open a directory, fall back on normal lookup (try #5)
Jesper Juhl (1):
Net, libertas: Resolve memory leak in if_spi_host_to_card()
Jesse Barnes (2):
drm/i915: fix IVB cursor support
drm/i915: always set FDI composite sync bit
Jiri Slaby (3):
TTY: ldisc, allow waiting for ldisc arbitrarily long
TTY: ldisc, move wait idle to caller
TTY: ldisc, wait for ldisc infinitely in hangup
Johannes Berg (3):
mac80211: fix NULL dereference in radiotap code
mac80211: fix bug in ieee80211_build_probe_req
nl80211: fix HT capability attribute validation
Josh Boyer (2):
ip6_tunnel: copy parms.name after register_netdevice
USB: add quirk for Logitech C600 web cam
Luis R. Rodriguez (1):
cfg80211: fix bug on regulatory core exit on access to last_request
Matthew Garrett (1):
hpsa: Disable ASPM
Mitsuo Hayasaka (2):
xfs: Return -EIO when xfs_vn_getattr() failed
xfs: use doalloc flag in xfs_qm_dqattach_one()
Peter Chen (1):
PM / driver core: disable device's runtime PM during shutdown
Sarah Sharp (1):
xhci: Set slot and ep0 flags for address command.
Stephen Boyd (1):
tty: hvc_dcc: Fix duplicate character inputs
Thomas Poussevin (1):
USB: EHCI: fix HUB TT scheduling issue with iso transfer
Tomoya MORINAGA (5):
pch_phub: Support new device LAPIS Semiconductor ML7831 IOH
pch_phub: Fix MAC address writing issue for LAPIS ML7831
pch_uart: Fix hw-flow control issue
pch_uart: Fix DMA resource leak issue
pch_uart: Support new device LAPIS Semiconductor ML7831 IOH
Tony Jago (1):
saa7164: Add support for another HVR2200 hardware revision
Vasily Averin (1):
aacraid: controller hangs if kernel uses non-default ASPM policy
sordna (1):
USB: quirks: adding more quirky webcams to avoid squeaky audio
wangyanqing (1):
USB: serial: pl2303: rm duplicate id
[email protected] (1):
USB: option: release new PID for ZTE 3G modem
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 0 -SUBLEVEL = 10 +SUBLEVEL = 11 EXTRAVERSION = NAME = Sneaky Weasel
arch/arm/kernel/head.S +1 -1
@@ -348,7 +348,7 @@ __secondary_data: * r13 = *virtual* address to jump to upon completion */ __enable_mmu: -#ifdef CONFIG_ALIGNMENT_TRAP +#if defined(CONFIG_ALIGNMENT_TRAP) && __LINUX_ARM_ARCH__ < 6 orr r0, r0, #CR_A #else bic r0, r0, #CR_A
drivers/base/core.c +3 -0
@@ -22,6 +22,7 @@#include <linux/kallsyms.h> #include <linux/mutex.h> #include <linux/async.h> +#include <linux/pm_runtime.h> #include "base.h" #include "power/power.h"
@@ -1742,6 +1743,8 @@ void device_shutdown(void)*/ list_del_init (&dev->kobj.entry);spin_unlock (&devices_kset->list_lock); +/* Disable all device's runtime power management */ +pm_runtime_disable (dev);if (dev->bus && dev->bus->shutdown) {dev_dbg (dev,"shutdown\n" );
drivers/base/node.c +8 -6
@@ -127,12 +127,13 @@ static ssize_t node_read_meminfo(struct sys_device * dev, nid,K (node_page_state (nid,NR_WRITEBACK )), nid,K (node_page_state (nid,NR_FILE_PAGES )), nid,K (node_page_state (nid,NR_FILE_MAPPED )), - nid,K (node_page_state (nid,NR_ANON_PAGES ) #ifdef CONFIG_TRANSPARENT_HUGEPAGE + nid,K (node_page_state (nid,NR_ANON_PAGES ) +node_page_state (nid,NR_ANON_TRANSPARENT_HUGEPAGES ) * -HPAGE_PMD_NR +HPAGE_PMD_NR ), +#else + nid,K (node_page_state (nid,NR_ANON_PAGES )), #endif - ), nid,K (node_page_state (nid,NR_SHMEM )), nid,node_page_state (nid,NR_KERNEL_STACK ) * THREAD_SIZE / 1024,
@@ -143,13 +144,14 @@ static ssize_t node_read_meminfo(struct sys_device * dev, nid,K (node_page_state (nid,NR_SLAB_RECLAIMABLE ) +node_page_state (nid,NR_SLAB_UNRECLAIMABLE )), nid,K (node_page_state (nid,NR_SLAB_RECLAIMABLE )), - nid,K (node_page_state (nid,NR_SLAB_UNRECLAIMABLE )) #ifdef CONFIG_TRANSPARENT_HUGEPAGE + nid,K (node_page_state (nid,NR_SLAB_UNRECLAIMABLE )) , nid,K (node_page_state (nid,NR_ANON_TRANSPARENT_HUGEPAGES ) * -HPAGE_PMD_NR ) + HPAGE_PMD_NR)); +#else + nid, K(node_page_state(nid, NR_SLAB_UNRECLAIMABLE)));#endif - ); n +=hugetlb_report_node_meminfo (nid, buf + n);return n; }
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -541,6 +541,7 @@ typedef struct drm_i915_private {u32 savePIPEB_LINK_M1;u32 savePIPEB_LINK_N1;u32 saveMCHBAR_RENDER_STANDBY; +u32 savePCH_PORT_HOTPLUG;struct {/** Bridge to intel-gtt-ko */
drivers/gpu/drm/i915/i915_reg.h +9 -0
@@ -2544,10 +2544,18 @@#define _CURBBASE 0x700c4#define _CURBPOS 0x700c8 +#define _CURBCNTR_IVB 0x71080 +#define _CURBBASE_IVB 0x71084 +#define _CURBPOS_IVB 0x71088 +#define CURCNTR (pipe) _PIPE(pipe, _CURACNTR, _CURBCNTR)#define CURBASE (pipe) _PIPE(pipe, _CURABASE, _CURBBASE)#define CURPOS (pipe) _PIPE(pipe, _CURAPOS, _CURBPOS) +#define CURCNTR_IVB (pipe) _PIPE(pipe, _CURACNTR, _CURBCNTR_IVB) +#define CURBASE_IVB (pipe) _PIPE(pipe, _CURABASE, _CURBBASE_IVB) +#define CURPOS_IVB (pipe) _PIPE(pipe, _CURAPOS, _CURBPOS_IVB) +/* Display A control */ #define _DSPACNTR 0x70180#define DISPLAY_PLANE_ENABLE (1<<31)
@@ -3133,6 +3141,7 @@#define FDI_LINK_TRAIN_NONE_IVB (3<<8)/* both Tx and Rx */ +#define FDI_COMPOSITE_SYNC (1<<11)#define FDI_LINK_TRAIN_AUTO (1<<10)#define FDI_SCRAMBLING_ENABLE (0<<7)#define FDI_SCRAMBLING_DISABLE (1<<7)
drivers/gpu/drm/i915/i915_suspend.c +2 -0
@@ -814,6 +814,7 @@ int i915_save_state(struct drm_device *dev) dev_priv->saveFDI_RXB_IMR =I915_READ (_FDI_RXB_IMR); dev_priv->saveMCHBAR_RENDER_STANDBY =I915_READ (RSTDBYCTL ); + dev_priv->savePCH_PORT_HOTPLUG =I915_READ (PCH_PORT_HOTPLUG ); }else { dev_priv->saveIER =I915_READ (IER ); dev_priv->saveIMR =I915_READ (IMR );
@@ -865,6 +866,7 @@ int i915_restore_state(struct drm_device *dev)I915_WRITE (GTIMR , dev_priv->saveGTIMR);I915_WRITE (_FDI_RXA_IMR, dev_priv->saveFDI_RXA_IMR);I915_WRITE (_FDI_RXB_IMR, dev_priv->saveFDI_RXB_IMR); +I915_WRITE (PCH_PORT_HOTPLUG , dev_priv->savePCH_PORT_HOTPLUG); }else {I915_WRITE (IER , dev_priv->saveIER);I915_WRITE (IMR , dev_priv->saveIMR);
drivers/gpu/drm/i915/intel_display.c +37 -5
66 lines not on this page · raw message
drivers/media/video/saa7164/saa7164-cards.c +66 -0
90 lines not on this page · raw message
drivers/media/video/saa7164/saa7164-dvb.c +1 -0
@@ -475,6 +475,7 @@ int saa7164_dvb_register(struct saa7164_port *port)case SAA7164_BOARD_HAUPPAUGE_HVR2200 :case SAA7164_BOARD_HAUPPAUGE_HVR2200_2 :case SAA7164_BOARD_HAUPPAUGE_HVR2200_3 : +case SAA7164_BOARD_HAUPPAUGE_HVR2200_4 : i2c_bus = &dev->i2c_bus[port->nr +1 ];switch (port->nr) {case 0 :
drivers/media/video/saa7164/saa7164.h +1 -0
@@ -83,6 +83,7 @@#define SAA7164_BOARD_HAUPPAUGE_HVR2200_3 6#define SAA7164_BOARD_HAUPPAUGE_HVR2250_2 7#define SAA7164_BOARD_HAUPPAUGE_HVR2250_3 8 +#define SAA7164_BOARD_HAUPPAUGE_HVR2200_4 9#define SAA7164_MAX_UNITS 8#define SAA7164_TS_NUMBER_OF_LINES 312
drivers/misc/Kconfig +8 -7
@@ -471,7 +471,7 @@ config BMP085 module will be called bmp085. config PCH_PHUB - tristate "Intel EG20T PCH / OKI SEMICONDUCTOR IOH(ML7213/ML7223) PHUB" + tristate "Intel EG20T PCH/LAPIS Semicon IOH(ML7213/ML7223/ML7831) PHUB" depends on PCI help This driver is for PCH(Platform controller Hub) PHUB(Packet Hub) of
@@ -479,12 +479,13 @@ config PCH_PHUB processor. The Topcliff has MAC address and Option ROM data in SROM. This driver can access MAC address and Option ROM data in SROM. - This driver also can be used for OKI SEMICONDUCTOR IOH(Input/ - Output Hub), ML7213 and ML7223. - ML7213 IOH is for IVI(In-Vehicle Infotainment) use and ML7223 IOH is - for MP(Media Phone) use. - ML7213/ML7223 is companion chip for Intel Atom E6xx series. - ML7213/ML7223 is completely compatible for Intel EG20T PCH. + This driver also can be used for LAPIS Semiconductor's IOH, + ML7213/ML7223/ML7831. + ML7213 which is for IVI(In-Vehicle Infotainment) use. + ML7223 IOH is for MP(Media Phone) use. + ML7831 IOH is for general purpose use. + ML7213/ML7223/ML7831 is companion chip for Intel Atom E6xx series. + ML7213/ML7223/ML7831 is completely compatible for Intel EG20T PCH. To compile this driver as a module, choose M here: the module will be called pch_phub.
drivers/misc/pch_phub.c +21 -1
@@ -73,6 +73,9 @@#define PCI_DEVICE_ID_ROHM_ML7223_mPHUB 0x8012/* for Bus-m */ #define PCI_DEVICE_ID_ROHM_ML7223_nPHUB 0x8002/* for Bus-n */ +/* Macros for ML7831 */ +#define PCI_DEVICE_ID_ROHM_ML7831_PHUB 0x8801 +/* SROM ACCESS Macro */ #define PCH_WORD_ADDR_MASK (~((1 << 2) - 1))
@@ -464,7 +467,7 @@ static int pch_phub_write_gbe_mac_addr(struct pch_phub_reg *chip, u8 *data)int retval;int i; -if (chip->ioh_type ==1 )/* EG20T */ +if ((chip->ioh_type ==1 ) || (chip->ioh_type ==5 ))/* EG20T or ML7831*/ retval =pch_phub_gbe_serial_rom_conf (chip);else /* ML7223 */ retval =pch_phub_gbe_serial_rom_conf_mp (chip);
@@ -754,6 +757,22 @@ static int __devinit pch_phub_probe(struct pci_dev *pdev, chip->pch_opt_rom_start_address =\PCH_PHUB_ROM_START_ADDR_ML7223 ; chip->pch_mac_start_address =PCH_PHUB_MAC_START_ADDR_ML7223 ; + }else if (id->driver_data ==5 ) {/* ML7831 */ + retval =sysfs_create_file (&pdev->dev.kobj, + &dev_attr_pch_mac.attr); +if (retval) + goto err_sysfs_create; + + retval =sysfs_create_bin_file (&pdev->dev.kobj, &pch_bin_attr); +if (retval) + goto exit_bin_attr; + +/* set the prefech value */ +iowrite32 (0x000affaa , chip->pch_phub_base_address +0x14 ); +/* set the interrupt delay value */ +iowrite32 (0x25 , chip->pch_phub_base_address +0x44 ); + chip->pch_opt_rom_start_address =PCH_PHUB_ROM_START_ADDR_EG20T ; + chip->pch_mac_start_address =PCH_PHUB_MAC_START_ADDR_EG20T ; } chip->ioh_type = id->driver_data;
@@ -838,6 +857,7 @@ static struct pci_device_id pch_phub_pcidev_id[] = { { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ROHM_ML7213_PHUB), 2, }, { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ROHM_ML7223_mPHUB), 3, }, { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ROHM_ML7223_nPHUB), 4, }, + { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ROHM_ML7831_PHUB), 5, }, { } };MODULE_DEVICE_TABLE (pci, pch_phub_pcidev_id);
drivers/misc/spear13xx_pcie_gadget.c +1 -1
@@ -903,6 +903,6 @@ static void __exit spear_pcie_gadget_exit(void) }module_exit (spear_pcie_gadget_exit); -MODULE_ALIAS ("pcie-gadget-spear" ); +MODULE_ALIAS ("platform:pcie-gadget-spear" );MODULE_AUTHOR ("Pratyush Anand" );MODULE_LICENSE ("GPL" );
drivers/net/wireless/libertas/if_spi.c +1 -0
@@ -997,6 +997,7 @@ static int if_spi_host_to_card(struct lbs_private *priv,spin_unlock_irqrestore (&card->buffer_lock, flags);break ;default : +kfree (packet);netdev_err (priv->dev,"can't transfer buffer of type %d\n" , type); err = -EINVAL ;
drivers/net/wireless/rt2x00/rt2x00.h +1 -0
@@ -922,6 +922,7 @@ struct rt2x00_dev {* Powersaving work */ struct delayed_work autowakeup_work; +struct work_struct sleep_work;/* * Data queue arrays for RX, TX, Beacon and ATIM.
drivers/net/wireless/rt2x00/rt2x00dev.c +20 -2
@@ -449,6 +449,23 @@ static u8 *rt2x00lib_find_ie(u8 *data, unsigned int len, u8 ie)return NULL ; } +static void rt2x00lib_sleep (struct work_struct *work) +{ +struct rt2x00_dev *rt2x00dev = + container_of(work, struct rt2x00_dev, sleep_work); + +if (!test_bit (DEVICE_STATE_PRESENT , &rt2x00dev->flags)) +return ; + +/* +* Check again is powersaving is enabled, to prevent races from delayed +* work execution. +*/ +if (!test_bit (CONFIG_POWERSAVING , &rt2x00dev->flags)) +rt2x00lib_config (rt2x00dev, &rt2x00dev->hw->conf, +IEEE80211_CONF_CHANGE_PS ); +} +static void rt2x00lib_rxdone_check_ps (struct rt2x00_dev *rt2x00dev,struct sk_buff *skb,struct rxdone_entry_desc *rxdesc)
@@ -496,8 +513,7 @@ static void rt2x00lib_rxdone_check_ps(struct rt2x00_dev *rt2x00dev, cam |= (tim_ie->bitmap_ctrl &0x01 );if (!cam && !test_bit (CONFIG_POWERSAVING , &rt2x00dev->flags)) -rt2x00lib_config (rt2x00dev, &rt2x00dev->hw->conf, -IEEE80211_CONF_CHANGE_PS ); +queue_work (rt2x00dev->workqueue, &rt2x00dev->sleep_work); } static int rt2x00lib_rxdone_read_signal(struct rt2x00_dev *rt2x00dev,
@@ -1108,6 +1124,7 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)INIT_WORK (&rt2x00dev->intf_work, rt2x00lib_intf_scheduled);INIT_DELAYED_WORK (&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup); +INIT_WORK (&rt2x00dev->sleep_work, rt2x00lib_sleep);/* * Let the driver probe the device to detect the capabilities.
@@ -1164,6 +1181,7 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)*/ cancel_work_sync (&rt2x00dev->intf_work);cancel_delayed_work_sync (&rt2x00dev->autowakeup_work); +cancel_work_sync (&rt2x00dev->sleep_work);if (rt2x00_is_usb (rt2x00dev)) {del_timer_sync (&rt2x00dev->txstatus_timer);cancel_work_sync (&rt2x00dev->rxdone_work);
drivers/scsi/aacraid/linit.c +4 -0
@@ -38,6 +38,7 @@#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/pci.h> +#include <linux/pci-aspm.h> #include <linux/slab.h> #include <linux/mutex.h> #include <linux/spinlock.h>
@@ -1108,6 +1109,9 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, unique_id++; } +pci_disable_link_state (pdev,PCIE_LINK_STATE_L0S |PCIE_LINK_STATE_L1 | +PCIE_LINK_STATE_CLKPM ); + error =pci_enable_device (pdev);if (error) goto out;
drivers/scsi/hpsa.c +5 -0
@@ -23,6 +23,7 @@#include <linux/interrupt.h> #include <linux/types.h> #include <linux/pci.h> +#include <linux/pci-aspm.h> #include <linux/kernel.h> #include <linux/slab.h> #include <linux/delay.h>
@@ -3887,6 +3888,10 @@ static int __devinit hpsa_pci_init(struct ctlr_info *h)dev_warn (&h->pdev->dev,"controller appears to be disabled\n" );return -ENODEV ; } + +pci_disable_link_state (h->pdev,PCIE_LINK_STATE_L0S | +PCIE_LINK_STATE_L1 |PCIE_LINK_STATE_CLKPM ); + err =pci_enable_device (h->pdev);if (err) {dev_warn (&h->pdev->dev,"unable to enable PCI device\n" );
drivers/scsi/scsi_scan.c +1 -5
@@ -319,11 +319,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,return sdev; out_device_destroy: -scsi_device_set_state (sdev,SDEV_DEL ); -transport_destroy_device (&sdev->sdev_gendev); -put_device (&sdev->sdev_dev); -scsi_free_queue (sdev->request_queue); -put_device (&sdev->sdev_gendev); +__scsi_remove_device (sdev); out:if (display_failure_msg)printk (ALLOC_FAILURE_MSG , __func__);
drivers/tty/hvc/hvc_dcc.c +2 -0
@@ -46,6 +46,7 @@ static inline char __dcc_getchar(void) asmvolatile ("mrc p14, 0, %0, c0, c5, 0 @ read comms data reg" :"=r" (__c)); +isb ();return __c; }
@@ -55,6 +56,7 @@ static inline void __dcc_putchar(char c) asmvolatile ("mcr p14, 0, %0, c0, c5, 0 @ write a char" :/* no output register */ :"r" (c)); +isb (); }static int hvc_dcc_put_chars (uint32_t vt,const char *buf,int count)
drivers/tty/serial/Kconfig +7 -7
@@ -1585,7 +1585,7 @@ config SERIAL_IFX6X60 Support for the IFX6x60 modem devices on Intel MID platforms. config SERIAL_PCH_UART - tristate "Intel EG20T PCH / OKI SEMICONDUCTOR IOH(ML7213/ML7223) UART" + tristate "Intel EG20T PCH/LAPIS Semicon IOH(ML7213/ML7223/ML7831) UART" depends on PCI select SERIAL_CORE help
@@ -1593,12 +1593,12 @@ config SERIAL_PCH_UART which is an IOH(Input/Output Hub) for x86 embedded processor. Enabling PCH_DMA, this PCH UART works as DMA mode. - This driver also can be used for OKI SEMICONDUCTOR IOH(Input/ - Output Hub), ML7213 and ML7223. - ML7213 IOH is for IVI(In-Vehicle Infotainment) use and ML7223 IOH is - for MP(Media Phone) use. - ML7213/ML7223 is companion chip for Intel Atom E6xx series. - ML7213/ML7223 is completely compatible for Intel EG20T PCH. + This driver also can be used for LAPIS Semiconductor IOH(Input/ + Output Hub), ML7213, ML7223 and ML7831. + ML7213 IOH is for IVI(In-Vehicle Infotainment) use, ML7223 IOH is + for MP(Media Phone) use and ML7831 IOH is for general purpose use. + ML7213/ML7223/ML7831 is companion chip for Intel Atom E6xx series. + ML7213/ML7223/ML7831 is completely compatible for Intel EG20T PCH. config SERIAL_MSM_SMD bool "Enable tty device interface for some SMD ports"
drivers/tty/serial/pch_uart.c +11 -2
@@ -256,6 +256,8 @@ enum pch_uart_num_t { pch_ml7213_uart2, pch_ml7223_uart0, pch_ml7223_uart1, + pch_ml7831_uart0, + pch_ml7831_uart1, }; static struct pch_uart_driver_data drv_dat[] = {
@@ -268,6 +270,8 @@ static struct pch_uart_driver_data drv_dat[] = { [pch_ml7213_uart2] = {PCH_UART_2LINE, 2}, [pch_ml7223_uart0] = {PCH_UART_8LINE, 0}, [pch_ml7223_uart1] = {PCH_UART_2LINE, 1}, + [pch_ml7831_uart0] = {PCH_UART_8LINE, 0}, + [pch_ml7831_uart1] = {PCH_UART_2LINE, 1}, };static unsigned int default_baud =9600 ;
@@ -625,6 +629,7 @@ static void pch_request_dma(struct uart_port *port)dev_err (priv->port.dev,"%s:dma_request_channel FAILS(Rx)\n" , __func__);dma_release_channel (priv->chan_tx); + priv->chan_tx =NULL ;return ; }
@@ -1212,8 +1217,7 @@ static void pch_uart_shutdown(struct uart_port *port)dev_err (priv->port.dev,"pch_uart_hal_set_fifo Failed(ret=%d)\n" , ret); -if (priv->use_dma_flag) -pch_free_dma (port); +pch_free_dma (port);free_irq (priv->port.irq, priv); }
@@ -1277,6 +1281,7 @@ static void pch_uart_set_termios(struct uart_port *port,if (rtn) goto out; +pch_uart_set_mctrl (&priv->port, priv->port.mctrl);/* Don't rewrite B0 */ if (tty_termios_baud_rate (termios))tty_termios_encode_baud_rate (termios, baud, baud);
@@ -1545,6 +1550,10 @@ static DEFINE_PCI_DEVICE_TABLE(pch_uart_pci_id) = { .driver_data = pch_ml7223_uart0}, {PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x800D), .driver_data = pch_ml7223_uart1}, + {PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8811), + .driver_data = pch_ml7831_uart0}, + {PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8812), + .driver_data = pch_ml7831_uart1}, {0,}, };
drivers/tty/tty_ldisc.c +23 -7
@@ -36,6 +36,7 @@#include <linux/kmod.h> #include <linux/nsproxy.h> +#include <linux/ratelimit.h> /* * This guards the refcounted line discipline lists. The lock
@@ -548,15 +549,16 @@ static void tty_ldisc_flush_works(struct tty_struct *tty)/** * tty_ldisc_wait_idle - wait for the ldisc to become idle * @tty: tty to wait for +* @timeout: for how long to wait at most * * Wait for the line discipline to become idle. The discipline must * have been halted for this to guarantee it remains idle. */ -static int tty_ldisc_wait_idle (struct tty_struct *tty) +static int tty_ldisc_wait_idle (struct tty_struct *tty,long timeout) { -int ret; +long ret; ret =wait_event_timeout (tty_ldisc_idle, -atomic_read (&tty->ldisc->users) ==1 ,5 *HZ ); +atomic_read (&tty->ldisc->users) ==1 , timeout);if (ret <0 )return ret;return ret >0 ?0 : -EBUSY ;
@@ -666,7 +668,7 @@ int tty_set_ldisc(struct tty_struct *tty, int ldisc)tty_ldisc_flush_works (tty); - retval =tty_ldisc_wait_idle (tty); + retval =tty_ldisc_wait_idle (tty,5 *HZ );tty_lock ();mutex_lock (&tty->ldisc_mutex);
@@ -763,8 +765,6 @@ static int tty_ldisc_reinit(struct tty_struct *tty, int ldisc)if (IS_ERR (ld))return -1 ; -WARN_ON_ONCE (tty_ldisc_wait_idle (tty)); -tty_ldisc_close (tty, tty->ldisc);tty_ldisc_put (tty->ldisc); tty->ldisc =NULL ;
@@ -839,7 +839,7 @@ void tty_ldisc_hangup(struct tty_struct *tty)tty_unlock ();cancel_work_sync (&tty->buf.work);mutex_unlock (&tty->ldisc_mutex); - +retry:tty_lock ();mutex_lock (&tty->ldisc_mutex);
@@ -848,6 +848,22 @@ void tty_ldisc_hangup(struct tty_struct *tty)it means auditing a lot of other paths so this is a FIXME */ if (tty->ldisc) {/* Not yet closed */ +if (atomic_read (&tty->ldisc->users) !=1 ) { +char cur_n[TASK_COMM_LEN ], tty_n[64 ]; +long timeout =3 *HZ ; +tty_unlock (); + +while (tty_ldisc_wait_idle (tty, timeout) == -EBUSY ) { + timeout =MAX_SCHEDULE_TIMEOUT ; +printk_ratelimited (KERN_WARNING +"%s: waiting (%s) for %s took too long, but we keep waiting...\n" , + __func__,get_task_comm (cur_n, current), +tty_name (tty, tty_n)); + } +mutex_unlock (&tty->ldisc_mutex); + goto retry; + } +if (reset ==0 ) {if (!tty_ldisc_reinit (tty, tty->termios->c_line))
drivers/usb/class/cdc-acm.c +5 -3
@@ -539,7 +539,6 @@ static void acm_port_down(struct acm *acm) {int i; -mutex_lock (&open_mutex);if (acm->dev) {usb_autopm_get_interface (acm->control);acm_set_control (acm, acm->ctrlout =0 );
@@ -551,14 +550,15 @@ static void acm_port_down(struct acm *acm) acm->control->needs_remote_wakeup =0 ;usb_autopm_put_interface (acm->control); } -mutex_unlock (&open_mutex); }static void acm_tty_hangup (struct tty_struct *tty) {struct acm *acm = tty->driver_data;tty_port_hangup (&acm->port); +mutex_lock (&open_mutex);acm_port_down (acm); +mutex_unlock (&open_mutex); }static void acm_tty_close (struct tty_struct *tty,struct file *filp)
@@ -569,8 +569,9 @@ static void acm_tty_close(struct tty_struct *tty, struct file *filp)shutdown */ if (!acm)return ; + +mutex_lock (&open_mutex);if (tty_port_close_start (&acm->port, tty, filp) ==0 ) { -mutex_lock (&open_mutex);if (!acm->dev) {tty_port_tty_set (&acm->port,NULL );acm_tty_unregister (acm);
@@ -582,6 +583,7 @@ static void acm_tty_close(struct tty_struct *tty, struct file *filp)acm_port_down (acm);tty_port_close_end (&acm->port, tty);tty_port_tty_set (&acm->port,NULL ); +mutex_unlock (&open_mutex); } static int acm_tty_write(struct tty_struct *tty,
drivers/usb/core/hub.c +6 -0
@@ -813,6 +813,12 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) USB_PORT_FEAT_C_PORT_LINK_STATE); } +if ((portchange &USB_PORT_STAT_C_BH_RESET ) && +hub_is_superspeed (hub->hdev)) { + need_debounce_delay = true; +clear_port_feature (hub->hdev, port1, +USB_PORT_FEAT_C_BH_PORT_RESET ); + }/* We can forget about a "removed" device when there's a * physical disconnect or the connect status changes. */
drivers/usb/core/quirks.c +27 -0
@@ -50,15 +50,42 @@ static const struct usb_device_id usb_quirk_list[] = {/* Logitech Webcam B/C500 */ { USB_DEVICE(0x046d, 0x0807), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Logitech Webcam C600 */ + { USB_DEVICE(0x046d, 0x0808), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Logitech Webcam Pro 9000 */ { USB_DEVICE(0x046d, 0x0809), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Logitech Webcam C905 */ + { USB_DEVICE(0x046d, 0x080a), .driver_info = USB_QUIRK_RESET_RESUME }, + + /* Logitech Webcam C210 */ + { USB_DEVICE(0x046d, 0x0819), .driver_info = USB_QUIRK_RESET_RESUME }, + + /* Logitech Webcam C260 */ + { USB_DEVICE(0x046d, 0x081a), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Logitech Webcam C310 */ { USB_DEVICE(0x046d, 0x081b), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Logitech Webcam C910 */ + { USB_DEVICE(0x046d, 0x0821), .driver_info = USB_QUIRK_RESET_RESUME }, + + /* Logitech Webcam C160 */ + { USB_DEVICE(0x046d, 0x0824), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Logitech Webcam C270 */ { USB_DEVICE(0x046d, 0x0825), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Logitech Quickcam Pro 9000 */ + { USB_DEVICE(0x046d, 0x0990), .driver_info = USB_QUIRK_RESET_RESUME }, + + /* Logitech Quickcam E3500 */ + { USB_DEVICE(0x046d, 0x09a4), .driver_info = USB_QUIRK_RESET_RESUME }, + + /* Logitech Quickcam Vision Pro */ + { USB_DEVICE(0x046d, 0x09a6), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Logitech Harmony 700-series */ { USB_DEVICE(0x046d, 0xc122), .driver_info = USB_QUIRK_DELAY_INIT },
drivers/usb/host/ehci-sched.c +10 -5
@@ -1483,10 +1483,15 @@ iso_stream_schedule (/* NOTE: assumes URB_ISO_ASAP, to limit complexity/bugs */ -/* find a uframe slot with enough bandwidth */ - next = start + period; -for (; start < next; start++) { - +/* find a uframe slot with enough bandwidth. +* Early uframes are more precious because full-speed +* iso IN transfers can't use late uframes, +* and therefore they should be allocated last. +*/ + next = start; + start += period; + do { + start--; /* check schedule: enough space? */ if (stream->highspeed) { if (itd_slot_ok(ehci, mod, start,
@@ -1499,7 +1504,7 @@ iso_stream_schedule ( start, sched, period))break ; } - } + }while (start > next);/* no room in the schedule */ if (start == next) {
drivers/usb/host/pci-quirks.c +3 -4
@@ -626,7 +626,7 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)void __iomem *base, *op_reg_base;u32 hcc_params, cap, val;u8 offset, cap_length; -int wait_time, delta, count =256 /4 ; +int wait_time, count =256 /4 ;if (!mmio_resource_enabled (pdev,0 ))return ;
@@ -672,11 +672,10 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)writel (val, op_reg_base +EHCI_USBCMD ); wait_time =2000 ; - delta =100 ; do { writel(0x3f, op_reg_base + EHCI_USBSTS); - udelay(delta); - wait_time -= delta; + udelay(100); + wait_time -= 100; val = readl(op_reg_base + EHCI_USBSTS); if ((val == ~(u32)0) || (val & EHCI_USBSTS_HALTED)) { break;
drivers/usb/host/xhci-mem.c +0 -5
@@ -875,7 +875,6 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udstruct xhci_virt_device *dev;struct xhci_ep_ctx *ep0_ctx;struct xhci_slot_ctx *slot_ctx; -struct xhci_input_control_ctx *ctrl_ctx;u32 port_num;struct usb_device *top_dev;
@@ -887,12 +886,8 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udreturn -EINVAL ; } ep0_ctx =xhci_get_ep_ctx (xhci, dev->in_ctx,0 ); - ctrl_ctx =xhci_get_input_control_ctx (xhci, dev->in_ctx); slot_ctx =xhci_get_slot_ctx (xhci, dev->in_ctx); -/* 2) New slot context and endpoint 0 context are valid*/ - ctrl_ctx->add_flags =cpu_to_le32 (SLOT_FLAG |EP0_FLAG ); -/* 3) Only the control endpoint is valid - one endpoint context */ slot_ctx->dev_info |=cpu_to_le32 (LAST_CTX (1 ) | (u32 ) udev->route);switch (udev->speed) {
drivers/usb/host/xhci-ring.c +7 -6
@@ -819,23 +819,24 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg)struct xhci_ring *ring;struct xhci_td *cur_td;int ret, i, j; +unsigned long flags; ep = (struct xhci_virt_ep *) arg; xhci = ep->xhci; -spin_lock (&xhci->lock); +spin_lock_irqsave (&xhci->lock, flags); ep->stop_cmds_pending--;if (xhci->xhc_state &XHCI_STATE_DYING ) {xhci_dbg (xhci,"Stop EP timer ran, but another timer marked " "xHCI as DYING, exiting.\n" ); -spin_unlock (&xhci->lock); +spin_unlock_irqrestore (&xhci->lock, flags);return ; }if (!(ep->stop_cmds_pending ==0 && (ep->ep_state &EP_HALT_PENDING ))) {xhci_dbg (xhci,"Stop EP timer ran, but no command pending, " "exiting.\n" ); -spin_unlock (&xhci->lock); +spin_unlock_irqrestore (&xhci->lock, flags);return ; }
@@ -847,11 +848,11 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg) xhci->xhc_state |=XHCI_STATE_DYING ;/* Disable interrupts from the host controller and start halting it */ xhci_quiesce (xhci); -spin_unlock (&xhci->lock); +spin_unlock_irqrestore (&xhci->lock, flags); ret =xhci_halt (xhci); -spin_lock (&xhci->lock); +spin_lock_irqsave (&xhci->lock, flags);if (ret <0 ) {/* This is bad; the host is not responding to commands and it's * not allowing itself to be halted. At least interrupts are
@@ -899,7 +900,7 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg) } } } -spin_unlock (&xhci->lock); +spin_unlock_irqrestore (&xhci->lock, flags);xhci_dbg (xhci,"Calling usb_hc_died()\n" );usb_hc_died (xhci_to_hcd (xhci)->primary_hcd);xhci_dbg (xhci,"xHCI host controller is dead.\n" );
drivers/usb/host/xhci.c +18 -16
@@ -749,7 +749,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)u32 command, temp =0 ;struct usb_hcd *hcd =xhci_to_hcd (xhci);struct usb_hcd *secondary_hcd; -int retval; +int retval =0 ;/* Wait a bit if either of the roothubs need to settle from the * transition into bus suspend.
@@ -759,6 +759,9 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) xhci->bus_state[1].next_statechange))msleep (100 ); +set_bit (HCD_FLAG_HW_ACCESSIBLE , &hcd->flags); +set_bit (HCD_FLAG_HW_ACCESSIBLE , &xhci->shared_hcd->flags); +spin_lock_irq (&xhci->lock);if (xhci->quirks &XHCI_RESET_ON_RESUME ) hibernated = true;
@@ -828,20 +831,13 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)return retval;xhci_dbg (xhci,"Start the primary HCD\n" ); retval =xhci_run (hcd->primary_hcd); -if (retval) - goto failed_restart; - -xhci_dbg (xhci,"Start the secondary HCD\n" ); - retval =xhci_run (secondary_hcd);if (!retval) { -set_bit (HCD_FLAG_HW_ACCESSIBLE , &hcd->flags); -set_bit (HCD_FLAG_HW_ACCESSIBLE , - &xhci->shared_hcd->flags); +xhci_dbg (xhci,"Start the secondary HCD\n" ); + retval =xhci_run (secondary_hcd); } -failed_restart: hcd->state =HC_STATE_SUSPENDED ; xhci->shared_hcd->state =HC_STATE_SUSPENDED ; -return retval; + goto done; }/* step 4: set Run/Stop bit */
@@ -860,11 +856,14 @@ failed_restart:* Running endpoints by ringing their doorbells */ -set_bit (HCD_FLAG_HW_ACCESSIBLE , &hcd->flags); -set_bit (HCD_FLAG_HW_ACCESSIBLE , &xhci->shared_hcd->flags); -spin_unlock_irq (&xhci->lock); - return 0; + + done: +if (retval ==0 ) { +usb_hcd_resume_root_hub (hcd); +usb_hcd_resume_root_hub (xhci->shared_hcd); + } + return retval; }#endif /* CONFIG_PM */
@@ -2875,6 +2874,10 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)/* Otherwise, update the control endpoint ring enqueue pointer. */ elsexhci_copy_ep0_dequeue_into_input_ctx (xhci ,udev ); + ctrl_ctx =xhci_get_input_control_ctx (xhci, virt_dev->in_ctx); + ctrl_ctx->add_flags =cpu_to_le32 (SLOT_FLAG |EP0_FLAG ); + ctrl_ctx->drop_flags =0 ; +xhci_dbg (xhci,"Slot ID %d Input Context:\n" , udev->slot_id);xhci_dbg_ctx (xhci, virt_dev->in_ctx,2 );
@@ -2956,7 +2959,6 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev) virt_dev->address = (le32_to_cpu (slot_ctx->dev_state) &DEV_ADDR_MASK ) +1 ;/* Zero the input context control for later use */ - ctrl_ctx =xhci_get_input_control_ctx (xhci, virt_dev->in_ctx); ctrl_ctx->add_flags =0 ; ctrl_ctx->drop_flags =0 ;
drivers/usb/serial/ark3116.c +5 -5
@@ -42,7 +42,7 @@ static int debug;* Version information */ -#define DRIVER_VERSION "v0.6" +#define DRIVER_VERSION "v0.7"#define DRIVER_AUTHOR "Bart Hartgers <[email protected]>"#define DRIVER_DESC "USB ARK3116 serial/IrDA driver"#define DRIVER_DEV_DESC "ARK3116 RS232/IrDA"
@@ -380,10 +380,6 @@ static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port) goto err_out; } -/* setup termios */ -if (tty) -ark3116_set_termios (tty, port,NULL ); -/* remove any data still left: also clears error state */ ark3116_read_reg (serial,UART_RX , buf);
@@ -406,6 +402,10 @@ static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port)/* enable DMA */ ark3116_write_reg (port->serial,UART_FCR ,UART_FCR_DMA_SELECT ); +/* setup termios */ +if (tty) +ark3116_set_termios (tty, port,NULL ); + err_out:kfree (buf);return result;
drivers/usb/serial/ftdi_sio.c +11 -3
@@ -2080,13 +2080,19 @@ static void ftdi_set_termios(struct tty_struct *tty, cflag = termios->c_cflag; -/* FIXME -For this cut I don't care if the line is really changing or -not - so just do the change regardless - should be able to -compare old_termios and tty->termios */ +if (old_termios->c_cflag == termios->c_cflag + && old_termios->c_ispeed == termios->c_ispeed + && old_termios->c_ospeed == termios->c_ospeed) + goto no_c_cflag_changes; +/* NOTE These routines can get interrupted by ftdi_sio_read_bulk_callback - need to examine what this means - don't see any problems yet */ +if ((old_termios->c_cflag & (CSIZE |PARODD |PARENB |CMSPAR |CSTOPB )) == + (termios->c_cflag & (CSIZE |PARODD |PARENB |CMSPAR |CSTOPB ))) + goto no_data_parity_stop_changes; +/* Set number of data bits, parity, stop bits */ urb_value =0 ;
@@ -2127,6 +2133,7 @@ static void ftdi_set_termios(struct tty_struct *tty, }/* Now do the baudrate */ +no_data_parity_stop_changes:if ((cflag &CBAUD ) ==B0 ) {/* Disable flow control */ if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
@@ -2154,6 +2161,7 @@ static void ftdi_set_termios(struct tty_struct *tty,/* Set flow control */ /* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */ +no_c_cflag_changes:if (cflag &CRTSCTS ) {dbg ("%s Setting to CRTSCTS flow control" , __func__); if (usb_control_msg(dev,
drivers/usb/serial/option.c +23 -0
@@ -156,6 +156,7 @@ static void option_instat_callback(struct urb *urb);#define HUAWEI_PRODUCT_K4511 0x14CC#define HUAWEI_PRODUCT_ETS1220 0x1803#define HUAWEI_PRODUCT_E353 0x1506 +#define HUAWEI_PRODUCT_E173S 0x1C05#define QUANTA_VENDOR_ID 0x0408#define QUANTA_PRODUCT_Q101 0xEA02
@@ -316,6 +317,9 @@ static void option_instat_callback(struct urb *urb);#define ZTE_PRODUCT_AC8710 0xfff1#define ZTE_PRODUCT_AC2726 0xfff5#define ZTE_PRODUCT_AC8710T 0xffff +#define ZTE_PRODUCT_MC2718 0xffe8 +#define ZTE_PRODUCT_AD3812 0xffeb +#define ZTE_PRODUCT_MC2716 0xffed#define BENQ_VENDOR_ID 0x04a5#define BENQ_PRODUCT_H10 0x4068
@@ -500,6 +504,18 @@ static const struct option_blacklist_info zte_k3765_z_blacklist = { .reserved = BIT(4), }; +static const struct option_blacklist_info zte_ad3812_z_blacklist = { + .sendsetup =BIT (0 ) |BIT (1 ) |BIT (2 ), +}; + +static const struct option_blacklist_info zte_mc2718_z_blacklist = { + .sendsetup =BIT (1 ) |BIT (2 ) |BIT (3 ) |BIT (4 ), +}; + +static const struct option_blacklist_info zte_mc2716_z_blacklist = { + .sendsetup =BIT (1 ) |BIT (2 ) |BIT (3 ), +}; +static const struct option_blacklist_info huawei_cdc12_blacklist = { .reserved =BIT (1 ) |BIT (2 ), };
@@ -622,6 +638,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143D, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143E, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143F, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173S, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff),
@@ -1043,6 +1060,12 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710T, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2718, 0xff, 0xff, 0xff), + .driver_info = (kernel_ulong_t)&zte_mc2718_z_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AD3812, 0xff, 0xff, 0xff), + .driver_info = (kernel_ulong_t)&zte_ad3812_z_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2716, 0xff, 0xff, 0xff), + .driver_info = (kernel_ulong_t)&zte_mc2716_z_blacklist }, { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */
drivers/usb/serial/pl2303.c +0 -1
@@ -91,7 +91,6 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(SONY_VENDOR_ID, SONY_QN3USB_PRODUCT_ID) }, { USB_DEVICE(SANWA_VENDOR_ID, SANWA_PRODUCT_ID) }, { USB_DEVICE(ADLINK_VENDOR_ID, ADLINK_ND6530_PRODUCT_ID) }, - { USB_DEVICE(WINCHIPHEAD_VENDOR_ID, WINCHIPHEAD_USBSER_PRODUCT_ID) }, { USB_DEVICE(SMART_VENDOR_ID, SMART_PRODUCT_ID) }, { } /* Terminating entry */ };
drivers/usb/serial/pl2303.h +0 -4
@@ -145,10 +145,6 @@#define ADLINK_VENDOR_ID 0x0b63#define ADLINK_ND6530_PRODUCT_ID 0x6530 -/* WinChipHead USB->RS 232 adapter */ -#define WINCHIPHEAD_VENDOR_ID 0x4348 -#define WINCHIPHEAD_USBSER_PRODUCT_ID 0x5523 -/* SMART USB Serial Adapter */ #define SMART_VENDOR_ID 0x0b8c#define SMART_PRODUCT_ID 0x2303
drivers/usb/storage/protocol.c +3 -4
@@ -58,7 +58,9 @@void usb_stor_pad12_command (struct scsi_cmnd *srb,struct us_data *us) { -/* Pad the SCSI command with zeros out to 12 bytes +/* +* Pad the SCSI command with zeros out to 12 bytes. If the +* command already is 12 bytes or longer, leave it alone. * * NOTE: This only works because a scsi_cmnd struct field contains * a unsigned char cmnd[16], so we know we have storage available
@@ -66,9 +68,6 @@ void usb_stor_pad12_command(struct scsi_cmnd *srb, struct us_data *us)for (; srb->cmd_len<12 ; srb->cmd_len++) srb->cmnd[srb->cmd_len] =0 ; -/* set command length to 12 bytes */ - srb->cmd_len =12 ; -/* send the command to the transport layer */ usb_stor_invoke_transport (srb, us); }
fs/nfs/dir.c +1 -1
@@ -1458,12 +1458,12 @@ static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry res =NULL ; goto out;/* This turned out not to be a regular file */ +case -EISDIR :case -ENOTDIR : goto no_open;case -ELOOP :if (!(nd->intent.open.flags &O_NOFOLLOW )) goto no_open; -/* case -EISDIR: */ /* case -EINVAL: */ default : res =ERR_CAST (inode);
fs/nfs/file.c +32 -0
@@ -887,3 +887,35 @@ static int nfs_setlease(struct file *file, long arg, struct file_lock **fl) file->f_path.dentry->d_name.name, arg);return -EINVAL ; } + +#ifdef CONFIG_NFS_V4 +static int +nfs4_file_open (struct inode *inode,struct file *filp) +{ +/* +* NFSv4 opens are handled in d_lookup and d_revalidate. If we get to +* this point, then something is very wrong +*/ +dprintk ("NFS: %s called! inode=%p filp=%p\n" , __func__, inode, filp); +return -ENOTDIR ; +} + +const struct file_operations nfs4_file_operations = { + .llseek = nfs_file_llseek, + .read = do_sync_read, + .write = do_sync_write, + .aio_read = nfs_file_read, + .aio_write = nfs_file_write, + .mmap = nfs_file_mmap, + .open = nfs4_file_open, + .flush = nfs_file_flush, + .release = nfs_file_release, + .fsync = nfs_file_fsync, + .lock = nfs_lock, + .flock = nfs_flock, + .splice_read = nfs_file_splice_read, + .splice_write = nfs_file_splice_write, + .check_flags = nfs_check_flags, + .setlease = nfs_setlease, +}; +#endif /* CONFIG_NFS_V4 */
fs/nfs/inode.c +1 -1
@@ -291,7 +291,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)*/ inode->i_op =NFS_SB (sb)->nfs_client->rpc_ops->file_inode_ops;if (S_ISREG (inode->i_mode)) { - inode->i_fop = &nfs_file_operations; + inode->i_fop =NFS_SB (sb)->nfs_client->rpc_ops->file_ops; inode->i_data.a_ops = &nfs_file_aops; inode->i_data.backing_dev_info = &NFS_SB (sb)->backing_dev_info; }else if (S_ISDIR (inode->i_mode)) {
fs/nfs/nfs3proc.c +1 -0
@@ -853,6 +853,7 @@ const struct nfs_rpc_ops nfs_v3_clientops = { .dentry_ops = &nfs_dentry_operations, .dir_inode_ops = &nfs3_dir_inode_operations, .file_inode_ops = &nfs3_file_inode_operations, + .file_ops = &nfs_file_operations, .getroot = nfs3_proc_get_root, .getattr = nfs3_proc_getattr, .setattr = nfs3_proc_setattr,
fs/nfs/nfs4proc.c +1 -0
@@ -6008,6 +6008,7 @@ const struct nfs_rpc_ops nfs_v4_clientops = { .dentry_ops = &nfs4_dentry_operations, .dir_inode_ops = &nfs4_dir_inode_operations, .file_inode_ops = &nfs4_file_inode_operations, + .file_ops = &nfs4_file_operations, .getroot = nfs4_proc_get_root, .getattr = nfs4_proc_getattr, .setattr = nfs4_proc_setattr,
fs/nfs/proc.c +1 -0
@@ -710,6 +710,7 @@ const struct nfs_rpc_ops nfs_v2_clientops = { .dentry_ops = &nfs_dentry_operations, .dir_inode_ops = &nfs_dir_inode_operations, .file_inode_ops = &nfs_file_inode_operations, + .file_ops = &nfs_file_operations, .getroot = nfs_proc_get_root, .getattr = nfs_proc_getattr, .setattr = nfs_proc_setattr,
fs/xfs/linux-2.6/xfs_buf.h +0 -1
@@ -346,7 +346,6 @@ extern struct list_head *xfs_get_buftarg_list(void);#define xfs_getsize_buftarg (buftarg) block_size((buftarg)->bt_bdev)#define xfs_readonly_buftarg (buftarg) bdev_read_only((buftarg)->bt_bdev) -#define xfs_binval (buftarg) xfs_flush_buftarg(buftarg, 1)#define XFS_bflush (buftarg) xfs_flush_buftarg(buftarg, 1)#endif /* __XFS_BUF_H__ */
fs/xfs/linux-2.6/xfs_file.c +28 -6
@@ -309,7 +309,19 @@ xfs_file_aio_read(if (XFS_FORCED_SHUTDOWN (mp))return -EIO ; -if (unlikely (ioflags &IO_ISDIRECT )) { +/* +* Locking is a bit tricky here. If we take an exclusive lock +* for direct IO, we effectively serialise all new concurrent +* read IO to this file and block it behind IO that is currently in +* progress because IO in progress holds the IO lock shared. We only +* need to hold the lock exclusive to blow away the page cache, so +* only take lock exclusively if the page cache needs invalidation. +* This allows the normal direct IO case of no page cache pages to +* proceeed concurrently without serialisation. +*/ +xfs_rw_ilock (ip,XFS_IOLOCK_SHARED ); +if ((ioflags &IO_ISDIRECT ) && inode->i_mapping->nrpages) { +xfs_rw_iunlock (ip,XFS_IOLOCK_SHARED );xfs_rw_ilock (ip,XFS_IOLOCK_EXCL );if (inode->i_mapping->nrpages) {
@@ -322,8 +334,7 @@ xfs_file_aio_read( } }xfs_rw_ilock_demote (ip,XFS_IOLOCK_EXCL ); - }else -xfs_rw_ilock (ip,XFS_IOLOCK_SHARED ); + }trace_xfs_file_read (ip, size, iocb->ki_pos, ioflags);
@@ -658,6 +669,7 @@ xfs_file_aio_write_checks(xfs_fsize_t new_size;int error =0 ; +xfs_rw_ilock (ip,XFS_ILOCK_EXCL ); error =generic_write_checks (file, pos, count,S_ISBLK (inode->i_mode));if (error) {xfs_rw_iunlock (ip,XFS_ILOCK_EXCL | *iolock);
@@ -749,14 +761,24 @@ xfs_file_dio_aio_write( *iolock =XFS_IOLOCK_EXCL ; else *iolock =XFS_IOLOCK_SHARED ; -xfs_rw_ilock (ip,XFS_ILOCK_EXCL | *iolock); +xfs_rw_ilock (ip, *iolock); ret =xfs_file_aio_write_checks (file, &pos, &count, iolock);if (ret)return ret; +/* +* Recheck if there are cached pages that need invalidate after we got +* the iolock to protect against other threads adding new pages while +* we were waiting for the iolock. +*/ +if (mapping->nrpages && *iolock ==XFS_IOLOCK_SHARED ) { +xfs_rw_iunlock (ip, *iolock); + *iolock =XFS_IOLOCK_EXCL ; +xfs_rw_ilock (ip, *iolock); + } +if (mapping->nrpages) { -WARN_ON (*iolock !=XFS_IOLOCK_EXCL ); ret = -xfs_flushinval_pages (ip, (pos &PAGE_CACHE_MASK ),-1 ,FI_REMAPF_LOCKED );if (ret)
@@ -801,7 +823,7 @@ xfs_file_buffered_aio_write(size_t count = ocount; *iolock =XFS_IOLOCK_EXCL ; -xfs_rw_ilock (ip,XFS_ILOCK_EXCL | *iolock); +xfs_rw_ilock (ip, *iolock); ret =xfs_file_aio_write_checks (file, &pos, &count, iolock);if (ret)
fs/xfs/linux-2.6/xfs_iops.c +12 -4
@@ -69,9 +69,8 @@ xfs_synchronize_times( }/* -* If the linux inode is valid, mark it dirty. -* Used when committing a dirty inode into a transaction so that -* the inode will get written back by the linux code +* If the linux inode is valid, mark it dirty, else mark the dirty state +* in the XFS inode to make sure we pick it up when reclaiming the inode. */ void xfs_mark_inode_dirty_sync(
@@ -81,6 +80,10 @@ xfs_mark_inode_dirty_sync(if (!(inode->i_state & (I_WILL_FREE |I_FREEING )))mark_inode_dirty_sync (inode); +else { +barrier (); + ip->i_update_core =1 ; + } }void
@@ -91,6 +94,11 @@ xfs_mark_inode_dirty(if (!(inode->i_state & (I_WILL_FREE |I_FREEING )))mark_inode_dirty (inode); +else { +barrier (); + ip->i_update_core =1 ; + } + }/*
@@ -456,7 +464,7 @@ xfs_vn_getattr(trace_xfs_getattr (ip);if (XFS_FORCED_SHUTDOWN (mp)) -return XFS_ERROR (EIO ); +return -XFS_ERROR (EIO ); stat->size =XFS_ISIZE (ip); stat->dev = inode->i_sb->s_dev;
fs/xfs/linux-2.6/xfs_super.c +9 -25
@@ -878,33 +878,17 @@ xfs_log_inode(struct xfs_trans *tp;int error; -xfs_iunlock (ip,XFS_ILOCK_SHARED ); tp =xfs_trans_alloc (mp,XFS_TRANS_FSYNC_TS ); error =xfs_trans_reserve (tp,0 ,XFS_FSYNC_TS_LOG_RES (mp),0 ,0 ,0 ); -if (error) {xfs_trans_cancel (tp,0 ); -/* we need to return with the lock hold shared */ -xfs_ilock (ip,XFS_ILOCK_SHARED );return error; }xfs_ilock (ip,XFS_ILOCK_EXCL ); - -/* -* Note - it's possible that we might have pushed ourselves out of the -* way during trans_reserve which would flush the inode. But there's -* no guarantee that the inode buffer has actually gone out yet (it's -* delwri). Plus the buffer could be pinned anyway if it's part of -* an inode in another recent transaction. So we play it safe and -* fire off the transaction anyway. -*/ -xfs_trans_ijoin (tp, ip); +xfs_trans_ijoin_ref (tp, ip,XFS_ILOCK_EXCL );xfs_trans_log_inode (tp, ip,XFS_ILOG_CORE ); - error =xfs_trans_commit (tp,0 ); -xfs_ilock_demote (ip,XFS_ILOCK_EXCL ); - -return error; +return xfs_trans_commit (tp,0 ); }STATIC int
@@ -919,7 +903,9 @@ xfs_fs_write_inode(trace_xfs_write_inode (ip);if (XFS_FORCED_SHUTDOWN (mp)) -return XFS_ERROR (EIO ); +return -XFS_ERROR (EIO ); +if (!ip->i_update_core) +return 0 ;if (wbc->sync_mode ==WB_SYNC_ALL ) {/*
@@ -930,12 +916,10 @@ xfs_fs_write_inode(* of synchronous log foces dramatically. */ xfs_ioend_wait (ip); -xfs_ilock (ip,XFS_ILOCK_SHARED ); -if (ip->i_update_core) { - error =xfs_log_inode (ip); -if (error) - goto out_unlock; - } + error =xfs_log_inode (ip); +if (error) + goto out; +return 0 ; }else {/* * We make this non-blocking if the inode is contended, return
fs/xfs/quota/xfs_qm.c +2 -1
@@ -714,7 +714,8 @@ xfs_qm_dqattach_one(* disk and we didn't ask it to allocate; * ESRCH if quotas got turned off suddenly. */ - error =xfs_qm_dqget (ip->i_mount, ip, id, type,XFS_QMOPT_DOWARN , &dqp); + error =xfs_qm_dqget (ip->i_mount, ip, id, type, + doalloc |XFS_QMOPT_DOWARN , &dqp);if (error)return error;
fs/xfs/xfs_buf_item.c +0 -1
@@ -1023,7 +1023,6 @@ xfs_buf_iodone_callbacks(XFS_BUF_UNDELAYWRITE (bp);trace_xfs_buf_error_relse (bp, _RET_IP_); -xfs_force_shutdown (mp,SHUTDOWN_META_IO_ERROR ); do_callbacks:xfs_buf_do_callbacks (bp);
fs/xfs/xfs_mount.c +10 -19
@@ -44,9 +44,6 @@#include "xfs_trace.h" -STATIC void xfs_unmountfs_wait(xfs_mount_t *); - -#ifdef HAVE_PERCPU_SB STATIC void xfs_icsb_balance_counter(xfs_mount_t *, xfs_sb_field_t,int );
@@ -1507,11 +1504,6 @@ xfs_unmountfs(*/ xfs_log_force (mp,XFS_LOG_SYNC ); -xfs_binval (mp->m_ddev_targp); -if (mp->m_rtdev_targp) { -xfs_binval (mp->m_rtdev_targp); - } -/* * Unreserve any blocks we have so that when we unmount we don't account * the reserved free space as used. This is really only necessary for
@@ -1537,7 +1529,16 @@ xfs_unmountfs(xfs_warn (mp,"Unable to update superblock counters. " "Freespace may not be correct on next mount." );xfs_unmountfs_writesb (mp); -xfs_unmountfs_wait (mp);/* wait for async bufs */ + +/* +* Make sure all buffers have been flushed and completed before +* unmounting the log. +*/ + error =xfs_flush_buftarg (mp->m_ddev_targp,1 ); +if (error) +xfs_warn (mp,"%d busy buffers during unmount." , error); +xfs_wait_buftarg (mp->m_ddev_targp); +xfs_log_unmount_write (mp);xfs_log_unmount (mp);xfs_uuid_unmount (mp);
@@ -1548,16 +1549,6 @@ xfs_unmountfs(xfs_free_perag (mp); } -STATIC void -xfs_unmountfs_wait (xfs_mount_t *mp) -{ -if (mp->m_logdev_targp != mp->m_ddev_targp) -xfs_wait_buftarg (mp->m_logdev_targp); -if (mp->m_rtdev_targp) -xfs_wait_buftarg (mp->m_rtdev_targp); -xfs_wait_buftarg (mp->m_ddev_targp); -} -int xfs_fs_writable (xfs_mount_t *mp) {
fs/xfs/xfs_vnodeops.c +10 -4
@@ -535,7 +535,7 @@ xfs_readlink( char *link) {xfs_mount_t *mp = ip->i_mount; -int pathlen; +xfs_fsize_t pathlen;int error =0 ;trace_xfs_readlink (ip);
@@ -545,13 +545,19 @@ xfs_readlink(xfs_ilock (ip,XFS_ILOCK_SHARED ); -ASSERT ((ip->i_d.di_mode &S_IFMT ) ==S_IFLNK ); -ASSERT (ip->i_d.di_size <=MAXPATHLEN ); - pathlen = ip->i_d.di_size;if (!pathlen) goto out; +if (pathlen <0 || pathlen >MAXPATHLEN ) { +xfs_alert (mp,"%s: inode (%llu) bad symlink length (%lld)" , + __func__, (unsigned long long ) ip->i_ino, + (long long ) pathlen); +ASSERT (0 ); +return XFS_ERROR (EFSCORRUPTED ); + } + +if (ip->i_df.if_flags &XFS_IFINLINE ) {memcpy (link, ip->i_df.if_u1.if_data, pathlen); link[pathlen] ='\0' ;
include/linux/nfs_fs.h +3 -0
@@ -410,6 +410,9 @@ extern const struct inode_operations nfs_file_inode_operations;extern const struct inode_operations nfs3_file_inode_operations;#endif /* CONFIG_NFS_V3 */ extern const struct file_operations nfs_file_operations; +#ifdef CONFIG_NFS_V4 +extern const struct file_operations nfs4_file_operations; +#endif /* CONFIG_NFS_V4 */ extern const struct address_space_operations nfs_file_aops;extern const struct address_space_operations nfs_dir_aops;
include/linux/nfs_xdr.h +1 -0
@@ -1149,6 +1149,7 @@ struct nfs_rpc_ops {const struct dentry_operations *dentry_ops;const struct inode_operations *dir_inode_ops;const struct inode_operations *file_inode_ops; +const struct file_operations *file_ops;int (*getroot) (struct nfs_server *,struct nfs_fh *,struct nfs_fsinfo *);
kernel/irq/spurious.c +1 -1
@@ -115,7 +115,7 @@ static int misrouted_irq(int irq)struct irq_desc *desc;int i, ok =0 ; -if (atomic_inc_return (&irq_poll_active) ==1 ) +if (atomic_inc_return (&irq_poll_active) !=1 ) goto out; irq_poll_cpu =smp_processor_id ();
net/ipv6/ip6_tunnel.c +7 -1
@@ -289,6 +289,8 @@ static struct ip6_tnl *ip6_tnl_create(struct net *net, struct ip6_tnl_parm *p)if ((err =register_netdevice (dev)) <0 ) goto failed_free; +strcpy (t->parms.name, dev->name); +dev_hold (dev);ip6_tnl_link (ip6n, t);return t;
@@ -1397,7 +1399,6 @@ ip6_tnl_dev_init_gen(struct net_device *dev)struct ip6_tnl *t =netdev_priv (dev); t->dev = dev; -strcpy (t->parms.name, dev->name); dev->tstats = alloc_percpu(struct pcpu_tstats);if (!dev->tstats)return -ENOMEM ;
@@ -1477,6 +1478,7 @@ static void __net_exit ip6_tnl_destroy_tunnels(struct ip6_tnl_net *ip6n)static int __net_init ip6_tnl_init_net (struct net *net) {struct ip6_tnl_net *ip6n =net_generic (net, ip6_tnl_net_id); +struct ip6_tnl *t =NULL ;int err; ip6n->tnls[0 ] = ip6n->tnls_wc;
@@ -1497,6 +1499,10 @@ static int __net_init ip6_tnl_init_net(struct net *net) err =register_netdev (ip6n->fb_tnl_dev);if (err <0 ) goto err_register; + + t =netdev_priv (ip6n->fb_tnl_dev); + +strcpy (t->parms.name, ip6n->fb_tnl_dev->name);return 0 ; err_register:
net/mac80211/rx.c +6 -3
@@ -140,8 +140,9 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, pos++;/* IEEE80211_RADIOTAP_RATE */ -if (status->flag &RX_FLAG_HT ) { +if (!rate || status->flag &RX_FLAG_HT ) {/* +* Without rate information don't add it. If we have, * MCS information is a separate field in radiotap, * added below. The byte here is needed as padding * for the channel though, so initialise it to 0.
@@ -162,12 +163,14 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,else if (status->flag &RX_FLAG_HT )put_unaligned_le16 (IEEE80211_CHAN_DYN |IEEE80211_CHAN_2GHZ , pos); -else if (rate->flags &IEEE80211_RATE_ERP_G ) +else if (rate && rate->flags &IEEE80211_RATE_ERP_G )put_unaligned_le16 (IEEE80211_CHAN_OFDM |IEEE80211_CHAN_2GHZ , pos); -else +else if (rate)put_unaligned_le16 (IEEE80211_CHAN_CCK |IEEE80211_CHAN_2GHZ , pos); +else +put_unaligned_le16 (IEEE80211_CHAN_2GHZ , pos); pos +=2 ;/* IEEE80211_RADIOTAP_DBM_ANTSIGNAL */
net/mac80211/util.c +4 -0
@@ -1047,6 +1047,8 @@ struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, skb =ieee80211_probereq_get (&local->hw, &sdata->vif, ssid, ssid_len, buf, buf_len); +if (!skb) + goto out;if (dst) { mgmt = (struct ieee80211_mgmt *) skb->data;
@@ -1055,6 +1057,8 @@ struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, }IEEE80211_SKB_CB (skb)->flags |=IEEE80211_TX_INTFL_DONT_ENCRYPT ; + + out:kfree (buf);return skb;
net/wireless/nl80211.c +1 -2
@@ -126,8 +126,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = { [NL80211_ATTR_MESH_CONFIG] = { .type = NLA_NESTED }, [NL80211_ATTR_SUPPORT_MESH_AUTH] = { .type = NLA_FLAG }, - [NL80211_ATTR_HT_CAPABILITY] = { .type = NLA_BINARY, - .len = NL80211_HT_CAPABILITY_LEN }, + [NL80211_ATTR_HT_CAPABILITY] = { .len = NL80211_HT_CAPABILITY_LEN }, [NL80211_ATTR_MGMT_SUBTYPE] = { .type = NLA_U8 }, [NL80211_ATTR_IE] = { .type = NLA_BINARY,
net/wireless/reg.c +3 -0
@@ -2254,6 +2254,9 @@ void /* __init_or_exit */ regulatory_exit(void)kfree (last_request); + last_request =NULL ; +dev_set_uevent_suppress (®_pdev->dev, true); +platform_device_unregister (reg_pdev);spin_lock_bh (®_pending_beacons_lock);