summaryrefslogtreecommitdiff
path: root/drivers/net/fjes/fjes_main.c
diff options
context:
space:
mode:
authorTaku Izumi <izumi.taku@jp.fujitsu.com>2015-08-21 11:29:35 +0300
committerDavid S. Miller <davem@davemloft.net>2015-08-25 00:06:36 +0300
commit785f28e061a870eba937cb2a860cbcf631f5ebb0 (patch)
tree14476ef9ebf38cbe1a9472052c2d7f8638d7e6fe /drivers/net/fjes/fjes_main.c
parent8fc4cadb98c6a0f1eecde678271fcc957258af3e (diff)
downloadlinux-785f28e061a870eba937cb2a860cbcf631f5ebb0.tar.xz
fjes: update_zone_task
This patch adds update_zone_task. Zoning information can be changed by user. This task is used to monitor if zoning information is changed or not. Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/fjes/fjes_main.c')
-rw-r--r--drivers/net/fjes/fjes_main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c
index c47ecf35d005..8e3a084277c0 100644
--- a/drivers/net/fjes/fjes_main.c
+++ b/drivers/net/fjes/fjes_main.c
@@ -315,6 +315,8 @@ static int fjes_close(struct net_device *netdev)
cancel_work_sync(&adapter->raise_intr_rxdata_task);
cancel_work_sync(&adapter->tx_stall_task);
+ cancel_work_sync(&hw->update_zone_task);
+
fjes_hw_wait_epstop(hw);
fjes_free_resources(adapter);
@@ -817,6 +819,15 @@ static int fjes_vlan_rx_kill_vid(struct net_device *netdev,
return 0;
}
+static void fjes_update_zone_irq(struct fjes_adapter *adapter,
+ int src_epid)
+{
+ struct fjes_hw *hw = &adapter->hw;
+
+ if (!work_pending(&hw->update_zone_task))
+ queue_work(adapter->control_wq, &hw->update_zone_task);
+}
+
static irqreturn_t fjes_intr(int irq, void *data)
{
struct fjes_adapter *adapter = data;
@@ -830,6 +841,9 @@ static irqreturn_t fjes_intr(int irq, void *data)
if (icr & REG_ICTL_MASK_RX_DATA)
fjes_rx_irq(adapter, icr & REG_IS_MASK_EPID);
+ if (icr & REG_ICTL_MASK_INFO_UPDATE)
+ fjes_update_zone_irq(adapter, icr & REG_IS_MASK_EPID);
+
ret = IRQ_HANDLED;
} else {
ret = IRQ_NONE;