* [PATCH 4/4] AM3517 defconfig update : enable EMAC support
From: Sriramakrishnan @ 2010-03-11 15:13 UTC (permalink / raw)
To: linux-omap; +Cc: netdev, davinci-linux-open-source, Sriramakrishnan
In-Reply-To: <1268320422-32656-4-git-send-email-srk@ti.com>
Update the default configuration for AM3517EVM to enable
support for EMAC peripheral.
Signed-off-by: Sriramakrishnan <srk@ti.com>
---
arch/arm/configs/am3517_evm_defconfig | 70 ++++++++++++++++++++++++++++++++-
1 files changed, 69 insertions(+), 1 deletions(-)
diff --git a/arch/arm/configs/am3517_evm_defconfig b/arch/arm/configs/am3517_evm_defconfig
index 66a10b5..8d79b20 100644
--- a/arch/arm/configs/am3517_evm_defconfig
+++ b/arch/arm/configs/am3517_evm_defconfig
@@ -517,7 +517,75 @@ CONFIG_SCSI_LOWLEVEL=y
# CONFIG_SCSI_OSD_INITIATOR is not set
# CONFIG_ATA is not set
# CONFIG_MD is not set
-# CONFIG_NETDEVICES is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_NATIONAL_PHY is not set
+# CONFIG_STE10XP is not set
+# CONFIG_LSI_ET1011C_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+CONFIG_TI_DAVINCI_EMAC=y
+# CONFIG_DM9000 is not set
+# CONFIG_ETHOC is not set
+# CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
+# CONFIG_DNET is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_KS8842 is not set
+# CONFIG_KS8851_MLL is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+# CONFIG_WLAN is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set
--
1.6.2.4
^ permalink raw reply related
* [PATCH 1/4] AM35xx EMAC : define submodule offsets.
From: Sriramakrishnan @ 2010-03-11 15:13 UTC (permalink / raw)
To: linux-omap; +Cc: netdev, davinci-linux-open-source, Sriramakrishnan
In-Reply-To: <1268320422-32656-1-git-send-email-srk@ti.com>
Define offsets for EMAC sub modules.
Signed-off-by: Sriramakrishnan <srk@ti.com>
---
arch/arm/mach-omap2/include/mach/am35xx.h | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/include/mach/am35xx.h b/arch/arm/mach-omap2/include/mach/am35xx.h
index a705f94..472867e 100644
--- a/arch/arm/mach-omap2/include/mach/am35xx.h
+++ b/arch/arm/mach-omap2/include/mach/am35xx.h
@@ -23,4 +23,13 @@
#define AM35XX_IPSS_HECC_BASE 0x5C050000
#define AM35XX_IPSS_VPFE_BASE 0x5C060000
-#endif /* __ASM_ARCH_AM35XX_H */
+#define AM35XX_EMAC_CNTRL_OFFSET (0x10000)
+#define AM35XX_EMAC_CNTRL_MOD_OFFSET (0x0)
+#define AM35XX_EMAC_CNTRL_RAM_OFFSET (0x20000)
+#define AM35XX_EMAC_MDIO_OFFSET (0x30000)
+#define AM35XX_EMAC_CNTRL_RAM_SIZE (0x2000)
+#define AM35XX_EMAC_RAM_ADDR (AM3517_EMAC_BASE + \
+ AM3517_EMAC_CNTRL_RAM_OFFSET)
+#define AM35XX_EMAC_HW_RAM_ADDR (0x01E20000)
+
+#endif /* __ASM_ARCH_AM35XX_H */
--
1.6.2.4
^ permalink raw reply related
* [PATCH 0/4] AM35xx : Add support for EMAC Peripheral
From: Sriramakrishnan @ 2010-03-11 15:13 UTC (permalink / raw)
To: linux-omap; +Cc: netdev, davinci-linux-open-source, Sriramakrishnan
This patch series adds support for EMAC peripheral on AM35xx
platform. The EMAC peripheral is borrowed from the DaVinci
platform and hence the same driver(davinci_emac) is used.
This patch series has been generated against tip of linux-omap and
depends on the following patches submitted to netdev/linux-davinci
list.
[1].http://patchwork.ozlabs.org/patch/47331/
[2].http://patchwork.ozlabs.org/patch/47332/
Sriramakrishnan (4):
AM35xx EMAC : define submodule offsets.
AM35xx : Platform specific hookup for EMAC module
OMAP3 : clock data: Update name string for EMAC clocks.
AM3517 defconfig update : enable EMAC support
arch/arm/configs/am3517_evm_defconfig | 70 ++++++++++++++++++++-
arch/arm/mach-omap2/board-am3517evm.c | 98 +++++++++++++++++++++++++++++
arch/arm/mach-omap2/clock3xxx_data.c | 4 +-
arch/arm/mach-omap2/include/mach/am35xx.h | 11 +++-
4 files changed, 179 insertions(+), 4 deletions(-)
^ permalink raw reply
* vlan JMicron Technologies, Inc. JMC250 PCI Express Gigabit Ethernet
From: Vito Mattera @ 2010-03-11 16:04 UTC (permalink / raw)
To: netdev
I'm trying to add vlan using the network adapter JMC250 in CentOS 5.3
with the driver: kmod-jme-1.0.5-1.el5.elrepo.i686.rpm
when I type the command:
vconfig add eth0 3
I have the following message:
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
register_vlan_device: Device eth0 has buggy VLAN hw accel
and no vlan is created.
what is my mistake ?
TIA
Best regards
vito mattera
--
CoST - Computers Services and Technologies s.r.l.
20137 via Longhi 13 - Milano - Italy
phone : +39 0245446.1 ext. 253
mobile: +39 335275451
fax : +39 0245446.333
Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle
persone indicate. La diffusione, copia o qualsiasi altra azione
derivante dalla conoscenza di queste informazioni sono rigorosamente
vietate. Qualora abbiate ricevuto questo documento per errore siete
cortesemente pregati di darne immediata comunicazione al mittente e di
provvedere alla sua distruzione. Grazie.
This e-mail and any attachment are confidential and may contain
privileged information intended for the addressee(s) only.
Dissemination, copying, printing or use by anybody else is unauthorized.
If you are not the intended recipient, please delete this message and
any attachment and advise the sender by return e-mail. Thank you
^ permalink raw reply
* RE: ixgbevf: bug in error handling
From: Rose, Gregory V @ 2010-03-11 16:58 UTC (permalink / raw)
To: Dan Carpenter; +Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
In-Reply-To: <20100311103329.GO6321@bicker>
>-----Original Message-----
>From: Dan Carpenter [mailto:error27@gmail.com]
>Sent: Thursday, March 11, 2010 2:33 AM
>To: Rose, Gregory V
>Cc: netdev@vger.kernel.org; kernel-janitors@vger.kernel.org
>Subject: ixgbevf: bug in error handling
>
>Hi Greg,
>
>drivers/net/ixgbevf/ixgbevf_main.c +3013 ixgbevf_tx_map(96) warn:
>unsigned 'i' is never less than zero.
> 3010 while (count >= 0) {
> 3011 count--;
> 3012 i--;
> 3013 if (i < 0)
> 3014 i += tx_ring->count;
>
> There is a problem here because i is unsigned and just wraps
> around instead of being less than 0.
>
> 3015 tx_buffer_info = &tx_ring->tx_buffer_info[i];
> 3016 ixgbevf_unmap_and_free_tx_resource(adapter,
>tx_buffer_info);
> 3017 }
>
>regards,
>dan carpenter
Ouch. Good catch, we'll fix that right away.
- Greg
^ permalink raw reply
* Re: [PATCH v6] rps: Receive Packet Steering
From: Tom Herbert @ 2010-03-11 17:11 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, netdev, bhutchings, shemminger
In-Reply-To: <1268318738.2986.518.camel@edumazet-laptop>
Eric, thanks for the great comments!
>
> - When a netdevice is freed, I believe you leak rps_maps if they were
> previously allocated. I found following patch necessary to fix it.
>
Yes.
> - Maybe use max(RPM_MAP_SIZE(x), L1_CACHE_BYTES) for allocations to
> avoid false sharing for small maps. (Or else, other part of cache line
> might be given to a user that might dirty it at high rate)
>
Okay.
> - "struct netdev_rx_queue" being only read in fast path, I am not sure
> an alignement is necessary, apart the false sharing that can be
> separately addressed.
>
If we get rid of the double indirection like you describe below, then
this can be allocated in the same way dev->_tx is (kcalloc). Also,
this might a a good structure for writing stats, etc.
>
> - A double indirection to get a struct netdev_rx_queue pointer is
> expensive, not for heavy load benchmarks, but for latencies in seldom
> used devices. I understand you added this for kobject deferred release
> and kfreeing, but this seems a high price to pay in our fast path. I
> used another solution.
>
Yes, this is much better. The kobject documentation has dire warnings
about placing more than one kobject in a data structure, I think I
took that too literally!
>
> - WARN(1, "Recieved packet on %s for queue %u, "
> -> Received
>
Yes, i before e expect after c...
> - Use of cpumask_t for variable on stack is discouraged, we shall use
> cpumask_var_t if possible. Easy for show/store commands. (see my patch)
>
Yes.
> Yet, adding a memory allocation in net_rx_action() seems overkill, so we
> might use two static masks per cpu, and perform a flip ? This would help
> machines with 4096 cpus : To Be Done ?
That is an interesting idea. I'll try it.
>
>
> - RTNL to guard rps map exchange ???
> This sounds like BKL (Big Kernel Lock) syndrom to me :
> Trying to avoid it if possible is better, because it wont exist anymore
> in ten years with 0.99 probability.
>
Yes.
>
> For ease of discussion, I cooked following patch on top of yours :
>
I will apply it.
> Thanks !
>
> include/linux/netdevice.h | 8 ++-
> net/core/dev.c | 64 ++++++++++-------------------
> net/core/net-sysfs.c | 78 ++++++++++++++++++++++--------------
> 3 files changed, 77 insertions(+), 73 deletions(-)
>
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 468da0a..3f4a986 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -544,9 +544,11 @@ struct rps_map {
>
> /* This structure contains an instance of an RX queue. */
> struct netdev_rx_queue {
> - struct kobject kobj;
> struct rps_map *rps_map;
> -} ____cacheline_aligned_in_smp;
> + struct kobject kobj;
> + struct netdev_rx_queue *first;
> + atomic_t count;
> +};
>
> /*
> * This structure defines the management hooks for network devices.
> @@ -897,7 +899,7 @@ struct net_device {
>
> struct kset *queues_kset;
>
> - struct netdev_rx_queue **_rx;
> + struct netdev_rx_queue *_rx;
>
> /* Number of RX queues allocated at alloc_netdev_mq() time */
> unsigned int num_rx_queues;
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 939b1a2..402f23a 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -2195,15 +2195,15 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb)
> u16 index = skb_get_rx_queue(skb);
> if (unlikely(index >= dev->num_rx_queues)) {
> if (net_ratelimit()) {
> - WARN(1, "Recieved packet on %s for queue %u, "
> + WARN(1, "Received packet on %s for queue %u, "
> "but number of RX queues is %u\n",
> dev->name, index, dev->num_rx_queues);
> }
> goto done;
> }
> - rxqueue = dev->_rx[index];
> + rxqueue = dev->_rx + index;
> } else
> - rxqueue = dev->_rx[0];
> + rxqueue = dev->_rx;
>
> if (!rxqueue->rps_map)
> goto done;
> @@ -5236,20 +5236,17 @@ int register_netdevice(struct net_device *dev)
> * alloc_netdev_mq
> */
>
> - dev->_rx = kzalloc(sizeof(struct netdev_rx_queue *),
> - GFP_KERNEL);
> + dev->_rx = kzalloc(max_t(unsigned,
> + sizeof(struct netdev_rx_queue),
> + L1_CACHE_BYTES),
> + GFP_KERNEL);
> if (!dev->_rx) {
> ret = -ENOMEM;
> goto out;
> }
>
> - dev->_rx[0] = kzalloc(sizeof(struct netdev_rx_queue),
> - GFP_KERNEL);
> - if (!dev->_rx[0]) {
> - kfree(dev->_rx);
> - ret = -ENOMEM;
> - goto out;
> - }
> + dev->_rx[0].first = dev->_rx;
> + atomic_set(&dev->_rx[0].count, 1);
> dev->num_rx_queues = 1;
> }
>
> @@ -5610,7 +5607,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
> void (*setup)(struct net_device *), unsigned int queue_count)
> {
> struct netdev_queue *tx;
> - struct netdev_rx_queue **rx;
> + struct netdev_rx_queue *rx;
> struct net_device *dev;
> size_t alloc_size;
> struct net_device *p;
> @@ -5635,37 +5632,30 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
>
> tx = kcalloc(queue_count, sizeof(struct netdev_queue), GFP_KERNEL);
> if (!tx) {
> - printk(KERN_ERR "alloc_netdev: Unable to allocate "
> - "tx qdiscs.\n");
> + pr_err("alloc_netdev: Unable to allocate tx qdiscs.\n");
> goto free_p;
> }
>
> - /*
> - * Allocate RX queue structures, this includes an array of pointers
> - * and netdev_queue_rx stuctures (individually allocated since
> - * each has a kobject).
> - */
> - rx = kzalloc(queue_count *
> - sizeof(struct netdev_rx_queue *), GFP_KERNEL);
> + rx = kzalloc(max_t(unsigned,
> + queue_count * sizeof(struct netdev_rx_queue),
> + L1_CACHE_BYTES),
> + GFP_KERNEL);
> if (!rx) {
> - printk(KERN_ERR "alloc_netdev: Unable to allocate "
> - "rx queues array.\n");
> + pr_err("alloc_netdev: Unable to allocate rx queues.\n");
> goto free_tx;
> }
> - for (i = 0; i < queue_count; i++) {
> - rx[i] = kzalloc(sizeof(struct netdev_rx_queue), GFP_KERNEL);
> - if (!rx[i]) {
> - printk(KERN_ERR "alloc_netdev: Unable to allocate "
> - "rx queues.\n");
> - goto free_rx;
> - }
> - }
> + atomic_set(&rx->count, queue_count);
> + /*
> + * Use counter is located in first element of this array
> + */
> + for (i = 0; i < queue_count; i++)
> + rx[i].first = rx;
>
> dev = PTR_ALIGN(p, NETDEV_ALIGN);
> dev->padded = (char *)dev - (char *)p;
>
> if (dev_addr_init(dev))
> - goto free_tx;
> + goto free_rx;
>
> dev_unicast_init(dev);
>
> @@ -5693,8 +5683,6 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
> return dev;
>
> free_rx:
> - for (i = 0; i < queue_count; i++)
> - kfree(rx[i]);
> kfree(rx);
> free_tx:
> kfree(tx);
> @@ -5720,12 +5708,6 @@ void free_netdev(struct net_device *dev)
>
> kfree(dev->_tx);
>
> - /*
> - * Free RX queue pointer array. Actual netdev_rx_queue objects are
> - * freed by kobject release.
> - */
> - kfree(dev->_rx);
> -
> /* Flush device addresses */
> dev_addr_flush(dev);
>
> diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
> index a07d6ec..de75258 100644
> --- a/net/core/net-sysfs.c
> +++ b/net/core/net-sysfs.c
> @@ -516,24 +516,26 @@ static ssize_t show_rps_map(struct netdev_rx_queue *queue,
> size_t len = 0;
> struct rps_map *map;
> int i;
> - cpumask_t mask;
> + cpumask_var_t mask;
>
> - cpus_clear(mask);
> + if (!zalloc_cpumask_var(&mask, GFP_KERNEL))
> + return -ENOMEM;
>
> rcu_read_lock();
> map = rcu_dereference(queue->rps_map);
> if (map) {
> for (i = 0; i < map->len; i++)
> - cpu_set(map->cpus[i], mask);
> + cpumask_set_cpu(map->cpus[i], mask);
>
> - len += cpumask_scnprintf(buf + len, PAGE_SIZE, &mask);
> + len += cpumask_scnprintf(buf + len, PAGE_SIZE, mask);
> if (PAGE_SIZE - len < 3) {
> rcu_read_unlock();
> + free_cpumask_var(mask);
> return -EINVAL;
> }
> }
> rcu_read_unlock();
> -
> + free_cpumask_var(mask);
> len += sprintf(buf + len, "\n");
> return len;
> }
> @@ -550,38 +552,48 @@ ssize_t store_rps_map(struct netdev_rx_queue *queue,
> const char *buf, size_t len)
> {
> struct rps_map *old_map, *map;
> - cpumask_t mask;
> - int err, cpu, i, weight;
> + cpumask_var_t mask;
> + int err, cpu, i;
> + static DEFINE_SPINLOCK(rps_map_lock);
>
> if (!capable(CAP_NET_ADMIN))
> return -EPERM;
>
> - err = bitmap_parse(buf, len, cpumask_bits(&mask), nr_cpumask_bits);
> - if (err)
> + if (!alloc_cpumask_var(&mask, GFP_KERNEL))
> + return -ENOMEM;
> +
> + err = bitmap_parse(buf, len, cpumask_bits(mask), nr_cpumask_bits);
> + if (err) {
> + free_cpumask_var(mask);
> return err;
> + }
> + map = kzalloc(max_t(unsigned,
> + RPS_MAP_SIZE(cpumask_weight(mask)),
> + L1_CACHE_BYTES),
> + GFP_KERNEL);
> + if (!map) {
> + free_cpumask_var(mask);
> + return -ENOMEM;
> + }
> + i = 0;
> + for_each_cpu_and(cpu, mask, cpu_online_mask)
> + map->cpus[i++] = cpu;
> + if (i)
> + map->len = i;
> + else {
> + kfree(map);
> + map = NULL;
> + }
>
> - weight = cpumask_weight(&mask);
> - if (weight) {
> - map = kzalloc(RPS_MAP_SIZE(weight), GFP_KERNEL);
> - if (!map)
> - return -ENOMEM;
> -
> - cpus_and(mask, mask, cpu_online_map);
> - i = 0;
> - for_each_cpu_mask(cpu, mask)
> - map->cpus[i++] = cpu;
> - map->len = i;
> - } else
> - map = NULL;
> -
> - rtnl_lock();
> + spin_lock(&rps_map_lock);
> old_map = queue->rps_map;
> rcu_assign_pointer(queue->rps_map, map);
> - rtnl_unlock();
> + spin_unlock(&rps_map_lock);
>
> if (old_map)
> call_rcu(&old_map->rcu, rps_map_release);
>
> + free_cpumask_var(mask);
> return len;
> }
>
> @@ -596,8 +608,16 @@ static struct attribute *rx_queue_default_attrs[] = {
> static void rx_queue_release(struct kobject *kobj)
> {
> struct netdev_rx_queue *queue = to_rx_queue(kobj);
> + struct rps_map *map = queue->rps_map;
> + struct netdev_rx_queue *first = queue->first;
>
> - kfree(queue);
> + if (map)
> + call_rcu(&map->rcu, rps_map_release);
> + /*
> + * Free the array containing us only if all elems were released
> + */
> + if (atomic_dec_and_test(&first->count))
> + kfree(first);
> }
>
> static struct kobj_type rx_queue_ktype = {
> @@ -609,7 +629,7 @@ static struct kobj_type rx_queue_ktype = {
> static int rx_queue_add_kobject(struct net_device *net, int index)
> {
> int error = 0;
> - struct netdev_rx_queue *queue = net->_rx[index];
> + struct netdev_rx_queue *queue = net->_rx + index;
> struct kobject *kobj = &queue->kobj;
>
> kobj->kset = net->queues_kset;
> @@ -642,7 +662,7 @@ static int rx_queue_register_kobjects(struct net_device *net)
>
> if (error)
> while (--i >= 0)
> - kobject_put(&net->_rx[i]->kobj);
> + kobject_put(&net->_rx[i].kobj);
>
> return error;
> }
> @@ -652,7 +672,7 @@ static void rx_queue_remove_kobjects(struct net_device *net)
> int i;
>
> for (i = 0; i < net->num_rx_queues; i++)
> - kobject_put(&net->_rx[i]->kobj);
> + kobject_put(&net->_rx[i].kobj);
> kset_unregister(net->queues_kset);
> }
>
>
>
^ permalink raw reply
* Fw: [Bug 15517] New: big file transfers stall and break network
From: Stephen Hemminger @ 2010-03-11 16:46 UTC (permalink / raw)
To: netdev
Begin forwarded message:
Date: Thu, 11 Mar 2010 14:40:12 GMT
From: bugzilla-daemon@bugzilla.kernel.org
To: shemminger@linux-foundation.org
Subject: [Bug 15517] New: big file transfers stall and break network
http://bugzilla.kernel.org/show_bug.cgi?id=15517
Summary: big file transfers stall and break network
Product: Networking
Version: 2.5
Kernel Version: 2.6.32.9
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: high
Priority: P1
Component: IPV4
AssignedTo: shemminger@linux-foundation.org
ReportedBy: conrad_s@rocketmail.com
Regression: Yes
Created an attachment (id=25475)
--> (http://bugzilla.kernel.org/attachment.cgi?id=25475)
lspci output, from working 2.6.31
Upgrading to kernel 2.6.32.9 on a 64-bit machine (Fedora 12,
2.6.32.9-67.fc12.x86_64) caused breakage in transfer of large files over SSH
and SMB, followed by breaking network access.
To reproduce, copy a large file (> 900 MB) using SSH or SMB (mounted either
directly via "mount" or indirectly via "gfvs / nautilus"). Copy stalls and
network becomes unusable (e.g. can't ssh to any other host).
Previous kernel 2.6.31.12 (Fedora 12, 2.6.31.12-174.2.22.fc12.x86_64) works
fine.
--
^ permalink raw reply
* [PATCH] hv: name network device ethX rather than sethX
From: Stephen Hemminger @ 2010-03-11 17:11 UTC (permalink / raw)
To: Hank Janssen; +Cc: Greg KH, netdev
In-Reply-To: <20100309174217.00ae3f3b@nehalam>
This patch makes the HyperV network device use the same naming
scheme as other virtual drivers (Xen, KVM). In an ideal world,
userspace tools would not care what the name is, but some
users and applications do care. Vyatta CLI is one of the tools
that does depend on what the name is.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/staging/hv/netvsc_drv.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
--- a/drivers/staging/hv/netvsc_drv.c 2010-03-09 17:34:45.012686682 -0800
+++ b/drivers/staging/hv/netvsc_drv.c 2010-03-11 09:08:00.480877949 -0800
@@ -381,8 +381,7 @@ static int netvsc_probe(struct device *d
if (!net_drv_obj->Base.OnDeviceAdd)
return -1;
- net = alloc_netdev(sizeof(struct net_device_context), "seth%d",
- ether_setup);
+ net = alloc_etherdev(sizeof(struct net_device_context));
if (!net)
return -1;
^ permalink raw reply
* Re: vlan JMicron Technologies, Inc. JMC250 PCI Express Gigabit Ethernet
From: Stephen Hemminger @ 2010-03-11 16:54 UTC (permalink / raw)
To: Vito Mattera; +Cc: netdev
In-Reply-To: <4B9914A9.2050207@cost.it>
On Thu, 11 Mar 2010 17:04:57 +0100
Vito Mattera <vito.m@cost.it> wrote:
> I'm trying to add vlan using the network adapter JMC250 in CentOS 5.3
> with the driver: kmod-jme-1.0.5-1.el5.elrepo.i686.rpm
>
>
> when I type the command:
> vconfig add eth0 3
>
> I have the following message:
>
>
> 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
> register_vlan_device: Device eth0 has buggy VLAN hw accel
>
> and no vlan is created.
>
> what is my mistake ?
Message happens if driver sets hardware vlan filtering but
provides no callback.
The driver appears okay in upstream kernel, most likely something
got lost in backport process in redhat or the copying of redhat
done by centos.
^ permalink raw reply
* Re: [PATCH 0/7] tcp: bugs and cleanup for 2.6.34-rc1
From: William Allen Simpson @ 2010-03-11 17:38 UTC (permalink / raw)
To: Eric Dumazet
Cc: Linus Torvalds, Andrew Morton, Linux Kernel Developers,
Linux Kernel Network Developers, David Miller, Penttilä Mika
In-Reply-To: <1268319664.2986.535.camel@edumazet-laptop>
On 3/11/10 10:01 AM, Eric Dumazet wrote:
> It would be nice if you could update your knowledge of how linux
> development works these days.
>
Perhaps you could supply pointers to the relevant documentation?
> You throw too many changes at once to let them being reviewed,
> understood, and accepted.
>
These were originally submitted in groups of 1, 2, and 3 patches for
review. For example, as TCPCT parts 1h and 1i (and had been part of
earlier patch series, too), as of 2009-12-03:
http://patchwork.ozlabs.org/patch/40284/
Resubmitted again in even finer grained patches, as of 2009-12-31 and
again 2010-01-06:
http://lkml.org/lkml/2010/1/6/299
Since February, I've grouped them all together, as they've been reviewed,
and re-reviewed -- yet only deprecated by the netdev maintainer.
> For your information, we had to correct a fatal bug introduced by your
> last commits, and as far as I know, you didnt help that much.
>
> http://git2.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commit;h=28b2774a0d5852236dab77a4147b8b88548110f1
>
Splendid! Thank you for the heads up! Unfortunately, that 3 day old
email wasn't CC'd to me. I'm glad to hear that Mika is testing.
And thank you for testing the patch. (You did test, didn't you?)
Testing is always good!
That code always worked for me, and presumably for Adam (who wrote it).
We've always used small amounts of data -- only 64 bytes, as originally
specified. The latest API document allows up to 1220. Folks just keep
wanting more!
(The latest API also drops the subscript, so that patch would have been
changed eventually....)
This code (PATCH v3 5/7) handles the data on the receiving side of the
same transaction, a patch that was first submitted over 18 months ago!
> <at this moment of time>
>
> We are post linux-2.6.34-rc1, so only bug fixes are wanted by Linus and
> David, to be integrated in 2.6.34 (and previous versions if needed)
>
> We are _not_ interested by new stuff at *this* moment, especially if it
> takes lot of time to review.
>
> </at this moment of time>
>
Good. Because this isn't new stuff. It's bug fixes and related cleanup.
Generally, the cleanup was needed to find and test the bugs and patches.
They're already "split up" from the main set of patches, as Ilpo asked
over 4 months ago.
I've not been making *any* new submissions around here, until *existing*
submissions have been applied.
> Last time I made some comments on your patches, you just ignored them or
> loaned, because obviously who is Eric Dumazet to tell William Allen
> Simpson how things should be done ? Silly me !
>
Last time you made any comments at all, it was trivial argument about
parenthesis and casts. I asked directly for more *substantive* review:
http://lkml.org/lkml/2010/1/13/162
Thankfully, we've had substantive review from Andi over a period of
months, on parts 3 and 4 of the current patch series....
And a short attaboy of part 2 a couple of weeks ago.
> Speaking for myself, but as your previous mails were ignored, I felt it
> was time to clarify the points.
>
Thank you.
^ permalink raw reply
* Re: BNX2: Kernel crashes with 2.6.31 and 2.6.31.9
From: Michael Chan @ 2010-03-11 17:49 UTC (permalink / raw)
To: Brian Haley; +Cc: Bruno Prémont, Benjamin Li, NetDEV, Linux-Kernel
In-Reply-To: <4B9850DC.9060703@hp.com>
On Wed, 2010-03-10 at 18:09 -0800, Brian Haley wrote:
> >> I'm able to cause a netdev_watchdog timeout by changing the coalesce
> >> settings on my bnx2, I built a little test program for it:
> >
> > Do you run this program in a loop? How quickly do you see the NETDEV
> > WATCHDOG?
>
> It's run once, and we see it almost immediately after ETHTOOL_SCOALESCE.
What's the difference between running the test program and doing ethtool
-C? Do you see the issue in either case? I don't see the issue here
with ethtool -C.
Thanks.
^ permalink raw reply
* [PATCH 00/37] OF: move device node pointer into struct device.
From: Grant Likely @ 2010-03-11 18:03 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2
Currently on OF enabled platforms, the device node pointer is stored in
both device.archdata.of_node (.prom_node on sparc), and in of_device.node
OF device tree support is being generalized to work on any platform, so
instead of adding the of_node pointer to each platform's archdata
individually, this patch series moves the of_node pointer into struct
device proper and fixes up all users to reference the new location.
The last 3 patches in this series remove the old .archdata.of_node,
.archdata.prom_node and of_device.node instances.
This series has been compile tested on powerpc, sparc and microblaze,
(allmodconfig used on sparc and powerpc) and boot tested on an mpc5200
powerpc. All known (or at least all I could find) in-tree users of the
old names have been removed.
This series should also be fully bisectable. After I collect acks, I
would like to get this whole series into linux-next to see if I've
missed any references, but I can probably hold off merging the last
three patches when the 2.6.35 merge window opens to give out of tree
users a bit more time to adapt. In fact, I'd probably wait a few
extra days after pushing out the bulk of this series before I push the
last 3 patches into my linux-next branch to isolate the drivers that I
missed while fixing.
Cheers,
g.
---
Grant Likely (37):
arch/sparc: Remove .archdata.of_node and use .of_node in struct device
arch/microblaze: Remove .archdata.of_node and use .of_node in struct device
arch/powerpc: Remove .archdata.of_node and use .of_node in struct device
sound/sparc: use .dev.of_node instead of .node in struct of_device
sound/soc: use .dev.of_node instead of .node in struct of_device
sound/aoa: use .dev.of_node instead of .node in struct of_device
drivers/of: use .of_node instead of .archdata.of_node in struct device
drivers/cdrom: use .of_node instead of .archdata.of_node in struct device
drivers/char: use .of_node instead of .archdata.of_node in struct device
drivers/scsi: use .of_node instead of .archdata.of_node in struct device
drivers/of: use .dev.of_node instead of .node in struct of_device
drivers/mtd: use .dev.of_node instead of .node in struct of_device
drivers/infiniband: use .dev.of_node instead of .node in struct of_device
drivers/char: use .dev.of_node instead of .node in struct of_device
drivers/i2c: use .dev.of_node instead of .node in struct of_device
drivers/leds: use .dev.of_node instead of .node in struct of_device
drivers/ata: use .dev.of_node instead of .node in struct of_device
drivers/input: use .dev.of_node instead of .node in struct of_device
drivers/serial: use .dev.of_node instead of .node in struct of_device
drivers/pcmcia: use .dev.of_node instead of .node in struct of_device
drivers/net: use .dev.of_node instead of .node in struct of_device
drivers/sbus: use .dev.of_node instead of .node in struct of_device
drivers/mmc: use .dev.of_node instead of .node in struct of_device
drivers/spi: use .dev.of_node instead of .node in struct of_device
drivers/macintosh: use .dev.of_node instead of .node in struct of_device
drivers/usb: use .dev.of_node instead of .node in struct of_device
drivers/scsi: use .dev.of_node instead of .node in struct of_device
drivers/video: use .dev.of_node instead of .node in struct of_device
drivers/atm: use .dev.of_node instead of .node in struct of_device
drivers/watchdog: use .dev.of_node instead of .node in struct of_device
drivers/serial: use .dev.of_node instead of .node in struct of_device
arch/microblaze: use .dev.of_node instead of .node in struct of_device
arch/powerpc: use .dev.of_node instead of .node in struct of_device
arch/sparc: use .dev.of_node instead of .node in struct of_device
of/sparc: use dev->of_node instead of dev->archdata.prom_node
of: Eliminate dev_archdata_get_node()
i2c/of: Allow device node to be passed via i2c_board_info
arch/microblaze/include/asm/device.h | 14 ------------
arch/microblaze/include/asm/of_device.h | 1 -
arch/microblaze/kernel/of_device.c | 12 ++++------
arch/microblaze/kernel/of_platform.c | 4 ++-
arch/powerpc/include/asm/device.h | 22 +++++++------------
arch/powerpc/include/asm/macio.h | 2 +-
arch/powerpc/include/asm/of_device.h | 1 -
arch/powerpc/kernel/ibmebus.c | 4 ++-
arch/powerpc/kernel/of_device.c | 12 ++++------
arch/powerpc/kernel/of_platform.c | 16 +++++++-------
arch/powerpc/kernel/pci-common.c | 1 -
arch/powerpc/kernel/vio.c | 17 +++++++--------
arch/powerpc/platforms/52xx/mpc52xx_gpio.c | 4 ++-
arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 16 +++++++-------
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 6 +++--
arch/powerpc/platforms/82xx/ep8248e.c | 6 +++--
arch/powerpc/platforms/83xx/suspend.c | 2 +-
arch/powerpc/platforms/cell/axon_msi.c | 2 +-
arch/powerpc/platforms/cell/iommu.c | 5 ++--
arch/powerpc/platforms/pasemi/gpio_mdio.c | 2 +-
arch/powerpc/platforms/pasemi/setup.c | 4 ++-
arch/powerpc/platforms/ps3/system-bus.c | 1 -
arch/powerpc/platforms/pseries/iommu.c | 2 +-
arch/powerpc/sysdev/axonram.c | 6 +++--
arch/powerpc/sysdev/bestcomm/bestcomm.c | 8 +++----
arch/powerpc/sysdev/fsl_msi.c | 14 ++++++------
arch/powerpc/sysdev/fsl_pmc.c | 2 +-
arch/powerpc/sysdev/pmi.c | 2 +-
arch/sparc/include/asm/device.h | 15 -------------
arch/sparc/include/asm/fb.h | 2 +-
arch/sparc/include/asm/floppy_64.h | 4 ++-
arch/sparc/include/asm/of_device.h | 1 -
arch/sparc/include/asm/parport.h | 2 +-
arch/sparc/kernel/auxio_64.c | 2 +-
arch/sparc/kernel/central.c | 4 ++-
arch/sparc/kernel/chmc.c | 10 ++++-----
arch/sparc/kernel/ioport.c | 2 +-
arch/sparc/kernel/of_device_32.c | 18 +++++++---------
arch/sparc/kernel/of_device_64.c | 29 ++++++++++++-------------
arch/sparc/kernel/of_device_common.c | 4 ++-
arch/sparc/kernel/pci.c | 13 ++++-------
arch/sparc/kernel/pci_common.c | 9 ++++----
arch/sparc/kernel/pci_fire.c | 4 ++-
arch/sparc/kernel/pci_msi.c | 18 ++++++++--------
arch/sparc/kernel/pci_psycho.c | 4 ++-
arch/sparc/kernel/pci_sabre.c | 4 ++-
arch/sparc/kernel/pci_schizo.c | 14 ++++++------
arch/sparc/kernel/pci_sun4v.c | 8 +++----
arch/sparc/kernel/power.c | 4 ++-
arch/sparc/kernel/psycho_common.c | 2 +-
arch/sparc/kernel/sbus.c | 16 +++++++-------
arch/sparc/kernel/time_32.c | 2 +-
arch/sparc/kernel/time_64.c | 6 +++--
drivers/ata/pata_macio.c | 2 +-
drivers/ata/pata_of_platform.c | 2 +-
drivers/atm/fore200e.c | 16 ++++++++------
drivers/cdrom/viocd.c | 2 +-
drivers/char/hw_random/n2-drv.c | 2 +-
drivers/char/hw_random/pasemi-rng.c | 2 +-
drivers/char/ipmi/ipmi_si_intf.c | 4 ++-
drivers/char/viotape.c | 2 +-
drivers/gpio/pca953x.c | 2 +-
drivers/i2c/busses/i2c-mpc.c | 17 ++++++++-------
drivers/i2c/i2c-core.c | 3 +++
drivers/ide/pmac.c | 10 ++++-----
drivers/infiniband/hw/ehca/ehca_main.c | 11 +++++----
drivers/input/serio/i8042-sparcio.h | 2 +-
drivers/input/serio/xilinx_ps2.c | 8 +++----
drivers/leds/leds-gpio.c | 2 +-
drivers/macintosh/macio_asic.c | 16 +++++++-------
drivers/macintosh/macio_sysfs.c | 6 +++--
drivers/macintosh/rack-meter.c | 4 ++-
drivers/macintosh/therm_pm72.c | 2 +-
drivers/mmc/host/of_mmc_spi.c | 4 ++-
drivers/mmc/host/sdhci-of-core.c | 2 +-
drivers/mtd/maps/physmap_of.c | 6 +++--
drivers/mtd/maps/sun_uflash.c | 2 +-
drivers/mtd/nand/fsl_elbc_nand.c | 6 +++--
drivers/mtd/nand/pasemi_nand.c | 2 +-
drivers/net/can/sja1000/sja1000_of_platform.c | 4 ++-
drivers/net/ehea/ehea_main.c | 14 ++++++------
drivers/net/greth.c | 3 ++-
drivers/net/ibm_newemac/core.c | 13 ++++++-----
drivers/net/ibm_newemac/debug.c | 9 ++++----
drivers/net/ibm_newemac/debug.h | 4 ++-
drivers/net/ibm_newemac/mal.c | 28 ++++++++++++------------
drivers/net/ibm_newemac/rgmii.c | 12 +++++-----
drivers/net/ibm_newemac/tah.c | 7 +++---
drivers/net/ibm_newemac/zmii.c | 9 ++++----
drivers/net/myri_sbus.c | 2 +-
drivers/net/niu.c | 10 ++++-----
drivers/net/phy/mdio-gpio.c | 6 +++--
drivers/net/sunbmac.c | 6 +++--
drivers/net/sunhme.c | 8 +++----
drivers/net/sunlance.c | 6 +++--
drivers/net/sunqe.c | 6 +++--
drivers/net/xilinx_emaclite.c | 8 +++----
drivers/of/device.c | 20 +++++++++--------
drivers/of/of_i2c.c | 4 ++-
drivers/of/of_mdio.c | 5 ++--
drivers/of/of_spi.c | 1 -
drivers/pcmcia/electra_cf.c | 2 +-
drivers/sbus/char/bbc_envctrl.c | 4 ++-
drivers/sbus/char/bbc_i2c.c | 4 ++-
drivers/sbus/char/display7seg.c | 2 +-
drivers/sbus/char/envctrl.c | 2 +-
drivers/sbus/char/flash.c | 4 ++-
drivers/sbus/char/uctrl.c | 2 +-
drivers/scsi/ibmvscsi/ibmvfc.c | 2 +-
drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +-
drivers/scsi/qlogicpti.c | 10 ++++-----
drivers/scsi/sun_esp.c | 16 +++++++-------
drivers/serial/apbuart.c | 2 +-
drivers/serial/mpc52xx_uart.c | 8 +++----
drivers/serial/nwpserial.c | 2 +-
drivers/serial/of_serial.c | 4 ++-
drivers/serial/pmac_zilog.c | 2 +-
drivers/serial/sunhv.c | 2 +-
drivers/serial/sunsab.c | 6 +++--
drivers/serial/sunsu.c | 6 +++--
drivers/serial/sunzilog.c | 8 +++----
drivers/serial/uartlite.c | 6 +++--
drivers/spi/mpc52xx_psc_spi.c | 11 +++++----
drivers/spi/mpc52xx_spi.c | 14 ++++++------
drivers/spi/spi_mpc8xxx.c | 6 +++--
drivers/usb/host/ehci-ppc-of.c | 2 +-
drivers/usb/host/isp1760-if.c | 2 +-
drivers/usb/host/ohci-ppc-of.c | 2 +-
drivers/video/cg6.c | 2 +-
drivers/video/ffb.c | 2 +-
drivers/watchdog/cpwd.c | 2 +-
include/linux/i2c.h | 4 +++
sound/aoa/fabrics/layout.c | 2 +-
sound/aoa/soundbus/core.c | 8 +++----
sound/aoa/soundbus/i2sbus/control.c | 2 +-
sound/aoa/soundbus/i2sbus/core.c | 4 ++-
sound/aoa/soundbus/sysfs.c | 4 ++-
sound/soc/fsl/mpc8610_hpcd.c | 2 +-
sound/sparc/cs4231.c | 6 +++--
sound/sparc/dbri.c | 2 +-
140 files changed, 422 insertions(+), 458 deletions(-)
--
Signature
^ permalink raw reply
* [PATCH 01/37] i2c/of: Allow device node to be passed via i2c_board_info
From: Grant Likely @ 2010-03-11 18:03 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
The struct device_node *of_node pointer is moving out of dev->archdata
and into the struct device proper. of_i2c.c needs to set the of_node
pointer before the device is registered. Since the i2c subsystem
doesn't allow 2 stage allocation and registration of i2c devices, the
of_node pointer needs to be passed via the i2c_board_info structure
so that it is set prior to registration.
This patch adds of_node to struct i2c_board_info (conditional on
CONFIG_OF), sets of_node in i2c_new_device(), and modifies of_i2c.c
to use the new parameter. The calling of dev_archdata_set_node()
from of_i2c will be removed in a subsequent patch when of_node is
removed from archdata and all users are converted over.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/i2c/i2c-core.c | 3 +++
drivers/of/of_i2c.c | 3 ++-
include/linux/i2c.h | 4 ++++
3 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 3202a86..4099b2b 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -387,6 +387,9 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
client->dev.parent = &client->adapter->dev;
client->dev.bus = &i2c_bus_type;
client->dev.type = &i2c_client_type;
+#ifdef CONFIG_OF
+ client->dev.of_node = info->of_node;
+#endif
dev_set_name(&client->dev, "%d-%04x", i2c_adapter_id(adap),
client->addr);
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index a3a708e..605bc42 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -42,7 +42,8 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
info.addr = be32_to_cpup(addr);
- dev_archdata_set_node(&dev_ad, node);
+ dev_archdata_set_node(&dev_ad, node); /* temporary */
+ info.of_node = node;
info.archdata = &dev_ad;
request_module("%s", info.type);
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 0a5da63..4f37ff1 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -34,6 +34,7 @@
#include <linux/device.h> /* for struct device */
#include <linux/sched.h> /* for completion */
#include <linux/mutex.h>
+#include <linux/of.h> /* for struct device_node */
extern struct bus_type i2c_bus_type;
@@ -251,6 +252,9 @@ struct i2c_board_info {
unsigned short addr;
void *platform_data;
struct dev_archdata *archdata;
+#ifdef CONFIG_OF
+ struct device_node *of_node;
+#endif
int irq;
};
^ permalink raw reply related
* [PATCH 02/37] of: Eliminate dev_archdata_get_node()
From: Grant Likely @ 2010-03-11 18:03 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
The device_node pointer is now stored in struct device->of_node so we
no longer need the dev_archdata_get_node() accessor. Read the of_node
directly instead.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/microblaze/include/asm/device.h | 6 ------
arch/powerpc/include/asm/device.h | 6 ------
arch/sparc/include/asm/device.h | 6 ------
drivers/gpio/pca953x.c | 2 +-
drivers/mmc/host/of_mmc_spi.c | 4 ++--
drivers/of/of_i2c.c | 2 +-
drivers/of/of_mdio.c | 4 ++--
drivers/spi/spi_mpc8xxx.c | 6 +++---
8 files changed, 9 insertions(+), 27 deletions(-)
diff --git a/arch/microblaze/include/asm/device.h b/arch/microblaze/include/asm/device.h
index 78a0384..2370888 100644
--- a/arch/microblaze/include/asm/device.h
+++ b/arch/microblaze/include/asm/device.h
@@ -25,12 +25,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad,
ad->of_node = np;
}
-static inline struct device_node *
-dev_archdata_get_node(const struct dev_archdata *ad)
-{
- return ad->of_node;
-}
-
#endif /* _ASM_MICROBLAZE_DEVICE_H */
diff --git a/arch/powerpc/include/asm/device.h b/arch/powerpc/include/asm/device.h
index 6d94d27..0aa81d3 100644
--- a/arch/powerpc/include/asm/device.h
+++ b/arch/powerpc/include/asm/device.h
@@ -36,12 +36,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad,
ad->of_node = np;
}
-static inline struct device_node *
-dev_archdata_get_node(const struct dev_archdata *ad)
-{
- return ad->of_node;
-}
-
struct pdev_archdata {
};
diff --git a/arch/sparc/include/asm/device.h b/arch/sparc/include/asm/device.h
index f3b85b6..55dadca 100644
--- a/arch/sparc/include/asm/device.h
+++ b/arch/sparc/include/asm/device.h
@@ -26,12 +26,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad,
ad->prom_node = np;
}
-static inline struct device_node *
-dev_archdata_get_node(const struct dev_archdata *ad)
-{
- return ad->prom_node;
-}
-
struct pdev_archdata {
};
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
index ab5daab..abc9b8c 100644
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -436,7 +436,7 @@ pca953x_get_alt_pdata(struct i2c_client *client)
struct device_node *node;
const uint16_t *val;
- node = dev_archdata_get_node(&client->dev.archdata);
+ node = client->dev.of_node;
if (node == NULL)
return NULL;
diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c
index 0c7a63c..a1ec5d0 100644
--- a/drivers/mmc/host/of_mmc_spi.c
+++ b/drivers/mmc/host/of_mmc_spi.c
@@ -63,7 +63,7 @@ static int of_mmc_spi_get_ro(struct device *dev)
struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi)
{
struct device *dev = &spi->dev;
- struct device_node *np = dev_archdata_get_node(&dev->archdata);
+ struct device_node *np = dev->of_node;
struct of_mmc_spi *oms;
const u32 *voltage_ranges;
int num_ranges;
@@ -134,7 +134,7 @@ EXPORT_SYMBOL(mmc_spi_get_pdata);
void mmc_spi_put_pdata(struct spi_device *spi)
{
struct device *dev = &spi->dev;
- struct device_node *np = dev_archdata_get_node(&dev->archdata);
+ struct device_node *np = dev->of_node;
struct of_mmc_spi *oms = to_of_mmc_spi(dev);
int i;
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index 605bc42..43f803e 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -69,7 +69,7 @@ EXPORT_SYMBOL(of_register_i2c_devices);
static int of_dev_node_match(struct device *dev, void *data)
{
- return dev_archdata_get_node(&dev->archdata) == data;
+ return dev->of_node == data;
}
/* must call put_device() when done with returned i2c_client device */
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 3bf20bf..64e08d7 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -101,7 +101,7 @@ EXPORT_SYMBOL(of_mdiobus_register);
/* Helper function for of_phy_find_device */
static int of_phy_match(struct device *dev, void *phy_np)
{
- return dev_archdata_get_node(&dev->archdata) == phy_np;
+ return dev->of_node == phy_np;
}
/**
@@ -167,7 +167,7 @@ struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
if (!dev->dev.parent)
return NULL;
- net_np = dev_archdata_get_node(&dev->dev.parent->archdata);
+ net_np = dev->dev.parent->of_node;
if (!net_np)
return NULL;
diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c
index 4f0cc9d..38b9c32 100644
--- a/drivers/spi/spi_mpc8xxx.c
+++ b/drivers/spi/spi_mpc8xxx.c
@@ -796,7 +796,7 @@ static void mpc8xxx_spi_free_dummy_rx(void)
static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi)
{
struct device *dev = mspi->dev;
- struct device_node *np = dev_archdata_get_node(&dev->archdata);
+ struct device_node *np = dev->of_node;
const u32 *iprop;
int size;
unsigned long spi_base_ofs;
@@ -850,7 +850,7 @@ static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi)
static int mpc8xxx_spi_cpm_init(struct mpc8xxx_spi *mspi)
{
struct device *dev = mspi->dev;
- struct device_node *np = dev_archdata_get_node(&dev->archdata);
+ struct device_node *np = dev->of_node;
const u32 *iprop;
int size;
unsigned long pram_ofs;
@@ -1122,7 +1122,7 @@ static void mpc8xxx_spi_cs_control(struct spi_device *spi, bool on)
static int of_mpc8xxx_spi_get_chipselects(struct device *dev)
{
- struct device_node *np = dev_archdata_get_node(&dev->archdata);
+ struct device_node *np = dev->of_node;
struct fsl_spi_platform_data *pdata = dev->platform_data;
struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata);
unsigned int ngpios;
^ permalink raw reply related
* [PATCH 03/37] of/sparc: use dev->of_node instead of dev->archdata.prom_node
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
The prom_node pointer is being moved out of archdata to dev->of_node.
This patch changes users of prom_node to use the new location.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/sparc/include/asm/fb.h | 2 +-
arch/sparc/kernel/of_device_32.c | 3 ++-
arch/sparc/kernel/of_device_64.c | 3 ++-
arch/sparc/kernel/pci.c | 4 ++--
4 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/arch/sparc/include/asm/fb.h b/arch/sparc/include/asm/fb.h
index b83e447..e834880 100644
--- a/arch/sparc/include/asm/fb.h
+++ b/arch/sparc/include/asm/fb.h
@@ -18,7 +18,7 @@ static inline int fb_is_primary_device(struct fb_info *info)
struct device *dev = info->device;
struct device_node *node;
- node = dev->archdata.prom_node;
+ node = dev->of_node;
if (node &&
node == of_console_device)
return 1;
diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c
index da527b3..5a5509c 100644
--- a/arch/sparc/kernel/of_device_32.c
+++ b/arch/sparc/kernel/of_device_32.c
@@ -345,8 +345,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
return NULL;
sd = &op->dev.archdata;
- sd->prom_node = dp;
+ sd->prom_node = dp; /* temporary */
sd->op = op;
+ op->dev.of_node = dp;
op->node = dp;
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c
index b3d4cb5..9d30b07 100644
--- a/arch/sparc/kernel/of_device_64.c
+++ b/arch/sparc/kernel/of_device_64.c
@@ -640,9 +640,10 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
return NULL;
sd = &op->dev.archdata;
- sd->prom_node = dp;
+ sd->prom_node = dp; /* temporary */
sd->op = op;
+ op->dev.of_node = dp;
op->node = dp;
op->clock_freq = of_getintprop_default(dp, "clock-frequency",
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index cf73f43..40861ed 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -654,7 +654,7 @@ show_pciobppath_attr(struct device * dev, struct device_attribute * attr, char *
struct device_node *dp;
pdev = to_pci_dev(dev);
- dp = pdev->dev.archdata.prom_node;
+ dp = pdev->dev.of_node;
return snprintf (buf, PAGE_SIZE, "%s\n", dp->full_name);
}
@@ -1023,7 +1023,7 @@ void arch_teardown_msi_irq(unsigned int virt_irq)
struct device_node *pci_device_to_OF_node(struct pci_dev *pdev)
{
- return pdev->dev.archdata.prom_node;
+ return pdev->dev.of_node;
}
EXPORT_SYMBOL(pci_device_to_OF_node);
^ permalink raw reply related
* [PATCH 04/37] arch/sparc: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
.node is being removed
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/sparc/include/asm/floppy_64.h | 4 ++--
arch/sparc/include/asm/parport.h | 2 +-
arch/sparc/kernel/auxio_64.c | 2 +-
arch/sparc/kernel/central.c | 4 ++--
arch/sparc/kernel/chmc.c | 10 +++++-----
arch/sparc/kernel/ioport.c | 2 +-
arch/sparc/kernel/of_device_32.c | 14 +++++++-------
arch/sparc/kernel/of_device_64.c | 26 +++++++++++++-------------
arch/sparc/kernel/of_device_common.c | 4 ++--
arch/sparc/kernel/pci.c | 8 +++-----
arch/sparc/kernel/pci_common.c | 9 +++++----
arch/sparc/kernel/pci_fire.c | 4 ++--
arch/sparc/kernel/pci_msi.c | 18 +++++++++---------
arch/sparc/kernel/pci_psycho.c | 4 ++--
arch/sparc/kernel/pci_sabre.c | 4 ++--
arch/sparc/kernel/pci_schizo.c | 14 +++++++-------
arch/sparc/kernel/pci_sun4v.c | 8 ++++----
arch/sparc/kernel/power.c | 4 ++--
arch/sparc/kernel/psycho_common.c | 2 +-
arch/sparc/kernel/sbus.c | 16 ++++++++--------
arch/sparc/kernel/time_32.c | 2 +-
arch/sparc/kernel/time_64.c | 6 +++---
22 files changed, 83 insertions(+), 84 deletions(-)
diff --git a/arch/sparc/include/asm/floppy_64.h b/arch/sparc/include/asm/floppy_64.h
index 36439d6..8fac3ab 100644
--- a/arch/sparc/include/asm/floppy_64.h
+++ b/arch/sparc/include/asm/floppy_64.h
@@ -589,7 +589,7 @@ static unsigned long __init sun_floppy_init(void)
if (!op)
return 0;
- state_prop = of_get_property(op->node, "status", NULL);
+ state_prop = of_get_property(op->dev.of_node, "status", NULL);
if (state_prop && !strncmp(state_prop, "disabled", 8))
return 0;
@@ -716,7 +716,7 @@ static unsigned long __init sun_floppy_init(void)
return sun_floppy_types[0];
}
- prop = of_get_property(op->node, "status", NULL);
+ prop = of_get_property(op->dev.of_node, "status", NULL);
if (prop && !strncmp(state, "disabled", 8))
return 0;
diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h
index ff9ead6..1bb6a41 100644
--- a/arch/sparc/include/asm/parport.h
+++ b/arch/sparc/include/asm/parport.h
@@ -113,7 +113,7 @@ static int __devinit ecpp_probe(struct of_device *op, const struct of_device_id
struct parport *p;
int slot, err;
- parent = op->node->parent;
+ parent = op->dev.of_node->parent;
if (!strcmp(parent->name, "dma")) {
p = parport_pc_probe_port(base, base + 0x400,
op->irqs[0], PARPORT_DMA_NOFIFO,
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c
index 9f52db2..bd8421a 100644
--- a/arch/sparc/kernel/auxio_64.c
+++ b/arch/sparc/kernel/auxio_64.c
@@ -104,7 +104,7 @@ MODULE_DEVICE_TABLE(of, auxio_match);
static int __devinit auxio_probe(struct of_device *dev, const struct of_device_id *match)
{
- struct device_node *dp = dev->node;
+ struct device_node *dp = dev->dev.of_node;
unsigned long size;
if (!strcmp(dp->parent->name, "ebus")) {
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c
index 4589ca3..dfc3698 100644
--- a/arch/sparc/kernel/central.c
+++ b/arch/sparc/kernel/central.c
@@ -167,7 +167,7 @@ static int __devinit fhc_probe(struct of_device *op,
goto out;
}
- if (!strcmp(op->node->parent->name, "central"))
+ if (!strcmp(op->dev.of_node->parent->name, "central"))
p->central = true;
p->pregs = of_ioremap(&op->resource[0], 0,
@@ -182,7 +182,7 @@ static int __devinit fhc_probe(struct of_device *op,
reg = upa_readl(p->pregs + FHC_PREGS_BSR);
p->board_num = ((reg >> 16) & 1) | ((reg >> 12) & 0x0e);
} else {
- p->board_num = of_getintprop_default(op->node, "board#", -1);
+ p->board_num = of_getintprop_default(op->dev.of_node, "board#", -1);
if (p->board_num == -1) {
printk(KERN_ERR "fhc: No board# property\n");
goto out_unmap_pregs;
diff --git a/arch/sparc/kernel/chmc.c b/arch/sparc/kernel/chmc.c
index e1a9598..9368796 100644
--- a/arch/sparc/kernel/chmc.c
+++ b/arch/sparc/kernel/chmc.c
@@ -425,7 +425,7 @@ static int __devinit jbusmc_probe(struct of_device *op,
INIT_LIST_HEAD(&p->list);
err = -ENODEV;
- prop = of_get_property(op->node, "portid", &len);
+ prop = of_get_property(op->dev.of_node, "portid", &len);
if (!prop || len != 4) {
printk(KERN_ERR PFX "Cannot find portid.\n");
goto out_free;
@@ -433,7 +433,7 @@ static int __devinit jbusmc_probe(struct of_device *op,
p->portid = *prop;
- prop = of_get_property(op->node, "memory-control-register-1", &len);
+ prop = of_get_property(op->dev.of_node, "memory-control-register-1", &len);
if (!prop || len != 8) {
printk(KERN_ERR PFX "Cannot get memory control register 1.\n");
goto out_free;
@@ -449,7 +449,7 @@ static int __devinit jbusmc_probe(struct of_device *op,
}
err = -ENODEV;
- ml = of_get_property(op->node, "memory-layout", &p->layout_len);
+ ml = of_get_property(op->dev.of_node, "memory-layout", &p->layout_len);
if (!ml) {
printk(KERN_ERR PFX "Cannot get memory layout property.\n");
goto out_iounmap;
@@ -466,7 +466,7 @@ static int __devinit jbusmc_probe(struct of_device *op,
mc_list_add(&p->list);
printk(KERN_INFO PFX "UltraSPARC-IIIi memory controller at %s\n",
- op->node->full_name);
+ op->dev.of_node->full_name);
dev_set_drvdata(&op->dev, p);
@@ -693,7 +693,7 @@ static void chmc_fetch_decode_regs(struct chmc *p)
static int __devinit chmc_probe(struct of_device *op,
const struct of_device_id *match)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
unsigned long ver;
const void *pval;
int len, portid;
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index 3c8c44f..6d93d2a 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -290,7 +290,7 @@ static void *sbus_alloc_coherent(struct device *dev, size_t len,
if (mmu_map_dma_area(dev, dma_addrp, va, res->start, len_total) != 0)
goto err_noiommu;
- res->name = op->node->name;
+ res->name = op->dev.of_node->name;
return (void *)(unsigned long)res->start;
diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c
index 5a5509c..909bee0 100644
--- a/arch/sparc/kernel/of_device_32.c
+++ b/arch/sparc/kernel/of_device_32.c
@@ -254,10 +254,10 @@ static void __init build_device_resources(struct of_device *op,
return;
p_op = to_of_device(parent);
- bus = of_match_bus(p_op->node);
- bus->count_cells(op->node, &na, &ns);
+ bus = of_match_bus(p_op->dev.of_node);
+ bus->count_cells(op->dev.of_node, &na, &ns);
- preg = of_get_property(op->node, bus->addr_prop_name, &num_reg);
+ preg = of_get_property(op->dev.of_node, bus->addr_prop_name, &num_reg);
if (!preg || num_reg == 0)
return;
@@ -271,8 +271,8 @@ static void __init build_device_resources(struct of_device *op,
struct resource *r = &op->resource[index];
u32 addr[OF_MAX_ADDR_CELLS];
const u32 *reg = (preg + (index * ((na + ns) * 4)));
- struct device_node *dp = op->node;
- struct device_node *pp = p_op->node;
+ struct device_node *dp = op->dev.of_node;
+ struct device_node *pp = p_op->dev.of_node;
struct of_bus *pbus, *dbus;
u64 size, result = OF_BAD_ADDR;
unsigned long flags;
@@ -321,7 +321,7 @@ static void __init build_device_resources(struct of_device *op,
if (of_resource_verbose)
printk("%s reg[%d] -> %llx\n",
- op->node->full_name, index,
+ op->dev.of_node->full_name, index,
result);
if (result != OF_BAD_ADDR) {
@@ -329,7 +329,7 @@ static void __init build_device_resources(struct of_device *op,
r->end = result + size - 1;
r->flags = flags | ((result >> 32ULL) & 0xffUL);
}
- r->name = op->node->name;
+ r->name = op->dev.of_node->name;
}
}
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c
index 9d30b07..e436381 100644
--- a/arch/sparc/kernel/of_device_64.c
+++ b/arch/sparc/kernel/of_device_64.c
@@ -323,10 +323,10 @@ static void __init build_device_resources(struct of_device *op,
return;
p_op = to_of_device(parent);
- bus = of_match_bus(p_op->node);
- bus->count_cells(op->node, &na, &ns);
+ bus = of_match_bus(p_op->dev.of_node);
+ bus->count_cells(op->dev.of_node, &na, &ns);
- preg = of_get_property(op->node, bus->addr_prop_name, &num_reg);
+ preg = of_get_property(op->dev.of_node, bus->addr_prop_name, &num_reg);
if (!preg || num_reg == 0)
return;
@@ -340,7 +340,7 @@ static void __init build_device_resources(struct of_device *op,
if (num_reg > PROMREG_MAX) {
printk(KERN_WARNING "%s: Too many regs (%d), "
"limiting to %d.\n",
- op->node->full_name, num_reg, PROMREG_MAX);
+ op->dev.of_node->full_name, num_reg, PROMREG_MAX);
num_reg = PROMREG_MAX;
}
@@ -348,8 +348,8 @@ static void __init build_device_resources(struct of_device *op,
struct resource *r = &op->resource[index];
u32 addr[OF_MAX_ADDR_CELLS];
const u32 *reg = (preg + (index * ((na + ns) * 4)));
- struct device_node *dp = op->node;
- struct device_node *pp = p_op->node;
+ struct device_node *dp = op->dev.of_node;
+ struct device_node *pp = p_op->dev.of_node;
struct of_bus *pbus, *dbus;
u64 size, result = OF_BAD_ADDR;
unsigned long flags;
@@ -397,7 +397,7 @@ static void __init build_device_resources(struct of_device *op,
if (of_resource_verbose)
printk("%s reg[%d] -> %llx\n",
- op->node->full_name, index,
+ op->dev.of_node->full_name, index,
result);
if (result != OF_BAD_ADDR) {
@@ -408,7 +408,7 @@ static void __init build_device_resources(struct of_device *op,
r->end = result + size - 1;
r->flags = flags;
}
- r->name = op->node->name;
+ r->name = op->dev.of_node->name;
}
}
@@ -530,7 +530,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
struct device *parent,
unsigned int irq)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct device_node *pp, *ip;
unsigned int orig_irq = irq;
int nid;
@@ -575,7 +575,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
if (of_irq_verbose)
printk("%s: Apply [%s:%x] imap --> [%s:%x]\n",
- op->node->full_name,
+ op->dev.of_node->full_name,
pp->full_name, this_orig_irq,
(iret ? iret->full_name : "NULL"), irq);
@@ -594,7 +594,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
if (of_irq_verbose)
printk("%s: PCI swizzle [%s] "
"%x --> %x\n",
- op->node->full_name,
+ op->dev.of_node->full_name,
pp->full_name, this_orig_irq,
irq);
@@ -611,11 +611,11 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
if (!ip)
return orig_irq;
- irq = ip->irq_trans->irq_build(op->node, irq,
+ irq = ip->irq_trans->irq_build(op->dev.of_node, irq,
ip->irq_trans->data);
if (of_irq_verbose)
printk("%s: Apply IRQ trans [%s] %x --> %x\n",
- op->node->full_name, ip->full_name, orig_irq, irq);
+ op->dev.of_node->full_name, ip->full_name, orig_irq, irq);
out:
nid = of_node_to_nid(dp);
diff --git a/arch/sparc/kernel/of_device_common.c b/arch/sparc/kernel/of_device_common.c
index cb8eb79..21b3923 100644
--- a/arch/sparc/kernel/of_device_common.c
+++ b/arch/sparc/kernel/of_device_common.c
@@ -17,7 +17,7 @@ static int node_match(struct device *dev, void *data)
struct of_device *op = to_of_device(dev);
struct device_node *dp = data;
- return (op->node == dp);
+ return (op->dev.of_node == dp);
}
struct of_device *of_find_device_by_node(struct device_node *dp)
@@ -49,7 +49,7 @@ EXPORT_SYMBOL(irq_of_parse_and_map);
void of_propagate_archdata(struct of_device *bus)
{
struct dev_archdata *bus_sd = &bus->dev.archdata;
- struct device_node *bus_dp = bus->node;
+ struct device_node *bus_dp = bus->dev.of_node;
struct device_node *dp;
for (dp = bus_dp->child; dp; dp = dp->sibling) {
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 40861ed..89c17d0 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -684,7 +684,7 @@ static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus)
struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
struct device *parent)
{
- struct device_node *node = pbm->op->node;
+ struct device_node *node = pbm->op->dev.of_node;
struct pci_bus *bus;
printk("PCI: Scanning PBM %s\n", node->full_name);
@@ -1152,15 +1152,13 @@ static int __init of_pci_slot_init(void)
struct device_node *node;
if (pbus->self) {
- struct dev_archdata *sd = pbus->self->sysdata;
-
/* PCI->PCI bridge */
- node = sd->prom_node;
+ node = pbus->self->dev.of_node;
} else {
struct pci_pbm_info *pbm = pbus->sysdata;
/* Host PCI controller */
- node = pbm->op->node;
+ node = pbm->op->dev.of_node;
}
pci_bus_slot_names(node, pbus);
diff --git a/arch/sparc/kernel/pci_common.c b/arch/sparc/kernel/pci_common.c
index b775658..87614be 100644
--- a/arch/sparc/kernel/pci_common.c
+++ b/arch/sparc/kernel/pci_common.c
@@ -314,12 +314,12 @@ struct pci_ops sun4v_pci_ops = {
void pci_get_pbm_props(struct pci_pbm_info *pbm)
{
- const u32 *val = of_get_property(pbm->op->node, "bus-range", NULL);
+ const u32 *val = of_get_property(pbm->op->dev.of_node, "bus-range", NULL);
pbm->pci_first_busno = val[0];
pbm->pci_last_busno = val[1];
- val = of_get_property(pbm->op->node, "ino-bitmap", NULL);
+ val = of_get_property(pbm->op->dev.of_node, "ino-bitmap", NULL);
if (val) {
pbm->ino_bitmap = (((u64)val[1] << 32UL) |
((u64)val[0] << 0UL));
@@ -365,7 +365,8 @@ static void pci_register_legacy_regions(struct resource *io_res,
static void pci_register_iommu_region(struct pci_pbm_info *pbm)
{
- const u32 *vdma = of_get_property(pbm->op->node, "virtual-dma", NULL);
+ const u32 *vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma",
+ NULL);
if (vdma) {
struct resource *rp = kzalloc(sizeof(*rp), GFP_KERNEL);
@@ -389,7 +390,7 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
int num_pbm_ranges;
saw_mem = saw_io = 0;
- pbm_ranges = of_get_property(pbm->op->node, "ranges", &i);
+ pbm_ranges = of_get_property(pbm->op->dev.of_node, "ranges", &i);
if (!pbm_ranges) {
prom_printf("PCI: Fatal error, missing PBM ranges property "
" for %s\n",
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c
index d53f45b..ff844ba 100644
--- a/arch/sparc/kernel/pci_fire.c
+++ b/arch/sparc/kernel/pci_fire.c
@@ -413,7 +413,7 @@ static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm,
struct of_device *op, u32 portid)
{
const struct linux_prom64_registers *regs;
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
int err;
pbm->numa_node = -1;
@@ -458,7 +458,7 @@ static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm,
static int __devinit fire_probe(struct of_device *op,
const struct of_device_id *match)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct pci_pbm_info *pbm;
struct iommu *iommu;
u32 portid;
diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c
index e1b0541..4cfe593 100644
--- a/arch/sparc/kernel/pci_msi.c
+++ b/arch/sparc/kernel/pci_msi.c
@@ -323,7 +323,7 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm,
const u32 *val;
int len;
- val = of_get_property(pbm->op->node, "#msi-eqs", &len);
+ val = of_get_property(pbm->op->dev.of_node, "#msi-eqs", &len);
if (!val || len != 4)
goto no_msi;
pbm->msiq_num = *val;
@@ -346,16 +346,16 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm,
u32 msi64_len;
} *arng;
- val = of_get_property(pbm->op->node, "msi-eq-size", &len);
+ val = of_get_property(pbm->op->dev.of_node, "msi-eq-size", &len);
if (!val || len != 4)
goto no_msi;
pbm->msiq_ent_count = *val;
- mqp = of_get_property(pbm->op->node,
+ mqp = of_get_property(pbm->op->dev.of_node,
"msi-eq-to-devino", &len);
if (!mqp)
- mqp = of_get_property(pbm->op->node,
+ mqp = of_get_property(pbm->op->dev.of_node,
"msi-eq-devino", &len);
if (!mqp || len != sizeof(struct msiq_prop))
goto no_msi;
@@ -363,27 +363,27 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm,
pbm->msiq_first = mqp->first_msiq;
pbm->msiq_first_devino = mqp->first_devino;
- val = of_get_property(pbm->op->node, "#msi", &len);
+ val = of_get_property(pbm->op->dev.of_node, "#msi", &len);
if (!val || len != 4)
goto no_msi;
pbm->msi_num = *val;
- mrng = of_get_property(pbm->op->node, "msi-ranges", &len);
+ mrng = of_get_property(pbm->op->dev.of_node, "msi-ranges", &len);
if (!mrng || len != sizeof(struct msi_range_prop))
goto no_msi;
pbm->msi_first = mrng->first_msi;
- val = of_get_property(pbm->op->node, "msi-data-mask", &len);
+ val = of_get_property(pbm->op->dev.of_node, "msi-data-mask", &len);
if (!val || len != 4)
goto no_msi;
pbm->msi_data_mask = *val;
- val = of_get_property(pbm->op->node, "msix-data-width", &len);
+ val = of_get_property(pbm->op->dev.of_node, "msix-data-width", &len);
if (!val || len != 4)
goto no_msi;
pbm->msix_data_width = *val;
- arng = of_get_property(pbm->op->node, "msi-address-ranges",
+ arng = of_get_property(pbm->op->dev.of_node, "msi-address-ranges",
&len);
if (!arng || len != sizeof(struct addr_range_prop))
goto no_msi;
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c
index 142b9d6..e675e21 100644
--- a/arch/sparc/kernel/pci_psycho.c
+++ b/arch/sparc/kernel/pci_psycho.c
@@ -285,7 +285,7 @@ static irqreturn_t psycho_ce_intr(int irq, void *dev_id)
#define PSYCHO_ECCCTRL_CE 0x2000000000000000UL /* Enable CE INterrupts */
static void psycho_register_error_handlers(struct pci_pbm_info *pbm)
{
- struct of_device *op = of_find_device_by_node(pbm->op->node);
+ struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node);
unsigned long base = pbm->controller_regs;
u64 tmp;
int err;
@@ -507,7 +507,7 @@ static int __devinit psycho_probe(struct of_device *op,
const struct of_device_id *match)
{
const struct linux_prom64_registers *pr_regs;
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct pci_pbm_info *pbm;
struct iommu *iommu;
int is_pbm_a, err;
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c
index ba6fbeb..5048498 100644
--- a/arch/sparc/kernel/pci_sabre.c
+++ b/arch/sparc/kernel/pci_sabre.c
@@ -310,7 +310,7 @@ static irqreturn_t sabre_ce_intr(int irq, void *dev_id)
static void sabre_register_error_handlers(struct pci_pbm_info *pbm)
{
- struct device_node *dp = pbm->op->node;
+ struct device_node *dp = pbm->op->dev.of_node;
struct of_device *op;
unsigned long base = pbm->controller_regs;
u64 tmp;
@@ -456,7 +456,7 @@ static int __devinit sabre_probe(struct of_device *op,
const struct of_device_id *match)
{
const struct linux_prom64_registers *pr_regs;
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct pci_pbm_info *pbm;
u32 upa_portid, dma_mask;
struct iommu *iommu;
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c
index 2b5cdde..2f3f921 100644
--- a/arch/sparc/kernel/pci_schizo.c
+++ b/arch/sparc/kernel/pci_schizo.c
@@ -844,7 +844,7 @@ static int pbm_routes_this_ino(struct pci_pbm_info *pbm, u32 ino)
*/
static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm)
{
- struct of_device *op = of_find_device_by_node(pbm->op->node);
+ struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node);
u64 tmp, err_mask, err_no_mask;
int err;
@@ -939,7 +939,7 @@ static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm)
static void schizo_register_error_handlers(struct pci_pbm_info *pbm)
{
- struct of_device *op = of_find_device_by_node(pbm->op->node);
+ struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node);
u64 tmp, err_mask, err_no_mask;
int err;
@@ -1068,7 +1068,7 @@ static void __devinit schizo_scan_bus(struct pci_pbm_info *pbm,
{
pbm_config_busmastering(pbm);
pbm->is_66mhz_capable =
- (of_find_property(pbm->op->node, "66mhz-capable", NULL)
+ (of_find_property(pbm->op->dev.of_node, "66mhz-capable", NULL)
!= NULL);
pbm->pci_bus = pci_scan_one_pbm(pbm, parent);
@@ -1138,7 +1138,7 @@ static int schizo_pbm_iommu_init(struct pci_pbm_info *pbm)
u32 dma_mask;
u64 control;
- vdma = of_get_property(pbm->op->node, "virtual-dma", NULL);
+ vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma", NULL);
if (!vdma)
vdma = vdma_default;
@@ -1268,7 +1268,7 @@ static void schizo_pbm_hw_init(struct pci_pbm_info *pbm)
pbm->chip_version >= 0x2)
tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT;
- if (!of_find_property(pbm->op->node, "no-bus-parking", NULL))
+ if (!of_find_property(pbm->op->dev.of_node, "no-bus-parking", NULL))
tmp |= SCHIZO_PCICTRL_PARK;
else
tmp &= ~SCHIZO_PCICTRL_PARK;
@@ -1311,7 +1311,7 @@ static int __devinit schizo_pbm_init(struct pci_pbm_info *pbm,
int chip_type)
{
const struct linux_prom64_registers *regs;
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
const char *chipset_name;
int is_pbm_a, err;
@@ -1415,7 +1415,7 @@ static struct pci_pbm_info * __devinit schizo_find_sibling(u32 portid,
static int __devinit __schizo_init(struct of_device *op, unsigned long chip_type)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct pci_pbm_info *pbm;
struct iommu *iommu;
u32 portid;
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c
index 23c33ff..5c11f56 100644
--- a/arch/sparc/kernel/pci_sun4v.c
+++ b/arch/sparc/kernel/pci_sun4v.c
@@ -540,7 +540,7 @@ static void __devinit pci_sun4v_scan_bus(struct pci_pbm_info *pbm,
struct property *prop;
struct device_node *dp;
- dp = pbm->op->node;
+ dp = pbm->op->dev.of_node;
prop = of_find_property(dp, "66mhz-capable", NULL);
pbm->is_66mhz_capable = (prop != NULL);
pbm->pci_bus = pci_scan_one_pbm(pbm, parent);
@@ -584,7 +584,7 @@ static int __devinit pci_sun4v_iommu_init(struct pci_pbm_info *pbm)
u32 dma_mask, dma_offset;
const u32 *vdma;
- vdma = of_get_property(pbm->op->node, "virtual-dma", NULL);
+ vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma", NULL);
if (!vdma)
vdma = vdma_default;
@@ -881,7 +881,7 @@ static void pci_sun4v_msi_init(struct pci_pbm_info *pbm)
static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm,
struct of_device *op, u32 devhandle)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
int err;
pbm->numa_node = of_node_to_nid(dp);
@@ -929,7 +929,7 @@ static int __devinit pci_sun4v_probe(struct of_device *op,
u32 devhandle;
int i, err;
- dp = op->node;
+ dp = op->dev.of_node;
if (!hvapi_negotiated++) {
err = sun4v_hvapi_register(HV_GRP_PCI,
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c
index e2a045c..e3f806a 100644
--- a/arch/sparc/kernel/power.c
+++ b/arch/sparc/kernel/power.c
@@ -41,9 +41,9 @@ static int __devinit power_probe(struct of_device *op, const struct of_device_id
power_reg = of_ioremap(res, 0, 0x4, "power");
printk(KERN_INFO "%s: Control reg at %llx\n",
- op->node->name, res->start);
+ op->dev.of_node->name, res->start);
- if (has_button_interrupt(irq, op->node)) {
+ if (has_button_interrupt(irq, op->dev.of_node)) {
if (request_irq(irq,
power_handler, 0, "power", NULL) < 0)
printk(KERN_ERR "power: Cannot setup IRQ handler.\n");
diff --git a/arch/sparc/kernel/psycho_common.c b/arch/sparc/kernel/psycho_common.c
index 8f14784..3f34ac8 100644
--- a/arch/sparc/kernel/psycho_common.c
+++ b/arch/sparc/kernel/psycho_common.c
@@ -450,7 +450,7 @@ int psycho_iommu_init(struct pci_pbm_info *pbm, int tsbsize,
void psycho_pbm_init_common(struct pci_pbm_info *pbm, struct of_device *op,
const char *chip_name, int chip_type)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
pbm->name = dp->full_name;
pbm->numa_node = -1;
diff --git a/arch/sparc/kernel/sbus.c b/arch/sparc/kernel/sbus.c
index 406e087..cfeaf04 100644
--- a/arch/sparc/kernel/sbus.c
+++ b/arch/sparc/kernel/sbus.c
@@ -63,10 +63,10 @@ void sbus_set_sbus64(struct device *dev, int bursts)
int slot;
u64 val;
- regs = of_get_property(op->node, "reg", NULL);
+ regs = of_get_property(op->dev.of_node, "reg", NULL);
if (!regs) {
printk(KERN_ERR "sbus_set_sbus64: Cannot find regs for %s\n",
- op->node->full_name);
+ op->dev.of_node->full_name);
return;
}
slot = regs->which_io;
@@ -287,7 +287,7 @@ static irqreturn_t sysio_ue_handler(int irq, void *dev_id)
SYSIO_UEAFSR_SPIO | SYSIO_UEAFSR_SDRD | SYSIO_UEAFSR_SDWR);
upa_writeq(error_bits, afsr_reg);
- portid = of_getintprop_default(op->node, "portid", -1);
+ portid = of_getintprop_default(op->dev.of_node, "portid", -1);
/* Log the error. */
printk("SYSIO[%x]: Uncorrectable ECC Error, primary error type[%s]\n",
@@ -361,7 +361,7 @@ static irqreturn_t sysio_ce_handler(int irq, void *dev_id)
SYSIO_CEAFSR_SPIO | SYSIO_CEAFSR_SDRD | SYSIO_CEAFSR_SDWR);
upa_writeq(error_bits, afsr_reg);
- portid = of_getintprop_default(op->node, "portid", -1);
+ portid = of_getintprop_default(op->dev.of_node, "portid", -1);
printk("SYSIO[%x]: Correctable ECC Error, primary error type[%s]\n",
portid,
@@ -439,7 +439,7 @@ static irqreturn_t sysio_sbus_error_handler(int irq, void *dev_id)
SYSIO_SBAFSR_SLE | SYSIO_SBAFSR_STO | SYSIO_SBAFSR_SBERR);
upa_writeq(error_bits, afsr_reg);
- portid = of_getintprop_default(op->node, "portid", -1);
+ portid = of_getintprop_default(op->dev.of_node, "portid", -1);
/* Log the error. */
printk("SYSIO[%x]: SBUS Error, primary error type[%s] read(%d)\n",
@@ -496,7 +496,7 @@ static void __init sysio_register_error_handlers(struct of_device *op)
u64 control;
int portid;
- portid = of_getintprop_default(op->node, "portid", -1);
+ portid = of_getintprop_default(op->dev.of_node, "portid", -1);
irq = sbus_build_irq(op, SYSIO_UE_INO);
if (request_irq(irq, sysio_ue_handler, 0,
@@ -537,7 +537,7 @@ static void __init sysio_register_error_handlers(struct of_device *op)
static void __init sbus_iommu_init(struct of_device *op)
{
const struct linux_prom64_registers *pr;
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct iommu *iommu;
struct strbuf *strbuf;
unsigned long regs, reg_base;
@@ -589,7 +589,7 @@ static void __init sbus_iommu_init(struct of_device *op)
*/
iommu->write_complete_reg = regs + 0x2000UL;
- portid = of_getintprop_default(op->node, "portid", -1);
+ portid = of_getintprop_default(op->dev.of_node, "portid", -1);
printk(KERN_INFO "SYSIO: UPA portID %x, at %016lx\n",
portid, regs);
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c
index 0d4c09b..e0dbed9 100644
--- a/arch/sparc/kernel/time_32.c
+++ b/arch/sparc/kernel/time_32.c
@@ -152,7 +152,7 @@ static struct platform_device m48t59_rtc = {
static int __devinit clock_probe(struct of_device *op, const struct of_device_id *match)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
const char *model = of_get_property(dp, "model", NULL);
if (!model)
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c
index 67e1651..ee3fe41 100644
--- a/arch/sparc/kernel/time_64.c
+++ b/arch/sparc/kernel/time_64.c
@@ -423,7 +423,7 @@ static int __devinit rtc_probe(struct of_device *op, const struct of_device_id *
struct resource *r;
printk(KERN_INFO "%s: RTC regs at 0x%llx\n",
- op->node->full_name, op->resource[0].start);
+ op->dev.of_node->full_name, op->resource[0].start);
/* The CMOS RTC driver only accepts IORESOURCE_IO, so cons
* up a fake resource so that the probe works for all cases.
@@ -479,7 +479,7 @@ static int __devinit bq4802_probe(struct of_device *op, const struct of_device_i
{
printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n",
- op->node->full_name, op->resource[0].start);
+ op->dev.of_node->full_name, op->resource[0].start);
rtc_bq4802_device.resource = &op->resource[0];
return platform_device_register(&rtc_bq4802_device);
@@ -533,7 +533,7 @@ static struct platform_device m48t59_rtc = {
static int __devinit mostek_probe(struct of_device *op, const struct of_device_id *match)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
/* On an Enterprise system there can be multiple mostek clocks.
* We should only match the one that is on the central FHC bus.
^ permalink raw reply related
* [PATCH 05/37] arch/powerpc: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
.node is being removed
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/powerpc/include/asm/macio.h | 2 +-
arch/powerpc/kernel/ibmebus.c | 4 ++--
arch/powerpc/kernel/of_device.c | 8 ++++----
arch/powerpc/kernel/of_platform.c | 16 ++++++++--------
arch/powerpc/platforms/52xx/mpc52xx_gpio.c | 4 ++--
arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 16 ++++++++--------
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 6 +++---
arch/powerpc/platforms/82xx/ep8248e.c | 6 +++---
arch/powerpc/platforms/83xx/suspend.c | 2 +-
arch/powerpc/platforms/cell/axon_msi.c | 2 +-
arch/powerpc/platforms/pasemi/gpio_mdio.c | 2 +-
arch/powerpc/sysdev/axonram.c | 6 +++---
arch/powerpc/sysdev/bestcomm/bestcomm.c | 8 ++++----
arch/powerpc/sysdev/fsl_msi.c | 14 +++++++-------
arch/powerpc/sysdev/fsl_pmc.c | 2 +-
arch/powerpc/sysdev/pmi.c | 2 +-
16 files changed, 50 insertions(+), 50 deletions(-)
diff --git a/arch/powerpc/include/asm/macio.h b/arch/powerpc/include/asm/macio.h
index a062c57..19a661b 100644
--- a/arch/powerpc/include/asm/macio.h
+++ b/arch/powerpc/include/asm/macio.h
@@ -108,7 +108,7 @@ static inline void* macio_get_drvdata(struct macio_dev *dev)
static inline struct device_node *macio_get_of_node(struct macio_dev *mdev)
{
- return mdev->ofdev.node;
+ return mdev->ofdev.dev.of_node;
}
#ifdef CONFIG_PCI
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index a4c8b38..797e9ac 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -139,14 +139,14 @@ static struct dma_map_ops ibmebus_dma_ops = {
static int ibmebus_match_path(struct device *dev, void *data)
{
- struct device_node *dn = to_of_device(dev)->node;
+ struct device_node *dn = to_of_device(dev)->dev.of_node;
return (dn->full_name &&
(strcasecmp((char *)data, dn->full_name) == 0));
}
static int ibmebus_match_node(struct device *dev, void *data)
{
- return to_of_device(dev)->node == data;
+ return to_of_device(dev)->dev.of_node == data;
}
static int ibmebus_create_device(struct device_node *dn)
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index efbc262..55dafc7 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -13,7 +13,7 @@
static void of_device_make_bus_id(struct of_device *dev)
{
static atomic_t bus_no_reg_magic;
- struct device_node *node = dev->node;
+ struct device_node *node = dev->dev.of_node;
const u32 *reg;
u64 addr;
int magic;
@@ -96,17 +96,17 @@ int of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
ofdev = to_of_device(dev);
- if (add_uevent_var(env, "OF_NAME=%s", ofdev->node->name))
+ if (add_uevent_var(env, "OF_NAME=%s", ofdev->dev.of_node->name))
return -ENOMEM;
- if (add_uevent_var(env, "OF_TYPE=%s", ofdev->node->type))
+ if (add_uevent_var(env, "OF_TYPE=%s", ofdev->dev.of_node->type))
return -ENOMEM;
/* Since the compatible field can contain pretty much anything
* it's not really legal to split it out with commas. We split it
* up using a number of environment variables instead. */
- compat = of_get_property(ofdev->node, "compatible", &cplen);
+ compat = of_get_property(ofdev->dev.of_node, "compatible", &cplen);
while (compat && *compat && cplen > 0) {
if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat))
return -ENOMEM;
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index 666d08d..5a5f624 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -196,7 +196,7 @@ EXPORT_SYMBOL(of_platform_bus_probe);
static int of_dev_node_match(struct device *dev, void *data)
{
- return to_of_device(dev)->node == data;
+ return to_of_device(dev)->dev.of_node == data;
}
struct of_device *of_find_device_by_node(struct device_node *np)
@@ -214,7 +214,7 @@ EXPORT_SYMBOL(of_find_device_by_node);
static int of_dev_phandle_match(struct device *dev, void *data)
{
phandle *ph = data;
- return to_of_device(dev)->node->phandle == *ph;
+ return to_of_device(dev)->dev.of_node->phandle == *ph;
}
struct of_device *of_find_device_by_phandle(phandle ph)
@@ -247,10 +247,10 @@ static int __devinit of_pci_phb_probe(struct of_device *dev,
if (ppc_md.pci_setup_phb == NULL)
return -ENODEV;
- printk(KERN_INFO "Setting up PCI bus %s\n", dev->node->full_name);
+ pr_info("Setting up PCI bus %s\n", dev->dev.of_node->full_name);
/* Alloc and setup PHB data structure */
- phb = pcibios_alloc_controller(dev->node);
+ phb = pcibios_alloc_controller(dev->dev.of_node);
if (!phb)
return -ENODEV;
@@ -264,19 +264,19 @@ static int __devinit of_pci_phb_probe(struct of_device *dev,
}
/* Process "ranges" property */
- pci_process_bridge_OF_ranges(phb, dev->node, 0);
+ pci_process_bridge_OF_ranges(phb, dev->dev.of_node, 0);
/* Init pci_dn data structures */
pci_devs_phb_init_dynamic(phb);
/* Register devices with EEH */
#ifdef CONFIG_EEH
- if (dev->node->child)
- eeh_add_device_tree_early(dev->node);
+ if (dev->dev.of_node->child)
+ eeh_add_device_tree_early(dev->dev.of_node);
#endif /* CONFIG_EEH */
/* Scan the bus */
- pcibios_scan_phb(phb, dev->node);
+ pcibios_scan_phb(phb, dev->dev.of_node);
if (phb->bus == NULL)
return -ENXIO;
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
index 2b8d8ef..fce30e2 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
@@ -167,7 +167,7 @@ static int __devinit mpc52xx_wkup_gpiochip_probe(struct of_device *ofdev,
ofchip->gc.get = mpc52xx_wkup_gpio_get;
ofchip->gc.set = mpc52xx_wkup_gpio_set;
- ret = of_mm_gpiochip_add(ofdev->node, &chip->mmchip);
+ ret = of_mm_gpiochip_add(ofdev->dev.of_node, &chip->mmchip);
if (ret)
return ret;
@@ -328,7 +328,7 @@ static int __devinit mpc52xx_simple_gpiochip_probe(struct of_device *ofdev,
ofchip->gc.get = mpc52xx_simple_gpio_get;
ofchip->gc.set = mpc52xx_simple_gpio_set;
- ret = of_mm_gpiochip_add(ofdev->node, &chip->mmchip);
+ ret = of_mm_gpiochip_add(ofdev->dev.of_node, &chip->mmchip);
if (ret)
return ret;
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
index 072b948..a34bffa 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
@@ -729,8 +729,8 @@ static int __devinit mpc52xx_gpt_probe(struct of_device *ofdev,
spin_lock_init(&gpt->lock);
gpt->dev = &ofdev->dev;
- gpt->ipb_freq = mpc5xxx_get_bus_frequency(ofdev->node);
- gpt->regs = of_iomap(ofdev->node, 0);
+ gpt->ipb_freq = mpc5xxx_get_bus_frequency(ofdev->dev.of_node);
+ gpt->regs = of_iomap(ofdev->dev.of_node, 0);
if (!gpt->regs) {
kfree(gpt);
return -ENOMEM;
@@ -738,21 +738,21 @@ static int __devinit mpc52xx_gpt_probe(struct of_device *ofdev,
dev_set_drvdata(&ofdev->dev, gpt);
- mpc52xx_gpt_gpio_setup(gpt, ofdev->node);
- mpc52xx_gpt_irq_setup(gpt, ofdev->node);
+ mpc52xx_gpt_gpio_setup(gpt, ofdev->dev.of_node);
+ mpc52xx_gpt_irq_setup(gpt, ofdev->dev.of_node);
mutex_lock(&mpc52xx_gpt_list_mutex);
list_add(&gpt->list, &mpc52xx_gpt_list);
mutex_unlock(&mpc52xx_gpt_list_mutex);
/* check if this device could be a watchdog */
- if (of_get_property(ofdev->node, "fsl,has-wdt", NULL) ||
- of_get_property(ofdev->node, "has-wdt", NULL)) {
+ if (of_get_property(ofdev->dev.of_node, "fsl,has-wdt", NULL) ||
+ of_get_property(ofdev->dev.of_node, "has-wdt", NULL)) {
const u32 *on_boot_wdt;
gpt->wdt_mode = MPC52xx_GPT_CAN_WDT;
- on_boot_wdt = of_get_property(ofdev->node, "fsl,wdt-on-boot",
- NULL);
+ on_boot_wdt = of_get_property(ofdev->dev.of_node,
+ "fsl,wdt-on-boot", NULL);
if (on_boot_wdt) {
dev_info(gpt->dev, "used as watchdog\n");
gpt->wdt_mode |= MPC52xx_GPT_IS_WDT;
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
index 929d017..046d314 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
@@ -445,14 +445,14 @@ mpc52xx_lpbfifo_probe(struct of_device *op, const struct of_device_id *match)
if (lpbfifo.dev != NULL)
return -ENOSPC;
- lpbfifo.irq = irq_of_parse_and_map(op->node, 0);
+ lpbfifo.irq = irq_of_parse_and_map(op->dev.of_node, 0);
if (!lpbfifo.irq)
return -ENODEV;
- if (of_address_to_resource(op->node, 0, &res))
+ if (of_address_to_resource(op->dev.of_node, 0, &res))
return -ENODEV;
lpbfifo.regs_phys = res.start;
- lpbfifo.regs = of_iomap(op->node, 0);
+ lpbfifo.regs = of_iomap(op->dev.of_node, 0);
if (!lpbfifo.regs)
return -ENOMEM;
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c
index f9aee18..3848500 100644
--- a/arch/powerpc/platforms/82xx/ep8248e.c
+++ b/arch/powerpc/platforms/82xx/ep8248e.c
@@ -118,12 +118,12 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev,
struct device_node *node;
int ret;
- node = of_get_parent(ofdev->node);
+ node = of_get_parent(ofdev->dev.of_node);
of_node_put(node);
if (node != ep8248e_bcsr_node)
return -ENODEV;
- ret = of_address_to_resource(ofdev->node, 0, &res);
+ ret = of_address_to_resource(ofdev->dev.of_node, 0, &res);
if (ret)
return ret;
@@ -141,7 +141,7 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev,
bus->parent = &ofdev->dev;
snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start);
- ret = of_mdiobus_register(bus, ofdev->node);
+ ret = of_mdiobus_register(bus, ofdev->dev.of_node);
if (ret)
goto err_free_irq;
diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
index 4380534..aa0b764 100644
--- a/arch/powerpc/platforms/83xx/suspend.c
+++ b/arch/powerpc/platforms/83xx/suspend.c
@@ -321,7 +321,7 @@ static struct platform_suspend_ops mpc83xx_suspend_ops = {
static int pmc_probe(struct of_device *ofdev,
const struct of_device_id *match)
{
- struct device_node *np = ofdev->node;
+ struct device_node *np = ofdev->dev.of_node;
struct resource res;
struct pmc_type *type = match->data;
int ret = 0;
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
index 96fe896..e341a70 100644
--- a/arch/powerpc/platforms/cell/axon_msi.c
+++ b/arch/powerpc/platforms/cell/axon_msi.c
@@ -344,7 +344,7 @@ static int axon_msi_shutdown(struct of_device *device)
static int axon_msi_probe(struct of_device *device,
const struct of_device_id *device_id)
{
- struct device_node *dn = device->node;
+ struct device_node *dn = device->dev.of_node;
struct axon_msic *msic;
unsigned int virq;
int dcr_base, dcr_len;
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c
index 3bf5467..b7027db 100644
--- a/arch/powerpc/platforms/pasemi/gpio_mdio.c
+++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c
@@ -219,7 +219,7 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev,
const struct of_device_id *match)
{
struct device *dev = &ofdev->dev;
- struct device_node *np = ofdev->node;
+ struct device_node *np = ofdev->dev.of_node;
struct mii_bus *new_bus;
struct gpio_priv *priv;
const unsigned int *prop;
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
index 88f4ae7..88b21fc 100644
--- a/arch/powerpc/sysdev/axonram.c
+++ b/arch/powerpc/sysdev/axonram.c
@@ -185,7 +185,7 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
axon_ram_bank_id++;
dev_info(&device->dev, "Found memory controller on %s\n",
- device->node->full_name);
+ device->dev.of_node->full_name);
bank = kzalloc(sizeof(struct axon_ram_bank), GFP_KERNEL);
if (bank == NULL) {
@@ -198,7 +198,7 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
bank->device = device;
- if (of_address_to_resource(device->node, 0, &resource) != 0) {
+ if (of_address_to_resource(device->dev.of_node, 0, &resource) != 0) {
dev_err(&device->dev, "Cannot access device tree\n");
rc = -EFAULT;
goto failed;
@@ -253,7 +253,7 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
blk_queue_logical_block_size(bank->disk->queue, AXON_RAM_SECTOR_SIZE);
add_disk(bank->disk);
- bank->irq_id = irq_of_parse_and_map(device->node, 0);
+ bank->irq_id = irq_of_parse_and_map(device->dev.of_node, 0);
if (bank->irq_id == NO_IRQ) {
dev_err(&device->dev, "Cannot access ECC interrupt ID\n");
rc = -EFAULT;
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c
index 378ebd9..d32d538 100644
--- a/arch/powerpc/sysdev/bestcomm/bestcomm.c
+++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c
@@ -377,7 +377,7 @@ mpc52xx_bcom_probe(struct of_device *op, const struct of_device_id *match)
printk(KERN_INFO "DMA: MPC52xx BestComm driver\n");
/* Get the bestcomm node */
- of_node_get(op->node);
+ of_node_get(op->dev.of_node);
/* Prepare SRAM */
ofn_sram = of_find_matching_node(NULL, mpc52xx_sram_ids);
@@ -406,10 +406,10 @@ mpc52xx_bcom_probe(struct of_device *op, const struct of_device_id *match)
}
/* Save the node */
- bcom_eng->ofnode = op->node;
+ bcom_eng->ofnode = op->dev.of_node;
/* Get, reserve & map io */
- if (of_address_to_resource(op->node, 0, &res_bcom)) {
+ if (of_address_to_resource(op->dev.of_node, 0, &res_bcom)) {
printk(KERN_ERR DRIVER_NAME ": "
"Can't get resource\n");
rv = -EINVAL;
@@ -453,7 +453,7 @@ error_sramclean:
kfree(bcom_eng);
bcom_sram_cleanup();
error_ofput:
- of_node_put(op->node);
+ of_node_put(op->dev.of_node);
printk(KERN_ERR "DMA: MPC52xx BestComm init failed !\n");
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index e094367..d17841f 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -248,7 +248,7 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
goto error_out;
}
- msi->irqhost = irq_alloc_host(dev->node, IRQ_HOST_MAP_LINEAR,
+ msi->irqhost = irq_alloc_host(dev->dev.of_node, IRQ_HOST_MAP_LINEAR,
NR_MSI_IRQS, &fsl_msi_host_ops, 0);
if (msi->irqhost == NULL) {
@@ -258,10 +258,10 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
}
/* Get the MSI reg base */
- err = of_address_to_resource(dev->node, 0, &res);
+ err = of_address_to_resource(dev->dev.of_node, 0, &res);
if (err) {
dev_err(&dev->dev, "%s resource error!\n",
- dev->node->full_name);
+ dev->dev.of_node->full_name);
goto error_out;
}
@@ -284,16 +284,16 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
goto error_out;
}
- p = of_get_property(dev->node, "interrupts", &count);
+ p = of_get_property(dev->dev.of_node, "interrupts", &count);
if (!p) {
dev_err(&dev->dev, "no interrupts property found on %s\n",
- dev->node->full_name);
+ dev->dev.of_node->full_name);
err = -ENODEV;
goto error_out;
}
if (count % 8 != 0) {
dev_err(&dev->dev, "Malformed interrupts property on %s\n",
- dev->node->full_name);
+ dev->dev.of_node->full_name);
err = -EINVAL;
goto error_out;
}
@@ -302,7 +302,7 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
for (i = 0; i < count / 2; i++) {
if (i > NR_MSI_REG)
break;
- virt_msir = irq_of_parse_and_map(dev->node, i);
+ virt_msir = irq_of_parse_and_map(dev->dev.of_node, i);
if (virt_msir != NO_IRQ) {
set_irq_data(virt_msir, (void *)i);
set_irq_chained_handler(virt_msir, fsl_msi_cascade);
diff --git a/arch/powerpc/sysdev/fsl_pmc.c b/arch/powerpc/sysdev/fsl_pmc.c
index a7635a9..2ebe817 100644
--- a/arch/powerpc/sysdev/fsl_pmc.c
+++ b/arch/powerpc/sysdev/fsl_pmc.c
@@ -60,7 +60,7 @@ static struct platform_suspend_ops pmc_suspend_ops = {
static int pmc_probe(struct of_device *ofdev, const struct of_device_id *id)
{
- pmc_regs = of_iomap(ofdev->node, 0);
+ pmc_regs = of_iomap(ofdev->dev.of_node, 0);
if (!pmc_regs)
return -ENOMEM;
diff --git a/arch/powerpc/sysdev/pmi.c b/arch/powerpc/sysdev/pmi.c
index aaa9159..b92cb3a 100644
--- a/arch/powerpc/sysdev/pmi.c
+++ b/arch/powerpc/sysdev/pmi.c
@@ -123,7 +123,7 @@ static void pmi_notify_handlers(struct work_struct *work)
static int pmi_of_probe(struct of_device *dev,
const struct of_device_id *match)
{
- struct device_node *np = dev->node;
+ struct device_node *np = dev->dev.of_node;
int rc;
if (data) {
^ permalink raw reply related
* [PATCH 06/37] arch/microblaze: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
.node is being removed
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/microblaze/kernel/of_device.c | 8 ++++----
arch/microblaze/kernel/of_platform.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/microblaze/kernel/of_device.c b/arch/microblaze/kernel/of_device.c
index 12371bd..ae165fc 100644
--- a/arch/microblaze/kernel/of_device.c
+++ b/arch/microblaze/kernel/of_device.c
@@ -12,7 +12,7 @@
void of_device_make_bus_id(struct of_device *dev)
{
static atomic_t bus_no_reg_magic;
- struct device_node *node = dev->node;
+ struct device_node *node = dev->dev.of_node;
const u32 *reg;
u64 addr;
int magic;
@@ -76,17 +76,17 @@ int of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
ofdev = to_of_device(dev);
- if (add_uevent_var(env, "OF_NAME=%s", ofdev->node->name))
+ if (add_uevent_var(env, "OF_NAME=%s", ofdev->dev.of_node->name))
return -ENOMEM;
- if (add_uevent_var(env, "OF_TYPE=%s", ofdev->node->type))
+ if (add_uevent_var(env, "OF_TYPE=%s", ofdev->dev.of_node->type))
return -ENOMEM;
/* Since the compatible field can contain pretty much anything
* it's not really legal to split it out with commas. We split it
* up using a number of environment variables instead. */
- compat = of_get_property(ofdev->node, "compatible", &cplen);
+ compat = of_get_property(ofdev->dev.of_node, "compatible", &cplen);
while (compat && *compat && cplen > 0) {
if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat))
return -ENOMEM;
diff --git a/arch/microblaze/kernel/of_platform.c b/arch/microblaze/kernel/of_platform.c
index 1c6d684..ea7d024 100644
--- a/arch/microblaze/kernel/of_platform.c
+++ b/arch/microblaze/kernel/of_platform.c
@@ -167,7 +167,7 @@ EXPORT_SYMBOL(of_platform_bus_probe);
static int of_dev_node_match(struct device *dev, void *data)
{
- return to_of_device(dev)->node == data;
+ return to_of_device(dev)->dev.of_node == data;
}
struct of_device *of_find_device_by_node(struct device_node *np)
@@ -185,7 +185,7 @@ EXPORT_SYMBOL(of_find_device_by_node);
static int of_dev_phandle_match(struct device *dev, void *data)
{
phandle *ph = data;
- return to_of_device(dev)->node->phandle == *ph;
+ return to_of_device(dev)->dev.of_node->phandle == *ph;
}
struct of_device *of_find_device_by_phandle(phandle ph)
^ permalink raw reply related
* [PATCH 07/37] drivers/serial: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
.node is being removed
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/serial/mpc52xx_uart.c | 8 ++++----
drivers/serial/sunsu.c | 6 +++---
drivers/serial/sunzilog.c | 8 ++++----
drivers/serial/uartlite.c | 6 +++---
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 3119fdd..cb07938 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -1328,14 +1328,14 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
/* Check validity & presence */
for (idx = 0; idx < MPC52xx_PSC_MAXNUM; idx++)
- if (mpc52xx_uart_nodes[idx] == op->node)
+ if (mpc52xx_uart_nodes[idx] == op->dev.of_node)
break;
if (idx >= MPC52xx_PSC_MAXNUM)
return -EINVAL;
pr_debug("Found %s assigned to ttyPSC%x\n",
mpc52xx_uart_nodes[idx]->full_name, idx);
- uartclk = psc_ops->getuartclk(op->node);
+ uartclk = psc_ops->getuartclk(op->dev.of_node);
if (uartclk == 0) {
dev_dbg(&op->dev, "Could not find uart clock frequency!\n");
return -EINVAL;
@@ -1355,7 +1355,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
port->dev = &op->dev;
/* Search for IRQ and mapbase */
- ret = of_address_to_resource(op->node, 0, &res);
+ ret = of_address_to_resource(op->dev.of_node, 0, &res);
if (ret)
return ret;
@@ -1365,7 +1365,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
return -EINVAL;
}
- psc_ops->get_irq(port, op->node);
+ psc_ops->get_irq(port, op->dev.of_node);
if (port->irq == NO_IRQ) {
dev_dbg(&op->dev, "Could not get irq\n");
return -EINVAL;
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index 170d3d6..2ab82ed 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -1199,7 +1199,7 @@ static int __devinit sunsu_kbd_ms_init(struct uart_sunsu_port *up)
return -ENODEV;
printk("%s: %s port at %llx, irq %u\n",
- to_of_device(up->port.dev)->node->full_name,
+ to_of_device(up->port.dev)->dev.of_node->full_name,
(up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse",
(unsigned long long) up->port.mapbase,
up->port.irq);
@@ -1351,7 +1351,7 @@ static int __init sunsu_console_setup(struct console *co, char *options)
spin_lock_init(&port->lock);
/* Get firmware console settings. */
- sunserial_console_termios(co, to_of_device(port->dev)->node);
+ sunserial_console_termios(co, to_of_device(port->dev)->dev.of_node);
memset(&termios, 0, sizeof(struct ktermios));
termios.c_cflag = co->cflag;
@@ -1408,7 +1408,7 @@ static enum su_type __devinit su_get_type(struct device_node *dp)
static int __devinit su_probe(struct of_device *op, const struct of_device_id *match)
{
static int inst;
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct uart_sunsu_port *up;
struct resource *rp;
enum su_type type;
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c
index 2c7a66a..20f9be8 100644
--- a/drivers/serial/sunzilog.c
+++ b/drivers/serial/sunzilog.c
@@ -1180,7 +1180,7 @@ static int __init sunzilog_console_setup(struct console *con, char *options)
(sunzilog_reg.minor - 64) + con->index, con->index);
/* Get firmware console settings. */
- sunserial_console_termios(con, to_of_device(up->port.dev)->node);
+ sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node);
/* Firmware console speed is limited to 150-->38400 baud so
* this hackish cflag thing is OK.
@@ -1358,7 +1358,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m
int keyboard_mouse = 0;
int err;
- if (of_find_property(op->node, "keyboard", NULL))
+ if (of_find_property(op->dev.of_node, "keyboard", NULL))
keyboard_mouse = 1;
/* uarts must come before keyboards/mice */
@@ -1415,7 +1415,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m
sunzilog_init_hw(&up[1]);
if (!keyboard_mouse) {
- if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node,
+ if (sunserial_console_match(SUNZILOG_CONSOLE(), op->dev.of_node,
&sunzilog_reg, up[0].port.line,
false))
up->flags |= SUNZILOG_FLAG_IS_CONS;
@@ -1425,7 +1425,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m
rp, sizeof(struct zilog_layout));
return err;
}
- if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node,
+ if (sunserial_console_match(SUNZILOG_CONSOLE(), op->dev.of_node,
&sunzilog_reg, up[1].port.line,
false))
up->flags |= SUNZILOG_FLAG_IS_CONS;
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index f0a6c61..8fc2583 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -591,15 +591,15 @@ ulite_of_probe(struct of_device *op, const struct of_device_id *match)
dev_dbg(&op->dev, "%s(%p, %p)\n", __func__, op, match);
- rc = of_address_to_resource(op->node, 0, &res);
+ rc = of_address_to_resource(op->dev.of_node, 0, &res);
if (rc) {
dev_err(&op->dev, "invalid address\n");
return rc;
}
- irq = irq_of_parse_and_map(op->node, 0);
+ irq = irq_of_parse_and_map(op->dev.of_node, 0);
- id = of_get_property(op->node, "port-number", NULL);
+ id = of_get_property(op->dev.of_node, "port-number", NULL);
return ulite_assign(&op->dev, id ? *id : -1, res.start+3, irq);
}
^ permalink raw reply related
* [PATCH 08/37] drivers/watchdog: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
.node is being removed
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/watchdog/cpwd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
index 37ea052..89da14f 100644
--- a/drivers/watchdog/cpwd.c
+++ b/drivers/watchdog/cpwd.c
@@ -576,7 +576,7 @@ static int __devinit cpwd_probe(struct of_device *op,
* interrupt_mask register cannot be written, so no timer
* interrupts can be masked within the PLD.
*/
- str_prop = of_get_property(op->node, "model", NULL);
+ str_prop = of_get_property(op->dev.of_node, "model", NULL);
p->broken = (str_prop && !strcmp(str_prop, WD_BADMODEL));
if (!p->enabled)
^ permalink raw reply related
* [PATCH 09/37] drivers/atm: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
.node is being removed
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/atm/fore200e.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index f7d6eba..593a03a 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -789,7 +789,7 @@ static int __init fore200e_sba_map(struct fore200e *fore200e)
fore200e->bus->write(0x02, fore200e->regs.sba.isr); /* XXX hardwired interrupt level */
/* get the supported DVMA burst sizes */
- bursts = of_getintprop_default(op->node->parent, "burst-sizes", 0x00);
+ bursts = of_getintprop_default(op->dev.of_node->parent, "burst-sizes", 0x00);
if (sbus_can_dma_64bit())
sbus_set_sbus64(&op->dev, bursts);
@@ -820,18 +820,20 @@ static int __init fore200e_sba_prom_read(struct fore200e *fore200e, struct prom_
const u8 *prop;
int len;
- prop = of_get_property(op->node, "madaddrlo2", &len);
+ prop = of_get_property(op->dev.of_node, "madaddrlo2", &len);
if (!prop)
return -ENODEV;
memcpy(&prom->mac_addr[4], prop, 4);
- prop = of_get_property(op->node, "madaddrhi4", &len);
+ prop = of_get_property(op->dev.of_node, "madaddrhi4", &len);
if (!prop)
return -ENODEV;
memcpy(&prom->mac_addr[2], prop, 4);
- prom->serial_number = of_getintprop_default(op->node, "serialnumber", 0);
- prom->hw_revision = of_getintprop_default(op->node, "promversion", 0);
+ prom->serial_number = of_getintprop_default(op->dev.of_node,
+ "serialnumber", 0);
+ prom->hw_revision = of_getintprop_default(op->dev.of_node,
+ "promversion", 0);
return 0;
}
@@ -841,10 +843,10 @@ static int fore200e_sba_proc_read(struct fore200e *fore200e, char *page)
struct of_device *op = fore200e->bus_dev;
const struct linux_prom_registers *regs;
- regs = of_get_property(op->node, "reg", NULL);
+ regs = of_get_property(op->dev.of_node, "reg", NULL);
return sprintf(page, " SBUS slot/device:\t\t%d/'%s'\n",
- (regs ? regs->which_io : 0), op->node->name);
+ (regs ? regs->which_io : 0), op->dev.of_node->name);
}
#endif /* CONFIG_SBUS */
^ permalink raw reply related
* [PATCH 10/37] drivers/video: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
.node is being removed
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/video/cg6.c | 2 +-
drivers/video/ffb.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c
index 0d47c60..978c15f 100644
--- a/drivers/video/cg6.c
+++ b/drivers/video/cg6.c
@@ -741,7 +741,7 @@ static void cg6_unmap_regs(struct of_device *op, struct fb_info *info,
static int __devinit cg6_probe(struct of_device *op,
const struct of_device_id *match)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct fb_info *info;
struct cg6_par *par;
int linebytes, err;
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c
index 9dbb964..be0c982 100644
--- a/drivers/video/ffb.c
+++ b/drivers/video/ffb.c
@@ -897,7 +897,7 @@ static void ffb_init_fix(struct fb_info *info)
static int __devinit ffb_probe(struct of_device *op,
const struct of_device_id *match)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct ffb_fbc __iomem *fbc;
struct ffb_dac __iomem *dac;
struct fb_info *info;
^ permalink raw reply related
* [PATCH 11/37] drivers/scsi: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
.node is being removed
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/scsi/qlogicpti.c | 10 +++++-----
drivers/scsi/sun_esp.c | 16 ++++++++--------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index fa34b92..7374fbe 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -755,7 +755,7 @@ static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti)
struct of_device *op = qpti->op;
struct device_node *dp;
- dp = op->node;
+ dp = op->dev.of_node;
qpti->scsi_id = of_getintprop_default(dp, "initiator-id", -1);
if (qpti->scsi_id == -1)
@@ -776,8 +776,8 @@ static void qpti_get_bursts(struct qlogicpti *qpti)
struct of_device *op = qpti->op;
u8 bursts, bmask;
- bursts = of_getintprop_default(op->node, "burst-sizes", 0xff);
- bmask = of_getintprop_default(op->node->parent, "burst-sizes", 0xff);
+ bursts = of_getintprop_default(op->dev.of_node, "burst-sizes", 0xff);
+ bmask = of_getintprop_default(op->dev.of_node->parent, "burst-sizes", 0xff);
if (bmask != 0xff)
bursts &= bmask;
if (bursts == 0xff ||
@@ -1293,7 +1293,7 @@ static struct scsi_host_template qpti_template = {
static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_device_id *match)
{
struct scsi_host_template *tpnt = match->data;
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct Scsi_Host *host;
struct qlogicpti *qpti;
static int nqptis;
@@ -1315,7 +1315,7 @@ static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_devic
qpti->qhost = host;
qpti->op = op;
qpti->qpti_id = nqptis;
- strcpy(qpti->prom_name, op->node->name);
+ strcpy(qpti->prom_name, op->dev.of_node->name);
qpti->is_pti = strcmp(qpti->prom_name, "QLGC,isp");
if (qpti_map_regs(qpti) < 0)
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c
index 3d73aad..4369b76 100644
--- a/drivers/scsi/sun_esp.c
+++ b/drivers/scsi/sun_esp.c
@@ -124,7 +124,7 @@ static void __devinit esp_get_scsi_id(struct esp *esp, struct of_device *espdma)
struct of_device *op = esp->dev;
struct device_node *dp;
- dp = op->node;
+ dp = op->dev.of_node;
esp->scsi_id = of_getintprop_default(dp, "initiator-id", 0xff);
if (esp->scsi_id != 0xff)
goto done;
@@ -133,7 +133,7 @@ static void __devinit esp_get_scsi_id(struct esp *esp, struct of_device *espdma)
if (esp->scsi_id != 0xff)
goto done;
- esp->scsi_id = of_getintprop_default(espdma->node,
+ esp->scsi_id = of_getintprop_default(espdma->dev.of_node,
"scsi-initiator-id", 7);
done:
@@ -146,7 +146,7 @@ static void __devinit esp_get_differential(struct esp *esp)
struct of_device *op = esp->dev;
struct device_node *dp;
- dp = op->node;
+ dp = op->dev.of_node;
if (of_find_property(dp, "differential", NULL))
esp->flags |= ESP_FLAG_DIFFERENTIAL;
else
@@ -159,7 +159,7 @@ static void __devinit esp_get_clock_params(struct esp *esp)
struct device_node *bus_dp, *dp;
int fmhz;
- dp = op->node;
+ dp = op->dev.of_node;
bus_dp = dp->parent;
fmhz = of_getintprop_default(dp, "clock-frequency", 0);
@@ -171,12 +171,12 @@ static void __devinit esp_get_clock_params(struct esp *esp)
static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of)
{
- struct device_node *dma_dp = dma_of->node;
+ struct device_node *dma_dp = dma_of->dev.of_node;
struct of_device *op = esp->dev;
struct device_node *dp;
u8 bursts, val;
- dp = op->node;
+ dp = op->dev.of_node;
bursts = of_getintprop_default(dp, "burst-sizes", 0xff);
val = of_getintprop_default(dma_dp, "burst-sizes", 0xff);
if (val != 0xff)
@@ -564,7 +564,7 @@ fail:
static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device_id *match)
{
struct device_node *dma_node = NULL;
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct of_device *dma_of = NULL;
int hme = 0;
@@ -573,7 +573,7 @@ static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device
!strcmp(dp->parent->name, "dma")))
dma_node = dp->parent;
else if (!strcmp(dp->name, "SUNW,fas")) {
- dma_node = op->node;
+ dma_node = op->dev.of_node;
hme = 1;
}
if (dma_node)
^ permalink raw reply related
* [PATCH 12/37] drivers/usb: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
.node is being removed
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/usb/host/ehci-ppc-of.c | 2 +-
drivers/usb/host/isp1760-if.c | 2 +-
drivers/usb/host/ohci-ppc-of.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c
index 8df33b8..ad06623 100644
--- a/drivers/usb/host/ehci-ppc-of.c
+++ b/drivers/usb/host/ehci-ppc-of.c
@@ -108,7 +108,7 @@ ppc44x_enable_bmt(struct device_node *dn)
static int __devinit
ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
{
- struct device_node *dn = op->node;
+ struct device_node *dn = op->dev.of_node;
struct usb_hcd *hcd;
struct ehci_hcd *ehci = NULL;
struct resource res;
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
index 4293cfd..36360e2 100644
--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -31,7 +31,7 @@ static int of_isp1760_probe(struct of_device *dev,
const struct of_device_id *match)
{
struct usb_hcd *hcd;
- struct device_node *dp = dev->node;
+ struct device_node *dp = dev->dev.of_node;
struct resource *res;
struct resource memory;
struct of_irq oirq;
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c
index 103263c..003aea2 100644
--- a/drivers/usb/host/ohci-ppc-of.c
+++ b/drivers/usb/host/ohci-ppc-of.c
@@ -83,7 +83,7 @@ static const struct hc_driver ohci_ppc_of_hc_driver = {
static int __devinit
ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
{
- struct device_node *dn = op->node;
+ struct device_node *dn = op->dev.of_node;
struct usb_hcd *hcd;
struct ohci_hcd *ohci;
struct resource res;
^ permalink raw reply related
* [PATCH 13/37] drivers/macintosh: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
.node is being removed
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/macintosh/macio_asic.c | 16 ++++++++--------
drivers/macintosh/macio_sysfs.c | 6 +++---
drivers/macintosh/rack-meter.c | 4 ++--
drivers/macintosh/therm_pm72.c | 2 +-
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index 26a303a..67fe13f 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -248,7 +248,7 @@ static void macio_create_fixup_irq(struct macio_dev *dev, int index,
static void macio_add_missing_resources(struct macio_dev *dev)
{
- struct device_node *np = dev->ofdev.node;
+ struct device_node *np = dev->ofdev.dev.of_node;
unsigned int irq_base;
/* Gatwick has some missing interrupts on child nodes */
@@ -289,7 +289,7 @@ static void macio_add_missing_resources(struct macio_dev *dev)
static void macio_setup_interrupts(struct macio_dev *dev)
{
- struct device_node *np = dev->ofdev.node;
+ struct device_node *np = dev->ofdev.dev.of_node;
unsigned int irq;
int i = 0, j = 0;
@@ -317,7 +317,7 @@ static void macio_setup_interrupts(struct macio_dev *dev)
static void macio_setup_resources(struct macio_dev *dev,
struct resource *parent_res)
{
- struct device_node *np = dev->ofdev.node;
+ struct device_node *np = dev->ofdev.dev.of_node;
struct resource r;
int index;
@@ -373,7 +373,7 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
dev->bus = &chip->lbus;
dev->media_bay = in_bay;
- dev->ofdev.node = np;
+ dev->ofdev.dev.of_node = np;
dev->ofdev.dma_mask = 0xffffffffUL;
dev->ofdev.dev.dma_mask = &dev->ofdev.dma_mask;
dev->ofdev.dev.parent = parent;
@@ -494,9 +494,9 @@ static void macio_pci_add_devices(struct macio_chip *chip)
}
/* Add media bay devices if any */
+ pnode = mbdev->ofdev.dev.of_node;
if (mbdev)
- for (np = NULL; (np = of_get_next_child(mbdev->ofdev.node, np))
- != NULL;) {
+ for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) {
if (macio_skip_device(np))
continue;
of_node_get(np);
@@ -506,9 +506,9 @@ static void macio_pci_add_devices(struct macio_chip *chip)
}
/* Add serial ports if any */
+ pnode = sdev->ofdev.dev.of_node;
if (sdev) {
- for (np = NULL; (np = of_get_next_child(sdev->ofdev.node, np))
- != NULL;) {
+ for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) {
if (macio_skip_device(np))
continue;
of_node_get(np);
diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c
index 9e9453b..6999ce5 100644
--- a/drivers/macintosh/macio_sysfs.c
+++ b/drivers/macintosh/macio_sysfs.c
@@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute *attr, \
char *buf) \
{ \
struct macio_dev *mdev = to_macio_device (dev); \
- return sprintf (buf, format_string, mdev->ofdev.node->field); \
+ return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \
}
static ssize_t
@@ -21,7 +21,7 @@ compatible_show (struct device *dev, struct device_attribute *attr, char *buf)
int length = 0;
of = &to_macio_device (dev)->ofdev;
- compat = of_get_property(of->node, "compatible", &cplen);
+ compat = of_get_property(of->dev.of_node, "compatible", &cplen);
if (!compat) {
*buf = '\0';
return 0;
@@ -58,7 +58,7 @@ static ssize_t devspec_show(struct device *dev,
struct of_device *ofdev;
ofdev = to_of_device(dev);
- return sprintf(buf, "%s\n", ofdev->node->full_name);
+ return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name);
}
macio_config_of_attr (name, "%s\n");
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c
index 93fb320..6a715d0 100644
--- a/drivers/macintosh/rack-meter.c
+++ b/drivers/macintosh/rack-meter.c
@@ -374,7 +374,7 @@ static int __devinit rackmeter_probe(struct macio_dev* mdev,
pr_debug("rackmeter_probe()\n");
/* Get i2s-a node */
- while ((i2s = of_get_next_child(mdev->ofdev.node, i2s)) != NULL)
+ while ((i2s = of_get_next_child(mdev->ofdev.dev.of_node, i2s)) != NULL)
if (strcmp(i2s->name, "i2s-a") == 0)
break;
if (i2s == NULL) {
@@ -430,7 +430,7 @@ static int __devinit rackmeter_probe(struct macio_dev* mdev,
of_address_to_resource(i2s, 1, &rdma)) {
printk(KERN_ERR
"rackmeter: found match but lacks resources: %s",
- mdev->ofdev.node->full_name);
+ mdev->ofdev.dev.of_node->full_name);
rc = -ENXIO;
goto bail_free;
}
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c
index 5738d8b..f5b0f9e 100644
--- a/drivers/macintosh/therm_pm72.c
+++ b/drivers/macintosh/therm_pm72.c
@@ -2198,7 +2198,7 @@ static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match)
state = state_detached;
/* Lookup the fans in the device tree */
- fcu_lookup_fans(dev->node);
+ fcu_lookup_fans(dev->dev.of_node);
/* Add the driver */
return i2c_add_driver(&therm_pm72_driver);
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox