diff options
Diffstat (limited to 'drivers/net/ethernet/cavium')
-rw-r--r-- | drivers/net/ethernet/cavium/common/cavium_ptp.c | 10 | ||||
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/cn68xx_device.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/lio_core.c | 92 | ||||
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/lio_main.c | 363 | ||||
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 158 | ||||
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/octeon_console.c | 12 | ||||
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/octeon_device.c | 13 | ||||
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 11 | ||||
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c | 5 | ||||
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/octeon_main.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 14 | ||||
-rw-r--r-- | drivers/net/ethernet/cavium/thunder/nicvf_main.c | 14 | ||||
-rw-r--r-- | drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/cavium/thunder/nicvf_queues.h | 2 |
15 files changed, 360 insertions, 342 deletions
diff --git a/drivers/net/ethernet/cavium/common/cavium_ptp.c b/drivers/net/ethernet/cavium/common/cavium_ptp.c index 81ff9ac73f9a..9fd717b9cf69 100644 --- a/drivers/net/ethernet/cavium/common/cavium_ptp.c +++ b/drivers/net/ethernet/cavium/common/cavium_ptp.c @@ -86,7 +86,7 @@ EXPORT_SYMBOL(cavium_ptp_put); /** * cavium_ptp_adjfine() - Adjust ptp frequency - * @ptp: PTP clock info + * @ptp_info: PTP clock info * @scaled_ppm: how much to adjust by, in parts per million, but with a * 16 bit binary fractional field */ @@ -134,7 +134,7 @@ static int cavium_ptp_adjfine(struct ptp_clock_info *ptp_info, long scaled_ppm) /** * cavium_ptp_adjtime() - Adjust ptp time - * @ptp: PTP clock info + * @ptp_info: PTP clock info * @delta: how much to adjust by, in nanosecs */ static int cavium_ptp_adjtime(struct ptp_clock_info *ptp_info, s64 delta) @@ -155,7 +155,7 @@ static int cavium_ptp_adjtime(struct ptp_clock_info *ptp_info, s64 delta) /** * cavium_ptp_gettime() - Get hardware clock time with adjustment - * @ptp: PTP clock info + * @ptp_info: PTP clock info * @ts: timespec */ static int cavium_ptp_gettime(struct ptp_clock_info *ptp_info, @@ -177,7 +177,7 @@ static int cavium_ptp_gettime(struct ptp_clock_info *ptp_info, /** * cavium_ptp_settime() - Set hardware clock time. Reset adjustment - * @ptp: PTP clock info + * @ptp_info: PTP clock info * @ts: timespec */ static int cavium_ptp_settime(struct ptp_clock_info *ptp_info, @@ -199,7 +199,7 @@ static int cavium_ptp_settime(struct ptp_clock_info *ptp_info, /** * cavium_ptp_enable() - Request to enable or disable an ancillary feature. - * @ptp: PTP clock info + * @ptp_info: PTP clock info * @rq: request * @on: is it on */ diff --git a/drivers/net/ethernet/cavium/liquidio/cn68xx_device.c b/drivers/net/ethernet/cavium/liquidio/cn68xx_device.c index 50b533ff58e6..2a6d1cadac9e 100644 --- a/drivers/net/ethernet/cavium/liquidio/cn68xx_device.c +++ b/drivers/net/ethernet/cavium/liquidio/cn68xx_device.c @@ -25,7 +25,9 @@ #include "octeon_main.h" #include "cn66xx_regs.h" #include "cn66xx_device.h" +#include "cn68xx_device.h" #include "cn68xx_regs.h" +#include "cn68xx_device.h" static void lio_cn68xx_set_dpi_regs(struct octeon_device *oct) { diff --git a/drivers/net/ethernet/cavium/liquidio/lio_core.c b/drivers/net/ethernet/cavium/liquidio/lio_core.c index e40c64b79f66..9ef172976b35 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_core.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_core.c @@ -32,8 +32,8 @@ #define OCTNIC_MAX_SG MAX_SKB_FRAGS /** - * \brief Delete gather lists - * @param lio per-network private data + * lio_delete_glists - Delete gather lists + * @lio: per-network private data */ void lio_delete_glists(struct lio *lio) { @@ -73,8 +73,10 @@ void lio_delete_glists(struct lio *lio) } /** - * \brief Setup gather lists - * @param lio per-network private data + * lio_setup_glists - Setup gather lists + * @oct: octeon_device + * @lio: per-network private data + * @num_iqs: count of iqs to allocate */ int lio_setup_glists(struct octeon_device *oct, struct lio *lio, int num_iqs) { @@ -521,12 +523,12 @@ static void lio_update_txq_status(struct octeon_device *oct, int iq_num) } /** - * \brief Setup output queue - * @param oct octeon device - * @param q_no which queue - * @param num_descs how many descriptors - * @param desc_size size of each descriptor - * @param app_ctx application context + * octeon_setup_droq - Setup output queue + * @oct: octeon device + * @q_no: which queue + * @num_descs: how many descriptors + * @desc_size: size of each descriptor + * @app_ctx: application context */ static int octeon_setup_droq(struct octeon_device *oct, int q_no, int num_descs, int desc_size, void *app_ctx) @@ -555,16 +557,17 @@ static int octeon_setup_droq(struct octeon_device *oct, int q_no, int num_descs, return ret_val; } -/** Routine to push packets arriving on Octeon interface upto network layer. - * @param oct_id - octeon device id. - * @param skbuff - skbuff struct to be passed to network layer. - * @param len - size of total data received. - * @param rh - Control header associated with the packet - * @param param - additional control data with the packet - * @param arg - farg registered in droq_ops +/** + * liquidio_push_packet - Routine to push packets arriving on Octeon interface upto network layer. + * @octeon_id:octeon device id. + * @skbuff: skbuff struct to be passed to network layer. + * @len: size of total data received. + * @rh: Control header associated with the packet + * @param: additional control data with the packet + * @arg: farg registered in droq_ops */ static void -liquidio_push_packet(u32 octeon_id __attribute__((unused)), +liquidio_push_packet(u32 __maybe_unused octeon_id, void *skbuff, u32 len, union octeon_rh *rh, @@ -698,8 +701,8 @@ liquidio_push_packet(u32 octeon_id __attribute__((unused)), } /** - * \brief wrapper for calling napi_schedule - * @param param parameters to pass to napi_schedule + * napi_schedule_wrapper - wrapper for calling napi_schedule + * @param: parameters to pass to napi_schedule * * Used when scheduling on different CPUs */ @@ -711,8 +714,8 @@ static void napi_schedule_wrapper(void *param) } /** - * \brief callback when receive interrupt occurs and we are in NAPI mode - * @param arg pointer to octeon output queue + * liquidio_napi_drv_callback - callback when receive interrupt occurs and we are in NAPI mode + * @arg: pointer to octeon output queue */ static void liquidio_napi_drv_callback(void *arg) { @@ -737,9 +740,9 @@ static void liquidio_napi_drv_callback(void *arg) } /** - * \brief Entry point for NAPI polling - * @param napi NAPI structure - * @param budget maximum number of items to process + * liquidio_napi_poll - Entry point for NAPI polling + * @napi: NAPI structure + * @budget: maximum number of items to process */ static int liquidio_napi_poll(struct napi_struct *napi, int budget) { @@ -792,9 +795,11 @@ static int liquidio_napi_poll(struct napi_struct *napi, int budget) } /** - * \brief Setup input and output queues - * @param octeon_dev octeon device - * @param ifidx Interface index + * liquidio_setup_io_queues - Setup input and output queues + * @octeon_dev: octeon device + * @ifidx: Interface index + * @num_iqs: input io queue count + * @num_oqs: output io queue count * * Note: Queues are with respect to the octeon device. Thus * an input queue is for egress packets, and output queues @@ -927,7 +932,7 @@ int liquidio_schedule_msix_droq_pkt_handler(struct octeon_droq *droq, u64 ret) } irqreturn_t -liquidio_msix_intr_handler(int irq __attribute__((unused)), void *dev) +liquidio_msix_intr_handler(int __maybe_unused irq, void *dev) { struct octeon_ioq_vector *ioq_vector = (struct octeon_ioq_vector *)dev; struct octeon_device *oct = ioq_vector->oct_dev; @@ -943,8 +948,8 @@ liquidio_msix_intr_handler(int irq __attribute__((unused)), void *dev) } /** - * \brief Droq packet processor sceduler - * @param oct octeon device + * liquidio_schedule_droq_pkt_handlers - Droq packet processor sceduler + * @oct: octeon device */ static void liquidio_schedule_droq_pkt_handlers(struct octeon_device *oct) { @@ -972,13 +977,12 @@ static void liquidio_schedule_droq_pkt_handlers(struct octeon_device *oct) } /** - * \brief Interrupt handler for octeon - * @param irq unused - * @param dev octeon device + * liquidio_legacy_intr_handler - Interrupt handler for octeon + * @irq: unused + * @dev: octeon device */ static -irqreturn_t liquidio_legacy_intr_handler(int irq __attribute__((unused)), - void *dev) +irqreturn_t liquidio_legacy_intr_handler(int __maybe_unused irq, void *dev) { struct octeon_device *oct = (struct octeon_device *)dev; irqreturn_t ret; @@ -999,8 +1003,9 @@ irqreturn_t liquidio_legacy_intr_handler(int irq __attribute__((unused)), } /** - * \brief Setup interrupt for octeon device - * @param oct octeon device + * octeon_setup_interrupt - Setup interrupt for octeon device + * @oct: octeon device + * @num_ioqs: number of queues * * Enable interrupt in Octeon device as given in the PCI interrupt mask. */ @@ -1083,7 +1088,7 @@ int octeon_setup_interrupt(struct octeon_device *oct, u32 num_ioqs) dev_dbg(&oct->pci_dev->dev, "OCTEON: Enough MSI-X interrupts are allocated...\n"); num_ioq_vectors = oct->num_msix_irqs; - /** For PF, there is one non-ioq interrupt handler */ + /* For PF, there is one non-ioq interrupt handler */ if (OCTEON_CN23XX_PF(oct)) { num_ioq_vectors -= 1; @@ -1126,13 +1131,13 @@ int octeon_setup_interrupt(struct octeon_device *oct, u32 num_ioqs) dev_err(&oct->pci_dev->dev, "Request_irq failed for MSIX interrupt Error: %d\n", irqret); - /** Freeing the non-ioq irq vector here . */ + /* Freeing the non-ioq irq vector here . */ free_irq(msix_entries[num_ioq_vectors].vector, oct); while (i) { i--; - /** clearing affinity mask. */ + /* clearing affinity mask. */ irq_set_affinity_hint( msix_entries[i].vector, NULL); @@ -1197,8 +1202,9 @@ int octeon_setup_interrupt(struct octeon_device *oct, u32 num_ioqs) } /** - * \brief Net device change_mtu - * @param netdev network device + * liquidio_change_mtu - Net device change_mtu + * @netdev: network device + * @new_mtu: the new max transmit unit size */ int liquidio_change_mtu(struct net_device *netdev, int new_mtu) { diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c index 8e0ed01e7f03..7d00d3a8ded4 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_main.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c @@ -69,9 +69,9 @@ MODULE_PARM_DESC(console_bitmask, "Bitmask indicating which consoles have debug output redirected to syslog."); /** - * \brief determines if a given console has debug enabled. - * @param console console to check - * @returns 1 = enabled. 0 otherwise + * octeon_console_debug_enabled - determines if a given console has debug enabled. + * @console: console to check + * Return: 1 = enabled. 0 otherwise */ static int octeon_console_debug_enabled(u32 console) { @@ -126,7 +126,7 @@ union tx_info { } s; }; -/** Octeon device properties to be used by the NIC module. +/* Octeon device properties to be used by the NIC module. * Each octeon device in the system will be represented * by this structure in the NIC module. */ @@ -161,13 +161,13 @@ static int liquidio_set_vf_link_state(struct net_device *netdev, int vfidx, static struct handshake handshake[MAX_OCTEON_DEVICES]; static struct completion first_stage; -static void octeon_droq_bh(unsigned long pdev) +static void octeon_droq_bh(struct tasklet_struct *t) { int q_no; int reschedule = 0; - struct octeon_device *oct = (struct octeon_device *)pdev; - struct octeon_device_priv *oct_priv = - (struct octeon_device_priv *)oct->priv; + struct octeon_device_priv *oct_priv = from_tasklet(oct_priv, t, + droq_tasklet); + struct octeon_device *oct = oct_priv->dev; for (q_no = 0; q_no < MAX_OCTEON_OUTPUT_QUEUES(oct); q_no++) { if (!(oct->io_qmask.oq & BIT_ULL(q_no))) @@ -222,8 +222,8 @@ static int lio_wait_for_oq_pkts(struct octeon_device *oct) } /** - * \brief Forces all IO queues off on a given device - * @param oct Pointer to Octeon device + * force_io_queues_off - Forces all IO queues off on a given device + * @oct: Pointer to Octeon device */ static void force_io_queues_off(struct octeon_device *oct) { @@ -238,8 +238,8 @@ static void force_io_queues_off(struct octeon_device *oct) } /** - * \brief Cause device to go quiet so it can be safely removed/reset/etc - * @param oct Pointer to Octeon device + * pcierror_quiesce_device - Cause device to go quiet so it can be safely removed/reset/etc + * @oct: Pointer to Octeon device */ static inline void pcierror_quiesce_device(struct octeon_device *oct) { @@ -283,8 +283,8 @@ static inline void pcierror_quiesce_device(struct octeon_device *oct) } /** - * \brief Cleanup PCI AER uncorrectable error status - * @param dev Pointer to PCI device + * cleanup_aer_uncorrect_error_status - Cleanup PCI AER uncorrectable error status + * @dev: Pointer to PCI device */ static void cleanup_aer_uncorrect_error_status(struct pci_dev *dev) { @@ -303,8 +303,8 @@ static void cleanup_aer_uncorrect_error_status(struct pci_dev *dev) } /** - * \brief Stop all PCI IO to a given device - * @param dev Pointer to Octeon device + * stop_pci_io - Stop all PCI IO to a given device + * @oct: Pointer to Octeon device */ static void stop_pci_io(struct octeon_device *oct) { @@ -332,9 +332,9 @@ static void stop_pci_io(struct octeon_device *oct) } /** - * \brief called when PCI error is detected - * @param pdev Pointer to PCI device - * @param state The current pci connection state + * liquidio_pcie_error_detected - called when PCI error is detected + * @pdev: Pointer to PCI device + * @state: The current pci connection state * * This function is called after a PCI bus error affecting * this device has been detected. @@ -362,11 +362,10 @@ static pci_ers_result_t liquidio_pcie_error_detected(struct pci_dev *pdev, } /** - * \brief mmio handler - * @param pdev Pointer to PCI device + * liquidio_pcie_mmio_enabled - mmio handler + * @pdev: Pointer to PCI device */ -static pci_ers_result_t liquidio_pcie_mmio_enabled( - struct pci_dev *pdev __attribute__((unused))) +static pci_ers_result_t liquidio_pcie_mmio_enabled(struct pci_dev __maybe_unused *pdev) { /* We should never hit this since we never ask for a reset for a Fatal * Error. We always return DISCONNECT in io_error above. @@ -376,14 +375,13 @@ static pci_ers_result_t liquidio_pcie_mmio_enabled( } /** - * \brief called after the pci bus has been reset. - * @param pdev Pointer to PCI device + * liquidio_pcie_slot_reset - called after the pci bus has been reset. + * @pdev: Pointer to PCI device * * Restart the card from scratch, as if from a cold-boot. Implementation * resembles the first-half of the octeon_resume routine. */ -static pci_ers_result_t liquidio_pcie_slot_reset( - struct pci_dev *pdev __attribute__((unused))) +static pci_ers_result_t liquidio_pcie_slot_reset(struct pci_dev __maybe_unused *pdev) { /* We should never hit this since we never ask for a reset for a Fatal * Error. We always return DISCONNECT in io_error above. @@ -393,14 +391,14 @@ static pci_ers_result_t liquidio_pcie_slot_reset( } /** - * \brief called when traffic can start flowing again. - * @param pdev Pointer to PCI device + * liquidio_pcie_resume - called when traffic can start flowing again. + * @pdev: Pointer to PCI device * * This callback is called when the error recovery driver tells us that * its OK to resume normal operation. Implementation resembles the * second-half of the octeon_resume routine. */ -static void liquidio_pcie_resume(struct pci_dev *pdev __attribute__((unused))) +static void liquidio_pcie_resume(struct pci_dev __maybe_unused *pdev) { /* Nothing to be done here. */ } @@ -447,7 +445,7 @@ static struct pci_driver liquidio_pci_driver = { }; /** - * \brief register PCI driver + * liquidio_init_pci - register PCI driver */ static int liquidio_init_pci(void) { @@ -455,7 +453,7 @@ static int liquidio_init_pci(void) } /** - * \brief unregister PCI driver + * liquidio_deinit_pci - unregister PCI driver */ static void liquidio_deinit_pci(void) { @@ -463,9 +461,9 @@ static void liquidio_deinit_pci(void) } /** - * \brief Check Tx queue status, and take appropriate action - * @param lio per-network private data - * @returns 0 if full, number of queues woken up otherwise + * check_txq_status - Check Tx queue status, and take appropriate action + * @lio: per-network private data + * Return: 0 if full, number of queues woken up otherwise */ static inline int check_txq_status(struct lio *lio) { @@ -491,8 +489,8 @@ static inline int check_txq_status(struct lio *lio) } /** - * \brief Print link information - * @param netdev network device + * print_link_info - Print link information + * @netdev: network device */ static void print_link_info(struct net_device *netdev) { @@ -513,8 +511,8 @@ static void print_link_info(struct net_device *netdev) } /** - * \brief Routine to notify MTU change - * @param work work_struct data structure + * octnet_link_status_change - Routine to notify MTU change + * @work: work_struct data structure */ static void octnet_link_status_change(struct work_struct *work) { @@ -531,8 +529,8 @@ static void octnet_link_status_change(struct work_struct *work) } /** - * \brief Sets up the mtu status change work - * @param netdev network device + * setup_link_status_change_wq - Sets up the mtu status change work + * @netdev: network device */ static inline int setup_link_status_change_wq(struct net_device *netdev) { @@ -563,9 +561,9 @@ static inline void cleanup_link_status_change_wq(struct net_device *netdev) } /** - * \brief Update link status - * @param netdev network device - * @param ls link status structure + * update_link_status - Update link status + * @netdev: network device + * @ls: link status structure * * Called on receipt of a link status response from the core application to * update each interface's link status. @@ -663,10 +661,9 @@ static void lio_sync_octeon_time(struct work_struct *work) } /** - * setup_sync_octeon_time_wq - Sets up the work to periodically update - * local time to octeon firmware + * setup_sync_octeon_time_wq - prepare work to periodically update local time to octeon firmware * - * @netdev - network device which should send time update to firmware + * @netdev: network device which should send time update to firmware **/ static inline int setup_sync_octeon_time_wq(struct net_device *netdev) { @@ -690,10 +687,12 @@ static inline int setup_sync_octeon_time_wq(struct net_device *netdev) } /** - * cleanup_sync_octeon_time_wq - stop scheduling and destroy the work created - * to periodically update local time to octeon firmware + * cleanup_sync_octeon_time_wq - destroy wq * - * @netdev - network device which should send time update to firmware + * @netdev: network device which should send time update to firmware + * + * Stop scheduling and destroy the work created to periodically update local + * time to octeon firmware. **/ static inline void cleanup_sync_octeon_time_wq(struct net_device *netdev) { @@ -828,13 +827,12 @@ static int liquidio_watchdog(void *param) } /** - * \brief PCI probe handler - * @param pdev PCI device structure - * @param ent unused + * liquidio_probe - PCI probe handler + * @pdev: PCI device structure + * @ent: unused */ static int -liquidio_probe(struct pci_dev *pdev, - const struct pci_device_id *ent __attribute__((unused))) +liquidio_probe(struct pci_dev *pdev, const struct pci_device_id __maybe_unused *ent) { struct octeon_device *oct_dev = NULL; struct handshake *hs; @@ -924,8 +922,8 @@ static bool fw_type_is_auto(void) } /** - * \brief PCI FLR for each Octeon device. - * @param oct octeon device + * octeon_pci_flr - PCI FLR for each Octeon device. + * @oct: octeon device */ static void octeon_pci_flr(struct octeon_device *oct) { @@ -951,9 +949,8 @@ static void octeon_pci_flr(struct octeon_device *oct) } /** - *\brief Destroy resources associated with octeon device - * @param pdev PCI device structure - * @param ent unused + * octeon_destroy_resources - Destroy resources associated with octeon device + * @oct: octeon device */ static void octeon_destroy_resources(struct octeon_device *oct) { @@ -1152,9 +1149,9 @@ static void octeon_destroy_resources(struct octeon_device *oct) } /** - * \brief Send Rx control command - * @param lio per-network private data - * @param start_stop whether to start or stop + * send_rx_ctrl_cmd - Send Rx control command + * @lio: per-network private data + * @start_stop: whether to start or stop */ static void send_rx_ctrl_cmd(struct lio *lio, int start_stop) { @@ -1210,9 +1207,9 @@ static void send_rx_ctrl_cmd(struct lio *lio, int start_stop) } /** - * \brief Destroy NIC device interface - * @param oct octeon device - * @param ifidx which interface to destroy + * liquidio_destroy_nic_device - Destroy NIC device interface + * @oct: octeon device + * @ifidx: which interface to destroy * * Cleanup associated with each interface for an Octeon device when NIC * module is being unloaded or if initialization fails during load. @@ -1272,8 +1269,8 @@ static void liquidio_destroy_nic_device(struct octeon_device *oct, int ifidx) } /** - * \brief Stop complete NIC functionality - * @param oct octeon device + * liquidio_stop_nic_module - Stop complete NIC functionality + * @oct: octeon device */ static int liquidio_stop_nic_module(struct octeon_device *oct) { @@ -1313,8 +1310,8 @@ static int liquidio_stop_nic_module(struct octeon_device *oct) } /** - * \brief Cleans up resources at unload time - * @param pdev PCI device structure + * liquidio_remove - Cleans up resources at unload time + * @pdev: PCI device structure */ static void liquidio_remove(struct pci_dev *pdev) { @@ -1346,8 +1343,8 @@ static void liquidio_remove(struct pci_dev *pdev) } /** - * \brief Identify the Octeon device and to map the BAR address space - * @param oct octeon device + * octeon_chip_specific_setup - Identify the Octeon device and to map the BAR address space + * @oct: octeon device */ static int octeon_chip_specific_setup(struct octeon_device *oct) { @@ -1390,8 +1387,8 @@ static int octeon_chip_specific_setup(struct octeon_device *oct) } /** - * \brief PCI initialization for each Octeon device. - * @param oct octeon device + * octeon_pci_os_setup - PCI initialization for each Octeon device. + * @oct: octeon device */ static int octeon_pci_os_setup(struct octeon_device *oct) { @@ -1414,8 +1411,8 @@ static int octeon_pci_os_setup(struct octeon_device *oct) } /** - * \brief Unmap and free network buffer - * @param buf buffer + * free_netbuf - Unmap and free network buffer + * @buf: buffer */ static void free_netbuf(void *buf) { @@ -1434,8 +1431,8 @@ static void free_netbuf(void *buf) } /** - * \brief Unmap and free gather buffer - * @param buf buffer + * free_netsgbuf - Unmap and free gather buffer + * @buf: buffer */ static void free_netsgbuf(void *buf) { @@ -1474,8 +1471,8 @@ static void free_netsgbuf(void *buf) } /** - * \brief Unmap and free gather buffer with response - * @param buf buffer + * free_netsgbuf_with_resp - Unmap and free gather buffer with response + * @buf: buffer */ static void free_netsgbuf_with_resp(void *buf) { @@ -1518,9 +1515,9 @@ static void free_netsgbuf_with_resp(void *buf) } /** - * \brief Adjust ptp frequency - * @param ptp PTP clock info - * @param ppb how much to adjust by, in parts-per-billion + * liquidio_ptp_adjfreq - Adjust ptp frequency + * @ptp: PTP clock info + * @ppb: how much to adjust by, in parts-per-billion */ static int liquidio_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) { @@ -1555,9 +1552,9 @@ static int liquidio_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) } /** - * \brief Adjust ptp time - * @param ptp PTP clock info - * @param delta how much to adjust by, in nanosecs + * liquidio_ptp_adjtime - Adjust ptp time + * @ptp: PTP clock info + * @delta: how much to adjust by, in nanosecs */ static int liquidio_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) { @@ -1572,9 +1569,9 @@ static int liquidio_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) } /** - * \brief Get hardware clock time, including any adjustment - * @param ptp PTP clock info - * @param ts timespec + * liquidio_ptp_gettime - Get hardware clock time, including any adjustment + * @ptp: PTP clock info + * @ts: timespec */ static int liquidio_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) @@ -1595,9 +1592,9 @@ static int liquidio_ptp_gettime(struct ptp_clock_info *ptp, } /** - * \brief Set hardware clock time. Reset adjustment - * @param ptp PTP clock info - * @param ts timespec + * liquidio_ptp_settime - Set hardware clock time. Reset adjustment + * @ptp: PTP clock info + * @ts: timespec */ static int liquidio_ptp_settime(struct ptp_clock_info *ptp, const struct timespec64 *ts) @@ -1618,22 +1615,22 @@ static int liquidio_ptp_settime(struct ptp_clock_info *ptp, } /** - * \brief Check if PTP is enabled - * @param ptp PTP clock info - * @param rq request - * @param on is it on + * liquidio_ptp_enable - Check if PTP is enabled + * @ptp: PTP clock info + * @rq: request + * @on: is it on */ static int -liquidio_ptp_enable(struct ptp_clock_info *ptp __attribute__((unused)), - struct ptp_clock_request *rq __attribute__((unused)), - int on __attribute__((unused))) +liquidio_ptp_enable(struct ptp_clock_info __maybe_unused *ptp, + struct ptp_clock_request __maybe_unused *rq, + int __maybe_unused on) { return -EOPNOTSUPP; } /** - * \brief Open PTP clock source - * @param netdev network device + * oct_ptp_open - Open PTP clock source + * @netdev: network device */ static void oct_ptp_open(struct net_device *netdev) { @@ -1665,8 +1662,8 @@ static void oct_ptp_open(struct net_device *netdev) } /** - * \brief Init PTP clock - * @param oct octeon device + * liquidio_ptp_init - Init PTP clock + * @oct: octeon device */ static void liquidio_ptp_init(struct octeon_device *oct) { @@ -1682,8 +1679,8 @@ static void liquidio_ptp_init(struct octeon_device *oct) } /** - * \brief Load firmware to device - * @param oct octeon device + * load_firmware - Load firmware to device + * @oct: octeon device * * Maps device to firmware filename, requests firmware, and downloads it */ @@ -1721,8 +1718,8 @@ static int load_firmware(struct octeon_device *oct) } /** - * \brief Poll routine for checking transmit queue status - * @param work work_struct data structure + * octnet_poll_check_txq_status - Poll routine for checking transmit queue status + * @work: work_struct data structure */ static void octnet_poll_check_txq_status(struct work_struct *work) { @@ -1738,8 +1735,8 @@ static void octnet_poll_check_txq_status(struct work_struct *work) } /** - * \brief Sets up the txq poll check - * @param netdev network device + * setup_tx_poll_fn - Sets up the txq poll check + * @netdev: network device */ static inline int setup_tx_poll_fn(struct net_device *netdev) { @@ -1771,8 +1768,8 @@ static inline void cleanup_tx_poll_fn(struct net_device *netdev) } /** - * \brief Net device open for LiquidIO - * @param netdev network device + * liquidio_open - Net device open for LiquidIO + * @netdev: network device */ static int liquidio_open(struct net_device *netdev) { @@ -1831,8 +1828,8 @@ static int liquidio_open(struct net_device *netdev) } /** - * \brief Net device stop for LiquidIO - * @param netdev network device + * liquidio_stop - Net device stop for LiquidIO + * @netdev: network device */ static int liquidio_stop(struct net_device *netdev) { @@ -1896,8 +1893,8 @@ static int liquidio_stop(struct net_device *netdev) } /** - * \brief Converts a mask based on net device flags - * @param netdev network device + * get_new_flags - Converts a mask based on net device flags + * @netdev: network device * * This routine generates a octnet_ifflags mask from the net device flags * received from the OS. @@ -1929,8 +1926,8 @@ static inline enum octnet_ifflags get_new_flags(struct net_device *netdev) } /** - * \brief Net device set_multicast_list - * @param netdev network device + * liquidio_set_mcast_list - Net device set_multicast_list + * @netdev: network device */ static void liquidio_set_mcast_list(struct net_device *netdev) { @@ -1977,8 +1974,9 @@ static void liquidio_set_mcast_list(struct net_device *netdev) } /** - * \brief Net device set_mac_address - * @param netdev network device + * liquidio_set_mac - Net device set_mac_address + * @netdev: network device + * @p: pointer to sockaddr */ static int liquidio_set_mac(struct net_device *netdev, void *p) { @@ -2096,10 +2094,9 @@ liquidio_get_stats64(struct net_device *netdev, } /** - * \brief Handler for SIOCSHWTSTAMP ioctl - * @param netdev network device - * @param ifr interface request - * @param cmd command + * hwtstamp_ioctl - Handler for SIOCSHWTSTAMP ioctl + * @netdev: network device + * @ifr: interface request */ static int hwtstamp_ioctl(struct net_device *netdev, struct ifreq *ifr) { @@ -2154,10 +2151,10 @@ static int hwtstamp_ioctl(struct net_device *netdev, struct ifreq *ifr) } /** - * \brief ioctl handler - * @param netdev network device - * @param ifr interface request - * @param cmd command + * liquidio_ioctl - ioctl handler + * @netdev: network device + * @ifr: interface request + * @cmd: command */ static int liquidio_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) { @@ -2174,9 +2171,10 @@ static int liquidio_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) } /** - * \brief handle a Tx timestamp response - * @param status response status - * @param buf pointer to skb + * handle_timestamp - handle a Tx timestamp response + * @oct: octeon device + * @status: response status + * @buf: pointer to skb */ static void handle_timestamp(struct octeon_device *oct, u32 status, @@ -2217,10 +2215,12 @@ static void handle_timestamp(struct octeon_device *oct, tx_buffer_free(skb); } -/* \brief Send a data packet that will be timestamped - * @param oct octeon device - * @param ndata pointer to network data - * @param finfo pointer to private network data +/** + * send_nic_timestamp_pkt - Send a data packet that will be timestamped + * @oct: octeon device + * @ndata: pointer to network data + * @finfo: pointer to private network data + * @xmit_more: more is coming */ static inline int send_nic_timestamp_pkt(struct octeon_device *oct, struct octnic_data_pkt *ndata, @@ -2276,10 +2276,12 @@ static inline int send_nic_timestamp_pkt(struct octeon_device *oct, return retval; } -/** \brief Transmit networks packets to the Octeon interface - * @param skbuff skbuff struct to be passed to network layer. - * @param netdev pointer to network device - * @returns whether the packet was transmitted to the device okay or not +/** + * liquidio_xmit - Transmit networks packets to the Octeon interface + * @skb: skbuff struct to be passed to network layer. + * @netdev: pointer to network device + * + * Return: whether the packet was transmitted to the device okay or not * (NETDEV_TX_OK or NETDEV_TX_BUSY) */ static netdev_tx_t liquidio_xmit(struct sk_buff *skb, struct net_device *netdev) @@ -2524,8 +2526,10 @@ lio_xmit_failed: return NETDEV_TX_OK; } -/** \brief Network device Tx timeout - * @param netdev pointer to network device +/** + * liquidio_tx_timeout - Network device Tx timeout + * @netdev: pointer to network device + * @txqueue: index of the hung transmit queue */ static void liquidio_tx_timeout(struct net_device *netdev, unsigned int txqueue) { @@ -2597,12 +2601,12 @@ static int liquidio_vlan_rx_kill_vid(struct net_device *netdev, return ret; } -/** Sending command to enable/disable RX checksum offload - * @param netdev pointer to network device - * @param command OCTNET_CMD_TNL_RX_CSUM_CTL - * @param rx_cmd_bit OCTNET_CMD_RXCSUM_ENABLE/ - * OCTNET_CMD_RXCSUM_DISABLE - * @returns SUCCESS or FAILURE +/** + * liquidio_set_rxcsum_command - Sending command to enable/disable RX checksum offload + * @netdev: pointer to network device + * @command: OCTNET_CMD_TNL_RX_CSUM_CTL + * @rx_cmd: OCTNET_CMD_RXCSUM_ENABLE/OCTNET_CMD_RXCSUM_DISABLE + * Returns: SUCCESS or FAILURE */ static int liquidio_set_rxcsum_command(struct net_device *netdev, int command, u8 rx_cmd) @@ -2632,13 +2636,14 @@ static int liquidio_set_rxcsum_command(struct net_device *netdev, int command, return ret; } -/** Sending command to add/delete VxLAN UDP port to firmware - * @param netdev pointer to network device - * @param command OCTNET_CMD_VXLAN_PORT_CONFIG - * @param vxlan_port VxLAN port to be added or deleted - * @param vxlan_cmd_bit OCTNET_CMD_VXLAN_PORT_ADD, +/** + * liquidio_vxlan_port_command - Sending command to add/delete VxLAN UDP port to firmware + * @netdev: pointer to network device + * @command: OCTNET_CMD_VXLAN_PORT_CONFIG + * @vxlan_port: VxLAN port to be added or deleted + * @vxlan_cmd_bit: OCTNET_CMD_VXLAN_PORT_ADD, * OCTNET_CMD_VXLAN_PORT_DEL - * @returns SUCCESS or FAILURE + * Return: SUCCESS or FAILURE */ static int liquidio_vxlan_port_command(struct net_device *netdev, int command, u16 vxlan_port, u8 vxlan_cmd_bit) @@ -2698,10 +2703,11 @@ static const struct udp_tunnel_nic_info liquidio_udp_tunnels = { }, }; -/** \brief Net device fix features - * @param netdev pointer to network device - * @param request features requested - * @returns updated features list +/** + * liquidio_fix_features - Net device fix features + * @netdev: pointer to network device + * @request: features requested + * Return: updated features list */ static netdev_features_t liquidio_fix_features(struct net_device *netdev, netdev_features_t request) @@ -2737,9 +2743,10 @@ static netdev_features_t liquidio_fix_features(struct net_device *netdev, return request; } -/** \brief Net device set features - * @param netdev pointer to network device - * @param features features to enable/disable +/** + * liquidio_set_features - Net device set features + * @netdev: pointer to network device + * @features: features to enable/disable */ static int liquidio_set_features(struct net_device *netdev, netdev_features_t features) @@ -3224,7 +3231,8 @@ static const struct net_device_ops lionetdevops = { .ndo_get_port_parent_id = liquidio_get_port_parent_id, }; -/** \brief Entry point for the liquidio module +/** + * liquidio_init - Entry point for the liquidio module */ static int __init liquidio_init(void) { @@ -3307,8 +3315,8 @@ nic_info_err: } /** - * \brief Setup network interfaces - * @param octeon_dev octeon device + * setup_nic_devices - Setup network interfaces + * @octeon_dev: octeon device * * Called during init time for each device. It assumes the NIC * is already up and running. The link information for each @@ -3872,8 +3880,8 @@ static int liquidio_enable_sriov(struct pci_dev *dev, int num_vfs) #endif /** - * \brief initialize the NIC - * @param oct octeon device + * liquidio_init_nic_module - initialize the NIC + * @oct: octeon device * * This initialization routine is called once the Octeon device application is * up and running @@ -3928,9 +3936,10 @@ octnet_init_failure: } /** - * \brief starter callback that invokes the remaining initialization work after - * the NIC is up and running. - * @param octptr work struct work_struct + * nic_starter - finish init + * @work: work struct work_struct + * + * starter callback that invokes the remaining initialization work after the NIC is up and running. */ static void nic_starter(struct work_struct *work) { @@ -4023,8 +4032,8 @@ octeon_recv_vf_drv_notice(struct octeon_recv_info *recv_info, void *buf) } /** - * \brief Device initialization for each Octeon device that is probed - * @param octeon_dev octeon device + * octeon_device_init - Device initialization for each Octeon device that is probed + * @octeon_dev: octeon device */ static int octeon_device_init(struct octeon_device *octeon_dev) { @@ -4193,8 +4202,7 @@ static int octeon_device_init(struct octeon_device *octeon_dev) /* Initialize the tasklet that handles output queue packet processing.*/ dev_dbg(&octeon_dev->pci_dev->dev, "Initializing droq tasklet\n"); - tasklet_init(&oct_priv->droq_tasklet, octeon_droq_bh, - (unsigned long)octeon_dev); + tasklet_setup(&oct_priv->droq_tasklet, octeon_droq_bh); /* Setup the interrupt handler and record the INT SUM register address */ @@ -4298,16 +4306,17 @@ static int octeon_device_init(struct octeon_device *octeon_dev) complete(&handshake[octeon_dev->octeon_id].init); atomic_set(&octeon_dev->status, OCT_DEV_HOST_OK); + oct_priv->dev = octeon_dev; return 0; } /** - * \brief Debug console print function - * @param octeon_dev octeon device - * @param console_num console number - * @param prefix first portion of line to display - * @param suffix second portion of line to display + * octeon_dbg_console_print - Debug console print function + * @oct: octeon device + * @console_num: console number + * @prefix: first portion of line to display + * @suffix: second portion of line to display * * The OCTEON debug console outputs entire lines (excluding '\n'). * Normally, the line will be passed in the 'prefix' parameter. @@ -4330,7 +4339,7 @@ static int octeon_dbg_console_print(struct octeon_device *oct, u32 console_num, } /** - * \brief Exits the module + * liquidio_exit - Exits the module */ static void __exit liquidio_exit(void) { diff --git a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c index 8c5879e31240..103440f97bc8 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c @@ -99,8 +99,8 @@ static int lio_wait_for_oq_pkts(struct octeon_device *oct) } /** - * \brief Cause device to go quiet so it can be safely removed/reset/etc - * @param oct Pointer to Octeon device + * pcierror_quiesce_device - Cause device to go quiet so it can be safely removed/reset/etc + * @oct: Pointer to Octeon device */ static void pcierror_quiesce_device(struct octeon_device *oct) { @@ -143,8 +143,8 @@ static void pcierror_quiesce_device(struct octeon_device *oct) } /** - * \brief Cleanup PCI AER uncorrectable error status - * @param dev Pointer to PCI device + * cleanup_aer_uncorrect_error_status - Cleanup PCI AER uncorrectable error status + * @dev: Pointer to PCI device */ static void cleanup_aer_uncorrect_error_status(struct pci_dev *dev) { @@ -163,8 +163,8 @@ static void cleanup_aer_uncorrect_error_status(struct pci_dev *dev) } /** - * \brief Stop all PCI IO to a given device - * @param dev Pointer to Octeon device + * stop_pci_io - Stop all PCI IO to a given device + * @oct: Pointer to Octeon device */ static void stop_pci_io(struct octeon_device *oct) { @@ -205,9 +205,9 @@ static void stop_pci_io(struct octeon_device *oct) } /** - * \brief called when PCI error is detected - * @param pdev Pointer to PCI device - * @param state The current pci connection state + * liquidio_pcie_error_detected - called when PCI error is detected + * @pdev: Pointer to PCI device + * @state: The current pci connection state * * This function is called after a PCI bus error affecting * this device has been detected. @@ -256,8 +256,8 @@ static struct pci_driver liquidio_vf_pci_driver = { }; /** - * \brief Print link information - * @param netdev network device + * print_link_info - Print link information + * @netdev: network device */ static void print_link_info(struct net_device *netdev) { @@ -278,8 +278,8 @@ static void print_link_info(struct net_device *netdev) } /** - * \brief Routine to notify MTU change - * @param work work_struct data structure + * octnet_link_status_change - Routine to notify MTU change + * @work: work_struct data structure */ static void octnet_link_status_change(struct work_struct *work) { @@ -296,8 +296,8 @@ static void octnet_link_status_change(struct work_struct *work) } /** - * \brief Sets up the mtu status change work - * @param netdev network device + * setup_link_status_change_wq - Sets up the mtu status change work + * @netdev: network device */ static int setup_link_status_change_wq(struct net_device *netdev) { @@ -328,9 +328,9 @@ static void cleanup_link_status_change_wq(struct net_device *netdev) } /** - * \brief Update link status - * @param netdev network device - * @param ls link status structure + * update_link_status - Update link status + * @netdev: network device + * @ls: link status structure * * Called on receipt of a link status response from the core application to * update each interface's link status. @@ -374,13 +374,13 @@ static void update_link_status(struct net_device *netdev, } /** - * \brief PCI probe handler - * @param pdev PCI device structure - * @param ent unused + * liquidio_vf_probe - PCI probe handler + * @pdev: PCI device structure + * @ent: unused */ static int liquidio_vf_probe(struct pci_dev *pdev, - const struct pci_device_id *ent __attribute__((unused))) + const struct pci_device_id __maybe_unused *ent) { struct octeon_device *oct_dev = NULL; @@ -416,8 +416,8 @@ liquidio_vf_probe(struct pci_dev *pdev, } /** - * \brief PCI FLR for each Octeon device. - * @param oct octeon device + * octeon_pci_flr - PCI FLR for each Octeon device. + * @oct: octeon device */ static void octeon_pci_flr(struct octeon_device *oct) { @@ -437,9 +437,8 @@ static void octeon_pci_flr(struct octeon_device *oct) } /** - *\brief Destroy resources associated with octeon device - * @param pdev PCI device structure - * @param ent unused + * octeon_destroy_resources - Destroy resources associated with octeon device + * @oct: octeon device */ static void octeon_destroy_resources(struct octeon_device *oct) { @@ -592,9 +591,9 @@ static void octeon_destroy_resources(struct octeon_device *oct) } /** - * \brief Send Rx control command - * @param lio per-network private data - * @param start_stop whether to start or stop + * send_rx_ctrl_cmd - Send Rx control command + * @lio: per-network private data + * @start_stop: whether to start or stop */ static void send_rx_ctrl_cmd(struct lio *lio, int start_stop) { @@ -644,9 +643,9 @@ static void send_rx_ctrl_cmd(struct lio *lio, int start_stop) } /** - * \brief Destroy NIC device interface - * @param oct octeon device - * @param ifidx which interface to destroy + * liquidio_destroy_nic_device - Destroy NIC device interface + * @oct: octeon device + * @ifidx: which interface to destroy * * Cleanup associated with each interface for an Octeon device when NIC * module is being unloaded or if initialization fails during load. @@ -704,8 +703,8 @@ static void liquidio_destroy_nic_device(struct octeon_device *oct, int ifidx) } /** - * \brief Stop complete NIC functionality - * @param oct octeon device + * liquidio_stop_nic_module - Stop complete NIC functionality + * @oct: octeon device */ static int liquidio_stop_nic_module(struct octeon_device *oct) { @@ -737,8 +736,8 @@ static int liquidio_stop_nic_module(struct octeon_device *oct) } /** - * \brief Cleans up resources at unload time - * @param pdev PCI device structure + * liquidio_vf_remove - Cleans up resources at unload time + * @pdev: PCI device structure */ static void liquidio_vf_remove(struct pci_dev *pdev) { @@ -763,8 +762,8 @@ static void liquidio_vf_remove(struct pci_dev *pdev) } /** - * \brief PCI initialization for each Octeon device. - * @param oct octeon device + * octeon_pci_os_setup - PCI initialization for each Octeon device. + * @oct: octeon device */ static int octeon_pci_os_setup(struct octeon_device *oct) { @@ -792,8 +791,8 @@ static int octeon_pci_os_setup(struct octeon_device *oct) } /** - * \brief Unmap and free network buffer - * @param buf buffer + * free_netbuf - Unmap and free network buffer + * @buf: buffer */ static void free_netbuf(void *buf) { @@ -812,8 +811,8 @@ static void free_netbuf(void *buf) } /** - * \brief Unmap and free gather buffer - * @param buf buffer + * free_netsgbuf - Unmap and free gather buffer + * @buf: buffer */ static void free_netsgbuf(void *buf) { @@ -853,8 +852,8 @@ static void free_netsgbuf(void *buf) } /** - * \brief Unmap and free gather buffer with response - * @param buf buffer + * free_netsgbuf_with_resp - Unmap and free gather buffer with response + * @buf: buffer */ static void free_netsgbuf_with_resp(void *buf) { @@ -897,8 +896,8 @@ static void free_netsgbuf_with_resp(void *buf) } /** - * \brief Net device open for LiquidIO - * @param netdev network device + * liquidio_open - Net device open for LiquidIO + * @netdev: network device */ static int liquidio_open(struct net_device *netdev) { @@ -941,8 +940,8 @@ static int liquidio_open(struct net_device *netdev) } /** - * \brief Net device stop for LiquidIO - * @param netdev network device + * liquidio_stop - jNet device stop for LiquidIO + * @netdev: network device */ static int liquidio_stop(struct net_device *netdev) { @@ -991,8 +990,8 @@ static int liquidio_stop(struct net_device *netdev) } /** - * \brief Converts a mask based on net device flags - * @param netdev network device + * get_new_flags - Converts a mask based on net device flags + * @netdev: network device * * This routine generates a octnet_ifflags mask from the net device flags * received from the OS. @@ -1060,8 +1059,8 @@ static void liquidio_set_uc_list(struct net_device *netdev) } /** - * \brief Net device set_multicast_list - * @param netdev network device + * liquidio_set_mcast_list - Net device set_multicast_list + * @netdev: network device */ static void liquidio_set_mcast_list(struct net_device *netdev) { @@ -1110,8 +1109,9 @@ static void liquidio_set_mcast_list(struct net_device *netdev) } /** - * \brief Net device set_mac_address - * @param netdev network device + * liquidio_set_mac - Net device set_mac_address + * @netdev: network device + * @p: opaque pointer to sockaddr */ static int liquidio_set_mac(struct net_device *netdev, void *p) { @@ -1229,10 +1229,9 @@ liquidio_get_stats64(struct net_device *netdev, } /** - * \brief Handler for SIOCSHWTSTAMP ioctl - * @param netdev network device - * @param ifr interface request - * @param cmd command + * hwtstamp_ioctl - Handler for SIOCSHWTSTAMP ioctl + * @netdev: network device + * @ifr: interface request */ static int hwtstamp_ioctl(struct net_device *netdev, struct ifreq *ifr) { @@ -1287,10 +1286,10 @@ static int hwtstamp_ioctl(struct net_device *netdev, struct ifreq *ifr) } /** - * \brief ioctl handler - * @param netdev network device - * @param ifr interface request - * @param cmd command + * liquidio_ioctl - ioctl handler + * @netdev: network device + * @ifr: interface request + * @cmd: command */ static int liquidio_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) { @@ -1339,10 +1338,10 @@ static void handle_timestamp(struct octeon_device *oct, u32 status, void *buf) tx_buffer_free(skb); } -/* \brief Send a data packet that will be timestamped - * @param oct octeon device - * @param ndata pointer to network data - * @param finfo pointer to private network data +/* send_nic_timestamp_pkt - Send a data packet that will be timestamped + * @oct: octeon device + * @ndata: pointer to network data + * @finfo: pointer to private network data */ static int send_nic_timestamp_pkt(struct octeon_device *oct, struct octnic_data_pkt *ndata, @@ -1393,9 +1392,10 @@ static int send_nic_timestamp_pkt(struct octeon_device *oct, return retval; } -/** \brief Transmit networks packets to the Octeon interface - * @param skbuff skbuff struct to be passed to network layer. - * @param netdev pointer to network device +/** + * liquidio_xmit - Transmit networks packets to the Octeon interface + * @skb: skbuff struct to be passed to network layer. + * @netdev: pointer to network device * @returns whether the packet was transmitted to the device okay or not * (NETDEV_TX_OK or NETDEV_TX_BUSY) */ @@ -1623,8 +1623,10 @@ lio_xmit_failed: return NETDEV_TX_OK; } -/** \brief Network device Tx timeout - * @param netdev pointer to network device +/** + * liquidio_tx_timeout - Network device Tx timeout + * @netdev: pointer to network device + * @txqueue: index of the hung transmit queue */ static void liquidio_tx_timeout(struct net_device *netdev, unsigned int txqueue) { @@ -1917,8 +1919,8 @@ nic_info_err: } /** - * \brief Setup network interfaces - * @param octeon_dev octeon device + * setup_nic_devices - Setup network interfaces + * @octeon_dev: octeon device * * Called during init time for each device. It assumes the NIC * is already up and running. The link information for each @@ -2229,8 +2231,8 @@ setup_nic_dev_done: } /** - * \brief initialize the NIC - * @param oct octeon device + * liquidio_init_nic_module - initialize the NIC + * @oct: octeon device * * This initialization routine is called once the Octeon device application is * up and running @@ -2270,8 +2272,8 @@ octnet_init_failure: } /** - * \brief Device initialization for each Octeon device that is probed - * @param octeon_dev octeon device + * octeon_device_init - Device initialization for each Octeon device that is probed + * @oct: octeon device */ static int octeon_device_init(struct octeon_device *oct) { diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_console.c b/drivers/net/ethernet/cavium/liquidio/octeon_console.c index 0d2831d10f65..28feabec8fbb 100644 --- a/drivers/net/ethernet/cavium/liquidio/octeon_console.c +++ b/drivers/net/ethernet/cavium/liquidio/octeon_console.c @@ -15,7 +15,7 @@ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or * NONINFRINGEMENT. See the GNU General Public License for more details. ***********************************************************************/ -/** +/* * @file octeon_console.c */ #include <linux/moduleparam.h> @@ -131,7 +131,7 @@ struct octeon_pci_console_desc { /* Implicit storage for console_addr_array */ }; -/** +/* * This function is the implementation of the get macros defined * for individual structure members. The argument are generated * by the macros inorder to read only the needed memory. @@ -160,7 +160,7 @@ static inline u64 __cvmx_bootmem_desc_get(struct octeon_device *oct, } } -/** +/* * This function retrieves the string name of a named block. It is * more complicated than a simple memcpy() since the named block * descriptor may not be directly accessible. @@ -182,7 +182,7 @@ static void CVMX_BOOTMEM_NAMED_GET_NAME(struct octeon_device *oct, /* See header file for descriptions of functions */ -/** +/* * Check the version information on the bootmem descriptor * * @param exact_match @@ -323,7 +323,7 @@ static u64 cvmx_bootmem_phy_named_block_find(struct octeon_device *oct, return result; } -/** +/* * Find a named block on the remote Octeon * * @param name Name of block to find @@ -707,7 +707,7 @@ int octeon_add_console(struct octeon_device *oct, u32 console_num, return ret; } -/** +/* * Removes all consoles * * @param oct octeon device diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_device.c b/drivers/net/ethernet/cavium/liquidio/octeon_device.c index ac32facaa427..387a57cbfb73 100644 --- a/drivers/net/ethernet/cavium/liquidio/octeon_device.c +++ b/drivers/net/ethernet/cavium/liquidio/octeon_device.c @@ -1307,7 +1307,7 @@ struct octeon_config *octeon_get_conf(struct octeon_device *oct) /* scratch register address is same in all the OCT-II and CN70XX models */ #define CNXX_SLI_SCRATCH1 0x3C0 -/** Get the octeon device pointer. +/* Get the octeon device pointer. * @param octeon_id - The id for which the octeon device pointer is required. * @return Success: Octeon device pointer. * @return Failure: NULL. @@ -1324,7 +1324,7 @@ u64 lio_pci_readq(struct octeon_device *oct, u64 addr) { u64 val64; unsigned long flags; - u32 val32, addrhi; + u32 addrhi; spin_lock_irqsave(&oct->pci_win_lock, flags); @@ -1339,10 +1339,10 @@ u64 lio_pci_readq(struct octeon_device *oct, u64 addr) writel(addrhi, oct->reg_list.pci_win_rd_addr_hi); /* Read back to preserve ordering of writes */ - val32 = readl(oct->reg_list.pci_win_rd_addr_hi); + readl(oct->reg_list.pci_win_rd_addr_hi); writel(addr & 0xffffffff, oct->reg_list.pci_win_rd_addr_lo); - val32 = readl(oct->reg_list.pci_win_rd_addr_lo); + readl(oct->reg_list.pci_win_rd_addr_lo); val64 = readq(oct->reg_list.pci_win_rd_data); @@ -1355,7 +1355,6 @@ void lio_pci_writeq(struct octeon_device *oct, u64 val, u64 addr) { - u32 val32; unsigned long flags; spin_lock_irqsave(&oct->pci_win_lock, flags); @@ -1365,7 +1364,7 @@ void lio_pci_writeq(struct octeon_device *oct, /* The write happens when the LSB is written. So write MSB first. */ writel(val >> 32, oct->reg_list.pci_win_wr_data_hi); /* Read the MSB to ensure ordering of writes. */ - val32 = readl(oct->reg_list.pci_win_wr_data_hi); + readl(oct->reg_list.pci_win_wr_data_hi); writel(val & 0xffffffff, oct->reg_list.pci_win_wr_data_lo); @@ -1411,7 +1410,7 @@ int octeon_wait_for_ddr_init(struct octeon_device *oct, u32 *timeout) return ret; } -/** Get the octeon id assigned to the octeon device passed as argument. +/* Get the octeon id assigned to the octeon device passed as argument. * This function is exported to other modules. * @param dev - octeon device pointer passed as a void *. * @return octeon device id diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_droq.c b/drivers/net/ethernet/cavium/liquidio/octeon_droq.c index 017169023cca..d4080bddcb6b 100644 --- a/drivers/net/ethernet/cavium/liquidio/octeon_droq.c +++ b/drivers/net/ethernet/cavium/liquidio/octeon_droq.c @@ -280,13 +280,10 @@ int octeon_init_droq(struct octeon_device *oct, dev_dbg(&oct->pci_dev->dev, "droq[%d]: num_desc: %d\n", q_no, droq->max_count); - droq->recv_buf_list = (struct octeon_recv_buffer *) - vzalloc_node(array_size(droq->max_count, OCT_DROQ_RECVBUF_SIZE), - numa_node); + droq->recv_buf_list = vzalloc_node(array_size(droq->max_count, OCT_DROQ_RECVBUF_SIZE), + numa_node); if (!droq->recv_buf_list) - droq->recv_buf_list = (struct octeon_recv_buffer *) - vzalloc(array_size(droq->max_count, - OCT_DROQ_RECVBUF_SIZE)); + droq->recv_buf_list = vzalloc(array_size(droq->max_count, OCT_DROQ_RECVBUF_SIZE)); if (!droq->recv_buf_list) { dev_err(&oct->pci_dev->dev, "Output queue recv buf list alloc failed\n"); goto init_droq_fail; @@ -777,7 +774,7 @@ octeon_droq_process_packets(struct octeon_device *oct, return 0; } -/** +/* * Utility function to poll for packets. check_hw_for_packets must be * called before calling this routine. */ diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c b/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c index 614d07be7181..ad685f5d0a13 100644 --- a/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c +++ b/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c @@ -28,7 +28,7 @@ /** * octeon_mbox_read: - * @oct: Pointer mailbox + * @mbox: Pointer mailbox * * Reads the 8-bytes of data from the mbox register * Writes back the acknowldgement inidcating completion of read @@ -285,7 +285,8 @@ static int octeon_mbox_process_cmd(struct octeon_mbox *mbox, } /** - *octeon_mbox_process_message: + * octeon_mbox_process_message + * @mbox: mailbox * * Process the received mbox message. */ diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_main.h b/drivers/net/ethernet/cavium/liquidio/octeon_main.h index 073d0647b439..5b4cb725f60f 100644 --- a/drivers/net/ethernet/cavium/liquidio/octeon_main.h +++ b/drivers/net/ethernet/cavium/liquidio/octeon_main.h @@ -39,6 +39,7 @@ struct octeon_device_priv { /** Tasklet structures for this device. */ struct tasklet_struct droq_tasklet; unsigned long napi_mask; + struct octeon_device *dev; }; /** This structure is used by NIC driver to store information required diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c b/drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c index 4c85ae643b7b..7ccab36143c1 100644 --- a/drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c +++ b/drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c @@ -22,6 +22,7 @@ #include "octeon_iq.h" #include "response_manager.h" #include "octeon_device.h" +#include "octeon_mem_ops.h" #define MEMOPS_IDX BAR1_INDEX_DYNAMIC_MAP diff --git a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c index 3e17ce0d2314..5e50bb19bf26 100644 --- a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c +++ b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c @@ -315,9 +315,9 @@ static void octeon_mgmt_clean_tx_buffers(struct octeon_mgmt *p) netif_wake_queue(p->netdev); } -static void octeon_mgmt_clean_tx_tasklet(unsigned long arg) +static void octeon_mgmt_clean_tx_tasklet(struct tasklet_struct *t) { - struct octeon_mgmt *p = (struct octeon_mgmt *)arg; + struct octeon_mgmt *p = from_tasklet(p, t, tx_clean_tasklet); octeon_mgmt_clean_tx_buffers(p); octeon_mgmt_enable_tx_irq(p); } @@ -1219,7 +1219,7 @@ static int octeon_mgmt_open(struct net_device *netdev) */ if (netdev->phydev) { netif_carrier_off(netdev); - phy_start_aneg(netdev->phydev); + phy_start(netdev->phydev); } netif_wake_queue(netdev); @@ -1247,8 +1247,10 @@ static int octeon_mgmt_stop(struct net_device *netdev) napi_disable(&p->napi); netif_stop_queue(netdev); - if (netdev->phydev) + if (netdev->phydev) { + phy_stop(netdev->phydev); phy_disconnect(netdev->phydev); + } netif_carrier_off(netdev); @@ -1489,8 +1491,8 @@ static int octeon_mgmt_probe(struct platform_device *pdev) skb_queue_head_init(&p->tx_list); skb_queue_head_init(&p->rx_list); - tasklet_init(&p->tx_clean_tasklet, - octeon_mgmt_clean_tx_tasklet, (unsigned long)p); + tasklet_setup(&p->tx_clean_tasklet, + octeon_mgmt_clean_tx_tasklet); netdev->priv_flags |= IFF_UNICAST_FLT; diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c index 063e560d9c1b..f3b7b443f964 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c @@ -985,9 +985,9 @@ static int nicvf_poll(struct napi_struct *napi, int budget) * * As of now only CQ errors are handled */ -static void nicvf_handle_qs_err(unsigned long data) +static void nicvf_handle_qs_err(struct tasklet_struct *t) { - struct nicvf *nic = (struct nicvf *)data; + struct nicvf *nic = from_tasklet(nic, t, qs_err_task); struct queue_set *qs = nic->qs; int qidx; u64 status; @@ -1493,12 +1493,10 @@ int nicvf_open(struct net_device *netdev) } /* Init tasklet for handling Qset err interrupt */ - tasklet_init(&nic->qs_err_task, nicvf_handle_qs_err, - (unsigned long)nic); + tasklet_setup(&nic->qs_err_task, nicvf_handle_qs_err); /* Init RBDR tasklet which will refill RBDR */ - tasklet_init(&nic->rbdr_task, nicvf_rbdr_task, - (unsigned long)nic); + tasklet_setup(&nic->rbdr_task, nicvf_rbdr_task); INIT_DELAYED_WORK(&nic->rbdr_work, nicvf_rbdr_work); /* Configure CPI alorithm */ @@ -2067,8 +2065,8 @@ static void nicvf_set_rx_mode(struct net_device *netdev) mode |= BGX_XCAST_MCAST_FILTER; /* here we need to copy mc addrs */ if (netdev_mc_count(netdev)) { - mc_list = kmalloc(offsetof(typeof(*mc_list), - mc[netdev_mc_count(netdev)]), + mc_list = kmalloc(struct_size(mc_list, mc, + netdev_mc_count(netdev)), GFP_ATOMIC); if (unlikely(!mc_list)) return; diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c index a45223f0cca5..7a141ce32e86 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c @@ -460,9 +460,9 @@ void nicvf_rbdr_work(struct work_struct *work) } /* In Softirq context, alloc rcv buffers in atomic mode */ -void nicvf_rbdr_task(unsigned long data) +void nicvf_rbdr_task(struct tasklet_struct *t) { - struct nicvf *nic = (struct nicvf *)data; + struct nicvf *nic = from_tasklet(nic, t, rbdr_task); nicvf_refill_rbdr(nic, GFP_ATOMIC); if (nic->rb_alloc_fail) { diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.h b/drivers/net/ethernet/cavium/thunder/nicvf_queues.h index 2460451fc48f..8453defc296c 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.h +++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.h @@ -348,7 +348,7 @@ void nicvf_xdp_sq_doorbell(struct nicvf *nic, struct snd_queue *sq, int sq_num); struct sk_buff *nicvf_get_rcv_skb(struct nicvf *nic, struct cqe_rx_t *cqe_rx, bool xdp); -void nicvf_rbdr_task(unsigned long data); +void nicvf_rbdr_task(struct tasklet_struct *t); void nicvf_rbdr_work(struct work_struct *work); void nicvf_enable_intr(struct nicvf *nic, int int_type, int q_idx); |