* [PATCH net-next 0/6] qed*: Driver updates
@ 2016-02-24 14:52 Yuval Mintz
2016-02-24 14:52 ` [PATCH net-next 1/6] qede: Change pci DID for 10g device Yuval Mintz
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Yuval Mintz @ 2016-02-24 14:52 UTC (permalink / raw)
To: davem, netdev; +Cc: Yuval Mintz
Usually I try to provide a sensible description of the patch set even if
it lacks a general 'motif', but this simply contains several small,
unrelated and self-explenatory tweaks and additions.
Dave,
Please consider applying this series to `net-next'.
Thanks,
Yuval
Yuval Mintz (6):
qede: Change pci DID for 10g device
qede: Linearize SKBs when needed
qede: Don't report link change needlessly
qed: add MODULE_FIRMWARE()
qed: Prevent probe on previous error
qed, qede: rebrand module description
drivers/net/ethernet/qlogic/qed/qed_main.c | 19 +++++++--
drivers/net/ethernet/qlogic/qede/qede_main.c | 62 +++++++++++++++++++++-------
2 files changed, 63 insertions(+), 18 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH net-next 1/6] qede: Change pci DID for 10g device
2016-02-24 14:52 [PATCH net-next 0/6] qed*: Driver updates Yuval Mintz
@ 2016-02-24 14:52 ` Yuval Mintz
2016-02-24 14:52 ` [PATCH net-next 2/6] qede: Linearize SKBs when needed Yuval Mintz
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Yuval Mintz @ 2016-02-24 14:52 UTC (permalink / raw)
To: davem, netdev; +Cc: Yuval Mintz
The device ID for the 10g module has changed. Populate the pci_ids table
accordingly.
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
---
drivers/net/ethernet/qlogic/qede/qede_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
index 5f15e23..76fa5d7 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -53,7 +53,7 @@ MODULE_PARM_DESC(debug, " Default debug msglevel");
static const struct qed_eth_ops *qed_ops;
#define CHIP_NUM_57980S_40 0x1634
-#define CHIP_NUM_57980S_10 0x1635
+#define CHIP_NUM_57980S_10 0x1666
#define CHIP_NUM_57980S_MF 0x1636
#define CHIP_NUM_57980S_100 0x1644
#define CHIP_NUM_57980S_50 0x1654
--
1.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next 2/6] qede: Linearize SKBs when needed
2016-02-24 14:52 [PATCH net-next 0/6] qed*: Driver updates Yuval Mintz
2016-02-24 14:52 ` [PATCH net-next 1/6] qede: Change pci DID for 10g device Yuval Mintz
@ 2016-02-24 14:52 ` Yuval Mintz
2016-02-24 14:52 ` [PATCH net-next 3/6] qede: Don't report link change needlessly Yuval Mintz
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Yuval Mintz @ 2016-02-24 14:52 UTC (permalink / raw)
To: davem, netdev; +Cc: Yuval Mintz
There's a corner-case in HW where an SKB queued for transmission that
contains too many frags will cause FW to assert.
This patch solves this by linearizing the SKB if necessary.
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
---
drivers/net/ethernet/qlogic/qede/qede_main.c | 38 ++++++++++++++++++++++++----
1 file changed, 33 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
index 76fa5d7..f07b9a9 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -380,6 +380,28 @@ static int map_frag_to_bd(struct qede_dev *edev,
return 0;
}
+/* +2 for 1st BD for headers and 2nd BD for headlen (if required) */
+#if ((MAX_SKB_FRAGS + 2) > ETH_TX_MAX_BDS_PER_NON_LSO_PACKET)
+static bool qede_pkt_req_lin(struct qede_dev *edev, struct sk_buff *skb,
+ u8 xmit_type)
+{
+ int allowed_frags = ETH_TX_MAX_BDS_PER_NON_LSO_PACKET - 1;
+
+ if (xmit_type & XMIT_LSO) {
+ int hlen;
+
+ hlen = skb_transport_header(skb) +
+ tcp_hdrlen(skb) - skb->data;
+
+ /* linear payload would require its own BD */
+ if (skb_headlen(skb) > hlen)
+ allowed_frags--;
+ }
+
+ return (skb_shinfo(skb)->nr_frags > allowed_frags);
+}
+#endif
+
/* Main transmit function */
static
netdev_tx_t qede_start_xmit(struct sk_buff *skb,
@@ -407,16 +429,22 @@ netdev_tx_t qede_start_xmit(struct sk_buff *skb,
txq = QEDE_TX_QUEUE(edev, txq_index);
netdev_txq = netdev_get_tx_queue(ndev, txq_index);
- /* Current code doesn't support SKB linearization, since the max number
- * of skb frags can be passed in the FW HSI.
- */
- BUILD_BUG_ON(MAX_SKB_FRAGS > ETH_TX_MAX_BDS_PER_NON_LSO_PACKET);
-
WARN_ON(qed_chain_get_elem_left(&txq->tx_pbl) <
(MAX_SKB_FRAGS + 1));
xmit_type = qede_xmit_type(edev, skb, &ipv6_ext);
+#if ((MAX_SKB_FRAGS + 2) > ETH_TX_MAX_BDS_PER_NON_LSO_PACKET)
+ if (qede_pkt_req_lin(edev, skb, xmit_type)) {
+ if (skb_linearize(skb)) {
+ DP_NOTICE(edev,
+ "SKB linearization failed - silently dropping this SKB\n");
+ dev_kfree_skb_any(skb);
+ return NETDEV_TX_OK;
+ }
+ }
+#endif
+
/* Fill the entry in the SW ring and the BDs in the FW ring */
idx = txq->sw_tx_prod & NUM_TX_BDS_MAX;
txq->sw_tx_ring[idx].skb = skb;
--
1.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next 3/6] qede: Don't report link change needlessly
2016-02-24 14:52 [PATCH net-next 0/6] qed*: Driver updates Yuval Mintz
2016-02-24 14:52 ` [PATCH net-next 1/6] qede: Change pci DID for 10g device Yuval Mintz
2016-02-24 14:52 ` [PATCH net-next 2/6] qede: Linearize SKBs when needed Yuval Mintz
@ 2016-02-24 14:52 ` Yuval Mintz
2016-02-24 14:52 ` [PATCH net-next 4/6] qed: add MODULE_FIRMWARE() Yuval Mintz
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Yuval Mintz @ 2016-02-24 14:52 UTC (permalink / raw)
To: davem, netdev; +Cc: Yuval Mintz
There are several corner cases where driver might get a 2nd notification
about the same link change. Don't log any additional changes if the
physical carrier is already reported as it should.
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
---
drivers/net/ethernet/qlogic/qede/qede_main.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
index f07b9a9..c0dd236 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -2780,13 +2780,17 @@ static void qede_link_update(void *dev, struct qed_link_output *link)
}
if (link->link_up) {
- DP_NOTICE(edev, "Link is up\n");
- netif_tx_start_all_queues(edev->ndev);
- netif_carrier_on(edev->ndev);
+ if (!netif_carrier_ok(edev->ndev)) {
+ DP_NOTICE(edev, "Link is up\n");
+ netif_tx_start_all_queues(edev->ndev);
+ netif_carrier_on(edev->ndev);
+ }
} else {
- DP_NOTICE(edev, "Link is down\n");
- netif_tx_disable(edev->ndev);
- netif_carrier_off(edev->ndev);
+ if (netif_carrier_ok(edev->ndev)) {
+ DP_NOTICE(edev, "Link is down\n");
+ netif_tx_disable(edev->ndev);
+ netif_carrier_off(edev->ndev);
+ }
}
}
--
1.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next 4/6] qed: add MODULE_FIRMWARE()
2016-02-24 14:52 [PATCH net-next 0/6] qed*: Driver updates Yuval Mintz
` (2 preceding siblings ...)
2016-02-24 14:52 ` [PATCH net-next 3/6] qede: Don't report link change needlessly Yuval Mintz
@ 2016-02-24 14:52 ` Yuval Mintz
2016-02-24 14:52 ` [PATCH net-next 5/6] qed: Prevent probe on previous error Yuval Mintz
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Yuval Mintz @ 2016-02-24 14:52 UTC (permalink / raw)
To: davem, netdev; +Cc: Yuval Mintz
Module is using a binary firmware file and so should be marked as such.
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
---
drivers/net/ethernet/qlogic/qed/qed_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index 593f887..08cd92d 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -45,6 +45,8 @@ MODULE_VERSION(DRV_MODULE_VERSION);
#define QED_FW_FILE_NAME \
"qed/qed_init_values_zipped-" FW_FILE_VERSION ".bin"
+MODULE_FIRMWARE(QED_FW_FILE_NAME);
+
static int __init qed_init(void)
{
pr_notice("qed_init called\n");
--
1.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next 5/6] qed: Prevent probe on previous error
2016-02-24 14:52 [PATCH net-next 0/6] qed*: Driver updates Yuval Mintz
` (3 preceding siblings ...)
2016-02-24 14:52 ` [PATCH net-next 4/6] qed: add MODULE_FIRMWARE() Yuval Mintz
@ 2016-02-24 14:52 ` Yuval Mintz
2016-02-24 14:52 ` [PATCH net-next 6/6] qed, qede: rebrand module description Yuval Mintz
2016-02-25 21:55 ` [PATCH net-next 0/6] qed*: Driver updates David Miller
6 siblings, 0 replies; 8+ messages in thread
From: Yuval Mintz @ 2016-02-24 14:52 UTC (permalink / raw)
To: davem, netdev; +Cc: Yuval Mintz
Don't allow driver to probe on an adapter at a failed state;
Gracefully block the probe instead.
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
---
drivers/net/ethernet/qlogic/qed/qed_main.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index 08cd92d..e4e6ca5 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -99,12 +99,15 @@ static void qed_free_pci(struct qed_dev *cdev)
pci_disable_device(pdev);
}
+#define PCI_REVISION_ID_ERROR_VAL 0xff
+
/* Performs PCI initializations as well as initializing PCI-related parameters
* in the device structrue. Returns 0 in case of success.
*/
static int qed_init_pci(struct qed_dev *cdev,
struct pci_dev *pdev)
{
+ u8 rev_id;
int rc;
cdev->pdev = pdev;
@@ -138,6 +141,14 @@ static int qed_init_pci(struct qed_dev *cdev,
pci_save_state(pdev);
}
+ pci_read_config_byte(pdev, PCI_REVISION_ID, &rev_id);
+ if (rev_id == PCI_REVISION_ID_ERROR_VAL) {
+ DP_NOTICE(cdev,
+ "Detected PCI device error [rev_id 0x%x]. Probably due to prior indication. Aborting.\n",
+ rev_id);
+ rc = -ENODEV;
+ goto err2;
+ }
if (!pci_is_pcie(pdev)) {
DP_NOTICE(cdev, "The bus is not PCI Express\n");
rc = -EIO;
--
1.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next 6/6] qed, qede: rebrand module description
2016-02-24 14:52 [PATCH net-next 0/6] qed*: Driver updates Yuval Mintz
` (4 preceding siblings ...)
2016-02-24 14:52 ` [PATCH net-next 5/6] qed: Prevent probe on previous error Yuval Mintz
@ 2016-02-24 14:52 ` Yuval Mintz
2016-02-25 21:55 ` [PATCH net-next 0/6] qed*: Driver updates David Miller
6 siblings, 0 replies; 8+ messages in thread
From: Yuval Mintz @ 2016-02-24 14:52 UTC (permalink / raw)
To: davem, netdev; +Cc: Yuval Mintz
Drop the `QL4xxx 40G/100G' and use `FastLinQ 4xxxx' instead.
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
---
drivers/net/ethernet/qlogic/qed/qed_main.c | 6 +++---
drivers/net/ethernet/qlogic/qede/qede_main.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index e4e6ca5..25d6e91 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -29,10 +29,10 @@
#include "qed_mcp.h"
#include "qed_hw.h"
-static const char version[] =
- "QLogic QL4xxx 40G/100G Ethernet Driver qed " DRV_MODULE_VERSION "\n";
+static char version[] =
+ "QLogic FastLinQ 4xxxx Core Module qed " DRV_MODULE_VERSION "\n";
-MODULE_DESCRIPTION("QLogic 25G/40G/50G/100G Core Module");
+MODULE_DESCRIPTION("QLogic FastLinQ 4xxxx Core Module");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_MODULE_VERSION);
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
index c0dd236..ddd9e4a 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -39,10 +39,10 @@
#include "qede.h"
-static const char version[] = "QLogic QL4xxx 40G/100G Ethernet Driver qede "
- DRV_MODULE_VERSION "\n";
+static char version[] =
+ "QLogic FastLinQ 4xxxx Ethernet Driver qede " DRV_MODULE_VERSION "\n";
-MODULE_DESCRIPTION("QLogic 40G/100G Ethernet Driver");
+MODULE_DESCRIPTION("QLogic FastLinQ 4xxxx Ethernet Driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_MODULE_VERSION);
--
1.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net-next 0/6] qed*: Driver updates
2016-02-24 14:52 [PATCH net-next 0/6] qed*: Driver updates Yuval Mintz
` (5 preceding siblings ...)
2016-02-24 14:52 ` [PATCH net-next 6/6] qed, qede: rebrand module description Yuval Mintz
@ 2016-02-25 21:55 ` David Miller
6 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2016-02-25 21:55 UTC (permalink / raw)
To: Yuval.Mintz; +Cc: netdev
From: Yuval Mintz <Yuval.Mintz@qlogic.com>
Date: Wed, 24 Feb 2016 16:52:44 +0200
> Usually I try to provide a sensible description of the patch set even if
> it lacks a general 'motif', but this simply contains several small,
> unrelated and self-explenatory tweaks and additions.
Series applied, however....
I really wonder about how you stop and start the TX queues on carrier status
change.
The qdisc layer does that for you already, and prevents any TX from occuring
when the carrier is off.
So please explore removing that seemingly needless code.
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-02-25 21:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-24 14:52 [PATCH net-next 0/6] qed*: Driver updates Yuval Mintz
2016-02-24 14:52 ` [PATCH net-next 1/6] qede: Change pci DID for 10g device Yuval Mintz
2016-02-24 14:52 ` [PATCH net-next 2/6] qede: Linearize SKBs when needed Yuval Mintz
2016-02-24 14:52 ` [PATCH net-next 3/6] qede: Don't report link change needlessly Yuval Mintz
2016-02-24 14:52 ` [PATCH net-next 4/6] qed: add MODULE_FIRMWARE() Yuval Mintz
2016-02-24 14:52 ` [PATCH net-next 5/6] qed: Prevent probe on previous error Yuval Mintz
2016-02-24 14:52 ` [PATCH net-next 6/6] qed, qede: rebrand module description Yuval Mintz
2016-02-25 21:55 ` [PATCH net-next 0/6] qed*: Driver updates David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).