Commit 6f2f92a9 authored by David S. Miller's avatar David S. Miller

Merge branch 'net-thunderx-Miscellaneous-changes'

Sunil Goutham says:

====================
net: thunderx: Miscellaneous changes

This patchset has changes wrt driver performance optimization,
load time optimization. And a change to PCI device regiatration
table for timestamp device.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents aeaf0cc5 aa3afccc
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
#define DRV_NAME "cavium_ptp" #define DRV_NAME "cavium_ptp"
#define PCI_DEVICE_ID_CAVIUM_PTP 0xA00C #define PCI_DEVICE_ID_CAVIUM_PTP 0xA00C
#define PCI_SUBSYS_DEVID_88XX_PTP 0xA10C
#define PCI_SUBSYS_DEVID_81XX_PTP 0XA20C
#define PCI_SUBSYS_DEVID_83XX_PTP 0xA30C
#define PCI_DEVICE_ID_CAVIUM_RST 0xA00E #define PCI_DEVICE_ID_CAVIUM_RST 0xA00E
#define PCI_PTP_BAR_NO 0 #define PCI_PTP_BAR_NO 0
...@@ -321,7 +324,12 @@ static void cavium_ptp_remove(struct pci_dev *pdev) ...@@ -321,7 +324,12 @@ static void cavium_ptp_remove(struct pci_dev *pdev)
} }
static const struct pci_device_id cavium_ptp_id_table[] = { static const struct pci_device_id cavium_ptp_id_table[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_CAVIUM_PTP) }, { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_CAVIUM_PTP,
PCI_VENDOR_ID_CAVIUM, PCI_SUBSYS_DEVID_88XX_PTP) },
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_CAVIUM_PTP,
PCI_VENDOR_ID_CAVIUM, PCI_SUBSYS_DEVID_81XX_PTP) },
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_CAVIUM_PTP,
PCI_VENDOR_ID_CAVIUM, PCI_SUBSYS_DEVID_83XX_PTP) },
{ 0, } { 0, }
}; };
......
...@@ -126,8 +126,7 @@ static void nicvf_write_to_mbx(struct nicvf *nic, union nic_mbx *mbx) ...@@ -126,8 +126,7 @@ static void nicvf_write_to_mbx(struct nicvf *nic, union nic_mbx *mbx)
int nicvf_send_msg_to_pf(struct nicvf *nic, union nic_mbx *mbx) int nicvf_send_msg_to_pf(struct nicvf *nic, union nic_mbx *mbx)
{ {
int timeout = NIC_MBOX_MSG_TIMEOUT; unsigned long timeout;
int sleep = 10;
int ret = 0; int ret = 0;
mutex_lock(&nic->rx_mode_mtx); mutex_lock(&nic->rx_mode_mtx);
...@@ -137,6 +136,7 @@ int nicvf_send_msg_to_pf(struct nicvf *nic, union nic_mbx *mbx) ...@@ -137,6 +136,7 @@ int nicvf_send_msg_to_pf(struct nicvf *nic, union nic_mbx *mbx)
nicvf_write_to_mbx(nic, mbx); nicvf_write_to_mbx(nic, mbx);
timeout = jiffies + msecs_to_jiffies(NIC_MBOX_MSG_TIMEOUT);
/* Wait for previous message to be acked, timeout 2sec */ /* Wait for previous message to be acked, timeout 2sec */
while (!nic->pf_acked) { while (!nic->pf_acked) {
if (nic->pf_nacked) { if (nic->pf_nacked) {
...@@ -146,11 +146,10 @@ int nicvf_send_msg_to_pf(struct nicvf *nic, union nic_mbx *mbx) ...@@ -146,11 +146,10 @@ int nicvf_send_msg_to_pf(struct nicvf *nic, union nic_mbx *mbx)
ret = -EINVAL; ret = -EINVAL;
break; break;
} }
msleep(sleep); usleep_range(8000, 10000);
if (nic->pf_acked) if (nic->pf_acked)
break; break;
timeout -= sleep; if (time_after(jiffies, timeout)) {
if (!timeout) {
netdev_err(nic->netdev, netdev_err(nic->netdev,
"PF didn't ACK to mbox msg 0x%02x from VF%d\n", "PF didn't ACK to mbox msg 0x%02x from VF%d\n",
(mbx->msg.msg & 0xFF), nic->vf_id); (mbx->msg.msg & 0xFF), nic->vf_id);
......
...@@ -100,8 +100,8 @@ ...@@ -100,8 +100,8 @@
* RED accepts pkt if unused CQE < 2304 & >= 2560 * RED accepts pkt if unused CQE < 2304 & >= 2560
* DROPs pkts if unused CQE < 2304 * DROPs pkts if unused CQE < 2304
*/ */
#define RQ_PASS_CQ_LVL 192ULL #define RQ_PASS_CQ_LVL 224ULL
#define RQ_DROP_CQ_LVL 184ULL #define RQ_DROP_CQ_LVL 216ULL
/* RED and Backpressure levels of RBDR for pkt reception /* RED and Backpressure levels of RBDR for pkt reception
* For RBDR, level is a measure of fullness i.e 0x0 means empty * For RBDR, level is a measure of fullness i.e 0x0 means empty
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment