<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.linux.kernel">
    <title>gmane.linux.kernel</title>
    <link>http://blog.gmane.org/gmane.linux.kernel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493173"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493172"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493171"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493170"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493167"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493166"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493159"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493157"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493156"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493155"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493154"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493152"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493150"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493149"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493148"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493147"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493146"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493144"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493143"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel/1493142"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493173">
    <title>Re: [PATCH 4/4] MAINTAINERS: vt8500: Add clk-vt8500.c to MAINTAINERS file</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493173</link>
    <description>&lt;pre&gt;eeek - oops.

Mike,

Disregard this patch - I will send a more complete one through arm-soc 
as there are other files missing as well.

Regards
Tony P
&lt;/pre&gt;</description>
    <dc:creator>Tony Prisk</dc:creator>
    <dc:date>2013-05-18T08:30:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493172">
    <title>Re: Would like to form a pool of Linux copyright holders for faster GPL enforcement against Anthrax Kernels</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493172</link>
    <description>&lt;pre&gt;Forgot to add background on Anthrax Kernels and their violations:
http://pastebin.com/X5Cciy03

- Eric
&lt;/pre&gt;</description>
    <dc:creator>Eric Appleman</dc:creator>
    <dc:date>2013-05-18T08:28:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493171">
    <title>Re: [PATCH 1/4] fsfreeze: wait in killable state in __sb_start_write</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493171</link>
    <description>&lt;pre&gt;Any comments about these patches?

Marco

Il 04/05/2013 08:49, Marco Stornelli ha scritto:
&lt;/pre&gt;</description>
    <dc:creator>Marco</dc:creator>
    <dc:date>2013-05-18T07:32:10</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493170">
    <title>Would like to form a pool of Linux copyright holders for faster GPL enforcement against Anthrax Kernels</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493170</link>
    <description>&lt;pre&gt;Would anyone be interested in forming such a pool? I am willing to wait 
years for this to be resolved through certain organizations, but I 
believe we can do better.

Last I checked, I have 1 long-time poster of this list on board. Would 
anyone else like to join? Ideally I'd like to get the LKML (which I have 
CC'd) involved so that authors of critical Linux components be a part of 
this. I'm not sure if my defconfig commits to Android kernel branches 
count as contributions, so I'm not going to consider myself a Linux 
contributor unless told otherwise.

This pool would be used in the following manner:

* Formally requesting source for binaries (means to request source
* Formally requesting removal of critical copyrighted code that Linux 
cannot function without
* Informing interested parties with respect to refusals of the above

The CTO of Anthrax's hosting server is very interested in terminating 
Chad Goodman's account. Bullet point #3 might come into effect here.

If this is a bad idea, uses incorrect logic, or does not follow the 
conventions of GPL enforcement, feel free to shoot this idea down with 
utmost prejudice.

- Eric
&lt;/pre&gt;</description>
    <dc:creator>Eric Appleman</dc:creator>
    <dc:date>2013-05-18T07:24:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493167">
    <title>hpfs: deadlock and race in hpfs_dir_lseek()</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493167</link>
    <description>&lt;pre&gt;For one thing, there's an ABBA deadlock on hpfs fs-wide lock and i_mutex
in hpfs_dir_lseek() - there's a lot of methods that grab the former with
the caller already holding the latter, so it must take i_mutex first.

For another, locking the damn thing, carefully validating the offset,
then dropping locks and assigning the offset is obviously racy.

Moreover, we _must_ do hpfs_add_pos(), or the machinery in dnode.c
won't modify the sucker on B-tree surgeries.

Signed-off-by: Al Viro &amp;lt;viro&amp;lt; at &amp;gt;zeniv.linux.org.uk&amp;gt;
--
diff --git a/fs/hpfs/dir.c b/fs/hpfs/dir.c
index 546f6d3..834ac13 100644
--- a/fs/hpfs/dir.c
+++ b/fs/hpfs/dir.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -33,25 +33,27 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static loff_t hpfs_dir_lseek(struct file *filp, loff_t off, int whence)
 if (whence == SEEK_DATA || whence == SEEK_HOLE)
 return -EINVAL;
 
+mutex_lock(&amp;amp;i-&amp;gt;i_mutex);
 hpfs_lock(s);
 
 /*printk("dir lseek\n");*/
 if (new_off == 0 || new_off == 1 || new_off == 11 || new_off == 12 || new_off == 13) goto ok;
-mutex_lock(&amp;amp;i-&amp;gt;i_mutex);
 pos = ((loff_t) hpfs_de_as_down_as_possible(s, hpfs_inode-&amp;gt;i_dno) &amp;lt;&amp;lt; 4) + 1;
 while (pos != new_off) {
 if (map_pos_dirent(i, &amp;amp;pos, &amp;amp;qbh)) hpfs_brelse4(&amp;amp;qbh);
 else goto fail;
 if (pos == 12) goto fail;
 }
-mutex_unlock(&amp;amp;i-&amp;gt;i_mutex);
+hpfs_add_pos(i, &amp;amp;filp-&amp;gt;f_pos);
 ok:
+filp-&amp;gt;f_pos = new_off;
 hpfs_unlock(s);
-return filp-&amp;gt;f_pos = new_off;
-fail:
 mutex_unlock(&amp;amp;i-&amp;gt;i_mutex);
+return new_off;
+fail:
 /*printk("illegal lseek: %016llx\n", new_off);*/
 hpfs_unlock(s);
+mutex_unlock(&amp;amp;i-&amp;gt;i_mutex);
 return -ESPIPE;
 }
 
&lt;/pre&gt;</description>
    <dc:creator>Al Viro</dc:creator>
    <dc:date>2013-05-18T06:48:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493166">
    <title>Re: [RFC PATCHv3 4/6] clocksource: Add TI-Nspire timer drivers</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493166</link>
    <description>&lt;pre&gt;
On 17/05/2013, at 11:17 PM, Linus Walleij &amp;lt;linus.walleij&amp;lt; at &amp;gt;linaro.org&amp;gt; wrote:


I forgot to mention before that there is also another timer that runs at the same freq as the APB (which is usually around 30MHz). Is this what you were alluding to? I haven't tested the driver on that timer yet.

As I understand it, you're saying to use a prescaler on faster clock rates so the kernel can have a longer maximum delay time (since a 16 bit register can only hold only so much). In that case, what kind of range should I be scaling to? I suspect it needs to be large enough to keep the kernel from constantly waking but small enough for HR timers to be useful.


&lt;/pre&gt;</description>
    <dc:creator>Daniel Tang</dc:creator>
    <dc:date>2013-05-18T06:40:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493159">
    <title>[PATCHv8 1/3] net: velocity: Rename vptr-&gt;dev to vptr-&gt;netdev</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493159</link>
    <description>&lt;pre&gt;Improve the clarity of the code in preparation for converting the
dma functions to generic versions, which require a struct device *.

This makes it possible to store a 'struct device *dev' in the
velocity_info structure.

Signed-off-by: Tony Prisk &amp;lt;linux&amp;lt; at &amp;gt;prisktech.co.nz&amp;gt;
---
 drivers/net/ethernet/via/via-velocity.c |   66 +++++++++++++++----------------
 drivers/net/ethernet/via/via-velocity.h |    4 +-
 2 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c
