mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 21:45:17 +07:00
i40e: Add define for interrupt name string len
This patch creates a define for interrupt name string configuration that is large enough to contain full bus/slot info, rather than just netdev->name. Change-ID: Iaac0d23dfb8526defeed69d91cea85ed4a50ddb2 Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
aebfc8169a
commit
b294ac70fc
@ -92,6 +92,7 @@
|
||||
#define I40E_MAX_USER_PRIORITY 8
|
||||
#define I40E_DEFAULT_MSG_ENABLE 4
|
||||
#define I40E_QUEUE_WAIT_RETRY_LIMIT 10
|
||||
#define I40E_INT_NAME_STR_LEN (IFNAMSIZ + 9)
|
||||
|
||||
#define I40E_NVM_VERSION_LO_SHIFT 0
|
||||
#define I40E_NVM_VERSION_LO_MASK (0xff << I40E_NVM_VERSION_LO_SHIFT)
|
||||
@ -268,7 +269,7 @@ struct i40e_pf {
|
||||
u16 rx_itr_default;
|
||||
u16 tx_itr_default;
|
||||
u16 msg_enable;
|
||||
char misc_int_name[IFNAMSIZ + 9];
|
||||
char int_name[I40E_INT_NAME_STR_LEN];
|
||||
u16 adminq_work_limit; /* num of admin receive queue desc to process */
|
||||
unsigned long service_timer_period;
|
||||
unsigned long service_timer_previous;
|
||||
@ -524,7 +525,7 @@ struct i40e_q_vector {
|
||||
|
||||
cpumask_t affinity_mask;
|
||||
struct rcu_head rcu; /* to avoid race with update stats on free */
|
||||
char name[IFNAMSIZ + 9];
|
||||
char name[I40E_INT_NAME_STR_LEN];
|
||||
} ____cacheline_internodealigned_in_smp;
|
||||
|
||||
/* lan device */
|
||||
|
@ -3402,10 +3402,10 @@ static int i40e_vsi_request_irq(struct i40e_vsi *vsi, char *basename)
|
||||
err = i40e_vsi_request_irq_msix(vsi, basename);
|
||||
else if (pf->flags & I40E_FLAG_MSI_ENABLED)
|
||||
err = request_irq(pf->pdev->irq, i40e_intr, 0,
|
||||
pf->misc_int_name, pf);
|
||||
pf->int_name, pf);
|
||||
else
|
||||
err = request_irq(pf->pdev->irq, i40e_intr, IRQF_SHARED,
|
||||
pf->misc_int_name, pf);
|
||||
pf->int_name, pf);
|
||||
|
||||
if (err)
|
||||
dev_info(&pf->pdev->dev, "request_irq failed, Error %d\n", err);
|
||||
@ -4846,7 +4846,7 @@ static int i40e_open(struct net_device *netdev)
|
||||
int i40e_vsi_open(struct i40e_vsi *vsi)
|
||||
{
|
||||
struct i40e_pf *pf = vsi->back;
|
||||
char int_name[IFNAMSIZ + 9];
|
||||
char int_name[I40E_INT_NAME_STR_LEN];
|
||||
int err;
|
||||
|
||||
/* allocate descriptors */
|
||||
@ -7128,11 +7128,11 @@ static int i40e_setup_misc_vector(struct i40e_pf *pf)
|
||||
*/
|
||||
if (!test_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state)) {
|
||||
err = request_irq(pf->msix_entries[0].vector,
|
||||
i40e_intr, 0, pf->misc_int_name, pf);
|
||||
i40e_intr, 0, pf->int_name, pf);
|
||||
if (err) {
|
||||
dev_info(&pf->pdev->dev,
|
||||
"request_irq for %s failed: %d\n",
|
||||
pf->misc_int_name, err);
|
||||
pf->int_name, err);
|
||||
return -EFAULT;
|
||||
}
|
||||
}
|
||||
@ -9179,7 +9179,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
hw->aq.asq_buf_size = I40E_MAX_AQ_BUF_SIZE;
|
||||
pf->adminq_work_limit = I40E_AQ_WORK_LIMIT;
|
||||
|
||||
snprintf(pf->misc_int_name, sizeof(pf->misc_int_name) - 1,
|
||||
snprintf(pf->int_name, sizeof(pf->int_name) - 1,
|
||||
"%s-%s:misc",
|
||||
dev_driver_string(&pf->pdev->dev), dev_name(&pdev->dev));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user