Re: is it a backwards compatability catch-22?

2006-04-25 Thread Michal Schmidt
Rick Jones wrote: lumber:~# cat /etc/udev/rules.d/010_netinterfaces.rules KERNEL=eth*,SYSFS{address}==00:30:6e:4c:27:3c, NAME=eth0 KERNEL=eth*,SYSFS{address}==00:30:6e:4c:27:3d, NAME=eth1 KERNEL=eth*,SYSFS{address}==00:12:79:9e:0e:d2, NAME=eth2 KERNEL=eth*,SYSFS{address}==00:12:79:9e:0e:d3,

Re: linux-source-2.6.16: inconsistent device detetion: eth0=eth1

2006-04-11 Thread Michal Schmidt
josh wrote: I have two ethernet cards on my box, an onboard SiS 7012 and a pci ne-2k compatible. When I boot the system, sometimes the SiS is detected as eth0 and the pci as eth1, and sometimes the SiS is eth1 and the pci eth0, *without my changing anything*. I just reboot and it's different.

Re: [PATCH] e1000 stop raw interrupts disabled nag from RT

2007-03-01 Thread Michal Schmidt
Kok, Auke wrote: uhh, sure... while we are at it then, are there any more patches like this? perhaps for e100? ixgb? A quick grep through the current RT patch shows there are no other changes to e100, e1000, ixgb. Michal - To unsubscribe from this list: send the line unsubscribe netdev in

[PATCH 2/3] airo: Fix an error path memory leak

2007-03-16 Thread Michal Schmidt
The airo driver leaks memory if request_irq() fails. Signed-off-by: Michal Schmidt [EMAIL PROTECTED] diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 71ac1f1..0d5b433 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -2850,7 +2850,7

[PATCH 3/3] airo: Make /sys/bus/pci/drivers/airo/{,un}bind work

2007-03-16 Thread Michal Schmidt
track of them. We can take advantage of it and use the .remove callback as it was meant to be. This makes /sys/bus/pci/drivers/airo/{,un}bind work. Signed-off-by: Michal Schmidt [EMAIL PROTECTED] diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 0d5b433..254f285 100644

[PATCH] IPIP: Allow rebinding the tunnel to another interface

2007-12-12 Thread Michal Schmidt
bound device's MTU. If the change is acceptable, I'll do the same for GRE and SIT tunnels. Signed-off-by: Michal Schmidt [EMAIL PROTECTED] diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 8c2b2b0..05b267b 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c @@ -651,6 +651,40 @@ tx_error

Re: [PATCH] IPIP: Allow rebinding the tunnel to another interface

