Skip to content

Commit 5ef4ddb

Browse files
Intiyaz Bashadavem330
authored andcommitted
liquidio: moved liquidio_legacy_intr_handler to lio_core.c
Moving liquidio_legacy_intr_handler to lio_core.c Signed-off-by: Intiyaz Basha <[email protected]> Signed-off-by: Raghu Vatsavayi <[email protected]> Signed-off-by: Felix Manlunas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1ff3926 commit 5ef4ddb

File tree

3 files changed

+57
-56
lines changed

3 files changed

+57
-56
lines changed

drivers/net/ethernet/cavium/liquidio/lio_core.c

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,3 +829,58 @@ liquidio_msix_intr_handler(int irq __attribute__((unused)), void *dev)
829829

830830
return IRQ_HANDLED;
831831
}
832+
833+
/**
834+
* \brief Droq packet processor sceduler
835+
* @param oct octeon device
836+
*/
837+
static void liquidio_schedule_droq_pkt_handlers(struct octeon_device *oct)
838+
{
839+
struct octeon_device_priv *oct_priv =
840+
(struct octeon_device_priv *)oct->priv;
841+
struct octeon_droq *droq;
842+
u64 oq_no;
843+
844+
if (oct->int_status & OCT_DEV_INTR_PKT_DATA) {
845+
for (oq_no = 0; oq_no < MAX_OCTEON_OUTPUT_QUEUES(oct);
846+
oq_no++) {
847+
if (!(oct->droq_intr & BIT_ULL(oq_no)))
848+
continue;
849+
850+
droq = oct->droq[oq_no];
851+
852+
if (droq->ops.poll_mode) {
853+
droq->ops.napi_fn(droq);
854+
oct_priv->napi_mask |= (1 << oq_no);
855+
} else {
856+
tasklet_schedule(&oct_priv->droq_tasklet);
857+
}
858+
}
859+
}
860+
}
861+
862+
/**
863+
* \brief Interrupt handler for octeon
864+
* @param irq unused
865+
* @param dev octeon device
866+
*/
867+
irqreturn_t liquidio_legacy_intr_handler(int irq __attribute__((unused)),
868+
void *dev)
869+
{
870+
struct octeon_device *oct = (struct octeon_device *)dev;
871+
irqreturn_t ret;
872+
873+
/* Disable our interrupts for the duration of ISR */
874+
oct->fn_list.disable_interrupt(oct, OCTEON_ALL_INTR);
875+
876+
ret = oct->fn_list.process_interrupt_regs(oct);
877+
878+
if (ret == IRQ_HANDLED)
879+
liquidio_schedule_droq_pkt_handlers(oct);
880+
881+
/* Re-enable our interrupts */
882+
if (!(atomic_read(&oct->status) == OCT_DEV_IN_RESET))
883+
oct->fn_list.enable_interrupt(oct, OCTEON_ALL_INTR);
884+
885+
return ret;
886+
}

drivers/net/ethernet/cavium/liquidio/lio_main.c

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -901,62 +901,6 @@ static inline void update_link_status(struct net_device *netdev,
901901
}
902902
}
903903

904-
/**
905-
* \brief Droq packet processor sceduler
906-
* @param oct octeon device
907-
*/
908-
static void liquidio_schedule_droq_pkt_handlers(struct octeon_device *oct)
909-
{
910-
struct octeon_device_priv *oct_priv =
911-
(struct octeon_device_priv *)oct->priv;
912-
u64 oq_no;
913-
struct octeon_droq *droq;
914-
915-
if (oct->int_status & OCT_DEV_INTR_PKT_DATA) {
916-
for (oq_no = 0; oq_no < MAX_OCTEON_OUTPUT_QUEUES(oct);
917-
oq_no++) {
918-
if (!(oct->droq_intr & BIT_ULL(oq_no)))
919-
continue;
920-
921-
droq = oct->droq[oq_no];
922-
923-
if (droq->ops.poll_mode) {
924-
droq->ops.napi_fn(droq);
925-
oct_priv->napi_mask |= (1 << oq_no);
926-
} else {
927-
tasklet_schedule(&oct_priv->droq_tasklet);
928-
}
929-
}
930-
}
931-
}
932-
933-
/**
934-
* \brief Interrupt handler for octeon
935-
* @param irq unused
936-
* @param dev octeon device
937-
*/
938-
static
939-
irqreturn_t liquidio_legacy_intr_handler(int irq __attribute__((unused)),
940-
void *dev)
941-
{
942-
struct octeon_device *oct = (struct octeon_device *)dev;
943-
irqreturn_t ret;
944-
945-
/* Disable our interrupts for the duration of ISR */
946-
oct->fn_list.disable_interrupt(oct, OCTEON_ALL_INTR);
947-
948-
ret = oct->fn_list.process_interrupt_regs(oct);
949-
950-
if (ret == IRQ_HANDLED)
951-
liquidio_schedule_droq_pkt_handlers(oct);
952-
953-
/* Re-enable our interrupts */
954-
if (!(atomic_read(&oct->status) == OCT_DEV_IN_RESET))
955-
oct->fn_list.enable_interrupt(oct, OCTEON_ALL_INTR);
956-
957-
return ret;
958-
}
959-
960904
/**
961905
* \brief Setup interrupt for octeon device
962906
* @param oct octeon device

drivers/net/ethernet/cavium/liquidio/octeon_network.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ int liquidio_setup_io_queues(struct octeon_device *octeon_dev, int ifidx);
172172
irqreturn_t liquidio_msix_intr_handler(int irq __attribute__((unused)),
173173
void *dev);
174174

175+
irqreturn_t liquidio_legacy_intr_handler(int irq __attribute__((unused)),
176+
void *dev);
175177
/**
176178
* \brief Register ethtool operations
177179
* @param netdev pointer to network device

0 commit comments

Comments
 (0)