index fb62489..187eef3 100644
--- a/drivers/net/ethernet/via/via-velocity.c
+++ b/drivers/net/ethernet/via/via-velocity.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -998,9 +998,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_print_link_status(struct velocity_info *vptr)
 {
 
 if (vptr-&amp;gt;mii_status &amp;amp; VELOCITY_LINK_FAIL) {
-VELOCITY_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: failed to detect cable link\n", vptr-&amp;gt;dev-&amp;gt;name);
+VELOCITY_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: failed to detect cable link\n", vptr-&amp;gt;netdev-&amp;gt;name);
 } else if (vptr-&amp;gt;options.spd_dpx == SPD_DPX_AUTO) {
-VELOCITY_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: Link auto-negotiation", vptr-&amp;gt;dev-&amp;gt;name);
+VELOCITY_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: Link auto-negotiation", vptr-&amp;gt;netdev-&amp;gt;name);
 
 if (vptr-&amp;gt;mii_status &amp;amp; VELOCITY_SPEED_1000)
 VELOCITY_PRT(MSG_LEVEL_INFO, " speed 1000M bps");
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1014,7 +1014,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_print_link_status(struct velocity_info *vptr)
 else
 VELOCITY_PRT(MSG_LEVEL_INFO, " half duplex\n");
 } else {
-VELOCITY_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: Link forced", vptr-&amp;gt;dev-&amp;gt;name);
+VELOCITY_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: Link forced", vptr-&amp;gt;netdev-&amp;gt;name);
 switch (vptr-&amp;gt;options.spd_dpx) {
 case SPD_DPX_1000_FULL:
 VELOCITY_PRT(MSG_LEVEL_INFO, " speed 1000M bps full duplex\n");
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1319,7 +1319,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_init_registers(struct velocity_info *vptr,
 case VELOCITY_INIT_RESET:
 case VELOCITY_INIT_WOL:
 
-netif_stop_queue(vptr-&amp;gt;dev);
+netif_stop_queue(vptr-&amp;gt;netdev);
 
 /*
  *Reset RX to prevent RX pointer not on the 4X location
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1332,7 +1332,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_init_registers(struct velocity_info *vptr,
 if (velocity_set_media_mode(vptr, mii_status) != VELOCITY_LINK_CHANGE) {
 velocity_print_link_status(vptr);
 if (!(vptr-&amp;gt;mii_status &amp;amp; VELOCITY_LINK_FAIL))
-netif_wake_queue(vptr-&amp;gt;dev);
+netif_wake_queue(vptr-&amp;gt;netdev);
 }
 
 enable_flow_control_ability(vptr);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1354,7 +1354,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_init_registers(struct velocity_info *vptr,
 
 mac_eeprom_reload(regs);
 for (i = 0; i &amp;lt; 6; i++)
-writeb(vptr-&amp;gt;dev-&amp;gt;dev_addr[i], &amp;amp;(regs-&amp;gt;PAR[i]));
+writeb(vptr-&amp;gt;netdev-&amp;gt;dev_addr[i], &amp;amp;(regs-&amp;gt;PAR[i]));
 
 /*
  *clear Pre_ACPI bit.
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1377,7 +1377,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_init_registers(struct velocity_info *vptr,
 /*
  *Set packet filter: Receive directed and broadcast address
  */
-velocity_set_multi(vptr-&amp;gt;dev);
+velocity_set_multi(vptr-&amp;gt;netdev);
 
 /*
  *Enable MII auto-polling
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1404,14 +1404,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_init_registers(struct velocity_info *vptr,
 writel((CR0_DPOLL | CR0_TXON | CR0_RXON | CR0_STRT), &amp;amp;regs-&amp;gt;CR0Set);
 
 mii_status = velocity_get_opt_media_mode(vptr);
-netif_stop_queue(vptr-&amp;gt;dev);
+netif_stop_queue(vptr-&amp;gt;netdev);
 
 mii_init(vptr, mii_status);
 
 if (velocity_set_media_mode(vptr, mii_status) != VELOCITY_LINK_CHANGE) {
 velocity_print_link_status(vptr);
 if (!(vptr-&amp;gt;mii_status &amp;amp; VELOCITY_LINK_FAIL))
-netif_wake_queue(vptr-&amp;gt;dev);
+netif_wake_queue(vptr-&amp;gt;netdev);
 }
 
 enable_flow_control_ability(vptr);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1474,7 +1474,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_init_dma_rings(struct velocity_info *vptr)
     rx_ring_size, &amp;amp;pool_dma);
 if (!pool) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "%s : DMA memory allocation failed.\n",
-vptr-&amp;gt;dev-&amp;gt;name);
+vptr-&amp;gt;netdev-&amp;gt;name);
 return -ENOMEM;
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1514,7 +1514,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_alloc_rx_buf(struct velocity_info *vptr, int idx)
 struct rx_desc *rd = &amp;amp;(vptr-&amp;gt;rx.ring[idx]);
 struct velocity_rd_info *rd_info = &amp;amp;(vptr-&amp;gt;rx.info[idx]);
 
-rd_info-&amp;gt;skb = netdev_alloc_skb(vptr-&amp;gt;dev, vptr-&amp;gt;rx.buf_sz + 64);
+rd_info-&amp;gt;skb = netdev_alloc_skb(vptr-&amp;gt;netdev, vptr-&amp;gt;rx.buf_sz + 64);
 if (rd_info-&amp;gt;skb == NULL)
 return -ENOMEM;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1620,7 +1620,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_init_rd_ring(struct velocity_info *vptr)
 
 if (velocity_rx_refill(vptr) != vptr-&amp;gt;options.numrx) {
 VELOCITY_PRT(MSG_LEVEL_ERR, KERN_ERR
-"%s: failed to allocate RX buffer.\n", vptr-&amp;gt;dev-&amp;gt;name);
+"%s: failed to allocate RX buffer.\n", vptr-&amp;gt;netdev-&amp;gt;name);
 velocity_free_rd_ring(vptr);
 goto out;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1809,7 +1809,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_error(struct velocity_info *vptr, int status)
 printk(KERN_ERR "TD structure error TDindex=%hx\n", readw(&amp;amp;regs-&amp;gt;TDIdx[0]));
 BYTE_REG_BITS_ON(TXESR_TDSTR, &amp;amp;regs-&amp;gt;TXESR);
 writew(TRDCSR_RUN, &amp;amp;regs-&amp;gt;TDCSRClr);
-netif_stop_queue(vptr-&amp;gt;dev);
+netif_stop_queue(vptr-&amp;gt;netdev);
 
 /* FIXME: port over the pci_device_failed code and use it
    here */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1850,10 +1850,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_error(struct velocity_info *vptr, int status)
 
 if (linked) {
 vptr-&amp;gt;mii_status &amp;amp;= ~VELOCITY_LINK_FAIL;
-netif_carrier_on(vptr-&amp;gt;dev);
+netif_carrier_on(vptr-&amp;gt;netdev);
 } else {
 vptr-&amp;gt;mii_status |= VELOCITY_LINK_FAIL;
-netif_carrier_off(vptr-&amp;gt;dev);
+netif_carrier_off(vptr-&amp;gt;netdev);
 }
 
 velocity_print_link_status(vptr);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1867,9 +1867,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_error(struct velocity_info *vptr, int status)
 enable_mii_autopoll(regs);
 
 if (vptr-&amp;gt;mii_status &amp;amp; VELOCITY_LINK_FAIL)
-netif_stop_queue(vptr-&amp;gt;dev);
+netif_stop_queue(vptr-&amp;gt;netdev);
 else
-netif_wake_queue(vptr-&amp;gt;dev);
+netif_wake_queue(vptr-&amp;gt;netdev);
 
 }
 if (status &amp;amp; ISR_MIBFI)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1894,7 +1894,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_tx_srv(struct velocity_info *vptr)
 int idx;
 int works = 0;
 struct velocity_td_info *tdinfo;
-struct net_device_stats *stats = &amp;amp;vptr-&amp;gt;dev-&amp;gt;stats;
+struct net_device_stats *stats = &amp;amp;vptr-&amp;gt;netdev-&amp;gt;stats;
 
 for (qnum = 0; qnum &amp;lt; vptr-&amp;gt;tx.numq; qnum++) {
 for (idx = vptr-&amp;gt;tx.tail[qnum]; vptr-&amp;gt;tx.used[qnum] &amp;gt; 0;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1939,9 +1939,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_tx_srv(struct velocity_info *vptr)
  *Look to see if we should kick the transmit network
  *layer for more work.
  */
-if (netif_queue_stopped(vptr-&amp;gt;dev) &amp;amp;&amp;amp; (full == 0) &amp;amp;&amp;amp;
+if (netif_queue_stopped(vptr-&amp;gt;netdev) &amp;amp;&amp;amp; (full == 0) &amp;amp;&amp;amp;
     (!(vptr-&amp;gt;mii_status &amp;amp; VELOCITY_LINK_FAIL))) {
-netif_wake_queue(vptr-&amp;gt;dev);
+netif_wake_queue(vptr-&amp;gt;netdev);
 }
 return works;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1989,7 +1989,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_rx_copy(struct sk_buff **rx_skb, int pkt_size,
 if (pkt_size &amp;lt; rx_copybreak) {
 struct sk_buff *new_skb;
 
-new_skb = netdev_alloc_skb_ip_align(vptr-&amp;gt;dev, pkt_size);
+new_skb = netdev_alloc_skb_ip_align(vptr-&amp;gt;netdev, pkt_size);
 if (new_skb) {
 new_skb-&amp;gt;ip_summed = rx_skb[0]-&amp;gt;ip_summed;
 skb_copy_from_linear_data(*rx_skb, new_skb-&amp;gt;data, pkt_size);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2030,14 +2030,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline void velocity_iph_realign(struct velocity_info *vptr,
 static int velocity_receive_frame(struct velocity_info *vptr, int idx)
 {
 void (*pci_action)(struct pci_dev *, dma_addr_t, size_t, int);
-struct net_device_stats *stats = &amp;amp;vptr-&amp;gt;dev-&amp;gt;stats;
+struct net_device_stats *stats = &amp;amp;vptr-&amp;gt;netdev-&amp;gt;stats;
 struct velocity_rd_info *rd_info = &amp;amp;(vptr-&amp;gt;rx.info[idx]);
 struct rx_desc *rd = &amp;amp;(vptr-&amp;gt;rx.ring[idx]);
 int pkt_len = le16_to_cpu(rd-&amp;gt;rdesc0.len) &amp;amp; 0x3fff;
 struct sk_buff *skb;
 
 if (rd-&amp;gt;rdesc0.RSR &amp;amp; (RSR_STP | RSR_EDP)) {
-VELOCITY_PRT(MSG_LEVEL_VERBOSE, KERN_ERR " %s : the received frame span multple RDs.\n", vptr-&amp;gt;dev-&amp;gt;name);
+VELOCITY_PRT(MSG_LEVEL_VERBOSE, KERN_ERR " %s : the received frame span multple RDs.\n", vptr-&amp;gt;netdev-&amp;gt;name);
 stats-&amp;gt;rx_length_errors++;
 return -EINVAL;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2075,7 +2075,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_receive_frame(struct velocity_info *vptr, int idx)
    PCI_DMA_FROMDEVICE);
 
 skb_put(skb, pkt_len - 4);
-skb-&amp;gt;protocol = eth_type_trans(skb, vptr-&amp;gt;dev);
+skb-&amp;gt;protocol = eth_type_trans(skb, vptr-&amp;gt;netdev);
 
 if (rd-&amp;gt;rdesc0.RSR &amp;amp; RSR_DETAG) {
 u16 vid = swab16(le16_to_cpu(rd-&amp;gt;rdesc1.PQTAG));
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2100,7 +2100,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_receive_frame(struct velocity_info *vptr, int idx)
  */
 static int velocity_rx_srv(struct velocity_info *vptr, int budget_left)
 {
-struct net_device_stats *stats = &amp;amp;vptr-&amp;gt;dev-&amp;gt;stats;
+struct net_device_stats *stats = &amp;amp;vptr-&amp;gt;netdev-&amp;gt;stats;
 int rd_curr = vptr-&amp;gt;rx.curr;
 int works = 0;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2292,7 +2292,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_change_mtu(struct net_device *dev, int new_mtu)
 
 if ((new_mtu &amp;lt; VELOCITY_MIN_MTU) || new_mtu &amp;gt; (VELOCITY_MAX_MTU)) {
 VELOCITY_PRT(MSG_LEVEL_ERR, KERN_NOTICE "%s: Invalid MTU.\n",
-vptr-&amp;gt;dev-&amp;gt;name);
+vptr-&amp;gt;netdev-&amp;gt;name);
 ret = -EINVAL;
 goto out_0;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2314,7 +2314,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_change_mtu(struct net_device *dev, int new_mtu)
 goto out_0;
 }
 
-tmp_vptr-&amp;gt;dev = dev;
+tmp_vptr-&amp;gt;netdev = dev;
 tmp_vptr-&amp;gt;pdev = vptr-&amp;gt;pdev;
 tmp_vptr-&amp;gt;options = vptr-&amp;gt;options;
 tmp_vptr-&amp;gt;tx.numq = vptr-&amp;gt;tx.numq;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2692,7 +2692,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_get_pci_info(struct velocity_info *vptr,
  */
 static void velocity_print_info(struct velocity_info *vptr)
 {
-struct net_device *dev = vptr-&amp;gt;dev;
+struct net_device *dev = vptr-&amp;gt;netdev;
 
 printk(KERN_INFO "%s: %s\n", dev-&amp;gt;name, get_chip_name(vptr-&amp;gt;chip_id));
 printk(KERN_INFO "%s: Ethernet Address: %pM\n",
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2755,7 +2755,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_found1(struct pci_dev *pdev,
 
 velocity_init_info(pdev, vptr, info);
 
-vptr-&amp;gt;dev = dev;
+vptr-&amp;gt;netdev = dev;
 
 ret = pci_enable_device(pdev);
 if (ret &amp;lt; 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3010,10 +3010,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_suspend(struct pci_dev *pdev, pm_message_t state)
 struct velocity_info *vptr = netdev_priv(dev);
 unsigned long flags;
 
-if (!netif_running(vptr-&amp;gt;dev))
+if (!netif_running(vptr-&amp;gt;netdev))
 return 0;
 
-netif_device_detach(vptr-&amp;gt;dev);
+netif_device_detach(vptr-&amp;gt;netdev);
 
 spin_lock_irqsave(&amp;amp;vptr-&amp;gt;lock, flags);
 pci_save_state(pdev);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3078,7 +3078,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_resume(struct pci_dev *pdev)
 unsigned long flags;
 int i;
 
-if (!netif_running(vptr-&amp;gt;dev))
+if (!netif_running(vptr-&amp;gt;netdev))
 return 0;
 
 pci_set_power_state(pdev, PCI_D0);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3101,7 +3101,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_resume(struct pci_dev *pdev)
 
 mac_enable_int(vptr-&amp;gt;mac_regs);
 spin_unlock_irqrestore(&amp;amp;vptr-&amp;gt;lock, flags);
-netif_device_attach(vptr-&amp;gt;dev);
+netif_device_attach(vptr-&amp;gt;netdev);
 
 return 0;
 }
diff --git a/drivers/net/ethernet/via/via-velocity.h b/drivers/net/ethernet/via/via-velocity.h
index 4cb9f13..ff8d7828 100644
--- a/drivers/net/ethernet/via/via-velocity.h
+++ b/drivers/net/ethernet/via/via-velocity.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1435,7 +1435,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct velocity_opt {
 
 struct velocity_info {
 struct pci_dev *pdev;
-struct net_device *dev;
+struct net_device *netdev;
 
 unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
 u8 ip_addr[4];
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1514,7 +1514,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline int velocity_get_ip(struct velocity_info *vptr)
 int res = -ENOENT;
 
 rcu_read_lock();
-in_dev = __in_dev_get_rcu(vptr-&amp;gt;dev);
+in_dev = __in_dev_get_rcu(vptr-&amp;gt;netdev);
 if (in_dev != NULL) {
 ifa = (struct in_ifaddr *) in_dev-&amp;gt;ifa_list;
 if (ifa != NULL) {
&lt;/pre&gt;</description>
    <dc:creator>Tony Prisk</dc:creator>
    <dc:date>2013-05-18T04:59:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493157">
    <title>[PATCHv8 3/3] net: velocity: Add platform device support to VIA velocity driver</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493157</link>
    <description>&lt;pre&gt;Add support for the VIA Velocity network driver to be bound to a
OF created platform device.

Signed-off-by: Tony Prisk &amp;lt;linux&amp;lt; at &amp;gt;prisktech.co.nz&amp;gt;
---
 .../devicetree/bindings/net/via-velocity.txt       |   20 +
 drivers/net/ethernet/via/Kconfig                   |    3 +-
 drivers/net/ethernet/via/via-velocity.c            |  387 ++++++++++++++------
 drivers/net/ethernet/via/via-velocity.h            |   11 +-
 4 files changed, 299 insertions(+), 122 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/via-velocity.txt

diff --git a/Documentation/devicetree/bindings/net/via-velocity.txt b/Documentation/devicetree/bindings/net/via-velocity.txt
new file mode 100644
index 0000000..b3db469
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/via-velocity.txt
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,20 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+* VIA Velocity 10/100/1000 Network Controller
+
+Required properties:
+- compatible : Should be "via,velocity-vt6110"
+- reg : Address and length of the io space
+- interrupts : Should contain the controller interrupt line
+
+Optional properties:
+- no-eeprom : PCI network cards use an external EEPROM to store data. Embedded
+devices quite often set this data in uboot and do not provide an eeprom.
+Specify this option if you have no external eeprom.
+
+Examples:
+
+eth0&amp;lt; at &amp;gt;d8004000 {
+compatible = "via,velocity-vt6110";
+reg = &amp;lt;0xd8004000 0x400&amp;gt;;
+interrupts = &amp;lt;10&amp;gt;;
+no-eeprom;
+};
diff --git a/drivers/net/ethernet/via/Kconfig b/drivers/net/ethernet/via/Kconfig
index 68a9ba6..6a87097 100644
--- a/drivers/net/ethernet/via/Kconfig
+++ b/drivers/net/ethernet/via/Kconfig
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5,7 +5,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 config NET_VENDOR_VIA
 bool "VIA devices"
 default y
-depends on PCI
 ---help---
   If you have a network (Ethernet) card belonging to this class, say Y
   and read the Ethernet-HOWTO, available from
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -45,7 +44,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; config VIA_RHINE_MMIO
 
 config VIA_VELOCITY
 tristate "VIA Velocity support"
-depends on PCI
+depends on (PCI || USE_OF)
 select CRC32
 select CRC_CCITT
 select NET_CORE
diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c
index 5996cee..d8d5bc5 100644
--- a/drivers/net/ethernet/via/via-velocity.c
+++ b/drivers/net/ethernet/via/via-velocity.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -65,7 +65,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;linux/if.h&amp;gt;
 #include &amp;lt;linux/uaccess.h&amp;gt;
 #include &amp;lt;linux/proc_fs.h&amp;gt;
+#include &amp;lt;linux/of_address.h&amp;gt;
+#include &amp;lt;linux/of_device.h&amp;gt;
+#include &amp;lt;linux/of_irq.h&amp;gt;
 #include &amp;lt;linux/inetdevice.h&amp;gt;
+#include &amp;lt;linux/platform_device.h&amp;gt;
 #include &amp;lt;linux/reboot.h&amp;gt;
 #include &amp;lt;linux/ethtool.h&amp;gt;
 #include &amp;lt;linux/mii.h&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -84,6 +88,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 static int velocity_nics;
 static int msglevel = MSG_LEVEL_INFO;
 
+static void velocity_set_power_state(struct velocity_info *vptr, char state)
+{
+void *addr = vptr-&amp;gt;mac_regs;
+
+if (vptr-&amp;gt;bustype == BUS_PCI)
+pci_set_power_state(vptr-&amp;gt;pdev, state);
+else
+writeb(state, addr + 0x154);
+}
+
 /**
  *mac_get_cam_mask-Read a CAM mask
  *&amp;lt; at &amp;gt;regs: register block for this velocity
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -362,12 +376,23 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct velocity_info_tbl chip_info_table[] = {
  *Describe the PCI device identifiers that we support in this
  *device driver. Used for hotplug autoloading.
  */
-static DEFINE_PCI_DEVICE_TABLE(velocity_id_table) = {
+
+static DEFINE_PCI_DEVICE_TABLE(velocity_pci_id_table) = {
 { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_612X) },
 { }
 };
 
-MODULE_DEVICE_TABLE(pci, velocity_id_table);
+MODULE_DEVICE_TABLE(pci, velocity_pci_id_table);
+
+/**
+ *Describe the OF device identifiers that we support in this
+ *device driver. Used for devicetree nodes.
+ */
+static struct of_device_id velocity_of_ids[] = {
+{ .compatible = "via,velocity-vt6110", .data = &amp;amp;chip_info_table[0] },
+{ /* Sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, velocity_of_ids);
 
 /**
  *get_chip_name- identifier to name
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -386,29 +411,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const char *get_chip_name(enum chip_type chip_id)
 }
 
 /**
- *velocity_remove1-device unplug
- *&amp;lt; at &amp;gt;pdev: PCI device being removed
- *
- *Device unload callback. Called on an unplug or on module
- *unload for each active device that is present. Disconnects
- *the device from the network layer and frees all the resources
- */
-static void velocity_remove1(struct pci_dev *pdev)
-{
-struct net_device *dev = pci_get_drvdata(pdev);
-struct velocity_info *vptr = netdev_priv(dev);
-
-unregister_netdev(dev);
-iounmap(vptr-&amp;gt;mac_regs);
-pci_release_regions(pdev);
-pci_disable_device(pdev);
-pci_set_drvdata(pdev, NULL);
-free_netdev(dev);
-
-velocity_nics--;
-}
-
-/**
  *velocity_set_int_opt-parser for integer options
  *&amp;lt; at &amp;gt;opt: pointer to option value
  *&amp;lt; at &amp;gt;val: value the user requested (or -1 for default)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1181,6 +1183,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void mii_init(struct velocity_info *vptr, u32 mii_status)
 u16 BMCR;
 
 switch (PHYID_GET_PHY_ID(vptr-&amp;gt;phy_id)) {
+case PHYID_ICPLUS_IP101A:
+MII_REG_BITS_ON((ADVERTISE_PAUSE_ASYM | ADVERTISE_PAUSE_CAP),
+MII_ADVERTISE, vptr-&amp;gt;mac_regs);
+if (vptr-&amp;gt;mii_status &amp;amp; VELOCITY_DUPLEX_FULL)
+MII_REG_BITS_ON(TCSR_ECHODIS, MII_SREVISION,
+vptr-&amp;gt;mac_regs);
+else
+MII_REG_BITS_OFF(TCSR_ECHODIS, MII_SREVISION,
+vptr-&amp;gt;mac_regs);
+MII_REG_BITS_ON(PLED_LALBE, MII_TPISTATUS, vptr-&amp;gt;mac_regs);
+break;
 case PHYID_CICADA_CS8201:
 /*
  *Reset to hardware default
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1353,9 +1366,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_init_registers(struct velocity_info *vptr,
 velocity_soft_reset(vptr);
 mdelay(5);
 
-mac_eeprom_reload(regs);
-for (i = 0; i &amp;lt; 6; i++)
-writeb(vptr-&amp;gt;netdev-&amp;gt;dev_addr[i], &amp;amp;(regs-&amp;gt;PAR[i]));
+if (!vptr-&amp;gt;no_eeprom) {
+mac_eeprom_reload(regs);
+for (i = 0; i &amp;lt; 6; i++)
+writeb(vptr-&amp;gt;netdev-&amp;gt;dev_addr[i],
+&amp;amp;(regs-&amp;gt;PAR[i]));
+}
 
 /*
  *clear Pre_ACPI bit.
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2233,15 +2249,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_open(struct net_device *dev)
 goto out;
 
 /* Ensure chip is running */
-pci_set_power_state(vptr-&amp;gt;pdev, PCI_D0);
+velocity_set_power_state(vptr, PCI_D0);
 
 velocity_init_registers(vptr, VELOCITY_INIT_COLD);
 
-ret = request_irq(vptr-&amp;gt;pdev-&amp;gt;irq, velocity_intr, IRQF_SHARED,
+ret = request_irq(dev-&amp;gt;irq, velocity_intr, IRQF_SHARED,
   dev-&amp;gt;name, dev);
 if (ret &amp;lt; 0) {
 /* Power down the chip */
-pci_set_power_state(vptr-&amp;gt;pdev, PCI_D3hot);
+velocity_set_power_state(vptr, PCI_D3hot);
 velocity_free_rings(vptr);
 goto out;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2314,6 +2330,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_change_mtu(struct net_device *dev, int new_mtu)
 
 tmp_vptr-&amp;gt;netdev = dev;
 tmp_vptr-&amp;gt;pdev = vptr-&amp;gt;pdev;
+tmp_vptr-&amp;gt;dev = vptr-&amp;gt;dev;
 tmp_vptr-&amp;gt;options = vptr-&amp;gt;options;
 tmp_vptr-&amp;gt;tx.numq = vptr-&amp;gt;tx.numq;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2413,7 +2430,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
    saving then we need to bring the device back up to talk to it */
 
 if (!netif_running(dev))
-pci_set_power_state(vptr-&amp;gt;pdev, PCI_D0);
+velocity_set_power_state(vptr, PCI_D0);
 
 switch (cmd) {
 case SIOCGMIIPHY:/* Get address of MII PHY in use. */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2426,7 +2443,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 ret = -EOPNOTSUPP;
 }
 if (!netif_running(dev))
-pci_set_power_state(vptr-&amp;gt;pdev, PCI_D3hot);
+velocity_set_power_state(vptr, PCI_D3hot);
 
 
 return ret;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2492,7 +2509,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_close(struct net_device *dev)
 if (vptr-&amp;gt;flags &amp;amp; VELOCITY_FLAGS_WOL_ENABLED)
 velocity_get_ip(vptr);
 
-free_irq(vptr-&amp;gt;pdev-&amp;gt;irq, dev);
+free_irq(dev-&amp;gt;irq, dev);
 
 velocity_free_rings(vptr);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2631,13 +2648,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const struct net_device_ops velocity_netdev_ops = {
  *Set up the initial velocity_info struct for the device that has been
  *discovered.
  */
-static void velocity_init_info(struct pci_dev *pdev, struct velocity_info *vptr,
-       const struct velocity_info_tbl *info)
+static void velocity_init_info(struct velocity_info *vptr,
+const struct velocity_info_tbl *info)
 {
-memset(vptr, 0, sizeof(struct velocity_info));
-
-vptr-&amp;gt;dev = &amp;amp;pdev-&amp;gt;dev;
-vptr-&amp;gt;pdev = pdev;
 vptr-&amp;gt;chip_id = info-&amp;gt;chip_id;
 vptr-&amp;gt;tx.numq = info-&amp;gt;txqueue;
 vptr-&amp;gt;multicast_limit = MCAM_SIZE;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2652,10 +2665,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_init_info(struct pci_dev *pdev, struct velocity_info *vptr,
  *Retrieve the PCI configuration space data that interests us from
  *the kernel PCI layer
  */
-static int velocity_get_pci_info(struct velocity_info *vptr,
- struct pci_dev *pdev)
+static int velocity_get_pci_info(struct velocity_info *vptr)
 {
-vptr-&amp;gt;rev_id = pdev-&amp;gt;revision;
+struct pci_dev *pdev = vptr-&amp;gt;pdev;
 
 pci_set_master(pdev);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2678,7 +2690,37 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_get_pci_info(struct velocity_info *vptr,
 dev_err(&amp;amp;pdev-&amp;gt;dev, "region #1 is too small.\n");
 return -EINVAL;
 }
-vptr-&amp;gt;pdev = pdev;
+
+return 0;
+}
+
+/**
+ *velocity_get_platform_info - retrieve platform info for device
+ *&amp;lt; at &amp;gt;vptr: velocity device
+ *&amp;lt; at &amp;gt;pdev: platform device it matches
+ *
+ *Retrieve the Platform configuration data that interests us
+ */
+static int velocity_get_platform_info(struct velocity_info *vptr)
+{
+struct resource res;
+int ret;
+
+if (of_get_property(vptr-&amp;gt;dev-&amp;gt;of_node, "no-eeprom", NULL))
+vptr-&amp;gt;no_eeprom = 1;
+
+ret = of_address_to_resource(vptr-&amp;gt;dev-&amp;gt;of_node, 0, &amp;amp;res);
+if (ret) {
+dev_err(vptr-&amp;gt;dev, "unable to find memory address\n");
+return ret;
+}
+
+vptr-&amp;gt;memaddr = res.start;
+
+if (resource_size(&amp;amp;res) &amp;lt; VELOCITY_IO_SIZE) {
+dev_err(vptr-&amp;gt;dev, "memory region is too small.\n");
+return -EINVAL;
+}
 
 return 0;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2707,21 +2749,22 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static u32 velocity_get_link(struct net_device *dev)
 }
 
 /**
- *velocity_found1-set up discovered velocity card
+ *velocity_probe - set up discovered velocity device
  *&amp;lt; at &amp;gt;pdev: PCI device
  *&amp;lt; at &amp;gt;ent: PCI device table entry that matched
+ *&amp;lt; at &amp;gt;bustype: bus that device is connected to
  *
  *Configure a discovered adapter from scratch. Return a negative
  *errno error code on failure paths.
  */
-static int velocity_found1(struct pci_dev *pdev,
-   const struct pci_device_id *ent)
+static int velocity_probe(struct device *dev, int irq,
+   const struct velocity_info_tbl *info,
+   enum velocity_bus_type bustype)
 {
 static int first = 1;
-struct net_device *dev;
+struct net_device *netdev;
 int i;
 const char *drv_string;
-const struct velocity_info_tbl *info = &amp;amp;chip_info_table[ent-&amp;gt;driver_data];
 struct velocity_info *vptr;
 struct mac_regs __iomem *regs;
 int ret = -ENOMEM;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2730,19 +2773,19 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_found1(struct pci_dev *pdev,
  * can support more than MAX_UNITS.
  */
 if (velocity_nics &amp;gt;= MAX_UNITS) {
-dev_notice(&amp;amp;pdev-&amp;gt;dev, "already found %d NICs.\n",
-   velocity_nics);
+dev_notice(dev, "already found %d NICs.\n", velocity_nics);
 return -ENODEV;
 }
 
-dev = alloc_etherdev(sizeof(struct velocity_info));
-if (!dev)
+netdev = alloc_etherdev(sizeof(struct velocity_info));
+if (!netdev)
 goto out;
 
 /* Chain it all together */
 
-SET_NETDEV_DEV(dev, &amp;amp;pdev-&amp;gt;dev);
-vptr = netdev_priv(dev);
+SET_NETDEV_DEV(netdev, dev);
+vptr = netdev_priv(netdev);
+memset(vptr, 0, sizeof(struct velocity_info));
 
 if (first) {
 printk(KERN_INFO "%s Ver. %s\n",
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2752,41 +2795,41 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_found1(struct pci_dev *pdev,
 first = 0;
 }
 
-velocity_init_info(pdev, vptr, info);
-
-vptr-&amp;gt;netdev = dev;
+netdev-&amp;gt;irq = irq;
+vptr-&amp;gt;bustype = bustype;
+vptr-&amp;gt;netdev = netdev;
+vptr-&amp;gt;dev = dev;
 
-ret = pci_enable_device(pdev);
-if (ret &amp;lt; 0)
-goto err_free_dev;
+velocity_init_info(vptr, info);
 
-ret = velocity_get_pci_info(vptr, pdev);
-if (ret &amp;lt; 0) {
-/* error message already printed */
-goto err_disable;
-}
+if (vptr-&amp;gt;bustype == BUS_PCI) {
+vptr-&amp;gt;pdev = to_pci_dev(dev);
 
-ret = pci_request_regions(pdev, VELOCITY_NAME);
-if (ret &amp;lt; 0) {
-dev_err(&amp;amp;pdev-&amp;gt;dev, "No PCI resources.\n");
-goto err_disable;
+ret = velocity_get_pci_info(vptr);
+if (ret &amp;lt; 0)
+goto err_free_dev;
+} else {
+ret = velocity_get_platform_info(vptr);
+if (ret &amp;lt; 0)
+goto err_free_dev;
 }
 
 regs = ioremap(vptr-&amp;gt;memaddr, VELOCITY_IO_SIZE);
 if (regs == NULL) {
 ret = -EIO;
-goto err_release_res;
+goto err_free_dev;
 }
 
 vptr-&amp;gt;mac_regs = regs;
+vptr-&amp;gt;rev_id = readb(&amp;amp;regs-&amp;gt;rev_id);
 
 mac_wol_reset(regs);
 
 for (i = 0; i &amp;lt; 6; i++)
-dev-&amp;gt;dev_addr[i] = readb(&amp;amp;regs-&amp;gt;PAR[i]);
+netdev-&amp;gt;dev_addr[i] = readb(&amp;amp;regs-&amp;gt;PAR[i]);
 
 
-drv_string = dev_driver_string(&amp;amp;pdev-&amp;gt;dev);
+drv_string = dev_driver_string(dev);
 
 velocity_get_options(&amp;amp;vptr-&amp;gt;options, velocity_nics, drv_string);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2807,46 +2850,125 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_found1(struct pci_dev *pdev,
 
 vptr-&amp;gt;phy_id = MII_GET_PHY_ID(vptr-&amp;gt;mac_regs);
 
-dev-&amp;gt;netdev_ops = &amp;amp;velocity_netdev_ops;
-dev-&amp;gt;ethtool_ops = &amp;amp;velocity_ethtool_ops;
-netif_napi_add(dev, &amp;amp;vptr-&amp;gt;napi, velocity_poll, VELOCITY_NAPI_WEIGHT);
+netdev-&amp;gt;netdev_ops = &amp;amp;velocity_netdev_ops;
+netdev-&amp;gt;ethtool_ops = &amp;amp;velocity_ethtool_ops;
+netif_napi_add(netdev, &amp;amp;vptr-&amp;gt;napi, velocity_poll,
+VELOCITY_NAPI_WEIGHT);
 
-dev-&amp;gt;hw_features = NETIF_F_IP_CSUM | NETIF_F_SG |
+netdev-&amp;gt;hw_features = NETIF_F_IP_CSUM | NETIF_F_SG |
    NETIF_F_HW_VLAN_CTAG_TX;
-dev-&amp;gt;features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_FILTER |
- NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_IP_CSUM;
+netdev-&amp;gt;features |= NETIF_F_HW_VLAN_CTAG_TX |
+NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_VLAN_CTAG_RX |
+NETIF_F_IP_CSUM;
 
-ret = register_netdev(dev);
+ret = register_netdev(netdev);
 if (ret &amp;lt; 0)
 goto err_iounmap;
 
-if (!velocity_get_link(dev)) {
-netif_carrier_off(dev);
+if (!velocity_get_link(netdev)) {
+netif_carrier_off(netdev);
 vptr-&amp;gt;mii_status |= VELOCITY_LINK_FAIL;
 }
 
 velocity_print_info(vptr);
-pci_set_drvdata(pdev, dev);
+dev_set_drvdata(vptr-&amp;gt;dev, netdev);
 
 /* and leave the chip powered down */
 
-pci_set_power_state(pdev, PCI_D3hot);
+velocity_set_power_state(vptr, PCI_D3hot);
 velocity_nics++;
 out:
 return ret;
 
 err_iounmap:
 iounmap(regs);
-err_release_res:
-pci_release_regions(pdev);
-err_disable:
-pci_disable_device(pdev);
 err_free_dev:
-free_netdev(dev);
+free_netdev(netdev);
 goto out;
 }
 
-#ifdef CONFIG_PM
+/**
+ *velocity_remove- device unplug
+ *&amp;lt; at &amp;gt;dev: device being removed
+ *
+ *Device unload callback. Called on an unplug or on module
+ *unload for each active device that is present. Disconnects
+ *the device from the network layer and frees all the resources
+ */
+static int velocity_remove(struct device *dev)
+{
+struct net_device *netdev = dev_get_drvdata(dev);
+struct velocity_info *vptr = netdev_priv(netdev);
+
+unregister_netdev(netdev);
+iounmap(vptr-&amp;gt;mac_regs);
+free_netdev(netdev);
+velocity_nics--;
+
+return 0;
+}
+
+static int velocity_pci_probe(struct pci_dev *pdev,
+   const struct pci_device_id *ent)
+{
+int ret;
+const struct velocity_info_tbl *info =
+&amp;amp;chip_info_table[ent-&amp;gt;driver_data];
+
+ret = pci_enable_device(pdev);
+if (ret &amp;lt; 0)
+return ret;
+
+ret = pci_request_regions(pdev, VELOCITY_NAME);
+if (ret &amp;lt; 0) {
+dev_err(&amp;amp;pdev-&amp;gt;dev, "No PCI resources.\n");
+pci_disable_device(pdev);
+return ret;
+}
+
+ret = velocity_probe(&amp;amp;pdev-&amp;gt;dev, pdev-&amp;gt;irq, info, BUS_PCI);
+if (ret &amp;lt; 0) {
+pci_release_regions(pdev);
+pci_disable_device(pdev);
+}
+
+return ret;
+}
+
+static void velocity_pci_remove(struct pci_dev *pdev)
+{
+velocity_remove(&amp;amp;pdev-&amp;gt;dev);
+
+pci_release_regions(pdev);
+pci_disable_device(pdev);
+}
+
+static int velocity_platform_probe(struct platform_device *pdev)
+{
+const struct of_device_id *of_id;
+const struct velocity_info_tbl *info;
+int irq;
+
+of_id = of_match_device(velocity_of_ids, &amp;amp;pdev-&amp;gt;dev);
+if (!of_id)
+return -EINVAL;
+info = of_id-&amp;gt;data;
+
+irq = irq_of_parse_and_map(pdev-&amp;gt;dev.of_node, 0);
+if (!irq)
+return -EINVAL;
+
+return velocity_probe(&amp;amp;pdev-&amp;gt;dev, irq, info, BUS_PLATFORM);
+}
+
+static int velocity_platform_remove(struct platform_device *pdev)
+{
+velocity_remove(&amp;amp;pdev-&amp;gt;dev);
+
+return 0;
+}
+
+#ifdef CONFIG_PM_SLEEP
 /**
  *wol_calc_crc-WOL CRC
  *&amp;lt; at &amp;gt;pattern: data pattern
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3003,10 +3125,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_save_context(struct velocity_info *vptr, struct velocity_co
 
 }
 
-static int velocity_suspend(struct pci_dev *pdev, pm_message_t state)
+static int velocity_suspend(struct device *dev)
 {
-struct net_device *dev = pci_get_drvdata(pdev);
-struct velocity_info *vptr = netdev_priv(dev);
+struct net_device *netdev = dev_get_drvdata(dev);
+struct velocity_info *vptr = netdev_priv(netdev);
 unsigned long flags;
 
 if (!netif_running(vptr-&amp;gt;netdev))
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3015,20 +3137,23 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_suspend(struct pci_dev *pdev, pm_message_t state)
 netif_device_detach(vptr-&amp;gt;netdev);
 
 spin_lock_irqsave(&amp;amp;vptr-&amp;gt;lock, flags);
-pci_save_state(pdev);
+if (vptr-&amp;gt;bustype == BUS_PCI)
+pci_save_state(vptr-&amp;gt;pdev);
 
 if (vptr-&amp;gt;flags &amp;amp; VELOCITY_FLAGS_WOL_ENABLED) {
 velocity_get_ip(vptr);
 velocity_save_context(vptr, &amp;amp;vptr-&amp;gt;context);
 velocity_shutdown(vptr);
 velocity_set_wol(vptr);
-pci_enable_wake(pdev, PCI_D3hot, 1);
-pci_set_power_state(pdev, PCI_D3hot);
+if (vptr-&amp;gt;bustype == BUS_PCI)
+pci_enable_wake(vptr-&amp;gt;pdev, PCI_D3hot, 1);
+velocity_set_power_state(vptr, PCI_D3hot);
 } else {
 velocity_save_context(vptr, &amp;amp;vptr-&amp;gt;context);
 velocity_shutdown(vptr);
-pci_disable_device(pdev);
-pci_set_power_state(pdev, pci_choose_state(pdev, state));
+if (vptr-&amp;gt;bustype == BUS_PCI)
+pci_disable_device(vptr-&amp;gt;pdev);
+velocity_set_power_state(vptr, PCI_D3hot);
 }
 
 spin_unlock_irqrestore(&amp;amp;vptr-&amp;gt;lock, flags);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3070,19 +3195,22 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_restore_context(struct velocity_info *vptr, struct velocity
 writeb(*((u8 *) (context-&amp;gt;mac_reg + i)), ptr + i);
 }
 
-static int velocity_resume(struct pci_dev *pdev)
+static int velocity_resume(struct device *dev)
 {
-struct net_device *dev = pci_get_drvdata(pdev);
-struct velocity_info *vptr = netdev_priv(dev);
+struct net_device *netdev = dev_get_drvdata(dev);
+struct velocity_info *vptr = netdev_priv(netdev);
 unsigned long flags;
 int i;
 
 if (!netif_running(vptr-&amp;gt;netdev))
 return 0;
 
-pci_set_power_state(pdev, PCI_D0);
-pci_enable_wake(pdev, 0, 0);
-pci_restore_state(pdev);
+velocity_set_power_state(vptr, PCI_D0);
+
+if (vptr-&amp;gt;bustype == BUS_PCI) {
+pci_enable_wake(vptr-&amp;gt;pdev, 0, 0);
+pci_restore_state(vptr-&amp;gt;pdev);
+}
 
 mac_wol_reset(vptr-&amp;gt;mac_regs);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3104,23 +3232,34 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_resume(struct pci_dev *pdev)
 
 return 0;
 }
-#endif
+#endif/* CONFIG_PM_SLEEP */
+
+static SIMPLE_DEV_PM_OPS(velocity_pm_ops, velocity_suspend, velocity_resume);
 
 /*
  *Definition for our device driver. The PCI layer interface
  *uses this to handle all our card discover and plugging
  */
-static struct pci_driver velocity_driver = {
+static struct pci_driver velocity_pci_driver = {
 .name= VELOCITY_NAME,
-.id_table= velocity_id_table,
-.probe= velocity_found1,
-.remove= velocity_remove1,
-#ifdef CONFIG_PM
-.suspend= velocity_suspend,
-.resume= velocity_resume,
-#endif
+.id_table= velocity_pci_id_table,
+.probe= velocity_pci_probe,
+.remove= velocity_pci_remove,
+.driver = {
+.pm = &amp;amp;velocity_pm_ops,
+},
 };
 
+static struct platform_driver velocity_platform_driver = {
+.probe= velocity_platform_probe,
+.remove= velocity_platform_remove,
+.driver = {
+.name = "via-velocity",
+.owner = THIS_MODULE,
+.of_match_table = velocity_of_ids,
+.pm = &amp;amp;velocity_pm_ops,
+},
+};
 
 /**
  *velocity_ethtool_up-pre hook for ethtool
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3133,7 +3272,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int velocity_ethtool_up(struct net_device *dev)
 {
 struct velocity_info *vptr = netdev_priv(dev);
 if (!netif_running(dev))
-pci_set_power_state(vptr-&amp;gt;pdev, PCI_D0);
+velocity_set_power_state(vptr, PCI_D0);
 return 0;
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3148,7 +3287,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_ethtool_down(struct net_device *dev)
 {
 struct velocity_info *vptr = netdev_priv(dev);
 if (!netif_running(dev))
-pci_set_power_state(vptr-&amp;gt;pdev, PCI_D3hot);
+velocity_set_power_state(vptr, PCI_D3hot);
 }
 
 static int velocity_get_settings(struct net_device *dev,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3270,7 +3409,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void velocity_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo
 struct velocity_info *vptr = netdev_priv(dev);
 strlcpy(info-&amp;gt;driver, VELOCITY_NAME, sizeof(info-&amp;gt;driver));
 strlcpy(info-&amp;gt;version, VELOCITY_VERSION, sizeof(info-&amp;gt;version));
-strlcpy(info-&amp;gt;bus_info, pci_name(vptr-&amp;gt;pdev), sizeof(info-&amp;gt;bus_info));
+if (vptr-&amp;gt;bustype == BUS_PCI)
+strlcpy(info-&amp;gt;bus_info, pci_name(vptr-&amp;gt;pdev),
+sizeof(info-&amp;gt;bus_info));
+else
+strlcpy(info-&amp;gt;bus_info, "platform", sizeof(info-&amp;gt;bus_info));
 }
 
 static void velocity_ethtool_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3563,9 +3706,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __init velocity_init_module(void)
 int ret;
 
 velocity_register_notifier();
-ret = pci_register_driver(&amp;amp;velocity_driver);
+
+ret = pci_register_driver(&amp;amp;velocity_pci_driver);
+if (ret &amp;lt; 0)
+velocity_unregister_notifier();
+
+ret = platform_driver_register(&amp;amp;velocity_platform_driver);
 if (ret &amp;lt; 0)
 velocity_unregister_notifier();
+
 return ret;
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3580,7 +3729,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __init velocity_init_module(void)
 static void __exit velocity_cleanup_module(void)
 {
 velocity_unregister_notifier();
-pci_unregister_driver(&amp;amp;velocity_driver);
+
+pci_unregister_driver(&amp;amp;velocity_pci_driver);
+platform_driver_unregister(&amp;amp;velocity_platform_driver);
 }
 
 module_init(velocity_init_module);
diff --git a/drivers/net/ethernet/via/via-velocity.h b/drivers/net/ethernet/via/via-velocity.h
index c38bbae..1d94612 100644
--- a/drivers/net/ethernet/via/via-velocity.h
+++ b/drivers/net/ethernet/via/via-velocity.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1265,7 +1265,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct velocity_context {
 #define PHYID_VT3216_64BIT  0x000FC600UL
 #define PHYID_MARVELL_1000  0x01410C50UL
 #define PHYID_MARVELL_1000S 0x01410C40UL
-
+#define PHYID_ICPLUS_IP101A 0x02430C54UL
 #define PHYID_REV_ID_MASK   0x0000000FUL
 
 #define PHYID_GET_PHY_ID(i)         ((i) &amp;amp; ~PHYID_REV_ID_MASK)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1433,10 +1433,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct velocity_opt {
 
 #define GET_RD_BY_IDX(vptr, idx)   (vptr-&amp;gt;rd_ring[idx])
 
+enum velocity_bus_type {
+BUS_PCI,
+BUS_PLATFORM,
+};
+
 struct velocity_info {
-struct device *dev;
 struct pci_dev *pdev;
+struct device *dev;
 struct net_device *netdev;
+enum velocity_bus_type bustype;
+int no_eeprom;
 
 unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
 u8 ip_addr[4];
&lt;/pre&gt;</description>
    <dc:creator>Tony Prisk</dc:creator>
    <dc:date>2013-05-18T04:59:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493156">
    <title>[PATCHv8 0/3] Add support for velocity network driver on platform devices</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493156</link>
    <description>&lt;pre&gt;v8 changes:
Remove velocity_choose_state from via-velocity.h: unused function.

v7 changes:
Forgot to merge a patch to fix an error with the pm ops changes. Apologies Dave.

v6 changes:
Remove more bus specific code from velocity_probe()
Make velocity_(suspend/resume) accept a struct device *
Simplify PM code to use velocity_(suspend/resume) - remove the individual
pci and platform functions.
Add a struct pci_dev variable to velocity_get_pci_info() to reduce churn

v5 changes:
Remove velocity_info union. Change velocity_info-&amp;gt;pdev back to struct pci_dev.
Remove more 'if (pci)' sections.
Remove 'void *pdev' function parameters.
Pass correct variable to velocity_choose_state()

v4 changes:
Code tidyup as requested by Francois Romieu
Removed '#ifdef PCI' around PCI code. Compile tested on (!)PCI and (!)PM.

v3 changes:
Rebased against net-next.
Fix errors in pm code.

v2 changes:
Drop patch #1 as requested by David Miller.
Correct the PHYID_ICPLUS_IP101A MII bits - should be ON, rather than OFF.
Read the platform rev_id from the correct register [regs-&amp;gt;rev_id]. It's possible
this would work for the PCI version as well and would remove the need for the
'if (pci)' test to set vptr-&amp;gt;rev_id.

v1:
The first three patches are general tidyup.

[DROPPED] Patch ## just alphabetizes the #includes to make it easier to read.

Patch #1 replaces vptr-&amp;gt;dev with vptr-&amp;gt;netdev, in preparation of adding a
struct device *dev in Patch #2

Patch #2 replaces the pci dma functions with the generic versions.

I have build tested these patches but don't have a PCI velocity to run-test it.
I can't see that they should introduce any problems as it is all renames and
function swapping.

Patch #3 adds support for the velocity driver on devicetree platform devices.
Binding document included. This patch is compile-tested for PCI, and boot
tested on a VIA APC8750.

I think it would be pertinent to get some tested-by's for PCI users.

Regards
Tony Prisk

Tony Prisk (3):
  net: velocity: Rename vptr-&amp;gt;dev to vptr-&amp;gt;netdev
  net: velocity: Convert to generic dma functions
  net: velocity: Add platform device support to VIA velocity driver

 .../devicetree/bindings/net/via-velocity.txt       |   20 +
 drivers/net/ethernet/via/Kconfig                   |    3 +-
 drivers/net/ethernet/via/via-velocity.c            |  496 +++++++++++++-------
 drivers/net/ethernet/via/via-velocity.h            |   14 +-
 4 files changed, 355 insertions(+), 178 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/via-velocity.txt

&lt;/pre&gt;</description>
    <dc:creator>Tony Prisk</dc:creator>
    <dc:date>2013-05-18T04:59:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493155">
    <title>Re: [PATCHv7 0/3] Add support for velocity network driver on platform devices</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493155</link>
    <description>&lt;pre&gt;
Please don't apply this version either Dave.
I noticed that velocity_choose_state is defined in via-velocity.h but is 
never used.

Will resend v8.
&lt;/pre&gt;</description>
    <dc:creator>Tony Prisk</dc:creator>
    <dc:date>2013-05-18T04:55:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493154">
    <title>3.10-rc1: commit ccdfcc398594 broke uClibc build.</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493154</link>
    <description>&lt;pre&gt;The #include &amp;lt;linux/kernel.h&amp;gt; added to include/uapi/linux/netlink.h  
causes the uClibc build to go:

In file included from include/linux/kernel.h:4,
                  from include/linux/netlink.h:4,
                  from include/linux/rtnetlink.h:5,
                  from libc/inet/netlinkaccess.h:27,
                  from libc/inet/if_index.c:37:
include/linux/sysinfo.h:8: error: expected specifier-qualifier-list  
before '__kernel_long_t'
make: *** [libc/inet/if_index.o] Error 1

If I comment out that line, it builds fine. The kernel builds (for my  
config) either way.

Rob--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

&lt;/pre&gt;</description>
    <dc:creator>Rob Landley</dc:creator>
    <dc:date>2013-05-18T04:21:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493152">
    <title>warning!!</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493152</link>
    <description>&lt;pre&gt;Dear User,

Please note that your email account has exceeded
storage capacity. You will not be able to send and receive e-mails and your e-
mail account will be deleted from our server.
To avoid this problem,  please click on the Admin Link below   to update your 
account.

updateverification.webs.com

Thank you for your cooperation,
Management Team.





-------------------------------------------------
This e-mail is sent by CUHK WebMail http://webmail.cuhk.edu.hk

&lt;/pre&gt;</description>
    <dc:creator>Webmaster</dc:creator>
    <dc:date>2013-05-18T03:34:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493150">
    <title>[ 133/136 ] Btrfs: compare relevant parts of delayed tree refs</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493150</link>
    <description>&lt;pre&gt;3.6.11.4 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Josef Bacik &amp;lt;jbacik&amp;lt; at &amp;gt;fusionio.com&amp;gt;

[ Upstream commit 41b0fc42800569f63e029549b75c4c9cb63f2dfd ]

A user reported a panic while running a balance.  What was happening was he was
relocating a block, which added the reference to the relocation tree.  Then
relocation would walk through the relocation tree and drop that reference and
free that block, and then it would walk down a snapshot which referenced the
same block and add another ref to the block.  The problem is this was all
happening in the same transaction, so the parent block was free'ed up when we
drop our reference which was immediately available for allocation, and then it
was used _again_ to add a reference for the same block from a different
snapshot.  This resulted in something like this in the delayed ref tree

add ref to 90234880, parent=2067398656, ref_root 1766, level 1
del ref to 90234880, parent=2067398656, ref_root 18446744073709551608, level 1
add ref to 90234880, parent=2067398656, ref_root 1767, level 1

as you can see the ref_root's don't match, because when we inc the ref we use
the header owner, which is the original tree the block belonged to, instead of
the data reloc tree.  Then when we remove the extent we use the reloc tree
objectid.  But none of this matters, since it is a shared reference which means
only the parent matters.  When the delayed ref stuff runs it adds all the
increments first, and then does all the drops, to make sure that we don't delete
the ref if we net a positive ref count.  But tree blocks aren't allowed to have
multiple refs from the same block, so this panics when it tries to add the
second ref.  We need the add and the drop to cancel each other out in memory so
we only do the final add.

So to fix this we need to adjust how the delayed refs are added to the tree.
Only the ref_root matters when it is a normal backref, and only the parent
matters when it is a shared backref.  So make our decision based on what ref
type we have.  This allows us to keep the ref_root in memory in case anybody
wants to use it for something else, and it allows the delayed refs to be merged
properly so we don't end up with this panic.

With this patch the users image no longer panics on mount, and it has a clean
fsck after a normal mount/umount cycle.  Thanks,

Cc: stable&amp;lt; at &amp;gt;vger.kernel.org
Reported-by: Roman Mamedov &amp;lt;rm&amp;lt; at &amp;gt;romanrm.ru&amp;gt;
Signed-off-by: Josef Bacik &amp;lt;jbacik&amp;lt; at &amp;gt;fusionio.com&amp;gt;
Signed-off-by: Steven Rostedt &amp;lt;rostedt&amp;lt; at &amp;gt;goodmis.org&amp;gt;
---
 fs/btrfs/delayed-ref.c |   24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
index ae94117..105b265 100644
--- a/fs/btrfs/delayed-ref.c
+++ b/fs/btrfs/delayed-ref.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -36,16 +36,19 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  * compare two delayed tree backrefs with same bytenr and type
  */
 static int comp_tree_refs(struct btrfs_delayed_tree_ref *ref2,
-  struct btrfs_delayed_tree_ref *ref1)
+  struct btrfs_delayed_tree_ref *ref1, int type)
 {
-if (ref1-&amp;gt;root &amp;lt; ref2-&amp;gt;root)
-return -1;
-if (ref1-&amp;gt;root &amp;gt; ref2-&amp;gt;root)
-return 1;
-if (ref1-&amp;gt;parent &amp;lt; ref2-&amp;gt;parent)
-return -1;
-if (ref1-&amp;gt;parent &amp;gt; ref2-&amp;gt;parent)
-return 1;
+if (type == BTRFS_TREE_BLOCK_REF_KEY) {
+if (ref1-&amp;gt;root &amp;lt; ref2-&amp;gt;root)
+return -1;
+if (ref1-&amp;gt;root &amp;gt; ref2-&amp;gt;root)
+return 1;
+} else {
+if (ref1-&amp;gt;parent &amp;lt; ref2-&amp;gt;parent)
+return -1;
+if (ref1-&amp;gt;parent &amp;gt; ref2-&amp;gt;parent)
+return 1;
+}
 return 0;
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -109,7 +112,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int comp_entry(struct btrfs_delayed_ref_node *ref2,
 if (ref1-&amp;gt;type == BTRFS_TREE_BLOCK_REF_KEY ||
     ref1-&amp;gt;type == BTRFS_SHARED_BLOCK_REF_KEY) {
 return comp_tree_refs(btrfs_delayed_node_to_tree_ref(ref2),
-      btrfs_delayed_node_to_tree_ref(ref1));
+      btrfs_delayed_node_to_tree_ref(ref1),
+      ref1-&amp;gt;type);
 } else if (ref1-&amp;gt;type == BTRFS_EXTENT_DATA_REF_KEY ||
    ref1-&amp;gt;type == BTRFS_SHARED_DATA_REF_KEY) {
 return comp_data_refs(btrfs_delayed_node_to_data_ref(ref2),
&lt;/pre&gt;</description>
    <dc:creator>Steven Rostedt</dc:creator>
    <dc:date>2013-05-18T02:18:10</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493149">
    <title>[ 132/136 ] tracing: Fix ftrace_dump()</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493149</link>
    <description>&lt;pre&gt;3.6.11.4 stable review patch.
If anyone has any objections, please let me know.

------------------

From: "Steven Rostedt (Red Hat)" &amp;lt;rostedt&amp;lt; at &amp;gt;goodmis.org&amp;gt;

[ Upstream commit 7fe70b579c9e3daba71635e31b6189394e7b79d3 ]

ftrace_dump() had a lot of issues. What ftrace_dump() does, is when
ftrace_dump_on_oops is set (via a kernel parameter or sysctl), it
will dump out the ftrace buffers to the console when either a oops,
panic, or a sysrq-z occurs.

This was written a long time ago when ftrace was fragile to recursion.
But it wasn't written well even for that.

There's a possible deadlock that can occur if a ftrace_dump() is happening
and an NMI triggers another dump. This is because it grabs a lock
before checking if the dump ran.

It also totally disables ftrace, and tracing for no good reasons.

As the ring_buffer now checks if it is read via a oops or NMI, where
there's a chance that the buffer gets corrupted, it will disable
itself. No need to have ftrace_dump() do the same.

ftrace_dump() is now cleaned up where it uses an atomic counter to
make sure only one dump happens at a time. A simple atomic_inc_return()
is enough that is needed for both other CPUs and NMIs. No need for
a spinlock, as if one CPU is running the dump, no other CPU needs
to do it too.

The tracing_on variable is turned off and not turned on. The original
code did this, but it wasn't pretty. By just disabling this variable
we get the result of not seeing traces that happen between crashes.

For sysrq-z, it doesn't get turned on, but the user can always write
a '1' to the tracing_on file. If they are using sysrq-z, then they should
know about tracing_on.

The new code is much easier to read and less error prone. No more
deadlock possibility when an NMI triggers here.

Reported-by: zhangwei(Jovi) &amp;lt;jovi.zhangwei&amp;lt; at &amp;gt;huawei.com&amp;gt;
Cc: stable&amp;lt; at &amp;gt;vger.kernel.org
Cc: Thomas Gleixner &amp;lt;tglx&amp;lt; at &amp;gt;linutronix.de&amp;gt;
Cc: Peter Zijlstra &amp;lt;a.p.zijlstra&amp;lt; at &amp;gt;chello.nl&amp;gt;
Cc: Frederic Weisbecker &amp;lt;fweisbec&amp;lt; at &amp;gt;gmail.com&amp;gt;
Signed-off-by: Steven Rostedt &amp;lt;rostedt&amp;lt; at &amp;gt;goodmis.org&amp;gt;
---
 kernel/trace/trace.c          |   62 +++++++++++++++++------------------------
 kernel/trace/trace_selftest.c |    9 +++---
 2 files changed, 31 insertions(+), 40 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 4a568ba..6fbd63a 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4986,36 +4986,32 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void trace_init_global_iter(struct trace_iterator *iter)
 iter-&amp;gt;cpu_file = TRACE_PIPE_ALL_CPU;
 }
 
-static void
-__ftrace_dump(bool disable_tracing, enum ftrace_dump_mode oops_dump_mode)
+void ftrace_dump(enum ftrace_dump_mode oops_dump_mode)
 {
-static arch_spinlock_t ftrace_dump_lock =
-(arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED;
 /* use static because iter can be a bit big for the stack */
 static struct trace_iterator iter;
+static atomic_t dump_running;
 unsigned int old_userobj;
-static int dump_ran;
 unsigned long flags;
 int cnt = 0, cpu;
 
-/* only one dump */
-local_irq_save(flags);
-arch_spin_lock(&amp;amp;ftrace_dump_lock);
-if (dump_ran)
-goto out;
-
-dump_ran = 1;
+/* Only allow one dump user at a time. */
+if (atomic_inc_return(&amp;amp;dump_running) != 1) {
+atomic_dec(&amp;amp;dump_running);
+return;
+}
 
+/*
+ * Always turn off tracing when we dump.
+ * We don't need to show trace output of what happens
+ * between multiple crashes.
+ *
+ * If the user does a sysrq-z, then they can re-enable
+ * tracing with echo 1 &amp;gt; tracing_on.
+ */
 tracing_off();
 
-/* Did function tracer already get disabled? */
-if (ftrace_is_dead()) {
-printk("# WARNING: FUNCTION TRACING IS CORRUPTED\n");
-printk("#          MAY BE MISSING FUNCTION EVENTS\n");
-}
-
-if (disable_tracing)
-ftrace_kill();
+local_irq_save(flags);
 
 trace_init_global_iter(&amp;amp;iter);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5048,6 +5044,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; __ftrace_dump(bool disable_tracing, enum ftrace_dump_mode oops_dump_mode)
 
 printk(KERN_TRACE "Dumping ftrace buffer:\n");
 
+/* Did function tracer already get disabled? */
+if (ftrace_is_dead()) {
+printk("# WARNING: FUNCTION TRACING IS CORRUPTED\n");
+printk("#          MAY BE MISSING FUNCTION EVENTS\n");
+}
+
 /*
  * We need to stop all tracing on all CPUS to read the
  * the next buffer. This is a bit expensive, but is
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5087,26 +5089,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; __ftrace_dump(bool disable_tracing, enum ftrace_dump_mode oops_dump_mode)
 printk(KERN_TRACE "---------------------------------\n");
 
  out_enable:
-/* Re-enable tracing if requested */
-if (!disable_tracing) {
-trace_flags |= old_userobj;
+trace_flags |= old_userobj;
 
-for_each_tracing_cpu(cpu) {
-atomic_dec(&amp;amp;iter.tr-&amp;gt;data[cpu]-&amp;gt;disabled);
-}
-tracing_on();
+for_each_tracing_cpu(cpu) {
+atomic_dec(&amp;amp;iter.tr-&amp;gt;data[cpu]-&amp;gt;disabled);
 }
-
- out:
-arch_spin_unlock(&amp;amp;ftrace_dump_lock);
+atomic_dec(&amp;amp;dump_running);
 local_irq_restore(flags);
 }
-
-/* By default: disable tracing after the dump */
-void ftrace_dump(enum ftrace_dump_mode oops_dump_mode)
-{
-__ftrace_dump(true, oops_dump_mode);
-}
 EXPORT_SYMBOL_GPL(ftrace_dump);
 
 __init static int tracer_alloc_buffers(void)
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index 288541f..09fd98a 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -461,8 +461,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; trace_selftest_startup_function(struct tracer *trace, struct trace_array *tr)
 /* Maximum number of functions to trace before diagnosing a hang */
 #define GRAPH_MAX_FUNC_TEST100000000
 
-static void
-__ftrace_dump(bool disable_tracing, enum ftrace_dump_mode oops_dump_mode);
 static unsigned int graph_hang_thresh;
 
 /* Wrap the real function entry probe to avoid possible hanging */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -472,8 +470,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int trace_graph_entry_watchdog(struct ftrace_graph_ent *trace)
 if (unlikely(++graph_hang_thresh &amp;gt; GRAPH_MAX_FUNC_TEST)) {
 ftrace_graph_stop();
 printk(KERN_WARNING "BUG: Function graph tracer hang!\n");
-if (ftrace_dump_on_oops)
-__ftrace_dump(false, DUMP_ALL);
+if (ftrace_dump_on_oops) {
+ftrace_dump(DUMP_ALL);
+/* ftrace_dump() disables tracing */
+tracing_on();
+}
 return 0;
 }
 
&lt;/pre&gt;</description>
    <dc:creator>Steven Rostedt</dc:creator>
    <dc:date>2013-05-18T02:18:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493148">
    <title>[ 131/136 ] drm/radeon: fix handling of v6 power tables</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493148</link>
    <description>&lt;pre&gt;3.6.11.4 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;

[ Upstream commit 441e76ca83ac604eaf0f046def96d8e3a27eea28 ]

The code was mis-handling variable sized arrays.

Reported-by: Sylvain BERTRAND &amp;lt;sylware&amp;lt; at &amp;gt;legeek.net&amp;gt;
Signed-off-by: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;
Cc: stable&amp;lt; at &amp;gt;vger.kernel.org
Signed-off-by: Steven Rostedt &amp;lt;rostedt&amp;lt; at &amp;gt;goodmis.org&amp;gt;
---
 drivers/gpu/drm/radeon/radeon_atombios.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 77fec04..3e3b3df 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2507,6 +2507,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int radeon_atombios_parse_power_table_6(struct radeon_device *rdev)
 int index = GetIndexIntoMasterTable(DATA, PowerPlayInfo);
         u16 data_offset;
 u8 frev, crev;
+u8 *power_state_offset;
 
 if (!atom_parse_data_header(mode_info-&amp;gt;atom_context, index, NULL,
    &amp;amp;frev, &amp;amp;crev, &amp;amp;data_offset))
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2529,11 +2530,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int radeon_atombios_parse_power_table_6(struct radeon_device *rdev)
        state_array-&amp;gt;ucNumEntries, GFP_KERNEL);
 if (!rdev-&amp;gt;pm.power_state)
 return state_index;
+power_state_offset = (u8 *)state_array-&amp;gt;states;
 for (i = 0; i &amp;lt; state_array-&amp;gt;ucNumEntries; i++) {
 mode_index = 0;
-power_state = (union pplib_power_state *)&amp;amp;state_array-&amp;gt;states[i];
-/* XXX this might be an inagua bug... */
-non_clock_array_index = i; /* power_state-&amp;gt;v2.nonClockInfoIndex */
+power_state = (union pplib_power_state *)power_state_offset;
+non_clock_array_index = power_state-&amp;gt;v2.nonClockInfoIndex;
 non_clock_info = (struct _ATOM_PPLIB_NONCLOCK_INFO *)
 &amp;amp;non_clock_info_array-&amp;gt;nonClockInfo[non_clock_array_index];
 rdev-&amp;gt;pm.power_state[i].clock_info = kzalloc(sizeof(struct radeon_pm_clock_info) *
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2545,9 +2546,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int radeon_atombios_parse_power_table_6(struct radeon_device *rdev)
 if (power_state-&amp;gt;v2.ucNumDPMLevels) {
 for (j = 0; j &amp;lt; power_state-&amp;gt;v2.ucNumDPMLevels; j++) {
 clock_array_index = power_state-&amp;gt;v2.clockInfoIndex[j];
-/* XXX this might be an inagua bug... */
-if (clock_array_index &amp;gt;= clock_info_array-&amp;gt;ucNumEntries)
-continue;
 clock_info = (union pplib_clock_info *)
 &amp;amp;clock_info_array-&amp;gt;clockInfo[clock_array_index * clock_info_array-&amp;gt;ucEntrySize];
 valid = radeon_atombios_parse_pplib_clock_info(rdev,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2569,6 +2567,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int radeon_atombios_parse_power_table_6(struct radeon_device *rdev)
    non_clock_info);
 state_index++;
 }
+power_state_offset += 2 + power_state-&amp;gt;v2.ucNumDPMLevels;
 }
 /* if multiple clock modes, mark the lowest as no display */
 for (i = 0; i &amp;lt; state_index; i++) {
&lt;/pre&gt;</description>
    <dc:creator>Steven Rostedt</dc:creator>
    <dc:date>2013-05-18T02:18:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493147">
    <title>[ 130/136 ] drm/radeon: add new richland pci ids</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493147</link>
    <description>&lt;pre&gt;3.6.11.4 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;

[ Upstream commit 62d1f92e06aef9665d71ca7e986b3047ecf0b3c7 ]

Signed-off-by: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;
Cc: stable&amp;lt; at &amp;gt;vger.kernel.org
Signed-off-by: Steven Rostedt &amp;lt;rostedt&amp;lt; at &amp;gt;goodmis.org&amp;gt;
---
 drivers/gpu/drm/radeon/ni.c |    6 ++++--
 include/drm/drm_pciids.h    |    2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index 338b71f..62ff39f 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -471,7 +471,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void cayman_gpu_init(struct radeon_device *rdev)
     (rdev-&amp;gt;pdev-&amp;gt;device == 0x990F) ||
     (rdev-&amp;gt;pdev-&amp;gt;device == 0x9910) ||
     (rdev-&amp;gt;pdev-&amp;gt;device == 0x9917) ||
-    (rdev-&amp;gt;pdev-&amp;gt;device == 0x9999)) {
+    (rdev-&amp;gt;pdev-&amp;gt;device == 0x9999) ||
+    (rdev-&amp;gt;pdev-&amp;gt;device == 0x999C)) {
 rdev-&amp;gt;config.cayman.max_simds_per_se = 6;
 rdev-&amp;gt;config.cayman.max_backends_per_se = 2;
 } else if ((rdev-&amp;gt;pdev-&amp;gt;device == 0x9903) ||
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -480,7 +481,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void cayman_gpu_init(struct radeon_device *rdev)
    (rdev-&amp;gt;pdev-&amp;gt;device == 0x990D) ||
    (rdev-&amp;gt;pdev-&amp;gt;device == 0x990E) ||
    (rdev-&amp;gt;pdev-&amp;gt;device == 0x9913) ||
-   (rdev-&amp;gt;pdev-&amp;gt;device == 0x9918)) {
+   (rdev-&amp;gt;pdev-&amp;gt;device == 0x9918) ||
+   (rdev-&amp;gt;pdev-&amp;gt;device == 0x999D)) {
 rdev-&amp;gt;config.cayman.max_simds_per_se = 4;
 rdev-&amp;gt;config.cayman.max_backends_per_se = 2;
 } else if ((rdev-&amp;gt;pdev-&amp;gt;device == 0x9919) ||
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h
index 36e5b94..d7da55c 100644
--- a/include/drm/drm_pciids.h
+++ b/include/drm/drm_pciids.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -593,6 +593,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 {0x1002, 0x9999, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
 {0x1002, 0x999A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
 {0x1002, 0x999B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
+{0x1002, 0x999C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
+{0x1002, 0x999D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
 {0x1002, 0x99A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
 {0x1002, 0x99A2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
 {0x1002, 0x99A4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
&lt;/pre&gt;</description>
    <dc:creator>Steven Rostedt</dc:creator>
    <dc:date>2013-05-18T02:18:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493146">
    <title>[ 127/136 ] drm/radeon: fix typo in si_select_se_sh()</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493146</link>
    <description>&lt;pre&gt;3.6.11.4 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;

[ Upstream commit 79b52d6a7085a3e430c6de450a5847fdbe04159b ]

Signed-off-by: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;
Cc: stable&amp;lt; at &amp;gt;vger.kernel.org
Signed-off-by: Steven Rostedt &amp;lt;rostedt&amp;lt; at &amp;gt;goodmis.org&amp;gt;
---
 drivers/gpu/drm/radeon/si.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index 992e60c..f2b256c 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1374,7 +1374,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void si_select_se_sh(struct radeon_device *rdev,
 u32 data = INSTANCE_BROADCAST_WRITES;
 
 if ((se_num == 0xffffffff) &amp;amp;&amp;amp; (sh_num == 0xffffffff))
-data = SH_BROADCAST_WRITES | SE_BROADCAST_WRITES;
+data |= SH_BROADCAST_WRITES | SE_BROADCAST_WRITES;
 else if (se_num == 0xffffffff)
 data |= SE_BROADCAST_WRITES | SH_INDEX(sh_num);
 else if (sh_num == 0xffffffff)
&lt;/pre&gt;</description>
    <dc:creator>Steven Rostedt</dc:creator>
    <dc:date>2013-05-18T02:18:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493144">
    <title>[ 124/136 ] drm/radeon/evergreen+: dont enable HPD interrupts on eDP/LVDS</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493144</link>
    <description>&lt;pre&gt;3.6.11.4 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;

[ Upstream commit 2e97be73e5f74a317232740ae82eb8f95326a660 ]

Avoids potential interrupt storms when the display is disabled.

May fix:
https://bugzilla.kernel.org/show_bug.cgi?id=56041

Signed-off-by: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;
Cc: stable&amp;lt; at &amp;gt;vger.kernel.org
Signed-off-by: Steven Rostedt &amp;lt;rostedt&amp;lt; at &amp;gt;goodmis.org&amp;gt;
---
 drivers/gpu/drm/radeon/evergreen.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index cbbaaf6..5c23991 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -569,6 +569,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void evergreen_hpd_init(struct radeon_device *rdev)
 
 list_for_each_entry(connector, &amp;amp;dev-&amp;gt;mode_config.connector_list, head) {
 struct radeon_connector *radeon_connector = to_radeon_connector(connector);
+
+if (connector-&amp;gt;connector_type == DRM_MODE_CONNECTOR_eDP ||
+    connector-&amp;gt;connector_type == DRM_MODE_CONNECTOR_LVDS) {
+/* don't try to enable hpd on eDP or LVDS avoid breaking the
+ * aux dp channel on imac and help (but not completely fix)
+ * https://bugzilla.redhat.com/show_bug.cgi?id=726143
+ * also avoid interrupt storms during dpms.
+ */
+continue;
+}
 switch (radeon_connector-&amp;gt;hpd.hpd) {
 case RADEON_HPD_1:
 WREG32(DC_HPD1_CONTROL, tmp);
&lt;/pre&gt;</description>
    <dc:creator>Steven Rostedt</dc:creator>
    <dc:date>2013-05-18T02:18:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493143">
    <title>[ 125/136 ] drm/radeon: cleanup properly if mmio mapping fails</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493143</link>
    <description>&lt;pre&gt;3.6.11.4 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;

[ Upstream commit 0cd9cb76ae26a19df21abc6f94f5fff141e689c7 ]

If we fail to map the mmio BAR, skip driver tear down
that requires mmio.

Should fix:
https://bugzilla.kernel.org/show_bug.cgi?id=56541

Signed-off-by: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;
Cc: stable&amp;lt; at &amp;gt;vger.kernel.org
Signed-off-by: Steven Rostedt &amp;lt;rostedt&amp;lt; at &amp;gt;goodmis.org&amp;gt;
---
 drivers/gpu/drm/radeon/radeon_kms.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 414b4ac..e32f4c2 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -51,8 +51,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int radeon_driver_unload_kms(struct drm_device *dev)
 
 if (rdev == NULL)
 return 0;
+if (rdev-&amp;gt;rmmio == NULL)
+goto done_free;
 radeon_modeset_fini(rdev);
 radeon_device_fini(rdev);
+
+done_free:
 kfree(rdev);
 dev-&amp;gt;dev_private = NULL;
 return 0;
&lt;/pre&gt;</description>
    <dc:creator>Steven Rostedt</dc:creator>
    <dc:date>2013-05-18T02:18:02</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493142">
    <title>[ 126/136 ] drm/radeon: fix hdmi mode enable on RS600/RS690/RS740</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493142</link>
    <description>&lt;pre&gt;3.6.11.4 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;

[ Upstream commit dcb852905772416e322536ced5cb3c796d176af5 ]

These chips were previously skipped since they are
pre-R600.

Signed-off-by: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;
Cc: stable&amp;lt; at &amp;gt;vger.kernel.org
Signed-off-by: Steven Rostedt &amp;lt;rostedt&amp;lt; at &amp;gt;goodmis.org&amp;gt;
---
 drivers/gpu/drm/radeon/r600_hdmi.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c
index e3558c3..ecf263f 100644
--- a/drivers/gpu/drm/radeon/r600_hdmi.c
+++ b/drivers/gpu/drm/radeon/r600_hdmi.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -489,7 +489,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void r600_hdmi_enable(struct drm_encoder *encoder)
 offset = dig-&amp;gt;afmt-&amp;gt;offset;
 
 /* Older chipsets require setting HDMI and routing manually */
-if (rdev-&amp;gt;family &amp;gt;= CHIP_R600 &amp;amp;&amp;amp; !ASIC_IS_DCE3(rdev)) {
+if (ASIC_IS_DCE2(rdev) &amp;amp;&amp;amp; !ASIC_IS_DCE3(rdev)) {
 hdmi = HDMI0_ERROR_ACK | HDMI0_ENABLE;
 switch (radeon_encoder-&amp;gt;encoder_id) {
 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -558,7 +558,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void r600_hdmi_disable(struct drm_encoder *encoder)
 radeon_irq_kms_disable_afmt(rdev, dig-&amp;gt;afmt-&amp;gt;id);
 
 /* Older chipsets not handled by AtomBIOS */
-if (rdev-&amp;gt;family &amp;gt;= CHIP_R600 &amp;amp;&amp;amp; !ASIC_IS_DCE3(rdev)) {
+if (ASIC_IS_DCE2(rdev) &amp;amp;&amp;amp; !ASIC_IS_DCE3(rdev)) {
 switch (radeon_encoder-&amp;gt;encoder_id) {
 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1:
 WREG32_P(AVIVO_TMDSA_CNTL, 0,
&lt;/pre&gt;</description>
    <dc:creator>Steven Rostedt</dc:creator>
    <dc:date>2013-05-18T02:18:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel/1493138">
    <title>[ 120/136 ] drm/radeon: update wait_for_vblank for evergreen+</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel/1493138</link>
    <description>&lt;pre&gt;3.6.11.4 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;

[ Upstream commit 10257a6d8359c41407eb26b7ad7bf710a7e00155 ]

Properly wait for the next vblank region.  The previous
code didn't always wait long enough depending on the timing.

Signed-off-by: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;
Cc: stable&amp;lt; at &amp;gt;vger.kernel.org
Signed-off-by: Steven Rostedt &amp;lt;rostedt&amp;lt; at &amp;gt;goodmis.org&amp;gt;
---
 drivers/gpu/drm/radeon/evergreen.c |   44 +++++++++++++++++++++++++++++-------
 1 file changed, 36 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 5528fea..6cb958b 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -109,6 +109,27 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev)
 }
 }
 
+static bool dce4_is_in_vblank(struct radeon_device *rdev, int crtc)
+{
+if (RREG32(EVERGREEN_CRTC_STATUS + crtc_offsets[crtc]) &amp;amp; EVERGREEN_CRTC_V_BLANK)
+return true;
+else
+return false;
+}
+
+static bool dce4_is_counter_moving(struct radeon_device *rdev, int crtc)
+{
+u32 pos1, pos2;
+
+pos1 = RREG32(EVERGREEN_CRTC_STATUS_POSITION + crtc_offsets[crtc]);
+pos2 = RREG32(EVERGREEN_CRTC_STATUS_POSITION + crtc_offsets[crtc]);
+
+if (pos1 != pos2)
+return true;
+else
+return false;
+}
+
 /**
  * dce4_wait_for_vblank - vblank wait asic callback.
  *
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -119,21 +140,28 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev)
  */
 void dce4_wait_for_vblank(struct radeon_device *rdev, int crtc)
 {
-int i;
+unsigned i = 0;
 
 if (crtc &amp;gt;= rdev-&amp;gt;num_crtc)
 return;
 
-if (RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[crtc]) &amp;amp; EVERGREEN_CRTC_MASTER_EN) {
-for (i = 0; i &amp;lt; rdev-&amp;gt;usec_timeout; i++) {
-if (!(RREG32(EVERGREEN_CRTC_STATUS + crtc_offsets[crtc]) &amp;amp; EVERGREEN_CRTC_V_BLANK))
+if (!(RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[crtc]) &amp;amp; EVERGREEN_CRTC_MASTER_EN))
+return;
+
+/* depending on when we hit vblank, we may be close to active; if so,
+ * wait for another frame.
+ */
+while (dce4_is_in_vblank(rdev, crtc)) {
+if (i++ % 100 == 0) {
+if (!dce4_is_counter_moving(rdev, crtc))
 break;
-udelay(1);
 }
-for (i = 0; i &amp;lt; rdev-&amp;gt;usec_timeout; i++) {
-if (RREG32(EVERGREEN_CRTC_STATUS + crtc_offsets[crtc]) &amp;amp; EVERGREEN_CRTC_V_BLANK)
+}
+
+while (!dce4_is_in_vblank(rdev, crtc)) {
+if (i++ % 100 == 0) {
+if (!dce4_is_counter_moving(rdev, crtc))
 break;
-udelay(1);
 }
 }
 }
&lt;/pre&gt;</description>
    <dc:creator>Steven Rostedt</dc:creator>
    <dc:date>2013-05-18T02:17:57</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.linux.kernel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.linux.kernel</link>
  </textinput>
</rdf:RDF>
