diff --git a/[refs] b/[refs] index 6450ea4b40a3..499d446083d6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9059b454248a060ab39346c5d079f56089ab3868 +refs/heads/master: 824cf333db97954d6144230b5e28f4e65e67d312 diff --git a/trunk/Documentation/filesystems/directory-locking b/trunk/Documentation/filesystems/directory-locking index ff7b611abf33..d7099a9266fb 100644 --- a/trunk/Documentation/filesystems/directory-locking +++ b/trunk/Documentation/filesystems/directory-locking @@ -1,6 +1,5 @@ Locking scheme used for directory operations is based on two -kinds of locks - per-inode (->i_mutex) and per-filesystem -(->s_vfs_rename_mutex). +kinds of locks - per-inode (->i_sem) and per-filesystem (->s_vfs_rename_sem). For our purposes all operations fall in 5 classes: @@ -64,7 +63,7 @@ objects - A < B iff A is an ancestor of B. attempt to acquire some lock and already holds at least one lock. Let's consider the set of contended locks. First of all, filesystem lock is not contended, since any process blocked on it is not holding any locks. -Thus all processes are blocked on ->i_mutex. +Thus all processes are blocked on ->i_sem. Non-directory objects are not contended due to (3). Thus link creation can't be a part of deadlock - it can't be blocked on source diff --git a/trunk/Documentation/filesystems/porting b/trunk/Documentation/filesystems/porting index dac45c92d872..5531694059ab 100644 --- a/trunk/Documentation/filesystems/porting +++ b/trunk/Documentation/filesystems/porting @@ -107,7 +107,7 @@ free to drop it... --- [informational] -->link() callers hold ->i_mutex on the object we are linking to. Some of your +->link() callers hold ->i_sem on the object we are linking to. Some of your problems might be over... --- @@ -130,9 +130,9 @@ went in - and hadn't been documented ;-/). Just remove it from fs_flags --- [mandatory] -->setattr() is called without BKL now. Caller _always_ holds ->i_mutex, so -watch for ->i_mutex-grabbing code that might be used by your ->setattr(). -Callers of notify_change() need ->i_mutex now. +->setattr() is called without BKL now. Caller _always_ holds ->i_sem, so +watch for ->i_sem-grabbing code that might be used by your ->setattr(). +Callers of notify_change() need ->i_sem now. --- [recommended] diff --git a/trunk/arch/ia64/kernel/acpi-processor.c b/trunk/arch/ia64/kernel/acpi-processor.c index 5a216c019924..4d4993a47e55 100644 --- a/trunk/arch/ia64/kernel/acpi-processor.c +++ b/trunk/arch/ia64/kernel/acpi-processor.c @@ -44,7 +44,7 @@ static void init_intel_pdc(struct acpi_processor *pr) buf[0] = ACPI_PDC_REVISION_ID; buf[1] = 1; - buf[2] = ACPI_PDC_EST_CAPABILITY_SMP; + buf[2] |= ACPI_PDC_EST_CAPABILITY_SMP; obj->type = ACPI_TYPE_BUFFER; obj->buffer.length = 12; diff --git a/trunk/arch/ia64/kernel/acpi.c b/trunk/arch/ia64/kernel/acpi.c index 103dd8edda71..c4784494970e 100644 --- a/trunk/arch/ia64/kernel/acpi.c +++ b/trunk/arch/ia64/kernel/acpi.c @@ -67,8 +67,7 @@ EXPORT_SYMBOL(pm_power_off); unsigned int acpi_cpei_override; unsigned int acpi_cpei_phys_cpuid; -const char __init * -acpi_get_sysname(void) +const char *acpi_get_sysname(void) { #ifdef CONFIG_IA64_GENERIC unsigned long rsdp_phys; diff --git a/trunk/arch/ia64/kernel/smpboot.c b/trunk/arch/ia64/kernel/smpboot.c index 3c9d8e6089cf..542958079f1b 100644 --- a/trunk/arch/ia64/kernel/smpboot.c +++ b/trunk/arch/ia64/kernel/smpboot.c @@ -370,7 +370,7 @@ smp_setup_percpu_timer (void) { } -static void __cpuinit +static void __devinit smp_callin (void) { int cpuid, phys_id, itc_master; @@ -456,7 +456,7 @@ smp_callin (void) /* * Activate a secondary processor. head.S calls this. */ -int __cpuinit +int __devinit start_secondary (void *unused) { /* Early console may use I/O ports */ diff --git a/trunk/arch/mips/sgi-ip32/Makefile b/trunk/arch/mips/sgi-ip32/Makefile index 60f0227425e7..7e1416768a60 100644 --- a/trunk/arch/mips/sgi-ip32/Makefile +++ b/trunk/arch/mips/sgi-ip32/Makefile @@ -3,5 +3,5 @@ # under Linux. # -obj-y += ip32-berr.o ip32-irq.o ip32-platform.o ip32-setup.o ip32-reset.o \ +obj-y += ip32-berr.o ip32-irq.o ip32-setup.o ip32-reset.o \ crime.o ip32-memory.o diff --git a/trunk/arch/mips/sgi-ip32/ip32-platform.c b/trunk/arch/mips/sgi-ip32/ip32-platform.c deleted file mode 100644 index 120b15932caf..000000000000 --- a/trunk/arch/mips/sgi-ip32/ip32-platform.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include - -static __init int meth_devinit(void) -{ - struct platform_device *pd; - int ret; - - pd = platform_device_alloc("meth", -1); - if (!pd) - return -ENOMEM; - - ret = platform_device_add(pd); - if (ret) - platform_device_put(pd); - - return ret; -} - -device_initcall(meth_devinit); diff --git a/trunk/drivers/ata/pata_hpt3x2n.c b/trunk/drivers/ata/pata_hpt3x2n.c index f25154aed75d..e947433cb37d 100644 --- a/trunk/drivers/ata/pata_hpt3x2n.c +++ b/trunk/drivers/ata/pata_hpt3x2n.c @@ -521,8 +521,8 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id) /* 371N if rev > 1 */ break; case PCI_DEVICE_ID_TTI_HPT372: - /* 372N if rev >= 1*/ - if (class_rev == 0) + /* 372N if rev >= 2*/ + if (class_rev < 2) return -ENODEV; break; case PCI_DEVICE_ID_TTI_HPT302: diff --git a/trunk/drivers/net/Kconfig b/trunk/drivers/net/Kconfig index 30fd479fea5e..c5baa197bc08 100644 --- a/trunk/drivers/net/Kconfig +++ b/trunk/drivers/net/Kconfig @@ -2218,7 +2218,7 @@ config SK98LIN config VIA_VELOCITY tristate "VIA Velocity support" - depends on PCI + depends on NET_PCI && PCI select CRC32 select CRC_CCITT select MII diff --git a/trunk/drivers/net/chelsio/suni1x10gexp_regs.h b/trunk/drivers/net/chelsio/suni1x10gexp_regs.h index d0f87d82566a..269d097dd927 100644 --- a/trunk/drivers/net/chelsio/suni1x10gexp_regs.h +++ b/trunk/drivers/net/chelsio/suni1x10gexp_regs.h @@ -105,7 +105,7 @@ #define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_LOW(filterId) (0x204A + mSUNI1x10GEXP_MAC_FILTER_OFFSET(filterId)) #define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_MID(filterId) (0x204B + mSUNI1x10GEXP_MAC_FILTER_OFFSET(filterId)) #define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_HIGH(filterId)(0x204C + mSUNI1x10GEXP_MAC_FILTER_OFFSET(filterId)) -#define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_VID(filterId) (0x2062 + mSUNI1x10GEXP_MAC_VID_FILTER_OFFSET(filterId)) +#define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_VID(filterId) (0x2062 + mSUNI1x10GEXP_MAC_VID_FILTER_OFFSET(filterId) #define SUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_0_LOW 0x204A #define SUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_0_MID 0x204B #define SUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_0_HIGH 0x204C diff --git a/trunk/drivers/net/forcedeth.c b/trunk/drivers/net/forcedeth.c index 4154fd000746..7a018027fcc0 100644 --- a/trunk/drivers/net/forcedeth.c +++ b/trunk/drivers/net/forcedeth.c @@ -195,7 +195,7 @@ enum { #define NVREG_IRQ_TX_FORCED 0x0100 #define NVREG_IRQ_RECOVER_ERROR 0x8000 #define NVREG_IRQMASK_THROUGHPUT 0x00df -#define NVREG_IRQMASK_CPU 0x0060 +#define NVREG_IRQMASK_CPU 0x0040 #define NVREG_IRQ_TX_ALL (NVREG_IRQ_TX_ERR|NVREG_IRQ_TX_OK|NVREG_IRQ_TX_FORCED) #define NVREG_IRQ_RX_ALL (NVREG_IRQ_RX_ERROR|NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF|NVREG_IRQ_RX_FORCED) #define NVREG_IRQ_OTHER (NVREG_IRQ_TIMER|NVREG_IRQ_LINK|NVREG_IRQ_RECOVER_ERROR) diff --git a/trunk/drivers/net/meth.c b/trunk/drivers/net/meth.c index 92b403bf38b0..0343ea12b299 100644 --- a/trunk/drivers/net/meth.c +++ b/trunk/drivers/net/meth.c @@ -8,16 +8,15 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#include -#include -#include -#include #include -#include +#include + +#include /* printk() */ +#include #include -#include -#include -#include +#include /* error codes */ +#include /* size_t */ +#include /* mark_bh */ #include #include @@ -34,6 +33,7 @@ #include #include +#include #include "meth.h" @@ -51,6 +51,8 @@ static const char *meth_str="SGI O2 Fast Ethernet"; +MODULE_AUTHOR("Ilya Volynets "); +MODULE_DESCRIPTION("SGI O2 Builtin Fast Ethernet driver"); #define HAVE_TX_TIMEOUT /* The maximum time waited (in jiffies) before assuming a Tx failed. (400ms) */ @@ -782,15 +784,15 @@ static struct net_device_stats *meth_stats(struct net_device *dev) /* * The init function. */ -static int __init meth_probe(struct platform_device *pdev) +static struct net_device *meth_init(void) { struct net_device *dev; struct meth_private *priv; - int err; + int ret; dev = alloc_etherdev(sizeof(struct meth_private)); if (!dev) - return -ENOMEM; + return ERR_PTR(-ENOMEM); dev->open = meth_open; dev->stop = meth_release; @@ -806,12 +808,11 @@ static int __init meth_probe(struct platform_device *pdev) priv = netdev_priv(dev); spin_lock_init(&priv->meth_lock); - SET_NETDEV_DEV(dev, &pdev->dev); - err = register_netdev(dev); - if (err) { + ret = register_netdev(dev); + if (ret) { free_netdev(dev); - return err; + return ERR_PTR(ret); } printk(KERN_INFO "%s: SGI MACE Ethernet rev. %d\n", @@ -819,44 +820,21 @@ static int __init meth_probe(struct platform_device *pdev) return 0; } -static int __exit meth_remove(struct platform_device *pdev) -{ - struct net_device *dev = platform_get_drvdata(pdev); - - unregister_netdev(dev); - free_netdev(dev); - platform_set_drvdata(pdev, NULL); - - return 0; -} - -static struct platform_driver meth_driver = { - .probe = meth_probe, - .remove = __devexit_p(meth_remove), - .driver = { - .name = "meth", - } -}; +static struct net_device *meth_dev; static int __init meth_init_module(void) { - int err; - - err = platform_driver_register(&meth_driver); - if (err) - printk(KERN_ERR "Driver registration failed\n"); - - return err; + meth_dev = meth_init(); + if (IS_ERR(meth_dev)) + return PTR_ERR(meth_dev); + return 0; } static void __exit meth_exit_module(void) { - platform_driver_unregister(&meth_driver); + unregister_netdev(meth_dev); + free_netdev(meth_dev); } module_init(meth_init_module); module_exit(meth_exit_module); - -MODULE_AUTHOR("Ilya Volynets "); -MODULE_DESCRIPTION("SGI O2 Builtin Fast Ethernet driver"); -MODULE_LICENSE("GPL"); diff --git a/trunk/drivers/net/phy/fixed.c b/trunk/drivers/net/phy/fixed.c index bb966911a137..68c99b4c5255 100644 --- a/trunk/drivers/net/phy/fixed.c +++ b/trunk/drivers/net/phy/fixed.c @@ -89,7 +89,6 @@ EXPORT_SYMBOL(fixed_mdio_set_link_update); /*----------------------------------------------------------------------------- * This is used for updating internal mii regs from the status *-----------------------------------------------------------------------------*/ -#if defined(CONFIG_FIXED_MII_100_FDX) || defined(CONFIG_FIXED_MII_10_FDX) static int fixed_mdio_update_regs(struct fixed_info *fixed) { u16 *regs = fixed->regs; @@ -166,7 +165,6 @@ static int fixed_mii_reset(struct mii_bus *bus) /*nothing here - no way/need to reset it*/ return 0; } -#endif static int fixed_config_aneg(struct phy_device *phydev) { @@ -196,7 +194,6 @@ static struct phy_driver fixed_mdio_driver = { * number is used to create multiple fixed PHYs, so that several devices can * utilize them simultaneously. *-----------------------------------------------------------------------------*/ -#if defined(CONFIG_FIXED_MII_100_FDX) || defined(CONFIG_FIXED_MII_10_FDX) static int fixed_mdio_register_device(int number, int speed, int duplex) { struct mii_bus *new_bus; @@ -304,7 +301,6 @@ static int fixed_mdio_register_device(int number, int speed, int duplex) return err; } -#endif MODULE_DESCRIPTION("Fixed PHY device & driver for PAL"); diff --git a/trunk/drivers/net/spider_net.c b/trunk/drivers/net/spider_net.c index ef84d7c757a0..c3964c3d89d9 100644 --- a/trunk/drivers/net/spider_net.c +++ b/trunk/drivers/net/spider_net.c @@ -1014,12 +1014,12 @@ spider_net_pass_skb_up(struct spider_net_descr *descr, */ } + /* pass skb up to stack */ + netif_receive_skb(skb); + /* update netdevice statistics */ card->netdev_stats.rx_packets++; card->netdev_stats.rx_bytes += skb->len; - - /* pass skb up to stack */ - netif_receive_skb(skb); } #ifdef DEBUG diff --git a/trunk/drivers/net/ucc_geth.c b/trunk/drivers/net/ucc_geth.c index 18b731bb4da1..c2ccbd098f53 100644 --- a/trunk/drivers/net/ucc_geth.c +++ b/trunk/drivers/net/ucc_geth.c @@ -23,8 +23,11 @@ #include #include #include +#include +#include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/ucc_geth_mii.c b/trunk/drivers/net/ucc_geth_mii.c index 7bcb82f50cf7..f96966d4bcc2 100644 --- a/trunk/drivers/net/ucc_geth_mii.c +++ b/trunk/drivers/net/ucc_geth_mii.c @@ -260,6 +260,8 @@ static struct of_device_id uec_mdio_match[] = { {}, }; +MODULE_DEVICE_TABLE(of, uec_mdio_match); + static struct of_platform_driver uec_mdio_driver = { .name = DRV_NAME, .probe = uec_mdio_probe, diff --git a/trunk/drivers/net/usb/asix.c b/trunk/drivers/net/usb/asix.c index 6d95cacd5284..d5ef97bc4d01 100644 --- a/trunk/drivers/net/usb/asix.c +++ b/trunk/drivers/net/usb/asix.c @@ -1458,10 +1458,6 @@ static const struct usb_device_id products [] = { // IO-DATA ETG-US2 USB_DEVICE (0x04bb, 0x0930), .driver_info = (unsigned long) &ax88178_info, -}, { - // Belkin F5D5055 - USB_DEVICE(0x050d, 0x5055), - .driver_info = (unsigned long) &ax88178_info, }, { }, // END }; diff --git a/trunk/drivers/net/wireless/libertas/decl.h b/trunk/drivers/net/wireless/libertas/decl.h index dfe27642322c..606bdd002be7 100644 --- a/trunk/drivers/net/wireless/libertas/decl.h +++ b/trunk/drivers/net/wireless/libertas/decl.h @@ -46,7 +46,7 @@ u32 libertas_index_to_data_rate(u8 index); u8 libertas_data_rate_to_index(u32 rate); void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen); -void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb); +int libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb); /** The proc fs interface */ int libertas_process_rx_command(wlan_private * priv); diff --git a/trunk/drivers/net/wireless/libertas/fw.c b/trunk/drivers/net/wireless/libertas/fw.c index 5c63c9b1659c..441123c85e62 100644 --- a/trunk/drivers/net/wireless/libertas/fw.c +++ b/trunk/drivers/net/wireless/libertas/fw.c @@ -333,22 +333,18 @@ static void command_timer_fn(unsigned long data) unsigned long flags; ptempnode = adapter->cur_cmd; - if (ptempnode == NULL) { - lbs_pr_debug(1, "PTempnode Empty\n"); - return; - } - cmd = (struct cmd_ds_command *)ptempnode->bufvirtualaddr; - if (!cmd) { - lbs_pr_debug(1, "cmd is NULL\n"); - return; - } lbs_pr_info("command_timer_fn fired (%x)\n", cmd->command); if (!adapter->fw_ready) return; + if (ptempnode == NULL) { + lbs_pr_debug(1, "PTempnode Empty\n"); + return; + } + spin_lock_irqsave(&adapter->driver_lock, flags); adapter->cur_cmd = NULL; spin_unlock_irqrestore(&adapter->driver_lock, flags); diff --git a/trunk/drivers/net/wireless/libertas/rx.c b/trunk/drivers/net/wireless/libertas/rx.c index 96619a32951b..d17924f764e5 100644 --- a/trunk/drivers/net/wireless/libertas/rx.c +++ b/trunk/drivers/net/wireless/libertas/rx.c @@ -136,7 +136,7 @@ static void wlan_compute_rssi(wlan_private * priv, struct rxpd *p_rx_pd) LEAVE(); } -void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb) +int libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb) { lbs_pr_debug(1, "skb->data=%p\n", skb->data); @@ -148,6 +148,8 @@ void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb) skb->ip_summed = CHECKSUM_UNNECESSARY; netif_rx(skb); + + return 0; } /** @@ -267,11 +269,15 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb) wlan_compute_rssi(priv, p_rx_pd); lbs_pr_debug(1, "RX Data: size of actual packet = %d\n", skb->len); + if (libertas_upload_rx_packet(priv, skb)) { + lbs_pr_debug(1, "RX error: libertas_upload_rx_packet" + " returns failure\n"); + ret = -1; + goto done; + } priv->stats.rx_bytes += skb->len; priv->stats.rx_packets++; - libertas_upload_rx_packet(priv, skb); - ret = 0; done: LEAVE(); @@ -432,14 +438,22 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb) wlan_compute_rssi(priv, prxpd); lbs_pr_debug(1, "RX Data: size of actual packet = %d\n", skb->len); + + if (libertas_upload_rx_packet(priv, skb)) { + lbs_pr_debug(1, "RX error: libertas_upload_rx_packet " + "returns failure\n"); + ret = -1; + goto done; + } + priv->stats.rx_bytes += skb->len; priv->stats.rx_packets++; - libertas_upload_rx_packet(priv, skb); - ret = 0; done: LEAVE(); + skb->protocol = __constant_htons(0x0019); /* ETH_P_80211_RAW */ + return (ret); } diff --git a/trunk/include/asm-generic/bug.h b/trunk/include/asm-generic/bug.h index 7f30cce52857..14fae1fa87df 100644 --- a/trunk/include/asm-generic/bug.h +++ b/trunk/include/asm-generic/bug.h @@ -35,7 +35,7 @@ struct bug_entry { #define WARN_ON(condition) ({ \ typeof(condition) __ret_warn_on = (condition); \ if (unlikely(__ret_warn_on)) { \ - printk("WARNING: at %s:%d %s()\n", __FILE__, \ + printk("BUG: at %s:%d %s()\n", __FILE__, \ __LINE__, __FUNCTION__); \ dump_stack(); \ } \ diff --git a/trunk/include/asm-ia64/acpi.h b/trunk/include/asm-ia64/acpi.h index 5b526357d178..5d03792d4f65 100644 --- a/trunk/include/asm-ia64/acpi.h +++ b/trunk/include/asm-ia64/acpi.h @@ -30,8 +30,6 @@ #ifdef __KERNEL__ -#include - #include #include #include @@ -121,6 +119,11 @@ extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS]; extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; #endif +/* + * Refer Intel ACPI _PDC support document for bit definitions + */ +#define ACPI_PDC_EST_CAPABILITY_SMP 0x8 + #endif /*__KERNEL__*/ #endif /*_ASM_ACPI_H*/