diff options
-rw-r--r-- | drivers/net/chelsio/my3126.c | 5 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 6 | ||||
-rw-r--r-- | drivers/net/forcedeth.c | 111 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb.h | 1 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_ethtool.c | 1 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_hw.c | 3 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 57 | ||||
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/qla3xxx.c | 38 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2100.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/Kconfig | 5 | ||||
-rw-r--r-- | drivers/s390/net/qeth.h | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth_main.c | 217 | ||||
-rw-r--r-- | include/net/ieee80211.h | 2 |
14 files changed, 236 insertions, 216 deletions
diff --git a/drivers/net/chelsio/my3126.c b/drivers/net/chelsio/my3126.c index c7731b6f9de3..82fed1dd5005 100644 --- a/drivers/net/chelsio/my3126.c +++ b/drivers/net/chelsio/my3126.c | |||
@@ -170,9 +170,10 @@ static struct cphy *my3126_phy_create(adapter_t *adapter, | |||
170 | { | 170 | { |
171 | struct cphy *cphy = kzalloc(sizeof (*cphy), GFP_KERNEL); | 171 | struct cphy *cphy = kzalloc(sizeof (*cphy), GFP_KERNEL); |
172 | 172 | ||
173 | if (cphy) | 173 | if (!cphy) |
174 | cphy_init(cphy, adapter, phy_addr, &my3126_ops, mdio_ops); | 174 | return NULL; |
175 | 175 | ||
176 | cphy_init(cphy, adapter, phy_addr, &my3126_ops, mdio_ops); | ||
176 | INIT_DELAYED_WORK(&cphy->phy_update, my3216_poll); | 177 | INIT_DELAYED_WORK(&cphy->phy_update, my3216_poll); |
177 | cphy->bmsr = 0; | 178 | cphy->bmsr = 0; |
178 | 179 | ||
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 4c1ff752048c..c6259c7127f6 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -995,12 +995,6 @@ e1000_probe(struct pci_dev *pdev, | |||
995 | (adapter->hw.mac_type != e1000_82547)) | 995 | (adapter->hw.mac_type != e1000_82547)) |
996 | netdev->features |= NETIF_F_TSO; | 996 | netdev->features |= NETIF_F_TSO; |
997 | 997 | ||
998 | #ifdef CONFIG_DEBUG_SLAB | ||
999 | /* 82544's work arounds do not play nicely with DEBUG SLAB */ | ||
1000 | if (adapter->hw.mac_type == e1000_82544) | ||
1001 | netdev->features &= ~NETIF_F_TSO; | ||
1002 | #endif | ||
1003 | |||
1004 | #ifdef NETIF_F_TSO6 | 998 | #ifdef NETIF_F_TSO6 |
1005 | if (adapter->hw.mac_type > e1000_82547_rev_2) | 999 | if (adapter->hw.mac_type > e1000_82547_rev_2) |
1006 | netdev->features |= NETIF_F_TSO6; | 1000 | netdev->features |= NETIF_F_TSO6; |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 2f48fe9a29a7..93f2b7a22160 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -234,6 +234,7 @@ enum { | |||
234 | #define NVREG_XMITCTL_HOST_SEMA_MASK 0x0000f000 | 234 | #define NVREG_XMITCTL_HOST_SEMA_MASK 0x0000f000 |
235 | #define NVREG_XMITCTL_HOST_SEMA_ACQ 0x0000f000 | 235 | #define NVREG_XMITCTL_HOST_SEMA_ACQ 0x0000f000 |
236 | #define NVREG_XMITCTL_HOST_LOADED 0x00004000 | 236 | #define NVREG_XMITCTL_HOST_LOADED 0x00004000 |
237 | #define NVREG_XMITCTL_TX_PATH_EN 0x01000000 | ||
237 | NvRegTransmitterStatus = 0x088, | 238 | NvRegTransmitterStatus = 0x088, |
238 | #define NVREG_XMITSTAT_BUSY 0x01 | 239 | #define NVREG_XMITSTAT_BUSY 0x01 |
239 | 240 | ||
@@ -249,6 +250,7 @@ enum { | |||
249 | #define NVREG_OFFLOAD_NORMAL RX_NIC_BUFSIZE | 250 | #define NVREG_OFFLOAD_NORMAL RX_NIC_BUFSIZE |
250 | NvRegReceiverControl = 0x094, | 251 | NvRegReceiverControl = 0x094, |
251 | #define NVREG_RCVCTL_START 0x01 | 252 | #define NVREG_RCVCTL_START 0x01 |
253 | #define NVREG_RCVCTL_RX_PATH_EN 0x01000000 | ||
252 | NvRegReceiverStatus = 0x98, | 254 | NvRegReceiverStatus = 0x98, |
253 | #define NVREG_RCVSTAT_BUSY 0x01 | 255 | #define NVREG_RCVSTAT_BUSY 0x01 |
254 | 256 | ||
@@ -1169,16 +1171,21 @@ static void nv_start_rx(struct net_device *dev) | |||
1169 | { | 1171 | { |
1170 | struct fe_priv *np = netdev_priv(dev); | 1172 | struct fe_priv *np = netdev_priv(dev); |
1171 | u8 __iomem *base = get_hwbase(dev); | 1173 | u8 __iomem *base = get_hwbase(dev); |
1174 | u32 rx_ctrl = readl(base + NvRegReceiverControl); | ||
1172 | 1175 | ||
1173 | dprintk(KERN_DEBUG "%s: nv_start_rx\n", dev->name); | 1176 | dprintk(KERN_DEBUG "%s: nv_start_rx\n", dev->name); |
1174 | /* Already running? Stop it. */ | 1177 | /* Already running? Stop it. */ |
1175 | if (readl(base + NvRegReceiverControl) & NVREG_RCVCTL_START) { | 1178 | if ((readl(base + NvRegReceiverControl) & NVREG_RCVCTL_START) && !np->mac_in_use) { |
1176 | writel(0, base + NvRegReceiverControl); | 1179 | rx_ctrl &= ~NVREG_RCVCTL_START; |
1180 | writel(rx_ctrl, base + NvRegReceiverControl); | ||
1177 | pci_push(base); | 1181 | pci_push(base); |
1178 | } | 1182 | } |
1179 | writel(np->linkspeed, base + NvRegLinkSpeed); | 1183 | writel(np->linkspeed, base + NvRegLinkSpeed); |
1180 | pci_push(base); | 1184 | pci_push(base); |
1181 | writel(NVREG_RCVCTL_START, base + NvRegReceiverControl); | 1185 | rx_ctrl |= NVREG_RCVCTL_START; |
1186 | if (np->mac_in_use) | ||
1187 | rx_ctrl &= ~NVREG_RCVCTL_RX_PATH_EN; | ||
1188 | writel(rx_ctrl, base + NvRegReceiverControl); | ||
1182 | dprintk(KERN_DEBUG "%s: nv_start_rx to duplex %d, speed 0x%08x.\n", | 1189 | dprintk(KERN_DEBUG "%s: nv_start_rx to duplex %d, speed 0x%08x.\n", |
1183 | dev->name, np->duplex, np->linkspeed); | 1190 | dev->name, np->duplex, np->linkspeed); |
1184 | pci_push(base); | 1191 | pci_push(base); |
@@ -1186,39 +1193,59 @@ static void nv_start_rx(struct net_device *dev) | |||
1186 | 1193 | ||
1187 | static void nv_stop_rx(struct net_device *dev) | 1194 | static void nv_stop_rx(struct net_device *dev) |
1188 | { | 1195 | { |
1196 | struct fe_priv *np = netdev_priv(dev); | ||
1189 | u8 __iomem *base = get_hwbase(dev); | 1197 | u8 __iomem *base = get_hwbase(dev); |
1198 | u32 rx_ctrl = readl(base + NvRegReceiverControl); | ||
1190 | 1199 | ||
1191 | dprintk(KERN_DEBUG "%s: nv_stop_rx\n", dev->name); | 1200 | dprintk(KERN_DEBUG "%s: nv_stop_rx\n", dev->name); |
1192 | writel(0, base + NvRegReceiverControl); | 1201 | if (!np->mac_in_use) |
1202 | rx_ctrl &= ~NVREG_RCVCTL_START; | ||
1203 | else | ||
1204 | rx_ctrl |= NVREG_RCVCTL_RX_PATH_EN; | ||
1205 | writel(rx_ctrl, base + NvRegReceiverControl); | ||
1193 | reg_delay(dev, NvRegReceiverStatus, NVREG_RCVSTAT_BUSY, 0, | 1206 | reg_delay(dev, NvRegReceiverStatus, NVREG_RCVSTAT_BUSY, 0, |
1194 | NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX, | 1207 | NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX, |
1195 | KERN_INFO "nv_stop_rx: ReceiverStatus remained busy"); | 1208 | KERN_INFO "nv_stop_rx: ReceiverStatus remained busy"); |
1196 | 1209 | ||
1197 | udelay(NV_RXSTOP_DELAY2); | 1210 | udelay(NV_RXSTOP_DELAY2); |
1198 | writel(0, base + NvRegLinkSpeed); | 1211 | if (!np->mac_in_use) |
1212 | writel(0, base + NvRegLinkSpeed); | ||
1199 | } | 1213 | } |
1200 | 1214 | ||
1201 | static void nv_start_tx(struct net_device *dev) | 1215 | static void nv_start_tx(struct net_device *dev) |
1202 | { | 1216 | { |
1217 | struct fe_priv *np = netdev_priv(dev); | ||
1203 | u8 __iomem *base = get_hwbase(dev); | 1218 | u8 __iomem *base = get_hwbase(dev); |
1219 | u32 tx_ctrl = readl(base + NvRegTransmitterControl); | ||
1204 | 1220 | ||
1205 | dprintk(KERN_DEBUG "%s: nv_start_tx\n", dev->name); | 1221 | dprintk(KERN_DEBUG "%s: nv_start_tx\n", dev->name); |
1206 | writel(NVREG_XMITCTL_START, base + NvRegTransmitterControl); | 1222 | tx_ctrl |= NVREG_XMITCTL_START; |
1223 | if (np->mac_in_use) | ||
1224 | tx_ctrl &= ~NVREG_XMITCTL_TX_PATH_EN; | ||
1225 | writel(tx_ctrl, base + NvRegTransmitterControl); | ||
1207 | pci_push(base); | 1226 | pci_push(base); |
1208 | } | 1227 | } |
1209 | 1228 | ||
1210 | static void nv_stop_tx(struct net_device *dev) | 1229 | static void nv_stop_tx(struct net_device *dev) |
1211 | { | 1230 | { |
1231 | struct fe_priv *np = netdev_priv(dev); | ||
1212 | u8 __iomem *base = get_hwbase(dev); | 1232 | u8 __iomem *base = get_hwbase(dev); |
1233 | u32 tx_ctrl = readl(base + NvRegTransmitterControl); | ||
1213 | 1234 | ||
1214 | dprintk(KERN_DEBUG "%s: nv_stop_tx\n", dev->name); | 1235 | dprintk(KERN_DEBUG "%s: nv_stop_tx\n", dev->name); |
1215 | writel(0, base + NvRegTransmitterControl); | 1236 | if (!np->mac_in_use) |
1237 | tx_ctrl &= ~NVREG_XMITCTL_START; | ||
1238 | else | ||
1239 | tx_ctrl |= NVREG_XMITCTL_TX_PATH_EN; | ||
1240 | writel(tx_ctrl, base + NvRegTransmitterControl); | ||
1216 | reg_delay(dev, NvRegTransmitterStatus, NVREG_XMITSTAT_BUSY, 0, | 1241 | reg_delay(dev, NvRegTransmitterStatus, NVREG_XMITSTAT_BUSY, 0, |
1217 | NV_TXSTOP_DELAY1, NV_TXSTOP_DELAY1MAX, | 1242 | NV_TXSTOP_DELAY1, NV_TXSTOP_DELAY1MAX, |
1218 | KERN_INFO "nv_stop_tx: TransmitterStatus remained busy"); | 1243 | KERN_INFO "nv_stop_tx: TransmitterStatus remained busy"); |
1219 | 1244 | ||
1220 | udelay(NV_TXSTOP_DELAY2); | 1245 | udelay(NV_TXSTOP_DELAY2); |
1221 | writel(readl(base + NvRegTransmitPoll) & NVREG_TRANSMITPOLL_MAC_ADDR_REV, base + NvRegTransmitPoll); | 1246 | if (!np->mac_in_use) |
1247 | writel(readl(base + NvRegTransmitPoll) & NVREG_TRANSMITPOLL_MAC_ADDR_REV, | ||
1248 | base + NvRegTransmitPoll); | ||
1222 | } | 1249 | } |
1223 | 1250 | ||
1224 | static void nv_txrx_reset(struct net_device *dev) | 1251 | static void nv_txrx_reset(struct net_device *dev) |
@@ -4148,20 +4175,6 @@ static int nv_mgmt_acquire_sema(struct net_device *dev) | |||
4148 | return 0; | 4175 | return 0; |
4149 | } | 4176 | } |
4150 | 4177 | ||
4151 | /* Indicate to mgmt unit whether driver is loaded or not */ | ||
4152 | static void nv_mgmt_driver_loaded(struct net_device *dev, int loaded) | ||
4153 | { | ||
4154 | u8 __iomem *base = get_hwbase(dev); | ||
4155 | u32 tx_ctrl; | ||
4156 | |||
4157 | tx_ctrl = readl(base + NvRegTransmitterControl); | ||
4158 | if (loaded) | ||
4159 | tx_ctrl |= NVREG_XMITCTL_HOST_LOADED; | ||
4160 | else | ||
4161 | tx_ctrl &= ~NVREG_XMITCTL_HOST_LOADED; | ||
4162 | writel(tx_ctrl, base + NvRegTransmitterControl); | ||
4163 | } | ||
4164 | |||
4165 | static int nv_open(struct net_device *dev) | 4178 | static int nv_open(struct net_device *dev) |
4166 | { | 4179 | { |
4167 | struct fe_priv *np = netdev_priv(dev); | 4180 | struct fe_priv *np = netdev_priv(dev); |
@@ -4659,33 +4672,24 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
4659 | writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); | 4672 | writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); |
4660 | 4673 | ||
4661 | if (id->driver_data & DEV_HAS_MGMT_UNIT) { | 4674 | if (id->driver_data & DEV_HAS_MGMT_UNIT) { |
4662 | writel(0x1, base + 0x204); pci_push(base); | ||
4663 | msleep(500); | ||
4664 | /* management unit running on the mac? */ | 4675 | /* management unit running on the mac? */ |
4665 | np->mac_in_use = readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_MGMT_ST; | 4676 | if (readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_PHY_INIT) { |
4666 | if (np->mac_in_use) { | 4677 | np->mac_in_use = readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_MGMT_ST; |
4667 | u32 mgmt_sync; | 4678 | dprintk(KERN_INFO "%s: mgmt unit is running. mac in use %x.\n", pci_name(pci_dev), np->mac_in_use); |
4668 | /* management unit setup the phy already? */ | 4679 | for (i = 0; i < 5000; i++) { |
4669 | mgmt_sync = readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_MASK; | 4680 | msleep(1); |
4670 | if (mgmt_sync == NVREG_XMITCTL_SYNC_NOT_READY) { | 4681 | if (nv_mgmt_acquire_sema(dev)) { |
4671 | if (!nv_mgmt_acquire_sema(dev)) { | 4682 | /* management unit setup the phy already? */ |
4672 | for (i = 0; i < 5000; i++) { | 4683 | if ((readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_MASK) == |
4673 | msleep(1); | 4684 | NVREG_XMITCTL_SYNC_PHY_INIT) { |
4674 | mgmt_sync = readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_MASK; | 4685 | /* phy is inited by mgmt unit */ |
4675 | if (mgmt_sync == NVREG_XMITCTL_SYNC_NOT_READY) | 4686 | phyinitialized = 1; |
4676 | continue; | 4687 | dprintk(KERN_INFO "%s: Phy already initialized by mgmt unit.\n", pci_name(pci_dev)); |
4677 | if (mgmt_sync == NVREG_XMITCTL_SYNC_PHY_INIT) | 4688 | } else { |
4678 | phyinitialized = 1; | 4689 | /* we need to init the phy */ |
4679 | break; | ||
4680 | } | 4690 | } |
4681 | } else { | 4691 | break; |
4682 | /* we need to init the phy */ | ||
4683 | } | 4692 | } |
4684 | } else if (mgmt_sync == NVREG_XMITCTL_SYNC_PHY_INIT) { | ||
4685 | /* phy is inited by SMU */ | ||
4686 | phyinitialized = 1; | ||
4687 | } else { | ||
4688 | /* we need to init the phy */ | ||
4689 | } | 4693 | } |
4690 | } | 4694 | } |
4691 | } | 4695 | } |
@@ -4724,10 +4728,12 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
4724 | if (!phyinitialized) { | 4728 | if (!phyinitialized) { |
4725 | /* reset it */ | 4729 | /* reset it */ |
4726 | phy_init(dev); | 4730 | phy_init(dev); |
4727 | } | 4731 | } else { |
4728 | 4732 | /* see if it is a gigabit phy */ | |
4729 | if (id->driver_data & DEV_HAS_MGMT_UNIT) { | 4733 | u32 mii_status = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); |
4730 | nv_mgmt_driver_loaded(dev, 1); | 4734 | if (mii_status & PHY_GIGABIT) { |
4735 | np->gigabit = PHY_GIGABIT; | ||
4736 | } | ||
4731 | } | 4737 | } |
4732 | 4738 | ||
4733 | /* set default link speed settings */ | 4739 | /* set default link speed settings */ |
@@ -4749,8 +4755,6 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
4749 | out_error: | 4755 | out_error: |
4750 | if (phystate_orig) | 4756 | if (phystate_orig) |
4751 | writel(phystate|NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); | 4757 | writel(phystate|NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); |
4752 | if (np->mac_in_use) | ||
4753 | nv_mgmt_driver_loaded(dev, 0); | ||
4754 | pci_set_drvdata(pci_dev, NULL); | 4758 | pci_set_drvdata(pci_dev, NULL); |
4755 | out_freering: | 4759 | out_freering: |
4756 | free_rings(dev); | 4760 | free_rings(dev); |
@@ -4780,9 +4784,6 @@ static void __devexit nv_remove(struct pci_dev *pci_dev) | |||
4780 | writel(np->orig_mac[0], base + NvRegMacAddrA); | 4784 | writel(np->orig_mac[0], base + NvRegMacAddrA); |
4781 | writel(np->orig_mac[1], base + NvRegMacAddrB); | 4785 | writel(np->orig_mac[1], base + NvRegMacAddrB); |
4782 | 4786 | ||
4783 | if (np->mac_in_use) | ||
4784 | nv_mgmt_driver_loaded(dev, 0); | ||
4785 | |||
4786 | /* free all structures */ | 4787 | /* free all structures */ |
4787 | free_rings(dev); | 4788 | free_rings(dev); |
4788 | iounmap(get_hwbase(dev)); | 4789 | iounmap(get_hwbase(dev)); |
diff --git a/drivers/net/ixgb/ixgb.h b/drivers/net/ixgb/ixgb.h index 50ffe90488ff..f4aba4355b19 100644 --- a/drivers/net/ixgb/ixgb.h +++ b/drivers/net/ixgb/ixgb.h | |||
@@ -171,6 +171,7 @@ struct ixgb_adapter { | |||
171 | 171 | ||
172 | /* TX */ | 172 | /* TX */ |
173 | struct ixgb_desc_ring tx_ring ____cacheline_aligned_in_smp; | 173 | struct ixgb_desc_ring tx_ring ____cacheline_aligned_in_smp; |
174 | unsigned int restart_queue; | ||
174 | unsigned long timeo_start; | 175 | unsigned long timeo_start; |
175 | uint32_t tx_cmd_type; | 176 | uint32_t tx_cmd_type; |
176 | uint64_t hw_csum_tx_good; | 177 | uint64_t hw_csum_tx_good; |
diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c index cd22523fb035..82c044d6e08a 100644 --- a/drivers/net/ixgb/ixgb_ethtool.c +++ b/drivers/net/ixgb/ixgb_ethtool.c | |||
@@ -79,6 +79,7 @@ static struct ixgb_stats ixgb_gstrings_stats[] = { | |||
79 | {"tx_window_errors", IXGB_STAT(net_stats.tx_window_errors)}, | 79 | {"tx_window_errors", IXGB_STAT(net_stats.tx_window_errors)}, |
80 | {"tx_deferred_ok", IXGB_STAT(stats.dc)}, | 80 | {"tx_deferred_ok", IXGB_STAT(stats.dc)}, |
81 | {"tx_timeout_count", IXGB_STAT(tx_timeout_count) }, | 81 | {"tx_timeout_count", IXGB_STAT(tx_timeout_count) }, |
82 | {"tx_restart_queue", IXGB_STAT(restart_queue) }, | ||
82 | {"rx_long_length_errors", IXGB_STAT(stats.roc)}, | 83 | {"rx_long_length_errors", IXGB_STAT(stats.roc)}, |
83 | {"rx_short_length_errors", IXGB_STAT(stats.ruc)}, | 84 | {"rx_short_length_errors", IXGB_STAT(stats.ruc)}, |
84 | #ifdef NETIF_F_TSO | 85 | #ifdef NETIF_F_TSO |
diff --git a/drivers/net/ixgb/ixgb_hw.c b/drivers/net/ixgb/ixgb_hw.c index 02089b64e42c..ecbf45861c68 100644 --- a/drivers/net/ixgb/ixgb_hw.c +++ b/drivers/net/ixgb/ixgb_hw.c | |||
@@ -399,8 +399,9 @@ ixgb_init_rx_addrs(struct ixgb_hw *hw) | |||
399 | /* Zero out the other 15 receive addresses. */ | 399 | /* Zero out the other 15 receive addresses. */ |
400 | DEBUGOUT("Clearing RAR[1-15]\n"); | 400 | DEBUGOUT("Clearing RAR[1-15]\n"); |
401 | for(i = 1; i < IXGB_RAR_ENTRIES; i++) { | 401 | for(i = 1; i < IXGB_RAR_ENTRIES; i++) { |
402 | IXGB_WRITE_REG_ARRAY(hw, RA, (i << 1), 0); | 402 | /* Write high reg first to disable the AV bit first */ |
403 | IXGB_WRITE_REG_ARRAY(hw, RA, ((i << 1) + 1), 0); | 403 | IXGB_WRITE_REG_ARRAY(hw, RA, ((i << 1) + 1), 0); |
404 | IXGB_WRITE_REG_ARRAY(hw, RA, (i << 1), 0); | ||
404 | } | 405 | } |
405 | 406 | ||
406 | return; | 407 | return; |
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index e628126c9c49..a083a9189230 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -36,7 +36,7 @@ static char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; | |||
36 | #else | 36 | #else |
37 | #define DRIVERNAPI "-NAPI" | 37 | #define DRIVERNAPI "-NAPI" |
38 | #endif | 38 | #endif |
39 | #define DRV_VERSION "1.0.117-k2"DRIVERNAPI | 39 | #define DRV_VERSION "1.0.126-k2"DRIVERNAPI |
40 | char ixgb_driver_version[] = DRV_VERSION; | 40 | char ixgb_driver_version[] = DRV_VERSION; |
41 | static char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; | 41 | static char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; |
42 | 42 | ||
@@ -1287,6 +1287,7 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb, | |||
1287 | struct ixgb_buffer *buffer_info; | 1287 | struct ixgb_buffer *buffer_info; |
1288 | int len = skb->len; | 1288 | int len = skb->len; |
1289 | unsigned int offset = 0, size, count = 0, i; | 1289 | unsigned int offset = 0, size, count = 0, i; |
1290 | unsigned int mss = skb_shinfo(skb)->gso_size; | ||
1290 | 1291 | ||
1291 | unsigned int nr_frags = skb_shinfo(skb)->nr_frags; | 1292 | unsigned int nr_frags = skb_shinfo(skb)->nr_frags; |
1292 | unsigned int f; | 1293 | unsigned int f; |
@@ -1298,6 +1299,11 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb, | |||
1298 | while(len) { | 1299 | while(len) { |
1299 | buffer_info = &tx_ring->buffer_info[i]; | 1300 | buffer_info = &tx_ring->buffer_info[i]; |
1300 | size = min(len, IXGB_MAX_DATA_PER_TXD); | 1301 | size = min(len, IXGB_MAX_DATA_PER_TXD); |
1302 | /* Workaround for premature desc write-backs | ||
1303 | * in TSO mode. Append 4-byte sentinel desc */ | ||
1304 | if (unlikely(mss && !nr_frags && size == len && size > 8)) | ||
1305 | size -= 4; | ||
1306 | |||
1301 | buffer_info->length = size; | 1307 | buffer_info->length = size; |
1302 | WARN_ON(buffer_info->dma != 0); | 1308 | WARN_ON(buffer_info->dma != 0); |
1303 | buffer_info->dma = | 1309 | buffer_info->dma = |
@@ -1324,6 +1330,13 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb, | |||
1324 | while(len) { | 1330 | while(len) { |
1325 | buffer_info = &tx_ring->buffer_info[i]; | 1331 | buffer_info = &tx_ring->buffer_info[i]; |
1326 | size = min(len, IXGB_MAX_DATA_PER_TXD); | 1332 | size = min(len, IXGB_MAX_DATA_PER_TXD); |
1333 | |||
1334 | /* Workaround for premature desc write-backs | ||
1335 | * in TSO mode. Append 4-byte sentinel desc */ | ||
1336 | if (unlikely(mss && !nr_frags && size == len | ||
1337 | && size > 8)) | ||
1338 | size -= 4; | ||
1339 | |||
1327 | buffer_info->length = size; | 1340 | buffer_info->length = size; |
1328 | buffer_info->dma = | 1341 | buffer_info->dma = |
1329 | pci_map_page(adapter->pdev, | 1342 | pci_map_page(adapter->pdev, |
@@ -1398,11 +1411,43 @@ ixgb_tx_queue(struct ixgb_adapter *adapter, int count, int vlan_id,int tx_flags) | |||
1398 | IXGB_WRITE_REG(&adapter->hw, TDT, i); | 1411 | IXGB_WRITE_REG(&adapter->hw, TDT, i); |
1399 | } | 1412 | } |
1400 | 1413 | ||
1414 | static int __ixgb_maybe_stop_tx(struct net_device *netdev, int size) | ||
1415 | { | ||
1416 | struct ixgb_adapter *adapter = netdev_priv(netdev); | ||
1417 | struct ixgb_desc_ring *tx_ring = &adapter->tx_ring; | ||
1418 | |||
1419 | netif_stop_queue(netdev); | ||
1420 | /* Herbert's original patch had: | ||
1421 | * smp_mb__after_netif_stop_queue(); | ||
1422 | * but since that doesn't exist yet, just open code it. */ | ||
1423 | smp_mb(); | ||
1424 | |||
1425 | /* We need to check again in a case another CPU has just | ||
1426 | * made room available. */ | ||
1427 | if (likely(IXGB_DESC_UNUSED(tx_ring) < size)) | ||
1428 | return -EBUSY; | ||
1429 | |||
1430 | /* A reprieve! */ | ||
1431 | netif_start_queue(netdev); | ||
1432 | ++adapter->restart_queue; | ||
1433 | return 0; | ||
1434 | } | ||
1435 | |||
1436 | static int ixgb_maybe_stop_tx(struct net_device *netdev, | ||
1437 | struct ixgb_desc_ring *tx_ring, int size) | ||
1438 | { | ||
1439 | if (likely(IXGB_DESC_UNUSED(tx_ring) >= size)) | ||
1440 | return 0; | ||
1441 | return __ixgb_maybe_stop_tx(netdev, size); | ||
1442 | } | ||
1443 | |||
1444 | |||
1401 | /* Tx Descriptors needed, worst case */ | 1445 | /* Tx Descriptors needed, worst case */ |
1402 | #define TXD_USE_COUNT(S) (((S) >> IXGB_MAX_TXD_PWR) + \ | 1446 | #define TXD_USE_COUNT(S) (((S) >> IXGB_MAX_TXD_PWR) + \ |
1403 | (((S) & (IXGB_MAX_DATA_PER_TXD - 1)) ? 1 : 0)) | 1447 | (((S) & (IXGB_MAX_DATA_PER_TXD - 1)) ? 1 : 0)) |
1404 | #define DESC_NEEDED TXD_USE_COUNT(IXGB_MAX_DATA_PER_TXD) + \ | 1448 | #define DESC_NEEDED TXD_USE_COUNT(IXGB_MAX_DATA_PER_TXD) /* skb->date */ + \ |
1405 | MAX_SKB_FRAGS * TXD_USE_COUNT(PAGE_SIZE) + 1 | 1449 | MAX_SKB_FRAGS * TXD_USE_COUNT(PAGE_SIZE) + 1 /* for context */ \ |
1450 | + 1 /* one more needed for sentinel TSO workaround */ | ||
1406 | 1451 | ||
1407 | static int | 1452 | static int |
1408 | ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | 1453 | ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev) |
@@ -1430,7 +1475,8 @@ ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
1430 | spin_lock_irqsave(&adapter->tx_lock, flags); | 1475 | spin_lock_irqsave(&adapter->tx_lock, flags); |
1431 | #endif | 1476 | #endif |
1432 | 1477 | ||
1433 | if(unlikely(IXGB_DESC_UNUSED(&adapter->tx_ring) < DESC_NEEDED)) { | 1478 | if (unlikely(ixgb_maybe_stop_tx(netdev, &adapter->tx_ring, |
1479 | DESC_NEEDED))) { | ||
1434 | netif_stop_queue(netdev); | 1480 | netif_stop_queue(netdev); |
1435 | spin_unlock_irqrestore(&adapter->tx_lock, flags); | 1481 | spin_unlock_irqrestore(&adapter->tx_lock, flags); |
1436 | return NETDEV_TX_BUSY; | 1482 | return NETDEV_TX_BUSY; |
@@ -1468,8 +1514,7 @@ ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
1468 | 1514 | ||
1469 | #ifdef NETIF_F_LLTX | 1515 | #ifdef NETIF_F_LLTX |
1470 | /* Make sure there is space in the ring for the next send. */ | 1516 | /* Make sure there is space in the ring for the next send. */ |
1471 | if(unlikely(IXGB_DESC_UNUSED(&adapter->tx_ring) < DESC_NEEDED)) | 1517 | ixgb_maybe_stop_tx(netdev, &adapter->tx_ring, DESC_NEEDED); |
1472 | netif_stop_queue(netdev); | ||
1473 | 1518 | ||
1474 | spin_unlock_irqrestore(&adapter->tx_lock, flags); | 1519 | spin_unlock_irqrestore(&adapter->tx_lock, flags); |
1475 | 1520 | ||
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 2b1238e2dbdb..d88e9b2e93cf 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -1617,6 +1617,7 @@ static struct pcmcia_device_id pcnet_ids[] = { | |||
1617 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FastEther PCC-TX", 0x5261440f, 0x485e85d9), | 1617 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FastEther PCC-TX", 0x5261440f, 0x485e85d9), |
1618 | PCMCIA_DEVICE_PROD_ID12("Corega,K.K.", "Ethernet LAN Card", 0x110d26d9, 0x9fd2f0a2), | 1618 | PCMCIA_DEVICE_PROD_ID12("Corega,K.K.", "Ethernet LAN Card", 0x110d26d9, 0x9fd2f0a2), |
1619 | PCMCIA_DEVICE_PROD_ID12("corega,K.K.", "Ethernet LAN Card", 0x9791a90e, 0x9fd2f0a2), | 1619 | PCMCIA_DEVICE_PROD_ID12("corega,K.K.", "Ethernet LAN Card", 0x9791a90e, 0x9fd2f0a2), |
1620 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "(CG-LAPCCTXD)", 0x5261440f, 0x73ec0d88), | ||
1620 | PCMCIA_DEVICE_PROD_ID12("CouplerlessPCMCIA", "100BASE", 0xee5af0ad, 0x7c2add04), | 1621 | PCMCIA_DEVICE_PROD_ID12("CouplerlessPCMCIA", "100BASE", 0xee5af0ad, 0x7c2add04), |
1621 | PCMCIA_DEVICE_PROD_ID12("CyQ've", "ELA-010", 0x77008979, 0x9d8d445d), | 1622 | PCMCIA_DEVICE_PROD_ID12("CyQ've", "ELA-010", 0x77008979, 0x9d8d445d), |
1622 | PCMCIA_DEVICE_PROD_ID12("CyQ've", "ELA-110E 10/100M LAN Card", 0x77008979, 0xfd184814), | 1623 | PCMCIA_DEVICE_PROD_ID12("CyQ've", "ELA-110E 10/100M LAN Card", 0x77008979, 0xfd184814), |
@@ -1667,6 +1668,7 @@ static struct pcmcia_device_id pcnet_ids[] = { | |||
1667 | PCMCIA_DEVICE_PROD_ID12("Logitec", "LPM-LN100TX", 0x88fcdeda, 0x6d772737), | 1668 | PCMCIA_DEVICE_PROD_ID12("Logitec", "LPM-LN100TX", 0x88fcdeda, 0x6d772737), |
1668 | PCMCIA_DEVICE_PROD_ID12("Logitec", "LPM-LN100TE", 0x88fcdeda, 0x0e714bee), | 1669 | PCMCIA_DEVICE_PROD_ID12("Logitec", "LPM-LN100TE", 0x88fcdeda, 0x0e714bee), |
1669 | PCMCIA_DEVICE_PROD_ID12("Logitec", "LPM-LN20T", 0x88fcdeda, 0x81090922), | 1670 | PCMCIA_DEVICE_PROD_ID12("Logitec", "LPM-LN20T", 0x88fcdeda, 0x81090922), |
1671 | PCMCIA_DEVICE_PROD_ID12("Logitec", "LPM-LN10TE", 0x88fcdeda, 0xc1e2521c), | ||
1670 | PCMCIA_DEVICE_PROD_ID12("LONGSHINE", "PCMCIA Ethernet Card", 0xf866b0b0, 0x6f6652e0), | 1672 | PCMCIA_DEVICE_PROD_ID12("LONGSHINE", "PCMCIA Ethernet Card", 0xf866b0b0, 0x6f6652e0), |
1671 | PCMCIA_DEVICE_PROD_ID12("MACNICA", "ME1-JEIDA", 0x20841b68, 0xaf8a3578), | 1673 | PCMCIA_DEVICE_PROD_ID12("MACNICA", "ME1-JEIDA", 0x20841b68, 0xaf8a3578), |
1672 | PCMCIA_DEVICE_PROD_ID12("Macsense", "MPC-10", 0xd830297f, 0xd265c307), | 1674 | PCMCIA_DEVICE_PROD_ID12("Macsense", "MPC-10", 0xd830297f, 0xd265c307), |
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index d79d141a601d..8844c20eac2d 100644 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c | |||
@@ -208,6 +208,15 @@ static void ql_write_common_reg(struct ql3_adapter *qdev, | |||
208 | return; | 208 | return; |
209 | } | 209 | } |
210 | 210 | ||
211 | static void ql_write_nvram_reg(struct ql3_adapter *qdev, | ||
212 | u32 __iomem *reg, u32 value) | ||
213 | { | ||
214 | writel(value, reg); | ||
215 | readl(reg); | ||
216 | udelay(1); | ||
217 | return; | ||
218 | } | ||
219 | |||
211 | static void ql_write_page0_reg(struct ql3_adapter *qdev, | 220 | static void ql_write_page0_reg(struct ql3_adapter *qdev, |
212 | u32 __iomem *reg, u32 value) | 221 | u32 __iomem *reg, u32 value) |
213 | { | 222 | { |
@@ -336,9 +345,9 @@ static void fm93c56a_select(struct ql3_adapter *qdev) | |||
336 | qdev->mem_map_registers; | 345 | qdev->mem_map_registers; |
337 | 346 | ||
338 | qdev->eeprom_cmd_data = AUBURN_EEPROM_CS_1; | 347 | qdev->eeprom_cmd_data = AUBURN_EEPROM_CS_1; |
339 | ql_write_common_reg(qdev, &port_regs->CommonRegs.serialPortInterfaceReg, | 348 | ql_write_nvram_reg(qdev, &port_regs->CommonRegs.serialPortInterfaceReg, |
340 | ISP_NVRAM_MASK | qdev->eeprom_cmd_data); | 349 | ISP_NVRAM_MASK | qdev->eeprom_cmd_data); |
341 | ql_write_common_reg(qdev, &port_regs->CommonRegs.serialPortInterfaceReg, | 350 | ql_write_nvram_reg(qdev, &port_regs->CommonRegs.serialPortInterfaceReg, |
342 | ((ISP_NVRAM_MASK << 16) | qdev->eeprom_cmd_data)); | 351 | ((ISP_NVRAM_MASK << 16) | qdev->eeprom_cmd_data)); |
343 | } | 352 | } |
344 | 353 | ||
@@ -355,14 +364,14 @@ static void fm93c56a_cmd(struct ql3_adapter *qdev, u32 cmd, u32 eepromAddr) | |||
355 | qdev->mem_map_registers; | 364 | qdev->mem_map_registers; |
356 | 365 | ||
357 | /* Clock in a zero, then do the start bit */ | 366 | /* Clock in a zero, then do the start bit */ |
358 | ql_write_common_reg(qdev, &port_regs->CommonRegs.serialPortInterfaceReg, | 367 | ql_write_nvram_reg(qdev, &port_regs->CommonRegs.serialPortInterfaceReg, |
359 | ISP_NVRAM_MASK | qdev->eeprom_cmd_data | | 368 | ISP_NVRAM_MASK | qdev->eeprom_cmd_data | |
360 | AUBURN_EEPROM_DO_1); | 369 | AUBURN_EEPROM_DO_1); |
361 | ql_write_common_reg(qdev, &port_regs->CommonRegs.serialPortInterfaceReg, | 370 | ql_write_nvram_reg(qdev, &port_regs->CommonRegs.serialPortInterfaceReg, |
362 | ISP_NVRAM_MASK | qdev-> | 371 | ISP_NVRAM_MASK | qdev-> |
363 | eeprom_cmd_data | AUBURN_EEPROM_DO_1 | | 372 | eeprom_cmd_data | AUBURN_EEPROM_DO_1 | |
364 | AUBURN_EEPROM_CLK_RISE); | 373 | AUBURN_EEPROM_CLK_RISE); |
365 | ql_write_common_reg(qdev, &port_regs->CommonRegs.serialPortInterfaceReg, | 374 | ql_write_nvram_reg(qdev, &port_regs->CommonRegs.serialPortInterfaceReg, |
366 | ISP_NVRAM_MASK | qdev-> | 375 | ISP_NVRAM_MASK | qdev-> |
367 | eeprom_cmd_data | AUBURN_EEPROM_DO_1 | | 376 | eeprom_cmd_data | AUBURN_EEPROM_DO_1 | |
368 | AUBURN_EEPROM_CLK_FALL); | 377 | AUBURN_EEPROM_CLK_FALL); |
@@ -378,20 +387,20 @@ static void fm93c56a_cmd(struct ql3_adapter *qdev, u32 cmd, u32 eepromAddr) | |||
378 | * If the bit changed, then change the DO state to | 387 | * If the bit changed, then change the DO state to |
379 | * match | 388 | * match |
380 | */ | 389 | */ |
381 | ql_write_common_reg(qdev, | 390 | ql_write_nvram_reg(qdev, |
382 | &port_regs->CommonRegs. | 391 | &port_regs->CommonRegs. |
383 | serialPortInterfaceReg, | 392 | serialPortInterfaceReg, |
384 | ISP_NVRAM_MASK | qdev-> | 393 | ISP_NVRAM_MASK | qdev-> |
385 | eeprom_cmd_data | dataBit); | 394 | eeprom_cmd_data | dataBit); |
386 | previousBit = dataBit; | 395 | previousBit = dataBit; |
387 | } | 396 | } |
388 | ql_write_common_reg(qdev, | 397 | ql_write_nvram_reg(qdev, |
389 | &port_regs->CommonRegs. | 398 | &port_regs->CommonRegs. |
390 | serialPortInterfaceReg, | 399 | serialPortInterfaceReg, |
391 | ISP_NVRAM_MASK | qdev-> | 400 | ISP_NVRAM_MASK | qdev-> |
392 | eeprom_cmd_data | dataBit | | 401 | eeprom_cmd_data | dataBit | |
393 | AUBURN_EEPROM_CLK_RISE); | 402 | AUBURN_EEPROM_CLK_RISE); |
394 | ql_write_common_reg(qdev, | 403 | ql_write_nvram_reg(qdev, |
395 | &port_regs->CommonRegs. | 404 | &port_regs->CommonRegs. |
396 | serialPortInterfaceReg, | 405 | serialPortInterfaceReg, |
397 | ISP_NVRAM_MASK | qdev-> | 406 | ISP_NVRAM_MASK | qdev-> |
@@ -412,20 +421,20 @@ static void fm93c56a_cmd(struct ql3_adapter *qdev, u32 cmd, u32 eepromAddr) | |||
412 | * If the bit changed, then change the DO state to | 421 | * If the bit changed, then change the DO state to |
413 | * match | 422 | * match |
414 | */ | 423 | */ |
415 | ql_write_common_reg(qdev, | 424 | ql_write_nvram_reg(qdev, |
416 | &port_regs->CommonRegs. | 425 | &port_regs->CommonRegs. |
417 | serialPortInterfaceReg, | 426 | serialPortInterfaceReg, |
418 | ISP_NVRAM_MASK | qdev-> | 427 | ISP_NVRAM_MASK | qdev-> |
419 | eeprom_cmd_data | dataBit); | 428 | eeprom_cmd_data | dataBit); |
420 | previousBit = dataBit; | 429 | previousBit = dataBit; |
421 | } | 430 | } |
422 | ql_write_common_reg(qdev, | 431 | ql_write_nvram_reg(qdev, |
423 | &port_regs->CommonRegs. | 432 | &port_regs->CommonRegs. |
424 | serialPortInterfaceReg, | 433 | serialPortInterfaceReg, |
425 | ISP_NVRAM_MASK | qdev-> | 434 | ISP_NVRAM_MASK | qdev-> |
426 | eeprom_cmd_data | dataBit | | 435 | eeprom_cmd_data | dataBit | |
427 | AUBURN_EEPROM_CLK_RISE); | 436 | AUBURN_EEPROM_CLK_RISE); |
428 | ql_write_common_reg(qdev, | 437 | ql_write_nvram_reg(qdev, |
429 | &port_regs->CommonRegs. | 438 | &port_regs->CommonRegs. |
430 | serialPortInterfaceReg, | 439 | serialPortInterfaceReg, |
431 | ISP_NVRAM_MASK | qdev-> | 440 | ISP_NVRAM_MASK | qdev-> |
@@ -443,7 +452,7 @@ static void fm93c56a_deselect(struct ql3_adapter *qdev) | |||
443 | struct ql3xxx_port_registers __iomem *port_regs = | 452 | struct ql3xxx_port_registers __iomem *port_regs = |
444 | qdev->mem_map_registers; | 453 | qdev->mem_map_registers; |
445 | qdev->eeprom_cmd_data = AUBURN_EEPROM_CS_0; | 454 | qdev->eeprom_cmd_data = AUBURN_EEPROM_CS_0; |
446 | ql_write_common_reg(qdev, &port_regs->CommonRegs.serialPortInterfaceReg, | 455 | ql_write_nvram_reg(qdev, &port_regs->CommonRegs.serialPortInterfaceReg, |
447 | ISP_NVRAM_MASK | qdev->eeprom_cmd_data); | 456 | ISP_NVRAM_MASK | qdev->eeprom_cmd_data); |
448 | } | 457 | } |
449 | 458 | ||
@@ -461,12 +470,12 @@ static void fm93c56a_datain(struct ql3_adapter *qdev, unsigned short *value) | |||
461 | /* Read the data bits */ | 470 | /* Read the data bits */ |
462 | /* The first bit is a dummy. Clock right over it. */ | 471 | /* The first bit is a dummy. Clock right over it. */ |
463 | for (i = 0; i < dataBits; i++) { | 472 | for (i = 0; i < dataBits; i++) { |
464 | ql_write_common_reg(qdev, | 473 | ql_write_nvram_reg(qdev, |
465 | &port_regs->CommonRegs. | 474 | &port_regs->CommonRegs. |
466 | serialPortInterfaceReg, | 475 | serialPortInterfaceReg, |
467 | ISP_NVRAM_MASK | qdev->eeprom_cmd_data | | 476 | ISP_NVRAM_MASK | qdev->eeprom_cmd_data | |
468 | AUBURN_EEPROM_CLK_RISE); | 477 | AUBURN_EEPROM_CLK_RISE); |
469 | ql_write_common_reg(qdev, | 478 | ql_write_nvram_reg(qdev, |
470 | &port_regs->CommonRegs. | 479 | &port_regs->CommonRegs. |
471 | serialPortInterfaceReg, | 480 | serialPortInterfaceReg, |
472 | ISP_NVRAM_MASK | qdev->eeprom_cmd_data | | 481 | ISP_NVRAM_MASK | qdev->eeprom_cmd_data | |
@@ -3370,7 +3379,6 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev, | |||
3370 | SET_MODULE_OWNER(ndev); | 3379 | SET_MODULE_OWNER(ndev); |
3371 | SET_NETDEV_DEV(ndev, &pdev->dev); | 3380 | SET_NETDEV_DEV(ndev, &pdev->dev); |
3372 | 3381 | ||
3373 | ndev->features = NETIF_F_LLTX; | ||
3374 | if (pci_using_dac) | 3382 | if (pci_using_dac) |
3375 | ndev->features |= NETIF_F_HIGHDMA; | 3383 | ndev->features |= NETIF_F_HIGHDMA; |
3376 | 3384 | ||
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 0e94fbbf7a94..b85857a84870 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -2664,7 +2664,7 @@ static void __ipw2100_rx_process(struct ipw2100_priv *priv) | |||
2664 | break; | 2664 | break; |
2665 | } | 2665 | } |
2666 | #endif | 2666 | #endif |
2667 | if (stats.len < sizeof(u->rx_data.header)) | 2667 | if (stats.len < sizeof(struct ieee80211_hdr_3addr)) |
2668 | break; | 2668 | break; |
2669 | switch (WLAN_FC_GET_TYPE(u->rx_data.header.frame_ctl)) { | 2669 | switch (WLAN_FC_GET_TYPE(u->rx_data.header.frame_ctl)) { |
2670 | case IEEE80211_FTYPE_MGMT: | 2670 | case IEEE80211_FTYPE_MGMT: |
diff --git a/drivers/s390/net/Kconfig b/drivers/s390/net/Kconfig index 1a93fa684e9f..52625153a4f0 100644 --- a/drivers/s390/net/Kconfig +++ b/drivers/s390/net/Kconfig | |||
@@ -27,10 +27,7 @@ config IUCV | |||
27 | help | 27 | help |
28 | Select this option if you want to use inter-user communication | 28 | Select this option if you want to use inter-user communication |
29 | under VM or VIF. If unsure, say "Y" to enable a fast communication | 29 | under VM or VIF. If unsure, say "Y" to enable a fast communication |
30 | link between VM guests. At boot time the user ID of the guest needs | 30 | link between VM guests. |
31 | to be passed to the kernel. Note that both kernels need to be | ||
32 | compiled with this option and both need to be booted with the user ID | ||
33 | of the other VM guest. | ||
34 | 31 | ||
35 | config NETIUCV | 32 | config NETIUCV |
36 | tristate "IUCV network device support (VM only)" | 33 | tristate "IUCV network device support (VM only)" |
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h index 53c358c7d368..e95c281f1e36 100644 --- a/drivers/s390/net/qeth.h +++ b/drivers/s390/net/qeth.h | |||
@@ -710,7 +710,7 @@ struct qeth_reply { | |||
710 | int (*callback)(struct qeth_card *,struct qeth_reply *,unsigned long); | 710 | int (*callback)(struct qeth_card *,struct qeth_reply *,unsigned long); |
711 | u32 seqno; | 711 | u32 seqno; |
712 | unsigned long offset; | 712 | unsigned long offset; |
713 | int received; | 713 | atomic_t received; |
714 | int rc; | 714 | int rc; |
715 | void *param; | 715 | void *param; |
716 | struct qeth_card *card; | 716 | struct qeth_card *card; |
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 2bde4f1fb9c2..d2efa5ff125d 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -471,7 +471,7 @@ qeth_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
471 | channel->state == CH_STATE_UP) | 471 | channel->state == CH_STATE_UP) |
472 | qeth_issue_next_read(card); | 472 | qeth_issue_next_read(card); |
473 | 473 | ||
474 | tasklet_schedule(&channel->irq_tasklet); | 474 | qeth_irq_tasklet((unsigned long)channel); |
475 | return; | 475 | return; |
476 | out: | 476 | out: |
477 | wake_up(&card->wait_q); | 477 | wake_up(&card->wait_q); |
@@ -951,40 +951,6 @@ qeth_do_run_thread(struct qeth_card *card, unsigned long thread) | |||
951 | } | 951 | } |
952 | 952 | ||
953 | static int | 953 | static int |
954 | qeth_register_ip_addresses(void *ptr) | ||
955 | { | ||
956 | struct qeth_card *card; | ||
957 | |||
958 | card = (struct qeth_card *) ptr; | ||
959 | daemonize("qeth_reg_ip"); | ||
960 | QETH_DBF_TEXT(trace,4,"regipth1"); | ||
961 | if (!qeth_do_run_thread(card, QETH_SET_IP_THREAD)) | ||
962 | return 0; | ||
963 | QETH_DBF_TEXT(trace,4,"regipth2"); | ||
964 | qeth_set_ip_addr_list(card); | ||
965 | qeth_clear_thread_running_bit(card, QETH_SET_IP_THREAD); | ||
966 | return 0; | ||
967 | } | ||
968 | |||
969 | /* | ||
970 | * Drive the SET_PROMISC_MODE thread | ||
971 | */ | ||
972 | static int | ||
973 | qeth_set_promisc_mode(void *ptr) | ||
974 | { | ||
975 | struct qeth_card *card = (struct qeth_card *) ptr; | ||
976 | |||
977 | daemonize("qeth_setprm"); | ||
978 | QETH_DBF_TEXT(trace,4,"setprm1"); | ||
979 | if (!qeth_do_run_thread(card, QETH_SET_PROMISC_MODE_THREAD)) | ||
980 | return 0; | ||
981 | QETH_DBF_TEXT(trace,4,"setprm2"); | ||
982 | qeth_setadp_promisc_mode(card); | ||
983 | qeth_clear_thread_running_bit(card, QETH_SET_PROMISC_MODE_THREAD); | ||
984 | return 0; | ||
985 | } | ||
986 | |||
987 | static int | ||
988 | qeth_recover(void *ptr) | 954 | qeth_recover(void *ptr) |
989 | { | 955 | { |
990 | struct qeth_card *card; | 956 | struct qeth_card *card; |
@@ -1047,11 +1013,6 @@ qeth_start_kernel_thread(struct work_struct *work) | |||
1047 | if (card->read.state != CH_STATE_UP && | 1013 | if (card->read.state != CH_STATE_UP && |
1048 | card->write.state != CH_STATE_UP) | 1014 | card->write.state != CH_STATE_UP) |
1049 | return; | 1015 | return; |
1050 | |||
1051 | if (qeth_do_start_thread(card, QETH_SET_IP_THREAD)) | ||
1052 | kernel_thread(qeth_register_ip_addresses, (void *)card,SIGCHLD); | ||
1053 | if (qeth_do_start_thread(card, QETH_SET_PROMISC_MODE_THREAD)) | ||
1054 | kernel_thread(qeth_set_promisc_mode, (void *)card, SIGCHLD); | ||
1055 | if (qeth_do_start_thread(card, QETH_RECOVER_THREAD)) | 1016 | if (qeth_do_start_thread(card, QETH_RECOVER_THREAD)) |
1056 | kernel_thread(qeth_recover, (void *) card, SIGCHLD); | 1017 | kernel_thread(qeth_recover, (void *) card, SIGCHLD); |
1057 | } | 1018 | } |
@@ -1074,7 +1035,7 @@ qeth_set_intial_options(struct qeth_card *card) | |||
1074 | card->options.layer2 = 1; | 1035 | card->options.layer2 = 1; |
1075 | else | 1036 | else |
1076 | card->options.layer2 = 0; | 1037 | card->options.layer2 = 0; |
1077 | card->options.performance_stats = 1; | 1038 | card->options.performance_stats = 0; |
1078 | } | 1039 | } |
1079 | 1040 | ||
1080 | /** | 1041 | /** |
@@ -1613,8 +1574,6 @@ qeth_issue_next_read(struct qeth_card *card) | |||
1613 | return -ENOMEM; | 1574 | return -ENOMEM; |
1614 | } | 1575 | } |
1615 | qeth_setup_ccw(&card->read, iob->data, QETH_BUFSIZE); | 1576 | qeth_setup_ccw(&card->read, iob->data, QETH_BUFSIZE); |
1616 | wait_event(card->wait_q, | ||
1617 | atomic_cmpxchg(&card->read.irq_pending, 0, 1) == 0); | ||
1618 | QETH_DBF_TEXT(trace, 6, "noirqpnd"); | 1577 | QETH_DBF_TEXT(trace, 6, "noirqpnd"); |
1619 | rc = ccw_device_start(card->read.ccwdev, &card->read.ccw, | 1578 | rc = ccw_device_start(card->read.ccwdev, &card->read.ccw, |
1620 | (addr_t) iob, 0, 0); | 1579 | (addr_t) iob, 0, 0); |
@@ -1635,6 +1594,7 @@ qeth_alloc_reply(struct qeth_card *card) | |||
1635 | reply = kzalloc(sizeof(struct qeth_reply), GFP_ATOMIC); | 1594 | reply = kzalloc(sizeof(struct qeth_reply), GFP_ATOMIC); |
1636 | if (reply){ | 1595 | if (reply){ |
1637 | atomic_set(&reply->refcnt, 1); | 1596 | atomic_set(&reply->refcnt, 1); |
1597 | atomic_set(&reply->received, 0); | ||
1638 | reply->card = card; | 1598 | reply->card = card; |
1639 | }; | 1599 | }; |
1640 | return reply; | 1600 | return reply; |
@@ -1655,31 +1615,6 @@ qeth_put_reply(struct qeth_reply *reply) | |||
1655 | kfree(reply); | 1615 | kfree(reply); |
1656 | } | 1616 | } |
1657 | 1617 | ||
1658 | static void | ||
1659 | qeth_cmd_timeout(unsigned long data) | ||
1660 | { | ||
1661 | struct qeth_reply *reply, *list_reply, *r; | ||
1662 | unsigned long flags; | ||
1663 | |||
1664 | reply = (struct qeth_reply *) data; | ||
1665 | spin_lock_irqsave(&reply->card->lock, flags); | ||
1666 | list_for_each_entry_safe(list_reply, r, | ||
1667 | &reply->card->cmd_waiter_list, list) { | ||
1668 | if (reply == list_reply){ | ||
1669 | qeth_get_reply(reply); | ||
1670 | list_del_init(&reply->list); | ||
1671 | spin_unlock_irqrestore(&reply->card->lock, flags); | ||
1672 | reply->rc = -ETIME; | ||
1673 | reply->received = 1; | ||
1674 | wake_up(&reply->wait_q); | ||
1675 | qeth_put_reply(reply); | ||
1676 | return; | ||
1677 | } | ||
1678 | } | ||
1679 | spin_unlock_irqrestore(&reply->card->lock, flags); | ||
1680 | } | ||
1681 | |||
1682 | |||
1683 | static struct qeth_ipa_cmd * | 1618 | static struct qeth_ipa_cmd * |
1684 | qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) | 1619 | qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) |
1685 | { | 1620 | { |
@@ -1745,7 +1680,7 @@ qeth_clear_ipacmd_list(struct qeth_card *card) | |||
1745 | list_for_each_entry_safe(reply, r, &card->cmd_waiter_list, list) { | 1680 | list_for_each_entry_safe(reply, r, &card->cmd_waiter_list, list) { |
1746 | qeth_get_reply(reply); | 1681 | qeth_get_reply(reply); |
1747 | reply->rc = -EIO; | 1682 | reply->rc = -EIO; |
1748 | reply->received = 1; | 1683 | atomic_inc(&reply->received); |
1749 | list_del_init(&reply->list); | 1684 | list_del_init(&reply->list); |
1750 | wake_up(&reply->wait_q); | 1685 | wake_up(&reply->wait_q); |
1751 | qeth_put_reply(reply); | 1686 | qeth_put_reply(reply); |
@@ -1814,7 +1749,7 @@ qeth_send_control_data_cb(struct qeth_channel *channel, | |||
1814 | &card->cmd_waiter_list); | 1749 | &card->cmd_waiter_list); |
1815 | spin_unlock_irqrestore(&card->lock, flags); | 1750 | spin_unlock_irqrestore(&card->lock, flags); |
1816 | } else { | 1751 | } else { |
1817 | reply->received = 1; | 1752 | atomic_inc(&reply->received); |
1818 | wake_up(&reply->wait_q); | 1753 | wake_up(&reply->wait_q); |
1819 | } | 1754 | } |
1820 | qeth_put_reply(reply); | 1755 | qeth_put_reply(reply); |
@@ -1858,7 +1793,7 @@ qeth_send_control_data(struct qeth_card *card, int len, | |||
1858 | int rc; | 1793 | int rc; |
1859 | unsigned long flags; | 1794 | unsigned long flags; |
1860 | struct qeth_reply *reply = NULL; | 1795 | struct qeth_reply *reply = NULL; |
1861 | struct timer_list timer; | 1796 | unsigned long timeout; |
1862 | 1797 | ||
1863 | QETH_DBF_TEXT(trace, 2, "sendctl"); | 1798 | QETH_DBF_TEXT(trace, 2, "sendctl"); |
1864 | 1799 | ||
@@ -1873,21 +1808,20 @@ qeth_send_control_data(struct qeth_card *card, int len, | |||
1873 | reply->seqno = QETH_IDX_COMMAND_SEQNO; | 1808 | reply->seqno = QETH_IDX_COMMAND_SEQNO; |
1874 | else | 1809 | else |
1875 | reply->seqno = card->seqno.ipa++; | 1810 | reply->seqno = card->seqno.ipa++; |
1876 | init_timer(&timer); | ||
1877 | timer.function = qeth_cmd_timeout; | ||
1878 | timer.data = (unsigned long) reply; | ||
1879 | init_waitqueue_head(&reply->wait_q); | 1811 | init_waitqueue_head(&reply->wait_q); |
1880 | spin_lock_irqsave(&card->lock, flags); | 1812 | spin_lock_irqsave(&card->lock, flags); |
1881 | list_add_tail(&reply->list, &card->cmd_waiter_list); | 1813 | list_add_tail(&reply->list, &card->cmd_waiter_list); |
1882 | spin_unlock_irqrestore(&card->lock, flags); | 1814 | spin_unlock_irqrestore(&card->lock, flags); |
1883 | QETH_DBF_HEX(control, 2, iob->data, QETH_DBF_CONTROL_LEN); | 1815 | QETH_DBF_HEX(control, 2, iob->data, QETH_DBF_CONTROL_LEN); |
1884 | wait_event(card->wait_q, | 1816 | |
1885 | atomic_cmpxchg(&card->write.irq_pending, 0, 1) == 0); | 1817 | while (atomic_cmpxchg(&card->write.irq_pending, 0, 1)) ; |
1886 | qeth_prepare_control_data(card, len, iob); | 1818 | qeth_prepare_control_data(card, len, iob); |
1819 | |||
1887 | if (IS_IPA(iob->data)) | 1820 | if (IS_IPA(iob->data)) |
1888 | timer.expires = jiffies + QETH_IPA_TIMEOUT; | 1821 | timeout = jiffies + QETH_IPA_TIMEOUT; |
1889 | else | 1822 | else |
1890 | timer.expires = jiffies + QETH_TIMEOUT; | 1823 | timeout = jiffies + QETH_TIMEOUT; |
1824 | |||
1891 | QETH_DBF_TEXT(trace, 6, "noirqpnd"); | 1825 | QETH_DBF_TEXT(trace, 6, "noirqpnd"); |
1892 | spin_lock_irqsave(get_ccwdev_lock(card->write.ccwdev), flags); | 1826 | spin_lock_irqsave(get_ccwdev_lock(card->write.ccwdev), flags); |
1893 | rc = ccw_device_start(card->write.ccwdev, &card->write.ccw, | 1827 | rc = ccw_device_start(card->write.ccwdev, &card->write.ccw, |
@@ -1906,9 +1840,16 @@ qeth_send_control_data(struct qeth_card *card, int len, | |||
1906 | wake_up(&card->wait_q); | 1840 | wake_up(&card->wait_q); |
1907 | return rc; | 1841 | return rc; |
1908 | } | 1842 | } |
1909 | add_timer(&timer); | 1843 | while (!atomic_read(&reply->received)) { |
1910 | wait_event(reply->wait_q, reply->received); | 1844 | if (time_after(jiffies, timeout)) { |
1911 | del_timer_sync(&timer); | 1845 | spin_lock_irqsave(&reply->card->lock, flags); |
1846 | list_del_init(&reply->list); | ||
1847 | spin_unlock_irqrestore(&reply->card->lock, flags); | ||
1848 | reply->rc = -ETIME; | ||
1849 | atomic_inc(&reply->received); | ||
1850 | wake_up(&reply->wait_q); | ||
1851 | } | ||
1852 | }; | ||
1912 | rc = reply->rc; | 1853 | rc = reply->rc; |
1913 | qeth_put_reply(reply); | 1854 | qeth_put_reply(reply); |
1914 | return rc; | 1855 | return rc; |
@@ -2466,32 +2407,17 @@ qeth_rebuild_skb_fake_ll(struct qeth_card *card, struct sk_buff *skb, | |||
2466 | qeth_rebuild_skb_fake_ll_eth(card, skb, hdr); | 2407 | qeth_rebuild_skb_fake_ll_eth(card, skb, hdr); |
2467 | } | 2408 | } |
2468 | 2409 | ||
2469 | static inline __u16 | 2410 | static inline void |
2470 | qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, | 2411 | qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, |
2471 | struct qeth_hdr *hdr) | 2412 | struct qeth_hdr *hdr) |
2472 | { | 2413 | { |
2473 | unsigned short vlan_id = 0; | ||
2474 | #ifdef CONFIG_QETH_VLAN | ||
2475 | struct vlan_hdr *vhdr; | ||
2476 | #endif | ||
2477 | |||
2478 | skb->pkt_type = PACKET_HOST; | 2414 | skb->pkt_type = PACKET_HOST; |
2479 | skb->protocol = qeth_type_trans(skb, skb->dev); | 2415 | skb->protocol = qeth_type_trans(skb, skb->dev); |
2480 | if (card->options.checksum_type == NO_CHECKSUMMING) | 2416 | if (card->options.checksum_type == NO_CHECKSUMMING) |
2481 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 2417 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
2482 | else | 2418 | else |
2483 | skb->ip_summed = CHECKSUM_NONE; | 2419 | skb->ip_summed = CHECKSUM_NONE; |
2484 | #ifdef CONFIG_QETH_VLAN | ||
2485 | if (hdr->hdr.l2.flags[2] & (QETH_LAYER2_FLAG_VLAN)) { | ||
2486 | vhdr = (struct vlan_hdr *) skb->data; | ||
2487 | skb->protocol = | ||
2488 | __constant_htons(vhdr->h_vlan_encapsulated_proto); | ||
2489 | vlan_id = hdr->hdr.l2.vlan_id; | ||
2490 | skb_pull(skb, VLAN_HLEN); | ||
2491 | } | ||
2492 | #endif | ||
2493 | *((__u32 *)skb->cb) = ++card->seqno.pkt_seqno; | 2420 | *((__u32 *)skb->cb) = ++card->seqno.pkt_seqno; |
2494 | return vlan_id; | ||
2495 | } | 2421 | } |
2496 | 2422 | ||
2497 | static inline __u16 | 2423 | static inline __u16 |
@@ -2560,7 +2486,6 @@ qeth_process_inbound_buffer(struct qeth_card *card, | |||
2560 | int offset; | 2486 | int offset; |
2561 | int rxrc; | 2487 | int rxrc; |
2562 | __u16 vlan_tag = 0; | 2488 | __u16 vlan_tag = 0; |
2563 | __u16 *vlan_addr; | ||
2564 | 2489 | ||
2565 | /* get first element of current buffer */ | 2490 | /* get first element of current buffer */ |
2566 | element = (struct qdio_buffer_element *)&buf->buffer->element[0]; | 2491 | element = (struct qdio_buffer_element *)&buf->buffer->element[0]; |
@@ -2571,7 +2496,7 @@ qeth_process_inbound_buffer(struct qeth_card *card, | |||
2571 | &offset, &hdr))) { | 2496 | &offset, &hdr))) { |
2572 | skb->dev = card->dev; | 2497 | skb->dev = card->dev; |
2573 | if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) | 2498 | if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) |
2574 | vlan_tag = qeth_layer2_rebuild_skb(card, skb, hdr); | 2499 | qeth_layer2_rebuild_skb(card, skb, hdr); |
2575 | else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3) | 2500 | else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3) |
2576 | vlan_tag = qeth_rebuild_skb(card, skb, hdr); | 2501 | vlan_tag = qeth_rebuild_skb(card, skb, hdr); |
2577 | else { /*in case of OSN*/ | 2502 | else { /*in case of OSN*/ |
@@ -3968,13 +3893,22 @@ static inline struct sk_buff * | |||
3968 | qeth_prepare_skb(struct qeth_card *card, struct sk_buff *skb, | 3893 | qeth_prepare_skb(struct qeth_card *card, struct sk_buff *skb, |
3969 | struct qeth_hdr **hdr, int ipv) | 3894 | struct qeth_hdr **hdr, int ipv) |
3970 | { | 3895 | { |
3971 | struct sk_buff *new_skb; | 3896 | struct sk_buff *new_skb, *new_skb2; |
3972 | 3897 | ||
3973 | QETH_DBF_TEXT(trace, 6, "prepskb"); | 3898 | QETH_DBF_TEXT(trace, 6, "prepskb"); |
3974 | 3899 | new_skb = skb; | |
3975 | new_skb = qeth_realloc_headroom(card, skb, sizeof(struct qeth_hdr)); | 3900 | new_skb = qeth_pskb_unshare(skb, GFP_ATOMIC); |
3976 | if (new_skb == NULL) | 3901 | if (!new_skb) |
3902 | return NULL; | ||
3903 | new_skb2 = qeth_realloc_headroom(card, new_skb, | ||
3904 | sizeof(struct qeth_hdr)); | ||
3905 | if (!new_skb2) { | ||
3906 | __qeth_free_new_skb(skb, new_skb); | ||
3977 | return NULL; | 3907 | return NULL; |
3908 | } | ||
3909 | if (new_skb != skb) | ||
3910 | __qeth_free_new_skb(new_skb2, new_skb); | ||
3911 | new_skb = new_skb2; | ||
3978 | *hdr = __qeth_prepare_skb(card, new_skb, ipv); | 3912 | *hdr = __qeth_prepare_skb(card, new_skb, ipv); |
3979 | if (*hdr == NULL) { | 3913 | if (*hdr == NULL) { |
3980 | __qeth_free_new_skb(skb, new_skb); | 3914 | __qeth_free_new_skb(skb, new_skb); |
@@ -4844,9 +4778,11 @@ qeth_arp_query(struct qeth_card *card, char __user *udata) | |||
4844 | "(0x%x/%d)\n", | 4778 | "(0x%x/%d)\n", |
4845 | QETH_CARD_IFNAME(card), qeth_arp_get_error_cause(&rc), | 4779 | QETH_CARD_IFNAME(card), qeth_arp_get_error_cause(&rc), |
4846 | tmp, tmp); | 4780 | tmp, tmp); |
4847 | copy_to_user(udata, qinfo.udata, 4); | 4781 | if (copy_to_user(udata, qinfo.udata, 4)) |
4782 | rc = -EFAULT; | ||
4848 | } else { | 4783 | } else { |
4849 | copy_to_user(udata, qinfo.udata, qinfo.udata_len); | 4784 | if (copy_to_user(udata, qinfo.udata, qinfo.udata_len)) |
4785 | rc = -EFAULT; | ||
4850 | } | 4786 | } |
4851 | kfree(qinfo.udata); | 4787 | kfree(qinfo.udata); |
4852 | return rc; | 4788 | return rc; |
@@ -4992,8 +4928,10 @@ qeth_snmp_command(struct qeth_card *card, char __user *udata) | |||
4992 | if (rc) | 4928 | if (rc) |
4993 | PRINT_WARN("SNMP command failed on %s: (0x%x)\n", | 4929 | PRINT_WARN("SNMP command failed on %s: (0x%x)\n", |
4994 | QETH_CARD_IFNAME(card), rc); | 4930 | QETH_CARD_IFNAME(card), rc); |
4995 | else | 4931 | else { |
4996 | copy_to_user(udata, qinfo.udata, qinfo.udata_len); | 4932 | if (copy_to_user(udata, qinfo.udata, qinfo.udata_len)) |
4933 | rc = -EFAULT; | ||
4934 | } | ||
4997 | 4935 | ||
4998 | kfree(ureq); | 4936 | kfree(ureq); |
4999 | kfree(qinfo.udata); | 4937 | kfree(qinfo.udata); |
@@ -5544,12 +5482,10 @@ qeth_set_multicast_list(struct net_device *dev) | |||
5544 | qeth_add_multicast_ipv6(card); | 5482 | qeth_add_multicast_ipv6(card); |
5545 | #endif | 5483 | #endif |
5546 | out: | 5484 | out: |
5547 | if (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) | 5485 | qeth_set_ip_addr_list(card); |
5548 | schedule_work(&card->kernel_thread_starter); | ||
5549 | if (!qeth_adp_supported(card, IPA_SETADP_SET_PROMISC_MODE)) | 5486 | if (!qeth_adp_supported(card, IPA_SETADP_SET_PROMISC_MODE)) |
5550 | return; | 5487 | return; |
5551 | if (qeth_set_thread_start_bit(card, QETH_SET_PROMISC_MODE_THREAD)==0) | 5488 | qeth_setadp_promisc_mode(card); |
5552 | schedule_work(&card->kernel_thread_starter); | ||
5553 | } | 5489 | } |
5554 | 5490 | ||
5555 | static int | 5491 | static int |
@@ -6351,6 +6287,42 @@ static struct ethtool_ops qeth_ethtool_ops = { | |||
6351 | }; | 6287 | }; |
6352 | 6288 | ||
6353 | static int | 6289 | static int |
6290 | qeth_hard_header_parse(struct sk_buff *skb, unsigned char *haddr) | ||
6291 | { | ||
6292 | struct qeth_card *card; | ||
6293 | struct ethhdr *eth; | ||
6294 | |||
6295 | card = qeth_get_card_from_dev(skb->dev); | ||
6296 | if (card->options.layer2) | ||
6297 | goto haveheader; | ||
6298 | #ifdef CONFIG_QETH_IPV6 | ||
6299 | /* cause of the manipulated arp constructor and the ARP | ||
6300 | flag for OSAE devices we have some nasty exceptions */ | ||
6301 | if (card->info.type == QETH_CARD_TYPE_OSAE) { | ||
6302 | if (!card->options.fake_ll) { | ||
6303 | if ((skb->pkt_type==PACKET_OUTGOING) && | ||
6304 | (skb->protocol==ETH_P_IPV6)) | ||
6305 | goto haveheader; | ||
6306 | else | ||
6307 | return 0; | ||
6308 | } else { | ||
6309 | if ((skb->pkt_type==PACKET_OUTGOING) && | ||
6310 | (skb->protocol==ETH_P_IP)) | ||
6311 | return 0; | ||
6312 | else | ||
6313 | goto haveheader; | ||
6314 | } | ||
6315 | } | ||
6316 | #endif | ||
6317 | if (!card->options.fake_ll) | ||
6318 | return 0; | ||
6319 | haveheader: | ||
6320 | eth = eth_hdr(skb); | ||
6321 | memcpy(haddr, eth->h_source, ETH_ALEN); | ||
6322 | return ETH_ALEN; | ||
6323 | } | ||
6324 | |||
6325 | static int | ||
6354 | qeth_netdev_init(struct net_device *dev) | 6326 | qeth_netdev_init(struct net_device *dev) |
6355 | { | 6327 | { |
6356 | struct qeth_card *card; | 6328 | struct qeth_card *card; |
@@ -6388,7 +6360,10 @@ qeth_netdev_init(struct net_device *dev) | |||
6388 | if (card->options.fake_ll && | 6360 | if (card->options.fake_ll && |
6389 | (qeth_get_netdev_flags(card) & IFF_NOARP)) | 6361 | (qeth_get_netdev_flags(card) & IFF_NOARP)) |
6390 | dev->hard_header = qeth_fake_header; | 6362 | dev->hard_header = qeth_fake_header; |
6391 | dev->hard_header_parse = NULL; | 6363 | if (dev->type == ARPHRD_IEEE802_TR) |
6364 | dev->hard_header_parse = NULL; | ||
6365 | else | ||
6366 | dev->hard_header_parse = qeth_hard_header_parse; | ||
6392 | dev->set_mac_address = qeth_layer2_set_mac_address; | 6367 | dev->set_mac_address = qeth_layer2_set_mac_address; |
6393 | dev->flags |= qeth_get_netdev_flags(card); | 6368 | dev->flags |= qeth_get_netdev_flags(card); |
6394 | if ((card->options.fake_broadcast) || | 6369 | if ((card->options.fake_broadcast) || |
@@ -8235,8 +8210,7 @@ qeth_add_vipa(struct qeth_card *card, enum qeth_prot_versions proto, | |||
8235 | } | 8210 | } |
8236 | if (!qeth_add_ip(card, ipaddr)) | 8211 | if (!qeth_add_ip(card, ipaddr)) |
8237 | kfree(ipaddr); | 8212 | kfree(ipaddr); |
8238 | if (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) | 8213 | qeth_set_ip_addr_list(card); |
8239 | schedule_work(&card->kernel_thread_starter); | ||
8240 | return rc; | 8214 | return rc; |
8241 | } | 8215 | } |
8242 | 8216 | ||
@@ -8264,8 +8238,7 @@ qeth_del_vipa(struct qeth_card *card, enum qeth_prot_versions proto, | |||
8264 | return; | 8238 | return; |
8265 | if (!qeth_delete_ip(card, ipaddr)) | 8239 | if (!qeth_delete_ip(card, ipaddr)) |
8266 | kfree(ipaddr); | 8240 | kfree(ipaddr); |
8267 | if (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) | 8241 | qeth_set_ip_addr_list(card); |
8268 | schedule_work(&card->kernel_thread_starter); | ||
8269 | } | 8242 | } |
8270 | 8243 | ||
8271 | /* | 8244 | /* |
@@ -8308,8 +8281,7 @@ qeth_add_rxip(struct qeth_card *card, enum qeth_prot_versions proto, | |||
8308 | } | 8281 | } |
8309 | if (!qeth_add_ip(card, ipaddr)) | 8282 | if (!qeth_add_ip(card, ipaddr)) |
8310 | kfree(ipaddr); | 8283 | kfree(ipaddr); |
8311 | if (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) | 8284 | qeth_set_ip_addr_list(card); |
8312 | schedule_work(&card->kernel_thread_starter); | ||
8313 | return 0; | 8285 | return 0; |
8314 | } | 8286 | } |
8315 | 8287 | ||
@@ -8337,8 +8309,7 @@ qeth_del_rxip(struct qeth_card *card, enum qeth_prot_versions proto, | |||
8337 | return; | 8309 | return; |
8338 | if (!qeth_delete_ip(card, ipaddr)) | 8310 | if (!qeth_delete_ip(card, ipaddr)) |
8339 | kfree(ipaddr); | 8311 | kfree(ipaddr); |
8340 | if (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) | 8312 | qeth_set_ip_addr_list(card); |
8341 | schedule_work(&card->kernel_thread_starter); | ||
8342 | } | 8313 | } |
8343 | 8314 | ||
8344 | /** | 8315 | /** |
@@ -8380,8 +8351,7 @@ qeth_ip_event(struct notifier_block *this, | |||
8380 | default: | 8351 | default: |
8381 | break; | 8352 | break; |
8382 | } | 8353 | } |
8383 | if (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) | 8354 | qeth_set_ip_addr_list(card); |
8384 | schedule_work(&card->kernel_thread_starter); | ||
8385 | out: | 8355 | out: |
8386 | return NOTIFY_DONE; | 8356 | return NOTIFY_DONE; |
8387 | } | 8357 | } |
@@ -8433,8 +8403,7 @@ qeth_ip6_event(struct notifier_block *this, | |||
8433 | default: | 8403 | default: |
8434 | break; | 8404 | break; |
8435 | } | 8405 | } |
8436 | if (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) | 8406 | qeth_set_ip_addr_list(card); |
8437 | schedule_work(&card->kernel_thread_starter); | ||
8438 | out: | 8407 | out: |
8439 | return NOTIFY_DONE; | 8408 | return NOTIFY_DONE; |
8440 | } | 8409 | } |
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index e6af381e206d..e02d85f56e60 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -218,7 +218,7 @@ struct ieee80211_snap_hdr { | |||
218 | #define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE) | 218 | #define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE) |
219 | 219 | ||
220 | #define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG) | 220 | #define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG) |
221 | #define WLAN_GET_SEQ_SEQ(seq) ((seq) & IEEE80211_SCTL_SEQ) | 221 | #define WLAN_GET_SEQ_SEQ(seq) (((seq) & IEEE80211_SCTL_SEQ) >> 4) |
222 | 222 | ||
223 | /* Authentication algorithms */ | 223 | /* Authentication algorithms */ |
224 | #define WLAN_AUTH_OPEN 0 | 224 | #define WLAN_AUTH_OPEN 0 |