mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 13:51:44 +00:00
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: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
6f2f92a9d0
@ -13,6 +13,9 @@
|
||||
#define DRV_NAME "cavium_ptp"
|
||||
|
||||
#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_PTP_BAR_NO 0
|
||||
@ -321,7 +324,12 @@ static void cavium_ptp_remove(struct pci_dev *pdev)
|
||||
}
|
||||
|
||||
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, }
|
||||
};
|
||||
|
||||
|
@ -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 timeout = NIC_MBOX_MSG_TIMEOUT;
|
||||
int sleep = 10;
|
||||
unsigned long timeout;
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&nic->rx_mode_mtx);
|
||||
@ -137,6 +136,7 @@ int nicvf_send_msg_to_pf(struct nicvf *nic, union nic_mbx *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 */
|
||||
while (!nic->pf_acked) {
|
||||
if (nic->pf_nacked) {
|
||||
@ -146,11 +146,10 @@ int nicvf_send_msg_to_pf(struct nicvf *nic, union nic_mbx *mbx)
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
msleep(sleep);
|
||||
usleep_range(8000, 10000);
|
||||
if (nic->pf_acked)
|
||||
break;
|
||||
timeout -= sleep;
|
||||
if (!timeout) {
|
||||
if (time_after(jiffies, timeout)) {
|
||||
netdev_err(nic->netdev,
|
||||
"PF didn't ACK to mbox msg 0x%02x from VF%d\n",
|
||||
(mbx->msg.msg & 0xFF), nic->vf_id);
|
||||
|
@ -100,8 +100,8 @@
|
||||
* RED accepts pkt if unused CQE < 2304 & >= 2560
|
||||
* DROPs pkts if unused CQE < 2304
|
||||
*/
|
||||
#define RQ_PASS_CQ_LVL 192ULL
|
||||
#define RQ_DROP_CQ_LVL 184ULL
|
||||
#define RQ_PASS_CQ_LVL 224ULL
|
||||
#define RQ_DROP_CQ_LVL 216ULL
|
||||
|
||||
/* RED and Backpressure levels of RBDR for pkt reception
|
||||
* For RBDR, level is a measure of fullness i.e 0x0 means empty
|
||||
|
Loading…
Reference in New Issue
Block a user