From: Greg Kroah-Hartman Date: Sat, 19 Jan 2013 00:48:12 +0000 (-0800) Subject: 3.0-stable patches X-Git-Tag: v3.0.60~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb816422a8260f2147a60f315513c0adc884b071;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: serial-ifx6x60-delete-spi-timer-when-shut-down-port.patch staging-vt6656-fix-inconsistent-structure-packing.patch usb-option-add-tp-link-hsupa-modem-ma180.patch usb-option-blacklist-network-interface-on-onda-mt8205-4g-lte.patch xen-fix-stack-corruption-in-xen_failsafe_callback-for-32bit-pvops-guests.patch xen-grant-table-correctly-initialize-grant-table-version-1.patch --- diff --git a/queue-3.0/serial-ifx6x60-delete-spi-timer-when-shut-down-port.patch b/queue-3.0/serial-ifx6x60-delete-spi-timer-when-shut-down-port.patch new file mode 100644 index 00000000000..9e9615de69e --- /dev/null +++ b/queue-3.0/serial-ifx6x60-delete-spi-timer-when-shut-down-port.patch @@ -0,0 +1,31 @@ +From 014b9b4ce84281ccb3d723c792bed19815f3571a Mon Sep 17 00:00:00 2001 +From: chao bi +Date: Wed, 12 Dec 2012 11:40:56 +0800 +Subject: serial:ifx6x60:Delete SPI timer when shut down port + +From: chao bi + +commit 014b9b4ce84281ccb3d723c792bed19815f3571a upstream. + +When shut down SPI port, it's possible that MRDY has been asserted and a SPI +timer was activated waiting for SRDY assert, in the case, it needs to delete +this timer. + +Signed-off-by: Chen Jun +Signed-off-by: channing +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/ifx6x60.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/tty/serial/ifx6x60.c ++++ b/drivers/tty/serial/ifx6x60.c +@@ -551,6 +551,7 @@ static void ifx_port_shutdown(struct tty + container_of(port, struct ifx_spi_device, tty_port); + + mrdy_set_low(ifx_dev); ++ del_timer(&ifx_dev->spi_timer); + clear_bit(IFX_SPI_STATE_TIMER_PENDING, &ifx_dev->flags); + tasklet_kill(&ifx_dev->io_work_tasklet); + } diff --git a/queue-3.0/series b/queue-3.0/series index d63e7f65513..fced2909096 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -10,3 +10,7 @@ intel-iommu-prevent-devices-with-rmrrs-from-being-placed.patch drbd-add-missing-part_round_stats-to-_drbd_start_io_acct.patch xhci-fix-null-pointer-dereference-when-destroying-half-built.patch xen-fix-stack-corruption-in-xen_failsafe_callback-for-32bit-pvops-guests.patch +usb-option-add-tp-link-hsupa-modem-ma180.patch +usb-option-blacklist-network-interface-on-onda-mt8205-4g-lte.patch +serial-ifx6x60-delete-spi-timer-when-shut-down-port.patch +staging-vt6656-fix-inconsistent-structure-packing.patch diff --git a/queue-3.0/staging-vt6656-fix-inconsistent-structure-packing.patch b/queue-3.0/staging-vt6656-fix-inconsistent-structure-packing.patch new file mode 100644 index 00000000000..e8d43110351 --- /dev/null +++ b/queue-3.0/staging-vt6656-fix-inconsistent-structure-packing.patch @@ -0,0 +1,238 @@ +From 1ee4c55fc9620451b2a825d793042a7e0775391b Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Mon, 14 Jan 2013 01:29:17 +0000 +Subject: staging: vt6656: Fix inconsistent structure packing + +From: Ben Hutchings + +commit 1ee4c55fc9620451b2a825d793042a7e0775391b upstream. + +vt6656 has several headers that use the #pragma pack(1) directive to +enable structure packing, but never disable it. The layout of +structures defined in other headers can then depend on which order the +various headers are included in, breaking the One Definition Rule. + +In practice this resulted in crashes on x86_64 until the order of header +inclusion was changed for some files in commit 11d404cb56ecd ('staging: +vt6656: fix headers and add cfg80211.'). But we need a proper fix that +won't be affected by future changes to the order of inclusion. + +This removes the #pragma pack(1) directives and adds __packed to the +structure definitions for which packing appears to have been intended. + +Reported-and-tested-by: Malcolm Priestley +Signed-off-by: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/vt6656/bssdb.h | 1 - + drivers/staging/vt6656/int.h | 1 - + drivers/staging/vt6656/iocmd.h | 33 ++++++++++++++++----------------- + drivers/staging/vt6656/iowpa.h | 8 +++----- + 4 files changed, 19 insertions(+), 24 deletions(-) + +--- a/drivers/staging/vt6656/bssdb.h ++++ b/drivers/staging/vt6656/bssdb.h +@@ -92,7 +92,6 @@ typedef struct tagSRSNCapObject { + } SRSNCapObject, *PSRSNCapObject; + + // BSS info(AP) +-#pragma pack(1) + typedef struct tagKnownBSS { + // BSS info + BOOL bActive; +--- a/drivers/staging/vt6656/int.h ++++ b/drivers/staging/vt6656/int.h +@@ -34,7 +34,6 @@ + #include "device.h" + + /*--------------------- Export Definitions -------------------------*/ +-#pragma pack(1) + typedef struct tagSINTData { + BYTE byTSR0; + BYTE byPkt0; +--- a/drivers/staging/vt6656/iocmd.h ++++ b/drivers/staging/vt6656/iocmd.h +@@ -95,13 +95,12 @@ typedef enum tagWZONETYPE { + // Ioctl interface structure + // Command structure + // +-#pragma pack(1) + typedef struct tagSCmdRequest { + u8 name[16]; + void *data; + u16 wResult; + u16 wCmdCode; +-} SCmdRequest, *PSCmdRequest; ++} __packed SCmdRequest, *PSCmdRequest; + + // + // Scan +@@ -111,7 +110,7 @@ typedef struct tagSCmdScan { + + u8 ssid[SSID_MAXLEN + 2]; + +-} SCmdScan, *PSCmdScan; ++} __packed SCmdScan, *PSCmdScan; + + // + // BSS Join +@@ -126,7 +125,7 @@ typedef struct tagSCmdBSSJoin { + BOOL bPSEnable; + BOOL bShareKeyAuth; + +-} SCmdBSSJoin, *PSCmdBSSJoin; ++} __packed SCmdBSSJoin, *PSCmdBSSJoin; + + // + // Zonetype Setting +@@ -137,7 +136,7 @@ typedef struct tagSCmdZoneTypeSet { + BOOL bWrite; + WZONETYPE ZoneType; + +-} SCmdZoneTypeSet, *PSCmdZoneTypeSet; ++} __packed SCmdZoneTypeSet, *PSCmdZoneTypeSet; + + typedef struct tagSWPAResult { + char ifname[100]; +@@ -145,7 +144,7 @@ typedef struct tagSWPAResult { + u8 key_mgmt; + u8 eap_type; + BOOL authenticated; +-} SWPAResult, *PSWPAResult; ++} __packed SWPAResult, *PSWPAResult; + + typedef struct tagSCmdStartAP { + +@@ -157,7 +156,7 @@ typedef struct tagSCmdStartAP { + BOOL bShareKeyAuth; + u8 byBasicRate; + +-} SCmdStartAP, *PSCmdStartAP; ++} __packed SCmdStartAP, *PSCmdStartAP; + + typedef struct tagSCmdSetWEP { + +@@ -167,7 +166,7 @@ typedef struct tagSCmdSetWEP { + BOOL bWepKeyAvailable[WEP_NKEYS]; + u32 auWepKeyLength[WEP_NKEYS]; + +-} SCmdSetWEP, *PSCmdSetWEP; ++} __packed SCmdSetWEP, *PSCmdSetWEP; + + typedef struct tagSBSSIDItem { + +@@ -180,14 +179,14 @@ typedef struct tagSBSSIDItem { + BOOL bWEPOn; + u32 uRSSI; + +-} SBSSIDItem; ++} __packed SBSSIDItem; + + + typedef struct tagSBSSIDList { + + u32 uItem; + SBSSIDItem sBSSIDList[0]; +-} SBSSIDList, *PSBSSIDList; ++} __packed SBSSIDList, *PSBSSIDList; + + + typedef struct tagSNodeItem { +@@ -208,7 +207,7 @@ typedef struct tagSNodeItem { + u32 uTxAttempts; + u16 wFailureRatio; + +-} SNodeItem; ++} __packed SNodeItem; + + + typedef struct tagSNodeList { +@@ -216,7 +215,7 @@ typedef struct tagSNodeList { + u32 uItem; + SNodeItem sNodeList[0]; + +-} SNodeList, *PSNodeList; ++} __packed SNodeList, *PSNodeList; + + + typedef struct tagSCmdLinkStatus { +@@ -229,7 +228,7 @@ typedef struct tagSCmdLinkStatus { + u32 uChannel; + u32 uLinkRate; + +-} SCmdLinkStatus, *PSCmdLinkStatus; ++} __packed SCmdLinkStatus, *PSCmdLinkStatus; + + // + // 802.11 counter +@@ -247,7 +246,7 @@ typedef struct tagSDot11MIBCount { + u32 ReceivedFragmentCount; + u32 MulticastReceivedFrameCount; + u32 FCSErrorCount; +-} SDot11MIBCount, *PSDot11MIBCount; ++} __packed SDot11MIBCount, *PSDot11MIBCount; + + + +@@ -355,13 +354,13 @@ typedef struct tagSStatMIBCount { + u32 ullTxBroadcastBytes[2]; + u32 ullTxMulticastBytes[2]; + u32 ullTxDirectedBytes[2]; +-} SStatMIBCount, *PSStatMIBCount; ++} __packed SStatMIBCount, *PSStatMIBCount; + + typedef struct tagSCmdValue { + + u32 dwValue; + +-} SCmdValue, *PSCmdValue; ++} __packed SCmdValue, *PSCmdValue; + + // + // hostapd & viawget ioctl related +@@ -431,7 +430,7 @@ struct viawget_hostapd_param { + u8 ssid[32]; + } scan_req; + } u; +-}; ++} __packed; + + /*--------------------- Export Classes ----------------------------*/ + +--- a/drivers/staging/vt6656/iowpa.h ++++ b/drivers/staging/vt6656/iowpa.h +@@ -67,12 +67,11 @@ enum { + + + +-#pragma pack(1) + typedef struct viawget_wpa_header { + u8 type; + u16 req_ie_len; + u16 resp_ie_len; +-} viawget_wpa_header; ++} __packed viawget_wpa_header; + + struct viawget_wpa_param { + u32 cmd; +@@ -113,9 +112,8 @@ struct viawget_wpa_param { + u8 *buf; + } scan_results; + } u; +-}; ++} __packed; + +-#pragma pack(1) + struct viawget_scan_result { + u8 bssid[6]; + u8 ssid[32]; +@@ -130,7 +128,7 @@ struct viawget_scan_result { + int noise; + int level; + int maxrate; +-}; ++} __packed; + + /*--------------------- Export Classes ----------------------------*/ + diff --git a/queue-3.0/usb-option-add-tp-link-hsupa-modem-ma180.patch b/queue-3.0/usb-option-add-tp-link-hsupa-modem-ma180.patch new file mode 100644 index 00000000000..cb462a26323 --- /dev/null +++ b/queue-3.0/usb-option-add-tp-link-hsupa-modem-ma180.patch @@ -0,0 +1,47 @@ +From 99beb2e9687ffd61c92a9875141eabe6f57a71b9 Mon Sep 17 00:00:00 2001 +From: Bjørn Mork +Date: Tue, 15 Jan 2013 10:29:49 +0100 +Subject: USB: option: add TP-LINK HSUPA Modem MA180 + +From: Bjørn Mork + +commit 99beb2e9687ffd61c92a9875141eabe6f57a71b9 upstream. + +The driver description files gives these names to the vendor specific +functions on this modem: + + Diagnostics VID_2357&PID_0201&MI_00 + NMEA VID_2357&PID_0201&MI_01 + Modem VID_2357&PID_0201&MI_03 + Networkcard VID_2357&PID_0201&MI_04 + +Reported-by: Thomas Schäfer +Signed-off-by: Bjørn Mork +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -449,6 +449,10 @@ static void option_instat_callback(struc + #define PETATEL_VENDOR_ID 0x1ff4 + #define PETATEL_PRODUCT_NP10T 0x600e + ++/* TP-LINK Incorporated products */ ++#define TPLINK_VENDOR_ID 0x2357 ++#define TPLINK_PRODUCT_MA180 0x0201 ++ + /* some devices interfaces need special handling due to a number of reasons */ + enum option_blacklist_reason { + OPTION_BLACKLIST_NONE = 0, +@@ -1311,6 +1315,8 @@ static const struct usb_device_id option + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) }, + { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) }, + { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T) }, ++ { USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180), ++ .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + { } /* Terminating entry */ + }; + MODULE_DEVICE_TABLE(usb, option_ids); diff --git a/queue-3.0/usb-option-blacklist-network-interface-on-onda-mt8205-4g-lte.patch b/queue-3.0/usb-option-blacklist-network-interface-on-onda-mt8205-4g-lte.patch new file mode 100644 index 00000000000..541ed288a88 --- /dev/null +++ b/queue-3.0/usb-option-blacklist-network-interface-on-onda-mt8205-4g-lte.patch @@ -0,0 +1,37 @@ +From 2291dff02e5f8c708a46a7c4c888f2c467e26642 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= +Date: Thu, 17 Jan 2013 15:14:22 +0100 +Subject: USB: option: blacklist network interface on ONDA MT8205 4G LTE + +Signed-off-by: Bjørn Mork + +commit 2291dff02e5f8c708a46a7c4c888f2c467e26642 upstream. + +The driver description files gives these names to the vendor specific +functions on this modem: + + Diag VID_19D2&PID_0265&MI_00 + NMEA VID_19D2&PID_0265&MI_01 + AT cmd VID_19D2&PID_0265&MI_02 + Modem VID_19D2&PID_0265&MI_03 + Net VID_19D2&PID_0265&MI_04 + +Signed-off-by: Bjørn Mork +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -934,7 +934,8 @@ static const struct usb_device_id option + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0254, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0257, 0xff, 0xff, 0xff), /* ZTE MF821 */ + .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0265, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0265, 0xff, 0xff, 0xff), /* ONDA MT8205 */ ++ .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0284, 0xff, 0xff, 0xff), /* ZTE MF880 */ + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0317, 0xff, 0xff, 0xff) },