* Re: 3.4-rc: NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out
From: Tomas Papan @ 2012-06-12 6:51 UTC (permalink / raw)
To: Francois Romieu; +Cc: netdev
In-Reply-To: <20120612052631.GA14567@electric-eye.fr.zoreil.com>
Hi Francois,
I tried your patch, so far no exception has been generated (uptime 1
hour) . I'll keep it running for 1 day and then I'll come back to you.
Anyway thanks for the patch.
Regards
Tomas
On Tue, Jun 12, 2012 at 7:26 AM, Francois Romieu <romieu@fr.zoreil.com> wrote:
> Tomas Papan <tomas.papan@gmail.com> :
> [...]
>> [ 2.780758] r8169 0000:03:00.0: eth1: RTL8168e/8111e at
>> 0xffffc9000001c000, 80:ee:73:10:ad:44, XID 0c200000 IRQ 46
>
> Let's see if it behaves like RTL_GIGA_MAC_VER_34.
>
> Can you try the patch below ?
>
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index bbacb37..da46588 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -3766,6 +3766,7 @@ static void rtl_init_rxcfg(struct rtl8169_private *tp)
> case RTL_GIGA_MAC_VER_22:
> case RTL_GIGA_MAC_VER_23:
> case RTL_GIGA_MAC_VER_24:
> + case RTL_GIGA_MAC_VER_33:
> RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST);
> break;
> default:
>
>
^ permalink raw reply
* Re: [PATCH net-next 5/5] net: sh_eth: use NAPI
From: Shimoda, Yoshihiro @ 2012-06-12 6:47 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev, SH-Linux
In-Reply-To: <1339480115.22704.20.camel@edumazet-glaptop>
2012/06/12 14:48, Eric Dumazet wrote:
> On Tue, 2012-06-12 at 14:19 +0900, Shimoda, Yoshihiro wrote:
< snip >
>> + if ((mdp->cur_tx - mdp->dirty_tx) >= (mdp->num_tx_ring - 4)) {
>> + if (netif_msg_tx_queued(mdp)) {
>> + dev_warn(&ndev->dev, "TxFD exhausted.\n");
>> + netif_stop_queue(ndev);
>> + }
>> + }
>> +
>> return NETDEV_TX_OK;
>> }
>
>
> I have no idea why you call netif_stop_queue() only if
> netif_msg_tx_queued(mdp)
>
> You should test your driver under heavy TX load.
>
Thank you for the point.
I checked the netif-msg.txt about netif_msg_tx_queued(). It is one of
the network interface message level setting. So, the driver's behavior
should not be changed by the level, I think.
I will modify the patch.
Best regards,
Yoshihiro Shimoda
^ permalink raw reply
* Re: [PATCH net V2] bonding:force to use primary slave
From: Weiping Pan @ 2012-06-12 6:37 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: netdev, nicolas.2p.debian
In-Reply-To: <7128.1339477247@death.nxdomain>
On 06/12/2012 01:00 PM, Jay Vosburgh wrote:
> Weiping Pan<wpan@redhat.com> wrote:
>
>> When we set primary slave with module parameters, bond will always use this
>> primary slave as active slave.
>>
>> But when we modify primary slave via sysfs, it will call
>> bond_should_change_active() and take into account primary_reselect.
>>
>> And I think we should use the new primary slave as the new active slave
>> regardless of the value of primary_reselect, since primary slave really should
>> have priority than other slaves.
> The whole point of primary_reselect is that the primary slave
> does not have priority unless it meets the reselect criteria, or it is
> being enslaved.
>
>> primary_reselect is introduced to handle the failure or recovery of primary
>> slave, but when we modify primary slave via sysfs, we want to give it higher
>> priority, and it may or may not be a failure or recovery slave.
>>
>> Thus the behavior is the same with module parameters and meets the
>> administrator's expectation.
> I still disagree with this patch. My comments regarding the
> prior version were intended to mean that we should document the current
> behavior, not change the behavior and document the new behavior.
>
> If an administrator wishes for the newly set primary to
> immediately become the active slave, they can either leave
> primary_reselect at its default setting or utilize the available
> mechanism to change the active slave. Applying this patch eliminates
> the ability to alter the primary slave setting without simultaneously
> changing the active slave.
Yes, this side effect is not good.
Thanks for your comments.
Weiping Pan
> Further, the default value for primary_reselect already does
> this (change to the new primary immediately); this patch only affects
> the case that primary_reselect is set to a non-default value. In my
> mind, this reinforces that the current behavior is correct, and that the
> primary_reselect setting should apply to the newly selected primary
> (because the administrator has explicitly chosen that behavior).
>
> -J
>
> ---
> -Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
>
^ permalink raw reply
* RE: kernel ipsec error
From: Marco Berizzi @ 2012-06-12 6:31 UTC (permalink / raw)
To: bhutchings; +Cc: netdev
In-Reply-To: <1339436963.2665.5.camel@bwh-desktop.uk.solarflarecom.com>
bhutchings@solarflare.com wrote:
> On Mon, 2012-06-11 at 14:45 +0200, Marco Berizzi wrote:
> > Hello everybody.
> >
> > After 12 days uptime I got this message.
> > Linux is 3.3.5 32bit, running openswan
> > (this is an ipsec gateway/netfilter
> > firewall) and squid.
> >
> > Jun 11 12:53:02 Pleiadi kernel: SLUB: Unable to allocate memory on node -1 (gfp=0x20)
> > Jun 11 12:53:02 Pleiadi kernel: cache: kmalloc-2048, object size: 2048, buffer size: 2048, default order: 2, min order: 0
> > Jun 11 12:53:02 Pleiadi kernel: node 0: slabs: 61, objs: 476, free: 0
> > Jun 11 12:53:02 Pleiadi kernel: kworker/0:2: page allocation failure: order:0, mode:0x4020
>
> So a single page allocation in atomic (non-sleeping) context failed.
>
> [...]
> > Jun 11 12:53:02 Pleiadi kernel: Free swap = 130908kB
> > Jun 11 12:53:02 Pleiadi kernel: Total swap = 151164kB
> > Jun 11 12:53:02 Pleiadi kernel: 40944 pages RAM
> [...]
>
> Not too surprising with this little RAM available (swap didn't help
> since we couldn't wait for swap-out).
yes, this is really a very old hardware.
> There could be a memory leak, but you would need to read /proc/meminfo
> and /proc/slabinfo at intervals to work out whether that was the case.
Kindly, may you tell me which should be the intervals? One second? one minute?
^ permalink raw reply
* Re: [PATCH net-next 5/5] net: sh_eth: use NAPI
From: Eric Dumazet @ 2012-06-12 5:48 UTC (permalink / raw)
To: Shimoda, Yoshihiro; +Cc: netdev, SH-Linux
In-Reply-To: <4FD6D154.1000000@renesas.com>
On Tue, 2012-06-12 at 14:19 +0900, Shimoda, Yoshihiro wrote:
> This patch modifies the driver to use NAPI.
>
...
> +static int sh_eth_poll(struct napi_struct *napi, int budget)
> +{
> + struct sh_eth_private *mdp = container_of(napi, struct sh_eth_private,
> + napi);
> + struct net_device *ndev = mdp->ndev;
> + struct sh_eth_cpu_data *cd = mdp->cd;
> + int work_done = 0, txfree_num;
> + u32 intr_status = sh_eth_read(ndev, EESR);
> +
> + /* Clear interrupt flags */
> + sh_eth_write(ndev, intr_status, EESR);
> +
> + /* check txdesc */
> + txfree_num = sh_eth_txfree(ndev);
> + if (txfree_num) {
> + netif_tx_lock(ndev);
> + if (netif_queue_stopped(ndev))
> + netif_wake_queue(ndev);
> + netif_tx_unlock(ndev);
> }
...
> @@ -1678,19 +1707,6 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
> struct sh_eth_private *mdp = netdev_priv(ndev);
> struct sh_eth_txdesc *txdesc;
> u32 entry;
> - unsigned long flags;
> -
> - spin_lock_irqsave(&mdp->lock, flags);
> - if ((mdp->cur_tx - mdp->dirty_tx) >= (mdp->num_tx_ring - 4)) {
> - if (!sh_eth_txfree(ndev)) {
> - if (netif_msg_tx_queued(mdp))
> - dev_warn(&ndev->dev, "TxFD exhausted.\n");
> - netif_stop_queue(ndev);
> - spin_unlock_irqrestore(&mdp->lock, flags);
> - return NETDEV_TX_BUSY;
> - }
> - }
> - spin_unlock_irqrestore(&mdp->lock, flags);
>
> entry = mdp->cur_tx % mdp->num_tx_ring;
> mdp->tx_skbuff[entry] = skb;
> @@ -1716,6 +1732,13 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
> if (!(sh_eth_read(ndev, EDTRR) & sh_eth_get_edtrr_trns(mdp)))
> sh_eth_write(ndev, sh_eth_get_edtrr_trns(mdp), EDTRR);
>
> + if ((mdp->cur_tx - mdp->dirty_tx) >= (mdp->num_tx_ring - 4)) {
> + if (netif_msg_tx_queued(mdp)) {
> + dev_warn(&ndev->dev, "TxFD exhausted.\n");
> + netif_stop_queue(ndev);
> + }
> + }
> +
> return NETDEV_TX_OK;
> }
I have no idea why you call netif_stop_queue() only if
netif_msg_tx_queued(mdp)
You should test your driver under heavy TX load.
^ permalink raw reply
* Re: 3.4-rc: NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out
From: Francois Romieu @ 2012-06-12 5:26 UTC (permalink / raw)
To: Tomas Papan; +Cc: netdev
In-Reply-To: <CAMGsXDT5xu_+gHber-XS=wv9RW7kyUzHNUJN87CuJuNevDuxSw@mail.gmail.com>
Tomas Papan <tomas.papan@gmail.com> :
[...]
> [ 2.780758] r8169 0000:03:00.0: eth1: RTL8168e/8111e at
> 0xffffc9000001c000, 80:ee:73:10:ad:44, XID 0c200000 IRQ 46
Let's see if it behaves like RTL_GIGA_MAC_VER_34.
Can you try the patch below ?
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index bbacb37..da46588 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -3766,6 +3766,7 @@ static void rtl_init_rxcfg(struct rtl8169_private *tp)
case RTL_GIGA_MAC_VER_22:
case RTL_GIGA_MAC_VER_23:
case RTL_GIGA_MAC_VER_24:
+ case RTL_GIGA_MAC_VER_33:
RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST);
break;
default:
^ permalink raw reply related
* [PATCH net-next] bonding: remove packet cloning in recv_probe()
From: Eric Dumazet @ 2012-06-12 5:23 UTC (permalink / raw)
To: David Miller
Cc: netdev, Jay Vosburgh, Andy Gospodarek, Jiri Bohac,
Nicolas de Pesloüan, Maciej Żenczykowski
From: Eric Dumazet <edumazet@google.com>
Cloning all packets in input path have a significant cost.
Use skb_header_pointer()/skb_copy_bits() instead of pskb_may_pull() so
that recv_probe handlers (bond_3ad_lacpdu_recv / bond_arp_rcv /
rlb_arp_recv ) dont touch input skb.
bond_handle_frame() can avoid the skb_clone()/dev_kfree_skb()
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jay Vosburgh <fubar@us.ibm.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Cc: Jiri Bohac <jbohac@suse.cz>
Cc: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Cc: Maciej Żenczykowski <maze@google.com>
---
drivers/net/bonding/bond_3ad.c | 11 +++++---
drivers/net/bonding/bond_3ad.h | 4 +--
drivers/net/bonding/bond_alb.c | 20 ++++------------
drivers/net/bonding/bond_main.c | 37 ++++++++++++++++--------------
drivers/net/bonding/bonding.h | 4 +--
5 files changed, 36 insertions(+), 40 deletions(-)
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 3463b46..3031e04 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2460,18 +2460,21 @@ out:
return NETDEV_TX_OK;
}
-int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct bonding *bond,
- struct slave *slave)
+int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond,
+ struct slave *slave)
{
int ret = RX_HANDLER_ANOTHER;
+ struct lacpdu *lacpdu, _lacpdu;
+
if (skb->protocol != PKT_TYPE_LACPDU)
return ret;
- if (!pskb_may_pull(skb, sizeof(struct lacpdu)))
+ lacpdu = skb_header_pointer(skb, 0, sizeof(_lacpdu), &_lacpdu);
+ if (!lacpdu)
return ret;
read_lock(&bond->lock);
- ret = bond_3ad_rx_indication((struct lacpdu *) skb->data, slave, skb->len);
+ ret = bond_3ad_rx_indication(lacpdu, slave, skb->len);
read_unlock(&bond->lock);
return ret;
}
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
index 5ee7e3c..0cfaa4a 100644
--- a/drivers/net/bonding/bond_3ad.h
+++ b/drivers/net/bonding/bond_3ad.h
@@ -274,8 +274,8 @@ void bond_3ad_adapter_duplex_changed(struct slave *slave);
void bond_3ad_handle_link_change(struct slave *slave, char link);
int bond_3ad_get_active_agg_info(struct bonding *bond, struct ad_info *ad_info);
int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev);
-int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct bonding *bond,
- struct slave *slave);
+int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond,
+ struct slave *slave);
int bond_3ad_set_carrier(struct bonding *bond);
void bond_3ad_update_lacp_rate(struct bonding *bond);
#endif //__BOND_3AD_H__
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 0f59c15..ef3791a 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -342,27 +342,17 @@ static void rlb_update_entry_from_arp(struct bonding *bond, struct arp_pkt *arp)
_unlock_rx_hashtbl_bh(bond);
}
-static int rlb_arp_recv(struct sk_buff *skb, struct bonding *bond,
- struct slave *slave)
+static int rlb_arp_recv(const struct sk_buff *skb, struct bonding *bond,
+ struct slave *slave)
{
- struct arp_pkt *arp;
+ struct arp_pkt *arp, _arp;
if (skb->protocol != cpu_to_be16(ETH_P_ARP))
goto out;
- arp = (struct arp_pkt *) skb->data;
- if (!arp) {
- pr_debug("Packet has no ARP data\n");
+ arp = skb_header_pointer(skb, 0, sizeof(_arp), &_arp);
+ if (!arp)
goto out;
- }
-
- if (!pskb_may_pull(skb, arp_hdr_len(bond->dev)))
- goto out;
-
- if (skb->len < sizeof(struct arp_pkt)) {
- pr_debug("Packet is too small to be an ARP\n");
- goto out;
- }
if (arp->op_code == htons(ARPOP_REPLY)) {
/* update rx hash table for this ARP */
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 2ee8cf9..9e2301e 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1444,8 +1444,8 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb)
struct sk_buff *skb = *pskb;
struct slave *slave;
struct bonding *bond;
- int (*recv_probe)(struct sk_buff *, struct bonding *,
- struct slave *);
+ int (*recv_probe)(const struct sk_buff *, struct bonding *,
+ struct slave *);
int ret = RX_HANDLER_ANOTHER;
skb = skb_share_check(skb, GFP_ATOMIC);
@@ -1462,15 +1462,10 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb)
recv_probe = ACCESS_ONCE(bond->recv_probe);
if (recv_probe) {
- struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC);
-
- if (likely(nskb)) {
- ret = recv_probe(nskb, bond, slave);
- dev_kfree_skb(nskb);
- if (ret == RX_HANDLER_CONSUMED) {
- consume_skb(skb);
- return ret;
- }
+ ret = recv_probe(skb, bond, slave);
+ if (ret == RX_HANDLER_CONSUMED) {
+ consume_skb(skb);
+ return ret;
}
}
@@ -2737,25 +2732,31 @@ static void bond_validate_arp(struct bonding *bond, struct slave *slave, __be32
}
}
-static int bond_arp_rcv(struct sk_buff *skb, struct bonding *bond,
- struct slave *slave)
+static int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond,
+ struct slave *slave)
{
- struct arphdr *arp;
+ struct arphdr *arp = (struct arphdr *)skb->data;
unsigned char *arp_ptr;
__be32 sip, tip;
+ int alen;
if (skb->protocol != __cpu_to_be16(ETH_P_ARP))
return RX_HANDLER_ANOTHER;
read_lock(&bond->lock);
+ alen = arp_hdr_len(bond->dev);
pr_debug("bond_arp_rcv: bond %s skb->dev %s\n",
bond->dev->name, skb->dev->name);
- if (!pskb_may_pull(skb, arp_hdr_len(bond->dev)))
- goto out_unlock;
+ if (alen > skb_headlen(skb)) {
+ arp = kmalloc(alen, GFP_ATOMIC);
+ if (!arp)
+ goto out_unlock;
+ if (skb_copy_bits(skb, 0, arp, alen) < 0)
+ goto out_unlock;
+ }
- arp = arp_hdr(skb);
if (arp->ar_hln != bond->dev->addr_len ||
skb->pkt_type == PACKET_OTHERHOST ||
skb->pkt_type == PACKET_LOOPBACK ||
@@ -2790,6 +2791,8 @@ static int bond_arp_rcv(struct sk_buff *skb, struct bonding *bond,
out_unlock:
read_unlock(&bond->lock);
+ if (arp != (struct arphdr *)skb->data)
+ kfree(arp);
return RX_HANDLER_ANOTHER;
}
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 4581aa5..f8af2fc 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -218,8 +218,8 @@ struct bonding {
struct slave *primary_slave;
bool force_primary;
s32 slave_cnt; /* never change this value outside the attach/detach wrappers */
- int (*recv_probe)(struct sk_buff *, struct bonding *,
- struct slave *);
+ int (*recv_probe)(const struct sk_buff *, struct bonding *,
+ struct slave *);
rwlock_t lock;
rwlock_t curr_slave_lock;
u8 send_peer_notif;
^ permalink raw reply related
* [PATCH net-next 5/5] net: sh_eth: use NAPI
From: Shimoda, Yoshihiro @ 2012-06-12 5:19 UTC (permalink / raw)
To: netdev; +Cc: SH-Linux
This patch modifies the driver to use NAPI.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/net/ethernet/renesas/sh_eth.c | 102 +++++++++++++++++++++------------
drivers/net/ethernet/renesas/sh_eth.h | 3 +
2 files changed, 68 insertions(+), 37 deletions(-)
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index c64a31c..1584cda 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -1035,7 +1035,7 @@ static int sh_eth_txfree(struct net_device *ndev)
}
/* Packet receive function */
-static int sh_eth_rx(struct net_device *ndev)
+static int sh_eth_rx(struct net_device *ndev, int *work, int budget)
{
struct sh_eth_private *mdp = netdev_priv(ndev);
struct sh_eth_rxdesc *rxdesc;
@@ -1047,7 +1047,8 @@ static int sh_eth_rx(struct net_device *ndev)
u32 desc_status;
rxdesc = &mdp->rx_ring[entry];
- while (!(rxdesc->status & cpu_to_edmac(mdp, RD_RACT))) {
+ while (!(rxdesc->status & cpu_to_edmac(mdp, RD_RACT)) &&
+ *work < budget) {
desc_status = edmac_to_cpu(mdp, rxdesc->status);
pkt_len = rxdesc->frame_length;
@@ -1087,13 +1088,14 @@ static int sh_eth_rx(struct net_device *ndev)
skb_reserve(skb, NET_IP_ALIGN);
skb_put(skb, pkt_len);
skb->protocol = eth_type_trans(skb, ndev);
- netif_rx(skb);
+ netif_receive_skb(skb);
ndev->stats.rx_packets++;
ndev->stats.rx_bytes += pkt_len;
}
rxdesc->status |= cpu_to_edmac(mdp, RD_RACT);
entry = (++mdp->cur_rx) % mdp->num_rx_ring;
rxdesc = &mdp->rx_ring[entry];
+ (*work)++;
}
/* Refill the Rx ring buffers. */
@@ -1125,7 +1127,7 @@ static int sh_eth_rx(struct net_device *ndev)
/* Restart Rx engine if stopped. */
/* If we don't need to check status, don't. -KDU */
- if (!(sh_eth_read(ndev, EDRRR) & EDRRR_R)) {
+ if (*work < budget && !(sh_eth_read(ndev, EDRRR) & EDRRR_R)) {
/* fix the values for the next receiving */
mdp->cur_rx = mdp->dirty_rx = (sh_eth_read(ndev, RDFAR) -
sh_eth_read(ndev, RDLAR)) >> 4;
@@ -1281,38 +1283,61 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev)
/* Get interrpt stat */
intr_status = sh_eth_read(ndev, EESR);
- /* Clear interrupt */
if (intr_status & (EESR_FRC | EESR_RMAF | EESR_RRF |
EESR_RTLF | EESR_RTSF | EESR_PRE | EESR_CERF |
cd->tx_check | cd->eesr_err_check)) {
- sh_eth_write(ndev, intr_status, EESR);
+ if (napi_schedule_prep(&mdp->napi)) {
+ /* Disable interrupts of the channel */
+ sh_eth_write(ndev, 0, EESIPR);
+ __napi_schedule(&mdp->napi);
+ }
ret = IRQ_HANDLED;
- } else
- goto other_irq;
-
- if (intr_status & (EESR_FRC | /* Frame recv*/
- EESR_RMAF | /* Multi cast address recv*/
- EESR_RRF | /* Bit frame recv */
- EESR_RTLF | /* Long frame recv*/
- EESR_RTSF | /* short frame recv */
- EESR_PRE | /* PHY-LSI recv error */
- EESR_CERF)){ /* recv frame CRC error */
- sh_eth_rx(ndev);
}
- /* Tx Check */
- if (intr_status & cd->tx_check) {
- sh_eth_txfree(ndev);
- netif_wake_queue(ndev);
+ spin_unlock(&mdp->lock);
+
+ return ret;
+}
+
+static int sh_eth_poll(struct napi_struct *napi, int budget)
+{
+ struct sh_eth_private *mdp = container_of(napi, struct sh_eth_private,
+ napi);
+ struct net_device *ndev = mdp->ndev;
+ struct sh_eth_cpu_data *cd = mdp->cd;
+ int work_done = 0, txfree_num;
+ u32 intr_status = sh_eth_read(ndev, EESR);
+
+ /* Clear interrupt flags */
+ sh_eth_write(ndev, intr_status, EESR);
+
+ /* check txdesc */
+ txfree_num = sh_eth_txfree(ndev);
+ if (txfree_num) {
+ netif_tx_lock(ndev);
+ if (netif_queue_stopped(ndev))
+ netif_wake_queue(ndev);
+ netif_tx_unlock(ndev);
}
+ /* check rxdesc */
+ sh_eth_rx(ndev, &work_done, budget);
+
+ /* check error flags */
if (intr_status & cd->eesr_err_check)
sh_eth_error(ndev, intr_status);
-other_irq:
- spin_unlock(&mdp->lock);
+ /* get current interrupt flags */
+ intr_status = sh_eth_read(ndev, EESR);
- return ret;
+ /* check whether this driver should call napi_complete() */
+ if (work_done < budget) {
+ napi_complete(napi);
+ /* Enable all interrupts */
+ sh_eth_write(ndev, cd->eesipr_value, EESIPR);
+ }
+
+ return work_done;
}
/* PHY state control function */
@@ -1545,6 +1570,7 @@ static int sh_eth_set_ringparam(struct net_device *ndev,
/* Stop the chip's Tx and Rx processes. */
sh_eth_write(ndev, 0, EDTRR);
sh_eth_write(ndev, 0, EDRRR);
+ napi_disable(&mdp->napi);
synchronize_irq(ndev->irq);
}
@@ -1569,6 +1595,7 @@ static int sh_eth_set_ringparam(struct net_device *ndev,
}
if (netif_running(ndev)) {
+ napi_enable(&mdp->napi);
sh_eth_write(ndev, mdp->cd->eesipr_value, EESIPR);
/* Setting the Rx mode will start the Rx process. */
sh_eth_write(ndev, EDRRR_R, EDRRR);
@@ -1600,6 +1627,8 @@ static int sh_eth_open(struct net_device *ndev)
pm_runtime_get_sync(&mdp->pdev->dev);
+ napi_enable(&mdp->napi);
+
ret = request_irq(ndev->irq, sh_eth_interrupt,
#if defined(CONFIG_CPU_SUBTYPE_SH7763) || \
defined(CONFIG_CPU_SUBTYPE_SH7764) || \
@@ -1678,19 +1707,6 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
struct sh_eth_private *mdp = netdev_priv(ndev);
struct sh_eth_txdesc *txdesc;
u32 entry;
- unsigned long flags;
-
- spin_lock_irqsave(&mdp->lock, flags);
- if ((mdp->cur_tx - mdp->dirty_tx) >= (mdp->num_tx_ring - 4)) {
- if (!sh_eth_txfree(ndev)) {
- if (netif_msg_tx_queued(mdp))
- dev_warn(&ndev->dev, "TxFD exhausted.\n");
- netif_stop_queue(ndev);
- spin_unlock_irqrestore(&mdp->lock, flags);
- return NETDEV_TX_BUSY;
- }
- }
- spin_unlock_irqrestore(&mdp->lock, flags);
entry = mdp->cur_tx % mdp->num_tx_ring;
mdp->tx_skbuff[entry] = skb;
@@ -1716,6 +1732,13 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
if (!(sh_eth_read(ndev, EDTRR) & sh_eth_get_edtrr_trns(mdp)))
sh_eth_write(ndev, sh_eth_get_edtrr_trns(mdp), EDTRR);
+ if ((mdp->cur_tx - mdp->dirty_tx) >= (mdp->num_tx_ring - 4)) {
+ if (netif_msg_tx_queued(mdp)) {
+ dev_warn(&ndev->dev, "TxFD exhausted.\n");
+ netif_stop_queue(ndev);
+ }
+ }
+
return NETDEV_TX_OK;
}
@@ -1739,6 +1762,8 @@ static int sh_eth_close(struct net_device *ndev)
phy_disconnect(mdp->phydev);
}
+ napi_disable(&mdp->napi);
+
free_irq(ndev->irq, ndev);
/* Free all the skbuffs in the Rx queue. */
@@ -2368,6 +2393,9 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
#endif
sh_eth_set_default_cpu_data(mdp->cd);
+ mdp->ndev = ndev;
+ netif_napi_add(ndev, &mdp->napi, sh_eth_poll, SH_ETH_NAPI_WEIGHT);
+
/* set function */
ndev->netdev_ops = &sh_eth_netdev_ops;
SET_ETHTOOL_OPS(ndev, &sh_eth_ethtool_ops);
diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h
index f1dbc27..93dad7b 100644
--- a/drivers/net/ethernet/renesas/sh_eth.h
+++ b/drivers/net/ethernet/renesas/sh_eth.h
@@ -35,6 +35,7 @@
#define PKT_BUF_SZ 1538
#define SH_ETH_TSU_TIMEOUT_MS 500
#define SH_ETH_TSU_CAM_ENTRIES 32
+#define SH_ETH_NAPI_WEIGHT 32
enum {
/* E-DMAC registers */
@@ -728,6 +729,8 @@ struct sh_eth_private {
int duplex;
int port; /* for TSU */
int vlan_num_ids; /* for VLAN tag filter */
+ struct napi_struct napi;
+ struct net_device *ndev;
unsigned no_ether_link:1;
unsigned ether_link_active_low:1;
--
1.7.1
^ permalink raw reply related
* [PATCH net-next 4/5] net: sh_eth: add support for set_ringparam/get_ringparam
From: Shimoda, Yoshihiro @ 2012-06-12 5:19 UTC (permalink / raw)
To: netdev; +Cc: SH-Linux
This patch supports the ethtool's set_ringparam() and get_ringparam().
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/net/ethernet/renesas/sh_eth.c | 139 +++++++++++++++++++++++++--------
drivers/net/ethernet/renesas/sh_eth.h | 6 ++
2 files changed, 112 insertions(+), 33 deletions(-)
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index ff5a4a9..c64a31c 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -739,7 +739,7 @@ static void sh_eth_ring_free(struct net_device *ndev)
/* Free Rx skb ringbuffer */
if (mdp->rx_skbuff) {
- for (i = 0; i < RX_RING_SIZE; i++) {
+ for (i = 0; i < mdp->num_rx_ring; i++) {
if (mdp->rx_skbuff[i])
dev_kfree_skb(mdp->rx_skbuff[i]);
}
@@ -749,7 +749,7 @@ static void sh_eth_ring_free(struct net_device *ndev)
/* Free Tx skb ringbuffer */
if (mdp->tx_skbuff) {
- for (i = 0; i < TX_RING_SIZE; i++) {
+ for (i = 0; i < mdp->num_tx_ring; i++) {
if (mdp->tx_skbuff[i])
dev_kfree_skb(mdp->tx_skbuff[i]);
}
@@ -766,8 +766,8 @@ static void sh_eth_ring_format(struct net_device *ndev)
struct sk_buff *skb;
struct sh_eth_rxdesc *rxdesc = NULL;
struct sh_eth_txdesc *txdesc = NULL;
- int rx_ringsize = sizeof(*rxdesc) * RX_RING_SIZE;
- int tx_ringsize = sizeof(*txdesc) * TX_RING_SIZE;
+ int rx_ringsize = sizeof(*rxdesc) * mdp->num_rx_ring;
+ int tx_ringsize = sizeof(*txdesc) * mdp->num_tx_ring;
mdp->cur_rx = mdp->cur_tx = 0;
mdp->dirty_rx = mdp->dirty_tx = 0;
@@ -775,7 +775,7 @@ static void sh_eth_ring_format(struct net_device *ndev)
memset(mdp->rx_ring, 0, rx_ringsize);
/* build Rx ring buffer */
- for (i = 0; i < RX_RING_SIZE; i++) {
+ for (i = 0; i < mdp->num_rx_ring; i++) {
/* skb */
mdp->rx_skbuff[i] = NULL;
skb = netdev_alloc_skb(ndev, mdp->rx_buf_sz);
@@ -801,7 +801,7 @@ static void sh_eth_ring_format(struct net_device *ndev)
}
}
- mdp->dirty_rx = (u32) (i - RX_RING_SIZE);
+ mdp->dirty_rx = (u32) (i - mdp->num_rx_ring);
/* Mark the last entry as wrapping the ring. */
rxdesc->status |= cpu_to_edmac(mdp, RD_RDEL);
@@ -809,7 +809,7 @@ static void sh_eth_ring_format(struct net_device *ndev)
memset(mdp->tx_ring, 0, tx_ringsize);
/* build Tx ring buffer */
- for (i = 0; i < TX_RING_SIZE; i++) {
+ for (i = 0; i < mdp->num_tx_ring; i++) {
mdp->tx_skbuff[i] = NULL;
txdesc = &mdp->tx_ring[i];
txdesc->status = cpu_to_edmac(mdp, TD_TFP);
@@ -843,7 +843,7 @@ static int sh_eth_ring_init(struct net_device *ndev)
mdp->rx_buf_sz += NET_IP_ALIGN;
/* Allocate RX and TX skb rings */
- mdp->rx_skbuff = kmalloc(sizeof(*mdp->rx_skbuff) * RX_RING_SIZE,
+ mdp->rx_skbuff = kmalloc(sizeof(*mdp->rx_skbuff) * mdp->num_rx_ring,
GFP_KERNEL);
if (!mdp->rx_skbuff) {
dev_err(&ndev->dev, "Cannot allocate Rx skb\n");
@@ -851,7 +851,7 @@ static int sh_eth_ring_init(struct net_device *ndev)
return ret;
}
- mdp->tx_skbuff = kmalloc(sizeof(*mdp->tx_skbuff) * TX_RING_SIZE,
+ mdp->tx_skbuff = kmalloc(sizeof(*mdp->tx_skbuff) * mdp->num_tx_ring,
GFP_KERNEL);
if (!mdp->tx_skbuff) {
dev_err(&ndev->dev, "Cannot allocate Tx skb\n");
@@ -860,7 +860,7 @@ static int sh_eth_ring_init(struct net_device *ndev)
}
/* Allocate all Rx descriptors. */
- rx_ringsize = sizeof(struct sh_eth_rxdesc) * RX_RING_SIZE;
+ rx_ringsize = sizeof(struct sh_eth_rxdesc) * mdp->num_rx_ring;
mdp->rx_ring = dma_alloc_coherent(NULL, rx_ringsize, &mdp->rx_desc_dma,
GFP_KERNEL);
@@ -874,7 +874,7 @@ static int sh_eth_ring_init(struct net_device *ndev)
mdp->dirty_rx = 0;
/* Allocate all Tx descriptors. */
- tx_ringsize = sizeof(struct sh_eth_txdesc) * TX_RING_SIZE;
+ tx_ringsize = sizeof(struct sh_eth_txdesc) * mdp->num_tx_ring;
mdp->tx_ring = dma_alloc_coherent(NULL, tx_ringsize, &mdp->tx_desc_dma,
GFP_KERNEL);
if (!mdp->tx_ring) {
@@ -903,21 +903,21 @@ static void sh_eth_free_dma_buffer(struct sh_eth_private *mdp)
int ringsize;
if (mdp->rx_ring) {
- ringsize = sizeof(struct sh_eth_rxdesc) * RX_RING_SIZE;
+ ringsize = sizeof(struct sh_eth_rxdesc) * mdp->num_rx_ring;
dma_free_coherent(NULL, ringsize, mdp->rx_ring,
mdp->rx_desc_dma);
mdp->rx_ring = NULL;
}
if (mdp->tx_ring) {
- ringsize = sizeof(struct sh_eth_txdesc) * TX_RING_SIZE;
+ ringsize = sizeof(struct sh_eth_txdesc) * mdp->num_tx_ring;
dma_free_coherent(NULL, ringsize, mdp->tx_ring,
mdp->tx_desc_dma);
mdp->tx_ring = NULL;
}
}
-static int sh_eth_dev_init(struct net_device *ndev)
+static int sh_eth_dev_init(struct net_device *ndev, bool start)
{
int ret = 0;
struct sh_eth_private *mdp = netdev_priv(ndev);
@@ -963,7 +963,8 @@ static int sh_eth_dev_init(struct net_device *ndev)
RFLR);
sh_eth_write(ndev, sh_eth_read(ndev, EESR), EESR);
- sh_eth_write(ndev, mdp->cd->eesipr_value, EESIPR);
+ if (start)
+ sh_eth_write(ndev, mdp->cd->eesipr_value, EESIPR);
/* PAUSE Prohibition */
val = (sh_eth_read(ndev, ECMR) & ECMR_DM) |
@@ -978,7 +979,8 @@ static int sh_eth_dev_init(struct net_device *ndev)
sh_eth_write(ndev, mdp->cd->ecsr_value, ECSR);
/* E-MAC Interrupt Enable register */
- sh_eth_write(ndev, mdp->cd->ecsipr_value, ECSIPR);
+ if (start)
+ sh_eth_write(ndev, mdp->cd->ecsipr_value, ECSIPR);
/* Set MAC address */
update_mac_address(ndev);
@@ -991,10 +993,12 @@ static int sh_eth_dev_init(struct net_device *ndev)
if (mdp->cd->tpauser)
sh_eth_write(ndev, TPAUSER_UNLIMITED, TPAUSER);
- /* Setting the Rx mode will start the Rx process. */
- sh_eth_write(ndev, EDRRR_R, EDRRR);
+ if (start) {
+ /* Setting the Rx mode will start the Rx process. */
+ sh_eth_write(ndev, EDRRR_R, EDRRR);
- netif_start_queue(ndev);
+ netif_start_queue(ndev);
+ }
return ret;
}
@@ -1008,7 +1012,7 @@ static int sh_eth_txfree(struct net_device *ndev)
int entry = 0;
for (; mdp->cur_tx - mdp->dirty_tx > 0; mdp->dirty_tx++) {
- entry = mdp->dirty_tx % TX_RING_SIZE;
+ entry = mdp->dirty_tx % mdp->num_tx_ring;
txdesc = &mdp->tx_ring[entry];
if (txdesc->status & cpu_to_edmac(mdp, TD_TACT))
break;
@@ -1021,7 +1025,7 @@ static int sh_eth_txfree(struct net_device *ndev)
freeNum++;
}
txdesc->status = cpu_to_edmac(mdp, TD_TFP);
- if (entry >= TX_RING_SIZE - 1)
+ if (entry >= mdp->num_tx_ring - 1)
txdesc->status |= cpu_to_edmac(mdp, TD_TDLE);
ndev->stats.tx_packets++;
@@ -1036,8 +1040,8 @@ static int sh_eth_rx(struct net_device *ndev)
struct sh_eth_private *mdp = netdev_priv(ndev);
struct sh_eth_rxdesc *rxdesc;
- int entry = mdp->cur_rx % RX_RING_SIZE;
- int boguscnt = (mdp->dirty_rx + RX_RING_SIZE) - mdp->cur_rx;
+ int entry = mdp->cur_rx % mdp->num_rx_ring;
+ int boguscnt = (mdp->dirty_rx + mdp->num_rx_ring) - mdp->cur_rx;
struct sk_buff *skb;
u16 pkt_len = 0;
u32 desc_status;
@@ -1088,13 +1092,13 @@ static int sh_eth_rx(struct net_device *ndev)
ndev->stats.rx_bytes += pkt_len;
}
rxdesc->status |= cpu_to_edmac(mdp, RD_RACT);
- entry = (++mdp->cur_rx) % RX_RING_SIZE;
+ entry = (++mdp->cur_rx) % mdp->num_rx_ring;
rxdesc = &mdp->rx_ring[entry];
}
/* Refill the Rx ring buffers. */
for (; mdp->cur_rx - mdp->dirty_rx > 0; mdp->dirty_rx++) {
- entry = mdp->dirty_rx % RX_RING_SIZE;
+ entry = mdp->dirty_rx % mdp->num_rx_ring;
rxdesc = &mdp->rx_ring[entry];
/* The size of the buffer is 16 byte boundary. */
rxdesc->buffer_length = ALIGN(mdp->rx_buf_sz, 16);
@@ -1111,7 +1115,7 @@ static int sh_eth_rx(struct net_device *ndev)
skb_checksum_none_assert(skb);
rxdesc->addr = virt_to_phys(PTR_ALIGN(skb->data, 4));
}
- if (entry >= RX_RING_SIZE - 1)
+ if (entry >= mdp->num_rx_ring - 1)
rxdesc->status |=
cpu_to_edmac(mdp, RD_RACT | RD_RFP | RD_RDEL);
else
@@ -1509,6 +1513,71 @@ static void sh_eth_get_strings(struct net_device *ndev, u32 stringset, u8 *data)
}
}
+static void sh_eth_get_ringparam(struct net_device *ndev,
+ struct ethtool_ringparam *ring)
+{
+ struct sh_eth_private *mdp = netdev_priv(ndev);
+
+ ring->rx_max_pending = RX_RING_MAX;
+ ring->tx_max_pending = TX_RING_MAX;
+ ring->rx_pending = mdp->num_rx_ring;
+ ring->tx_pending = mdp->num_tx_ring;
+}
+
+static int sh_eth_set_ringparam(struct net_device *ndev,
+ struct ethtool_ringparam *ring)
+{
+ struct sh_eth_private *mdp = netdev_priv(ndev);
+ int ret;
+
+ if (ring->tx_pending > TX_RING_MAX ||
+ ring->rx_pending > RX_RING_MAX ||
+ ring->tx_pending < TX_RING_MIN ||
+ ring->rx_pending < RX_RING_MIN)
+ return -EINVAL;
+ if (ring->rx_mini_pending || ring->rx_jumbo_pending)
+ return -EINVAL;
+
+ if (netif_running(ndev)) {
+ netif_tx_disable(ndev);
+ /* Disable interrupts by clearing the interrupt mask. */
+ sh_eth_write(ndev, 0x0000, EESIPR);
+ /* Stop the chip's Tx and Rx processes. */
+ sh_eth_write(ndev, 0, EDTRR);
+ sh_eth_write(ndev, 0, EDRRR);
+ synchronize_irq(ndev->irq);
+ }
+
+ /* Free all the skbuffs in the Rx queue. */
+ sh_eth_ring_free(ndev);
+ /* Free DMA buffer */
+ sh_eth_free_dma_buffer(mdp);
+
+ /* Set new parameters */
+ mdp->num_rx_ring = ring->rx_pending;
+ mdp->num_tx_ring = ring->tx_pending;
+
+ ret = sh_eth_ring_init(ndev);
+ if (ret < 0) {
+ dev_err(&ndev->dev, "%s: sh_eth_ring_init failed.\n", __func__);
+ return ret;
+ }
+ ret = sh_eth_dev_init(ndev, false);
+ if (ret < 0) {
+ dev_err(&ndev->dev, "%s: sh_eth_dev_init failed.\n", __func__);
+ return ret;
+ }
+
+ if (netif_running(ndev)) {
+ sh_eth_write(ndev, mdp->cd->eesipr_value, EESIPR);
+ /* Setting the Rx mode will start the Rx process. */
+ sh_eth_write(ndev, EDRRR_R, EDRRR);
+ netif_wake_queue(ndev);
+ }
+
+ return 0;
+}
+
static const struct ethtool_ops sh_eth_ethtool_ops = {
.get_settings = sh_eth_get_settings,
.set_settings = sh_eth_set_settings,
@@ -1519,6 +1588,8 @@ static const struct ethtool_ops sh_eth_ethtool_ops = {
.get_strings = sh_eth_get_strings,
.get_ethtool_stats = sh_eth_get_ethtool_stats,
.get_sset_count = sh_eth_get_sset_count,
+ .get_ringparam = sh_eth_get_ringparam,
+ .set_ringparam = sh_eth_set_ringparam,
};
/* network device open function */
@@ -1549,7 +1620,7 @@ static int sh_eth_open(struct net_device *ndev)
goto out_free_irq;
/* device init */
- ret = sh_eth_dev_init(ndev);
+ ret = sh_eth_dev_init(ndev, true);
if (ret)
goto out_free_irq;
@@ -1583,7 +1654,7 @@ static void sh_eth_tx_timeout(struct net_device *ndev)
ndev->stats.tx_errors++;
/* Free all the skbuffs in the Rx queue. */
- for (i = 0; i < RX_RING_SIZE; i++) {
+ for (i = 0; i < mdp->num_rx_ring; i++) {
rxdesc = &mdp->rx_ring[i];
rxdesc->status = 0;
rxdesc->addr = 0xBADF00D0;
@@ -1591,14 +1662,14 @@ static void sh_eth_tx_timeout(struct net_device *ndev)
dev_kfree_skb(mdp->rx_skbuff[i]);
mdp->rx_skbuff[i] = NULL;
}
- for (i = 0; i < TX_RING_SIZE; i++) {
+ for (i = 0; i < mdp->num_tx_ring; i++) {
if (mdp->tx_skbuff[i])
dev_kfree_skb(mdp->tx_skbuff[i]);
mdp->tx_skbuff[i] = NULL;
}
/* device init */
- sh_eth_dev_init(ndev);
+ sh_eth_dev_init(ndev, true);
}
/* Packet transmit function */
@@ -1610,7 +1681,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
unsigned long flags;
spin_lock_irqsave(&mdp->lock, flags);
- if ((mdp->cur_tx - mdp->dirty_tx) >= (TX_RING_SIZE - 4)) {
+ if ((mdp->cur_tx - mdp->dirty_tx) >= (mdp->num_tx_ring - 4)) {
if (!sh_eth_txfree(ndev)) {
if (netif_msg_tx_queued(mdp))
dev_warn(&ndev->dev, "TxFD exhausted.\n");
@@ -1621,7 +1692,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
}
spin_unlock_irqrestore(&mdp->lock, flags);
- entry = mdp->cur_tx % TX_RING_SIZE;
+ entry = mdp->cur_tx % mdp->num_tx_ring;
mdp->tx_skbuff[entry] = skb;
txdesc = &mdp->tx_ring[entry];
/* soft swap. */
@@ -1635,7 +1706,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
else
txdesc->buffer_length = skb->len;
- if (entry >= TX_RING_SIZE - 1)
+ if (entry >= mdp->num_tx_ring - 1)
txdesc->status |= cpu_to_edmac(mdp, TD_TACT | TD_TDLE);
else
txdesc->status |= cpu_to_edmac(mdp, TD_TACT);
@@ -2265,6 +2336,8 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
ether_setup(ndev);
mdp = netdev_priv(ndev);
+ mdp->num_tx_ring = TX_RING_SIZE;
+ mdp->num_rx_ring = RX_RING_SIZE;
mdp->addr = ioremap(res->start, resource_size(res));
if (mdp->addr == NULL) {
ret = -ENOMEM;
diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h
index 9525199..f1dbc27 100644
--- a/drivers/net/ethernet/renesas/sh_eth.h
+++ b/drivers/net/ethernet/renesas/sh_eth.h
@@ -27,6 +27,10 @@
#define TX_TIMEOUT (5*HZ)
#define TX_RING_SIZE 64 /* Tx ring size */
#define RX_RING_SIZE 64 /* Rx ring size */
+#define TX_RING_MIN 64
+#define RX_RING_MIN 64
+#define TX_RING_MAX 1024
+#define RX_RING_MAX 1024
#define ETHERSMALL 60
#define PKT_BUF_SZ 1538
#define SH_ETH_TSU_TIMEOUT_MS 500
@@ -700,6 +704,8 @@ struct sh_eth_private {
const u16 *reg_offset;
void __iomem *addr;
void __iomem *tsu_addr;
+ u32 num_rx_ring;
+ u32 num_tx_ring;
dma_addr_t rx_desc_dma;
dma_addr_t tx_desc_dma;
struct sh_eth_rxdesc *rx_ring;
--
1.7.1
^ permalink raw reply related
* [PATCH net-next 3/5] net: sh_eth: fix up the buffer pointers
From: Shimoda, Yoshihiro @ 2012-06-12 5:19 UTC (permalink / raw)
To: netdev; +Cc: SH-Linux
After freeing the buffer, the driver should change the value of
the pointer to NULL.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/net/ethernet/renesas/sh_eth.c | 31 ++++++++++++++++++++++++-------
1 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index 906e410..ff5a4a9 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -745,6 +745,7 @@ static void sh_eth_ring_free(struct net_device *ndev)
}
}
kfree(mdp->rx_skbuff);
+ mdp->rx_skbuff = NULL;
/* Free Tx skb ringbuffer */
if (mdp->tx_skbuff) {
@@ -754,6 +755,7 @@ static void sh_eth_ring_free(struct net_device *ndev)
}
}
kfree(mdp->tx_skbuff);
+ mdp->tx_skbuff = NULL;
}
/* format skb and descriptor buffer */
@@ -890,10 +892,31 @@ desc_ring_free:
skb_ring_free:
/* Free Rx and Tx skb ring buffer */
sh_eth_ring_free(ndev);
+ mdp->tx_ring = NULL;
+ mdp->rx_ring = NULL;
return ret;
}
+static void sh_eth_free_dma_buffer(struct sh_eth_private *mdp)
+{
+ int ringsize;
+
+ if (mdp->rx_ring) {
+ ringsize = sizeof(struct sh_eth_rxdesc) * RX_RING_SIZE;
+ dma_free_coherent(NULL, ringsize, mdp->rx_ring,
+ mdp->rx_desc_dma);
+ mdp->rx_ring = NULL;
+ }
+
+ if (mdp->tx_ring) {
+ ringsize = sizeof(struct sh_eth_txdesc) * TX_RING_SIZE;
+ dma_free_coherent(NULL, ringsize, mdp->tx_ring,
+ mdp->tx_desc_dma);
+ mdp->tx_ring = NULL;
+ }
+}
+
static int sh_eth_dev_init(struct net_device *ndev)
{
int ret = 0;
@@ -1629,7 +1652,6 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
static int sh_eth_close(struct net_device *ndev)
{
struct sh_eth_private *mdp = netdev_priv(ndev);
- int ringsize;
netif_stop_queue(ndev);
@@ -1652,12 +1674,7 @@ static int sh_eth_close(struct net_device *ndev)
sh_eth_ring_free(ndev);
/* free DMA buffer */
- ringsize = sizeof(struct sh_eth_rxdesc) * RX_RING_SIZE;
- dma_free_coherent(NULL, ringsize, mdp->rx_ring, mdp->rx_desc_dma);
-
- /* free DMA buffer */
- ringsize = sizeof(struct sh_eth_txdesc) * TX_RING_SIZE;
- dma_free_coherent(NULL, ringsize, mdp->tx_ring, mdp->tx_desc_dma);
+ sh_eth_free_dma_buffer(mdp);
pm_runtime_put_sync(&mdp->pdev->dev);
--
1.7.1
^ permalink raw reply related
* [PATCH net-next 2/5] net: sh_eth: remove unnecessary members/definitions
From: Shimoda, Yoshihiro @ 2012-06-12 5:19 UTC (permalink / raw)
To: netdev; +Cc: SH-Linux
This patch removes unnecessary members in sh_th_private.
This patch also removes unnecessary definitions in sh_eth.h
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/net/ethernet/renesas/sh_eth.c | 7 +---
drivers/net/ethernet/renesas/sh_eth.h | 69 ---------------------------------
2 files changed, 1 insertions(+), 75 deletions(-)
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index 4ccfd0f..906e410 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -898,7 +898,6 @@ static int sh_eth_dev_init(struct net_device *ndev)
{
int ret = 0;
struct sh_eth_private *mdp = netdev_priv(ndev);
- u_int32_t rx_int_var, tx_int_var;
u32 val;
/* Soft Reset */
@@ -926,9 +925,7 @@ static int sh_eth_dev_init(struct net_device *ndev)
/* Frame recv control */
sh_eth_write(ndev, mdp->cd->rmcr_value, RMCR);
- rx_int_var = mdp->rx_int_var = DESC_I_RINT8 | DESC_I_RINT5;
- tx_int_var = mdp->tx_int_var = DESC_I_TINT2;
- sh_eth_write(ndev, rx_int_var | tx_int_var, TRSCER);
+ sh_eth_write(ndev, DESC_I_RINT8 | DESC_I_RINT5 | DESC_I_TINT2, TRSCER);
if (mdp->cd->bculr)
sh_eth_write(ndev, 0x800, BCULR); /* Burst sycle set */
@@ -2288,8 +2285,6 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
/* debug message level */
mdp->msg_enable = SH_ETH_DEF_MSG_ENABLE;
- mdp->post_rx = POST_RX >> (devno << 1);
- mdp->post_fw = POST_FW >> (devno << 1);
/* read and set MAC address */
read_mac_address(ndev, pd->mac_addr);
diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h
index 9e8e4d5..9525199 100644
--- a/drivers/net/ethernet/renesas/sh_eth.h
+++ b/drivers/net/ethernet/renesas/sh_eth.h
@@ -585,71 +585,6 @@ enum RPADIR_BIT {
/* FDR */
#define DEFAULT_FDR_INIT 0x00000707
-enum phy_offsets {
- PHY_CTRL = 0, PHY_STAT = 1, PHY_IDT1 = 2, PHY_IDT2 = 3,
- PHY_ANA = 4, PHY_ANL = 5, PHY_ANE = 6,
- PHY_16 = 16,
-};
-
-/* PHY_CTRL */
-enum PHY_CTRL_BIT {
- PHY_C_RESET = 0x8000, PHY_C_LOOPBK = 0x4000, PHY_C_SPEEDSL = 0x2000,
- PHY_C_ANEGEN = 0x1000, PHY_C_PWRDN = 0x0800, PHY_C_ISO = 0x0400,
- PHY_C_RANEG = 0x0200, PHY_C_DUPLEX = 0x0100, PHY_C_COLT = 0x0080,
-};
-#define DM9161_PHY_C_ANEGEN 0 /* auto nego special */
-
-/* PHY_STAT */
-enum PHY_STAT_BIT {
- PHY_S_100T4 = 0x8000, PHY_S_100X_F = 0x4000, PHY_S_100X_H = 0x2000,
- PHY_S_10T_F = 0x1000, PHY_S_10T_H = 0x0800, PHY_S_ANEGC = 0x0020,
- PHY_S_RFAULT = 0x0010, PHY_S_ANEGA = 0x0008, PHY_S_LINK = 0x0004,
- PHY_S_JAB = 0x0002, PHY_S_EXTD = 0x0001,
-};
-
-/* PHY_ANA */
-enum PHY_ANA_BIT {
- PHY_A_NP = 0x8000, PHY_A_ACK = 0x4000, PHY_A_RF = 0x2000,
- PHY_A_FCS = 0x0400, PHY_A_T4 = 0x0200, PHY_A_FDX = 0x0100,
- PHY_A_HDX = 0x0080, PHY_A_10FDX = 0x0040, PHY_A_10HDX = 0x0020,
- PHY_A_SEL = 0x001e,
-};
-/* PHY_ANL */
-enum PHY_ANL_BIT {
- PHY_L_NP = 0x8000, PHY_L_ACK = 0x4000, PHY_L_RF = 0x2000,
- PHY_L_FCS = 0x0400, PHY_L_T4 = 0x0200, PHY_L_FDX = 0x0100,
- PHY_L_HDX = 0x0080, PHY_L_10FDX = 0x0040, PHY_L_10HDX = 0x0020,
- PHY_L_SEL = 0x001f,
-};
-
-/* PHY_ANE */
-enum PHY_ANE_BIT {
- PHY_E_PDF = 0x0010, PHY_E_LPNPA = 0x0008, PHY_E_NPA = 0x0004,
- PHY_E_PRX = 0x0002, PHY_E_LPANEGA = 0x0001,
-};
-
-/* DM9161 */
-enum PHY_16_BIT {
- PHY_16_BP4B45 = 0x8000, PHY_16_BPSCR = 0x4000, PHY_16_BPALIGN = 0x2000,
- PHY_16_BP_ADPOK = 0x1000, PHY_16_Repeatmode = 0x0800,
- PHY_16_TXselect = 0x0400,
- PHY_16_Rsvd = 0x0200, PHY_16_RMIIEnable = 0x0100,
- PHY_16_Force100LNK = 0x0080,
- PHY_16_APDLED_CTL = 0x0040, PHY_16_COLLED_CTL = 0x0020,
- PHY_16_RPDCTR_EN = 0x0010,
- PHY_16_ResetStMch = 0x0008, PHY_16_PreamSupr = 0x0004,
- PHY_16_Sleepmode = 0x0002,
- PHY_16_RemoteLoopOut = 0x0001,
-};
-
-#define POST_RX 0x08
-#define POST_FW 0x04
-#define POST0_RX (POST_RX)
-#define POST0_FW (POST_FW)
-#define POST1_RX (POST_RX >> 2)
-#define POST1_FW (POST_FW >> 2)
-#define POST_ALL (POST0_RX | POST0_FW | POST1_RX | POST1_FW)
-
/* ARSTR */
enum ARSTR_BIT { ARSTR_ARSTR = 0x00000001, };
@@ -785,10 +720,6 @@ struct sh_eth_private {
int msg_enable;
int speed;
int duplex;
- u32 rx_int_var, tx_int_var; /* interrupt control variables */
- char post_rx; /* POST receive */
- char post_fw; /* POST forward */
- struct net_device_stats tsu_stats; /* TSU forward status */
int port; /* for TSU */
int vlan_num_ids; /* for VLAN tag filter */
--
1.7.1
^ permalink raw reply related
* [PATCH net-next 1/5] net: sh_eth: remove unnecessary function
From: Shimoda, Yoshihiro @ 2012-06-12 5:18 UTC (permalink / raw)
To: netdev; +Cc: SH-Linux
The sh_eth_timer() called mod_timer() for itself.
So, this patch removes the function.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/net/ethernet/renesas/sh_eth.c | 22 ----------------------
drivers/net/ethernet/renesas/sh_eth.h | 1 -
2 files changed, 0 insertions(+), 23 deletions(-)
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index 667169b..4ccfd0f 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -1291,14 +1291,6 @@ other_irq:
return ret;
}
-static void sh_eth_timer(unsigned long data)
-{
- struct net_device *ndev = (struct net_device *)data;
- struct sh_eth_private *mdp = netdev_priv(ndev);
-
- mod_timer(&mdp->timer, jiffies + (10 * HZ));
-}
-
/* PHY state control function */
static void sh_eth_adjust_link(struct net_device *ndev)
{
@@ -1546,11 +1538,6 @@ static int sh_eth_open(struct net_device *ndev)
if (ret)
goto out_free_irq;
- /* Set the timer to check for link beat. */
- init_timer(&mdp->timer);
- mdp->timer.expires = (jiffies + (24 * HZ)) / 10;/* 2.4 sec. */
- setup_timer(&mdp->timer, sh_eth_timer, (unsigned long)ndev);
-
return ret;
out_free_irq:
@@ -1575,9 +1562,6 @@ static void sh_eth_tx_timeout(struct net_device *ndev)
/* tx_errors count up */
ndev->stats.tx_errors++;
- /* timer off */
- del_timer_sync(&mdp->timer);
-
/* Free all the skbuffs in the Rx queue. */
for (i = 0; i < RX_RING_SIZE; i++) {
rxdesc = &mdp->rx_ring[i];
@@ -1595,10 +1579,6 @@ static void sh_eth_tx_timeout(struct net_device *ndev)
/* device init */
sh_eth_dev_init(ndev);
-
- /* timer on */
- mdp->timer.expires = (jiffies + (24 * HZ)) / 10;/* 2.4 sec. */
- add_timer(&mdp->timer);
}
/* Packet transmit function */
@@ -1671,8 +1651,6 @@ static int sh_eth_close(struct net_device *ndev)
free_irq(ndev->irq, ndev);
- del_timer_sync(&mdp->timer);
-
/* Free all the skbuffs in the Rx queue. */
sh_eth_ring_free(ndev);
diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h
index 57b8e1f..9e8e4d5 100644
--- a/drivers/net/ethernet/renesas/sh_eth.h
+++ b/drivers/net/ethernet/renesas/sh_eth.h
@@ -771,7 +771,6 @@ struct sh_eth_private {
struct sh_eth_txdesc *tx_ring;
struct sk_buff **rx_skbuff;
struct sk_buff **tx_skbuff;
- struct timer_list timer;
spinlock_t lock;
u32 cur_rx, dirty_rx; /* Producer/consumer ring indices */
u32 cur_tx, dirty_tx;
--
1.7.1
^ permalink raw reply related
* Re: 3.4-rc: NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out
From: Tomas Papan @ 2012-06-12 5:12 UTC (permalink / raw)
To: Francois Romieu; +Cc: netdev
In-Reply-To: <20120611215203.GA8860@electric-eye.fr.zoreil.com>
Hi,
the XID is
[ 2.780758] r8169 0000:03:00.0: eth1: RTL8168e/8111e at
0xffffc9000001c000, 80:ee:73:10:ad:44, XID 0c200000 IRQ 46
and the complete dmesg
[ 0.000000] Linux version 3.4.2 (root@anakin) (gcc version 4.5.3
(Gentoo 4.5.3-r2 p1.5, pie-0.4.7) ) #1 SMP PREEMPT Mon Jun 11 14:27:18
CEST 2012
[ 0.000000] Command line: panic=3
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009e800 (usable)
[ 0.000000] BIOS-e820: 000000000009e800 - 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 - 00000000bf780000 (usable)
[ 0.000000] BIOS-e820: 00000000bf780000 - 00000000bf78e000 (ACPI data)
[ 0.000000] BIOS-e820: 00000000bf78e000 - 00000000bf7d0000 (ACPI NVS)
[ 0.000000] BIOS-e820: 00000000bf7d0000 - 00000000bf7e0000 (reserved)
[ 0.000000] BIOS-e820: 00000000bf7ed000 - 00000000c0000000 (reserved)
[ 0.000000] BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
[ 0.000000] BIOS-e820: 00000000ffb00000 - 0000000100000000 (reserved)
[ 0.000000] BIOS-e820: 0000000100000000 - 0000000440000000 (usable)
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] DMI present.
[ 0.000000] DMI: Shuttle Inc. SH55J/SH55J, BIOS 080015 09/01/2010
[ 0.000000] e820 update range: 0000000000000000 - 0000000000010000
(usable) ==> (reserved)
[ 0.000000] e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
[ 0.000000] No AGP bridge found
[ 0.000000] last_pfn = 0x440000 max_arch_pfn = 0x400000000
[ 0.000000] MTRR default type: uncachable
[ 0.000000] MTRR fixed ranges enabled:
[ 0.000000] 00000-9FFFF write-back
[ 0.000000] A0000-BFFFF uncachable
[ 0.000000] C0000-E3FFF write-protect
[ 0.000000] E4000-E7FFF write-through
[ 0.000000] E8000-EBFFF write-protect
[ 0.000000] EC000-EFFFF write-through
[ 0.000000] F0000-FFFFF write-protect
[ 0.000000] MTRR variable ranges enabled:
[ 0.000000] 0 base 000000000 mask C00000000 write-back
[ 0.000000] 1 base 400000000 mask FC0000000 write-back
[ 0.000000] 2 base 0C0000000 mask FC0000000 uncachable
[ 0.000000] 3 disabled
[ 0.000000] 4 disabled
[ 0.000000] 5 disabled
[ 0.000000] 6 disabled
[ 0.000000] 7 disabled
[ 0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[ 0.000000] e820 update range: 00000000c0000000 - 0000000100000000
(usable) ==> (reserved)
[ 0.000000] last_pfn = 0xbf780 max_arch_pfn = 0x400000000
[ 0.000000] initial memory mapped : 0 - 20000000
[ 0.000000] Base memory trampoline at [ffff88000009c000] 9c000 size 8192
[ 0.000000] init_memory_mapping: 0000000000000000-00000000bf780000
[ 0.000000] 0000000000 - 00bf600000 page 2M
[ 0.000000] 00bf600000 - 00bf780000 page 4k
[ 0.000000] kernel direct mapping tables up to bf780000 @ 1fffb000-20000000
[ 0.000000] init_memory_mapping: 0000000100000000-0000000440000000
[ 0.000000] 0100000000 - 0440000000 page 2M
[ 0.000000] kernel direct mapping tables up to 440000000 @ bf76e000-bf780000
[ 0.000000] RAMDISK: 37edb000 - 37ff0000
[ 0.000000] ACPI: RSDP 00000000000f9b10 00024 (v02 ACPIAM)
[ 0.000000] ACPI: XSDT 00000000bf780100 0006C (v01 Shuttl Shuttle
20100901 MSFT 00000097)
[ 0.000000] ACPI: FACP 00000000bf780290 000F4 (v03 090110 FACP1159
20100901 MSFT 00000097)
[ 0.000000] ACPI: DSDT 00000000bf7805e0 0653F (v01 Shuttl SH55JV10
00000001 INTL 20051117)
[ 0.000000] ACPI: FACS 00000000bf78e000 00040
[ 0.000000] ACPI: APIC 00000000bf780390 0008C (v01 090110 APIC1159
20100901 MSFT 00000097)
[ 0.000000] ACPI: MCFG 00000000bf780420 0003C (v01 090110 OEMMCFG
20100901 MSFT 00000097)
[ 0.000000] ACPI: SLIC 00000000bf780460 00176 (v01 Shuttl Shuttle
20100901 MSFT 00000097)
[ 0.000000] ACPI: OEMB 00000000bf78e040 00072 (v01 090110 OEMB1159
20100901 MSFT 00000097)
[ 0.000000] ACPI: HPET 00000000bf78a5e0 00038 (v01 090110 OEMHPET
20100901 MSFT 00000097)
[ 0.000000] ACPI: GSCI 00000000bf78e0c0 02024 (v01 090110 GMCHSCI
20100901 MSFT 00000097)
[ 0.000000] ACPI: DMAR 00000000bf7900f0 00090 (v01 AMI OEMDMAR
00000001 MSFT 00000097)
[ 0.000000] ACPI: SSDT 00000000bf7913c0 00363 (v01 DpgPmm CpuPm
00000012 INTL 20051117)
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] Zone PFN ranges:
[ 0.000000] DMA 0x00000010 -> 0x00001000
[ 0.000000] DMA32 0x00001000 -> 0x00100000
[ 0.000000] Normal 0x00100000 -> 0x00440000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] Early memory PFN ranges
[ 0.000000] 0: 0x00000010 -> 0x0000009e
[ 0.000000] 0: 0x00000100 -> 0x000bf780
[ 0.000000] 0: 0x00100000 -> 0x00440000
[ 0.000000] On node 0 totalpages: 4192014
[ 0.000000] DMA zone: 64 pages used for memmap
[ 0.000000] DMA zone: 2 pages reserved
[ 0.000000] DMA zone: 3916 pages, LIFO batch:0
[ 0.000000] DMA32 zone: 16320 pages used for memmap
[ 0.000000] DMA32 zone: 763840 pages, LIFO batch:31
[ 0.000000] Normal zone: 53248 pages used for memmap
[ 0.000000] Normal zone: 3354624 pages, LIFO batch:31
[ 0.000000] ACPI: PM-Timer IO Port: 0x808
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x03] lapic_id[0x04] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x04] lapic_id[0x06] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x05] lapic_id[0x84] disabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x06] lapic_id[0x85] disabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x07] lapic_id[0x86] disabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x08] lapic_id[0x87] disabled)
[ 0.000000] ACPI: IOAPIC (id[0x07] address[0xfec00000] gsi_base[0])
[ 0.000000] IOAPIC[0]: apic_id 7, version 32, address 0xfec00000, GSI 0-23
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ2 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] ACPI: HPET id: 0x8086a701 base: 0xfed00000
[ 0.000000] SMP: Allowing 4 CPUs, 0 hotplug CPUs
[ 0.000000] nr_irqs_gsi: 40
[ 0.000000] Allocating PCI resources starting at c0000000 (gap:
c0000000:3ee00000)
[ 0.000000] setup_percpu: NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:4
nr_node_ids:1
[ 0.000000] PERCPU: Embedded 25 pages/cpu @ffff88043fc00000 s70976
r8192 d23232 u524288
[ 0.000000] pcpu-alloc: s70976 r8192 d23232 u524288 alloc=1*2097152
[ 0.000000] pcpu-alloc: [0] 0 1 2 3
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 4122380
[ 0.000000] Kernel command line: panic=3
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Dentry cache hash table entries: 2097152 (order: 12,
16777216 bytes)
[ 0.000000] Inode-cache hash table entries: 1048576 (order: 11,
8388608 bytes)
[ 0.000000] Checking aperture...
[ 0.000000] No AGP bridge found
[ 0.000000] Calgary: detecting Calgary via BIOS EBDA area
[ 0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing!
[ 0.000000] Memory: 16408404k/17825792k available (2964k kernel
code, 1057736k absent, 359652k reserved, 1296k data, 452k init)
[ 0.000000] SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0,
CPUs=4, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] NR_IRQS:4352 nr_irqs:712 16
[ 0.000000] Extended CMOS year: 2000
[ 0.000000] Console: colour dummy device 80x25
[ 0.000000] console [tty0] enabled
[ 0.000000] hpet clockevent registered
[ 0.000000] Fast TSC calibration using PIT
[ 0.001000] Detected 2798.395 MHz processor.
[ 0.000002] Calibrating delay loop (skipped), value calculated
using timer frequency.. 5596.79 BogoMIPS (lpj=2798395)
[ 0.000008] pid_max: default: 32768 minimum: 301
[ 0.000032] Mount-cache hash table entries: 256
[ 0.000161] CPU: Physical Processor ID: 0
[ 0.000164] CPU: Processor Core ID: 0
[ 0.000169] mce: CPU supports 9 MCE banks
[ 0.000179] CPU0: Thermal monitoring enabled (TM1)
[ 0.000186] using mwait in idle threads.
[ 0.000252] Freeing SMP alternatives: 16k freed
[ 0.000260] ACPI: Core revision 20120320
[ 0.002924] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.012904] CPU0: Intel(R) Core(TM) i5 CPU 760 @ 2.80GHz stepping 05
[ 0.114361] Performance Events: PEBS fmt1+, 16-deep LBR, Nehalem
events, Intel PMU driver.
[ 0.114369] CPU erratum AAJ80 worked around
[ 0.114372] CPUID marked event: 'bus cycles' unavailable
[ 0.114375] ... version: 3
[ 0.114378] ... bit width: 48
[ 0.114380] ... generic registers: 4
[ 0.114382] ... value mask: 0000ffffffffffff
[ 0.114385] ... max period: 000000007fffffff
[ 0.114388] ... fixed-purpose events: 3
[ 0.114390] ... event mask: 000000070000000f
[ 0.126335] Booting Node 0, Processors #1 #2 #3 Ok.
[ 0.173435] Brought up 4 CPUs
[ 0.173440] Total of 4 processors activated (22387.16 BogoMIPS).
[ 0.175918] devtmpfs: initialized
[ 0.176041] NET: Registered protocol family 16
[ 0.176159] ACPI: bus type pci registered
[ 0.176165] PCI: Using configuration type 1 for base access
[ 0.177864] bio: create slab <bio-0> at 0
[ 0.177909] ACPI: Added _OSI(Module Device)
[ 0.177912] ACPI: Added _OSI(Processor Device)
[ 0.177915] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 0.177918] ACPI: Added _OSI(Processor Aggregator Device)
[ 0.178667] ACPI: EC: Look up EC in DSDT
[ 0.179677] ACPI: Executed 1 blocks of module-level executable AML code
[ 0.181723] ACPI: SSDT 00000000bf790180 01238 (v01 DpgPmm P001Ist
00000011 INTL 20051117)
[ 0.181947] ACPI: Dynamic OEM Table Load:
[ 0.181951] ACPI: SSDT (null) 01238 (v01 DpgPmm P001Ist
00000011 INTL 20051117)
[ 0.182293] ACPI: Interpreter enabled
[ 0.182296] ACPI: (supports S0 S5)
[ 0.182303] ACPI: Using IOAPIC for interrupt routing
[ 0.188000] PCI: Using host bridge windows from ACPI; if necessary,
use "pci=nocrs" and report a bug
[ 0.188065] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[ 0.188170] pci_root PNP0A08:00: host bridge window [io 0x0000-0x0cf7]
[ 0.188174] pci_root PNP0A08:00: host bridge window [io 0x0d00-0xffff]
[ 0.188178] pci_root PNP0A08:00: host bridge window [mem
0x000a0000-0x000bffff]
[ 0.188182] pci_root PNP0A08:00: host bridge window [mem
0x000d0000-0x000dffff]
[ 0.188186] pci_root PNP0A08:00: host bridge window [mem
0xc0000000-0xdfffffff]
[ 0.188191] pci_root PNP0A08:00: host bridge window [mem
0xf0000000-0xfed8ffff]
[ 0.188220] PCI host bridge to bus 0000:00
[ 0.188223] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7]
[ 0.188227] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff]
[ 0.188230] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff]
[ 0.188234] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000dffff]
[ 0.188238] pci_bus 0000:00: root bus resource [mem 0xc0000000-0xdfffffff]
[ 0.188241] pci_bus 0000:00: root bus resource [mem 0xf0000000-0xfed8ffff]
[ 0.188252] pci 0000:00:00.0: [8086:d131] type 00 class 0x060000
[ 0.188296] pci 0000:00:03.0: [8086:d138] type 01 class 0x060400
[ 0.188339] pci 0000:00:03.0: PME# supported from D0 D3hot D3cold
[ 0.188355] pci 0000:00:08.0: [8086:d155] type 00 class 0x088000
[ 0.188404] pci 0000:00:08.1: [8086:d156] type 00 class 0x088000
[ 0.188453] pci 0000:00:08.2: [8086:d157] type 00 class 0x088000
[ 0.188499] pci 0000:00:08.3: [8086:d158] type 00 class 0x088000
[ 0.188543] pci 0000:00:10.0: [8086:d150] type 00 class 0x088000
[ 0.188581] pci 0000:00:10.1: [8086:d151] type 00 class 0x088000
[ 0.188638] pci 0000:00:1a.0: [8086:3b3c] type 00 class 0x0c0320
[ 0.188657] pci 0000:00:1a.0: reg 10: [mem 0xfbefc000-0xfbefc3ff]
[ 0.188738] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
[ 0.188758] pci 0000:00:1c.0: [8086:3b42] type 01 class 0x060400
[ 0.188819] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[ 0.188837] pci 0000:00:1c.1: [8086:3b44] type 01 class 0x060400
[ 0.188898] pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold
[ 0.188925] pci 0000:00:1d.0: [8086:3b34] type 00 class 0x0c0320
[ 0.188944] pci 0000:00:1d.0: reg 10: [mem 0xfbefa000-0xfbefa3ff]
[ 0.189025] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[ 0.189043] pci 0000:00:1e.0: [8086:244e] type 01 class 0x060401
[ 0.189098] pci 0000:00:1f.0: [8086:3b06] type 00 class 0x060100
[ 0.189213] pci 0000:00:1f.2: [8086:3b22] type 00 class 0x010601
[ 0.189230] pci 0000:00:1f.2: reg 10: [io 0xcc00-0xcc07]
[ 0.189237] pci 0000:00:1f.2: reg 14: [io 0xc880-0xc883]
[ 0.189243] pci 0000:00:1f.2: reg 18: [io 0xc800-0xc807]
[ 0.189250] pci 0000:00:1f.2: reg 1c: [io 0xc480-0xc483]
[ 0.189257] pci 0000:00:1f.2: reg 20: [io 0xc400-0xc41f]
[ 0.189264] pci 0000:00:1f.2: reg 24: [mem 0xfbef8000-0xfbef87ff]
[ 0.189304] pci 0000:00:1f.2: PME# supported from D3hot
[ 0.189319] pci 0000:00:1f.3: [8086:3b30] type 00 class 0x0c0500
[ 0.189332] pci 0000:00:1f.3: reg 10: [mem 0xfbef6000-0xfbef60ff 64bit]
[ 0.189351] pci 0000:00:1f.3: reg 20: [io 0x0400-0x041f]
[ 0.189416] pci 0000:01:00.0: [10ec:8168] type 00 class 0x020000
[ 0.189429] pci 0000:01:00.0: reg 10: [io 0xd800-0xd8ff]
[ 0.189452] pci 0000:01:00.0: reg 18: [mem 0xfbffb000-0xfbffbfff 64bit]
[ 0.189479] pci 0000:01:00.0: reg 30: [mem 0xfbfc0000-0xfbfdffff pref]
[ 0.189539] pci 0000:01:00.0: supports D1 D2
[ 0.189540] pci 0000:01:00.0: PME# supported from D1 D2 D3hot D3cold
[ 0.189552] pci 0000:01:00.0: disabling ASPM on pre-1.1 PCIe
device. You can enable it with 'pcie_aspm=force'
[ 0.189563] pci 0000:00:03.0: PCI bridge to [bus 01-01]
[ 0.189567] pci 0000:00:03.0: bridge window [io 0xd000-0xdfff]
[ 0.189570] pci 0000:00:03.0: bridge window [mem 0xfbf00000-0xfbffffff]
[ 0.189606] pci 0000:00:1c.0: PCI bridge to [bus 02-02]
[ 0.189665] pci 0000:03:00.0: [10ec:8168] type 00 class 0x020000
[ 0.189679] pci 0000:03:00.0: reg 10: [io 0xe800-0xe8ff]
[ 0.189705] pci 0000:03:00.0: reg 18: [mem 0xfafff000-0xfaffffff 64bit pref]
[ 0.189722] pci 0000:03:00.0: reg 20: [mem 0xfaff8000-0xfaffbfff 64bit pref]
[ 0.189792] pci 0000:03:00.0: supports D1 D2
[ 0.189794] pci 0000:03:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 0.191174] pci 0000:00:1c.1: PCI bridge to [bus 03-03]
[ 0.191184] pci 0000:00:1c.1: bridge window [io 0xe000-0xefff]
[ 0.191195] pci 0000:00:1c.1: bridge window [mem
0xfaf00000-0xfaffffff 64bit pref]
[ 0.191270] pci 0000:00:1e.0: PCI bridge to [bus 04-04] (subtractive decode)
[ 0.191280] pci 0000:00:1e.0: bridge window [io 0x0000-0x0cf7]
(subtractive decode)
[ 0.191282] pci 0000:00:1e.0: bridge window [io 0x0d00-0xffff]
(subtractive decode)
[ 0.191284] pci 0000:00:1e.0: bridge window [mem
0x000a0000-0x000bffff] (subtractive decode)
[ 0.191286] pci 0000:00:1e.0: bridge window [mem
0x000d0000-0x000dffff] (subtractive decode)
[ 0.191288] pci 0000:00:1e.0: bridge window [mem
0xc0000000-0xdfffffff] (subtractive decode)
[ 0.191290] pci 0000:00:1e.0: bridge window [mem
0xf0000000-0xfed8ffff] (subtractive decode)
[ 0.191305] pci_bus 0000:00: on NUMA node 0
[ 0.191307] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[ 0.191461] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.BR20._PRT]
[ 0.191484] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.BR21._PRT]
[ 0.191513] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P2._PRT]
[ 0.191534] pci0000:00: Unable to request _OSC control (_OSC
support mask: 0x1e)
[ 0.197033] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 6 7 *10 11 12 14 15)
[ 0.197069] ACPI: PCI Interrupt Link [LNKB] (IRQs *5)
[ 0.197101] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 6 7 10 11 12 *14 15)
[ 0.197135] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 6 7 10 11 12 14 *15)
[ 0.197172] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 6 7 10 11 12
14 15) *0, disabled.
[ 0.197208] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 6 7 10 11 12
14 15) *0, disabled.
[ 0.197244] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 6 7 10 11 12
14 15) *0, disabled.
[ 0.197279] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 6 7 10 *11 12 14 15)
[ 0.197372] vgaarb: loaded
[ 0.197443] SCSI subsystem initialized
[ 0.197483] libata version 3.00 loaded.
[ 0.197520] usbcore: registered new interface driver usbfs
[ 0.197539] usbcore: registered new interface driver hub
[ 0.197561] usbcore: registered new device driver usb
[ 0.197646] PCI: Using ACPI for IRQ routing
[ 0.197649] PCI: pci_cache_line_size set to 64 bytes
[ 0.197692] reserve RAM buffer: 000000000009e800 - 000000000009ffff
[ 0.197694] reserve RAM buffer: 00000000bf780000 - 00000000bfffffff
[ 0.197805] HPET: 8 timers in total, 4 timers will be used for per-cpu timer
[ 0.197814] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 40, 41, 42, 43, 0, 0
[ 0.197822] hpet0: 8 comparators, 64-bit 14.318180 MHz counter
[ 0.200157] hpet: hpet2 irq 40 for MSI
[ 0.201443] hpet: hpet3 irq 41 for MSI
[ 0.202454] hpet: hpet4 irq 42 for MSI
[ 0.203448] hpet: hpet5 irq 43 for MSI
[ 0.203464] Switching to clocksource hpet
[ 0.203533] pnp: PnP ACPI init
[ 0.203539] ACPI: bus type pnp registered
[ 0.203613] pnp 00:00: [bus 00-ff]
[ 0.203615] pnp 00:00: [io 0x0cf8-0x0cff]
[ 0.203616] pnp 00:00: [io 0x0000-0x0cf7 window]
[ 0.203618] pnp 00:00: [io 0x0d00-0xffff window]
[ 0.203620] pnp 00:00: [mem 0x000a0000-0x000bffff window]
[ 0.203621] pnp 00:00: [mem 0x000d0000-0x000dffff window]
[ 0.203623] pnp 00:00: [mem 0xc0000000-0xdfffffff window]
[ 0.203625] pnp 00:00: [mem 0xf0000000-0xfed8ffff window]
[ 0.203670] pnp 00:00: Plug and Play ACPI device, IDs PNP0a08
PNP0a03 (active)
[ 0.203678] pnp 00:01: [mem 0xfc000000-0xfcffffff]
[ 0.203680] pnp 00:01: [mem 0xfd000000-0xfdffffff]
[ 0.203681] pnp 00:01: [mem 0xfe000000-0xfebfffff]
[ 0.203683] pnp 00:01: [mem 0xfed14000-0xfed19fff]
[ 0.203718] system 00:01: [mem 0xfc000000-0xfcffffff] has been reserved
[ 0.203723] system 00:01: [mem 0xfd000000-0xfdffffff] has been reserved
[ 0.203727] system 00:01: [mem 0xfe000000-0xfebfffff] has been reserved
[ 0.203731] system 00:01: [mem 0xfed14000-0xfed19fff] has been reserved
[ 0.203735] system 00:01: Plug and Play ACPI device, IDs PNP0c01 (active)
[ 0.203761] pnp 00:02: [dma 4]
[ 0.203762] pnp 00:02: [io 0x0000-0x000f]
[ 0.203764] pnp 00:02: [io 0x0081-0x0083]
[ 0.203765] pnp 00:02: [io 0x0087]
[ 0.203766] pnp 00:02: [io 0x0089-0x008b]
[ 0.203768] pnp 00:02: [io 0x008f]
[ 0.203769] pnp 00:02: [io 0x00c0-0x00df]
[ 0.203796] pnp 00:02: Plug and Play ACPI device, IDs PNP0200 (active)
[ 0.203804] pnp 00:03: [io 0x0070-0x0071]
[ 0.203809] pnp 00:03: [irq 8]
[ 0.203836] pnp 00:03: Plug and Play ACPI device, IDs PNP0b00 (active)
[ 0.203842] pnp 00:04: [io 0x0061]
[ 0.203870] pnp 00:04: Plug and Play ACPI device, IDs PNP0800 (active)
[ 0.203877] pnp 00:05: [io 0x00f0-0x00ff]
[ 0.203881] pnp 00:05: [irq 13]
[ 0.203907] pnp 00:05: Plug and Play ACPI device, IDs PNP0c04 (active)
[ 0.204481] pnp 00:06: [io 0x0000-0xffffffffffffffff disabled]
[ 0.204483] pnp 00:06: [io 0x0a20-0x0a3f]
[ 0.204536] system 00:06: [io 0x0a20-0x0a3f] has been reserved
[ 0.204541] system 00:06: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.204646] pnp 00:07: [io 0x0000-0xffffffffffffffff disabled]
[ 0.204648] pnp 00:07: [io 0x0a00-0x0a0f]
[ 0.204650] pnp 00:07: [io 0x0a10-0x0a1f]
[ 0.204651] pnp 00:07: [io 0x0a20-0x0a2f]
[ 0.204688] system 00:07: [io 0x0a00-0x0a0f] has been reserved
[ 0.204693] system 00:07: [io 0x0a10-0x0a1f] has been reserved
[ 0.204696] system 00:07: [io 0x0a20-0x0a2f] has been reserved
[ 0.204700] system 00:07: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.204783] pnp 00:08: [io 0x0010-0x001f]
[ 0.204785] pnp 00:08: [io 0x0022-0x003f]
[ 0.204786] pnp 00:08: [io 0x0044-0x005f]
[ 0.204788] pnp 00:08: [io 0x0062-0x0063]
[ 0.204789] pnp 00:08: [io 0x0065-0x006f]
[ 0.204790] pnp 00:08: [io 0x0072-0x007f]
[ 0.204792] pnp 00:08: [io 0x0080]
[ 0.204793] pnp 00:08: [io 0x0084-0x0086]
[ 0.204794] pnp 00:08: [io 0x0088]
[ 0.204796] pnp 00:08: [io 0x008c-0x008e]
[ 0.204797] pnp 00:08: [io 0x0090-0x009f]
[ 0.204800] pnp 00:08: [io 0x00a2-0x00bf]
[ 0.204801] pnp 00:08: [io 0x00e0-0x00ef]
[ 0.204802] pnp 00:08: [io 0x04d0-0x04d1]
[ 0.204804] pnp 00:08: [io 0x0800-0x087f]
[ 0.204805] pnp 00:08: [io 0x0000-0xffffffffffffffff disabled]
[ 0.204807] pnp 00:08: [io 0x0500-0x057f]
[ 0.204808] pnp 00:08: [mem 0xfed1c000-0xfed1ffff]
[ 0.204810] pnp 00:08: [mem 0xfed20000-0xfed3ffff]
[ 0.204811] pnp 00:08: [mem 0xfed40000-0xfed8ffff]
[ 0.204856] system 00:08: [io 0x04d0-0x04d1] has been reserved
[ 0.204861] system 00:08: [io 0x0800-0x087f] has been reserved
[ 0.204865] system 00:08: [io 0x0500-0x057f] has been reserved
[ 0.204869] system 00:08: [mem 0xfed1c000-0xfed1ffff] has been reserved
[ 0.204873] system 00:08: [mem 0xfed20000-0xfed3ffff] has been reserved
[ 0.204876] system 00:08: [mem 0xfed40000-0xfed8ffff] has been reserved
[ 0.204881] system 00:08: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.204921] pnp 00:09: [mem 0xfed00000-0xfed003ff]
[ 0.204950] pnp 00:09: Plug and Play ACPI device, IDs PNP0103 (active)
[ 0.204997] pnp 00:0a: [mem 0xffb00000-0xffbfffff]
[ 0.204999] pnp 00:0a: [mem 0xfff00000-0xffffffff]
[ 0.205028] pnp 00:0a: Plug and Play ACPI device, IDs INT0800 (active)
[ 0.205059] pnp 00:0b: [mem 0xffc00000-0xffefffff]
[ 0.205098] system 00:0b: [mem 0xffc00000-0xffefffff] has been reserved
[ 0.205103] system 00:0b: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.205161] pnp 00:0c: [io 0x0060]
[ 0.205162] pnp 00:0c: [io 0x0064]
[ 0.205164] pnp 00:0c: [mem 0xfec00000-0xfec00fff]
[ 0.205165] pnp 00:0c: [mem 0xfee00000-0xfee00fff]
[ 0.205206] system 00:0c: [mem 0xfec00000-0xfec00fff] could not be reserved
[ 0.205211] system 00:0c: [mem 0xfee00000-0xfee00fff] has been reserved
[ 0.205215] system 00:0c: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.205240] pnp 00:0d: [mem 0xe0000000-0xefffffff]
[ 0.205278] system 00:0d: [mem 0xe0000000-0xefffffff] has been reserved
[ 0.205283] system 00:0d: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.205415] pnp 00:0e: [mem 0x00000000-0x0009ffff]
[ 0.205417] pnp 00:0e: [mem 0x000c0000-0x000cffff]
[ 0.205419] pnp 00:0e: [mem 0x000e0000-0x000fffff]
[ 0.205420] pnp 00:0e: [mem 0x00100000-0xbfffffff]
[ 0.205422] pnp 00:0e: [mem 0xfed90000-0xffffffff]
[ 0.205472] system 00:0e: [mem 0x00000000-0x0009ffff] could not be reserved
[ 0.205476] system 00:0e: [mem 0x000c0000-0x000cffff] has been reserved
[ 0.205480] system 00:0e: [mem 0x000e0000-0x000fffff] could not be reserved
[ 0.205484] system 00:0e: [mem 0x00100000-0xbfffffff] could not be reserved
[ 0.205488] system 00:0e: [mem 0xfed90000-0xffffffff] could not be reserved
[ 0.205493] system 00:0e: Plug and Play ACPI device, IDs PNP0c01 (active)
[ 0.205597] pnp: PnP ACPI: found 15 devices
[ 0.205600] ACPI: ACPI bus type pnp unregistered
[ 0.211899] pci 0000:00:1c.0: bridge window [io 0x1000-0x0fff] to
[bus 02-02] add_size 1000
[ 0.211903] pci 0000:00:1c.0: bridge window [mem
0x00100000-0x000fffff 64bit pref] to [bus 02-02] add_size 200000
[ 0.211905] pci 0000:00:1c.0: bridge window [mem
0x00100000-0x000fffff] to [bus 02-02] add_size 200000
[ 0.211913] pci 0000:00:1c.1: bridge window [mem
0x00100000-0x000fffff] to [bus 03-03] add_size 400000
[ 0.211923] pci 0000:00:1c.0: res[8]=[mem 0x00100000-0x000fffff]
get_res_add_size add_size 200000
[ 0.211926] pci 0000:00:1c.0: res[9]=[mem 0x00100000-0x000fffff
64bit pref] get_res_add_size add_size 200000
[ 0.211928] pci 0000:00:1c.1: res[8]=[mem 0x00100000-0x000fffff]
get_res_add_size add_size 400000
[ 0.211930] pci 0000:00:1c.0: res[7]=[io 0x1000-0x0fff]
get_res_add_size add_size 1000
[ 0.211934] pci 0000:00:1c.0: BAR 8: assigned [mem 0xc0000000-0xc01fffff]
[ 0.211939] pci 0000:00:1c.0: BAR 9: assigned [mem
0xc0200000-0xc03fffff 64bit pref]
[ 0.211944] pci 0000:00:1c.1: BAR 8: assigned [mem 0xc0400000-0xc07fffff]
[ 0.211948] pci 0000:00:1c.0: BAR 7: assigned [io 0x1000-0x1fff]
[ 0.211952] pci 0000:00:03.0: PCI bridge to [bus 01-01]
[ 0.211956] pci 0000:00:03.0: bridge window [io 0xd000-0xdfff]
[ 0.211961] pci 0000:00:03.0: bridge window [mem 0xfbf00000-0xfbffffff]
[ 0.211968] pci 0000:00:1c.0: PCI bridge to [bus 02-02]
[ 0.211972] pci 0000:00:1c.0: bridge window [io 0x1000-0x1fff]
[ 0.211977] pci 0000:00:1c.0: bridge window [mem 0xc0000000-0xc01fffff]
[ 0.211983] pci 0000:00:1c.0: bridge window [mem
0xc0200000-0xc03fffff 64bit pref]
[ 0.211990] pci 0000:00:1c.1: PCI bridge to [bus 03-03]
[ 0.211994] pci 0000:00:1c.1: bridge window [io 0xe000-0xefff]
[ 0.211999] pci 0000:00:1c.1: bridge window [mem 0xc0400000-0xc07fffff]
[ 0.212005] pci 0000:00:1c.1: bridge window [mem
0xfaf00000-0xfaffffff 64bit pref]
[ 0.212012] pci 0000:00:1e.0: PCI bridge to [bus 04-04]
[ 0.212032] pci 0000:00:1c.0: enabling device (0104 -> 0107)
[ 0.212045] pci 0000:00:1e.0: setting latency timer to 64
[ 0.212047] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7]
[ 0.212049] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff]
[ 0.212051] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff]
[ 0.212052] pci_bus 0000:00: resource 7 [mem 0x000d0000-0x000dffff]
[ 0.212054] pci_bus 0000:00: resource 8 [mem 0xc0000000-0xdfffffff]
[ 0.212056] pci_bus 0000:00: resource 9 [mem 0xf0000000-0xfed8ffff]
[ 0.212057] pci_bus 0000:01: resource 0 [io 0xd000-0xdfff]
[ 0.212059] pci_bus 0000:01: resource 1 [mem 0xfbf00000-0xfbffffff]
[ 0.212061] pci_bus 0000:02: resource 0 [io 0x1000-0x1fff]
[ 0.212062] pci_bus 0000:02: resource 1 [mem 0xc0000000-0xc01fffff]
[ 0.212064] pci_bus 0000:02: resource 2 [mem 0xc0200000-0xc03fffff
64bit pref]
[ 0.212066] pci_bus 0000:03: resource 0 [io 0xe000-0xefff]
[ 0.212067] pci_bus 0000:03: resource 1 [mem 0xc0400000-0xc07fffff]
[ 0.212069] pci_bus 0000:03: resource 2 [mem 0xfaf00000-0xfaffffff
64bit pref]
[ 0.212071] pci_bus 0000:04: resource 4 [io 0x0000-0x0cf7]
[ 0.212072] pci_bus 0000:04: resource 5 [io 0x0d00-0xffff]
[ 0.212074] pci_bus 0000:04: resource 6 [mem 0x000a0000-0x000bffff]
[ 0.212076] pci_bus 0000:04: resource 7 [mem 0x000d0000-0x000dffff]
[ 0.212077] pci_bus 0000:04: resource 8 [mem 0xc0000000-0xdfffffff]
[ 0.212079] pci_bus 0000:04: resource 9 [mem 0xf0000000-0xfed8ffff]
[ 0.212110] NET: Registered protocol family 2
[ 0.212155] IP route cache hash table entries: 524288 (order: 10,
4194304 bytes)
[ 0.212600] TCP established hash table entries: 262144 (order: 10,
4194304 bytes)
[ 0.213688] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[ 0.213966] TCP: Hash tables configured (established 262144 bind 65536)
[ 0.213969] TCP: reno registered
[ 0.213973] UDP hash table entries: 8192 (order: 6, 262144 bytes)
[ 0.214073] UDP-Lite hash table entries: 8192 (order: 6, 262144 bytes)
[ 0.214208] NET: Registered protocol family 1
[ 0.257405] PCI: CLS 32 bytes, default 64
[ 0.257451] Unpacking initramfs...
[ 0.274366] Freeing initrd memory: 1108k freed
[ 0.274466] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[ 0.274470] Placing 64MB software IO TLB between ffff8800bb76e000 -
ffff8800bf76e000
[ 0.274475] software IO TLB at phys 0xbb76e000 - 0xbf76e000
[ 0.278340] msgmni has been set to 32049
[ 0.278471] Block layer SCSI generic (bsg) driver version 0.4
loaded (major 253)
[ 0.278476] io scheduler noop registered
[ 0.278541] io scheduler cfq registered (default)
[ 0.278723] intel_idle: MWAIT substates: 0x1120
[ 0.278728] intel_idle: v0.4 model 0x1E
[ 0.278729] intel_idle: lapic_timer_reliable_states 0x2
[ 0.278803] input: Power Button as
/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input0
[ 0.278809] ACPI: Power Button [PWRB]
[ 0.278852] input: Power Button as
/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
[ 0.278857] ACPI: Power Button [PWRF]
[ 0.278929] ACPI: Requesting acpi_cpufreq
[ 0.279349] ahci 0000:00:1f.2: version 3.0
[ 0.279384] ahci 0000:00:1f.2: irq 44 for MSI/MSI-X
[ 0.279410] ahci: SSS flag set, parallel bus scan disabled
[ 0.290325] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 3
Gbps 0x3f impl SATA mode
[ 0.290339] ahci 0000:00:1f.2: flags: 64bit ncq sntf stag pm led
clo pio slum part ems sxs apst
[ 0.290352] ahci 0000:00:1f.2: setting latency timer to 64
[ 0.300730] scsi0 : ahci
[ 0.300792] scsi1 : ahci
[ 0.300846] scsi2 : ahci
[ 0.300900] scsi3 : ahci
[ 0.300954] scsi4 : ahci
[ 0.301007] scsi5 : ahci
[ 0.301056] ata1: SATA max UDMA/133 abar m2048@0xfbef8000 port
0xfbef8100 irq 44
[ 0.301061] ata2: SATA max UDMA/133 abar m2048@0xfbef8000 port
0xfbef8180 irq 44
[ 0.301066] ata3: SATA max UDMA/133 abar m2048@0xfbef8000 port
0xfbef8200 irq 44
[ 0.301071] ata4: SATA max UDMA/133 abar m2048@0xfbef8000 port
0xfbef8280 irq 44
[ 0.301075] ata5: SATA max UDMA/133 abar m2048@0xfbef8000 port
0xfbef8300 irq 44
[ 0.301080] ata6: SATA max UDMA/133 abar m2048@0xfbef8000 port
0xfbef8380 irq 44
[ 0.301156] tun: Universal TUN/TAP device driver, 1.6
[ 0.301159] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[ 0.301197] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.301219] ehci_hcd 0000:00:1a.0: setting latency timer to 64
[ 0.301221] ehci_hcd 0000:00:1a.0: EHCI Host Controller
[ 0.301227] ehci_hcd 0000:00:1a.0: new USB bus registered, assigned
bus number 1
[ 0.301267] ehci_hcd 0000:00:1a.0: debug port 2
[ 0.305181] ehci_hcd 0000:00:1a.0: cache line size of 32 is not supported
[ 0.305193] ehci_hcd 0000:00:1a.0: irq 16, io mem 0xfbefc000
[ 0.310249] ehci_hcd 0000:00:1a.0: USB 2.0 started, EHCI 1.00
[ 0.310383] hub 1-0:1.0: USB hub found
[ 0.310388] hub 1-0:1.0: 2 ports detected
[ 0.310423] ehci_hcd 0000:00:1d.0: setting latency timer to 64
[ 0.310426] ehci_hcd 0000:00:1d.0: EHCI Host Controller
[ 0.310431] ehci_hcd 0000:00:1d.0: new USB bus registered, assigned
bus number 2
[ 0.310452] ehci_hcd 0000:00:1d.0: debug port 2
[ 0.314407] ehci_hcd 0000:00:1d.0: cache line size of 32 is not supported
[ 0.314418] ehci_hcd 0000:00:1d.0: irq 23, io mem 0xfbefa000
[ 0.320230] ehci_hcd 0000:00:1d.0: USB 2.0 started, EHCI 1.00
[ 0.320349] hub 2-0:1.0: USB hub found
[ 0.320353] hub 2-0:1.0: 2 ports detected
[ 0.320390] Initializing USB Mass Storage driver...
[ 0.320418] usbcore: registered new interface driver usb-storage
[ 0.320421] USB Mass Storage support registered.
[ 0.320499] i8042: PNP: No PS/2 controller found. Probing ports directly.
[ 0.569660] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 0.569765] mousedev: PS/2 mouse device common for all mice
[ 0.569807] rtc_cmos 00:03: RTC can wake from S4
[ 0.569907] rtc_cmos 00:03: rtc core: registered rtc_cmos as rtc0
[ 0.569933] rtc0: alarms up to one month, y3k, 114 bytes nvram, hpet irqs
[ 0.570033] md: raid1 personality registered for level 1
[ 0.570099] device-mapper: ioctl: 4.22.0-ioctl (2011-10-19)
initialised: dm-devel@redhat.com
[ 0.570152] cpuidle: using governor ladder
[ 0.571395] usbcore: registered new interface driver usbhid
[ 0.571400] usbhid: USB HID core driver
[ 0.571455] TCP: cubic registered
[ 0.572176] NET: Registered protocol family 10
[ 0.572512] IPv6 over IPv4 tunneling driver
[ 0.573065] NET: Registered protocol family 17
[ 0.573081] Bridge firewalling registered
[ 0.573085] 8021q: 802.1Q VLAN Support v1.8
[ 0.573818] registered taskstats version 1
[ 0.574617] rtc_cmos 00:03: setting system clock to 2012-06-11
12:32:09 UTC (1339417929)
[ 0.606741] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 0.611727] usb 1-1: new high-speed USB device number 2 using ehci_hcd
[ 0.657127] ata1.00: ATA-8: OCZ-VERTEX2, 1.11, max UDMA/133
[ 0.657139] ata1.00: 97696368 sectors, multi 1: LBA48 NCQ (depth 31/32), AA
[ 0.707003] ata1.00: configured for UDMA/133
[ 0.707188] scsi 0:0:0:0: Direct-Access ATA OCZ-VERTEX2
1.11 PQ: 0 ANSI: 5
[ 0.708238] sd 0:0:0:0: [sda] 97696368 512-byte logical blocks:
(50.0 GB/46.5 GiB)
[ 0.708369] sd 0:0:0:0: [sda] Write Protect is off
[ 0.708378] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 0.708401] sd 0:0:0:0: [sda] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[ 0.709343] sda: sda1 sda2
[ 0.710474] sd 0:0:0:0: [sda] Attached SCSI disk
[ 0.726633] hub 1-1:1.0: USB hub found
[ 0.726776] hub 1-1:1.0: 6 ports detected
[ 0.829131] usb 2-1: new high-speed USB device number 2 using ehci_hcd
[ 0.944177] hub 2-1:1.0: USB hub found
[ 0.944382] hub 2-1:1.0: 8 ports detected
[ 1.012701] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 1.034269] ata2.00: ATA-8: WDC WD20EARX-00PASB0, 51.0AB51, max UDMA/133
[ 1.034282] ata2.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
[ 1.038763] ata2.00: configured for UDMA/133
[ 1.038926] scsi 1:0:0:0: Direct-Access ATA WDC
WD20EARX-00P 51.0 PQ: 0 ANSI: 5
[ 1.039570] sd 1:0:0:0: [sdb] 3907029168 512-byte logical blocks:
(2.00 TB/1.81 TiB)
[ 1.039583] sd 1:0:0:0: [sdb] 4096-byte physical blocks
[ 1.039640] sd 1:0:0:0: [sdb] Write Protect is off
[ 1.039648] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[ 1.039671] sd 1:0:0:0: [sdb] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[ 1.051596] sdb: sdb1
[ 1.052317] sd 1:0:0:0: [sdb] Attached SCSI disk
[ 1.220344] usb 2-1.1: new high-speed USB device number 3 using ehci_hcd
[ 1.274015] Refined TSC clocksource calibration: 2798.279 MHz.
[ 1.274027] Switching to clocksource tsc
[ 1.314873] usb-storage 2-1.1:1.0: Quirks match for vid 05e3 pid 0723: 8000
[ 1.315085] scsi6 : usb-storage 2-1.1:1.0
[ 1.346851] ata3: SATA link down (SStatus 0 SControl 300)
[ 1.379933] usb 2-1.2: new high-speed USB device number 4 using ehci_hcd
[ 1.460472] scsi7 : usb-storage 2-1.2:1.0
[ 1.654057] ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 1.672502] ata4.00: ATA-8: WDC WD20EARS-00MVWB0, 51.0AB51, max UDMA/133
[ 1.672515] ata4.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
[ 1.676543] ata4.00: configured for UDMA/133
[ 1.676715] scsi 3:0:0:0: Direct-Access ATA WDC
WD20EARS-00M 51.0 PQ: 0 ANSI: 5
[ 1.677562] sd 3:0:0:0: [sdc] 3907029168 512-byte logical blocks:
(2.00 TB/1.81 TiB)
[ 1.677575] sd 3:0:0:0: [sdc] 4096-byte physical blocks
[ 1.677634] sd 3:0:0:0: [sdc] Write Protect is off
[ 1.677643] sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
[ 1.677666] sd 3:0:0:0: [sdc] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[ 1.689931] sdc: sdc1
[ 1.690856] sd 3:0:0:0: [sdc] Attached SCSI disk
[ 1.982213] ata5: SATA link down (SStatus 0 SControl 300)
[ 2.286423] ata6: SATA link down (SStatus 0 SControl 300)
[ 2.287953] Freeing unused kernel memory: 452k freed
[ 2.317015] scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE
9451 PQ: 0 ANSI: 0
[ 2.321661] sd 6:0:0:0: [sdd] Attached SCSI removable disk
[ 2.363595] EXT4-fs (sda2): couldn't mount as ext3 due to feature
incompatibilities
[ 2.369659] EXT4-fs (sda2): couldn't mount as ext2 due to feature
incompatibilities
[ 2.382311] EXT4-fs (sda2): mounted filesystem with ordered data
mode. Opts: (null)
[ 2.461124] scsi 7:0:0:0: Direct-Access WD My Passport
070A 1032 PQ: 0 ANSI: 4
[ 2.462957] sd 7:0:0:0: [sde] 1952151552 512-byte logical blocks:
(999 GB/930 GiB)
[ 2.464938] sd 7:0:0:0: [sde] Write Protect is off
[ 2.464950] sd 7:0:0:0: [sde] Mode Sense: 23 00 10 00
[ 2.466980] sd 7:0:0:0: [sde] No Caching mode page present
[ 2.466991] sd 7:0:0:0: [sde] Assuming drive cache: write through
[ 2.472301] sd 7:0:0:0: [sde] No Caching mode page present
[ 2.472312] sd 7:0:0:0: [sde] Assuming drive cache: write through
[ 2.473048] sde: sde1
[ 2.479341] sd 7:0:0:0: [sde] No Caching mode page present
[ 2.479352] sd 7:0:0:0: [sde] Assuming drive cache: write through
[ 2.479361] sd 7:0:0:0: [sde] Attached SCSI disk
[ 2.747626] udevd[777]: starting version 171
[ 2.780140] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 2.780254] r8169 0000:01:00.0: irq 45 for MSI/MSI-X
[ 2.780465] r8169 0000:01:00.0: eth0: RTL8168b/8111b at
0xffffc9000002e000, 00:1f:1f:fa:64:f2, XID 18000000 IRQ 45
[ 2.780471] r8169 0000:01:00.0: eth0: jumbo features [frames: 4080
bytes, tx checksumming: ko]
[ 2.780484] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 2.780570] r8169 0000:03:00.0: irq 46 for MSI/MSI-X
[ 2.780758] r8169 0000:03:00.0: eth1: RTL8168e/8111e at
0xffffc9000001c000, 80:ee:73:10:ad:44, XID 0c200000 IRQ 46
[ 2.780764] r8169 0000:03:00.0: eth1: jumbo features [frames: 9200
bytes, tx checksumming: ko]
[ 2.815193] udevd[790]: renamed network interface eth1 to rename4
[ 2.819167] udevd[789]: renamed network interface eth0 to eth1
[ 2.857227] mdadm: sending ioctl 1261 to a partition!
[ 2.857232] mdadm: sending ioctl 1261 to a partition!
[ 2.857267] mdadm: sending ioctl 1261 to a partition!
[ 2.857272] mdadm: sending ioctl 1261 to a partition!
[ 2.857363] mdadm: sending ioctl 1261 to a partition!
[ 2.857367] mdadm: sending ioctl 1261 to a partition!
[ 2.857456] mdadm: sending ioctl 1261 to a partition!
[ 2.857496] mdadm: sending ioctl 1261 to a partition!
[ 2.857511] mdadm: sending ioctl 1261 to a partition!
[ 2.857515] mdadm: sending ioctl 1261 to a partition!
[ 2.861727] md: bind<sdc1>
[ 2.865236] md: bind<sdb1>
[ 2.867334] bio: create slab <bio-1> at 1
[ 2.867565] md/raid1:md0: active with 2 out of 2 mirrors
[ 2.867589] md0: detected capacity change from 0 to 2000397713408
[ 2.869239] md0: unknown partition table
[ 2.869904] udevd[790]: renamed network interface rename4 to eth0
[ 3.316265] fuse init (API version 7.18)
[ 3.367392] kvm: VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL does not work
properly. Using workaround
[ 4.210429] EXT4-fs (sda2): re-mounted. Opts: (null)
[ 4.279285] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
[ 4.344171] EXT4-fs (dm-2): mounted filesystem with ordered data
mode. Opts: (null)
[ 4.377312] EXT4-fs (dm-0): mounted filesystem with ordered data
mode. Opts: (null)
[ 4.421482] EXT4-fs (dm-1): mounted filesystem with ordered data
mode. Opts: (null)
[ 4.556520] EXT4-fs (sde1): warning: maximal mount count reached,
running e2fsck is recommended
[ 4.559696] EXT4-fs (sde1): mounted filesystem with ordered data
mode. Opts: (null)
[ 5.765157] r8169 0000:03:00.0: eth0: link down
[ 5.765169] r8169 0000:03:00.0: eth0: link down
[ 5.766271] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 6.030716] r8169 0000:01:00.0: eth1: link down
[ 6.033344] ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 8.127010] r8169 0000:03:00.0: eth0: link up
[ 8.129719] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 8.174696] r8169 0000:01:00.0: eth1: link up
[ 8.177243] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 14.194472] ADDRCONF(NETDEV_UP): tap0: link is not ready
[ 14.485277] device eth0 entered promiscuous mode
[ 14.502568] device tap0 entered promiscuous mode
[ 14.513622] br0: port 1(eth0) entered forwarding state
[ 14.513633] br0: port 1(eth0) entered forwarding state
[ 17.625089] ADDRCONF(NETDEV_CHANGE): tap0: link becomes ready
[ 17.625133] br0: port 2(tap0) entered forwarding state
[ 17.625141] br0: port 2(tap0) entered forwarding state
[ 18.395970] eth0: no IPv6 routers present
[ 18.661279] eth1: no IPv6 routers present
[ 20.350121] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 20.356135] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 20.362457] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[ 20.563254] u32 classifier
[ 20.563258] Performance counters on
[ 21.908018] device vnet0 entered promiscuous mode
[ 21.912578] br0: port 3(vnet0) entered forwarding state
[ 21.912587] br0: port 3(vnet0) entered forwarding state
[ 24.636767] br0: no IPv6 routers present
[ 27.677915] tap0: no IPv6 routers present
[ 29.477290] br0: port 1(eth0) entered forwarding state
[ 32.605341] br0: port 2(tap0) entered forwarding state
[ 32.631239] vnet0: no IPv6 routers present
[ 36.882399] br0: port 3(vnet0) entered forwarding state
[ 2839.337498] ------------[ cut here ]------------
[ 2839.337509] WARNING: at net/sched/sch_generic.c:256
dev_watchdog+0x16b/0x20f()
[ 2839.337513] Hardware name: SH55J
[ 2839.337516] NETDEV WATCHDOG: eth1 (r8169): transmit queue 0 timed out
[ 2839.337519] Modules linked in: vhost_net cls_route cls_u32 cls_fw
sch_sfq sch_htb ipt_REDIRECT ipt_MASQUERADE xt_limit xt_tcpudp
nf_conntrack_ipv6 nf_defrag_ipv6 xt_state iptable_nat nf_nat
nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip6table_filter
ip6_tables iptable_filter ip_tables x_tables kvm_intel kvm fuse r8169
[ 2839.337554] Pid: 0, comm: swapper/3 Not tainted 3.4.2 #1
[ 2839.337556] Call Trace:
[ 2839.337559] <IRQ> [<ffffffff81026881>] ? warn_slowpath_common+0x78/0x8c
[ 2839.337571] [<ffffffff81026936>] ? warn_slowpath_fmt+0x45/0x4a
[ 2839.337576] [<ffffffff81042fc2>] ? scheduler_tick+0xaf/0xc3
[ 2839.337582] [<ffffffff812535a0>] ? dev_watchdog+0x16b/0x20f
[ 2839.337588] [<ffffffff8102f3ae>] ? run_timer_softirq+0x177/0x209
[ 2839.337594] [<ffffffff8103e7b3>] ? hrtimer_interrupt+0x100/0x19b
[ 2839.337599] [<ffffffff81253435>] ? qdisc_reset+0x35/0x35
[ 2839.337605] [<ffffffff8102b256>] ? __do_softirq+0x7f/0x106
[ 2839.337611] [<ffffffff812e298c>] ? call_softirq+0x1c/0x30
[ 2839.337616] [<ffffffff81003376>] ? do_softirq+0x31/0x67
[ 2839.337621] [<ffffffff8102b503>] ? irq_exit+0x44/0x75
[ 2839.337625] [<ffffffff810032b5>] ? do_IRQ+0x94/0xad
[ 2839.337631] [<ffffffff812e10a7>] ? common_interrupt+0x67/0x67
[ 2839.337634] <EOI> [<ffffffff81163f07>] ? intel_idle+0xde/0x103
[ 2839.337645] [<ffffffff81163ee3>] ? intel_idle+0xba/0x103
[ 2839.337652] [<ffffffff81220bfa>] ? cpuidle_idle_call+0x7e/0xc4
[ 2839.337659] [<ffffffff81008e92>] ? cpu_idle+0x53/0x7c
[ 2839.337663] ---[ end trace 04a2b9c09e9d7860 ]---
[ 2839.341697] r8169 0000:01:00.0: eth1: link up
Regards
Tomas
On Mon, Jun 11, 2012 at 11:52 PM, Francois Romieu <romieu@fr.zoreil.com> wrote:
> Tomas Papan <tomas.papan@gmail.com> :
> [...]
>> If you need something else just tell me.
>
> The XID line should look something like :
>
> [ 8.925786] r8169 0000:03:00.0: eth0: RTL8168evl/8111evl at 0xffffc900050ec000, 00:e0:4c:68:00:1f, XID 0c900800 IRQ 51
>
> (whence the 'XID' thing)
>
> Please send a _complete_ dmesg. I won't bet it will solve anything but
> it can't be more useless than the generic watchdog message.
>
> Thanks.
>
> --
> Ueimor
^ permalink raw reply
* Re: [PATCH net V2] bonding:force to use primary slave
From: Jay Vosburgh @ 2012-06-12 5:00 UTC (permalink / raw)
To: Weiping Pan; +Cc: netdev, nicolas.2p.debian
In-Reply-To: <0d639c5449aad0222c7e88cf8a61013c1cdf98e2.1339472044.git.wpan@redhat.com>
Weiping Pan <wpan@redhat.com> wrote:
>When we set primary slave with module parameters, bond will always use this
>primary slave as active slave.
>
>But when we modify primary slave via sysfs, it will call
>bond_should_change_active() and take into account primary_reselect.
>
>And I think we should use the new primary slave as the new active slave
>regardless of the value of primary_reselect, since primary slave really should
>have priority than other slaves.
The whole point of primary_reselect is that the primary slave
does not have priority unless it meets the reselect criteria, or it is
being enslaved.
>primary_reselect is introduced to handle the failure or recovery of primary
>slave, but when we modify primary slave via sysfs, we want to give it higher
>priority, and it may or may not be a failure or recovery slave.
>
>Thus the behavior is the same with module parameters and meets the
>administrator's expectation.
I still disagree with this patch. My comments regarding the
prior version were intended to mean that we should document the current
behavior, not change the behavior and document the new behavior.
If an administrator wishes for the newly set primary to
immediately become the active slave, they can either leave
primary_reselect at its default setting or utilize the available
mechanism to change the active slave. Applying this patch eliminates
the ability to alter the primary slave setting without simultaneously
changing the active slave.
Further, the default value for primary_reselect already does
this (change to the new primary immediately); this patch only affects
the case that primary_reselect is set to a non-default value. In my
mind, this reinforces that the current behavior is correct, and that the
primary_reselect setting should apply to the newly selected primary
(because the administrator has explicitly chosen that behavior).
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply
* linux-next: manual merge of the akpm tree with the net tree
From: Stephen Rothwell @ 2012-06-12 4:07 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-next, linux-kernel, Giuseppe CAVALLARO, David Miller,
netdev, Viresh Kumar
[-- Attachment #1: Type: text/plain, Size: 3125 bytes --]
Hi Andrew,
Today's linux-next merge of the akpm tree got a conflict in
drivers/net/ethernet/stmicro/stmmac/stmmac.h between commit 33d5e332b9c5
("stmmac: fix driver built w/ w/o both pci and platf modules") from the
net tree and commit "net/stmmac: remove conditional compilation of clk
code" from the akpm tree.
Just context changes. I fixed it up (see below) and can carry the fix as
necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/net/ethernet/stmicro/stmmac/stmmac.h
index 94b21b4,8e1a43b..0000000
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@@ -104,99 -103,3 +102,59 @@@ int stmmac_dvr_remove(struct net_devic
struct stmmac_priv *stmmac_dvr_probe(struct device *device,
struct plat_stmmacenet_data *plat_dat,
void __iomem *addr);
+
- #ifdef CONFIG_HAVE_CLK
- static inline int stmmac_clk_enable(struct stmmac_priv *priv)
- {
- if (!IS_ERR(priv->stmmac_clk))
- return clk_enable(priv->stmmac_clk);
-
- return 0;
- }
-
- static inline void stmmac_clk_disable(struct stmmac_priv *priv)
- {
- if (IS_ERR(priv->stmmac_clk))
- return;
-
- clk_disable(priv->stmmac_clk);
- }
- static inline int stmmac_clk_get(struct stmmac_priv *priv)
- {
- priv->stmmac_clk = clk_get(priv->device, NULL);
-
- if (IS_ERR(priv->stmmac_clk))
- return PTR_ERR(priv->stmmac_clk);
-
- return 0;
- }
- #else
- static inline int stmmac_clk_enable(struct stmmac_priv *priv)
- {
- return 0;
- }
- static inline void stmmac_clk_disable(struct stmmac_priv *priv)
- {
- }
- static inline int stmmac_clk_get(struct stmmac_priv *priv)
- {
- return 0;
- }
- #endif /* CONFIG_HAVE_CLK */
-
-
+#ifdef CONFIG_STMMAC_PLATFORM
+extern struct platform_driver stmmac_pltfr_driver;
+static inline int stmmac_register_platform(void)
+{
+ int err;
+
+ err = platform_driver_register(&stmmac_pltfr_driver);
+ if (err)
+ pr_err("stmmac: failed to register the platform driver\n");
+
+ return err;
+}
+static inline void stmmac_unregister_platform(void)
+{
+ platform_driver_register(&stmmac_pltfr_driver);
+}
+#else
+static inline int stmmac_register_platform(void)
+{
+ pr_debug("stmmac: do not register the platf driver\n");
+
+ return -EINVAL;
+}
+static inline void stmmac_unregister_platform(void)
+{
+}
+#endif /* CONFIG_STMMAC_PLATFORM */
+
+#ifdef CONFIG_STMMAC_PCI
+extern struct pci_driver stmmac_pci_driver;
+static inline int stmmac_register_pci(void)
+{
+ int err;
+
+ err = pci_register_driver(&stmmac_pci_driver);
+ if (err)
+ pr_err("stmmac: failed to register the PCI driver\n");
+
+ return err;
+}
+static inline void stmmac_unregister_pci(void)
+{
+ pci_unregister_driver(&stmmac_pci_driver);
+}
+#else
+static inline int stmmac_register_pci(void)
+{
+ pr_debug("stmmac: do not register the PCI driver\n");
+
+ return -EINVAL;
+}
+static inline void stmmac_unregister_pci(void)
+{
+}
+#endif /* CONFIG_STMMAC_PCI */
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH net 1/3] bonding:record primary when modify it via sysfs
From: Weiping Pan @ 2012-06-12 3:38 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: Nicolas de Pesloüan, Weiping Pan, netdev
In-Reply-To: <31624.1339447734@death.nxdomain>
On 06/12/2012 04:48 AM, Jay Vosburgh wrote:
> Nicolas de Pesloüan <nicolas.2p.debian@gmail.com> wrote:
>
>> Le 11/06/2012 11:00, Weiping Pan a écrit :
>>> If we modify primary via sysfs and it is not a valid slave,
>>> we should record it for future use, and this behavior is the same with
>>> bond_check_params().
>>>
>>> Signed-off-by: Weiping Pan<wpan@redhat.com>
>>> ---
>>> drivers/net/bonding/bond_sysfs.c | 8 ++++++--
>>> 1 files changed, 6 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
>>> index aef42f0..485bedb 100644
>>> --- a/drivers/net/bonding/bond_sysfs.c
>>> +++ b/drivers/net/bonding/bond_sysfs.c
>>> @@ -1082,8 +1082,12 @@ static ssize_t bonding_store_primary(struct device *d,
>>> }
>>> }
>>>
>>> - pr_info("%s: Unable to set %.*s as primary slave.\n",
>>> - bond->dev->name, (int)strlen(buf) - 1, buf);
>>> + strncpy(bond->params.primary, ifname, IFNAMSIZ);
>>> + bond->params.primary[IFNAMSIZ - 1] = 0;
>>> +
>>> + pr_info("%s: Recording %s as primary, "
>>> + "but it has not been enslaved to %s yet.\n",
>>> + bond->dev->name, ifname, bond->dev->name);
>>> out:
>>> write_unlock_bh(&bond->curr_slave_lock);
>>> read_unlock(&bond->lock);
>> I like this one, because it tend to relax the current constraints one
>> should respect on the order to write into sysfs to setup bonding.
>>
>> May I suggest we have a better info message, suggesting there might have a
>> typo on the name of the primary ?
>>
>>> + pr_info("%s: Recording %s as primary, "
>>> + "but it has not been enslaved to %s yet. Possible typo?\n",
>>> + bond->dev->name, ifname, bond->dev->name);
>> Except from this cosmetic,
>>
>> Acked-by: Nicolas de Pesloüan<nicolas.2p.debian@free.fr>
> Agreed, except that I can go either way on the "typo" warning.
I prefer not to add 'typo' since I think the log is enough.
thanks
Weiping Pan
> Signed-off-by: Jay Vosburgh<fubar@us.ibm.com>
>
> -J
>
> ---
> -Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH net V2] bonding:force to use primary slave
From: Weiping Pan @ 2012-06-12 3:35 UTC (permalink / raw)
To: netdev; +Cc: nicolas.2p.debian, fubar
In-Reply-To: <32118.1339449441@death.nxdomain>
When we set primary slave with module parameters, bond will always use this
primary slave as active slave.
But when we modify primary slave via sysfs, it will call
bond_should_change_active() and take into account primary_reselect.
And I think we should use the new primary slave as the new active slave
regardless of the value of primary_reselect, since primary slave really should
have priority than other slaves.
primary_reselect is introduced to handle the failure or recovery of primary
slave, but when we modify primary slave via sysfs, we want to give it higher
priority, and it may or may not be a failure or recovery slave.
Thus the behavior is the same with module parameters and meets the
administrator's expectation.
Changelog:
V2:modify document
Signed-off-by: Weiping Pan <wpan@redhat.com>
---
Documentation/networking/bonding.txt | 8 ++++++--
drivers/net/bonding/bond_sysfs.c | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index bfea8a3..9130050 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -652,7 +652,8 @@ primary
A string (eth0, eth2, etc) specifying which slave is the
primary device. The specified device will always be the
- active slave while it is available. Only when the primary is
+ active slave while it is available. Changing it via sysfs will make
+ it to be used as active slave immediately. Only when the primary is
off-line will alternate devices be used. This is useful when
one slave is preferred over another, e.g., when one slave has
higher throughput than another.
@@ -684,7 +685,7 @@ primary_reselect
The primary slave becomes the active slave only if the
current active slave fails and the primary slave is up.
- The primary_reselect setting is ignored in two cases:
+ The primary_reselect setting is ignored in three cases:
If no slaves are active, the first slave to recover is
made the active slave.
@@ -692,6 +693,9 @@ primary_reselect
When initially enslaved, the primary slave is always made
the active slave.
+ When changing primary slave via sysfs, and if the primary
+ slave is up, bonding will use it as active slave immediately.
+
Changing the primary_reselect policy via sysfs will cause an
immediate selection of the best active slave according to the new
policy. This may or may not result in a change of the active
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 1b0f3cd..7256ae4 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -1077,6 +1077,7 @@ static ssize_t bonding_store_primary(struct device *d,
bond->dev->name, slave->dev->name);
bond->primary_slave = slave;
strcpy(bond->params.primary, slave->dev->name);
+ bond->force_primary = true;
bond_select_active_slave(bond);
goto out;
}
--
1.7.4
^ permalink raw reply related
* Re: [PATCH (sh-2.6) 1/4] clksource: Generic timer infrastructure
From: Paul Mundt @ 2012-06-12 3:04 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Stuart Menefy, Arnd Bergmann, Peppe CAVALLARO,
linux-sh@vger.kernel.org, netdev@vger.kernel.org, John Stultz,
linux-kernel@vger.kernel.org
In-Reply-To: <alpine.LFD.2.00.1103011630080.2701@localhost6.localdomain6>
On Tue, Mar 01, 2011 at 05:48:33PM +0100, Thomas Gleixner wrote:
> On Tue, 1 Mar 2011, Stuart Menefy wrote:
> > On 24/02/11 17:20, Arnd Bergmann wrote:
> > > On Tuesday 22 February 2011, Peppe CAVALLARO wrote:
> > >> From: Stuart Menefy <stuart.menefy@st.com>
> > >>
> > >> Many devices targeted at the embedded market provide a number of
> > >> generic timers which are capable of generating interrupts at a
> > >> requested rate. These can then be used in the implementation of drivers
> > >> for other peripherals which require a timer interrupt, without having
> > >> to provide an additional timer as part of that peripheral.
>
> Why can't you just use an hrtimer and be done with it? Just because
> there is some extra hardware in the chip?
>
..
> If we get some reasonable explanation why an extra timer interrupt is
> solving a specific problem better than hrtimers we can do that, but
> that needs more thought than picking the first available clockevent
> from a list. If we come to the conclusion, that we want/need this kind
> of functionality then I really prefer not to create yet another piece
> of infrastructure which deals with timer devices.
>
I've run in to this issue again while working on local timer support on
SH, as we're presently dependent on broadcast and dummy tick devices in
the SMP case, while quite a few timer channels remain available for use.
(Ironically, while the aforementioned driver was able to solve the
problem with hrtimers, we have the same need to _provide_ hrtimers).
In the sh_tmu/cmt/mtu2 case all timer channels are handed off as platform
devices, and the block itself is global for all CPUs, though we can tweak
the IRQ affinity relative to the cpumask. My tentative plan is to deal
with the clockevent device as a percpu thing in the local timer case
which will require some additional side infrastructure, but some
additional work will need to be done in the clockevents code regardless.
The ARM approach is a bit backwards from what we're interested in
solving, as it uses its own local timer infrastructure and some
TWD-specific API for registering per-cpu timers and only then inserting
them in to the clockevents list. Whereas in our case we've got all of the
timer channels available at platform probe time (earlier for the early
timer case), and simply need a method for tracking unused channels as
well as having a facility for picking them up and reconfiguring them
later on when the secondary CPUs come up. I'm not at all interested in
registering the same timer multiple times with slightly different APIs,
having two different drivers fighting over the same register space is not
a thought that fills me with joy.
In any event, I'll hack on it a bit and see what falls out, patches
later.
^ permalink raw reply
* Re: [PATCH] fix kernel crash in the macvlan driver
From: Ani Sinha @ 2012-06-12 1:50 UTC (permalink / raw)
To: Eric W. Biederman; +Cc: netdev, Francesco Ruggeri
In-Reply-To: <87fwa6pxol.fsf@xmission.com>
Hi Eric :
I have found the reason for the crash :
On Thu, 7 Jun 2012, Eric W. Biederman wrote:
> >
> > The logic of my change is as follows :
> >
> > As far as I can see, macvlan_newlink() pairs with macvlan_dellink(). If
> > you are incrementing the reference count in newlink(), the corresponding
> > decrement should be, in my opinion in dellink(). If you are derementing
> > the count in uninit(), you are asuming that for every dellink() call,
> > there is a corresponding uninit() call. I am not sure if this assumption
> > is correct. Perhaps you can shed some more lights on this.
>
> Yes. Look at net/core/dev.c
> dellink calls unregister_netdevice_queue.
> The active part of unregister_netdevice_queue rollback_registered_many
> calls dev->ndo_stop() and then ndo_uninit.
You are correct with respect the current upstream code. However, please
take a look at the commit : 0696c3a8acd3b7c3186dd231d65d97e05a75189f
Before this change was committed, a failure in dev_get_valid_name() would
cause netdev_ops->ndo_uninit() to get called as a part of the clneaup
code. This in turn will mess up (decrement) the port->count values causing
an unbalanced reference cound decrement. This was the reason why the port
was getting freed and a use after free resulted in the crash. I have
verified this was indeed the case using printks. After applying the fix in
0696c3a8acd3b7c3186dd231d65d97e05a75189f along with your original
ref-count on dev->port fix, I can no longer reproduce the crash.
When moved the counter decrement from uninit() to dellink(), this fixed
the issue since although we had an extra unbalanced uninit() call, it
wasn't modifying the counter values. However ...
>
> We might still be using rcu hash lookups until ndo_close is called and
> so we really don't want to move the decrement before then.
I agree with you on this one. Hence, we should keep the reference counter
modification code where it currently is.
So there was a window when you had applied your patch (port reference
counting) and Peter's fix did not go in. In that period, the upstream
kernel was broken as well. Fortunately, it's all fixed now :)
Cheers,
Ani
^ permalink raw reply
* Re: net/netfilter/nf_conntrack_proto_tcp.c:1606:9: error: ‘struct nf_proto_net’ has no member named ‘user’
From: Gao feng @ 2012-06-12 1:46 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: David Miller, wfg, netdev
In-Reply-To: <20120612002655.GA28155@1984>
于 2012年06月12日 08:26, Pablo Neira Ayuso 写道:
> Hi again David,
>
> On Mon, Jun 11, 2012 at 03:23:44PM -0700, David Miller wrote:
>> From: Pablo Neira Ayuso <pablo@netfilter.org>
>> Date: Tue, 12 Jun 2012 00:15:21 +0200
>>
>>> Could you please apply the following patch to net-next to resolve
>>> this? Thanks.
>>
>> Applied, but you have to be kidding me with those ifdefs.
>>
>> This is exactly the same kind of thing Gao suggested for
>> the inetpeer code recently and which I flat out rejected.
>>
>> You can't pepper foo.c files with ifdefs all over the place.
>
> Would you be OK if I send you patches to move all sysctl part of
> nf_conntrack_proto_*.c to nf_conntrack_proto_*_sysctl.c
>
> I can also do the same for nf_conntrack_proto.c.
>
> This means more files under the net/netfilter directory, but less
> ifdef kludges in the code.
>
> Please, have a look at the patch enclosed to this email in case you
> want to see how it would look like in the end with my proposal.
I am sorry for all the trouble aroused by my negligence.
> static int tcpv4_init_net(struct net *net)
> {
> int i;
> @@ -1600,11 +1373,7 @@ static int tcpv4_init_net(struct net *net)
> struct nf_tcp_net *tn = tcp_pernet(net);
> struct nf_proto_net *pn = (struct nf_proto_net *)tn;
>
> -#ifdef CONFIG_SYSCTL
> - if (!pn->ctl_table) {
> -#else
> if (!pn->users++) {
nf_proto_net.users has different meaning when SYSCTL enabled or disabled.
when SYSCTL enabled,it means if both tcpv4 and tcpv6 register the sysctl,
it is increased when register sysctl success and decreased when unregister sysctl.
we can regard it as the refcnt of ctl_table.
when SYSCTL disabled,it just used to identify if the proto's pernet data
has been initialized.
^ permalink raw reply
* linux-next: manual merge of the wireless-next tree with the net tree
From: Stephen Rothwell @ 2012-06-12 1:41 UTC (permalink / raw)
To: John W. Linville
Cc: linux-next, linux-kernel, Emmanuel Grumbach, Johannes Berg,
David Miller, netdev
[-- Attachment #1: Type: text/plain, Size: 2063 bytes --]
Hi John,
Today's linux-next merge of the wireless-next tree got a conflict in
drivers/net/wireless/iwlwifi/pcie/trans.c between commit d012d04e4d63
("iwlwifi: disable the buggy chain extension feature in HW") from the net
tree and commit 4beaf6c2f8af ("iwlwifi: s/txq_setup/txq_enable") from the
wireless-next tree.
I fixed it up (I think - see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/net/wireless/iwlwifi/pcie/trans.c
index cb951ad,1eabb83..0000000
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@@ -1058,11 -1054,17 +1054,22 @@@ static void iwl_tx_start(struct iwl_tra
iwl_write_prph(trans, SCD_DRAM_BASE_ADDR,
trans_pcie->scd_bc_tbls.dma >> 10);
+ /* The chain extension of the SCD doesn't work well. This feature is
+ * enabled by default by the HW, so we need to disable it manually.
+ */
+ iwl_write_prph(trans, SCD_CHAINEXT_EN, 0);
+
+ for (i = 0; i < trans_pcie->n_q_to_fifo; i++) {
+ int fifo = trans_pcie->setup_q_to_fifo[i];
+
+ __iwl_trans_pcie_txq_enable(trans, i, fifo, IWL_INVALID_STATION,
+ IWL_TID_NON_QOS,
+ SCD_FRAME_LIMIT, 0);
+ }
+
+ /* Activate all Tx DMA/FIFO channels */
+ iwl_trans_txq_set_sched(trans, IWL_MASK(0, 7));
+
/* Enable DMA channel */
for (chan = 0; chan < FH_TCSR_CHNL_NUM ; chan++)
iwl_write_direct32(trans, FH_TCSR_CHNL_TX_CONFIG_REG(chan),
@@@ -1356,10 -1317,10 +1322,10 @@@ static int iwl_trans_pcie_tx(struct iwl
iwl_trans_txq_update_byte_cnt_tbl(trans, txq, le16_to_cpu(tx_cmd->len));
dma_sync_single_for_device(trans->dev, txcmd_phys, firstlen,
- DMA_BIDIRECTIONAL);
+ DMA_BIDIRECTIONAL);
trace_iwlwifi_dev_tx(trans->dev,
- &((struct iwl_tfd *)txq->tfds)[txq->q.write_ptr],
+ &txq->tfds[txq->q.write_ptr],
sizeof(struct iwl_tfd),
&dev_cmd->hdr, firstlen,
skb->data + hdr_len, secondlen);
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: net/netfilter/nf_conntrack_proto_tcp.c:1606:9: error: ‘struct nf_proto_net’ has no member named ‘user’
From: David Miller @ 2012-06-12 1:34 UTC (permalink / raw)
To: pablo; +Cc: wfg, gaofeng, netdev
In-Reply-To: <20120612002655.GA28155@1984>
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Tue, 12 Jun 2012 02:26:55 +0200
> Would you be OK if I send you patches to move all sysctl part of
> nf_conntrack_proto_*.c to nf_conntrack_proto_*_sysctl.c
>
> I can also do the same for nf_conntrack_proto.c.
>
> This means more files under the net/netfilter directory, but less
> ifdef kludges in the code.
>
> Please, have a look at the patch enclosed to this email in case you
> want to see how it would look like in the end with my proposal.
Looks good to me.
But I have to ask, why are you able to now unconditionally use
pn->users vs. pn->ctl_table in those tests?
^ permalink raw reply
* [PATCH 5/7] usbnet: remove flag of EVENT_DEV_WAKING
From: Ming Lei @ 2012-06-12 1:19 UTC (permalink / raw)
To: David S. Miller, Greg Kroah-Hartman
Cc: Oliver Neukum, netdev, linux-usb, Ming Lei
In-Reply-To: <1339463985-9006-1-git-send-email-tom.leiming@gmail.com>
The flag of EVENT_DEV_WAKING is not used any more, so just remove it.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
include/linux/usb/usbnet.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index f15a729..b994c0f 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -66,8 +66,7 @@ struct usbnet {
# define EVENT_STS_SPLIT 3
# define EVENT_LINK_RESET 4
# define EVENT_RX_PAUSED 5
-# define EVENT_DEV_WAKING 6
-# define EVENT_DEV_ASLEEP 7
+# define EVENT_DEV_ASLEEP 6
};
static inline struct usb_driver *driver_of(struct usb_interface *intf)
--
1.7.9.5
^ permalink raw reply related
* [PATCH 3/7] usbnet:cdc-phonet: remove usb_get/put_dev in .probe and .disconnect
From: Ming Lei @ 2012-06-12 1:19 UTC (permalink / raw)
To: David S. Miller, Greg Kroah-Hartman
Cc: Oliver Neukum, netdev, linux-usb, Ming Lei
In-Reply-To: <1339463985-9006-1-git-send-email-tom.leiming@gmail.com>
usb_device is parent device of usb_interface in the view of driver
model, so its reference count is always held during .probe/.disconnect
of usb_interface instance.
This patch just removes the unnecessay usb_get/put_dev.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
drivers/net/usb/cdc-phonet.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c
index d848d4d..187c144 100644
--- a/drivers/net/usb/cdc-phonet.c
+++ b/drivers/net/usb/cdc-phonet.c
@@ -394,7 +394,7 @@ int usbpn_probe(struct usb_interface *intf, const struct usb_device_id *id)
SET_NETDEV_DEV(dev, &intf->dev);
pnd->dev = dev;
- pnd->usb = usb_get_dev(usbdev);
+ pnd->usb = usbdev;
pnd->intf = intf;
pnd->data_intf = data_intf;
spin_lock_init(&pnd->tx_lock);
@@ -440,7 +440,6 @@ out:
static void usbpn_disconnect(struct usb_interface *intf)
{
struct usbpn_dev *pnd = usb_get_intfdata(intf);
- struct usb_device *usb = pnd->usb;
if (pnd->disconnected)
return;
@@ -449,7 +448,6 @@ static void usbpn_disconnect(struct usb_interface *intf)
usb_driver_release_interface(&usbpn_driver,
(pnd->intf == intf) ? pnd->data_intf : pnd->intf);
unregister_netdev(pnd->dev);
- usb_put_dev(usb);
}
static struct usb_driver usbpn_driver = {
--
1.7.9.5
^ permalink raw reply related
* [PATCH 1/7] usbnet: remove usb_get/put_dev in .probe and .disconnect
From: Ming Lei @ 2012-06-12 1:19 UTC (permalink / raw)
To: David S. Miller, Greg Kroah-Hartman
Cc: Oliver Neukum, netdev, linux-usb, Ming Lei
In-Reply-To: <1339463985-9006-1-git-send-email-tom.leiming@gmail.com>
usb_device is parent device of usb_interface in the view of driver
model, so its reference count is always held during .probe/.disconnect
of usb_interface instance.
This patch just removes the unnecessay usb_get/put_dev.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
drivers/net/usb/usbnet.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 9f58330..022c1e7 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1307,7 +1307,6 @@ void usbnet_disconnect (struct usb_interface *intf)
usb_free_urb(dev->interrupt);
free_netdev(net);
- usb_put_dev (xdev);
}
EXPORT_SYMBOL_GPL(usbnet_disconnect);
@@ -1363,8 +1362,6 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
xdev = interface_to_usbdev (udev);
interface = udev->cur_altsetting;
- usb_get_dev (xdev);
-
status = -ENOMEM;
// set up our own records
@@ -1493,7 +1490,6 @@ out3:
out1:
free_netdev(net);
out:
- usb_put_dev(xdev);
return status;
}
EXPORT_SYMBOL_GPL(usbnet_probe);
--
1.7.9.5
^ 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