aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/qlge')
-rw-r--r--drivers/net/qlge/qlge.h12
-rw-r--r--drivers/net/qlge/qlge_main.c24
-rw-r--r--drivers/net/qlge/qlge_mpi.c6
3 files changed, 29 insertions, 13 deletions
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h
index a478786840a6..22821398fc63 100644
--- a/drivers/net/qlge/qlge.h
+++ b/drivers/net/qlge/qlge.h
@@ -2226,7 +2226,6 @@ int ql_dump_risc_ram_area(struct ql_adapter *qdev, void *buf,
2226int ql_core_dump(struct ql_adapter *qdev, 2226int ql_core_dump(struct ql_adapter *qdev,
2227 struct ql_mpi_coredump *mpi_coredump); 2227 struct ql_mpi_coredump *mpi_coredump);
2228int ql_mb_about_fw(struct ql_adapter *qdev); 2228int ql_mb_about_fw(struct ql_adapter *qdev);
2229int ql_wol(struct ql_adapter *qdev);
2230int ql_mb_wol_set_magic(struct ql_adapter *qdev, u32 enable_wol); 2229int ql_mb_wol_set_magic(struct ql_adapter *qdev, u32 enable_wol);
2231int ql_mb_wol_mode(struct ql_adapter *qdev, u32 wol); 2230int ql_mb_wol_mode(struct ql_adapter *qdev, u32 wol);
2232int ql_mb_set_led_cfg(struct ql_adapter *qdev, u32 led_config); 2231int ql_mb_set_led_cfg(struct ql_adapter *qdev, u32 led_config);
@@ -2243,16 +2242,13 @@ netdev_tx_t ql_lb_send(struct sk_buff *skb, struct net_device *ndev);
2243void ql_check_lb_frame(struct ql_adapter *, struct sk_buff *); 2242void ql_check_lb_frame(struct ql_adapter *, struct sk_buff *);
2244int ql_own_firmware(struct ql_adapter *qdev); 2243int ql_own_firmware(struct ql_adapter *qdev);
2245int ql_clean_lb_rx_ring(struct rx_ring *rx_ring, int budget); 2244int ql_clean_lb_rx_ring(struct rx_ring *rx_ring, int budget);
2246void qlge_set_multicast_list(struct net_device *ndev);
2247 2245
2248#if 1 2246/* #define QL_ALL_DUMP */
2249#define QL_ALL_DUMP 2247/* #define QL_REG_DUMP */
2250#define QL_REG_DUMP 2248/* #define QL_DEV_DUMP */
2251#define QL_DEV_DUMP 2249/* #define QL_CB_DUMP */
2252#define QL_CB_DUMP
2253/* #define QL_IB_DUMP */ 2250/* #define QL_IB_DUMP */
2254/* #define QL_OB_DUMP */ 2251/* #define QL_OB_DUMP */
2255#endif
2256 2252
2257#ifdef QL_REG_DUMP 2253#ifdef QL_REG_DUMP
2258extern void ql_dump_xgmac_control_regs(struct ql_adapter *qdev); 2254extern void ql_dump_xgmac_control_regs(struct ql_adapter *qdev);
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index ba0053d8515e..c30e0fe55a31 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -94,6 +94,9 @@ static DEFINE_PCI_DEVICE_TABLE(qlge_pci_tbl) = {
94 94
95MODULE_DEVICE_TABLE(pci, qlge_pci_tbl); 95MODULE_DEVICE_TABLE(pci, qlge_pci_tbl);
96 96
97static int ql_wol(struct ql_adapter *qdev);
98static void qlge_set_multicast_list(struct net_device *ndev);
99
97/* This hardware semaphore causes exclusive access to 100/* This hardware semaphore causes exclusive access to
98 * resources shared between the NIC driver, MPI firmware, 101 * resources shared between the NIC driver, MPI firmware,
99 * FCOE firmware and the FC driver. 102 * FCOE firmware and the FC driver.
@@ -2382,6 +2385,20 @@ static void qlge_vlan_rx_kill_vid(struct net_device *ndev, u16 vid)
2382 2385
2383} 2386}
2384 2387
2388static void qlge_restore_vlan(struct ql_adapter *qdev)
2389{
2390 qlge_vlan_rx_register(qdev->ndev, qdev->vlgrp);
2391
2392 if (qdev->vlgrp) {
2393 u16 vid;
2394 for (vid = 0; vid < VLAN_N_VID; vid++) {
2395 if (!vlan_group_get_device(qdev->vlgrp, vid))
2396 continue;
2397 qlge_vlan_rx_add_vid(qdev->ndev, vid);
2398 }
2399 }
2400}
2401
2385/* MSI-X Multiple Vector Interrupt Handler for inbound completions. */ 2402/* MSI-X Multiple Vector Interrupt Handler for inbound completions. */
2386static irqreturn_t qlge_msix_rx_isr(int irq, void *dev_id) 2403static irqreturn_t qlge_msix_rx_isr(int irq, void *dev_id)
2387{ 2404{
@@ -3842,7 +3859,7 @@ static void ql_display_dev_info(struct net_device *ndev)
3842 "MAC address %pM\n", ndev->dev_addr); 3859 "MAC address %pM\n", ndev->dev_addr);
3843} 3860}
3844 3861
3845int ql_wol(struct ql_adapter *qdev) 3862static int ql_wol(struct ql_adapter *qdev)
3846{ 3863{
3847 int status = 0; 3864 int status = 0;
3848 u32 wol = MB_WOL_DISABLE; 3865 u32 wol = MB_WOL_DISABLE;
@@ -3957,6 +3974,9 @@ static int ql_adapter_up(struct ql_adapter *qdev)
3957 clear_bit(QL_PROMISCUOUS, &qdev->flags); 3974 clear_bit(QL_PROMISCUOUS, &qdev->flags);
3958 qlge_set_multicast_list(qdev->ndev); 3975 qlge_set_multicast_list(qdev->ndev);
3959 3976
3977 /* Restore vlan setting. */
3978 qlge_restore_vlan(qdev);
3979
3960 ql_enable_interrupts(qdev); 3980 ql_enable_interrupts(qdev);
3961 ql_enable_all_completion_interrupts(qdev); 3981 ql_enable_all_completion_interrupts(qdev);
3962 netif_tx_start_all_queues(qdev->ndev); 3982 netif_tx_start_all_queues(qdev->ndev);
@@ -4242,7 +4262,7 @@ static struct net_device_stats *qlge_get_stats(struct net_device
4242 return &ndev->stats; 4262 return &ndev->stats;
4243} 4263}
4244 4264
4245void qlge_set_multicast_list(struct net_device *ndev) 4265static void qlge_set_multicast_list(struct net_device *ndev)
4246{ 4266{
4247 struct ql_adapter *qdev = (struct ql_adapter *)netdev_priv(ndev); 4267 struct ql_adapter *qdev = (struct ql_adapter *)netdev_priv(ndev);
4248 struct netdev_hw_addr *ha; 4268 struct netdev_hw_addr *ha;
diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c
index f84e8570c7cb..0e7c7c7ee164 100644
--- a/drivers/net/qlge/qlge_mpi.c
+++ b/drivers/net/qlge/qlge_mpi.c
@@ -87,7 +87,7 @@ exit:
87 return status; 87 return status;
88} 88}
89 89
90int ql_soft_reset_mpi_risc(struct ql_adapter *qdev) 90static int ql_soft_reset_mpi_risc(struct ql_adapter *qdev)
91{ 91{
92 int status; 92 int status;
93 status = ql_write_mpi_reg(qdev, 0x00001010, 1); 93 status = ql_write_mpi_reg(qdev, 0x00001010, 1);
@@ -681,7 +681,7 @@ int ql_mb_get_fw_state(struct ql_adapter *qdev)
681/* Send and ACK mailbox command to the firmware to 681/* Send and ACK mailbox command to the firmware to
682 * let it continue with the change. 682 * let it continue with the change.
683 */ 683 */
684int ql_mb_idc_ack(struct ql_adapter *qdev) 684static int ql_mb_idc_ack(struct ql_adapter *qdev)
685{ 685{
686 struct mbox_params mbc; 686 struct mbox_params mbc;
687 struct mbox_params *mbcp = &mbc; 687 struct mbox_params *mbcp = &mbc;
@@ -744,7 +744,7 @@ int ql_mb_set_port_cfg(struct ql_adapter *qdev)
744 return status; 744 return status;
745} 745}
746 746
747int ql_mb_dump_ram(struct ql_adapter *qdev, u64 req_dma, u32 addr, 747static int ql_mb_dump_ram(struct ql_adapter *qdev, u64 req_dma, u32 addr,
748 u32 size) 748 u32 size)
749{ 749{
750 int status = 0; 750 int status = 0;