cxgb4: correct formatting of MSI-X interrupt names
The last byte of the buffer for MSI-X names could not be used due to a bogus -1. Also do not explicitly clear the last byte, snprintf will do the right thing. Signed-off-by: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8cd18ac47f
commit
ba27816cd8
@ -522,39 +522,32 @@ static irqreturn_t t4_nondata_intr(int irq, void *cookie)
|
|||||||
*/
|
*/
|
||||||
static void name_msix_vecs(struct adapter *adap)
|
static void name_msix_vecs(struct adapter *adap)
|
||||||
{
|
{
|
||||||
int i, j, msi_idx = 2, n = sizeof(adap->msix_info[0].desc) - 1;
|
int i, j, msi_idx = 2, n = sizeof(adap->msix_info[0].desc);
|
||||||
|
|
||||||
/* non-data interrupts */
|
/* non-data interrupts */
|
||||||
snprintf(adap->msix_info[0].desc, n, "%s", adap->name);
|
snprintf(adap->msix_info[0].desc, n, "%s", adap->name);
|
||||||
adap->msix_info[0].desc[n] = 0;
|
|
||||||
|
|
||||||
/* FW events */
|
/* FW events */
|
||||||
snprintf(adap->msix_info[1].desc, n, "%s-FWeventq", adap->name);
|
snprintf(adap->msix_info[1].desc, n, "%s-FWeventq", adap->name);
|
||||||
adap->msix_info[1].desc[n] = 0;
|
|
||||||
|
|
||||||
/* Ethernet queues */
|
/* Ethernet queues */
|
||||||
for_each_port(adap, j) {
|
for_each_port(adap, j) {
|
||||||
struct net_device *d = adap->port[j];
|
struct net_device *d = adap->port[j];
|
||||||
const struct port_info *pi = netdev_priv(d);
|
const struct port_info *pi = netdev_priv(d);
|
||||||
|
|
||||||
for (i = 0; i < pi->nqsets; i++, msi_idx++) {
|
for (i = 0; i < pi->nqsets; i++, msi_idx++)
|
||||||
snprintf(adap->msix_info[msi_idx].desc, n, "%s-Rx%d",
|
snprintf(adap->msix_info[msi_idx].desc, n, "%s-Rx%d",
|
||||||
d->name, i);
|
d->name, i);
|
||||||
adap->msix_info[msi_idx].desc[n] = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* offload queues */
|
/* offload queues */
|
||||||
for_each_ofldrxq(&adap->sge, i) {
|
for_each_ofldrxq(&adap->sge, i)
|
||||||
snprintf(adap->msix_info[msi_idx].desc, n, "%s-ofld%d",
|
snprintf(adap->msix_info[msi_idx++].desc, n, "%s-ofld%d",
|
||||||
adap->name, i);
|
adap->name, i);
|
||||||
adap->msix_info[msi_idx++].desc[n] = 0;
|
|
||||||
}
|
for_each_rdmarxq(&adap->sge, i)
|
||||||
for_each_rdmarxq(&adap->sge, i) {
|
snprintf(adap->msix_info[msi_idx++].desc, n, "%s-rdma%d",
|
||||||
snprintf(adap->msix_info[msi_idx].desc, n, "%s-rdma%d",
|
|
||||||
adap->name, i);
|
adap->name, i);
|
||||||
adap->msix_info[msi_idx++].desc[n] = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int request_msix_queue_irqs(struct adapter *adap)
|
static int request_msix_queue_irqs(struct adapter *adap)
|
||||||
|
Loading…
Reference in New Issue
Block a user