2007-12-12 Thread Michal Schmidt
. Signed-off-by: Michal Schmidt [EMAIL PROTECTED] diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 8c2b2b0..160535b 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c @@ -651,6 +651,40 @@ tx_error: return 0; } +static void ipip_tunnel_bind_dev(struct net_device *dev

[PATCH net] bnx2x: really disable TPA if 'disable_tpa' option is set

2015-04-27 Thread Michal Schmidt
* statistics increase and large packets being received in tcpdump. The bug was an unintended consequence of commit aebf6244cd39 bnx2x: Be more forgiving toward SW GRO. Fix it by following the bp-disable_tpa flag when initializing fp's. Signed-off-by: Michal Schmidt mschm...@redhat.com --- drivers

Re: [PATCH net] bnx2x: really disable TPA if 'disable_tpa' option is set

2015-04-28 Thread Michal Schmidt
On 04/27/2015 08:15 PM, Yuval Mintz wrote: I agree that this fixes an incorrect logic, but its incomplete as the bnx2x 'bp-flags' no longer represent the correct logic. I.e., it might cause additional issues down the road, as the 'fp-mode' and 'fp-disable_tpa' are no longer in sync. We

[PATCH 2/3] bnx2x: merge fp-disable_tpa with fp-mode

2015-04-28 Thread Michal Schmidt
It is simpler to have the TPA mode as one three-state variable. Signed-off-by: Michal Schmidt mschm...@redhat.com --- drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 2 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 26 drivers/net/ethernet/broadcom/bnx2x

[PATCH 3/3] bnx2x: remove {TPA,GRO}_ENABLE_FLAG

2015-04-28 Thread Michal Schmidt
These flags are redundant with dev-features. Remove them. Just make sure to set dev-features ourselves in bnx2x_set_features() before performing the reload of the card. Signed-off-by: Michal Schmidt mschm...@redhat.com --- drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 2 -- drivers/net

[PATCH 0/3] bnx2x: minor cleanups related to TPA bits

2015-04-28 Thread Michal Schmidt
I noticed some simplification possibilities while looking into the bug fixed by bnx2x: really disable TPA if 'disable_tpa' is set'. Michal Schmidt (3): bnx2x: mark LRO as a fixed disabled feature if disable_tpa is set bnx2x: merge fp-disable_tpa with fp-mode bnx2x: remove {TPA,GRO

[PATCH 1/3] bnx2x: mark LRO as a fixed disabled feature if disable_tpa is set

2015-04-28 Thread Michal Schmidt
() becomes unnecessary. Signed-off-by: Michal Schmidt mschm...@redhat.com --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 4 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x

[PATCH net] bnx2x: fix DMA API usage

2015-06-26 Thread Michal Schmidt
ring buffer element) Signed-off-by: Michal Schmidt mschm...@redhat.com --- drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 1 - drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 23 ++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 12 ++-- 3 files changed, 12

[PATCH net] bnx2x: fix DMA API usage

2015-06-26 Thread Michal Schmidt
ring buffer element) Signed-off-by: Michal Schmidt mschm...@redhat.com --- drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 1 - drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 23 ++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 12 ++-- 3 files changed, 12

Re: [PATCH net] bnx2x: fix DMA API usage

2015-06-26 Thread Michal Schmidt
On 06/26/2015 05:50 PM, Michal Schmidt wrote: With CONFIG_DMA_API_DEBUG=y bnx2x triggers the error DMA-API: device driver frees DMA memory with wrong function. On archs where PAGE_SIZE SGE_PAGE_SIZE it also triggers DMA-API: device driver frees DMA memory with different size. Fix

Re: [PATCH v4] bnx2x: Alloc 4k fragment for each rx ring buffer element

2015-05-27 Thread Michal Schmidt
On 05/21/2015 03:20 PM, Gabriel Krisman Bertazi wrote: +#define SGE_PAGE_SHIFT 12 +#define SGE_PAGE_SIZE(1 SGE_PAGE_SHIFT) ... +struct bnx2x_alloc_pool { + struct page *page; + dma_addr_t dma; + u8 offset; + u8

[PATCH net-next 1/3] bnx2x: drop redundant error message about allocation failure

2015-12-04 Thread Michal Schmidt
alloc_pages() already prints a warning when it fails. No need to emit another message. Certainly not at KERN_ERR level, because it is no big deal if this GFP_ATOMIC allocation fails occasionally. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/ethernet/broadcom

[PATCH net-next 0/3] bnx2x: fewer error messages, simplification

2015-12-04 Thread Michal Schmidt
Hello, This removes one redundant error message in bnx2x and changes another one to WARN_ONCE. The third patch is a small simplification in ethtool stats. Michal Schmidt (3): bnx2x: drop redundant error message about allocation failure bnx2x: change FW GRO error message to WARN_ONCE bnx2x

[PATCH net-next 2/3] bnx2x: change FW GRO error message to WARN_ONCE

2015-12-04 Thread Michal Schmidt
It's supposed to be impossible for TPA to give us anything else than IPv4 or IPv6 here. But in case there is a way to reach this error by some strange received frames, we don't want to flood the kernel log. WARN_ONCE is better for this purpose. Signed-off-by: Michal Schmidt <mschm...@redhat.

