Loading drivers/net/chelsio/common.h +2 −22 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ * * ****************************************************************************/ #define pr_fmt(fmt) "cxgb: " fmt #ifndef _CXGB_COMMON_H_ #define _CXGB_COMMON_H_ Loading @@ -55,28 +57,6 @@ #define DRV_DESCRIPTION "Chelsio 10Gb Ethernet Driver" #define DRV_NAME "cxgb" #define DRV_VERSION "2.2" #define PFX DRV_NAME ": " #define CH_ERR(fmt, ...) printk(KERN_ERR PFX fmt, ## __VA_ARGS__) #define CH_WARN(fmt, ...) printk(KERN_WARNING PFX fmt, ## __VA_ARGS__) #define CH_ALERT(fmt, ...) printk(KERN_ALERT PFX fmt, ## __VA_ARGS__) /* * More powerful macro that selectively prints messages based on msg_enable. * For info and debugging messages. */ #define CH_MSG(adapter, level, category, fmt, ...) do { \ if ((adapter)->msg_enable & NETIF_MSG_##category) \ printk(KERN_##level PFX "%s: " fmt, (adapter)->name, \ ## __VA_ARGS__); \ } while (0) #ifdef DEBUG # define CH_DBG(adapter, category, fmt, ...) \ CH_MSG(adapter, DEBUG, category, fmt, ## __VA_ARGS__) #else # define CH_DBG(fmt, ...) #endif #define CH_DEVICE(devid, ssid, idx) \ { PCI_VENDOR_ID_CHELSIO, devid, PCI_ANY_ID, ssid, 0, 0, idx } Loading drivers/net/chelsio/cxgb2.c +9 −9 Original line number Diff line number Diff line Loading @@ -974,7 +974,7 @@ void t1_fatal_err(struct adapter *adapter) t1_sge_stop(adapter->sge); t1_interrupts_disable(adapter); } CH_ALERT("%s: encountered fatal error, operation suspended\n", pr_alert("%s: encountered fatal error, operation suspended\n", adapter->name); } Loading Loading @@ -1018,7 +1018,7 @@ static int __devinit init_one(struct pci_dev *pdev, return err; if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { CH_ERR("%s: cannot find PCI device memory base address\n", pr_err("%s: cannot find PCI device memory base address\n", pci_name(pdev)); err = -ENODEV; goto out_disable_pdev; Loading @@ -1028,20 +1028,20 @@ static int __devinit init_one(struct pci_dev *pdev, pci_using_dac = 1; if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) { CH_ERR("%s: unable to obtain 64-bit DMA for " pr_err("%s: unable to obtain 64-bit DMA for " "consistent allocations\n", pci_name(pdev)); err = -ENODEV; goto out_disable_pdev; } } else if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) != 0) { CH_ERR("%s: no usable DMA configuration\n", pci_name(pdev)); pr_err("%s: no usable DMA configuration\n", pci_name(pdev)); goto out_disable_pdev; } err = pci_request_regions(pdev, DRV_NAME); if (err) { CH_ERR("%s: cannot obtain PCI resources\n", pci_name(pdev)); pr_err("%s: cannot obtain PCI resources\n", pci_name(pdev)); goto out_disable_pdev; } Loading Loading @@ -1069,7 +1069,7 @@ static int __devinit init_one(struct pci_dev *pdev, adapter->regs = ioremap(mmio_start, mmio_len); if (!adapter->regs) { CH_ERR("%s: cannot map device registers\n", pr_err("%s: cannot map device registers\n", pci_name(pdev)); err = -ENOMEM; goto out_free_dev; Loading Loading @@ -1148,7 +1148,7 @@ static int __devinit init_one(struct pci_dev *pdev, for (i = 0; i < bi->port_number; ++i) { err = register_netdev(adapter->port[i].dev); if (err) CH_WARN("%s: cannot register net device %s, skipping\n", pr_warning("%s: cannot register net device %s, skipping\n", pci_name(pdev), adapter->port[i].dev->name); else { /* Loading @@ -1162,7 +1162,7 @@ static int __devinit init_one(struct pci_dev *pdev, } } if (!adapter->registered_device_map) { CH_ERR("%s: could not register any net devices\n", pr_err("%s: could not register any net devices\n", pci_name(pdev)); goto out_release_adapter_res; } Loading drivers/net/chelsio/espi.c +2 −2 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ static int tricn_write(adapter_t *adapter, int bundle_addr, int module_addr, } while (busy && --attempts); if (busy) CH_ERR("%s: TRICN write timed out\n", adapter->name); pr_err("%s: TRICN write timed out\n", adapter->name); return busy; } Loading @@ -86,7 +86,7 @@ static int tricn_init(adapter_t *adapter) int i, sme = 1; if (!(readl(adapter->regs + A_ESPI_RX_RESET) & F_RX_CLK_STATUS)) { CH_ERR("%s: ESPI clock not ready\n", adapter->name); pr_err("%s: ESPI clock not ready\n", adapter->name); return -1; } Loading drivers/net/chelsio/pm3393.c +9 −7 Original line number Diff line number Diff line Loading @@ -251,7 +251,8 @@ static int pm3393_interrupt_handler(struct cmac *cmac) /* Read the master interrupt status register. */ pmread(cmac, SUNI1x10GEXP_REG_MASTER_INTERRUPT_STATUS, &master_intr_status); CH_DBG(cmac->adapter, INTR, "PM3393 intr cause 0x%x\n", if (netif_msg_intr(cmac->adapter)) dev_dbg(&cmac->adapter->pdev->dev, "PM3393 intr cause 0x%x\n", master_intr_status); /* TBD XXX Lets just clear everything for now */ Loading Loading @@ -776,11 +777,12 @@ static int pm3393_mac_reset(adapter_t * adapter) successful_reset = (is_pl4_reset_finished && !is_pl4_outof_lock && is_xaui_mabc_pll_locked); CH_DBG(adapter, HW, if (netif_msg_hw(adapter)) dev_dbg(&adapter->pdev->dev, "PM3393 HW reset %d: pl4_reset 0x%x, val 0x%x, " "is_pl4_outof_lock 0x%x, xaui_locked 0x%x\n", i, is_pl4_reset_finished, val, is_pl4_outof_lock, is_xaui_mabc_pll_locked); i, is_pl4_reset_finished, val, is_pl4_outof_lock, is_xaui_mabc_pll_locked); } return successful_reset ? 0 : 1; } Loading drivers/net/chelsio/sge.c +5 −5 Original line number Diff line number Diff line Loading @@ -953,7 +953,7 @@ int t1_sge_intr_error_handler(struct sge *sge) sge->stats.respQ_empty++; if (cause & F_RESPQ_OVERFLOW) { sge->stats.respQ_overflow++; CH_ALERT("%s: SGE response queue overflow\n", pr_alert("%s: SGE response queue overflow\n", adapter->name); } if (cause & F_FL_EXHAUSTED) { Loading @@ -962,12 +962,12 @@ int t1_sge_intr_error_handler(struct sge *sge) } if (cause & F_PACKET_TOO_BIG) { sge->stats.pkt_too_big++; CH_ALERT("%s: SGE max packet size exceeded\n", pr_alert("%s: SGE max packet size exceeded\n", adapter->name); } if (cause & F_PACKET_MISMATCH) { sge->stats.pkt_mismatch++; CH_ALERT("%s: SGE packet mismatch\n", adapter->name); pr_alert("%s: SGE packet mismatch\n", adapter->name); } if (cause & SGE_INT_FATAL) t1_fatal_err(adapter); Loading Loading @@ -1101,7 +1101,7 @@ static void unexpected_offload(struct adapter *adapter, struct freelQ *fl) pci_dma_sync_single_for_cpu(adapter->pdev, pci_unmap_addr(ce, dma_addr), pci_unmap_len(ce, dma_len), PCI_DMA_FROMDEVICE); CH_ERR("%s: unexpected offload packet, cmd %u\n", pr_err("%s: unexpected offload packet, cmd %u\n", adapter->name, *skb->data); recycle_fl_buf(fl, fl->cidx); } Loading Loading @@ -1687,7 +1687,7 @@ static int t1_sge_tx(struct sk_buff *skb, struct adapter *adapter, netif_stop_queue(dev); set_bit(dev->if_port, &sge->stopped_tx_queues); sge->stats.cmdQ_full[2]++; CH_ERR("%s: Tx ring full while queue awake!\n", pr_err("%s: Tx ring full while queue awake!\n", adapter->name); } spin_unlock(&q->lock); Loading Loading
drivers/net/chelsio/common.h +2 −22 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ * * ****************************************************************************/ #define pr_fmt(fmt) "cxgb: " fmt #ifndef _CXGB_COMMON_H_ #define _CXGB_COMMON_H_ Loading @@ -55,28 +57,6 @@ #define DRV_DESCRIPTION "Chelsio 10Gb Ethernet Driver" #define DRV_NAME "cxgb" #define DRV_VERSION "2.2" #define PFX DRV_NAME ": " #define CH_ERR(fmt, ...) printk(KERN_ERR PFX fmt, ## __VA_ARGS__) #define CH_WARN(fmt, ...) printk(KERN_WARNING PFX fmt, ## __VA_ARGS__) #define CH_ALERT(fmt, ...) printk(KERN_ALERT PFX fmt, ## __VA_ARGS__) /* * More powerful macro that selectively prints messages based on msg_enable. * For info and debugging messages. */ #define CH_MSG(adapter, level, category, fmt, ...) do { \ if ((adapter)->msg_enable & NETIF_MSG_##category) \ printk(KERN_##level PFX "%s: " fmt, (adapter)->name, \ ## __VA_ARGS__); \ } while (0) #ifdef DEBUG # define CH_DBG(adapter, category, fmt, ...) \ CH_MSG(adapter, DEBUG, category, fmt, ## __VA_ARGS__) #else # define CH_DBG(fmt, ...) #endif #define CH_DEVICE(devid, ssid, idx) \ { PCI_VENDOR_ID_CHELSIO, devid, PCI_ANY_ID, ssid, 0, 0, idx } Loading
drivers/net/chelsio/cxgb2.c +9 −9 Original line number Diff line number Diff line Loading @@ -974,7 +974,7 @@ void t1_fatal_err(struct adapter *adapter) t1_sge_stop(adapter->sge); t1_interrupts_disable(adapter); } CH_ALERT("%s: encountered fatal error, operation suspended\n", pr_alert("%s: encountered fatal error, operation suspended\n", adapter->name); } Loading Loading @@ -1018,7 +1018,7 @@ static int __devinit init_one(struct pci_dev *pdev, return err; if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { CH_ERR("%s: cannot find PCI device memory base address\n", pr_err("%s: cannot find PCI device memory base address\n", pci_name(pdev)); err = -ENODEV; goto out_disable_pdev; Loading @@ -1028,20 +1028,20 @@ static int __devinit init_one(struct pci_dev *pdev, pci_using_dac = 1; if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) { CH_ERR("%s: unable to obtain 64-bit DMA for " pr_err("%s: unable to obtain 64-bit DMA for " "consistent allocations\n", pci_name(pdev)); err = -ENODEV; goto out_disable_pdev; } } else if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) != 0) { CH_ERR("%s: no usable DMA configuration\n", pci_name(pdev)); pr_err("%s: no usable DMA configuration\n", pci_name(pdev)); goto out_disable_pdev; } err = pci_request_regions(pdev, DRV_NAME); if (err) { CH_ERR("%s: cannot obtain PCI resources\n", pci_name(pdev)); pr_err("%s: cannot obtain PCI resources\n", pci_name(pdev)); goto out_disable_pdev; } Loading Loading @@ -1069,7 +1069,7 @@ static int __devinit init_one(struct pci_dev *pdev, adapter->regs = ioremap(mmio_start, mmio_len); if (!adapter->regs) { CH_ERR("%s: cannot map device registers\n", pr_err("%s: cannot map device registers\n", pci_name(pdev)); err = -ENOMEM; goto out_free_dev; Loading Loading @@ -1148,7 +1148,7 @@ static int __devinit init_one(struct pci_dev *pdev, for (i = 0; i < bi->port_number; ++i) { err = register_netdev(adapter->port[i].dev); if (err) CH_WARN("%s: cannot register net device %s, skipping\n", pr_warning("%s: cannot register net device %s, skipping\n", pci_name(pdev), adapter->port[i].dev->name); else { /* Loading @@ -1162,7 +1162,7 @@ static int __devinit init_one(struct pci_dev *pdev, } } if (!adapter->registered_device_map) { CH_ERR("%s: could not register any net devices\n", pr_err("%s: could not register any net devices\n", pci_name(pdev)); goto out_release_adapter_res; } Loading
drivers/net/chelsio/espi.c +2 −2 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ static int tricn_write(adapter_t *adapter, int bundle_addr, int module_addr, } while (busy && --attempts); if (busy) CH_ERR("%s: TRICN write timed out\n", adapter->name); pr_err("%s: TRICN write timed out\n", adapter->name); return busy; } Loading @@ -86,7 +86,7 @@ static int tricn_init(adapter_t *adapter) int i, sme = 1; if (!(readl(adapter->regs + A_ESPI_RX_RESET) & F_RX_CLK_STATUS)) { CH_ERR("%s: ESPI clock not ready\n", adapter->name); pr_err("%s: ESPI clock not ready\n", adapter->name); return -1; } Loading
drivers/net/chelsio/pm3393.c +9 −7 Original line number Diff line number Diff line Loading @@ -251,7 +251,8 @@ static int pm3393_interrupt_handler(struct cmac *cmac) /* Read the master interrupt status register. */ pmread(cmac, SUNI1x10GEXP_REG_MASTER_INTERRUPT_STATUS, &master_intr_status); CH_DBG(cmac->adapter, INTR, "PM3393 intr cause 0x%x\n", if (netif_msg_intr(cmac->adapter)) dev_dbg(&cmac->adapter->pdev->dev, "PM3393 intr cause 0x%x\n", master_intr_status); /* TBD XXX Lets just clear everything for now */ Loading Loading @@ -776,11 +777,12 @@ static int pm3393_mac_reset(adapter_t * adapter) successful_reset = (is_pl4_reset_finished && !is_pl4_outof_lock && is_xaui_mabc_pll_locked); CH_DBG(adapter, HW, if (netif_msg_hw(adapter)) dev_dbg(&adapter->pdev->dev, "PM3393 HW reset %d: pl4_reset 0x%x, val 0x%x, " "is_pl4_outof_lock 0x%x, xaui_locked 0x%x\n", i, is_pl4_reset_finished, val, is_pl4_outof_lock, is_xaui_mabc_pll_locked); i, is_pl4_reset_finished, val, is_pl4_outof_lock, is_xaui_mabc_pll_locked); } return successful_reset ? 0 : 1; } Loading
drivers/net/chelsio/sge.c +5 −5 Original line number Diff line number Diff line Loading @@ -953,7 +953,7 @@ int t1_sge_intr_error_handler(struct sge *sge) sge->stats.respQ_empty++; if (cause & F_RESPQ_OVERFLOW) { sge->stats.respQ_overflow++; CH_ALERT("%s: SGE response queue overflow\n", pr_alert("%s: SGE response queue overflow\n", adapter->name); } if (cause & F_FL_EXHAUSTED) { Loading @@ -962,12 +962,12 @@ int t1_sge_intr_error_handler(struct sge *sge) } if (cause & F_PACKET_TOO_BIG) { sge->stats.pkt_too_big++; CH_ALERT("%s: SGE max packet size exceeded\n", pr_alert("%s: SGE max packet size exceeded\n", adapter->name); } if (cause & F_PACKET_MISMATCH) { sge->stats.pkt_mismatch++; CH_ALERT("%s: SGE packet mismatch\n", adapter->name); pr_alert("%s: SGE packet mismatch\n", adapter->name); } if (cause & SGE_INT_FATAL) t1_fatal_err(adapter); Loading Loading @@ -1101,7 +1101,7 @@ static void unexpected_offload(struct adapter *adapter, struct freelQ *fl) pci_dma_sync_single_for_cpu(adapter->pdev, pci_unmap_addr(ce, dma_addr), pci_unmap_len(ce, dma_len), PCI_DMA_FROMDEVICE); CH_ERR("%s: unexpected offload packet, cmd %u\n", pr_err("%s: unexpected offload packet, cmd %u\n", adapter->name, *skb->data); recycle_fl_buf(fl, fl->cidx); } Loading Loading @@ -1687,7 +1687,7 @@ static int t1_sge_tx(struct sk_buff *skb, struct adapter *adapter, netif_stop_queue(dev); set_bit(dev->if_port, &sge->stopped_tx_queues); sge->stats.cmdQ_full[2]++; CH_ERR("%s: Tx ring full while queue awake!\n", pr_err("%s: Tx ring full while queue awake!\n", adapter->name); } spin_unlock(&q->lock); Loading