diff options
Diffstat (limited to 'drivers/net')
| -rw-r--r-- | drivers/net/bnx2.h | 2 | ||||
| -rw-r--r-- | drivers/net/e100.c | 4 | ||||
| -rw-r--r-- | drivers/net/e1000/e1000_hw.c | 23 | ||||
| -rw-r--r-- | drivers/net/forcedeth.c | 16 | ||||
| -rw-r--r-- | drivers/net/hp-plus.c | 8 | ||||
| -rw-r--r-- | drivers/net/mlx4/mr.c | 10 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/rfkill.c | 18 | ||||
| -rw-r--r-- | drivers/net/wireless/b43legacy/rfkill.c | 18 |
8 files changed, 48 insertions, 51 deletions
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index c3c579f98ed0..dfacd31f7ed0 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
| @@ -6597,7 +6597,7 @@ struct flash_spec { | |||
| 6597 | 6597 | ||
| 6598 | struct bnx2_irq { | 6598 | struct bnx2_irq { |
| 6599 | irq_handler_t handler; | 6599 | irq_handler_t handler; |
| 6600 | u16 vector; | 6600 | unsigned int vector; |
| 6601 | u8 requested; | 6601 | u8 requested; |
| 6602 | char name[16]; | 6602 | char name[16]; |
| 6603 | }; | 6603 | }; |
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 453115acaad2..5cf78d612c45 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
| @@ -2738,9 +2738,7 @@ static int __devinit e100_probe(struct pci_dev *pdev, | |||
| 2738 | nic->flags |= wol_magic; | 2738 | nic->flags |= wol_magic; |
| 2739 | 2739 | ||
| 2740 | /* ack any pending wake events, disable PME */ | 2740 | /* ack any pending wake events, disable PME */ |
| 2741 | err = pci_enable_wake(pdev, 0, 0); | 2741 | pci_pme_active(pdev, false); |
| 2742 | if (err) | ||
| 2743 | DPRINTK(PROBE, ERR, "Error clearing wake event\n"); | ||
| 2744 | 2742 | ||
| 2745 | strcpy(netdev->name, "eth%d"); | 2743 | strcpy(netdev->name, "eth%d"); |
| 2746 | if((err = register_netdev(netdev))) { | 2744 | if((err = register_netdev(netdev))) { |
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c index 9d6edf3e73f9..d04eef53571e 100644 --- a/drivers/net/e1000/e1000_hw.c +++ b/drivers/net/e1000/e1000_hw.c | |||
| @@ -144,6 +144,8 @@ static s32 e1000_host_if_read_cookie(struct e1000_hw *hw, u8 *buffer); | |||
| 144 | static u8 e1000_calculate_mng_checksum(char *buffer, u32 length); | 144 | static u8 e1000_calculate_mng_checksum(char *buffer, u32 length); |
| 145 | static s32 e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, u16 duplex); | 145 | static s32 e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, u16 duplex); |
| 146 | static s32 e1000_configure_kmrn_for_1000(struct e1000_hw *hw); | 146 | static s32 e1000_configure_kmrn_for_1000(struct e1000_hw *hw); |
| 147 | static s32 e1000_do_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); | ||
| 148 | static s32 e1000_do_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); | ||
| 147 | 149 | ||
| 148 | /* IGP cable length table */ | 150 | /* IGP cable length table */ |
| 149 | static const | 151 | static const |
| @@ -168,6 +170,8 @@ u16 e1000_igp_2_cable_length_table[IGP02E1000_AGC_LENGTH_TABLE_SIZE] = | |||
| 168 | 83, 89, 95, 100, 105, 109, 113, 116, 119, 122, 124, | 170 | 83, 89, 95, 100, 105, 109, 113, 116, 119, 122, 124, |
| 169 | 104, 109, 114, 118, 121, 124}; | 171 | 104, 109, 114, 118, 121, 124}; |
| 170 | 172 | ||
| 173 | static DEFINE_SPINLOCK(e1000_eeprom_lock); | ||
| 174 | |||
| 171 | /****************************************************************************** | 175 | /****************************************************************************** |
| 172 | * Set the phy type member in the hw struct. | 176 | * Set the phy type member in the hw struct. |
| 173 | * | 177 | * |
| @@ -4904,6 +4908,15 @@ static s32 e1000_spi_eeprom_ready(struct e1000_hw *hw) | |||
| 4904 | *****************************************************************************/ | 4908 | *****************************************************************************/ |
| 4905 | s32 e1000_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) | 4909 | s32 e1000_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) |
| 4906 | { | 4910 | { |
| 4911 | s32 ret; | ||
| 4912 | spin_lock(&e1000_eeprom_lock); | ||
| 4913 | ret = e1000_do_read_eeprom(hw, offset, words, data); | ||
| 4914 | spin_unlock(&e1000_eeprom_lock); | ||
| 4915 | return ret; | ||
| 4916 | } | ||
| 4917 | |||
| 4918 | static s32 e1000_do_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) | ||
| 4919 | { | ||
| 4907 | struct e1000_eeprom_info *eeprom = &hw->eeprom; | 4920 | struct e1000_eeprom_info *eeprom = &hw->eeprom; |
| 4908 | u32 i = 0; | 4921 | u32 i = 0; |
| 4909 | 4922 | ||
| @@ -5236,6 +5249,16 @@ s32 e1000_update_eeprom_checksum(struct e1000_hw *hw) | |||
| 5236 | *****************************************************************************/ | 5249 | *****************************************************************************/ |
| 5237 | s32 e1000_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) | 5250 | s32 e1000_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) |
| 5238 | { | 5251 | { |
| 5252 | s32 ret; | ||
| 5253 | spin_lock(&e1000_eeprom_lock); | ||
| 5254 | ret = e1000_do_write_eeprom(hw, offset, words, data); | ||
| 5255 | spin_unlock(&e1000_eeprom_lock); | ||
| 5256 | return ret; | ||
| 5257 | } | ||
| 5258 | |||
| 5259 | |||
| 5260 | static s32 e1000_do_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) | ||
| 5261 | { | ||
| 5239 | struct e1000_eeprom_info *eeprom = &hw->eeprom; | 5262 | struct e1000_eeprom_info *eeprom = &hw->eeprom; |
| 5240 | s32 status = 0; | 5263 | s32 status = 0; |
| 5241 | 5264 | ||
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 0b6ecef9a849..eeb55ed2152d 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
| @@ -5643,6 +5643,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
| 5643 | dev->dev_addr[4] = (np->orig_mac[0] >> 8) & 0xff; | 5643 | dev->dev_addr[4] = (np->orig_mac[0] >> 8) & 0xff; |
| 5644 | dev->dev_addr[5] = (np->orig_mac[0] >> 0) & 0xff; | 5644 | dev->dev_addr[5] = (np->orig_mac[0] >> 0) & 0xff; |
| 5645 | writel(txreg|NVREG_TRANSMITPOLL_MAC_ADDR_REV, base + NvRegTransmitPoll); | 5645 | writel(txreg|NVREG_TRANSMITPOLL_MAC_ADDR_REV, base + NvRegTransmitPoll); |
| 5646 | printk(KERN_DEBUG "nv_probe: set workaround bit for reversed mac addr\n"); | ||
| 5646 | } | 5647 | } |
| 5647 | memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); | 5648 | memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); |
| 5648 | 5649 | ||
| @@ -5890,14 +5891,12 @@ static void nv_restore_phy(struct net_device *dev) | |||
| 5890 | } | 5891 | } |
| 5891 | } | 5892 | } |
| 5892 | 5893 | ||
| 5893 | static void __devexit nv_remove(struct pci_dev *pci_dev) | 5894 | static void nv_restore_mac_addr(struct pci_dev *pci_dev) |
| 5894 | { | 5895 | { |
| 5895 | struct net_device *dev = pci_get_drvdata(pci_dev); | 5896 | struct net_device *dev = pci_get_drvdata(pci_dev); |
| 5896 | struct fe_priv *np = netdev_priv(dev); | 5897 | struct fe_priv *np = netdev_priv(dev); |
| 5897 | u8 __iomem *base = get_hwbase(dev); | 5898 | u8 __iomem *base = get_hwbase(dev); |
| 5898 | 5899 | ||
| 5899 | unregister_netdev(dev); | ||
| 5900 | |||
| 5901 | /* special op: write back the misordered MAC address - otherwise | 5900 | /* special op: write back the misordered MAC address - otherwise |
| 5902 | * the next nv_probe would see a wrong address. | 5901 | * the next nv_probe would see a wrong address. |
| 5903 | */ | 5902 | */ |
| @@ -5905,6 +5904,15 @@ static void __devexit nv_remove(struct pci_dev *pci_dev) | |||
| 5905 | writel(np->orig_mac[1], base + NvRegMacAddrB); | 5904 | writel(np->orig_mac[1], base + NvRegMacAddrB); |
| 5906 | writel(readl(base + NvRegTransmitPoll) & ~NVREG_TRANSMITPOLL_MAC_ADDR_REV, | 5905 | writel(readl(base + NvRegTransmitPoll) & ~NVREG_TRANSMITPOLL_MAC_ADDR_REV, |
| 5907 | base + NvRegTransmitPoll); | 5906 | base + NvRegTransmitPoll); |
| 5907 | } | ||
| 5908 | |||
| 5909 | static void __devexit nv_remove(struct pci_dev *pci_dev) | ||
| 5910 | { | ||
| 5911 | struct net_device *dev = pci_get_drvdata(pci_dev); | ||
| 5912 | |||
| 5913 | unregister_netdev(dev); | ||
| 5914 | |||
| 5915 | nv_restore_mac_addr(pci_dev); | ||
| 5908 | 5916 | ||
| 5909 | /* restore any phy related changes */ | 5917 | /* restore any phy related changes */ |
| 5910 | nv_restore_phy(dev); | 5918 | nv_restore_phy(dev); |
| @@ -5975,6 +5983,8 @@ static void nv_shutdown(struct pci_dev *pdev) | |||
| 5975 | if (netif_running(dev)) | 5983 | if (netif_running(dev)) |
| 5976 | nv_close(dev); | 5984 | nv_close(dev); |
| 5977 | 5985 | ||
| 5986 | nv_restore_mac_addr(pdev); | ||
| 5987 | |||
| 5978 | pci_disable_device(pdev); | 5988 | pci_disable_device(pdev); |
| 5979 | if (system_state == SYSTEM_POWER_OFF) { | 5989 | if (system_state == SYSTEM_POWER_OFF) { |
| 5980 | if (pci_enable_wake(pdev, PCI_D3cold, np->wolenabled)) | 5990 | if (pci_enable_wake(pdev, PCI_D3cold, np->wolenabled)) |
diff --git a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c index 8239939554bc..fbbd3e660c27 100644 --- a/drivers/net/hp-plus.c +++ b/drivers/net/hp-plus.c | |||
| @@ -139,7 +139,7 @@ static int __init do_hpp_probe(struct net_device *dev) | |||
| 139 | #ifndef MODULE | 139 | #ifndef MODULE |
| 140 | struct net_device * __init hp_plus_probe(int unit) | 140 | struct net_device * __init hp_plus_probe(int unit) |
| 141 | { | 141 | { |
| 142 | struct net_device *dev = alloc_ei_netdev(); | 142 | struct net_device *dev = alloc_eip_netdev(); |
| 143 | int err; | 143 | int err; |
| 144 | 144 | ||
| 145 | if (!dev) | 145 | if (!dev) |
| @@ -284,7 +284,7 @@ hpp_open(struct net_device *dev) | |||
| 284 | int option_reg; | 284 | int option_reg; |
| 285 | int retval; | 285 | int retval; |
| 286 | 286 | ||
| 287 | if ((retval = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev))) { | 287 | if ((retval = request_irq(dev->irq, eip_interrupt, 0, dev->name, dev))) { |
| 288 | return retval; | 288 | return retval; |
| 289 | } | 289 | } |
| 290 | 290 | ||
| @@ -302,7 +302,7 @@ hpp_open(struct net_device *dev) | |||
| 302 | /* Select the operational page. */ | 302 | /* Select the operational page. */ |
| 303 | outw(Perf_Page, ioaddr + HP_PAGING); | 303 | outw(Perf_Page, ioaddr + HP_PAGING); |
| 304 | 304 | ||
| 305 | ei_open(dev); | 305 | eip_open(dev); |
| 306 | return 0; | 306 | return 0; |
| 307 | } | 307 | } |
| 308 | 308 | ||
| @@ -313,7 +313,7 @@ hpp_close(struct net_device *dev) | |||
| 313 | int option_reg = inw(ioaddr + HPP_OPTION); | 313 | int option_reg = inw(ioaddr + HPP_OPTION); |
| 314 | 314 | ||
| 315 | free_irq(dev->irq, dev); | 315 | free_irq(dev->irq, dev); |
| 316 | ei_close(dev); | 316 | eip_close(dev); |
| 317 | outw((option_reg & ~EnableIRQ) | MemDisable | NICReset | ChipReset, | 317 | outw((option_reg & ~EnableIRQ) | MemDisable | NICReset | ChipReset, |
| 318 | ioaddr + HPP_OPTION); | 318 | ioaddr + HPP_OPTION); |
| 319 | 319 | ||
diff --git a/drivers/net/mlx4/mr.c b/drivers/net/mlx4/mr.c index 62071d9c4a55..d1dd5b48dbd1 100644 --- a/drivers/net/mlx4/mr.c +++ b/drivers/net/mlx4/mr.c | |||
| @@ -67,11 +67,10 @@ struct mlx4_mpt_entry { | |||
| 67 | #define MLX4_MPT_FLAG_PHYSICAL (1 << 9) | 67 | #define MLX4_MPT_FLAG_PHYSICAL (1 << 9) |
| 68 | #define MLX4_MPT_FLAG_REGION (1 << 8) | 68 | #define MLX4_MPT_FLAG_REGION (1 << 8) |
| 69 | 69 | ||
| 70 | #define MLX4_MPT_PD_FLAG_FAST_REG (1 << 26) | 70 | #define MLX4_MPT_PD_FLAG_FAST_REG (1 << 27) |
| 71 | #define MLX4_MPT_PD_FLAG_RAE (1 << 28) | ||
| 71 | #define MLX4_MPT_PD_FLAG_EN_INV (3 << 24) | 72 | #define MLX4_MPT_PD_FLAG_EN_INV (3 << 24) |
| 72 | 73 | ||
| 73 | #define MLX4_MTT_FLAG_PRESENT 1 | ||
| 74 | |||
| 75 | #define MLX4_MPT_STATUS_SW 0xF0 | 74 | #define MLX4_MPT_STATUS_SW 0xF0 |
| 76 | #define MLX4_MPT_STATUS_HW 0x00 | 75 | #define MLX4_MPT_STATUS_HW 0x00 |
| 77 | 76 | ||
| @@ -348,7 +347,10 @@ int mlx4_mr_enable(struct mlx4_dev *dev, struct mlx4_mr *mr) | |||
| 348 | if (mr->mtt.order >= 0 && mr->mtt.page_shift == 0) { | 347 | if (mr->mtt.order >= 0 && mr->mtt.page_shift == 0) { |
| 349 | /* fast register MR in free state */ | 348 | /* fast register MR in free state */ |
| 350 | mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_FREE); | 349 | mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_FREE); |
| 351 | mpt_entry->pd_flags |= cpu_to_be32(MLX4_MPT_PD_FLAG_FAST_REG); | 350 | mpt_entry->pd_flags |= cpu_to_be32(MLX4_MPT_PD_FLAG_FAST_REG | |
| 351 | MLX4_MPT_PD_FLAG_RAE); | ||
| 352 | mpt_entry->mtt_sz = cpu_to_be32((1 << mr->mtt.order) * | ||
| 353 | MLX4_MTT_ENTRY_PER_SEG); | ||
| 352 | } else { | 354 | } else { |
| 353 | mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_SW_OWNS); | 355 | mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_SW_OWNS); |
| 354 | } | 356 | } |
diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c index fec5645944a4..34ae125d5384 100644 --- a/drivers/net/wireless/b43/rfkill.c +++ b/drivers/net/wireless/b43/rfkill.c | |||
| @@ -43,23 +43,6 @@ static bool b43_is_hw_radio_enabled(struct b43_wldev *dev) | |||
| 43 | return 0; | 43 | return 0; |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | /* Update the rfkill state */ | ||
| 47 | static void b43_rfkill_update_state(struct b43_wldev *dev) | ||
| 48 | { | ||
| 49 | struct b43_rfkill *rfk = &(dev->wl->rfkill); | ||
| 50 | |||
| 51 | if (!dev->radio_hw_enable) { | ||
| 52 | rfk->rfkill->state = RFKILL_STATE_HARD_BLOCKED; | ||
| 53 | return; | ||
| 54 | } | ||
| 55 | |||
| 56 | if (!dev->phy.radio_on) | ||
| 57 | rfk->rfkill->state = RFKILL_STATE_SOFT_BLOCKED; | ||
| 58 | else | ||
| 59 | rfk->rfkill->state = RFKILL_STATE_UNBLOCKED; | ||
| 60 | |||
| 61 | } | ||
| 62 | |||
| 63 | /* The poll callback for the hardware button. */ | 46 | /* The poll callback for the hardware button. */ |
| 64 | static void b43_rfkill_poll(struct input_polled_dev *poll_dev) | 47 | static void b43_rfkill_poll(struct input_polled_dev *poll_dev) |
| 65 | { | 48 | { |
| @@ -77,7 +60,6 @@ static void b43_rfkill_poll(struct input_polled_dev *poll_dev) | |||
| 77 | if (unlikely(enabled != dev->radio_hw_enable)) { | 60 | if (unlikely(enabled != dev->radio_hw_enable)) { |
| 78 | dev->radio_hw_enable = enabled; | 61 | dev->radio_hw_enable = enabled; |
| 79 | report_change = 1; | 62 | report_change = 1; |
| 80 | b43_rfkill_update_state(dev); | ||
| 81 | b43info(wl, "Radio hardware status changed to %s\n", | 63 | b43info(wl, "Radio hardware status changed to %s\n", |
| 82 | enabled ? "ENABLED" : "DISABLED"); | 64 | enabled ? "ENABLED" : "DISABLED"); |
| 83 | } | 65 | } |
diff --git a/drivers/net/wireless/b43legacy/rfkill.c b/drivers/net/wireless/b43legacy/rfkill.c index 476add97e974..b32bf6a94f19 100644 --- a/drivers/net/wireless/b43legacy/rfkill.c +++ b/drivers/net/wireless/b43legacy/rfkill.c | |||
| @@ -44,23 +44,6 @@ static bool b43legacy_is_hw_radio_enabled(struct b43legacy_wldev *dev) | |||
| 44 | return 0; | 44 | return 0; |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | /* Update the rfkill state */ | ||
| 48 | static void b43legacy_rfkill_update_state(struct b43legacy_wldev *dev) | ||
| 49 | { | ||
| 50 | struct b43legacy_rfkill *rfk = &(dev->wl->rfkill); | ||
| 51 | |||
| 52 | if (!dev->radio_hw_enable) { | ||
| 53 | rfk->rfkill->state = RFKILL_STATE_HARD_BLOCKED; | ||
| 54 | return; | ||
| 55 | } | ||
| 56 | |||
| 57 | if (!dev->phy.radio_on) | ||
| 58 | rfk->rfkill->state = RFKILL_STATE_SOFT_BLOCKED; | ||
| 59 | else | ||
| 60 | rfk->rfkill->state = RFKILL_STATE_UNBLOCKED; | ||
| 61 | |||
| 62 | } | ||
| 63 | |||
| 64 | /* The poll callback for the hardware button. */ | 47 | /* The poll callback for the hardware button. */ |
| 65 | static void b43legacy_rfkill_poll(struct input_polled_dev *poll_dev) | 48 | static void b43legacy_rfkill_poll(struct input_polled_dev *poll_dev) |
| 66 | { | 49 | { |
| @@ -78,7 +61,6 @@ static void b43legacy_rfkill_poll(struct input_polled_dev *poll_dev) | |||
| 78 | if (unlikely(enabled != dev->radio_hw_enable)) { | 61 | if (unlikely(enabled != dev->radio_hw_enable)) { |
| 79 | dev->radio_hw_enable = enabled; | 62 | dev->radio_hw_enable = enabled; |
| 80 | report_change = 1; | 63 | report_change = 1; |
| 81 | b43legacy_rfkill_update_state(dev); | ||
| 82 | b43legacyinfo(wl, "Radio hardware status changed to %s\n", | 64 | b43legacyinfo(wl, "Radio hardware status changed to %s\n", |
| 83 | enabled ? "ENABLED" : "DISABLED"); | 65 | enabled ? "ENABLED" : "DISABLED"); |
| 84 | } | 66 | } |