[PATCH net-next 3/3] bnx2x: simplify distinction between port and func stats

2015-12-04 Thread Michal Schmidt
only once and it's in fact just a negation of IS_PORT_STAT(). Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- .../net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c| 117 ++--- 1 file changed, 56 insertions(+), 61 deletions(-) diff --git a/drivers/net/ethernet/broadcom

[PATCH net] bnx2x: allow adding VLANs while interface is down

2016-06-03 Thread Michal Schmidt
Use the same code for reconfiguring VLANs during NIC load. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 151 ++- 1 file changed, 62 insertions(+), 89 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bn

[PATCH net 1/7] bnx2x: fix crash on big-endian when adding VLAN

2016-03-02 Thread Michal Schmidt
added where missing. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h | 6 +++--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 13 + drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 9 - 3 files chang

[PATCH net 2/7] bnx2x: fix sending VF->PF messages on big-endian

2016-03-02 Thread Michal Schmidt
writeb(), not writel(), so the attempt to define the struct with a reversed layout on big-endian is counter-productive. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/et

[PATCH net 6/7] bnx2x: define event data reserved fields as little-endian

2016-03-02 Thread Michal Schmidt
For consistency with other event data structs and to lessen the chance of a mistake should one of the reserved fields become used in the future, define the reserved fields as little-endian. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x

[PATCH net 3/7] bnx2x: fix receive of VF->PF mailbox messages by the PF on big-endian

2016-03-02 Thread Michal Schmidt
On ppc64 the PF did not receive messages from VFs correctly. Fields of struct vf_pf_event_data are little-endian. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h | 6 +++--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c | 6 +++

[PATCH net 7/7] bnx2x: fix indentation in bnx2x_sp_task()

2016-03-02 Thread Michal Schmidt
Fix a case of misleading code indentation. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/et

[PATCH net 0/7] bnx2x: endianness fixes

2016-03-02 Thread Michal Schmidt
Hello, this fixes a VLAN crash and some SRIOV bugs in bnx2x observed on ppc64. Michal Schmidt (7): bnx2x: fix crash on big-endian when adding VLAN bnx2x: fix sending VF->PF messages on big-endian bnx2x: fix receive of VF->PF mailbox messages by the PF on big-endian bnx2x:

[PATCH net 4/7] bnx2x: access cfc_del_event only if the opcode is CFC_DEL

2016-03-02 Thread Michal Schmidt
It's not really a bug, but it was odd that bnx2x_eq_int() read the message data as if it were a cfc_del_event regardless of the event type. It's cleaner to access only the appropriate member of union event_data after checking the event opcode. Signed-off-by: Michal Schmidt <mschm...@redhat.

[PATCH net 5/7] bnx2x: define fields of struct cfc_del_event_data as little-endian

2016-03-02 Thread Michal Schmidt
There were no missing endianness conversions in this case, but the fields of struct cfc_del_event_data should be defined as little-endian to get rid of the ugly (__force __le32) casts. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h

[PATCH net] cxgb3: fix out of bounds read

2016-04-29 Thread Michal Schmidt
iteration the check for the terminator is an out of bounds read. Add the missing terminator to rspq_map[]. Reported-by: Jan Stancek <jstan...@redhat.com> Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 3 ++- 1 file changed,

[PATCH net 4/7] bnx2x: fix detection of VLAN filtering feature for VF

2017-03-03 Thread Michal Schmidt
VFs are currently missing the VLAN filtering feature, because we were checking the PF's acquire response before actually performing the acquire. Fix it by setting the feature flag later when we have the PF response. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/et

[PATCH net 2/7] bnx2x: lower verbosity of VF stats debug messages

2017-03-03 Thread Michal Schmidt
When BNX2X_MSG_IOV is enabled, the driver produces too many VF statistics messages. Lower the verbosity of the VF stats messages similarly as in commit 76ca70fabbdaa3 ("bnx2x: [Debug] change verbosity of some prints"). Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- driv

