From: Greg Kroah-Hartman Date: Fri, 25 Jun 2010 00:27:27 +0000 (-0700) Subject: .32 patches X-Git-Tag: v2.6.31.14~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b142ed006cad56cebaa113dd7a86ec99690e766c;p=thirdparty%2Fkernel%2Fstable-queue.git .32 patches --- diff --git a/queue-2.6.32/ahci-add-pci-quirk-for-jmb362.patch b/queue-2.6.32/ahci-add-pci-quirk-for-jmb362.patch new file mode 100644 index 00000000000..e8fa7bc768d --- /dev/null +++ b/queue-2.6.32/ahci-add-pci-quirk-for-jmb362.patch @@ -0,0 +1,61 @@ +From 4daedcfe8c6851aa01cc1997220f2577f4039c13 Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Thu, 3 Jun 2010 11:57:04 +0200 +Subject: ahci: add pci quirk for JMB362 + +From: Tejun Heo + +commit 4daedcfe8c6851aa01cc1997220f2577f4039c13 upstream. + +JMB362 is a new variant of jmicron controller which is similar to +JMB360 but has two SATA ports instead of one. As there is no PATA +port, single function AHCI mode can be used as in JMB360. Add pci +quirk for JMB362. + +Signed-off-by: Tejun Heo +Reported-by: Aries Lee +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/quirks.c | 5 ++++- + include/linux/pci_ids.h | 1 + + 2 files changed, 5 insertions(+), 1 deletion(-) + +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -1444,7 +1444,8 @@ static void quirk_jmicron_ata(struct pci + conf5 &= ~(1 << 24); /* Clear bit 24 */ + + switch (pdev->device) { +- case PCI_DEVICE_ID_JMICRON_JMB360: ++ case PCI_DEVICE_ID_JMICRON_JMB360: /* SATA single port */ ++ case PCI_DEVICE_ID_JMICRON_JMB362: /* SATA dual ports */ + /* The controller should be in single function ahci mode */ + conf1 |= 0x0002A100; /* Set 8, 13, 15, 17 */ + break; +@@ -1480,12 +1481,14 @@ static void quirk_jmicron_ata(struct pci + } + DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB360, quirk_jmicron_ata); + DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, quirk_jmicron_ata); ++DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB362, quirk_jmicron_ata); + DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, quirk_jmicron_ata); + DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, quirk_jmicron_ata); + DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, quirk_jmicron_ata); + DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368, quirk_jmicron_ata); + DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB360, quirk_jmicron_ata); + DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, quirk_jmicron_ata); ++DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB362, quirk_jmicron_ata); + DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, quirk_jmicron_ata); + DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, quirk_jmicron_ata); + DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, quirk_jmicron_ata); +--- a/include/linux/pci_ids.h ++++ b/include/linux/pci_ids.h +@@ -2317,6 +2317,7 @@ + #define PCI_VENDOR_ID_JMICRON 0x197B + #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 + #define PCI_DEVICE_ID_JMICRON_JMB361 0x2361 ++#define PCI_DEVICE_ID_JMICRON_JMB362 0x2362 + #define PCI_DEVICE_ID_JMICRON_JMB363 0x2363 + #define PCI_DEVICE_ID_JMICRON_JMB365 0x2365 + #define PCI_DEVICE_ID_JMICRON_JMB366 0x2366 diff --git a/queue-2.6.32/ath5k-retain-promiscuous-setting.patch b/queue-2.6.32/ath5k-retain-promiscuous-setting.patch new file mode 100644 index 00000000000..438ce792c7d --- /dev/null +++ b/queue-2.6.32/ath5k-retain-promiscuous-setting.patch @@ -0,0 +1,47 @@ +From 6b5dcccb495b66b3b0b9581cdccfed038e5d68a2 Mon Sep 17 00:00:00 2001 +From: Bob Copeland +Date: Fri, 4 Jun 2010 08:14:14 -0400 +Subject: ath5k: retain promiscuous setting + +From: Bob Copeland + +commit 6b5dcccb495b66b3b0b9581cdccfed038e5d68a2 upstream. + +Commit 56d1de0a21db28e41741cfa0a66e18bc8d920554, "ath5k: clean up +filter flags setting" introduced a regression in monitor mode such +that the promisc filter flag would get lost. + +Although we set the promisc flag when it changed, we did not +preserve it across subsequent calls to configure_filter. This patch +restores the original functionality. + +Bisected-by: weedy2887@gmail.com +Tested-by: weedy2887@gmail.com +Tested-by: Rick Farina +Signed-off-by: Bob Copeland +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath5k/base.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/ath/ath5k/base.c ++++ b/drivers/net/wireless/ath/ath5k/base.c +@@ -2975,13 +2975,15 @@ static void ath5k_configure_filter(struc + + if (changed_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) { + if (*new_flags & FIF_PROMISC_IN_BSS) { +- rfilt |= AR5K_RX_FILTER_PROM; + __set_bit(ATH_STAT_PROMISC, sc->status); + } else { + __clear_bit(ATH_STAT_PROMISC, sc->status); + } + } + ++ if (test_bit(ATH_STAT_PROMISC, sc->status)) ++ rfilt |= AR5K_RX_FILTER_PROM; ++ + /* Note, AR5K_RX_FILTER_MCAST is already enabled */ + if (*new_flags & FIF_ALLMULTI) { + mfilt[0] = ~0; diff --git a/queue-2.6.32/ath9k-add-support-for-802.11n-bonded-out-ar2427.patch b/queue-2.6.32/ath9k-add-support-for-802.11n-bonded-out-ar2427.patch new file mode 100644 index 00000000000..12d48ba1b08 --- /dev/null +++ b/queue-2.6.32/ath9k-add-support-for-802.11n-bonded-out-ar2427.patch @@ -0,0 +1,97 @@ +From 5ffaf8a361b4c9025963959a744f21d8173c7669 Mon Sep 17 00:00:00 2001 +From: Luis R. Rodriguez +Date: Tue, 2 Feb 2010 11:58:33 -0500 +Subject: ath9k: add support for 802.11n bonded out AR2427 + +From: Luis R. Rodriguez + +commit 5ffaf8a361b4c9025963959a744f21d8173c7669 upstream. + +Some single chip family devices are sold in the market with +802.11n bonded out, these have no hardware capability for +802.11n but ath9k can still support them. These are called +AR2427. + +[bwh: backported to 2.6.32] +Reported-by: Rolf Leggewie +Tested-by: Bernhard Reiter +Signed-off-by: Luis R. Rodriguez +Signed-off-by: John W. Linville +Cc: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/hw.c | 7 ++++++- + drivers/net/wireless/ath/ath9k/hw.h | 1 + + drivers/net/wireless/ath/ath9k/main.c | 4 +++- + drivers/net/wireless/ath/ath9k/pci.c | 1 + + 4 files changed, 11 insertions(+), 2 deletions(-) + +--- a/drivers/net/wireless/ath/ath9k/hw.c ++++ b/drivers/net/wireless/ath/ath9k/hw.c +@@ -398,7 +398,6 @@ static void ath9k_hw_init_config(struct + ah->config.pcie_clock_req = 0; + ah->config.pcie_waen = 0; + ah->config.analog_shiftreg = 1; +- ah->config.ht_enable = 1; + ah->config.ofdm_trig_low = 200; + ah->config.ofdm_trig_high = 500; + ah->config.cck_trig_high = 200; +@@ -412,6 +411,11 @@ static void ath9k_hw_init_config(struct + ah->config.spurchans[i][1] = AR_NO_SPUR; + } + ++ if (ah->hw_version.devid != AR2427_DEVID_PCIE) ++ ah->config.ht_enable = 1; ++ else ++ ah->config.ht_enable = 0; ++ + ah->config.intr_mitigation = true; + + /* +@@ -617,6 +621,7 @@ static bool ath9k_hw_devid_supported(u16 + case AR9285_DEVID_PCIE: + case AR5416_DEVID_AR9287_PCI: + case AR5416_DEVID_AR9287_PCIE: ++ case AR2427_DEVID_PCIE: + return true; + default: + break; +--- a/drivers/net/wireless/ath/ath9k/hw.h ++++ b/drivers/net/wireless/ath/ath9k/hw.h +@@ -37,6 +37,7 @@ + #define AR9280_DEVID_PCI 0x0029 + #define AR9280_DEVID_PCIE 0x002a + #define AR9285_DEVID_PCIE 0x002b ++#define AR2427_DEVID_PCIE 0x002c + #define AR5416_AR9100_DEVID 0x000b + #define AR_SUBVENDOR_ID_NOG 0x0e11 + #define AR_SUBVENDOR_ID_NEW_A 0x7065 +--- a/drivers/net/wireless/ath/ath9k/main.c ++++ b/drivers/net/wireless/ath/ath9k/main.c +@@ -1541,12 +1541,14 @@ void ath_set_hw_capab(struct ath_softc * + hw->flags = IEEE80211_HW_RX_INCLUDES_FCS | + IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING | + IEEE80211_HW_SIGNAL_DBM | +- IEEE80211_HW_AMPDU_AGGREGATION | + IEEE80211_HW_SUPPORTS_PS | + IEEE80211_HW_PS_NULLFUNC_STACK | + IEEE80211_HW_REPORTS_TX_ACK_STATUS | + IEEE80211_HW_SPECTRUM_MGMT; + ++ if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) ++ hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION; ++ + if (AR_SREV_9160_10_OR_LATER(sc->sc_ah) || modparam_nohwcrypt) + hw->flags |= IEEE80211_HW_MFP_CAPABLE; + +--- a/drivers/net/wireless/ath/ath9k/pci.c ++++ b/drivers/net/wireless/ath/ath9k/pci.c +@@ -25,6 +25,7 @@ static struct pci_device_id ath_pci_id_t + { PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI */ + { PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */ + { PCI_VDEVICE(ATHEROS, 0x002B) }, /* PCI-E */ ++ { PCI_VDEVICE(ATHEROS, 0x002C) }, /* PCI-E 802.11n bonded out */ + { PCI_VDEVICE(ATHEROS, 0x002D) }, /* PCI */ + { PCI_VDEVICE(ATHEROS, 0x002E) }, /* PCI-E */ + { 0 } diff --git a/queue-2.6.32/atl1e-allow-tx-checksum-offload-and-tso-to-be-disabled-and-reenabled.patch b/queue-2.6.32/atl1e-allow-tx-checksum-offload-and-tso-to-be-disabled-and-reenabled.patch new file mode 100644 index 00000000000..796ef6011dc --- /dev/null +++ b/queue-2.6.32/atl1e-allow-tx-checksum-offload-and-tso-to-be-disabled-and-reenabled.patch @@ -0,0 +1,33 @@ +From ac936929092dc6a5409b627c4c67305ab9b626b3 Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Tue, 1 Dec 2009 19:09:52 +0000 +Subject: atl1e: Allow TX checksum offload and TSO to be disabled and reenabled + +From: Ben Hutchings + +commit ac936929092dc6a5409b627c4c67305ab9b626b3 upstream. + +Signed-off-by: Ben Hutchings +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/atl1e/atl1e_ethtool.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/net/atl1e/atl1e_ethtool.c ++++ b/drivers/net/atl1e/atl1e_ethtool.c +@@ -394,11 +394,13 @@ static const struct ethtool_ops atl1e_et + .get_eeprom = atl1e_get_eeprom, + .set_eeprom = atl1e_set_eeprom, + .get_tx_csum = atl1e_get_tx_csum, ++ .set_tx_csum = ethtool_op_set_tx_hw_csum, + .get_sg = ethtool_op_get_sg, + .set_sg = ethtool_op_set_sg, + #ifdef NETIF_F_TSO + .get_tso = ethtool_op_get_tso, + #endif ++ .set_tso = ethtool_op_set_tso, + }; + + void atl1e_set_ethtool_ops(struct net_device *netdev) diff --git a/queue-2.6.32/dmfe-tulip-let-dmfe-handle-dm910x-except-for-sparc-on-board-chips.patch b/queue-2.6.32/dmfe-tulip-let-dmfe-handle-dm910x-except-for-sparc-on-board-chips.patch new file mode 100644 index 00000000000..42af172c023 --- /dev/null +++ b/queue-2.6.32/dmfe-tulip-let-dmfe-handle-dm910x-except-for-sparc-on-board-chips.patch @@ -0,0 +1,143 @@ +From 4d907069bc1b745f4abd4745c332d33098e733b8 Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Thu, 7 Jan 2010 02:41:51 +0000 +Subject: dmfe/tulip: Let dmfe handle DM910x except for SPARC on-board chips + +From: Ben Hutchings + +commit 4d907069bc1b745f4abd4745c332d33098e733b8 upstream. + +The Davicom DM9100 and DM9102 chips are used on the motherboards of +some SPARC systems (supported by the tulip driver) and also in PCI +expansion cards (supported by the dmfe driver). There is no +difference in the PCI device ids for the two different configurations, +so these drivers both claim the device ids. However, it is possible +to distinguish the two configurations by the presence of Open Firmware +properties for them, so we do that. + +Signed-off-by: Ben Hutchings +Signed-off-by: Grant Grundler +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/tulip/Kconfig | 4 ++++ + drivers/net/tulip/dmfe.c | 21 +++++++++++++++++++++ + drivers/net/tulip/tulip_core.c | 32 +++++++++++++++++++++++++------- + 3 files changed, 50 insertions(+), 7 deletions(-) + +--- a/drivers/net/tulip/Kconfig ++++ b/drivers/net/tulip/Kconfig +@@ -101,6 +101,10 @@ config TULIP_NAPI_HW_MITIGATION + + If in doubt, say Y. + ++config TULIP_DM910X ++ def_bool y ++ depends on TULIP && SPARC ++ + config DE4X5 + tristate "Generic DECchip & DIGITAL EtherWORKS PCI/EISA" + depends on PCI || EISA +--- a/drivers/net/tulip/dmfe.c ++++ b/drivers/net/tulip/dmfe.c +@@ -92,6 +92,10 @@ + #include + #include + ++#ifdef CONFIG_TULIP_DM910X ++#include ++#endif ++ + + /* Board/System/Debug information/definition ---------------- */ + #define PCI_DM9132_ID 0x91321282 /* Davicom DM9132 ID */ +@@ -377,6 +381,23 @@ static int __devinit dmfe_init_one (stru + if (!printed_version++) + printk(version); + ++ /* ++ * SPARC on-board DM910x chips should be handled by the main ++ * tulip driver, except for early DM9100s. ++ */ ++#ifdef CONFIG_TULIP_DM910X ++ if ((ent->driver_data == PCI_DM9100_ID && pdev->revision >= 0x30) || ++ ent->driver_data == PCI_DM9102_ID) { ++ struct device_node *dp = pci_device_to_OF_node(pdev); ++ ++ if (dp && of_get_property(dp, "local-mac-address", NULL)) { ++ printk(KERN_INFO DRV_NAME ++ ": skipping on-board DM910x (use tulip)\n"); ++ return -ENODEV; ++ } ++ } ++#endif ++ + /* Init network device */ + dev = alloc_etherdev(sizeof(*db)); + if (dev == NULL) +--- a/drivers/net/tulip/tulip_core.c ++++ b/drivers/net/tulip/tulip_core.c +@@ -196,9 +196,13 @@ struct tulip_chip_table tulip_tbl[] = { + | HAS_NWAY | HAS_PCI_MWI, tulip_timer, tulip_media_task }, + + /* DM910X */ ++#ifdef CONFIG_TULIP_DM910X + { "Davicom DM9102/DM9102A", 128, 0x0001ebef, + HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | HAS_ACPI, + tulip_timer, tulip_media_task }, ++#else ++ { NULL }, ++#endif + + /* RS7112 */ + { "Conexant LANfinity", 256, 0x0001ebef, +@@ -228,8 +232,10 @@ static struct pci_device_id tulip_pci_tb + { 0x1259, 0xa120, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, + { 0x11F6, 0x9881, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMPEX9881 }, + { 0x8086, 0x0039, PCI_ANY_ID, PCI_ANY_ID, 0, 0, I21145 }, ++#ifdef CONFIG_TULIP_DM910X + { 0x1282, 0x9100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X }, + { 0x1282, 0x9102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X }, ++#endif + { 0x1113, 0x1216, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, + { 0x1113, 0x1217, PCI_ANY_ID, PCI_ANY_ID, 0, 0, MX98715 }, + { 0x1113, 0x9511, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, +@@ -1299,18 +1305,30 @@ static int __devinit tulip_init_one (str + } + + /* +- * Early DM9100's need software CRC and the DMFE driver ++ * DM910x chips should be handled by the dmfe driver, except ++ * on-board chips on SPARC systems. Also, early DM9100s need ++ * software CRC which only the dmfe driver supports. + */ + +- if (pdev->vendor == 0x1282 && pdev->device == 0x9100) +- { +- /* Read Chip revision */ +- if (pdev->revision < 0x30) +- { +- printk(KERN_ERR PFX "skipping early DM9100 with Crc bug (use dmfe)\n"); ++#ifdef CONFIG_TULIP_DM910X ++ if (chip_idx == DM910X) { ++ struct device_node *dp; ++ ++ if (pdev->vendor == 0x1282 && pdev->device == 0x9100 && ++ pdev->revision < 0x30) { ++ printk(KERN_INFO PFX ++ "skipping early DM9100 with Crc bug (use dmfe)\n"); ++ return -ENODEV; ++ } ++ ++ dp = pci_device_to_OF_node(pdev); ++ if (!(dp && of_get_property(dp, "local-mac-address", NULL))) { ++ printk(KERN_INFO PFX ++ "skipping DM910x expansion card (use dmfe)\n"); + return -ENODEV; + } + } ++#endif + + /* + * Looks for early PCI chipsets where people report hangs diff --git a/queue-2.6.32/documentation-3c509-document-ethtool-support.patch b/queue-2.6.32/documentation-3c509-document-ethtool-support.patch new file mode 100644 index 00000000000..630f07e15ca --- /dev/null +++ b/queue-2.6.32/documentation-3c509-document-ethtool-support.patch @@ -0,0 +1,58 @@ +From aa4e2e171385bb77b4da8b760d26dea2aa291587 Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Mon, 11 Jan 2010 15:53:45 -0800 +Subject: Documentation/3c509: document ethtool support + +From: Ben Hutchings + +commit aa4e2e171385bb77b4da8b760d26dea2aa291587 upstream. + +3c509 was changed to support ethtool in 2002, making the 'xcvr' module +parameter obsolete in most cases. More recently 3c509 was converted +to the modern driver model and this parameter was removed. Fix the +documentation to refer to ethtool rather than the module parameter. + +Signed-off-by: Ben Hutchings +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/networking/3c509.txt | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +--- a/Documentation/networking/3c509.txt ++++ b/Documentation/networking/3c509.txt +@@ -48,11 +48,11 @@ for LILO parameters for doing this: + This configures the first found 3c509 card for IRQ 10, base I/O 0x310, and + transceiver type 3 (10base2). The flag "0x3c509" must be set to avoid conflicts + with other card types when overriding the I/O address. When the driver is +-loaded as a module, only the IRQ and transceiver setting may be overridden. +-For example, setting two cards to 10base2/IRQ10 and AUI/IRQ11 is done by using +-the xcvr and irq module options: ++loaded as a module, only the IRQ may be overridden. For example, ++setting two cards to IRQ10 and IRQ11 is done by using the irq module ++option: + +- options 3c509 xcvr=3,1 irq=10,11 ++ options 3c509 irq=10,11 + + + (2) Full-duplex mode +@@ -77,6 +77,8 @@ operation. + itself full-duplex capable. This is almost certainly one of two things: a full- + duplex-capable Ethernet switch (*not* a hub), or a full-duplex-capable NIC on + another system that's connected directly to the 3c509B via a crossover cable. ++ ++Full-duplex mode can be enabled using 'ethtool'. + + /////Extremely important caution concerning full-duplex mode///// + Understand that the 3c509B's hardware's full-duplex support is much more +@@ -113,6 +115,8 @@ This insured that merely upgrading the d + never automatically enable full-duplex mode in an existing installation; + it must always be explicitly enabled via one of these code in order to be + activated. ++ ++The transceiver type can be changed using 'ethtool'. + + + (4a) Interpretation of error messages and common problems diff --git a/queue-2.6.32/drm-i915-give-up-on-8xx-lid-status.patch b/queue-2.6.32/drm-i915-give-up-on-8xx-lid-status.patch new file mode 100644 index 00000000000..d2541618c73 --- /dev/null +++ b/queue-2.6.32/drm-i915-give-up-on-8xx-lid-status.patch @@ -0,0 +1,39 @@ +From 7b9c5abee98c54f85bcc04bd4d7ec8d5094c73f4 Mon Sep 17 00:00:00 2001 +From: Jesse Barnes +Date: Fri, 12 Feb 2010 09:30:00 -0800 +Subject: drm/i915: give up on 8xx lid status + +From: Jesse Barnes + +commit 7b9c5abee98c54f85bcc04bd4d7ec8d5094c73f4 upstream. + +These old machines more often than not lie about their lid state. So +don't use it to detect LVDS presence, but leave the event handler to +deal with lid open/close, when we might need to reset the mode. + +Fixes kernel bug #15248 + +Signed-off-by: Jesse Barnes +Signed-off-by: Eric Anholt +Cc: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_lvds.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/gpu/drm/i915/intel_lvds.c ++++ b/drivers/gpu/drm/i915/intel_lvds.c +@@ -648,8 +648,12 @@ static const struct dmi_system_id bad_li + */ + static enum drm_connector_status intel_lvds_detect(struct drm_connector *connector) + { ++ struct drm_device *dev = connector->dev; + enum drm_connector_status status = connector_status_connected; + ++ if (IS_I8XX(dev)) ++ return connector_status_connected; ++ + if (!acpi_lid_open() && !dmi_check_system(bad_lid_status)) + status = connector_status_disconnected; + diff --git a/queue-2.6.32/drm-i915-rebind-bo-if-currently-bound-with-incorrect-alignment.patch b/queue-2.6.32/drm-i915-rebind-bo-if-currently-bound-with-incorrect-alignment.patch new file mode 100644 index 00000000000..cf5fbb26ccb --- /dev/null +++ b/queue-2.6.32/drm-i915-rebind-bo-if-currently-bound-with-incorrect-alignment.patch @@ -0,0 +1,52 @@ +From ac0c6b5ad3b3b513e1057806d4b7627fcc0ecc27 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Thu, 27 May 2010 13:18:18 +0100 +Subject: drm/i915: Rebind bo if currently bound with incorrect alignment. + +From: Chris Wilson + +commit ac0c6b5ad3b3b513e1057806d4b7627fcc0ecc27 upstream. + +Whilst pinning the buffer, check that that its current alignment +matches the requested alignment. If it does not, rebind. + +This should clear up any final render errors whilst resuming, +for reference: + + Bug 27070 - [i915] Page table errors with empty ringbuffer + https://bugs.freedesktop.org/show_bug.cgi?id=27070 + + Bug 15502 - render error detected, EIR: 0x00000010 + https://bugzilla.kernel.org/show_bug.cgi?id=15502 + + Bug 13844 - i915 error: "render error detected" + https://bugzilla.kernel.org/show_bug.cgi?id=13844 + +Signed-off-by: Chris Wilson +Signed-off-by: Eric Anholt +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_gem.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -3947,6 +3947,17 @@ i915_gem_object_pin(struct drm_gem_objec + int ret; + + i915_verify_inactive(dev, __FILE__, __LINE__); ++ ++ if (obj_priv->gtt_space != NULL) { ++ if (alignment == 0) ++ alignment = i915_gem_get_gtt_alignment(obj); ++ if (obj_priv->gtt_offset & (alignment - 1)) { ++ ret = i915_gem_object_unbind(obj); ++ if (ret) ++ return ret; ++ } ++ } ++ + if (obj_priv->gtt_space == NULL) { + ret = i915_gem_object_bind_to_gtt(obj, alignment); + if (ret) diff --git a/queue-2.6.32/firewire-core-check-for-1394a-compliant-irm-fix-inaccessibility-of-sony-camcorder.patch b/queue-2.6.32/firewire-core-check-for-1394a-compliant-irm-fix-inaccessibility-of-sony-camcorder.patch new file mode 100644 index 00000000000..11c8ce8a3e6 --- /dev/null +++ b/queue-2.6.32/firewire-core-check-for-1394a-compliant-irm-fix-inaccessibility-of-sony-camcorder.patch @@ -0,0 +1,111 @@ +From 10389536742cefbedecb67a5b2906f155cf3a1c3 Mon Sep 17 00:00:00 2001 +From: Stefan Richter +Date: Sun, 30 May 2010 19:43:52 +0200 +Subject: firewire: core: check for 1394a compliant IRM, fix inaccessibility of Sony camcorder + +From: Stefan Richter + +commit 10389536742cefbedecb67a5b2906f155cf3a1c3 upstream. + +Per IEEE 1394 clause 8.4.2.3, a contender for the IRM role shall check +whether the current IRM complies to 1394a-2000 or later. If not force a +compliant node (e.g. itself) to become IRM. This was implemented in the +older ieee1394 driver but not yet in firewire-core. + +An older Sony camcorder (Sony DCR-TRV25) which implements 1394-1995 IRM +but neither 1394a-2000 IRM nor BM was now found to cause an +interoperability bug: + - Camcorder becomes root node when plugged in, hence gets IRM role. + - firewire-core successfully contends for BM role, proceeds to perform + gap count optimization and resets the bus. + - Sony camcorder ignores presence of a BM (against the spec, this is + a firmware bug), performs its idea of gap count optimization and + resets the bus. + - Preceding two steps are repeated endlessly, bus never settles, + regular I/O is practically impossible. +http://thread.gmane.org/gmane.linux.kernel.firewire.user/3913 + +This is an interoperability regression from the old to the new drivers. +Fix it indirectly by adding the 1394a IRM check. The spec suggests +three and a half methods to determine 1394a compliance of a remote IRM; +we choose the method of testing the Config_ROM.Bus_Info.generation +field. This is data that firewire-core should have readily available at +this point, i.e. does not require extra I/O. + +Reported-by: Clemens Ladisch (missing 1394a check) +Reported-by: H. S. (issue with Sony DCR-TRV25) +Tested-by: H. S. +Signed-off-by: Stefan Richter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/firewire/core-card.c | 24 +++++++++++++++++++----- + 1 file changed, 19 insertions(+), 5 deletions(-) + +--- a/drivers/firewire/core-card.c ++++ b/drivers/firewire/core-card.c +@@ -239,7 +239,7 @@ void fw_schedule_bm_work(struct fw_card + static void fw_card_bm_work(struct work_struct *work) + { + struct fw_card *card = container_of(work, struct fw_card, work.work); +- struct fw_device *root_device; ++ struct fw_device *root_device, *irm_device; + struct fw_node *root_node; + unsigned long flags; + int root_id, new_root_id, irm_id, local_id; +@@ -247,6 +247,7 @@ static void fw_card_bm_work(struct work_ + bool do_reset = false; + bool root_device_is_running; + bool root_device_is_cmc; ++ bool irm_is_1394_1995_only; + + spin_lock_irqsave(&card->lock, flags); + +@@ -256,12 +257,18 @@ static void fw_card_bm_work(struct work_ + } + + generation = card->generation; ++ + root_node = card->root_node; + fw_node_get(root_node); + root_device = root_node->data; + root_device_is_running = root_device && + atomic_read(&root_device->state) == FW_DEVICE_RUNNING; + root_device_is_cmc = root_device && root_device->cmc; ++ ++ irm_device = card->irm_node->data; ++ irm_is_1394_1995_only = irm_device && irm_device->config_rom && ++ (irm_device->config_rom[2] & 0x000000f0) == 0; ++ + root_id = root_node->node_id; + irm_id = card->irm_node->node_id; + local_id = card->local_node->node_id; +@@ -284,8 +291,15 @@ static void fw_card_bm_work(struct work_ + + if (!card->irm_node->link_on) { + new_root_id = local_id; +- fw_notify("IRM has link off, making local node (%02x) root.\n", +- new_root_id); ++ fw_notify("%s, making local node (%02x) root.\n", ++ "IRM has link off", new_root_id); ++ goto pick_me; ++ } ++ ++ if (irm_is_1394_1995_only) { ++ new_root_id = local_id; ++ fw_notify("%s, making local node (%02x) root.\n", ++ "IRM is not 1394a compliant", new_root_id); + goto pick_me; + } + +@@ -324,8 +338,8 @@ static void fw_card_bm_work(struct work_ + * root, and thus, IRM. + */ + new_root_id = local_id; +- fw_notify("BM lock failed, making local node (%02x) root.\n", +- new_root_id); ++ fw_notify("%s, making local node (%02x) root.\n", ++ "BM lock failed", new_root_id); + goto pick_me; + } + } else if (card->bm_generation != generation) { diff --git a/queue-2.6.32/iwlwifi-check-for-aggregation-frame-and-queue.patch b/queue-2.6.32/iwlwifi-check-for-aggregation-frame-and-queue.patch new file mode 100644 index 00000000000..b5379b9c097 --- /dev/null +++ b/queue-2.6.32/iwlwifi-check-for-aggregation-frame-and-queue.patch @@ -0,0 +1,96 @@ +From 45d427001b5eec03cecaacddb53c73af46bb263e Mon Sep 17 00:00:00 2001 +From: Wey-Yi Guy +Date: Wed, 3 Feb 2010 12:24:44 -0800 +Subject: iwlwifi: check for aggregation frame and queue + +From: Wey-Yi Guy + +commit 45d427001b5eec03cecaacddb53c73af46bb263e upstream. + +Error checking for aggregation frames should go into aggregation queue, +if aggregation queue not available, use legacy queue instead. +Also make sure the aggregation queue is available to activate, +if driver and mac80211 is out-of-sync, try to disable the queue and +sync-up with mac80211. + +Signed-off-by: Wey-Yi Guy +Signed-off-by: Reinette Chatre +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 15 ++++++++++++++- + drivers/net/wireless/iwlwifi/iwl-tx.c | 18 ++++++++++++------ + 2 files changed, 26 insertions(+), 7 deletions(-) + +--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c ++++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +@@ -402,10 +402,23 @@ static void rs_tl_turn_on_agg_for_tid(st + struct iwl_lq_sta *lq_data, u8 tid, + struct ieee80211_sta *sta) + { ++ int ret; ++ + if (rs_tl_get_load(lq_data, tid) > IWL_AGG_LOAD_THRESHOLD) { + IWL_DEBUG_HT(priv, "Starting Tx agg: STA: %pM tid: %d\n", + sta->addr, tid); +- ieee80211_start_tx_ba_session(priv->hw, sta->addr, tid); ++ ret = ieee80211_start_tx_ba_session(priv->hw, sta->addr, tid); ++ if (ret == -EAGAIN) { ++ /* ++ * driver and mac80211 is out of sync ++ * this might be cause by reloading firmware ++ * stop the tx ba session here ++ */ ++ IWL_DEBUG_HT(priv, "Fail start Tx agg on tid: %d\n", ++ tid); ++ ret = ieee80211_stop_tx_ba_session(priv->hw, sta->addr, tid, ++ WLAN_BACK_INITIATOR); ++ } + } + } + +--- a/drivers/net/wireless/iwlwifi/iwl-tx.c ++++ b/drivers/net/wireless/iwlwifi/iwl-tx.c +@@ -791,8 +791,10 @@ int iwl_tx_skb(struct iwl_priv *priv, st + hdr->seq_ctrl |= cpu_to_le16(seq_number); + seq_number += 0x10; + /* aggregation is on for this */ +- if (info->flags & IEEE80211_TX_CTL_AMPDU) ++ if (info->flags & IEEE80211_TX_CTL_AMPDU && ++ priv->stations[sta_id].tid[tid].agg.state == IWL_AGG_ON) { + txq_id = priv->stations[sta_id].tid[tid].agg.txq_id; ++ } + } + + txq = &priv->txq[txq_id]; +@@ -1273,7 +1275,7 @@ int iwl_tx_agg_stop(struct iwl_priv *pri + { + int tx_fifo_id, txq_id, sta_id, ssn = -1; + struct iwl_tid_data *tid_data; +- int ret, write_ptr, read_ptr; ++ int write_ptr, read_ptr; + unsigned long flags; + + if (!ra) { +@@ -1325,13 +1327,17 @@ int iwl_tx_agg_stop(struct iwl_priv *pri + priv->stations[sta_id].tid[tid].agg.state = IWL_AGG_OFF; + + spin_lock_irqsave(&priv->lock, flags); +- ret = priv->cfg->ops->lib->txq_agg_disable(priv, txq_id, ssn, ++ /* ++ * the only reason this call can fail is queue number out of range, ++ * which can happen if uCode is reloaded and all the station ++ * information are lost. if it is outside the range, there is no need ++ * to deactivate the uCode queue, just return "success" to allow ++ * mac80211 to clean up it own data. ++ */ ++ priv->cfg->ops->lib->txq_agg_disable(priv, txq_id, ssn, + tx_fifo_id); + spin_unlock_irqrestore(&priv->lock, flags); + +- if (ret) +- return ret; +- + ieee80211_stop_tx_ba_cb_irqsafe(priv->hw, ra, tid); + + return 0; diff --git a/queue-2.6.32/iwlwifi-recalculate-average-tpt-if-not-current.patch b/queue-2.6.32/iwlwifi-recalculate-average-tpt-if-not-current.patch new file mode 100644 index 00000000000..da70a7e6681 --- /dev/null +++ b/queue-2.6.32/iwlwifi-recalculate-average-tpt-if-not-current.patch @@ -0,0 +1,49 @@ +From 3d79b2a9eeaa066b35c49fbb17e3156a3c482c3e Mon Sep 17 00:00:00 2001 +From: Reinette Chatre +Date: Mon, 3 May 2010 10:55:07 -0700 +Subject: iwlwifi: recalculate average tpt if not current + +From: Reinette Chatre + +commit 3d79b2a9eeaa066b35c49fbb17e3156a3c482c3e upstream. + +We currently have this check as a BUG_ON, which is being hit by people. +Previously it was an error with a recalculation if not current, return that +code. + +The BUG_ON was introduced by: +commit 3110bef78cb4282c58245bc8fd6d95d9ccb19749 +Author: Guy Cohen +Date: Tue Sep 9 10:54:54 2008 +0800 + + iwlwifi: Added support for 3 antennas + +... the portion adding the BUG_ON is reverted since we are encountering the error +and BUG_ON was created with assumption that error is not encountered. + +Signed-off-by: Reinette Chatre +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c ++++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +@@ -2193,9 +2193,12 @@ static void rs_rate_scale_perform(struct + + /* Else we have enough samples; calculate estimate of + * actual average throughput */ +- +- BUG_ON(window->average_tpt != ((window->success_ratio * +- tbl->expected_tpt[index] + 64) / 128)); ++ if (window->average_tpt != ((window->success_ratio * ++ tbl->expected_tpt[index] + 64) / 128)) { ++ IWL_ERR(priv, "expected_tpt should have been calculated by now\n"); ++ window->average_tpt = ((window->success_ratio * ++ tbl->expected_tpt[index] + 64) / 128); ++ } + + /* If we are searching for better modulation mode, check success. */ + if (lq_sta->search_better_tbl && diff --git a/queue-2.6.32/iwlwifi-update-supported-pci_id-list-for-5xx0-series.patch b/queue-2.6.32/iwlwifi-update-supported-pci_id-list-for-5xx0-series.patch new file mode 100644 index 00000000000..aea938cc43f --- /dev/null +++ b/queue-2.6.32/iwlwifi-update-supported-pci_id-list-for-5xx0-series.patch @@ -0,0 +1,173 @@ +From ac592574a577162183b5c1dd040a188caa068a29 Mon Sep 17 00:00:00 2001 +From: Wey-Yi Guy +Date: Fri, 20 Nov 2009 12:05:03 -0800 +Subject: iwlwifi: update supported PCI_ID list for 5xx0 series + +From: Wey-Yi Guy + +commit ac592574a577162183b5c1dd040a188caa068a29 upstream. + +Update the PCI_ID list for 5xx0 series. +Remove all the PCI_IDs which never made into production or not longer in +production. + +Also make sure the supported bands(a/b/g/n) match specified PCI_IDs + +Signed-off-by: Wey-Yi Guy +Signed-off-by: Reinette Chatre +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + + +--- + drivers/net/wireless/iwlwifi/iwl-5000.c | 23 ++++++++- + drivers/net/wireless/iwlwifi/iwl-agn.c | 74 ++++++++++++++++++++++++-------- + drivers/net/wireless/iwlwifi/iwl-dev.h | 3 - + 3 files changed, 78 insertions(+), 22 deletions(-) + +--- a/drivers/net/wireless/iwlwifi/iwl-5000.c ++++ b/drivers/net/wireless/iwlwifi/iwl-5000.c +@@ -1674,12 +1674,12 @@ struct iwl_cfg iwl5300_agn_cfg = { + .use_rts_for_ht = true, /* use rts/cts protection */ + }; + +-struct iwl_cfg iwl5100_bg_cfg = { +- .name = "5100BG", ++struct iwl_cfg iwl5100_bgn_cfg = { ++ .name = "5100BGN", + .fw_name_pre = IWL5000_FW_PRE, + .ucode_api_max = IWL5000_UCODE_API_MAX, + .ucode_api_min = IWL5000_UCODE_API_MIN, +- .sku = IWL_SKU_G, ++ .sku = IWL_SKU_G|IWL_SKU_N, + .ops = &iwl5000_ops, + .eeprom_size = IWL_5000_EEPROM_IMG_SIZE, + .eeprom_ver = EEPROM_5000_EEPROM_VERSION, +@@ -1705,7 +1705,6 @@ struct iwl_cfg iwl5100_abg_cfg = { + .valid_tx_ant = ANT_B, + .valid_rx_ant = ANT_AB, + .need_pll_cfg = true, +- .ht_greenfield_support = true, + }; + + struct iwl_cfg iwl5100_agn_cfg = { +@@ -1762,6 +1761,22 @@ struct iwl_cfg iwl5150_agn_cfg = { + .use_rts_for_ht = true, /* use rts/cts protection */ + }; + ++struct iwl_cfg iwl5150_abg_cfg = { ++ .name = "5150ABG", ++ .fw_name_pre = IWL5150_FW_PRE, ++ .ucode_api_max = IWL5150_UCODE_API_MAX, ++ .ucode_api_min = IWL5150_UCODE_API_MIN, ++ .sku = IWL_SKU_A|IWL_SKU_G, ++ .ops = &iwl5150_ops, ++ .eeprom_size = IWL_5000_EEPROM_IMG_SIZE, ++ .eeprom_ver = EEPROM_5050_EEPROM_VERSION, ++ .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, ++ .mod_params = &iwl50_mod_params, ++ .valid_tx_ant = ANT_A, ++ .valid_rx_ant = ANT_AB, ++ .need_pll_cfg = true, ++}; ++ + MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); + MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX)); + +--- a/drivers/net/wireless/iwlwifi/iwl-agn.c ++++ b/drivers/net/wireless/iwlwifi/iwl-agn.c +@@ -3203,23 +3203,63 @@ static struct pci_device_id iwl_hw_card_ + {IWL_PCI_DEVICE(0x4230, PCI_ANY_ID, iwl4965_agn_cfg)}, + #endif /* CONFIG_IWL4965 */ + #ifdef CONFIG_IWL5000 +- {IWL_PCI_DEVICE(0x4232, 0x1205, iwl5100_bg_cfg)}, +- {IWL_PCI_DEVICE(0x4232, 0x1305, iwl5100_bg_cfg)}, +- {IWL_PCI_DEVICE(0x4232, 0x1206, iwl5100_abg_cfg)}, +- {IWL_PCI_DEVICE(0x4232, 0x1306, iwl5100_abg_cfg)}, +- {IWL_PCI_DEVICE(0x4232, 0x1326, iwl5100_abg_cfg)}, +- {IWL_PCI_DEVICE(0x4237, 0x1216, iwl5100_abg_cfg)}, +- {IWL_PCI_DEVICE(0x4232, PCI_ANY_ID, iwl5100_agn_cfg)}, +- {IWL_PCI_DEVICE(0x4235, PCI_ANY_ID, iwl5300_agn_cfg)}, +- {IWL_PCI_DEVICE(0x4236, PCI_ANY_ID, iwl5300_agn_cfg)}, +- {IWL_PCI_DEVICE(0x4237, PCI_ANY_ID, iwl5100_agn_cfg)}, +-/* 5350 WiFi/WiMax */ +- {IWL_PCI_DEVICE(0x423A, 0x1001, iwl5350_agn_cfg)}, +- {IWL_PCI_DEVICE(0x423A, 0x1021, iwl5350_agn_cfg)}, +- {IWL_PCI_DEVICE(0x423B, 0x1011, iwl5350_agn_cfg)}, +-/* 5150 Wifi/WiMax */ +- {IWL_PCI_DEVICE(0x423C, PCI_ANY_ID, iwl5150_agn_cfg)}, +- {IWL_PCI_DEVICE(0x423D, PCI_ANY_ID, iwl5150_agn_cfg)}, ++/* 5100 Series WiFi */ ++ {IWL_PCI_DEVICE(0x4232, 0x1201, iwl5100_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4232, 0x1301, iwl5100_agn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4232, 0x1204, iwl5100_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4232, 0x1304, iwl5100_agn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4232, 0x1205, iwl5100_bgn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4232, 0x1305, iwl5100_bgn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4232, 0x1206, iwl5100_abg_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4232, 0x1306, iwl5100_abg_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4232, 0x1221, iwl5100_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4232, 0x1321, iwl5100_agn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4232, 0x1224, iwl5100_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4232, 0x1324, iwl5100_agn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4232, 0x1225, iwl5100_bgn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4232, 0x1325, iwl5100_bgn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4232, 0x1226, iwl5100_abg_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4232, 0x1326, iwl5100_abg_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4237, 0x1211, iwl5100_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4237, 0x1311, iwl5100_agn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4237, 0x1214, iwl5100_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4237, 0x1314, iwl5100_agn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4237, 0x1215, iwl5100_bgn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4237, 0x1315, iwl5100_bgn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4237, 0x1216, iwl5100_abg_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4237, 0x1316, iwl5100_abg_cfg)}, /* Half Mini Card */ ++ ++/* 5300 Series WiFi */ ++ {IWL_PCI_DEVICE(0x4235, 0x1021, iwl5300_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4235, 0x1121, iwl5300_agn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4235, 0x1024, iwl5300_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4235, 0x1124, iwl5300_agn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4235, 0x1001, iwl5300_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4235, 0x1101, iwl5300_agn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4235, 0x1004, iwl5300_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4235, 0x1104, iwl5300_agn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4236, 0x1011, iwl5300_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4236, 0x1111, iwl5300_agn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x4236, 0x1014, iwl5300_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x4236, 0x1114, iwl5300_agn_cfg)}, /* Half Mini Card */ ++ ++/* 5350 Series WiFi/WiMax */ ++ {IWL_PCI_DEVICE(0x423A, 0x1001, iwl5350_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x423A, 0x1021, iwl5350_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x423B, 0x1011, iwl5350_agn_cfg)}, /* Mini Card */ ++ ++/* 5150 Series Wifi/WiMax */ ++ {IWL_PCI_DEVICE(0x423C, 0x1201, iwl5150_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x423C, 0x1301, iwl5150_agn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x423C, 0x1206, iwl5150_abg_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x423C, 0x1306, iwl5150_abg_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x423C, 0x1221, iwl5150_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x423C, 0x1321, iwl5150_agn_cfg)}, /* Half Mini Card */ ++ ++ {IWL_PCI_DEVICE(0x423D, 0x1211, iwl5150_agn_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x423D, 0x1311, iwl5150_agn_cfg)}, /* Half Mini Card */ ++ {IWL_PCI_DEVICE(0x423D, 0x1216, iwl5150_abg_cfg)}, /* Mini Card */ ++ {IWL_PCI_DEVICE(0x423D, 0x1316, iwl5150_abg_cfg)}, /* Half Mini Card */ + /* 6000/6050 Series */ + {IWL_PCI_DEVICE(0x008D, PCI_ANY_ID, iwl6000h_2agn_cfg)}, + {IWL_PCI_DEVICE(0x008E, PCI_ANY_ID, iwl6000h_2agn_cfg)}, +--- a/drivers/net/wireless/iwlwifi/iwl-dev.h ++++ b/drivers/net/wireless/iwlwifi/iwl-dev.h +@@ -53,9 +53,10 @@ extern struct iwl_cfg iwl4965_agn_cfg; + extern struct iwl_cfg iwl5300_agn_cfg; + extern struct iwl_cfg iwl5100_agn_cfg; + extern struct iwl_cfg iwl5350_agn_cfg; +-extern struct iwl_cfg iwl5100_bg_cfg; ++extern struct iwl_cfg iwl5100_bgn_cfg; + extern struct iwl_cfg iwl5100_abg_cfg; + extern struct iwl_cfg iwl5150_agn_cfg; ++extern struct iwl_cfg iwl5150_abg_cfg; + extern struct iwl_cfg iwl6000h_2agn_cfg; + extern struct iwl_cfg iwl6000i_2agn_cfg; + extern struct iwl_cfg iwl6000_3agn_cfg; diff --git a/queue-2.6.32/p54usb-add-device-id-for-dell-wla3310-usb.patch b/queue-2.6.32/p54usb-add-device-id-for-dell-wla3310-usb.patch new file mode 100644 index 00000000000..f173b490e00 --- /dev/null +++ b/queue-2.6.32/p54usb-add-device-id-for-dell-wla3310-usb.patch @@ -0,0 +1,33 @@ +From 0f666a08901f8b01f294ca0ad751019375240ae3 Mon Sep 17 00:00:00 2001 +From: Jason Dravet +Date: Sat, 5 Jun 2010 15:08:29 -0500 +Subject: p54usb: Add device ID for Dell WLA3310 USB + +From: Jason Dravet + +commit 0f666a08901f8b01f294ca0ad751019375240ae3 upstream. + +Add Dell WLA3310 USB wireless card, which has a Z-Com XG-705A chipset, to the +USB Ids in p54usb. + +Signed-off-by: Jason Dravet +Tested-by: Richard Gregory Tillmore +Signed-off-by: Larry Finger +Acked-by: Christian Lamparter +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/p54/p54usb.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/wireless/p54/p54usb.c ++++ b/drivers/net/wireless/p54/p54usb.c +@@ -78,6 +78,7 @@ static struct usb_device_id p54u_table[] + {USB_DEVICE(0x1413, 0x5400)}, /* Telsey 802.11g USB2.0 Adapter */ + {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */ + {USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */ ++ {USB_DEVICE(0x413c, 0x5513)}, /* Dell WLA3310 USB Wireless Adapter */ + {USB_DEVICE(0x413c, 0x8102)}, /* Spinnaker DUT */ + {USB_DEVICE(0x413c, 0x8104)}, /* Cohiba Proto board */ + {} diff --git a/queue-2.6.32/perf_events-fix-resource-leak-in-x86-__hw_perf_event_init.patch b/queue-2.6.32/perf_events-fix-resource-leak-in-x86-__hw_perf_event_init.patch new file mode 100644 index 00000000000..bd3aa88d610 --- /dev/null +++ b/queue-2.6.32/perf_events-fix-resource-leak-in-x86-__hw_perf_event_init.patch @@ -0,0 +1,44 @@ +From 4b24a88b35e15e04bd8f2c5dda65b5dc8ebca05f Mon Sep 17 00:00:00 2001 +From: Stephane Eranian +Date: Wed, 17 Mar 2010 23:21:01 +0200 +Subject: perf_events: Fix resource leak in x86 __hw_perf_event_init() + +From: Stephane Eranian + +commit 4b24a88b35e15e04bd8f2c5dda65b5dc8ebca05f upstream. + +If reserve_pmc_hardware() succeeds but reserve_ds_buffers() +fails, then we need to release_pmc_hardware. It won't be done +by the destroy() callback because we return before setting it +in case of error. + +Signed-off-by: Stephane Eranian +Cc: peterz@infradead.org +Cc: paulus@samba.org +Cc: davem@davemloft.net +Cc: fweisbec@gmail.com +Cc: robert.richter@amd.com +Cc: perfmon2-devel@lists.sf.net +LKML-Reference: <4ba1568b.15185e0a.182a.7802@mx.google.com> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/cpu/perf_event.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/arch/x86/kernel/cpu/perf_event.c ++++ b/arch/x86/kernel/cpu/perf_event.c +@@ -1005,8 +1005,11 @@ static int __hw_perf_event_init(struct p + if (atomic_read(&active_events) == 0) { + if (!reserve_pmc_hardware()) + err = -EBUSY; +- else ++ else { + err = reserve_bts_hardware(); ++ if (err) ++ release_pmc_hardware(); ++ } + } + if (!err) + atomic_inc(&active_events); diff --git a/queue-2.6.32/sata_nv-don-t-diddle-with-nien-on-mcp55.patch b/queue-2.6.32/sata_nv-don-t-diddle-with-nien-on-mcp55.patch new file mode 100644 index 00000000000..07608a2f906 --- /dev/null +++ b/queue-2.6.32/sata_nv-don-t-diddle-with-nien-on-mcp55.patch @@ -0,0 +1,54 @@ +From f3faf8fc3fab45c3526efe8c9e99bb23f8723350 Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Tue, 1 Jun 2010 17:29:21 +0200 +Subject: sata_nv: don't diddle with nIEN on mcp55 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Tejun Heo + +commit f3faf8fc3fab45c3526efe8c9e99bb23f8723350 upstream. + +On mcp55, nIEN gets stuck once set and liteon blueray rom iHOS104-08 +violates ATA specification and fails to set I on D2H Reg FIS if nIEN +is set when the command was issued. When the other party is following +the spec, both devices can work fine but when the two flaws are put +together, they can't talk to each other. + +mcp55 has its own IRQ masking mechanism and there's no reason to mess +with nIEN in the first place. Fix it by dropping nIEN diddling from +nv_mcp55_freeze/thaw(). + +This was originally reported by Cengiz. Although Cengiz hasn't +verified the fix yet, I could reproduce this problem and verfiy the +fix. Even if Cengiz is experiencing different or additional problems, +this patch is needed. + +Signed-off-by: Tejun Heo +Reported-by: Cengiz Günay +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/sata_nv.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/ata/sata_nv.c ++++ b/drivers/ata/sata_nv.c +@@ -1673,7 +1673,6 @@ static void nv_mcp55_freeze(struct ata_p + mask = readl(mmio_base + NV_INT_ENABLE_MCP55); + mask &= ~(NV_INT_ALL_MCP55 << shift); + writel(mask, mmio_base + NV_INT_ENABLE_MCP55); +- ata_sff_freeze(ap); + } + + static void nv_mcp55_thaw(struct ata_port *ap) +@@ -1687,7 +1686,6 @@ static void nv_mcp55_thaw(struct ata_por + mask = readl(mmio_base + NV_INT_ENABLE_MCP55); + mask |= (NV_INT_MASK_MCP55 << shift); + writel(mask, mmio_base + NV_INT_ENABLE_MCP55); +- ata_sff_thaw(ap); + } + + static void nv_adma_error_handler(struct ata_port *ap) diff --git a/queue-2.6.32/sata_via-magic-vt6421-fix-for-transmission-problems-w-wd-drives.patch b/queue-2.6.32/sata_via-magic-vt6421-fix-for-transmission-problems-w-wd-drives.patch new file mode 100644 index 00000000000..e6249d02162 --- /dev/null +++ b/queue-2.6.32/sata_via-magic-vt6421-fix-for-transmission-problems-w-wd-drives.patch @@ -0,0 +1,50 @@ +From 8b27ff4cf6d15964aa2987aeb58db4dfb1f87a19 Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Mon, 31 May 2010 16:26:48 +0200 +Subject: sata_via: magic vt6421 fix for transmission problems w/ WD drives + +From: Tejun Heo + +commit 8b27ff4cf6d15964aa2987aeb58db4dfb1f87a19 upstream. + +vt6421 has problems talking to recent WD drives. It causes a lot of +transmission errors while high bandwidth transfer as reported in the +following bugzilla entry. + + https://bugzilla.kernel.org/show_bug.cgi?id=15173 + +Joseph Chan provided the following fix. I don't have any idea what it +does but I can verify the issue is gone with the patch applied. + +Signed-off-by: Tejun Heo +Originally-from: Joseph Chan +Reported-by: Jorrit Tijben +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/sata_via.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +--- a/drivers/ata/sata_via.c ++++ b/drivers/ata/sata_via.c +@@ -558,6 +558,19 @@ static void svia_configure(struct pci_de + tmp8 |= NATIVE_MODE_ALL; + pci_write_config_byte(pdev, SATA_NATIVE_MODE, tmp8); + } ++ ++ /* ++ * vt6421 has problems talking to some drives. The following ++ * is the magic fix from Joseph Chan . ++ * Please add proper documentation if possible. ++ * ++ * https://bugzilla.kernel.org/show_bug.cgi?id=15173 ++ */ ++ if (pdev->device == 0x3249) { ++ pci_read_config_byte(pdev, 0x52, &tmp8); ++ tmp8 |= 1 << 2; ++ pci_write_config_byte(pdev, 0x52, tmp8); ++ } + } + + static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) diff --git a/queue-2.6.32/series b/queue-2.6.32/series index 4f8d0c9dcc6..760bb38dcaa 100644 --- a/queue-2.6.32/series +++ b/queue-2.6.32/series @@ -91,3 +91,28 @@ alsa-hda-use-lpib-for-another-mainboard.patch alsa-hda-use-lpib-for-asus-m2v.patch staging-comedi-correct-parameter-gainlkup-for-daqcard-6024e-in-driver-ni_mio_cs.c.patch clocksource-sh_cmt-compute-mult-and-shift-before-registration.patch +ath5k-retain-promiscuous-setting.patch +ahci-add-pci-quirk-for-jmb362.patch +firewire-core-check-for-1394a-compliant-irm-fix-inaccessibility-of-sony-camcorder.patch +perf_events-fix-resource-leak-in-x86-__hw_perf_event_init.patch +sata_nv-don-t-diddle-with-nien-on-mcp55.patch +sata_via-magic-vt6421-fix-for-transmission-problems-w-wd-drives.patch +drm-i915-rebind-bo-if-currently-bound-with-incorrect-alignment.patch +usb-mos7840-fix-null-pointer-dereference.patch +usb-xhci-wait-for-host-to-start-running.patch +usb-xhci-wait-for-controller-to-be-ready-after-reset.patch +usb-ftdi_sio-fix-dtr-rts-line-modes.patch +usb-cdc-acm-fix-resource-reclaim-in-error-path-of-acm_probe.patch +p54usb-add-device-id-for-dell-wla3310-usb.patch +atl1e-allow-tx-checksum-offload-and-tso-to-be-disabled-and-reenabled.patch +via-velocity-give-rx-descriptors-to-the-nic-later-on-open-or-mtu-change.patch +dmfe-tulip-let-dmfe-handle-dm910x-except-for-sparc-on-board-chips.patch +documentation-3c509-document-ethtool-support.patch +wireless-report-reasonable-bitrate-for-mcs-rates-through-wext.patch +ath9k-add-support-for-802.11n-bonded-out-ar2427.patch +drm-i915-give-up-on-8xx-lid-status.patch +wrong-type-for-magic-argument-in-simple_fill_super.patch +iwlwifi-check-for-aggregation-frame-and-queue.patch +iwlwifi-recalculate-average-tpt-if-not-current.patch +iwlwifi-update-supported-pci_id-list-for-5xx0-series.patch +wl1251-fix-a-memory-leak-in-probe.patch diff --git a/queue-2.6.32/usb-cdc-acm-fix-resource-reclaim-in-error-path-of-acm_probe.patch b/queue-2.6.32/usb-cdc-acm-fix-resource-reclaim-in-error-path-of-acm_probe.patch new file mode 100644 index 00000000000..45ea9f10ba6 --- /dev/null +++ b/queue-2.6.32/usb-cdc-acm-fix-resource-reclaim-in-error-path-of-acm_probe.patch @@ -0,0 +1,69 @@ +From c2572b78aa0447244a38e555ebb1b3b48a0088a5 Mon Sep 17 00:00:00 2001 +From: Axel Lin +Date: Mon, 31 May 2010 08:04:47 +0800 +Subject: USB: cdc-acm: fix resource reclaim in error path of acm_probe + +From: Axel Lin + +commit c2572b78aa0447244a38e555ebb1b3b48a0088a5 upstream. + +This patch fixes resource reclaim in error path of acm_probe: + +1. In the case of "out of memory (read urbs usb_alloc_urb)\n")", there + is no need to call acm_read_buffers_free(acm) here. Fix it by goto + alloc_fail6 instead of alloc_fail7. +2. In the case of "out of memory (write urbs usb_alloc_urb)", + usb_alloc_urb may fail in any iteration of the for loop. Current + implementation does not properly free allocated snd->urb. Fix it by + goto alloc_fail8 instead of alloc_fail7. +3. In the case of device_create_file(&intf->dev,&dev_attr_iCountryCodeRelDate) + fail, acm->country_codes is kfreed. As a result, device_remove_file + for dev_attr_wCountryCodes will not be executed in acm_disconnect. + Fix it by calling device_remove_file for dev_attr_wCountryCodes + before goto skip_countries. + +Signed-off-by: Axel Lin +Acked-by: Oliver Neukum +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/class/cdc-acm.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/usb/class/cdc-acm.c ++++ b/drivers/usb/class/cdc-acm.c +@@ -1201,7 +1201,7 @@ made_compressed_probe: + if (rcv->urb == NULL) { + dev_dbg(&intf->dev, + "out of memory (read urbs usb_alloc_urb)\n"); +- goto alloc_fail7; ++ goto alloc_fail6; + } + + rcv->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; +@@ -1225,7 +1225,7 @@ made_compressed_probe: + if (snd->urb == NULL) { + dev_dbg(&intf->dev, + "out of memory (write urbs usb_alloc_urb)"); +- goto alloc_fail7; ++ goto alloc_fail8; + } + + if (usb_endpoint_xfer_int(epwrite)) +@@ -1264,6 +1264,7 @@ made_compressed_probe: + i = device_create_file(&intf->dev, + &dev_attr_iCountryCodeRelDate); + if (i < 0) { ++ device_remove_file(&intf->dev, &dev_attr_wCountryCodes); + kfree(acm->country_codes); + goto skip_countries; + } +@@ -1300,6 +1301,7 @@ alloc_fail8: + usb_free_urb(acm->wb[i].urb); + alloc_fail7: + acm_read_buffers_free(acm); ++alloc_fail6: + for (i = 0; i < num_rx_buf; i++) + usb_free_urb(acm->ru[i].urb); + usb_free_urb(acm->ctrlurb); diff --git a/queue-2.6.32/usb-ftdi_sio-fix-dtr-rts-line-modes.patch b/queue-2.6.32/usb-ftdi_sio-fix-dtr-rts-line-modes.patch new file mode 100644 index 00000000000..e518ffe1baa --- /dev/null +++ b/queue-2.6.32/usb-ftdi_sio-fix-dtr-rts-line-modes.patch @@ -0,0 +1,49 @@ +From 6a1a82df91fa0eb1cc76069a9efe5714d087eccd Mon Sep 17 00:00:00 2001 +From: Daniel Mack +Date: Thu, 3 Jun 2010 13:55:02 +0200 +Subject: USB: ftdi_sio: fix DTR/RTS line modes + +From: Daniel Mack + +commit 6a1a82df91fa0eb1cc76069a9efe5714d087eccd upstream. + +Call set_mctrl() and clear_mctrl() according to the flow control mode +selected. This makes serial communication for FT232 connected devices +work when CRTSCTS is not set. + +This fixes a regression introduced by 4175f3e31 ("tty_port: If we are +opened non blocking we still need to raise the carrier"). This patch +calls the low-level driver's dtr_rts() function which consequently sets +TIOCM_DTR | TIOCM_RTS. A later call to set_termios() without CRTSCTS in +cflags, however, does not reset these bits, and so data is not actually +sent out on the serial wire. + +Signed-off-by: Daniel Mack +Cc: Johan Hovold +Cc: Alan Cox +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -2306,6 +2306,8 @@ static void ftdi_set_termios(struct tty_ + "urb failed to set to rts/cts flow control\n"); + } + ++ /* raise DTR/RTS */ ++ set_mctrl(port, TIOCM_DTR | TIOCM_RTS); + } else { + /* + * Xon/Xoff code +@@ -2353,6 +2355,8 @@ static void ftdi_set_termios(struct tty_ + } + } + ++ /* lower DTR/RTS */ ++ clear_mctrl(port, TIOCM_DTR | TIOCM_RTS); + } + return; + } diff --git a/queue-2.6.32/usb-mos7840-fix-null-pointer-dereference.patch b/queue-2.6.32/usb-mos7840-fix-null-pointer-dereference.patch new file mode 100644 index 00000000000..98070bab67b --- /dev/null +++ b/queue-2.6.32/usb-mos7840-fix-null-pointer-dereference.patch @@ -0,0 +1,26 @@ +From b41709f1263bb1ad37efc43fea0bb0b670c12e78 Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Wed, 19 May 2010 22:13:17 +0200 +Subject: USB: mos7840: fix null-pointer dereference + +From: Johan Hovold + +commit b41709f1263bb1ad37efc43fea0bb0b670c12e78 upstream. + +Fix null-pointer dereference on error path. + +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c +index f8424d1..585b7e6 100644 +--- a/drivers/usb/serial/mos7840.c ++++ b/drivers/usb/serial/mos7840.c +@@ -730,7 +730,6 @@ static void mos7840_bulk_in_callback(struct urb *urb) + mos7840_port = urb->context; + if (!mos7840_port) { + dbg("%s", "NULL mos7840_port pointer"); +- mos7840_port->read_urb_busy = false; + return; + } + diff --git a/queue-2.6.32/usb-xhci-wait-for-controller-to-be-ready-after-reset.patch b/queue-2.6.32/usb-xhci-wait-for-controller-to-be-ready-after-reset.patch new file mode 100644 index 00000000000..d2c8add5c9b --- /dev/null +++ b/queue-2.6.32/usb-xhci-wait-for-controller-to-be-ready-after-reset.patch @@ -0,0 +1,50 @@ +From 2d62f3eea98354d61f90d6b115eecf9be5f4bdfe Mon Sep 17 00:00:00 2001 +From: Sarah Sharp +Date: Mon, 24 May 2010 13:25:15 -0700 +Subject: USB: xhci: Wait for controller to be ready after reset. + +From: Sarah Sharp + +commit 2d62f3eea98354d61f90d6b115eecf9be5f4bdfe upstream. + +After software resets an xHCI host controller, it must wait for the +"Controller Not Ready" (CNR) bit in the status register to be cleared. +Software is not supposed to ring any doorbells or write to any registers +except the status register until this bit is cleared. + +Signed-off-by: Sarah Sharp +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci-hcd.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +--- a/drivers/usb/host/xhci-hcd.c ++++ b/drivers/usb/host/xhci-hcd.c +@@ -134,6 +134,7 @@ int xhci_reset(struct xhci_hcd *xhci) + { + u32 command; + u32 state; ++ int ret; + + state = xhci_readl(xhci, &xhci->op_regs->status); + if ((state & STS_HALT) == 0) { +@@ -148,7 +149,17 @@ int xhci_reset(struct xhci_hcd *xhci) + /* XXX: Why does EHCI set this here? Shouldn't other code do this? */ + xhci_to_hcd(xhci)->state = HC_STATE_HALT; + +- return handshake(xhci, &xhci->op_regs->command, CMD_RESET, 0, 250 * 1000); ++ ret = handshake(xhci, &xhci->op_regs->command, ++ CMD_RESET, 0, 250 * 1000); ++ if (ret) ++ return ret; ++ ++ xhci_dbg(xhci, "Wait for controller to be ready for doorbell rings\n"); ++ /* ++ * xHCI cannot write to any doorbells or operational registers other ++ * than status until the "Controller Not Ready" flag is cleared. ++ */ ++ return handshake(xhci, &xhci->op_regs->status, STS_CNR, 0, 250 * 1000); + } + + /* diff --git a/queue-2.6.32/usb-xhci-wait-for-host-to-start-running.patch b/queue-2.6.32/usb-xhci-wait-for-host-to-start-running.patch new file mode 100644 index 00000000000..1bfdbec91c8 --- /dev/null +++ b/queue-2.6.32/usb-xhci-wait-for-host-to-start-running.patch @@ -0,0 +1,77 @@ +From ed07453fd356025cc25272629e982f5e4607632c Mon Sep 17 00:00:00 2001 +From: Sarah Sharp +Date: Mon, 24 May 2010 13:25:21 -0700 +Subject: USB: xhci: Wait for host to start running. + +From: Sarah Sharp + +commit ed07453fd356025cc25272629e982f5e4607632c upstream. + +When the run bit is set in the xHCI command register, it may take a few +microseconds for the host to start running. We cannot ring any doorbells +until the host is actually running, so wait until the status register says +the host is running. + +Signed-off-by: Sarah Sharp +Reported-by: Shinya Saito +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci-hcd.c | 39 ++++++++++++++++++++++++++++++++------- + 1 file changed, 32 insertions(+), 7 deletions(-) + +--- a/drivers/usb/host/xhci-hcd.c ++++ b/drivers/usb/host/xhci-hcd.c +@@ -97,6 +97,33 @@ int xhci_halt(struct xhci_hcd *xhci) + } + + /* ++ * Set the run bit and wait for the host to be running. ++ */ ++int xhci_start(struct xhci_hcd *xhci) ++{ ++ u32 temp; ++ int ret; ++ ++ temp = xhci_readl(xhci, &xhci->op_regs->command); ++ temp |= (CMD_RUN); ++ xhci_dbg(xhci, "// Turn on HC, cmd = 0x%x.\n", ++ temp); ++ xhci_writel(xhci, temp, &xhci->op_regs->command); ++ ++ /* ++ * Wait for the HCHalted Status bit to be 0 to indicate the host is ++ * running. ++ */ ++ ret = handshake(xhci, &xhci->op_regs->status, ++ STS_HALT, 0, XHCI_MAX_HALT_USEC); ++ if (ret == -ETIMEDOUT) ++ xhci_err(xhci, "Host took too long to start, " ++ "waited %u microseconds.\n", ++ XHCI_MAX_HALT_USEC); ++ return ret; ++} ++ ++/* + * Reset a halted HC, and set the internal HC state to HC_STATE_HALT. + * + * This resets pipelines, timers, counters, state machines, etc. +@@ -460,13 +487,11 @@ int xhci_run(struct usb_hcd *hcd) + if (NUM_TEST_NOOPS > 0) + doorbell = xhci_setup_one_noop(xhci); + +- temp = xhci_readl(xhci, &xhci->op_regs->command); +- temp |= (CMD_RUN); +- xhci_dbg(xhci, "// Turn on HC, cmd = 0x%x.\n", +- temp); +- xhci_writel(xhci, temp, &xhci->op_regs->command); +- /* Flush PCI posted writes */ +- temp = xhci_readl(xhci, &xhci->op_regs->command); ++ if (xhci_start(xhci)) { ++ xhci_halt(xhci); ++ return -ENODEV; ++ } ++ + xhci_dbg(xhci, "// @%p = 0x%x\n", &xhci->op_regs->command, temp); + if (doorbell) + (*doorbell)(xhci); diff --git a/queue-2.6.32/via-velocity-give-rx-descriptors-to-the-nic-later-on-open-or-mtu-change.patch b/queue-2.6.32/via-velocity-give-rx-descriptors-to-the-nic-later-on-open-or-mtu-change.patch new file mode 100644 index 00000000000..ddbac366022 --- /dev/null +++ b/queue-2.6.32/via-velocity-give-rx-descriptors-to-the-nic-later-on-open-or-mtu-change.patch @@ -0,0 +1,63 @@ +From 35bb5cadc8c7b1462df57e32e08d964f1be7a75c Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Mon, 14 Dec 2009 16:05:09 +0000 +Subject: via-velocity: Give RX descriptors to the NIC later on open or MTU change + +From: Ben Hutchings + +commit 35bb5cadc8c7b1462df57e32e08d964f1be7a75c upstream. + +velocity_open() calls velocity_give_many_rx_descs(), which gives RX +descriptors to the NIC, before installing an interrupt handler or +calling velocity_init_registers(). I think this is very unsafe and it +appears to explain the bug report . + +On MTU change, velocity_give_many_rx_descs() is again called before +velocity_init_registers(). I'm not sure whether this is unsafe but +it does look wrong. + +Therefore, move the calls to velocity_give_many_rx_descs() after +request_irq() and velocity_init_registers(). + +Signed-off-by: Ben Hutchings +Tested-by: Jan Ceuleers +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/via-velocity.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/net/via-velocity.c ++++ b/drivers/net/via-velocity.c +@@ -2186,8 +2186,6 @@ static int velocity_open(struct net_devi + /* Ensure chip is running */ + pci_set_power_state(vptr->pdev, PCI_D0); + +- velocity_give_many_rx_descs(vptr); +- + velocity_init_registers(vptr, VELOCITY_INIT_COLD); + + ret = request_irq(vptr->pdev->irq, &velocity_intr, IRQF_SHARED, +@@ -2199,6 +2197,8 @@ static int velocity_open(struct net_devi + goto out; + } + ++ velocity_give_many_rx_descs(vptr); ++ + mac_enable_int(vptr->mac_regs); + netif_start_queue(dev); + vptr->flags |= VELOCITY_FLAGS_OPENED; +@@ -2287,10 +2287,10 @@ static int velocity_change_mtu(struct ne + + dev->mtu = new_mtu; + +- velocity_give_many_rx_descs(vptr); +- + velocity_init_registers(vptr, VELOCITY_INIT_COLD); + ++ velocity_give_many_rx_descs(vptr); ++ + mac_enable_int(vptr->mac_regs); + netif_start_queue(dev); + diff --git a/queue-2.6.32/wireless-report-reasonable-bitrate-for-mcs-rates-through-wext.patch b/queue-2.6.32/wireless-report-reasonable-bitrate-for-mcs-rates-through-wext.patch new file mode 100644 index 00000000000..6015ea76b3e --- /dev/null +++ b/queue-2.6.32/wireless-report-reasonable-bitrate-for-mcs-rates-through-wext.patch @@ -0,0 +1,143 @@ +From 254416aae70ab2e6b57fd79782c8a67196234d02 Mon Sep 17 00:00:00 2001 +From: John W. Linville +Date: Wed, 9 Dec 2009 16:43:52 -0500 +Subject: wireless: report reasonable bitrate for MCS rates through wext + +From: John W. Linville + +commit 254416aae70ab2e6b57fd79782c8a67196234d02 upstream. + +Previously, cfg80211 had reported "0" for MCS (i.e. 802.11n) bitrates +through the wireless extensions interface. However, nl80211 was +converting MCS rates into a reasonable bitrate number. This patch moves +the nl80211 code to cfg80211 where it is now shared between both the +nl80211 interface and the wireless extensions interface. + +Signed-off-by: John W. Linville +Cc: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman + +--- + net/wireless/core.h | 2 ++ + net/wireless/nl80211.c | 37 ++----------------------------------- + net/wireless/util.c | 33 +++++++++++++++++++++++++++++++++ + net/wireless/wext-compat.c | 5 +---- + 4 files changed, 38 insertions(+), 39 deletions(-) + +--- a/net/wireless/core.h ++++ b/net/wireless/core.h +@@ -385,6 +385,8 @@ int rdev_set_freq(struct cfg80211_regist + struct wireless_dev *for_wdev, + int freq, enum nl80211_channel_type channel_type); + ++u16 cfg80211_calculate_bitrate(struct rate_info *rate); ++ + #ifdef CONFIG_CFG80211_DEVELOPER_WARNINGS + #define CFG80211_DEV_WARN_ON(cond) WARN_ON(cond) + #else +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -1562,39 +1562,6 @@ static int parse_station_flags(struct ge + return 0; + } + +-static u16 nl80211_calculate_bitrate(struct rate_info *rate) +-{ +- int modulation, streams, bitrate; +- +- if (!(rate->flags & RATE_INFO_FLAGS_MCS)) +- return rate->legacy; +- +- /* the formula below does only work for MCS values smaller than 32 */ +- if (rate->mcs >= 32) +- return 0; +- +- modulation = rate->mcs & 7; +- streams = (rate->mcs >> 3) + 1; +- +- bitrate = (rate->flags & RATE_INFO_FLAGS_40_MHZ_WIDTH) ? +- 13500000 : 6500000; +- +- if (modulation < 4) +- bitrate *= (modulation + 1); +- else if (modulation == 4) +- bitrate *= (modulation + 2); +- else +- bitrate *= (modulation + 3); +- +- bitrate *= streams; +- +- if (rate->flags & RATE_INFO_FLAGS_SHORT_GI) +- bitrate = (bitrate / 9) * 10; +- +- /* do NOT round down here */ +- return (bitrate + 50000) / 100000; +-} +- + static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq, + int flags, struct net_device *dev, + u8 *mac_addr, struct station_info *sinfo) +@@ -1641,8 +1608,8 @@ static int nl80211_send_station(struct s + if (!txrate) + goto nla_put_failure; + +- /* nl80211_calculate_bitrate will return 0 for mcs >= 32 */ +- bitrate = nl80211_calculate_bitrate(&sinfo->txrate); ++ /* cfg80211_calculate_bitrate will return 0 for mcs >= 32 */ ++ bitrate = cfg80211_calculate_bitrate(&sinfo->txrate); + if (bitrate > 0) + NLA_PUT_U16(msg, NL80211_RATE_INFO_BITRATE, bitrate); + +--- a/net/wireless/util.c ++++ b/net/wireless/util.c +@@ -682,3 +682,36 @@ int cfg80211_change_iface(struct cfg8021 + + return err; + } ++ ++u16 cfg80211_calculate_bitrate(struct rate_info *rate) ++{ ++ int modulation, streams, bitrate; ++ ++ if (!(rate->flags & RATE_INFO_FLAGS_MCS)) ++ return rate->legacy; ++ ++ /* the formula below does only work for MCS values smaller than 32 */ ++ if (rate->mcs >= 32) ++ return 0; ++ ++ modulation = rate->mcs & 7; ++ streams = (rate->mcs >> 3) + 1; ++ ++ bitrate = (rate->flags & RATE_INFO_FLAGS_40_MHZ_WIDTH) ? ++ 13500000 : 6500000; ++ ++ if (modulation < 4) ++ bitrate *= (modulation + 1); ++ else if (modulation == 4) ++ bitrate *= (modulation + 2); ++ else ++ bitrate *= (modulation + 3); ++ ++ bitrate *= streams; ++ ++ if (rate->flags & RATE_INFO_FLAGS_SHORT_GI) ++ bitrate = (bitrate / 9) * 10; ++ ++ /* do NOT round down here */ ++ return (bitrate + 50000) / 100000; ++} +--- a/net/wireless/wext-compat.c ++++ b/net/wireless/wext-compat.c +@@ -1227,10 +1227,7 @@ int cfg80211_wext_giwrate(struct net_dev + if (!(sinfo.filled & STATION_INFO_TX_BITRATE)) + return -EOPNOTSUPP; + +- rate->value = 0; +- +- if (!(sinfo.txrate.flags & RATE_INFO_FLAGS_MCS)) +- rate->value = 100000 * sinfo.txrate.legacy; ++ rate->value = 100000 * cfg80211_calculate_bitrate(&sinfo.txrate); + + return 0; + } diff --git a/queue-2.6.32/wl1251-fix-a-memory-leak-in-probe.patch b/queue-2.6.32/wl1251-fix-a-memory-leak-in-probe.patch new file mode 100644 index 00000000000..47516dafe44 --- /dev/null +++ b/queue-2.6.32/wl1251-fix-a-memory-leak-in-probe.patch @@ -0,0 +1,30 @@ +From aa679c36756003f1fabdb9fc6f00eb159559f7c3 Mon Sep 17 00:00:00 2001 +From: Grazvydas Ignotas +Date: Sat, 5 Jun 2010 02:25:47 +0300 +Subject: wl1251: fix a memory leak in probe + +From: Grazvydas Ignotas + +commit aa679c36756003f1fabdb9fc6f00eb159559f7c3 upstream. + +wl1251_sdio_probe() error path is missing wl1251_free_hw, add it. + +Signed-off-by: Grazvydas Ignotas +Acked-by: Kalle Valo +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/wl12xx/wl1251_sdio.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/wireless/wl12xx/wl1251_sdio.c ++++ b/drivers/net/wireless/wl12xx/wl1251_sdio.c +@@ -160,6 +160,7 @@ disable: + sdio_disable_func(func); + release: + sdio_release_host(func); ++ wl1251_free_hw(wl); + return ret; + } + diff --git a/queue-2.6.32/wrong-type-for-magic-argument-in-simple_fill_super.patch b/queue-2.6.32/wrong-type-for-magic-argument-in-simple_fill_super.patch new file mode 100644 index 00000000000..8658b38dc9d --- /dev/null +++ b/queue-2.6.32/wrong-type-for-magic-argument-in-simple_fill_super.patch @@ -0,0 +1,45 @@ +From 7d683a09990ff095a91b6e724ecee0ff8733274a Mon Sep 17 00:00:00 2001 +From: Roberto Sassu +Date: Thu, 3 Jun 2010 11:58:28 +0200 +Subject: wrong type for 'magic' argument in simple_fill_super() + +From: Roberto Sassu + +commit 7d683a09990ff095a91b6e724ecee0ff8733274a upstream. + +It's used to superblock ->s_magic, which is unsigned long. + +Signed-off-by: Roberto Sassu +Reviewed-by: Mimi Zohar +Signed-off-by: Eric Paris +Signed-off-by: Al Viro +Signed-off-by: Greg Kroah-Hartman + +--- + fs/libfs.c | 3 ++- + include/linux/fs.h | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +--- a/fs/libfs.c ++++ b/fs/libfs.c +@@ -415,7 +415,8 @@ int simple_write_end(struct file *file, + * unique inode values later for this filesystem, then you must take care + * to pass it an appropriate max_reserved value to avoid collisions. + */ +-int simple_fill_super(struct super_block *s, int magic, struct tree_descr *files) ++int simple_fill_super(struct super_block *s, unsigned long magic, ++ struct tree_descr *files) + { + struct inode *inode; + struct dentry *root; +--- a/include/linux/fs.h ++++ b/include/linux/fs.h +@@ -2376,7 +2376,7 @@ extern const struct file_operations simp + extern const struct inode_operations simple_dir_inode_operations; + struct tree_descr { char *name; const struct file_operations *ops; int mode; }; + struct dentry *d_alloc_name(struct dentry *, const char *); +-extern int simple_fill_super(struct super_block *, int, struct tree_descr *); ++extern int simple_fill_super(struct super_block *, unsigned long, struct tree_descr *); + extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); + extern void simple_release_fs(struct vfsmount **mount, int *count); +