mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-16 14:02:10 +00:00
Merge branch 'arnd-net-driver-fixes'
Arnd Bergmann says: ==================== network driver fixes This is an updated series of fixes for the network device drivers that showed warnings in ARM randconfig. Changes since v1 are: dropped "net: macb: avoid uninitialized variables", already fixed in net-next dropped "net: fddi/defxx: avoid warning about uninitialized variable use", already fixed in net-next added missing barriers in "net: moxart: use correct accessors for DMA memory" clarified "net: bgmac: clarify CONFIG_BCMA dependency" changelog ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
ae9d723e9f
@ -302,7 +302,7 @@ static int nb8800_poll(struct napi_struct *napi, int budget)
|
||||
nb8800_tx_done(dev);
|
||||
|
||||
again:
|
||||
while (work < budget) {
|
||||
do {
|
||||
struct nb8800_rx_buf *rxb;
|
||||
unsigned int len;
|
||||
|
||||
@ -330,7 +330,7 @@ again:
|
||||
rxd->report = 0;
|
||||
last = next;
|
||||
work++;
|
||||
}
|
||||
} while (work < budget);
|
||||
|
||||
if (work) {
|
||||
priv->rx_descs[last].desc.config |= DESC_EOC;
|
||||
|
@ -151,8 +151,11 @@ config BNX2X_VXLAN
|
||||
|
||||
config BGMAC
|
||||
tristate "BCMA bus GBit core support"
|
||||
depends on BCMA_HOST_SOC && HAS_DMA && (BCM47XX || ARCH_BCM_5301X)
|
||||
depends on BCMA && BCMA_HOST_SOC
|
||||
depends on HAS_DMA
|
||||
depends on BCM47XX || ARCH_BCM_5301X || COMPILE_TEST
|
||||
select PHYLIB
|
||||
select FIXED_PHY
|
||||
---help---
|
||||
This driver supports GBit MAC and BCM4706 GBit MAC cores on BCMA bus.
|
||||
They can be found on BCM47xx SoCs and provide gigabit ethernet.
|
||||
|
@ -12016,7 +12016,7 @@ static int tg3_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
|
||||
int ret;
|
||||
u32 offset, len, b_offset, odd_len;
|
||||
u8 *buf;
|
||||
__be32 start, end;
|
||||
__be32 start = 0, end;
|
||||
|
||||
if (tg3_flag(tp, NO_NVRAM) ||
|
||||
eeprom->magic != TG3_EEPROM_MAGIC)
|
||||
|
@ -194,7 +194,6 @@ static const char *hp100_isa_tbl[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_EISA
|
||||
static struct eisa_device_id hp100_eisa_tbl[] = {
|
||||
{ "HWPF180" }, /* HP J2577 rev A */
|
||||
{ "HWP1920" }, /* HP 27248B */
|
||||
@ -205,9 +204,7 @@ static struct eisa_device_id hp100_eisa_tbl[] = {
|
||||
{ "" } /* Mandatory final entry ! */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(eisa, hp100_eisa_tbl);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
static const struct pci_device_id hp100_pci_tbl[] = {
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_J2585A, PCI_ANY_ID, PCI_ANY_ID,},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_J2585B, PCI_ANY_ID, PCI_ANY_ID,},
|
||||
@ -219,7 +216,6 @@ static const struct pci_device_id hp100_pci_tbl[] = {
|
||||
{} /* Terminating entry */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, hp100_pci_tbl);
|
||||
#endif
|
||||
|
||||
static int hp100_rx_ratio = HP100_DEFAULT_RX_RATIO;
|
||||
static int hp100_priority_tx = HP100_DEFAULT_PRIORITY_TX;
|
||||
@ -2842,7 +2838,6 @@ static void cleanup_dev(struct net_device *d)
|
||||
free_netdev(d);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_EISA
|
||||
static int hp100_eisa_probe(struct device *gendev)
|
||||
{
|
||||
struct net_device *dev = alloc_etherdev(sizeof(struct hp100_private));
|
||||
@ -2884,9 +2879,7 @@ static struct eisa_driver hp100_eisa_driver = {
|
||||
.remove = hp100_eisa_remove,
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
static int hp100_pci_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *ent)
|
||||
{
|
||||
@ -2955,7 +2948,6 @@ static struct pci_driver hp100_pci_driver = {
|
||||
.probe = hp100_pci_probe,
|
||||
.remove = hp100_pci_remove,
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* module section
|
||||
@ -3032,23 +3024,17 @@ static int __init hp100_module_init(void)
|
||||
err = hp100_isa_init();
|
||||
if (err && err != -ENODEV)
|
||||
goto out;
|
||||
#ifdef CONFIG_EISA
|
||||
err = eisa_driver_register(&hp100_eisa_driver);
|
||||
if (err && err != -ENODEV)
|
||||
goto out2;
|
||||
#endif
|
||||
#ifdef CONFIG_PCI
|
||||
err = pci_register_driver(&hp100_pci_driver);
|
||||
if (err && err != -ENODEV)
|
||||
goto out3;
|
||||
#endif
|
||||
out:
|
||||
return err;
|
||||
out3:
|
||||
#ifdef CONFIG_EISA
|
||||
eisa_driver_unregister (&hp100_eisa_driver);
|
||||
out2:
|
||||
#endif
|
||||
hp100_isa_cleanup();
|
||||
goto out;
|
||||
}
|
||||
@ -3057,12 +3043,8 @@ static int __init hp100_module_init(void)
|
||||
static void __exit hp100_module_exit(void)
|
||||
{
|
||||
hp100_isa_cleanup();
|
||||
#ifdef CONFIG_EISA
|
||||
eisa_driver_unregister (&hp100_eisa_driver);
|
||||
#endif
|
||||
#ifdef CONFIG_PCI
|
||||
pci_unregister_driver (&hp100_pci_driver);
|
||||
#endif
|
||||
}
|
||||
|
||||
module_init(hp100_module_init)
|
||||
|
@ -2223,8 +2223,6 @@ static irqreturn_t vxge_isr_napi(int irq, void *dev_id)
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
|
||||
static irqreturn_t vxge_tx_msix_handle(int irq, void *dev_id)
|
||||
{
|
||||
struct vxge_fifo *fifo = (struct vxge_fifo *)dev_id;
|
||||
@ -2442,16 +2440,13 @@ static void vxge_rem_msix_isr(struct vxgedev *vdev)
|
||||
if (vdev->config.intr_type == MSI_X)
|
||||
pci_disable_msix(vdev->pdev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void vxge_rem_isr(struct vxgedev *vdev)
|
||||
{
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
if (vdev->config.intr_type == MSI_X) {
|
||||
if (IS_ENABLED(CONFIG_PCI_MSI) &&
|
||||
vdev->config.intr_type == MSI_X) {
|
||||
vxge_rem_msix_isr(vdev);
|
||||
} else
|
||||
#endif
|
||||
if (vdev->config.intr_type == INTA) {
|
||||
} else if (vdev->config.intr_type == INTA) {
|
||||
synchronize_irq(vdev->pdev->irq);
|
||||
free_irq(vdev->pdev->irq, vdev);
|
||||
}
|
||||
@ -2460,11 +2455,10 @@ static void vxge_rem_isr(struct vxgedev *vdev)
|
||||
static int vxge_add_isr(struct vxgedev *vdev)
|
||||
{
|
||||
int ret = 0;
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
int vp_idx = 0, intr_idx = 0, intr_cnt = 0, msix_idx = 0, irq_req = 0;
|
||||
int pci_fun = PCI_FUNC(vdev->pdev->devfn);
|
||||
|
||||
if (vdev->config.intr_type == MSI_X)
|
||||
if (IS_ENABLED(CONFIG_PCI_MSI) && vdev->config.intr_type == MSI_X)
|
||||
ret = vxge_enable_msix(vdev);
|
||||
|
||||
if (ret) {
|
||||
@ -2475,7 +2469,7 @@ static int vxge_add_isr(struct vxgedev *vdev)
|
||||
vdev->config.intr_type = INTA;
|
||||
}
|
||||
|
||||
if (vdev->config.intr_type == MSI_X) {
|
||||
if (IS_ENABLED(CONFIG_PCI_MSI) && vdev->config.intr_type == MSI_X) {
|
||||
for (intr_idx = 0;
|
||||
intr_idx < (vdev->no_of_vpath *
|
||||
VXGE_HW_VPATH_MSIX_ACTIVE); intr_idx++) {
|
||||
@ -2576,9 +2570,8 @@ static int vxge_add_isr(struct vxgedev *vdev)
|
||||
vdev->vxge_entries[intr_cnt].in_use = 1;
|
||||
vdev->vxge_entries[intr_cnt].arg = &vdev->vpaths[0];
|
||||
}
|
||||
INTA_MODE:
|
||||
#endif
|
||||
|
||||
INTA_MODE:
|
||||
if (vdev->config.intr_type == INTA) {
|
||||
snprintf(vdev->desc[0], VXGE_INTR_STRLEN,
|
||||
"%s:vxge:INTA", vdev->ndev->name);
|
||||
@ -3889,12 +3882,12 @@ static void vxge_device_config_init(struct vxge_hw_device_config *device_config,
|
||||
if (max_mac_vpath > VXGE_MAX_MAC_ADDR_COUNT)
|
||||
max_mac_vpath = VXGE_MAX_MAC_ADDR_COUNT;
|
||||
|
||||
#ifndef CONFIG_PCI_MSI
|
||||
vxge_debug_init(VXGE_ERR,
|
||||
"%s: This Kernel does not support "
|
||||
"MSI-X. Defaulting to INTA", VXGE_DRIVER_NAME);
|
||||
*intr_type = INTA;
|
||||
#endif
|
||||
if (!IS_ENABLED(CONFIG_PCI_MSI)) {
|
||||
vxge_debug_init(VXGE_ERR,
|
||||
"%s: This Kernel does not support "
|
||||
"MSI-X. Defaulting to INTA", VXGE_DRIVER_NAME);
|
||||
*intr_type = INTA;
|
||||
}
|
||||
|
||||
/* Configure whether MSI-X or IRQL. */
|
||||
switch (*intr_type) {
|
||||
|
@ -82,7 +82,7 @@ struct cpdma_desc {
|
||||
|
||||
struct cpdma_desc_pool {
|
||||
phys_addr_t phys;
|
||||
u32 hw_addr;
|
||||
dma_addr_t hw_addr;
|
||||
void __iomem *iomap; /* ioremap map */
|
||||
void *cpumap; /* dma_alloc map */
|
||||
int desc_size, mem_size;
|
||||
@ -152,7 +152,7 @@ struct cpdma_chan {
|
||||
* abstract out these details
|
||||
*/
|
||||
static struct cpdma_desc_pool *
|
||||
cpdma_desc_pool_create(struct device *dev, u32 phys, u32 hw_addr,
|
||||
cpdma_desc_pool_create(struct device *dev, u32 phys, dma_addr_t hw_addr,
|
||||
int size, int align)
|
||||
{
|
||||
int bitmap_size;
|
||||
@ -176,13 +176,13 @@ cpdma_desc_pool_create(struct device *dev, u32 phys, u32 hw_addr,
|
||||
|
||||
if (phys) {
|
||||
pool->phys = phys;
|
||||
pool->iomap = ioremap(phys, size);
|
||||
pool->iomap = ioremap(phys, size); /* should be memremap? */
|
||||
pool->hw_addr = hw_addr;
|
||||
} else {
|
||||
pool->cpumap = dma_alloc_coherent(dev, size, &pool->phys,
|
||||
pool->cpumap = dma_alloc_coherent(dev, size, &pool->hw_addr,
|
||||
GFP_KERNEL);
|
||||
pool->iomap = pool->cpumap;
|
||||
pool->hw_addr = pool->phys;
|
||||
pool->iomap = (void __iomem __force *)pool->cpumap;
|
||||
pool->phys = pool->hw_addr; /* assumes no IOMMU, don't use this value */
|
||||
}
|
||||
|
||||
if (pool->iomap)
|
||||
|
Loading…
Reference in New Issue
Block a user