[PATCH net 0/7] bnx2x: PTP crash, VF VLAN fixes

2017-03-03 Thread Michal Schmidt
Hello, here are fixes for a crash with PTP, a crash in setting of VF multicast addresses, and non-working VLAN filters configuration from the VF side. Michal Schmidt (7): bnx2x: prevent crash when accessing PTP with interface down bnx2x: lower verbosity of VF stats debug messages bnx2x: fix

[PATCH net 3/7] bnx2x: fix possible overrun of VFPF multicast addresses array

2017-03-03 Thread Michal Schmidt
It is too late to check for the limit of the number of VF multicast addresses after they have already been copied to the req->multicast[] array, possibly overflowing it. Do the check before copying. Also fix the error path to not skip unlocking vf2pf_mutex. Signed-off-by: Michal Schmidt <

[PATCH net 7/7] bnx2x: add missing configuration of VF VLAN filters

2017-03-03 Thread Michal Schmidt
Configuring VLANs from the VF side had no effect, because the PF ignored filters of type VFPF_VLAN_FILTER in the VF-PF message. Add the missing filter type to configure. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.

[PATCH net 1/7] bnx2x: prevent crash when accessing PTP with interface down

2017-03-03 Thread Michal Schmidt
code when the interface is down. -EFAULT in bnx2x_ptp_adjfreq() did not seem right. Tested using phc_ctl get/set/adj/freq commands. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 20 +++- 1 file changed, 19 inse

[PATCH net 5/7] bnx2x: do not rollback VF MAC/VLAN filters we did not configure

2017-03-03 Thread Michal Schmidt
On failure to configure a VF MAC/VLAN filter we should not attempt to rollback filters that we failed to configure with -EEXIST. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 8 +++- drivers/net/ethernet/broadcom

[PATCH net 6/7] bnx2x: fix incorrect filter count in an error message

2017-03-03 Thread Michal Schmidt
filters->count is the number of filters we were supposed to configure. There is no reason to increase it by +1 when printing the count in an error message. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 +- 1 file c

[PATCH net 3/7 v2] bnx2x: fix possible overrun of VFPF multicast addresses array

2017-03-06 Thread Michal Schmidt
're looking at the error paths in the function, also return an error code from it when the PF responds with an error. Even though the caller ignores it. v2: Move the check before bnx2x_vfpf_prep() as suggested by Yuval. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/ethernet

Re: [PATCH net 5/7] bnx2x: do not rollback VF MAC/VLAN filters we did not configure

2017-03-06 Thread Michal Schmidt
Dne 5.3.2017 v 11:13 Mintz, Yuval napsal(a): On failure to configure a VF MAC/VLAN filter we should not attempt to rollback filters that we failed to configure with -EEXIST. Is this theoretical or did you actually manage to hit it? If so, did it involve non-linux VFs? Asking as linux VFs

Re: [PATCH net 1/7] bnx2x: prevent crash when accessing PTP with interface down

2017-03-06 Thread Michal Schmidt
if the interface is up. Use -ENETDOWN as the error code when the interface is down. -EFAULT in bnx2x_ptp_adjfreq() did not seem right. Tested using phc_ctl get/set/adj/freq commands. Signed-off-by: Michal Schmidt <mschm...@redhat.com> While I have no objections to the patch contents, does i

[PATCH net] bnx2x: fix pf2vf bulletin DMA mapping leak

2017-06-06 Thread Michal Schmidt
When freeing VF's DMA mappings, an already NULLed pointer was checked again due to an apparent copy error. Consequently, the pf2vf bulletin DMA mapping was not freed. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 +- 1 file c

[PATCH net] rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string

2017-05-04 Thread Michal Schmidt
g to start on a system with sfc driver after upgrading it to Linux 4.11, i.e. when sfc added support for phys_port_name. Signed-off-by: Michal Schmidt <mschm...@redhat.com> --- net/core/rtnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/rtnetlink.c b/net/