* Re: [PATCH 07/24] can: Remove unnecessary OOM logging messages
From: Oliver Hartkopp @ 2011-08-31 17:11 UTC (permalink / raw)
To: Joe Perches; +Cc: Urs Thuermann, David S. Miller, netdev, linux-kernel
In-Reply-To: <d2773db0709a09bfe6d43a28ba1323c5d3f9a76b.1314650069.git.joe@perches.com>
On 29.08.2011 23:17, Joe Perches wrote:
> Removing unnecessary messages saves code and text.
>
> Site specific OOM messages are duplications of a generic MM
> out of memory message and aren't really useful, so just
> delete them.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Tnx Joe.
> ---
> net/can/af_can.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/net/can/af_can.c b/net/can/af_can.c
> index b9efa94..11300be 100644
> --- a/net/can/af_can.c
> +++ b/net/can/af_can.c
> @@ -770,11 +770,9 @@ static int can_notifier(struct notifier_block *nb, unsigned long msg,
>
> /* create new dev_rcv_lists for this device */
> d = kzalloc(sizeof(*d), GFP_KERNEL);
> - if (!d) {
> - printk(KERN_ERR
> - "can: allocation of receive list failed\n");
> + if (!d)
> return NOTIFY_DONE;
> - }
> +
> BUG_ON(dev->ml_priv);
> dev->ml_priv = d;
>
^ permalink raw reply
* Re: [PATCH RFT v3] bnx2: don't request firmware when there's no userspace.
From: Michael Chan @ 2011-08-31 16:32 UTC (permalink / raw)
To: Francois Romieu; +Cc: davem@davemloft.net, netdev@vger.kernel.org
In-Reply-To: <20110831045943.GB24254@electric-eye.fr.zoreil.com>
On Tue, 2011-08-30 at 21:59 -0700, Francois Romieu wrote:
> The firmware is cached during the first successful call to open() and
> released once the network device is unregistered. The driver uses the
> cached firmware between open() and unregister_netdev().
>
> It's similar to 953a12cc2889d1be92e80a2d0bab5ffef4942300 but the
> firmware is mandatory.
>
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
> Reviewed-by: Michael Chan <mchan@broadcom.com>
This version looks good. If this is for net-next, please re-diff
against net-next which has moved all net drivers to new locations.
Thanks.
> ---
> Since v2: remove erroneous __devinit.
> Since v1: conditional release in bnx2_release_firmware.
>
> drivers/net/bnx2.c | 64 ++++++++++++++++++++++++++++++++-------------------
> 1 files changed, 40 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
> index 4b2b570..87a21c1 100644
> --- a/drivers/net/bnx2.c
> +++ b/drivers/net/bnx2.c
> @@ -3649,8 +3649,17 @@ check_mips_fw_entry(const struct firmware *fw,
> return 0;
> }
>
> -static int __devinit
> -bnx2_request_firmware(struct bnx2 *bp)
> +static void bnx2_release_firmware(struct bnx2 *bp)
> +{
> + if (bp->rv2p_firmware) {
> + release_firmware(bp->mips_firmware);
> + release_firmware(bp->rv2p_firmware);
> + bp->rv2p_firmware = NULL;
> + }
> +}
> +
> +static int
> +bnx2_request_uncached_firmware(struct bnx2 *bp)
> {
> const char *mips_fw_file, *rv2p_fw_file;
> const struct bnx2_mips_fw_file *mips_fw;
> @@ -3672,13 +3681,13 @@ bnx2_request_firmware(struct bnx2 *bp)
> rc = request_firmware(&bp->mips_firmware, mips_fw_file, &bp->pdev->dev);
> if (rc) {
> pr_err("Can't load firmware file \"%s\"\n", mips_fw_file);
> - return rc;
> + goto out;
> }
>
> rc = request_firmware(&bp->rv2p_firmware, rv2p_fw_file, &bp->pdev->dev);
> if (rc) {
> pr_err("Can't load firmware file \"%s\"\n", rv2p_fw_file);
> - return rc;
> + goto err_release_mips_firmware;
> }
> mips_fw = (const struct bnx2_mips_fw_file *) bp->mips_firmware->data;
> rv2p_fw = (const struct bnx2_rv2p_fw_file *) bp->rv2p_firmware->data;
> @@ -3689,16 +3698,30 @@ bnx2_request_firmware(struct bnx2 *bp)
> check_mips_fw_entry(bp->mips_firmware, &mips_fw->tpat) ||
> check_mips_fw_entry(bp->mips_firmware, &mips_fw->txp)) {
> pr_err("Firmware file \"%s\" is invalid\n", mips_fw_file);
> - return -EINVAL;
> + rc = -EINVAL;
> + goto err_release_firmware;
> }
> if (bp->rv2p_firmware->size < sizeof(*rv2p_fw) ||
> check_fw_section(bp->rv2p_firmware, &rv2p_fw->proc1.rv2p, 8, true) ||
> check_fw_section(bp->rv2p_firmware, &rv2p_fw->proc2.rv2p, 8, true)) {
> pr_err("Firmware file \"%s\" is invalid\n", rv2p_fw_file);
> - return -EINVAL;
> + rc = -EINVAL;
> + goto err_release_firmware;
> }
> +out:
> + return rc;
>
> - return 0;
> +err_release_firmware:
> + release_firmware(bp->rv2p_firmware);
> + bp->rv2p_firmware = NULL;
> +err_release_mips_firmware:
> + release_firmware(bp->mips_firmware);
> + goto out;
> +}
> +
> +static int bnx2_request_firmware(struct bnx2 *bp)
> +{
> + return bp->rv2p_firmware ? 0 : bnx2_request_uncached_firmware(bp);
> }
>
> static u32
> @@ -6266,6 +6289,10 @@ bnx2_open(struct net_device *dev)
> struct bnx2 *bp = netdev_priv(dev);
> int rc;
>
> + rc = bnx2_request_firmware(bp);
> + if (rc < 0)
> + goto out;
> +
> netif_carrier_off(dev);
>
> bnx2_set_power_state(bp, PCI_D0);
> @@ -6326,8 +6353,8 @@ bnx2_open(struct net_device *dev)
> netdev_info(dev, "using MSIX\n");
>
> netif_tx_start_all_queues(dev);
> -
> - return 0;
> +out:
> + return rc;
>
> open_err:
> bnx2_napi_disable(bp);
> @@ -6335,7 +6362,8 @@ open_err:
> bnx2_free_irq(bp);
> bnx2_free_mem(bp);
> bnx2_del_napi(bp);
> - return rc;
> + bnx2_release_firmware(bp);
> + goto out;
> }
>
> static void
> @@ -8353,10 +8381,6 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>
> pci_set_drvdata(pdev, dev);
>
> - rc = bnx2_request_firmware(bp);
> - if (rc)
> - goto error;
> -
> memcpy(dev->dev_addr, bp->mac_addr, 6);
> memcpy(dev->perm_addr, bp->mac_addr, 6);
>
> @@ -8387,11 +8411,6 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
> return 0;
>
> error:
> - if (bp->mips_firmware)
> - release_firmware(bp->mips_firmware);
> - if (bp->rv2p_firmware)
> - release_firmware(bp->rv2p_firmware);
> -
> if (bp->regview)
> iounmap(bp->regview);
> pci_release_regions(pdev);
> @@ -8412,11 +8431,6 @@ bnx2_remove_one(struct pci_dev *pdev)
> del_timer_sync(&bp->timer);
> cancel_work_sync(&bp->reset_task);
>
> - if (bp->mips_firmware)
> - release_firmware(bp->mips_firmware);
> - if (bp->rv2p_firmware)
> - release_firmware(bp->rv2p_firmware);
> -
> if (bp->regview)
> iounmap(bp->regview);
>
> @@ -8427,6 +8441,8 @@ bnx2_remove_one(struct pci_dev *pdev)
> bp->flags &= ~BNX2_FLAG_AER_ENABLED;
> }
>
> + bnx2_release_firmware(bp);
> +
> free_netdev(dev);
>
> pci_release_regions(pdev);
^ permalink raw reply
* Re: [PATCH] virtio-net: Read MAC only after initializing MSI-X
From: Sasha Levin @ 2011-08-31 16:24 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Rusty Russell, linux-kernel, virtualization, netdev, kvm
In-Reply-To: <20110822083613.GA18556@redhat.com>
I'm wondering if we can switch to using a linked list 'capabilities'
structure similar to whats being done with PCI capabilities.
Here are the pros and the cons as I see them:
Pros:
* Simpler code - currently before each access to the virtio config
space we have to check whether MSI-X is on and whether the device has
64bit features. This isn't necessarily slow, but it complicates the
code.
* Future proof - code will be a mess once 5-6 features can change the
config space.
* 'Concept reuse' - using same concepts in virtio-pci as the ones used
in PCI ('PCI Capabilities list') would make it easier to understand, and
would implement the same method to use optional features as in the layer
above.
Cons:
* MSI-X is already moving the config space, we'll need to keep
supporting it for a while, but it would mean that it's the only thing we
need to keep backwards compatible.
* 64bit features also move config space, but they're brand new in the
spec and aren't implemented in the kernel yet - I doubt anyone
implemented it anywhere else yet.
On Mon, 2011-08-22 at 11:36 +0300, Michael S. Tsirkin wrote:
> On Mon, Aug 22, 2011 at 09:54:50AM +0930, Rusty Russell wrote:
> > On Fri, 19 Aug 2011 18:23:35 +0300, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > > On Sat, Aug 13, 2011 at 11:51:01AM +0300, Sasha Levin wrote:
> > > > The MAC of a virtio-net device is located at the first field of the device
> > > > specific header. This header is located at offset 20 if the device doesn't
> > > > support MSI-X or offset 24 if it does.
> > > >
> > > > Current code in virtnet_probe() used to probe the MAC before checking for
> > > > MSI-X, which means that the read was always made from offset 20 regardless
> > > > of whether MSI-X in enabled or not.
> > > >
> > > > This patch moves the MAC probe to after the detection of whether MSI-X is
> > > > enabled. This way the MAC will be read from offset 24 if the device indeed
> > > > supports MSI-X.
> > > >
> > > > Cc: Rusty Russell <rusty@rustcorp.com.au>
> > > > Cc: Michael S. Tsirkin <mst@redhat.com>
> > > > Cc: virtualization@lists.linux-foundation.org
> > > > Cc: netdev@vger.kernel.org
> > > > Cc: kvm@vger.kernel.org
> > > > Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
> > >
> > > I am not sure I see a bug in virtio: the config pace layout simply
> > > changes as msix is enabled and disabled (and if you look at the latest
> > > draft, also on whether 64 bit features are enabled).
> > > It doesn't depend on msix capability being present in device.
> > >
> > > The spec seems to be explicit enough:
> > > If MSI-X is enabled for the device, two additional fields immediately
> > > follow this header.
> > >
> > > So I'm guessing the bug is in kvm tools which assume
> > > same layout for when msix is enabled and disabled.
> > > qemu-kvm seems to do the right thing so the device
> > > seems to get the correct mac.
> >
> > So, the config space moves once MSI-X is enabled? In which case, it
> > should say "ONCE MSI-X is enabled..."
> >
> > Thanks,
> > Rusty.
>
> Yes. Or maybe 'WHEN' - since if MSI-X is disabled again, it moves back.
> Let's update the spec to make it clearer?
>
--
Sasha.
^ permalink raw reply
* [PATCH] net: Initialize entire flowi struct
From: David Ward @ 2011-08-31 16:05 UTC (permalink / raw)
To: netdev; +Cc: David Ward
The entire flowi struct needs to be initialized by afinfo->decode_session,
because flow_hash_code operates over the entire struct and may otherwise
return different hash values for what is intended to be the same key.
Signed-off-by: David Ward <david.ward@ll.mit.edu>
---
net/ipv4/xfrm4_policy.c | 2 +-
net/ipv6/xfrm6_policy.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index fc5368a..afce24d 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -114,7 +114,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)
u8 *xprth = skb_network_header(skb) + iph->ihl * 4;
struct flowi4 *fl4 = &fl->u.ip4;
- memset(fl4, 0, sizeof(struct flowi4));
+ memset(fl, 0, sizeof(struct flowi));
fl4->flowi4_mark = skb->mark;
if (!ip_is_fragment(iph)) {
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index d879f7e..9088d38 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -129,7 +129,7 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
const unsigned char *nh = skb_network_header(skb);
u8 nexthdr = nh[IP6CB(skb)->nhoff];
- memset(fl6, 0, sizeof(struct flowi6));
+ memset(fl, 0, sizeof(struct flowi));
fl6->flowi6_mark = skb->mark;
ipv6_addr_copy(&fl6->daddr, reverse ? &hdr->saddr : &hdr->daddr);
--
1.7.4.1
^ permalink raw reply related
* [PATCH] net: Make flow cache namespace-aware
From: David Ward @ 2011-08-31 16:05 UTC (permalink / raw)
To: netdev; +Cc: David Ward, Andrew Dickinson
In-Reply-To: <AANLkTinZJ9REmG0pHCVzEZ=tN-R4WuiQunuCBhmYtzyb@mail.gmail.com>
flow_cache_lookup will return a cached object (or null pointer) that the
resolver (i.e. xfrm_policy_lookup) previously found for another namespace
using the same key/family/dir. Instead, make the namespace part of what
identifies entries in the cache.
As before, flow_entry_valid will return 0 for entries where the namespace
has been deleted, and they will be removed from the cache the next time
flow_cache_gc_task is run.
Reported-by: Andrew Dickinson <whydna@whydna.net>
Signed-off-by: David Ward <david.ward@ll.mit.edu>
---
net/core/flow.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/net/core/flow.c b/net/core/flow.c
index bf32c33..47b6d26 100644
--- a/net/core/flow.c
+++ b/net/core/flow.c
@@ -30,6 +30,7 @@ struct flow_cache_entry {
struct hlist_node hlist;
struct list_head gc_list;
} u;
+ struct net *net;
u16 family;
u8 dir;
u32 genid;
@@ -232,7 +233,8 @@ flow_cache_lookup(struct net *net, const struct flowi *key, u16 family, u8 dir,
hash = flow_hash_code(fc, fcp, key);
hlist_for_each_entry(tfle, entry, &fcp->hash_table[hash], u.hlist) {
- if (tfle->family == family &&
+ if (tfle->net == net &&
+ tfle->family == family &&
tfle->dir == dir &&
flow_key_compare(key, &tfle->key) == 0) {
fle = tfle;
@@ -246,6 +248,7 @@ flow_cache_lookup(struct net *net, const struct flowi *key, u16 family, u8 dir,
fle = kmem_cache_alloc(flow_cachep, GFP_ATOMIC);
if (fle) {
+ fle->net = net;
fle->family = family;
fle->dir = dir;
memcpy(&fle->key, key, sizeof(*key));
--
1.7.4.1
^ permalink raw reply related
* Re: [patch net-next-2.6] net: allow notifier subscribers to forbid device from closing
From: Jiri Pirko @ 2011-08-31 16:22 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Ben Hutchings, netdev, davem, eric.dumazet
In-Reply-To: <20110831085338.04c96e70@nehalam.ftrdhcpuser.net>
Wed, Aug 31, 2011 at 05:53:38PM CEST, shemminger@vyatta.com wrote:
>On Wed, 31 Aug 2011 16:25:51 +0100
>Ben Hutchings <bhutchings@solarflare.com> wrote:
>
>> On Wed, 2011-08-31 at 17:15 +0200, Jiri Pirko wrote:
>> > In some situations, like when the device is used as slave device in
>> > bond/br/etc it is not nice if someone closes the device. This allows
>> > it's masters to forbid this closure.
>>
>> No it doesn't.
>>
>> [...]
>> > @@ -1269,9 +1282,12 @@ static int dev_close_many(struct list_head *head)
>> > struct net_device *dev, *tmp;
>> > LIST_HEAD(tmp_list);
>> >
>> > - list_for_each_entry_safe(dev, tmp, head, unreg_list)
>> > + list_for_each_entry_safe(dev, tmp, head, unreg_list) {
>> > if (!(dev->flags & IFF_UP))
>> > list_move(&dev->unreg_list, &tmp_list);
>> > + else
>> > + __dev_pre_close(dev);
>> > + }
>> >
>> > __dev_close_many(head);
>>
>> The return value is ignored here.
>>
>> And this is called from dev_close(), where you are adding the
>> notification as well. So the notifier will usually be called twice.
>>
>> [...]
>> > @@ -1397,6 +1418,7 @@ rollback:
>> > break;
>> >
>> > if (dev->flags & IFF_UP) {
>> > + nb->notifier_call(nb, NETDEV_PRE_DOWN, dev);
>> > nb->notifier_call(nb, NETDEV_GOING_DOWN, dev);
>> > nb->notifier_call(nb, NETDEV_DOWN, dev);
>> > }
>> [...]
>>
>> The return value has to be ignored here. Not sure it makes any sense to
>> call the notifier at all.
>>
>> Ben.
>>
>
>Also we need to allow rmmod'ing a network device even it is
>part of a bridge and that implicitly
>calls close.
this is not a problem because when it's called from
rollback_registered_many, return value if pre_down is ignored.
^ permalink raw reply
* Re: [patch net-next-2.6] net: allow notifier subscribers to forbid device from closing
From: Jiri Pirko @ 2011-08-31 16:21 UTC (permalink / raw)
To: Ben Hutchings; +Cc: netdev, davem, eric.dumazet, shemminger
In-Reply-To: <1314804352.2741.4.camel@bwh-desktop>
Wed, Aug 31, 2011 at 05:25:51PM CEST, bhutchings@solarflare.com wrote:
>On Wed, 2011-08-31 at 17:15 +0200, Jiri Pirko wrote:
>> In some situations, like when the device is used as slave device in
>> bond/br/etc it is not nice if someone closes the device. This allows
>> it's masters to forbid this closure.
>
>No it doesn't.
It does
>
>[...]
>> @@ -1269,9 +1282,12 @@ static int dev_close_many(struct list_head *head)
>> struct net_device *dev, *tmp;
>> LIST_HEAD(tmp_list);
>>
>> - list_for_each_entry_safe(dev, tmp, head, unreg_list)
>> + list_for_each_entry_safe(dev, tmp, head, unreg_list) {
>> if (!(dev->flags & IFF_UP))
>> list_move(&dev->unreg_list, &tmp_list);
>> + else
>> + __dev_pre_close(dev);
>> + }
>>
>> __dev_close_many(head);
>
>The return value is ignored here.
That's intended. The reason is this is called from
rollback_registered_many - refuse should be ignored in that case
>
>And this is called from dev_close(), where you are adding the
>notification as well. So the notifier will usually be called twice.
>
Indeed. Anyway I thought about it and we probably do not need this patch
as Stephen said.
>[...]
>> @@ -1397,6 +1418,7 @@ rollback:
>> break;
>>
>> if (dev->flags & IFF_UP) {
>> + nb->notifier_call(nb, NETDEV_PRE_DOWN, dev);
>> nb->notifier_call(nb, NETDEV_GOING_DOWN, dev);
>> nb->notifier_call(nb, NETDEV_DOWN, dev);
>> }
>[...]
>
>The return value has to be ignored here. Not sure it makes any sense to
>call the notifier at all.
>
>Ben.
>
>--
>Ben Hutchings, Staff Engineer, Solarflare
>Not speaking for my employer; that's the marketing department's job.
>They asked us to note that Solarflare product names are trademarked.
>
^ permalink raw reply
* [PATCH net-next 3/3] r8169: support new chips of RTL8111F
From: Hayes Wang @ 2011-08-31 16:17 UTC (permalink / raw)
To: romieu; +Cc: netdev, linux-kernel, Hayes Wang
In-Reply-To: <1314807479-1552-1-git-send-email-hayeswang@realtek.com>
Support new chips of RTL8111F.
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
drivers/net/ethernet/realtek/r8169.c | 178 +++++++++++++++++++++++++++++++++-
1 files changed, 176 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 68f1e2f..c04fbc0 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -42,6 +42,8 @@
#define FIRMWARE_8168E_1 "rtl_nic/rtl8168e-1.fw"
#define FIRMWARE_8168E_2 "rtl_nic/rtl8168e-2.fw"
#define FIRMWARE_8168E_3 "rtl_nic/rtl8168e-3.fw"
+#define FIRMWARE_8168F_1 "rtl_nic/rtl8168f-1.fw"
+#define FIRMWARE_8168F_2 "rtl_nic/rtl8168f-2.fw"
#define FIRMWARE_8105E_1 "rtl_nic/rtl8105e-1.fw"
#ifdef RTL8169_DEBUG
@@ -133,6 +135,8 @@ enum mac_version {
RTL_GIGA_MAC_VER_32,
RTL_GIGA_MAC_VER_33,
RTL_GIGA_MAC_VER_34,
+ RTL_GIGA_MAC_VER_35,
+ RTL_GIGA_MAC_VER_36,
RTL_GIGA_MAC_NONE = 0xff,
};
@@ -218,7 +222,11 @@ static const struct {
[RTL_GIGA_MAC_VER_33] =
_R("RTL8168e/8111e", RTL_TD_1, FIRMWARE_8168E_2),
[RTL_GIGA_MAC_VER_34] =
- _R("RTL8168evl/8111evl",RTL_TD_1, FIRMWARE_8168E_3)
+ _R("RTL8168evl/8111evl",RTL_TD_1, FIRMWARE_8168E_3),
+ [RTL_GIGA_MAC_VER_35] =
+ _R("RTL8168f/8111f", RTL_TD_1, FIRMWARE_8168F_1),
+ [RTL_GIGA_MAC_VER_36] =
+ _R("RTL8168f/8111f", RTL_TD_1, FIRMWARE_8168F_2)
};
#undef _R
@@ -1199,6 +1207,19 @@ static void rtl_link_chg_patch(struct rtl8169_private *tp)
ERIAR_EXGMAC);
rtl_w1w0_eri(ioaddr, 0xdc, ERIAR_MASK_0001, 0x01, 0x00,
ERIAR_EXGMAC);
+ } else if (tp->mac_version == RTL_GIGA_MAC_VER_35 ||
+ tp->mac_version == RTL_GIGA_MAC_VER_36) {
+ if (RTL_R8(PHYstatus) & _1000bpsF) {
+ rtl_eri_write(ioaddr, 0x1bc, ERIAR_MASK_1111,
+ 0x00000011, ERIAR_EXGMAC);
+ rtl_eri_write(ioaddr, 0x1dc, ERIAR_MASK_1111,
+ 0x00000005, ERIAR_EXGMAC);
+ } else {
+ rtl_eri_write(ioaddr, 0x1bc, ERIAR_MASK_1111,
+ 0x0000001f, ERIAR_EXGMAC);
+ rtl_eri_write(ioaddr, 0x1dc, ERIAR_MASK_1111,
+ 0x0000003f, ERIAR_EXGMAC);
+ }
}
}
@@ -1738,6 +1759,10 @@ static void rtl8169_get_mac_version(struct rtl8169_private *tp,
u32 val;
int mac_version;
} mac_info[] = {
+ /* 8168F family. */
+ { 0x7cf00000, 0x48100000, RTL_GIGA_MAC_VER_36 },
+ { 0x7cf00000, 0x48000000, RTL_GIGA_MAC_VER_35 },
+
/* 8168E family. */
{ 0x7c800000, 0x2c800000, RTL_GIGA_MAC_VER_34 },
{ 0x7cf00000, 0x2c200000, RTL_GIGA_MAC_VER_33 },
@@ -2872,6 +2897,97 @@ static void rtl8168e_2_hw_phy_config(struct rtl8169_private *tp)
rtl_writephy(tp, 0x1f, 0x0000);
}
+static void rtl8168f_1_hw_phy_config(struct rtl8169_private *tp)
+{
+ static const struct phy_reg phy_reg_init[] = {
+ /* Channel estimation fine tune */
+ { 0x1f, 0x0003 },
+ { 0x09, 0xa20f },
+ { 0x1f, 0x0000 },
+
+ /* Modify green table for giga & fnet */
+ { 0x1f, 0x0005 },
+ { 0x05, 0x8b55 },
+ { 0x06, 0x0000 },
+ { 0x05, 0x8b5e },
+ { 0x06, 0x0000 },
+ { 0x05, 0x8b67 },
+ { 0x06, 0x0000 },
+ { 0x05, 0x8b70 },
+ { 0x06, 0x0000 },
+ { 0x1f, 0x0000 },
+ { 0x1f, 0x0007 },
+ { 0x1e, 0x0078 },
+ { 0x17, 0x0000 },
+ { 0x19, 0x00fb },
+ { 0x1f, 0x0000 },
+
+ /* Modify green table for 10M */
+ { 0x1f, 0x0005 },
+ { 0x05, 0x8b79 },
+ { 0x06, 0xaa00 },
+ { 0x1f, 0x0000 },
+
+ /* Disable hiimpedance detection (RTCT) */
+ { 0x1f, 0x0003 },
+ { 0x01, 0x328a },
+ { 0x1f, 0x0000 }
+ };
+
+ rtl_apply_firmware(tp);
+
+ rtl_writephy_batch(tp, phy_reg_init, ARRAY_SIZE(phy_reg_init));
+
+ /* For 4-corner performance improve */
+ rtl_writephy(tp, 0x1f, 0x0005);
+ rtl_writephy(tp, 0x05, 0x8b80);
+ rtl_w1w0_phy(tp, 0x06, 0x0006, 0x0000);
+ rtl_writephy(tp, 0x1f, 0x0000);
+
+ /* PHY auto speed down */
+ rtl_writephy(tp, 0x1f, 0x0007);
+ rtl_writephy(tp, 0x1e, 0x002d);
+ rtl_w1w0_phy(tp, 0x18, 0x0010, 0x0000);
+ rtl_writephy(tp, 0x1f, 0x0000);
+ rtl_w1w0_phy(tp, 0x14, 0x8000, 0x0000);
+
+ /* improve 10M EEE waveform */
+ rtl_writephy(tp, 0x1f, 0x0005);
+ rtl_writephy(tp, 0x05, 0x8b86);
+ rtl_w1w0_phy(tp, 0x06, 0x0001, 0x0000);
+ rtl_writephy(tp, 0x1f, 0x0000);
+
+ /* Improve 2-pair detection performance */
+ rtl_writephy(tp, 0x1f, 0x0005);
+ rtl_writephy(tp, 0x05, 0x8b85);
+ rtl_w1w0_phy(tp, 0x06, 0x4000, 0x0000);
+ rtl_writephy(tp, 0x1f, 0x0000);
+}
+
+static void rtl8168f_2_hw_phy_config(struct rtl8169_private *tp)
+{
+ rtl_apply_firmware(tp);
+
+ /* For 4-corner performance improve */
+ rtl_writephy(tp, 0x1f, 0x0005);
+ rtl_writephy(tp, 0x05, 0x8b80);
+ rtl_w1w0_phy(tp, 0x06, 0x0006, 0x0000);
+ rtl_writephy(tp, 0x1f, 0x0000);
+
+ /* PHY auto speed down */
+ rtl_writephy(tp, 0x1f, 0x0007);
+ rtl_writephy(tp, 0x1e, 0x002d);
+ rtl_w1w0_phy(tp, 0x18, 0x0010, 0x0000);
+ rtl_writephy(tp, 0x1f, 0x0000);
+ rtl_w1w0_phy(tp, 0x14, 0x8000, 0x0000);
+
+ /* improve 10M EEE waveform */
+ rtl_writephy(tp, 0x1f, 0x0005);
+ rtl_writephy(tp, 0x05, 0x8b86);
+ rtl_w1w0_phy(tp, 0x06, 0x0001, 0x0000);
+ rtl_writephy(tp, 0x1f, 0x0000);
+}
+
static void rtl8102e_hw_phy_config(struct rtl8169_private *tp)
{
static const struct phy_reg phy_reg_init[] = {
@@ -2996,6 +3112,12 @@ static void rtl_hw_phy_config(struct net_device *dev)
case RTL_GIGA_MAC_VER_34:
rtl8168e_2_hw_phy_config(tp);
break;
+ case RTL_GIGA_MAC_VER_35:
+ rtl8168f_1_hw_phy_config(tp);
+ break;
+ case RTL_GIGA_MAC_VER_36:
+ rtl8168f_2_hw_phy_config(tp);
+ break;
default:
break;
@@ -3518,6 +3640,8 @@ static void __devinit rtl_init_pll_power_ops(struct rtl8169_private *tp)
case RTL_GIGA_MAC_VER_32:
case RTL_GIGA_MAC_VER_33:
case RTL_GIGA_MAC_VER_34:
+ case RTL_GIGA_MAC_VER_35:
+ case RTL_GIGA_MAC_VER_36:
ops->down = r8168_pll_power_down;
ops->up = r8168_pll_power_up;
break;
@@ -3990,7 +4114,9 @@ static void rtl8169_hw_reset(struct rtl8169_private *tp)
tp->mac_version == RTL_GIGA_MAC_VER_31) {
while (RTL_R8(TxPoll) & NPQ)
udelay(20);
- } else if (tp->mac_version == RTL_GIGA_MAC_VER_34) {
+ } else if (tp->mac_version == RTL_GIGA_MAC_VER_34 ||
+ tp->mac_version == RTL_GIGA_MAC_VER_35 ||
+ tp->mac_version == RTL_GIGA_MAC_VER_36) {
RTL_W8(ChipCmd, RTL_R8(ChipCmd) | StopReq);
while (!(RTL_R32(TxConfig) & TXCFG_EMPTY))
udelay(100);
@@ -4476,6 +4602,49 @@ static void rtl_hw_start_8168e_2(void __iomem *ioaddr, struct pci_dev *pdev)
RTL_W8(Config5, RTL_R8(Config5) & ~Spi_en);
}
+static void rtl_hw_start_8168f_1(void __iomem *ioaddr, struct pci_dev *pdev)
+{
+ static const struct ephy_info e_info_8168f_1[] = {
+ { 0x06, 0x00c0, 0x0020 },
+ { 0x08, 0x0001, 0x0002 },
+ { 0x09, 0x0000, 0x0080 },
+ { 0x19, 0x0000, 0x0224 }
+ };
+
+ rtl_csi_access_enable_1(ioaddr);
+
+ rtl_ephy_init(ioaddr, e_info_8168f_1, ARRAY_SIZE(e_info_8168f_1));
+
+ rtl_tx_performance_tweak(pdev, 0x5 << MAX_READ_REQUEST_SHIFT);
+
+ rtl_eri_write(ioaddr, 0xc0, ERIAR_MASK_0011, 0x0000, ERIAR_EXGMAC);
+ rtl_eri_write(ioaddr, 0xb8, ERIAR_MASK_0011, 0x0000, ERIAR_EXGMAC);
+ rtl_eri_write(ioaddr, 0xc8, ERIAR_MASK_1111, 0x00100002, ERIAR_EXGMAC);
+ rtl_eri_write(ioaddr, 0xe8, ERIAR_MASK_1111, 0x00100006, ERIAR_EXGMAC);
+ rtl_w1w0_eri(ioaddr, 0xdc, ERIAR_MASK_0001, 0x00, 0x01, ERIAR_EXGMAC);
+ rtl_w1w0_eri(ioaddr, 0xdc, ERIAR_MASK_0001, 0x01, 0x00, ERIAR_EXGMAC);
+ rtl_w1w0_eri(ioaddr, 0x1b0, ERIAR_MASK_0001, 0x10, 0x00, ERIAR_EXGMAC);
+ rtl_w1w0_eri(ioaddr, 0x1d0, ERIAR_MASK_0001, 0x10, 0x00, ERIAR_EXGMAC);
+ rtl_eri_write(ioaddr, 0xcc, ERIAR_MASK_1111, 0x00000050, ERIAR_EXGMAC);
+ rtl_eri_write(ioaddr, 0xd0, ERIAR_MASK_1111, 0x00000060, ERIAR_EXGMAC);
+ rtl_w1w0_eri(ioaddr, 0x0d4, ERIAR_MASK_0011, 0x0c00, 0xff00,
+ ERIAR_EXGMAC);
+
+ RTL_W8(MaxTxPacketSize, 0x27);
+
+ rtl_disable_clock_request(pdev);
+
+ RTL_W32(TxConfig, RTL_R32(TxConfig) | TXCFG_AUTO_FIFO);
+ RTL_W8(MCU, RTL_R8(MCU) & ~NOW_IS_OOB);
+
+ /* Adjust EEE LED frequency */
+ RTL_W8(EEE_LED, RTL_R8(EEE_LED) & ~0x07);
+
+ RTL_W8(DLLPR, RTL_R8(DLLPR) | PFM_EN);
+ RTL_W32(MISC, RTL_R32(MISC) | PWM_EN);
+ RTL_W8(Config5, RTL_R8(Config5) & ~Spi_en);
+}
+
static void rtl_hw_start_8168(struct net_device *dev)
{
struct rtl8169_private *tp = netdev_priv(dev);
@@ -4570,6 +4739,11 @@ static void rtl_hw_start_8168(struct net_device *dev)
rtl_hw_start_8168e_2(ioaddr, pdev);
break;
+ case RTL_GIGA_MAC_VER_35:
+ case RTL_GIGA_MAC_VER_36:
+ rtl_hw_start_8168f_1(ioaddr, pdev);
+ break;
+
default:
printk(KERN_ERR PFX "%s: unknown chipset (mac_version = %d).\n",
dev->name, tp->mac_version);
--
1.7.6
^ permalink raw reply related
* [PATCH net-next 2/3] r8169: fix the reset setting for 8111evl
From: Hayes Wang @ 2011-08-31 16:17 UTC (permalink / raw)
To: romieu; +Cc: netdev, linux-kernel, Hayes Wang
In-Reply-To: <1314807479-1552-1-git-send-email-hayeswang@realtek.com>
8111evl should stop any TLP requirement before resetting by enabling
IO 0x37 bit 7.
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
drivers/net/ethernet/realtek/r8169.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 96e003a..68f1e2f 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -3991,6 +3991,7 @@ static void rtl8169_hw_reset(struct rtl8169_private *tp)
while (RTL_R8(TxPoll) & NPQ)
udelay(20);
} else if (tp->mac_version == RTL_GIGA_MAC_VER_34) {
+ RTL_W8(ChipCmd, RTL_R8(ChipCmd) | StopReq);
while (!(RTL_R32(TxConfig) & TXCFG_EMPTY))
udelay(100);
} else {
--
1.7.6
^ permalink raw reply related
* [PATCH net-next 1/3] r8169: fix WOL setting for 8105 and 8111EVL
From: Hayes Wang @ 2011-08-31 16:17 UTC (permalink / raw)
To: romieu; +Cc: netdev, linux-kernel, Hayes Wang
8105, 8111E, and 8111EVL need enable RxConfig bit 1 ~ 3 for supporting
wake on lan.
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
drivers/net/ethernet/realtek/r8169.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 1cf8c3c..96e003a 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -3416,8 +3416,11 @@ static void r8168_pll_power_down(struct rtl8169_private *tp)
rtl_writephy(tp, 0x1f, 0x0000);
rtl_writephy(tp, MII_BMCR, 0x0000);
- if (tp->mac_version == RTL_GIGA_MAC_VER_32 ||
- tp->mac_version == RTL_GIGA_MAC_VER_33)
+ if (tp->mac_version == RTL_GIGA_MAC_VER_29 ||
+ tp->mac_version == RTL_GIGA_MAC_VER_30 ||
+ tp->mac_version == RTL_GIGA_MAC_VER_32 ||
+ tp->mac_version == RTL_GIGA_MAC_VER_33 ||
+ tp->mac_version == RTL_GIGA_MAC_VER_34)
RTL_W32(RxConfig, RTL_R32(RxConfig) | AcceptBroadcast |
AcceptMulticast | AcceptMyPhys);
return;
--
1.7.6
^ permalink raw reply related
* [linux-firmware v3 2/2] rtl_nic: add new firmware for RTL8111F
From: Hayes Wang @ 2011-08-31 16:16 UTC (permalink / raw)
To: dwmw2; +Cc: romieu, netdev, Hayes Wang
In-Reply-To: <1314807407-1512-1-git-send-email-hayeswang@realtek.com>
Add new firmware:
1. rtl_nic/rtl8168f-1.fw
version: 0.0.2
2. rtl_nic/rtl8168f-2.fw
version: 0.0.2
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
WHENCE | 2 ++
rtl_nic/rtl8168f-1.fw | Bin 0 -> 3024 bytes
rtl_nic/rtl8168f-2.fw | Bin 0 -> 336 bytes
3 files changed, 2 insertions(+), 0 deletions(-)
create mode 100644 rtl_nic/rtl8168f-1.fw
create mode 100644 rtl_nic/rtl8168f-2.fw
diff --git a/WHENCE b/WHENCE
index eb7bdfd..2e79b26 100644
--- a/WHENCE
+++ b/WHENCE
@@ -1658,6 +1658,8 @@ File: rtl_nic/rtl8105e-1.fw
File: rtl_nic/rtl8168e-1.fw
File: rtl_nic/rtl8168e-2.fw
File: rtl_nic/rtl8168e-3.fw (version: 0.0.2)
+File: rtl_nic/rtl8168f-1.fw (version: 0.0.2)
+File: rtl_nic/rtl8168f-2.fw (version: 0.0.2)
Licence:
* Copyright © 2011, Realtek Semiconductor Corporation
diff --git a/rtl_nic/rtl8168f-1.fw b/rtl_nic/rtl8168f-1.fw
new file mode 100644
index 0000000000000000000000000000000000000000..ffb1dd137eebeb2394acbfcf14c96a6091e73a06
GIT binary patch
literal 3024
zcmbuBdx+Fk6vyw*I>+72d~Q0quCou{ubCBXwSQKlFtQRMB9jc#KoE>FQqefNiaMJj
zT9yQ|83c*Dgb0O!yNX!)NB9a9U%%1yLCP$Ft-9^*^f_~XqigtI1DA8|d4A8i=ic8q
z=iEojm)0bw)qF59xiB#)F{wJ9sF^$^IXRg`XTQ0u%Ms_Q+`Ku{s;d(-7tWjc+QJu?
zEn2)VnM~AFPl;DgnUS12V@i$N=G+K%L!CNT;<9Zn4sCI>o%TjP*_9!89~L+lI9F;$
zadnY~Mb7-9iM+4bRz7As)Zr6%*bWYDqu8`(qpD7FvCUozpVi*1FA7R@O>IoSb|u<p
zbxd~|T^iHdA-!*OSxmd3{h$}1#n6k;uBMn?3iX$b9*gM}Xorhw08J-iz%I$<a^y11
zJ+U|iQ$+OMY{4Fy71ajOCS;Lz(V+#R1;&pQ-KHTwOLPHp^NTc!o<Lq7h^9A*Zm!3s
zjD1?PEQJia`ku1Sy=+TQ*;dg8?0$8kzch)iKP%cgO>{dp_18r+J4AmYR;G|#M&A={
zF^c`+kRCGHTeR8e$D&_Co58n<819bf4>9n=XC4UW;C-#uQ{C7R=gNA~8thN4VGow8
z;l3C9;J#=I-#E2q275k&&#Q582Glc3baX3xMzj*X70jKZMeq0WeQDexIvCq}^bS6S
z&x-k?yQwEqEP5*{y4HI6hUn62(O#WC=hiT1`*337Z~Mt+htH4WL?;;kjOan)^fLY%
z(Z42&))^1(P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Up|9~0)y#pDmV+lBz)dO#mm+x>H-vZ0K
zkGy@zTWYf~Omr@@Fvi~8SFl^e8{Nb19qimm=EnSvav#gN<7Ugg`E~9E7&dTLr@?xT
z^FJTs{}(HEk;S}k?hTgBqVEzn3%|H8^S%HqPW0l-%p|t^S!b_;6<HpW&F65=Bd|Fj
zZ~F$$in|v($2yNMvCP+U-Q5pH>a_nEdF<WH>P}|+7<G5CqMdw~9*F)4Ui&W1zs=ke
zql|lYBOc0cqC?(kHq2-jchgZ*EqwY@(RsDZkm<<p=7`QpM{QQ@zi5AGOYML5`Tv40
z{EwT>I)_8t{^REVw?6uBJH$nDafY;*Um>gCo?^^BpQ<i+$U7Hv-C6tp8^gAL$oGfm
MzqYOImd5}71$?3tJpcdz
literal 0
HcmV?d00001
diff --git a/rtl_nic/rtl8168f-2.fw b/rtl_nic/rtl8168f-2.fw
new file mode 100644
index 0000000000000000000000000000000000000000..880a223f35ab98b5367d2d1ee788ac0c9b05d762
GIT binary patch
literal 336
zcmXw!y-EX75QUEk8YD%wS#>~kA+_0i?~<^j5w%s2yud<;R)L6ETFfJeRqT8MpCOem
z;a{vRY(+5f%(A&~_=YnxoI3z;eKXE|FTXqph3mLZNL-#~KJ}hGd*{?4HN@bw7lJ!3
z21jSb$z*g<c<=I%B_ZqkZolhs2ka|$pg@e}HxhD&DYQX9#U6cJtpRgj*M<^B?QsO#
zTX(Bnn{9J;qrRmLYKmB!x1tZmvFKODALB%HLAJ;ja+7=||DHtOs{Xt2S@eVah3K68
pbi(+!%m6bidzA}pqXtCe%=|h92o_7bN9aXW9hLp^-}iP7@DF!bO921?
literal 0
HcmV?d00001
--
1.7.6
^ permalink raw reply related
* [linux-firmware v3 1/2] rtl_nic: update firmware for RTL8111E-VL
From: Hayes Wang @ 2011-08-31 16:16 UTC (permalink / raw)
To: dwmw2; +Cc: romieu, netdev, Hayes Wang
Updated firmware with stability fixes.
Version: 0.0.2
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
WHENCE | 2 +-
rtl_nic/rtl8168e-3.fw | Bin 2804 -> 3552 bytes
2 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/WHENCE b/WHENCE
index a47b307..eb7bdfd 100644
--- a/WHENCE
+++ b/WHENCE
@@ -1657,7 +1657,7 @@ File: rtl_nic/rtl8168d-2.fw
File: rtl_nic/rtl8105e-1.fw
File: rtl_nic/rtl8168e-1.fw
File: rtl_nic/rtl8168e-2.fw
-File: rtl_nic/rtl8168e-3.fw
+File: rtl_nic/rtl8168e-3.fw (version: 0.0.2)
Licence:
* Copyright © 2011, Realtek Semiconductor Corporation
diff --git a/rtl_nic/rtl8168e-3.fw b/rtl_nic/rtl8168e-3.fw
index cb494071d0273c7b3102b97552f4bc7b756c0e17..525f467e04229c52fbc38676b2bbdc93832bc945 100644
GIT binary patch
literal 3552
zcmaKve{5Cd8OPsy+xzsE9~)pR9DZDGe?Uc~?Y&Ga?vHiMEi6%ENR~`pMwgT<E*gxG
z4L9AM3S6}nVsxM`S=Vj;vyEGkk?jvN${z%iEm>BCL?*a%YYT3gdouzpl$N{CbI-Zt
zXvl7I@_paueSZIV&$-Sy_tehEyD}TPwyj&gwX?mmJ)7?A>R6xY$YeOP-$Oh-HO}pG
zTkhYG&2(<sy5*}6Z2j8y-fdemna-~4`gC^vy_vi3&2DrrJGWBZ5~t2Jx^l^-!Q*bT
z(>mxKE(P5^8FS8eZn-g~)y0Q;oyjFStFp%1@)_R64w<xrw;|+Bz%yA+s5+_WHh!tO
zUF&$>a*f*4?df6A?eg?(!=HM31U&qdr+>8l&pbV9`yHOfVvU+`p4NahU;>=&^i;s9
zUwT>xo@D<z{Bxi2^bNzuJ^duatA^V>y#am^`~a*6&w;bUo}LfSKQuh)>A%2f?D${-
zz2vCkyTkXm<u81Cnif}L>n65Zw?t3ZFHuKa<AzC3FB_IUt(_Cl8w}@p+G+@Wr{N^~
zrQoxk_8KOj8y@g<kD+?{^YHvl!-JllFvQMjL$hOe0z1nBdV?YKR>N6OzZBB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
Eilon Greenstein
In-Reply-To: <20110831175120.739bd5c2@alice>
On Wednesday 31 August 2011 18:51:20 Michal Schmidt wrote:
> On Wed, 31 Aug 2011 17:37:49 +0200 Michal Schmidt wrote:
> > I could restore dev->features before
> > returning if bnx2x_reload_if_running() fails.
>
> Or even safer - restore them always:
> ...
> u32 orig_features = dev->features;
> dev->features = features;
> ret = bnx2x_reload_if_running(dev);
> dev->features = orig_features;
> return ret;
> ...
> This way we don't have to assume anything about
> __netdev_update_features().
I agree - it's the best choice if we go for a bnx2x-only solution.
thanks,
vlad
>
> Michal
> --
> 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
* RE: [PATCH 1/3] bnx2x: remove TPA_ENABLE_FLAG
From: Vladislav Zolotarov @ 2011-08-31 16:13 UTC (permalink / raw)
To: Michal Schmidt
Cc: netdev@vger.kernel.org, Dmitry Kravkov, Eilon Greenstein,
mirqus@gmail.com
In-Reply-To: <20110831175849.328192b8@alice>
> -----Original Message-----
> From: Michal Schmidt [mailto:mschmidt@redhat.com]
> Sent: Wednesday, August 31, 2011 6:59 PM
> To: Vladislav Zolotarov
> Cc: netdev@vger.kernel.org; Dmitry Kravkov; Eilon Greenstein;
> mirqus@gmail.com
> Subject: Re: [PATCH 1/3] bnx2x: remove TPA_ENABLE_FLAG
>
> On Wed, 31 Aug 2011 18:16:30 +0300 Vlad Zolotarov wrote:
> > On Wednesday 31 August 2011 18:00:34 Michal Schmidt wrote:
> > > if (bnx2x_reload) {
> > > - if (bp->recovery_state == BNX2X_RECOVERY_DONE)
> > > + if (bp->recovery_state == BNX2X_RECOVERY_DONE) {
> > > + /*
> > > + * Cheat! Normally dev->features will be
> > > set after we
> > > + * return, but that's too late. We need to
> > > know how to
> > > + * configure the NIC when reloading it, so
> > > update
> > > + * the features early.
> > > + */
> > > + dev->features = features;
> > > return bnx2x_reload_if_running(dev);
> >
> > NACK
> >
> > This is bogus - what if bnx2x_reload_if_running(dev)
> > (bnx2x_nic_load()) failes? The original dev->features would be
> > lost...
>
> Well, yes, but since the NIC would be now not working, do we really
> care about its features? :-)
U r kidding, right? ;)
We care about the consistency in the netdev features state - if we failed
to configure the requested feature and returned an error on e.g. "ethtool -K ethX lro on"
call, it's expected that a subsequent ethtool -k ethX call won't report the requested
feature (LRO) as set.
Thanks,
vlad
>
> Michal
^ permalink raw reply
* Re: [PATCH 1/3] bnx2x: remove TPA_ENABLE_FLAG
From: Michal Schmidt @ 2011-08-31 15:58 UTC (permalink / raw)
To: Vlad Zolotarov
Cc: netdev@vger.kernel.org, Dmitry Kravkov, Eilon Greenstein,
mirqus@gmail.com
In-Reply-To: <201108311816.30468.vladz@broadcom.com>
On Wed, 31 Aug 2011 18:16:30 +0300 Vlad Zolotarov wrote:
> On Wednesday 31 August 2011 18:00:34 Michal Schmidt wrote:
> > if (bnx2x_reload) {
> > - if (bp->recovery_state == BNX2X_RECOVERY_DONE)
> > + if (bp->recovery_state == BNX2X_RECOVERY_DONE) {
> > + /*
> > + * Cheat! Normally dev->features will be
> > set after we
> > + * return, but that's too late. We need to
> > know how to
> > + * configure the NIC when reloading it, so
> > update
> > + * the features early.
> > + */
> > + dev->features = features;
> > return bnx2x_reload_if_running(dev);
>
> NACK
>
> This is bogus - what if bnx2x_reload_if_running(dev)
> (bnx2x_nic_load()) failes? The original dev->features would be
> lost...
Well, yes, but since the NIC would be now not working, do we really
care about its features? :-)
Michal
^ permalink raw reply
* Re: [PATCH] RDSRDMA: Fix to PAGE_MASK interpretation
From: Steve Wise @ 2011-08-31 15:57 UTC (permalink / raw)
To: venkat.x.venkatsubra; +Cc: Jonathan Lallinger, netdev, rds-devel
In-Reply-To: <20110829192853.32358.39323.stgit@build.ogc.int>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
^ permalink raw reply
* Re: [patch net-next-2.6] net: allow notifier subscribers to forbid device from closing
From: Stephen Hemminger @ 2011-08-31 15:53 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Jiri Pirko, netdev, davem, eric.dumazet
In-Reply-To: <1314804352.2741.4.camel@bwh-desktop>
On Wed, 31 Aug 2011 16:25:51 +0100
Ben Hutchings <bhutchings@solarflare.com> wrote:
> On Wed, 2011-08-31 at 17:15 +0200, Jiri Pirko wrote:
> > In some situations, like when the device is used as slave device in
> > bond/br/etc it is not nice if someone closes the device. This allows
> > it's masters to forbid this closure.
>
> No it doesn't.
>
> [...]
> > @@ -1269,9 +1282,12 @@ static int dev_close_many(struct list_head *head)
> > struct net_device *dev, *tmp;
> > LIST_HEAD(tmp_list);
> >
> > - list_for_each_entry_safe(dev, tmp, head, unreg_list)
> > + list_for_each_entry_safe(dev, tmp, head, unreg_list) {
> > if (!(dev->flags & IFF_UP))
> > list_move(&dev->unreg_list, &tmp_list);
> > + else
> > + __dev_pre_close(dev);
> > + }
> >
> > __dev_close_many(head);
>
> The return value is ignored here.
>
> And this is called from dev_close(), where you are adding the
> notification as well. So the notifier will usually be called twice.
>
> [...]
> > @@ -1397,6 +1418,7 @@ rollback:
> > break;
> >
> > if (dev->flags & IFF_UP) {
> > + nb->notifier_call(nb, NETDEV_PRE_DOWN, dev);
> > nb->notifier_call(nb, NETDEV_GOING_DOWN, dev);
> > nb->notifier_call(nb, NETDEV_DOWN, dev);
> > }
> [...]
>
> The return value has to be ignored here. Not sure it makes any sense to
> call the notifier at all.
>
> Ben.
>
Also we need to allow rmmod'ing a network device even it is
part of a bridge and that implicitly
calls close.
^ permalink raw reply
* Re: [PATCH 7/7] bnx2x: expose HW RX VLAN stripping toggle
From: Michal Schmidt @ 2011-08-31 15:51 UTC (permalink / raw)
To: Vlad Zolotarov
Cc: Michał Mirosław, netdev@vger.kernel.org, Dmitry Kravkov,
Eilon Greenstein
In-Reply-To: <20110831173749.60649b50@alice>
On Wed, 31 Aug 2011 17:37:49 +0200 Michal Schmidt wrote:
> I could restore dev->features before
> returning if bnx2x_reload_if_running() fails.
Or even safer - restore them always:
...
u32 orig_features = dev->features;
dev->features = features;
ret = bnx2x_reload_if_running(dev);
dev->features = orig_features;
return ret;
...
This way we don't have to assume anything about
__netdev_update_features().
Michal
^ permalink raw reply
* Re: [PATCH 1/2] Define security_sk_getsecctx
From: Casey Schaufler @ 2011-08-31 15:43 UTC (permalink / raw)
To: rongqing.li; +Cc: netdev, selinux, linux-security-module, Casey Schaufler
In-Reply-To: <1314779777-12669-2-git-send-email-rongqing.li@windriver.com>
On 8/31/2011 1:36 AM, rongqing.li@windriver.com wrote:
> From: Roy.Li <rongqing.li@windriver.com>
>
> Define security_sk_getsecctx to return the security
> context of a sock.
So, what is the intended use of the information
coming from this hook? If I wanted to write the
Smack hook, which of the "contexts" would I want
to return? There are potentially three. If I know
what the caller is looking for, I can (hopefully)
select the correct information.
> Signed-off-by: Roy.Li <rongqing.li@windriver.com>
> ---
> include/linux/security.h | 13 +++++++++++++
> security/capability.c | 6 ++++++
> security/security.c | 6 ++++++
> security/selinux/hooks.c | 9 +++++++++
> 4 files changed, 34 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/security.h b/include/linux/security.h
> index ebd2a53..6bb8e0c 100644
> --- a/include/linux/security.h
> +++ b/include/linux/security.h
> @@ -959,6 +959,12 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
> * @sk_getsecid:
> * Retrieve the LSM-specific secid for the sock to enable caching of network
> * authorizations.
> + * @sk_getsecctx:
> + * Returns a string containing sock security context information
> + * @sk whom we wish to get the security context.
> + * @ctx is the address of the pointer to where to place the allocated
> + * security context.
> + * @ctxlen points to the value of the length of the security context.
> * @sock_graft:
> * Sets the socket's isec sid to the sock's sid.
> * @inet_conn_request:
> @@ -1600,6 +1606,7 @@ struct security_operations {
> void (*sk_free_security) (struct sock *sk);
> void (*sk_clone_security) (const struct sock *sk, struct sock *newsk);
> void (*sk_getsecid) (struct sock *sk, u32 *secid);
> + int (*sk_getsecctx) (struct sock *sk, void **ctx, u32 *ctxlen);
> void (*sock_graft) (struct sock *sk, struct socket *parent);
> int (*inet_conn_request) (struct sock *sk, struct sk_buff *skb,
> struct request_sock *req);
> @@ -2574,6 +2581,7 @@ void security_secmark_refcount_dec(void);
> int security_tun_dev_create(void);
> void security_tun_dev_post_create(struct sock *sk);
> int security_tun_dev_attach(struct sock *sk);
> +int security_sk_getsecctx(struct sock *sk, void **ctx, u32 *ctxlen);
>
> #else /* CONFIG_SECURITY_NETWORK */
> static inline int security_unix_stream_connect(struct sock *sock,
> @@ -2751,6 +2759,11 @@ static inline int security_tun_dev_attach(struct sock *sk)
> {
> return 0;
> }
> +
> +static int security_sk_getsecctx(struct sock *sk, void **ctx, u32 *ctxlen)
> +{
> + return -EOPNOTSUPP;
> +}
> #endif /* CONFIG_SECURITY_NETWORK */
>
> #ifdef CONFIG_SECURITY_NETWORK_XFRM
> diff --git a/security/capability.c b/security/capability.c
> index 2984ea4..89256a6 100644
> --- a/security/capability.c
> +++ b/security/capability.c
> @@ -664,6 +664,11 @@ static void cap_sk_getsecid(struct sock *sk, u32 *secid)
> {
> }
>
> +static int cap_sk_getsecctx(struct sock *sk, void **ctx, u32 *ctxlen)
> +{
> + return 0;
> +}
> +
> static void cap_sock_graft(struct sock *sk, struct socket *parent)
> {
> }
> @@ -1032,6 +1037,7 @@ void __init security_fixup_ops(struct security_operations *ops)
> set_to_cap_if_null(ops, sk_free_security);
> set_to_cap_if_null(ops, sk_clone_security);
> set_to_cap_if_null(ops, sk_getsecid);
> + set_to_cap_if_null(ops, sk_getsecctx);
> set_to_cap_if_null(ops, sock_graft);
> set_to_cap_if_null(ops, inet_conn_request);
> set_to_cap_if_null(ops, inet_csk_clone);
> diff --git a/security/security.c b/security/security.c
> index 0e4fccf..a939f5c 100644
> --- a/security/security.c
> +++ b/security/security.c
> @@ -757,6 +757,12 @@ void security_task_getsecid(struct task_struct *p, u32 *secid)
> }
> EXPORT_SYMBOL(security_task_getsecid);
>
> +int security_sk_getsecctx(struct sock *sk, void **ctx, u32 *ctxlen)
> +{
> + return security_ops->sk_getsecctx(sk, ctx, ctxlen);
> +}
> +EXPORT_SYMBOL(security_sk_getsecctx);
> +
> int security_task_setnice(struct task_struct *p, int nice)
> {
> return security_ops->task_setnice(p, nice);
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index 266a229..6e96f01 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -4284,6 +4284,14 @@ static void selinux_sk_getsecid(struct sock *sk, u32 *secid)
> }
> }
>
> +static int selinux_sk_getsecctx(struct sock *sk, void **ctx, u32 *ctxlen)
> +{
> + u32 secid;
> +
> + selinux_sk_getsecid(sk, &secid);
> + return security_sid_to_context(secid, ctx, ctxlen);
> +}
> +
> static void selinux_sock_graft(struct sock *sk, struct socket *parent)
> {
> struct inode_security_struct *isec = SOCK_INODE(parent)->i_security;
> @@ -5613,6 +5621,7 @@ static struct security_operations selinux_ops = {
> .sk_free_security = selinux_sk_free_security,
> .sk_clone_security = selinux_sk_clone_security,
> .sk_getsecid = selinux_sk_getsecid,
> + .sk_getsecctx = selinux_sk_getsecctx,
> .sock_graft = selinux_sock_graft,
> .inet_conn_request = selinux_inet_conn_request,
> .inet_csk_clone = selinux_inet_csk_clone,
^ permalink raw reply
* Re: [stable] [net v2] e1000: Fix driver to be used on PA RISC C8000 workstations
From: Greg KH @ 2011-08-31 15:37 UTC (permalink / raw)
To: Jeff Kirsher
Cc: davem, netdev, Guy Martin, Matt Turner, gospo, Rolf Eike Beer,
stable
In-Reply-To: <1314751777-13772-1-git-send-email-jeffrey.t.kirsher@intel.com>
On Tue, Aug 30, 2011 at 05:49:37PM -0700, Jeff Kirsher wrote:
> The checksum field in the EEPROM on HPPA is really not a
> checksum but a signature (0x16d6). So allow 0x16d6 as the
> matching checksum on HPPA systems.
>
> This issue is present on longterm/stable kernels, I have
> verified that this patch is applicable back to at least
> 2.6.32.y kernels.
>
> v2- changed ifdef to use CONFIG_PARISC instead of __hppa__
>
> CC: Guy Martin <gmsoft@tuxicoman.be>
> CC: Rolf Eike Beer <eike-kernel@sf-tec.de>
> CC: Matt Turner <mattst88@gmail.com>
> Reported-by: Mikulas Patocka <mikulas@artax.kerlin.mff.cuni.cz>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> ---
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read Documentation/stable_kernel_rules.txt
for how to do this properly.
</formletter>
^ permalink raw reply
* Re: [stable] [net] e1000: Fix driver to be used on PA RISC C8000 workstations
From: Greg KH @ 2011-08-31 15:37 UTC (permalink / raw)
To: Jeff Kirsher
Cc: davem, netdev, Guy Martin, Matt Turner, gospo, Rolf Eike Beer,
stable
In-Reply-To: <1314749966-9960-1-git-send-email-jeffrey.t.kirsher@intel.com>
On Tue, Aug 30, 2011 at 05:19:26PM -0700, Jeff Kirsher wrote:
> The checksum field in the EEPROM on HPPA is really not a
> checksum but a signature (0x16d6). So allow 0x16d6 as the
> matching checksum on HPPA systems.
>
> This issue is present on longterm/stable kernels, I have
> verified that this patch is applicable back to at least
> 2.6.32.y kernels.
>
> CC: Guy Martin <gmsoft@tuxicoman.be>
> CC: Rolf Eike Beer <eike-kernel@sf-tec.de>
> CC: Matt Turner <mattst88@gmail.com>
> Reported-by: Mikulas Patocka <mikulas@artax.kerlin.mff.cuni.cz>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read Documentation/stable_kernel_rules.txt
for how to do this properly.
</formletter>
^ permalink raw reply
* Re: [PATCH 7/7] bnx2x: expose HW RX VLAN stripping toggle
From: Michal Schmidt @ 2011-08-31 15:37 UTC (permalink / raw)
To: Vlad Zolotarov
Cc: Michał Mirosław, netdev@vger.kernel.org, Dmitry Kravkov,
Eilon Greenstein
In-Reply-To: <201108311807.53767.vladz@broadcom.com>
On Wed, 31 Aug 2011 18:07:53 +0300 Vlad Zolotarov wrote:
> If u want to change the implementation the way we rely on the
> dev->features in the ndo_set_features() flow, which is a semantics
> change, u'd rather change the __netdev_update_features() so that it
> sets the dev->features before ndo_set_features() call and restores it
> in case of a failure. Something like this:
...
> diff --git a/net/core/dev.c b/net/core/dev.c
> index b2e262e..474e539 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -5321,7 +5321,7 @@ static u32 netdev_fix_features(struct
> net_device *dev, u32 features)
> int __netdev_update_features(struct net_device *dev)
> {
> - u32 features;
> + u32 features, old_features;
> int err = 0;
>
> ASSERT_RTNL();
> @@ -5340,19 +5340,23 @@ int __netdev_update_features(struct
> net_device *dev) netdev_dbg(dev, "Features changed: 0x%08x ->
> 0x%08x\n", dev->features, features);
>
> + /* Remember the original features and set the new ones */
> + old_features = dev->features;
> + dev->features = features;
> +
> if (dev->netdev_ops->ndo_set_features)
> - err = dev->netdev_ops->ndo_set_features(dev,
> features);
> + err = dev->netdev_ops->ndo_set_features(dev);
Drivers want to know which features changed. They compare
the features argument with dev->features.
Perhaps we could pass old_features as the argument. Then we'd better
change the name of the callback to avoid confusion.
I think it's not worth changing. I could restore dev->features before
returning if bnx2x_reload_if_running() fails.
Michal
^ permalink raw reply
* [PATCH] mii: Remove references to DP83840 PHY in mii.h
From: Mark Einon @ 2011-08-31 15:35 UTC (permalink / raw)
To: netdev; +Cc: davem, Mark Einon
There are references to this PHY chip in the generic mii.h header, so removing them.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
include/linux/mii.h | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/linux/mii.h b/include/linux/mii.h
index 103113a..4c3cfb5 100644
--- a/include/linux/mii.h
+++ b/include/linux/mii.h
@@ -40,12 +40,12 @@
#define BMCR_CTST 0x0080 /* Collision test */
#define BMCR_FULLDPLX 0x0100 /* Full duplex */
#define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */
-#define BMCR_ISOLATE 0x0400 /* Disconnect DP83840 from MII */
-#define BMCR_PDOWN 0x0800 /* Powerdown the DP83840 */
+#define BMCR_ISOLATE 0x0400 /* Disconnect PHY from MII */
+#define BMCR_PDOWN 0x0800 /* Powerdown */
#define BMCR_ANENABLE 0x1000 /* Enable auto negotiation */
#define BMCR_SPEED100 0x2000 /* Select 100Mbps */
#define BMCR_LOOPBACK 0x4000 /* TXD loopback bits */
-#define BMCR_RESET 0x8000 /* Reset the DP83840 */
+#define BMCR_RESET 0x8000 /* Reset */
/* Basic mode status register. */
#define BMSR_ERCAP 0x0001 /* Ext-reg capability */
@@ -55,9 +55,9 @@
#define BMSR_RFAULT 0x0010 /* Remote fault detected */
#define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */
#define BMSR_RESV 0x00c0 /* Unused... */
-#define BMSR_ESTATEN 0x0100 /* Extended Status in R15 */
-#define BMSR_100HALF2 0x0200 /* Can do 100BASE-T2 HDX */
-#define BMSR_100FULL2 0x0400 /* Can do 100BASE-T2 FDX */
+#define BMSR_ESTATEN 0x0100 /* Extended Status in R15 */
+#define BMSR_100HALF2 0x0200 /* Can do 100BASE-T2 HDX */
+#define BMSR_100FULL2 0x0400 /* Can do 100BASE-T2 FDX */
#define BMSR_10HALF 0x0800 /* Can do 10mbps, half-duplex */
#define BMSR_10FULL 0x1000 /* Can do 10mbps, full-duplex */
#define BMSR_100HALF 0x2000 /* Can do 100mbps, half-duplex */
--
1.7.6
^ permalink raw reply related
* Re: [patch net-next-2.6] net: allow notifier subscribers to forbid device from closing
From: Ben Hutchings @ 2011-08-31 15:25 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, davem, eric.dumazet, shemminger
In-Reply-To: <1314803731-1222-1-git-send-email-jpirko@redhat.com>
On Wed, 2011-08-31 at 17:15 +0200, Jiri Pirko wrote:
> In some situations, like when the device is used as slave device in
> bond/br/etc it is not nice if someone closes the device. This allows
> it's masters to forbid this closure.
No it doesn't.
[...]
> @@ -1269,9 +1282,12 @@ static int dev_close_many(struct list_head *head)
> struct net_device *dev, *tmp;
> LIST_HEAD(tmp_list);
>
> - list_for_each_entry_safe(dev, tmp, head, unreg_list)
> + list_for_each_entry_safe(dev, tmp, head, unreg_list) {
> if (!(dev->flags & IFF_UP))
> list_move(&dev->unreg_list, &tmp_list);
> + else
> + __dev_pre_close(dev);
> + }
>
> __dev_close_many(head);
The return value is ignored here.
And this is called from dev_close(), where you are adding the
notification as well. So the notifier will usually be called twice.
[...]
> @@ -1397,6 +1418,7 @@ rollback:
> break;
>
> if (dev->flags & IFF_UP) {
> + nb->notifier_call(nb, NETDEV_PRE_DOWN, dev);
> nb->notifier_call(nb, NETDEV_GOING_DOWN, dev);
> nb->notifier_call(nb, NETDEV_DOWN, dev);
> }
[...]
The return value has to be ignored here. Not sure it makes any sense to
call the notifier at all.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [patch net-next-2.6] net: allow notifier subscribers to forbid device from closing
From: Stephen Hemminger @ 2011-08-31 15:20 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, davem, eric.dumazet, bhutchings
In-Reply-To: <1314803731-1222-1-git-send-email-jpirko@redhat.com>
On Wed, 31 Aug 2011 17:15:31 +0200
Jiri Pirko <jpirko@redhat.com> wrote:
> In some situations, like when the device is used as slave device in
> bond/br/etc it is not nice if someone closes the device. This allows
> it's masters to forbid this closure.
>
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
I don't think this is necessary, for bridging case.
bridging handles it. And bonding should as well.
It is a good way to test STP etc.
Is this a case of "you really shouldn't do this", or
"don't do this it will crash"? In general Linux allows the
former and uses references to prevent the later.
^ permalink raw reply
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